-
Notifications
You must be signed in to change notification settings - Fork 80
feat(manage-ui): add context breakdown per AI generation activity in trace viewer #1202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
|
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