@codingame/monaco-vscode-xterm-addons-common 25.1.2 → 26.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.
Files changed (18) hide show
  1. package/package.json +10 -10
  2. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +58 -114
  3. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +42 -0
  4. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +209 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +18 -16
  6. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +1 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +151 -70
  8. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +27 -25
  9. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +67 -53
  10. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +4 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +188 -116
  12. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +106 -71
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +6 -3
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +204 -140
  15. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +77 -82
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermAddonImporter.js +24 -24
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +4 -1
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +262 -162
@@ -35,7 +35,24 @@ import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/typ
35
35
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
36
36
 
37
37
  let DecorationAddon = class DecorationAddon extends Disposable {
38
- constructor(_resource, _capabilities, _clipboardService, _contextMenuService, _configurationService, _themeService, _openerService, _quickInputService, lifecycleService, _commandService, _accessibilitySignalService, _notificationService, _hoverService, _contextPickService, _chatWidgetService, _instantiationService) {
38
+ constructor(
39
+ _resource,
40
+ _capabilities,
41
+ _clipboardService,
42
+ _contextMenuService,
43
+ _configurationService,
44
+ _themeService,
45
+ _openerService,
46
+ _quickInputService,
47
+ lifecycleService,
48
+ _commandService,
49
+ _accessibilitySignalService,
50
+ _notificationService,
51
+ _hoverService,
52
+ _contextPickService,
53
+ _chatWidgetService,
54
+ _instantiationService
55
+ ) {
39
56
  super();
40
57
  this._resource = _resource;
41
58
  this._capabilities = _capabilities;
@@ -63,19 +80,21 @@ let DecorationAddon = class DecorationAddon extends Disposable {
63
80
  this._register(this._configurationService.onDidChangeConfiguration(e => {
64
81
  if (e.affectsConfiguration(TerminalSettingId.FontSize) || e.affectsConfiguration(TerminalSettingId.LineHeight)) {
65
82
  this.refreshLayouts();
66
- }
67
- else if (e.affectsConfiguration('workbench.colorCustomizations')) {
83
+ } else if (e.affectsConfiguration("workbench.colorCustomizations")) {
68
84
  this._refreshStyles(true);
69
- }
70
- else if (e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationsEnabled)) {
85
+ } else if (e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationsEnabled)) {
71
86
  this._removeCapabilityDisposables(TerminalCapability.CommandDetection);
72
87
  this._updateDecorationVisibility();
73
88
  }
74
89
  }));
75
90
  this._register(this._themeService.onDidColorThemeChange(() => this._refreshStyles(true)));
76
91
  this._updateDecorationVisibility();
77
- this._register(this._capabilities.onDidAddCapability(c => this._createCapabilityDisposables(c.id)));
78
- this._register(this._capabilities.onDidRemoveCapability(c => this._removeCapabilityDisposables(c.id)));
92
+ this._register(
93
+ this._capabilities.onDidAddCapability(c => this._createCapabilityDisposables(c.id))
94
+ );
95
+ this._register(
96
+ this._capabilities.onDidRemoveCapability(c => this._removeCapabilityDisposables(c.id))
97
+ );
79
98
  this._register(lifecycleService.onWillShutdown(() => this._disposeAllDecorations()));
80
99
  }
81
100
  _createCapabilityDisposables(c) {
@@ -85,10 +104,11 @@ let DecorationAddon = class DecorationAddon extends Disposable {
85
104
  }
86
105
  const store = ( new DisposableStore());
87
106
  switch (capability.type) {
88
- case TerminalCapability.BufferMarkDetection:
89
- store.add(capability.onMarkAdded(mark => this.registerMarkDecoration(mark)));
90
- break;
91
- case TerminalCapability.CommandDetection: {
107
+ case TerminalCapability.BufferMarkDetection:
108
+ store.add(capability.onMarkAdded(mark => this.registerMarkDecoration(mark)));
109
+ break;
110
+ case TerminalCapability.CommandDetection:
111
+ {
92
112
  const disposables = this._getCommandDetectionListeners(capability);
93
113
  for (const d of disposables) {
94
114
  store.add(d);
@@ -112,8 +132,8 @@ let DecorationAddon = class DecorationAddon extends Disposable {
112
132
  }
113
133
  _updateDecorationVisibility() {
114
134
  const showDecorations = this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationsEnabled);
115
- this._showGutterDecorations = (showDecorations === 'both' || showDecorations === 'gutter');
116
- this._showOverviewRulerDecorations = (showDecorations === 'both' || showDecorations === 'overviewRuler');
135
+ this._showGutterDecorations = (showDecorations === "both" || showDecorations === "gutter");
136
+ this._showOverviewRulerDecorations = (showDecorations === "both" || showDecorations === "overviewRuler");
117
137
  this._disposeAllDecorations();
118
138
  if (this._showGutterDecorations || this._showOverviewRulerDecorations) {
119
139
  this._attachToCommandCapability();
@@ -142,8 +162,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
142
162
  _updateCommandDecorationVisibility(commandDecorationElement) {
143
163
  if (this._showGutterDecorations) {
144
164
  commandDecorationElement.classList.remove(DecorationSelector.Hide);
145
- }
146
- else {
165
+ } else {
147
166
  commandDecorationElement.classList.add(DecorationSelector.Hide);
148
167
  }
149
168
  }
@@ -156,18 +175,23 @@ let DecorationAddon = class DecorationAddon extends Disposable {
156
175
  _refreshStyles(refreshOverviewRulerColors) {
157
176
  if (refreshOverviewRulerColors) {
158
177
  for (const decoration of ( this._decorations.values())) {
159
- const color = this._getDecorationCssColor(decoration.command)?.toString() ?? '';
178
+ const color = this._getDecorationCssColor(decoration.command)?.toString() ?? "";
160
179
  if (decoration.decoration.options?.overviewRulerOptions) {
161
180
  decoration.decoration.options.overviewRulerOptions.color = color;
162
- }
163
- else if (decoration.decoration.options) {
164
- decoration.decoration.options.overviewRulerOptions = { color };
181
+ } else if (decoration.decoration.options) {
182
+ decoration.decoration.options.overviewRulerOptions = {
183
+ color
184
+ };
165
185
  }
166
186
  }
167
187
  }
168
188
  this._updateClasses(this._placeholderDecoration?.element);
169
189
  for (const decoration of ( this._decorations.values())) {
170
- this._updateClasses(decoration.decoration.element, decoration.command, decoration.markProperties);
190
+ this._updateClasses(
191
+ decoration.decoration.element,
192
+ decoration.command,
193
+ decoration.markProperties
194
+ );
171
195
  }
172
196
  }
173
197
  _dispose() {
@@ -203,22 +227,23 @@ let DecorationAddon = class DecorationAddon extends Disposable {
203
227
  if (capability.executingCommandObject?.marker) {
204
228
  this.registerCommandDecoration(capability.executingCommandObject, true);
205
229
  }
206
- commandDetectionListeners.push(capability.onCommandStarted(command => this.registerCommandDecoration(command, true)));
230
+ commandDetectionListeners.push(
231
+ capability.onCommandStarted(command => this.registerCommandDecoration(command, true))
232
+ );
207
233
  for (const command of capability.commands) {
208
234
  this.registerCommandDecoration(command);
209
235
  }
210
236
  commandDetectionListeners.push(capability.onCommandFinished(command => {
211
237
  const buffer = this._terminal?.buffer?.active;
212
238
  const marker = command.promptStartMarker;
213
- const shouldRegisterDecoration = (command.exitCode === undefined ||
214
- (buffer && marker && buffer.baseY + buffer.cursorY >= marker.line));
239
+ const shouldRegisterDecoration = (
240
+ command.exitCode === undefined || (buffer && marker && buffer.baseY + buffer.cursorY >= marker.line));
215
241
  if (shouldRegisterDecoration) {
216
242
  this.registerCommandDecoration(command);
217
243
  }
218
244
  if (command.exitCode) {
219
245
  this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandFailed);
220
- }
221
- else {
246
+ } else {
222
247
  this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandSucceeded);
223
248
  }
224
249
  }));
@@ -234,12 +259,11 @@ let DecorationAddon = class DecorationAddon extends Disposable {
234
259
  }
235
260
  }
236
261
  }));
237
- commandDetectionListeners.push(capability.onCurrentCommandInvalidated((request) => {
262
+ commandDetectionListeners.push(capability.onCurrentCommandInvalidated(request => {
238
263
  if (request.reason === CommandInvalidationReason.NoProblemsReported) {
239
264
  const lastDecoration = Array.from(this._decorations.entries())[this._decorations.size - 1];
240
265
  lastDecoration?.[1].decoration.dispose();
241
- }
242
- else if (request.reason === CommandInvalidationReason.Windows) {
266
+ } else if (request.reason === CommandInvalidationReason.Windows) {
243
267
  this._clearPlaceholder();
244
268
  }
245
269
  }));
@@ -260,12 +284,16 @@ let DecorationAddon = class DecorationAddon extends Disposable {
260
284
  ));
261
285
  }
262
286
  this._clearPlaceholder();
263
- const color = this._getDecorationCssColor(command)?.toString() ?? '';
287
+ const color = this._getDecorationCssColor(command)?.toString() ?? "";
264
288
  const decoration = this._terminal.registerDecoration({
265
289
  marker,
266
- overviewRulerOptions: this._showOverviewRulerDecorations ? (beforeCommandExecution
267
- ? { color, position: 'left' }
268
- : { color, position: command?.exitCode ? 'right' : 'left' }) : undefined
290
+ overviewRulerOptions: this._showOverviewRulerDecorations ? (beforeCommandExecution ? {
291
+ color,
292
+ position: "left"
293
+ } : {
294
+ color,
295
+ position: command?.exitCode ? "right" : "left"
296
+ }) : undefined
269
297
  });
270
298
  if (!decoration) {
271
299
  return undefined;
@@ -297,8 +325,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
297
325
  const existingItems = this._registeredMenuItems.get(command);
298
326
  if (existingItems) {
299
327
  existingItems.push(...items);
300
- }
301
- else {
328
+ } else {
302
329
  this._registeredMenuItems.set(command, [...items]);
303
330
  }
304
331
  return toDisposable(() => {
@@ -316,11 +343,15 @@ let DecorationAddon = class DecorationAddon extends Disposable {
316
343
  _createDisposables(element, command, markProperties) {
317
344
  if (command?.exitCode === undefined && !command?.markProperties) {
318
345
  return [];
346
+ } else if (command?.markProperties || markProperties) {
347
+ return [
348
+ this._createHover(element, command || markProperties, markProperties?.hoverMessage)
349
+ ];
319
350
  }
320
- else if (command?.markProperties || markProperties) {
321
- return [this._createHover(element, command || markProperties, markProperties?.hoverMessage)];
322
- }
323
- return [...this._createContextMenu(element, command), this._createHover(element, command)];
351
+ return [
352
+ ...this._createContextMenu(element, command),
353
+ this._createHover(element, command)
354
+ ];
324
355
  }
325
356
  _createHover(element, command, hoverMessage) {
326
357
  return this._hoverService.setupDelayedHover(element, () => ({
@@ -334,14 +365,20 @@ let DecorationAddon = class DecorationAddon extends Disposable {
334
365
  for (const classes of element.classList) {
335
366
  element.classList.remove(classes);
336
367
  }
337
- element.classList.add(DecorationSelector.CommandDecoration, DecorationSelector.Codicon, DecorationSelector.XtermDecoration);
368
+ element.classList.add(
369
+ DecorationSelector.CommandDecoration,
370
+ DecorationSelector.Codicon,
371
+ DecorationSelector.XtermDecoration
372
+ );
338
373
  if (markProperties) {
339
- element.classList.add(DecorationSelector.DefaultColor, ...ThemeIcon.asClassNameArray(terminalDecorationMark));
374
+ element.classList.add(
375
+ DecorationSelector.DefaultColor,
376
+ ...ThemeIcon.asClassNameArray(terminalDecorationMark)
377
+ );
340
378
  if (!markProperties.hoverMessage) {
341
379
  element.classList.add(DecorationSelector.Default);
342
380
  }
343
- }
344
- else {
381
+ } else {
345
382
  const state = getTerminalCommandDecorationState(command);
346
383
  this._updateCommandDecorationVisibility(element);
347
384
  for (const className of state.classNames) {
@@ -349,37 +386,41 @@ let DecorationAddon = class DecorationAddon extends Disposable {
349
386
  }
350
387
  element.classList.add(...ThemeIcon.asClassNameArray(state.icon));
351
388
  }
352
- element.removeAttribute('title');
353
- element.removeAttribute('aria-label');
389
+ element.removeAttribute("title");
390
+ element.removeAttribute("aria-label");
354
391
  }
355
392
  _createContextMenu(element, command) {
356
- return [
357
- addDisposableListener(element, EventType.MOUSE_DOWN, async (e) => {
358
- e.stopImmediatePropagation();
359
- }),
360
- addDisposableListener(element, EventType.CLICK, async (e) => {
361
- e.stopImmediatePropagation();
362
- const actions = await this._getCommandActions(command);
363
- this._contextMenuService.showContextMenu({ getAnchor: () => element, getActions: () => actions });
364
- }),
365
- addDisposableListener(element, EventType.CONTEXT_MENU, async (e) => {
366
- e.stopImmediatePropagation();
367
- const chatActions = await this._getCommandActions(command);
368
- const actions = this._getContextMenuActions();
369
- this._contextMenuService.showContextMenu({ getAnchor: () => element, getActions: () => [...actions, ...chatActions] });
370
- }),
371
- ];
393
+ return [addDisposableListener(element, EventType.MOUSE_DOWN, async e => {
394
+ e.stopImmediatePropagation();
395
+ }), addDisposableListener(element, EventType.CLICK, async e => {
396
+ e.stopImmediatePropagation();
397
+ const actions = await this._getCommandActions(command);
398
+ this._contextMenuService.showContextMenu({
399
+ getAnchor: () => element,
400
+ getActions: () => actions
401
+ });
402
+ }), addDisposableListener(element, EventType.CONTEXT_MENU, async e => {
403
+ e.stopImmediatePropagation();
404
+ const chatActions = await this._getCommandActions(command);
405
+ const actions = this._getContextMenuActions();
406
+ this._contextMenuService.showContextMenu({
407
+ getAnchor: () => element,
408
+ getActions: () => [...actions, ...chatActions]
409
+ });
410
+ })];
372
411
  }
373
412
  _getContextMenuActions() {
374
- const label = ( localize(11677, "Toggle Visibility"));
375
- return [
376
- {
377
- class: undefined, tooltip: label, id: 'terminal.toggleVisibility', label, enabled: true,
378
- run: async () => {
379
- this._showToggleVisibilityQuickPick();
380
- }
413
+ const label = ( localize(12003, "Toggle Visibility"));
414
+ return [{
415
+ class: undefined,
416
+ tooltip: label,
417
+ id: "terminal.toggleVisibility",
418
+ label,
419
+ enabled: true,
420
+ run: async () => {
421
+ this._showToggleVisibilityQuickPick();
381
422
  }
382
- ];
423
+ }];
383
424
  }
384
425
  async _getCommandActions(command) {
385
426
  const actions = [];
@@ -391,52 +432,70 @@ let DecorationAddon = class DecorationAddon extends Disposable {
391
432
  if (attachToChatAction) {
392
433
  actions.push(attachToChatAction, ( new Separator()));
393
434
  }
394
- if (command.command !== '') {
395
- const labelRun = ( localize(11678, 'Rerun Command'));
435
+ if (command.command !== "") {
436
+ const labelRun = ( localize(12004, "Rerun Command"));
396
437
  actions.push({
397
- class: undefined, tooltip: labelRun, id: 'terminal.rerunCommand', label: labelRun, enabled: true,
438
+ class: undefined,
439
+ tooltip: labelRun,
440
+ id: "terminal.rerunCommand",
441
+ label: labelRun,
442
+ enabled: true,
398
443
  run: async () => {
399
- if (command.command === '') {
444
+ if (command.command === "") {
400
445
  return;
401
446
  }
402
447
  if (!command.isTrusted) {
403
448
  const shouldRun = await ( new Promise(r => {
404
- this._notificationService.prompt(Severity.Info, ( localize(11679, 'Do you want to run the command: {0}', command.command)), [{
405
- label: ( localize(11680, 'Yes')),
406
- run: () => r(true)
407
- }, {
408
- label: ( localize(11681, 'No')),
409
- run: () => r(false)
410
- }]);
449
+ this._notificationService.prompt(Severity.Info, ( localize(12005, "Do you want to run the command: {0}", command.command)), [{
450
+ label: ( localize(12006, "Yes")),
451
+ run: () => r(true)
452
+ }, {
453
+ label: ( localize(12007, "No")),
454
+ run: () => r(false)
455
+ }]);
411
456
  }));
412
457
  if (!shouldRun) {
413
458
  return;
414
459
  }
415
460
  }
416
- this._onDidRequestRunCommand.fire({ command });
461
+ this._onDidRequestRunCommand.fire({
462
+ command
463
+ });
417
464
  }
418
465
  });
419
466
  actions.push(( new Separator()));
420
- const labelCopy = ( localize(11682, 'Copy Command'));
467
+ const labelCopy = ( localize(12008, "Copy Command"));
421
468
  actions.push({
422
- class: undefined, tooltip: labelCopy, id: 'terminal.copyCommand', label: labelCopy, enabled: true,
469
+ class: undefined,
470
+ tooltip: labelCopy,
471
+ id: "terminal.copyCommand",
472
+ label: labelCopy,
473
+ enabled: true,
423
474
  run: () => this._clipboardService.writeText(command.command)
424
475
  });
425
476
  }
426
477
  if (command.hasOutput()) {
427
- const labelCopyCommandAndOutput = ( localize(11683, 'Copy Command and Output'));
478
+ const labelCopyCommandAndOutput = ( localize(12009, "Copy Command and Output"));
428
479
  actions.push({
429
- class: undefined, tooltip: labelCopyCommandAndOutput, id: 'terminal.copyCommandAndOutput', label: labelCopyCommandAndOutput, enabled: true,
480
+ class: undefined,
481
+ tooltip: labelCopyCommandAndOutput,
482
+ id: "terminal.copyCommandAndOutput",
483
+ label: labelCopyCommandAndOutput,
484
+ enabled: true,
430
485
  run: () => {
431
486
  const output = command.getOutput();
432
487
  if (isString(output)) {
433
- this._clipboardService.writeText(`${command.command !== '' ? command.command + '\n' : ''}${output}`);
488
+ this._clipboardService.writeText(`${command.command !== "" ? command.command + "\n" : ""}${output}`);
434
489
  }
435
490
  }
436
491
  });
437
- const labelText = ( localize(11684, 'Copy Output'));
492
+ const labelText = ( localize(12010, "Copy Output"));
438
493
  actions.push({
439
- class: undefined, tooltip: labelText, id: 'terminal.copyOutput', label: labelText, enabled: true,
494
+ class: undefined,
495
+ tooltip: labelText,
496
+ id: "terminal.copyOutput",
497
+ label: labelText,
498
+ enabled: true,
440
499
  run: () => {
441
500
  const text = command.getOutput();
442
501
  if (isString(text)) {
@@ -444,30 +503,48 @@ let DecorationAddon = class DecorationAddon extends Disposable {
444
503
  }
445
504
  }
446
505
  });
447
- const labelHtml = ( localize(11685, 'Copy Output as HTML'));
506
+ const labelHtml = ( localize(12011, "Copy Output as HTML"));
448
507
  actions.push({
449
- class: undefined, tooltip: labelHtml, id: 'terminal.copyOutputAsHtml', label: labelHtml, enabled: true,
450
- run: () => this._onDidRequestCopyAsHtml.fire({ command })
508
+ class: undefined,
509
+ tooltip: labelHtml,
510
+ id: "terminal.copyOutputAsHtml",
511
+ label: labelHtml,
512
+ enabled: true,
513
+ run: () => this._onDidRequestCopyAsHtml.fire({
514
+ command
515
+ })
451
516
  });
452
517
  }
453
518
  if (actions.length > 0) {
454
519
  actions.push(( new Separator()));
455
520
  }
456
- const labelRunRecent = ( localize(11686, "Run Recent Command"));
521
+ const labelRunRecent = ( localize(12012, "Run Recent Command"));
457
522
  actions.push({
458
- class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.runRecentCommand', label: labelRunRecent, enabled: true,
459
- run: () => this._commandService.executeCommand('workbench.action.terminal.runRecentCommand')
523
+ class: undefined,
524
+ tooltip: labelRunRecent,
525
+ id: "workbench.action.terminal.runRecentCommand",
526
+ label: labelRunRecent,
527
+ enabled: true,
528
+ run: () => this._commandService.executeCommand("workbench.action.terminal.runRecentCommand")
460
529
  });
461
- const labelGoToRecent = ( localize(11687, "Go To Recent Directory"));
530
+ const labelGoToRecent = ( localize(12013, "Go To Recent Directory"));
462
531
  actions.push({
463
- class: undefined, tooltip: labelRunRecent, id: 'workbench.action.terminal.goToRecentDirectory', label: labelGoToRecent, enabled: true,
464
- run: () => this._commandService.executeCommand('workbench.action.terminal.goToRecentDirectory')
532
+ class: undefined,
533
+ tooltip: labelRunRecent,
534
+ id: "workbench.action.terminal.goToRecentDirectory",
535
+ label: labelGoToRecent,
536
+ enabled: true,
537
+ run: () => this._commandService.executeCommand("workbench.action.terminal.goToRecentDirectory")
465
538
  });
466
539
  actions.push(( new Separator()));
467
- const labelAbout = ( localize(11688, 'Learn About Shell Integration'));
540
+ const labelAbout = ( localize(12014, "Learn About Shell Integration"));
468
541
  actions.push({
469
- class: undefined, tooltip: labelAbout, id: 'terminal.learnShellIntegration', label: labelAbout, enabled: true,
470
- run: () => this._openerService.open('https://code.visualstudio.com/docs/terminal/shell-integration')
542
+ class: undefined,
543
+ tooltip: labelAbout,
544
+ id: "terminal.learnShellIntegration",
545
+ label: labelAbout,
546
+ enabled: true,
547
+ run: () => this._openerService.open("https://code.visualstudio.com/docs/terminal/shell-integration")
471
548
  });
472
549
  return actions;
473
550
  }
@@ -476,9 +553,13 @@ let DecorationAddon = class DecorationAddon extends Disposable {
476
553
  if (!chatIsEnabled) {
477
554
  return undefined;
478
555
  }
479
- const labelAttachToChat = ( localize(11689, 'Attach To Chat'));
556
+ const labelAttachToChat = ( localize(12015, "Attach To Chat"));
480
557
  return {
481
- class: undefined, tooltip: labelAttachToChat, id: 'terminal.attachToChat', label: labelAttachToChat, enabled: true,
558
+ class: undefined,
559
+ tooltip: labelAttachToChat,
560
+ id: "terminal.attachToChat",
561
+ label: labelAttachToChat,
562
+ enabled: true,
482
563
  run: async () => {
483
564
  let widget = this._chatWidgetService.lastFocusedWidget ?? this._chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat)?.find(w => w.attachmentCapabilities.supportsTerminalAttachments);
484
565
  if (!widget) {
@@ -490,7 +571,10 @@ let DecorationAddon = class DecorationAddon extends Disposable {
490
571
  let terminalContext;
491
572
  if (this._resource) {
492
573
  const parsedUri = parseTerminalUri(this._resource);
493
- terminalContext = this._instantiationService.createInstance(TerminalContext, getTerminalUri(parsedUri.workspaceId, parsedUri.instanceId, undefined, command.id));
574
+ terminalContext = this._instantiationService.createInstance(
575
+ TerminalContext,
576
+ getTerminalUri(parsedUri.workspaceId, parsedUri.instanceId, undefined, command.id)
577
+ );
494
578
  }
495
579
  if (terminalContext && widget.attachmentCapabilities.supportsTerminalAttachments) {
496
580
  try {
@@ -500,9 +584,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
500
584
  widget.focusInput();
501
585
  return;
502
586
  }
503
- }
504
- catch (err) {
505
- }
587
+ } catch (err) {}
506
588
  this._store.add(this._contextPickService.registerChatContextItem(terminalContext));
507
589
  }
508
590
  }
@@ -513,39 +595,37 @@ let DecorationAddon = class DecorationAddon extends Disposable {
513
595
  quickPick.hideInput = true;
514
596
  quickPick.hideCheckAll = true;
515
597
  quickPick.canSelectMany = true;
516
- quickPick.title = ( localize(11690, 'Toggle visibility'));
598
+ quickPick.title = ( localize(12016, "Toggle visibility"));
517
599
  const configValue = this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationsEnabled);
518
600
  const gutterIcon = {
519
- label: ( localize(11691, 'Gutter command decorations')),
520
- picked: configValue !== 'never' && configValue !== 'overviewRuler'
601
+ label: ( localize(12017, "Gutter command decorations")),
602
+ picked: configValue !== "never" && configValue !== "overviewRuler"
521
603
  };
522
604
  const overviewRulerIcon = {
523
- label: ( localize(11692, 'Overview ruler command decorations')),
524
- picked: configValue !== 'never' && configValue !== 'gutter'
605
+ label: ( localize(12018, "Overview ruler command decorations")),
606
+ picked: configValue !== "never" && configValue !== "gutter"
525
607
  };
526
608
  quickPick.items = [gutterIcon, overviewRulerIcon];
527
609
  const selectedItems = [];
528
- if (configValue !== 'never') {
529
- if (configValue !== 'gutter') {
610
+ if (configValue !== "never") {
611
+ if (configValue !== "gutter") {
530
612
  selectedItems.push(gutterIcon);
531
613
  }
532
- if (configValue !== 'overviewRuler') {
614
+ if (configValue !== "overviewRuler") {
533
615
  selectedItems.push(overviewRulerIcon);
534
616
  }
535
617
  }
536
618
  quickPick.selectedItems = selectedItems;
537
- this._register(quickPick.onDidChangeSelection(async (e) => {
538
- let newValue = 'never';
619
+ this._register(quickPick.onDidChangeSelection(async e => {
620
+ let newValue = "never";
539
621
  if (e.includes(gutterIcon)) {
540
622
  if (e.includes(overviewRulerIcon)) {
541
- newValue = 'both';
623
+ newValue = "both";
624
+ } else {
625
+ newValue = "gutter";
542
626
  }
543
- else {
544
- newValue = 'gutter';
545
- }
546
- }
547
- else if (e.includes(overviewRulerIcon)) {
548
- newValue = 'overviewRuler';
627
+ } else if (e.includes(overviewRulerIcon)) {
628
+ newValue = "overviewRuler";
549
629
  }
550
630
  await this._configurationService.updateValue(TerminalSettingId.ShellIntegrationDecorationsEnabled, newValue);
551
631
  }));
@@ -556,28 +636,12 @@ let DecorationAddon = class DecorationAddon extends Disposable {
556
636
  let colorId;
557
637
  if (command?.exitCode === undefined) {
558
638
  colorId = TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR;
559
- }
560
- else {
639
+ } else {
561
640
  colorId = command.exitCode ? TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR : TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR;
562
641
  }
563
642
  return this._themeService.getColorTheme().getColor(colorId)?.toString();
564
643
  }
565
644
  };
566
- DecorationAddon = ( __decorate([
567
- ( __param(2, IClipboardService)),
568
- ( __param(3, IContextMenuService)),
569
- ( __param(4, IConfigurationService)),
570
- ( __param(5, IThemeService)),
571
- ( __param(6, IOpenerService)),
572
- ( __param(7, IQuickInputService)),
573
- ( __param(8, ILifecycleService)),
574
- ( __param(9, ICommandService)),
575
- ( __param(10, IAccessibilitySignalService)),
576
- ( __param(11, INotificationService)),
577
- ( __param(12, IHoverService)),
578
- ( __param(13, IChatContextPickService)),
579
- ( __param(14, IChatWidgetService)),
580
- ( __param(15, IInstantiationService))
581
- ], DecorationAddon));
645
+ DecorationAddon = ( __decorate([( __param(2, IClipboardService)), ( __param(3, IContextMenuService)), ( __param(4, IConfigurationService)), ( __param(5, IThemeService)), ( __param(6, IOpenerService)), ( __param(7, IQuickInputService)), ( __param(8, ILifecycleService)), ( __param(9, ICommandService)), ( __param(10, IAccessibilitySignalService)), ( __param(11, INotificationService)), ( __param(12, IHoverService)), ( __param(13, IChatContextPickService)), ( __param(14, IChatWidgetService)), ( __param(15, IInstantiationService))], DecorationAddon));
582
646
 
583
647
  export { DecorationAddon };