@codingame/monaco-vscode-katex-common 28.4.0 → 29.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/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +158 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +22 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +121 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +29 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +349 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +104 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +21 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +29 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +261 -282
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +184 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +42 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +14 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +11 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +25 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +332 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +10 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +66 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +28 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +272 -107
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +151 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +96 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +86 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +273 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +28 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +20 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +21 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +112 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +137 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +108 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +385 -247
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +124 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +84 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +38 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +31 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +12 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +130 -23
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +41 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +55 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +50 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +0 -440
|
@@ -33,7 +33,6 @@ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/
|
|
|
33
33
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
34
34
|
import { isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
35
35
|
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
36
|
-
import { IsSessionsWindowContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
37
36
|
|
|
38
37
|
class EditingSessionAction extends Action2 {
|
|
39
38
|
constructor(opts) {
|
|
@@ -86,7 +85,7 @@ registerAction2(class OpenFileInDiffAction extends WorkingSetAction {
|
|
|
86
85
|
constructor() {
|
|
87
86
|
super({
|
|
88
87
|
id: "chatEditing.openFileInDiff",
|
|
89
|
-
title: ( localize2(
|
|
88
|
+
title: ( localize2(5918, "Open Changes in Diff Editor")),
|
|
90
89
|
icon: Codicon.diffSingle,
|
|
91
90
|
menu: [{
|
|
92
91
|
id: MenuId.ChatEditingWidgetModifiedFilesToolbar,
|
|
@@ -117,7 +116,7 @@ registerAction2(class AcceptAction extends WorkingSetAction {
|
|
|
117
116
|
constructor() {
|
|
118
117
|
super({
|
|
119
118
|
id: "chatEditing.acceptFile",
|
|
120
|
-
title: ( localize2(
|
|
119
|
+
title: ( localize2(5919, "Keep")),
|
|
121
120
|
icon: Codicon.check,
|
|
122
121
|
menu: [{
|
|
123
122
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
|
|
@@ -143,7 +142,7 @@ registerAction2(class DiscardAction extends WorkingSetAction {
|
|
|
143
142
|
constructor() {
|
|
144
143
|
super({
|
|
145
144
|
id: "chatEditing.discardFile",
|
|
146
|
-
title: ( localize2(
|
|
145
|
+
title: ( localize2(5920, "Undo")),
|
|
147
146
|
icon: Codicon.discard,
|
|
148
147
|
menu: [{
|
|
149
148
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
|
|
@@ -169,9 +168,9 @@ class ChatEditingAcceptAllAction extends EditingSessionAction {
|
|
|
169
168
|
constructor() {
|
|
170
169
|
super({
|
|
171
170
|
id: "chatEditing.acceptAllFiles",
|
|
172
|
-
title: ( localize(
|
|
171
|
+
title: ( localize(5921, "Keep")),
|
|
173
172
|
icon: Codicon.check,
|
|
174
|
-
tooltip: ( localize(
|
|
173
|
+
tooltip: ( localize(5922, "Keep All Edits")),
|
|
175
174
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
176
175
|
keybinding: {
|
|
177
176
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
@@ -195,9 +194,9 @@ class ChatEditingDiscardAllAction extends EditingSessionAction {
|
|
|
195
194
|
constructor() {
|
|
196
195
|
super({
|
|
197
196
|
id: "chatEditing.discardAllFiles",
|
|
198
|
-
title: ( localize(
|
|
197
|
+
title: ( localize(5923, "Undo")),
|
|
199
198
|
icon: Codicon.discard,
|
|
200
|
-
tooltip: ( localize(
|
|
199
|
+
tooltip: ( localize(5924, "Undo All Edits")),
|
|
201
200
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
202
201
|
menu: [{
|
|
203
202
|
id: MenuId.ChatEditingWidgetToolbar,
|
|
@@ -228,8 +227,8 @@ class ToggleExplanationWidgetAction extends EditingSessionAction {
|
|
|
228
227
|
constructor() {
|
|
229
228
|
super({
|
|
230
229
|
id: ToggleExplanationWidgetAction.ID,
|
|
231
|
-
title: ( localize(
|
|
232
|
-
tooltip: ( localize(
|
|
230
|
+
title: ( localize(5925, "Explain")),
|
|
231
|
+
tooltip: ( localize(5926, "Toggle Change Explanations")),
|
|
233
232
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
234
233
|
menu: [{
|
|
235
234
|
id: MenuId.ChatEditingWidgetToolbar,
|
|
@@ -253,17 +252,17 @@ async function discardAllEditsWithConfirmation(accessor, currentEditingSession)
|
|
|
253
252
|
const entries = currentEditingSession.entries.get().filter(e => e.state.get() === ModifiedFileEntryState.Modified);
|
|
254
253
|
if (entries.length > 0) {
|
|
255
254
|
const confirmation = await dialogService.confirm({
|
|
256
|
-
title: ( localize(
|
|
255
|
+
title: ( localize(5927, "Undo all edits?")),
|
|
257
256
|
message: entries.length === 1 ? ( localize(
|
|
258
|
-
|
|
257
|
+
5928,
|
|
259
258
|
"This will undo changes made in {0}. Do you want to proceed?",
|
|
260
259
|
basename(entries[0].modifiedURI)
|
|
261
260
|
)) : ( localize(
|
|
262
|
-
|
|
261
|
+
5929,
|
|
263
262
|
"This will undo changes made in {0} files. Do you want to proceed?",
|
|
264
263
|
entries.length
|
|
265
264
|
)),
|
|
266
|
-
primaryButton: ( localize(
|
|
265
|
+
primaryButton: ( localize(5930, "Yes")),
|
|
267
266
|
type: "info"
|
|
268
267
|
});
|
|
269
268
|
if (!confirmation.confirmed) {
|
|
@@ -278,7 +277,7 @@ class ChatEditingShowChangesAction extends EditingSessionAction {
|
|
|
278
277
|
this.ID = "chatEditing.viewChanges";
|
|
279
278
|
}
|
|
280
279
|
static {
|
|
281
|
-
this.LABEL = ( localize(
|
|
280
|
+
this.LABEL = ( localize(5931, "View All Edits"));
|
|
282
281
|
}
|
|
283
282
|
constructor() {
|
|
284
283
|
super({
|
|
@@ -311,7 +310,7 @@ class ViewAllSessionChangesAction extends Action2 {
|
|
|
311
310
|
constructor() {
|
|
312
311
|
super({
|
|
313
312
|
id: ViewAllSessionChangesAction.ID,
|
|
314
|
-
title: ( localize2(
|
|
313
|
+
title: ( localize2(5932, "View All Changes")),
|
|
315
314
|
icon: Codicon.diffMultiple,
|
|
316
315
|
category: CHAT_CATEGORY,
|
|
317
316
|
precondition: ChatContextKeys.hasAgentSessionChanges,
|
|
@@ -320,11 +319,6 @@ class ViewAllSessionChangesAction extends Action2 {
|
|
|
320
319
|
group: "navigation",
|
|
321
320
|
order: 10,
|
|
322
321
|
when: ChatContextKeys.hasAgentSessionChanges
|
|
323
|
-
}, {
|
|
324
|
-
id: MenuId.AgentSessionItemToolbar,
|
|
325
|
-
group: "navigation",
|
|
326
|
-
order: 0,
|
|
327
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.hasAgentSessionChanges, ( IsSessionsWindowContext.negate())))
|
|
328
322
|
}]
|
|
329
323
|
});
|
|
330
324
|
}
|
|
@@ -353,7 +347,7 @@ class ViewAllSessionChangesAction extends Action2 {
|
|
|
353
347
|
multiDiffSourceUri: sessionResource.with({
|
|
354
348
|
scheme: sessionResource.scheme + "-worktree-changes"
|
|
355
349
|
}),
|
|
356
|
-
title: ( localize(
|
|
350
|
+
title: ( localize(5933, "All Session Changes")),
|
|
357
351
|
resources
|
|
358
352
|
});
|
|
359
353
|
session?.setRead(true);
|
|
@@ -393,13 +387,13 @@ async function restoreSnapshotWithConfirmationByRequestId(accessor, sessionResou
|
|
|
393
387
|
if (editsToUndo === 1) {
|
|
394
388
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
395
389
|
message = ( localize(
|
|
396
|
-
|
|
390
|
+
5934,
|
|
397
391
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
398
392
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
399
393
|
));
|
|
400
394
|
} else {
|
|
401
395
|
message = ( localize(
|
|
402
|
-
|
|
396
|
+
5935,
|
|
403
397
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
404
398
|
entriesModifiedInRequestsToRemove.length
|
|
405
399
|
));
|
|
@@ -407,24 +401,24 @@ async function restoreSnapshotWithConfirmationByRequestId(accessor, sessionResou
|
|
|
407
401
|
} else {
|
|
408
402
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
409
403
|
message = ( localize(
|
|
410
|
-
|
|
404
|
+
5936,
|
|
411
405
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
412
406
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
413
407
|
));
|
|
414
408
|
} else {
|
|
415
409
|
message = ( localize(
|
|
416
|
-
|
|
410
|
+
5937,
|
|
417
411
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
418
412
|
entriesModifiedInRequestsToRemove.length
|
|
419
413
|
));
|
|
420
414
|
}
|
|
421
415
|
}
|
|
422
416
|
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
423
|
-
title: editsToUndo === 1 ? ( localize(
|
|
417
|
+
title: editsToUndo === 1 ? ( localize(5938, "Do you want to undo your last edit?")) : ( localize(5939, "Do you want to undo {0} edits?", editsToUndo)),
|
|
424
418
|
message: message,
|
|
425
|
-
primaryButton: ( localize(
|
|
419
|
+
primaryButton: ( localize(5940, "Yes")),
|
|
426
420
|
checkbox: {
|
|
427
|
-
label: ( localize(
|
|
421
|
+
label: ( localize(5941, "Don't ask again")),
|
|
428
422
|
checked: false
|
|
429
423
|
},
|
|
430
424
|
type: "info"
|
|
@@ -452,7 +446,7 @@ registerAction2(class RemoveAction extends Action2 {
|
|
|
452
446
|
constructor() {
|
|
453
447
|
super({
|
|
454
448
|
id: "workbench.action.chat.undoEdits",
|
|
455
|
-
title: ( localize2(
|
|
449
|
+
title: ( localize2(5942, "Undo Requests")),
|
|
456
450
|
f1: false,
|
|
457
451
|
category: CHAT_CATEGORY,
|
|
458
452
|
icon: Codicon.discard,
|
|
@@ -494,8 +488,8 @@ registerAction2(class RestoreCheckpointAction extends Action2 {
|
|
|
494
488
|
constructor() {
|
|
495
489
|
super({
|
|
496
490
|
id: "workbench.action.chat.restoreCheckpoint",
|
|
497
|
-
title: ( localize2(
|
|
498
|
-
tooltip: ( localize2(
|
|
491
|
+
title: ( localize2(5943, "Restore Checkpoint")),
|
|
492
|
+
tooltip: ( localize2(5944, "Restores workspace and chat to this point")),
|
|
499
493
|
f1: false,
|
|
500
494
|
category: CHAT_CATEGORY,
|
|
501
495
|
keybinding: {
|
|
@@ -536,7 +530,7 @@ registerAction2(class RestoreLastCheckpoint extends Action2 {
|
|
|
536
530
|
constructor() {
|
|
537
531
|
super({
|
|
538
532
|
id: "workbench.action.chat.restoreLastCheckpoint",
|
|
539
|
-
title: ( localize2(
|
|
533
|
+
title: ( localize2(5945, "Restore to Last Checkpoint")),
|
|
540
534
|
f1: true,
|
|
541
535
|
category: CHAT_CATEGORY,
|
|
542
536
|
icon: Codicon.discard,
|
|
@@ -561,7 +555,7 @@ registerAction2(class RestoreLastCheckpoint extends Action2 {
|
|
|
561
555
|
}
|
|
562
556
|
const checkpointRequest = chatModel.checkpoint;
|
|
563
557
|
if (!checkpointRequest) {
|
|
564
|
-
alert(( localize(
|
|
558
|
+
alert(( localize(5946, "There is no checkpoint to restore.")));
|
|
565
559
|
return;
|
|
566
560
|
}
|
|
567
561
|
widget?.viewModel?.model.setCheckpoint(checkpointRequest.id);
|
|
@@ -574,7 +568,7 @@ registerAction2(class EditAction extends Action2 {
|
|
|
574
568
|
constructor() {
|
|
575
569
|
super({
|
|
576
570
|
id: "workbench.action.chat.editRequests",
|
|
577
|
-
title: ( localize2(
|
|
571
|
+
title: ( localize2(5947, "Edit Request")),
|
|
578
572
|
f1: false,
|
|
579
573
|
category: CHAT_CATEGORY,
|
|
580
574
|
icon: Codicon.edit,
|
|
@@ -613,7 +607,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
613
607
|
constructor() {
|
|
614
608
|
super({
|
|
615
609
|
id: OpenWorkingSetHistoryAction.id,
|
|
616
|
-
title: ( localize(
|
|
610
|
+
title: ( localize(5948, "Open File")),
|
|
617
611
|
menu: [{
|
|
618
612
|
id: MenuId.ChatEditingCodeBlockContext,
|
|
619
613
|
group: "navigation",
|
|
@@ -639,7 +633,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
639
633
|
constructor() {
|
|
640
634
|
super({
|
|
641
635
|
id: OpenWorkingSetHistoryAction.id,
|
|
642
|
-
title: ( localize(
|
|
636
|
+
title: ( localize(5949, "Open File Snapshot")),
|
|
643
637
|
menu: [{
|
|
644
638
|
id: MenuId.ChatEditingCodeBlockContext,
|
|
645
639
|
group: "navigation",
|
|
@@ -663,7 +657,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
663
657
|
if (snapshot) {
|
|
664
658
|
const editor = await editorService.openEditor({
|
|
665
659
|
resource: snapshot,
|
|
666
|
-
label: ( localize(
|
|
660
|
+
label: ( localize(5950, "{0} (Snapshot)", basename(context.uri))),
|
|
667
661
|
options: {
|
|
668
662
|
activation: EditorActivation.ACTIVATE
|
|
669
663
|
}
|
|
@@ -680,7 +674,7 @@ registerAction2(class ResolveSymbolsContextAction extends EditingSessionAction {
|
|
|
680
674
|
constructor() {
|
|
681
675
|
super({
|
|
682
676
|
id: "workbench.action.edits.addFilesFromReferences",
|
|
683
|
-
title: ( localize2(
|
|
677
|
+
title: ( localize2(5951, "Add Files From References")),
|
|
684
678
|
f1: false,
|
|
685
679
|
category: CHAT_CATEGORY,
|
|
686
680
|
menu: {
|
|
@@ -744,7 +738,7 @@ class ViewPreviousEditsAction extends EditingSessionAction {
|
|
|
744
738
|
this.Id = "chatEditing.viewPreviousEdits";
|
|
745
739
|
}
|
|
746
740
|
static {
|
|
747
|
-
this.Label = ( localize(
|
|
741
|
+
this.Label = ( localize(5952, "View Previous Edits"));
|
|
748
742
|
}
|
|
749
743
|
constructor() {
|
|
750
744
|
super({
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js
CHANGED
|
@@ -10,6 +10,7 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
10
10
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
11
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
12
12
|
import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
|
|
13
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
14
|
import { resolveCommandsContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommandsContext';
|
|
14
15
|
import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
15
16
|
import { EditorResourceAccessor, SideBySideEditor, TEXT_DIFF_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
@@ -64,7 +65,7 @@ class NavigateAction extends ChatEditingEditorAction {
|
|
|
64
65
|
constructor(next) {
|
|
65
66
|
super({
|
|
66
67
|
id: next ? "chatEditor.action.navigateNext" : "chatEditor.action.navigatePrevious",
|
|
67
|
-
title: next ? ( localize2(
|
|
68
|
+
title: next ? ( localize2(5954, "Go to Next Chat Edit")) : ( localize2(5955, "Go to Previous Chat Edit")),
|
|
68
69
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
69
70
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ctxHasEditorModification)),
|
|
70
71
|
keybinding: {
|
|
@@ -128,9 +129,9 @@ class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
|
128
129
|
constructor(id, _keep) {
|
|
129
130
|
super({
|
|
130
131
|
id,
|
|
131
|
-
title: _keep ? ( localize2(
|
|
132
|
-
shortTitle: _keep ? ( localize2(
|
|
133
|
-
tooltip: _keep ? ( localize2(
|
|
132
|
+
title: _keep ? ( localize2(5956, "Keep Chat Edits")) : ( localize2(5957, "Undo Chat Edits")),
|
|
133
|
+
shortTitle: _keep ? ( localize2(5958, "Keep")) : ( localize2(5959, "Undo")),
|
|
134
|
+
tooltip: _keep ? ( localize2(5960, "Keep Chat Edits in this File")) : ( localize2(5961, "Undo Chat Edits in this File")),
|
|
134
135
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
135
136
|
icon: _keep ? Codicon.check : Codicon.discard,
|
|
136
137
|
f1: true,
|
|
@@ -150,12 +151,15 @@ class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
|
150
151
|
}
|
|
151
152
|
async runChatEditingCommand(accessor, session, entry, _integration) {
|
|
152
153
|
const instaService = accessor.get(IInstantiationService);
|
|
154
|
+
const configService = accessor.get(IConfigurationService);
|
|
153
155
|
if (this._keep) {
|
|
154
156
|
session.accept(entry.modifiedURI);
|
|
155
157
|
} else {
|
|
156
158
|
session.reject(entry.modifiedURI);
|
|
157
159
|
}
|
|
158
|
-
|
|
160
|
+
if (configService.getValue(ChatConfiguration.RevealNextChangeOnResolve)) {
|
|
161
|
+
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
|
162
|
+
}
|
|
159
163
|
}
|
|
160
164
|
}
|
|
161
165
|
class AcceptAction extends KeepOrUndoAction {
|
|
@@ -180,8 +184,8 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
180
184
|
constructor(_accept) {
|
|
181
185
|
super({
|
|
182
186
|
id: _accept ? acceptHunkId : undoHunkId,
|
|
183
|
-
title: _accept ? ( localize2(
|
|
184
|
-
shortTitle: _accept ? ( localize2(
|
|
187
|
+
title: _accept ? ( localize2(5962, "Keep this Change")) : ( localize2(5963, "Undo this Change")),
|
|
188
|
+
shortTitle: _accept ? ( localize2(5964, "Keep")) : ( localize2(5965, "Undo")),
|
|
185
189
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
186
190
|
f1: true,
|
|
187
191
|
keybinding: {
|
|
@@ -198,12 +202,13 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
198
202
|
}
|
|
199
203
|
async runChatEditingCommand(accessor, session, entry, ctrl, ...args) {
|
|
200
204
|
const instaService = accessor.get(IInstantiationService);
|
|
205
|
+
const configService = accessor.get(IConfigurationService);
|
|
201
206
|
if (this._accept) {
|
|
202
207
|
await ctrl.acceptNearestChange(args[0]);
|
|
203
208
|
} else {
|
|
204
209
|
await ctrl.rejectNearestChange(args[0]);
|
|
205
210
|
}
|
|
206
|
-
if (entry.changesCount.get() === 0) {
|
|
211
|
+
if (configService.getValue(ChatConfiguration.RevealNextChangeOnResolve) && entry.changesCount.get() === 0) {
|
|
207
212
|
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
|
208
213
|
}
|
|
209
214
|
}
|
|
@@ -228,7 +233,7 @@ class ToggleDiffAction extends ChatEditingEditorAction {
|
|
|
228
233
|
constructor() {
|
|
229
234
|
super({
|
|
230
235
|
id: "chatEditor.action.toggleDiff",
|
|
231
|
-
title: ( localize2(
|
|
236
|
+
title: ( localize2(5966, "Toggle Diff Editor for Chat Edits")),
|
|
232
237
|
category: CHAT_CATEGORY,
|
|
233
238
|
toggled: {
|
|
234
239
|
condition: ( ContextKeyExpr.or(EditorContextKeys.inDiffEditor, ( ActiveEditorContext.isEqualTo(TEXT_DIFF_EDITOR_ID)))),
|
|
@@ -265,7 +270,7 @@ class ToggleAccessibleDiffViewAction extends ChatEditingEditorAction {
|
|
|
265
270
|
constructor() {
|
|
266
271
|
super({
|
|
267
272
|
id: "chatEditor.action.showAccessibleDiffView",
|
|
268
|
-
title: ( localize2(
|
|
273
|
+
title: ( localize2(5967, "Show Accessible Diff View for Chat Edits")),
|
|
269
274
|
f1: true,
|
|
270
275
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
271
276
|
keybinding: {
|
|
@@ -283,7 +288,7 @@ class ReviewChangesAction extends ChatEditingEditorAction {
|
|
|
283
288
|
constructor() {
|
|
284
289
|
super({
|
|
285
290
|
id: "chatEditor.action.reviewChanges",
|
|
286
|
-
title: ( localize2(
|
|
291
|
+
title: ( localize2(5968, "Review")),
|
|
287
292
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
288
293
|
menu: [{
|
|
289
294
|
id: MenuId.ChatEditingEditorContent,
|
|
@@ -304,8 +309,8 @@ class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
|
304
309
|
constructor() {
|
|
305
310
|
super({
|
|
306
311
|
id: AcceptAllEditsAction.ID,
|
|
307
|
-
title: ( localize2(
|
|
308
|
-
tooltip: ( localize2(
|
|
312
|
+
title: ( localize2(5969, "Keep All Chat Edits")),
|
|
313
|
+
tooltip: ( localize2(5970, "Keep All Chat Edits in this Session")),
|
|
309
314
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
310
315
|
icon: Codicon.checkAll,
|
|
311
316
|
f1: true,
|
|
@@ -324,7 +329,7 @@ class MultiDiffAcceptDiscardAction extends Action2 {
|
|
|
324
329
|
constructor(accept) {
|
|
325
330
|
super({
|
|
326
331
|
id: accept ? "chatEditing.multidiff.acceptAllFiles" : "chatEditing.multidiff.discardAllFiles",
|
|
327
|
-
title: accept ? ( localize(
|
|
332
|
+
title: accept ? ( localize(5971, "Keep All Edits")) : ( localize(5972, "Undo All Edits")),
|
|
328
333
|
icon: accept ? Codicon.check : Codicon.discard,
|
|
329
334
|
menu: {
|
|
330
335
|
when: ( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)),
|
|
@@ -375,7 +380,7 @@ class ExplainMultiDiffAction extends Action2 {
|
|
|
375
380
|
constructor() {
|
|
376
381
|
super({
|
|
377
382
|
id: "chatEditing.multidiff.explain",
|
|
378
|
-
title: ( localize(
|
|
383
|
+
title: ( localize(5973, "Explain")),
|
|
379
384
|
menu: {
|
|
380
385
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(...( explainMultiDiffSchemes.map(scheme => ( ContextKeyExpr.equals("resourceScheme", scheme)))))), ( ContextKeyExpr.has(`config.${ChatConfiguration.ExplainChangesEnabled}`)))),
|
|
381
386
|
id: MenuId.MultiDiffEditorContent,
|
|
@@ -521,7 +526,7 @@ function registerChatEditorActions() {
|
|
|
521
526
|
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
522
527
|
command: {
|
|
523
528
|
id: navigationBearingFakeActionId,
|
|
524
|
-
title: ( localize(
|
|
529
|
+
title: ( localize(5974, "Navigation Status")),
|
|
525
530
|
precondition: ( ContextKeyExpr.false())
|
|
526
531
|
},
|
|
527
532
|
group: "navigate",
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js
CHANGED
|
@@ -200,9 +200,9 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
200
200
|
} = that._navigationBearings.read(r);
|
|
201
201
|
if (changeCount > 0) {
|
|
202
202
|
const n = activeIdx === -1 ? "1" : `${activeIdx + 1}`;
|
|
203
|
-
this.label.innerText = ( localize(
|
|
203
|
+
this.label.innerText = ( localize(5982, "{0} of {1}", n, changeCount));
|
|
204
204
|
} else {
|
|
205
|
-
this.label.innerText = ( localize(
|
|
205
|
+
this.label.innerText = ( localize(5983, "—"));
|
|
206
206
|
}
|
|
207
207
|
this.updateTooltip();
|
|
208
208
|
}));
|
|
@@ -217,18 +217,18 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
217
217
|
}
|
|
218
218
|
let result;
|
|
219
219
|
if (changeCount === 1 && entriesCount === 1) {
|
|
220
|
-
result = ( localize(
|
|
220
|
+
result = ( localize(5984, "1 change in 1 file"));
|
|
221
221
|
} else if (changeCount === 1) {
|
|
222
|
-
result = ( localize(
|
|
222
|
+
result = ( localize(5985, "1 change in {0} files", entriesCount));
|
|
223
223
|
} else if (entriesCount === 1) {
|
|
224
|
-
result = ( localize(
|
|
224
|
+
result = ( localize(5986, "{0} changes in 1 file", changeCount));
|
|
225
225
|
} else {
|
|
226
|
-
result = ( localize(
|
|
226
|
+
result = ( localize(5987, "{0} changes in {1} files", changeCount, entriesCount));
|
|
227
227
|
}
|
|
228
228
|
if (!that._isBusy.get()) {
|
|
229
229
|
return result;
|
|
230
230
|
}
|
|
231
|
-
return localize(
|
|
231
|
+
return localize(5988, "{0} - Working...", result);
|
|
232
232
|
}
|
|
233
233
|
})();
|
|
234
234
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode
|
|
|
6
6
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
7
|
import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
|
|
8
8
|
import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
9
|
-
import { $, addDisposableListener, clearNode, getTotalWidth } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
9
|
+
import { $, addDisposableListener, clearNode, createTextNode, getTotalWidth } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
10
10
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
11
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
12
12
|
import { overviewRulerRangeHighlight } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editorColorRegistry';
|
|
@@ -95,7 +95,7 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
95
95
|
return {
|
|
96
96
|
startLineNumber: change.modified.startLineNumber,
|
|
97
97
|
endLineNumber: change.modified.endLineNumberExclusive - 1,
|
|
98
|
-
explanation: ( localize(
|
|
98
|
+
explanation: ( localize(5992, "Generating explanation...")),
|
|
99
99
|
read: false,
|
|
100
100
|
loading: true,
|
|
101
101
|
originalText,
|
|
@@ -116,7 +116,7 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
116
116
|
this._headerNode.appendChild(this._toggleButton);
|
|
117
117
|
this._dismissButton = $("div.chat-explanation-dismiss");
|
|
118
118
|
this._dismissButton.appendChild(renderIcon(Codicon.close));
|
|
119
|
-
this._dismissButton.title = ( localize(
|
|
119
|
+
this._dismissButton.title = ( localize(5993, "Dismiss"));
|
|
120
120
|
this._headerNode.appendChild(this._dismissButton);
|
|
121
121
|
this._domNode.appendChild(this._headerNode);
|
|
122
122
|
this._bodyNode = $("div.chat-explanation-body");
|
|
@@ -178,35 +178,35 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
178
178
|
this._readIndicator.appendChild(renderIcon(Codicon.circle));
|
|
179
179
|
this._readIndicator.classList.add("read");
|
|
180
180
|
this._readIndicator.classList.remove("partial", "unread");
|
|
181
|
-
this._readIndicator.title = ( localize(
|
|
181
|
+
this._readIndicator.title = ( localize(5994, "Mark as unread"));
|
|
182
182
|
} else if (someRead) {
|
|
183
183
|
this._readIndicator.appendChild(renderIcon(Codicon.circleFilled));
|
|
184
184
|
this._readIndicator.classList.remove("read", "unread");
|
|
185
185
|
this._readIndicator.classList.add("partial");
|
|
186
|
-
this._readIndicator.title = ( localize(
|
|
186
|
+
this._readIndicator.title = ( localize(5995, "Mark all as read"));
|
|
187
187
|
} else {
|
|
188
188
|
this._readIndicator.appendChild(renderIcon(Codicon.circleFilled));
|
|
189
189
|
this._readIndicator.classList.remove("read", "partial");
|
|
190
190
|
this._readIndicator.classList.add("unread");
|
|
191
|
-
this._readIndicator.title = ( localize(
|
|
191
|
+
this._readIndicator.title = ( localize(5996, "Mark as read"));
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
_updateTitle() {
|
|
195
195
|
const count = this._explanations.length;
|
|
196
196
|
if (count === 1) {
|
|
197
|
-
this._titleNode.textContent = ( localize(
|
|
197
|
+
this._titleNode.textContent = ( localize(5997, "1 change"));
|
|
198
198
|
} else {
|
|
199
|
-
this._titleNode.textContent = ( localize(
|
|
199
|
+
this._titleNode.textContent = ( localize(5998, "{0} changes", count));
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
_updateToggleButton() {
|
|
203
203
|
clearNode(this._toggleButton);
|
|
204
204
|
if (this._isExpanded) {
|
|
205
205
|
this._toggleButton.appendChild(renderIcon(Codicon.chevronUp));
|
|
206
|
-
this._toggleButton.title = ( localize(
|
|
206
|
+
this._toggleButton.title = ( localize(5999, "Collapse"));
|
|
207
207
|
} else {
|
|
208
208
|
this._toggleButton.appendChild(renderIcon(Codicon.chevronDown));
|
|
209
|
-
this._toggleButton.title = ( localize(
|
|
209
|
+
this._toggleButton.title = ( localize(6000, "Expand"));
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
_buildExplanationItems() {
|
|
@@ -217,9 +217,9 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
217
217
|
const item = $("div.chat-explanation-item");
|
|
218
218
|
const lineInfo = $("span.chat-explanation-line-info");
|
|
219
219
|
if (exp.startLineNumber === exp.endLineNumber) {
|
|
220
|
-
lineInfo.textContent = ( localize(
|
|
220
|
+
lineInfo.textContent = ( localize(6001, "Line {0}", exp.startLineNumber));
|
|
221
221
|
} else {
|
|
222
|
-
lineInfo.textContent = ( localize(
|
|
222
|
+
lineInfo.textContent = ( localize(6002, "Lines {0}-{1}", exp.startLineNumber, exp.endLineNumber));
|
|
223
223
|
}
|
|
224
224
|
item.appendChild(lineInfo);
|
|
225
225
|
const text = $("span.chat-explanation-text");
|
|
@@ -227,7 +227,7 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
227
227
|
const loadingIcon = renderIcon(ThemeIcon.modify(Codicon.loading, "spin"));
|
|
228
228
|
loadingIcon.classList.add("chat-explanation-loading");
|
|
229
229
|
text.appendChild(loadingIcon);
|
|
230
|
-
const loadingText =
|
|
230
|
+
const loadingText = createTextNode(" " + exp.explanation);
|
|
231
231
|
text.appendChild(loadingText);
|
|
232
232
|
} else {
|
|
233
233
|
text.textContent = exp.explanation;
|
|
@@ -238,7 +238,7 @@ class ChatEditingExplanationWidget extends Disposable {
|
|
|
238
238
|
item.appendChild(itemReadIndicator);
|
|
239
239
|
const replyButton = $("div.chat-explanation-reply-button");
|
|
240
240
|
replyButton.appendChild(renderIcon(Codicon.arrowRight));
|
|
241
|
-
replyButton.title = ( localize(
|
|
241
|
+
replyButton.title = ( localize(6003, "Follow up on this change"));
|
|
242
242
|
item.appendChild(replyButton);
|
|
243
243
|
this._eventStore.add(addDisposableListener(replyButton, "click", async e => {
|
|
244
244
|
e.stopPropagation();
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
10
10
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
11
11
|
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
12
12
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
13
|
+
import { IChatInputPickerOptions } from "../widget/input/chatInputPickerActionItem.js";
|
|
13
14
|
export interface IChatSessionPickerDelegate {
|
|
14
15
|
readonly onDidChangeOption: Event<IChatSessionProviderOptionItem>;
|
|
15
16
|
getCurrentOption(): IChatSessionProviderOptionItem | undefined;
|
|
@@ -23,13 +24,14 @@ export interface IChatSessionPickerDelegate {
|
|
|
23
24
|
*/
|
|
24
25
|
export declare class ChatSessionPickerActionItem extends ActionWidgetDropdownActionViewItem {
|
|
25
26
|
protected readonly delegate: IChatSessionPickerDelegate;
|
|
27
|
+
protected readonly _pickerOptions: IChatInputPickerOptions | undefined;
|
|
26
28
|
protected readonly commandService: ICommandService;
|
|
27
29
|
protected currentOption: IChatSessionProviderOptionItem | undefined;
|
|
28
30
|
protected container: HTMLElement | undefined;
|
|
29
31
|
constructor(action: IAction, initialState: {
|
|
30
32
|
group: IChatSessionProviderOptionGroup;
|
|
31
33
|
item: IChatSessionProviderOptionItem | undefined;
|
|
32
|
-
}, delegate: IChatSessionPickerDelegate, actionWidgetService: IActionWidgetService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, commandService: ICommandService, telemetryService: ITelemetryService);
|
|
34
|
+
}, delegate: IChatSessionPickerDelegate, _pickerOptions: IChatInputPickerOptions | undefined, actionWidgetService: IActionWidgetService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, commandService: ICommandService, telemetryService: ITelemetryService);
|
|
33
35
|
/**
|
|
34
36
|
* Returns the actions to show in the dropdown. Can be overridden by subclasses.
|
|
35
37
|
*/
|
|
@@ -38,6 +40,11 @@ export declare class ChatSessionPickerActionItem extends ActionWidgetDropdownAct
|
|
|
38
40
|
* Creates a disabled action for a locked option.
|
|
39
41
|
*/
|
|
40
42
|
protected createLockedOptionAction(option: IChatSessionProviderOptionItem): IActionWidgetDropdownAction;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the anchor element for the dropdown.
|
|
45
|
+
* Falls back to the overflow anchor if this element is not in the DOM.
|
|
46
|
+
*/
|
|
47
|
+
private _getAnchorElement;
|
|
41
48
|
protected renderLabel(element: HTMLElement): IDisposable | null;
|
|
42
49
|
render(container: HTMLElement): void;
|
|
43
50
|
/**
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import * as chatSessionPickerActionItem from './media/chatSessionPickerActionItem.css';
|
|
5
|
-
import { $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
+
import { getActiveWindow, $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
|
|
7
7
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
8
8
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
@@ -18,6 +18,7 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
18
18
|
action,
|
|
19
19
|
initialState,
|
|
20
20
|
delegate,
|
|
21
|
+
_pickerOptions,
|
|
21
22
|
actionWidgetService,
|
|
22
23
|
contextKeyService,
|
|
23
24
|
keybindingService,
|
|
@@ -43,7 +44,8 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
43
44
|
id: group.id,
|
|
44
45
|
name: `ChatSession:${group.name}`,
|
|
45
46
|
includeOptions: false
|
|
46
|
-
}
|
|
47
|
+
},
|
|
48
|
+
getAnchor: () => this._getAnchorElement()
|
|
47
49
|
};
|
|
48
50
|
super(
|
|
49
51
|
actionWithLabel,
|
|
@@ -54,6 +56,7 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
54
56
|
telemetryService
|
|
55
57
|
);
|
|
56
58
|
this.delegate = delegate;
|
|
59
|
+
this._pickerOptions = _pickerOptions;
|
|
57
60
|
this.commandService = commandService;
|
|
58
61
|
this.currentOption = item;
|
|
59
62
|
this._register(this.delegate.onDidChangeOption(newOption => {
|
|
@@ -130,6 +133,12 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
130
133
|
run: () => {}
|
|
131
134
|
};
|
|
132
135
|
}
|
|
136
|
+
_getAnchorElement() {
|
|
137
|
+
if (this.element && getActiveWindow().document.contains(this.element)) {
|
|
138
|
+
return this.element;
|
|
139
|
+
}
|
|
140
|
+
return this._pickerOptions?.getOverflowAnchor?.() ?? this.element;
|
|
141
|
+
}
|
|
133
142
|
renderLabel(element) {
|
|
134
143
|
const domChildren = [];
|
|
135
144
|
element.classList.add("chat-session-option-picker");
|
|
@@ -142,7 +151,7 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
142
151
|
domChildren.push($(
|
|
143
152
|
"span.chat-session-option-label",
|
|
144
153
|
undefined,
|
|
145
|
-
this.currentOption?.name ?? group?.description ?? ( localize(
|
|
154
|
+
this.currentOption?.name ?? group?.description ?? ( localize(6142, "Pick Option"))
|
|
146
155
|
));
|
|
147
156
|
}
|
|
148
157
|
domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
@@ -173,6 +182,6 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
|
|
|
173
182
|
}
|
|
174
183
|
}
|
|
175
184
|
};
|
|
176
|
-
ChatSessionPickerActionItem = ( __decorate([( __param(
|
|
185
|
+
ChatSessionPickerActionItem = ( __decorate([( __param(4, IActionWidgetService)), ( __param(5, IContextKeyService)), ( __param(6, IKeybindingService)), ( __param(7, ICommandService)), ( __param(8, ITelemetryService))], ChatSessionPickerActionItem));
|
|
177
186
|
|
|
178
187
|
export { ChatSessionPickerActionItem };
|