( workspaceId: string, abortReason: "system" | "user" )
| 32 | } |
| 33 | |
| 34 | function 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 | |
| 47 | async function waitForCondition(condition: () => boolean, timeoutMs = 500): Promise<boolean> { |
| 48 | const deadline = Date.now() + timeoutMs; |
no outgoing calls
no test coverage detected