feat(panel): prompt-cache hit rate in /acp status - #213
Merged
Conversation
- commands.ts: cacheUsageSamples() extracts per-request {input, cacheRead,
cacheWrite} from assistant messages in stateFor() entries; passed as
buildStatusPanel cacheUsages. Requests without provider cache reporting
stay 0/0 (kernel cacheHitStats excludes them from the average).
- Requires acp-kernel 0.0.44 (panel cacheUsages field) — dep bump + lock
regen in a follow-up commit once v0.0.44 is released.
- tests: end-to-end render (93.0% session / 90.0% last from mixed usage
entries) + omission when entries carry no cache-reported usage
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-213Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr213.tgz
pi install ./packageThis comment is automatically updated on each push. |
Merged
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
Show prompt-cache hit rate in the /acp status panel — real-time (last request) + session average.
Renders only when the provider reports cache usage, e.g.:
cacheUsagesinput — kernel PR feat(panel): prompt-cache hit-rate section (last + session avg) acp-kernel#157, released as v0.0.44 via release v0.0.44 acp-kernel#158)cacheUsageSamples()collects per-assistant-message providerusagefrom session entries (runtime.stateFor()already returns them) and feedsbuildStatusPanelcacheRead + cacheWrite > 0count (providers without cache reporting never drag the average to a fake 0%); section is omitted entirely when no request qualifiesTests
+2 end-to-end panel cases (rates rendered from mocked entries; section omitted without usage). Full suite: 411/411 pass, typecheck clean.