Skip to content

Commit 958f1ed

Browse files
noamzbrnoam-v
andauthored
fix: Add kind, title, rawInput to ACP tool_call_update events (#7368)
Co-authored-by: noam-v <[email protected]>
1 parent 2bb299d commit 958f1ed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/opencode/src/acp/agent.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ export namespace ACP {
167167
sessionUpdate: "tool_call_update",
168168
toolCallId: part.callID,
169169
status: "in_progress",
170+
kind: toToolKind(part.tool),
171+
title: part.tool,
170172
locations: toLocations(part.tool, part.state.input),
171173
rawInput: part.state.input,
172174
},
@@ -242,6 +244,7 @@ export namespace ACP {
242244
kind,
243245
content,
244246
title: part.state.title,
247+
rawInput: part.state.input,
245248
rawOutput: {
246249
output: part.state.output,
247250
metadata: part.state.metadata,
@@ -260,6 +263,9 @@ export namespace ACP {
260263
sessionUpdate: "tool_call_update",
261264
toolCallId: part.callID,
262265
status: "failed",
266+
kind: toToolKind(part.tool),
267+
title: part.tool,
268+
rawInput: part.state.input,
263269
content: [
264270
{
265271
type: "content",
@@ -491,6 +497,8 @@ export namespace ACP {
491497
sessionUpdate: "tool_call_update",
492498
toolCallId: part.callID,
493499
status: "in_progress",
500+
kind: toToolKind(part.tool),
501+
title: part.tool,
494502
locations: toLocations(part.tool, part.state.input),
495503
rawInput: part.state.input,
496504
},
@@ -566,6 +574,7 @@ export namespace ACP {
566574
kind,
567575
content,
568576
title: part.state.title,
577+
rawInput: part.state.input,
569578
rawOutput: {
570579
output: part.state.output,
571580
metadata: part.state.metadata,
@@ -584,6 +593,9 @@ export namespace ACP {
584593
sessionUpdate: "tool_call_update",
585594
toolCallId: part.callID,
586595
status: "failed",
596+
kind: toToolKind(part.tool),
597+
title: part.tool,
598+
rawInput: part.state.input,
587599
content: [
588600
{
589601
type: "content",

0 commit comments

Comments
 (0)