mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-09 10:42:28 +01:00
f487a678f3e4e6f2e48f87616ea6f74f5ea96064
* Add Anthropic compaction metadata to IResultMetadata for evals Captures context editing compaction data from Anthropic Messages API and surfaces it through IResultMetadata so the evaluation system can access it. Changes: - Add anthropicCompaction field to IToolCallRound (parallels OpenAI compaction) - Capture Anthropic ContextManagementResponse deltas in tool calling loop - Aggregate compaction metrics (cleared tokens, tool uses, thinking turns) across rounds - Surface compactionMetrics on IResultMetadata via AnthropicCompactionMetadata - Merge into result in defaultIntentRequestHandler's resultWithMetadatas() * Add compaction metrics metadata for evals Surfaces background and foreground compaction (conversation summarization) metrics through IResultMetadata.compactionMetrics so the eval system can track when compaction is triggered and its cost. - Add compactionMetrics to IResultMetadata with type (foreground/background) and token usage - Create CompactionMetadata class on Turn - Set CompactionMetadata in agentIntent for both foreground and background paths - Merge CompactionMetadata into result in defaultIntentRequestHandler * Add durationMs to summarization metadata and update related logic * Refactor compaction metadata handling to use SummarizedConversationHistoryMetadata and remove CompactionMetadata references * Add usage metadata to AgentIntentInvocation and remove compaction metrics documentation * Enhance summary handling by replacing single summary with an array of summaries and updating related logic in conversation normalization * Refactor _persistSummaryOnTurn to use IBackgroundSummarizationResult for improved type safety * Simplify render result handling in AgentIntentInvocation by directly returning the await result * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Refactor SummarizedConversationHistoryMetadata to use options object for improved readability and maintainability --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Languages
TypeScript
80.2%
jsonc
15.7%
CSS
1.4%
JavaScript
0.6%
C
0.5%
Other
1.3%