feat(manage-ui): add context breakdown per AI generation activity in trace viewer#1202
feat(manage-ui): add context breakdown per AI generation activity in trace viewer#1202amikofalvy wants to merge 1 commit intomainfrom
Conversation
…trace viewer - Add per-span context breakdown data to AI model streamed text activities - Build spanId-to-contextBreakdown map from agent.generate spans - Look up context breakdown from parent span for each AI generation activity - Add contextBreakdown field to ActivityItem type - Remove debug console.log from copilot-token action
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Claude finished @amikofalvy's task —— View job Code Review: feat(manage-ui): add context breakdown per AI generation activity in trace viewerReview FindingsKey Changes Analysis1. Route.ts Context Breakdown Implementation (lines 1110-1160)
2. Types.ts Extension (line 114)
3. Console.log Removal (copilot-token.ts)
Critical Issues🚨 Type Definition Missing (High Priority)The Required Fix: // Add to types.ts
export interface ContextBreakdown {
systemPromptTemplate: number;
coreInstructions: number;
agentPrompt: number;
toolsSection: number;
artifactsSection: number;
dataComponents: number;
artifactComponents: number;
transferInstructions: number;
delegationInstructions: number;
thinkingPreparation: number;
conversationHistory: number;
total: number;
}Architectural Assessment✅ Strengths
|
|
This pull request has been automatically marked as stale because it has not had recent activity. If this PR is still relevant:
Thank you for your contributions! |
|
This pull request has been automatically closed due to inactivity. If you'd like to continue working on this, please:
Thank you for your understanding! |
Summary
spanId→contextBreakdownmap fromagent.generatespanscontextBreakdownfield toActivityItemtypeconsole.logfrom copilot-token actionContext
Previously, context breakdown was only available at the conversation level. This change associates context breakdown data with individual AI generation activities, enabling more granular token usage analysis in the trace viewer timeline.
Test plan