feat(acp): expose context window usage and project rules to IDE#1005
Merged
feat(acp): expose context window usage and project rules to IDE#1005
Conversation
Enable the unstable-session-usage feature in zeph-acp by default so that
UsageUpdate (used/size tokens) is emitted after each LLM response. Zed
renders this as the "Context N% · Xk / Yk" badge in the agent panel.
Add project rules reporting: collect_project_rules in src/acp.rs globs
.claude/rules/*.md relative to the session cwd and includes skill file
basenames. ZephAcpAgent.with_project_rules() populates _meta.projectRules
in NewSessionResponse as [{name: "file.md"}, ...]. Zed renders this as
the "N project rules" badge on session start.
Closes #1002
UsageUpdate notifications are sent per ACP spec but IDE rendering depends on client-side support. _meta.projectRules is a Zeph extension not yet consumed by Zed's native project rules badge. Update both docs and README to reflect actual behavior.
4bc2a06 to
13ba3b4
Compare
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.
Closes #1002
Summary
4% · 5.6k / 144k):unstable-session-usageenabled by default inzeph-acp;UsageUpdateemitted after each LLM response populates the token badge in Zed IDEN project rules): newcollect_project_ruleshelper globs.claude/rules/*.mdfrom session cwd + skill file basenames; sent as_meta.projectRules: [{name: "..."}]inNewSessionResponseZephAcpAgent::with_project_rules()builder for supplying rules to the ACP agentdocs/src/advanced/acp.mdupdatedTest plan
--features acpand start zeph with orchestrator configcargo nextest run --workspace --lib --bins— 2944 tests pass