@codingame/monaco-vscode-katex-common 26.2.1 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +10 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +35 -11
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +168 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +67 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +42 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +63 -40
- 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 +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +77 -73
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +381 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +109 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +28 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +226 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -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/chatAttachmentsContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
- 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/chatDiffBlockPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +52 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
- 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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +20 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +36 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +166 -45
- 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 +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +16 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
- 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 +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +244 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +252 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
- 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.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +48 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +351 -422
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +69 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
- 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 +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +63 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
- 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.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +17 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +310 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +441 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +392 -86
- 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 +52 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +271 -187
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +668 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +78 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +86 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +393 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +36 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +20 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +141 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +18 -13
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +108 -27
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +20 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +74 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
- 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/inlineChat.css +0 -42
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +27 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +83 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -33
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
- 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/input/modelPickerActionItem.js +0 -187
- /package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +0 -0
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
2
|
+
import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
|
|
2
3
|
import { IActionWidgetDropdownAction } from "../../../../../../platform/actionWidget/browser/actionWidgetDropdown.js";
|
|
4
|
+
import { MenuItemAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
5
|
+
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
6
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
8
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
9
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
10
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
3
11
|
import { AgentSessionProviders } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions";
|
|
12
|
+
import { ISessionTypePickerDelegate } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
13
|
+
import { IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
|
|
4
14
|
import { ISessionTypeItem, SessionTypePickerActionItem } from "./sessionTargetPickerActionItem.js";
|
|
5
15
|
/**
|
|
6
16
|
* Action view item for delegating to a remote session (Background or Cloud).
|
|
7
17
|
* This picker allows switching to remote execution providers when the session is not empty.
|
|
8
18
|
*/
|
|
9
19
|
export declare class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
20
|
+
private readonly _isSessionsWindow;
|
|
21
|
+
constructor(action: MenuItemAction, chatSessionPosition: "sidebar" | "editor", delegate: ISessionTypePickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, chatSessionsService: IChatSessionsService, commandService: ICommandService, openerService: IOpenerService, telemetryService: ITelemetryService);
|
|
10
22
|
protected _run(sessionTypeItem: ISessionTypeItem): void;
|
|
11
23
|
protected _getSelectedSessionType(): AgentSessionProviders | undefined;
|
|
12
24
|
protected _isSessionTypeEnabled(type: AgentSessionProviders): boolean;
|
|
@@ -16,7 +28,6 @@ export declare class DelegationSessionPickerActionItem extends SessionTypePicker
|
|
|
16
28
|
order: number;
|
|
17
29
|
showHeader: boolean;
|
|
18
30
|
};
|
|
19
|
-
protected _getSessionDescription(sessionTypeItem: ISessionTypeItem): string | undefined;
|
|
20
31
|
protected _getLearnMore(): IAction;
|
|
21
32
|
protected _getAdditionalActions(): IActionWidgetDropdownAction[];
|
|
22
33
|
}
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
2
3
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
5
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
|
|
7
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
8
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
10
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
11
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
12
|
+
import { IsSessionsWindowContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
13
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
5
14
|
import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
6
15
|
import { getAgentSessionProvider, AgentSessionProviders, getAgentCanContinueIn, isFirstPartyAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
7
16
|
import { SessionTypePickerActionItem } from './sessionTargetPickerActionItem.js';
|
|
8
17
|
|
|
9
|
-
class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
18
|
+
let DelegationSessionPickerActionItem = class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
19
|
+
constructor(
|
|
20
|
+
action,
|
|
21
|
+
chatSessionPosition,
|
|
22
|
+
delegate,
|
|
23
|
+
pickerOptions,
|
|
24
|
+
actionWidgetService,
|
|
25
|
+
keybindingService,
|
|
26
|
+
contextKeyService,
|
|
27
|
+
chatSessionsService,
|
|
28
|
+
commandService,
|
|
29
|
+
openerService,
|
|
30
|
+
telemetryService
|
|
31
|
+
) {
|
|
32
|
+
super(
|
|
33
|
+
action,
|
|
34
|
+
chatSessionPosition,
|
|
35
|
+
delegate,
|
|
36
|
+
pickerOptions,
|
|
37
|
+
actionWidgetService,
|
|
38
|
+
keybindingService,
|
|
39
|
+
contextKeyService,
|
|
40
|
+
chatSessionsService,
|
|
41
|
+
commandService,
|
|
42
|
+
openerService,
|
|
43
|
+
telemetryService
|
|
44
|
+
);
|
|
45
|
+
this._isSessionsWindow = IsSessionsWindowContext.getValue(contextKeyService) === true;
|
|
46
|
+
}
|
|
10
47
|
_run(sessionTypeItem) {
|
|
11
48
|
if (this.delegate.setPendingDelegationTarget) {
|
|
12
49
|
this.delegate.setPendingDelegationTarget(sessionTypeItem.type);
|
|
@@ -25,15 +62,22 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
25
62
|
_isSessionTypeEnabled(type) {
|
|
26
63
|
const allContributions = this.chatSessionsService.getAllChatSessionContributions();
|
|
27
64
|
const contribution = allContributions.find(contribution => getAgentSessionProvider(contribution.type) === type);
|
|
28
|
-
|
|
65
|
+
const activeProvider = this.delegate.getActiveSessionProvider();
|
|
66
|
+
if (!this._isSessionsWindow && activeProvider !== AgentSessionProviders.Local) {
|
|
29
67
|
return false;
|
|
30
68
|
}
|
|
31
|
-
if (
|
|
69
|
+
if (this._isSessionsWindow && activeProvider !== AgentSessionProviders.Background) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (contribution && !contribution.canDelegate && activeProvider !== type ) {
|
|
32
73
|
return false;
|
|
33
74
|
}
|
|
34
75
|
return this._getSelectedSessionType() !== type;
|
|
35
76
|
}
|
|
36
77
|
_isVisible(type) {
|
|
78
|
+
if (this._isSessionsWindow && type === AgentSessionProviders.Local) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
37
81
|
if (this.delegate.getActiveSessionProvider() === type) {
|
|
38
82
|
return true;
|
|
39
83
|
}
|
|
@@ -42,29 +86,22 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
42
86
|
_getSessionCategory(sessionTypeItem) {
|
|
43
87
|
if (isFirstPartyAgentSessionProvider(sessionTypeItem.type)) {
|
|
44
88
|
return {
|
|
45
|
-
label: ( localize(
|
|
89
|
+
label: ( localize(6731, "Continue In")),
|
|
46
90
|
order: 1,
|
|
47
91
|
showHeader: true
|
|
48
92
|
};
|
|
49
93
|
}
|
|
50
94
|
return {
|
|
51
|
-
label: ( localize(
|
|
95
|
+
label: ( localize(6732, "Continue In (Third Party)")),
|
|
52
96
|
order: 2,
|
|
53
97
|
showHeader: false
|
|
54
98
|
};
|
|
55
99
|
}
|
|
56
|
-
_getSessionDescription(sessionTypeItem) {
|
|
57
|
-
const allContributions = this.chatSessionsService.getAllChatSessionContributions();
|
|
58
|
-
const contribution = allContributions.find(
|
|
59
|
-
contribution => getAgentSessionProvider(contribution.type) === sessionTypeItem.type
|
|
60
|
-
);
|
|
61
|
-
return contribution?.name ? `@${contribution.name}` : undefined;
|
|
62
|
-
}
|
|
63
100
|
_getLearnMore() {
|
|
64
101
|
const learnMoreUrl = "https://aka.ms/vscode-continue-chat-in";
|
|
65
102
|
return {
|
|
66
103
|
id: "workbench.action.chat.agentOverview.learnMoreHandOff",
|
|
67
|
-
label: ( localize(
|
|
104
|
+
label: ( localize(6733, "Learn about agent handoff...")),
|
|
68
105
|
tooltip: learnMoreUrl,
|
|
69
106
|
class: undefined,
|
|
70
107
|
enabled: true,
|
|
@@ -74,10 +111,13 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
74
111
|
};
|
|
75
112
|
}
|
|
76
113
|
_getAdditionalActions() {
|
|
114
|
+
if (this._isSessionsWindow) {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
77
117
|
return [{
|
|
78
118
|
id: "newChatSession",
|
|
79
119
|
class: undefined,
|
|
80
|
-
label: ( localize(
|
|
120
|
+
label: ( localize(6734, "New Chat Session")),
|
|
81
121
|
tooltip: "",
|
|
82
122
|
hover: {
|
|
83
123
|
content: "",
|
|
@@ -87,7 +127,7 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
87
127
|
icon: Codicon.plus,
|
|
88
128
|
enabled: true,
|
|
89
129
|
category: {
|
|
90
|
-
label: ( localize(
|
|
130
|
+
label: ( localize(6735, "New Chat Session")),
|
|
91
131
|
order: 0,
|
|
92
132
|
showHeader: false
|
|
93
133
|
},
|
|
@@ -97,6 +137,7 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
97
137
|
}
|
|
98
138
|
}];
|
|
99
139
|
}
|
|
100
|
-
}
|
|
140
|
+
};
|
|
141
|
+
DelegationSessionPickerActionItem = ( __decorate([( __param(4, IActionWidgetService)), ( __param(5, IKeybindingService)), ( __param(6, IContextKeyService)), ( __param(7, IChatSessionsService)), ( __param(8, ICommandService)), ( __param(9, IOpenerService)), ( __param(10, ITelemetryService))], DelegationSessionPickerActionItem));
|
|
101
142
|
|
|
102
143
|
export { DelegationSessionPickerActionItem };
|
|
@@ -16,6 +16,7 @@ import { IChatModeService } from "@codingame/monaco-vscode-api/vscode/vs/workben
|
|
|
16
16
|
import { Target } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
17
17
|
import { ChatInputPickerActionViewItem, IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
|
|
18
18
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
19
|
+
import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
19
20
|
export interface IModePickerDelegate {
|
|
20
21
|
readonly currentMode: IObservable<IChatMode>;
|
|
21
22
|
readonly sessionResource: () => URI | undefined;
|
|
@@ -30,12 +31,7 @@ export declare class ModePickerActionItem extends ChatInputPickerActionViewItem
|
|
|
30
31
|
private readonly contextKeyService;
|
|
31
32
|
private readonly menuService;
|
|
32
33
|
private readonly _productService;
|
|
33
|
-
constructor(action: MenuItemAction, delegate: IModePickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, chatAgentService: IChatAgentService, keybindingService: IKeybindingService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatModeService: IChatModeService, menuService: IMenuService, commandService: ICommandService, _productService: IProductService, telemetryService: ITelemetryService, openerService: IOpenerService);
|
|
34
|
+
constructor(action: MenuItemAction, delegate: IModePickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, chatAgentService: IChatAgentService, keybindingService: IKeybindingService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatModeService: IChatModeService, menuService: IMenuService, commandService: ICommandService, _productService: IProductService, telemetryService: ITelemetryService, openerService: IOpenerService, assignmentService: IWorkbenchAssignmentService);
|
|
34
35
|
private getModePickerActionBarActions;
|
|
35
36
|
protected renderLabel(element: HTMLElement): IDisposable | null;
|
|
36
37
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Returns true if the mode is the built-in 'implement' mode from the chat extension.
|
|
39
|
-
* This mode is hidden from the mode picker but available for handoffs.
|
|
40
|
-
*/
|
|
41
|
-
export declare function isBuiltinImplementMode(mode: IChatMode, productService: IProductService): boolean;
|
|
@@ -28,9 +28,22 @@ import { getOpenChatActionIdForMode } from '@codingame/monaco-vscode-api/vscode/
|
|
|
28
28
|
import { ToggleAgentModeActionId } from '../../actions/chatExecuteActions.js';
|
|
29
29
|
import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
|
|
30
30
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
31
|
+
import { IWorkbenchAssignmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service';
|
|
32
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
31
33
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
32
34
|
|
|
33
|
-
const builtinDefaultIcon =
|
|
35
|
+
const builtinDefaultIcon = mode => {
|
|
36
|
+
switch (mode.name.get().toLowerCase()) {
|
|
37
|
+
case "ask":
|
|
38
|
+
return Codicon.ask;
|
|
39
|
+
case "edit":
|
|
40
|
+
return Codicon.edit;
|
|
41
|
+
case "plan":
|
|
42
|
+
return Codicon.tasklist;
|
|
43
|
+
default:
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
34
47
|
let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerActionViewItem {
|
|
35
48
|
constructor(
|
|
36
49
|
action,
|
|
@@ -46,19 +59,23 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
46
59
|
commandService,
|
|
47
60
|
_productService,
|
|
48
61
|
telemetryService,
|
|
49
|
-
openerService
|
|
62
|
+
openerService,
|
|
63
|
+
assignmentService
|
|
50
64
|
) {
|
|
65
|
+
const assignments = observableValue("modePickerAssignments", {
|
|
66
|
+
showOldAskMode: false
|
|
67
|
+
});
|
|
51
68
|
const customAgentTarget = delegate.customAgentTarget?.() ?? Target.Undefined;
|
|
52
69
|
const builtInCategory = {
|
|
53
|
-
label: ( localize(
|
|
70
|
+
label: ( localize(6751, "Built-In")),
|
|
54
71
|
order: 0
|
|
55
72
|
};
|
|
56
73
|
const customCategory = {
|
|
57
|
-
label: ( localize(
|
|
74
|
+
label: ( localize(6752, "Custom")),
|
|
58
75
|
order: 1
|
|
59
76
|
};
|
|
60
77
|
const policyDisabledCategory = {
|
|
61
|
-
label: ( localize(
|
|
78
|
+
label: ( localize(6753, "Managed by your organization")),
|
|
62
79
|
order: 999,
|
|
63
80
|
showHeader: true
|
|
64
81
|
};
|
|
@@ -73,11 +90,11 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
73
90
|
if (mode.source?.storage === PromptsStorage.extension) {
|
|
74
91
|
icon = Codicon.eye;
|
|
75
92
|
id = `viewAgent:${mode.id}`;
|
|
76
|
-
label = ( localize(
|
|
93
|
+
label = ( localize(6754, "View {0} agent", mode.label.get()));
|
|
77
94
|
} else {
|
|
78
95
|
icon = Codicon.edit;
|
|
79
96
|
id = `editAgent:${mode.id}`;
|
|
80
|
-
label = ( localize(
|
|
97
|
+
label = ( localize(6755, "Edit {0} agent", mode.label.get()));
|
|
81
98
|
}
|
|
82
99
|
const modeResource = mode.uri;
|
|
83
100
|
toolbarActions.push({
|
|
@@ -90,27 +107,6 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
90
107
|
openerService.open(modeResource.get());
|
|
91
108
|
}
|
|
92
109
|
});
|
|
93
|
-
} else if (customAgentTarget === Target.Undefined) {
|
|
94
|
-
const label = ( localize(6206, "Configure tools for {0} agent", mode.label.get()));
|
|
95
|
-
toolbarActions.push({
|
|
96
|
-
id: `configureTools:${mode.id}`,
|
|
97
|
-
label,
|
|
98
|
-
tooltip: label,
|
|
99
|
-
class: ThemeIcon.asClassName(Codicon.tools),
|
|
100
|
-
enabled: true,
|
|
101
|
-
run: async () => {
|
|
102
|
-
actionWidgetService.hide();
|
|
103
|
-
if (currentMode.id !== mode.id) {
|
|
104
|
-
await commandService.executeCommand(ToggleAgentModeActionId, {
|
|
105
|
-
modeId: mode.id,
|
|
106
|
-
sessionResource: this.delegate.sessionResource()
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
await commandService.executeCommand("workbench.action.chat.configureTools", pickerOptions.actionContext, {
|
|
110
|
-
source: "modePicker"
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
return {
|
|
@@ -151,31 +147,35 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
151
147
|
content: mode.description.get() ?? chatAgentService.getDefaultAgent(ChatAgentLocation.Chat, mode.kind)?.description ?? action.tooltip,
|
|
152
148
|
position: this.pickerOptions.hoverPosition
|
|
153
149
|
},
|
|
154
|
-
icon: mode.icon.get() ?? (isModeConsideredBuiltIn(mode, this._productService) ? builtinDefaultIcon : undefined),
|
|
150
|
+
icon: mode.icon.get() ?? (isModeConsideredBuiltIn(mode, this._productService) ? builtinDefaultIcon(mode) : undefined),
|
|
155
151
|
category: agentModeDisabledViaPolicy ? policyDisabledCategory : customCategory
|
|
156
152
|
};
|
|
157
153
|
};
|
|
158
|
-
const isUserDefinedCustomAgent = mode => {
|
|
159
|
-
if (mode.isBuiltin || !mode.source) {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
return mode.source.storage === PromptsStorage.local || mode.source.storage === PromptsStorage.user;
|
|
163
|
-
};
|
|
164
154
|
const actionProviderWithCustomAgentTarget = {
|
|
165
155
|
getActions: () => {
|
|
166
156
|
const modes = chatModeService.getModes();
|
|
167
157
|
const currentMode = delegate.currentMode.get();
|
|
168
158
|
const filteredCustomModes = modes.custom.filter(mode => {
|
|
169
159
|
const target = mode.target.get();
|
|
170
|
-
return
|
|
160
|
+
return target === customAgentTarget || target === Target.Undefined;
|
|
171
161
|
});
|
|
162
|
+
const customModes = groupBy(
|
|
163
|
+
filteredCustomModes,
|
|
164
|
+
mode => isModeConsideredBuiltIn(mode, this._productService) ? "builtin" : "custom"
|
|
165
|
+
);
|
|
172
166
|
const checked = currentMode.id === ChatMode.Agent.id;
|
|
173
167
|
const defaultAction = {
|
|
174
168
|
...makeAction(ChatMode.Agent, ChatMode.Agent),
|
|
175
169
|
checked
|
|
176
170
|
};
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
defaultAction.category = builtInCategory;
|
|
172
|
+
const builtInActions = customModes.builtin?.map(mode => {
|
|
173
|
+
const action = makeActionFromCustomMode(mode, currentMode);
|
|
174
|
+
action.category = builtInCategory;
|
|
175
|
+
return action;
|
|
176
|
+
}) ?? [];
|
|
177
|
+
const customActions = customModes.custom?.map(mode => makeActionFromCustomMode(mode, currentMode)) ?? [];
|
|
178
|
+
return [defaultAction, ...builtInActions, ...customActions];
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
const actionProvider = {
|
|
@@ -183,12 +183,17 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
183
183
|
const modes = chatModeService.getModes();
|
|
184
184
|
const currentMode = delegate.currentMode.get();
|
|
185
185
|
const agentMode = modes.builtin.find(mode => mode.id === ChatMode.Agent.id);
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
const otherBuiltinModes = modes.builtin.filter(mode => {
|
|
187
|
+
return mode.id !== ChatMode.Agent.id && shouldShowBuiltInMode(mode, assignments.get(), agentModeDisabledViaPolicy);
|
|
188
|
+
});
|
|
189
|
+
const filteredCustomModes = modes.custom.filter(mode => {
|
|
190
|
+
if (isModeConsideredBuiltIn(mode, this._productService)) {
|
|
191
|
+
return shouldShowBuiltInMode(mode, assignments.get(), agentModeDisabledViaPolicy);
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
});
|
|
190
195
|
const customModes = groupBy(
|
|
191
|
-
|
|
196
|
+
filteredCustomModes,
|
|
192
197
|
mode => isModeConsideredBuiltIn(mode, this._productService) ? "builtin" : "custom"
|
|
193
198
|
);
|
|
194
199
|
const customBuiltinModeActions = customModes.builtin?.map(mode => {
|
|
@@ -210,6 +215,7 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
210
215
|
},
|
|
211
216
|
showItemKeybindings: true,
|
|
212
217
|
reporter: {
|
|
218
|
+
id: "ChatModePicker",
|
|
213
219
|
name: "ChatModePicker",
|
|
214
220
|
includeOptions: true
|
|
215
221
|
}
|
|
@@ -233,6 +239,16 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
233
239
|
this.renderLabel(this.element);
|
|
234
240
|
}
|
|
235
241
|
}));
|
|
242
|
+
assignmentService.getTreatment("chat.showOldAskMode").then(showOldAskMode => {
|
|
243
|
+
assignments.set({
|
|
244
|
+
showOldAskMode: showOldAskMode === "enabled"
|
|
245
|
+
}, undefined);
|
|
246
|
+
});
|
|
247
|
+
this._register(assignmentService.onDidRefetchAssignments(async () => {
|
|
248
|
+
assignments.set({
|
|
249
|
+
showOldAskMode: (await assignmentService.getTreatment("chat.showOldAskMode")) === "enabled"
|
|
250
|
+
}, undefined);
|
|
251
|
+
}));
|
|
236
252
|
}
|
|
237
253
|
getModePickerActionBarActions() {
|
|
238
254
|
const menuActions = this.menuService.createMenu(MenuId.ChatModePicker, this.contextKeyService);
|
|
@@ -249,7 +265,7 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
249
265
|
const state = currentMode.label.get();
|
|
250
266
|
let icon = currentMode.icon.get();
|
|
251
267
|
if (!icon && isModeConsideredBuiltIn(currentMode, this._productService)) {
|
|
252
|
-
icon = builtinDefaultIcon;
|
|
268
|
+
icon = builtinDefaultIcon(currentMode);
|
|
253
269
|
}
|
|
254
270
|
const labelElements = [];
|
|
255
271
|
if (icon) {
|
|
@@ -263,7 +279,7 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
263
279
|
return null;
|
|
264
280
|
}
|
|
265
281
|
};
|
|
266
|
-
ModePickerActionItem = ( __decorate([( __param(3, IActionWidgetService)), ( __param(4, IChatAgentService)), ( __param(5, IKeybindingService)), ( __param(6, IConfigurationService)), ( __param(7, IContextKeyService)), ( __param(8, IChatModeService)), ( __param(9, IMenuService)), ( __param(10, ICommandService)), ( __param(11, IProductService)), ( __param(12, ITelemetryService)), ( __param(13, IOpenerService))], ModePickerActionItem));
|
|
282
|
+
ModePickerActionItem = ( __decorate([( __param(3, IActionWidgetService)), ( __param(4, IChatAgentService)), ( __param(5, IKeybindingService)), ( __param(6, IConfigurationService)), ( __param(7, IContextKeyService)), ( __param(8, IChatModeService)), ( __param(9, IMenuService)), ( __param(10, ICommandService)), ( __param(11, IProductService)), ( __param(12, ITelemetryService)), ( __param(13, IOpenerService)), ( __param(14, IWorkbenchAssignmentService))], ModePickerActionItem));
|
|
267
283
|
function isModeConsideredBuiltIn(mode, productService) {
|
|
268
284
|
if (mode.isBuiltin) {
|
|
269
285
|
return true;
|
|
@@ -281,5 +297,22 @@ function isModeConsideredBuiltIn(mode, productService) {
|
|
|
281
297
|
}
|
|
282
298
|
return !isOrganizationPromptFile(modeUri, mode.source.extensionId, productService);
|
|
283
299
|
}
|
|
300
|
+
function shouldShowBuiltInMode(mode, assignments, agentModeDisabledViaPolicy) {
|
|
301
|
+
if (mode.id === ChatMode.Edit.id || mode.name.get().toLowerCase() === "edit") {
|
|
302
|
+
if (mode.id === ChatMode.Edit.id) {
|
|
303
|
+
return agentModeDisabledViaPolicy;
|
|
304
|
+
} else {
|
|
305
|
+
return !agentModeDisabledViaPolicy;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (mode.id === ChatMode.Ask.id || mode.name.get().toLowerCase() === "ask") {
|
|
309
|
+
if (mode.id === ChatMode.Ask.id) {
|
|
310
|
+
return assignments.showOldAskMode || agentModeDisabledViaPolicy;
|
|
311
|
+
} else {
|
|
312
|
+
return !(assignments.showOldAskMode || agentModeDisabledViaPolicy);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
284
317
|
|
|
285
318
|
export { ModePickerActionItem };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface IModelPickerDelegate {
|
|
|
16
16
|
readonly currentModel: IObservable<ILanguageModelChatMetadataAndIdentifier | undefined>;
|
|
17
17
|
setModel(model: ILanguageModelChatMetadataAndIdentifier): void;
|
|
18
18
|
getModels(): ILanguageModelChatMetadataAndIdentifier[];
|
|
19
|
+
canManageModels(): boolean;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Action view item for selecting a language model in the chat interface.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseActionViewItem } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems";
|
|
2
|
+
import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
3
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
6
|
+
import { IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
|
|
7
|
+
import { IModelPickerDelegate } from "./modelPickerActionItem.js";
|
|
8
|
+
/**
|
|
9
|
+
* Enhanced action view item for selecting a language model in the chat interface.
|
|
10
|
+
*
|
|
11
|
+
* Wraps a {@link ModelPickerWidget} and adapts it for use in an action bar,
|
|
12
|
+
* providing curated model suggestions, upgrade prompts, and grouped layout.
|
|
13
|
+
*/
|
|
14
|
+
export declare class EnhancedModelPickerActionItem extends BaseActionViewItem {
|
|
15
|
+
private readonly pickerOptions;
|
|
16
|
+
private readonly _contextKeyService;
|
|
17
|
+
private readonly keybindingService;
|
|
18
|
+
private readonly _pickerWidget;
|
|
19
|
+
private readonly _managedHover;
|
|
20
|
+
constructor(action: IAction, delegate: IModelPickerDelegate, pickerOptions: IChatInputPickerOptions, instantiationService: IInstantiationService, _contextKeyService: IContextKeyService, keybindingService: IKeybindingService);
|
|
21
|
+
render(container: HTMLElement): void;
|
|
22
|
+
private _getAnchorElement;
|
|
23
|
+
openModelPicker(): void;
|
|
24
|
+
show(): void;
|
|
25
|
+
private _showPicker;
|
|
26
|
+
private _updateTooltip;
|
|
27
|
+
private _getHoverContents;
|
|
28
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { getActiveWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { getBaseLayerHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegate2';
|
|
5
|
+
import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
6
|
+
import { BaseActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
7
|
+
import { MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
9
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
12
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
13
|
+
import { ModelPickerWidget } from './chatModelPicker.js';
|
|
14
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
15
|
+
|
|
16
|
+
let EnhancedModelPickerActionItem = class EnhancedModelPickerActionItem extends BaseActionViewItem {
|
|
17
|
+
constructor(
|
|
18
|
+
action,
|
|
19
|
+
delegate,
|
|
20
|
+
pickerOptions,
|
|
21
|
+
instantiationService,
|
|
22
|
+
_contextKeyService,
|
|
23
|
+
keybindingService
|
|
24
|
+
) {
|
|
25
|
+
super(undefined, action);
|
|
26
|
+
this.pickerOptions = pickerOptions;
|
|
27
|
+
this._contextKeyService = _contextKeyService;
|
|
28
|
+
this.keybindingService = keybindingService;
|
|
29
|
+
this._managedHover = this._register(( new MutableDisposable()));
|
|
30
|
+
this._pickerWidget = this._register(instantiationService.createInstance(ModelPickerWidget, delegate));
|
|
31
|
+
this._pickerWidget.setSelectedModel(delegate.currentModel.get());
|
|
32
|
+
this._register(autorun(t => {
|
|
33
|
+
const model = delegate.currentModel.read(t);
|
|
34
|
+
this._pickerWidget.setSelectedModel(model);
|
|
35
|
+
this._updateTooltip();
|
|
36
|
+
}));
|
|
37
|
+
this._register(this._pickerWidget.onDidChangeSelection(model => delegate.setModel(model)));
|
|
38
|
+
}
|
|
39
|
+
render(container) {
|
|
40
|
+
this._pickerWidget.render(container);
|
|
41
|
+
this.element = this._pickerWidget.domNode;
|
|
42
|
+
this._updateTooltip();
|
|
43
|
+
container.classList.add("chat-input-picker-item");
|
|
44
|
+
}
|
|
45
|
+
_getAnchorElement() {
|
|
46
|
+
if (this.element && getActiveWindow().document.contains(this.element)) {
|
|
47
|
+
return this.element;
|
|
48
|
+
}
|
|
49
|
+
return this.pickerOptions.getOverflowAnchor?.() ?? this.element;
|
|
50
|
+
}
|
|
51
|
+
openModelPicker() {
|
|
52
|
+
this._showPicker();
|
|
53
|
+
}
|
|
54
|
+
show() {
|
|
55
|
+
this._showPicker();
|
|
56
|
+
}
|
|
57
|
+
_showPicker() {
|
|
58
|
+
this._pickerWidget.show(this._getAnchorElement());
|
|
59
|
+
}
|
|
60
|
+
_updateTooltip() {
|
|
61
|
+
if (!this.element) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const hoverContent = this._getHoverContents();
|
|
65
|
+
if (typeof hoverContent === "string" && hoverContent) {
|
|
66
|
+
this._managedHover.value = getBaseLayerHoverDelegate().setupManagedHover(getDefaultHoverDelegate("mouse"), this.element, hoverContent);
|
|
67
|
+
} else {
|
|
68
|
+
this._managedHover.clear();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_getHoverContents() {
|
|
72
|
+
let label = ( localize(6756, "Pick Model"));
|
|
73
|
+
const keybindingLabel = this.keybindingService.lookupKeybinding(this._action.id, this._contextKeyService)?.getLabel();
|
|
74
|
+
if (keybindingLabel) {
|
|
75
|
+
label += ` (${keybindingLabel})`;
|
|
76
|
+
}
|
|
77
|
+
const {
|
|
78
|
+
statusIcon,
|
|
79
|
+
tooltip
|
|
80
|
+
} = this._pickerWidget.selectedModel?.metadata || {};
|
|
81
|
+
return statusIcon && tooltip ? `${label} • ${tooltip}` : label;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
EnhancedModelPickerActionItem = ( __decorate([( __param(3, IInstantiationService)), ( __param(4, IContextKeyService)), ( __param(5, IKeybindingService))], EnhancedModelPickerActionItem));
|
|
85
|
+
|
|
86
|
+
export { EnhancedModelPickerActionItem };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js
CHANGED
|
@@ -17,11 +17,11 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
|
|
|
17
17
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
18
18
|
|
|
19
19
|
const firstPartyCategory = {
|
|
20
|
-
label: ( localize(
|
|
20
|
+
label: ( localize(6757, "Agent Types")),
|
|
21
21
|
order: 1
|
|
22
22
|
};
|
|
23
23
|
const otherCategory = {
|
|
24
|
-
label: ( localize(
|
|
24
|
+
label: ( localize(6758, "Other")),
|
|
25
25
|
order: 2
|
|
26
26
|
};
|
|
27
27
|
let SessionTypePickerActionItem = class SessionTypePickerActionItem extends ChatInputPickerActionViewItem {
|
|
@@ -81,6 +81,7 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
81
81
|
actionBarActionProvider,
|
|
82
82
|
showItemKeybindings: true,
|
|
83
83
|
reporter: {
|
|
84
|
+
id: "ChatSessionTypePicker",
|
|
84
85
|
name: `ChatSessionTypePicker`,
|
|
85
86
|
includeOptions: true
|
|
86
87
|
}
|
|
@@ -132,7 +133,7 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
132
133
|
const learnMoreUrl = "https://code.visualstudio.com/docs/copilot/agents/overview";
|
|
133
134
|
return {
|
|
134
135
|
id: "workbench.action.chat.agentOverview.learnMore",
|
|
135
|
-
label: ( localize(
|
|
136
|
+
label: ( localize(6759, "Learn about agent types...")),
|
|
136
137
|
tooltip: learnMoreUrl,
|
|
137
138
|
class: undefined,
|
|
138
139
|
enabled: true,
|
|
@@ -168,7 +169,10 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
168
169
|
return true;
|
|
169
170
|
}
|
|
170
171
|
_isSessionTypeEnabled(type) {
|
|
171
|
-
|
|
172
|
+
if (type === AgentSessionProviders.Local) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
return !!this.chatSessionsService.getChatSessionContribution(type);
|
|
172
176
|
}
|
|
173
177
|
_getSessionCategory(sessionTypeItem) {
|
|
174
178
|
return isFirstPartyAgentSessionProvider(sessionTypeItem.type) ? firstPartyCategory : otherCategory;
|
|
@@ -183,7 +187,7 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
183
187
|
const icon = getAgentSessionProviderIcon(currentType ?? AgentSessionProviders.Local);
|
|
184
188
|
const labelElements = [];
|
|
185
189
|
labelElements.push(...renderLabelWithIcons(`$(${icon.id})`));
|
|
186
|
-
if (
|
|
190
|
+
if (!this.pickerOptions.onlyShowIconsForDefaultActions.get()) {
|
|
187
191
|
labelElements.push($("span.chat-input-picker-label", undefined, label));
|
|
188
192
|
}
|
|
189
193
|
labelElements.push(...renderLabelWithIcons(`$(chevron-down)`));
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js
CHANGED
|
@@ -48,10 +48,10 @@ let WorkspacePickerActionItem = class WorkspacePickerActionItem extends ChatInpu
|
|
|
48
48
|
actions.push({
|
|
49
49
|
...action,
|
|
50
50
|
id: "workspace.openFolder",
|
|
51
|
-
label: ( localize(
|
|
51
|
+
label: ( localize(6760, "Open Folder...")),
|
|
52
52
|
checked: false,
|
|
53
53
|
enabled: true,
|
|
54
|
-
tooltip: ( localize(
|
|
54
|
+
tooltip: ( localize(6761, "Open Folder...")),
|
|
55
55
|
run: async () => {
|
|
56
56
|
this.commandService.executeCommand(this.delegate.openFolderCommand);
|
|
57
57
|
}
|
|
@@ -67,6 +67,7 @@ let WorkspacePickerActionItem = class WorkspacePickerActionItem extends ChatInpu
|
|
|
67
67
|
actionBarActionProvider,
|
|
68
68
|
showItemKeybindings: false,
|
|
69
69
|
reporter: {
|
|
70
|
+
id: "ChatWorkspacePicker",
|
|
70
71
|
name: "ChatWorkspacePicker",
|
|
71
72
|
includeOptions: false
|
|
72
73
|
}
|
|
@@ -103,7 +104,7 @@ let WorkspacePickerActionItem = class WorkspacePickerActionItem extends ChatInpu
|
|
|
103
104
|
labelElements.push($("span.chat-input-picker-label", undefined, label));
|
|
104
105
|
} else {
|
|
105
106
|
labelElements.push(...renderLabelWithIcons(`$(folder)`));
|
|
106
|
-
labelElements.push($("span.chat-input-picker-label", undefined, ( localize(
|
|
107
|
+
labelElements.push($("span.chat-input-picker-label", undefined, ( localize(6762, "Workspace"))));
|
|
107
108
|
}
|
|
108
109
|
labelElements.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
109
110
|
reset(element, ...labelElements);
|