@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.0.0
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 +35 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- 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 +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- 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 +6 -6
- 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/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- 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 +2 -2
- 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 +3 -3
- 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.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- 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/terminalSandboxService.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
1
2
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
2
3
|
import { IChatAgentData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents";
|
|
3
4
|
import { ChatRequestModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
4
5
|
import { ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes";
|
|
5
6
|
import { IChatSendRequestOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
6
|
-
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
7
|
+
import { ChatAgentLocation, ChatPermissionLevel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
7
8
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
8
9
|
export type ChatProviderInvokedEvent = {
|
|
9
10
|
timeToFirstProgress: number | undefined;
|
|
@@ -21,6 +22,9 @@ export type ChatProviderInvokedEvent = {
|
|
|
21
22
|
enableCommandDetection: boolean;
|
|
22
23
|
attachmentKinds: string[];
|
|
23
24
|
model: string | undefined;
|
|
25
|
+
permissionLevel: ChatPermissionLevel | undefined;
|
|
26
|
+
chatMode: string | undefined;
|
|
27
|
+
sessionType: string | undefined;
|
|
24
28
|
};
|
|
25
29
|
export type ChatProviderInvokedClassification = {
|
|
26
30
|
timeToFirstProgress: {
|
|
@@ -98,6 +102,21 @@ export type ChatProviderInvokedClassification = {
|
|
|
98
102
|
purpose: "FeatureInsight";
|
|
99
103
|
comment: "The model used to generate the response.";
|
|
100
104
|
};
|
|
105
|
+
permissionLevel: {
|
|
106
|
+
classification: "SystemMetaData";
|
|
107
|
+
purpose: "FeatureInsight";
|
|
108
|
+
comment: "The tool auto-approval permission level selected in the permission picker (default, autoApprove, or autopilot). Undefined when the picker is not applicable (e.g. ask mode or API-driven requests).";
|
|
109
|
+
};
|
|
110
|
+
chatMode: {
|
|
111
|
+
classification: "SystemMetaData";
|
|
112
|
+
purpose: "FeatureInsight";
|
|
113
|
+
comment: "The chat mode used for the request. Built-in modes (ask, agent, edit), extension-contributed names (e.g. Plan), or a hashed identifier for user-created custom agents.";
|
|
114
|
+
};
|
|
115
|
+
sessionType: {
|
|
116
|
+
classification: "SystemMetaData";
|
|
117
|
+
purpose: "FeatureInsight";
|
|
118
|
+
comment: "The session type scheme (e.g. vscodeLocalChatSession for local, or remote session scheme).";
|
|
119
|
+
};
|
|
101
120
|
owner: "roblourens";
|
|
102
121
|
comment: "Provides insight into the performance of Chat agents.";
|
|
103
122
|
};
|
|
@@ -116,7 +135,7 @@ export declare class ChatRequestTelemetry {
|
|
|
116
135
|
agent: IChatAgentData;
|
|
117
136
|
agentSlashCommandPart: ChatRequestAgentSubcommandPart | undefined;
|
|
118
137
|
commandPart: ChatRequestSlashCommandPart | undefined;
|
|
119
|
-
|
|
138
|
+
sessionResource: URI;
|
|
120
139
|
location: ChatAgentLocation;
|
|
121
140
|
options: IChatSendRequestOptions | undefined;
|
|
122
141
|
enableCommandDetection: boolean;
|
|
@@ -5,7 +5,9 @@ import { isLocation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common
|
|
|
5
5
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
6
6
|
import { ChatAgentVoteDirection, ChatCopyKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
7
7
|
import { isImageVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
8
|
+
import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
8
9
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
10
|
+
import { chatSessionResourceToId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
9
11
|
|
|
10
12
|
let ChatServiceTelemetry = class ChatServiceTelemetry {
|
|
11
13
|
constructor(telemetryService) {
|
|
@@ -120,14 +122,17 @@ let ChatRequestTelemetry = class ChatRequestTelemetry {
|
|
|
120
122
|
agent: detectedAgent?.id ?? this.opts.agent.id,
|
|
121
123
|
agentExtensionId: detectedAgent?.extensionId.value ?? this.opts.agent.extensionId.value,
|
|
122
124
|
slashCommand: this.opts.agentSlashCommandPart ? this.opts.agentSlashCommandPart.command.name : this.opts.commandPart?.slashCommand.command,
|
|
123
|
-
chatSessionId: this.opts.
|
|
125
|
+
chatSessionId: chatSessionResourceToId(this.opts.sessionResource),
|
|
124
126
|
enableCommandDetection: this.opts.enableCommandDetection,
|
|
125
127
|
isParticipantDetected: !!detectedAgent,
|
|
126
128
|
location: this.opts.location,
|
|
127
129
|
citations: request.response?.codeCitations.length ?? 0,
|
|
128
130
|
numCodeBlocks: getCodeBlocks(request.response?.response.toString() ?? "").length,
|
|
129
131
|
attachmentKinds: this.attachmentKindsForTelemetry(request.variableData),
|
|
130
|
-
model: this.resolveModelId(this.opts.options?.userSelectedModelId)
|
|
132
|
+
model: this.resolveModelId(this.opts.options?.userSelectedModelId),
|
|
133
|
+
permissionLevel: this.opts.options?.modeInfo?.kind === ChatModeKind.Ask ? undefined : this.opts.options?.modeInfo?.permissionLevel,
|
|
134
|
+
chatMode: this.opts.options?.modeInfo?.modeName ?? this.opts.options?.modeInfo?.modeId,
|
|
135
|
+
sessionType: this.opts.sessionResource.scheme
|
|
131
136
|
});
|
|
132
137
|
}
|
|
133
138
|
attachmentKindsForTelemetry(variableData) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
4
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
@@ -8,7 +8,6 @@ export interface IStartSessionProps {
|
|
|
8
8
|
readonly initialData?: ISerializedChatDataReference;
|
|
9
9
|
readonly location: ChatAgentLocation;
|
|
10
10
|
readonly sessionResource: URI;
|
|
11
|
-
readonly sessionId?: string;
|
|
12
11
|
readonly canUseTools: boolean;
|
|
13
12
|
readonly transferEditingSession?: IChatEditingSession;
|
|
14
13
|
readonly disableBackgroundKeepAlive?: boolean;
|
|
@@ -18,10 +17,10 @@ export interface ChatModelStoreDelegate {
|
|
|
18
17
|
createModel: (props: IStartSessionProps) => ChatModel;
|
|
19
18
|
willDisposeModel: (model: ChatModel) => Promise<void>;
|
|
20
19
|
}
|
|
21
|
-
export declare class ChatModelStore extends
|
|
20
|
+
export declare class ChatModelStore extends Disposable {
|
|
22
21
|
private readonly delegate;
|
|
23
22
|
private readonly logService;
|
|
24
|
-
private readonly
|
|
23
|
+
private readonly _refCollection;
|
|
25
24
|
private readonly _models;
|
|
26
25
|
private readonly _modelsToDispose;
|
|
27
26
|
private readonly _pendingDisposals;
|
|
@@ -39,8 +38,8 @@ export declare class ChatModelStore extends ReferenceCollection<ChatModel> imple
|
|
|
39
38
|
has(uri: URI): boolean;
|
|
40
39
|
acquireExisting(uri: URI): IReference<ChatModel> | undefined;
|
|
41
40
|
acquireOrCreate(props: IStartSessionProps): IReference<ChatModel>;
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
private createReferencedObject;
|
|
42
|
+
private destroyReferencedObject;
|
|
44
43
|
private doDestroyReferencedObject;
|
|
45
44
|
/**
|
|
46
45
|
* For test use only
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import {
|
|
4
|
+
import { Disposable, ReferenceCollection } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
6
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
7
7
|
import { ObservableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/map';
|
|
8
8
|
|
|
9
|
-
let ChatModelStore = class ChatModelStore extends
|
|
9
|
+
let ChatModelStore = class ChatModelStore extends Disposable {
|
|
10
10
|
constructor(delegate, logService) {
|
|
11
11
|
super();
|
|
12
12
|
this.delegate = delegate;
|
|
13
13
|
this.logService = logService;
|
|
14
|
-
this._store = ( new DisposableStore());
|
|
15
14
|
this._models = ( new ObservableMap());
|
|
16
15
|
this._modelsToDispose = ( new Set());
|
|
17
16
|
this._pendingDisposals = ( new Set());
|
|
18
|
-
this._onDidDisposeModel = this.
|
|
17
|
+
this._onDidDisposeModel = this._register(( new Emitter()));
|
|
19
18
|
this.onDidDisposeModel = this._onDidDisposeModel.event;
|
|
20
|
-
this._onDidCreateModel = this.
|
|
19
|
+
this._onDidCreateModel = this._register(( new Emitter()));
|
|
21
20
|
this.onDidCreateModel = this._onDidCreateModel.event;
|
|
21
|
+
const self = this;
|
|
22
|
+
this._refCollection = new (class extends ReferenceCollection {
|
|
23
|
+
createReferencedObject(key, props) {
|
|
24
|
+
return self.createReferencedObject(key, props);
|
|
25
|
+
}
|
|
26
|
+
destroyReferencedObject(key, object) {
|
|
27
|
+
return self.destroyReferencedObject(key, object);
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
22
30
|
}
|
|
23
31
|
get observable() {
|
|
24
32
|
return this._models.observable;
|
|
@@ -37,10 +45,10 @@ let ChatModelStore = class ChatModelStore extends ReferenceCollection {
|
|
|
37
45
|
if (!( this._models.has(key))) {
|
|
38
46
|
return undefined;
|
|
39
47
|
}
|
|
40
|
-
return this.acquire(key);
|
|
48
|
+
return this._refCollection.acquire(key);
|
|
41
49
|
}
|
|
42
50
|
acquireOrCreate(props) {
|
|
43
|
-
return this.acquire(this.toKey(props.sessionResource), props);
|
|
51
|
+
return this._refCollection.acquire(this.toKey(props.sessionResource), props);
|
|
44
52
|
}
|
|
45
53
|
createReferencedObject(key, props) {
|
|
46
54
|
this._modelsToDispose.delete(key);
|
|
@@ -90,7 +98,7 @@ let ChatModelStore = class ChatModelStore extends ReferenceCollection {
|
|
|
90
98
|
return ( uri.toString());
|
|
91
99
|
}
|
|
92
100
|
dispose() {
|
|
93
|
-
|
|
101
|
+
super.dispose();
|
|
94
102
|
this._models.forEach(model => model.dispose());
|
|
95
103
|
}
|
|
96
104
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
4
5
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
5
6
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
6
7
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
8
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
7
9
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
8
10
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
9
11
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
10
12
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
13
|
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
14
|
+
import { IWorkspaceEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service";
|
|
12
15
|
import { IChatSessionStats, IChatSessionTiming, ResponseModelState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
13
16
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
14
17
|
import { ChatModel, ISerializableChatData, ISerializableChatsData, ISerializedChatDataReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
@@ -22,13 +25,18 @@ export declare class ChatSessionStore extends Disposable {
|
|
|
22
25
|
private readonly lifecycleService;
|
|
23
26
|
private readonly userDataProfilesService;
|
|
24
27
|
private readonly configurationService;
|
|
25
|
-
private readonly
|
|
28
|
+
private readonly workspaceEditingService;
|
|
29
|
+
private readonly dialogService;
|
|
30
|
+
private readonly openerService;
|
|
31
|
+
private storageRoot;
|
|
26
32
|
private readonly previousEmptyWindowStorageRoot;
|
|
27
33
|
private readonly transferredSessionStorageRoot;
|
|
28
34
|
private readonly storeQueue;
|
|
29
35
|
private storeTask;
|
|
30
36
|
private shuttingDown;
|
|
31
|
-
constructor(fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService, workspaceContextService: IWorkspaceContextService, telemetryService: ITelemetryService, storageService: IStorageService, lifecycleService: ILifecycleService, userDataProfilesService: IUserDataProfilesService, configurationService: IConfigurationService);
|
|
37
|
+
constructor(fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService, workspaceContextService: IWorkspaceContextService, telemetryService: ITelemetryService, storageService: IStorageService, lifecycleService: ILifecycleService, userDataProfilesService: IUserDataProfilesService, configurationService: IConfigurationService, workspaceEditingService: IWorkspaceEditingService, dialogService: IDialogService, openerService: IOpenerService);
|
|
38
|
+
private handleWorkspaceTransition;
|
|
39
|
+
private migrateSessionsToNewWorkspace;
|
|
32
40
|
storeSessions(sessions: ChatModel[]): Promise<void>;
|
|
33
41
|
storeSessionsMetadataOnly(sessions: ChatModel[]): Promise<void>;
|
|
34
42
|
storeTransferSession(transferData: IChatTransfer, session: ChatModel): Promise<void>;
|
|
@@ -37,6 +45,7 @@ export declare class ChatSessionStore extends Disposable {
|
|
|
37
45
|
getTransferredSessionData(): URI | undefined;
|
|
38
46
|
readTransferredSession(sessionResource: URI): Promise<ISerializedChatDataReference | undefined>;
|
|
39
47
|
private cleanupTransferredSession;
|
|
48
|
+
private _didReportIssue;
|
|
40
49
|
private writeSession;
|
|
41
50
|
private writeSessionMetadataOnly;
|
|
42
51
|
private flushIndex;
|
|
@@ -68,11 +77,11 @@ export interface IChatSessionEntryMetadata {
|
|
|
68
77
|
sessionId: string;
|
|
69
78
|
title: string;
|
|
70
79
|
lastMessageDate: number;
|
|
71
|
-
timing
|
|
80
|
+
timing: IChatSessionTiming;
|
|
72
81
|
initialLocation?: ChatAgentLocation;
|
|
73
82
|
hasPendingEdits?: boolean;
|
|
74
83
|
stats?: IChatSessionStats;
|
|
75
|
-
lastResponseState
|
|
84
|
+
lastResponseState: ResponseModelState;
|
|
76
85
|
/**
|
|
77
86
|
* This only exists because the migrated data from the storage service had empty sessions persisted, and it's impossible to know which ones are
|
|
78
87
|
* currently in use. Now, `clearSession` deletes empty sessions, so old ones shouldn't take up space in the store anymore, but we still need to
|
|
@@ -10,16 +10,20 @@ import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/res
|
|
|
10
10
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
11
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
14
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
14
15
|
import { toFileOperationResult, FileOperationResult } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
15
16
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
16
17
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
18
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
17
19
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
18
20
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
19
21
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
22
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
23
|
+
import { isEmptyWorkspaceIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
21
24
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
22
25
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
26
|
+
import { IWorkspaceEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
|
|
23
27
|
import { awaitStatsForSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
24
28
|
import { ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
25
29
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
@@ -44,7 +48,10 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
44
48
|
storageService,
|
|
45
49
|
lifecycleService,
|
|
46
50
|
userDataProfilesService,
|
|
47
|
-
configurationService
|
|
51
|
+
configurationService,
|
|
52
|
+
workspaceEditingService,
|
|
53
|
+
dialogService,
|
|
54
|
+
openerService
|
|
48
55
|
) {
|
|
49
56
|
super();
|
|
50
57
|
this.fileService = fileService;
|
|
@@ -56,8 +63,12 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
56
63
|
this.lifecycleService = lifecycleService;
|
|
57
64
|
this.userDataProfilesService = userDataProfilesService;
|
|
58
65
|
this.configurationService = configurationService;
|
|
66
|
+
this.workspaceEditingService = workspaceEditingService;
|
|
67
|
+
this.dialogService = dialogService;
|
|
68
|
+
this.openerService = openerService;
|
|
59
69
|
this.storeQueue = ( new Sequencer());
|
|
60
70
|
this.shuttingDown = false;
|
|
71
|
+
this._didReportIssue = false;
|
|
61
72
|
const workspace = this.workspaceContextService.getWorkspace();
|
|
62
73
|
const isEmptyWindow = !workspace.configuration && workspace.folders.length === 0;
|
|
63
74
|
const workspaceId = this.workspaceContextService.getWorkspace().id;
|
|
@@ -74,6 +85,12 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
74
85
|
this.userDataProfilesService.defaultProfile.globalStorageHome,
|
|
75
86
|
"transferredChatSessions"
|
|
76
87
|
);
|
|
88
|
+
this._register(this.workspaceEditingService.onDidEnterWorkspace(event => {
|
|
89
|
+
const transitionPromise = this.storeQueue.queue(
|
|
90
|
+
() => this.handleWorkspaceTransition(event.oldWorkspace, event.newWorkspace)
|
|
91
|
+
);
|
|
92
|
+
event.join(transitionPromise);
|
|
93
|
+
}));
|
|
77
94
|
this._register(this.lifecycleService.onWillShutdown(e => {
|
|
78
95
|
this.shuttingDown = true;
|
|
79
96
|
if (!this.storeTask) {
|
|
@@ -81,10 +98,96 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
81
98
|
}
|
|
82
99
|
e.join(this.storeTask, {
|
|
83
100
|
id: "join.chatSessionStore",
|
|
84
|
-
label: ( localize(
|
|
101
|
+
label: ( localize(7020, "Saving chat history"))
|
|
85
102
|
});
|
|
86
103
|
}));
|
|
87
104
|
}
|
|
105
|
+
async handleWorkspaceTransition(oldWorkspace, newWorkspace) {
|
|
106
|
+
const wasEmptyWindow = isEmptyWorkspaceIdentifier(oldWorkspace);
|
|
107
|
+
const isNewWorkspaceEmpty = isEmptyWorkspaceIdentifier(newWorkspace);
|
|
108
|
+
const oldWorkspaceId = oldWorkspace.id;
|
|
109
|
+
const newWorkspaceId = newWorkspace.id;
|
|
110
|
+
this.logService.info(
|
|
111
|
+
`ChatSessionStore: Workspace transition from ${oldWorkspaceId} to ${newWorkspaceId}`
|
|
112
|
+
);
|
|
113
|
+
const oldStorageRoot = wasEmptyWindow ? joinPath(
|
|
114
|
+
this.userDataProfilesService.defaultProfile.globalStorageHome,
|
|
115
|
+
"emptyWindowChatSessions"
|
|
116
|
+
) : joinPath(
|
|
117
|
+
this.environmentService.workspaceStorageHome,
|
|
118
|
+
oldWorkspaceId,
|
|
119
|
+
"chatSessions"
|
|
120
|
+
);
|
|
121
|
+
const newStorageRoot = isNewWorkspaceEmpty ? joinPath(
|
|
122
|
+
this.userDataProfilesService.defaultProfile.globalStorageHome,
|
|
123
|
+
"emptyWindowChatSessions"
|
|
124
|
+
) : joinPath(
|
|
125
|
+
this.environmentService.workspaceStorageHome,
|
|
126
|
+
newWorkspaceId,
|
|
127
|
+
"chatSessions"
|
|
128
|
+
);
|
|
129
|
+
if (( oldStorageRoot.toString()) === ( newStorageRoot.toString())) {
|
|
130
|
+
this.storageRoot = newStorageRoot;
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.storageRoot = newStorageRoot;
|
|
134
|
+
await this.migrateSessionsToNewWorkspace(oldStorageRoot, wasEmptyWindow, isNewWorkspaceEmpty);
|
|
135
|
+
}
|
|
136
|
+
async migrateSessionsToNewWorkspace(oldStorageRoot, wasEmptyWindow, isNewWorkspaceEmpty) {
|
|
137
|
+
try {
|
|
138
|
+
const oldStorageExists = await this.fileService.exists(oldStorageRoot);
|
|
139
|
+
if (!oldStorageExists) {
|
|
140
|
+
this.logService.info(
|
|
141
|
+
`ChatSessionStore: Old storage location does not exist, skipping migration`
|
|
142
|
+
);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const oldDirectory = await this.fileService.resolve(oldStorageRoot);
|
|
146
|
+
if (!oldDirectory.children) {
|
|
147
|
+
this.logService.info(
|
|
148
|
+
`ChatSessionStore: No children in old storage location, skipping migration`
|
|
149
|
+
);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.logService.info(
|
|
153
|
+
`ChatSessionStore: Found ${oldDirectory.children.length} files in old storage location`
|
|
154
|
+
);
|
|
155
|
+
let migratedCount = 0;
|
|
156
|
+
for (const child of oldDirectory.children) {
|
|
157
|
+
if (!child.isDirectory && (child.name.endsWith(".json") || child.name.endsWith(".jsonl"))) {
|
|
158
|
+
const oldFilePath = child.resource;
|
|
159
|
+
const newFilePath = joinPath(this.storageRoot, child.name);
|
|
160
|
+
try {
|
|
161
|
+
await this.fileService.copy(oldFilePath, newFilePath, false);
|
|
162
|
+
migratedCount++;
|
|
163
|
+
} catch (e) {
|
|
164
|
+
if (toFileOperationResult(e) === FileOperationResult.FILE_MOVE_CONFLICT) {
|
|
165
|
+
this.logService.trace(
|
|
166
|
+
`ChatSessionStore: Session file ${child.name} already exists at target, skipping`
|
|
167
|
+
);
|
|
168
|
+
} else {
|
|
169
|
+
this.reportError("sessionMigration", `Error migrating chat session file ${child.name}`, e);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
this.logService.info(
|
|
175
|
+
`ChatSessionStore: Copied ${migratedCount} chat session files from ${wasEmptyWindow ? "empty window" : ( oldStorageRoot.toString())} to ${isNewWorkspaceEmpty ? "empty window" : ( this.storageRoot.toString())} (originals preserved at old location)`
|
|
176
|
+
);
|
|
177
|
+
this.indexCache = undefined;
|
|
178
|
+
try {
|
|
179
|
+
await this.flushIndex();
|
|
180
|
+
} catch (e) {
|
|
181
|
+
this.reportError(
|
|
182
|
+
"migrateWorkspace",
|
|
183
|
+
"Error flushing chat session index after workspace migration",
|
|
184
|
+
e
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
} catch (e) {
|
|
188
|
+
this.reportError("migrateWorkspace", "Error migrating chat sessions to new workspace", e);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
88
191
|
async storeSessions(sessions) {
|
|
89
192
|
if (this.shuttingDown) {
|
|
90
193
|
return;
|
|
@@ -241,10 +344,32 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
241
344
|
if (!session.dataSerializer) {
|
|
242
345
|
session.dataSerializer = ( new ChatSessionOperationLog());
|
|
243
346
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
347
|
+
let op;
|
|
348
|
+
let data;
|
|
349
|
+
try {
|
|
350
|
+
({
|
|
351
|
+
op,
|
|
352
|
+
data
|
|
353
|
+
} = session.dataSerializer.write(session));
|
|
354
|
+
} catch (e) {
|
|
355
|
+
if (!this._didReportIssue) {
|
|
356
|
+
this._didReportIssue = true;
|
|
357
|
+
this.dialogService.prompt({
|
|
358
|
+
custom: true,
|
|
359
|
+
title: ( localize(7021, "Error saving chat session")),
|
|
360
|
+
message: ( localize(
|
|
361
|
+
7022,
|
|
362
|
+
"Error serializing chat session for storage. The session will be lost if the window is closed. Please report this issue to the VS Code team:\n\n{0}",
|
|
363
|
+
e.stack || toErrorMessage(e)
|
|
364
|
+
)),
|
|
365
|
+
buttons: [{
|
|
366
|
+
label: ( localize(7023, "Report Issue")),
|
|
367
|
+
run: () => this.openerService.open("https://github.com/microsoft/vscode/issues/new?template=bug_report.md")
|
|
368
|
+
}]
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
throw e;
|
|
372
|
+
}
|
|
248
373
|
if (data.byteLength > 0) {
|
|
249
374
|
await this.fileService.writeFile(storageLocation.log, data, {
|
|
250
375
|
append: op === "append"
|
|
@@ -257,7 +382,8 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
257
382
|
} else {
|
|
258
383
|
await this.fileService.writeFile(storageLocation.flat, VSBuffer.fromString(JSON.stringify(session)));
|
|
259
384
|
}
|
|
260
|
-
|
|
385
|
+
const newMetadata = await getSessionMetadata(session);
|
|
386
|
+
index.entries[session.sessionId] = newMetadata;
|
|
261
387
|
} catch (e) {
|
|
262
388
|
this.reportError("sessionWrite", "Error writing chat session", e);
|
|
263
389
|
}
|
|
@@ -389,15 +515,22 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
389
515
|
entries: {}
|
|
390
516
|
};
|
|
391
517
|
}
|
|
392
|
-
return this.indexCache;
|
|
393
518
|
} catch (e) {
|
|
394
519
|
this.reportError("invalidIndexJSON", `Index corrupt: ${data}`, e);
|
|
395
520
|
this.indexCache = {
|
|
396
521
|
version: 1,
|
|
397
522
|
entries: {}
|
|
398
523
|
};
|
|
399
|
-
return this.indexCache;
|
|
400
524
|
}
|
|
525
|
+
for (const entry of ( Object.values(this.indexCache.entries))) {
|
|
526
|
+
entry.timing ??= {
|
|
527
|
+
created: entry.lastMessageDate,
|
|
528
|
+
lastRequestStarted: undefined,
|
|
529
|
+
lastRequestEnded: entry.lastMessageDate
|
|
530
|
+
};
|
|
531
|
+
entry.lastResponseState ??= entry.lastResponseState === ResponseModelState.Pending || entry.lastResponseState === ResponseModelState.NeedsInput ? ResponseModelState.Complete : entry.lastResponseState || ResponseModelState.Complete;
|
|
532
|
+
}
|
|
533
|
+
return this.indexCache;
|
|
401
534
|
}
|
|
402
535
|
async getIndex() {
|
|
403
536
|
return this.storeQueue.queue(async () => {
|
|
@@ -534,7 +667,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
534
667
|
return this.storageRoot;
|
|
535
668
|
}
|
|
536
669
|
};
|
|
537
|
-
ChatSessionStore = ChatSessionStore_1 = ( __decorate([( __param(0, IFileService)), ( __param(1, IEnvironmentService)), ( __param(2, ILogService)), ( __param(3, IWorkspaceContextService)), ( __param(4, ITelemetryService)), ( __param(5, IStorageService)), ( __param(6, ILifecycleService)), ( __param(7, IUserDataProfilesService)), ( __param(8, IConfigurationService))], ChatSessionStore));
|
|
670
|
+
ChatSessionStore = ChatSessionStore_1 = ( __decorate([( __param(0, IFileService)), ( __param(1, IEnvironmentService)), ( __param(2, ILogService)), ( __param(3, IWorkspaceContextService)), ( __param(4, ITelemetryService)), ( __param(5, IStorageService)), ( __param(6, ILifecycleService)), ( __param(7, IUserDataProfilesService)), ( __param(8, IConfigurationService)), ( __param(9, IWorkspaceEditingService)), ( __param(10, IDialogService)), ( __param(11, IOpenerService))], ChatSessionStore));
|
|
538
671
|
function isChatSessionEntryMetadata(obj) {
|
|
539
672
|
return (!!obj && typeof obj === "object" && typeof obj.sessionId === "string" && typeof obj.title === "string" && typeof obj.lastMessageDate === "number");
|
|
540
673
|
}
|
|
@@ -575,7 +708,7 @@ async function getSessionMetadata(session) {
|
|
|
575
708
|
}
|
|
576
709
|
return {
|
|
577
710
|
sessionId: session.sessionId,
|
|
578
|
-
title: title || ( localize(
|
|
711
|
+
title: title || ( localize(7024, "New Chat")),
|
|
579
712
|
lastMessageDate,
|
|
580
713
|
timing,
|
|
581
714
|
initialLocation: session.initialLocation,
|
|
@@ -3,6 +3,21 @@ import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
3
3
|
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
4
|
import { isUndefinedOrNull } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
5
5
|
|
|
6
|
+
function prefixError(e, prefix) {
|
|
7
|
+
e.message = prefix + e.message;
|
|
8
|
+
if (e.stack) {
|
|
9
|
+
const nlIdx = e.stack.indexOf("\n");
|
|
10
|
+
e.stack = nlIdx !== -1 ? `${e.name}: ${e.message}${e.stack.slice(nlIdx)}` : `${e.name}: ${e.message}`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function rethrowWithPathSegment(e, segment) {
|
|
14
|
+
if (e instanceof Error) {
|
|
15
|
+
const part = typeof segment === "number" ? `[${segment}]` : `.${segment}`;
|
|
16
|
+
const needsSep = !e.message.startsWith("[") && !e.message.startsWith(".");
|
|
17
|
+
prefixError(e, part + (needsSep ? ": " : ""));
|
|
18
|
+
}
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
6
21
|
var TransformKind;
|
|
7
22
|
(function(TransformKind) {
|
|
8
23
|
TransformKind[TransformKind["Key"] = 0] = "Key";
|
|
@@ -34,7 +49,13 @@ function array(schema) {
|
|
|
34
49
|
return {
|
|
35
50
|
kind: TransformKind.Array,
|
|
36
51
|
itemSchema: schema,
|
|
37
|
-
extract: from => from?.map(item =>
|
|
52
|
+
extract: from => from?.map((item, i) => {
|
|
53
|
+
try {
|
|
54
|
+
return schema.extract(item);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
rethrowWithPathSegment(e, i);
|
|
57
|
+
}
|
|
58
|
+
})
|
|
38
59
|
};
|
|
39
60
|
}
|
|
40
61
|
function object(schema, options) {
|
|
@@ -49,7 +70,11 @@ function object(schema, options) {
|
|
|
49
70
|
}
|
|
50
71
|
const result = Object.create(null);
|
|
51
72
|
for (const [key, transform] of entries) {
|
|
52
|
-
|
|
73
|
+
try {
|
|
74
|
+
result[key] = transform.extract(from);
|
|
75
|
+
} catch (e) {
|
|
76
|
+
rethrowWithPathSegment(e, key);
|
|
77
|
+
}
|
|
53
78
|
}
|
|
54
79
|
return result;
|
|
55
80
|
}
|
|
@@ -152,7 +177,15 @@ class ObjectMutationLog {
|
|
|
152
177
|
}
|
|
153
178
|
const entries = [];
|
|
154
179
|
const path = [];
|
|
155
|
-
|
|
180
|
+
try {
|
|
181
|
+
this._diff(this._transform, path, this._previous, currentValue, entries);
|
|
182
|
+
} catch (e) {
|
|
183
|
+
if (e instanceof Error) {
|
|
184
|
+
const pathStr = ( path.map(s => typeof s === "number" ? `[${s}]` : `.${s}`)).join("") || "<root>";
|
|
185
|
+
prefixError(e, `error diffing at ${pathStr}: `);
|
|
186
|
+
}
|
|
187
|
+
throw e;
|
|
188
|
+
}
|
|
156
189
|
if (entries.length === 0) {
|
|
157
190
|
return {
|
|
158
191
|
op: "append",
|
|
@@ -3,10 +3,11 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
|
|
|
3
3
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
4
|
import { IProgress } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
5
5
|
import { IChatMessage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
6
|
-
import { IChatFollowup, IChatProgress, IChatResponseProgressFileTreeData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
6
|
+
import { IChatFollowup, IChatProgress, IChatResponseProgressFileTreeData, IChatSendRequestOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
7
7
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
8
8
|
import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
9
9
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
10
|
+
import { Target } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
10
11
|
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service";
|
|
11
12
|
export interface IChatSlashData {
|
|
12
13
|
command: string;
|
|
@@ -27,6 +28,7 @@ export interface IChatSlashData {
|
|
|
27
28
|
silent?: boolean;
|
|
28
29
|
locations: ChatAgentLocation[];
|
|
29
30
|
modes?: ChatModeKind[];
|
|
31
|
+
target?: Target;
|
|
30
32
|
}
|
|
31
33
|
export interface IChatSlashFragment {
|
|
32
34
|
content: string | {
|
|
@@ -34,7 +36,7 @@ export interface IChatSlashFragment {
|
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
38
|
export type IChatSlashCallback = {
|
|
37
|
-
(prompt: string, progress: IProgress<IChatProgress>, history: IChatMessage[], location: ChatAgentLocation, sessionResource: URI, token: CancellationToken): Promise<{
|
|
39
|
+
(prompt: string, progress: IProgress<IChatProgress>, history: IChatMessage[], location: ChatAgentLocation, sessionResource: URI, token: CancellationToken, options?: IChatSendRequestOptions): Promise<{
|
|
38
40
|
followUp: IChatFollowup[];
|
|
39
41
|
} | void>;
|
|
40
42
|
};
|
|
@@ -49,7 +51,7 @@ export declare class ChatSlashCommandService extends Disposable implements IChat
|
|
|
49
51
|
registerSlashCommand(data: IChatSlashData, command: IChatSlashCallback): IDisposable;
|
|
50
52
|
getCommands(location: ChatAgentLocation, mode: ChatModeKind): Array<IChatSlashData>;
|
|
51
53
|
hasCommand(id: string): boolean;
|
|
52
|
-
executeCommand(id: string, prompt: string, progress: IProgress<IChatProgress>, history: IChatMessage[], location: ChatAgentLocation, sessionResource: URI, token: CancellationToken): Promise<{
|
|
54
|
+
executeCommand(id: string, prompt: string, progress: IProgress<IChatProgress>, history: IChatMessage[], location: ChatAgentLocation, sessionResource: URI, token: CancellationToken, options?: IChatSendRequestOptions): Promise<{
|
|
53
55
|
followUp: IChatFollowup[];
|
|
54
56
|
} | void>;
|
|
55
57
|
}
|
|
@@ -39,7 +39,7 @@ let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
|
|
|
39
39
|
hasCommand(id) {
|
|
40
40
|
return ( this._commands.has(id));
|
|
41
41
|
}
|
|
42
|
-
async executeCommand(id, prompt, progress, history, location, sessionResource, token) {
|
|
42
|
+
async executeCommand(id, prompt, progress, history, location, sessionResource, token, options) {
|
|
43
43
|
const data = this._commands.get(id);
|
|
44
44
|
if (!data) {
|
|
45
45
|
throw ( new Error("No command with id ${id} NOT registered"));
|
|
@@ -50,7 +50,7 @@ let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
|
|
|
50
50
|
if (!data.command) {
|
|
51
51
|
throw ( new Error(`No command with id ${id} NOT resolved`));
|
|
52
52
|
}
|
|
53
|
-
return await data.command(prompt, progress, history, location, sessionResource, token);
|
|
53
|
+
return await data.command(prompt, progress, history, location, sessionResource, token, options);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
ChatSlashCommandService = ( __decorate([( __param(0, IExtensionService))], ChatSlashCommandService));
|