@codingame/monaco-vscode-xterm-addons-common 27.0.0 → 28.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 (16) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +5 -1
  3. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +62 -10
  4. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugAttachment.d.ts +8 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugAttachment.js +72 -0
  6. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +6 -6
  7. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +18 -18
  8. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
  9. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +25 -25
  10. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +1 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +60 -34
  12. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +10 -11
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +16 -16
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +1 -1
  15. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +0 -118
  16. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +0 -1437
@@ -6,7 +6,7 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
6
6
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
7
7
  import { PromptsStorage, AgentFileType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
8
8
  import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
9
- import { extUri, dirname, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
9
+ import { extUri, dirname, joinPath, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
10
10
  import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
11
11
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
12
12
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
@@ -32,31 +32,31 @@ function newHelpButton(type) {
32
32
  switch (type) {
33
33
  case PromptsType.prompt:
34
34
  return {
35
- tooltip: ( localize(6255, "Show help on prompt files")),
35
+ tooltip: ( localize(6348, "Show help on prompt files")),
36
36
  helpURI: ( URI.parse(PROMPT_DOCUMENTATION_URL)),
37
37
  iconClass
38
38
  };
39
39
  case PromptsType.instructions:
40
40
  return {
41
- tooltip: ( localize(6256, "Show help on instruction files")),
41
+ tooltip: ( localize(6349, "Show help on instruction files")),
42
42
  helpURI: ( URI.parse(INSTRUCTIONS_DOCUMENTATION_URL)),
43
43
  iconClass
44
44
  };
45
45
  case PromptsType.agent:
46
46
  return {
47
- tooltip: ( localize(6257, "Show help on custom agent files")),
47
+ tooltip: ( localize(6350, "Show help on custom agent files")),
48
48
  helpURI: ( URI.parse(AGENT_DOCUMENTATION_URL)),
49
49
  iconClass
50
50
  };
51
51
  case PromptsType.skill:
52
52
  return {
53
- tooltip: ( localize(6258, "Show help on skill files")),
53
+ tooltip: ( localize(6351, "Show help on skill files")),
54
54
  helpURI: ( URI.parse(SKILL_DOCUMENTATION_URL)),
55
55
  iconClass
56
56
  };
57
57
  case PromptsType.hook:
58
58
  return {
59
- tooltip: ( localize(6259, "Show help on hook files")),
59
+ tooltip: ( localize(6352, "Show help on hook files")),
60
60
  helpURI: ( URI.parse(HOOK_DOCUMENTATION_URL)),
61
61
  iconClass
62
62
  };
@@ -73,7 +73,7 @@ function isExtensionPromptPath(prompt) {
73
73
  }
74
74
  const NEW_PROMPT_FILE_OPTION = {
75
75
  type: "item",
76
- label: `$(plus) ${( localize(6260, "New prompt file..."))}`,
76
+ label: `$(plus) ${( localize(6353, "New prompt file..."))}`,
77
77
  pickable: false,
78
78
  alwaysShow: true,
79
79
  buttons: [newHelpButton(PromptsType.prompt)],
@@ -81,7 +81,7 @@ const NEW_PROMPT_FILE_OPTION = {
81
81
  };
82
82
  const NEW_INSTRUCTIONS_FILE_OPTION = {
83
83
  type: "item",
84
- label: `$(plus) ${( localize(6261, "New instruction file..."))}`,
84
+ label: `$(plus) ${( localize(6354, "New instruction file..."))}`,
85
85
  pickable: false,
86
86
  alwaysShow: true,
87
87
  buttons: [newHelpButton(PromptsType.instructions)],
@@ -89,7 +89,7 @@ const NEW_INSTRUCTIONS_FILE_OPTION = {
89
89
  };
90
90
  const GENERATE_AGENT_INSTRUCTIONS_OPTION = {
91
91
  type: "item",
92
- label: `$(sparkle) ${( localize(6262, "Generate agent instructions..."))}`,
92
+ label: `$(sparkle) ${( localize(6355, "Generate agent instructions..."))}`,
93
93
  pickable: false,
94
94
  alwaysShow: true,
95
95
  buttons: [newHelpButton(PromptsType.instructions)],
@@ -97,7 +97,7 @@ const GENERATE_AGENT_INSTRUCTIONS_OPTION = {
97
97
  };
98
98
  const GENERATE_ON_DEMAND_INSTRUCTIONS_OPTION = {
99
99
  type: "item",
100
- label: `$(sparkle) ${( localize(6263, "Generate on-demand instructions..."))}`,
100
+ label: `$(sparkle) ${( localize(6356, "Generate on-demand instructions..."))}`,
101
101
  pickable: false,
102
102
  alwaysShow: true,
103
103
  buttons: [newHelpButton(PromptsType.instructions)],
@@ -105,7 +105,7 @@ const GENERATE_ON_DEMAND_INSTRUCTIONS_OPTION = {
105
105
  };
106
106
  const NEW_AGENT_FILE_OPTION = {
107
107
  type: "item",
108
- label: `$(plus) ${( localize(6264, "Create new custom agent..."))}`,
108
+ label: `$(plus) ${( localize(6357, "Create new custom agent..."))}`,
109
109
  pickable: false,
110
110
  alwaysShow: true,
111
111
  buttons: [newHelpButton(PromptsType.agent)],
@@ -113,7 +113,7 @@ const NEW_AGENT_FILE_OPTION = {
113
113
  };
114
114
  const NEW_SKILL_FILE_OPTION = {
115
115
  type: "item",
116
- label: `$(plus) ${( localize(6265, "New skill..."))}`,
116
+ label: `$(plus) ${( localize(6358, "New skill..."))}`,
117
117
  pickable: false,
118
118
  alwaysShow: true,
119
119
  buttons: [newHelpButton(PromptsType.skill)],
@@ -121,7 +121,7 @@ const NEW_SKILL_FILE_OPTION = {
121
121
  };
122
122
  const GENERATE_PROMPT_OPTION = {
123
123
  type: "item",
124
- label: `$(sparkle) ${( localize(6266, "Generate prompt..."))}`,
124
+ label: `$(sparkle) ${( localize(6359, "Generate prompt..."))}`,
125
125
  pickable: false,
126
126
  alwaysShow: true,
127
127
  buttons: [newHelpButton(PromptsType.prompt)],
@@ -129,7 +129,7 @@ const GENERATE_PROMPT_OPTION = {
129
129
  };
130
130
  const GENERATE_SKILL_OPTION = {
131
131
  type: "item",
132
- label: `$(sparkle) ${( localize(6267, "Generate skill..."))}`,
132
+ label: `$(sparkle) ${( localize(6360, "Generate skill..."))}`,
133
133
  pickable: false,
134
134
  alwaysShow: true,
135
135
  buttons: [newHelpButton(PromptsType.skill)],
@@ -137,37 +137,41 @@ const GENERATE_SKILL_OPTION = {
137
137
  };
138
138
  const GENERATE_AGENT_OPTION = {
139
139
  type: "item",
140
- label: `$(sparkle) ${( localize(6268, "Generate agent..."))}`,
140
+ label: `$(sparkle) ${( localize(6361, "Generate agent..."))}`,
141
141
  pickable: false,
142
142
  alwaysShow: true,
143
143
  buttons: [newHelpButton(PromptsType.agent)],
144
144
  commandId: GENERATE_AGENT_COMMAND_ID
145
145
  };
146
146
  const EDIT_BUTTON = {
147
- tooltip: ( localize(6269, "Open in Editor")),
147
+ tooltip: ( localize(6362, "Open in Editor")),
148
148
  iconClass: ThemeIcon.asClassName(Codicon.fileCode)
149
149
  };
150
150
  const DELETE_BUTTON = {
151
- tooltip: ( localize(6270, "Delete")),
151
+ tooltip: ( localize(6363, "Delete")),
152
152
  iconClass: ThemeIcon.asClassName(Codicon.trash)
153
153
  };
154
154
  const RENAME_BUTTON = {
155
- tooltip: ( localize(6271, "Move and/or Rename")),
155
+ tooltip: ( localize(6364, "Move and/or Rename")),
156
156
  iconClass: ThemeIcon.asClassName(Codicon.replace)
157
157
  };
158
158
  const COPY_BUTTON = {
159
- tooltip: ( localize(6272, "Make a Copy")),
159
+ tooltip: ( localize(6365, "Make a Copy")),
160
160
  iconClass: ThemeIcon.asClassName(Codicon.copy)
161
161
  };
162
162
  const MAKE_VISIBLE_BUTTON = {
163
- tooltip: ( localize(6273, "Hidden from chat view agent picker. Click to show.")),
163
+ tooltip: ( localize(6366, "Hidden from chat view agent picker. Click to show.")),
164
164
  iconClass: ThemeIcon.asClassName(Codicon.eyeClosed),
165
165
  alwaysVisible: true
166
166
  };
167
167
  const MAKE_INVISIBLE_BUTTON = {
168
- tooltip: ( localize(6274, "Shown in chat view agent picker. Click to hide.")),
168
+ tooltip: ( localize(6367, "Shown in chat view agent picker. Click to hide.")),
169
169
  iconClass: ThemeIcon.asClassName(Codicon.eye)
170
170
  };
171
+ const RUN_IN_CHAT_BUTTON = {
172
+ tooltip: ( localize(6368, "Run in Chat View")),
173
+ iconClass: ThemeIcon.asClassName(Codicon.play)
174
+ };
171
175
  let PromptFilePickers = class PromptFilePickers {
172
176
  constructor(
173
177
  _quickInputService,
@@ -196,7 +200,7 @@ let PromptFilePickers = class PromptFilePickers {
196
200
  useSeparators: true
197
201
  });
198
202
  quickPick.busy = true;
199
- quickPick.placeholder = ( localize(6275, "Searching file system..."));
203
+ quickPick.placeholder = ( localize(6369, "Searching file system..."));
200
204
  try {
201
205
  const fileOptions = await this._createPromptPickItems(options, cts.token);
202
206
  const activeItem = options.resource && fileOptions.find(
@@ -268,6 +272,9 @@ let PromptFilePickers = class PromptFilePickers {
268
272
  }
269
273
  async _createPromptPickItems(options, token) {
270
274
  const buttons = [];
275
+ if (options.type === PromptsType.prompt && options.optionRun !== false) {
276
+ buttons.push(RUN_IN_CHAT_BUTTON);
277
+ }
271
278
  if (options.optionEdit !== false) {
272
279
  buttons.push(EDIT_BUTTON);
273
280
  }
@@ -294,7 +301,7 @@ let PromptFilePickers = class PromptFilePickers {
294
301
  if (locals.length) {
295
302
  result.push({
296
303
  type: "separator",
297
- label: ( localize(6276, "Workspace"))
304
+ label: ( localize(6370, "Workspace"))
298
305
  });
299
306
  result.push(...sortByLabel(await Promise.all(( locals.map(l => this._createPromptPickItem(l, buttons, getVisibility(l), token))))));
300
307
  }
@@ -317,13 +324,16 @@ let PromptFilePickers = class PromptFilePickers {
317
324
  const agentButtons = buttons.filter(b => b !== RENAME_BUTTON);
318
325
  result.push({
319
326
  type: "separator",
320
- label: ( localize(6277, "Agent Instructions"))
327
+ label: ( localize(6371, "Agent Instructions"))
321
328
  });
322
329
  result.push(...sortByLabel(await Promise.all(( agentInstructionFiles.map(l => this._createPromptPickItem(l, agentButtons, getVisibility(l), token))))));
323
330
  }
324
331
  const exts = (await this._promptsService.listPromptFilesForStorage(options.type, PromptsStorage.extension, token)).filter(isExtensionPromptPath);
325
332
  if (exts.length) {
326
333
  const extButtons = [];
334
+ if (options.type === PromptsType.prompt && options.optionRun !== false) {
335
+ extButtons.push(RUN_IN_CHAT_BUTTON);
336
+ }
327
337
  if (options.optionEdit !== false) {
328
338
  extButtons.push(EDIT_BUTTON);
329
339
  }
@@ -351,7 +361,7 @@ let PromptFilePickers = class PromptFilePickers {
351
361
  if (users.length) {
352
362
  result.push({
353
363
  type: "separator",
354
- label: ( localize(6278, "User Data"))
364
+ label: ( localize(6372, "User Data"))
355
365
  });
356
366
  result.push(...sortByLabel(await Promise.all(( users.map(u => this._createPromptPickItem(u, buttons, getVisibility(u), token))))));
357
367
  }
@@ -363,7 +373,7 @@ let PromptFilePickers = class PromptFilePickers {
363
373
  }
364
374
  result.push({
365
375
  type: "separator",
366
- label: ( localize(6279, "Plugins"))
376
+ label: ( localize(6373, "Plugins"))
367
377
  });
368
378
  result.push(...sortByLabel(await Promise.all(( plugins.map(p => this._createPromptPickItem(p, pluginButtons, getVisibility(p), token))))));
369
379
  }
@@ -371,9 +381,9 @@ let PromptFilePickers = class PromptFilePickers {
371
381
  }
372
382
  _getExtensionGroupLabel(extPath) {
373
383
  if (isOrganizationPromptFile(extPath.uri, extPath.extension.identifier, this._productService)) {
374
- return localize(6280, "Organization");
384
+ return localize(6374, "Organization");
375
385
  }
376
- return localize(6281, "Extensions");
386
+ return localize(6375, "Extensions");
377
387
  }
378
388
  _getNewItems(type) {
379
389
  switch (type) {
@@ -419,8 +429,8 @@ let PromptFilePickers = class PromptFilePickers {
419
429
  let iconClass;
420
430
  if (visibility === false) {
421
431
  buttons = (buttons ?? []).concat(MAKE_VISIBLE_BUTTON);
422
- promptName = ( localize(6282, "{0} (hidden)", promptName));
423
- tooltip = ( localize(6283, "Hidden from chat view agent picker"));
432
+ promptName = ( localize(6376, "{0} (hidden)", promptName));
433
+ tooltip = ( localize(6377, "Hidden from chat view agent picker"));
424
434
  } else if (visibility === true) {
425
435
  buttons = (buttons ?? []).concat(MAKE_INVISIBLE_BUTTON);
426
436
  }
@@ -458,6 +468,12 @@ let PromptFilePickers = class PromptFilePickers {
458
468
  throw ( new Error(`Unknown button '${JSON.stringify(button)}'.`));
459
469
  }
460
470
  const value = item.promptFileUri;
471
+ if (button === RUN_IN_CHAT_BUTTON) {
472
+ const commandId = quickPick.keyMods.ctrlCmd === true ? "workbench.action.chat.run-in-new-chat.prompt.current" : "workbench.action.chat.run.prompt.current";
473
+ await this._commandService.executeCommand(commandId, value);
474
+ quickPick.hide();
475
+ return false;
476
+ }
461
477
  if (button === EDIT_BUTTON) {
462
478
  await this._openerService.open(value);
463
479
  return false;
@@ -487,8 +503,13 @@ let PromptFilePickers = class PromptFilePickers {
487
503
  }
488
504
  if (button === DELETE_BUTTON) {
489
505
  return await this.keepQuickPickOpen(quickPick, async () => {
490
- const filename = getCleanPromptName(value);
491
- const message = ( localize(6284, "Are you sure you want to delete '{0}'?", filename));
506
+ const isSkill = options.type === PromptsType.skill;
507
+ const filename = isSkill ? basename(dirname(value)) : item.label;
508
+ const message = isSkill ? ( localize(
509
+ 6378,
510
+ "Are you sure you want to delete skill '{0}' and its folder?",
511
+ filename
512
+ )) : ( localize(6379, "Are you sure you want to delete '{0}'?", filename));
492
513
  const {
493
514
  confirmed
494
515
  } = await this._dialogService.confirm({
@@ -497,7 +518,11 @@ let PromptFilePickers = class PromptFilePickers {
497
518
  if (!confirmed) {
498
519
  return false;
499
520
  }
500
- await this._fileService.del(value);
521
+ const deleteTarget = isSkill ? dirname(value) : value;
522
+ await this._fileService.del(deleteTarget, {
523
+ recursive: isSkill,
524
+ useTrash: true
525
+ });
501
526
  return true;
502
527
  });
503
528
  }
@@ -531,7 +556,8 @@ let PromptFilePickers = class PromptFilePickers {
531
556
  optionDelete: true,
532
557
  optionRename: true,
533
558
  optionCopy: true,
534
- optionVisibility: false
559
+ optionVisibility: false,
560
+ optionRun: false
535
561
  };
536
562
  try {
537
563
  const items = await this._createPromptPickItems(options, cts.token);
@@ -18,8 +18,8 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
18
18
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
19
19
  import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
20
20
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
21
- import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariables.service';
22
21
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
22
+ import { getDynamicVariablesForWidget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatVariables';
23
23
  import { ChatDynamicVariableModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables';
24
24
  import { cleanupOldImages, createFileForMedia, resizeImage, imageToHash } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageUtils';
25
25
 
@@ -78,7 +78,7 @@ let PasteImageProvider = class PasteImageProvider {
78
78
  return;
79
79
  }
80
80
  const attachedVariables = widget.attachmentModel.attachments;
81
- const displayName = ( localize(6744, "Pasted Image"));
81
+ const displayName = ( localize(6832, "Pasted Image"));
82
82
  let tempDisplayName = displayName;
83
83
  for (let appendValue = 2; ( attachedVariables.some(attachment => attachment.name === tempDisplayName)); appendValue++)
84
84
  {
@@ -100,7 +100,7 @@ let PasteImageProvider = class PasteImageProvider {
100
100
  if (( currentContextIds.has(scaledImageContext.id))) {
101
101
  return;
102
102
  }
103
- const edit = createCustomPasteEdit(model, [scaledImageContext], mimeType, this.kind, ( localize(6745, "Pasted Image Attachment")), this.chatWidgetService);
103
+ const edit = createCustomPasteEdit(model, [scaledImageContext], mimeType, this.kind, ( localize(6833, "Pasted Image Attachment")), this.chatWidgetService);
104
104
  return createEditSession(edit);
105
105
  }
106
106
  };
@@ -163,9 +163,8 @@ let CopyAttachmentsProvider = class CopyAttachmentsProvider {
163
163
  static {
164
164
  this.ATTACHMENT_MIME_TYPE = "application/vnd.chat.attachment+json";
165
165
  }
166
- constructor(chatWidgetService, chatVariableService) {
166
+ constructor(chatWidgetService) {
167
167
  this.chatWidgetService = chatWidgetService;
168
- this.chatVariableService = chatVariableService;
169
168
  this.kind = ( new HierarchicalKind("chat.attach.attachments"));
170
169
  this.providedPasteEditKinds = [this.kind];
171
170
  this.copyMimeTypes = [CopyAttachmentsProvider_1.ATTACHMENT_MIME_TYPE];
@@ -177,7 +176,7 @@ let CopyAttachmentsProvider = class CopyAttachmentsProvider {
177
176
  return undefined;
178
177
  }
179
178
  const attachments = widget.attachmentModel.attachments;
180
- const dynamicVariables = this.chatVariableService.getDynamicVariables(widget.viewModel.sessionResource);
179
+ const dynamicVariables = getDynamicVariablesForWidget(widget);
181
180
  if (attachments.length === 0 && dynamicVariables.length === 0) {
182
181
  return undefined;
183
182
  }
@@ -219,7 +218,7 @@ let CopyAttachmentsProvider = class CopyAttachmentsProvider {
219
218
  }
220
219
  const edit = {
221
220
  insertText: textdata,
222
- title: ( localize(6746, "Insert Prompt & Attachments")),
221
+ title: ( localize(6834, "Insert Prompt & Attachments")),
223
222
  kind: this.kind,
224
223
  handledMimeType: CopyAttachmentsProvider_1.ATTACHMENT_MIME_TYPE,
225
224
  additionalEdit: {
@@ -243,7 +242,7 @@ let CopyAttachmentsProvider = class CopyAttachmentsProvider {
243
242
  return createEditSession(edit);
244
243
  }
245
244
  };
246
- CopyAttachmentsProvider = CopyAttachmentsProvider_1 = ( __decorate([( __param(0, IChatWidgetService)), ( __param(1, IChatVariablesService))], CopyAttachmentsProvider));
245
+ CopyAttachmentsProvider = CopyAttachmentsProvider_1 = ( __decorate([( __param(0, IChatWidgetService))], CopyAttachmentsProvider));
247
246
  class PasteTextProvider {
248
247
  constructor(chatWidgetService, modelService) {
249
248
  this.chatWidgetService = chatWidgetService;
@@ -295,7 +294,7 @@ class PasteTextProvider {
295
294
  if (( currentContextIds.has(copiedContext.id))) {
296
295
  return;
297
296
  }
298
- const edit = createCustomPasteEdit(model, [copiedContext], Mimes.text, this.kind, ( localize(6747, "Pasted Code Attachment")), this.chatWidgetService);
297
+ const edit = createCustomPasteEdit(model, [copiedContext], Mimes.text, this.kind, ( localize(6835, "Pasted Code Attachment")), this.chatWidgetService);
299
298
  edit.yieldTo = [{
300
299
  kind: HierarchicalKind.Empty.append("text", "plain")
301
300
  }];
@@ -307,7 +306,7 @@ function getCopiedContext(code, file, language, range) {
307
306
  const start = range.startLineNumber;
308
307
  const end = range.endLineNumber;
309
308
  const resultText = `Copied Selection of Code: \n\n\n From the file: ${fileName} From lines ${start} to ${end} \n \`\`\`${code}\`\`\``;
310
- const pastedLines = start === end ? ( localize(6748, "1 line")) : ( localize(6749, "{0} lines", end + 1 - start));
309
+ const pastedLines = start === end ? ( localize(6836, "1 line")) : ( localize(6837, "{0} lines", end + 1 - start));
311
310
  return {
312
311
  kind: "paste",
313
312
  value: resultText,
@@ -329,7 +328,7 @@ function getCopiedContext(code, file, language, range) {
329
328
  };
330
329
  }
331
330
  function createCustomPasteEdit(model, context, handledMimeType, kind, title, chatWidgetService) {
332
- const label = context.length === 1 ? context[0].name : ( localize(6750, "{0} and {1} more", context[0].name, context.length - 1));
331
+ const label = context.length === 1 ? context[0].name : ( localize(6838, "{0} and {1} more", context[0].name, context.length - 1));
333
332
  const customEdit = {
334
333
  resource: model.uri,
335
334
  variable: context,
@@ -410,7 +410,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
410
410
  })];
411
411
  }
412
412
  _getContextMenuActions() {
413
- const label = ( localize(13005, "Toggle Visibility"));
413
+ const label = ( localize(13201, "Toggle Visibility"));
414
414
  return [{
415
415
  class: undefined,
416
416
  tooltip: label,
@@ -433,7 +433,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
433
433
  actions.push(attachToChatAction, ( new Separator()));
434
434
  }
435
435
  if (command.command !== "") {
436
- const labelRun = ( localize(13006, "Rerun Command"));
436
+ const labelRun = ( localize(13202, "Rerun Command"));
437
437
  actions.push({
438
438
  class: undefined,
439
439
  tooltip: labelRun,
@@ -446,11 +446,11 @@ let DecorationAddon = class DecorationAddon extends Disposable {
446
446
  }
447
447
  if (!command.isTrusted) {
448
448
  const shouldRun = await ( new Promise(r => {
449
- this._notificationService.prompt(Severity.Info, ( localize(13007, "Do you want to run the command: {0}", command.command)), [{
450
- label: ( localize(13008, "Yes")),
449
+ this._notificationService.prompt(Severity.Info, ( localize(13203, "Do you want to run the command: {0}", command.command)), [{
450
+ label: ( localize(13204, "Yes")),
451
451
  run: () => r(true)
452
452
  }, {
453
- label: ( localize(13009, "No")),
453
+ label: ( localize(13205, "No")),
454
454
  run: () => r(false)
455
455
  }]);
456
456
  }));
@@ -464,7 +464,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
464
464
  }
465
465
  });
466
466
  actions.push(( new Separator()));
467
- const labelCopy = ( localize(13010, "Copy Command"));
467
+ const labelCopy = ( localize(13206, "Copy Command"));
468
468
  actions.push({
469
469
  class: undefined,
470
470
  tooltip: labelCopy,
@@ -475,7 +475,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
475
475
  });
476
476
  }
477
477
  if (command.hasOutput()) {
478
- const labelCopyCommandAndOutput = ( localize(13011, "Copy Command and Output"));
478
+ const labelCopyCommandAndOutput = ( localize(13207, "Copy Command and Output"));
479
479
  actions.push({
480
480
  class: undefined,
481
481
  tooltip: labelCopyCommandAndOutput,
@@ -489,7 +489,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
489
489
  }
490
490
  }
491
491
  });
492
- const labelText = ( localize(13012, "Copy Output"));
492
+ const labelText = ( localize(13208, "Copy Output"));
493
493
  actions.push({
494
494
  class: undefined,
495
495
  tooltip: labelText,
@@ -503,7 +503,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
503
503
  }
504
504
  }
505
505
  });
506
- const labelHtml = ( localize(13013, "Copy Output as HTML"));
506
+ const labelHtml = ( localize(13209, "Copy Output as HTML"));
507
507
  actions.push({
508
508
  class: undefined,
509
509
  tooltip: labelHtml,
@@ -518,7 +518,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
518
518
  if (actions.length > 0) {
519
519
  actions.push(( new Separator()));
520
520
  }
521
- const labelRunRecent = ( localize(13014, "Run Recent Command"));
521
+ const labelRunRecent = ( localize(13210, "Run Recent Command"));
522
522
  actions.push({
523
523
  class: undefined,
524
524
  tooltip: labelRunRecent,
@@ -527,7 +527,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
527
527
  enabled: true,
528
528
  run: () => this._commandService.executeCommand("workbench.action.terminal.runRecentCommand")
529
529
  });
530
- const labelGoToRecent = ( localize(13015, "Go To Recent Directory"));
530
+ const labelGoToRecent = ( localize(13211, "Go To Recent Directory"));
531
531
  actions.push({
532
532
  class: undefined,
533
533
  tooltip: labelRunRecent,
@@ -537,7 +537,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
537
537
  run: () => this._commandService.executeCommand("workbench.action.terminal.goToRecentDirectory")
538
538
  });
539
539
  actions.push(( new Separator()));
540
- const labelAbout = ( localize(13016, "Learn About Shell Integration"));
540
+ const labelAbout = ( localize(13212, "Learn About Shell Integration"));
541
541
  actions.push({
542
542
  class: undefined,
543
543
  tooltip: labelAbout,
@@ -553,7 +553,7 @@ let DecorationAddon = class DecorationAddon extends Disposable {
553
553
  if (!chatIsEnabled) {
554
554
  return undefined;
555
555
  }
556
- const labelAttachToChat = ( localize(13017, "Attach To Chat"));
556
+ const labelAttachToChat = ( localize(13213, "Attach To Chat"));
557
557
  return {
558
558
  class: undefined,
559
559
  tooltip: labelAttachToChat,
@@ -595,14 +595,14 @@ let DecorationAddon = class DecorationAddon extends Disposable {
595
595
  quickPick.hideInput = true;
596
596
  quickPick.hideCheckAll = true;
597
597
  quickPick.canSelectMany = true;
598
- quickPick.title = ( localize(13018, "Toggle visibility"));
598
+ quickPick.title = ( localize(13214, "Toggle visibility"));
599
599
  const configValue = this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationsEnabled);
600
600
  const gutterIcon = {
601
- label: ( localize(13019, "Gutter command decorations")),
601
+ label: ( localize(13215, "Gutter command decorations")),
602
602
  picked: configValue !== "never" && configValue !== "overviewRuler"
603
603
  };
604
604
  const overviewRulerIcon = {
605
- label: ( localize(13020, "Overview ruler command decorations")),
605
+ label: ( localize(13216, "Overview ruler command decorations")),
606
606
  picked: configValue !== "never" && configValue !== "gutter"
607
607
  };
608
608
  quickPick.items = [gutterIcon, overviewRulerIcon];
@@ -746,7 +746,7 @@ let XtermTerminal = class XtermTerminal extends Disposable {
746
746
  await this._clipboardService.writeText(this.raw.getSelection());
747
747
  }
748
748
  } else {
749
- this._notificationService.warn(( localize(13031, "The terminal has no selection to copy")));
749
+ this._notificationService.warn(( localize(13227, "The terminal has no selection to copy")));
750
750
  }
751
751
  }
752
752
  _setCursorBlink(blink) {
@@ -1,118 +0,0 @@
1
- import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
2
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
- import { IMarkerData } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers";
4
- import { IMarkerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service";
5
- import { IChatModeService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service";
6
- import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
7
- import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
8
- import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
9
- import { ParsedPromptFile, PromptHeader } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser";
10
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
11
- import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
12
- import { Target } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
13
- import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
14
- import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
15
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
16
- export declare const MARKERS_OWNER_ID = "prompts-diagnostics-provider";
17
- export declare class PromptValidator {
18
- private readonly languageModelsService;
19
- private readonly languageModelToolsService;
20
- private readonly chatModeService;
21
- private readonly fileService;
22
- private readonly labelService;
23
- private readonly promptsService;
24
- constructor(languageModelsService: ILanguageModelsService, languageModelToolsService: ILanguageModelToolsService, chatModeService: IChatModeService, fileService: IFileService, labelService: ILabelService, promptsService: IPromptsService);
25
- validate(promptAST: ParsedPromptFile, promptType: PromptsType, report: (markers: IMarkerData) => void): Promise<void>;
26
- private validateFileName;
27
- private validateSkillFolderName;
28
- private validateBody;
29
- private validateHeader;
30
- private checkForInvalidArguments;
31
- private validateName;
32
- private validateDescription;
33
- private validateArgumentHint;
34
- private validateModel;
35
- private validateClaudeAttributes;
36
- private findModelByName;
37
- private validateAgent;
38
- private validateAgentValue;
39
- private validateTools;
40
- private validateVSCodeTools;
41
- private validateApplyTo;
42
- private validatePaths;
43
- private validateExcludeAgent;
44
- private validateHandoffs;
45
- private validateInfer;
46
- private validateTarget;
47
- private validateUserInvocable;
48
- private validateUserInvokable;
49
- private validateDisableModelInvocation;
50
- private validateAgentsAttribute;
51
- private validateGithubPermissions;
52
- }
53
- export declare const githubPermissionScopes: Record<string, {
54
- allowedValues: string[];
55
- description: string;
56
- }>;
57
- export declare function getValidAttributeNames(promptType: PromptsType, includeNonRecommended: boolean, target: Target): string[];
58
- export declare function isNonRecommendedAttribute(attributeName: string): boolean;
59
- export declare function getAttributeDescription(attributeName: string, promptType: PromptsType, target: Target): string | undefined;
60
- export declare const knownGithubCopilotTools: {
61
- name: string;
62
- description: string;
63
- }[];
64
- export interface IValueEntry {
65
- readonly name: string;
66
- readonly description?: string;
67
- }
68
- export declare const knownClaudeTools: {
69
- name: string;
70
- description: string;
71
- toolEquivalent: string[];
72
- }[];
73
- export declare const knownClaudeModels: ({
74
- name: string;
75
- description: string;
76
- modelEquivalent: string;
77
- } | {
78
- name: string;
79
- description: string;
80
- modelEquivalent: undefined;
81
- })[];
82
- export declare function mapClaudeModels(claudeModelNames: readonly string[]): readonly string[];
83
- /**
84
- * Maps Claude tool names to their VS Code tool equivalents.
85
- */
86
- export declare function mapClaudeTools(claudeToolNames: readonly string[]): string[];
87
- export declare const claudeAgentAttributes: Record<string, {
88
- type: string;
89
- description: string;
90
- defaults?: string[];
91
- items?: IValueEntry[];
92
- enums?: IValueEntry[];
93
- }>;
94
- /**
95
- * Attributes supported in Claude rules files (`.claude/rules/*.md`).
96
- * Claude rules use `paths` instead of `applyTo` for glob patterns.
97
- */
98
- export declare const claudeRulesAttributes: Record<string, {
99
- type: string;
100
- description: string;
101
- defaults?: string[];
102
- items?: IValueEntry[];
103
- enums?: IValueEntry[];
104
- }>;
105
- export declare function isVSCodeOrDefaultTarget(target: Target): boolean;
106
- export declare function getTarget(promptType: PromptsType, header: PromptHeader | URI): Target;
107
- export declare class PromptValidatorContribution extends Disposable {
108
- private modelService;
109
- private readonly markerService;
110
- private readonly promptsService;
111
- private readonly languageModelsService;
112
- private readonly languageModelToolsService;
113
- private readonly chatModeService;
114
- private readonly validator;
115
- private readonly localDisposables;
116
- constructor(modelService: IModelService, instantiationService: IInstantiationService, markerService: IMarkerService, promptsService: IPromptsService, languageModelsService: ILanguageModelsService, languageModelToolsService: ILanguageModelToolsService, chatModeService: IChatModeService);
117
- updateRegistration(): void;
118
- }