fix(vscode): restore usage footers when reopening chats - #1098
Open
RRXXZZYY wants to merge 1 commit into
Open
Conversation
RRXXZZYY
requested review from
Avtrkrb,
akramcodez and
will-lamerton
as code owners
August 31, 2026 12:30
RRXXZZYY
force-pushed
the
fix/1097-persist-response-usage
branch
from
August 31, 2026 19:33
a03d38d to
039b3ae
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.
Description
Closes #1097.
Saved ACP messages now keep the completed turn's token usage and optional estimated cost on the matching assistant message. History replay emits that metadata after the response, and the VS Code panel reuses its existing usage-footer renderer, so reopening a chat restores the same token/cost line shown live.
The field is optional, so existing session files without usage metadata continue to load unchanged.
Type of Change
Changeset
pnpm changeset) describing this change for the changelogTesting
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)Passed locally:
pnpm test:formatpnpm test:typespnpm test:types:vscodepnpm test:lintpnpm test:knip(existing configuration hint only)pnpm test:changesetspnpm test:auditpnpm run buildpnpm --dir plugins/vscode run buildgit diff --checkThe full AVA run was not green on this Windows checkout: it reported 20 hook failures, 80 test failures, 2 skipped tests, and 1 uncaught exception. The observed failures were in existing Windows path, IPC, permission, cross-device temp-file, and missing-built-CLI cases; all five new regression tests passed. Semgrep was not installed, so the repository script's documented optional security-scan fallback applies.
Manual Testing
No live provider was exercised; this change is limited to post-response session persistence and local history replay.
Checklist
AI assistance
AI assistance was used for implementation and test drafting. I reviewed the final diff, ran the checks above, and verified that the PR contains only the scoped fix and regression coverage.