MCPcopy Index your code
hub / github.com/simstudioai/sim / cancelPendingTools

Function cancelPendingTools

apps/sim/lib/copilot/request/lifecycle/run.ts:1015–1024  ·  view source on GitHub ↗
(context: StreamingContext)

Source from the content-addressed store, hash-verified

1013}
1014
1015function cancelPendingTools(context: StreamingContext): void {
1016 for (const [, toolCall] of context.toolCalls) {
1017 if (toolCall.status === 'pending' || toolCall.status === 'executing') {
1018 setTerminalToolCallState(toolCall, {
1019 status: MothershipStreamV1ToolOutcome.cancelled,
1020 error: 'Stopped by user',
1021 })
1022 }
1023 }
1024}
1025
1026function isRetryableStreamError(error: unknown): boolean {
1027 if (error instanceof DOMException && error.name === 'AbortError') {

Callers 1

runCheckpointLoopFunction · 0.85

Calls 1

setTerminalToolCallStateFunction · 0.90

Tested by

no test coverage detected