Skip to content

fix(acp): polish Zed rendering — thought routing, usage indicator, history replay, tool formatters#19143

Closed
teknium1 wants to merge 7 commits into
mainfrom
hermes/hermes-96962c19
Closed

fix(acp): polish Zed rendering — thought routing, usage indicator, history replay, tool formatters#19143
teknium1 wants to merge 7 commits into
mainfrom
hermes/hermes-96962c19

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented May 3, 2026

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: set agent.thinking_callback = None, wire reasoning_callback + stream_delta_callback; add _build_usage_update / _send_usage_update / _schedule_usage_update driving ACP UsageUpdate; schedule history replay post-response so Zed attaches replayed updates; expand _replay_session_history to emit ToolCallStart/ToolCallProgress for historical tool calls; richer /context output with compression threshold guidance.
  • acp_adapter/tools.py: _POLISHED_TOOLS set + ~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_result fallback. raw_output=None for polished tools. Fenced file content to avoid Zed pipe-as-table rendering.
  • Tests: +192 lines in test_server.py, +237 in test_tools.py, +7 in test_mcp_e2e.py covering the new flows.

Validation

  • Clean cherry-pick onto current main, no conflicts.
  • scripts/run_tests.sh tests/acp/ → 206/206 passing.
  • Verified acp.schema.UsageUpdate exists on our pinned agent-client-protocol 0.8.1.
  • Verified AIAgent.thinking_callback / reasoning_callback / stream_delta_callback all exist in run_agent.py as used.

Closes #18578.

Co-authored-by: Henkey noonou7@gmail.com

@teknium1
Copy link
Copy Markdown
Contributor Author

teknium1 commented May 3, 2026

Closing this salvage for now — going back to the author on the original PR for clarification before merging. Original PR: #18578.

@teknium1 teknium1 closed this May 3, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/acp Agent Communication Protocol adapter duplicate This issue or pull request already exists labels May 3, 2026
@alt-glitch
Copy link
Copy Markdown
Collaborator

Duplicate of #19139 which was already merged — same salvage of #18578 with identical cherry-picks.

1 similar comment
@alt-glitch
Copy link
Copy Markdown
Collaborator

Duplicate of #19139 which was already merged — same salvage of #18578 with identical cherry-picks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants