@codingame/monaco-vscode-chat-service-override 23.2.2 → 24.1.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 +13 -10
- package/package.json +5 -41
- package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +52 -0
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +61 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +37 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +6 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +44 -208
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +23 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +358 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +222 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +241 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +11 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +67 -230
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +65 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +186 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +115 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +389 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +63 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +173 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +66 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +32 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +8 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +15 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +66 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +30 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +20 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +47 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +270 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +310 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +35 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +22 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +80 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +2 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +48 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +16 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +257 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSetup.d.ts → chatSetup/chatSetupContributions.d.ts} +4 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +359 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +667 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +260 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/chatSetup.css +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.js → chatStatus/chatStatusDashboard.js} +193 -325
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.d.ts → chatStatus/chatStatusEntry.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.d.ts → chatStatus/chatStatusItemService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatStatus/media}/chatStatus.css +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.js +108 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +57 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +478 -146
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.js +187 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +108 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +37 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +37 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +232 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatusWidget.css +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +19 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.js +100 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +41 -15
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +208 -162
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +15 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +61 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +60 -43
- 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.js +27 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +37 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +120 -87
- 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 +49 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +293 -187
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +43 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +48 -29
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +36 -41
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +142 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +3 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +78 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +26 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +23 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +26 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +32 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +15 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +38 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +32 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +5 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +128 -62
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +68 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +20 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +13 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +20 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +72 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +0 -154
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +0 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +0 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +0 -1617
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +0 -313
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-dark.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-light.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/github.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/google.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.js → chatStatus/chatStatusItemService.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
7
|
+
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
8
|
+
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
9
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
10
|
+
import { IActivityService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service";
|
|
11
|
+
import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
12
|
+
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
13
|
+
import { IExtensionsWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service";
|
|
14
|
+
import { ChatEntitlementContext, ChatEntitlementRequests } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService";
|
|
15
|
+
import { ChatSetupAnonymous, ChatSetupStep, ChatSetupResultValue } from "./chatSetup.js";
|
|
16
|
+
export interface IChatSetupControllerOptions {
|
|
17
|
+
readonly forceSignIn?: boolean;
|
|
18
|
+
readonly useSocialProvider?: string;
|
|
19
|
+
readonly useEnterpriseProvider?: boolean;
|
|
20
|
+
readonly additionalScopes?: readonly string[];
|
|
21
|
+
readonly forceAnonymous?: ChatSetupAnonymous;
|
|
22
|
+
}
|
|
23
|
+
export declare class ChatSetupController extends Disposable {
|
|
24
|
+
private readonly context;
|
|
25
|
+
private readonly requests;
|
|
26
|
+
private readonly telemetryService;
|
|
27
|
+
private readonly authenticationService;
|
|
28
|
+
private readonly extensionsWorkbenchService;
|
|
29
|
+
private readonly productService;
|
|
30
|
+
private readonly logService;
|
|
31
|
+
private readonly progressService;
|
|
32
|
+
private readonly activityService;
|
|
33
|
+
private readonly commandService;
|
|
34
|
+
private readonly dialogService;
|
|
35
|
+
private readonly configurationService;
|
|
36
|
+
private readonly lifecycleService;
|
|
37
|
+
private readonly quickInputService;
|
|
38
|
+
private readonly _onDidChange;
|
|
39
|
+
readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
40
|
+
private _step;
|
|
41
|
+
get step(): ChatSetupStep;
|
|
42
|
+
constructor(context: ChatEntitlementContext, requests: ChatEntitlementRequests, telemetryService: ITelemetryService, authenticationService: IAuthenticationService, extensionsWorkbenchService: IExtensionsWorkbenchService, productService: IProductService, logService: ILogService, progressService: IProgressService, activityService: IActivityService, commandService: ICommandService, dialogService: IDialogService, configurationService: IConfigurationService, lifecycleService: ILifecycleService, quickInputService: IQuickInputService);
|
|
43
|
+
private registerListeners;
|
|
44
|
+
private setStep;
|
|
45
|
+
setup(options?: IChatSetupControllerOptions): Promise<ChatSetupResultValue>;
|
|
46
|
+
private doSetup;
|
|
47
|
+
private signIn;
|
|
48
|
+
private install;
|
|
49
|
+
private doInstallWithRetry;
|
|
50
|
+
private doInstall;
|
|
51
|
+
setupWithProvider(options: IChatSetupControllerOptions): Promise<ChatSetupResultValue>;
|
|
52
|
+
private handleEnterpriseInstance;
|
|
53
|
+
}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
4
|
+
import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
8
|
+
import { StopWatch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stopwatch';
|
|
9
|
+
import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
12
|
+
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
13
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
14
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
15
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
16
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
|
+
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
18
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
19
|
+
import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
20
|
+
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
21
|
+
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
22
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
23
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
24
|
+
import { ProgressBadge } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity';
|
|
25
|
+
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
26
|
+
import { IAuthenticationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
27
|
+
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
28
|
+
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
29
|
+
import { ChatEntitlementRequests, ChatEntitlement, isProUser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
|
|
30
|
+
import { CHAT_OPEN_ACTION_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
31
|
+
import { ChatViewContainerId, ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
32
|
+
import { ChatSetupStep, refreshTokens } from './chatSetup.js';
|
|
33
|
+
|
|
34
|
+
const defaultChat = {
|
|
35
|
+
chatExtensionId: product.defaultChatAgent?.chatExtensionId ?? '',
|
|
36
|
+
provider: product.defaultChatAgent?.provider ?? { default: { id: '', name: '' }, enterprise: { id: '', name: '' }, apple: { id: '', name: '' }, google: { id: '', name: '' } },
|
|
37
|
+
providerUriSetting: product.defaultChatAgent?.providerUriSetting ?? '',
|
|
38
|
+
completionsAdvancedSetting: product.defaultChatAgent?.completionsAdvancedSetting ?? '',
|
|
39
|
+
};
|
|
40
|
+
let ChatSetupController = class ChatSetupController extends Disposable {
|
|
41
|
+
get step() { return this._step; }
|
|
42
|
+
constructor(context, requests, telemetryService, authenticationService, extensionsWorkbenchService, productService, logService, progressService, activityService, commandService, dialogService, configurationService, lifecycleService, quickInputService) {
|
|
43
|
+
super();
|
|
44
|
+
this.context = context;
|
|
45
|
+
this.requests = requests;
|
|
46
|
+
this.telemetryService = telemetryService;
|
|
47
|
+
this.authenticationService = authenticationService;
|
|
48
|
+
this.extensionsWorkbenchService = extensionsWorkbenchService;
|
|
49
|
+
this.productService = productService;
|
|
50
|
+
this.logService = logService;
|
|
51
|
+
this.progressService = progressService;
|
|
52
|
+
this.activityService = activityService;
|
|
53
|
+
this.commandService = commandService;
|
|
54
|
+
this.dialogService = dialogService;
|
|
55
|
+
this.configurationService = configurationService;
|
|
56
|
+
this.lifecycleService = lifecycleService;
|
|
57
|
+
this.quickInputService = quickInputService;
|
|
58
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
59
|
+
this.onDidChange = this._onDidChange.event;
|
|
60
|
+
this._step = ChatSetupStep.Initial;
|
|
61
|
+
this.registerListeners();
|
|
62
|
+
}
|
|
63
|
+
registerListeners() {
|
|
64
|
+
this._register(this.context.onDidChange(() => this._onDidChange.fire()));
|
|
65
|
+
}
|
|
66
|
+
setStep(step) {
|
|
67
|
+
if (this._step === step) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this._step = step;
|
|
71
|
+
this._onDidChange.fire();
|
|
72
|
+
}
|
|
73
|
+
async setup(options = {}) {
|
|
74
|
+
const watch = ( new StopWatch(false));
|
|
75
|
+
const title = ( localize(5536, "Getting chat ready..."));
|
|
76
|
+
const badge = this.activityService.showViewContainerActivity(ChatViewContainerId, {
|
|
77
|
+
badge: ( new ProgressBadge(() => title)),
|
|
78
|
+
});
|
|
79
|
+
try {
|
|
80
|
+
return await this.progressService.withProgress({
|
|
81
|
+
location: ProgressLocation.Window,
|
|
82
|
+
command: CHAT_OPEN_ACTION_ID,
|
|
83
|
+
title,
|
|
84
|
+
}, () => this.doSetup(options, watch));
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
badge.dispose();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async doSetup(options, watch) {
|
|
91
|
+
this.context.suspend();
|
|
92
|
+
let success = false;
|
|
93
|
+
try {
|
|
94
|
+
const providerId = ChatEntitlementRequests.providerId(this.configurationService);
|
|
95
|
+
let session;
|
|
96
|
+
let entitlement;
|
|
97
|
+
let signIn;
|
|
98
|
+
if (options.forceSignIn) {
|
|
99
|
+
signIn = true;
|
|
100
|
+
}
|
|
101
|
+
else if (this.context.state.entitlement === ChatEntitlement.Unknown) {
|
|
102
|
+
if (options.forceAnonymous) {
|
|
103
|
+
signIn = false;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
signIn = true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
signIn = false;
|
|
111
|
+
}
|
|
112
|
+
if (signIn) {
|
|
113
|
+
this.setStep(ChatSetupStep.SigningIn);
|
|
114
|
+
const result = await this.signIn(options);
|
|
115
|
+
if (!result.session) {
|
|
116
|
+
this.doInstall();
|
|
117
|
+
const provider = options.useSocialProvider ?? (options.useEnterpriseProvider ? defaultChat.provider.enterprise.id : defaultChat.provider.default.id);
|
|
118
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: 'failedNotSignedIn', installDuration: watch.elapsed(), signUpErrorCode: undefined, provider });
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
session = result.session;
|
|
122
|
+
entitlement = result.entitlement;
|
|
123
|
+
}
|
|
124
|
+
this.setStep(ChatSetupStep.Installing);
|
|
125
|
+
success = await this.install(session, entitlement ?? this.context.state.entitlement, providerId, watch, options);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
this.setStep(ChatSetupStep.Initial);
|
|
129
|
+
this.context.resume();
|
|
130
|
+
}
|
|
131
|
+
return success;
|
|
132
|
+
}
|
|
133
|
+
async signIn(options) {
|
|
134
|
+
let session;
|
|
135
|
+
let entitlements;
|
|
136
|
+
try {
|
|
137
|
+
({ session, entitlements } = await this.requests.signIn(options));
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
this.logService.error(`[chat setup] signIn: error ${e}`);
|
|
141
|
+
}
|
|
142
|
+
if (!session && !this.lifecycleService.willShutdown) {
|
|
143
|
+
const { confirmed } = await this.dialogService.confirm({
|
|
144
|
+
type: Severity.Error,
|
|
145
|
+
message: ( localize(
|
|
146
|
+
5537,
|
|
147
|
+
"Failed to sign in to {0}. Would you like to try again?",
|
|
148
|
+
ChatEntitlementRequests.providerId(this.configurationService) === defaultChat.provider.enterprise.id ? defaultChat.provider.enterprise.name : defaultChat.provider.default.name
|
|
149
|
+
)),
|
|
150
|
+
detail: ( localize(5538, "You must be signed in to use AI features.")),
|
|
151
|
+
primaryButton: ( localize(5539, "Retry"))
|
|
152
|
+
});
|
|
153
|
+
if (confirmed) {
|
|
154
|
+
return this.signIn(options);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return { session, entitlement: entitlements?.entitlement };
|
|
158
|
+
}
|
|
159
|
+
async install(session, entitlement, providerId, watch, options) {
|
|
160
|
+
const wasRunning = this.context.state.installed && !this.context.state.disabled;
|
|
161
|
+
let signUpResult = undefined;
|
|
162
|
+
let provider;
|
|
163
|
+
if (options.forceAnonymous && entitlement === ChatEntitlement.Unknown) {
|
|
164
|
+
provider = 'anonymous';
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
provider = options.useSocialProvider ?? (options.useEnterpriseProvider ? defaultChat.provider.enterprise.id : defaultChat.provider.default.id);
|
|
168
|
+
}
|
|
169
|
+
let sessions = session ? [session] : undefined;
|
|
170
|
+
try {
|
|
171
|
+
if (!options.forceAnonymous &&
|
|
172
|
+
entitlement !== ChatEntitlement.Free &&
|
|
173
|
+
!isProUser(entitlement) &&
|
|
174
|
+
entitlement !== ChatEntitlement.Unavailable
|
|
175
|
+
) {
|
|
176
|
+
if (!sessions) {
|
|
177
|
+
try {
|
|
178
|
+
const existingSessions = await this.authenticationService.getSessions(providerId);
|
|
179
|
+
sessions = existingSessions.length > 0 ? [...existingSessions] : undefined;
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
}
|
|
183
|
+
if (!sessions || sessions.length === 0) {
|
|
184
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: 'failedNoSession', installDuration: watch.elapsed(), signUpErrorCode: undefined, provider });
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
signUpResult = await this.requests.signUpFree(sessions);
|
|
189
|
+
if (typeof signUpResult !== 'boolean' ) {
|
|
190
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: 'failedSignUp', installDuration: watch.elapsed(), signUpErrorCode: signUpResult.errorCode, provider });
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
await this.doInstallWithRetry();
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
this.logService.error(`[chat setup] install: error ${error}`);
|
|
197
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: isCancellationError(error) ? 'cancelled' : 'failedInstall', installDuration: watch.elapsed(), signUpErrorCode: undefined, provider });
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
if (typeof signUpResult === 'boolean' || typeof signUpResult === 'undefined' ) {
|
|
201
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: wasRunning && !signUpResult ? 'alreadyInstalled' : 'installed', installDuration: watch.elapsed(), signUpErrorCode: undefined, provider });
|
|
202
|
+
}
|
|
203
|
+
if (wasRunning) {
|
|
204
|
+
refreshTokens(this.commandService);
|
|
205
|
+
}
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
async doInstallWithRetry() {
|
|
209
|
+
let error;
|
|
210
|
+
try {
|
|
211
|
+
await this.doInstall();
|
|
212
|
+
}
|
|
213
|
+
catch (e) {
|
|
214
|
+
this.logService.error(`[chat setup] install: error ${error}`);
|
|
215
|
+
error = e;
|
|
216
|
+
}
|
|
217
|
+
if (error) {
|
|
218
|
+
if (!this.lifecycleService.willShutdown) {
|
|
219
|
+
const { confirmed } = await this.dialogService.confirm({
|
|
220
|
+
type: Severity.Error,
|
|
221
|
+
message: ( localize(
|
|
222
|
+
5540,
|
|
223
|
+
"An error occurred while setting up chat. Would you like to try again?"
|
|
224
|
+
)),
|
|
225
|
+
detail: error && !isCancellationError(error) ? toErrorMessage(error) : undefined,
|
|
226
|
+
primaryButton: ( localize(5539, "Retry"))
|
|
227
|
+
});
|
|
228
|
+
if (confirmed) {
|
|
229
|
+
return this.doInstallWithRetry();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async doInstall() {
|
|
236
|
+
await this.extensionsWorkbenchService.install(defaultChat.chatExtensionId, {
|
|
237
|
+
enable: true,
|
|
238
|
+
isApplicationScoped: true,
|
|
239
|
+
isMachineScoped: false,
|
|
240
|
+
installEverywhere: true,
|
|
241
|
+
installPreReleaseVersion: this.productService.quality !== 'stable'
|
|
242
|
+
}, ChatViewId);
|
|
243
|
+
}
|
|
244
|
+
async setupWithProvider(options) {
|
|
245
|
+
const registry = ( Registry.as(Extensions.Configuration));
|
|
246
|
+
registry.registerConfiguration({
|
|
247
|
+
'id': 'copilot.setup',
|
|
248
|
+
'type': 'object',
|
|
249
|
+
'properties': {
|
|
250
|
+
[defaultChat.completionsAdvancedSetting]: {
|
|
251
|
+
'type': 'object',
|
|
252
|
+
'properties': {
|
|
253
|
+
'authProvider': {
|
|
254
|
+
'type': 'string'
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
[defaultChat.providerUriSetting]: {
|
|
259
|
+
'type': 'string'
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
if (options.useEnterpriseProvider) {
|
|
264
|
+
const success = await this.handleEnterpriseInstance();
|
|
265
|
+
if (!success) {
|
|
266
|
+
this.telemetryService.publicLog2('commandCenter.chatInstall', { installResult: 'failedEnterpriseSetup', installDuration: 0, signUpErrorCode: undefined, provider: undefined });
|
|
267
|
+
return success;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
let existingAdvancedSetting = this.configurationService.inspect(defaultChat.completionsAdvancedSetting).user?.value;
|
|
271
|
+
if (!isObject(existingAdvancedSetting)) {
|
|
272
|
+
existingAdvancedSetting = {};
|
|
273
|
+
}
|
|
274
|
+
if (options.useEnterpriseProvider) {
|
|
275
|
+
await this.configurationService.updateValue(`${defaultChat.completionsAdvancedSetting}`, {
|
|
276
|
+
...existingAdvancedSetting,
|
|
277
|
+
'authProvider': defaultChat.provider.enterprise.id
|
|
278
|
+
}, ConfigurationTarget.USER);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
await this.configurationService.updateValue(`${defaultChat.completionsAdvancedSetting}`, ( Object.keys(existingAdvancedSetting)).length > 0 ? {
|
|
282
|
+
...existingAdvancedSetting,
|
|
283
|
+
'authProvider': undefined
|
|
284
|
+
} : undefined, ConfigurationTarget.USER);
|
|
285
|
+
}
|
|
286
|
+
return this.setup({ ...options, forceSignIn: true });
|
|
287
|
+
}
|
|
288
|
+
async handleEnterpriseInstance() {
|
|
289
|
+
const domainRegEx = /^[a-zA-Z\-_]+$/;
|
|
290
|
+
const fullUriRegEx = /^(https:\/\/)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.ghe\.com\/?$/;
|
|
291
|
+
const uri = this.configurationService.getValue(defaultChat.providerUriSetting);
|
|
292
|
+
if (typeof uri === 'string' && fullUriRegEx.test(uri)) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
let isSingleWord = false;
|
|
296
|
+
const result = await this.quickInputService.input({
|
|
297
|
+
prompt: ( localize(5541, "What is your {0} instance?", defaultChat.provider.enterprise.name)),
|
|
298
|
+
placeHolder: ( localize(5542, 'i.e. "octocat" or "https://octocat.ghe.com"...')),
|
|
299
|
+
ignoreFocusLost: true,
|
|
300
|
+
value: uri,
|
|
301
|
+
validateInput: async (value) => {
|
|
302
|
+
isSingleWord = false;
|
|
303
|
+
if (!value) {
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
if (domainRegEx.test(value)) {
|
|
307
|
+
isSingleWord = true;
|
|
308
|
+
return {
|
|
309
|
+
content: ( localize(5543, "Will resolve to {0}", `https://${value}.ghe.com`)),
|
|
310
|
+
severity: Severity.Info
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
if (!fullUriRegEx.test(value)) {
|
|
314
|
+
return {
|
|
315
|
+
content: ( localize(
|
|
316
|
+
5544,
|
|
317
|
+
'You must enter a valid {0} instance (i.e. "octocat" or "https://octocat.ghe.com")',
|
|
318
|
+
defaultChat.provider.enterprise.name
|
|
319
|
+
)),
|
|
320
|
+
severity: Severity.Error
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
return undefined;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
if (!result) {
|
|
327
|
+
return undefined;
|
|
328
|
+
}
|
|
329
|
+
let resolvedUri = result;
|
|
330
|
+
if (isSingleWord) {
|
|
331
|
+
resolvedUri = `https://${resolvedUri}.ghe.com`;
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
const normalizedUri = result.toLowerCase();
|
|
335
|
+
const hasHttps = normalizedUri.startsWith('https://');
|
|
336
|
+
if (!hasHttps) {
|
|
337
|
+
resolvedUri = `https://${result}`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
await this.configurationService.updateValue(defaultChat.providerUriSetting, resolvedUri, ConfigurationTarget.USER);
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
ChatSetupController = ( __decorate([
|
|
345
|
+
( __param(2, ITelemetryService)),
|
|
346
|
+
( __param(3, IAuthenticationService)),
|
|
347
|
+
( __param(4, IExtensionsWorkbenchService)),
|
|
348
|
+
( __param(5, IProductService)),
|
|
349
|
+
( __param(6, ILogService)),
|
|
350
|
+
( __param(7, IProgressService)),
|
|
351
|
+
( __param(8, IActivityService)),
|
|
352
|
+
( __param(9, ICommandService)),
|
|
353
|
+
( __param(10, IDialogService)),
|
|
354
|
+
( __param(11, IConfigurationService)),
|
|
355
|
+
( __param(12, ILifecycleService)),
|
|
356
|
+
( __param(13, IQuickInputService))
|
|
357
|
+
], ChatSetupController));
|
|
358
|
+
|
|
359
|
+
export { ChatSetupController };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { Lazy } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lazy";
|
|
4
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
5
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
9
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
10
|
+
import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
|
|
11
|
+
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
12
|
+
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
|
|
13
|
+
import { IChatAgentImplementation, IChatAgentRequest, IChatAgentResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
14
|
+
import { ChatEntitlementContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService";
|
|
15
|
+
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
16
|
+
import { IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
17
|
+
import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
18
|
+
import { CodeActionList, Command, NewSymbolName, NewSymbolNameTriggerKind } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
19
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
20
|
+
import { IRange, Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
21
|
+
import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
22
|
+
import { IMarker } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers";
|
|
23
|
+
import { IMarkerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service";
|
|
24
|
+
import { ChatSetupController } from "./chatSetupController.js";
|
|
25
|
+
export declare class SetupAgent extends Disposable implements IChatAgentImplementation {
|
|
26
|
+
private readonly context;
|
|
27
|
+
private readonly controller;
|
|
28
|
+
private readonly location;
|
|
29
|
+
private readonly instantiationService;
|
|
30
|
+
private readonly logService;
|
|
31
|
+
private readonly configurationService;
|
|
32
|
+
private readonly telemetryService;
|
|
33
|
+
private readonly environmentService;
|
|
34
|
+
private readonly workspaceTrustManagementService;
|
|
35
|
+
private readonly chatEntitlementService;
|
|
36
|
+
static registerDefaultAgents(instantiationService: IInstantiationService, location: ChatAgentLocation, mode: ChatModeKind | undefined, context: ChatEntitlementContext, controller: Lazy<ChatSetupController>): {
|
|
37
|
+
agent: SetupAgent;
|
|
38
|
+
disposable: IDisposable;
|
|
39
|
+
};
|
|
40
|
+
static registerBuiltInAgents(instantiationService: IInstantiationService, context: ChatEntitlementContext, controller: Lazy<ChatSetupController>): IDisposable;
|
|
41
|
+
private static doRegisterAgent;
|
|
42
|
+
private static readonly SETUP_NEEDED_MESSAGE;
|
|
43
|
+
private static readonly TRUST_NEEDED_MESSAGE;
|
|
44
|
+
private readonly _onUnresolvableError;
|
|
45
|
+
readonly onUnresolvableError: Event<void>;
|
|
46
|
+
private readonly pendingForwardedRequests;
|
|
47
|
+
constructor(context: ChatEntitlementContext, controller: Lazy<ChatSetupController>, location: ChatAgentLocation, instantiationService: IInstantiationService, logService: ILogService, configurationService: IConfigurationService, telemetryService: ITelemetryService, environmentService: IWorkbenchEnvironmentService, workspaceTrustManagementService: IWorkspaceTrustManagementService, chatEntitlementService: IChatEntitlementService);
|
|
48
|
+
invoke(request: IChatAgentRequest, progress: (parts: IChatProgress[]) => void): Promise<IChatAgentResult>;
|
|
49
|
+
private doInvoke;
|
|
50
|
+
private doInvokeWithoutSetup;
|
|
51
|
+
private forwardRequestToChat;
|
|
52
|
+
private doForwardRequestToChat;
|
|
53
|
+
private doForwardRequestToChatWhenReady;
|
|
54
|
+
private whenLanguageModelReady;
|
|
55
|
+
private whenToolsModelReady;
|
|
56
|
+
private whenAgentReady;
|
|
57
|
+
private whenAgentActivated;
|
|
58
|
+
private doInvokeWithSetup;
|
|
59
|
+
private replaceAgentInRequestModel;
|
|
60
|
+
private replaceToolInRequestModel;
|
|
61
|
+
}
|
|
62
|
+
export declare class SetupTool implements IToolImpl {
|
|
63
|
+
static registerTool(instantiationService: IInstantiationService, toolData: IToolData): IDisposable;
|
|
64
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
65
|
+
prepareToolInvocation?(parameters: unknown, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
66
|
+
}
|
|
67
|
+
export declare class AINewSymbolNamesProvider {
|
|
68
|
+
private readonly context;
|
|
69
|
+
private readonly controller;
|
|
70
|
+
private readonly instantiationService;
|
|
71
|
+
private readonly chatEntitlementService;
|
|
72
|
+
static registerProvider(instantiationService: IInstantiationService, context: ChatEntitlementContext, controller: Lazy<ChatSetupController>): IDisposable;
|
|
73
|
+
constructor(context: ChatEntitlementContext, controller: Lazy<ChatSetupController>, instantiationService: IInstantiationService, chatEntitlementService: IChatEntitlementService);
|
|
74
|
+
provideNewSymbolNames(model: ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): Promise<NewSymbolName[] | undefined>;
|
|
75
|
+
}
|
|
76
|
+
export declare class ChatCodeActionsProvider {
|
|
77
|
+
private readonly markerService;
|
|
78
|
+
static registerProvider(instantiationService: IInstantiationService): IDisposable;
|
|
79
|
+
constructor(markerService: IMarkerService);
|
|
80
|
+
provideCodeActions(model: ITextModel, range: Range | Selection): Promise<CodeActionList | undefined>;
|
|
81
|
+
}
|
|
82
|
+
export declare class AICodeActionsHelper {
|
|
83
|
+
static warningOrErrorMarkersAtRange(markerService: IMarkerService, resource: URI, range: Range | Selection): IMarker[];
|
|
84
|
+
static modify(range: Range): Command;
|
|
85
|
+
static generate(range: Range): Command;
|
|
86
|
+
private static rangeToSelection;
|
|
87
|
+
static explainMarkers(markers: IMarker[]): Command;
|
|
88
|
+
static fixMarkers(markers: IMarker[], range: Range): Command;
|
|
89
|
+
}
|