Build the common StreamStartEvent used by both simulation paths.
(ctx: SimulationContext)
| 40 | |
| 41 | /** Build the common StreamStartEvent used by both simulation paths. */ |
| 42 | function createSimulatedStreamStart(ctx: SimulationContext): StreamStartEvent { |
| 43 | return { |
| 44 | type: "stream-start", |
| 45 | workspaceId: ctx.workspaceId, |
| 46 | messageId: ctx.assistantMessageId, |
| 47 | model: ctx.canonicalModelString, |
| 48 | routedThroughGateway: ctx.routedThroughGateway, |
| 49 | ...(ctx.routeProvider != null ? { routeProvider: ctx.routeProvider } : {}), |
| 50 | historySequence: ctx.historySequence, |
| 51 | startTime: Date.now(), |
| 52 | agentId: ctx.effectiveAgentId, |
| 53 | ...(ctx.metadataMode != null ? { mode: ctx.metadataMode } : {}), |
| 54 | thinkingLevel: ctx.effectiveThinkingLevel, |
| 55 | }; |
| 56 | } |
| 57 | |
| 58 | // --------------------------------------------------------------------------- |
| 59 | // forceContextLimitError simulation |
no outgoing calls
no test coverage detected