@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
|
@@ -18,10 +18,10 @@ function registerQuickChatActions() {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super({
|
|
20
20
|
id: 'workbench.action.quickchat.openInChatView',
|
|
21
|
-
title: ( localize2(
|
|
21
|
+
title: ( localize2(4675, "Open in Chat View")),
|
|
22
22
|
f1: false,
|
|
23
23
|
category: CHAT_CATEGORY,
|
|
24
|
-
icon: Codicon.
|
|
24
|
+
icon: Codicon.chatSparkle,
|
|
25
25
|
menu: {
|
|
26
26
|
id: MenuId.ChatInputSide,
|
|
27
27
|
group: 'navigation',
|
|
@@ -38,7 +38,7 @@ function registerQuickChatActions() {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
40
40
|
id: 'workbench.action.quickchat.close',
|
|
41
|
-
title: ( localize2(
|
|
41
|
+
title: ( localize2(4676, "Close Quick Chat")),
|
|
42
42
|
f1: false,
|
|
43
43
|
category: CHAT_CATEGORY,
|
|
44
44
|
icon: Codicon.close,
|
|
@@ -59,9 +59,9 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
super({
|
|
61
61
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
62
|
-
title: ( localize2(
|
|
62
|
+
title: ( localize2(4677, 'Open Quick Chat')),
|
|
63
63
|
precondition: ChatContextKeys.enabled,
|
|
64
|
-
icon: Codicon.
|
|
64
|
+
icon: Codicon.chatSparkle,
|
|
65
65
|
f1: false,
|
|
66
66
|
category: CHAT_CATEGORY,
|
|
67
67
|
keybinding: {
|
|
@@ -74,7 +74,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
74
74
|
order: 4
|
|
75
75
|
},
|
|
76
76
|
metadata: {
|
|
77
|
-
description: ( localize(
|
|
77
|
+
description: ( localize(4678, 'Toggle the quick chat')),
|
|
78
78
|
args: [{
|
|
79
79
|
name: 'args',
|
|
80
80
|
schema: {
|
|
@@ -84,18 +84,18 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
84
84
|
required: ['query'],
|
|
85
85
|
properties: {
|
|
86
86
|
query: {
|
|
87
|
-
description: ( localize(
|
|
87
|
+
description: ( localize(4679, "The query to open the quick chat with")),
|
|
88
88
|
type: 'string'
|
|
89
89
|
},
|
|
90
90
|
isPartialQuery: {
|
|
91
|
-
description: ( localize(
|
|
91
|
+
description: ( localize(4680, "Whether the query is partial; it will wait for more user input")),
|
|
92
92
|
type: 'boolean'
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
type: 'string',
|
|
98
|
-
description: ( localize(
|
|
98
|
+
description: ( localize(4679, "The query to open the quick chat with"))
|
|
99
99
|
}
|
|
100
100
|
]
|
|
101
101
|
}
|
|
@@ -125,7 +125,7 @@ class AskQuickChatAction extends Action2 {
|
|
|
125
125
|
super({
|
|
126
126
|
id: `workbench.action.openQuickChat`,
|
|
127
127
|
category: CHAT_CATEGORY,
|
|
128
|
-
title: ( localize2(
|
|
128
|
+
title: ( localize2(4681, "Open Quick Chat")),
|
|
129
129
|
precondition: ChatContextKeys.enabled,
|
|
130
130
|
f1: true
|
|
131
131
|
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Action2 } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
2
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
import { MarshalledId } from "@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds";
|
|
4
|
+
import { ChatEditorInput } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput";
|
|
5
|
+
export interface IChatSessionContext {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
sessionType: "editor" | "widget";
|
|
8
|
+
currentTitle: string;
|
|
9
|
+
editorInput?: any;
|
|
10
|
+
editorGroup?: any;
|
|
11
|
+
widget?: any;
|
|
12
|
+
}
|
|
13
|
+
interface IMarshalledChatSessionContext {
|
|
14
|
+
$mid: MarshalledId.ChatSessionContext;
|
|
15
|
+
session: {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
editor?: ChatEditorInput;
|
|
19
|
+
widget?: any;
|
|
20
|
+
sessionType?: "editor" | "widget";
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare class RenameChatSessionAction extends Action2 {
|
|
24
|
+
static readonly id = "workbench.action.chat.renameSession";
|
|
25
|
+
constructor();
|
|
26
|
+
run(accessor: ServicesAccessor, context?: IChatSessionContext | IMarshalledChatSessionContext): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Action to delete a chat session from history
|
|
30
|
+
*/
|
|
31
|
+
export declare class DeleteChatSessionAction extends Action2 {
|
|
32
|
+
static readonly id = "workbench.action.chat.deleteSession";
|
|
33
|
+
constructor();
|
|
34
|
+
run(accessor: ServicesAccessor, context?: IChatSessionContext | IMarshalledChatSessionContext): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Action to open a chat session in a new window
|
|
38
|
+
*/
|
|
39
|
+
export declare class OpenChatSessionInNewWindowAction extends Action2 {
|
|
40
|
+
static readonly id = "workbench.action.chat.openSessionInNewWindow";
|
|
41
|
+
constructor();
|
|
42
|
+
run(accessor: ServicesAccessor, context?: IChatSessionContext | IMarshalledChatSessionContext): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Action to open a chat session in a new editor group to the side
|
|
46
|
+
*/
|
|
47
|
+
export declare class OpenChatSessionInNewEditorGroupAction extends Action2 {
|
|
48
|
+
static readonly id = "workbench.action.chat.openSessionInNewEditorGroup";
|
|
49
|
+
constructor();
|
|
50
|
+
run(accessor: ServicesAccessor, context?: IChatSessionContext | IMarshalledChatSessionContext): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Action to open a chat session in the sidebar (chat widget)
|
|
54
|
+
*/
|
|
55
|
+
export declare class OpenChatSessionInSidebarAction extends Action2 {
|
|
56
|
+
static readonly id = "workbench.action.chat.openSessionInSidebar";
|
|
57
|
+
constructor();
|
|
58
|
+
run(accessor: ServicesAccessor, context?: IChatSessionContext | IMarshalledChatSessionContext): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Action to toggle the description display mode for Chat Sessions
|
|
62
|
+
*/
|
|
63
|
+
export declare class ToggleChatSessionsDescriptionDisplayAction extends Action2 {
|
|
64
|
+
static readonly id = "workbench.action.chatSessions.toggleDescriptionDisplay";
|
|
65
|
+
constructor();
|
|
66
|
+
run(accessor: ServicesAccessor): Promise<void>;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
|
|
2
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
+
import { Action2, MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
4
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
|
+
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
6
|
+
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
7
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
8
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
9
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
10
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
11
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
|
+
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
13
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
14
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
15
|
+
import { AUX_WINDOW_GROUP, SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
16
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
+
import { ChatSessionUri } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
18
|
+
import { VIEWLET_ID } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/chatSessions';
|
|
19
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
20
|
+
import { ChatViewId } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
21
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
22
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
23
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
24
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
25
|
+
|
|
26
|
+
function isLocalChatSessionItem(item) {
|
|
27
|
+
return ('editor' in item && 'group' in item) || ('widget' in item && 'sessionType' in item);
|
|
28
|
+
}
|
|
29
|
+
function isMarshalledChatSessionContext(obj) {
|
|
30
|
+
return !!obj &&
|
|
31
|
+
typeof obj === 'object' &&
|
|
32
|
+
'$mid' in obj &&
|
|
33
|
+
obj.$mid === MarshalledId.ChatSessionContext &&
|
|
34
|
+
'session' in obj;
|
|
35
|
+
}
|
|
36
|
+
class RenameChatSessionAction extends Action2 {
|
|
37
|
+
static { this.id = 'workbench.action.chat.renameSession'; }
|
|
38
|
+
constructor() {
|
|
39
|
+
super({
|
|
40
|
+
id: RenameChatSessionAction.id,
|
|
41
|
+
title: ( localize(4682, "Rename")),
|
|
42
|
+
f1: false,
|
|
43
|
+
category: CHAT_CATEGORY,
|
|
44
|
+
icon: Codicon.pencil,
|
|
45
|
+
keybinding: {
|
|
46
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
47
|
+
primary: KeyCode.F2,
|
|
48
|
+
when: ( ContextKeyExpr.equals('focusedView', 'workbench.view.chat.sessions.local'))
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async run(accessor, context) {
|
|
53
|
+
if (!context) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
let sessionContext;
|
|
57
|
+
if (isMarshalledChatSessionContext(context)) {
|
|
58
|
+
const session = context.session;
|
|
59
|
+
let actualSessionId;
|
|
60
|
+
const currentTitle = session.label;
|
|
61
|
+
if (session.id.startsWith('history-')) {
|
|
62
|
+
actualSessionId = session.id.replace('history-', '');
|
|
63
|
+
}
|
|
64
|
+
else if (session.sessionType === 'editor' && session.editor instanceof ChatEditorInput) {
|
|
65
|
+
actualSessionId = session.editor.sessionId;
|
|
66
|
+
}
|
|
67
|
+
else if (session.sessionType === 'widget' && session.widget) {
|
|
68
|
+
actualSessionId = session.widget.viewModel?.model.sessionId;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
actualSessionId = session.id;
|
|
72
|
+
}
|
|
73
|
+
if (!actualSessionId) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
sessionContext = {
|
|
77
|
+
sessionId: actualSessionId,
|
|
78
|
+
sessionType: session.sessionType || 'editor',
|
|
79
|
+
currentTitle: currentTitle,
|
|
80
|
+
editorInput: session.editor,
|
|
81
|
+
widget: session.widget
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
sessionContext = context;
|
|
86
|
+
}
|
|
87
|
+
const chatSessionsService = accessor.get(IChatSessionsService);
|
|
88
|
+
const logService = accessor.get(ILogService);
|
|
89
|
+
const chatService = accessor.get(IChatService);
|
|
90
|
+
try {
|
|
91
|
+
await chatSessionsService.setEditableSession(sessionContext.sessionId, {
|
|
92
|
+
validationMessage: (value) => {
|
|
93
|
+
if (!value || value.trim().length === 0) {
|
|
94
|
+
return { content: ( localize(4683, "Name cannot be empty")), severity: Severity.Error };
|
|
95
|
+
}
|
|
96
|
+
if (value.length > 100) {
|
|
97
|
+
return { content: ( localize(4684, "Name is too long (maximum 100 characters)")), severity: Severity.Error };
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
},
|
|
101
|
+
placeholder: ( localize(4685, "Enter new name for chat session")),
|
|
102
|
+
startingValue: sessionContext.currentTitle,
|
|
103
|
+
onFinish: async (value, success) => {
|
|
104
|
+
if (success && value && value.trim() !== sessionContext.currentTitle) {
|
|
105
|
+
try {
|
|
106
|
+
const newTitle = value.trim();
|
|
107
|
+
chatService.setChatSessionTitle(sessionContext.sessionId, newTitle);
|
|
108
|
+
chatSessionsService.notifySessionItemsChanged('local');
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
logService.error(( localize(
|
|
112
|
+
4686,
|
|
113
|
+
"Failed to rename chat session: {0}",
|
|
114
|
+
(error instanceof Error ? error.message : String(error))
|
|
115
|
+
)));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
await chatSessionsService.setEditableSession(sessionContext.sessionId, null);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
logService.error('Failed to rename chat session', error instanceof Error ? error.message : String(error));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
class DeleteChatSessionAction extends Action2 {
|
|
128
|
+
static { this.id = 'workbench.action.chat.deleteSession'; }
|
|
129
|
+
constructor() {
|
|
130
|
+
super({
|
|
131
|
+
id: DeleteChatSessionAction.id,
|
|
132
|
+
title: ( localize(4687, "Delete")),
|
|
133
|
+
f1: false,
|
|
134
|
+
category: CHAT_CATEGORY,
|
|
135
|
+
icon: Codicon.x,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
async run(accessor, context) {
|
|
139
|
+
if (!context) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
let sessionContext;
|
|
143
|
+
if (isMarshalledChatSessionContext(context)) {
|
|
144
|
+
const session = context.session;
|
|
145
|
+
let actualSessionId;
|
|
146
|
+
const currentTitle = session.label;
|
|
147
|
+
if (session.id.startsWith('history-')) {
|
|
148
|
+
actualSessionId = session.id.replace('history-', '');
|
|
149
|
+
}
|
|
150
|
+
else if (session.sessionType === 'editor' && session.editor instanceof ChatEditorInput) {
|
|
151
|
+
actualSessionId = session.editor.sessionId;
|
|
152
|
+
}
|
|
153
|
+
else if (session.sessionType === 'widget' && session.widget) {
|
|
154
|
+
actualSessionId = session.widget.viewModel?.model.sessionId;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
actualSessionId = session.id;
|
|
158
|
+
}
|
|
159
|
+
if (!actualSessionId) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
sessionContext = {
|
|
163
|
+
sessionId: actualSessionId,
|
|
164
|
+
sessionType: session.sessionType || 'editor',
|
|
165
|
+
currentTitle: currentTitle,
|
|
166
|
+
editorInput: session.editor,
|
|
167
|
+
widget: session.widget
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
sessionContext = context;
|
|
172
|
+
}
|
|
173
|
+
const chatService = accessor.get(IChatService);
|
|
174
|
+
const dialogService = accessor.get(IDialogService);
|
|
175
|
+
const logService = accessor.get(ILogService);
|
|
176
|
+
const chatSessionsService = accessor.get(IChatSessionsService);
|
|
177
|
+
try {
|
|
178
|
+
const result = await dialogService.confirm({
|
|
179
|
+
message: ( localize(4688, "Are you sure you want to delete this chat session?")),
|
|
180
|
+
detail: ( localize(4689, "This action cannot be undone.")),
|
|
181
|
+
primaryButton: ( localize(4690, "Delete")),
|
|
182
|
+
type: 'warning'
|
|
183
|
+
});
|
|
184
|
+
if (result.confirmed) {
|
|
185
|
+
await chatService.removeHistoryEntry(sessionContext.sessionId);
|
|
186
|
+
chatSessionsService.notifySessionItemsChanged('local');
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
logService.error('Failed to delete chat session', error instanceof Error ? error.message : String(error));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
class OpenChatSessionInNewWindowAction extends Action2 {
|
|
195
|
+
static { this.id = 'workbench.action.chat.openSessionInNewWindow'; }
|
|
196
|
+
constructor() {
|
|
197
|
+
super({
|
|
198
|
+
id: OpenChatSessionInNewWindowAction.id,
|
|
199
|
+
title: ( localize(4691, "Open Chat in New Window")),
|
|
200
|
+
category: CHAT_CATEGORY,
|
|
201
|
+
f1: false,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
async run(accessor, context) {
|
|
205
|
+
if (!context) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const editorService = accessor.get(IEditorService);
|
|
209
|
+
let sessionId;
|
|
210
|
+
let sessionItem;
|
|
211
|
+
if (isMarshalledChatSessionContext(context)) {
|
|
212
|
+
const session = context.session;
|
|
213
|
+
sessionItem = session;
|
|
214
|
+
if (isLocalChatSessionItem(session)) {
|
|
215
|
+
if (session.sessionType === 'editor' && session.editor instanceof ChatEditorInput) {
|
|
216
|
+
sessionId = session.editor.sessionId || session.id;
|
|
217
|
+
}
|
|
218
|
+
else if (session.sessionType === 'widget' && session.widget) {
|
|
219
|
+
sessionId = session.widget.viewModel?.model.sessionId || session.id;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
sessionId = session.id;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
sessionId = session.id;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
sessionId = context.sessionId;
|
|
231
|
+
}
|
|
232
|
+
if (sessionItem && (isLocalChatSessionItem(sessionItem) || sessionId.startsWith('history-'))) {
|
|
233
|
+
const sessionIdWithoutHistory = sessionId.replace('history-', '');
|
|
234
|
+
const options = {
|
|
235
|
+
target: { sessionId: sessionIdWithoutHistory },
|
|
236
|
+
pinned: true,
|
|
237
|
+
auxiliary: { compact: false },
|
|
238
|
+
ignoreInView: true
|
|
239
|
+
};
|
|
240
|
+
await editorService.openEditor({
|
|
241
|
+
resource: ChatEditorInput.getNewEditorUri(),
|
|
242
|
+
options,
|
|
243
|
+
}, AUX_WINDOW_GROUP);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const providerType = sessionItem && sessionItem.provider?.chatSessionType || 'external';
|
|
247
|
+
await editorService.openEditor({
|
|
248
|
+
resource: ChatSessionUri.forSession(providerType, sessionId),
|
|
249
|
+
options: {
|
|
250
|
+
pinned: true,
|
|
251
|
+
auxiliary: { compact: false }
|
|
252
|
+
}
|
|
253
|
+
}, AUX_WINDOW_GROUP);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
class OpenChatSessionInNewEditorGroupAction extends Action2 {
|
|
258
|
+
static { this.id = 'workbench.action.chat.openSessionInNewEditorGroup'; }
|
|
259
|
+
constructor() {
|
|
260
|
+
super({
|
|
261
|
+
id: OpenChatSessionInNewEditorGroupAction.id,
|
|
262
|
+
title: ( localize(4692, "Open Chat to the Side")),
|
|
263
|
+
category: CHAT_CATEGORY,
|
|
264
|
+
f1: false,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
async run(accessor, context) {
|
|
268
|
+
if (!context) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const editorService = accessor.get(IEditorService);
|
|
272
|
+
let sessionId;
|
|
273
|
+
let sessionItem;
|
|
274
|
+
if (isMarshalledChatSessionContext(context)) {
|
|
275
|
+
const session = context.session;
|
|
276
|
+
sessionItem = session;
|
|
277
|
+
if (isLocalChatSessionItem(session)) {
|
|
278
|
+
if (session.sessionType === 'editor' && session.editor instanceof ChatEditorInput) {
|
|
279
|
+
sessionId = session.editor.sessionId || session.id;
|
|
280
|
+
}
|
|
281
|
+
else if (session.sessionType === 'widget' && session.widget) {
|
|
282
|
+
sessionId = session.widget.viewModel?.model.sessionId || session.id;
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
sessionId = session.id;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
sessionId = session.id;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
sessionId = context.sessionId;
|
|
294
|
+
}
|
|
295
|
+
if (sessionItem && (isLocalChatSessionItem(sessionItem) || sessionId.startsWith('history-'))) {
|
|
296
|
+
const sessionIdWithoutHistory = sessionId.replace('history-', '');
|
|
297
|
+
const options = {
|
|
298
|
+
target: { sessionId: sessionIdWithoutHistory },
|
|
299
|
+
pinned: true,
|
|
300
|
+
ignoreInView: true,
|
|
301
|
+
};
|
|
302
|
+
await editorService.openEditor({
|
|
303
|
+
resource: ChatEditorInput.getNewEditorUri(),
|
|
304
|
+
options,
|
|
305
|
+
}, SIDE_GROUP);
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
const providerType = sessionItem && sessionItem.provider?.chatSessionType || 'external';
|
|
309
|
+
await editorService.openEditor({
|
|
310
|
+
resource: ChatSessionUri.forSession(providerType, sessionId),
|
|
311
|
+
options: { pinned: true }
|
|
312
|
+
}, SIDE_GROUP);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
class OpenChatSessionInSidebarAction extends Action2 {
|
|
317
|
+
static { this.id = 'workbench.action.chat.openSessionInSidebar'; }
|
|
318
|
+
constructor() {
|
|
319
|
+
super({
|
|
320
|
+
id: OpenChatSessionInSidebarAction.id,
|
|
321
|
+
title: ( localize(4693, "Open Chat in Sidebar")),
|
|
322
|
+
category: CHAT_CATEGORY,
|
|
323
|
+
f1: false,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
async run(accessor, context) {
|
|
327
|
+
if (!context) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const viewsService = accessor.get(IViewsService);
|
|
331
|
+
let sessionId;
|
|
332
|
+
let sessionItem;
|
|
333
|
+
if (isMarshalledChatSessionContext(context)) {
|
|
334
|
+
const session = context.session;
|
|
335
|
+
sessionItem = session;
|
|
336
|
+
if (isLocalChatSessionItem(session)) {
|
|
337
|
+
if (session.sessionType === 'editor' && session.editor instanceof ChatEditorInput) {
|
|
338
|
+
sessionId = session.editor.sessionId || session.id;
|
|
339
|
+
}
|
|
340
|
+
else if (session.sessionType === 'widget' && session.widget) {
|
|
341
|
+
sessionId = session.widget.viewModel?.model.sessionId || session.id;
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
sessionId = session.id;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
sessionId = session.id;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
sessionId = context.sessionId;
|
|
353
|
+
}
|
|
354
|
+
const chatViewPane = await viewsService.openView(ChatViewId);
|
|
355
|
+
if (chatViewPane) {
|
|
356
|
+
if (sessionItem && (isLocalChatSessionItem(sessionItem) || sessionId.startsWith('history-'))) {
|
|
357
|
+
const sessionIdWithoutHistory = sessionId.replace('history-', '');
|
|
358
|
+
await chatViewPane.loadSession(sessionIdWithoutHistory);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
const providerType = sessionItem && sessionItem.provider?.chatSessionType || 'external';
|
|
362
|
+
const sessionUri = ChatSessionUri.forSession(providerType, sessionId);
|
|
363
|
+
await chatViewPane.loadSession(sessionUri);
|
|
364
|
+
}
|
|
365
|
+
chatViewPane.focusInput();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
class ToggleChatSessionsDescriptionDisplayAction extends Action2 {
|
|
370
|
+
static { this.id = 'workbench.action.chatSessions.toggleDescriptionDisplay'; }
|
|
371
|
+
constructor() {
|
|
372
|
+
super({
|
|
373
|
+
id: ToggleChatSessionsDescriptionDisplayAction.id,
|
|
374
|
+
title: ( localize(4694, "Show Rich Descriptions")),
|
|
375
|
+
category: CHAT_CATEGORY,
|
|
376
|
+
f1: false,
|
|
377
|
+
toggled: ( ContextKeyExpr.equals(`config.${ChatConfiguration.ShowAgentSessionsViewDescription}`, true))
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
async run(accessor) {
|
|
381
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
382
|
+
const currentValue = configurationService.getValue(ChatConfiguration.ShowAgentSessionsViewDescription);
|
|
383
|
+
await configurationService.updateValue(ChatConfiguration.ShowAgentSessionsViewDescription, !currentValue);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
MenuRegistry.appendMenuItem(MenuId.ChatSessionsMenu, {
|
|
387
|
+
command: {
|
|
388
|
+
id: RenameChatSessionAction.id,
|
|
389
|
+
title: ( localize(4682, "Rename")),
|
|
390
|
+
icon: Codicon.pencil
|
|
391
|
+
},
|
|
392
|
+
group: 'inline',
|
|
393
|
+
order: 1,
|
|
394
|
+
when: ( ChatContextKeys.sessionType.isEqualTo('local'))
|
|
395
|
+
});
|
|
396
|
+
MenuRegistry.appendMenuItem(MenuId.ChatSessionsMenu, {
|
|
397
|
+
command: {
|
|
398
|
+
id: DeleteChatSessionAction.id,
|
|
399
|
+
title: ( localize(4687, "Delete")),
|
|
400
|
+
icon: Codicon.x
|
|
401
|
+
},
|
|
402
|
+
group: 'inline',
|
|
403
|
+
order: 2,
|
|
404
|
+
when: ( ContextKeyExpr.and(( ChatContextKeys.isHistoryItem.isEqualTo(true)), ( ChatContextKeys.isActiveSession.isEqualTo(false))))
|
|
405
|
+
});
|
|
406
|
+
MenuRegistry.appendMenuItem(MenuId.ChatSessionsMenu, {
|
|
407
|
+
command: {
|
|
408
|
+
id: OpenChatSessionInNewEditorGroupAction.id,
|
|
409
|
+
title: ( localize(4695, "Open to the Side"))
|
|
410
|
+
},
|
|
411
|
+
group: 'navigation',
|
|
412
|
+
order: 2,
|
|
413
|
+
});
|
|
414
|
+
MenuRegistry.appendMenuItem(MenuId.ChatSessionsMenu, {
|
|
415
|
+
command: {
|
|
416
|
+
id: OpenChatSessionInSidebarAction.id,
|
|
417
|
+
title: ( localize(4696, "Open in Sidebar"))
|
|
418
|
+
},
|
|
419
|
+
group: 'navigation',
|
|
420
|
+
order: 3,
|
|
421
|
+
});
|
|
422
|
+
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
423
|
+
command: {
|
|
424
|
+
id: ToggleChatSessionsDescriptionDisplayAction.id,
|
|
425
|
+
title: ( localize(4694, "Show Rich Descriptions")),
|
|
426
|
+
toggled: ( ContextKeyExpr.equals(`config.${ChatConfiguration.ShowAgentSessionsViewDescription}`, true))
|
|
427
|
+
},
|
|
428
|
+
group: '1_config',
|
|
429
|
+
order: 1,
|
|
430
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
export { DeleteChatSessionAction, OpenChatSessionInNewEditorGroupAction, OpenChatSessionInNewWindowAction, OpenChatSessionInSidebarAction, RenameChatSessionAction, ToggleChatSessionsDescriptionDisplayAction };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
5
6
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
6
7
|
import { markAsSingleton } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
8
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -15,9 +16,9 @@ import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
15
16
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
16
17
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
17
18
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
19
|
+
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
18
20
|
import { isResponseVM } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
19
21
|
import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
20
|
-
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
21
22
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
22
23
|
import { ToolsScope } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/chat/browser/chatSelectedTools';
|
|
23
24
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
@@ -28,7 +29,7 @@ class AcceptToolConfirmation extends Action2 {
|
|
|
28
29
|
constructor() {
|
|
29
30
|
super({
|
|
30
31
|
id: AcceptToolConfirmationActionId,
|
|
31
|
-
title: ( localize2(
|
|
32
|
+
title: ( localize2(4707, "Accept")),
|
|
32
33
|
f1: false,
|
|
33
34
|
category: CHAT_CATEGORY,
|
|
34
35
|
keybinding: {
|
|
@@ -45,9 +46,9 @@ class AcceptToolConfirmation extends Action2 {
|
|
|
45
46
|
if (!isResponseVM(lastItem)) {
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
|
-
const unconfirmedToolInvocation = lastItem.model.response.value.find((item) => item.kind === 'toolInvocation' &&
|
|
49
|
+
const unconfirmedToolInvocation = lastItem.model.response.value.find((item) => item.kind === 'toolInvocation' && item.isConfirmed === undefined);
|
|
49
50
|
if (unconfirmedToolInvocation) {
|
|
50
|
-
unconfirmedToolInvocation.confirmed.complete(
|
|
51
|
+
unconfirmedToolInvocation.confirmed.complete({ type: ToolConfirmKind.UserAction });
|
|
51
52
|
}
|
|
52
53
|
widget?.focusInput();
|
|
53
54
|
}
|
|
@@ -57,7 +58,7 @@ class ConfigureToolsAction extends Action2 {
|
|
|
57
58
|
constructor() {
|
|
58
59
|
super({
|
|
59
60
|
id: ConfigureToolsAction.ID,
|
|
60
|
-
title: ( localize(
|
|
61
|
+
title: ( localize(4708, "Configure Tools...")),
|
|
61
62
|
icon: Codicon.tools,
|
|
62
63
|
f1: false,
|
|
63
64
|
category: CHAT_CATEGORY,
|
|
@@ -92,35 +93,33 @@ class ConfigureToolsAction extends Action2 {
|
|
|
92
93
|
const { entriesScope, entriesMap } = widget.input.selectedToolsModel;
|
|
93
94
|
switch (entriesScope) {
|
|
94
95
|
case ToolsScope.Session:
|
|
95
|
-
placeholder = ( localize(
|
|
96
|
+
placeholder = ( localize(4709, "Select tools for this chat session"));
|
|
96
97
|
description = ( localize(
|
|
97
|
-
|
|
98
|
+
4710,
|
|
98
99
|
"The selected tools were configured by a prompt command and only apply to this chat session."
|
|
99
100
|
));
|
|
100
101
|
break;
|
|
101
102
|
case ToolsScope.Mode:
|
|
102
|
-
placeholder = ( localize(
|
|
103
|
+
placeholder = ( localize(4711, "Select tools for this chat mode"));
|
|
103
104
|
description = ( localize(
|
|
104
|
-
|
|
105
|
+
4712,
|
|
105
106
|
"The selected tools are configured by the '{0}' chat mode. Changes to the tools will be applied to the mode file as well.",
|
|
106
|
-
widget.input.currentModeObs.get().
|
|
107
|
+
widget.input.currentModeObs.get().label
|
|
107
108
|
));
|
|
108
109
|
break;
|
|
109
110
|
case ToolsScope.Global:
|
|
110
|
-
placeholder = ( localize(
|
|
111
|
+
placeholder = ( localize(4713, "Select tools that are available to chat."));
|
|
111
112
|
description = undefined;
|
|
112
113
|
break;
|
|
113
114
|
}
|
|
114
|
-
const result = await instaService.invokeFunction(showToolsPicker, placeholder, description, entriesMap.get()
|
|
115
|
-
for (const [item, enabled] of newEntriesMap) {
|
|
116
|
-
}
|
|
117
|
-
});
|
|
115
|
+
const result = await instaService.invokeFunction(showToolsPicker, placeholder, description, entriesMap.get());
|
|
118
116
|
if (result) {
|
|
119
117
|
widget.input.selectedToolsModel.set(result, false);
|
|
120
118
|
}
|
|
119
|
+
const tools = widget.input.selectedToolsModel.entriesMap.get();
|
|
121
120
|
telemetryService.publicLog2('chat/selectedTools', {
|
|
122
|
-
total:
|
|
123
|
-
enabled:
|
|
121
|
+
total: tools.size,
|
|
122
|
+
enabled: Iterable.reduce(tools, (prev, [_, enabled]) => enabled ? prev + 1 : prev, 0),
|
|
124
123
|
});
|
|
125
124
|
}
|
|
126
125
|
}
|
|
@@ -158,7 +157,7 @@ let ConfigureToolsActionRendering = class ConfigureToolsActionRendering {
|
|
|
158
157
|
getTooltip() {
|
|
159
158
|
if (this.isAboveToolLimit()) {
|
|
160
159
|
const warningMessage = ( localize(
|
|
161
|
-
|
|
160
|
+
4714,
|
|
162
161
|
'More than {0} tools are enabled, you may experience degraded tool calling.',
|
|
163
162
|
this._contextKeyService.getContextKeyValue(ChatContextKeys.chatToolGroupingThreshold.key)
|
|
164
163
|
));
|