Răsfoiți Sursa

fix: Add kind, title, rawInput to ACP tool_call_update events (#7368)

Co-authored-by: noam-v <[email protected]>
Noam Bressler 1 lună în urmă
părinte
comite
958f1edfef
1 a modificat fișierele cu 12 adăugiri și 0 ștergeri
  1. 12 0
      packages/opencode/src/acp/agent.ts

+ 12 - 0
packages/opencode/src/acp/agent.ts

@@ -167,6 +167,8 @@ export namespace ACP {
                             sessionUpdate: "tool_call_update",
                             sessionUpdate: "tool_call_update",
                             toolCallId: part.callID,
                             toolCallId: part.callID,
                             status: "in_progress",
                             status: "in_progress",
+                            kind: toToolKind(part.tool),
+                            title: part.tool,
                             locations: toLocations(part.tool, part.state.input),
                             locations: toLocations(part.tool, part.state.input),
                             rawInput: part.state.input,
                             rawInput: part.state.input,
                           },
                           },
@@ -242,6 +244,7 @@ export namespace ACP {
                             kind,
                             kind,
                             content,
                             content,
                             title: part.state.title,
                             title: part.state.title,
+                            rawInput: part.state.input,
                             rawOutput: {
                             rawOutput: {
                               output: part.state.output,
                               output: part.state.output,
                               metadata: part.state.metadata,
                               metadata: part.state.metadata,
@@ -260,6 +263,9 @@ export namespace ACP {
                             sessionUpdate: "tool_call_update",
                             sessionUpdate: "tool_call_update",
                             toolCallId: part.callID,
                             toolCallId: part.callID,
                             status: "failed",
                             status: "failed",
+                            kind: toToolKind(part.tool),
+                            title: part.tool,
+                            rawInput: part.state.input,
                             content: [
                             content: [
                               {
                               {
                                 type: "content",
                                 type: "content",
@@ -491,6 +497,8 @@ export namespace ACP {
                     sessionUpdate: "tool_call_update",
                     sessionUpdate: "tool_call_update",
                     toolCallId: part.callID,
                     toolCallId: part.callID,
                     status: "in_progress",
                     status: "in_progress",
+                    kind: toToolKind(part.tool),
+                    title: part.tool,
                     locations: toLocations(part.tool, part.state.input),
                     locations: toLocations(part.tool, part.state.input),
                     rawInput: part.state.input,
                     rawInput: part.state.input,
                   },
                   },
@@ -566,6 +574,7 @@ export namespace ACP {
                     kind,
                     kind,
                     content,
                     content,
                     title: part.state.title,
                     title: part.state.title,
+                    rawInput: part.state.input,
                     rawOutput: {
                     rawOutput: {
                       output: part.state.output,
                       output: part.state.output,
                       metadata: part.state.metadata,
                       metadata: part.state.metadata,
@@ -584,6 +593,9 @@ export namespace ACP {
                     sessionUpdate: "tool_call_update",
                     sessionUpdate: "tool_call_update",
                     toolCallId: part.callID,
                     toolCallId: part.callID,
                     status: "failed",
                     status: "failed",
+                    kind: toToolKind(part.tool),
+                    title: part.tool,
+                    rawInput: part.state.input,
                     content: [
                     content: [
                       {
                       {
                         type: "content",
                         type: "content",