Skip to content

Commit 0564853

Browse files
fix CRITICAL: add missing ReasoningTokenEvent interface + union variant
REASONING_TOKEN was declared in the ExecutionEventType union (line 22) and yielded from AgentExecutor.ts (lines 174, 388), but no ReasoningTokenEvent interface existed and it was not in the ExecutionEvent discriminated union (lines 525-574). This caused TypeScript to flag type errors when yielding these events and made ExecutionSessionManager.ts:1110 rely on 'any' coercion. Added interface with type: 'REASONING_TOKEN', executionId, token, timestamp.
1 parent c0d5f24 commit 0564853

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/desktop/src/renderer/runtime/ExecutionEvent.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ export interface TokenEvent {
212212
timestamp: number
213213
}
214214

215+
export interface ReasoningTokenEvent {
216+
type: "REASONING_TOKEN"
217+
executionId: string
218+
token: string
219+
timestamp: number
220+
}
221+
215222
export interface FallbackActivatedEvent {
216223
type: "FALLBACK_ACTIVATED"
217224
executionId: string
@@ -541,6 +548,7 @@ export type ExecutionEvent =
541548
| (ProviderConnectingEvent & ExecutionTraceable)
542549
| (ProviderConnectedEvent & ExecutionTraceable)
543550
| (TokenEvent & ExecutionTraceable)
551+
| (ReasoningTokenEvent & ExecutionTraceable)
544552
| (MessageUpdateEvent & ExecutionTraceable)
545553
| (MessageCompleteEvent & ExecutionTraceable)
546554
| (ExecutionCompleteEvent & ExecutionTraceable)

0 commit comments

Comments
 (0)