fix(acp): route Zed thoughts to reasoning + polish tool/context rendering#19139
Merged
Conversation
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.
Salvage of #18578 onto current main. All 7 commits cherry-picked from @HenkDz with authorship preserved.
Summary
Zed (and other ACP clients) now show provider reasoning in the thought pane instead of Hermes' kawaii waiting strings, get a live context-usage indicator, and render ~35 tool types as human-readable panes instead of raw JSON.
Changes
acp_adapter/server.py:thinking_callback=None; route provider reasoning deltas viareasoning_callback; stream assistant response throughstream_delta_callbackand skip the duplicatefinal_responsesend when already streamed.acp_adapter/server.py: emit ACPusage_update(context size + estimated used tokens) after new/load/resume session and every prompt; powers Zed's circular context indicator.acp_adapter/server.py:/contextslash command now shows provider, token pressure, and compression-threshold guidance.acp_adapter/server.py:session/loadandsession/resumereplay also reconstructs tool-callstart/completeevents so loaded threads look like the original.acp_adapter/tools.py: polished rendering for ~35 tool types (todo, read_file, search_files, execute_code, skill_view/list/manage, web_search, web_extract, terminal, process, browser_, kanban_, feishu_, ha_, yb_*, cronjob, send_message, delegate_task, etc.);raw_output=Noneon polished tools so Zed doesn't double-show a raw accordion.tests/acp/test_server.py,test_tools.py,test_mcp_e2e.py.Validation
scripts/run_tests.sh tests/acp/ -q→ 206 passedCloses
Closes #18578. Credit to @HenkDz for the entire implementation.