diff options
| author | Dax Raad <[email protected]> | 2025-06-09 20:48:50 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-09 20:48:50 -0400 |
| commit | fdaa7f287cb3cfa9b87784c69b4037549f20fe6f (patch) | |
| tree | 3e6ff0abdd6e2629a9d2683e64441785dbe7c682 /packages | |
| parent | fed659c582dd548cb0a586e115829a7dc22ac312 (diff) | |
| download | opencode-fdaa7f287cb3cfa9b87784c69b4037549f20fe6f.tar.gz opencode-fdaa7f287cb3cfa9b87784c69b4037549f20fe6f.zip | |
aborted toolcalls should be cleaned up
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/session/index.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index 67e4081fd..02c98a77b 100644 --- a/packages/opencode/src/session/index.ts +++ b/packages/opencode/src/session/index.ts @@ -564,6 +564,18 @@ export namespace Session { }, }) next.metadata!.time.completed = Date.now() + for (const part of next.parts) { + if ( + part.type === "tool-invocation" && + part.toolInvocation.state !== "result" + ) { + part.toolInvocation = { + ...part.toolInvocation, + state: "result", + result: "request was aborted", + } + } + } await updateMessage(next) return next } |
