@codingame/monaco-vscode-api 14.0.3 → 14.0.5
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/missing-services.js +2 -2
- package/package.json +8 -8
- package/services.js +5 -5
- package/vscode/src/vs/base/common/labels.d.ts +5 -1
- package/vscode/src/vs/base/common/labels.js +12 -4
- package/vscode/src/vs/workbench/api/common/extHostVariableResolverService.js +2 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +24 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotasService.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/screenshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +64 -64
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +9 -9
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +83 -83
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +11 -11
package/missing-services.js
CHANGED
|
@@ -1238,8 +1238,8 @@ registerSingleton(IPathService, PathService, InstantiationType.Delayed);
|
|
|
1238
1238
|
class ProductService {
|
|
1239
1239
|
constructor() {
|
|
1240
1240
|
this._serviceBrand = undefined;
|
|
1241
|
-
this.version = "1.97.
|
|
1242
|
-
this.commit = "
|
|
1241
|
+
this.version = "1.97.2";
|
|
1242
|
+
this.commit = "e54c774e0add60467559eb0d1e229c6452cf8447";
|
|
1243
1243
|
this.quality = 'oss';
|
|
1244
1244
|
this.nameShort = 'Code - OSS Dev';
|
|
1245
1245
|
this.nameLong = 'Code - OSS Dev';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "14.0.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "14.0.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "14.0.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "14.0.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "14.0.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "14.0.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "14.0.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "14.0.5",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "14.0.5",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "14.0.5",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "14.0.5",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "14.0.5",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "14.0.5",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "14.0.5",
|
|
25
25
|
"marked": "14.0.0"
|
|
26
26
|
},
|
|
27
27
|
"main": "services.js",
|
package/services.js
CHANGED
|
@@ -180,18 +180,18 @@ export { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/k
|
|
|
180
180
|
export { ISecretStorageService } from './vscode/src/vs/platform/secrets/common/secrets.service.js';
|
|
181
181
|
export { ConfigurationTarget } from './vscode/src/vs/platform/configuration/common/configuration.js';
|
|
182
182
|
|
|
183
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.97.
|
|
184
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.97.
|
|
183
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.97.2-ee0e2c68-8039-4ccb-b3c0-1068d9745c11") {
|
|
184
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.97.2-ee0e2c68-8039-4ccb-b3c0-1068d9745c11"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
185
185
|
}
|
|
186
|
-
window.monacoVscodeApiBuildId = "1.97.
|
|
186
|
+
window.monacoVscodeApiBuildId = "1.97.2-ee0e2c68-8039-4ccb-b3c0-1068d9745c11";
|
|
187
187
|
async function initialize(overrides, container = document.body, configuration = {}, env) {
|
|
188
188
|
checkServicesNotInitialized();
|
|
189
189
|
initialize$1(container, configuration, env);
|
|
190
190
|
const instantiationService = StandaloneServices.initialize({
|
|
191
191
|
[IProductService.toString()]: mixin({
|
|
192
|
-
version: "1.97.
|
|
192
|
+
version: "1.97.2",
|
|
193
193
|
quality: 'stable',
|
|
194
|
-
commit: "
|
|
194
|
+
commit: "e54c774e0add60467559eb0d1e229c6452cf8447",
|
|
195
195
|
nameShort: 'Code - OSS',
|
|
196
196
|
nameLong: 'Code - OSS',
|
|
197
197
|
applicationName: 'code-oss',
|
|
@@ -33,7 +33,11 @@ export declare function template(template: string, values?: {
|
|
|
33
33
|
[key: string]: string | ISeparator | undefined | null;
|
|
34
34
|
}): string;
|
|
35
35
|
export declare function mnemonicMenuLabel(label: string, forceDisableMnemonics?: boolean): string;
|
|
36
|
-
export declare function mnemonicButtonLabel(label: string, forceDisableMnemonics
|
|
36
|
+
export declare function mnemonicButtonLabel(label: string, forceDisableMnemonics: true): string;
|
|
37
|
+
export declare function mnemonicButtonLabel(label: string, forceDisableMnemonics?: false): {
|
|
38
|
+
readonly withMnemonic: string;
|
|
39
|
+
readonly withoutMnemonic: string;
|
|
40
|
+
};
|
|
37
41
|
export declare function unmnemonicLabel(label: string): string;
|
|
38
42
|
export declare function splitRecentLabel(recentLabel: string): {
|
|
39
43
|
name: string;
|
|
@@ -228,13 +228,21 @@ function mnemonicMenuLabel(label, forceDisableMnemonics) {
|
|
|
228
228
|
return label.replace(/&&|&/g, m => m === '&' ? '&&' : '&');
|
|
229
229
|
}
|
|
230
230
|
function mnemonicButtonLabel(label, forceDisableMnemonics) {
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
const withoutMnemonic = label.replace(/\(&&\w\)|&&/g, '');
|
|
232
|
+
if (forceDisableMnemonics) {
|
|
233
|
+
return withoutMnemonic;
|
|
234
|
+
}
|
|
235
|
+
if (isMacintosh) {
|
|
236
|
+
return { withMnemonic: withoutMnemonic, withoutMnemonic };
|
|
233
237
|
}
|
|
238
|
+
let withMnemonic;
|
|
234
239
|
if (isWindows) {
|
|
235
|
-
|
|
240
|
+
withMnemonic = label.replace(/&&|&/g, m => m === '&' ? '&&' : '&');
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
withMnemonic = label.replace(/&&/g, '_');
|
|
236
244
|
}
|
|
237
|
-
return
|
|
245
|
+
return { withMnemonic, withoutMnemonic };
|
|
238
246
|
}
|
|
239
247
|
function unmnemonicLabel(label) {
|
|
240
248
|
return label.replace(/&/g, '&&');
|
|
@@ -12,7 +12,6 @@ import { TextDiffTabInput, NotebookDiffEditorTabInput, TextTabInput, NotebookEdi
|
|
|
12
12
|
import { IExtHostWorkspace } from './extHostWorkspace.js';
|
|
13
13
|
import { AbstractVariableResolverService } from '../../services/configurationResolver/common/variableResolver.js';
|
|
14
14
|
import { IExtHostConfiguration } from './extHostConfiguration.js';
|
|
15
|
-
import { Schemas } from '../../../base/common/network.js';
|
|
16
15
|
|
|
17
16
|
const IExtHostVariableResolverProvider = ( createDecorator('IExtHostVariableResolverProvider'));
|
|
18
17
|
class ExtHostVariableResolverService extends AbstractVariableResolverService {
|
|
@@ -58,12 +57,7 @@ class ExtHostVariableResolverService extends AbstractVariableResolverService {
|
|
|
58
57
|
getFilePath: () => {
|
|
59
58
|
const activeUri = getActiveUri();
|
|
60
59
|
if (activeUri) {
|
|
61
|
-
|
|
62
|
-
return normalize(activeUri.fsPath);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return ( activeUri.toString());
|
|
66
|
-
}
|
|
60
|
+
return normalize(activeUri.fsPath);
|
|
67
61
|
}
|
|
68
62
|
return undefined;
|
|
69
63
|
},
|
|
@@ -73,12 +67,7 @@ class ExtHostVariableResolverService extends AbstractVariableResolverService {
|
|
|
73
67
|
if (activeUri) {
|
|
74
68
|
const ws = workspaceService.getWorkspaceFolder(activeUri);
|
|
75
69
|
if (ws) {
|
|
76
|
-
|
|
77
|
-
return normalize(ws.uri.fsPath);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
return ( ws.uri.toString());
|
|
81
|
-
}
|
|
70
|
+
return normalize(ws.uri.fsPath);
|
|
82
71
|
}
|
|
83
72
|
}
|
|
84
73
|
}
|
|
@@ -48,6 +48,7 @@ import { IChatWidgetService } from '../chat.service.js';
|
|
|
48
48
|
import { ChatEditorInput } from '../chatEditorInput.js';
|
|
49
49
|
import { convertBufferToScreenshotVariable } from '../contrib/screenshot.js';
|
|
50
50
|
import { clearChatEditor } from './chatClear.js';
|
|
51
|
+
import { ICommandService } from '../../../../../platform/commands/common/commands.service.js';
|
|
51
52
|
|
|
52
53
|
const CHAT_CATEGORY = ( localize2(4234, 'Chat'));
|
|
53
54
|
const CHAT_OPEN_ACTION_ID = 'workbench.action.chat.open';
|
|
@@ -431,6 +432,24 @@ function registerChatActions() {
|
|
|
431
432
|
extensionsWorkbenchService.openSearch(`@feature:${CopilotUsageExtensionFeatureId}`);
|
|
432
433
|
}
|
|
433
434
|
});
|
|
435
|
+
registerAction2(class ConfigureCopilotCompletions extends Action2 {
|
|
436
|
+
constructor() {
|
|
437
|
+
super({
|
|
438
|
+
id: 'workbench.action.chat.configureCodeCompletions',
|
|
439
|
+
title: ( localize2(4254, "Configure Code Completions...")),
|
|
440
|
+
precondition: ChatContextKeys.enabled,
|
|
441
|
+
menu: {
|
|
442
|
+
id: MenuId.ChatCommandCenter,
|
|
443
|
+
group: 'f_completions',
|
|
444
|
+
order: 10,
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
async run(accessor) {
|
|
449
|
+
const commandService = accessor.get(ICommandService);
|
|
450
|
+
commandService.executeCommand('github.copilot.toggleStatusMenu');
|
|
451
|
+
}
|
|
452
|
+
});
|
|
434
453
|
}
|
|
435
454
|
function stringifyItem(item, includeName = true) {
|
|
436
455
|
if (isRequestVM(item)) {
|
|
@@ -449,14 +468,14 @@ const defaultChat = {
|
|
|
449
468
|
};
|
|
450
469
|
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
451
470
|
submenu: MenuId.ChatCommandCenter,
|
|
452
|
-
title: ( localize(
|
|
471
|
+
title: ( localize(4255, "Chat")),
|
|
453
472
|
icon: Codicon.copilot,
|
|
454
473
|
when: ( ContextKeyExpr.and(ChatContextKeys.supported, ( ContextKeyExpr.has('config.chat.commandCenter.enabled')))),
|
|
455
474
|
order: 10001,
|
|
456
475
|
});
|
|
457
476
|
registerAction2(class ToggleCopilotControl extends ToggleTitleBarConfigAction {
|
|
458
477
|
constructor() {
|
|
459
|
-
super('chat.commandCenter.enabled', ( localize(
|
|
478
|
+
super('chat.commandCenter.enabled', ( localize(4256, 'Copilot Controls')), ( localize(4257, "Toggle visibility of the Copilot Controls in title bar")), 5, false, ( ContextKeyExpr.and(ChatContextKeys.supported, ( ContextKeyExpr.has('config.window.commandCenter')))));
|
|
460
479
|
}
|
|
461
480
|
});
|
|
462
481
|
let ChatCommandCenterRendering = class ChatCommandCenterRendering extends Disposable {
|
|
@@ -470,7 +489,7 @@ let ChatCommandCenterRendering = class ChatCommandCenterRendering extends Dispos
|
|
|
470
489
|
}
|
|
471
490
|
const dropdownAction = toAction({
|
|
472
491
|
id: 'chat.commandCenter.more',
|
|
473
|
-
label: ( localize(
|
|
492
|
+
label: ( localize(4258, "More...")),
|
|
474
493
|
run() { }
|
|
475
494
|
});
|
|
476
495
|
const chatExtensionInstalled = ( agentService.getAgents().some(agent => agent.isDefault));
|
|
@@ -481,13 +500,13 @@ let ChatCommandCenterRendering = class ChatCommandCenterRendering extends Dispos
|
|
|
481
500
|
let primaryActionIcon;
|
|
482
501
|
if (!chatExtensionInstalled) {
|
|
483
502
|
primaryActionId = 'workbench.action.chat.triggerSetup';
|
|
484
|
-
primaryActionTitle = ( localize(
|
|
503
|
+
primaryActionTitle = ( localize(4259, "Use AI Features with Copilot for Free..."));
|
|
485
504
|
primaryActionIcon = Codicon.copilot;
|
|
486
505
|
}
|
|
487
506
|
else {
|
|
488
507
|
if (signedOut) {
|
|
489
508
|
primaryActionId = CHAT_OPEN_ACTION_ID;
|
|
490
|
-
primaryActionTitle = ( localize(
|
|
509
|
+
primaryActionTitle = ( localize(4260, "Sign in to Use Copilot..."));
|
|
491
510
|
primaryActionIcon = Codicon.copilotWarning;
|
|
492
511
|
}
|
|
493
512
|
else if (chatQuotaExceeded || completionsQuotaExceeded) {
|
|
@@ -27,8 +27,8 @@ class NavigateAction extends Action2 {
|
|
|
27
27
|
? 'chatEditor.action.navigateNext'
|
|
28
28
|
: 'chatEditor.action.navigatePrevious',
|
|
29
29
|
title: next
|
|
30
|
-
? ( localize2(
|
|
31
|
-
: ( localize2(
|
|
30
|
+
? ( localize2(4506, 'Go to Next Chat Edit'))
|
|
31
|
+
: ( localize2(4507, 'Go to Previous Chat Edit')),
|
|
32
32
|
category: CHAT_CATEGORY,
|
|
33
33
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
34
34
|
keybinding: {
|
|
@@ -109,11 +109,11 @@ class AcceptDiscardAction extends Action2 {
|
|
|
109
109
|
super({
|
|
110
110
|
id,
|
|
111
111
|
title: accept
|
|
112
|
-
? ( localize2(
|
|
113
|
-
: ( localize2(
|
|
112
|
+
? ( localize2(4508, 'Accept Chat Edit'))
|
|
113
|
+
: ( localize2(4509, 'Discard Chat Edit')),
|
|
114
114
|
shortTitle: accept
|
|
115
|
-
? ( localize2(
|
|
116
|
-
: ( localize2(
|
|
115
|
+
? ( localize2(4510, 'Accept'))
|
|
116
|
+
: ( localize2(4511, 'Discard')),
|
|
117
117
|
category: CHAT_CATEGORY,
|
|
118
118
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, hasUndecidedChatEditingResourceContextKey)),
|
|
119
119
|
icon: accept
|
|
@@ -181,7 +181,7 @@ class RejectHunkAction extends EditorAction2 {
|
|
|
181
181
|
constructor() {
|
|
182
182
|
super({
|
|
183
183
|
id: 'chatEditor.action.undoHunk',
|
|
184
|
-
title: ( localize2(
|
|
184
|
+
title: ( localize2(4512, 'Discard this Change')),
|
|
185
185
|
category: CHAT_CATEGORY,
|
|
186
186
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ChatContextKeys.requestInProgress.negate()), hasUndecidedChatEditingResourceContextKey)),
|
|
187
187
|
icon: Codicon.discard,
|
|
@@ -205,7 +205,7 @@ class AcceptHunkAction extends EditorAction2 {
|
|
|
205
205
|
constructor() {
|
|
206
206
|
super({
|
|
207
207
|
id: 'chatEditor.action.acceptHunk',
|
|
208
|
-
title: ( localize2(
|
|
208
|
+
title: ( localize2(4513, 'Accept this Change')),
|
|
209
209
|
category: CHAT_CATEGORY,
|
|
210
210
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ChatContextKeys.requestInProgress.negate()), hasUndecidedChatEditingResourceContextKey)),
|
|
211
211
|
icon: Codicon.check,
|
|
@@ -229,7 +229,7 @@ class OpenDiffAction extends EditorAction2 {
|
|
|
229
229
|
constructor() {
|
|
230
230
|
super({
|
|
231
231
|
id: 'chatEditor.action.diffHunk',
|
|
232
|
-
title: ( localize2(
|
|
232
|
+
title: ( localize2(4514, 'Toggle Diff Editor')),
|
|
233
233
|
category: CHAT_CATEGORY,
|
|
234
234
|
toggled: {
|
|
235
235
|
condition: EditorContextKeys.inDiffEditor,
|
|
@@ -261,7 +261,7 @@ class ReviewChangesAction extends EditorAction2 {
|
|
|
261
261
|
constructor() {
|
|
262
262
|
super({
|
|
263
263
|
id: 'chatEditor.action.reviewChanges',
|
|
264
|
-
title: ( localize2(
|
|
264
|
+
title: ( localize2(4515, "Review")),
|
|
265
265
|
menu: [{
|
|
266
266
|
id: MenuId.ChatEditingEditorContent,
|
|
267
267
|
group: 'a_resolve',
|
|
@@ -296,7 +296,7 @@ function registerChatEditorActions() {
|
|
|
296
296
|
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
297
297
|
command: {
|
|
298
298
|
id: navigationBearingFakeActionId,
|
|
299
|
-
title: ( localize(
|
|
299
|
+
title: ( localize(4516, "Navigation Status")),
|
|
300
300
|
precondition: ( ContextKeyExpr.false()),
|
|
301
301
|
},
|
|
302
302
|
group: 'navigate',
|
|
@@ -43,13 +43,13 @@ import { IChatService } from '../common/chatService.service.js';
|
|
|
43
43
|
import { StableEditorScrollState } from '../../../../editor/browser/stableEditorScroll.js';
|
|
44
44
|
|
|
45
45
|
var ChatEditorController_1, DiffHunkWidget_1;
|
|
46
|
-
const ctxIsGlobalEditingSession = ( new RawContextKey('chat.isGlobalEditingSession', undefined, ( localize(
|
|
47
|
-
const ctxHasEditorModification = ( new RawContextKey('chat.hasEditorModifications', undefined, ( localize(
|
|
46
|
+
const ctxIsGlobalEditingSession = ( new RawContextKey('chat.isGlobalEditingSession', undefined, ( localize(4517, "The current editor is part of the global edit session"))));
|
|
47
|
+
const ctxHasEditorModification = ( new RawContextKey('chat.hasEditorModifications', undefined, ( localize(4518, "The current editor contains chat modifications"))));
|
|
48
48
|
const ctxHasRequestInProgress = ( new RawContextKey('chat.ctxHasRequestInProgress', false, ( localize(
|
|
49
|
-
|
|
49
|
+
4519,
|
|
50
50
|
"The current editor shows a file from an edit session which is still in progress"
|
|
51
51
|
))));
|
|
52
|
-
const ctxReviewModeEnabled = ( new RawContextKey('chat.ctxReviewModeEnabled', true, ( localize(
|
|
52
|
+
const ctxReviewModeEnabled = ( new RawContextKey('chat.ctxReviewModeEnabled', true, ( localize(4520, "Review mode for chat changes is enabled"))));
|
|
53
53
|
let ChatEditorController = class ChatEditorController extends Disposable {
|
|
54
54
|
static { ChatEditorController_1 = this; }
|
|
55
55
|
static { this.ID = 'editor.contrib.chatEditorController'; }
|
|
@@ -565,12 +565,12 @@ let ChatEditorController = class ChatEditorController extends Disposable {
|
|
|
565
565
|
modified: { resource: entry.modifiedURI, options: { selection } },
|
|
566
566
|
label: defaultAgentName
|
|
567
567
|
? ( localize(
|
|
568
|
-
|
|
568
|
+
4521,
|
|
569
569
|
'{0} (changes from {1})',
|
|
570
570
|
basename(entry.modifiedURI),
|
|
571
571
|
defaultAgentName
|
|
572
572
|
))
|
|
573
|
-
: ( localize(
|
|
573
|
+
: ( localize(4522, '{0} (changes from chat)', basename(entry.modifiedURI)))
|
|
574
574
|
});
|
|
575
575
|
if (diffEditor && diffEditor.input) {
|
|
576
576
|
diffEditor.getControl()?.setSelection(selection);
|
|
@@ -14,7 +14,7 @@ import { ChatAgentLocation } from '../common/chatAgents.js';
|
|
|
14
14
|
import { IChatService } from '../common/chatService.service.js';
|
|
15
15
|
|
|
16
16
|
var ChatEditorInput_1;
|
|
17
|
-
const ChatEditorIcon = registerIcon('chat-editor-label-icon', Codicon.commentDiscussion, ( localize(
|
|
17
|
+
const ChatEditorIcon = registerIcon('chat-editor-label-icon', Codicon.commentDiscussion, ( localize(4523, 'Icon of the chat editor label.')));
|
|
18
18
|
let ChatEditorInput = class ChatEditorInput extends EditorInput {
|
|
19
19
|
static { ChatEditorInput_1 = this; }
|
|
20
20
|
static { this.countsInUse = ( new Set()); }
|
|
@@ -60,7 +60,7 @@ let ChatEditorInput = class ChatEditorInput extends EditorInput {
|
|
|
60
60
|
return ChatEditorInput_1.TypeID;
|
|
61
61
|
}
|
|
62
62
|
getName() {
|
|
63
|
-
return this.model?.title || ( localize(
|
|
63
|
+
return this.model?.title || ( localize(4524, "Chat")) + (this.inputCount > 0 ? ` ${this.inputCount + 1}` : '');
|
|
64
64
|
}
|
|
65
65
|
getIcon() {
|
|
66
66
|
return ChatEditorIcon;
|
|
@@ -76,7 +76,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget {
|
|
|
76
76
|
const { changeCount, activeIdx } = that._navigationBearings.read(r);
|
|
77
77
|
const n = activeIdx === -1 ? '?' : `${activeIdx + 1}`;
|
|
78
78
|
const m = changeCount === -1 ? '?' : `${changeCount}`;
|
|
79
|
-
this.label.innerText = ( localize(
|
|
79
|
+
this.label.innerText = ( localize(4525, "{0} of {1}", n, m));
|
|
80
80
|
this.updateTooltip();
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
@@ -86,16 +86,16 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget {
|
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
88
|
else if (changeCount === 1 && entriesCount === 1) {
|
|
89
|
-
return localize(
|
|
89
|
+
return localize(4526, "1 change in 1 file");
|
|
90
90
|
}
|
|
91
91
|
else if (changeCount === 1) {
|
|
92
|
-
return localize(
|
|
92
|
+
return localize(4527, "1 change in {0} files", entriesCount);
|
|
93
93
|
}
|
|
94
94
|
else if (entriesCount === 1) {
|
|
95
|
-
return localize(
|
|
95
|
+
return localize(4528, "{0} changes in 1 file", changeCount);
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
-
return localize(
|
|
98
|
+
return localize(4529, "{0} changes in {1} files", changeCount, entriesCount);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
onClick(event, preserveFocus) {
|
|
@@ -206,8 +206,8 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget {
|
|
|
206
206
|
this._showStore.add(autorun(r => {
|
|
207
207
|
const value = activeEntry.rewriteRatio.read(r);
|
|
208
208
|
reset(this._progressNode, (value === 0
|
|
209
|
-
? ( localize(
|
|
210
|
-
: ( localize(
|
|
209
|
+
? ( localize(4530, "Generating Edits"))
|
|
210
|
+
: ( localize(4531, "{0}% Applying Edits", Math.round(value * 100)))));
|
|
211
211
|
}));
|
|
212
212
|
this._showStore.add(autorun(r => {
|
|
213
213
|
const entryIndex = indicies.entryIndex.read(r);
|
|
@@ -66,7 +66,7 @@ let ChatQuotasService = class ChatQuotasService extends Disposable {
|
|
|
66
66
|
constructor() {
|
|
67
67
|
super({
|
|
68
68
|
id: OPEN_CHAT_QUOTA_EXCEEDED_DIALOG,
|
|
69
|
-
title: ( localize(
|
|
69
|
+
title: ( localize(4621, "Upgrade to Copilot Pro")),
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
async run(accessor) {
|
|
@@ -77,39 +77,39 @@ let ChatQuotasService = class ChatQuotasService extends Disposable {
|
|
|
77
77
|
const { chatQuotaExceeded, completionsQuotaExceeded } = that.quotas;
|
|
78
78
|
if (chatQuotaExceeded && !completionsQuotaExceeded) {
|
|
79
79
|
message = ( localize(
|
|
80
|
-
|
|
80
|
+
4622,
|
|
81
81
|
"You've run out of free chat messages. You still have free code completions available in the Copilot Free plan. These limits will reset on {0}.",
|
|
82
82
|
dateFormatter.format(that.quotas.quotaResetDate)
|
|
83
83
|
));
|
|
84
84
|
}
|
|
85
85
|
else if (completionsQuotaExceeded && !chatQuotaExceeded) {
|
|
86
86
|
message = ( localize(
|
|
87
|
-
|
|
87
|
+
4623,
|
|
88
88
|
"You've run out of free code completions. You still have free chat messages available in the Copilot Free plan. These limits will reset on {0}.",
|
|
89
89
|
dateFormatter.format(that.quotas.quotaResetDate)
|
|
90
90
|
));
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
93
|
message = ( localize(
|
|
94
|
-
|
|
94
|
+
4624,
|
|
95
95
|
"You've reached the limit of the Copilot Free plan. These limits will reset on {0}.",
|
|
96
96
|
dateFormatter.format(that.quotas.quotaResetDate)
|
|
97
97
|
));
|
|
98
98
|
}
|
|
99
99
|
const upgradeToPro = ( localize(
|
|
100
|
-
|
|
100
|
+
4625,
|
|
101
101
|
"Upgrade to Copilot Pro (your first 30 days are free) for:\n- Unlimited code completions\n- Unlimited chat messages\n- Access to additional models"
|
|
102
102
|
));
|
|
103
103
|
await dialogService.prompt({
|
|
104
104
|
type: 'none',
|
|
105
|
-
message: ( localize(
|
|
105
|
+
message: ( localize(4626, "Copilot Limit Reached")),
|
|
106
106
|
cancelButton: {
|
|
107
|
-
label: ( localize(
|
|
107
|
+
label: ( localize(4627, "Dismiss")),
|
|
108
108
|
run: () => { }
|
|
109
109
|
},
|
|
110
110
|
buttons: [
|
|
111
111
|
{
|
|
112
|
-
label: ( localize(
|
|
112
|
+
label: ( localize(4628, "Upgrade to Copilot Pro")),
|
|
113
113
|
run: () => commandService.executeCommand('workbench.action.chat.upgradePlan')
|
|
114
114
|
},
|
|
115
115
|
],
|
|
@@ -159,16 +159,16 @@ let ChatQuotasStatusBarEntry = class ChatQuotasStatusBarEntry extends Disposable
|
|
|
159
159
|
if (chatQuotaExceeded || completionsQuotaExceeded) {
|
|
160
160
|
let text;
|
|
161
161
|
if (chatQuotaExceeded && !completionsQuotaExceeded) {
|
|
162
|
-
text = ( localize(
|
|
162
|
+
text = ( localize(4629, "Chat limit reached"));
|
|
163
163
|
}
|
|
164
164
|
else if (completionsQuotaExceeded && !chatQuotaExceeded) {
|
|
165
|
-
text = ( localize(
|
|
165
|
+
text = ( localize(4630, "Completions limit reached"));
|
|
166
166
|
}
|
|
167
167
|
else {
|
|
168
|
-
text = ( localize(
|
|
168
|
+
text = ( localize(4631, "Copilot limit reached"));
|
|
169
169
|
}
|
|
170
170
|
this.entry.add(this.statusbarService.addEntry({
|
|
171
|
-
name: ( localize(
|
|
171
|
+
name: ( localize(4632, "Copilot Limit Indicator")),
|
|
172
172
|
text: `$(copilot-warning) ${text}`,
|
|
173
173
|
ariaLabel: text,
|
|
174
174
|
command: OPEN_CHAT_QUOTA_EXCEEDED_DIALOG,
|
|
@@ -185,13 +185,13 @@ ChatQuotasStatusBarEntry = ChatQuotasStatusBarEntry_1 = ( __decorate([
|
|
|
185
185
|
], ChatQuotasStatusBarEntry));
|
|
186
186
|
function quotaToButtonMessage({ chatQuotaExceeded, completionsQuotaExceeded }) {
|
|
187
187
|
if (chatQuotaExceeded && !completionsQuotaExceeded) {
|
|
188
|
-
return localize(
|
|
188
|
+
return localize(4633, "Monthly chat messages limit reached. Click for details.");
|
|
189
189
|
}
|
|
190
190
|
else if (completionsQuotaExceeded && !chatQuotaExceeded) {
|
|
191
|
-
return localize(
|
|
191
|
+
return localize(4634, "Monthly code completions limit reached. Click for details.");
|
|
192
192
|
}
|
|
193
193
|
else {
|
|
194
|
-
return localize(
|
|
194
|
+
return localize(4635, "Copilot Free plan limit reached. Click for details.");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -5,7 +5,7 @@ const ScreenshotVariableId = 'screenshot-focused-window';
|
|
|
5
5
|
function convertBufferToScreenshotVariable(buffer) {
|
|
6
6
|
return {
|
|
7
7
|
id: ScreenshotVariableId,
|
|
8
|
-
name: ( localize(
|
|
8
|
+
name: ( localize(4705, 'Screenshot')),
|
|
9
9
|
value: ( new Uint8Array(buffer)),
|
|
10
10
|
isImage: true,
|
|
11
11
|
isDynamic: true
|