@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
|
@@ -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(6478, "List Code Usages")),
|
|
79
|
+
userDescription: ( localize(6479, "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(6480, "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(6481, "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(6482, "Analyzed usages of `{0}`, 1 result", input.symbol)))) : ( new MarkdownString(( localize(
|
|
185
|
+
6483,
|
|
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(6484, "The icon for the welcome message."))
|
|
21
21
|
},
|
|
22
22
|
title: {
|
|
23
23
|
type: "string",
|
|
24
|
-
description: ( localize(
|
|
24
|
+
description: ( localize(6485, "The title of the welcome message."))
|
|
25
25
|
},
|
|
26
26
|
content: {
|
|
27
27
|
type: "string",
|
|
28
28
|
description: ( localize(
|
|
29
|
-
|
|
29
|
+
6486,
|
|
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(6487, "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(6488, "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.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ export declare class ChatQueuePickerActionItem extends BaseActionViewItem {
|
|
|
24
24
|
private readonly _primaryActionAction;
|
|
25
25
|
private readonly _primaryAction;
|
|
26
26
|
private readonly _dropdown;
|
|
27
|
+
private _altKeyPressed;
|
|
27
28
|
constructor(action: IAction, _options: IActionViewItemOptions, commandService: ICommandService, configurationService: IConfigurationService, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, telemetryService: ITelemetryService);
|
|
28
29
|
private _isSteerDefault;
|
|
30
|
+
private _isEffectiveSteer;
|
|
29
31
|
private _updatePrimaryAction;
|
|
30
32
|
private _runDefaultAction;
|
|
31
33
|
render(container: HTMLElement): void;
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { $, append, addDisposableListener, EventType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { ModifierKeyEmitter, $, append, addDisposableListener, EventType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
5
5
|
import { BaseActionViewItem, ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
6
6
|
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
@@ -37,8 +37,9 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
37
37
|
super(undefined, action);
|
|
38
38
|
this.commandService = commandService;
|
|
39
39
|
this.configurationService = configurationService;
|
|
40
|
+
this._altKeyPressed = false;
|
|
40
41
|
const isSteerDefault = this._isSteerDefault();
|
|
41
|
-
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(
|
|
42
|
+
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(6805, "Steer with Message")) : ( localize(6806, "Add to Queue")), ThemeIcon.asClassName(isSteerDefault ? Codicon.arrowUp : Codicon.add), !!contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key), () => this._runDefaultAction())));
|
|
42
43
|
this._primaryAction = this._register(( new ActionViewItem(undefined, this._primaryActionAction, {
|
|
43
44
|
icon: true,
|
|
44
45
|
label: false
|
|
@@ -46,7 +47,7 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
46
47
|
this._register(contextKeyService.onDidChangeContext(e => {
|
|
47
48
|
this._primaryActionAction.enabled = !!contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key);
|
|
48
49
|
}));
|
|
49
|
-
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(
|
|
50
|
+
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(6807, "More Actions...")))));
|
|
50
51
|
this._dropdown = this._register(( new ChevronActionWidgetDropdown(dropdownAction, {
|
|
51
52
|
actionProvider: {
|
|
52
53
|
getActions: () => this._getDropdownActions()
|
|
@@ -58,16 +59,27 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
58
59
|
this._updatePrimaryAction();
|
|
59
60
|
}
|
|
60
61
|
}));
|
|
62
|
+
this._register(ModifierKeyEmitter.getInstance().event(status => {
|
|
63
|
+
if (this._altKeyPressed !== status.altKey) {
|
|
64
|
+
this._altKeyPressed = status.altKey;
|
|
65
|
+
this._updatePrimaryAction();
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
61
68
|
}
|
|
62
69
|
_isSteerDefault() {
|
|
63
70
|
return this.configurationService.getValue(ChatConfiguration.RequestQueueingDefaultAction) === "steer";
|
|
64
71
|
}
|
|
65
|
-
|
|
72
|
+
_isEffectiveSteer() {
|
|
66
73
|
const isSteerDefault = this._isSteerDefault();
|
|
67
|
-
this.
|
|
74
|
+
return this._altKeyPressed ? !isSteerDefault : isSteerDefault;
|
|
75
|
+
}
|
|
76
|
+
_updatePrimaryAction() {
|
|
77
|
+
const isSteer = this._isEffectiveSteer();
|
|
78
|
+
this._primaryActionAction.label = isSteer ? ( localize(6805, "Steer with Message")) : ( localize(6806, "Add to Queue"));
|
|
79
|
+
this._primaryActionAction.class = ThemeIcon.asClassName(isSteer ? Codicon.arrowUp : Codicon.add);
|
|
68
80
|
}
|
|
69
81
|
_runDefaultAction() {
|
|
70
|
-
const actionId = this.
|
|
82
|
+
const actionId = this._isEffectiveSteer() ? ChatSteerWithMessageAction.ID : ChatQueueMessageAction.ID;
|
|
71
83
|
this.commandService.executeCommand(actionId);
|
|
72
84
|
}
|
|
73
85
|
render(container) {
|
|
@@ -110,16 +122,18 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
110
122
|
this._dropdown.setFocusable(focusable);
|
|
111
123
|
}
|
|
112
124
|
_getDropdownActions() {
|
|
125
|
+
const isSteerDefault = this._isSteerDefault();
|
|
113
126
|
const queueAction = {
|
|
114
127
|
id: ChatQueueMessageAction.ID,
|
|
115
|
-
label: ( localize(
|
|
128
|
+
label: ( localize(6806, "Add to Queue")),
|
|
116
129
|
tooltip: "",
|
|
117
130
|
enabled: true,
|
|
131
|
+
checked: !isSteerDefault,
|
|
118
132
|
icon: Codicon.add,
|
|
119
133
|
class: undefined,
|
|
120
134
|
hover: {
|
|
121
135
|
content: ( localize(
|
|
122
|
-
|
|
136
|
+
6808,
|
|
123
137
|
"Queue this message to send after the current request completes. The current response will finish uninterrupted before the queued message is sent."
|
|
124
138
|
))
|
|
125
139
|
},
|
|
@@ -129,14 +143,15 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
129
143
|
};
|
|
130
144
|
const steerAction = {
|
|
131
145
|
id: ChatSteerWithMessageAction.ID,
|
|
132
|
-
label: ( localize(
|
|
146
|
+
label: ( localize(6805, "Steer with Message")),
|
|
133
147
|
tooltip: "",
|
|
134
148
|
enabled: true,
|
|
135
|
-
|
|
149
|
+
checked: isSteerDefault,
|
|
150
|
+
icon: Codicon.arrowUp,
|
|
136
151
|
class: undefined,
|
|
137
152
|
hover: {
|
|
138
153
|
content: ( localize(
|
|
139
|
-
|
|
154
|
+
6809,
|
|
140
155
|
"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
156
|
))
|
|
142
157
|
},
|
|
@@ -146,13 +161,13 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
146
161
|
};
|
|
147
162
|
const sendAction = {
|
|
148
163
|
id: "_" + ChatSubmitAction.ID,
|
|
149
|
-
label: ( localize(
|
|
164
|
+
label: ( localize(6810, "Stop and Send")),
|
|
150
165
|
tooltip: "",
|
|
151
166
|
enabled: true,
|
|
152
|
-
icon: Codicon.
|
|
167
|
+
icon: Codicon.arrowRight,
|
|
153
168
|
class: undefined,
|
|
154
169
|
hover: {
|
|
155
|
-
content: ( localize(
|
|
170
|
+
content: ( localize(6811, "Cancel the current request and send this message immediately."))
|
|
156
171
|
},
|
|
157
172
|
run: () => {
|
|
158
173
|
this.commandService.executeCommand(ChatSubmitAction.ID);
|
|
@@ -41,8 +41,7 @@ let ChatStatusWidget = class ChatStatusWidget extends Disposable {
|
|
|
41
41
|
initializeIfEnabled() {
|
|
42
42
|
const entitlement = this.chatEntitlementService.entitlement;
|
|
43
43
|
const isAnonymous = this.chatEntitlementService.anonymous;
|
|
44
|
-
|
|
45
|
-
if (isAnonymous && enabledSku === "anonymous") {
|
|
44
|
+
if (isAnonymous && this.configurationService.getValue("chat.statusWidget.anonymous")) {
|
|
46
45
|
this.createWidgetContent("anonymous");
|
|
47
46
|
} else if (entitlement === ChatEntitlement.Free) {
|
|
48
47
|
this.createWidgetContent("free");
|
|
@@ -66,19 +65,19 @@ let ChatStatusWidget = class ChatStatusWidget extends Disposable {
|
|
|
66
65
|
this.actionButton.element.classList.add("chat-status-button");
|
|
67
66
|
if (enabledSku === "anonymous") {
|
|
68
67
|
const message = ( localize(
|
|
69
|
-
|
|
70
|
-
"You've reached the limit for chat messages.
|
|
68
|
+
6812,
|
|
69
|
+
"You've reached the limit for chat messages. Sign in to use Copilot Free."
|
|
71
70
|
));
|
|
72
|
-
const buttonLabel = ( localize(
|
|
71
|
+
const buttonLabel = ( localize(6813, "Sign In"));
|
|
73
72
|
this.messageElement.textContent = message;
|
|
74
73
|
this.actionButton.label = buttonLabel;
|
|
75
|
-
this.actionButton.element.ariaLabel = ( localize(
|
|
74
|
+
this.actionButton.element.ariaLabel = ( localize(6814, "{0} {1}", message, buttonLabel));
|
|
76
75
|
} else {
|
|
77
|
-
const message = ( localize(
|
|
78
|
-
const buttonLabel = ( localize(
|
|
76
|
+
const message = ( localize(6815, "You've reached the limit for chat messages."));
|
|
77
|
+
const buttonLabel = ( localize(6816, "Upgrade"));
|
|
79
78
|
this.messageElement.textContent = message;
|
|
80
79
|
this.actionButton.label = buttonLabel;
|
|
81
|
-
this.actionButton.element.ariaLabel = ( localize(
|
|
80
|
+
this.actionButton.element.ariaLabel = ( localize(6817, "{0} {1}", message, buttonLabel));
|
|
82
81
|
}
|
|
83
82
|
this._register(this.actionButton.onDidClick(async () => {
|
|
84
83
|
const commandId = this.chatEntitlementService.anonymous ? CHAT_SETUP_ACTION_ID : "workbench.action.chat.upgradePlan";
|