feat(tools): let the model name command runs via a title arg - #82056
Open
3Nya3 wants to merge 1 commit into
Open
feat(tools): let the model name command runs via a title arg#820563Nya3 wants to merge 1 commit into
3Nya3 wants to merge 1 commit into
Conversation
Contributor
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
3Nya3
force-pushed
the
feat/command-run-titles
branch
from
August 12, 2026 00:01
5561bcc to
a6557ec
Compare
terminal/execute_code gain an optional title (3-8 word human label). The gateway forwards it on tool.start, and the desktop prefers it over the deterministic command summary for pending, settled, group-summary, and approval rows. Untitled runs keep the old behavior; the raw command stays in the row detail/payload regardless. Compound summaries now name each segment (head + first arg: 'npx tsc · echo TSC-OK · npx vitest', '+ N more' beyond three) instead of the opaque 'first + N commands', in both the desktop summarizer and the Python tool.start preview. Also labels env-only segments (FOO=1 && npm test) instead of leaving empty slots in the join — fall back to the assignment itself when no command word survives.
3Nya3
force-pushed
the
feat/command-run-titles
branch
from
August 12, 2026 00:36
a6557ec to
d84e521
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
terminalandexecute_codegain an optionaltitlearg (3-8 word human label). The gateway forwards it ontool.start, and the desktop + TUI prefer it over the deterministic command summary for pending, settled, group-summary, and approval rows - the exact spots where a long command likepowershell -NoProfile -ExecutionPolicy Bypass -Command "..."is currently dumped raw into the row header. The model supplies the label at tool-call time, so this costs zero extra LLM calls (the aux-summarization approach was considered and rejected: extra call + latency + cost per approval).A second, tightly coupled change in the same UX surface: compound-command summaries now name each segment (
npx tsc · echo TSC-OK · npx vitest,+ N morebeyond three) instead of the opaquefirst + N commandsthat hid every segment after the first. Same files, same summarizer functions, same problem (unreadable command rows) - happy to split into a second PR if reviewers prefer.Untitled runs keep today's behavior everywhere; the raw command always stays in the row detail/payload.
Related Issue
No tracking issue found. Prior art checked before building (per CONTRIBUTING search-first): PR #22363 (
approval_purpose/effect/riskfields - structured risk context via a gateway follow-up message, different UX) and PR #68199 (Matrix-only async summary) are both open and complementary, not duplicates. This PR is the display-label counterpart at the row header.Type of Change
Changes Made
tools/terminal_tool.py- optionaltitleproperty inTERMINAL_SCHEMA(3-8 words, under 80 chars, prompted for long/wrapped commands)tools/code_execution_tool.py- same for theexecute_codeschema;_TOOL_STUBSsandbox stub updated to match (keepsTestStubSchemaDriftgreen)tui_gateway/server.py::_on_tool_start- forwardstitleontool.start; the only window where pending/approval rows render before persisted args loadapps/desktop/src/lib/chat-messages.ts-GatewayEventPayload.titledocumented for tool.start + forwarded into live tool args intoolArgs()apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts- pending row header prefersargs.title(length-capped via existingcompactPreview)apps/desktop/src/components/assistant-ui/tool/run-summary.ts- group/ticker line preferstitle(new 80-char cap: model controls the string); settled titled commands stay named (Ran List Hermes processes) while untitled ones still collapse toRan N commandsui-tui/src/app/createGatewayEventHandler.ts+gatewayTypes.ts- TUI shows the title in place of the command previewapps/desktop/src/lib/summarize-command.ts+agent/display.py- compound summaries name every segment (head subper segment,·-joined,+ N morepast three); both implementations kept in lockstepHow to Test
titleon its own for long commandsRunning <title>, settled row/group showsRan <title>, and an approval prompt (withapprovals.mode: manual) shows the title instead of the raw commandnode -v; npm -v; echo x): row readsnode -v · npm -v · echo xChecklist
Code
feat(tools):)pytest tests/ -qand all tests pass (affected suites: gateway server, display, code-execution stub drift - all green; the ~18tests/tools/live-shell failures on this Windows machine reproduce identically on pristineorigin/mainand are pre-existing/environmental)Documentation & Housekeeping
docs/, docstrings) - N/A (tool schemas are the user-facing docs here and are updated; the website tools-reference has no per-arg tables)cli-config.yaml.exampleif I added/changed config keys - N/A (no config keys)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows - N/A (no architecture change)scripts/check-windows-footguns.py --diffflags 15 pre-existingread_text()findings intests/test_tui_gateway_server.pythat are not added by this diff (0 flagged lines originate from this PR)Compatibility / prompt-cache notes
title-emitting model against an old backend is harmless (handlers ignore unknown keys).Screenshots / Logs
Verified live in the packed desktop app (Windows): titled settled row
Ran List Hermes data directories 2.4s; titled group lineRan Show Hermes working tree status, used 1 tool; untitled compounds collapsed asRan ls -la · powershell -NoProfile · tail -3 3.3s.