@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
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js
CHANGED
|
@@ -47,22 +47,31 @@ import { IChatAgentService, IChatAgentNameService } from '@codingame/monaco-vsco
|
|
|
47
47
|
import { getAttachableImageExtension } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
48
48
|
import { ChatRequestAgentPart, chatSubcommandLeader, chatAgentLeader, ChatRequestAgentSubcommandPart, ChatRequestSlashPromptPart, ChatRequestTextPart, chatVariableLeader, ChatRequestToolPart, ChatRequestToolSetPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
49
49
|
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service';
|
|
50
|
-
import {
|
|
50
|
+
import { ChatModeKind, ChatAgentLocation, isSupportedChatFileScheme } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
51
51
|
import { isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
52
52
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
53
53
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
54
|
+
import { Target, PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
54
55
|
import { ChatSubmitAction } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/actions/chatExecuteActions';
|
|
55
56
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
56
57
|
import { resizeImage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageUtils';
|
|
57
|
-
import { ChatDynamicVariableModel } from '@codingame/monaco-vscode-
|
|
58
|
+
import { ChatDynamicVariableModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables';
|
|
59
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
60
|
+
import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
|
|
61
|
+
import { createDebugEventsAttachment } from '@codingame/monaco-vscode-xterm-addons-common/vscode/vs/workbench/contrib/chat/browser/chatDebug/chatDebugAttachment';
|
|
62
|
+
import { getPromptFileType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
58
63
|
|
|
59
64
|
var BuiltinDynamicCompletions_1, ToolCompletions_1;
|
|
65
|
+
const SlashCommandWord = /\/[\p{L}0-9_.:-]*/gu;
|
|
66
|
+
const AgentOrSlashCommandWord = /(@|\/)[\p{L}0-9_.:-]*/gu;
|
|
60
67
|
let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
61
68
|
constructor(
|
|
62
69
|
languageFeaturesService,
|
|
63
70
|
chatWidgetService,
|
|
64
71
|
chatSlashCommandService,
|
|
65
72
|
promptsService,
|
|
73
|
+
chatService,
|
|
74
|
+
chatSessionsService,
|
|
66
75
|
mcpService
|
|
67
76
|
) {
|
|
68
77
|
super();
|
|
@@ -81,10 +90,16 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
81
90
|
if (!widget || !widget.viewModel) {
|
|
82
91
|
return null;
|
|
83
92
|
}
|
|
93
|
+
let customAgentTarget = undefined;
|
|
84
94
|
if (widget.lockedAgentId) {
|
|
85
|
-
|
|
95
|
+
if (!widget.attachmentCapabilities.supportsPromptAttachments) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const sessionResource = widget.viewModel.model.sessionResource;
|
|
99
|
+
const ctx = sessionResource && chatService.getChatSessionFromInternalUri(sessionResource);
|
|
100
|
+
customAgentTarget = (ctx ? chatSessionsService.getCustomAgentTargetForSessionType(ctx.chatSessionType) : undefined) ?? Target.Undefined;
|
|
86
101
|
}
|
|
87
|
-
const range = computeCompletionRanges(model, position,
|
|
102
|
+
const range = computeCompletionRanges(model, position, SlashCommandWord);
|
|
88
103
|
if (!range) {
|
|
89
104
|
return null;
|
|
90
105
|
}
|
|
@@ -101,10 +116,24 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
101
116
|
return null;
|
|
102
117
|
}
|
|
103
118
|
return {
|
|
104
|
-
suggestions: ( slashCommands.
|
|
119
|
+
suggestions: ( slashCommands.filter(c => {
|
|
120
|
+
if (!widget.lockedAgentId) {
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
if (c.modes && c.modes.length && !c.modes.includes(ChatModeKind.Agent)) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (c.target && customAgentTarget && c.target !== customAgentTarget) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
}).map((c, i) => {
|
|
105
131
|
const withSlash = `/${c.command}`;
|
|
106
132
|
return {
|
|
107
|
-
label:
|
|
133
|
+
label: {
|
|
134
|
+
label: withSlash,
|
|
135
|
+
description: c.detail
|
|
136
|
+
},
|
|
108
137
|
insertText: c.executeImmediately ? "" : `${withSlash} `,
|
|
109
138
|
documentation: c.detail,
|
|
110
139
|
range,
|
|
@@ -152,7 +181,10 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
152
181
|
suggestions: ( slashCommands.map((c, i) => {
|
|
153
182
|
const withSlash = `${chatSubcommandLeader}${c.command}`;
|
|
154
183
|
return {
|
|
155
|
-
label:
|
|
184
|
+
label: {
|
|
185
|
+
label: withSlash,
|
|
186
|
+
description: c.detail
|
|
187
|
+
},
|
|
156
188
|
insertText: c.executeImmediately ? "" : `${withSlash} `,
|
|
157
189
|
documentation: c.detail,
|
|
158
190
|
range,
|
|
@@ -183,7 +215,7 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
183
215
|
if (!widget || !widget.viewModel) {
|
|
184
216
|
return null;
|
|
185
217
|
}
|
|
186
|
-
const range = computeCompletionRanges(model, position,
|
|
218
|
+
const range = computeCompletionRanges(model, position, SlashCommandWord);
|
|
187
219
|
if (!range) {
|
|
188
220
|
return null;
|
|
189
221
|
}
|
|
@@ -199,15 +231,28 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
199
231
|
if (promptCommands.length === 0) {
|
|
200
232
|
return null;
|
|
201
233
|
}
|
|
202
|
-
if (widget.lockedAgentId) {
|
|
234
|
+
if (widget.lockedAgentId && !widget.attachmentCapabilities.supportsPromptAttachments) {
|
|
203
235
|
return null;
|
|
204
236
|
}
|
|
205
|
-
const
|
|
206
|
-
|
|
237
|
+
const userInvocableCommands = promptCommands.filter(c => {
|
|
238
|
+
if (widget.lockedAgentId) {
|
|
239
|
+
if (c.promptPath.extension) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
try {
|
|
243
|
+
const promptType = getPromptFileType(c.promptPath.uri);
|
|
244
|
+
if (promptType && promptType === PromptsType.hook) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
} catch {}
|
|
248
|
+
}
|
|
249
|
+
return true;
|
|
250
|
+
}).filter(c => c.parsedPromptFile?.header?.userInvocable !== false);
|
|
251
|
+
if (userInvocableCommands.length === 0) {
|
|
207
252
|
return null;
|
|
208
253
|
}
|
|
209
254
|
return {
|
|
210
|
-
suggestions: (
|
|
255
|
+
suggestions: ( userInvocableCommands.map((c, i) => {
|
|
211
256
|
const label = `/${c.name}`;
|
|
212
257
|
const description = c.description;
|
|
213
258
|
return {
|
|
@@ -236,7 +281,7 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
236
281
|
if (!widget || !widget.viewModel) {
|
|
237
282
|
return null;
|
|
238
283
|
}
|
|
239
|
-
const range = computeCompletionRanges(model, position, /\/[
|
|
284
|
+
const range = computeCompletionRanges(model, position, /\/[\p{L}0-9_.-]*/gu);
|
|
240
285
|
if (!range) {
|
|
241
286
|
return null;
|
|
242
287
|
}
|
|
@@ -269,7 +314,7 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
269
314
|
}));
|
|
270
315
|
}
|
|
271
316
|
};
|
|
272
|
-
SlashCommandCompletions = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, IChatWidgetService)), ( __param(2, IChatSlashCommandService)), ( __param(3, IPromptsService)), ( __param(4, IMcpService))], SlashCommandCompletions));
|
|
317
|
+
SlashCommandCompletions = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, IChatWidgetService)), ( __param(2, IChatSlashCommandService)), ( __param(3, IPromptsService)), ( __param(4, IChatService)), ( __param(5, IChatSessionsService)), ( __param(6, IMcpService))], SlashCommandCompletions));
|
|
273
318
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(SlashCommandCompletions, LifecyclePhase.Eventually);
|
|
274
319
|
let AgentCompletions = class AgentCompletions extends Disposable {
|
|
275
320
|
constructor(
|
|
@@ -293,7 +338,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
293
338
|
if (!widget || !widget.viewModel) {
|
|
294
339
|
return;
|
|
295
340
|
}
|
|
296
|
-
const range = computeCompletionRanges(model, position,
|
|
341
|
+
const range = computeCompletionRanges(model, position, SlashCommandWord);
|
|
297
342
|
if (!range) {
|
|
298
343
|
return;
|
|
299
344
|
}
|
|
@@ -334,7 +379,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
334
379
|
if (widget.lockedAgentId) {
|
|
335
380
|
return null;
|
|
336
381
|
}
|
|
337
|
-
const range = computeCompletionRanges(model, position,
|
|
382
|
+
const range = computeCompletionRanges(model, position, AgentOrSlashCommandWord);
|
|
338
383
|
if (!range) {
|
|
339
384
|
return null;
|
|
340
385
|
}
|
|
@@ -349,7 +394,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
349
394
|
const dummyPrefix = agent.id === "github.copilot.terminalPanel" ? `0000` : ``;
|
|
350
395
|
return `${chatAgentLeader}${dummyPrefix}${agent.name}.${command}`;
|
|
351
396
|
};
|
|
352
|
-
const justAgents = ( agents.filter(a => !a.isDefault).map(agent => {
|
|
397
|
+
const justAgents = ( agents.filter(a => !a.isDefault).filter(a => !( chatSessionAgentIds.has(a.id))).map(agent => {
|
|
353
398
|
const {
|
|
354
399
|
label: agentLabel,
|
|
355
400
|
isDupe
|
|
@@ -435,7 +480,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
435
480
|
if (widget.lockedAgentId) {
|
|
436
481
|
return null;
|
|
437
482
|
}
|
|
438
|
-
const range = computeCompletionRanges(model, position,
|
|
483
|
+
const range = computeCompletionRanges(model, position, AgentOrSlashCommandWord);
|
|
439
484
|
if (!range) {
|
|
440
485
|
return null;
|
|
441
486
|
}
|
|
@@ -507,14 +552,14 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
507
552
|
if (widget.lockedAgentId) {
|
|
508
553
|
return null;
|
|
509
554
|
}
|
|
510
|
-
const range = computeCompletionRanges(model, position,
|
|
555
|
+
const range = computeCompletionRanges(model, position, AgentOrSlashCommandWord);
|
|
511
556
|
if (!range) {
|
|
512
557
|
return;
|
|
513
558
|
}
|
|
514
559
|
if (!isEmptyUpToCompletionWord(model, range)) {
|
|
515
560
|
return;
|
|
516
561
|
}
|
|
517
|
-
const label = ( localize(
|
|
562
|
+
const label = ( localize(6823, "Install Chat Extensions..."));
|
|
518
563
|
const item = {
|
|
519
564
|
label,
|
|
520
565
|
insertText: "",
|
|
@@ -557,7 +602,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
557
602
|
};
|
|
558
603
|
}
|
|
559
604
|
for (const partAfterAgent of parsedRequest.slice(usedAgentIdx + 1)) {
|
|
560
|
-
if (!(partAfterAgent instanceof ChatRequestTextPart) || !partAfterAgent.text.trim().match(/^(
|
|
605
|
+
if (!(partAfterAgent instanceof ChatRequestTextPart) || !partAfterAgent.text.trim().match(/^(\/[\p{L}0-9_.:-]*)?$/u)) {
|
|
561
606
|
return;
|
|
562
607
|
}
|
|
563
608
|
}
|
|
@@ -662,7 +707,7 @@ class StartParameterizedPromptAction extends Action2 {
|
|
|
662
707
|
messages = await prompt.resolve(args, cts.token);
|
|
663
708
|
} catch (e) {
|
|
664
709
|
if (!cts.token.isCancellationRequested) {
|
|
665
|
-
notificationService.error(( localize(
|
|
710
|
+
notificationService.error(( localize(6824, "Error resolving prompt: {0}", String(e))));
|
|
666
711
|
}
|
|
667
712
|
replaceTextWith("");
|
|
668
713
|
return;
|
|
@@ -690,15 +735,15 @@ class StartParameterizedPromptAction extends Action2 {
|
|
|
690
735
|
id: generateUuid(),
|
|
691
736
|
kind: "generic",
|
|
692
737
|
value: contents,
|
|
693
|
-
name: ( localize(
|
|
738
|
+
name: ( localize(6825, "Prompt Resource"))
|
|
694
739
|
});
|
|
695
740
|
}
|
|
696
741
|
} else if (mimeType && getAttachableImageExtension(mimeType)) {
|
|
697
742
|
const resized = await resizeImage(contents).catch(() => decodeBase64(contents).buffer);
|
|
698
743
|
chatWidget.attachmentModel.addContext({
|
|
699
744
|
id: generateUuid(),
|
|
700
|
-
name: ( localize(
|
|
701
|
-
fullName: ( localize(
|
|
745
|
+
name: ( localize(6826, "Prompt Image")),
|
|
746
|
+
fullName: ( localize(6826, "Prompt Image")),
|
|
702
747
|
value: resized,
|
|
703
748
|
kind: "image",
|
|
704
749
|
references: validURI && [{
|
|
@@ -774,6 +819,9 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
774
819
|
static {
|
|
775
820
|
this.addReferenceCommand = "_addReferenceCmd";
|
|
776
821
|
}
|
|
822
|
+
static {
|
|
823
|
+
this.addDebugEventsSnapshotCommand = "_addDebugEventsSnapshotCmd";
|
|
824
|
+
}
|
|
777
825
|
static {
|
|
778
826
|
this.VariableNameDef = ( new RegExp(`${chatVariableLeader}[\\w:-]*`, "g"));
|
|
779
827
|
}
|
|
@@ -789,7 +837,8 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
789
837
|
configurationService,
|
|
790
838
|
codeEditorService,
|
|
791
839
|
chatAgentService,
|
|
792
|
-
instantiationService
|
|
840
|
+
instantiationService,
|
|
841
|
+
chatDebugService
|
|
793
842
|
) {
|
|
794
843
|
super();
|
|
795
844
|
this.historyService = historyService;
|
|
@@ -804,6 +853,7 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
804
853
|
this.codeEditorService = codeEditorService;
|
|
805
854
|
this.chatAgentService = chatAgentService;
|
|
806
855
|
this.instantiationService = instantiationService;
|
|
856
|
+
this.chatDebugService = chatDebugService;
|
|
807
857
|
const fileWordPattern = ( new RegExp(`${chatVariableLeader}[^\\s]*`, "g"));
|
|
808
858
|
this.registerVariableCompletions("fileAndFolder", async (
|
|
809
859
|
{
|
|
@@ -910,12 +960,58 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
910
960
|
}
|
|
911
961
|
return result;
|
|
912
962
|
});
|
|
963
|
+
this.registerVariableCompletions("debugEventsSnapshot", (
|
|
964
|
+
{
|
|
965
|
+
widget,
|
|
966
|
+
range
|
|
967
|
+
}
|
|
968
|
+
) => {
|
|
969
|
+
if (widget.location !== ChatAgentLocation.Chat) {
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
973
|
+
if (!sessionResource || this.chatDebugService.getEvents(sessionResource).length === 0) {
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
const text = `${chatVariableLeader}debugEventsSnapshot`;
|
|
977
|
+
const result = {
|
|
978
|
+
suggestions: []
|
|
979
|
+
};
|
|
980
|
+
result.suggestions.push({
|
|
981
|
+
label: {
|
|
982
|
+
label: text,
|
|
983
|
+
description: ( localize(6827, "Attach debug events snapshot"))
|
|
984
|
+
},
|
|
985
|
+
filterText: text,
|
|
986
|
+
insertText: "",
|
|
987
|
+
range,
|
|
988
|
+
kind: CompletionItemKind.Text,
|
|
989
|
+
sortText: "z",
|
|
990
|
+
command: {
|
|
991
|
+
id: BuiltinDynamicCompletions_1.addDebugEventsSnapshotCommand,
|
|
992
|
+
title: "",
|
|
993
|
+
arguments: [widget]
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
return result;
|
|
997
|
+
});
|
|
913
998
|
this._register(
|
|
914
999
|
CommandsRegistry.registerCommand(BuiltinDynamicCompletions_1.addReferenceCommand, (_services, arg) => {
|
|
915
1000
|
assertType(arg instanceof ReferenceArgument);
|
|
916
1001
|
return this.cmdAddReference(arg);
|
|
917
1002
|
})
|
|
918
1003
|
);
|
|
1004
|
+
this._register(CommandsRegistry.registerCommand(
|
|
1005
|
+
BuiltinDynamicCompletions_1.addDebugEventsSnapshotCommand,
|
|
1006
|
+
async (_services, widget) => {
|
|
1007
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
1008
|
+
if (!sessionResource) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
const attachment = await createDebugEventsAttachment(sessionResource, this.chatDebugService);
|
|
1012
|
+
widget.attachmentModel.addContext(attachment);
|
|
1013
|
+
}
|
|
1014
|
+
));
|
|
919
1015
|
}
|
|
920
1016
|
findActiveCodeEditor() {
|
|
921
1017
|
const codeEditor = this.codeEditorService.getActiveCodeEditor();
|
|
@@ -977,7 +1073,7 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
977
1073
|
const uriLabel = this.labelService.getUriLabel(resource, {
|
|
978
1074
|
relative: true
|
|
979
1075
|
});
|
|
980
|
-
const labelDescription = description ? ( localize(
|
|
1076
|
+
const labelDescription = description ? ( localize(6828, "{0} ({1})", uriLabel, description)) : uriLabel;
|
|
981
1077
|
const sortText = boostPriority ? " " : "!";
|
|
982
1078
|
return {
|
|
983
1079
|
label: {
|
|
@@ -1025,7 +1121,7 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
1025
1121
|
}
|
|
1026
1122
|
}
|
|
1027
1123
|
seen.add(resource);
|
|
1028
|
-
const newLen = result.suggestions.push(makeCompletionItem(resource, FileKind.FILE, i === 0 ? ( localize(
|
|
1124
|
+
const newLen = result.suggestions.push(makeCompletionItem(resource, FileKind.FILE, i === 0 ? ( localize(6829, "Active file")) : undefined, i === 0));
|
|
1029
1125
|
if (newLen - len >= 5) {
|
|
1030
1126
|
break;
|
|
1031
1127
|
}
|
|
@@ -1148,7 +1244,7 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
1148
1244
|
arg.widget.getContrib(ChatDynamicVariableModel.ID)?.addReference(arg.variable);
|
|
1149
1245
|
}
|
|
1150
1246
|
};
|
|
1151
|
-
BuiltinDynamicCompletions = BuiltinDynamicCompletions_1 = ( __decorate([( __param(0, IHistoryService)), ( __param(1, IWorkspaceContextService)), ( __param(2, ISearchService)), ( __param(3, ILabelService)), ( __param(4, ILanguageFeaturesService)), ( __param(5, IChatWidgetService)), ( __param(6, IOutlineModelService)), ( __param(7, IEditorService)), ( __param(8, IConfigurationService)), ( __param(9, ICodeEditorService)), ( __param(10, IChatAgentService)), ( __param(11, IInstantiationService))], BuiltinDynamicCompletions));
|
|
1247
|
+
BuiltinDynamicCompletions = BuiltinDynamicCompletions_1 = ( __decorate([( __param(0, IHistoryService)), ( __param(1, IWorkspaceContextService)), ( __param(2, ISearchService)), ( __param(3, ILabelService)), ( __param(4, ILanguageFeaturesService)), ( __param(5, IChatWidgetService)), ( __param(6, IOutlineModelService)), ( __param(7, IEditorService)), ( __param(8, IConfigurationService)), ( __param(9, ICodeEditorService)), ( __param(10, IChatAgentService)), ( __param(11, IInstantiationService)), ( __param(12, IChatDebugService))], BuiltinDynamicCompletions));
|
|
1152
1248
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(BuiltinDynamicCompletions, LifecyclePhase.Eventually);
|
|
1153
1249
|
function computeCompletionRanges(model, position, reg, onlyOnWordStart = false) {
|
|
1154
1250
|
const varWord = getWordAtText(position.column, reg, model.getLineContent(position.lineNumber), 0);
|
|
@@ -1258,7 +1354,7 @@ let ToolCompletions = class ToolCompletions extends Disposable {
|
|
|
1258
1354
|
name = item.referenceName;
|
|
1259
1355
|
} else {
|
|
1260
1356
|
const source = item.source;
|
|
1261
|
-
detail = ( localize(
|
|
1357
|
+
detail = ( localize(6830, "{0}: {1}", source.label, item.displayName));
|
|
1262
1358
|
name = item.toolReferenceName ?? item.displayName;
|
|
1263
1359
|
documentation = item.userDescription ?? item.modelDescription;
|
|
1264
1360
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js
CHANGED
|
@@ -26,9 +26,10 @@ import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
26
26
|
import { chatSlashCommandBackground, chatSlashCommandForeground } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/common/widget/chatColors';
|
|
27
27
|
import { ChatRequestTextPart, ChatRequestSlashPromptPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestToolPart, ChatRequestToolSetPart, ChatRequestDynamicVariablePart, chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
28
28
|
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
|
|
29
|
+
import { getDynamicVariablesForWidget, getSelectedToolAndToolSetsForWidget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatVariables';
|
|
29
30
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
30
31
|
import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget';
|
|
31
|
-
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-
|
|
32
|
+
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables';
|
|
32
33
|
import { NativeEditContextRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/controller/editContext/native/nativeEditContextRegistry';
|
|
33
34
|
import { TextAreaEditContextRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry';
|
|
34
35
|
import { ThrottledDelayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
@@ -400,13 +401,16 @@ let ChatTokenDeleter = class ChatTokenDeleter extends Disposable {
|
|
|
400
401
|
}
|
|
401
402
|
const change = e.changes[0];
|
|
402
403
|
if (!change.text && this.widget.viewModel) {
|
|
403
|
-
const
|
|
404
|
-
|
|
404
|
+
const attachmentCapabilities = previousSelectedAgent?.capabilities ?? this.widget.attachmentCapabilities;
|
|
405
|
+
const previousParsedValue = parser.parseChatRequestWithReferences(
|
|
406
|
+
getDynamicVariablesForWidget(this.widget),
|
|
407
|
+
getSelectedToolAndToolSetsForWidget(this.widget),
|
|
405
408
|
previousInputValue,
|
|
406
|
-
widget.location,
|
|
409
|
+
this.widget.location,
|
|
407
410
|
{
|
|
408
411
|
selectedAgent: previousSelectedAgent,
|
|
409
|
-
mode: this.widget.input.currentModeKind
|
|
412
|
+
mode: this.widget.input.currentModeKind,
|
|
413
|
+
attachmentCapabilities
|
|
410
414
|
}
|
|
411
415
|
);
|
|
412
416
|
const deletableTokens = previousParsedValue.parts.filter(
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js
CHANGED
|
@@ -62,7 +62,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
62
62
|
return ( new RenderedHoverParts([renderedHoverPart]));
|
|
63
63
|
}
|
|
64
64
|
getAccessibleContent(hoverPart) {
|
|
65
|
-
return localize(
|
|
65
|
+
return localize(6831, "There is a chat agent hover part here.");
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
ChatAgentHoverParticipant = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IChatWidgetService)), ( __param(3, ICommandService))], ChatAgentHoverParticipant));
|
|
@@ -253,7 +253,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
253
253
|
disclaimerElement.classList.toggle("hidden", !showDisclaimer);
|
|
254
254
|
if (showDisclaimer) {
|
|
255
255
|
const renderedMarkdown = disposables.add(this.markdownRendererService.render(( new MarkdownString(( localize(
|
|
256
|
-
|
|
256
|
+
6875,
|
|
257
257
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
258
258
|
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
259
259
|
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
@@ -362,7 +362,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
362
362
|
this.widget.inputEditor.setValue("");
|
|
363
363
|
}
|
|
364
364
|
updateModel() {
|
|
365
|
-
this.modelRef ??= this.chatService.
|
|
365
|
+
this.modelRef ??= this.chatService.startNewLocalSession(ChatAgentLocation.Chat, {
|
|
366
366
|
disableBackgroundKeepAlive: true
|
|
367
367
|
});
|
|
368
368
|
const model = this.modelRef?.object;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as dom from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
|
|
2
2
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { ITextResourceConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service";
|
|
3
5
|
import { IScopedContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
4
6
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
5
7
|
import { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
|
|
@@ -7,9 +9,12 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
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 { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
10
|
-
import {
|
|
12
|
+
import { AbstractEditorWithViewState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorWithViewState";
|
|
11
13
|
import { IEditorOpenContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
14
|
+
import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
|
|
12
15
|
import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService";
|
|
16
|
+
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
17
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
13
18
|
import { IChatModelInputState, IExportableChatData, ISerializableChatData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
14
19
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
15
20
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
@@ -30,11 +35,14 @@ export interface IChatEditorOptions extends IEditorOptions {
|
|
|
30
35
|
fallback?: string;
|
|
31
36
|
};
|
|
32
37
|
}
|
|
33
|
-
export
|
|
34
|
-
|
|
38
|
+
export interface IChatEditorViewState {
|
|
39
|
+
scrollTop: number;
|
|
40
|
+
}
|
|
41
|
+
export declare class ChatEditor extends AbstractEditorWithViewState<IChatEditorViewState> {
|
|
35
42
|
private readonly chatSessionsService;
|
|
36
43
|
private readonly contextKeyService;
|
|
37
44
|
private readonly chatService;
|
|
45
|
+
private static readonly VIEW_STATE_KEY;
|
|
38
46
|
private _widget;
|
|
39
47
|
get widget(): ChatWidget;
|
|
40
48
|
private _scopedContextKeyService;
|
|
@@ -42,7 +50,7 @@ export declare class ChatEditor extends EditorPane {
|
|
|
42
50
|
private dimension;
|
|
43
51
|
private _loadingContainer;
|
|
44
52
|
private _editorContainer;
|
|
45
|
-
constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, instantiationService: IInstantiationService, storageService: IStorageService, chatSessionsService: IChatSessionsService, contextKeyService: IContextKeyService, chatService: IChatService);
|
|
53
|
+
constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, instantiationService: IInstantiationService, storageService: IStorageService, chatSessionsService: IChatSessionsService, contextKeyService: IContextKeyService, chatService: IChatService, textResourceConfigurationService: ITextResourceConfigurationService, editorService: IEditorService, editorGroupService: IEditorGroupsService);
|
|
46
54
|
private clear;
|
|
47
55
|
protected createEditor(parent: HTMLElement): void;
|
|
48
56
|
protected setEditorVisible(visible: boolean): void;
|
|
@@ -52,5 +60,8 @@ export declare class ChatEditor extends EditorPane {
|
|
|
52
60
|
private hideLoadingInChatWidget;
|
|
53
61
|
setInput(input: ChatEditorInput, options: IChatEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
|
|
54
62
|
private updateModel;
|
|
63
|
+
protected computeEditorViewState(_resource: URI): IChatEditorViewState | undefined;
|
|
64
|
+
protected tracksEditorViewState(input: EditorInput): boolean;
|
|
65
|
+
protected toEditorViewStateResource(input: EditorInput): URI | undefined;
|
|
55
66
|
layout(dimension: dom.Dimension, position?: dom.IDomPosition | undefined): void;
|
|
56
67
|
}
|
|
@@ -6,6 +6,7 @@ import { raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/ba
|
|
|
6
6
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
7
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
8
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
|
+
import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
|
|
9
10
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
10
11
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
12
|
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
@@ -23,8 +24,10 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/misc
|
|
|
23
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
24
25
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
25
26
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
26
|
-
import {
|
|
27
|
+
import { AbstractEditorWithViewState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorWithViewState';
|
|
27
28
|
import { EDITOR_DRAG_AND_DROP_BACKGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
29
|
+
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
30
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
28
31
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
29
32
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
30
33
|
import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
@@ -34,7 +37,14 @@ import { clearChatEditor } from '../../actions/chatClear.js';
|
|
|
34
37
|
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput';
|
|
35
38
|
import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget';
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
var ChatEditor_1;
|
|
41
|
+
let ChatEditor = class ChatEditor extends AbstractEditorWithViewState {
|
|
42
|
+
static {
|
|
43
|
+
ChatEditor_1 = this;
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.VIEW_STATE_KEY = "chatEditorViewState";
|
|
47
|
+
}
|
|
38
48
|
get widget() {
|
|
39
49
|
return this._widget;
|
|
40
50
|
}
|
|
@@ -49,16 +59,23 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
49
59
|
storageService,
|
|
50
60
|
chatSessionsService,
|
|
51
61
|
contextKeyService,
|
|
52
|
-
chatService
|
|
62
|
+
chatService,
|
|
63
|
+
textResourceConfigurationService,
|
|
64
|
+
editorService,
|
|
65
|
+
editorGroupService
|
|
53
66
|
) {
|
|
54
67
|
super(
|
|
55
68
|
ChatEditorInput.EditorID,
|
|
56
69
|
group,
|
|
70
|
+
ChatEditor_1.VIEW_STATE_KEY,
|
|
57
71
|
telemetryService,
|
|
72
|
+
instantiationService,
|
|
73
|
+
storageService,
|
|
74
|
+
textResourceConfigurationService,
|
|
58
75
|
themeService,
|
|
59
|
-
|
|
76
|
+
editorService,
|
|
77
|
+
editorGroupService
|
|
60
78
|
);
|
|
61
|
-
this.instantiationService = instantiationService;
|
|
62
79
|
this.chatSessionsService = chatSessionsService;
|
|
63
80
|
this.contextKeyService = contextKeyService;
|
|
64
81
|
this.chatService = chatService;
|
|
@@ -117,7 +134,6 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
117
134
|
this.widget?.focusInput();
|
|
118
135
|
}
|
|
119
136
|
clearInput() {
|
|
120
|
-
this.saveState();
|
|
121
137
|
this.widget.setModel(undefined);
|
|
122
138
|
super.clearInput();
|
|
123
139
|
}
|
|
@@ -158,7 +174,7 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
158
174
|
let isContributedChatSession = false;
|
|
159
175
|
const chatSessionType = input.getSessionType();
|
|
160
176
|
if (chatSessionType !== localChatSessionType) {
|
|
161
|
-
const loadingMessage = ( localize(
|
|
177
|
+
const loadingMessage = ( localize(6876, "Loading..."));
|
|
162
178
|
this.showLoadingInChatWidget(loadingMessage);
|
|
163
179
|
}
|
|
164
180
|
await super.setInput(input, options, context, token);
|
|
@@ -171,7 +187,10 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
171
187
|
}
|
|
172
188
|
if (chatSessionType !== localChatSessionType) {
|
|
173
189
|
try {
|
|
174
|
-
await raceCancellationError(
|
|
190
|
+
await raceCancellationError(
|
|
191
|
+
this.chatSessionsService.canResolveChatSession(input.resource.scheme),
|
|
192
|
+
token
|
|
193
|
+
);
|
|
175
194
|
const contributions = this.chatSessionsService.getAllChatSessionContributions();
|
|
176
195
|
const contribution = contributions.find(c => c.type === chatSessionType);
|
|
177
196
|
if (contribution) {
|
|
@@ -199,6 +218,10 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
199
218
|
editorModel.model.inputModel.setState(options.modelInputState);
|
|
200
219
|
}
|
|
201
220
|
this.updateModel(editorModel.model);
|
|
221
|
+
const viewState = this.loadEditorViewState(input, context);
|
|
222
|
+
if (viewState) {
|
|
223
|
+
this._widget.scrollTop = viewState.scrollTop;
|
|
224
|
+
}
|
|
202
225
|
if (isContributedChatSession && options?.title?.preferred && input.sessionResource) {
|
|
203
226
|
this.chatService.setChatSessionTitle(input.sessionResource, options.title.preferred);
|
|
204
227
|
}
|
|
@@ -210,6 +233,20 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
210
233
|
updateModel(model) {
|
|
211
234
|
this.widget.setModel(model);
|
|
212
235
|
}
|
|
236
|
+
computeEditorViewState(_resource) {
|
|
237
|
+
if (!this._widget) {
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
scrollTop: this._widget.scrollTop
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
tracksEditorViewState(input) {
|
|
245
|
+
return input instanceof ChatEditorInput;
|
|
246
|
+
}
|
|
247
|
+
toEditorViewStateResource(input) {
|
|
248
|
+
return input.sessionResource;
|
|
249
|
+
}
|
|
213
250
|
layout(dimension, position) {
|
|
214
251
|
this.dimension = dimension;
|
|
215
252
|
if (this.widget) {
|
|
@@ -217,6 +254,6 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
217
254
|
}
|
|
218
255
|
}
|
|
219
256
|
};
|
|
220
|
-
ChatEditor = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IInstantiationService)), ( __param(4, IStorageService)), ( __param(5, IChatSessionsService)), ( __param(6, IContextKeyService)), ( __param(7, IChatService))], ChatEditor));
|
|
257
|
+
ChatEditor = ChatEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IInstantiationService)), ( __param(4, IStorageService)), ( __param(5, IChatSessionsService)), ( __param(6, IContextKeyService)), ( __param(7, IChatService)), ( __param(8, ITextResourceConfigurationService)), ( __param(9, IEditorService)), ( __param(10, IEditorGroupsService))], ChatEditor));
|
|
221
258
|
|
|
222
259
|
export { ChatEditor };
|