Skip to content

Commit 08f6c5e

Browse files
authored
Merge pull request #169 from Opencode-DCP/bugfix-do-not-prune-pending-or-running-tool-inputs
dont prune pending or running tool inputs
2 parents 5c88b84 + 250103d commit 08f6c5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/messages/prune.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ const pruneToolInputs = (
151151
if (part.tool !== 'write' && part.tool !== 'edit') {
152152
continue
153153
}
154+
// Don't prune yet if tool is still pending or running
155+
if (part.state.status === "pending" || part.state.status === "running") {
156+
continue
157+
}
158+
154159
if (part.state.input?.content !== undefined) {
155160
part.state.input.content = PRUNED_TOOL_INPUT_REPLACEMENT
156161
}

0 commit comments

Comments
 (0)