debug(cli): add event logging to diagnose realtime streaming in CI

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-25 21:37:52 +09:00
parent 1bff5f7966
commit accedb59b7

View File

@@ -36,7 +36,12 @@ export async function processEvents(
try { try {
const payload = event as EventPayload const payload = event as EventPayload
if (!payload?.type) continue if (!payload?.type) {
console.error(pc.dim(`[event] no type: ${JSON.stringify(event)}`))
continue
}
console.error(pc.dim(`[event] ${payload.type}`))
handleSessionIdle(ctx, payload, state) handleSessionIdle(ctx, payload, state)
handleSessionStatus(ctx, payload, state) handleSessionStatus(ctx, payload, state)
@@ -44,7 +49,9 @@ export async function processEvents(
handleMessageUpdated(ctx, payload, state) handleMessageUpdated(ctx, payload, state)
handleToolExecute(ctx, payload, state) handleToolExecute(ctx, payload, state)
handleToolResult(ctx, payload, state) handleToolResult(ctx, payload, state)
} catch {} } catch (err) {
console.error(pc.red(`[event error] ${err}`))
}
} }
} }