Skip to content

fix(acp): improve Zed integration (salvage of #11716) - #11784

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-97982847
Apr 17, 2026
Merged

fix(acp): improve Zed integration (salvage of #11716)#11784
teknium1 merged 2 commits into
mainfrom
hermes/hermes-97982847

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of #11716 onto current main — preserves Henkey's authorship via cherry-pick.

Improves Hermes ACP behavior for Zed so the editor renders rich UI (model picker, diffs, session history) instead of falling back to default states.

Changes

  • acp_adapter/server.py: return SessionModelState on new/load/resume; provider-aware provider:model resolution for ACP model switching; title + updated_at in session listing; auto-title after first real exchange
  • acp_adapter/session.py: cwd filtering with Windows/WSL path normalization; hide empty threads; sort by most recent activity; title/preview fallback
  • acp_adapter/tools.py: emit structured tool_diff_content for patch/write_file on both start AND completion (previously start had diffs but completion degraded to plain-text JSON cards); V4A patch parser + unified-diff parser
  • acp_adapter/events.py: capture edit snapshots at tool start, thread args/snapshot metadata into completion events
  • run_agent.py: pass tool arguments through step callback metadata so ACP completion rendering has enough context (+1 line)
  • scripts/release.py: AUTHOR_MAP entry for @HenkDz (+1 line)
  • tests/acp/test_{events,mcp_e2e,server,session,tools}.py: regression coverage for model state, session history metadata, ordering, diff rendering, completion-event behavior

Why salvage instead of direct merge

Original PR branched 63 commits behind main. A direct merge would have deleted release_clients() from run_agent.py (added in #11565), wiped ~22 recent AUTHOR_MAP entries, and reverted test_agent_cache.py (782 lines), dingtalk_auth.py, cron scheduler rework, and Discord/Weixin/dingtalk changes. Cherry-picking the author's 2 intentional commits (444548c5 + 620d71b6) onto current main applies only the intended changes.

Validation

Result
py_compile all 5 changed .py files ✅ pass
scripts/run_tests.sh tests/acp/ ✅ 143 passed, 7 warnings, 16.9s
release_clients() preserved in run_agent.py ✅ line 3245
Recent AUTHOR_MAP entries preserved ✅ kevinskysunny, anthhub, shenuu, xiayh0107 intact
Diff vs origin/main ✅ only the 11 intended files, no staleness artifacts

Attribution

Original PR: #11716 by @HenkDz. Both commits cherry-picked with Author: Henkey <noonou7@gmail.com> preserved. Closing #11716 with credit after merge.

@teknium1
teknium1 merged commit d49126b into main Apr 17, 2026
7 checks passed
@teknium1
teknium1 deleted the hermes/hermes-97982847 branch April 17, 2026 20:29
@teknium1 teknium1 mentioned this pull request Apr 17, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants