@codingame/monaco-vscode-chat-service-override 34.1.3 → 35.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +38 -0
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +40 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +27 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +91 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +20 -4
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +148 -15
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +9 -1
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +57 -3
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +10 -14
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +29 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +109 -2
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +207 -21
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +362 -37
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +698 -91
- package/vscode/src/vs/platform/agentHost/common/agentService.js +46 -3
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.js +26 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +17 -17
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +96 -12
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +226 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.d.ts +18 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +89 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +10 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +400 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +129 -446
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +35 -25
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +7 -1
- package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.d.ts +4 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +1 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +0 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +5 -18
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +52 -3
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +212 -34
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +3 -4
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +11 -10
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +13 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +6 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +399 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +85 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +204 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +338 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +57 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +98 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +149 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +116 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +226 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +138 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +25 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +108 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +63 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +322 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.js +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +132 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +237 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +32 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +71 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +19 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +66 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +128 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +58 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +15 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +64 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +45 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +25 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +143 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +7 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +163 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +26 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +44 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +11 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +9 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +107 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +46 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +19 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +244 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +47 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +772 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +24 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +421 -201
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +1424 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +107 -127
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +331 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +581 -336
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +567 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +168 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +183 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +897 -251
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.d.ts +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +720 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +354 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +55 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +192 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +37 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +40 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +230 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +35 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +26 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +56 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +109 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +38 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +175 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +183 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +20 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +40 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +169 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +399 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +321 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +2117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +367 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +16 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +320 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +80 -4
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +226 -88
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +78 -136
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +1 -17
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +16 -5
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +24 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +113 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +227 -152
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +98 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +7 -6
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +11 -12
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +7 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +32 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +37 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +71 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +29 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +7 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +10 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +26 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +416 -252
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +25 -8
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +8 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +0 -82
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -47
- /package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.js +0 -0
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
|
|
2
|
+
import { safeIntl } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { CacheDiffKind } from './chatDebugCacheDiff.js';
|
|
5
|
+
|
|
6
|
+
const numberFormatter = safeIntl.NumberFormat();
|
|
7
|
+
function fmt(n) {
|
|
8
|
+
return numberFormatter.value.format(n);
|
|
9
|
+
}
|
|
10
|
+
var CacheInsightSeverity;
|
|
11
|
+
(function(CacheInsightSeverity) {
|
|
12
|
+
CacheInsightSeverity["Ok"] = "ok";
|
|
13
|
+
CacheInsightSeverity["Info"] = "info";
|
|
14
|
+
CacheInsightSeverity["Warning"] = "warning";
|
|
15
|
+
CacheInsightSeverity["Critical"] = "critical";
|
|
16
|
+
})(CacheInsightSeverity || (CacheInsightSeverity = {}));
|
|
17
|
+
var CacheBreakCategory;
|
|
18
|
+
(function(CacheBreakCategory) {
|
|
19
|
+
CacheBreakCategory["Healthy"] = "healthy";
|
|
20
|
+
CacheBreakCategory["Expiration"] = "expiration";
|
|
21
|
+
CacheBreakCategory["Model"] = "model";
|
|
22
|
+
CacheBreakCategory["Tools"] = "tools";
|
|
23
|
+
CacheBreakCategory["System"] = "system";
|
|
24
|
+
CacheBreakCategory["Options"] = "options";
|
|
25
|
+
CacheBreakCategory["History"] = "history";
|
|
26
|
+
CacheBreakCategory["Unknown"] = "unknown";
|
|
27
|
+
})(CacheBreakCategory || (CacheBreakCategory = {}));
|
|
28
|
+
var StringDivergenceShape;
|
|
29
|
+
(function(StringDivergenceShape) {
|
|
30
|
+
StringDivergenceShape["LeadingRemoved"] = "leadingRemoved";
|
|
31
|
+
StringDivergenceShape["LeadingAdded"] = "leadingAdded";
|
|
32
|
+
StringDivergenceShape["TrailingRemoved"] = "trailingRemoved";
|
|
33
|
+
StringDivergenceShape["TrailingAdded"] = "trailingAdded";
|
|
34
|
+
StringDivergenceShape["InnerEdit"] = "innerEdit";
|
|
35
|
+
})(StringDivergenceShape || (StringDivergenceShape = {}));
|
|
36
|
+
const CHANGED_EXCERPT_CAP = 120;
|
|
37
|
+
function analyzeStringDivergence(a, b) {
|
|
38
|
+
if (a === b) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const aLength = a.length;
|
|
42
|
+
const bLength = b.length;
|
|
43
|
+
const minLength = Math.min(aLength, bLength);
|
|
44
|
+
let commonPrefix = 0;
|
|
45
|
+
while (commonPrefix < minLength && a.charCodeAt(commonPrefix) === b.charCodeAt(commonPrefix)) {
|
|
46
|
+
commonPrefix++;
|
|
47
|
+
}
|
|
48
|
+
let commonSuffix = 0;
|
|
49
|
+
while (commonSuffix < minLength - commonPrefix && a.charCodeAt(aLength - 1 - commonSuffix) === b.charCodeAt(bLength - 1 - commonSuffix)) {
|
|
50
|
+
commonSuffix++;
|
|
51
|
+
}
|
|
52
|
+
let shape;
|
|
53
|
+
if (commonPrefix === bLength && bLength < aLength) {
|
|
54
|
+
shape = StringDivergenceShape.TrailingRemoved;
|
|
55
|
+
} else if (commonPrefix === aLength && aLength < bLength) {
|
|
56
|
+
shape = StringDivergenceShape.TrailingAdded;
|
|
57
|
+
} else if (commonSuffix === bLength && bLength < aLength) {
|
|
58
|
+
shape = StringDivergenceShape.LeadingRemoved;
|
|
59
|
+
} else if (commonSuffix === aLength && aLength < bLength) {
|
|
60
|
+
shape = StringDivergenceShape.LeadingAdded;
|
|
61
|
+
} else {
|
|
62
|
+
shape = StringDivergenceShape.InnerEdit;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
shape,
|
|
66
|
+
commonPrefix,
|
|
67
|
+
commonSuffix,
|
|
68
|
+
aLength,
|
|
69
|
+
bLength,
|
|
70
|
+
aChanged: a.substring(commonPrefix, aLength - commonSuffix).slice(0, CHANGED_EXCERPT_CAP),
|
|
71
|
+
bChanged: b.substring(commonPrefix, bLength - commonSuffix).slice(0, CHANGED_EXCERPT_CAP)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function describeStringDivergence(d) {
|
|
75
|
+
switch (d.shape) {
|
|
76
|
+
case StringDivergenceShape.TrailingAdded:
|
|
77
|
+
return localize(
|
|
78
|
+
6678,
|
|
79
|
+
"{0} chars appended — the previous content survives as a shared prefix",
|
|
80
|
+
fmt(d.bLength - d.aLength)
|
|
81
|
+
);
|
|
82
|
+
case StringDivergenceShape.TrailingRemoved:
|
|
83
|
+
return localize(
|
|
84
|
+
6679,
|
|
85
|
+
"last {0} chars removed — the remaining content still matches the previous bytes",
|
|
86
|
+
fmt(d.aLength - d.bLength)
|
|
87
|
+
);
|
|
88
|
+
case StringDivergenceShape.LeadingAdded:
|
|
89
|
+
return localize(
|
|
90
|
+
6680,
|
|
91
|
+
"{0} chars prepended — this block no longer starts with the same bytes",
|
|
92
|
+
fmt(d.bLength - d.aLength)
|
|
93
|
+
);
|
|
94
|
+
case StringDivergenceShape.LeadingRemoved:
|
|
95
|
+
return localize(
|
|
96
|
+
6681,
|
|
97
|
+
"first {0} chars removed — this block no longer starts with the same bytes",
|
|
98
|
+
fmt(d.aLength - d.bLength)
|
|
99
|
+
);
|
|
100
|
+
case StringDivergenceShape.InnerEdit:
|
|
101
|
+
return localize(
|
|
102
|
+
6682,
|
|
103
|
+
"edited in place — first difference at char {0} ({1} leading and {2} trailing chars unchanged)",
|
|
104
|
+
fmt(d.commonPrefix),
|
|
105
|
+
fmt(d.commonPrefix),
|
|
106
|
+
fmt(d.commonSuffix)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
var VolatileValueKind;
|
|
111
|
+
(function(VolatileValueKind) {
|
|
112
|
+
VolatileValueKind["Timestamp"] = "timestamp";
|
|
113
|
+
VolatileValueKind["Uuid"] = "uuid";
|
|
114
|
+
VolatileValueKind["Counter"] = "counter";
|
|
115
|
+
})(VolatileValueKind || (VolatileValueKind = {}));
|
|
116
|
+
const VOLATILE_PATTERNS = [{
|
|
117
|
+
kind: VolatileValueKind.Uuid,
|
|
118
|
+
re: /\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/
|
|
119
|
+
}, {
|
|
120
|
+
kind: VolatileValueKind.Timestamp,
|
|
121
|
+
re: /\b\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2})?)?\b/
|
|
122
|
+
}, {
|
|
123
|
+
kind: VolatileValueKind.Timestamp,
|
|
124
|
+
re: /\b\d{1,2}:\d{2}:\d{2}\b/
|
|
125
|
+
}, {
|
|
126
|
+
kind: VolatileValueKind.Counter,
|
|
127
|
+
re: /\b\d{10,13}\b/
|
|
128
|
+
}];
|
|
129
|
+
function detectVolatileValue(aChanged, bChanged) {
|
|
130
|
+
for (const {
|
|
131
|
+
kind,
|
|
132
|
+
re
|
|
133
|
+
} of VOLATILE_PATTERNS) {
|
|
134
|
+
const aMatch = re.exec(aChanged)?.[0];
|
|
135
|
+
const bMatch = re.exec(bChanged)?.[0];
|
|
136
|
+
if (aMatch !== undefined && bMatch !== undefined && aMatch !== bMatch) {
|
|
137
|
+
return kind;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
const VOLATILE_CONTEXT = 24;
|
|
143
|
+
const VOLATILE_WINDOW_CAP = 240;
|
|
144
|
+
function detectVolatileValueAround(a, b, dv) {
|
|
145
|
+
const start = Math.max(0, dv.commonPrefix - VOLATILE_CONTEXT);
|
|
146
|
+
const aWindow = a.substring(start, Math.min(
|
|
147
|
+
dv.aLength - dv.commonSuffix + VOLATILE_CONTEXT,
|
|
148
|
+
start + VOLATILE_WINDOW_CAP
|
|
149
|
+
));
|
|
150
|
+
const bWindow = b.substring(start, Math.min(
|
|
151
|
+
dv.bLength - dv.commonSuffix + VOLATILE_CONTEXT,
|
|
152
|
+
start + VOLATILE_WINDOW_CAP
|
|
153
|
+
));
|
|
154
|
+
return detectVolatileValue(aWindow, bWindow);
|
|
155
|
+
}
|
|
156
|
+
function volatileValueLabel(kind) {
|
|
157
|
+
switch (kind) {
|
|
158
|
+
case VolatileValueKind.Timestamp:
|
|
159
|
+
return localize(6683, "timestamp");
|
|
160
|
+
case VolatileValueKind.Uuid:
|
|
161
|
+
return localize(6684, "unique id (UUID)");
|
|
162
|
+
case VolatileValueKind.Counter:
|
|
163
|
+
return localize(6685, "large changing number");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function parseToolList(toolsJson) {
|
|
167
|
+
if (!toolsJson) {
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
let raw;
|
|
171
|
+
try {
|
|
172
|
+
raw = JSON.parse(toolsJson);
|
|
173
|
+
} catch {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
if (!Array.isArray(raw)) {
|
|
177
|
+
return undefined;
|
|
178
|
+
}
|
|
179
|
+
const out = ( new Map());
|
|
180
|
+
for (let i = 0; i < raw.length; i++) {
|
|
181
|
+
const item = raw[i];
|
|
182
|
+
const name = (item && typeof item.name === "string" && item.name) || (item && item.function && typeof item.function.name === "string" && item.function.name) || (item && typeof item.type === "string" && item.type) || `#${i}`;
|
|
183
|
+
let serialized;
|
|
184
|
+
try {
|
|
185
|
+
serialized = JSON.stringify(item);
|
|
186
|
+
} catch {
|
|
187
|
+
serialized = String(item);
|
|
188
|
+
}
|
|
189
|
+
out.set(name, (out.get(name) ?? "") + serialized);
|
|
190
|
+
}
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
193
|
+
function analyzeToolCatalog(aTools, bTools) {
|
|
194
|
+
const a = parseToolList(aTools);
|
|
195
|
+
const b = parseToolList(bTools);
|
|
196
|
+
if (!a || !b) {
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
const added = [];
|
|
200
|
+
const removed = [];
|
|
201
|
+
const modified = [];
|
|
202
|
+
for (const [name, def] of b) {
|
|
203
|
+
const aDef = a.get(name);
|
|
204
|
+
if (aDef === undefined) {
|
|
205
|
+
added.push(name);
|
|
206
|
+
} else if (aDef !== def) {
|
|
207
|
+
modified.push(name);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
for (const name of ( a.keys())) {
|
|
211
|
+
if (!( b.has(name))) {
|
|
212
|
+
removed.push(name);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
added,
|
|
217
|
+
removed,
|
|
218
|
+
modified,
|
|
219
|
+
reorderedOnly: added.length === 0 && removed.length === 0 && modified.length === 0,
|
|
220
|
+
aCount: a.size,
|
|
221
|
+
bCount: b.size
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const severityRank = {
|
|
225
|
+
[CacheInsightSeverity.Ok]: 0,
|
|
226
|
+
[CacheInsightSeverity.Info]: 1,
|
|
227
|
+
[CacheInsightSeverity.Warning]: 2,
|
|
228
|
+
[CacheInsightSeverity.Critical]: 3
|
|
229
|
+
};
|
|
230
|
+
function maxInsightSeverity(insights) {
|
|
231
|
+
let max = CacheInsightSeverity.Ok;
|
|
232
|
+
for (const i of insights) {
|
|
233
|
+
if (severityRank[i.severity] > severityRank[max]) {
|
|
234
|
+
max = i.severity;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return max;
|
|
238
|
+
}
|
|
239
|
+
function primaryInsight(insights) {
|
|
240
|
+
return insights.find(i => i.severity === CacheInsightSeverity.Critical) ?? insights.find(i => i.severity === CacheInsightSeverity.Warning);
|
|
241
|
+
}
|
|
242
|
+
const EFFECTIVE_MISS_PCT = 1;
|
|
243
|
+
const TYPICAL_TTL_MINUTES = 5;
|
|
244
|
+
const LOOKBACK_WINDOW_BLOCKS = 20;
|
|
245
|
+
const MIN_CACHEABLE_TOKENS = 4096;
|
|
246
|
+
function computeCacheInsights(input) {
|
|
247
|
+
const out = [];
|
|
248
|
+
const modelChanged = input.aModel !== input.bModel;
|
|
249
|
+
const toolsChanged = (input.aTools ?? "") !== (input.bTools ?? "");
|
|
250
|
+
const systemChanged = (input.aSystem ?? "") !== (input.bSystem ?? "");
|
|
251
|
+
if (modelChanged) {
|
|
252
|
+
out.push({
|
|
253
|
+
severity: CacheInsightSeverity.Critical,
|
|
254
|
+
title: ( localize(6686, "Model changed")),
|
|
255
|
+
detail: ( localize(6687, "{0} → {1}", input.aModel ?? "—", input.bModel ?? "—")),
|
|
256
|
+
hint: ( localize(
|
|
257
|
+
6688,
|
|
258
|
+
"Prompt caches are scoped to a model — switching models recomputes the entire prompt. Route sub-tasks that need a different model through a separate request chain so the main loop keeps its cache."
|
|
259
|
+
)),
|
|
260
|
+
category: CacheBreakCategory.Model
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
if (toolsChanged) {
|
|
264
|
+
out.push(toolsInsight(input.aTools, input.bTools));
|
|
265
|
+
}
|
|
266
|
+
if (systemChanged) {
|
|
267
|
+
out.push(systemInsight(input.aSystem, input.bSystem));
|
|
268
|
+
}
|
|
269
|
+
if (input.optionsDiff.length > 0) {
|
|
270
|
+
out.push({
|
|
271
|
+
severity: CacheInsightSeverity.Warning,
|
|
272
|
+
title: ( localize(6689, "Request options changed")),
|
|
273
|
+
detail: ( input.optionsDiff.map(d => `${d.key}: ${d.previousLabel} → ${d.currentLabel}`)).join(" · "),
|
|
274
|
+
hint: ( localize(
|
|
275
|
+
6690,
|
|
276
|
+
"Options are part of the cache key on most providers. Keep per-request options stable when cache reuse matters."
|
|
277
|
+
)),
|
|
278
|
+
category: CacheBreakCategory.Options
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
if (input.compareInputMessages) {
|
|
282
|
+
out.push(...messageInsights(input, modelChanged || toolsChanged || systemChanged));
|
|
283
|
+
if (!modelChanged && !toolsChanged && !systemChanged && input.optionsDiff.length === 0 && !input.diff.break) {
|
|
284
|
+
out.push(stablePrefixInsight(input));
|
|
285
|
+
}
|
|
286
|
+
} else if (input.isContinuation) {
|
|
287
|
+
out.push({
|
|
288
|
+
severity: CacheInsightSeverity.Info,
|
|
289
|
+
title: ( localize(6691, "Responses API continuation")),
|
|
290
|
+
detail: ( localize(
|
|
291
|
+
6692,
|
|
292
|
+
"Only the wire delta is captured for this request; prior context is referenced by previous_response_id and reconstructed provider-side. Analysis is limited to system, tools, and request options."
|
|
293
|
+
)),
|
|
294
|
+
category: CacheBreakCategory.Unknown
|
|
295
|
+
});
|
|
296
|
+
} else if (input.previousIsContinuation) {
|
|
297
|
+
out.push({
|
|
298
|
+
severity: CacheInsightSeverity.Info,
|
|
299
|
+
title: ( localize(6693, "Message comparison suppressed")),
|
|
300
|
+
detail: ( localize(
|
|
301
|
+
6694,
|
|
302
|
+
"The previous request was a Responses API continuation (delta-only wire input); positionally diffing this full request against it would be misleading."
|
|
303
|
+
)),
|
|
304
|
+
category: CacheBreakCategory.Unknown
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
return out;
|
|
308
|
+
}
|
|
309
|
+
function toolsInsight(aTools, bTools) {
|
|
310
|
+
const delta = analyzeToolCatalog(aTools, bTools);
|
|
311
|
+
const component = "tools";
|
|
312
|
+
if (delta?.reorderedOnly) {
|
|
313
|
+
return {
|
|
314
|
+
severity: CacheInsightSeverity.Critical,
|
|
315
|
+
title: ( localize(6695, "Tool definitions reordered")),
|
|
316
|
+
detail: ( localize(
|
|
317
|
+
6696,
|
|
318
|
+
"Same {0} tools with identical definitions, sent in a different order.",
|
|
319
|
+
fmt(delta.bCount)
|
|
320
|
+
)),
|
|
321
|
+
hint: ( localize(
|
|
322
|
+
6697,
|
|
323
|
+
"Tools render at the very start of the prompt — a pure reorder still changes the bytes and invalidates the entire cache. Serialize the tool list deterministically (e.g. sort by name)."
|
|
324
|
+
)),
|
|
325
|
+
component,
|
|
326
|
+
category: CacheBreakCategory.Tools
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
if (delta && (delta.added.length > 0 || delta.removed.length > 0)) {
|
|
330
|
+
const parts = [];
|
|
331
|
+
if (delta.added.length > 0) {
|
|
332
|
+
parts.push(( localize(6698, "added: {0}", delta.added.join(", "))));
|
|
333
|
+
}
|
|
334
|
+
if (delta.removed.length > 0) {
|
|
335
|
+
parts.push(( localize(6699, "removed: {0}", delta.removed.join(", "))));
|
|
336
|
+
}
|
|
337
|
+
if (delta.modified.length > 0) {
|
|
338
|
+
parts.push(( localize(6700, "modified: {0}", delta.modified.join(", "))));
|
|
339
|
+
}
|
|
340
|
+
return {
|
|
341
|
+
severity: CacheInsightSeverity.Critical,
|
|
342
|
+
title: ( localize(
|
|
343
|
+
6701,
|
|
344
|
+
"Tool catalog changed ({0} → {1} tools)",
|
|
345
|
+
fmt(delta.aCount),
|
|
346
|
+
fmt(delta.bCount)
|
|
347
|
+
)),
|
|
348
|
+
detail: parts.join(" · "),
|
|
349
|
+
hint: ( localize(
|
|
350
|
+
6702,
|
|
351
|
+
"Tool definitions render before everything else, so adding or removing a tool mid-session invalidates the whole prompt. Keep the tool set stable for the life of a session, or use deferred/appended tool loading instead of swapping the catalog."
|
|
352
|
+
)),
|
|
353
|
+
component,
|
|
354
|
+
category: CacheBreakCategory.Tools
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
if (delta && delta.modified.length > 0) {
|
|
358
|
+
return {
|
|
359
|
+
severity: CacheInsightSeverity.Critical,
|
|
360
|
+
title: ( localize(6703, "Tool definitions modified")),
|
|
361
|
+
detail: ( localize(6704, "changed: {0}", delta.modified.join(", "))),
|
|
362
|
+
hint: ( localize(
|
|
363
|
+
6705,
|
|
364
|
+
"A changed tool description or schema rewrites the prompt from the tools block onward. Check for dynamic content (counts, paths, timestamps) inside tool descriptions."
|
|
365
|
+
)),
|
|
366
|
+
component,
|
|
367
|
+
category: CacheBreakCategory.Tools
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
const dv = analyzeStringDivergence(aTools ?? "", bTools ?? "");
|
|
371
|
+
return {
|
|
372
|
+
severity: CacheInsightSeverity.Critical,
|
|
373
|
+
title: ( localize(6706, "Tool catalog changed")),
|
|
374
|
+
detail: dv ? describeStringDivergence(dv) : undefined,
|
|
375
|
+
hint: ( localize(
|
|
376
|
+
6707,
|
|
377
|
+
"The tool catalog is the first block of the prompt — any byte change here invalidates the entire cache."
|
|
378
|
+
)),
|
|
379
|
+
component,
|
|
380
|
+
category: CacheBreakCategory.Tools
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function systemInsight(aSystem, bSystem) {
|
|
384
|
+
const dv = analyzeStringDivergence(aSystem ?? "", bSystem ?? "");
|
|
385
|
+
const volatile = dv ? detectVolatileValueAround(aSystem ?? "", bSystem ?? "", dv) : undefined;
|
|
386
|
+
return {
|
|
387
|
+
severity: CacheInsightSeverity.Critical,
|
|
388
|
+
title: ( localize(6708, "System prompt changed")),
|
|
389
|
+
detail: dv ? ( localize(
|
|
390
|
+
6709,
|
|
391
|
+
"{0} → {1} chars · {2}",
|
|
392
|
+
fmt(dv.aLength),
|
|
393
|
+
fmt(dv.bLength),
|
|
394
|
+
describeStringDivergence(dv)
|
|
395
|
+
)) : undefined,
|
|
396
|
+
hint: volatile ? ( localize(
|
|
397
|
+
6710,
|
|
398
|
+
"The changed region looks like a {0} — volatile values interpolated into the system prompt break the cache on every request. Move dynamic content after the conversation history or drop it.",
|
|
399
|
+
volatileValueLabel(volatile)
|
|
400
|
+
)) : ( localize(
|
|
401
|
+
6711,
|
|
402
|
+
"A system prompt change invalidates everything after the tools block. Keep the system prompt byte-stable for the life of a session and inject per-turn context into the newest message instead."
|
|
403
|
+
)),
|
|
404
|
+
component: "system",
|
|
405
|
+
category: CacheBreakCategory.System
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
function messageInsights(input, hasEarlierBreak) {
|
|
409
|
+
const {
|
|
410
|
+
diff
|
|
411
|
+
} = input;
|
|
412
|
+
if (!diff.break) {
|
|
413
|
+
return [];
|
|
414
|
+
}
|
|
415
|
+
const out = [];
|
|
416
|
+
const idx = diff.break.index;
|
|
417
|
+
const component = `messages[${idx}]`;
|
|
418
|
+
const counts = diff.counts;
|
|
419
|
+
if (diff.break.kind === CacheDiffKind.OnlyInB) {
|
|
420
|
+
out.push({
|
|
421
|
+
severity: hasEarlierBreak ? CacheInsightSeverity.Info : CacheInsightSeverity.Ok,
|
|
422
|
+
title: ( localize(6712, "New messages appended — expected growth")),
|
|
423
|
+
detail: ( localize(
|
|
424
|
+
6713,
|
|
425
|
+
"{0} new message(s) after {1} unchanged — the shared prefix was extended, not broken. The uncached tokens are the new suffix being written to the cache for the next request.",
|
|
426
|
+
fmt(counts.onlyInB),
|
|
427
|
+
fmt(counts.identical)
|
|
428
|
+
)),
|
|
429
|
+
component,
|
|
430
|
+
category: CacheBreakCategory.Healthy
|
|
431
|
+
});
|
|
432
|
+
if (counts.onlyInB > LOOKBACK_WINDOW_BLOCKS) {
|
|
433
|
+
out.push({
|
|
434
|
+
severity: CacheInsightSeverity.Warning,
|
|
435
|
+
title: ( localize(
|
|
436
|
+
6714,
|
|
437
|
+
"{0} blocks appended — beyond the typical cache lookback window",
|
|
438
|
+
fmt(counts.onlyInB)
|
|
439
|
+
)),
|
|
440
|
+
detail: ( localize(
|
|
441
|
+
6715,
|
|
442
|
+
"Providers typically look back ~{0} content blocks for a prior cache entry; a turn that appends more can silently miss it even though the prefix matches.",
|
|
443
|
+
LOOKBACK_WINDOW_BLOCKS
|
|
444
|
+
)),
|
|
445
|
+
hint: ( localize(
|
|
446
|
+
6716,
|
|
447
|
+
"During long tool loops, place intermediate cache breakpoints every ~15 blocks so the next request can still find a cache entry."
|
|
448
|
+
))
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return out;
|
|
452
|
+
}
|
|
453
|
+
if (diff.break.kind === CacheDiffKind.OnlyInA) {
|
|
454
|
+
out.push({
|
|
455
|
+
severity: CacheInsightSeverity.Critical,
|
|
456
|
+
title: ( localize(6717, "History truncated at messages[{0}]", idx)),
|
|
457
|
+
detail: ( localize(
|
|
458
|
+
6718,
|
|
459
|
+
"{0} message(s) present in the previous request are missing from this one.",
|
|
460
|
+
fmt(counts.onlyInA)
|
|
461
|
+
)),
|
|
462
|
+
hint: ( localize(
|
|
463
|
+
6719,
|
|
464
|
+
"History slicing or compaction shortens the prefix — the cache can only match up to the cut, and everything after it is recomputed."
|
|
465
|
+
)),
|
|
466
|
+
component,
|
|
467
|
+
category: CacheBreakCategory.History
|
|
468
|
+
});
|
|
469
|
+
return out;
|
|
470
|
+
}
|
|
471
|
+
const tok = diff.signature.find(t => t.index === idx);
|
|
472
|
+
const role = tok?.bRole ?? tok?.aRole ?? "message";
|
|
473
|
+
const aMsg = input.aMessages[idx];
|
|
474
|
+
const bMsg = input.bMessages[idx];
|
|
475
|
+
const dv = aMsg && bMsg ? analyzeStringDivergence(aMsg.text, bMsg.text) : undefined;
|
|
476
|
+
const volatile = dv && aMsg && bMsg ? detectVolatileValueAround(aMsg.text, bMsg.text, dv) : undefined;
|
|
477
|
+
const detailParts = [];
|
|
478
|
+
if (aMsg && bMsg) {
|
|
479
|
+
detailParts.push(( localize(
|
|
480
|
+
6720,
|
|
481
|
+
"{0} message, {1} → {2} chars",
|
|
482
|
+
role,
|
|
483
|
+
fmt(aMsg.charLength),
|
|
484
|
+
fmt(bMsg.charLength)
|
|
485
|
+
)));
|
|
486
|
+
}
|
|
487
|
+
if (dv) {
|
|
488
|
+
detailParts.push(describeStringDivergence(dv));
|
|
489
|
+
}
|
|
490
|
+
out.push({
|
|
491
|
+
severity: CacheInsightSeverity.Critical,
|
|
492
|
+
title: ( localize(6721, "History rewritten at messages[{0}]", idx)),
|
|
493
|
+
detail: detailParts.join(" · "),
|
|
494
|
+
hint: volatile ? ( localize(
|
|
495
|
+
6722,
|
|
496
|
+
"The changed region looks like a {0} — a volatile value re-rendered into the conversation history breaks the prefix on every request.",
|
|
497
|
+
volatileValueLabel(volatile)
|
|
498
|
+
)) : ( localize(
|
|
499
|
+
6723,
|
|
500
|
+
"Conversation history must be byte-identical between requests to reuse the cached prefix. A re-serialized {0} turn — trimmed whitespace, dropped reasoning or preamble text, reformatted tool calls — silently invalidates everything after it.",
|
|
501
|
+
role
|
|
502
|
+
)),
|
|
503
|
+
component,
|
|
504
|
+
category: CacheBreakCategory.History
|
|
505
|
+
});
|
|
506
|
+
const changedAfterBreak = counts.contentDrift + counts.lengthChange + counts.onlyInA + counts.onlyInB - 1;
|
|
507
|
+
if (changedAfterBreak > 0) {
|
|
508
|
+
out.push({
|
|
509
|
+
severity: CacheInsightSeverity.Info,
|
|
510
|
+
title: ( localize(
|
|
511
|
+
6724,
|
|
512
|
+
"{0} more changed position(s) after the break",
|
|
513
|
+
fmt(changedAfterBreak)
|
|
514
|
+
)),
|
|
515
|
+
detail: ( localize(
|
|
516
|
+
6725,
|
|
517
|
+
"Once the prefix breaks at messages[{0}], everything after it is recomputed regardless — fix the first break first.",
|
|
518
|
+
idx
|
|
519
|
+
))
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
return out;
|
|
523
|
+
}
|
|
524
|
+
function stablePrefixInsight(input) {
|
|
525
|
+
if (input.hitPct < EFFECTIVE_MISS_PCT) {
|
|
526
|
+
if (input.inputTokens > 0 && input.inputTokens < MIN_CACHEABLE_TOKENS) {
|
|
527
|
+
return {
|
|
528
|
+
severity: CacheInsightSeverity.Warning,
|
|
529
|
+
title: ( localize(6726, "Prompt may be below the minimum cacheable size")),
|
|
530
|
+
detail: ( localize(
|
|
531
|
+
6727,
|
|
532
|
+
"{0} input tokens — providers only cache prompts above a minimum prefix size (roughly 1,024-4,096 tokens depending on model), and smaller prompts silently never cache.",
|
|
533
|
+
fmt(input.inputTokens)
|
|
534
|
+
)),
|
|
535
|
+
hint: ( localize(
|
|
536
|
+
6728,
|
|
537
|
+
"Small utility requests (titles, summaries) often sit below the threshold; a 0% hit on them is normal and not worth optimizing."
|
|
538
|
+
)),
|
|
539
|
+
category: CacheBreakCategory.Expiration
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
const minutes = input.minutesSincePrevious;
|
|
543
|
+
const gap = minutes !== undefined && minutes >= 1 ? ( localize(
|
|
544
|
+
6729,
|
|
545
|
+
" {0} minute(s) elapsed since the previous request.",
|
|
546
|
+
fmt(Math.round(minutes))
|
|
547
|
+
)) : "";
|
|
548
|
+
return {
|
|
549
|
+
severity: CacheInsightSeverity.Warning,
|
|
550
|
+
title: ( localize(6730, "Likely cache expiration")),
|
|
551
|
+
detail: ( localize(
|
|
552
|
+
6731,
|
|
553
|
+
"The prompt is byte-identical to the previous request but only {0}% was served from cache.{1}",
|
|
554
|
+
input.hitPct.toFixed(2),
|
|
555
|
+
gap
|
|
556
|
+
)),
|
|
557
|
+
hint: ( localize(
|
|
558
|
+
6732,
|
|
559
|
+
"Provider prompt caches expire after a few minutes of inactivity (typically ~{0} min). Long gaps between requests recompute the full prompt even when nothing changed.",
|
|
560
|
+
TYPICAL_TTL_MINUTES
|
|
561
|
+
)),
|
|
562
|
+
category: CacheBreakCategory.Expiration
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
return {
|
|
566
|
+
severity: CacheInsightSeverity.Ok,
|
|
567
|
+
title: ( localize(6733, "Prompt prefix fully stable")),
|
|
568
|
+
detail: ( localize(
|
|
569
|
+
6734,
|
|
570
|
+
"No divergence detected — {0}% of input tokens were served from cache.",
|
|
571
|
+
input.hitPct.toFixed(2)
|
|
572
|
+
)),
|
|
573
|
+
category: CacheBreakCategory.Healthy
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
function categorizeCacheBreak(insights) {
|
|
577
|
+
const primary = primaryInsight(insights);
|
|
578
|
+
if (primary?.category) {
|
|
579
|
+
return primary.category;
|
|
580
|
+
}
|
|
581
|
+
for (const i of insights) {
|
|
582
|
+
if (i.category) {
|
|
583
|
+
return i.category;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return CacheBreakCategory.Unknown;
|
|
587
|
+
}
|
|
588
|
+
function cacheBreakCategoryLabel(category) {
|
|
589
|
+
switch (category) {
|
|
590
|
+
case CacheBreakCategory.Healthy:
|
|
591
|
+
return localize(6735, "healthy growth");
|
|
592
|
+
case CacheBreakCategory.Expiration:
|
|
593
|
+
return localize(6736, "expiration / not cacheable");
|
|
594
|
+
case CacheBreakCategory.Model:
|
|
595
|
+
return localize(6737, "model changed");
|
|
596
|
+
case CacheBreakCategory.Tools:
|
|
597
|
+
return localize(6738, "tool catalog changed");
|
|
598
|
+
case CacheBreakCategory.System:
|
|
599
|
+
return localize(6739, "system prompt changed");
|
|
600
|
+
case CacheBreakCategory.Options:
|
|
601
|
+
return localize(6740, "request options changed");
|
|
602
|
+
case CacheBreakCategory.History:
|
|
603
|
+
return localize(6741, "history rewritten");
|
|
604
|
+
case CacheBreakCategory.Unknown:
|
|
605
|
+
return localize(6742, "not classified");
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
const AVOIDABLE_CATEGORIES = [
|
|
609
|
+
CacheBreakCategory.Model,
|
|
610
|
+
CacheBreakCategory.Tools,
|
|
611
|
+
CacheBreakCategory.System,
|
|
612
|
+
CacheBreakCategory.Options,
|
|
613
|
+
CacheBreakCategory.History
|
|
614
|
+
];
|
|
615
|
+
const RECURRING_THRESHOLD = 2;
|
|
616
|
+
function buildSessionCacheReport(pairs, turnTokens = []) {
|
|
617
|
+
let overallInput = 0;
|
|
618
|
+
let overallCached = 0;
|
|
619
|
+
let overallTurns = 0;
|
|
620
|
+
for (const t of turnTokens) {
|
|
621
|
+
if (t.inputTokens > 0) {
|
|
622
|
+
overallInput += t.inputTokens;
|
|
623
|
+
overallCached += Math.min(t.cachedTokens, t.inputTokens);
|
|
624
|
+
overallTurns++;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
const overall = overallInput > 0 ? {
|
|
628
|
+
inputTokens: overallInput,
|
|
629
|
+
cachedTokens: overallCached,
|
|
630
|
+
hitPct: (overallCached / overallInput) * 100,
|
|
631
|
+
turnCount: overallTurns
|
|
632
|
+
} : undefined;
|
|
633
|
+
const stats = ( new Map());
|
|
634
|
+
const causeByTurnIndex = ( new Map());
|
|
635
|
+
let healthyCount = 0;
|
|
636
|
+
let avoidableLostTokens = 0;
|
|
637
|
+
for (const pair of pairs) {
|
|
638
|
+
causeByTurnIndex.set(pair.turnIndex, pair.category);
|
|
639
|
+
if (pair.category === CacheBreakCategory.Healthy) {
|
|
640
|
+
healthyCount++;
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
const stat = stats.get(pair.category) ?? {
|
|
644
|
+
count: 0,
|
|
645
|
+
lostTokens: 0
|
|
646
|
+
};
|
|
647
|
+
stat.count++;
|
|
648
|
+
stat.lostTokens += pair.lostTokens;
|
|
649
|
+
stats.set(pair.category, stat);
|
|
650
|
+
if (AVOIDABLE_CATEGORIES.includes(pair.category)) {
|
|
651
|
+
avoidableLostTokens += pair.lostTokens;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
const byCategory = ( [...stats.entries()].map(([category, s]) => ({
|
|
655
|
+
category,
|
|
656
|
+
count: s.count,
|
|
657
|
+
lostTokens: s.lostTokens
|
|
658
|
+
}))).sort((a, b) => b.lostTokens - a.lostTokens);
|
|
659
|
+
const findings = [];
|
|
660
|
+
for (const stat of byCategory) {
|
|
661
|
+
if (stat.count < RECURRING_THRESHOLD) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
if (AVOIDABLE_CATEGORIES.includes(stat.category)) {
|
|
665
|
+
findings.push({
|
|
666
|
+
severity: CacheInsightSeverity.Critical,
|
|
667
|
+
title: ( localize(
|
|
668
|
+
6743,
|
|
669
|
+
"Recurring invalidator: {0} in {1} of {2} request pairs",
|
|
670
|
+
cacheBreakCategoryLabel(stat.category),
|
|
671
|
+
fmt(stat.count),
|
|
672
|
+
fmt(pairs.length)
|
|
673
|
+
)),
|
|
674
|
+
detail: ( localize(
|
|
675
|
+
6744,
|
|
676
|
+
"~{0} tokens recomputed across those requests. A break that repeats is systemic — look for the same root cause on every occurrence.",
|
|
677
|
+
fmt(stat.lostTokens)
|
|
678
|
+
)),
|
|
679
|
+
category: stat.category
|
|
680
|
+
});
|
|
681
|
+
} else if (stat.category === CacheBreakCategory.Expiration) {
|
|
682
|
+
findings.push({
|
|
683
|
+
severity: CacheInsightSeverity.Warning,
|
|
684
|
+
title: ( localize(6745, "Cache likely expired {0} times", fmt(stat.count))),
|
|
685
|
+
detail: ( localize(
|
|
686
|
+
6746,
|
|
687
|
+
"~{0} tokens recomputed after idle gaps or on prompts below the cacheable minimum.",
|
|
688
|
+
fmt(stat.lostTokens)
|
|
689
|
+
)),
|
|
690
|
+
hint: ( localize(
|
|
691
|
+
6747,
|
|
692
|
+
"If long gaps are inherent to the workflow, consider a longer-TTL cache or pre-warming before the user returns."
|
|
693
|
+
)),
|
|
694
|
+
category: stat.category
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
if (findings.length === 0 && pairs.length > 0 && healthyCount === pairs.length) {
|
|
699
|
+
findings.push({
|
|
700
|
+
severity: CacheInsightSeverity.Ok,
|
|
701
|
+
title: ( localize(6748, "All request pairs grew the prefix cleanly")),
|
|
702
|
+
detail: ( localize(
|
|
703
|
+
6749,
|
|
704
|
+
"Every request either appended new messages or matched the previous prompt exactly — no avoidable cache breaks in this session."
|
|
705
|
+
)),
|
|
706
|
+
category: CacheBreakCategory.Healthy
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
return {
|
|
710
|
+
pairCount: pairs.length,
|
|
711
|
+
healthyCount,
|
|
712
|
+
avoidableLostTokens,
|
|
713
|
+
overall,
|
|
714
|
+
byCategory,
|
|
715
|
+
causeByTurnIndex,
|
|
716
|
+
findings
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export { CacheBreakCategory, CacheInsightSeverity, StringDivergenceShape, VolatileValueKind, analyzeStringDivergence, analyzeToolCatalog, buildSessionCacheReport, cacheBreakCategoryLabel, categorizeCacheBreak, computeCacheInsights, describeStringDivergence, detectVolatileValue, maxInsightSeverity, primaryInsight };
|