Skip to content

Commit 8c06ed0

Browse files
committed
fix: ensure tool call UI updates when summary is missing
The tool call UI would stay in a 'waiting' state (hourglass icon) for tools that didn't provide a summary in their completion output (e.g., sequential_thinking). This happened because `eca-chat--tool-call-json-outputs-details` attempted to use `concat` with a nil `summary` value, causing the handler to terminate silently before it could update the status icon. Adding a fallback label ensures the UI update always completes.
1 parent 65d2d2c commit 8c06ed0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eca-chat.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,10 +1896,11 @@ Append STATUS, TOOL-CALL-NEXT-LINE-SPACING and ROOTS"
18961896
"Update tool call UI for json output given CONTENT, TIME and STATUS."
18971897
(-let* (((&plist :name name :arguments arguments :server server :details details :id
18981898
id :summary summary) content)
1899-
(jsons (plist-get details :jsons)))
1899+
(jsons (plist-get details :jsons))
1900+
(label (or summary (format "Called tool: %s__%s" server name))))
19001901
(eca-chat--update-expandable-content
19011902
id
1902-
(concat (propertize summary 'font-lock-face 'eca-chat-mcp-tool-call-label-face)
1903+
(concat (propertize label 'font-lock-face 'eca-chat-mcp-tool-call-label-face)
19031904
" " status time)
19041905
(eca-chat--content-table
19051906
`(("Tool" . ,name)

0 commit comments

Comments
 (0)