Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ export class StructuredAgentSessionHost {
}

/** Test barrier: every write has landed by its call's return, so no production path needs it. */
flushStreamedEvents = (sessionId: string): Promise<void> =>
this.runtimeState.flushEventSink(sessionId)
flushStreamedEvents = (id: string): Promise<void> => this.runtimeState.flushEventSink(id)

// Trigger inlined rather than imported: `AgentSessionResumeTrigger` in shared is the canonical
// type, and this file has no line budget left for the import.
Expand Down
8 changes: 6 additions & 2 deletions src/shared/structured-agent-session-live-turn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ describe('isStructuredAgentSessionThinking', () => {
state,
...(state === 'completed' ? { completedAt: 3 } : {})
})
expect(isStructuredAgentSessionThinking([turnStart, withState('running')])).toBe(true)
expect(isStructuredAgentSessionThinking({ items: [turnStart, withState('running')] })).toBe(
true
)
// Ended reasoning stays the newest row while Claude streams a tool's input after it.
expect(isStructuredAgentSessionThinking([turnStart, withState('completed')])).toBe(false)
expect(isStructuredAgentSessionThinking({ items: [turnStart, withState('completed')] })).toBe(
false
)
})

it('is false once a tool call, a message or a diff lands after the reasoning', () => {
Expand Down
Loading