@codingame/monaco-vscode-katex-common 28.4.1 → 29.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +158 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +22 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +121 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +29 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +349 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +104 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +21 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +29 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +261 -282
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +184 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +42 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +14 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +11 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +25 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +332 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +10 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +66 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +28 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +272 -107
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +151 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +96 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +86 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +273 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +28 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +20 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +21 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +112 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +137 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +108 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +385 -247
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +124 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +84 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +38 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +31 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +12 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +130 -23
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +41 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +55 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +50 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +0 -440
|
@@ -4,6 +4,7 @@ import { KeyCode, KeyMod } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
4
4
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
5
5
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
6
6
|
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
7
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
8
|
import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
|
|
8
9
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
10
|
import { Action2, MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -18,7 +19,7 @@ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
18
19
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
19
20
|
import { IsSessionsWindowContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
20
21
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
21
|
-
import { getModeNameForTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
22
|
+
import { getModeNameForTelemetry, buildCustomAgentHandoffsInfo, getHandoffId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
22
23
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
23
24
|
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
24
25
|
import { ChatStopCancellationNoopEventName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
@@ -26,6 +27,7 @@ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
26
27
|
import { ChatModeKind, ChatAgentLocation, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
27
28
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
28
29
|
import { isInClaudeAgentsFolder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
30
|
+
import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
29
31
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
30
32
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
31
33
|
import { AgentSessionProviders, getAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
@@ -70,13 +72,13 @@ class SubmitAction extends Action2 {
|
|
|
70
72
|
if (editsToUndo === 1) {
|
|
71
73
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
72
74
|
message = ( localize(
|
|
73
|
-
|
|
75
|
+
4892,
|
|
74
76
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
75
77
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
76
78
|
));
|
|
77
79
|
} else {
|
|
78
80
|
message = ( localize(
|
|
79
|
-
|
|
81
|
+
4893,
|
|
80
82
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
81
83
|
entriesModifiedInRequestsToRemove.length
|
|
82
84
|
));
|
|
@@ -84,24 +86,24 @@ class SubmitAction extends Action2 {
|
|
|
84
86
|
} else {
|
|
85
87
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
86
88
|
message = ( localize(
|
|
87
|
-
|
|
89
|
+
4894,
|
|
88
90
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
89
91
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
90
92
|
));
|
|
91
93
|
} else {
|
|
92
94
|
message = ( localize(
|
|
93
|
-
|
|
95
|
+
4895,
|
|
94
96
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
95
97
|
entriesModifiedInRequestsToRemove.length
|
|
96
98
|
));
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
100
|
-
title: editsToUndo === 1 ? ( localize(
|
|
102
|
+
title: editsToUndo === 1 ? ( localize(4896, "Do you want to undo your last edit?")) : ( localize(4897, "Do you want to undo {0} edits?", editsToUndo)),
|
|
101
103
|
message: message,
|
|
102
|
-
primaryButton: ( localize(
|
|
104
|
+
primaryButton: ( localize(4898, "Yes")),
|
|
103
105
|
checkbox: {
|
|
104
|
-
label: ( localize(
|
|
106
|
+
label: ( localize(4899, "Don't ask again")),
|
|
105
107
|
checked: false
|
|
106
108
|
},
|
|
107
109
|
type: "info"
|
|
@@ -173,7 +175,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
173
175
|
));
|
|
174
176
|
super({
|
|
175
177
|
id: ChatSubmitAction.ID,
|
|
176
|
-
title: ( localize2(
|
|
178
|
+
title: ( localize2(4900, "Send")),
|
|
177
179
|
f1: false,
|
|
178
180
|
category: CHAT_CATEGORY,
|
|
179
181
|
icon: Codicon.arrowUp,
|
|
@@ -181,7 +183,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
181
183
|
toggled: {
|
|
182
184
|
condition: ChatContextKeys.lockedToCodingAgent,
|
|
183
185
|
icon: Codicon.arrowUp,
|
|
184
|
-
tooltip: ( localize(
|
|
186
|
+
tooltip: ( localize(4901, "Send to Agent"))
|
|
185
187
|
},
|
|
186
188
|
keybinding: {
|
|
187
189
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
@@ -195,7 +197,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
195
197
|
group: "navigation",
|
|
196
198
|
alt: {
|
|
197
199
|
id: "workbench.action.chat.sendToNewChat",
|
|
198
|
-
title: ( localize2(
|
|
200
|
+
title: ( localize2(4902, "Send to New Chat")),
|
|
199
201
|
icon: Codicon.plus
|
|
200
202
|
}
|
|
201
203
|
}, {
|
|
@@ -215,7 +217,7 @@ class ToggleChatModeAction extends Action2 {
|
|
|
215
217
|
constructor() {
|
|
216
218
|
super({
|
|
217
219
|
id: ToggleChatModeAction.ID,
|
|
218
|
-
title: ( localize2(
|
|
220
|
+
title: ( localize2(4903, "Switch to Next Agent")),
|
|
219
221
|
f1: true,
|
|
220
222
|
category: CHAT_CATEGORY,
|
|
221
223
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.requestInProgress.negate())))
|
|
@@ -292,7 +294,7 @@ class SwitchToNextModelAction extends Action2 {
|
|
|
292
294
|
constructor() {
|
|
293
295
|
super({
|
|
294
296
|
id: SwitchToNextModelAction.ID,
|
|
295
|
-
title: ( localize2(
|
|
297
|
+
title: ( localize2(4904, "Switch to Next Model")),
|
|
296
298
|
category: CHAT_CATEGORY,
|
|
297
299
|
f1: true,
|
|
298
300
|
precondition: ChatContextKeys.enabled
|
|
@@ -311,7 +313,7 @@ class OpenModelPickerAction extends Action2 {
|
|
|
311
313
|
constructor() {
|
|
312
314
|
super({
|
|
313
315
|
id: OpenModelPickerAction.ID,
|
|
314
|
-
title: ( localize2(
|
|
316
|
+
title: ( localize2(4905, "Open Model Picker")),
|
|
315
317
|
category: CHAT_CATEGORY,
|
|
316
318
|
f1: false,
|
|
317
319
|
keybinding: {
|
|
@@ -345,8 +347,8 @@ class OpenPermissionPickerAction extends Action2 {
|
|
|
345
347
|
constructor() {
|
|
346
348
|
super({
|
|
347
349
|
id: OpenPermissionPickerAction.ID,
|
|
348
|
-
title: ( localize2(
|
|
349
|
-
tooltip: ( localize(
|
|
350
|
+
title: ( localize2(4906, "Open Permission Picker")),
|
|
351
|
+
tooltip: ( localize(4907, "Set Permissions")),
|
|
350
352
|
category: CHAT_CATEGORY,
|
|
351
353
|
f1: false,
|
|
352
354
|
precondition: ChatContextKeys.enabled,
|
|
@@ -354,7 +356,7 @@ class OpenPermissionPickerAction extends Action2 {
|
|
|
354
356
|
id: MenuId.ChatInputSecondary,
|
|
355
357
|
order: 10,
|
|
356
358
|
group: "navigation",
|
|
357
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Ask)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.lockedToCodingAgent.negate()), (
|
|
359
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Ask)), ( ChatContextKeys.inQuickChat.negate()), ( ContextKeyExpr.or(( ChatContextKeys.lockedToCodingAgent.negate()), ( ChatContextKeys.lockedCodingAgentId.isEqualTo(AgentSessionProviders.Background))))))
|
|
358
360
|
}
|
|
359
361
|
});
|
|
360
362
|
}
|
|
@@ -373,8 +375,8 @@ class OpenModePickerAction extends Action2 {
|
|
|
373
375
|
constructor() {
|
|
374
376
|
super({
|
|
375
377
|
id: OpenModePickerAction.ID,
|
|
376
|
-
title: ( localize2(
|
|
377
|
-
tooltip: ( localize(
|
|
378
|
+
title: ( localize2(4908, "Open Agent Picker")),
|
|
379
|
+
tooltip: ( localize(4909, "Set Agent")),
|
|
378
380
|
category: CHAT_CATEGORY,
|
|
379
381
|
f1: false,
|
|
380
382
|
precondition: ChatContextKeys.enabled,
|
|
@@ -407,8 +409,8 @@ class OpenSessionTargetPickerAction extends Action2 {
|
|
|
407
409
|
constructor() {
|
|
408
410
|
super({
|
|
409
411
|
id: OpenSessionTargetPickerAction.ID,
|
|
410
|
-
title: ( localize2(
|
|
411
|
-
tooltip: ( localize(
|
|
412
|
+
title: ( localize2(4910, "Open Session Target Picker")),
|
|
413
|
+
tooltip: ( localize(4911, "Set Session Target")),
|
|
412
414
|
category: CHAT_CATEGORY,
|
|
413
415
|
f1: false,
|
|
414
416
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(ChatContextKeys.chatSessionIsEmpty, ChatContextKeys.inAgentSessionsWelcome)), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
@@ -440,20 +442,15 @@ class OpenDelegationPickerAction extends Action2 {
|
|
|
440
442
|
constructor() {
|
|
441
443
|
super({
|
|
442
444
|
id: OpenDelegationPickerAction.ID,
|
|
443
|
-
title: ( localize2(
|
|
444
|
-
tooltip: ( localize(
|
|
445
|
+
title: ( localize2(4912, "Open Delegation Picker")),
|
|
446
|
+
tooltip: ( localize(4913, "Delegate Session")),
|
|
445
447
|
category: CHAT_CATEGORY,
|
|
446
448
|
f1: false,
|
|
447
449
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.chatSessionIsEmpty.negate()), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
448
450
|
menu: [{
|
|
449
|
-
id: MenuId.ChatInput,
|
|
450
|
-
order: 0.5,
|
|
451
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.chatSessionIsEmpty.negate()), IsSessionsWindowContext)),
|
|
452
|
-
group: "navigation"
|
|
453
|
-
}, {
|
|
454
451
|
id: MenuId.ChatInputSecondary,
|
|
455
452
|
order: 0.5,
|
|
456
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()),
|
|
453
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ChatContextKeys.chatSessionSupportsDelegation, ( ChatContextKeys.chatSessionIsEmpty.negate()))),
|
|
457
454
|
group: "navigation"
|
|
458
455
|
}]
|
|
459
456
|
});
|
|
@@ -473,20 +470,20 @@ class OpenWorkspacePickerAction extends Action2 {
|
|
|
473
470
|
constructor() {
|
|
474
471
|
super({
|
|
475
472
|
id: OpenWorkspacePickerAction.ID,
|
|
476
|
-
title: ( localize2(
|
|
477
|
-
tooltip: ( localize(
|
|
473
|
+
title: ( localize2(4914, "Open Workspace Picker")),
|
|
474
|
+
tooltip: ( localize(4915, "Select Target Workspace")),
|
|
478
475
|
category: CHAT_CATEGORY,
|
|
479
476
|
f1: false,
|
|
480
477
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.inAgentSessionsWelcome)),
|
|
481
478
|
menu: [{
|
|
482
479
|
id: MenuId.ChatInput,
|
|
483
480
|
order: 0.6,
|
|
484
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo(
|
|
481
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)), IsSessionsWindowContext)),
|
|
485
482
|
group: "navigation"
|
|
486
483
|
}, {
|
|
487
484
|
id: MenuId.ChatInputSecondary,
|
|
488
485
|
order: 0.6,
|
|
489
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo(
|
|
486
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)), ( IsSessionsWindowContext.negate()))),
|
|
490
487
|
group: "navigation"
|
|
491
488
|
}]
|
|
492
489
|
});
|
|
@@ -500,7 +497,7 @@ class ChatSessionPrimaryPickerAction extends Action2 {
|
|
|
500
497
|
constructor() {
|
|
501
498
|
super({
|
|
502
499
|
id: ChatSessionPrimaryPickerAction.ID,
|
|
503
|
-
title: ( localize2(
|
|
500
|
+
title: ( localize2(4916, "Open Primary Session Picker")),
|
|
504
501
|
category: CHAT_CATEGORY,
|
|
505
502
|
f1: false,
|
|
506
503
|
precondition: ChatContextKeys.enabled,
|
|
@@ -528,7 +525,7 @@ class ChangeChatModelAction extends Action2 {
|
|
|
528
525
|
constructor() {
|
|
529
526
|
super({
|
|
530
527
|
id: ChangeChatModelAction.ID,
|
|
531
|
-
title: ( localize2(
|
|
528
|
+
title: ( localize2(4917, "Change Model")),
|
|
532
529
|
category: CHAT_CATEGORY,
|
|
533
530
|
f1: false,
|
|
534
531
|
precondition: ChatContextKeys.enabled
|
|
@@ -551,7 +548,7 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
551
548
|
this.ID = "workbench.action.edits.submit";
|
|
552
549
|
}
|
|
553
550
|
constructor() {
|
|
554
|
-
const notInProgressOrEditing = ( ContextKeyExpr.and(( ContextKeyExpr.or(whenNotInProgress, ( ChatContextKeys.editingRequestType.isEqualTo(ChatContextKeys.EditingRequestType.Sent)))), ( ChatContextKeys.editingRequestType.notEqualsTo(ChatContextKeys.EditingRequestType.
|
|
551
|
+
const notInProgressOrEditing = ( ContextKeyExpr.and(( ContextKeyExpr.or(whenNotInProgress, ( ChatContextKeys.editingRequestType.isEqualTo(ChatContextKeys.EditingRequestType.Sent)))), ( ChatContextKeys.editingRequestType.notEqualsTo(ChatContextKeys.EditingRequestType.Queue)), ( ChatContextKeys.editingRequestType.notEqualsTo(ChatContextKeys.EditingRequestType.Steer))));
|
|
555
552
|
const menuCondition = ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Ask));
|
|
556
553
|
const precondition = ( ContextKeyExpr.and(
|
|
557
554
|
ChatContextKeys.inputHasText,
|
|
@@ -560,7 +557,7 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
560
557
|
));
|
|
561
558
|
super({
|
|
562
559
|
id: ChatEditingSessionSubmitAction.ID,
|
|
563
|
-
title: ( localize2(
|
|
560
|
+
title: ( localize2(4918, "Send")),
|
|
564
561
|
f1: false,
|
|
565
562
|
category: CHAT_CATEGORY,
|
|
566
563
|
icon: Codicon.arrowUp,
|
|
@@ -572,7 +569,7 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
572
569
|
group: "navigation",
|
|
573
570
|
alt: {
|
|
574
571
|
id: "workbench.action.chat.sendToNewChat",
|
|
575
|
-
title: ( localize2(
|
|
572
|
+
title: ( localize2(4902, "Send to New Chat")),
|
|
576
573
|
icon: Codicon.plus
|
|
577
574
|
}
|
|
578
575
|
}]
|
|
@@ -587,7 +584,7 @@ class SubmitWithoutDispatchingAction extends Action2 {
|
|
|
587
584
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress, ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask))));
|
|
588
585
|
super({
|
|
589
586
|
id: SubmitWithoutDispatchingAction.ID,
|
|
590
|
-
title: ( localize2(
|
|
587
|
+
title: ( localize2(4919, "Send")),
|
|
591
588
|
f1: false,
|
|
592
589
|
category: CHAT_CATEGORY,
|
|
593
590
|
precondition,
|
|
@@ -615,7 +612,7 @@ class ChatSubmitWithCodebaseAction extends Action2 {
|
|
|
615
612
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress));
|
|
616
613
|
super({
|
|
617
614
|
id: ChatSubmitWithCodebaseAction.ID,
|
|
618
|
-
title: ( localize2(
|
|
615
|
+
title: ( localize2(4920, "Send with {0}", `${chatVariableLeader}codebase`)),
|
|
619
616
|
precondition,
|
|
620
617
|
keybinding: {
|
|
621
618
|
when: ChatContextKeys.inChatInput,
|
|
@@ -652,7 +649,7 @@ class SendToNewChatAction extends Action2 {
|
|
|
652
649
|
const precondition = ChatContextKeys.inputHasText;
|
|
653
650
|
super({
|
|
654
651
|
id: "workbench.action.chat.sendToNewChat",
|
|
655
|
-
title: ( localize2(
|
|
652
|
+
title: ( localize2(4902, "Send to New Chat")),
|
|
656
653
|
precondition,
|
|
657
654
|
category: CHAT_CATEGORY,
|
|
658
655
|
f1: false,
|
|
@@ -675,7 +672,7 @@ class SendToNewChatAction extends Action2 {
|
|
|
675
672
|
}
|
|
676
673
|
const inputBeforeClear = widget.getInput();
|
|
677
674
|
if (widget.viewModel) {
|
|
678
|
-
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "newSessionAction");
|
|
675
|
+
await chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "newSessionAction");
|
|
679
676
|
}
|
|
680
677
|
if (widget.viewModel?.model) {
|
|
681
678
|
if (!(await handleCurrentEditingSession(widget.viewModel.model, undefined, dialogService))) {
|
|
@@ -697,7 +694,7 @@ class CancelAction extends Action2 {
|
|
|
697
694
|
constructor() {
|
|
698
695
|
super({
|
|
699
696
|
id: CancelAction.ID,
|
|
700
|
-
title: ( localize2(
|
|
697
|
+
title: ( localize2(4921, "Cancel")),
|
|
701
698
|
f1: false,
|
|
702
699
|
category: CHAT_CATEGORY,
|
|
703
700
|
icon: Codicon.stopCircle,
|
|
@@ -722,7 +719,7 @@ class CancelAction extends Action2 {
|
|
|
722
719
|
}
|
|
723
720
|
});
|
|
724
721
|
}
|
|
725
|
-
run(accessor, ...args) {
|
|
722
|
+
async run(accessor, ...args) {
|
|
726
723
|
const context = args[0];
|
|
727
724
|
const widgetService = accessor.get(IChatWidgetService);
|
|
728
725
|
const logService = accessor.get(ILogService);
|
|
@@ -740,7 +737,7 @@ class CancelAction extends Action2 {
|
|
|
740
737
|
}
|
|
741
738
|
const chatService = accessor.get(IChatService);
|
|
742
739
|
if (widget.viewModel) {
|
|
743
|
-
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "cancelAction");
|
|
740
|
+
await chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "cancelAction");
|
|
744
741
|
} else {
|
|
745
742
|
telemetryService.publicLog2(ChatStopCancellationNoopEventName, {
|
|
746
743
|
source: "cancelAction",
|
|
@@ -760,7 +757,7 @@ class CancelEdit extends Action2 {
|
|
|
760
757
|
constructor() {
|
|
761
758
|
super({
|
|
762
759
|
id: CancelEdit.ID,
|
|
763
|
-
title: ( localize2(
|
|
760
|
+
title: ( localize2(4922, "Cancel Edit")),
|
|
764
761
|
f1: false,
|
|
765
762
|
category: CHAT_CATEGORY,
|
|
766
763
|
icon: Codicon.x,
|
|
@@ -791,6 +788,118 @@ class CancelEdit extends Action2 {
|
|
|
791
788
|
widget.finishedEditing();
|
|
792
789
|
}
|
|
793
790
|
}
|
|
791
|
+
const GetHandoffsActionId = "workbench.action.chat.getHandoffs";
|
|
792
|
+
class GetHandoffsAction extends Action2 {
|
|
793
|
+
static {
|
|
794
|
+
this.ID = GetHandoffsActionId;
|
|
795
|
+
}
|
|
796
|
+
constructor() {
|
|
797
|
+
super({
|
|
798
|
+
id: GetHandoffsAction.ID,
|
|
799
|
+
title: ( localize2(4923, "Get Handoffs")),
|
|
800
|
+
f1: false,
|
|
801
|
+
category: CHAT_CATEGORY
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
run(accessor, ...args) {
|
|
805
|
+
const modeService = accessor.get(IChatModeService);
|
|
806
|
+
const arg = args.at(0);
|
|
807
|
+
const {
|
|
808
|
+
builtin,
|
|
809
|
+
custom
|
|
810
|
+
} = modeService.getModes();
|
|
811
|
+
let allModes = [...builtin, ...custom];
|
|
812
|
+
if (arg?.sourceCustomAgent) {
|
|
813
|
+
const filterName = arg.sourceCustomAgent;
|
|
814
|
+
allModes = allModes.filter(m => m.name.get().toLowerCase() === filterName.toLowerCase());
|
|
815
|
+
}
|
|
816
|
+
return buildCustomAgentHandoffsInfo(allModes);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
const ExecuteHandoffActionId = "workbench.action.chat.executeHandoff";
|
|
820
|
+
class ExecuteHandoffAction extends Action2 {
|
|
821
|
+
static {
|
|
822
|
+
this.ID = ExecuteHandoffActionId;
|
|
823
|
+
}
|
|
824
|
+
constructor() {
|
|
825
|
+
super({
|
|
826
|
+
id: ExecuteHandoffAction.ID,
|
|
827
|
+
title: ( localize2(4924, "Execute Handoff")),
|
|
828
|
+
f1: false,
|
|
829
|
+
category: CHAT_CATEGORY
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
async run(accessor, ...args) {
|
|
833
|
+
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
834
|
+
const modeService = accessor.get(IChatModeService);
|
|
835
|
+
const arg = args.at(0);
|
|
836
|
+
if (!arg?.id && !arg?.label) {
|
|
837
|
+
return {
|
|
838
|
+
success: false,
|
|
839
|
+
error: "Either id or label is required"
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
let widget;
|
|
843
|
+
if (arg.sessionResource) {
|
|
844
|
+
let sessionResource;
|
|
845
|
+
try {
|
|
846
|
+
sessionResource = ( URI.parse(arg.sessionResource));
|
|
847
|
+
} catch {
|
|
848
|
+
return {
|
|
849
|
+
success: false,
|
|
850
|
+
error: `Invalid sessionResource URI: '${arg.sessionResource}'`
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
widget = chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
854
|
+
} else {
|
|
855
|
+
widget = chatWidgetService.lastFocusedWidget;
|
|
856
|
+
}
|
|
857
|
+
if (!widget) {
|
|
858
|
+
return {
|
|
859
|
+
success: false,
|
|
860
|
+
error: "No chat widget found. Provide sessionResource or focus a chat widget."
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
let sourceMode;
|
|
864
|
+
if (arg.sourceCustomAgent) {
|
|
865
|
+
const filterName = arg.sourceCustomAgent.toLowerCase();
|
|
866
|
+
const {
|
|
867
|
+
builtin,
|
|
868
|
+
custom
|
|
869
|
+
} = modeService.getModes();
|
|
870
|
+
sourceMode = [...builtin, ...custom].find(
|
|
871
|
+
m => m.name.get().toLowerCase() === filterName || m.id.toLowerCase() === filterName
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
if (!sourceMode) {
|
|
875
|
+
sourceMode = widget.input.currentModeObs.get();
|
|
876
|
+
}
|
|
877
|
+
const handoffs = sourceMode?.handOffs?.get();
|
|
878
|
+
if (!handoffs || handoffs.length === 0) {
|
|
879
|
+
return {
|
|
880
|
+
success: false,
|
|
881
|
+
error: `No handoffs available for mode '${sourceMode?.name.get()}'`
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
let matchedHandoff = arg.id ? handoffs.find(h => getHandoffId(h) === arg.id) : undefined;
|
|
885
|
+
if (!matchedHandoff && arg.label) {
|
|
886
|
+
const labelLower = arg.label.trim().toLowerCase();
|
|
887
|
+
matchedHandoff = handoffs.find(h => h.label.trim().toLowerCase() === labelLower);
|
|
888
|
+
}
|
|
889
|
+
if (!matchedHandoff) {
|
|
890
|
+
const identifier = arg.id ?? arg.label;
|
|
891
|
+
return {
|
|
892
|
+
success: false,
|
|
893
|
+
error: `No handoff with identifier '${identifier}' found for mode '${sourceMode?.name.get()}'`
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
await widget.executeHandoff(matchedHandoff);
|
|
897
|
+
return {
|
|
898
|
+
success: true,
|
|
899
|
+
targetMode: matchedHandoff.agent
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
}
|
|
794
903
|
function registerChatExecuteActions() {
|
|
795
904
|
registerAction2(ChatSubmitAction);
|
|
796
905
|
registerAction2(ChatEditingSessionSubmitAction);
|
|
@@ -809,6 +918,8 @@ function registerChatExecuteActions() {
|
|
|
809
918
|
registerAction2(ChatSessionPrimaryPickerAction);
|
|
810
919
|
registerAction2(ChangeChatModelAction);
|
|
811
920
|
registerAction2(CancelEdit);
|
|
921
|
+
registerAction2(GetHandoffsAction);
|
|
922
|
+
registerAction2(ExecuteHandoffAction);
|
|
812
923
|
}
|
|
813
924
|
|
|
814
|
-
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId, ChatEditingSessionSubmitAction, ChatSessionPrimaryPickerAction, ChatSubmitAction, ChatSubmitWithCodebaseAction, OpenDelegationPickerAction, OpenModePickerAction, OpenModelPickerAction, OpenPermissionPickerAction, OpenSessionTargetPickerAction, OpenWorkspacePickerAction, ToggleAgentModeActionId, registerChatExecuteActions };
|
|
925
|
+
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId, ChatEditingSessionSubmitAction, ChatSessionPrimaryPickerAction, ChatSubmitAction, ChatSubmitWithCodebaseAction, ExecuteHandoffActionId, GetHandoffsActionId, OpenDelegationPickerAction, OpenModePickerAction, OpenModelPickerAction, OpenPermissionPickerAction, OpenSessionTargetPickerAction, OpenWorkspacePickerAction, ToggleAgentModeActionId, registerChatExecuteActions };
|
|
@@ -30,7 +30,7 @@ function registerChatTitleActions() {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
super({
|
|
32
32
|
id: "workbench.action.chat.markHelpful",
|
|
33
|
-
title: ( localize2(
|
|
33
|
+
title: ( localize2(5002, "Helpful")),
|
|
34
34
|
f1: false,
|
|
35
35
|
category: CHAT_CATEGORY,
|
|
36
36
|
icon: Codicon.thumbsup,
|
|
@@ -43,7 +43,8 @@ function registerChatTitleActions() {
|
|
|
43
43
|
ChatContextKeys.extensionParticipantRegistered,
|
|
44
44
|
ChatContextKeys.isResponse,
|
|
45
45
|
( ChatContextKeys.responseHasError.negate()),
|
|
46
|
-
( ContextKeyExpr.has(enableFeedbackConfig))
|
|
46
|
+
( ContextKeyExpr.has(enableFeedbackConfig)),
|
|
47
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
47
48
|
))
|
|
48
49
|
}, {
|
|
49
50
|
id: MENU_INLINE_CHAT_WIDGET_SECONDARY,
|
|
@@ -53,7 +54,8 @@ function registerChatTitleActions() {
|
|
|
53
54
|
ChatContextKeys.extensionParticipantRegistered,
|
|
54
55
|
ChatContextKeys.isResponse,
|
|
55
56
|
( ChatContextKeys.responseHasError.negate()),
|
|
56
|
-
( ContextKeyExpr.has(enableFeedbackConfig))
|
|
57
|
+
( ContextKeyExpr.has(enableFeedbackConfig)),
|
|
58
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
57
59
|
))
|
|
58
60
|
}]
|
|
59
61
|
});
|
|
@@ -84,7 +86,7 @@ function registerChatTitleActions() {
|
|
|
84
86
|
constructor() {
|
|
85
87
|
super({
|
|
86
88
|
id: MarkUnhelpfulActionId,
|
|
87
|
-
title: ( localize2(
|
|
89
|
+
title: ( localize2(5003, "Unhelpful")),
|
|
88
90
|
f1: false,
|
|
89
91
|
category: CHAT_CATEGORY,
|
|
90
92
|
icon: Codicon.thumbsdown,
|
|
@@ -96,7 +98,8 @@ function registerChatTitleActions() {
|
|
|
96
98
|
when: ( ContextKeyExpr.and(
|
|
97
99
|
ChatContextKeys.extensionParticipantRegistered,
|
|
98
100
|
ChatContextKeys.isResponse,
|
|
99
|
-
( ContextKeyExpr.has(enableFeedbackConfig))
|
|
101
|
+
( ContextKeyExpr.has(enableFeedbackConfig)),
|
|
102
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
100
103
|
))
|
|
101
104
|
}, {
|
|
102
105
|
id: MENU_INLINE_CHAT_WIDGET_SECONDARY,
|
|
@@ -106,7 +109,8 @@ function registerChatTitleActions() {
|
|
|
106
109
|
ChatContextKeys.extensionParticipantRegistered,
|
|
107
110
|
ChatContextKeys.isResponse,
|
|
108
111
|
( ChatContextKeys.responseHasError.negate()),
|
|
109
|
-
( ContextKeyExpr.has(enableFeedbackConfig))
|
|
112
|
+
( ContextKeyExpr.has(enableFeedbackConfig)),
|
|
113
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
110
114
|
))
|
|
111
115
|
}]
|
|
112
116
|
});
|
|
@@ -141,7 +145,7 @@ function registerChatTitleActions() {
|
|
|
141
145
|
constructor() {
|
|
142
146
|
super({
|
|
143
147
|
id: "workbench.action.chat.reportIssueForBug",
|
|
144
|
-
title: ( localize2(
|
|
148
|
+
title: ( localize2(5004, "Report Issue")),
|
|
145
149
|
f1: false,
|
|
146
150
|
category: CHAT_CATEGORY,
|
|
147
151
|
icon: Codicon.report,
|
|
@@ -188,7 +192,7 @@ function registerChatTitleActions() {
|
|
|
188
192
|
constructor() {
|
|
189
193
|
super({
|
|
190
194
|
id: "workbench.action.chat.retry",
|
|
191
|
-
title: ( localize2(
|
|
195
|
+
title: ( localize2(5005, "Retry")),
|
|
192
196
|
f1: false,
|
|
193
197
|
category: CHAT_CATEGORY,
|
|
194
198
|
icon: Codicon.refresh,
|
|
@@ -197,12 +201,13 @@ function registerChatTitleActions() {
|
|
|
197
201
|
group: "navigation",
|
|
198
202
|
when: ( ContextKeyExpr.and(
|
|
199
203
|
ChatContextKeys.isResponse,
|
|
200
|
-
ContextKeyExpr.in(ChatContextKeys.itemId.key, ChatContextKeys.lastItemId.key)
|
|
204
|
+
ContextKeyExpr.in(ChatContextKeys.itemId.key, ChatContextKeys.lastItemId.key),
|
|
205
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
201
206
|
))
|
|
202
207
|
}, {
|
|
203
208
|
id: MenuId.ChatEditingWidgetToolbar,
|
|
204
209
|
group: "navigation",
|
|
205
|
-
when: applyingChatEditsFailedContextKey,
|
|
210
|
+
when: ( ContextKeyExpr.and(applyingChatEditsFailedContextKey, ( ChatContextKeys.lockedToCodingAgent.negate()))),
|
|
206
211
|
order: 0
|
|
207
212
|
}]
|
|
208
213
|
});
|
|
@@ -236,19 +241,19 @@ function registerChatTitleActions() {
|
|
|
236
241
|
const entriesModifiedInLastRequest = currentEditingSession.entries.get().filter(entry => entry.lastModifyingRequestId === item.requestId);
|
|
237
242
|
const shouldPrompt = entriesModifiedInLastRequest.length > 0 && configurationService.getValue("chat.editing.confirmEditRequestRetry") === true;
|
|
238
243
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
239
|
-
title: ( localize(
|
|
244
|
+
title: ( localize(5006, "Do you want to retry your last request?")),
|
|
240
245
|
message: entriesModifiedInLastRequest.length === 1 ? ( localize(
|
|
241
|
-
|
|
246
|
+
5007,
|
|
242
247
|
"This will undo edits made to {0} since this request.",
|
|
243
248
|
basename(entriesModifiedInLastRequest[0].modifiedURI)
|
|
244
249
|
)) : ( localize(
|
|
245
|
-
|
|
250
|
+
5008,
|
|
246
251
|
"This will undo edits made to {0} files in your working set since this request. Do you want to proceed?",
|
|
247
252
|
entriesModifiedInLastRequest.length
|
|
248
253
|
)),
|
|
249
|
-
primaryButton: ( localize(
|
|
254
|
+
primaryButton: ( localize(5009, "Yes")),
|
|
250
255
|
checkbox: {
|
|
251
|
-
label: ( localize(
|
|
256
|
+
label: ( localize(5010, "Don't ask again")),
|
|
252
257
|
checked: false
|
|
253
258
|
},
|
|
254
259
|
type: "info"
|
|
@@ -280,7 +285,7 @@ function registerChatTitleActions() {
|
|
|
280
285
|
constructor() {
|
|
281
286
|
super({
|
|
282
287
|
id: "workbench.action.chat.insertIntoNotebook",
|
|
283
|
-
title: ( localize2(
|
|
288
|
+
title: ( localize2(5011, "Insert into Notebook")),
|
|
284
289
|
f1: false,
|
|
285
290
|
category: CHAT_CATEGORY,
|
|
286
291
|
icon: Codicon.insert,
|
|
@@ -288,7 +293,7 @@ function registerChatTitleActions() {
|
|
|
288
293
|
id: MenuId.ChatMessageFooter,
|
|
289
294
|
group: "navigation",
|
|
290
295
|
isHiddenByDefault: true,
|
|
291
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ChatContextKeys.isResponse, ( ChatContextKeys.responseIsFiltered.negate())))
|
|
296
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ChatContextKeys.isResponse, ( ChatContextKeys.responseIsFiltered.negate()), ( ChatContextKeys.lockedToCodingAgent.negate())))
|
|
292
297
|
}
|
|
293
298
|
});
|
|
294
299
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js
CHANGED
|
@@ -141,7 +141,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
141
141
|
append(detailsRow, $("span.separator", undefined, "•"));
|
|
142
142
|
const diffContainer = append(detailsRow, $(".agent-session-hover-diff"));
|
|
143
143
|
if (diff.files > 0) {
|
|
144
|
-
append(diffContainer, $("span", undefined, diff.files === 1 ? ( localize(
|
|
144
|
+
append(diffContainer, $("span", undefined, diff.files === 1 ? ( localize(5079, "1 file")) : ( localize(5080, "{0} files", diff.files))));
|
|
145
145
|
}
|
|
146
146
|
if (diff.insertions > 0) {
|
|
147
147
|
append(diffContainer, $("span.insertions", undefined, `+${diff.insertions}`));
|
|
@@ -157,7 +157,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
157
157
|
if (session.isArchived()) {
|
|
158
158
|
append(detailsRow, $("span.separator", undefined, "•"));
|
|
159
159
|
append(detailsRow, renderIcon(Codicon.archive));
|
|
160
|
-
append(detailsRow, $("span", undefined, ( localize(
|
|
160
|
+
append(detailsRow, $("span", undefined, ( localize(5081, "Archived"))));
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
buildFallbackTooltip(session) {
|
|
@@ -194,7 +194,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
194
194
|
if (diff && hasValidDiff(session.changes)) {
|
|
195
195
|
const diffParts = [];
|
|
196
196
|
if (diff.files > 0) {
|
|
197
|
-
diffParts.push(diff.files === 1 ? ( localize(
|
|
197
|
+
diffParts.push(diff.files === 1 ? ( localize(5079, "1 file")) : ( localize(5080, "{0} files", diff.files)));
|
|
198
198
|
}
|
|
199
199
|
if (diff.insertions > 0) {
|
|
200
200
|
diffParts.push(`+${diff.insertions}`);
|
|
@@ -211,7 +211,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
211
211
|
}
|
|
212
212
|
lines.push(details.join(" • "));
|
|
213
213
|
if (session.isArchived()) {
|
|
214
|
-
lines.push(`$(archive) ${( localize(
|
|
214
|
+
lines.push(`$(archive) ${( localize(5081, "Archived"))}`);
|
|
215
215
|
}
|
|
216
216
|
return ( new MarkdownString(lines.join("\n\n"), {
|
|
217
217
|
supportThemeIcons: true
|
|
@@ -228,16 +228,16 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
228
228
|
let statusLabel;
|
|
229
229
|
switch (status) {
|
|
230
230
|
case ChatSessionStatus.NeedsInput:
|
|
231
|
-
statusLabel = ( localize(
|
|
231
|
+
statusLabel = ( localize(5082, "Needs Input"));
|
|
232
232
|
break;
|
|
233
233
|
case ChatSessionStatus.InProgress:
|
|
234
|
-
statusLabel = ( localize(
|
|
234
|
+
statusLabel = ( localize(5083, "In Progress"));
|
|
235
235
|
break;
|
|
236
236
|
case ChatSessionStatus.Failed:
|
|
237
|
-
statusLabel = ( localize(
|
|
237
|
+
statusLabel = ( localize(5084, "Failed"));
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
statusLabel = ( localize(
|
|
240
|
+
statusLabel = ( localize(5085, "Completed"));
|
|
241
241
|
}
|
|
242
242
|
return statusLabel;
|
|
243
243
|
}
|