@codingame/monaco-vscode-katex-common 26.2.2 → 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 +51 -20
- 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 +241 -78
- 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 +61 -66
- 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,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
-
import { hash } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
4
3
|
import { KeyCode, KeyMod } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
5
4
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
5
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -14,22 +13,26 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
14
13
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
15
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
15
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
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
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
18
19
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
20
|
+
import { getModeNameForTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
19
21
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
20
22
|
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
23
|
+
import { ChatStopCancellationNoopEventName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
21
24
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
22
25
|
import { ChatModeKind, ChatConfiguration, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
23
26
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
25
27
|
import { isInClaudeAgentsFolder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
26
28
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
27
29
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
28
30
|
import { AgentSessionProviders, getAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
29
31
|
import { getEditingSessionContext } from '../chatEditing/chatEditingActions.js';
|
|
30
32
|
import { ctxHasEditorModification, ctxIsGlobalEditingSession, ctxHasRequestInProgress } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
31
|
-
import { CHAT_CATEGORY, handleModeSwitch, ACTION_ID_NEW_CHAT, handleCurrentEditingSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
33
|
+
import { CHAT_CATEGORY, handleModeSwitch, ACTION_ID_NEW_CHAT, handleCurrentEditingSession, clearChatSessionPreservingType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
32
34
|
import { CreateRemoteAgentJobAction } from './chatContinueInAction.js';
|
|
35
|
+
import { CTX_HOVER_MODE } from '../../../inlineChat/common/inlineChat.js';
|
|
33
36
|
|
|
34
37
|
class SubmitAction extends Action2 {
|
|
35
38
|
async run(accessor, ...args) {
|
|
@@ -66,13 +69,13 @@ class SubmitAction extends Action2 {
|
|
|
66
69
|
if (editsToUndo === 1) {
|
|
67
70
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
68
71
|
message = ( localize(
|
|
69
|
-
|
|
72
|
+
4868,
|
|
70
73
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
71
74
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
72
75
|
));
|
|
73
76
|
} else {
|
|
74
77
|
message = ( localize(
|
|
75
|
-
|
|
78
|
+
4869,
|
|
76
79
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
77
80
|
entriesModifiedInRequestsToRemove.length
|
|
78
81
|
));
|
|
@@ -80,24 +83,24 @@ class SubmitAction extends Action2 {
|
|
|
80
83
|
} else {
|
|
81
84
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
82
85
|
message = ( localize(
|
|
83
|
-
|
|
86
|
+
4870,
|
|
84
87
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
85
88
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
86
89
|
));
|
|
87
90
|
} else {
|
|
88
91
|
message = ( localize(
|
|
89
|
-
|
|
92
|
+
4871,
|
|
90
93
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
91
94
|
entriesModifiedInRequestsToRemove.length
|
|
92
95
|
));
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
96
|
-
title: editsToUndo === 1 ? ( localize(
|
|
99
|
+
title: editsToUndo === 1 ? ( localize(4872, "Do you want to undo your last edit?")) : ( localize(4873, "Do you want to undo {0} edits?", editsToUndo)),
|
|
97
100
|
message: message,
|
|
98
|
-
primaryButton: ( localize(
|
|
101
|
+
primaryButton: ( localize(4874, "Yes")),
|
|
99
102
|
checkbox: {
|
|
100
|
-
label: ( localize(
|
|
103
|
+
label: ( localize(4875, "Don't ask again")),
|
|
101
104
|
checked: false
|
|
102
105
|
},
|
|
103
106
|
type: "info"
|
|
@@ -149,9 +152,10 @@ class SubmitAction extends Action2 {
|
|
|
149
152
|
}
|
|
150
153
|
const requestInProgressOrPendingToolCall = ( ContextKeyExpr.or(
|
|
151
154
|
ChatContextKeys.requestInProgress,
|
|
152
|
-
ChatContextKeys.Editing.hasToolConfirmation
|
|
155
|
+
ChatContextKeys.Editing.hasToolConfirmation,
|
|
156
|
+
ChatContextKeys.Editing.hasQuestionCarousel
|
|
153
157
|
));
|
|
154
|
-
const whenNotInProgress = (
|
|
158
|
+
const whenNotInProgress = ( ChatContextKeys.requestInProgress.negate());
|
|
155
159
|
class ChatSubmitAction extends SubmitAction {
|
|
156
160
|
static {
|
|
157
161
|
this.ID = "workbench.action.chat.submit";
|
|
@@ -165,15 +169,15 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
165
169
|
));
|
|
166
170
|
super({
|
|
167
171
|
id: ChatSubmitAction.ID,
|
|
168
|
-
title: ( localize2(
|
|
172
|
+
title: ( localize2(4876, "Send")),
|
|
169
173
|
f1: false,
|
|
170
174
|
category: CHAT_CATEGORY,
|
|
171
|
-
icon: Codicon.
|
|
175
|
+
icon: Codicon.arrowUp,
|
|
172
176
|
precondition,
|
|
173
177
|
toggled: {
|
|
174
178
|
condition: ChatContextKeys.lockedToCodingAgent,
|
|
175
|
-
icon: Codicon.
|
|
176
|
-
tooltip: ( localize(
|
|
179
|
+
icon: Codicon.arrowUp,
|
|
180
|
+
tooltip: ( localize(4877, "Send to Agent"))
|
|
177
181
|
},
|
|
178
182
|
keybinding: {
|
|
179
183
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
@@ -187,7 +191,7 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
187
191
|
group: "navigation",
|
|
188
192
|
alt: {
|
|
189
193
|
id: "workbench.action.chat.sendToNewChat",
|
|
190
|
-
title: ( localize2(
|
|
194
|
+
title: ( localize2(4878, "Send to New Chat")),
|
|
191
195
|
icon: Codicon.plus
|
|
192
196
|
}
|
|
193
197
|
}, {
|
|
@@ -207,7 +211,7 @@ class ToggleChatModeAction extends Action2 {
|
|
|
207
211
|
constructor() {
|
|
208
212
|
super({
|
|
209
213
|
id: ToggleChatModeAction.ID,
|
|
210
|
-
title: ( localize2(
|
|
214
|
+
title: ( localize2(4879, "Switch to Next Agent")),
|
|
211
215
|
f1: true,
|
|
212
216
|
category: CHAT_CATEGORY,
|
|
213
217
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.requestInProgress.negate())))
|
|
@@ -251,13 +255,6 @@ class ToggleChatModeAction extends Action2 {
|
|
|
251
255
|
const extensionId = switchToMode.source?.storage === "extension" ? switchToMode.source.extensionId.value : undefined;
|
|
252
256
|
const toolsCount = switchToMode.customTools?.get()?.length ?? 0;
|
|
253
257
|
const handoffsCount = switchToMode.handOffs?.get()?.length ?? 0;
|
|
254
|
-
const getModeNameForTelemetry = mode => {
|
|
255
|
-
const modeStorage = mode.source?.storage;
|
|
256
|
-
if (modeStorage === PromptsStorage.local || modeStorage === PromptsStorage.user) {
|
|
257
|
-
return String(hash(mode.name.get()));
|
|
258
|
-
}
|
|
259
|
-
return mode.name.get();
|
|
260
|
-
};
|
|
261
258
|
const modeUri = switchToMode.uri?.get();
|
|
262
259
|
const isClaudeAgent = modeUri ? isInClaudeAgentsFolder(modeUri) : undefined;
|
|
263
260
|
telemetryService.publicLog2("chat.modeChange", {
|
|
@@ -292,7 +289,7 @@ class SwitchToNextModelAction extends Action2 {
|
|
|
292
289
|
constructor() {
|
|
293
290
|
super({
|
|
294
291
|
id: SwitchToNextModelAction.ID,
|
|
295
|
-
title: ( localize2(
|
|
292
|
+
title: ( localize2(4880, "Switch to Next Model")),
|
|
296
293
|
category: CHAT_CATEGORY,
|
|
297
294
|
f1: true,
|
|
298
295
|
precondition: ChatContextKeys.enabled
|
|
@@ -311,7 +308,7 @@ class OpenModelPickerAction extends Action2 {
|
|
|
311
308
|
constructor() {
|
|
312
309
|
super({
|
|
313
310
|
id: OpenModelPickerAction.ID,
|
|
314
|
-
title: ( localize2(
|
|
311
|
+
title: ( localize2(4881, "Open Model Picker")),
|
|
315
312
|
category: CHAT_CATEGORY,
|
|
316
313
|
f1: false,
|
|
317
314
|
keybinding: {
|
|
@@ -324,8 +321,8 @@ class OpenModelPickerAction extends Action2 {
|
|
|
324
321
|
id: MenuId.ChatInput,
|
|
325
322
|
order: 3,
|
|
326
323
|
group: "navigation",
|
|
327
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.lockedToCodingAgent.negate()), ( ContextKeyExpr.or(( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Chat)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.EditorInline)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Notebook)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Terminal)))), (
|
|
328
|
-
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local))))))
|
|
324
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ChatContextKeys.lockedToCodingAgent.negate()), ChatContextKeys.chatSessionHasTargetedModels)), ( ContextKeyExpr.or(( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Chat)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.EditorInline)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Notebook)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Terminal)))), (
|
|
325
|
+
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ChatContextKeys.chatSessionHasTargetedModels, ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local))))))
|
|
329
326
|
}
|
|
330
327
|
});
|
|
331
328
|
}
|
|
@@ -345,8 +342,8 @@ class OpenModePickerAction extends Action2 {
|
|
|
345
342
|
constructor() {
|
|
346
343
|
super({
|
|
347
344
|
id: OpenModePickerAction.ID,
|
|
348
|
-
title: ( localize2(
|
|
349
|
-
tooltip: ( localize(
|
|
345
|
+
title: ( localize2(4882, "Open Agent Picker")),
|
|
346
|
+
tooltip: ( localize(4883, "Set Agent")),
|
|
350
347
|
category: CHAT_CATEGORY,
|
|
351
348
|
f1: false,
|
|
352
349
|
precondition: ChatContextKeys.enabled,
|
|
@@ -379,8 +376,8 @@ class OpenSessionTargetPickerAction extends Action2 {
|
|
|
379
376
|
constructor() {
|
|
380
377
|
super({
|
|
381
378
|
id: OpenSessionTargetPickerAction.ID,
|
|
382
|
-
title: ( localize2(
|
|
383
|
-
tooltip: ( localize(
|
|
379
|
+
title: ( localize2(4884, "Open Session Target Picker")),
|
|
380
|
+
tooltip: ( localize(4885, "Set Session Target")),
|
|
384
381
|
category: CHAT_CATEGORY,
|
|
385
382
|
f1: false,
|
|
386
383
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(ChatContextKeys.chatSessionIsEmpty, ChatContextKeys.inAgentSessionsWelcome)), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
@@ -407,8 +404,8 @@ class OpenDelegationPickerAction extends Action2 {
|
|
|
407
404
|
constructor() {
|
|
408
405
|
super({
|
|
409
406
|
id: OpenDelegationPickerAction.ID,
|
|
410
|
-
title: ( localize2(
|
|
411
|
-
tooltip: ( localize(
|
|
407
|
+
title: ( localize2(4886, "Open Delegation Picker")),
|
|
408
|
+
tooltip: ( localize(4887, "Delegate Session")),
|
|
412
409
|
category: CHAT_CATEGORY,
|
|
413
410
|
f1: false,
|
|
414
411
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.chatSessionIsEmpty.negate()), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
@@ -435,8 +432,8 @@ class OpenWorkspacePickerAction extends Action2 {
|
|
|
435
432
|
constructor() {
|
|
436
433
|
super({
|
|
437
434
|
id: OpenWorkspacePickerAction.ID,
|
|
438
|
-
title: ( localize2(
|
|
439
|
-
tooltip: ( localize(
|
|
435
|
+
title: ( localize2(4888, "Open Workspace Picker")),
|
|
436
|
+
tooltip: ( localize(4889, "Select Target Workspace")),
|
|
440
437
|
category: CHAT_CATEGORY,
|
|
441
438
|
f1: false,
|
|
442
439
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.inAgentSessionsWelcome)),
|
|
@@ -457,7 +454,7 @@ class ChatSessionPrimaryPickerAction extends Action2 {
|
|
|
457
454
|
constructor() {
|
|
458
455
|
super({
|
|
459
456
|
id: ChatSessionPrimaryPickerAction.ID,
|
|
460
|
-
title: ( localize2(
|
|
457
|
+
title: ( localize2(4890, "Open Model Picker")),
|
|
461
458
|
category: CHAT_CATEGORY,
|
|
462
459
|
f1: false,
|
|
463
460
|
precondition: ChatContextKeys.enabled,
|
|
@@ -485,7 +482,7 @@ class ChangeChatModelAction extends Action2 {
|
|
|
485
482
|
constructor() {
|
|
486
483
|
super({
|
|
487
484
|
id: ChangeChatModelAction.ID,
|
|
488
|
-
title: ( localize2(
|
|
485
|
+
title: ( localize2(4891, "Change Model")),
|
|
489
486
|
category: CHAT_CATEGORY,
|
|
490
487
|
f1: false,
|
|
491
488
|
precondition: ChatContextKeys.enabled
|
|
@@ -517,10 +514,10 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
517
514
|
));
|
|
518
515
|
super({
|
|
519
516
|
id: ChatEditingSessionSubmitAction.ID,
|
|
520
|
-
title: ( localize2(
|
|
517
|
+
title: ( localize2(4892, "Send")),
|
|
521
518
|
f1: false,
|
|
522
519
|
category: CHAT_CATEGORY,
|
|
523
|
-
icon: Codicon.
|
|
520
|
+
icon: Codicon.arrowUp,
|
|
524
521
|
precondition,
|
|
525
522
|
menu: [{
|
|
526
523
|
id: MenuId.ChatExecute,
|
|
@@ -529,7 +526,7 @@ class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
|
529
526
|
group: "navigation",
|
|
530
527
|
alt: {
|
|
531
528
|
id: "workbench.action.chat.sendToNewChat",
|
|
532
|
-
title: ( localize2(
|
|
529
|
+
title: ( localize2(4878, "Send to New Chat")),
|
|
533
530
|
icon: Codicon.plus
|
|
534
531
|
}
|
|
535
532
|
}]
|
|
@@ -544,7 +541,7 @@ class SubmitWithoutDispatchingAction extends Action2 {
|
|
|
544
541
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress, ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask))));
|
|
545
542
|
super({
|
|
546
543
|
id: SubmitWithoutDispatchingAction.ID,
|
|
547
|
-
title: ( localize2(
|
|
544
|
+
title: ( localize2(4893, "Send")),
|
|
548
545
|
f1: false,
|
|
549
546
|
category: CHAT_CATEGORY,
|
|
550
547
|
precondition,
|
|
@@ -572,7 +569,7 @@ class ChatSubmitWithCodebaseAction extends Action2 {
|
|
|
572
569
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress));
|
|
573
570
|
super({
|
|
574
571
|
id: ChatSubmitWithCodebaseAction.ID,
|
|
575
|
-
title: ( localize2(
|
|
572
|
+
title: ( localize2(4894, "Send with {0}", `${chatVariableLeader}codebase`)),
|
|
576
573
|
precondition,
|
|
577
574
|
keybinding: {
|
|
578
575
|
when: ChatContextKeys.inChatInput,
|
|
@@ -609,7 +606,7 @@ class SendToNewChatAction extends Action2 {
|
|
|
609
606
|
const precondition = ChatContextKeys.inputHasText;
|
|
610
607
|
super({
|
|
611
608
|
id: "workbench.action.chat.sendToNewChat",
|
|
612
|
-
title: ( localize2(
|
|
609
|
+
title: ( localize2(4878, "Send to New Chat")),
|
|
613
610
|
precondition,
|
|
614
611
|
category: CHAT_CATEGORY,
|
|
615
612
|
f1: false,
|
|
@@ -623,6 +620,7 @@ class SendToNewChatAction extends Action2 {
|
|
|
623
620
|
async run(accessor, ...args) {
|
|
624
621
|
const context = args[0];
|
|
625
622
|
const widgetService = accessor.get(IChatWidgetService);
|
|
623
|
+
const viewsService = accessor.get(IViewsService);
|
|
626
624
|
const dialogService = accessor.get(IDialogService);
|
|
627
625
|
const chatService = accessor.get(IChatService);
|
|
628
626
|
const widget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
@@ -631,14 +629,15 @@ class SendToNewChatAction extends Action2 {
|
|
|
631
629
|
}
|
|
632
630
|
const inputBeforeClear = widget.getInput();
|
|
633
631
|
if (widget.viewModel) {
|
|
634
|
-
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource);
|
|
632
|
+
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "newSessionAction");
|
|
635
633
|
}
|
|
636
634
|
if (widget.viewModel?.model) {
|
|
637
635
|
if (!(await handleCurrentEditingSession(widget.viewModel.model, undefined, dialogService))) {
|
|
638
636
|
return;
|
|
639
637
|
}
|
|
640
638
|
}
|
|
641
|
-
|
|
639
|
+
widget.setInput("");
|
|
640
|
+
await clearChatSessionPreservingType(widget, viewsService);
|
|
642
641
|
widget.acceptInput(inputBeforeClear, {
|
|
643
642
|
storeToHistory: true
|
|
644
643
|
});
|
|
@@ -652,7 +651,7 @@ class CancelAction extends Action2 {
|
|
|
652
651
|
constructor() {
|
|
653
652
|
super({
|
|
654
653
|
id: CancelAction.ID,
|
|
655
|
-
title: ( localize2(
|
|
654
|
+
title: ( localize2(4895, "Cancel")),
|
|
656
655
|
f1: false,
|
|
657
656
|
category: CHAT_CATEGORY,
|
|
658
657
|
icon: Codicon.stopCircle,
|
|
@@ -663,7 +662,7 @@ class CancelAction extends Action2 {
|
|
|
663
662
|
group: "navigation"
|
|
664
663
|
}, {
|
|
665
664
|
id: MenuId.ChatEditorInlineExecute,
|
|
666
|
-
when: ( ContextKeyExpr.and(( ctxIsGlobalEditingSession.negate()), ctxHasRequestInProgress)),
|
|
665
|
+
when: ( ContextKeyExpr.and(( ctxIsGlobalEditingSession.negate()), ctxHasRequestInProgress, ( CTX_HOVER_MODE.negate()))),
|
|
667
666
|
order: 4,
|
|
668
667
|
group: "navigation"
|
|
669
668
|
}],
|
|
@@ -680,13 +679,30 @@ class CancelAction extends Action2 {
|
|
|
680
679
|
run(accessor, ...args) {
|
|
681
680
|
const context = args[0];
|
|
682
681
|
const widgetService = accessor.get(IChatWidgetService);
|
|
682
|
+
const logService = accessor.get(ILogService);
|
|
683
|
+
const telemetryService = accessor.get(ITelemetryService);
|
|
683
684
|
const widget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
684
685
|
if (!widget) {
|
|
686
|
+
telemetryService.publicLog2(ChatStopCancellationNoopEventName, {
|
|
687
|
+
source: "cancelAction",
|
|
688
|
+
reason: "noWidget",
|
|
689
|
+
requestInProgress: "unknown",
|
|
690
|
+
pendingRequests: 0
|
|
691
|
+
});
|
|
692
|
+
logService.info("ChatCancelAction#run: No focused chat widget was found");
|
|
685
693
|
return;
|
|
686
694
|
}
|
|
687
695
|
const chatService = accessor.get(IChatService);
|
|
688
696
|
if (widget.viewModel) {
|
|
689
|
-
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource);
|
|
697
|
+
chatService.cancelCurrentRequestForSession(widget.viewModel.sessionResource, "cancelAction");
|
|
698
|
+
} else {
|
|
699
|
+
telemetryService.publicLog2(ChatStopCancellationNoopEventName, {
|
|
700
|
+
source: "cancelAction",
|
|
701
|
+
reason: "noViewModel",
|
|
702
|
+
requestInProgress: "unknown",
|
|
703
|
+
pendingRequests: 0
|
|
704
|
+
});
|
|
705
|
+
logService.info("ChatCancelAction#run: Canceled chat widget has no view model");
|
|
690
706
|
}
|
|
691
707
|
}
|
|
692
708
|
}
|
|
@@ -698,7 +714,7 @@ class CancelEdit extends Action2 {
|
|
|
698
714
|
constructor() {
|
|
699
715
|
super({
|
|
700
716
|
id: CancelEdit.ID,
|
|
701
|
-
title: ( localize2(
|
|
717
|
+
title: ( localize2(4896, "Cancel Edit")),
|
|
702
718
|
f1: false,
|
|
703
719
|
category: CHAT_CATEGORY,
|
|
704
720
|
icon: Codicon.x,
|
|
@@ -22,6 +22,7 @@ import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
22
22
|
import { IChatWidgetService, IChatAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
23
23
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
24
24
|
|
|
25
|
+
const MarkHelpfulActionId = "workbench.action.chat.markHelpful";
|
|
25
26
|
const MarkUnhelpfulActionId = "workbench.action.chat.markUnhelpful";
|
|
26
27
|
const enableFeedbackConfig = "config.telemetry.feedback.enabled";
|
|
27
28
|
function registerChatTitleActions() {
|
|
@@ -29,7 +30,7 @@ function registerChatTitleActions() {
|
|
|
29
30
|
constructor() {
|
|
30
31
|
super({
|
|
31
32
|
id: "workbench.action.chat.markHelpful",
|
|
32
|
-
title: ( localize2(
|
|
33
|
+
title: ( localize2(4953, "Helpful")),
|
|
33
34
|
f1: false,
|
|
34
35
|
category: CHAT_CATEGORY,
|
|
35
36
|
icon: Codicon.thumbsup,
|
|
@@ -83,7 +84,7 @@ function registerChatTitleActions() {
|
|
|
83
84
|
constructor() {
|
|
84
85
|
super({
|
|
85
86
|
id: MarkUnhelpfulActionId,
|
|
86
|
-
title: ( localize2(
|
|
87
|
+
title: ( localize2(4954, "Unhelpful")),
|
|
87
88
|
f1: false,
|
|
88
89
|
category: CHAT_CATEGORY,
|
|
89
90
|
icon: Codicon.thumbsdown,
|
|
@@ -140,7 +141,7 @@ function registerChatTitleActions() {
|
|
|
140
141
|
constructor() {
|
|
141
142
|
super({
|
|
142
143
|
id: "workbench.action.chat.reportIssueForBug",
|
|
143
|
-
title: ( localize2(
|
|
144
|
+
title: ( localize2(4955, "Report Issue")),
|
|
144
145
|
f1: false,
|
|
145
146
|
category: CHAT_CATEGORY,
|
|
146
147
|
icon: Codicon.report,
|
|
@@ -187,7 +188,7 @@ function registerChatTitleActions() {
|
|
|
187
188
|
constructor() {
|
|
188
189
|
super({
|
|
189
190
|
id: "workbench.action.chat.retry",
|
|
190
|
-
title: ( localize2(
|
|
191
|
+
title: ( localize2(4956, "Retry")),
|
|
191
192
|
f1: false,
|
|
192
193
|
category: CHAT_CATEGORY,
|
|
193
194
|
icon: Codicon.refresh,
|
|
@@ -235,19 +236,19 @@ function registerChatTitleActions() {
|
|
|
235
236
|
const entriesModifiedInLastRequest = currentEditingSession.entries.get().filter(entry => entry.lastModifyingRequestId === item.requestId);
|
|
236
237
|
const shouldPrompt = entriesModifiedInLastRequest.length > 0 && configurationService.getValue("chat.editing.confirmEditRequestRetry") === true;
|
|
237
238
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
238
|
-
title: ( localize(
|
|
239
|
+
title: ( localize(4957, "Do you want to retry your last request?")),
|
|
239
240
|
message: entriesModifiedInLastRequest.length === 1 ? ( localize(
|
|
240
|
-
|
|
241
|
+
4958,
|
|
241
242
|
"This will undo edits made to {0} since this request.",
|
|
242
243
|
basename(entriesModifiedInLastRequest[0].modifiedURI)
|
|
243
244
|
)) : ( localize(
|
|
244
|
-
|
|
245
|
+
4959,
|
|
245
246
|
"This will undo edits made to {0} files in your working set since this request. Do you want to proceed?",
|
|
246
247
|
entriesModifiedInLastRequest.length
|
|
247
248
|
)),
|
|
248
|
-
primaryButton: ( localize(
|
|
249
|
+
primaryButton: ( localize(4960, "Yes")),
|
|
249
250
|
checkbox: {
|
|
250
|
-
label: ( localize(
|
|
251
|
+
label: ( localize(4961, "Don't ask again")),
|
|
251
252
|
checked: false
|
|
252
253
|
},
|
|
253
254
|
type: "info"
|
|
@@ -279,7 +280,7 @@ function registerChatTitleActions() {
|
|
|
279
280
|
constructor() {
|
|
280
281
|
super({
|
|
281
282
|
id: "workbench.action.chat.insertIntoNotebook",
|
|
282
|
-
title: ( localize2(
|
|
283
|
+
title: ( localize2(4962, "Insert into Notebook")),
|
|
283
284
|
f1: false,
|
|
284
285
|
category: CHAT_CATEGORY,
|
|
285
286
|
icon: Codicon.insert,
|
|
@@ -366,4 +367,4 @@ function splitMarkdownAndCodeBlocks(markdown) {
|
|
|
366
367
|
return splitContent;
|
|
367
368
|
}
|
|
368
369
|
|
|
369
|
-
export { MarkUnhelpfulActionId, registerChatTitleActions };
|
|
370
|
+
export { MarkHelpfulActionId, MarkUnhelpfulActionId, registerChatTitleActions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js
CHANGED
|
@@ -57,7 +57,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
async loadModel() {
|
|
60
|
-
const modelRef = await this.chatService.
|
|
60
|
+
const modelRef = await this.chatService.acquireOrLoadSession(this.session.resource, ChatAgentLocation.Chat, this.cts.token);
|
|
61
61
|
if (this._store.isDisposed) {
|
|
62
62
|
modelRef?.dispose();
|
|
63
63
|
return;
|
|
@@ -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(5017, "1 file")) : ( localize(5018, "{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(5019, "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(5017, "1 file")) : ( localize(5018, "{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(5019, "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(5020, "Needs Input"));
|
|
232
232
|
break;
|
|
233
233
|
case ChatSessionStatus.InProgress:
|
|
234
|
-
statusLabel = ( localize(
|
|
234
|
+
statusLabel = ( localize(5021, "In Progress"));
|
|
235
235
|
break;
|
|
236
236
|
case ChatSessionStatus.Failed:
|
|
237
|
-
statusLabel = ( localize(
|
|
237
|
+
statusLabel = ( localize(5022, "Failed"));
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
statusLabel = ( localize(
|
|
240
|
+
statusLabel = ( localize(5023, "Completed"));
|
|
241
241
|
}
|
|
242
242
|
return statusLabel;
|
|
243
243
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AgentSessionListItem, IAgentSessionsFilter, IAgentSessionsSorterOptions
|
|
|
7
7
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
8
8
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
9
9
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
10
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
10
11
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
11
12
|
import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
|
|
12
13
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
@@ -22,9 +23,12 @@ export interface IAgentSessionsControlOptions extends IAgentSessionsSorterOption
|
|
|
22
23
|
readonly overrideStyles: IStyleOverride<IListStyles>;
|
|
23
24
|
readonly filter: IAgentSessionsFilter;
|
|
24
25
|
readonly source: string;
|
|
26
|
+
readonly disableHover?: boolean;
|
|
25
27
|
getHoverPosition(): HoverPosition;
|
|
26
28
|
trackActiveEditorSession(): boolean;
|
|
29
|
+
collapseOlderSections?(): boolean;
|
|
27
30
|
overrideSessionOpenOptions?(openEvent: IOpenEvent<AgentSessionListItem | undefined>): ISessionOpenOptions;
|
|
31
|
+
overrideSessionOpen?(resource: URI, openOptions?: ISessionOpenOptions): Promise<void>;
|
|
28
32
|
notifySessionOpened?(resource: URI, widget: IChatWidget): void;
|
|
29
33
|
}
|
|
30
34
|
export declare class AgentSessionsControl extends Disposable implements IAgentSessionsControl {
|
|
@@ -43,6 +47,9 @@ export declare class AgentSessionsControl extends Disposable implements IAgentSe
|
|
|
43
47
|
get element(): HTMLElement | undefined;
|
|
44
48
|
private sessionsList;
|
|
45
49
|
private sessionsListFindIsOpen;
|
|
50
|
+
private readonly updateSessionsListThrottler;
|
|
51
|
+
private readonly _onDidUpdate;
|
|
52
|
+
readonly onDidUpdate: Event<void>;
|
|
46
53
|
private visible;
|
|
47
54
|
private focusedAgentSessionArchivedContextKey;
|
|
48
55
|
private focusedAgentSessionReadContextKey;
|
|
@@ -52,6 +59,7 @@ export declare class AgentSessionsControl extends Disposable implements IAgentSe
|
|
|
52
59
|
private registerListeners;
|
|
53
60
|
private revealAndFocusActiveEditorSession;
|
|
54
61
|
private createList;
|
|
62
|
+
private hasTodaySessions;
|
|
55
63
|
private openAgentSession;
|
|
56
64
|
private showContextMenu;
|
|
57
65
|
private showAgentSessionSectionContextMenu;
|