@codingame/monaco-vscode-katex-common 27.0.0 → 28.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.js +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +30 -2
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +17 -11
- 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 +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
- 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 +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +63 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +133 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +38 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +72 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
- 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.d.ts +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.d.ts +1 -1
- 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.d.ts +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/chatCollapsibleContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +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.d.ts +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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +26 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +290 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
- 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 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
- 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 +6 -6
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +22 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +12 -18
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
- 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.d.ts +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 +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +129 -117
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
- 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/chatMcpAppModel.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +56 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +20 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +43 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +42 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -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.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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -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 +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +61 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +7 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +81 -191
- 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 +31 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +334 -181
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +51 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +16 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +10 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +174 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +12 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +19 -4
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +22 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +24 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +38 -46
- 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/terminal/browser/chatTerminalCommandMirror.js +6 -10
|
@@ -16,13 +16,14 @@ import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
16
16
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
17
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
18
18
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
19
|
+
import { IsSessionsWindowContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
19
20
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
20
21
|
import { getModeNameForTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
21
22
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
22
23
|
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
23
24
|
import { ChatStopCancellationNoopEventName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
24
25
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
25
|
-
import { ChatModeKind,
|
|
26
|
+
import { ChatModeKind, ChatAgentLocation, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
26
27
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
27
28
|
import { isInClaudeAgentsFolder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
28
29
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
@@ -69,13 +70,13 @@ class SubmitAction extends Action2 {
|
|
|
69
70
|
if (editsToUndo === 1) {
|
|
70
71
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
71
72
|
message = ( localize(
|
|
72
|
-
|
|
73
|
+
4876,
|
|
73
74
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
74
75
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
75
76
|
));
|
|
76
77
|
} else {
|
|
77
78
|
message = ( localize(
|
|
78
|
-
|
|
79
|
+
4877,
|
|
79
80
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
80
81
|
entriesModifiedInRequestsToRemove.length
|
|
81
82
|
));
|
|
@@ -83,24 +84,24 @@ class SubmitAction extends Action2 {
|
|
|
83
84
|
} else {
|
|
84
85
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
85
86
|
message = ( localize(
|
|
86
|
-
|
|
87
|
+
4878,
|
|
87
88
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
88
89
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
89
90
|
));
|
|
90
91
|
} else {
|
|
91
92
|
message = ( localize(
|
|
92
|
-
|
|
93
|
+
4879,
|
|
93
94
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
94
95
|
entriesModifiedInRequestsToRemove.length
|
|
95
96
|
));
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
99
|
-
title: editsToUndo === 1 ? ( localize(
|
|
100
|
+
title: editsToUndo === 1 ? ( localize(4880, "Do you want to undo your last edit?")) : ( localize(4881, "Do you want to undo {0} edits?", editsToUndo)),
|
|
100
101
|
message: message,
|
|
101
|
-
primaryButton: ( localize(
|
|
102
|
+
primaryButton: ( localize(4882, "Yes")),
|
|
102
103
|
checkbox: {
|
|
103
|
-
label: ( localize(
|
|
104
|
+
label: ( localize(4883, "Don't ask again")),
|
|
104
105
|
checked: false
|
|
105
106
|
},
|
|
106
107
|
type: "info"
|
|
@@ -155,6 +156,9 @@ const requestInProgressOrPendingToolCall = ( ContextKeyExpr.or(
|
|
|
155
156
|
ChatContextKeys.Editing.hasToolConfirmation,
|
|
156
157
|
ChatContextKeys.Editing.hasQuestionCarousel
|
|
157
158
|
));
|
|
159
|
+
const requestInProgressWithoutInput = ( ContextKeyExpr.and(ChatContextKeys.requestInProgress, ( ChatContextKeys.inputHasText.negate())));
|
|
160
|
+
const pendingToolCall = ( ContextKeyExpr.or(ChatContextKeys.Editing.hasToolConfirmation, ( ContextKeyExpr.and(ChatContextKeys.Editing.hasQuestionCarousel, ( ChatContextKeys.inputHasText.negate())))));
|
|
161
|
+
const noQuestionCarouselOrHasInput = ( ContextKeyExpr.or(( ChatContextKeys.Editing.hasQuestionCarousel.negate()), ChatContextKeys.inputHasText));
|
|
158
162
|
const whenNotInProgress = ( ChatContextKeys.requestInProgress.negate());
|
|
159
163
|
class ChatSubmitAction extends SubmitAction {
|
|
160
164
|
static {
|
|
@@ -169,7 +173,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
169
173
|
));
|
|
170
174
|
super({
|
|
171
175
|
id: ChatSubmitAction.ID,
|
|
172
|
-
title: ( localize2(
|
|
176
|
+
title: ( localize2(4884, "Send")),
|
|
173
177
|
f1: false,
|
|
174
178
|
category: CHAT_CATEGORY,
|
|
175
179
|
icon: Codicon.arrowUp,
|
|
@@ -177,7 +181,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
177
181
|
toggled: {
|
|
178
182
|
condition: ChatContextKeys.lockedToCodingAgent,
|
|
179
183
|
icon: Codicon.arrowUp,
|
|
180
|
-
tooltip: ( localize(
|
|
184
|
+
tooltip: ( localize(4885, "Send to Agent"))
|
|
181
185
|
},
|
|
182
186
|
keybinding: {
|
|
183
187
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
@@ -187,11 +191,11 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
187
191
|
menu: [{
|
|
188
192
|
id: MenuId.ChatExecute,
|
|
189
193
|
order: 4,
|
|
190
|
-
when: ( ContextKeyExpr.and(whenNotInProgress, menuCondition, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
194
|
+
when: ( ContextKeyExpr.and(whenNotInProgress, menuCondition, ( ChatContextKeys.withinEditSessionDiff.negate()), noQuestionCarouselOrHasInput)),
|
|
191
195
|
group: "navigation",
|
|
192
196
|
alt: {
|
|
193
197
|
id: "workbench.action.chat.sendToNewChat",
|
|
194
|
-
title: ( localize2(
|
|
198
|
+
title: ( localize2(4886, "Send to New Chat")),
|
|
195
199
|
icon: Codicon.plus
|
|
196
200
|
}
|
|
197
201
|
}, {
|
|
@@ -211,7 +215,7 @@ class ToggleChatModeAction extends Action2 {
|
|
|
211
215
|
constructor() {
|
|
212
216
|
super({
|
|
213
217
|
id: ToggleChatModeAction.ID,
|
|
214
|
-
title: ( localize2(
|
|
218
|
+
title: ( localize2(4887, "Switch to Next Agent")),
|
|
215
219
|
f1: true,
|
|
216
220
|
category: CHAT_CATEGORY,
|
|
217
221
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.requestInProgress.negate())))
|
|
@@ -219,7 +223,6 @@ class ToggleChatModeAction extends Action2 {
|
|
|
219
223
|
}
|
|
220
224
|
async run(accessor, ...args) {
|
|
221
225
|
const commandService = accessor.get(ICommandService);
|
|
222
|
-
const configurationService = accessor.get(IConfigurationService);
|
|
223
226
|
const instaService = accessor.get(IInstantiationService);
|
|
224
227
|
const modeService = accessor.get(IChatModeService);
|
|
225
228
|
const telemetryService = accessor.get(ITelemetryService);
|
|
@@ -236,7 +239,7 @@ class ToggleChatModeAction extends Action2 {
|
|
|
236
239
|
}
|
|
237
240
|
const chatSession = widget.viewModel?.model;
|
|
238
241
|
const requestCount = chatSession?.getRequests().length ?? 0;
|
|
239
|
-
const switchToMode = (arg && (modeService.findModeById(arg.modeId) || modeService.findModeByName(arg.modeId))) ?? this.getNextMode(widget, requestCount,
|
|
242
|
+
const switchToMode = (arg && (modeService.findModeById(arg.modeId) || modeService.findModeByName(arg.modeId))) ?? this.getNextMode(widget, requestCount, modeService);
|
|
240
243
|
const currentMode = widget.input.currentModeObs.get();
|
|
241
244
|
if (switchToMode.id === currentMode.id) {
|
|
242
245
|
return;
|
|
@@ -272,10 +275,10 @@ class ToggleChatModeAction extends Action2 {
|
|
|
272
275
|
await commandService.executeCommand(ACTION_ID_NEW_CHAT);
|
|
273
276
|
}
|
|
274
277
|
}
|
|
275
|
-
getNextMode(chatWidget, requestCount,
|
|
278
|
+
getNextMode(chatWidget, requestCount, modeService) {
|
|
276
279
|
const modes = modeService.getModes();
|
|
277
280
|
const flat = [...modes.builtin.filter(mode => {
|
|
278
|
-
return mode.kind !== ChatModeKind.Edit ||
|
|
281
|
+
return mode.kind !== ChatModeKind.Edit || requestCount === 0;
|
|
279
282
|
}), ...(modes.custom ?? [])];
|
|
280
283
|
const curModeIndex = flat.findIndex(mode => mode.id === chatWidget.input.currentModeObs.get().id);
|
|
281
284
|
const newMode = flat[(curModeIndex + 1) % flat.length];
|
|
@@ -289,7 +292,7 @@ class SwitchToNextModelAction extends Action2 {
|
|
|
289
292
|
constructor() {
|
|
290
293
|
super({
|
|
291
294
|
id: SwitchToNextModelAction.ID,
|
|
292
|
-
title: ( localize2(
|
|
295
|
+
title: ( localize2(4888, "Switch to Next Model")),
|
|
293
296
|
category: CHAT_CATEGORY,
|
|
294
297
|
f1: true,
|
|
295
298
|
precondition: ChatContextKeys.enabled
|
|
@@ -308,7 +311,7 @@ class OpenModelPickerAction extends Action2 {
|
|
|
308
311
|
constructor() {
|
|
309
312
|
super({
|
|
310
313
|
id: OpenModelPickerAction.ID,
|
|
311
|
-
title: ( localize2(
|
|
314
|
+
title: ( localize2(4889, "Open Model Picker")),
|
|
312
315
|
category: CHAT_CATEGORY,
|
|
313
316
|
f1: false,
|
|
314
317
|
keybinding: {
|
|
@@ -335,6 +338,34 @@ class OpenModelPickerAction extends Action2 {
|
|
|
335
338
|
}
|
|
336
339
|
}
|
|
337
340
|
}
|
|
341
|
+
class OpenPermissionPickerAction extends Action2 {
|
|
342
|
+
static {
|
|
343
|
+
this.ID = "workbench.action.chat.openPermissionPicker";
|
|
344
|
+
}
|
|
345
|
+
constructor() {
|
|
346
|
+
super({
|
|
347
|
+
id: OpenPermissionPickerAction.ID,
|
|
348
|
+
title: ( localize2(4890, "Open Permission Picker")),
|
|
349
|
+
tooltip: ( localize(4891, "Set Permissions")),
|
|
350
|
+
category: CHAT_CATEGORY,
|
|
351
|
+
f1: false,
|
|
352
|
+
precondition: ChatContextKeys.enabled,
|
|
353
|
+
menu: {
|
|
354
|
+
id: MenuId.ChatInputSecondary,
|
|
355
|
+
order: 10,
|
|
356
|
+
group: "navigation",
|
|
357
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Ask)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.lockedToCodingAgent.negate()), ( IsSessionsWindowContext.negate())))
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
async run(accessor) {
|
|
362
|
+
const widgetService = accessor.get(IChatWidgetService);
|
|
363
|
+
const widget = widgetService.lastFocusedWidget;
|
|
364
|
+
if (widget) {
|
|
365
|
+
widget.input.openPermissionPicker();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
338
369
|
class OpenModePickerAction extends Action2 {
|
|
339
370
|
static {
|
|
340
371
|
this.ID = "workbench.action.chat.openModePicker";
|
|
@@ -342,8 +373,8 @@ class OpenModePickerAction extends Action2 {
|
|
|
342
373
|
constructor() {
|
|
343
374
|
super({
|
|
344
375
|
id: OpenModePickerAction.ID,
|
|
345
|
-
title: ( localize2(
|
|
346
|
-
tooltip: ( localize(
|
|
376
|
+
title: ( localize2(4892, "Open Agent Picker")),
|
|
377
|
+
tooltip: ( localize(4893, "Set Agent")),
|
|
347
378
|
category: CHAT_CATEGORY,
|
|
348
379
|
f1: false,
|
|
349
380
|
precondition: ChatContextKeys.enabled,
|
|
@@ -356,7 +387,7 @@ class OpenModePickerAction extends Action2 {
|
|
|
356
387
|
id: MenuId.ChatInput,
|
|
357
388
|
order: 1,
|
|
358
389
|
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ContextKeyExpr.or(( ChatContextKeys.lockedToCodingAgent.negate()), ChatContextKeys.chatSessionHasCustomAgentTarget)), (
|
|
359
|
-
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local)))))),
|
|
390
|
+
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ChatContextKeys.chatSessionHasCustomAgentTarget, ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local)))))),
|
|
360
391
|
group: "navigation"
|
|
361
392
|
}]
|
|
362
393
|
});
|
|
@@ -376,15 +407,20 @@ class OpenSessionTargetPickerAction extends Action2 {
|
|
|
376
407
|
constructor() {
|
|
377
408
|
super({
|
|
378
409
|
id: OpenSessionTargetPickerAction.ID,
|
|
379
|
-
title: ( localize2(
|
|
380
|
-
tooltip: ( localize(
|
|
410
|
+
title: ( localize2(4894, "Open Session Target Picker")),
|
|
411
|
+
tooltip: ( localize(4895, "Set Session Target")),
|
|
381
412
|
category: CHAT_CATEGORY,
|
|
382
413
|
f1: false,
|
|
383
414
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(ChatContextKeys.chatSessionIsEmpty, ChatContextKeys.inAgentSessionsWelcome)), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
384
415
|
menu: [{
|
|
385
416
|
id: MenuId.ChatInput,
|
|
386
417
|
order: 0,
|
|
387
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ChatContextKeys.chatSessionIsEmpty)),
|
|
418
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ChatContextKeys.chatSessionIsEmpty, IsSessionsWindowContext)),
|
|
419
|
+
group: "navigation"
|
|
420
|
+
}, {
|
|
421
|
+
id: MenuId.ChatInputSecondary,
|
|
422
|
+
order: 0,
|
|
423
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( IsSessionsWindowContext.negate()), ChatContextKeys.chatSessionIsEmpty)),
|
|
388
424
|
group: "navigation"
|
|
389
425
|
}]
|
|
390
426
|
});
|
|
@@ -404,15 +440,20 @@ class OpenDelegationPickerAction extends Action2 {
|
|
|
404
440
|
constructor() {
|
|
405
441
|
super({
|
|
406
442
|
id: OpenDelegationPickerAction.ID,
|
|
407
|
-
title: ( localize2(
|
|
408
|
-
tooltip: ( localize(
|
|
443
|
+
title: ( localize2(4896, "Open Delegation Picker")),
|
|
444
|
+
tooltip: ( localize(4897, "Delegate Session")),
|
|
409
445
|
category: CHAT_CATEGORY,
|
|
410
446
|
f1: false,
|
|
411
447
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.chatSessionIsEmpty.negate()), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
412
448
|
menu: [{
|
|
413
449
|
id: MenuId.ChatInput,
|
|
414
450
|
order: 0.5,
|
|
415
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.chatSessionIsEmpty.negate()))),
|
|
451
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.chatSessionIsEmpty.negate()), IsSessionsWindowContext)),
|
|
452
|
+
group: "navigation"
|
|
453
|
+
}, {
|
|
454
|
+
id: MenuId.ChatInputSecondary,
|
|
455
|
+
order: 0.5,
|
|
456
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.chatSessionIsEmpty.negate()), ( IsSessionsWindowContext.negate()))),
|
|
416
457
|
group: "navigation"
|
|
417
458
|
}]
|
|
418
459
|
});
|
|
@@ -432,15 +473,20 @@ class OpenWorkspacePickerAction extends Action2 {
|
|
|
432
473
|
constructor() {
|
|
433
474
|
super({
|
|
434
475
|
id: OpenWorkspacePickerAction.ID,
|
|
435
|
-
title: ( localize2(
|
|
436
|
-
tooltip: ( localize(
|
|
476
|
+
title: ( localize2(4898, "Open Workspace Picker")),
|
|
477
|
+
tooltip: ( localize(4899, "Select Target Workspace")),
|
|
437
478
|
category: CHAT_CATEGORY,
|
|
438
479
|
f1: false,
|
|
439
480
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.inAgentSessionsWelcome)),
|
|
440
481
|
menu: [{
|
|
441
482
|
id: MenuId.ChatInput,
|
|
442
483
|
order: 0.6,
|
|
443
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo("local")))),
|
|
484
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo("local")), IsSessionsWindowContext)),
|
|
485
|
+
group: "navigation"
|
|
486
|
+
}, {
|
|
487
|
+
id: MenuId.ChatInputSecondary,
|
|
488
|
+
order: 0.6,
|
|
489
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo("local")), ( IsSessionsWindowContext.negate()))),
|
|
444
490
|
group: "navigation"
|
|
445
491
|
}]
|
|
446
492
|
});
|
|
@@ -454,7 +500,7 @@ class ChatSessionPrimaryPickerAction extends Action2 {
|
|
|
454
500
|
constructor() {
|
|
455
501
|
super({
|
|
456
502
|
id: ChatSessionPrimaryPickerAction.ID,
|
|
457
|
-
title: ( localize2(
|
|
503
|
+
title: ( localize2(4900, "Open Primary Session Picker")),
|
|
458
504
|
category: CHAT_CATEGORY,
|
|
459
505
|
f1: false,
|
|
460
506
|
precondition: ChatContextKeys.enabled,
|
|
@@ -482,7 +528,7 @@ class ChangeChatModelAction extends Action2 {
|
|
|
482
528
|
constructor() {
|
|
483
529
|
super({
|
|
484
530
|
id: ChangeChatModelAction.ID,
|
|
485
|
-
title: ( localize2(
|
|
531
|
+
title: ( localize2(4901, "Change Model")),
|
|
486
532
|
category: CHAT_CATEGORY,
|
|
487
533
|
f1: false,
|
|
488
534
|
precondition: ChatContextKeys.enabled
|
|
@@ -514,7 +560,7 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
514
560
|
));
|
|
515
561
|
super({
|
|
516
562
|
id: ChatEditingSessionSubmitAction.ID,
|
|
517
|
-
title: ( localize2(
|
|
563
|
+
title: ( localize2(4902, "Send")),
|
|
518
564
|
f1: false,
|
|
519
565
|
category: CHAT_CATEGORY,
|
|
520
566
|
icon: Codicon.arrowUp,
|
|
@@ -522,11 +568,11 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
522
568
|
menu: [{
|
|
523
569
|
id: MenuId.ChatExecute,
|
|
524
570
|
order: 4,
|
|
525
|
-
when: ( ContextKeyExpr.and(notInProgressOrEditing, menuCondition)),
|
|
571
|
+
when: ( ContextKeyExpr.and(notInProgressOrEditing, menuCondition, noQuestionCarouselOrHasInput)),
|
|
526
572
|
group: "navigation",
|
|
527
573
|
alt: {
|
|
528
574
|
id: "workbench.action.chat.sendToNewChat",
|
|
529
|
-
title: ( localize2(
|
|
575
|
+
title: ( localize2(4886, "Send to New Chat")),
|
|
530
576
|
icon: Codicon.plus
|
|
531
577
|
}
|
|
532
578
|
}]
|
|
@@ -541,7 +587,7 @@ class SubmitWithoutDispatchingAction extends Action2 {
|
|
|
541
587
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress, ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask))));
|
|
542
588
|
super({
|
|
543
589
|
id: SubmitWithoutDispatchingAction.ID,
|
|
544
|
-
title: ( localize2(
|
|
590
|
+
title: ( localize2(4903, "Send")),
|
|
545
591
|
f1: false,
|
|
546
592
|
category: CHAT_CATEGORY,
|
|
547
593
|
precondition,
|
|
@@ -569,7 +615,7 @@ class ChatSubmitWithCodebaseAction extends Action2 {
|
|
|
569
615
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress));
|
|
570
616
|
super({
|
|
571
617
|
id: ChatSubmitWithCodebaseAction.ID,
|
|
572
|
-
title: ( localize2(
|
|
618
|
+
title: ( localize2(4904, "Send with {0}", `${chatVariableLeader}codebase`)),
|
|
573
619
|
precondition,
|
|
574
620
|
keybinding: {
|
|
575
621
|
when: ChatContextKeys.inChatInput,
|
|
@@ -606,7 +652,7 @@ class SendToNewChatAction extends Action2 {
|
|
|
606
652
|
const precondition = ChatContextKeys.inputHasText;
|
|
607
653
|
super({
|
|
608
654
|
id: "workbench.action.chat.sendToNewChat",
|
|
609
|
-
title: ( localize2(
|
|
655
|
+
title: ( localize2(4886, "Send to New Chat")),
|
|
610
656
|
precondition,
|
|
611
657
|
category: CHAT_CATEGORY,
|
|
612
658
|
f1: false,
|
|
@@ -651,13 +697,13 @@ class CancelAction extends Action2 {
|
|
|
651
697
|
constructor() {
|
|
652
698
|
super({
|
|
653
699
|
id: CancelAction.ID,
|
|
654
|
-
title: ( localize2(
|
|
700
|
+
title: ( localize2(4905, "Cancel")),
|
|
655
701
|
f1: false,
|
|
656
702
|
category: CHAT_CATEGORY,
|
|
657
703
|
icon: Codicon.stopCircle,
|
|
658
704
|
menu: [{
|
|
659
705
|
id: MenuId.ChatExecute,
|
|
660
|
-
when: ( ContextKeyExpr.and(
|
|
706
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(requestInProgressWithoutInput, pendingToolCall)), ( ChatContextKeys.remoteJobCreating.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
661
707
|
order: 4,
|
|
662
708
|
group: "navigation"
|
|
663
709
|
}, {
|
|
@@ -714,7 +760,7 @@ class CancelEdit extends Action2 {
|
|
|
714
760
|
constructor() {
|
|
715
761
|
super({
|
|
716
762
|
id: CancelEdit.ID,
|
|
717
|
-
title: ( localize2(
|
|
763
|
+
title: ( localize2(4906, "Cancel Edit")),
|
|
718
764
|
f1: false,
|
|
719
765
|
category: CHAT_CATEGORY,
|
|
720
766
|
icon: Codicon.x,
|
|
@@ -755,6 +801,7 @@ function registerChatExecuteActions() {
|
|
|
755
801
|
registerAction2(ToggleChatModeAction);
|
|
756
802
|
registerAction2(SwitchToNextModelAction);
|
|
757
803
|
registerAction2(OpenModelPickerAction);
|
|
804
|
+
registerAction2(OpenPermissionPickerAction);
|
|
758
805
|
registerAction2(OpenModePickerAction);
|
|
759
806
|
registerAction2(OpenSessionTargetPickerAction);
|
|
760
807
|
registerAction2(OpenDelegationPickerAction);
|
|
@@ -764,4 +811,4 @@ function registerChatExecuteActions() {
|
|
|
764
811
|
registerAction2(CancelEdit);
|
|
765
812
|
}
|
|
766
813
|
|
|
767
|
-
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId, ChatEditingSessionSubmitAction, ChatSessionPrimaryPickerAction, ChatSubmitAction, ChatSubmitWithCodebaseAction, OpenDelegationPickerAction, OpenModePickerAction, OpenModelPickerAction, OpenSessionTargetPickerAction, OpenWorkspacePickerAction, ToggleAgentModeActionId, registerChatExecuteActions };
|
|
814
|
+
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId, ChatEditingSessionSubmitAction, ChatSessionPrimaryPickerAction, ChatSubmitAction, ChatSubmitWithCodebaseAction, 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(4963, "Helpful")),
|
|
34
34
|
f1: false,
|
|
35
35
|
category: CHAT_CATEGORY,
|
|
36
36
|
icon: Codicon.thumbsup,
|
|
@@ -84,7 +84,7 @@ function registerChatTitleActions() {
|
|
|
84
84
|
constructor() {
|
|
85
85
|
super({
|
|
86
86
|
id: MarkUnhelpfulActionId,
|
|
87
|
-
title: ( localize2(
|
|
87
|
+
title: ( localize2(4964, "Unhelpful")),
|
|
88
88
|
f1: false,
|
|
89
89
|
category: CHAT_CATEGORY,
|
|
90
90
|
icon: Codicon.thumbsdown,
|
|
@@ -141,7 +141,7 @@ function registerChatTitleActions() {
|
|
|
141
141
|
constructor() {
|
|
142
142
|
super({
|
|
143
143
|
id: "workbench.action.chat.reportIssueForBug",
|
|
144
|
-
title: ( localize2(
|
|
144
|
+
title: ( localize2(4965, "Report Issue")),
|
|
145
145
|
f1: false,
|
|
146
146
|
category: CHAT_CATEGORY,
|
|
147
147
|
icon: Codicon.report,
|
|
@@ -188,7 +188,7 @@ function registerChatTitleActions() {
|
|
|
188
188
|
constructor() {
|
|
189
189
|
super({
|
|
190
190
|
id: "workbench.action.chat.retry",
|
|
191
|
-
title: ( localize2(
|
|
191
|
+
title: ( localize2(4966, "Retry")),
|
|
192
192
|
f1: false,
|
|
193
193
|
category: CHAT_CATEGORY,
|
|
194
194
|
icon: Codicon.refresh,
|
|
@@ -236,19 +236,19 @@ function registerChatTitleActions() {
|
|
|
236
236
|
const entriesModifiedInLastRequest = currentEditingSession.entries.get().filter(entry => entry.lastModifyingRequestId === item.requestId);
|
|
237
237
|
const shouldPrompt = entriesModifiedInLastRequest.length > 0 && configurationService.getValue("chat.editing.confirmEditRequestRetry") === true;
|
|
238
238
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
239
|
-
title: ( localize(
|
|
239
|
+
title: ( localize(4967, "Do you want to retry your last request?")),
|
|
240
240
|
message: entriesModifiedInLastRequest.length === 1 ? ( localize(
|
|
241
|
-
|
|
241
|
+
4968,
|
|
242
242
|
"This will undo edits made to {0} since this request.",
|
|
243
243
|
basename(entriesModifiedInLastRequest[0].modifiedURI)
|
|
244
244
|
)) : ( localize(
|
|
245
|
-
|
|
245
|
+
4969,
|
|
246
246
|
"This will undo edits made to {0} files in your working set since this request. Do you want to proceed?",
|
|
247
247
|
entriesModifiedInLastRequest.length
|
|
248
248
|
)),
|
|
249
|
-
primaryButton: ( localize(
|
|
249
|
+
primaryButton: ( localize(4970, "Yes")),
|
|
250
250
|
checkbox: {
|
|
251
|
-
label: ( localize(
|
|
251
|
+
label: ( localize(4971, "Don't ask again")),
|
|
252
252
|
checked: false
|
|
253
253
|
},
|
|
254
254
|
type: "info"
|
|
@@ -280,7 +280,7 @@ function registerChatTitleActions() {
|
|
|
280
280
|
constructor() {
|
|
281
281
|
super({
|
|
282
282
|
id: "workbench.action.chat.insertIntoNotebook",
|
|
283
|
-
title: ( localize2(
|
|
283
|
+
title: ( localize2(4972, "Insert into Notebook")),
|
|
284
284
|
f1: false,
|
|
285
285
|
category: CHAT_CATEGORY,
|
|
286
286
|
icon: Codicon.insert,
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
5
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
6
|
+
export interface IAgentSessionApprovalInfo {
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly languageId: string | undefined;
|
|
9
|
+
confirm(): void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Tracks approval state for all live chat sessions. For each session,
|
|
13
|
+
* exposes an observable that emits {@link IAgentSessionApprovalInfo}
|
|
14
|
+
* when a tool invocation is waiting for user confirmation, or `undefined`
|
|
15
|
+
* when no approval is needed.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AgentSessionApprovalModel extends Disposable {
|
|
18
|
+
private readonly _chatService;
|
|
19
|
+
private readonly _languageService;
|
|
20
|
+
private readonly _approvals;
|
|
21
|
+
private readonly _modelTrackers;
|
|
22
|
+
constructor(_chatService: IChatService, _languageService: ILanguageService);
|
|
23
|
+
getApproval(sessionResource: URI): IObservable<IAgentSessionApprovalInfo | undefined>;
|
|
24
|
+
private _getOrCreateApproval;
|
|
25
|
+
private _trackModel;
|
|
26
|
+
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
4
|
+
import { Disposable, DisposableResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
7
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
8
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
9
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
10
|
+
import { autorunIterableDelta, autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
11
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
12
|
+
|
|
13
|
+
let AgentSessionApprovalModel = class AgentSessionApprovalModel extends Disposable {
|
|
14
|
+
constructor(_chatService, _languageService) {
|
|
15
|
+
super();
|
|
16
|
+
this._chatService = _chatService;
|
|
17
|
+
this._languageService = _languageService;
|
|
18
|
+
this._approvals = ( new Map());
|
|
19
|
+
this._modelTrackers = this._register(( new DisposableResourceMap()));
|
|
20
|
+
this._register(
|
|
21
|
+
autorunIterableDelta(reader => this._chatService.chatModels.read(reader), (
|
|
22
|
+
{
|
|
23
|
+
addedValues,
|
|
24
|
+
removedValues
|
|
25
|
+
}
|
|
26
|
+
) => {
|
|
27
|
+
for (const model of addedValues) {
|
|
28
|
+
this._modelTrackers.set(model.sessionResource, this._trackModel(model));
|
|
29
|
+
}
|
|
30
|
+
for (const model of removedValues) {
|
|
31
|
+
this._modelTrackers.deleteAndDispose(model.sessionResource);
|
|
32
|
+
this._approvals.get(( model.sessionResource.toString()))?.set(undefined, undefined);
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
getApproval(sessionResource) {
|
|
38
|
+
return this._getOrCreateApproval(( sessionResource.toString()));
|
|
39
|
+
}
|
|
40
|
+
_getOrCreateApproval(key) {
|
|
41
|
+
let obs = this._approvals.get(key);
|
|
42
|
+
if (!obs) {
|
|
43
|
+
obs = observableValue(`sessionApproval.${key}`, undefined);
|
|
44
|
+
this._approvals.set(key, obs);
|
|
45
|
+
}
|
|
46
|
+
return obs;
|
|
47
|
+
}
|
|
48
|
+
_trackModel(model) {
|
|
49
|
+
const settable = this._getOrCreateApproval(( model.sessionResource.toString()));
|
|
50
|
+
const setIfChanged = value => {
|
|
51
|
+
const current = settable.get();
|
|
52
|
+
if (current === value) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (current !== undefined && value !== undefined && current.label === value.label && current.languageId === value.languageId) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
settable.set(value, undefined);
|
|
59
|
+
};
|
|
60
|
+
return autorun(reader => {
|
|
61
|
+
const needsInput = model.requestNeedsInput.read(reader);
|
|
62
|
+
if (!needsInput) {
|
|
63
|
+
setIfChanged(undefined);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const lastResponse = model.lastRequest?.response;
|
|
67
|
+
if (!lastResponse?.response?.value) {
|
|
68
|
+
setIfChanged(undefined);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
for (const part of lastResponse.response.value) {
|
|
72
|
+
if (part.kind !== "toolInvocation") {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const state = part.state.read(reader);
|
|
76
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
77
|
+
let label;
|
|
78
|
+
let languageId;
|
|
79
|
+
if (part.toolSpecificData?.kind === "terminal") {
|
|
80
|
+
const terminalData = migrateLegacyTerminalToolSpecificData(part.toolSpecificData);
|
|
81
|
+
label = terminalData.presentationOverrides?.commandLine ?? terminalData.commandLine.forDisplay ?? terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
|
|
82
|
+
languageId = this._languageService.getLanguageIdByLanguageName(terminalData.presentationOverrides?.language ?? terminalData.language) ?? undefined;
|
|
83
|
+
} else if (needsInput.detail) {
|
|
84
|
+
label = needsInput.detail;
|
|
85
|
+
} else {
|
|
86
|
+
const msg = part.invocationMessage;
|
|
87
|
+
label = typeof msg === "string" ? msg : renderAsPlaintext(msg);
|
|
88
|
+
}
|
|
89
|
+
const confirmState = state;
|
|
90
|
+
setIfChanged({
|
|
91
|
+
label,
|
|
92
|
+
languageId,
|
|
93
|
+
confirm: () => confirmState.confirm({
|
|
94
|
+
type: ToolConfirmKind.UserAction
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
setIfChanged(undefined);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
AgentSessionApprovalModel = ( __decorate([( __param(0, IChatService)), ( __param(1, ILanguageService))], AgentSessionApprovalModel));
|
|
105
|
+
|
|
106
|
+
export { AgentSessionApprovalModel };
|
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(5037, "1 file")) : ( localize(5038, "{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(5039, "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(5037, "1 file")) : ( localize(5038, "{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(5039, "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(5040, "Needs Input"));
|
|
232
232
|
break;
|
|
233
233
|
case ChatSessionStatus.InProgress:
|
|
234
|
-
statusLabel = ( localize(
|
|
234
|
+
statusLabel = ( localize(5041, "In Progress"));
|
|
235
235
|
break;
|
|
236
236
|
case ChatSessionStatus.Failed:
|
|
237
|
-
statusLabel = ( localize(
|
|
237
|
+
statusLabel = ( localize(5042, "Failed"));
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
statusLabel = ( localize(
|
|
240
|
+
statusLabel = ( localize(5043, "Completed"));
|
|
241
241
|
}
|
|
242
242
|
return statusLabel;
|
|
243
243
|
}
|