@codingame/monaco-vscode-chat-service-override 26.1.1 → 26.1.2
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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +19 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +209 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +255 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +51 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +329 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +51 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +58 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +591 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +162 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +30 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +24 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +251 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +13 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +203 -25
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +50 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +23 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +76 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +120 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +22 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +135 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +64 -43
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +24 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +341 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +95 -26
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +14 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +0 -955
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js
CHANGED
|
@@ -18,7 +18,7 @@ let AgentSessionsQuickAccessProvider = class AgentSessionsQuickAccessProvider ex
|
|
|
18
18
|
super(AGENT_SESSIONS_QUICK_ACCESS_PREFIX, {
|
|
19
19
|
canAcceptInBackground: true,
|
|
20
20
|
noResultsPick: {
|
|
21
|
-
label: ( localize(
|
|
21
|
+
label: ( localize(4989, "No matching agent sessions"))
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
this.agentSessionsService = agentSessionsService;
|
|
@@ -5,7 +5,7 @@ import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/c
|
|
|
5
5
|
const inAgentSessionProjection = ( new RawContextKey("chatInAgentSessionProjection", false, {
|
|
6
6
|
type: "boolean",
|
|
7
7
|
description: ( localize(
|
|
8
|
-
|
|
8
|
+
5014,
|
|
9
9
|
"True when the workbench is in agent session projection mode for reviewing an agent session."
|
|
10
10
|
))
|
|
11
11
|
}));
|
|
@@ -21,7 +21,7 @@ class EnterAgentSessionProjectionAction extends Action2 {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super({
|
|
23
23
|
id: EnterAgentSessionProjectionAction.ID,
|
|
24
|
-
title: ( localize2(
|
|
24
|
+
title: ( localize2(5015, "Enter Agent Session Projection")),
|
|
25
25
|
category: CHAT_CATEGORY,
|
|
26
26
|
f1: false,
|
|
27
27
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.has(`config.${ChatConfiguration.AgentSessionProjectionEnabled}`)), ( inAgentSessionProjection.negate())))
|
|
@@ -50,7 +50,7 @@ class ExitAgentSessionProjectionAction extends Action2 {
|
|
|
50
50
|
constructor() {
|
|
51
51
|
super({
|
|
52
52
|
id: ExitAgentSessionProjectionAction.ID,
|
|
53
|
-
title: ( localize2(
|
|
53
|
+
title: ( localize2(5016, "Exit Agent Session Projection")),
|
|
54
54
|
category: CHAT_CATEGORY,
|
|
55
55
|
f1: true,
|
|
56
56
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, inAgentSessionProjection)),
|
|
@@ -68,13 +68,13 @@ class ExitAgentSessionProjectionAction extends Action2 {
|
|
|
68
68
|
}
|
|
69
69
|
class ToggleAgentStatusAction extends ToggleTitleBarConfigAction {
|
|
70
70
|
constructor() {
|
|
71
|
-
super(ChatConfiguration.AgentStatusEnabled, ( localize(
|
|
71
|
+
super(ChatConfiguration.AgentStatusEnabled, ( localize(5017, "Agent Status")), ( localize(5018, "Toggle visibility of the Agent Status in title bar")), 6, ( ContextKeyExpr.and(ChatContextKeys.enabled, ( IsCompactTitleBarContext.negate()), ChatContextKeys.supported, ( ContextKeyExpr.has("config.window.commandCenter")))));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
class ToggleUnifiedAgentsBarAction extends ToggleTitleBarConfigAction {
|
|
75
75
|
constructor() {
|
|
76
|
-
super(ChatConfiguration.UnifiedAgentsBar, ( localize(
|
|
77
|
-
|
|
76
|
+
super(ChatConfiguration.UnifiedAgentsBar, ( localize(5019, "Agent Quick Input")), ( localize(
|
|
77
|
+
5020,
|
|
78
78
|
"Toggle Agent Quick Input, replacing the classic command center search box."
|
|
79
79
|
)), 7, ( ContextKeyExpr.and(ChatContextKeys.enabled, ( IsCompactTitleBarContext.negate()), ChatContextKeys.supported, ( ContextKeyExpr.has("config.window.commandCenter")))));
|
|
80
80
|
}
|
|
@@ -138,7 +138,7 @@ let AgentSessionProjectionService = class AgentSessionProjectionService extends
|
|
|
138
138
|
multiDiffSourceUri: session.resource.with({
|
|
139
139
|
scheme: session.resource.scheme + "-agent-session-projection"
|
|
140
140
|
}),
|
|
141
|
-
title: ( localize(
|
|
141
|
+
title: ( localize(5021, "{0} - All Changes", session.label)),
|
|
142
142
|
resources: diffResources
|
|
143
143
|
});
|
|
144
144
|
this.logService.trace(`[AgentSessionProjection] Multi-diff editor opened successfully`);
|
|
@@ -181,14 +181,14 @@ registerWorkbenchContribution2(
|
|
|
181
181
|
);
|
|
182
182
|
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
183
183
|
submenu: MenuId.AgentsTitleBarControlMenu,
|
|
184
|
-
title: ( localize(
|
|
184
|
+
title: ( localize(5022, "Agents")),
|
|
185
185
|
icon: Codicon.chatSparkle,
|
|
186
186
|
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`)))))),
|
|
187
187
|
order: 10002
|
|
188
188
|
});
|
|
189
189
|
MenuRegistry.appendMenuItem(MenuId.TitleBar, {
|
|
190
190
|
submenu: MenuId.ChatTitleBarMenu,
|
|
191
|
-
title: ( localize(
|
|
191
|
+
title: ( localize(5023, "Chat")),
|
|
192
192
|
group: "navigation",
|
|
193
193
|
icon: Codicon.chatSparkle,
|
|
194
194
|
when: ( ContextKeyExpr.and(ChatContextKeys.supported, ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabled.negate()))), ( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ( ContextKeyExpr.has("config.window.commandCenter")).negate()))),
|
|
@@ -197,7 +197,7 @@ MenuRegistry.appendMenuItem(MenuId.TitleBar, {
|
|
|
197
197
|
MenuRegistry.appendMenuItem(MenuId.AgentsTitleBarControlMenu, {
|
|
198
198
|
command: {
|
|
199
199
|
id: "workbench.action.chat.toggle",
|
|
200
|
-
title: ( localize(
|
|
200
|
+
title: ( localize(5024, "Open Chat"))
|
|
201
201
|
},
|
|
202
202
|
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`)))))),
|
|
203
203
|
group: "a_open",
|
|
@@ -206,7 +206,7 @@ MenuRegistry.appendMenuItem(MenuId.AgentsTitleBarControlMenu, {
|
|
|
206
206
|
MenuRegistry.appendMenuItem(MenuId.AgentsTitleBarControlMenu, {
|
|
207
207
|
command: {
|
|
208
208
|
id: `toggle.${ChatConfiguration.UnifiedAgentsBar}`,
|
|
209
|
-
title: ( localize(
|
|
209
|
+
title: ( localize(5025, "Agent Quick Input (Experimental)")),
|
|
210
210
|
toggled: ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))
|
|
211
211
|
},
|
|
212
212
|
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ProductQualityContext.notEqualsTo("stable")))),
|
|
@@ -57,7 +57,7 @@ const OPEN_CHAT_QUOTA_EXCEEDED_DIALOG = "workbench.action.chat.openQuotaExceeded
|
|
|
57
57
|
const QUICK_OPEN_ACTION_ID = "workbench.action.quickOpenWithModes";
|
|
58
58
|
const FILTER_STORAGE_KEY = "agentSessions.filterExcludes.agentsessionsviewerfiltersubmenu";
|
|
59
59
|
const PREVIOUS_FILTER_STORAGE_KEY = "agentSessions.filterExcludes.previousUserFilter";
|
|
60
|
-
const NLS_EXTENSION_HOST = ( localize(
|
|
60
|
+
const NLS_EXTENSION_HOST = ( localize(5026, "[Extension Development Host]"));
|
|
61
61
|
const TITLE_DIRTY = "● ";
|
|
62
62
|
let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActionViewItem {
|
|
63
63
|
constructor(
|
|
@@ -282,7 +282,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
282
282
|
pill.classList.add("needs-attention");
|
|
283
283
|
}
|
|
284
284
|
pill.setAttribute("role", "button");
|
|
285
|
-
pill.setAttribute("aria-label", ( localize(
|
|
285
|
+
pill.setAttribute("aria-label", ( localize(5027, "Open Quick Access")));
|
|
286
286
|
pill.tabIndex = 0;
|
|
287
287
|
this._firstFocusableElement = pill;
|
|
288
288
|
this._container.appendChild(pill);
|
|
@@ -307,7 +307,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
307
307
|
if (progressText) {
|
|
308
308
|
label.classList.add("has-progress");
|
|
309
309
|
}
|
|
310
|
-
const hoverLabel = ( localize(
|
|
310
|
+
const hoverLabel = ( localize(5028, "Ask anything or describe what to build next"));
|
|
311
311
|
label.textContent = defaultLabel;
|
|
312
312
|
pill.appendChild(label);
|
|
313
313
|
const sendIcon = $("span.agent-status-send");
|
|
@@ -331,10 +331,10 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
331
331
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
332
332
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, pill, () => {
|
|
333
333
|
if (this._displayedSession) {
|
|
334
|
-
return localize(
|
|
334
|
+
return localize(5029, "Open session: {0}", this._displayedSession.label);
|
|
335
335
|
}
|
|
336
336
|
const kbForTooltip = this.keybindingService.lookupKeybinding(UNIFIED_QUICK_ACCESS_ACTION_ID)?.getLabel();
|
|
337
|
-
return kbForTooltip ? ( localize(
|
|
337
|
+
return kbForTooltip ? ( localize(5030, "Open Quick Access ({0})", kbForTooltip)) : ( localize(5031, "Open Quick Access"));
|
|
338
338
|
}));
|
|
339
339
|
disposables.add(addDisposableListener(pill, EventType.CLICK, e => {
|
|
340
340
|
e.preventDefault();
|
|
@@ -367,13 +367,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
367
367
|
this._renderSearchButton(disposables, pill);
|
|
368
368
|
const titleLabel = $("span.agent-status-title");
|
|
369
369
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
370
|
-
titleLabel.textContent = sessionInfo?.title ?? ( localize(
|
|
370
|
+
titleLabel.textContent = sessionInfo?.title ?? ( localize(5032, "Agent Session Projection"));
|
|
371
371
|
pill.appendChild(titleLabel);
|
|
372
372
|
this._renderEscapeButton(disposables, pill);
|
|
373
373
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
374
374
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, pill, () => {
|
|
375
375
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
376
|
-
return sessionInfo ? ( localize(
|
|
376
|
+
return sessionInfo ? ( localize(5033, "Agent Session Projection: {0}", sessionInfo.title)) : ( localize(5032, "Agent Session Projection"));
|
|
377
377
|
}));
|
|
378
378
|
const exitHandler = e => {
|
|
379
379
|
e.preventDefault();
|
|
@@ -399,13 +399,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
399
399
|
this._container.appendChild(pill);
|
|
400
400
|
const titleLabel = $("span.agent-status-title");
|
|
401
401
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
402
|
-
titleLabel.textContent = sessionInfo?.title ?? ( localize(
|
|
402
|
+
titleLabel.textContent = sessionInfo?.title ?? ( localize(5034, "Review Changes"));
|
|
403
403
|
pill.appendChild(titleLabel);
|
|
404
404
|
this._renderEnterButton(disposables, pill);
|
|
405
405
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
406
406
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, pill, () => {
|
|
407
407
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
408
|
-
return sessionInfo ? ( localize(
|
|
408
|
+
return sessionInfo ? ( localize(5035, "Review changes from: {0}", sessionInfo.title)) : ( localize(5036, "Review agent session changes"));
|
|
409
409
|
}));
|
|
410
410
|
const enterHandler = e => {
|
|
411
411
|
e.preventDefault();
|
|
@@ -484,7 +484,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
484
484
|
const searchButton = $("span.agent-status-search");
|
|
485
485
|
reset(searchButton, renderIcon(Codicon.searchSparkle));
|
|
486
486
|
searchButton.setAttribute("role", "button");
|
|
487
|
-
searchButton.setAttribute("aria-label", ( localize(
|
|
487
|
+
searchButton.setAttribute("aria-label", ( localize(5037, "Open Quick Open")));
|
|
488
488
|
searchButton.tabIndex = 0;
|
|
489
489
|
if (!this._firstFocusableElement) {
|
|
490
490
|
this._firstFocusableElement = searchButton;
|
|
@@ -492,7 +492,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
492
492
|
container.appendChild(searchButton);
|
|
493
493
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
494
494
|
const searchKb = this.keybindingService.lookupKeybinding(QUICK_OPEN_ACTION_ID)?.getLabel();
|
|
495
|
-
const searchTooltip = searchKb ? ( localize(
|
|
495
|
+
const searchTooltip = searchKb ? ( localize(5038, "Go to File ({0})", searchKb)) : ( localize(5039, "Go to File"));
|
|
496
496
|
disposables.add(
|
|
497
497
|
this.hoverService.setupManagedHover(hoverDelegate, searchButton, searchTooltip)
|
|
498
498
|
);
|
|
@@ -534,17 +534,17 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
534
534
|
const anonymous = this.chatEntitlementService.anonymous;
|
|
535
535
|
const free = this.chatEntitlementService.entitlement === ChatEntitlement.Free;
|
|
536
536
|
let primaryActionId = TOGGLE_CHAT_ACTION_ID;
|
|
537
|
-
let primaryActionTitle = ( localize(
|
|
537
|
+
let primaryActionTitle = ( localize(5040, "Toggle Chat"));
|
|
538
538
|
let primaryActionIcon = Codicon.chatSparkle;
|
|
539
539
|
if (chatSentiment.installed && !chatSentiment.disabled) {
|
|
540
540
|
if (signedOut && !anonymous) {
|
|
541
541
|
primaryActionId = CHAT_SETUP_ACTION_ID;
|
|
542
|
-
primaryActionTitle = ( localize(
|
|
542
|
+
primaryActionTitle = ( localize(5041, "Sign in to use AI features..."));
|
|
543
543
|
primaryActionIcon = Codicon.chatSparkleError;
|
|
544
544
|
} else if (chatQuotaExceeded && free) {
|
|
545
545
|
primaryActionId = OPEN_CHAT_QUOTA_EXCEEDED_DIALOG;
|
|
546
546
|
primaryActionTitle = ( localize(
|
|
547
|
-
|
|
547
|
+
5042,
|
|
548
548
|
"GitHub Copilot Free plan chat messages quota reached. Click for details."
|
|
549
549
|
));
|
|
550
550
|
primaryActionIcon = Codicon.chatSparkleWarning;
|
|
@@ -614,7 +614,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
614
614
|
this._openSessionsWithFilter("unread");
|
|
615
615
|
}
|
|
616
616
|
}));
|
|
617
|
-
const unreadTooltip = unreadSessions.length === 1 ? ( localize(
|
|
617
|
+
const unreadTooltip = unreadSessions.length === 1 ? ( localize(5043, "{0} unread session", unreadSessions.length)) : ( localize(5044, "{0} unread sessions", unreadSessions.length));
|
|
618
618
|
disposables.add(
|
|
619
619
|
this.hoverService.setupManagedHover(hoverDelegate, unreadSection, unreadTooltip)
|
|
620
620
|
);
|
|
@@ -656,7 +656,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
656
656
|
this._openSessionsWithFilter("inProgress");
|
|
657
657
|
}
|
|
658
658
|
}));
|
|
659
|
-
const activeTooltip = hasAttentionNeeded ? (attentionNeededSessions.length === 1 ? ( localize(
|
|
659
|
+
const activeTooltip = hasAttentionNeeded ? (attentionNeededSessions.length === 1 ? ( localize(5045, "{0} session needs input", attentionNeededSessions.length)) : ( localize(5046, "{0} sessions need input", attentionNeededSessions.length))) : (activeSessions.length === 1 ? ( localize(5047, "{0} session in progress", activeSessions.length)) : ( localize(5048, "{0} sessions in progress", activeSessions.length)));
|
|
660
660
|
disposables.add(
|
|
661
661
|
this.hoverService.setupManagedHover(hoverDelegate, activeSection, activeTooltip)
|
|
662
662
|
);
|
|
@@ -784,12 +784,12 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
784
784
|
const escButton = $("span.agent-status-esc-button");
|
|
785
785
|
escButton.textContent = "Esc";
|
|
786
786
|
escButton.setAttribute("role", "button");
|
|
787
|
-
escButton.setAttribute("aria-label", ( localize(
|
|
787
|
+
escButton.setAttribute("aria-label", ( localize(5049, "Exit Agent Session Projection")));
|
|
788
788
|
escButton.tabIndex = 0;
|
|
789
789
|
parent.appendChild(escButton);
|
|
790
790
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
791
791
|
disposables.add(
|
|
792
|
-
this.hoverService.setupManagedHover(hoverDelegate, escButton, ( localize(
|
|
792
|
+
this.hoverService.setupManagedHover(hoverDelegate, escButton, ( localize(5050, "Exit Agent Session Projection (Escape)")))
|
|
793
793
|
);
|
|
794
794
|
disposables.add(addDisposableListener(escButton, EventType.MOUSE_DOWN, e => {
|
|
795
795
|
e.preventDefault();
|
|
@@ -812,16 +812,16 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
812
812
|
_renderEnterButton(disposables, parent) {
|
|
813
813
|
const enterButton = $("span.agent-status-enter-button");
|
|
814
814
|
const keybinding = this.keybindingService.lookupKeybinding(EnterAgentSessionProjectionAction.ID);
|
|
815
|
-
enterButton.textContent = keybinding?.getLabel() ?? ( localize(
|
|
815
|
+
enterButton.textContent = keybinding?.getLabel() ?? ( localize(5051, "Review"));
|
|
816
816
|
enterButton.setAttribute("role", "button");
|
|
817
|
-
enterButton.setAttribute("aria-label", ( localize(
|
|
817
|
+
enterButton.setAttribute("aria-label", ( localize(5052, "Enter Agent Session Projection")));
|
|
818
818
|
enterButton.tabIndex = 0;
|
|
819
819
|
if (!this._firstFocusableElement) {
|
|
820
820
|
this._firstFocusableElement = enterButton;
|
|
821
821
|
}
|
|
822
822
|
parent.appendChild(enterButton);
|
|
823
823
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
824
|
-
const hoverText = keybinding ? ( localize(
|
|
824
|
+
const hoverText = keybinding ? ( localize(5053, "Review Changes ({0})", keybinding.getLabel())) : ( localize(5054, "Review Changes"));
|
|
825
825
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, enterButton, hoverText));
|
|
826
826
|
const enterProjection = e => {
|
|
827
827
|
e.preventDefault();
|
|
@@ -888,13 +888,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
890
|
if (!label) {
|
|
891
|
-
label = ( localize(
|
|
891
|
+
label = ( localize(5055, "Ask anything..."));
|
|
892
892
|
}
|
|
893
893
|
if (prefix) {
|
|
894
|
-
label = ( localize(
|
|
894
|
+
label = ( localize(5056, "{0} {1}", prefix, label));
|
|
895
895
|
}
|
|
896
896
|
if (suffix) {
|
|
897
|
-
label = ( localize(
|
|
897
|
+
label = ( localize(5057, "{0} {1}", label, suffix));
|
|
898
898
|
}
|
|
899
899
|
return label.replaceAll(/\r\n|\r|\n/g, "⏎");
|
|
900
900
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js
CHANGED
|
@@ -26,22 +26,22 @@ registerCss(unifiedQuickAccess);
|
|
|
26
26
|
const SEND_TO_AGENT_ID = "unified-quick-access-send-to-agent";
|
|
27
27
|
const DEFAULT_UNIFIED_QUICK_ACCESS_TABS = [{
|
|
28
28
|
id: "agentSessions",
|
|
29
|
-
label: ( localize(
|
|
29
|
+
label: ( localize(5058, "Sessions")),
|
|
30
30
|
prefix: "agent ",
|
|
31
|
-
placeholder: ( localize(
|
|
32
|
-
tooltip: ( localize(
|
|
31
|
+
placeholder: ( localize(5059, "Search sessions or type a message...")),
|
|
32
|
+
tooltip: ( localize(5060, "Search sessions or send a message to agent"))
|
|
33
33
|
}, {
|
|
34
34
|
id: "commands",
|
|
35
|
-
label: ( localize(
|
|
35
|
+
label: ( localize(5061, "Commands")),
|
|
36
36
|
prefix: ">",
|
|
37
|
-
placeholder: ( localize(
|
|
38
|
-
tooltip: ( localize(
|
|
37
|
+
placeholder: ( localize(5062, "Search commands...")),
|
|
38
|
+
tooltip: ( localize(5063, "Run commands"))
|
|
39
39
|
}, {
|
|
40
40
|
id: "files",
|
|
41
|
-
label: ( localize(
|
|
41
|
+
label: ( localize(5064, "Files")),
|
|
42
42
|
prefix: "",
|
|
43
|
-
placeholder: ( localize(
|
|
44
|
-
tooltip: ( localize(
|
|
43
|
+
placeholder: ( localize(5065, "Search files...")),
|
|
44
|
+
tooltip: ( localize(5066, "Go to files"))
|
|
45
45
|
}];
|
|
46
46
|
let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
|
|
47
47
|
constructor(
|
|
@@ -213,14 +213,14 @@ let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
|
|
|
213
213
|
}
|
|
214
214
|
const hasInput = value.trim().length > 0;
|
|
215
215
|
if (hasInput) {
|
|
216
|
-
this._sendButtonLabel.textContent = ( localize(
|
|
217
|
-
this._sendButtonHover?.update(( localize(
|
|
216
|
+
this._sendButtonLabel.textContent = ( localize(5067, "Send"));
|
|
217
|
+
this._sendButtonHover?.update(( localize(5068, "Send message to new agent session")));
|
|
218
218
|
this._sendButtonIcon.style.display = "";
|
|
219
219
|
} else {
|
|
220
220
|
const openChatKeybinding = this.keybindingService.lookupKeybinding(CHAT_OPEN_ACTION_ID);
|
|
221
221
|
const openChatLabel = openChatKeybinding?.getLabel() ?? "";
|
|
222
|
-
this._sendButtonLabel.textContent = ( localize(
|
|
223
|
-
const tooltip = openChatLabel ? ( localize(
|
|
222
|
+
this._sendButtonLabel.textContent = ( localize(5069, "Open Chat"));
|
|
223
|
+
const tooltip = openChatLabel ? ( localize(5070, "Open chat ({0})", openChatLabel)) : ( localize(5071, "Open chat"));
|
|
224
224
|
this._sendButtonHover?.update(tooltip);
|
|
225
225
|
this._sendButtonIcon.style.display = "none";
|
|
226
226
|
}
|
|
@@ -279,10 +279,10 @@ let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
|
|
|
279
279
|
}
|
|
280
280
|
const sendItem = {
|
|
281
281
|
id: SEND_TO_AGENT_ID,
|
|
282
|
-
label: `$(send) ${( localize(
|
|
282
|
+
label: `$(send) ${( localize(5072, "Send to agent"))}`,
|
|
283
283
|
description: fullInput,
|
|
284
284
|
alwaysShow: true,
|
|
285
|
-
ariaLabel: ( localize(
|
|
285
|
+
ariaLabel: ( localize(5073, "Send message to agent: {0}", fullInput))
|
|
286
286
|
};
|
|
287
287
|
const currentItems = picker.items.filter(item => item.id !== SEND_TO_AGENT_ID);
|
|
288
288
|
const isSessionsTab = this._currentTab?.id === "agentSessions";
|
|
@@ -341,7 +341,7 @@ let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
|
|
|
341
341
|
if (tab.isSendTab) {
|
|
342
342
|
picker.busy = false;
|
|
343
343
|
picker.items = [{
|
|
344
|
-
label: ( localize(
|
|
344
|
+
label: ( localize(5074, "Press Enter or click Send to create a new agent session")),
|
|
345
345
|
alwaysShow: true
|
|
346
346
|
}];
|
|
347
347
|
return;
|
|
@@ -362,7 +362,7 @@ let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
|
|
|
362
362
|
} else {
|
|
363
363
|
picker.busy = false;
|
|
364
364
|
picker.items = [{
|
|
365
|
-
label: ( localize(
|
|
365
|
+
label: ( localize(5075, "No provider available for this tab")),
|
|
366
366
|
alwaysShow: true
|
|
367
367
|
}];
|
|
368
368
|
}
|
|
@@ -22,7 +22,7 @@ class ShowUnifiedQuickAccessAction extends Action2 {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super({
|
|
24
24
|
id: ShowUnifiedQuickAccessAction.ID,
|
|
25
|
-
title: ( localize2(
|
|
25
|
+
title: ( localize2(5076, "Show Agent Quick Access")),
|
|
26
26
|
f1: true,
|
|
27
27
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))))
|
|
28
28
|
});
|
|
@@ -40,7 +40,7 @@ class ShowAgentSessionsQuickAccessAction extends Action2 {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: ShowAgentSessionsQuickAccessAction.ID,
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(5077, "Show Agent Sessions")),
|
|
44
44
|
f1: true,
|
|
45
45
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))))
|
|
46
46
|
});
|
|
@@ -58,7 +58,7 @@ class ShowCommandsQuickAccessAction extends Action2 {
|
|
|
58
58
|
constructor() {
|
|
59
59
|
super({
|
|
60
60
|
id: ShowCommandsQuickAccessAction.ID,
|
|
61
|
-
title: ( localize2(
|
|
61
|
+
title: ( localize2(5078, "Show Commands (Unified)")),
|
|
62
62
|
f1: true,
|
|
63
63
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))))
|
|
64
64
|
});
|
|
@@ -76,7 +76,7 @@ class ShowFilesQuickAccessAction extends Action2 {
|
|
|
76
76
|
constructor() {
|
|
77
77
|
super({
|
|
78
78
|
id: ShowFilesQuickAccessAction.ID,
|
|
79
|
-
title: ( localize2(
|
|
79
|
+
title: ( localize2(5079, "Show Files (Unified)")),
|
|
80
80
|
f1: true,
|
|
81
81
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))))
|
|
82
82
|
});
|
package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js
CHANGED
|
@@ -131,7 +131,7 @@ let ChatAttachmentResolveService = class ChatAttachmentResolveService {
|
|
|
131
131
|
}
|
|
132
132
|
const readFile = await this.fileService.readFile(resource);
|
|
133
133
|
if (stat.size > 30 * 1024 * 1024) {
|
|
134
|
-
this.dialogService.error(( localize(
|
|
134
|
+
this.dialogService.error(( localize(5080, "Image is too large")), ( localize(5081, "The image {0} is too large to be attached.", fileName)));
|
|
135
135
|
throw ( new Error("Image is too large"));
|
|
136
136
|
}
|
|
137
137
|
dataBuffer = readFile.value;
|
package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js
CHANGED
|
@@ -84,29 +84,29 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
84
84
|
const mainContent = createElement("div");
|
|
85
85
|
mainContent.className = "element-selection-main-content";
|
|
86
86
|
const message = createElement("span");
|
|
87
|
-
const startSelectionMessage = ( localize(
|
|
87
|
+
const startSelectionMessage = ( localize(5121, "Add element to chat"));
|
|
88
88
|
message.textContent = startSelectionMessage;
|
|
89
89
|
mainContent.appendChild(message);
|
|
90
90
|
let cts;
|
|
91
91
|
const actions = [];
|
|
92
92
|
actions.push(toAction({
|
|
93
93
|
id: "singleSelection",
|
|
94
|
-
label: ( localize(
|
|
94
|
+
label: ( localize(5122, "Select an Element")),
|
|
95
95
|
enabled: true,
|
|
96
96
|
run: async () => {
|
|
97
97
|
await startElementSelection();
|
|
98
98
|
}
|
|
99
99
|
}), toAction({
|
|
100
100
|
id: "continuousSelection",
|
|
101
|
-
label: ( localize(
|
|
101
|
+
label: ( localize(5123, "Continuous Selection")),
|
|
102
102
|
enabled: true,
|
|
103
103
|
run: async () => {
|
|
104
104
|
this._editor.focus();
|
|
105
105
|
cts = ( new CancellationTokenSource());
|
|
106
|
-
message.textContent = ( localize(
|
|
106
|
+
message.textContent = ( localize(5124, "Selecting element..."));
|
|
107
107
|
this.hideElement(startButton.element);
|
|
108
108
|
this.showElement(cancelButton.element);
|
|
109
|
-
cancelButton.label = ( localize(
|
|
109
|
+
cancelButton.label = ( localize(5125, "Done"));
|
|
110
110
|
while (!cts.token.isCancellationRequested) {
|
|
111
111
|
try {
|
|
112
112
|
await this.addElementToChat(cts);
|
|
@@ -116,7 +116,7 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
message.textContent = ( localize(
|
|
119
|
+
message.textContent = ( localize(5126, "Element added to chat"));
|
|
120
120
|
finishedSelecting();
|
|
121
121
|
}
|
|
122
122
|
}));
|
|
@@ -125,33 +125,33 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
125
125
|
addPrimaryActionToDropdown: false,
|
|
126
126
|
contextMenuProvider: this.contextMenuService,
|
|
127
127
|
supportShortLabel: true,
|
|
128
|
-
title: ( localize(
|
|
128
|
+
title: ( localize(5127, "Click to select an element.")),
|
|
129
129
|
supportIcons: true,
|
|
130
130
|
...defaultButtonStyles
|
|
131
131
|
})));
|
|
132
|
-
startButton.primaryButton.label = ( localize(
|
|
132
|
+
startButton.primaryButton.label = ( localize(5128, "Start"));
|
|
133
133
|
startButton.element.classList.add("element-selection-start");
|
|
134
134
|
const cancelButton = this._showStore.add(( new Button(mainContent, {
|
|
135
135
|
...defaultButtonStyles,
|
|
136
136
|
supportIcons: true,
|
|
137
|
-
title: ( localize(
|
|
137
|
+
title: ( localize(5129, "Click to cancel selection."))
|
|
138
138
|
})));
|
|
139
139
|
cancelButton.element.className = "element-selection-cancel hidden";
|
|
140
|
-
const cancelButtonLabel = ( localize(
|
|
140
|
+
const cancelButtonLabel = ( localize(5130, "Cancel"));
|
|
141
141
|
cancelButton.label = cancelButtonLabel;
|
|
142
142
|
const configure = this._showStore.add(( new Button(mainContent, {
|
|
143
143
|
supportIcons: true,
|
|
144
|
-
title: ( localize(
|
|
144
|
+
title: ( localize(5131, "Configure Attachments Sent"))
|
|
145
145
|
})));
|
|
146
146
|
configure.icon = Codicon.gear;
|
|
147
147
|
const collapseOverlay = this._showStore.add(( new Button(mainContent, {
|
|
148
148
|
supportIcons: true,
|
|
149
|
-
title: ( localize(
|
|
149
|
+
title: ( localize(5132, "Collapse Overlay"))
|
|
150
150
|
})));
|
|
151
151
|
collapseOverlay.icon = Codicon.chevronRight;
|
|
152
152
|
const nextSelection = this._showStore.add(( new Button(mainContent, {
|
|
153
153
|
supportIcons: true,
|
|
154
|
-
title: ( localize(
|
|
154
|
+
title: ( localize(5133, "Select Again"))
|
|
155
155
|
})));
|
|
156
156
|
nextSelection.icon = Codicon.close;
|
|
157
157
|
nextSelection.element.classList.add("hidden");
|
|
@@ -159,7 +159,7 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
159
159
|
expandContainer.className = "element-expand-container hidden";
|
|
160
160
|
const expandOverlay = this._showStore.add(( new Button(expandContainer, {
|
|
161
161
|
supportIcons: true,
|
|
162
|
-
title: ( localize(
|
|
162
|
+
title: ( localize(5134, "Expand Overlay"))
|
|
163
163
|
})));
|
|
164
164
|
expandOverlay.icon = Codicon.layout;
|
|
165
165
|
this._domNode.appendChild(mainContent);
|
|
@@ -182,11 +182,11 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
182
182
|
const startElementSelection = async () => {
|
|
183
183
|
cts = ( new CancellationTokenSource());
|
|
184
184
|
this._editor.focus();
|
|
185
|
-
message.textContent = ( localize(
|
|
185
|
+
message.textContent = ( localize(5124, "Selecting element..."));
|
|
186
186
|
this.hideElement(startButton.element);
|
|
187
187
|
this.showElement(cancelButton.element);
|
|
188
188
|
await this.addElementToChat(cts);
|
|
189
|
-
message.textContent = ( localize(
|
|
189
|
+
message.textContent = ( localize(5126, "Element added to chat"));
|
|
190
190
|
finishedSelecting();
|
|
191
191
|
};
|
|
192
192
|
this._showStore.add(
|
|
@@ -196,7 +196,7 @@ let SimpleBrowserOverlayWidget = class SimpleBrowserOverlayWidget {
|
|
|
196
196
|
);
|
|
197
197
|
this._showStore.add(addDisposableListener(cancelButton.element, "click", () => {
|
|
198
198
|
cts.cancel();
|
|
199
|
-
message.textContent = ( localize(
|
|
199
|
+
message.textContent = ( localize(5135, "Selection canceled"));
|
|
200
200
|
finishedSelecting();
|
|
201
201
|
}));
|
|
202
202
|
this._showStore.add(addDisposableListener(collapseOverlay.element, "click", () => {
|
|
@@ -332,7 +332,7 @@ let SimpleBrowserOverlayController = class SimpleBrowserOverlayController {
|
|
|
332
332
|
let cts = ( new CancellationTokenSource());
|
|
333
333
|
const show = async (locator, browserType) => {
|
|
334
334
|
widget.setActiveLocator(locator, browserType);
|
|
335
|
-
connectingWebviewElement.textContent = ( localize(
|
|
335
|
+
connectingWebviewElement.textContent = ( localize(5136, "Connecting to webview..."));
|
|
336
336
|
if (!container.contains(connectingWebviewElement)) {
|
|
337
337
|
container.appendChild(connectingWebviewElement);
|
|
338
338
|
}
|
|
@@ -341,7 +341,7 @@ let SimpleBrowserOverlayController = class SimpleBrowserOverlayController {
|
|
|
341
341
|
try {
|
|
342
342
|
await this._browserElementsService.startDebugSession(cts.token, locator);
|
|
343
343
|
} catch (error) {
|
|
344
|
-
connectingWebviewElement.textContent = ( localize(
|
|
344
|
+
connectingWebviewElement.textContent = ( localize(5137, "Please reopen the preview."));
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
347
|
if (cts.token.isCancellationRequested) {
|