fix(acp): polish Zed rendering — thought routing, usage indicator, history replay, tool formatters#19143
Closed
teknium1 wants to merge 7 commits into
Closed
fix(acp): polish Zed rendering — thought routing, usage indicator, history replay, tool formatters#19143teknium1 wants to merge 7 commits into
teknium1 wants to merge 7 commits into
Conversation
Contributor
Author
|
Closing this salvage for now — going back to the author on the original PR for clarification before merging. Original PR: #18578. |
Collaborator
1 similar comment
Collaborator
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 by @HenkDz onto current main. All 7 contributor commits cherry-picked with original authorship preserved.
Summary
ACP (Zed/VS Code/JetBrains) adapter polish. Zed's thought pane now gets real provider reasoning instead of Hermes' kawaii spinner strings, final responses no longer duplicate, native context-usage indicator is wired, session load/resume replays tool-call history, and ~20 tools have human-readable start/completion rendering instead of raw JSON dumps.
Changes
acp_adapter/server.py: setagent.thinking_callback = None, wirereasoning_callback+stream_delta_callback; add_build_usage_update/_send_usage_update/_schedule_usage_updatedriving ACPUsageUpdate; schedule history replay post-response so Zed attaches replayed updates; expand_replay_session_historyto emitToolCallStart/ToolCallProgressfor historical tool calls; richer/contextoutput with compression threshold guidance.acp_adapter/tools.py:_POLISHED_TOOLSset + ~15 per-tool formatters (todo, read_file, write_file, patch, search_files, execute_code, process, delegate_task, session_search, memory, skill_view, skill_manage, web_search, web_extract, browser_*, vision_analyze, image_generate, cronjob) with a_format_generic_structured_resultfallback.raw_output=Nonefor polished tools. Fenced file content to avoid Zed pipe-as-table rendering.Validation
scripts/run_tests.sh tests/acp/→ 206/206 passing.acp.schema.UsageUpdateexists on our pinned agent-client-protocol 0.8.1.AIAgent.thinking_callback/reasoning_callback/stream_delta_callbackall exist in run_agent.py as used.Closes #18578.
Co-authored-by: Henkey noonou7@gmail.com