fix(acp): improve Zed integration - #11716
Closed
HenkDz wants to merge 2 commits into
Closed
Conversation
Contributor
|
Your branch was 63 commits behind main, so a direct merge would have reverted recent work (release_clients() in run_agent.py, ~22 AUTHOR_MAP entries, test_agent_cache.py, dingtalk_auth.py, cron scheduler, Discord/Weixin changes). Cherry-picked your two commits (444548c + 620d71b) onto current main with your authorship preserved — 143 ACP tests pass on the merged result. Thanks for the contribution! |
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.
What does this PR do?
This improves Hermes ACP behavior for Zed so the editor gets the metadata and structured updates it needs instead of falling back to weak/default UI states.
On the Hermes side, this PR:
patchandwrite_fileon both tool start and tool completion, instead of degrading into JSON info cardsupdated_at, cwd filtering, hidden empty threads, and most-recent orderingsession/set_modelchanges providersWhy this approach:
SessionModelState,SessionInfo, diff content blocks)Related Issue
N/A
Type of Change
Changes Made
acp_adapter/server.pySessionModelStateon new/load/resumeprovider:modelresolution for ACP model switchingtitleandupdated_atin ACP session listingacp_adapter/session.pycwdacp_adapter/tools.pypatch/write_fileacp_adapter/events.pyrun_agent.pytests/acp/test_{events,mcp_e2e,server,session,tools}.pyHow to Test
pytest tests/acp/test_session.py tests/acp/test_server.py tests/acp/test_tools.py tests/acp/test_events.py tests/acp/test_mcp_e2e.py -qpatchandwrite_fileedits render as diffs rather than JSON info cardsChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Zed-side config/workflow notes used during validation (not part of this repo diff):
/home/nour/.local/bin/hermes acpwsl bash -lc "/home/nour/.local/bin/hermes acp"Those editor-side notes are included here for reviewers reproducing the Zed flow; the actual code changes in this PR are all on the Hermes ACP side.