MCPcopy
hub / github.com/coder/mux / streamAbortEvent

Function streamAbortEvent

src/node/services/agentSession.queueDispatch.test.ts:34–45  ·  view source on GitHub ↗
(
  workspaceId: string,
  abortReason: "system" | "user"
)

Source from the content-addressed store, hash-verified

32}
33
34function streamAbortEvent(
35 workspaceId: string,
36 abortReason: "system" | "user"
37): Record<string, unknown> {
38 return {
39 type: "stream-abort",
40 workspaceId,
41 messageId: "assistant-1",
42 abortReason,
43 metadata: { duration: 1 },
44 };
45}
46
47async function waitForCondition(condition: () => boolean, timeoutMs = 500): Promise<boolean> {
48 const deadline = Date.now() + timeoutMs;

Calls

no outgoing calls

Tested by

no test coverage detected