GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — feat(usage): GitHub Copilot sessions show in usage history by Radu028 · Pull Request #27059 · pingdotgg/t3code Conversation
|
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — Copilot history is now automatically included in usage summaries, even without a configured Copilot account. Human review must confirm this default expansion of history coverage and displayed costs. Needs human approval because:
Notes:
You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Copilot provider identity packages/contracts/src/usage.ts, packages/provider-acp-registry/src/server/copilotAcp.ts, packages/provider-acp-registry/src/server/adapter.ts, apps/web/src/components/usage/usageProviders.ts, apps/mobile/src/features/usage/usageProviders.ts |
The usage provider contract and presentation include Copilot. ACP Registry Copilot detection uses isCopilotAgent, which checks local command names or the registry agent ID. |
Parse Copilot session receipts packages/provider-acp-registry/src/server/copilotUsage.ts, packages/provider-acp-registry/src/server/copilotUsage.test.ts |
The reader scans Copilot session-state event files and parses usage receipts. It validates token values, deduplicates usage identities, and reports costs when complete credit data is available. Tests cover resumed sessions, subagents, BYOK, and malformed or incomplete receipts. |
Register the usage reader packages/provider-acp-registry/src/server/driver.ts, apps/server/src/provider/builtInDrivers.ts, apps/server/src/usage/UsageService.test.ts |
The ACP Registry driver uses the Copilot reader, and the server includes the driver in its built-in usage drivers. The service test covers configured and host Copilot histories, resumed sessions, and subagent receipts. |
Present Copilot usage apps/web/src/components/usage/UsageLimits.tsx, apps/web/src/components/usage/UsageModelDialog.tsx, apps/web/src/components/usage/UsagePage.tsx, apps/web/src/components/usage/UsageProviderChart.tsx, apps/web/src/components/usage/UsageProviderChart.test.ts, apps/mobile/src/features/usage/usageProviders.ts, docs/user/usage.md |
Usage views pass ACP Registry agent IDs to provider icons, and hidden ACP Registry providers are handled separately when filtering limits. Mobile provider labels and colors, chart expectations, and usage documentation include Copilot. The documentation describes session sources and the recorded AI-credit cost. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
sequenceDiagram
participant AcpRegistryDriver
participant copilotUsageReader
participant CopilotSessionStateFiles
participant copilotUsageFormat
AcpRegistryDriver->>copilotUsageReader: Configure usage reader
copilotUsageReader->>CopilotSessionStateFiles: Scan session-state event files
CopilotSessionStateFiles-->>copilotUsageReader: Return event lines
copilotUsageReader->>copilotUsageFormat: Parse receipt events
copilotUsageFormat-->>copilotUsageReader: Return usage records
Possibly related PRs
Suggested reviewers: maria-rcks, juliusmarminge, wiktor102
618f1No confirmed issue prevents merging after normal checks.
Explanation
The description states the problem (GitHub Copilot sessions are missing from Usage because the ACP Registry driver has no usage reader), the change (a transcript reader for Copilot CLI session.usage_record events, copilot added to the provider contract, web and mobile labels and colors, and a user guide update), and the scope (Copilot plan quota is excluded). It also includes the required Verification details: named test files with covered cases, a reported total checked against an independent sum, vp run check:changed passing, and unchecked items. The Before/After screenshots cover the UI change. The template's Scope and approval section is only partly satisfied. It cites prior maintainer-approved provider-parity paths (#17848, #22443, #19060) and a related issue (#22866), but it does not link a triaged bug issue or explicit maintainer approval for this specific change. The title is not in the description body, so the conventional-commit title is not checked here.
Resolution
Add a link to the triaged issue or discussion that gives explicit maintainer approval for adding Copilot usage. Include the approval comment. The description cites #17848, #22443, and #19060 as parity precedent, but these do not show approval for this change. Confirm that the PR title follows the conventional commit format from the template.
Comment @coderabbitai help to get the list of available commands.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Usage read local history for every provider except Copilot, so Copilot calls made through T3 or the Copilot CLI were missing from tokens, cost, the hourly chart, and the model breakdown. The ACP Registry driver now reads Copilot CLI's session-state/<id>/events.jsonl from ~/.copilot or COPILOT_HOME, for the host and for each Copilot instance; other registry agents contribute nothing. Only durable session.usage_record receipts count. Shutdown totals overlap them. Input tokens include cache reads and writes, and subagent receipts keep their own model under the parent session. Each model call is deduplicated by a digest of its accounting usageId, so a call re-appended after a resume counts once. Cost is Copilot's recorded nano-AIU at $0.01 per AI credit when the credits are complete, otherwise model rates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot reports complete AI-credit accounting including explicit zeros, so a complete receipt with no charge is not an unknown cost to price by model. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ost Copilot history Co-Authored-By: Claude Opus 5.5 <[email protected]>
618f1fd to
8d4dae5
Compare
|
closing at @StiensWout's request under Establish the problem and scope first. This adds a new GitHub Copilot native-history reader and usage provider, including credit billing interpretation, default host-history discovery, deduplication and web/mobile presentation. The cited Pi and Muse PRs are approval for those providers, not Copilot. Full issue 19060 explicitly calls the Muse gap a provider-parity feature request and invites the Muse reader only. No explicit maintainer approval for this Copilot direction/scope is linked or present on this PR. Get explicit maintainer approval for adding Copilot native session history and its cost/discovery scope, then link that approval. Existing Pi/Muse invitations do not approve every provider-parity feature. thanks for trying to help improve t3 code. if you think this closure was a mistake, please open a fresh pr addressing the requirement above, and link back to this one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.