MCPcopy Index your code
hub / github.com/coder/mux / createSimulationContext

Function createSimulationContext

src/node/services/streamSimulation.test.ts:18–32  ·  view source on GitHub ↗
(events: CapturedEvent[])

Source from the content-addressed store, hash-verified

16}
17
18function createSimulationContext(events: CapturedEvent[]): SimulationContext {
19 return {
20 workspaceId: "workspace-1",
21 assistantMessageId: "assistant-1",
22 canonicalModelString: "openai:gpt-5.5",
23 routedThroughGateway: false,
24 historySequence: 1,
25 systemMessageTokens: 123,
26 effectiveAgentId: "exec",
27 effectiveMode: "exec",
28 metadataMode: "exec",
29 effectiveThinkingLevel: "low",
30 emit: (event, data) => events.push({ event, data }),
31 };
32}
33
34function getCapturedEvent<T extends { type: string }>(events: CapturedEvent[], type: T["type"]): T {
35 const match = events.find((event) => event.event === type);

Callers 1

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected