@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
3
4
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
4
5
|
import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
|
|
5
6
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
@@ -13,10 +14,13 @@ export declare class ChatWindowNotifier extends Disposable implements IWorkbench
|
|
|
13
14
|
private readonly _chatWidgetService;
|
|
14
15
|
private readonly _hostService;
|
|
15
16
|
private readonly _configurationService;
|
|
17
|
+
private readonly _commandService;
|
|
16
18
|
static readonly ID = "workbench.contrib.chatWindowNotifier";
|
|
17
19
|
private readonly _activeNotifications;
|
|
18
|
-
constructor(_chatService: IChatService, _chatWidgetService: IChatWidgetService, _hostService: IHostService, _configurationService: IConfigurationService);
|
|
20
|
+
constructor(_chatService: IChatService, _chatWidgetService: IChatWidgetService, _hostService: IHostService, _configurationService: IConfigurationService, _commandService: ICommandService);
|
|
19
21
|
private _trackModel;
|
|
20
22
|
private _notifyIfNeeded;
|
|
23
|
+
private _isQuestionCarouselPending;
|
|
24
|
+
private _sanitizeOSToastText;
|
|
21
25
|
private _clearNotification;
|
|
22
26
|
}
|
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { getWindow
|
|
3
|
+
import { getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
5
|
-
import {
|
|
6
|
-
import { Disposable, DisposableResourceMap,
|
|
5
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
6
|
+
import { Disposable, DisposableResourceMap, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
9
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
10
11
|
import { FocusMode } from '@codingame/monaco-vscode-api/vscode/vs/platform/native/common/native';
|
|
11
12
|
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
12
13
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
14
|
+
import { ChatConfiguration, ChatNotificationMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
13
15
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
16
|
+
import { AcceptToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
14
17
|
import { autorunIterableDelta, autorunDelta } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
15
18
|
|
|
16
19
|
let ChatWindowNotifier = class ChatWindowNotifier extends Disposable {
|
|
17
20
|
static {
|
|
18
21
|
this.ID = "workbench.contrib.chatWindowNotifier";
|
|
19
22
|
}
|
|
20
|
-
constructor(
|
|
23
|
+
constructor(
|
|
24
|
+
_chatService,
|
|
25
|
+
_chatWidgetService,
|
|
26
|
+
_hostService,
|
|
27
|
+
_configurationService,
|
|
28
|
+
_commandService
|
|
29
|
+
) {
|
|
21
30
|
super();
|
|
22
31
|
this._chatService = _chatService;
|
|
23
32
|
this._chatWidgetService = _chatWidgetService;
|
|
24
33
|
this._hostService = _hostService;
|
|
25
34
|
this._configurationService = _configurationService;
|
|
35
|
+
this._commandService = _commandService;
|
|
26
36
|
this._activeNotifications = this._register(( new DisposableResourceMap()));
|
|
27
37
|
const modelTrackers = this._register(( new DisposableResourceMap()));
|
|
28
38
|
this._register(
|
|
@@ -58,45 +68,65 @@ let ChatWindowNotifier = class ChatWindowNotifier extends Disposable {
|
|
|
58
68
|
});
|
|
59
69
|
}
|
|
60
70
|
async _notifyIfNeeded(sessionResource, info) {
|
|
61
|
-
|
|
71
|
+
const mode = this._configurationService.getValue(ChatConfiguration.NotifyWindowOnConfirmation);
|
|
72
|
+
if (mode === ChatNotificationMode.Off) {
|
|
62
73
|
return;
|
|
63
74
|
}
|
|
64
75
|
const widget = this._chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
65
76
|
const targetWindow = widget ? getWindow(widget.domNode) : mainWindow;
|
|
66
|
-
|
|
77
|
+
const isFocused = targetWindow.document.hasFocus();
|
|
78
|
+
if (mode !== ChatNotificationMode.Always && isFocused) {
|
|
67
79
|
return;
|
|
68
80
|
}
|
|
69
81
|
this._clearNotification(sessionResource);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
if (!isFocused) {
|
|
83
|
+
await this._hostService.focus(targetWindow, {
|
|
84
|
+
mode: FocusMode.Notify
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const notificationTitle = info.title ? ( localize(6162, "Chat: {0}", info.title)) : ( localize(6163, "Untitled Chat"));
|
|
88
|
+
const cts = ( new CancellationTokenSource());
|
|
89
|
+
this._activeNotifications.set(sessionResource, toDisposable(() => cts.dispose(true)));
|
|
90
|
+
const isQuestionCarousel = this._isQuestionCarouselPending(sessionResource);
|
|
91
|
+
try {
|
|
92
|
+
const actionLabel = isQuestionCarousel ? ( localize(6164, "Open Chat")) : ( localize(6165, "Allow"));
|
|
93
|
+
const body = info.detail ? this._sanitizeOSToastText(info.detail) : isQuestionCarousel ? ( localize(6166, "Questions need your input.")) : ( localize(6167, "Approval needed to continue."));
|
|
94
|
+
const result = await this._hostService.showToast({
|
|
95
|
+
title: this._sanitizeOSToastText(notificationTitle),
|
|
96
|
+
body,
|
|
97
|
+
actions: [actionLabel]
|
|
98
|
+
}, cts.token);
|
|
99
|
+
if (result.clicked || typeof result.actionIndex === "number") {
|
|
82
100
|
await this._hostService.focus(targetWindow, {
|
|
83
101
|
mode: FocusMode.Force
|
|
84
102
|
});
|
|
85
103
|
const widget = await this._chatWidgetService.openSession(sessionResource);
|
|
86
104
|
widget?.focusInput();
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
this._clearNotification(sessionResource);
|
|
105
|
+
if (result.actionIndex === 0 && !isQuestionCarousel) {
|
|
106
|
+
await this._commandService.executeCommand(AcceptToolConfirmationActionId, {
|
|
107
|
+
sessionResource
|
|
108
|
+
});
|
|
92
109
|
}
|
|
93
|
-
}
|
|
110
|
+
}
|
|
111
|
+
} finally {
|
|
112
|
+
this._clearNotification(sessionResource);
|
|
94
113
|
}
|
|
95
114
|
}
|
|
115
|
+
_isQuestionCarouselPending(sessionResource) {
|
|
116
|
+
const model = this._chatService.getSession(sessionResource);
|
|
117
|
+
const lastResponse = model?.lastRequest?.response;
|
|
118
|
+
if (!lastResponse) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
return ( lastResponse.response.value.some(part => part.kind === "questionCarousel" && !part.isUsed));
|
|
122
|
+
}
|
|
123
|
+
_sanitizeOSToastText(text) {
|
|
124
|
+
return text.replace(/`/g, "'");
|
|
125
|
+
}
|
|
96
126
|
_clearNotification(sessionResource) {
|
|
97
127
|
this._activeNotifications.deleteAndDispose(sessionResource);
|
|
98
128
|
}
|
|
99
129
|
};
|
|
100
|
-
ChatWindowNotifier = ( __decorate([( __param(0, IChatService)), ( __param(1, IChatWidgetService)), ( __param(2, IHostService)), ( __param(3, IConfigurationService))], ChatWindowNotifier));
|
|
130
|
+
ChatWindowNotifier = ( __decorate([( __param(0, IChatService)), ( __param(1, IChatWidgetService)), ( __param(2, IHostService)), ( __param(3, IConfigurationService)), ( __param(4, ICommandService))], ChatWindowNotifier));
|
|
101
131
|
|
|
102
132
|
export { ChatWindowNotifier };
|
|
@@ -7,6 +7,7 @@ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
7
7
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
8
8
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
9
9
|
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
|
+
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
10
11
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
12
|
|
|
12
13
|
let ChatContextService = class ChatContextService extends Disposable {
|
|
@@ -78,11 +79,12 @@ let ChatContextService = class ChatContextService extends Disposable {
|
|
|
78
79
|
if (!item.value) {
|
|
79
80
|
continue;
|
|
80
81
|
}
|
|
82
|
+
const derivedLabel = item.label ?? (item.resourceUri ? basename(item.resourceUri) : "Unknown");
|
|
81
83
|
items.push({
|
|
82
84
|
value: item.value,
|
|
83
|
-
name:
|
|
85
|
+
name: derivedLabel,
|
|
84
86
|
modelDescription: item.modelDescription,
|
|
85
|
-
id:
|
|
87
|
+
id: derivedLabel,
|
|
86
88
|
kind: "workspace"
|
|
87
89
|
});
|
|
88
90
|
}
|
|
@@ -120,11 +122,14 @@ let ChatContextService = class ChatContextService extends Disposable {
|
|
|
120
122
|
if (!context) {
|
|
121
123
|
return;
|
|
122
124
|
}
|
|
125
|
+
const effectiveResourceUri = context.resourceUri ?? uri;
|
|
126
|
+
const derivedLabel = context.label ?? basename(effectiveResourceUri);
|
|
123
127
|
const contextValue = {
|
|
124
128
|
value: undefined,
|
|
125
|
-
name:
|
|
129
|
+
name: derivedLabel,
|
|
126
130
|
icon: context.icon,
|
|
127
131
|
uri: uri,
|
|
132
|
+
resourceUri: context.resourceUri,
|
|
128
133
|
modelDescription: context.modelDescription,
|
|
129
134
|
tooltip: context.tooltip,
|
|
130
135
|
commandId: context.command?.id,
|
|
@@ -178,23 +183,27 @@ let ChatContextService = class ChatContextService extends Disposable {
|
|
|
178
183
|
};
|
|
179
184
|
return {
|
|
180
185
|
picks: picks().then(items => {
|
|
181
|
-
return ( items.map(item =>
|
|
182
|
-
label
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
contextValue =
|
|
186
|
+
return ( items.map(item => {
|
|
187
|
+
const derivedLabel = item.label ?? (item.resourceUri ? basename(item.resourceUri) : "Unknown");
|
|
188
|
+
return {
|
|
189
|
+
label: derivedLabel,
|
|
190
|
+
iconClass: item.icon ? ThemeIcon.asClassName(item.icon) : undefined,
|
|
191
|
+
asAttachment: async () => {
|
|
192
|
+
let contextValue = item;
|
|
193
|
+
if ((contextValue.value === undefined) && providerEntry?.explicitProvider) {
|
|
194
|
+
contextValue = await providerEntry.explicitProvider.resolveChatContext(item, CancellationToken.None);
|
|
195
|
+
}
|
|
196
|
+
const resolvedLabel = contextValue.label ?? (contextValue.resourceUri ? basename(contextValue.resourceUri) : "Unknown");
|
|
197
|
+
return {
|
|
198
|
+
kind: "generic",
|
|
199
|
+
id: resolvedLabel,
|
|
200
|
+
name: resolvedLabel,
|
|
201
|
+
icon: contextValue.icon,
|
|
202
|
+
value: contextValue.value
|
|
203
|
+
};
|
|
188
204
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
id: contextValue.label,
|
|
192
|
-
name: contextValue.label,
|
|
193
|
-
icon: contextValue.icon,
|
|
194
|
-
value: contextValue.value
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
})));
|
|
205
|
+
};
|
|
206
|
+
}));
|
|
198
207
|
}),
|
|
199
208
|
placeholder: title
|
|
200
209
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
3
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
5
|
+
export declare class CreateSlashCommandsUsageTracker extends Disposable {
|
|
6
|
+
private readonly _chatService;
|
|
7
|
+
private readonly _storageService;
|
|
8
|
+
private readonly _getActiveContextKeyService;
|
|
9
|
+
private static readonly _USED_CREATE_SLASH_COMMANDS_KEY;
|
|
10
|
+
constructor(_chatService: IChatService, _storageService: IStorageService, _getActiveContextKeyService: () => IContextKeyService | undefined);
|
|
11
|
+
syncContextKey(contextKeyService: IContextKeyService): void;
|
|
12
|
+
private _markUsed;
|
|
13
|
+
private static _isCreateSlashCommand;
|
|
14
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
4
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
5
|
+
import { ChatRequestSlashCommandPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
6
|
+
|
|
7
|
+
class CreateSlashCommandsUsageTracker extends Disposable {
|
|
8
|
+
static { this._USED_CREATE_SLASH_COMMANDS_KEY = 'chat.tips.usedCreateSlashCommands'; }
|
|
9
|
+
constructor(_chatService, _storageService, _getActiveContextKeyService) {
|
|
10
|
+
super();
|
|
11
|
+
this._chatService = _chatService;
|
|
12
|
+
this._storageService = _storageService;
|
|
13
|
+
this._getActiveContextKeyService = _getActiveContextKeyService;
|
|
14
|
+
this._register(this._chatService.onDidSubmitRequest(e => {
|
|
15
|
+
const message = e.message ?? this._chatService.getSession(e.chatSessionResource)?.lastRequest?.message;
|
|
16
|
+
if (!message) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
for (const part of message.parts) {
|
|
20
|
+
if (part.kind === ChatRequestSlashCommandPart.Kind) {
|
|
21
|
+
const slash = part;
|
|
22
|
+
if (CreateSlashCommandsUsageTracker._isCreateSlashCommand(slash.slashCommand.command)) {
|
|
23
|
+
this._markUsed();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const trimmed = message.text.trimStart();
|
|
29
|
+
const match = /^\/(create-(?:instructions|prompt|agent|skill))(?:\s|$)/.exec(trimmed);
|
|
30
|
+
if (match && CreateSlashCommandsUsageTracker._isCreateSlashCommand(match[1])) {
|
|
31
|
+
this._markUsed();
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
syncContextKey(contextKeyService) {
|
|
36
|
+
const used = this._storageService.getBoolean(CreateSlashCommandsUsageTracker._USED_CREATE_SLASH_COMMANDS_KEY, StorageScope.APPLICATION, false);
|
|
37
|
+
ChatContextKeys.hasUsedCreateSlashCommands.bindTo(contextKeyService).set(used);
|
|
38
|
+
}
|
|
39
|
+
_markUsed() {
|
|
40
|
+
if (this._storageService.getBoolean(CreateSlashCommandsUsageTracker._USED_CREATE_SLASH_COMMANDS_KEY, StorageScope.APPLICATION, false)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this._storageService.store(CreateSlashCommandsUsageTracker._USED_CREATE_SLASH_COMMANDS_KEY, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
44
|
+
const contextKeyService = this._getActiveContextKeyService();
|
|
45
|
+
if (contextKeyService) {
|
|
46
|
+
ChatContextKeys.hasUsedCreateSlashCommands.bindTo(contextKeyService).set(true);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static _isCreateSlashCommand(command) {
|
|
50
|
+
switch (command) {
|
|
51
|
+
case 'create-instructions':
|
|
52
|
+
case 'create-prompt':
|
|
53
|
+
case 'create-agent':
|
|
54
|
+
case 'create-skill':
|
|
55
|
+
return true;
|
|
56
|
+
default:
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { CreateSlashCommandsUsageTracker };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { ILanguageModelChatMetadata } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
4
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
5
|
+
export interface DefaultModelArrays {
|
|
6
|
+
readonly modelIds: string[];
|
|
7
|
+
readonly modelLabels: string[];
|
|
8
|
+
readonly modelDescriptions: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface DefaultModelContributionOptions {
|
|
11
|
+
/** Configuration key for the setting (used in schema notification). */
|
|
12
|
+
readonly configKey: string;
|
|
13
|
+
/** Configuration section id for `notifyConfigurationSchemaUpdated`, or `undefined` to skip notification. */
|
|
14
|
+
readonly configSectionId: string | undefined;
|
|
15
|
+
/** Log prefix, e.g. `'[PlanAgentDefaultModel]'`. */
|
|
16
|
+
readonly logPrefix: string;
|
|
17
|
+
/** Additional filter beyond `isUserSelectable`. Return `true` to include the model. */
|
|
18
|
+
readonly filter?: (metadata: ILanguageModelChatMetadata) => boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Creates the initial static arrays used by configuration registration code.
|
|
22
|
+
* The returned arrays are mutated in-place by {@link DefaultModelContribution}.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createDefaultModelArrays(): DefaultModelArrays;
|
|
25
|
+
/**
|
|
26
|
+
* Shared base class for workbench contributions that populate a dynamic enum
|
|
27
|
+
* of language models for a settings picker.
|
|
28
|
+
*/
|
|
29
|
+
export declare abstract class DefaultModelContribution extends Disposable {
|
|
30
|
+
private readonly _arrays;
|
|
31
|
+
private readonly _options;
|
|
32
|
+
private readonly _languageModelsService;
|
|
33
|
+
private readonly _logService;
|
|
34
|
+
constructor(_arrays: DefaultModelArrays, _options: DefaultModelContributionOptions, _languageModelsService: ILanguageModelsService, _logService: ILogService);
|
|
35
|
+
private _updateModelValues;
|
|
36
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
6
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
7
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
8
|
+
import { ILanguageModelChatMetadata } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
9
|
+
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
10
|
+
import { DEFAULT_MODEL_PICKER_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget';
|
|
11
|
+
|
|
12
|
+
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
13
|
+
function createDefaultModelArrays() {
|
|
14
|
+
return {
|
|
15
|
+
modelIds: [""],
|
|
16
|
+
modelLabels: [( localize(6168, "Auto (Vendor Default)"))],
|
|
17
|
+
modelDescriptions: [( localize(6169, "Use the vendor's default model"))]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
let DefaultModelContribution = class DefaultModelContribution extends Disposable {
|
|
21
|
+
constructor(_arrays, _options, _languageModelsService, _logService) {
|
|
22
|
+
super();
|
|
23
|
+
this._arrays = _arrays;
|
|
24
|
+
this._options = _options;
|
|
25
|
+
this._languageModelsService = _languageModelsService;
|
|
26
|
+
this._logService = _logService;
|
|
27
|
+
this._register(
|
|
28
|
+
_languageModelsService.onDidChangeLanguageModels(() => this._updateModelValues())
|
|
29
|
+
);
|
|
30
|
+
this._updateModelValues();
|
|
31
|
+
}
|
|
32
|
+
_updateModelValues() {
|
|
33
|
+
const {
|
|
34
|
+
modelIds,
|
|
35
|
+
modelLabels,
|
|
36
|
+
modelDescriptions
|
|
37
|
+
} = this._arrays;
|
|
38
|
+
const {
|
|
39
|
+
configKey,
|
|
40
|
+
configSectionId,
|
|
41
|
+
logPrefix,
|
|
42
|
+
filter
|
|
43
|
+
} = this._options;
|
|
44
|
+
try {
|
|
45
|
+
modelIds.length = 0;
|
|
46
|
+
modelLabels.length = 0;
|
|
47
|
+
modelDescriptions.length = 0;
|
|
48
|
+
modelIds.push("");
|
|
49
|
+
modelLabels.push(( localize(6168, "Auto (Vendor Default)")));
|
|
50
|
+
modelDescriptions.push(( localize(6169, "Use the vendor's default model")));
|
|
51
|
+
const models = [];
|
|
52
|
+
const allModelIds = this._languageModelsService.getLanguageModelIds();
|
|
53
|
+
for (const modelId of allModelIds) {
|
|
54
|
+
try {
|
|
55
|
+
const metadata = this._languageModelsService.lookupLanguageModel(modelId);
|
|
56
|
+
if (metadata) {
|
|
57
|
+
models.push({
|
|
58
|
+
identifier: modelId,
|
|
59
|
+
metadata
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
this._logService.warn(`${logPrefix} No metadata found for model ID: ${modelId}`);
|
|
63
|
+
}
|
|
64
|
+
} catch (e) {
|
|
65
|
+
this._logService.error(`${logPrefix} Error looking up model ${modelId}:`, e);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const supportedModels = models.filter(model => {
|
|
69
|
+
if (!model.metadata?.isUserSelectable) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (filter && !filter(model.metadata)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
});
|
|
77
|
+
supportedModels.sort((a, b) => {
|
|
78
|
+
const aCategory = a.metadata.modelPickerCategory ?? DEFAULT_MODEL_PICKER_CATEGORY;
|
|
79
|
+
const bCategory = b.metadata.modelPickerCategory ?? DEFAULT_MODEL_PICKER_CATEGORY;
|
|
80
|
+
if (aCategory.order !== bCategory.order) {
|
|
81
|
+
return aCategory.order - bCategory.order;
|
|
82
|
+
}
|
|
83
|
+
return a.metadata.name.localeCompare(b.metadata.name);
|
|
84
|
+
});
|
|
85
|
+
for (const model of supportedModels) {
|
|
86
|
+
try {
|
|
87
|
+
const qualifiedName = ILanguageModelChatMetadata.asQualifiedName(model.metadata);
|
|
88
|
+
modelIds.push(qualifiedName);
|
|
89
|
+
modelLabels.push(model.metadata.name);
|
|
90
|
+
modelDescriptions.push(model.metadata.tooltip ?? model.metadata.detail ?? "");
|
|
91
|
+
} catch (e) {
|
|
92
|
+
this._logService.error(`${logPrefix} Error adding model ${model.metadata.name}:`, e);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (configSectionId) {
|
|
96
|
+
configurationRegistry.notifyConfigurationSchemaUpdated({
|
|
97
|
+
id: configSectionId,
|
|
98
|
+
properties: {
|
|
99
|
+
[configKey]: {}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
} catch (e) {
|
|
104
|
+
this._logService.error(`${logPrefix} Error updating model values:`, e);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
DefaultModelContribution = ( __decorate([( __param(2, ILanguageModelsService)), ( __param(3, ILogService))], DefaultModelContribution));
|
|
109
|
+
|
|
110
|
+
export { DefaultModelContribution, createDefaultModelArrays };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
2
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
3
|
+
import { DefaultModelContribution } from "./defaultModelContribution.js";
|
|
4
|
+
export declare class ExploreAgentDefaultModel extends DefaultModelContribution {
|
|
5
|
+
static readonly ID = "workbench.contrib.exploreAgentDefaultModel";
|
|
6
|
+
static readonly modelIds: string[];
|
|
7
|
+
static readonly modelLabels: string[];
|
|
8
|
+
static readonly modelDescriptions: string[];
|
|
9
|
+
constructor(languageModelsService: ILanguageModelsService, logService: ILogService);
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
4
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
5
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
6
|
+
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
7
|
+
import { createDefaultModelArrays, DefaultModelContribution } from './defaultModelContribution.js';
|
|
8
|
+
|
|
9
|
+
const arrays = createDefaultModelArrays();
|
|
10
|
+
let ExploreAgentDefaultModel = class ExploreAgentDefaultModel extends DefaultModelContribution {
|
|
11
|
+
static {
|
|
12
|
+
this.ID = "workbench.contrib.exploreAgentDefaultModel";
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.modelIds = arrays.modelIds;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.modelLabels = arrays.modelLabels;
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.modelDescriptions = arrays.modelDescriptions;
|
|
22
|
+
}
|
|
23
|
+
constructor(languageModelsService, logService) {
|
|
24
|
+
super(arrays, {
|
|
25
|
+
configKey: ChatConfiguration.ExploreAgentDefaultModel,
|
|
26
|
+
configSectionId: "chatSidebar",
|
|
27
|
+
logPrefix: "[ExploreAgentDefaultModel]",
|
|
28
|
+
filter: metadata => !!metadata.capabilities?.toolCalling
|
|
29
|
+
}, languageModelsService, logService);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
ExploreAgentDefaultModel = ( __decorate([( __param(0, ILanguageModelsService)), ( __param(1, ILogService))], ExploreAgentDefaultModel));
|
|
33
|
+
registerWorkbenchContribution2(
|
|
34
|
+
ExploreAgentDefaultModel.ID,
|
|
35
|
+
ExploreAgentDefaultModel,
|
|
36
|
+
WorkbenchPhase.BlockRestore
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export { ExploreAgentDefaultModel };
|
package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Mutable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/type
|
|
|
4
4
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
5
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
6
6
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
7
|
-
import {
|
|
7
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
8
8
|
import { ITextEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textEditorService.service";
|
|
9
9
|
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
10
10
|
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
@@ -19,7 +19,7 @@ export declare class LanguageModelsConfigurationService extends Disposable imple
|
|
|
19
19
|
private readonly fileService;
|
|
20
20
|
private readonly textFileService;
|
|
21
21
|
private readonly textModelService;
|
|
22
|
-
private readonly
|
|
22
|
+
private readonly editorService;
|
|
23
23
|
private readonly textEditorService;
|
|
24
24
|
_serviceBrand: undefined;
|
|
25
25
|
private readonly modelsConfigurationFile;
|
|
@@ -27,7 +27,7 @@ export declare class LanguageModelsConfigurationService extends Disposable imple
|
|
|
27
27
|
private readonly _onDidChangeLanguageModelGroups;
|
|
28
28
|
readonly onDidChangeLanguageModelGroups: Event<readonly ILanguageModelsProviderGroup[]>;
|
|
29
29
|
private languageModelsProviderGroups;
|
|
30
|
-
constructor(fileService: IFileService, textFileService: ITextFileService, textModelService: ITextModelService,
|
|
30
|
+
constructor(fileService: IFileService, textFileService: ITextFileService, textModelService: ITextModelService, editorService: IEditorService, textEditorService: ITextEditorService, userDataProfileService: IUserDataProfileService, uriIdentityService: IUriIdentityService);
|
|
31
31
|
private setLanguageModelsConfiguration;
|
|
32
32
|
private updateLanguageModelsConfiguration;
|
|
33
33
|
getLanguageModelsProviderGroups(): readonly ILanguageModelsProviderGroup[];
|
|
@@ -5,7 +5,7 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
|
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
7
7
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
8
|
-
import {
|
|
8
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
9
9
|
import { ITextEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textEditorService.service';
|
|
10
10
|
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
11
11
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
@@ -27,7 +27,7 @@ let LanguageModelsConfigurationService = class LanguageModelsConfigurationServic
|
|
|
27
27
|
fileService,
|
|
28
28
|
textFileService,
|
|
29
29
|
textModelService,
|
|
30
|
-
|
|
30
|
+
editorService,
|
|
31
31
|
textEditorService,
|
|
32
32
|
userDataProfileService,
|
|
33
33
|
uriIdentityService
|
|
@@ -36,9 +36,9 @@ let LanguageModelsConfigurationService = class LanguageModelsConfigurationServic
|
|
|
36
36
|
this.fileService = fileService;
|
|
37
37
|
this.textFileService = textFileService;
|
|
38
38
|
this.textModelService = textModelService;
|
|
39
|
-
this.
|
|
39
|
+
this.editorService = editorService;
|
|
40
40
|
this.textEditorService = textEditorService;
|
|
41
|
-
this._onDidChangeLanguageModelGroups = ( new Emitter());
|
|
41
|
+
this._onDidChangeLanguageModelGroups = this._register(( new Emitter()));
|
|
42
42
|
this.onDidChangeLanguageModelGroups = this._onDidChangeLanguageModelGroups.event;
|
|
43
43
|
this.languageModelsProviderGroups = [];
|
|
44
44
|
this.modelsConfigurationFile = uriIdentityService.extUri.joinPath(userDataProfileService.currentProfile.location, "chatLanguageModels.json");
|
|
@@ -136,7 +136,7 @@ let LanguageModelsConfigurationService = class LanguageModelsConfigurationServic
|
|
|
136
136
|
await this.updateLanguageModelsConfiguration();
|
|
137
137
|
}
|
|
138
138
|
async configureLanguageModels(options) {
|
|
139
|
-
const editor = await this.
|
|
139
|
+
const editor = await this.editorService.openEditor(this.textEditorService.createTextEditor({
|
|
140
140
|
resource: this.modelsConfigurationFile
|
|
141
141
|
}));
|
|
142
142
|
if (!editor || !options?.group) {
|
|
@@ -201,7 +201,7 @@ let LanguageModelsConfigurationService = class LanguageModelsConfigurationServic
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
LanguageModelsConfigurationService = ( __decorate([( __param(0, IFileService)), ( __param(1, ITextFileService)), ( __param(2, ITextModelService)), ( __param(3,
|
|
204
|
+
LanguageModelsConfigurationService = ( __decorate([( __param(0, IFileService)), ( __param(1, ITextFileService)), ( __param(2, ITextModelService)), ( __param(3, IEditorService)), ( __param(4, ITextEditorService)), ( __param(5, IUserDataProfileService)), ( __param(6, IUriIdentityService))], LanguageModelsConfigurationService));
|
|
205
205
|
function parseLanguageModelsProviderGroups(model) {
|
|
206
206
|
const configuration = [];
|
|
207
207
|
let currentProperty = null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
2
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
3
|
+
import { DefaultModelContribution } from "./defaultModelContribution.js";
|
|
4
|
+
export declare class PlanAgentDefaultModel extends DefaultModelContribution {
|
|
5
|
+
static readonly ID = "workbench.contrib.planAgentDefaultModel";
|
|
6
|
+
static readonly modelIds: string[];
|
|
7
|
+
static readonly modelLabels: string[];
|
|
8
|
+
static readonly modelDescriptions: string[];
|
|
9
|
+
constructor(languageModelsService: ILanguageModelsService, logService: ILogService);
|
|
10
|
+
}
|