@codingame/monaco-vscode-chat-service-override 20.4.1 → 21.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 +15 -7
- package/package.json +38 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +52 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +19 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +433 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +205 -551
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +52 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +11 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +32 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +22 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +47 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +33 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.js +74 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.js +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +36 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +37 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +238 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +257 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +126 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +55 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +130 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-dark.svg +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-light.svg +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +39 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +153 -168
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +127 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +111 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.js +41 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.js +55 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.js +8 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +11 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +54 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +33 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +9 -9
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +9 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +11 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +1 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +84 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.js +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +15 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +72 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +19 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +12 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +85 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +448 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.js +30 -77
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +75 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +81 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +106 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{getTerminalOutputTool.js → tools/getTerminalOutputTool.js} +5 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +59 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +452 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{runInTerminalTool.d.ts → tools/runInTerminalTool.d.ts} +11 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{runInTerminalTool.js → tools/runInTerminalTool.js} +282 -133
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/createAndRunTaskTool.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/createAndRunTaskTool.js +51 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/getTaskOutputTool.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +117 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/runTaskTool.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/runTaskTool.js +54 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminal.chatAgentTools.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminal.chatAgentTools.js +8 -0
- package/vscode/src/vs/base/common/policy.d.ts +0 -41
- package/vscode/src/vs/base/common/policy.js +0 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.js +0 -738
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.js +0 -167
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.js +0 -63
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.d.ts +0 -55
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.js +0 -163
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/getTaskOutputTool.js +0 -88
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.js +0 -80
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task.chatAgentTools.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task.chatAgentTools.contribution.js +0 -40
- /package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{getTerminalOutputTool.d.ts → tools/getTerminalOutputTool.d.ts} +0 -0
|
@@ -33,13 +33,13 @@ import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
33
33
|
|
|
34
34
|
var QuickChat_1;
|
|
35
35
|
let QuickChatService = class QuickChatService extends Disposable {
|
|
36
|
+
get onDidClose() { return this._onDidClose.event; }
|
|
36
37
|
constructor(quickInputService, chatService, instantiationService) {
|
|
37
38
|
super();
|
|
38
39
|
this.quickInputService = quickInputService;
|
|
39
40
|
this.chatService = chatService;
|
|
40
41
|
this.instantiationService = instantiationService;
|
|
41
42
|
this._onDidClose = this._register(( new Emitter()));
|
|
42
|
-
this.onDidClose = this._onDidClose.event;
|
|
43
43
|
}
|
|
44
44
|
get enabled() {
|
|
45
45
|
return !!this.chatService.isEnabled(ChatAgentLocation.Panel);
|
|
@@ -181,7 +181,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
181
181
|
IContextKeyService,
|
|
182
182
|
this._register(this.contextKeyService.createScoped(parent))
|
|
183
183
|
]))));
|
|
184
|
-
this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Panel, { isQuickChat: true }, { autoScroll: true, renderInputOnTop: true, renderStyle: 'compact', menus: { inputSideToolbar: MenuId.ChatInputSide }, enableImplicitContext: true }, {
|
|
184
|
+
this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Panel, { isQuickChat: true }, { autoScroll: true, renderInputOnTop: true, renderStyle: 'compact', menus: { inputSideToolbar: MenuId.ChatInputSide, telemetrySource: 'chatQuick' }, enableImplicitContext: true }, {
|
|
185
185
|
listForeground: quickInputForeground,
|
|
186
186
|
listBackground: quickInputBackground,
|
|
187
187
|
overlayBackground: EDITOR_DRAG_AND_DROP_BACKGROUND,
|
|
@@ -5,7 +5,7 @@ import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/i
|
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { AccessibleViewType, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
7
7
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
8
|
-
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-
|
|
8
|
+
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/common/chat';
|
|
9
9
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
10
10
|
import { isResponseVM } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
11
11
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
@@ -4,7 +4,9 @@ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/
|
|
|
4
4
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
5
5
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
7
|
+
import { IEditableData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views";
|
|
7
8
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
9
|
+
import { IChatAgentRequest } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
8
10
|
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
9
11
|
import { ChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessionItemProvider, IChatSessionsExtensionPoint } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
10
12
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
@@ -20,30 +22,56 @@ export declare class ChatSessionsService extends Disposable implements IChatSess
|
|
|
20
22
|
readonly onDidChangeItemsProviders: Event<IChatSessionItemProvider>;
|
|
21
23
|
private readonly _contentProviders;
|
|
22
24
|
private readonly _contributions;
|
|
23
|
-
private readonly
|
|
25
|
+
private readonly _disposableStores;
|
|
24
26
|
private readonly _contextKeys;
|
|
25
27
|
private readonly _onDidChangeSessionItems;
|
|
26
28
|
readonly onDidChangeSessionItems: Event<string>;
|
|
27
29
|
private readonly _onDidChangeAvailability;
|
|
28
30
|
readonly onDidChangeAvailability: Event<void>;
|
|
31
|
+
private readonly _onDidChangeInProgress;
|
|
32
|
+
get onDidChangeInProgress(): Event<void>;
|
|
33
|
+
private readonly inProgressMap;
|
|
29
34
|
constructor(_logService: ILogService, _instantiationService: IInstantiationService, _chatAgentService: IChatAgentService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService);
|
|
30
|
-
|
|
35
|
+
reportInProgress(chatSessionType: string, count: number): void;
|
|
36
|
+
getInProgress(): {
|
|
37
|
+
displayName: string;
|
|
38
|
+
count: number;
|
|
39
|
+
}[];
|
|
40
|
+
private updateInProgressStatus;
|
|
41
|
+
private registerContribution;
|
|
31
42
|
private _isContributionAvailable;
|
|
32
|
-
private
|
|
33
|
-
private
|
|
43
|
+
private _registerMenuItems;
|
|
44
|
+
private _registerCommands;
|
|
34
45
|
private _evaluateAvailability;
|
|
46
|
+
private _enableContribution;
|
|
35
47
|
private _disposeSessionsForContribution;
|
|
36
48
|
private _registerDynamicAgent;
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
getAllChatSessionContributions(): IChatSessionsExtensionPoint[];
|
|
50
|
+
getAllChatSessionItemProviders(): IChatSessionItemProvider[];
|
|
39
51
|
canResolveItemProvider(chatViewType: string): Promise<boolean>;
|
|
40
|
-
notifySessionItemsChange(chatSessionType: string): void;
|
|
41
52
|
canResolveContentProvider(chatViewType: string): Promise<boolean>;
|
|
42
53
|
provideChatSessionItems(chatSessionType: string, token: CancellationToken): Promise<IChatSessionItem[]>;
|
|
43
54
|
registerChatSessionItemProvider(provider: IChatSessionItemProvider): IDisposable;
|
|
44
|
-
registerChatSessionContentProvider(provider: IChatSessionContentProvider): IDisposable;
|
|
55
|
+
registerChatSessionContentProvider(chatSessionType: string, provider: IChatSessionContentProvider): IDisposable;
|
|
45
56
|
private readonly _sessions;
|
|
57
|
+
private readonly _editableSessions;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new chat session by delegating to the appropriate provider
|
|
60
|
+
* @param chatSessionType The type of chat session provider to use
|
|
61
|
+
* @param options Options for the new session including the request
|
|
62
|
+
* @param token A cancellation token
|
|
63
|
+
* @returns A session ID for the newly created session
|
|
64
|
+
*/
|
|
65
|
+
provideNewChatSessionItem(chatSessionType: string, options: {
|
|
66
|
+
request: IChatAgentRequest;
|
|
67
|
+
prompt?: string;
|
|
68
|
+
history?: any[];
|
|
69
|
+
metadata?: any;
|
|
70
|
+
}, token: CancellationToken): Promise<IChatSessionItem>;
|
|
46
71
|
provideChatSessionContent(chatSessionType: string, id: string, token: CancellationToken): Promise<ChatSession>;
|
|
47
72
|
private _onWillDisposeSession;
|
|
48
|
-
|
|
73
|
+
setEditableSession(sessionId: string, data: IEditableData | null): Promise<void>;
|
|
74
|
+
getEditableData(sessionId: string): IEditableData | undefined;
|
|
75
|
+
isEditable(sessionId: string): boolean;
|
|
76
|
+
notifySessionItemsChanged(chatSessionType: string): void;
|
|
49
77
|
}
|
|
@@ -3,57 +3,84 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
4
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
5
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
-
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
6
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
8
|
-
import {
|
|
7
|
+
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { truncate } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
9
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
|
+
import { MenuRegistry, MenuId, registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
9
11
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
12
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
13
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
12
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
13
15
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
14
16
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
17
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
18
|
import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
16
19
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
17
20
|
import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
18
21
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
19
22
|
import { ChatEditorInput } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
20
23
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
24
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
21
25
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
26
|
+
import { ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
22
27
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
23
28
|
import { ChatSessionUri } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
24
29
|
import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
30
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
31
|
+
import { VIEWLET_ID } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/chatSessions';
|
|
25
32
|
|
|
26
33
|
const CODING_AGENT_DOCS = 'https://code.visualstudio.com/docs/copilot/copilot-coding-agent';
|
|
27
34
|
const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
28
35
|
extensionPoint: 'chatSessions',
|
|
29
36
|
jsonSchema: {
|
|
30
|
-
description: ( localize(
|
|
37
|
+
description: ( localize(5169, 'Contributes chat session integrations to the chat widget.')),
|
|
31
38
|
type: 'array',
|
|
32
39
|
items: {
|
|
33
40
|
type: 'object',
|
|
34
41
|
properties: {
|
|
35
42
|
type: {
|
|
36
|
-
description: ( localize(
|
|
43
|
+
description: ( localize(5170, 'Unique identifier for the type of chat session.')),
|
|
37
44
|
type: 'string',
|
|
38
45
|
},
|
|
39
46
|
name: {
|
|
40
|
-
description: ( localize(
|
|
47
|
+
description: ( localize(5171, 'Name shown in the chat widget. (eg: @agent)')),
|
|
41
48
|
type: 'string',
|
|
42
49
|
},
|
|
43
50
|
displayName: {
|
|
44
|
-
description: ( localize(
|
|
51
|
+
description: ( localize(5172, 'A longer name for this item which is used for display in menus.')),
|
|
45
52
|
type: 'string',
|
|
46
53
|
},
|
|
47
54
|
description: {
|
|
48
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(5173, 'Description of the chat session for use in menus and tooltips.')),
|
|
49
56
|
type: 'string'
|
|
50
57
|
},
|
|
51
58
|
when: {
|
|
52
|
-
description: ( localize(
|
|
59
|
+
description: ( localize(5174, 'Condition which must be true to show this item.')),
|
|
53
60
|
type: 'string'
|
|
61
|
+
},
|
|
62
|
+
capabilities: {
|
|
63
|
+
description: ( localize(5175, 'Optional capabilities for this chat session.')),
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: {
|
|
66
|
+
supportsFileAttachments: {
|
|
67
|
+
description: ( localize(
|
|
68
|
+
5176,
|
|
69
|
+
'Whether this chat session supports attaching files or file references.'
|
|
70
|
+
)),
|
|
71
|
+
type: 'boolean'
|
|
72
|
+
},
|
|
73
|
+
supportsToolAttachments: {
|
|
74
|
+
description: ( localize(
|
|
75
|
+
5177,
|
|
76
|
+
'Whether this chat session supports attaching tools or tool references.'
|
|
77
|
+
)),
|
|
78
|
+
type: 'boolean'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
54
81
|
}
|
|
55
82
|
},
|
|
56
|
-
required: ['
|
|
83
|
+
required: ['type', 'name', 'displayName', 'description'],
|
|
57
84
|
}
|
|
58
85
|
},
|
|
59
86
|
activationEventsGenerator: (contribs, results) => {
|
|
@@ -78,6 +105,7 @@ class ContributedChatSessionData {
|
|
|
78
105
|
}
|
|
79
106
|
}
|
|
80
107
|
let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
108
|
+
get onDidChangeInProgress() { return this._onDidChangeInProgress.event; }
|
|
81
109
|
constructor(_logService, _instantiationService, _chatAgentService, _extensionService, _contextKeyService) {
|
|
82
110
|
super();
|
|
83
111
|
this._logService = _logService;
|
|
@@ -90,13 +118,16 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
90
118
|
this.onDidChangeItemsProviders = this._onDidChangeItemsProviders.event;
|
|
91
119
|
this._contentProviders = ( new Map());
|
|
92
120
|
this._contributions = ( new Map());
|
|
93
|
-
this.
|
|
121
|
+
this._disposableStores = ( new Map());
|
|
94
122
|
this._contextKeys = ( new Set());
|
|
95
123
|
this._onDidChangeSessionItems = this._register(( new Emitter()));
|
|
96
124
|
this.onDidChangeSessionItems = this._onDidChangeSessionItems.event;
|
|
97
125
|
this._onDidChangeAvailability = this._register(( new Emitter()));
|
|
98
126
|
this.onDidChangeAvailability = this._onDidChangeAvailability.event;
|
|
127
|
+
this._onDidChangeInProgress = this._register(( new Emitter()));
|
|
128
|
+
this.inProgressMap = ( new Map());
|
|
99
129
|
this._sessions = ( new Map());
|
|
130
|
+
this._editableSessions = ( new Map());
|
|
100
131
|
this._register(extensionPoint.setHandler(extensions => {
|
|
101
132
|
for (const ext of extensions) {
|
|
102
133
|
if (!isProposedApiEnabled(ext.description, 'chatSessionsProvider')) {
|
|
@@ -107,15 +138,14 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
107
138
|
}
|
|
108
139
|
for (const contribution of ext.value) {
|
|
109
140
|
const c = {
|
|
110
|
-
id: contribution.id,
|
|
111
141
|
type: contribution.type,
|
|
112
142
|
name: contribution.name,
|
|
113
143
|
displayName: contribution.displayName,
|
|
114
144
|
description: contribution.description,
|
|
115
145
|
when: contribution.when,
|
|
146
|
+
capabilities: contribution.capabilities,
|
|
116
147
|
extensionDescription: ext.description,
|
|
117
148
|
};
|
|
118
|
-
this._logService.info(`Registering chat session from extension contribution: ${c.displayName} (id='${c.type}' name='${c.name}')`);
|
|
119
149
|
this._register(this.registerContribution(c));
|
|
120
150
|
}
|
|
121
151
|
}
|
|
@@ -123,6 +153,37 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
123
153
|
this._register(Event.filter(this._contextKeyService.onDidChangeContext, e => e.affectsSome(this._contextKeys))(() => {
|
|
124
154
|
this._evaluateAvailability();
|
|
125
155
|
}));
|
|
156
|
+
this._register(this.onDidChangeSessionItems(chatSessionType => {
|
|
157
|
+
this.updateInProgressStatus(chatSessionType).catch(error => {
|
|
158
|
+
this._logService.warn(`Failed to update progress status for '${chatSessionType}':`, error);
|
|
159
|
+
});
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
reportInProgress(chatSessionType, count) {
|
|
163
|
+
let displayName;
|
|
164
|
+
if (chatSessionType === 'local') {
|
|
165
|
+
displayName = 'Local Chat Sessions';
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
displayName = this._contributions.get(chatSessionType)?.displayName;
|
|
169
|
+
}
|
|
170
|
+
if (displayName) {
|
|
171
|
+
this.inProgressMap.set(displayName, count);
|
|
172
|
+
}
|
|
173
|
+
this._onDidChangeInProgress.fire();
|
|
174
|
+
}
|
|
175
|
+
getInProgress() {
|
|
176
|
+
return ( Array.from(this.inProgressMap.entries()).map(([displayName, count]) => ({ displayName, count })));
|
|
177
|
+
}
|
|
178
|
+
async updateInProgressStatus(chatSessionType) {
|
|
179
|
+
try {
|
|
180
|
+
const items = await this.provideChatSessionItems(chatSessionType, CancellationToken.None);
|
|
181
|
+
const inProgress = items.filter(item => item.status === ChatSessionStatus.InProgress);
|
|
182
|
+
this.reportInProgress(chatSessionType, inProgress.length);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
this._logService.warn(`Failed to update in-progress status for chat session type '${chatSessionType}':`, error);
|
|
186
|
+
}
|
|
126
187
|
}
|
|
127
188
|
registerContribution(contribution) {
|
|
128
189
|
if (( this._contributions.has(contribution.type))) {
|
|
@@ -138,11 +199,15 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
138
199
|
}
|
|
139
200
|
}
|
|
140
201
|
this._contributions.set(contribution.type, contribution);
|
|
141
|
-
this.
|
|
202
|
+
this._evaluateAvailability();
|
|
142
203
|
return {
|
|
143
204
|
dispose: () => {
|
|
144
205
|
this._contributions.delete(contribution.type);
|
|
145
|
-
this.
|
|
206
|
+
const store = this._disposableStores.get(contribution.type);
|
|
207
|
+
if (store) {
|
|
208
|
+
store.dispose();
|
|
209
|
+
this._disposableStores.delete(contribution.type);
|
|
210
|
+
}
|
|
146
211
|
}
|
|
147
212
|
};
|
|
148
213
|
}
|
|
@@ -153,31 +218,66 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
153
218
|
const whenExpr = ContextKeyExpr.deserialize(contribution.when);
|
|
154
219
|
return !whenExpr || this._contextKeyService.contextMatchesRules(whenExpr);
|
|
155
220
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
221
|
+
_registerMenuItems(contribution) {
|
|
222
|
+
return MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
223
|
+
command: {
|
|
224
|
+
id: `workbench.action.chat.openNewSessionEditor.${contribution.type}`,
|
|
225
|
+
title: ( localize(5178, "New {0} Chat Editor", contribution.displayName)),
|
|
226
|
+
icon: Codicon.plus,
|
|
227
|
+
},
|
|
228
|
+
group: 'navigation',
|
|
229
|
+
order: 1,
|
|
230
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', `${VIEWLET_ID}.${contribution.type}`)))),
|
|
231
|
+
});
|
|
161
232
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
233
|
+
_registerCommands(contribution) {
|
|
234
|
+
return registerAction2(class OpenNewChatSessionEditorAction extends Action2 {
|
|
235
|
+
constructor() {
|
|
236
|
+
super({
|
|
237
|
+
id: `workbench.action.chat.openNewSessionEditor.${contribution.type}`,
|
|
238
|
+
title: ( localize2(5178, "New {0} Chat Editor", contribution.displayName)),
|
|
239
|
+
category: CHAT_CATEGORY,
|
|
240
|
+
icon: Codicon.plus,
|
|
241
|
+
f1: true,
|
|
242
|
+
precondition: ChatContextKeys.enabled
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
async run(accessor) {
|
|
246
|
+
const editorService = accessor.get(IEditorService);
|
|
247
|
+
const logService = accessor.get(ILogService);
|
|
248
|
+
const { type } = contribution;
|
|
249
|
+
try {
|
|
250
|
+
const options = {
|
|
251
|
+
override: ChatEditorInput.EditorID,
|
|
252
|
+
pinned: true,
|
|
253
|
+
};
|
|
254
|
+
await editorService.openEditor({
|
|
255
|
+
resource: ChatEditorInput.getNewEditorUri().with({ query: `chatSessionType=${type}` }),
|
|
256
|
+
options,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
catch (e) {
|
|
260
|
+
logService.error(`Failed to open new '${type}' chat session editor`, e);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
168
264
|
}
|
|
169
265
|
_evaluateAvailability() {
|
|
170
266
|
let hasChanges = false;
|
|
171
267
|
for (const contribution of ( this._contributions.values())) {
|
|
172
|
-
const isCurrentlyRegistered = ( this.
|
|
268
|
+
const isCurrentlyRegistered = ( this._disposableStores.has(contribution.type));
|
|
173
269
|
const shouldBeRegistered = this._isContributionAvailable(contribution);
|
|
174
270
|
if (isCurrentlyRegistered && !shouldBeRegistered) {
|
|
175
|
-
this.
|
|
271
|
+
const store = this._disposableStores.get(contribution.type);
|
|
272
|
+
if (store) {
|
|
273
|
+
store.dispose();
|
|
274
|
+
this._disposableStores.delete(contribution.type);
|
|
275
|
+
}
|
|
176
276
|
this._disposeSessionsForContribution(contribution.type);
|
|
177
277
|
hasChanges = true;
|
|
178
278
|
}
|
|
179
279
|
else if (!isCurrentlyRegistered && shouldBeRegistered) {
|
|
180
|
-
this.
|
|
280
|
+
this._enableContribution(contribution);
|
|
181
281
|
hasChanges = true;
|
|
182
282
|
}
|
|
183
283
|
}
|
|
@@ -191,6 +291,13 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
191
291
|
}
|
|
192
292
|
}
|
|
193
293
|
}
|
|
294
|
+
_enableContribution(contribution) {
|
|
295
|
+
const disposableStore = ( new DisposableStore());
|
|
296
|
+
this._disposableStores.set(contribution.type, disposableStore);
|
|
297
|
+
disposableStore.add(this._registerDynamicAgent(contribution));
|
|
298
|
+
disposableStore.add(this._registerCommands(contribution));
|
|
299
|
+
disposableStore.add(this._registerMenuItems(contribution));
|
|
300
|
+
}
|
|
194
301
|
_disposeSessionsForContribution(contributionId) {
|
|
195
302
|
const sessionsToDispose = [];
|
|
196
303
|
for (const [sessionKey, sessionData] of this._sessions) {
|
|
@@ -219,7 +326,6 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
219
326
|
isDefault: false,
|
|
220
327
|
isCore: false,
|
|
221
328
|
isDynamic: true,
|
|
222
|
-
isCodingAgent: true,
|
|
223
329
|
slashCommands: [],
|
|
224
330
|
locations: [ChatAgentLocation.Panel],
|
|
225
331
|
modes: [ChatModeKind.Agent, ChatModeKind.Ask],
|
|
@@ -228,7 +334,9 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
228
334
|
themeIcon: Codicon.sendToRemoteAgent,
|
|
229
335
|
isSticky: false,
|
|
230
336
|
},
|
|
337
|
+
capabilities: contribution.capabilities,
|
|
231
338
|
extensionId,
|
|
339
|
+
extensionVersion: extensionDescription.version,
|
|
232
340
|
extensionDisplayName: extensionDisplayName || extensionName,
|
|
233
341
|
extensionPublisherId,
|
|
234
342
|
};
|
|
@@ -236,10 +344,10 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
236
344
|
const disposable = this._chatAgentService.registerDynamicAgent(agentData, agentImpl);
|
|
237
345
|
return disposable;
|
|
238
346
|
}
|
|
239
|
-
|
|
347
|
+
getAllChatSessionContributions() {
|
|
240
348
|
return Array.from(( this._contributions.values())).filter(contribution => this._isContributionAvailable(contribution));
|
|
241
349
|
}
|
|
242
|
-
|
|
350
|
+
getAllChatSessionItemProviders() {
|
|
243
351
|
return [...( this._itemsProviders.values())].filter(provider => {
|
|
244
352
|
const contribution = this._contributions.get(provider.chatSessionType);
|
|
245
353
|
return !contribution || this._isContributionAvailable(contribution);
|
|
@@ -257,9 +365,6 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
257
365
|
await this._extensionService.activateByEvent(`onChatSession:${chatViewType}`);
|
|
258
366
|
return ( this._itemsProviders.has(chatViewType));
|
|
259
367
|
}
|
|
260
|
-
notifySessionItemsChange(chatSessionType) {
|
|
261
|
-
this._onDidChangeSessionItems.fire(chatSessionType);
|
|
262
|
-
}
|
|
263
368
|
async canResolveContentProvider(chatViewType) {
|
|
264
369
|
await this._extensionService.whenInstalledExtensionsRegistered();
|
|
265
370
|
const contribution = this._contributions.get(chatViewType);
|
|
@@ -287,8 +392,16 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
287
392
|
const chatSessionType = provider.chatSessionType;
|
|
288
393
|
this._itemsProviders.set(chatSessionType, provider);
|
|
289
394
|
this._onDidChangeItemsProviders.fire(provider);
|
|
395
|
+
const disposables = ( new DisposableStore());
|
|
396
|
+
disposables.add(provider.onDidChangeChatSessionItems(() => {
|
|
397
|
+
this._onDidChangeSessionItems.fire(chatSessionType);
|
|
398
|
+
}));
|
|
399
|
+
this.updateInProgressStatus(chatSessionType).catch(error => {
|
|
400
|
+
this._logService.warn(`Failed to update initial progress status for '${chatSessionType}':`, error);
|
|
401
|
+
});
|
|
290
402
|
return {
|
|
291
403
|
dispose: () => {
|
|
404
|
+
disposables.dispose();
|
|
292
405
|
const provider = this._itemsProviders.get(chatSessionType);
|
|
293
406
|
if (provider) {
|
|
294
407
|
this._itemsProviders.delete(chatSessionType);
|
|
@@ -297,13 +410,13 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
297
410
|
}
|
|
298
411
|
};
|
|
299
412
|
}
|
|
300
|
-
registerChatSessionContentProvider(provider) {
|
|
301
|
-
this._contentProviders.set(
|
|
413
|
+
registerChatSessionContentProvider(chatSessionType, provider) {
|
|
414
|
+
this._contentProviders.set(chatSessionType, provider);
|
|
302
415
|
return {
|
|
303
416
|
dispose: () => {
|
|
304
|
-
this._contentProviders.delete(
|
|
417
|
+
this._contentProviders.delete(chatSessionType);
|
|
305
418
|
for (const [key, session] of this._sessions) {
|
|
306
|
-
if (session.chatSessionType ===
|
|
419
|
+
if (session.chatSessionType === chatSessionType) {
|
|
307
420
|
session.dispose();
|
|
308
421
|
this._sessions.delete(key);
|
|
309
422
|
}
|
|
@@ -311,6 +424,18 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
311
424
|
}
|
|
312
425
|
};
|
|
313
426
|
}
|
|
427
|
+
async provideNewChatSessionItem(chatSessionType, options, token) {
|
|
428
|
+
if (!(await this.canResolveItemProvider(chatSessionType))) {
|
|
429
|
+
throw Error(`Cannot find provider for ${chatSessionType}`);
|
|
430
|
+
}
|
|
431
|
+
const provider = this._itemsProviders.get(chatSessionType);
|
|
432
|
+
if (!provider?.provideNewChatSessionItem) {
|
|
433
|
+
throw Error(`Provider for ${chatSessionType} does not support creating sessions`);
|
|
434
|
+
}
|
|
435
|
+
const chatSessionItem = await provider.provideNewChatSessionItem(options, token);
|
|
436
|
+
this._onDidChangeSessionItems.fire(chatSessionType);
|
|
437
|
+
return chatSessionItem;
|
|
438
|
+
}
|
|
314
439
|
async provideChatSessionContent(chatSessionType, id, token) {
|
|
315
440
|
if (!(await this.canResolveContentProvider(chatSessionType))) {
|
|
316
441
|
throw Error(`Can not find provider for ${chatSessionType}`);
|
|
@@ -333,8 +458,23 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
333
458
|
const sessionKey = `${chatSessionType}_${id}`;
|
|
334
459
|
this._sessions.delete(sessionKey);
|
|
335
460
|
}
|
|
336
|
-
|
|
337
|
-
|
|
461
|
+
async setEditableSession(sessionId, data) {
|
|
462
|
+
if (!data) {
|
|
463
|
+
this._editableSessions.delete(sessionId);
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
this._editableSessions.set(sessionId, data);
|
|
467
|
+
}
|
|
468
|
+
this._onDidChangeSessionItems.fire('local');
|
|
469
|
+
}
|
|
470
|
+
getEditableData(sessionId) {
|
|
471
|
+
return this._editableSessions.get(sessionId);
|
|
472
|
+
}
|
|
473
|
+
isEditable(sessionId) {
|
|
474
|
+
return ( this._editableSessions.has(sessionId));
|
|
475
|
+
}
|
|
476
|
+
notifySessionItemsChanged(chatSessionType) {
|
|
477
|
+
this._onDidChangeSessionItems.fire(chatSessionType);
|
|
338
478
|
}
|
|
339
479
|
};
|
|
340
480
|
ChatSessionsService = ( __decorate([
|
|
@@ -345,13 +485,15 @@ ChatSessionsService = ( __decorate([
|
|
|
345
485
|
( __param(4, IContextKeyService))
|
|
346
486
|
], ChatSessionsService));
|
|
347
487
|
let CodingAgentChatImplementation = class CodingAgentChatImplementation extends Disposable {
|
|
348
|
-
constructor(chatSession, chatService, chatWidgetService, editorGroupService, chatSessionService) {
|
|
488
|
+
constructor(chatSession, chatService, chatWidgetService, editorGroupService, chatSessionService, editorService, logService) {
|
|
349
489
|
super();
|
|
350
490
|
this.chatSession = chatSession;
|
|
351
491
|
this.chatService = chatService;
|
|
352
492
|
this.chatWidgetService = chatWidgetService;
|
|
353
493
|
this.editorGroupService = editorGroupService;
|
|
354
494
|
this.chatSessionService = chatSessionService;
|
|
495
|
+
this.editorService = editorService;
|
|
496
|
+
this.logService = logService;
|
|
355
497
|
}
|
|
356
498
|
async invoke(request, progress, history, token) {
|
|
357
499
|
const widget = this.chatWidgetService.getWidgetBySessionId(request.sessionId);
|
|
@@ -381,18 +523,60 @@ let CodingAgentChatImplementation = class CodingAgentChatImplementation extends
|
|
|
381
523
|
}
|
|
382
524
|
}
|
|
383
525
|
if (chatSession?.requestHandler) {
|
|
384
|
-
await chatSession.requestHandler(request, progress,
|
|
526
|
+
await chatSession.requestHandler(request, progress, history, token);
|
|
385
527
|
}
|
|
386
528
|
else {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
529
|
+
try {
|
|
530
|
+
const chatSessionItem = await this.chatSessionService.provideNewChatSessionItem(this.chatSession.type, {
|
|
531
|
+
request,
|
|
532
|
+
prompt: request.message,
|
|
533
|
+
history,
|
|
534
|
+
}, token);
|
|
535
|
+
const options = {
|
|
536
|
+
pinned: true,
|
|
537
|
+
preferredTitle: truncate(chatSessionItem.label, 30),
|
|
538
|
+
};
|
|
539
|
+
await this.chatSessionService.provideChatSessionContent(this.chatSession.type, chatSessionItem.id, token);
|
|
540
|
+
const activeGroup = this.editorGroupService.activeGroup;
|
|
541
|
+
const currentEditor = activeGroup?.activeEditor;
|
|
542
|
+
if (currentEditor instanceof ChatEditorInput) {
|
|
543
|
+
await this.editorService.replaceEditors([{
|
|
544
|
+
editor: currentEditor,
|
|
545
|
+
replacement: {
|
|
546
|
+
resource: ChatSessionUri.forSession(this.chatSession.type, chatSessionItem.id),
|
|
547
|
+
options,
|
|
548
|
+
}
|
|
549
|
+
}], activeGroup);
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
await this.editorService.openEditor({
|
|
553
|
+
resource: ChatSessionUri.forSession(this.chatSession.type, chatSessionItem.id),
|
|
554
|
+
options,
|
|
555
|
+
});
|
|
556
|
+
progress([{
|
|
557
|
+
kind: 'markdownContent',
|
|
558
|
+
content: ( new MarkdownString(( localize(
|
|
559
|
+
5179,
|
|
560
|
+
'Continue **{0}** in a new chat editor',
|
|
561
|
+
truncate(chatSessionItem.label, 30)
|
|
562
|
+
)))),
|
|
563
|
+
}]);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
catch (error) {
|
|
567
|
+
this.logService.error(`Failed to create new chat session for type '${this.chatSession.type}'`, error);
|
|
568
|
+
const content = this.chatSession.type === 'copilot-swe-agent'
|
|
569
|
+
? ( new MarkdownString(( localize(
|
|
570
|
+
5180,
|
|
571
|
+
"Failed to create chat session. Use `#copilotCodingAgent` to begin a new [coding agent session]({0}).",
|
|
572
|
+
CODING_AGENT_DOCS
|
|
573
|
+
))))
|
|
574
|
+
: ( new MarkdownString(( localize(5181, "Failed to create chat session. Please try again later."))));
|
|
575
|
+
progress([{
|
|
576
|
+
kind: 'markdownContent',
|
|
577
|
+
content,
|
|
578
|
+
}]);
|
|
579
|
+
}
|
|
396
580
|
}
|
|
397
581
|
return {};
|
|
398
582
|
}
|
|
@@ -401,7 +585,9 @@ CodingAgentChatImplementation = ( __decorate([
|
|
|
401
585
|
( __param(1, IChatService)),
|
|
402
586
|
( __param(2, IChatWidgetService)),
|
|
403
587
|
( __param(3, IEditorGroupsService)),
|
|
404
|
-
( __param(4, IChatSessionsService))
|
|
588
|
+
( __param(4, IChatSessionsService)),
|
|
589
|
+
( __param(5, IEditorService)),
|
|
590
|
+
( __param(6, ILogService))
|
|
405
591
|
], CodingAgentChatImplementation));
|
|
406
592
|
|
|
407
593
|
export { ChatSessionsService };
|