From 64a20e2f0e50ef77b8e47c6707b0cb5a10d52934 Mon Sep 17 00:00:00 2001 From: Edd Wilder-James Date: Tue, 27 Jan 2026 21:43:04 -0800 Subject: [PATCH] Display command text in tool_call fragments When ACP sends tool_call updates, the command from rawInput.command is stored but only used for transcript logging. This change prepends the command to the body when rendering tool_call_update fragments, so users can see what command was executed. Before: Only title, status, and output shown After: Shows '$ ' above the output (styled as comment) --- agent-shell.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent-shell.el b/agent-shell.el index e3a58e4..9a453e7 100644 --- a/agent-shell.el +++ b/agent-shell.el @@ -971,7 +971,11 @@ otherwise returns COMMAND unchanged." :block-id .toolCallId :label-left (map-elt tool-call-labels :status) :label-right (map-elt tool-call-labels :title) - :body (string-trim body-text) + :body (concat + (when-let ((cmd (map-nested-elt state `(:tool-calls ,.toolCallId :command)))) + (unless (string-empty-p cmd) + (propertize (format "$ %s\n\n" cmd) 'font-lock-face 'font-lock-comment-face))) + (string-trim body-text)) :expanded agent-shell-tool-use-expand-by-default)))) (map-put! state :last-entry-type "tool_call_update")) ((equal (map-elt update 'sessionUpdate) "available_commands_update")