mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
feat: 增加调试日志以跟踪活动执行状态和钩子事件
This commit is contained in:
@@ -87,6 +87,14 @@ export function updateActiveExecution(event: {
|
|||||||
}): void {
|
}): void {
|
||||||
const { type, executionId, tool, mode, prompt, output, success } = event;
|
const { type, executionId, tool, mode, prompt, output, success } = event;
|
||||||
|
|
||||||
|
// Debug log for troubleshooting
|
||||||
|
console.log(`[ActiveExec] ${type}: ${executionId} (current count: ${activeExecutions.size})`);
|
||||||
|
|
||||||
|
if (!executionId) {
|
||||||
|
console.warn('[ActiveExec] Missing executionId, skipping');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (type === 'started') {
|
if (type === 'started') {
|
||||||
// Create new active execution
|
// Create new active execution
|
||||||
activeExecutions.set(executionId, {
|
activeExecutions.set(executionId, {
|
||||||
|
|||||||
@@ -268,6 +268,7 @@ export async function handleHooksRoutes(ctx: HooksRouteContext): Promise<boolean
|
|||||||
|
|
||||||
// Update active executions state for CLI streaming events (terminal execution)
|
// Update active executions state for CLI streaming events (terminal execution)
|
||||||
if (type === 'CLI_EXECUTION_STARTED' || type === 'CLI_OUTPUT' || type === 'CLI_EXECUTION_COMPLETED') {
|
if (type === 'CLI_EXECUTION_STARTED' || type === 'CLI_OUTPUT' || type === 'CLI_EXECUTION_COMPLETED') {
|
||||||
|
console.log(`[Hooks] CLI event: ${type}, executionId: ${extraData.executionId}`);
|
||||||
try {
|
try {
|
||||||
const { updateActiveExecution } = await import('./cli-routes.js');
|
const { updateActiveExecution } = await import('./cli-routes.js');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user