@codingame/monaco-vscode-chat-service-override 26.2.2 → 27.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 +31 -1
- 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 +39 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +274 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +71 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +284 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +79 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +378 -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 +3 -3
- 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 +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +1 -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 +15 -29
- 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 +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +541 -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 +70 -65
- 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 +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +181 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +943 -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 +248 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +118 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +727 -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 +72 -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 +623 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +858 -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/chatVariables.js +19 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +529 -363
- 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 +305 -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 +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +111 -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 +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +429 -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 +45 -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 +781 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +5 -22
- 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/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 +15 -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 +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +351 -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/chatTipService.d.ts +182 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +892 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +55 -25
- 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 +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +102 -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 +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +69 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +2 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +7 -7
- 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.js +43 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +67 -42
- 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.js +10 -10
- 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 +64 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +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 +42 -8
- 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 +58 -31
- 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 +8 -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 +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +27 -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 +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +18 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +192 -85
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -1
- 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 +8 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +111 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +52 -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 +73 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +478 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +1 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +2 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +23 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +44 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +345 -113
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -24
- 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/inlineChat/browser/inlineChat.contribution.js +11 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +248 -24
- 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 +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +280 -65
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +47 -19
- 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 +6 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +38 -16
- 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/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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
3
|
+
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
4
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
+
import { createToolSimpleTextResult } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers';
|
|
6
|
+
|
|
7
|
+
function resolveToolUri(input, workspaceContextService) {
|
|
8
|
+
if (input.uri) {
|
|
9
|
+
return ( URI.parse(input.uri));
|
|
10
|
+
}
|
|
11
|
+
if (input.filePath) {
|
|
12
|
+
const folders = workspaceContextService.getWorkspace().folders;
|
|
13
|
+
if (folders.length === 1) {
|
|
14
|
+
return folders[0].toResource(input.filePath);
|
|
15
|
+
}
|
|
16
|
+
for (const folder of folders) {
|
|
17
|
+
return folder.toResource(input.filePath);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
function findLineNumber(model, lineContent) {
|
|
23
|
+
const parts = lineContent.trim().split(/\s+/);
|
|
24
|
+
const pattern = ( parts.map(escapeRegExpCharacters)).join("\\s+");
|
|
25
|
+
const matches = model.findMatches(pattern, false, true, false, null, false, 1);
|
|
26
|
+
if (matches.length === 0) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return matches[0].range.startLineNumber;
|
|
30
|
+
}
|
|
31
|
+
function findSymbolColumn(lineText, symbol) {
|
|
32
|
+
const pattern = ( new RegExp(`\\b${escapeRegExpCharacters(symbol)}\\b`));
|
|
33
|
+
const match = pattern.exec(lineText);
|
|
34
|
+
if (match) {
|
|
35
|
+
return match.index + 1;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
function errorResult(message) {
|
|
40
|
+
const result = createToolSimpleTextResult(message);
|
|
41
|
+
result.toolResultMessage = ( new MarkdownString(message));
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { errorResult, findLineNumber, findSymbolColumn, resolveToolUri };
|
|
@@ -44,7 +44,7 @@ const toolSetsSchema = {
|
|
|
44
44
|
allowComments: true,
|
|
45
45
|
allowTrailingCommas: true,
|
|
46
46
|
defaultSnippets: [{
|
|
47
|
-
label: ( localize(
|
|
47
|
+
label: ( localize(6370, "Empty tool set")),
|
|
48
48
|
body: {
|
|
49
49
|
"${1:toolSetName}": {
|
|
50
50
|
"tools": ["${2:someTool}", "${3:anotherTool}"],
|
|
@@ -54,7 +54,7 @@ const toolSetsSchema = {
|
|
|
54
54
|
}
|
|
55
55
|
}],
|
|
56
56
|
type: "object",
|
|
57
|
-
description: ( localize(
|
|
57
|
+
description: ( localize(6371, "User tool sets configuration")),
|
|
58
58
|
additionalProperties: {
|
|
59
59
|
type: "object",
|
|
60
60
|
required: ["tools"],
|
|
@@ -62,7 +62,7 @@ const toolSetsSchema = {
|
|
|
62
62
|
properties: {
|
|
63
63
|
tools: {
|
|
64
64
|
description: ( localize(
|
|
65
|
-
|
|
65
|
+
6372,
|
|
66
66
|
"A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools the way they are referenced in prompts."
|
|
67
67
|
)),
|
|
68
68
|
type: "array",
|
|
@@ -75,7 +75,7 @@ const toolSetsSchema = {
|
|
|
75
75
|
},
|
|
76
76
|
icon: {
|
|
77
77
|
description: ( localize(
|
|
78
|
-
|
|
78
|
+
6373,
|
|
79
79
|
"Icon to use for this tool set in the UI. Uses the \"\\$(name)\"-syntax, like \"\\$(zap)\""
|
|
80
80
|
)),
|
|
81
81
|
type: "string",
|
|
@@ -83,7 +83,7 @@ const toolSetsSchema = {
|
|
|
83
83
|
markdownEnumDescriptions: Array.from(getAllCodicons(), icon => `$(${icon.id})`)
|
|
84
84
|
},
|
|
85
85
|
description: {
|
|
86
|
-
description: ( localize(
|
|
86
|
+
description: ( localize(6374, "A short description of this tool set.")),
|
|
87
87
|
type: "string"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -184,7 +184,7 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
|
|
|
184
184
|
});
|
|
185
185
|
for (const item of data) {
|
|
186
186
|
toolEnumValues.push(item.name);
|
|
187
|
-
toolEnumDescriptions.push(( localize(
|
|
187
|
+
toolEnumDescriptions.push(( localize(6375, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
|
|
188
188
|
}
|
|
189
189
|
store.clear();
|
|
190
190
|
reg.registerSchema(toolSetSchemaId, toolSetsSchema, store);
|
|
@@ -281,8 +281,8 @@ class ConfigureToolSets extends Action2 {
|
|
|
281
281
|
constructor() {
|
|
282
282
|
super({
|
|
283
283
|
id: ConfigureToolSets.ID,
|
|
284
|
-
title: ( localize2(
|
|
285
|
-
shortTitle: ( localize(
|
|
284
|
+
title: ( localize2(6376, "Configure Tool Sets...")),
|
|
285
|
+
shortTitle: ( localize(6377, "Tool Sets")),
|
|
286
286
|
category: CHAT_CATEGORY,
|
|
287
287
|
f1: true,
|
|
288
288
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0))),
|
|
@@ -303,7 +303,7 @@ class ConfigureToolSets extends Action2 {
|
|
|
303
303
|
const textFileService = accessor.get(ITextFileService);
|
|
304
304
|
const picks = [];
|
|
305
305
|
picks.push({
|
|
306
|
-
label: ( localize(
|
|
306
|
+
label: ( localize(6378, "Create new tool sets file...")),
|
|
307
307
|
alwaysShow: true,
|
|
308
308
|
iconClass: ThemeIcon.asClassName(Codicon.plus)
|
|
309
309
|
});
|
|
@@ -320,7 +320,7 @@ class ConfigureToolSets extends Action2 {
|
|
|
320
320
|
}
|
|
321
321
|
const pick = await quickInputService.pick(picks, {
|
|
322
322
|
canPickMany: false,
|
|
323
|
-
placeHolder: ( localize(
|
|
323
|
+
placeHolder: ( localize(6379, "Select a tool set to configure"))
|
|
324
324
|
});
|
|
325
325
|
if (!pick) {
|
|
326
326
|
return;
|
|
@@ -328,13 +328,13 @@ class ConfigureToolSets extends Action2 {
|
|
|
328
328
|
let resource;
|
|
329
329
|
if (!pick.toolset) {
|
|
330
330
|
const name = await quickInputService.input({
|
|
331
|
-
placeHolder: ( localize(
|
|
331
|
+
placeHolder: ( localize(6380, "Type tool sets file name")),
|
|
332
332
|
validateInput: async input => {
|
|
333
333
|
if (!input) {
|
|
334
|
-
return localize(
|
|
334
|
+
return localize(6381, "Invalid file name");
|
|
335
335
|
}
|
|
336
336
|
if (!isValidBasename(input)) {
|
|
337
|
-
return localize(
|
|
337
|
+
return localize(6382, "'{0}' is not a valid file name", input);
|
|
338
338
|
}
|
|
339
339
|
return undefined;
|
|
340
340
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
5
|
+
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
6
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
7
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
9
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
10
|
+
import { ISearchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search.service";
|
|
11
|
+
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
12
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
13
|
+
export declare const UsagesToolId = "vscode_listCodeUsages";
|
|
14
|
+
export declare class UsagesTool extends Disposable implements IToolImpl {
|
|
15
|
+
private readonly _languageFeaturesService;
|
|
16
|
+
private readonly _modelService;
|
|
17
|
+
private readonly _searchService;
|
|
18
|
+
private readonly _textModelService;
|
|
19
|
+
private readonly _workspaceContextService;
|
|
20
|
+
private readonly _onDidUpdateToolData;
|
|
21
|
+
readonly onDidUpdateToolData: Event<void>;
|
|
22
|
+
constructor(_languageFeaturesService: ILanguageFeaturesService, _modelService: IModelService, _searchService: ISearchService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService);
|
|
23
|
+
getToolData(): IToolData;
|
|
24
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
25
|
+
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
26
|
+
private _getLinePreviews;
|
|
27
|
+
private _classifyReference;
|
|
28
|
+
private _overlaps;
|
|
29
|
+
}
|
|
30
|
+
export declare class UsagesToolContribution extends Disposable implements IWorkbenchContribution {
|
|
31
|
+
static readonly ID = "chat.usagesTool";
|
|
32
|
+
constructor(toolsService: ILanguageModelToolsService, instantiationService: IInstantiationService);
|
|
33
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
|
+
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
7
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
9
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
10
|
+
import { relativePath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
11
|
+
import { Position } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position';
|
|
12
|
+
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
13
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
14
|
+
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
15
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
16
|
+
import { getDefinitionsAtPosition, getReferencesAtPosition, getImplementationsAtPosition } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/gotoSymbol/browser/goToSymbol';
|
|
17
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
18
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
21
|
+
import { QueryType, resultIsMatch } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search';
|
|
22
|
+
import { ISearchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search.service';
|
|
23
|
+
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
24
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
25
|
+
import { createToolSimpleTextResult } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers';
|
|
26
|
+
import { resolveToolUri, errorResult, findLineNumber, findSymbolColumn } from './toolHelpers.js';
|
|
27
|
+
|
|
28
|
+
const UsagesToolId = "vscode_listCodeUsages";
|
|
29
|
+
const BaseModelDescription = `Find all usages (references, definitions, and implementations) of a code symbol across the workspace. This tool locates where a symbol is referenced, defined, or implemented.
|
|
30
|
+
|
|
31
|
+
Input:
|
|
32
|
+
- "symbol": The exact name of the symbol to search for (function, class, method, variable, type, etc.).
|
|
33
|
+
- "uri": A full URI (e.g. "file:///path/to/file.ts") of a file where the symbol appears. Provide either "uri" or "filePath".
|
|
34
|
+
- "filePath": A workspace-relative file path (e.g. "src/utils/helpers.ts") of a file where the symbol appears. Provide either "uri" or "filePath".
|
|
35
|
+
- "lineContent": A substring of the line of code where the symbol appears. This is used to locate the exact position in the file. Must be the actual text from the file - do NOT fabricate it.
|
|
36
|
+
|
|
37
|
+
IMPORTANT: The file and line do NOT need to be the definition of the symbol. Any occurrence works - a usage, an import, a call site, etc. You can pick whichever occurrence is most convenient.
|
|
38
|
+
|
|
39
|
+
If the tool returns an error, retry with corrected input - ensure the file path is correct, the line content matches the actual file content, and the symbol name appears in that line.`;
|
|
40
|
+
let UsagesTool = class UsagesTool extends Disposable {
|
|
41
|
+
constructor(
|
|
42
|
+
_languageFeaturesService,
|
|
43
|
+
_modelService,
|
|
44
|
+
_searchService,
|
|
45
|
+
_textModelService,
|
|
46
|
+
_workspaceContextService
|
|
47
|
+
) {
|
|
48
|
+
super();
|
|
49
|
+
this._languageFeaturesService = _languageFeaturesService;
|
|
50
|
+
this._modelService = _modelService;
|
|
51
|
+
this._searchService = _searchService;
|
|
52
|
+
this._textModelService = _textModelService;
|
|
53
|
+
this._workspaceContextService = _workspaceContextService;
|
|
54
|
+
this._onDidUpdateToolData = this._store.add(( new Emitter()));
|
|
55
|
+
this.onDidUpdateToolData = this._onDidUpdateToolData.event;
|
|
56
|
+
this._store.add(Event.debounce(
|
|
57
|
+
this._languageFeaturesService.referenceProvider.onDidChange,
|
|
58
|
+
() => {},
|
|
59
|
+
2000
|
|
60
|
+
)((() => this._onDidUpdateToolData.fire())));
|
|
61
|
+
}
|
|
62
|
+
getToolData() {
|
|
63
|
+
const languageIds = this._languageFeaturesService.referenceProvider.registeredLanguageIds;
|
|
64
|
+
let modelDescription = BaseModelDescription;
|
|
65
|
+
if (( languageIds.has("*"))) {
|
|
66
|
+
modelDescription += "\n\nSupported for all languages.";
|
|
67
|
+
} else if (languageIds.size > 0) {
|
|
68
|
+
const sorted = [...languageIds].sort();
|
|
69
|
+
modelDescription += `\n\nCurrently supported for: ${sorted.join(", ")}.`;
|
|
70
|
+
} else {
|
|
71
|
+
modelDescription += "\n\nNo languages currently have reference providers registered.";
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
id: UsagesToolId,
|
|
75
|
+
toolReferenceName: "usages",
|
|
76
|
+
canBeReferencedInPrompt: false,
|
|
77
|
+
icon: ThemeIcon.fromId(Codicon.references.id),
|
|
78
|
+
displayName: ( localize(6383, "List Code Usages")),
|
|
79
|
+
userDescription: ( localize(6384, "Find references, definitions, and implementations of a symbol")),
|
|
80
|
+
modelDescription,
|
|
81
|
+
source: ToolDataSource.Internal,
|
|
82
|
+
when: ( ContextKeyExpr.has("config.chat.tools.usagesTool.enabled")),
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
symbol: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "The exact name of the symbol (function, class, method, variable, type, etc.) to find usages of."
|
|
89
|
+
},
|
|
90
|
+
uri: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "A full URI of a file where the symbol appears (e.g. \"file:///path/to/file.ts\"). Provide either \"uri\" or \"filePath\"."
|
|
93
|
+
},
|
|
94
|
+
filePath: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "A workspace-relative file path where the symbol appears (e.g. \"src/utils/helpers.ts\"). Provide either \"uri\" or \"filePath\"."
|
|
97
|
+
},
|
|
98
|
+
lineContent: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "A substring of the line of code where the symbol appears. Used to locate the exact position. Must be actual text from the file."
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
required: ["symbol", "lineContent"]
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async prepareToolInvocation(context, _token) {
|
|
108
|
+
const input = context.parameters;
|
|
109
|
+
return {
|
|
110
|
+
invocationMessage: ( localize(6385, "Analyzing usages of `{0}`", input.symbol))
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
async invoke(invocation, _countTokens, _progress, token) {
|
|
114
|
+
const input = invocation.parameters;
|
|
115
|
+
const uri = resolveToolUri(input, this._workspaceContextService);
|
|
116
|
+
if (!uri) {
|
|
117
|
+
return errorResult(
|
|
118
|
+
"Provide either \"uri\" (a full URI) or \"filePath\" (a workspace-relative path) to identify the file."
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
const ref = await this._textModelService.createModelReference(uri);
|
|
122
|
+
try {
|
|
123
|
+
const model = ref.object.textEditorModel;
|
|
124
|
+
if (!( this._languageFeaturesService.referenceProvider.has(model))) {
|
|
125
|
+
return errorResult(
|
|
126
|
+
`No reference provider available for this file's language. The usages tool may not support this language.`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
const lineNumber = findLineNumber(model, input.lineContent);
|
|
130
|
+
if (lineNumber === undefined) {
|
|
131
|
+
return errorResult(`Could not find line content "${input.lineContent}" in ${( uri.toString())}. Provide the exact text from the line where the symbol appears.`);
|
|
132
|
+
}
|
|
133
|
+
const lineText = model.getLineContent(lineNumber);
|
|
134
|
+
const column = findSymbolColumn(lineText, input.symbol);
|
|
135
|
+
if (column === undefined) {
|
|
136
|
+
return errorResult(
|
|
137
|
+
`Could not find symbol "${input.symbol}" in the matched line. Ensure the symbol name is correct and appears in the provided line content.`
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
const position = ( new Position(lineNumber, column));
|
|
141
|
+
const [definitions, references, implementations] = await Promise.all([getDefinitionsAtPosition(
|
|
142
|
+
this._languageFeaturesService.definitionProvider,
|
|
143
|
+
model,
|
|
144
|
+
position,
|
|
145
|
+
false,
|
|
146
|
+
token
|
|
147
|
+
), getReferencesAtPosition(
|
|
148
|
+
this._languageFeaturesService.referenceProvider,
|
|
149
|
+
model,
|
|
150
|
+
position,
|
|
151
|
+
false,
|
|
152
|
+
false,
|
|
153
|
+
token
|
|
154
|
+
), getImplementationsAtPosition(
|
|
155
|
+
this._languageFeaturesService.implementationProvider,
|
|
156
|
+
model,
|
|
157
|
+
position,
|
|
158
|
+
false,
|
|
159
|
+
token
|
|
160
|
+
)]);
|
|
161
|
+
if (references.length === 0) {
|
|
162
|
+
const result = createToolSimpleTextResult(`No usages found for \`${input.symbol}\`.`);
|
|
163
|
+
result.toolResultMessage = ( new MarkdownString(( localize(6386, "Analyzed usages of `{0}`, no results", input.symbol))));
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
const previews = await this._getLinePreviews(input.symbol, references, token);
|
|
167
|
+
const lines = [];
|
|
168
|
+
lines.push(`${references.length} usages of \`${input.symbol}\`:\n`);
|
|
169
|
+
for (let i = 0; i < references.length; i++) {
|
|
170
|
+
const ref = references[i];
|
|
171
|
+
const kind = this._classifyReference(ref, definitions, implementations);
|
|
172
|
+
const startLine = Range.lift(ref.range).startLineNumber;
|
|
173
|
+
const preview = previews[i];
|
|
174
|
+
if (preview) {
|
|
175
|
+
lines.push(`<usage type="${kind}" uri="${( ref.uri.toString())}" line="${startLine}">`);
|
|
176
|
+
lines.push(`\t${preview}`);
|
|
177
|
+
lines.push(`</usage>`);
|
|
178
|
+
} else {
|
|
179
|
+
lines.push(`<usage type="${kind}" uri="${( ref.uri.toString())}" line="${startLine}" />`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const text = lines.join("\n");
|
|
183
|
+
const result = createToolSimpleTextResult(text);
|
|
184
|
+
result.toolResultMessage = references.length === 1 ? ( new MarkdownString(( localize(6387, "Analyzed usages of `{0}`, 1 result", input.symbol)))) : ( new MarkdownString(( localize(
|
|
185
|
+
6388,
|
|
186
|
+
"Analyzed usages of `{0}`, {1} results",
|
|
187
|
+
input.symbol,
|
|
188
|
+
references.length
|
|
189
|
+
))));
|
|
190
|
+
result.toolResultDetails = ( references.map(r => ({
|
|
191
|
+
uri: r.uri,
|
|
192
|
+
range: r.range
|
|
193
|
+
})));
|
|
194
|
+
return result;
|
|
195
|
+
} finally {
|
|
196
|
+
ref.dispose();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
async _getLinePreviews(symbol, references, token) {
|
|
200
|
+
const previews = ( new Array(references.length));
|
|
201
|
+
const lookup = ( new Map());
|
|
202
|
+
const needSearch = ( new ResourceSet());
|
|
203
|
+
for (let i = 0; i < references.length; i++) {
|
|
204
|
+
const ref = references[i];
|
|
205
|
+
const lineNumber = Range.lift(ref.range).startLineNumber;
|
|
206
|
+
const existingModel = this._modelService.getModel(ref.uri);
|
|
207
|
+
if (existingModel) {
|
|
208
|
+
previews[i] = existingModel.getLineContent(lineNumber).trim();
|
|
209
|
+
} else {
|
|
210
|
+
lookup.set(`${( ref.uri.toString())}:${lineNumber}`, i);
|
|
211
|
+
needSearch.add(ref.uri);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (needSearch.size === 0 || token.isCancellationRequested) {
|
|
215
|
+
return previews;
|
|
216
|
+
}
|
|
217
|
+
try {
|
|
218
|
+
const folders = this._workspaceContextService.getWorkspace().folders;
|
|
219
|
+
const relativePaths = [];
|
|
220
|
+
for (const uri of needSearch) {
|
|
221
|
+
const folder = this._workspaceContextService.getWorkspaceFolder(uri);
|
|
222
|
+
if (folder) {
|
|
223
|
+
const rel = relativePath(folder.uri, uri);
|
|
224
|
+
if (rel) {
|
|
225
|
+
relativePaths.push(rel);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (relativePaths.length > 0) {
|
|
230
|
+
const includePattern = {};
|
|
231
|
+
if (relativePaths.length === 1) {
|
|
232
|
+
includePattern[relativePaths[0]] = true;
|
|
233
|
+
} else {
|
|
234
|
+
includePattern[`{${relativePaths.join(",")}}`] = true;
|
|
235
|
+
}
|
|
236
|
+
const searchResult = await this._searchService.textSearch({
|
|
237
|
+
type: QueryType.Text,
|
|
238
|
+
contentPattern: {
|
|
239
|
+
pattern: escapeRegExpCharacters(symbol),
|
|
240
|
+
isRegExp: true,
|
|
241
|
+
isWordMatch: true
|
|
242
|
+
},
|
|
243
|
+
folderQueries: ( folders.map(f => ({
|
|
244
|
+
folder: f.uri
|
|
245
|
+
}))),
|
|
246
|
+
includePattern
|
|
247
|
+
}, token);
|
|
248
|
+
for (const fileMatch of searchResult.results) {
|
|
249
|
+
if (!fileMatch.results) {
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
for (const textMatch of fileMatch.results) {
|
|
253
|
+
if (!resultIsMatch(textMatch)) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
for (const range of textMatch.rangeLocations) {
|
|
257
|
+
const lineNumber = range.source.startLineNumber + 1;
|
|
258
|
+
const key = `${( fileMatch.resource.toString())}:${lineNumber}`;
|
|
259
|
+
const idx = lookup.get(key);
|
|
260
|
+
if (idx !== undefined) {
|
|
261
|
+
previews[idx] = textMatch.previewText.trim();
|
|
262
|
+
lookup.delete(key);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
} catch {}
|
|
269
|
+
return previews;
|
|
270
|
+
}
|
|
271
|
+
_classifyReference(ref, definitions, implementations) {
|
|
272
|
+
if (( definitions.some(d => this._overlaps(ref, d)))) {
|
|
273
|
+
return "definition";
|
|
274
|
+
}
|
|
275
|
+
if (( implementations.some(d => this._overlaps(ref, d)))) {
|
|
276
|
+
return "implementation";
|
|
277
|
+
}
|
|
278
|
+
return "reference";
|
|
279
|
+
}
|
|
280
|
+
_overlaps(a, b) {
|
|
281
|
+
if (( a.uri.toString()) !== ( b.uri.toString())) {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
return Range.areIntersectingOrTouching(a.range, b.range);
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
UsagesTool = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, IModelService)), ( __param(2, ISearchService)), ( __param(3, ITextModelService)), ( __param(4, IWorkspaceContextService))], UsagesTool));
|
|
288
|
+
let UsagesToolContribution = class UsagesToolContribution extends Disposable {
|
|
289
|
+
static {
|
|
290
|
+
this.ID = "chat.usagesTool";
|
|
291
|
+
}
|
|
292
|
+
constructor(toolsService, instantiationService) {
|
|
293
|
+
super();
|
|
294
|
+
const usagesTool = this._store.add(instantiationService.createInstance(UsagesTool));
|
|
295
|
+
let registration;
|
|
296
|
+
const registerUsagesTool = () => {
|
|
297
|
+
registration?.dispose();
|
|
298
|
+
toolsService.flushToolUpdates();
|
|
299
|
+
const toolData = usagesTool.getToolData();
|
|
300
|
+
registration = toolsService.registerTool(toolData, usagesTool);
|
|
301
|
+
};
|
|
302
|
+
registerUsagesTool();
|
|
303
|
+
this._store.add(usagesTool.onDidUpdateToolData(registerUsagesTool));
|
|
304
|
+
this._store.add({
|
|
305
|
+
dispose: () => registration?.dispose()
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
UsagesToolContribution = ( __decorate([( __param(0, ILanguageModelToolsService)), ( __param(1, IInstantiationService))], UsagesToolContribution));
|
|
310
|
+
|
|
311
|
+
export { UsagesTool, UsagesToolContribution, UsagesToolId };
|
package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js
CHANGED
|
@@ -17,29 +17,29 @@ const chatViewsWelcomeJsonSchema = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
icon: {
|
|
19
19
|
type: "string",
|
|
20
|
-
description: ( localize(
|
|
20
|
+
description: ( localize(6394, "The icon for the welcome message."))
|
|
21
21
|
},
|
|
22
22
|
title: {
|
|
23
23
|
type: "string",
|
|
24
|
-
description: ( localize(
|
|
24
|
+
description: ( localize(6395, "The title of the welcome message."))
|
|
25
25
|
},
|
|
26
26
|
content: {
|
|
27
27
|
type: "string",
|
|
28
28
|
description: ( localize(
|
|
29
|
-
|
|
29
|
+
6396,
|
|
30
30
|
"The content of the welcome message. The first command link will be rendered as a button."
|
|
31
31
|
))
|
|
32
32
|
},
|
|
33
33
|
when: {
|
|
34
34
|
type: "string",
|
|
35
|
-
description: ( localize(
|
|
35
|
+
description: ( localize(6397, "Condition when the welcome message is shown."))
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
40
40
|
extensionPoint: "chatViewsWelcome",
|
|
41
41
|
jsonSchema: {
|
|
42
|
-
description: ( localize(
|
|
42
|
+
description: ( localize(6398, "Contributes a welcome message to a chat view")),
|
|
43
43
|
type: "array",
|
|
44
44
|
items: chatViewsWelcomeJsonSchema
|
|
45
45
|
}
|
|
@@ -26,6 +26,10 @@ export declare class ChatWidgetService extends Disposable implements IChatWidget
|
|
|
26
26
|
readonly onDidAddWidget: Event<IChatWidget>;
|
|
27
27
|
private readonly _onDidBackgroundSession;
|
|
28
28
|
readonly onDidBackgroundSession: Event<URI>;
|
|
29
|
+
private readonly _onDidChangeFocusedWidget;
|
|
30
|
+
readonly onDidChangeFocusedWidget: Event<IChatWidget | undefined>;
|
|
31
|
+
private readonly _onDidChangeFocusedSession;
|
|
32
|
+
readonly onDidChangeFocusedSession: Event<void>;
|
|
29
33
|
constructor(editorGroupsService: IEditorGroupsService, viewsService: IViewsService, quickChatService: IQuickChatService, layoutService: ILayoutService, editorService: IEditorService, chatService: IChatService);
|
|
30
34
|
get lastFocusedWidget(): IChatWidget | undefined;
|
|
31
35
|
getAllWidgets(): ReadonlyArray<IChatWidget>;
|
|
@@ -39,6 +39,10 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
39
39
|
this.onDidAddWidget = this._onDidAddWidget.event;
|
|
40
40
|
this._onDidBackgroundSession = this._register(( new Emitter()));
|
|
41
41
|
this.onDidBackgroundSession = this._onDidBackgroundSession.event;
|
|
42
|
+
this._onDidChangeFocusedWidget = this._register(( new Emitter()));
|
|
43
|
+
this.onDidChangeFocusedWidget = this._onDidChangeFocusedWidget.event;
|
|
44
|
+
this._onDidChangeFocusedSession = this._register(( new Emitter()));
|
|
45
|
+
this.onDidChangeFocusedSession = this._onDidChangeFocusedSession.event;
|
|
42
46
|
}
|
|
43
47
|
get lastFocusedWidget() {
|
|
44
48
|
return this._lastFocusedWidget;
|
|
@@ -89,7 +93,7 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
89
93
|
} else {
|
|
90
94
|
await this.prepareSessionForMove(sessionResource, target);
|
|
91
95
|
}
|
|
92
|
-
if (target === ChatViewPaneTarget) {
|
|
96
|
+
if (target === ChatViewPaneTarget || typeof target === "undefined") {
|
|
93
97
|
const chatView = await this.viewsService.openView(ChatViewId, !options?.preserveFocus);
|
|
94
98
|
if (chatView) {
|
|
95
99
|
await chatView.loadSession(sessionResource);
|
|
@@ -180,6 +184,8 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
180
184
|
return;
|
|
181
185
|
}
|
|
182
186
|
this._lastFocusedWidget = widget;
|
|
187
|
+
this._onDidChangeFocusedWidget.fire(widget);
|
|
188
|
+
this._onDidChangeFocusedSession.fire();
|
|
183
189
|
}
|
|
184
190
|
register(newWidget) {
|
|
185
191
|
if (( this._widgets.some(widget => widget === newWidget))) {
|
|
@@ -198,6 +204,9 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
198
204
|
currentSessionResource
|
|
199
205
|
}
|
|
200
206
|
) => {
|
|
207
|
+
if (this._lastFocusedWidget === newWidget && !isEqual(previousSessionResource, currentSessionResource)) {
|
|
208
|
+
this._onDidChangeFocusedSession.fire();
|
|
209
|
+
}
|
|
201
210
|
if (!previousSessionResource || (currentSessionResource && isEqual(previousSessionResource, currentSessionResource))) {
|
|
202
211
|
return;
|
|
203
212
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js
CHANGED
|
@@ -38,7 +38,7 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
38
38
|
this.commandService = commandService;
|
|
39
39
|
this.configurationService = configurationService;
|
|
40
40
|
const isSteerDefault = this._isSteerDefault();
|
|
41
|
-
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(
|
|
41
|
+
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(6718, "Steer with Message")) : ( localize(6719, "Add to Queue")), ThemeIcon.asClassName(Codicon.arrowUp), !!contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key), () => this._runDefaultAction())));
|
|
42
42
|
this._primaryAction = this._register(( new ActionViewItem(undefined, this._primaryActionAction, {
|
|
43
43
|
icon: true,
|
|
44
44
|
label: false
|
|
@@ -46,7 +46,7 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
46
46
|
this._register(contextKeyService.onDidChangeContext(e => {
|
|
47
47
|
this._primaryActionAction.enabled = !!contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key);
|
|
48
48
|
}));
|
|
49
|
-
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(
|
|
49
|
+
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(6720, "More Actions...")))));
|
|
50
50
|
this._dropdown = this._register(( new ChevronActionWidgetDropdown(dropdownAction, {
|
|
51
51
|
actionProvider: {
|
|
52
52
|
getActions: () => this._getDropdownActions()
|
|
@@ -64,7 +64,7 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
64
64
|
}
|
|
65
65
|
_updatePrimaryAction() {
|
|
66
66
|
const isSteerDefault = this._isSteerDefault();
|
|
67
|
-
this._primaryActionAction.label = isSteerDefault ? ( localize(
|
|
67
|
+
this._primaryActionAction.label = isSteerDefault ? ( localize(6718, "Steer with Message")) : ( localize(6719, "Add to Queue"));
|
|
68
68
|
}
|
|
69
69
|
_runDefaultAction() {
|
|
70
70
|
const actionId = this._isSteerDefault() ? ChatSteerWithMessageAction.ID : ChatQueueMessageAction.ID;
|
|
@@ -112,14 +112,14 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
112
112
|
_getDropdownActions() {
|
|
113
113
|
const queueAction = {
|
|
114
114
|
id: ChatQueueMessageAction.ID,
|
|
115
|
-
label: ( localize(
|
|
115
|
+
label: ( localize(6719, "Add to Queue")),
|
|
116
116
|
tooltip: "",
|
|
117
117
|
enabled: true,
|
|
118
118
|
icon: Codicon.add,
|
|
119
119
|
class: undefined,
|
|
120
120
|
hover: {
|
|
121
121
|
content: ( localize(
|
|
122
|
-
|
|
122
|
+
6721,
|
|
123
123
|
"Queue this message to send after the current request completes. The current response will finish uninterrupted before the queued message is sent."
|
|
124
124
|
))
|
|
125
125
|
},
|
|
@@ -129,14 +129,14 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
129
129
|
};
|
|
130
130
|
const steerAction = {
|
|
131
131
|
id: ChatSteerWithMessageAction.ID,
|
|
132
|
-
label: ( localize(
|
|
132
|
+
label: ( localize(6718, "Steer with Message")),
|
|
133
133
|
tooltip: "",
|
|
134
134
|
enabled: true,
|
|
135
135
|
icon: Codicon.arrowRight,
|
|
136
136
|
class: undefined,
|
|
137
137
|
hover: {
|
|
138
138
|
content: ( localize(
|
|
139
|
-
|
|
139
|
+
6722,
|
|
140
140
|
"Send this message at the next opportunity, signaling the current request to yield. The current response will stop and the new message will be sent immediately."
|
|
141
141
|
))
|
|
142
142
|
},
|
|
@@ -146,13 +146,13 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
146
146
|
};
|
|
147
147
|
const sendAction = {
|
|
148
148
|
id: "_" + ChatSubmitAction.ID,
|
|
149
|
-
label: ( localize(
|
|
149
|
+
label: ( localize(6723, "Stop and Send")),
|
|
150
150
|
tooltip: "",
|
|
151
151
|
enabled: true,
|
|
152
|
-
icon: Codicon.
|
|
152
|
+
icon: Codicon.arrowUp,
|
|
153
153
|
class: undefined,
|
|
154
154
|
hover: {
|
|
155
|
-
content: ( localize(
|
|
155
|
+
content: ( localize(6724, "Cancel the current request and send this message immediately."))
|
|
156
156
|
},
|
|
157
157
|
run: () => {
|
|
158
158
|
this.commandService.executeCommand(ChatSubmitAction.ID);
|