fix(acp): improve Zed integration (salvage of #11716) - #11784
Merged
Conversation
19 tasks
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.
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: returnSessionModelStateon new/load/resume; provider-awareprovider:modelresolution for ACP model switching;title+updated_atin session listing; auto-title after first real exchangeacp_adapter/session.py: cwd filtering with Windows/WSL path normalization; hide empty threads; sort by most recent activity; title/preview fallbackacp_adapter/tools.py: emit structuredtool_diff_contentforpatch/write_fileon both start AND completion (previously start had diffs but completion degraded to plain-text JSON cards); V4A patch parser + unified-diff parseracp_adapter/events.py: capture edit snapshots at tool start, thread args/snapshot metadata into completion eventsrun_agent.py: pass toolargumentsthrough 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 behaviorWhy 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
py_compileall 5 changed .py filesscripts/run_tests.sh tests/acp/release_clients()preserved in run_agent.pyAttribution
Original PR: #11716 by @HenkDz. Both commits cherry-picked with
Author: Henkey <noonou7@gmail.com>preserved. Closing #11716 with credit after merge.