diff --git a/src/adapters/acp/acp.adapter.ts b/src/adapters/acp/acp.adapter.ts
index bbc4799..d9743c3 100644
--- a/src/adapters/acp/acp.adapter.ts
+++ b/src/adapters/acp/acp.adapter.ts
@@ -985,6 +985,9 @@ export class AcpAdapter implements IAgentClient, IAcpClient {
kind: update.kind ?? undefined,
content: AcpTypeConverter.toToolCallContent(update.content),
locations: update.locations ?? undefined,
+ rawInput: update.rawInput as
+ | { [k: string]: unknown }
+ | undefined,
});
break;
}
@@ -1196,6 +1199,9 @@ export class AcpAdapter implements IAgentClient, IAcpClient {
content: AcpTypeConverter.toToolCallContent(
toolCallInfo?.content as acp.ToolCallContent[] | undefined,
),
+ rawInput: toolCallInfo?.rawInput as
+ | { [k: string]: unknown }
+ | undefined,
permissionRequest: permissionRequestData,
});
diff --git a/src/components/chat/ToolCallRenderer.tsx b/src/components/chat/ToolCallRenderer.tsx
index 5bf7e4f..4574636 100644
--- a/src/components/chat/ToolCallRenderer.tsx
+++ b/src/components/chat/ToolCallRenderer.tsx
@@ -34,7 +34,7 @@ export function ToolCallRenderer({
toolCallId,
permissionRequest,
locations,
- // rawInput,
+ rawInput,
content: toolContent,
} = content;
@@ -102,6 +102,18 @@ export function ToolCallRenderer({
)}
{title}
+ {kind === "execute" &&
+ rawInput &&
+ typeof rawInput.command === "string" && (
+
+
+ {rawInput.command}
+ {Array.isArray(rawInput.args) &&
+ rawInput.args.length > 0 &&
+ ` ${(rawInput.args as string[]).join(" ")}`}
+
+
+ )}
{locations && locations.length > 0 && (
{locations.map((loc, idx) => (
diff --git a/src/domain/models/session-update.ts b/src/domain/models/session-update.ts
index c7bee6c..9675777 100644
--- a/src/domain/models/session-update.ts
+++ b/src/domain/models/session-update.ts
@@ -75,6 +75,7 @@ export interface ToolCall extends SessionUpdateBase {
kind?: ToolKind;
content?: ToolCallContent[];
locations?: ToolCallLocation[];
+ rawInput?: { [k: string]: unknown };
permissionRequest?: {
requestId: string;
options: PermissionOption[];
@@ -97,6 +98,7 @@ export interface ToolCallUpdate extends SessionUpdateBase {
kind?: ToolKind;
content?: ToolCallContent[];
locations?: ToolCallLocation[];
+ rawInput?: { [k: string]: unknown };
permissionRequest?: {
requestId: string;
options: PermissionOption[];
diff --git a/src/hooks/useChat.ts b/src/hooks/useChat.ts
index 4c1f45d..e40972e 100644
--- a/src/hooks/useChat.ts
+++ b/src/hooks/useChat.ts
@@ -185,6 +185,11 @@ function mergeToolCallContent(
update.locations !== undefined
? update.locations
: existing.locations,
+ rawInput:
+ update.rawInput !== undefined &&
+ Object.keys(update.rawInput).length > 0
+ ? update.rawInput
+ : existing.rawInput,
permissionRequest:
update.permissionRequest !== undefined
? update.permissionRequest
@@ -466,6 +471,7 @@ export function useChat(
kind: update.kind,
content: update.content,
locations: update.locations,
+ rawInput: update.rawInput,
permissionRequest: update.permissionRequest,
});
break;
diff --git a/styles.css b/styles.css
index 2c85cea..0765213 100644
--- a/styles.css
+++ b/styles.css
@@ -184,6 +184,20 @@ If your plugin does not need CSS, delete this file.
font-size: 0.9em;
}
+.agent-client-message-tool-call-command {
+ color: var(--text-muted);
+ margin: 4px 0;
+}
+
+.agent-client-message-tool-call-command code {
+ display: block;
+ font-family: var(--font-monospace);
+ font-size: 0.9em;
+ background: var(--background-secondary);
+ padding: 2px 6px;
+ border-radius: 3px;
+}
+
.agent-client-message-tool-call-status {
color: var(--text-muted);
user-select: text;