@codingame/monaco-vscode-xterm-addons-common 26.2.2 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +77 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +87 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +316 -193
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -209
|
@@ -62,13 +62,13 @@ let PromptValidator = class PromptValidator {
|
|
|
62
62
|
const location = this.promptsService.getAgentFileURIFromModeFile(promptAST.uri);
|
|
63
63
|
if (location && (await this.fileService.canCreateFile(location))) {
|
|
64
64
|
report(toMarker(( localize(
|
|
65
|
-
|
|
65
|
+
6995,
|
|
66
66
|
"Chat modes have been renamed to agents. Please move this file to {0}",
|
|
67
67
|
(location.toString())
|
|
68
68
|
)), ( new Range(1, 1, 1, 4)), MarkerSeverity.Warning));
|
|
69
69
|
} else {
|
|
70
70
|
report(toMarker(( localize(
|
|
71
|
-
|
|
71
|
+
6996,
|
|
72
72
|
"Chat modes have been renamed to agents. Please move the file to {0}",
|
|
73
73
|
AGENTS_SOURCE_FOLDER
|
|
74
74
|
)), ( new Range(1, 1, 1, 4)), MarkerSeverity.Warning));
|
|
@@ -80,7 +80,7 @@ let PromptValidator = class PromptValidator {
|
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
const nameAttribute = promptAST.header?.attributes.find(attr => attr.key === PromptHeaderAttributes.name);
|
|
83
|
-
if (!nameAttribute || nameAttribute.value.type !== "
|
|
83
|
+
if (!nameAttribute || nameAttribute.value.type !== "scalar") {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
const skillName = nameAttribute.value.value.trim();
|
|
@@ -93,7 +93,7 @@ let PromptValidator = class PromptValidator {
|
|
|
93
93
|
const folderName = pathParts[skillIndex - 1];
|
|
94
94
|
if (folderName && skillName !== folderName) {
|
|
95
95
|
report(toMarker(( localize(
|
|
96
|
-
|
|
96
|
+
6997,
|
|
97
97
|
"The skill name '{0}' should match the folder name '{1}'.",
|
|
98
98
|
skillName,
|
|
99
99
|
folderName
|
|
@@ -110,7 +110,7 @@ let PromptValidator = class PromptValidator {
|
|
|
110
110
|
for (const ref of body.fileReferences) {
|
|
111
111
|
const resolved = body.resolveFilePath(ref.content);
|
|
112
112
|
if (!resolved) {
|
|
113
|
-
report(toMarker(( localize(
|
|
113
|
+
report(toMarker(( localize(6998, "Invalid file reference '{0}'.", ref.content)), ref.range, MarkerSeverity.Warning));
|
|
114
114
|
continue;
|
|
115
115
|
}
|
|
116
116
|
if (promptAST.uri.scheme === resolved.scheme) {
|
|
@@ -122,7 +122,7 @@ let PromptValidator = class PromptValidator {
|
|
|
122
122
|
}
|
|
123
123
|
} catch {}
|
|
124
124
|
const loc = this.labelService.getUriLabel(resolved);
|
|
125
|
-
report(toMarker(( localize(
|
|
125
|
+
report(toMarker(( localize(6999, "File '{0}' not found at '{1}'.", ref.content, loc)), ref.range, MarkerSeverity.Warning));
|
|
126
126
|
})());
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -139,7 +139,7 @@ let PromptValidator = class PromptValidator {
|
|
|
139
139
|
if (currentNames.size === 1) {
|
|
140
140
|
const newName = Array.from(currentNames)[0];
|
|
141
141
|
report(toMarker(( localize(
|
|
142
|
-
|
|
142
|
+
7000,
|
|
143
143
|
"Tool or toolset '{0}' has been renamed, use '{1}' instead.",
|
|
144
144
|
variable.name,
|
|
145
145
|
newName
|
|
@@ -147,7 +147,7 @@ let PromptValidator = class PromptValidator {
|
|
|
147
147
|
} else {
|
|
148
148
|
const newNames = Array.from(currentNames).sort((a, b) => a.localeCompare(b)).join(", ");
|
|
149
149
|
report(toMarker(( localize(
|
|
150
|
-
|
|
150
|
+
7001,
|
|
151
151
|
"Tool or toolset '{0}' has been renamed, use the following tools instead: {1}",
|
|
152
152
|
variable.name,
|
|
153
153
|
newNames
|
|
@@ -155,13 +155,13 @@ let PromptValidator = class PromptValidator {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
} else {
|
|
158
|
-
report(toMarker(( localize(
|
|
158
|
+
report(toMarker(( localize(7002, "Unknown tool or toolset '{0}'.", variable.name)), variable.range, MarkerSeverity.Warning));
|
|
159
159
|
}
|
|
160
160
|
} else if (headerToolsMap) {
|
|
161
161
|
const tool = this.languageModelToolsService.getToolByFullReferenceName(variable.name);
|
|
162
162
|
if (tool && headerToolsMap.get(tool) === false) {
|
|
163
163
|
report(toMarker(( localize(
|
|
164
|
-
|
|
164
|
+
7003,
|
|
165
165
|
"Tool or toolset '{0}' also needs to be enabled in the header.",
|
|
166
166
|
variable.name
|
|
167
167
|
)), variable.range, MarkerSeverity.Warning));
|
|
@@ -201,6 +201,7 @@ let PromptValidator = class PromptValidator {
|
|
|
201
201
|
{
|
|
202
202
|
this.validateTarget(attributes, report);
|
|
203
203
|
this.validateInfer(attributes, report);
|
|
204
|
+
this.validateUserInvocable(attributes, report);
|
|
204
205
|
this.validateUserInvokable(attributes, report);
|
|
205
206
|
this.validateDisableModelInvocation(attributes, report);
|
|
206
207
|
this.validateTools(attributes, ChatModeKind.Agent, target, report);
|
|
@@ -208,12 +209,16 @@ let PromptValidator = class PromptValidator {
|
|
|
208
209
|
this.validateModel(attributes, ChatModeKind.Agent, report);
|
|
209
210
|
this.validateHandoffs(attributes, report);
|
|
210
211
|
await this.validateAgentsAttribute(attributes, header, report);
|
|
212
|
+
this.validateGithubPermissions(attributes, report);
|
|
211
213
|
} else if (target === Target.Claude) {
|
|
212
214
|
this.validateClaudeAttributes(attributes, report);
|
|
215
|
+
} else if (target === Target.GitHubCopilot) {
|
|
216
|
+
this.validateGithubPermissions(attributes, report);
|
|
213
217
|
}
|
|
214
218
|
break;
|
|
215
219
|
}
|
|
216
220
|
case PromptsType.skill:
|
|
221
|
+
this.validateUserInvocable(attributes, report);
|
|
217
222
|
this.validateUserInvokable(attributes, report);
|
|
218
223
|
this.validateDisableModelInvocation(attributes, report);
|
|
219
224
|
break;
|
|
@@ -228,7 +233,7 @@ let PromptValidator = class PromptValidator {
|
|
|
228
233
|
switch (promptType) {
|
|
229
234
|
case PromptsType.prompt:
|
|
230
235
|
report(toMarker(( localize(
|
|
231
|
-
|
|
236
|
+
7004,
|
|
232
237
|
"Attribute '{0}' is not supported in prompt files. Supported: {1}.",
|
|
233
238
|
attribute.key,
|
|
234
239
|
supportedNames.value
|
|
@@ -237,7 +242,7 @@ let PromptValidator = class PromptValidator {
|
|
|
237
242
|
case PromptsType.agent:
|
|
238
243
|
if (target === Target.GitHubCopilot) {
|
|
239
244
|
report(toMarker(( localize(
|
|
240
|
-
|
|
245
|
+
7005,
|
|
241
246
|
"Attribute '{0}' is not supported in custom GitHub Copilot agent files. Supported: {1}.",
|
|
242
247
|
attribute.key,
|
|
243
248
|
supportedNames.value
|
|
@@ -246,13 +251,13 @@ let PromptValidator = class PromptValidator {
|
|
|
246
251
|
; else {
|
|
247
252
|
if (( validGithubCopilotAttributeNames.value.has(attribute.key))) {
|
|
248
253
|
report(toMarker(( localize(
|
|
249
|
-
|
|
254
|
+
7006,
|
|
250
255
|
"Attribute '{0}' is ignored when running locally in VS Code.",
|
|
251
256
|
attribute.key
|
|
252
257
|
)), attribute.range, MarkerSeverity.Info));
|
|
253
258
|
} else {
|
|
254
259
|
report(toMarker(( localize(
|
|
255
|
-
|
|
260
|
+
7007,
|
|
256
261
|
"Attribute '{0}' is not supported in VS Code agent files. Supported: {1}.",
|
|
257
262
|
attribute.key,
|
|
258
263
|
supportedNames.value
|
|
@@ -263,14 +268,14 @@ let PromptValidator = class PromptValidator {
|
|
|
263
268
|
case PromptsType.instructions:
|
|
264
269
|
if (target === Target.Claude) {
|
|
265
270
|
report(toMarker(( localize(
|
|
266
|
-
|
|
271
|
+
7008,
|
|
267
272
|
"Attribute '{0}' is not supported in rules files. Supported: {1}.",
|
|
268
273
|
attribute.key,
|
|
269
274
|
supportedNames.value
|
|
270
275
|
)), attribute.range, MarkerSeverity.Warning));
|
|
271
276
|
} else {
|
|
272
277
|
report(toMarker(( localize(
|
|
273
|
-
|
|
278
|
+
7009,
|
|
274
279
|
"Attribute '{0}' is not supported in instructions files. Supported: {1}.",
|
|
275
280
|
attribute.key,
|
|
276
281
|
supportedNames.value
|
|
@@ -279,7 +284,7 @@ let PromptValidator = class PromptValidator {
|
|
|
279
284
|
break;
|
|
280
285
|
case PromptsType.skill:
|
|
281
286
|
report(toMarker(( localize(
|
|
282
|
-
|
|
287
|
+
7010,
|
|
283
288
|
"Attribute '{0}' is not supported in skill files. Supported: {1}.",
|
|
284
289
|
attribute.key,
|
|
285
290
|
supportedNames.value
|
|
@@ -294,12 +299,12 @@ let PromptValidator = class PromptValidator {
|
|
|
294
299
|
if (!nameAttribute) {
|
|
295
300
|
return;
|
|
296
301
|
}
|
|
297
|
-
if (nameAttribute.value.type !== "
|
|
298
|
-
report(toMarker(( localize(
|
|
302
|
+
if (nameAttribute.value.type !== "scalar") {
|
|
303
|
+
report(toMarker(( localize(7011, "The 'name' attribute must be a string.")), nameAttribute.range, MarkerSeverity.Error));
|
|
299
304
|
return;
|
|
300
305
|
}
|
|
301
306
|
if (nameAttribute.value.value.trim().length === 0) {
|
|
302
|
-
report(toMarker(( localize(
|
|
307
|
+
report(toMarker(( localize(7012, "The 'name' attribute must not be empty.")), nameAttribute.value.range, MarkerSeverity.Error));
|
|
303
308
|
return;
|
|
304
309
|
}
|
|
305
310
|
}
|
|
@@ -308,12 +313,12 @@ let PromptValidator = class PromptValidator {
|
|
|
308
313
|
if (!descriptionAttribute) {
|
|
309
314
|
return;
|
|
310
315
|
}
|
|
311
|
-
if (descriptionAttribute.value.type !== "
|
|
312
|
-
report(toMarker(( localize(
|
|
316
|
+
if (descriptionAttribute.value.type !== "scalar") {
|
|
317
|
+
report(toMarker(( localize(7013, "The 'description' attribute must be a string.")), descriptionAttribute.range, MarkerSeverity.Error));
|
|
313
318
|
return;
|
|
314
319
|
}
|
|
315
320
|
if (descriptionAttribute.value.value.trim().length === 0) {
|
|
316
|
-
report(toMarker(( localize(
|
|
321
|
+
report(toMarker(( localize(7014, "The 'description' attribute should not be empty.")), descriptionAttribute.value.range, MarkerSeverity.Error));
|
|
317
322
|
return;
|
|
318
323
|
}
|
|
319
324
|
}
|
|
@@ -322,12 +327,12 @@ let PromptValidator = class PromptValidator {
|
|
|
322
327
|
if (!argumentHintAttribute) {
|
|
323
328
|
return;
|
|
324
329
|
}
|
|
325
|
-
if (argumentHintAttribute.value.type !== "
|
|
326
|
-
report(toMarker(( localize(
|
|
330
|
+
if (argumentHintAttribute.value.type !== "scalar") {
|
|
331
|
+
report(toMarker(( localize(7015, "The 'argument-hint' attribute must be a string.")), argumentHintAttribute.range, MarkerSeverity.Error));
|
|
327
332
|
return;
|
|
328
333
|
}
|
|
329
334
|
if (argumentHintAttribute.value.value.trim().length === 0) {
|
|
330
|
-
report(toMarker(( localize(
|
|
335
|
+
report(toMarker(( localize(7016, "The 'argument-hint' attribute should not be empty.")), argumentHintAttribute.value.range, MarkerSeverity.Error));
|
|
331
336
|
return;
|
|
332
337
|
}
|
|
333
338
|
}
|
|
@@ -336,31 +341,31 @@ let PromptValidator = class PromptValidator {
|
|
|
336
341
|
if (!attribute) {
|
|
337
342
|
return;
|
|
338
343
|
}
|
|
339
|
-
if (attribute.value.type !== "
|
|
340
|
-
report(toMarker(( localize(
|
|
344
|
+
if (attribute.value.type !== "scalar" && attribute.value.type !== "sequence") {
|
|
345
|
+
report(toMarker(( localize(7017, "The 'model' attribute must be a string or an array of strings.")), attribute.value.range, MarkerSeverity.Error));
|
|
341
346
|
return;
|
|
342
347
|
}
|
|
343
348
|
const modelNames = [];
|
|
344
|
-
if (attribute.value.type === "
|
|
349
|
+
if (attribute.value.type === "scalar") {
|
|
345
350
|
const modelName = attribute.value.value.trim();
|
|
346
351
|
if (modelName.length === 0) {
|
|
347
|
-
report(toMarker(( localize(
|
|
352
|
+
report(toMarker(( localize(7018, "The 'model' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
|
|
348
353
|
return;
|
|
349
354
|
}
|
|
350
355
|
modelNames.push([modelName, attribute.value.range]);
|
|
351
|
-
} else if (attribute.value.type === "
|
|
356
|
+
} else if (attribute.value.type === "sequence") {
|
|
352
357
|
if (attribute.value.items.length === 0) {
|
|
353
|
-
report(toMarker(( localize(
|
|
358
|
+
report(toMarker(( localize(7019, "The 'model' array must not be empty.")), attribute.value.range, MarkerSeverity.Error));
|
|
354
359
|
return;
|
|
355
360
|
}
|
|
356
361
|
for (const item of attribute.value.items) {
|
|
357
|
-
if (item.type !== "
|
|
358
|
-
report(toMarker(( localize(
|
|
362
|
+
if (item.type !== "scalar") {
|
|
363
|
+
report(toMarker(( localize(7020, "The 'model' array must contain only strings.")), item.range, MarkerSeverity.Error));
|
|
359
364
|
return;
|
|
360
365
|
}
|
|
361
366
|
const modelName = item.value.trim();
|
|
362
367
|
if (modelName.length === 0) {
|
|
363
|
-
report(toMarker(( localize(
|
|
368
|
+
report(toMarker(( localize(7021, "Model names in the array must be non-empty strings.")), item.range, MarkerSeverity.Error));
|
|
364
369
|
return;
|
|
365
370
|
}
|
|
366
371
|
modelNames.push([modelName, item.range]);
|
|
@@ -373,9 +378,9 @@ let PromptValidator = class PromptValidator {
|
|
|
373
378
|
for (const [modelName, range] of modelNames) {
|
|
374
379
|
const modelMetadata = this.findModelByName(modelName);
|
|
375
380
|
if (!modelMetadata) {
|
|
376
|
-
report(toMarker(( localize(
|
|
381
|
+
report(toMarker(( localize(7022, "Unknown model '{0}'.", modelName)), range, MarkerSeverity.Warning));
|
|
377
382
|
} else if (agentKind === ChatModeKind.Agent && !ILanguageModelChatMetadata.suitableForAgentMode(modelMetadata)) {
|
|
378
|
-
report(toMarker(( localize(
|
|
383
|
+
report(toMarker(( localize(7023, "Model '{0}' is not suited for agent mode.", modelName)), range, MarkerSeverity.Warning));
|
|
379
384
|
}
|
|
380
385
|
}
|
|
381
386
|
}
|
|
@@ -388,23 +393,23 @@ let PromptValidator = class PromptValidator {
|
|
|
388
393
|
if (!attribute) {
|
|
389
394
|
continue;
|
|
390
395
|
}
|
|
391
|
-
if (attribute.value.type !== "
|
|
392
|
-
report(toMarker(( localize(
|
|
396
|
+
if (attribute.value.type !== "scalar") {
|
|
397
|
+
report(toMarker(( localize(7024, "The '{0}' attribute must be a string.", claudeAttributeName)), attribute.value.range, MarkerSeverity.Error));
|
|
393
398
|
continue;
|
|
394
399
|
} else {
|
|
395
400
|
const modelName = attribute.value.value.trim();
|
|
396
401
|
if (enumValues.every(model => model.name !== modelName)) {
|
|
397
402
|
const validValues = ( enumValues.map(model => model.name)).join(", ");
|
|
398
|
-
report(toMarker(( localize(
|
|
403
|
+
report(toMarker(( localize(7025, "Unknown value '{0}', valid: {1}.", modelName, validValues)), attribute.value.range, MarkerSeverity.Warning));
|
|
399
404
|
}
|
|
400
405
|
}
|
|
401
406
|
}
|
|
402
407
|
}
|
|
403
408
|
}
|
|
404
409
|
findModelByName(modelName) {
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
407
|
-
return metadata;
|
|
410
|
+
const metadataAndId = this.languageModelsService.lookupLanguageModelByQualifiedName(modelName);
|
|
411
|
+
if (metadataAndId && metadataAndId.metadata.isUserSelectable !== false) {
|
|
412
|
+
return metadataAndId.metadata;
|
|
408
413
|
}
|
|
409
414
|
return undefined;
|
|
410
415
|
}
|
|
@@ -414,12 +419,12 @@ let PromptValidator = class PromptValidator {
|
|
|
414
419
|
if (modeAttribute) {
|
|
415
420
|
if (agentAttribute) {
|
|
416
421
|
report(toMarker(( localize(
|
|
417
|
-
|
|
422
|
+
7026,
|
|
418
423
|
"The 'mode' attribute has been deprecated. The 'agent' attribute is used instead."
|
|
419
424
|
)), modeAttribute.range, MarkerSeverity.Warning));
|
|
420
425
|
} else {
|
|
421
426
|
report(toMarker(( localize(
|
|
422
|
-
|
|
427
|
+
7027,
|
|
423
428
|
"The 'mode' attribute has been deprecated. Please rename it to 'agent'."
|
|
424
429
|
)), modeAttribute.range, MarkerSeverity.Error));
|
|
425
430
|
}
|
|
@@ -428,13 +433,13 @@ let PromptValidator = class PromptValidator {
|
|
|
428
433
|
if (!attribute) {
|
|
429
434
|
return undefined;
|
|
430
435
|
}
|
|
431
|
-
if (attribute.value.type !== "
|
|
432
|
-
report(toMarker(( localize(
|
|
436
|
+
if (attribute.value.type !== "scalar") {
|
|
437
|
+
report(toMarker(( localize(7028, "The '{0}' attribute must be a string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
|
|
433
438
|
return undefined;
|
|
434
439
|
}
|
|
435
440
|
const agentValue = attribute.value.value;
|
|
436
441
|
if (agentValue.trim().length === 0) {
|
|
437
|
-
report(toMarker(( localize(
|
|
442
|
+
report(toMarker(( localize(7029, "The '{0}' attribute must be a non-empty string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
|
|
438
443
|
return undefined;
|
|
439
444
|
}
|
|
440
445
|
return this.validateAgentValue(attribute.value, report);
|
|
@@ -449,7 +454,7 @@ let PromptValidator = class PromptValidator {
|
|
|
449
454
|
availableAgents.push(agent.name.get());
|
|
450
455
|
}
|
|
451
456
|
const errorMessage = ( localize(
|
|
452
|
-
|
|
457
|
+
7030,
|
|
453
458
|
"Unknown agent '{0}'. Available agents: {1}.",
|
|
454
459
|
value.value,
|
|
455
460
|
availableAgents.join(", ")
|
|
@@ -464,17 +469,17 @@ let PromptValidator = class PromptValidator {
|
|
|
464
469
|
}
|
|
465
470
|
if (agentKind !== ChatModeKind.Agent) {
|
|
466
471
|
report(toMarker(( localize(
|
|
467
|
-
|
|
472
|
+
7031,
|
|
468
473
|
"The 'tools' attribute is only supported when using agents. Attribute will be ignored."
|
|
469
474
|
)), attribute.range, MarkerSeverity.Warning));
|
|
470
475
|
}
|
|
471
476
|
let value = attribute.value;
|
|
472
|
-
if (value.type === "
|
|
477
|
+
if (value.type === "scalar") {
|
|
473
478
|
value = parseCommaSeparatedList(value);
|
|
474
479
|
}
|
|
475
|
-
if (value.type !== "
|
|
480
|
+
if (value.type !== "sequence") {
|
|
476
481
|
report(toMarker(( localize(
|
|
477
|
-
|
|
482
|
+
7032,
|
|
478
483
|
"The 'tools' attribute must be an array or a comma separated string."
|
|
479
484
|
)), attribute.value.range, MarkerSeverity.Error));
|
|
480
485
|
return;
|
|
@@ -489,8 +494,8 @@ let PromptValidator = class PromptValidator {
|
|
|
489
494
|
const available = ( new Set(this.languageModelToolsService.getFullReferenceNames()));
|
|
490
495
|
const deprecatedNames = this.languageModelToolsService.getDeprecatedFullReferenceNames();
|
|
491
496
|
for (const item of valueItem.items) {
|
|
492
|
-
if (item.type !== "
|
|
493
|
-
report(toMarker(( localize(
|
|
497
|
+
if (item.type !== "scalar") {
|
|
498
|
+
report(toMarker(( localize(7033, "Each tool name in the 'tools' attribute must be a string.")), item.range, MarkerSeverity.Error));
|
|
494
499
|
} else if (item.value) {
|
|
495
500
|
if (!( available.has(item.value))) {
|
|
496
501
|
const currentNames = deprecatedNames.get(item.value);
|
|
@@ -498,7 +503,7 @@ let PromptValidator = class PromptValidator {
|
|
|
498
503
|
if (currentNames?.size === 1) {
|
|
499
504
|
const newName = Array.from(currentNames)[0];
|
|
500
505
|
report(toMarker(( localize(
|
|
501
|
-
|
|
506
|
+
7034,
|
|
502
507
|
"Tool or toolset '{0}' has been renamed, use '{1}' instead.",
|
|
503
508
|
item.value,
|
|
504
509
|
newName
|
|
@@ -506,14 +511,14 @@ let PromptValidator = class PromptValidator {
|
|
|
506
511
|
} else {
|
|
507
512
|
const newNames = Array.from(currentNames).sort((a, b) => a.localeCompare(b)).join(", ");
|
|
508
513
|
report(toMarker(( localize(
|
|
509
|
-
|
|
514
|
+
7035,
|
|
510
515
|
"Tool or toolset '{0}' has been renamed, use the following tools instead: {1}",
|
|
511
516
|
item.value,
|
|
512
517
|
newNames
|
|
513
518
|
)), item.range, MarkerSeverity.Info));
|
|
514
519
|
}
|
|
515
520
|
} else {
|
|
516
|
-
report(toMarker(( localize(
|
|
521
|
+
report(toMarker(( localize(7036, "Unknown tool '{0}'.", item.value)), item.range, MarkerSeverity.Warning));
|
|
517
522
|
}
|
|
518
523
|
}
|
|
519
524
|
}
|
|
@@ -525,26 +530,26 @@ let PromptValidator = class PromptValidator {
|
|
|
525
530
|
if (!attribute) {
|
|
526
531
|
return;
|
|
527
532
|
}
|
|
528
|
-
if (attribute.value.type !== "
|
|
529
|
-
report(toMarker(( localize(
|
|
533
|
+
if (attribute.value.type !== "scalar") {
|
|
534
|
+
report(toMarker(( localize(7037, "The 'applyTo' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
|
|
530
535
|
return;
|
|
531
536
|
}
|
|
532
537
|
const pattern = attribute.value.value;
|
|
533
538
|
try {
|
|
534
539
|
const patterns = splitGlobAware(pattern, ",");
|
|
535
540
|
if (patterns.length === 0) {
|
|
536
|
-
report(toMarker(( localize(
|
|
541
|
+
report(toMarker(( localize(7038, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
|
|
537
542
|
return;
|
|
538
543
|
}
|
|
539
544
|
for (const pattern of patterns) {
|
|
540
545
|
const globPattern = parse(pattern);
|
|
541
546
|
if (isEmptyPattern(globPattern)) {
|
|
542
|
-
report(toMarker(( localize(
|
|
547
|
+
report(toMarker(( localize(7038, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
|
|
543
548
|
return;
|
|
544
549
|
}
|
|
545
550
|
}
|
|
546
551
|
} catch (_error) {
|
|
547
|
-
report(toMarker(( localize(
|
|
552
|
+
report(toMarker(( localize(7038, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
|
|
548
553
|
}
|
|
549
554
|
}
|
|
550
555
|
validatePaths(attributes, report) {
|
|
@@ -552,27 +557,27 @@ let PromptValidator = class PromptValidator {
|
|
|
552
557
|
if (!attribute) {
|
|
553
558
|
return;
|
|
554
559
|
}
|
|
555
|
-
if (attribute.value.type !== "
|
|
556
|
-
report(toMarker(( localize(
|
|
560
|
+
if (attribute.value.type !== "sequence") {
|
|
561
|
+
report(toMarker(( localize(7039, "The 'paths' attribute must be an array of glob patterns.")), attribute.value.range, MarkerSeverity.Error));
|
|
557
562
|
return;
|
|
558
563
|
}
|
|
559
564
|
for (const item of attribute.value.items) {
|
|
560
|
-
if (item.type !== "
|
|
561
|
-
report(toMarker(( localize(
|
|
565
|
+
if (item.type !== "scalar") {
|
|
566
|
+
report(toMarker(( localize(7040, "Each entry in the 'paths' attribute must be a string.")), item.range, MarkerSeverity.Error));
|
|
562
567
|
continue;
|
|
563
568
|
}
|
|
564
569
|
const pattern = item.value.trim();
|
|
565
570
|
if (pattern.length === 0) {
|
|
566
|
-
report(toMarker(( localize(
|
|
571
|
+
report(toMarker(( localize(7041, "Path entries must be non-empty glob patterns.")), item.range, MarkerSeverity.Error));
|
|
567
572
|
continue;
|
|
568
573
|
}
|
|
569
574
|
try {
|
|
570
575
|
const globPattern = parse(pattern);
|
|
571
576
|
if (isEmptyPattern(globPattern)) {
|
|
572
|
-
report(toMarker(( localize(
|
|
577
|
+
report(toMarker(( localize(7042, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
|
|
573
578
|
}
|
|
574
579
|
} catch (_error) {
|
|
575
|
-
report(toMarker(( localize(
|
|
580
|
+
report(toMarker(( localize(7042, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
|
|
576
581
|
}
|
|
577
582
|
}
|
|
578
583
|
}
|
|
@@ -581,8 +586,8 @@ let PromptValidator = class PromptValidator {
|
|
|
581
586
|
if (!attribute) {
|
|
582
587
|
return;
|
|
583
588
|
}
|
|
584
|
-
if (attribute.value.type !== "
|
|
585
|
-
report(toMarker(( localize(
|
|
589
|
+
if (attribute.value.type !== "sequence" && attribute.value.type !== "scalar") {
|
|
590
|
+
report(toMarker(( localize(7043, "The 'excludeAgent' attribute must be an string or array.")), attribute.value.range, MarkerSeverity.Error));
|
|
586
591
|
return;
|
|
587
592
|
}
|
|
588
593
|
}
|
|
@@ -591,14 +596,14 @@ let PromptValidator = class PromptValidator {
|
|
|
591
596
|
if (!attribute) {
|
|
592
597
|
return;
|
|
593
598
|
}
|
|
594
|
-
if (attribute.value.type !== "
|
|
595
|
-
report(toMarker(( localize(
|
|
599
|
+
if (attribute.value.type !== "sequence") {
|
|
600
|
+
report(toMarker(( localize(7044, "The 'handoffs' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
|
|
596
601
|
return;
|
|
597
602
|
}
|
|
598
603
|
for (const item of attribute.value.items) {
|
|
599
|
-
if (item.type !== "
|
|
604
|
+
if (item.type !== "map") {
|
|
600
605
|
report(toMarker(( localize(
|
|
601
|
-
|
|
606
|
+
7045,
|
|
602
607
|
"Each handoff in the 'handoffs' attribute must be an object with 'label', 'agent', 'prompt' and optional 'send'."
|
|
603
608
|
)), item.range, MarkerSeverity.Error));
|
|
604
609
|
continue;
|
|
@@ -607,40 +612,40 @@ let PromptValidator = class PromptValidator {
|
|
|
607
612
|
for (const prop of item.properties) {
|
|
608
613
|
switch (prop.key.value) {
|
|
609
614
|
case "label":
|
|
610
|
-
if (prop.value.type !== "
|
|
611
|
-
report(toMarker(( localize(
|
|
615
|
+
if (prop.value.type !== "scalar" || prop.value.value.trim().length === 0) {
|
|
616
|
+
report(toMarker(( localize(7046, "The 'label' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
|
|
612
617
|
}
|
|
613
618
|
break;
|
|
614
619
|
case "agent":
|
|
615
|
-
if (prop.value.type !== "
|
|
616
|
-
report(toMarker(( localize(
|
|
620
|
+
if (prop.value.type !== "scalar" || prop.value.value.trim().length === 0) {
|
|
621
|
+
report(toMarker(( localize(7047, "The 'agent' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
|
|
617
622
|
} else {
|
|
618
623
|
this.validateAgentValue(prop.value, report);
|
|
619
624
|
}
|
|
620
625
|
break;
|
|
621
626
|
case "prompt":
|
|
622
|
-
if (prop.value.type !== "
|
|
623
|
-
report(toMarker(( localize(
|
|
627
|
+
if (prop.value.type !== "scalar") {
|
|
628
|
+
report(toMarker(( localize(7048, "The 'prompt' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
|
|
624
629
|
}
|
|
625
630
|
break;
|
|
626
631
|
case "send":
|
|
627
|
-
if (prop.value
|
|
628
|
-
report(toMarker(( localize(
|
|
632
|
+
if (!isTrueOrFalse(prop.value)) {
|
|
633
|
+
report(toMarker(( localize(7049, "The 'send' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
|
|
629
634
|
}
|
|
630
635
|
break;
|
|
631
636
|
case "showContinueOn":
|
|
632
|
-
if (prop.value
|
|
633
|
-
report(toMarker(( localize(
|
|
637
|
+
if (!isTrueOrFalse(prop.value)) {
|
|
638
|
+
report(toMarker(( localize(7050, "The 'showContinueOn' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
|
|
634
639
|
}
|
|
635
640
|
break;
|
|
636
641
|
case "model":
|
|
637
|
-
if (prop.value.type !== "
|
|
638
|
-
report(toMarker(( localize(
|
|
642
|
+
if (prop.value.type !== "scalar") {
|
|
643
|
+
report(toMarker(( localize(7051, "The 'model' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
|
|
639
644
|
}
|
|
640
645
|
break;
|
|
641
646
|
default:
|
|
642
647
|
report(toMarker(( localize(
|
|
643
|
-
|
|
648
|
+
7052,
|
|
644
649
|
"Unknown property '{0}' in handoff object. Supported properties are 'label', 'agent', 'prompt' and optional 'send', 'showContinueOn', 'model'.",
|
|
645
650
|
prop.key.value
|
|
646
651
|
)), prop.value.range, MarkerSeverity.Warning));
|
|
@@ -649,7 +654,7 @@ let PromptValidator = class PromptValidator {
|
|
|
649
654
|
}
|
|
650
655
|
if (required.size > 0) {
|
|
651
656
|
report(toMarker(( localize(
|
|
652
|
-
|
|
657
|
+
7053,
|
|
653
658
|
"Missing required properties {0} in handoff object.",
|
|
654
659
|
( Array.from(required).map(s => `'${s}'`)).join(", ")
|
|
655
660
|
)), item.range, MarkerSeverity.Error));
|
|
@@ -662,8 +667,8 @@ let PromptValidator = class PromptValidator {
|
|
|
662
667
|
return;
|
|
663
668
|
}
|
|
664
669
|
report(toMarker(( localize(
|
|
665
|
-
|
|
666
|
-
"The 'infer' attribute is deprecated in favour of 'user-
|
|
670
|
+
7054,
|
|
671
|
+
"The 'infer' attribute is deprecated in favour of 'user-invocable' and 'disable-model-invocation'."
|
|
667
672
|
)), attribute.value.range, MarkerSeverity.Error));
|
|
668
673
|
}
|
|
669
674
|
validateTarget(attributes, report) {
|
|
@@ -671,41 +676,54 @@ let PromptValidator = class PromptValidator {
|
|
|
671
676
|
if (!attribute) {
|
|
672
677
|
return;
|
|
673
678
|
}
|
|
674
|
-
if (attribute.value.type !== "
|
|
675
|
-
report(toMarker(( localize(
|
|
679
|
+
if (attribute.value.type !== "scalar") {
|
|
680
|
+
report(toMarker(( localize(7055, "The 'target' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
|
|
676
681
|
return;
|
|
677
682
|
}
|
|
678
683
|
const targetValue = attribute.value.value.trim();
|
|
679
684
|
if (targetValue.length === 0) {
|
|
680
|
-
report(toMarker(( localize(
|
|
685
|
+
report(toMarker(( localize(7056, "The 'target' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
|
|
681
686
|
return;
|
|
682
687
|
}
|
|
683
688
|
const validTargets = ["github-copilot", "vscode"];
|
|
684
689
|
if (!validTargets.includes(targetValue)) {
|
|
685
690
|
report(toMarker(( localize(
|
|
686
|
-
|
|
691
|
+
7057,
|
|
687
692
|
"The 'target' attribute must be one of: {0}.",
|
|
688
693
|
validTargets.join(", ")
|
|
689
694
|
)), attribute.value.range, MarkerSeverity.Error));
|
|
690
695
|
}
|
|
691
696
|
}
|
|
692
|
-
|
|
693
|
-
const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.
|
|
697
|
+
validateUserInvocable(attributes, report) {
|
|
698
|
+
const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.userInvocable);
|
|
694
699
|
if (!attribute) {
|
|
695
700
|
return;
|
|
696
701
|
}
|
|
697
|
-
if (attribute.value
|
|
698
|
-
report(toMarker(( localize(
|
|
702
|
+
if (!isTrueOrFalse(attribute.value)) {
|
|
703
|
+
report(toMarker(( localize(7058, "The 'user-invocable' attribute must be 'true' or 'false'.")), attribute.value.range, MarkerSeverity.Error));
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
validateUserInvokable(attributes, report) {
|
|
708
|
+
const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.userInvokable);
|
|
709
|
+
if (!attribute) {
|
|
699
710
|
return;
|
|
700
711
|
}
|
|
712
|
+
report(toMarker(( localize(
|
|
713
|
+
7059,
|
|
714
|
+
"The 'user-invokable' attribute is deprecated. Use 'user-invocable' instead."
|
|
715
|
+
)), attribute.range, MarkerSeverity.Warning));
|
|
701
716
|
}
|
|
702
717
|
validateDisableModelInvocation(attributes, report) {
|
|
703
718
|
const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.disableModelInvocation);
|
|
704
719
|
if (!attribute) {
|
|
705
720
|
return;
|
|
706
721
|
}
|
|
707
|
-
if (attribute.value
|
|
708
|
-
report(toMarker(( localize(
|
|
722
|
+
if (!isTrueOrFalse(attribute.value)) {
|
|
723
|
+
report(toMarker(( localize(
|
|
724
|
+
7060,
|
|
725
|
+
"The 'disable-model-invocation' attribute must be 'true' or 'false'."
|
|
726
|
+
)), attribute.value.range, MarkerSeverity.Error));
|
|
709
727
|
return;
|
|
710
728
|
}
|
|
711
729
|
}
|
|
@@ -714,8 +732,8 @@ let PromptValidator = class PromptValidator {
|
|
|
714
732
|
if (!attribute) {
|
|
715
733
|
return;
|
|
716
734
|
}
|
|
717
|
-
if (attribute.value.type !== "
|
|
718
|
-
report(toMarker(( localize(
|
|
735
|
+
if (attribute.value.type !== "sequence") {
|
|
736
|
+
report(toMarker(( localize(7061, "The 'agents' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
|
|
719
737
|
return;
|
|
720
738
|
}
|
|
721
739
|
const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
|
|
@@ -723,13 +741,13 @@ let PromptValidator = class PromptValidator {
|
|
|
723
741
|
availableAgentNames.add(ChatMode.Agent.name.get());
|
|
724
742
|
const agentNames = [];
|
|
725
743
|
for (const item of attribute.value.items) {
|
|
726
|
-
if (item.type !== "
|
|
727
|
-
report(toMarker(( localize(
|
|
744
|
+
if (item.type !== "scalar") {
|
|
745
|
+
report(toMarker(( localize(7062, "Each agent name in the 'agents' attribute must be a string.")), item.range, MarkerSeverity.Error));
|
|
728
746
|
} else if (item.value) {
|
|
729
747
|
agentNames.push(item.value);
|
|
730
748
|
if (item.value !== "*" && !( availableAgentNames.has(item.value))) {
|
|
731
749
|
report(toMarker(( localize(
|
|
732
|
-
|
|
750
|
+
7063,
|
|
733
751
|
"Unknown agent '{0}'. Available agents: {1}.",
|
|
734
752
|
item.value,
|
|
735
753
|
Array.from(availableAgentNames).join(", ")
|
|
@@ -741,14 +759,110 @@ let PromptValidator = class PromptValidator {
|
|
|
741
759
|
const tools = header.tools;
|
|
742
760
|
if (tools && !tools.includes(SpecedToolAliases.agent)) {
|
|
743
761
|
report(toMarker(( localize(
|
|
744
|
-
|
|
762
|
+
7064,
|
|
745
763
|
"When 'agents' and 'tools' are specified, the 'agent' tool must be included in the 'tools' attribute."
|
|
746
764
|
)), attribute.value.range, MarkerSeverity.Warning));
|
|
747
765
|
}
|
|
748
766
|
}
|
|
749
767
|
}
|
|
768
|
+
validateGithubPermissions(attributes, report) {
|
|
769
|
+
const attribute = attributes.find(attr => attr.key === GithubPromptHeaderAttributes.github);
|
|
770
|
+
if (!attribute) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
if (attribute.value.type !== "map") {
|
|
774
|
+
report(toMarker(( localize(7065, "The 'github' attribute must be an object.")), attribute.value.range, MarkerSeverity.Error));
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
for (const prop of attribute.value.properties) {
|
|
778
|
+
if (prop.key.value !== "permissions") {
|
|
779
|
+
report(toMarker(( localize(
|
|
780
|
+
7066,
|
|
781
|
+
"Unknown property '{0}' in 'github' object. Supported: 'permissions'.",
|
|
782
|
+
prop.key.value
|
|
783
|
+
)), prop.key.range, MarkerSeverity.Warning));
|
|
784
|
+
continue;
|
|
785
|
+
}
|
|
786
|
+
if (prop.value.type !== "map") {
|
|
787
|
+
report(toMarker(( localize(7067, "The 'permissions' property must be an object.")), prop.value.range, MarkerSeverity.Error));
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
for (const permProp of prop.value.properties) {
|
|
791
|
+
const scope = permProp.key.value;
|
|
792
|
+
const scopeInfo = githubPermissionScopes[scope];
|
|
793
|
+
if (!scopeInfo) {
|
|
794
|
+
const validScopes = ( Object.keys(githubPermissionScopes)).sort().join(", ");
|
|
795
|
+
report(toMarker(( localize(
|
|
796
|
+
7068,
|
|
797
|
+
"Unknown permission scope '{0}'. Valid scopes: {1}.",
|
|
798
|
+
scope,
|
|
799
|
+
validScopes
|
|
800
|
+
)), permProp.key.range, MarkerSeverity.Warning));
|
|
801
|
+
continue;
|
|
802
|
+
}
|
|
803
|
+
if (permProp.value.type !== "scalar") {
|
|
804
|
+
report(toMarker(( localize(7069, "The permission value for '{0}' must be a string.", scope)), permProp.value.range, MarkerSeverity.Error));
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
807
|
+
const value = permProp.value.value;
|
|
808
|
+
if (!scopeInfo.allowedValues.includes(value)) {
|
|
809
|
+
report(toMarker(( localize(
|
|
810
|
+
7070,
|
|
811
|
+
"Invalid permission value '{0}' for scope '{1}'. Allowed values: {2}.",
|
|
812
|
+
value,
|
|
813
|
+
scope,
|
|
814
|
+
scopeInfo.allowedValues.join(", ")
|
|
815
|
+
)), permProp.value.range, MarkerSeverity.Error));
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
750
820
|
};
|
|
751
821
|
PromptValidator = ( __decorate([( __param(0, ILanguageModelsService)), ( __param(1, ILanguageModelToolsService)), ( __param(2, IChatModeService)), ( __param(3, IFileService)), ( __param(4, ILabelService)), ( __param(5, IPromptsService))], PromptValidator));
|
|
822
|
+
const githubPermissionScopes = {
|
|
823
|
+
"actions": {
|
|
824
|
+
allowedValues: ["read", "write", "none"],
|
|
825
|
+
description: ( localize(7071, "Access to GitHub Actions workflows and runs"))
|
|
826
|
+
},
|
|
827
|
+
"checks": {
|
|
828
|
+
allowedValues: ["read", "none"],
|
|
829
|
+
description: ( localize(7072, "Access to check runs and statuses"))
|
|
830
|
+
},
|
|
831
|
+
"contents": {
|
|
832
|
+
allowedValues: ["read", "write", "none"],
|
|
833
|
+
description: ( localize(7073, "Access to repository contents (files, commits, branches)"))
|
|
834
|
+
},
|
|
835
|
+
"discussions": {
|
|
836
|
+
allowedValues: ["read", "write", "none"],
|
|
837
|
+
description: ( localize(7074, "Access to discussions"))
|
|
838
|
+
},
|
|
839
|
+
"issues": {
|
|
840
|
+
allowedValues: ["read", "write", "none"],
|
|
841
|
+
description: ( localize(7075, "Access to issues (read, create, update, comment)"))
|
|
842
|
+
},
|
|
843
|
+
"metadata": {
|
|
844
|
+
allowedValues: ["read"],
|
|
845
|
+
description: ( localize(7076, "Repository metadata (always read-only)"))
|
|
846
|
+
},
|
|
847
|
+
"pull-requests": {
|
|
848
|
+
allowedValues: ["read", "write", "none"],
|
|
849
|
+
description: ( localize(7077, "Access to pull requests (read, create, update, review)"))
|
|
850
|
+
},
|
|
851
|
+
"security-events": {
|
|
852
|
+
allowedValues: ["read", "none"],
|
|
853
|
+
description: ( localize(7078, "Access to security-related events"))
|
|
854
|
+
},
|
|
855
|
+
"workflows": {
|
|
856
|
+
allowedValues: ["write", "none"],
|
|
857
|
+
description: ( localize(7079, "Access to modify workflow files"))
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
function isTrueOrFalse(value) {
|
|
861
|
+
if (value.type === "scalar") {
|
|
862
|
+
return (value.value === "true" || value.value === "false") && value.format === "none";
|
|
863
|
+
}
|
|
864
|
+
return false;
|
|
865
|
+
}
|
|
752
866
|
const allAttributeNames = {
|
|
753
867
|
[PromptsType.prompt]: [
|
|
754
868
|
PromptHeaderAttributes.name,
|
|
@@ -776,8 +890,10 @@ const allAttributeNames = {
|
|
|
776
890
|
PromptHeaderAttributes.target,
|
|
777
891
|
PromptHeaderAttributes.infer,
|
|
778
892
|
PromptHeaderAttributes.agents,
|
|
893
|
+
PromptHeaderAttributes.userInvocable,
|
|
779
894
|
PromptHeaderAttributes.userInvokable,
|
|
780
|
-
PromptHeaderAttributes.disableModelInvocation
|
|
895
|
+
PromptHeaderAttributes.disableModelInvocation,
|
|
896
|
+
GithubPromptHeaderAttributes.github
|
|
781
897
|
],
|
|
782
898
|
[PromptsType.skill]: [
|
|
783
899
|
PromptHeaderAttributes.name,
|
|
@@ -786,6 +902,7 @@ const allAttributeNames = {
|
|
|
786
902
|
PromptHeaderAttributes.compatibility,
|
|
787
903
|
PromptHeaderAttributes.metadata,
|
|
788
904
|
PromptHeaderAttributes.argumentHint,
|
|
905
|
+
PromptHeaderAttributes.userInvocable,
|
|
789
906
|
PromptHeaderAttributes.userInvokable,
|
|
790
907
|
PromptHeaderAttributes.disableModelInvocation
|
|
791
908
|
],
|
|
@@ -797,6 +914,7 @@ const githubCopilotAgentAttributeNames = [
|
|
|
797
914
|
PromptHeaderAttributes.tools,
|
|
798
915
|
PromptHeaderAttributes.target,
|
|
799
916
|
GithubPromptHeaderAttributes.mcpServers,
|
|
917
|
+
GithubPromptHeaderAttributes.github,
|
|
800
918
|
PromptHeaderAttributes.infer
|
|
801
919
|
];
|
|
802
920
|
const recommendedAttributeNames = {
|
|
@@ -820,7 +938,7 @@ function getValidAttributeNames(promptType, includeNonRecommended, target) {
|
|
|
820
938
|
return includeNonRecommended ? allAttributeNames[promptType] : recommendedAttributeNames[promptType];
|
|
821
939
|
}
|
|
822
940
|
function isNonRecommendedAttribute(attributeName) {
|
|
823
|
-
return attributeName === PromptHeaderAttributes.advancedOptions || attributeName === PromptHeaderAttributes.excludeAgent || attributeName === PromptHeaderAttributes.mode || attributeName === PromptHeaderAttributes.infer;
|
|
941
|
+
return attributeName === PromptHeaderAttributes.advancedOptions || attributeName === PromptHeaderAttributes.excludeAgent || attributeName === PromptHeaderAttributes.mode || attributeName === PromptHeaderAttributes.infer || attributeName === PromptHeaderAttributes.userInvokable;
|
|
824
942
|
}
|
|
825
943
|
function getAttributeDescription(attributeName, promptType, target) {
|
|
826
944
|
if (target === Target.Claude) {
|
|
@@ -836,17 +954,17 @@ function getAttributeDescription(attributeName, promptType, target) {
|
|
|
836
954
|
switch (attributeName) {
|
|
837
955
|
case PromptHeaderAttributes.name:
|
|
838
956
|
return localize(
|
|
839
|
-
|
|
957
|
+
7080,
|
|
840
958
|
"The name of the instruction file as shown in the UI. If not set, the name is derived from the file name."
|
|
841
959
|
);
|
|
842
960
|
case PromptHeaderAttributes.description:
|
|
843
961
|
return localize(
|
|
844
|
-
|
|
962
|
+
7081,
|
|
845
963
|
"The description of the instruction file. It can be used to provide additional context or information about the instructions and is passed to the language model as part of the prompt."
|
|
846
964
|
);
|
|
847
965
|
case PromptHeaderAttributes.applyTo:
|
|
848
966
|
return localize(
|
|
849
|
-
|
|
967
|
+
7082,
|
|
850
968
|
"One or more glob pattern (separated by comma) that describe for which files the instructions apply to. Based on these patterns, the file is automatically included in the prompt, when the context contains a file that matches one or more of these patterns. Use `**` when you want this file to always be added.\nExample: `**/*.ts`, `**/*.js`, `client/**`"
|
|
851
969
|
);
|
|
852
970
|
}
|
|
@@ -854,25 +972,25 @@ function getAttributeDescription(attributeName, promptType, target) {
|
|
|
854
972
|
case PromptsType.skill:
|
|
855
973
|
switch (attributeName) {
|
|
856
974
|
case PromptHeaderAttributes.name:
|
|
857
|
-
return localize(
|
|
975
|
+
return localize(7083, "The name of the skill.");
|
|
858
976
|
case PromptHeaderAttributes.description:
|
|
859
977
|
return localize(
|
|
860
|
-
|
|
978
|
+
7084,
|
|
861
979
|
"The description of the skill. The description is added to every request and will be used by the agent to decide when to load the skill."
|
|
862
980
|
);
|
|
863
981
|
case PromptHeaderAttributes.argumentHint:
|
|
864
982
|
return localize(
|
|
865
|
-
|
|
983
|
+
7085,
|
|
866
984
|
"Hint shown during autocomplete to indicate expected arguments. Example: [issue-number] or [filename] [format]"
|
|
867
985
|
);
|
|
868
|
-
case PromptHeaderAttributes.
|
|
986
|
+
case PromptHeaderAttributes.userInvocable:
|
|
869
987
|
return localize(
|
|
870
|
-
|
|
988
|
+
7086,
|
|
871
989
|
"Set to false to hide from the / menu. Use for background knowledge users should not invoke directly. Default: true."
|
|
872
990
|
);
|
|
873
991
|
case PromptHeaderAttributes.disableModelInvocation:
|
|
874
992
|
return localize(
|
|
875
|
-
|
|
993
|
+
7087,
|
|
876
994
|
"Set to true to prevent the agent from automatically loading this skill. Use for workflows you want to trigger manually with /name. Default: false."
|
|
877
995
|
);
|
|
878
996
|
}
|
|
@@ -880,71 +998,76 @@ function getAttributeDescription(attributeName, promptType, target) {
|
|
|
880
998
|
case PromptsType.agent:
|
|
881
999
|
switch (attributeName) {
|
|
882
1000
|
case PromptHeaderAttributes.name:
|
|
883
|
-
return localize(
|
|
1001
|
+
return localize(7088, "The name of the agent as shown in the UI.");
|
|
884
1002
|
case PromptHeaderAttributes.description:
|
|
885
1003
|
return localize(
|
|
886
|
-
|
|
1004
|
+
7089,
|
|
887
1005
|
"The description of the custom agent, what it does and when to use it."
|
|
888
1006
|
);
|
|
889
1007
|
case PromptHeaderAttributes.argumentHint:
|
|
890
1008
|
return localize(
|
|
891
|
-
|
|
1009
|
+
7090,
|
|
892
1010
|
"The argument-hint describes what inputs the custom agent expects or supports."
|
|
893
1011
|
);
|
|
894
1012
|
case PromptHeaderAttributes.model:
|
|
895
1013
|
return localize(
|
|
896
|
-
|
|
1014
|
+
7091,
|
|
897
1015
|
"Specify the model that runs this custom agent. Can also be a list of models. The first available model will be used."
|
|
898
1016
|
);
|
|
899
1017
|
case PromptHeaderAttributes.tools:
|
|
900
|
-
return localize(
|
|
1018
|
+
return localize(7092, "The set of tools that the custom agent has access to.");
|
|
901
1019
|
case PromptHeaderAttributes.handOffs:
|
|
902
|
-
return localize(
|
|
1020
|
+
return localize(7093, "Possible handoff actions when the agent has completed its task.");
|
|
903
1021
|
case PromptHeaderAttributes.target:
|
|
904
1022
|
return localize(
|
|
905
|
-
|
|
1023
|
+
7094,
|
|
906
1024
|
"The target to which the header attributes like tools apply to. Possible values are `github-copilot` and `vscode`."
|
|
907
1025
|
);
|
|
908
1026
|
case PromptHeaderAttributes.infer:
|
|
909
|
-
return localize(
|
|
1027
|
+
return localize(7095, "Controls visibility of the agent.");
|
|
910
1028
|
case PromptHeaderAttributes.agents:
|
|
911
1029
|
return localize(
|
|
912
|
-
|
|
1030
|
+
7096,
|
|
913
1031
|
"One or more agents that this agent can use as subagents. Use '*' to specify all available agents."
|
|
914
1032
|
);
|
|
915
|
-
case PromptHeaderAttributes.
|
|
916
|
-
return localize(
|
|
1033
|
+
case PromptHeaderAttributes.userInvocable:
|
|
1034
|
+
return localize(7097, "Whether the agent can be selected and invoked by users in the UI.");
|
|
917
1035
|
case PromptHeaderAttributes.disableModelInvocation:
|
|
918
|
-
return localize(
|
|
1036
|
+
return localize(7098, "If true, prevents the agent from being invoked as a subagent.");
|
|
1037
|
+
case GithubPromptHeaderAttributes.github:
|
|
1038
|
+
return localize(
|
|
1039
|
+
7099,
|
|
1040
|
+
"GitHub-specific configuration for the agent, such as token permissions."
|
|
1041
|
+
);
|
|
919
1042
|
}
|
|
920
1043
|
break;
|
|
921
1044
|
case PromptsType.prompt:
|
|
922
1045
|
switch (attributeName) {
|
|
923
1046
|
case PromptHeaderAttributes.name:
|
|
924
1047
|
return localize(
|
|
925
|
-
|
|
1048
|
+
7100,
|
|
926
1049
|
"The name of the prompt. This is also the name of the slash command that will run this prompt."
|
|
927
1050
|
);
|
|
928
1051
|
case PromptHeaderAttributes.description:
|
|
929
1052
|
return localize(
|
|
930
|
-
|
|
1053
|
+
7101,
|
|
931
1054
|
"The description of the reusable prompt, what it does and when to use it."
|
|
932
1055
|
);
|
|
933
1056
|
case PromptHeaderAttributes.argumentHint:
|
|
934
1057
|
return localize(
|
|
935
|
-
|
|
1058
|
+
7102,
|
|
936
1059
|
"The argument-hint describes what inputs the prompt expects or supports."
|
|
937
1060
|
);
|
|
938
1061
|
case PromptHeaderAttributes.model:
|
|
939
1062
|
return localize(
|
|
940
|
-
|
|
1063
|
+
7103,
|
|
941
1064
|
"The model to use in this prompt. Can also be a list of models. The first available model will be used."
|
|
942
1065
|
);
|
|
943
1066
|
case PromptHeaderAttributes.tools:
|
|
944
|
-
return localize(
|
|
1067
|
+
return localize(7104, "The tools to use in this prompt.");
|
|
945
1068
|
case PromptHeaderAttributes.agent:
|
|
946
1069
|
case PromptHeaderAttributes.mode:
|
|
947
|
-
return localize(
|
|
1070
|
+
return localize(7105, "The agent to use when running this prompt.");
|
|
948
1071
|
}
|
|
949
1072
|
break;
|
|
950
1073
|
}
|
|
@@ -952,92 +1075,92 @@ function getAttributeDescription(attributeName, promptType, target) {
|
|
|
952
1075
|
}
|
|
953
1076
|
const knownGithubCopilotTools = [{
|
|
954
1077
|
name: SpecedToolAliases.execute,
|
|
955
|
-
description: ( localize(
|
|
1078
|
+
description: ( localize(7106, "Execute commands"))
|
|
956
1079
|
}, {
|
|
957
1080
|
name: SpecedToolAliases.read,
|
|
958
|
-
description: ( localize(
|
|
1081
|
+
description: ( localize(7107, "Read files"))
|
|
959
1082
|
}, {
|
|
960
1083
|
name: SpecedToolAliases.edit,
|
|
961
|
-
description: ( localize(
|
|
1084
|
+
description: ( localize(7108, "Edit files"))
|
|
962
1085
|
}, {
|
|
963
1086
|
name: SpecedToolAliases.search,
|
|
964
|
-
description: ( localize(
|
|
1087
|
+
description: ( localize(7109, "Search files"))
|
|
965
1088
|
}, {
|
|
966
1089
|
name: SpecedToolAliases.agent,
|
|
967
|
-
description: ( localize(
|
|
1090
|
+
description: ( localize(7110, "Use subagents"))
|
|
968
1091
|
}];
|
|
969
1092
|
const knownClaudeTools = [{
|
|
970
1093
|
name: "Bash",
|
|
971
|
-
description: ( localize(
|
|
1094
|
+
description: ( localize(7111, "Execute shell commands")),
|
|
972
1095
|
toolEquivalent: [SpecedToolAliases.execute]
|
|
973
1096
|
}, {
|
|
974
1097
|
name: "Edit",
|
|
975
|
-
description: ( localize(
|
|
1098
|
+
description: ( localize(7112, "Make targeted file edits")),
|
|
976
1099
|
toolEquivalent: ["edit/editNotebook", "edit/editFiles"]
|
|
977
1100
|
}, {
|
|
978
1101
|
name: "Glob",
|
|
979
|
-
description: ( localize(
|
|
1102
|
+
description: ( localize(7113, "Find files by pattern")),
|
|
980
1103
|
toolEquivalent: ["search/fileSearch"]
|
|
981
1104
|
}, {
|
|
982
1105
|
name: "Grep",
|
|
983
|
-
description: ( localize(
|
|
1106
|
+
description: ( localize(7114, "Search file contents with regex")),
|
|
984
1107
|
toolEquivalent: ["search/textSearch"]
|
|
985
1108
|
}, {
|
|
986
1109
|
name: "Read",
|
|
987
|
-
description: ( localize(
|
|
1110
|
+
description: ( localize(7115, "Read file contents")),
|
|
988
1111
|
toolEquivalent: ["read/readFile", "read/getNotebookSummary"]
|
|
989
1112
|
}, {
|
|
990
1113
|
name: "Write",
|
|
991
|
-
description: ( localize(
|
|
1114
|
+
description: ( localize(7116, "Create/overwrite files")),
|
|
992
1115
|
toolEquivalent: ["edit/createDirectory", "edit/createFile", "edit/createJupyterNotebook"]
|
|
993
1116
|
}, {
|
|
994
1117
|
name: "WebFetch",
|
|
995
|
-
description: ( localize(
|
|
1118
|
+
description: ( localize(7117, "Fetch URL content")),
|
|
996
1119
|
toolEquivalent: [SpecedToolAliases.web]
|
|
997
1120
|
}, {
|
|
998
1121
|
name: "WebSearch",
|
|
999
|
-
description: ( localize(
|
|
1122
|
+
description: ( localize(7118, "Perform web searches")),
|
|
1000
1123
|
toolEquivalent: [SpecedToolAliases.web]
|
|
1001
1124
|
}, {
|
|
1002
1125
|
name: "Task",
|
|
1003
|
-
description: ( localize(
|
|
1126
|
+
description: ( localize(7119, "Run subagents for complex tasks")),
|
|
1004
1127
|
toolEquivalent: [SpecedToolAliases.agent]
|
|
1005
1128
|
}, {
|
|
1006
1129
|
name: "Skill",
|
|
1007
|
-
description: ( localize(
|
|
1130
|
+
description: ( localize(7120, "Execute skills")),
|
|
1008
1131
|
toolEquivalent: []
|
|
1009
1132
|
}, {
|
|
1010
1133
|
name: "LSP",
|
|
1011
|
-
description: ( localize(
|
|
1134
|
+
description: ( localize(7121, "Code intelligence (requires plugin)")),
|
|
1012
1135
|
toolEquivalent: []
|
|
1013
1136
|
}, {
|
|
1014
1137
|
name: "NotebookEdit",
|
|
1015
|
-
description: ( localize(
|
|
1138
|
+
description: ( localize(7122, "Modify Jupyter notebooks")),
|
|
1016
1139
|
toolEquivalent: ["edit/editNotebook"]
|
|
1017
1140
|
}, {
|
|
1018
1141
|
name: "AskUserQuestion",
|
|
1019
|
-
description: ( localize(
|
|
1142
|
+
description: ( localize(7123, "Ask multiple-choice questions")),
|
|
1020
1143
|
toolEquivalent: ["vscode/askQuestions"]
|
|
1021
1144
|
}, {
|
|
1022
1145
|
name: "MCPSearch",
|
|
1023
|
-
description: ( localize(
|
|
1146
|
+
description: ( localize(7124, "Searches for MCP tools when tool search is enabled")),
|
|
1024
1147
|
toolEquivalent: []
|
|
1025
1148
|
}];
|
|
1026
1149
|
const knownClaudeModels = [{
|
|
1027
1150
|
name: "sonnet",
|
|
1028
|
-
description: ( localize(
|
|
1151
|
+
description: ( localize(7125, "Latest Claude Sonnet")),
|
|
1029
1152
|
modelEquivalent: "Claude Sonnet 4.5 (copilot)"
|
|
1030
1153
|
}, {
|
|
1031
1154
|
name: "opus",
|
|
1032
|
-
description: ( localize(
|
|
1155
|
+
description: ( localize(7126, "Latest Claude Opus")),
|
|
1033
1156
|
modelEquivalent: "Claude Opus 4.6 (copilot)"
|
|
1034
1157
|
}, {
|
|
1035
1158
|
name: "haiku",
|
|
1036
|
-
description: ( localize(
|
|
1159
|
+
description: ( localize(7127, "Latest Claude Haiku, fast for simple tasks")),
|
|
1037
1160
|
modelEquivalent: "Claude Haiku 4.5 (copilot)"
|
|
1038
1161
|
}, {
|
|
1039
1162
|
name: "inherit",
|
|
1040
|
-
description: ( localize(
|
|
1163
|
+
description: ( localize(7128, "Inherit model from parent agent or prompt")),
|
|
1041
1164
|
modelEquivalent: undefined
|
|
1042
1165
|
}];
|
|
1043
1166
|
function mapClaudeModels(claudeModelNames) {
|
|
@@ -1062,108 +1185,108 @@ function mapClaudeTools(claudeToolNames) {
|
|
|
1062
1185
|
}
|
|
1063
1186
|
const claudeAgentAttributes = {
|
|
1064
1187
|
"name": {
|
|
1065
|
-
type: "
|
|
1066
|
-
description: ( localize(
|
|
1188
|
+
type: "scalar",
|
|
1189
|
+
description: ( localize(7129, "Unique identifier using lowercase letters and hyphens (required)"))
|
|
1067
1190
|
},
|
|
1068
1191
|
"description": {
|
|
1069
|
-
type: "
|
|
1070
|
-
description: ( localize(
|
|
1192
|
+
type: "scalar",
|
|
1193
|
+
description: ( localize(7130, "When to delegate to this subagent (required)"))
|
|
1071
1194
|
},
|
|
1072
1195
|
"tools": {
|
|
1073
|
-
type: "
|
|
1074
|
-
description: ( localize(
|
|
1196
|
+
type: "sequence",
|
|
1197
|
+
description: ( localize(7131, "Array of tools the subagent can use. Inherits all tools if omitted")),
|
|
1075
1198
|
defaults: ["Read, Edit, Bash"],
|
|
1076
1199
|
items: knownClaudeTools
|
|
1077
1200
|
},
|
|
1078
1201
|
"disallowedTools": {
|
|
1079
|
-
type: "
|
|
1080
|
-
description: ( localize(
|
|
1202
|
+
type: "sequence",
|
|
1203
|
+
description: ( localize(7132, "Tools to deny, removed from inherited or specified list")),
|
|
1081
1204
|
defaults: ["Write, Edit, Bash"],
|
|
1082
1205
|
items: knownClaudeTools
|
|
1083
1206
|
},
|
|
1084
1207
|
"model": {
|
|
1085
|
-
type: "
|
|
1208
|
+
type: "scalar",
|
|
1086
1209
|
description: ( localize(
|
|
1087
|
-
|
|
1210
|
+
7133,
|
|
1088
1211
|
"Model to use: sonnet, opus, haiku, or inherit. Defaults to inherit."
|
|
1089
1212
|
)),
|
|
1090
1213
|
defaults: ["sonnet", "opus", "haiku", "inherit"],
|
|
1091
1214
|
enums: knownClaudeModels
|
|
1092
1215
|
},
|
|
1093
1216
|
"permissionMode": {
|
|
1094
|
-
type: "
|
|
1217
|
+
type: "scalar",
|
|
1095
1218
|
description: ( localize(
|
|
1096
|
-
|
|
1219
|
+
7134,
|
|
1097
1220
|
"Permission mode: default, acceptEdits, dontAsk, bypassPermissions, or plan."
|
|
1098
1221
|
)),
|
|
1099
1222
|
defaults: ["default", "acceptEdits", "dontAsk", "bypassPermissions", "plan"],
|
|
1100
1223
|
enums: [{
|
|
1101
1224
|
name: "default",
|
|
1102
1225
|
description: ( localize(
|
|
1103
|
-
|
|
1226
|
+
7135,
|
|
1104
1227
|
"Standard behavior: prompts for permission on first use of each tool."
|
|
1105
1228
|
))
|
|
1106
1229
|
}, {
|
|
1107
1230
|
name: "acceptEdits",
|
|
1108
|
-
description: ( localize(
|
|
1231
|
+
description: ( localize(7136, "Automatically accepts file edit permissions for the session."))
|
|
1109
1232
|
}, {
|
|
1110
1233
|
name: "plan",
|
|
1111
1234
|
description: ( localize(
|
|
1112
|
-
|
|
1235
|
+
7137,
|
|
1113
1236
|
"Plan Mode: Claude can analyze but not modify files or execute commands."
|
|
1114
1237
|
))
|
|
1115
1238
|
}, {
|
|
1116
1239
|
name: "delegate",
|
|
1117
1240
|
description: ( localize(
|
|
1118
|
-
|
|
1241
|
+
7138,
|
|
1119
1242
|
"Coordination-only mode for agent team leads. Only available when an agent team is active."
|
|
1120
1243
|
))
|
|
1121
1244
|
}, {
|
|
1122
1245
|
name: "dontAsk",
|
|
1123
1246
|
description: ( localize(
|
|
1124
|
-
|
|
1247
|
+
7139,
|
|
1125
1248
|
"Auto-denies tools unless pre-approved via /permissions or permissions.allow rules."
|
|
1126
1249
|
))
|
|
1127
1250
|
}, {
|
|
1128
1251
|
name: "bypassPermissions",
|
|
1129
1252
|
description: ( localize(
|
|
1130
|
-
|
|
1253
|
+
7140,
|
|
1131
1254
|
"Skips all permission prompts (requires safe environment like containers)."
|
|
1132
1255
|
))
|
|
1133
1256
|
}]
|
|
1134
1257
|
},
|
|
1135
1258
|
"skills": {
|
|
1136
|
-
type: "
|
|
1137
|
-
description: ( localize(
|
|
1259
|
+
type: "sequence",
|
|
1260
|
+
description: ( localize(7141, "Skills to load into the subagent's context at startup."))
|
|
1138
1261
|
},
|
|
1139
1262
|
"mcpServers": {
|
|
1140
|
-
type: "
|
|
1141
|
-
description: ( localize(
|
|
1263
|
+
type: "sequence",
|
|
1264
|
+
description: ( localize(7142, "MCP servers available to this subagent."))
|
|
1142
1265
|
},
|
|
1143
1266
|
"hooks": {
|
|
1144
1267
|
type: "object",
|
|
1145
|
-
description: ( localize(
|
|
1268
|
+
description: ( localize(7143, "Lifecycle hooks scoped to this subagent."))
|
|
1146
1269
|
},
|
|
1147
1270
|
"memory": {
|
|
1148
|
-
type: "
|
|
1271
|
+
type: "scalar",
|
|
1149
1272
|
description: ( localize(
|
|
1150
|
-
|
|
1273
|
+
7144,
|
|
1151
1274
|
"Persistent memory scope: user, project, or local. Enables cross-session learning."
|
|
1152
1275
|
)),
|
|
1153
1276
|
defaults: ["user", "project", "local"],
|
|
1154
1277
|
enums: [{
|
|
1155
1278
|
name: "user",
|
|
1156
|
-
description: ( localize(
|
|
1279
|
+
description: ( localize(7145, "Remember learnings across all projects."))
|
|
1157
1280
|
}, {
|
|
1158
1281
|
name: "project",
|
|
1159
1282
|
description: ( localize(
|
|
1160
|
-
|
|
1283
|
+
7146,
|
|
1161
1284
|
"The subagent's knowledge is project-specific and shareable via version control."
|
|
1162
1285
|
))
|
|
1163
1286
|
}, {
|
|
1164
1287
|
name: "local",
|
|
1165
1288
|
description: ( localize(
|
|
1166
|
-
|
|
1289
|
+
7147,
|
|
1167
1290
|
"The subagent's knowledge is project-specific but should not be checked into version control."
|
|
1168
1291
|
))
|
|
1169
1292
|
}]
|
|
@@ -1171,16 +1294,16 @@ const claudeAgentAttributes = {
|
|
|
1171
1294
|
};
|
|
1172
1295
|
const claudeRulesAttributes = {
|
|
1173
1296
|
"description": {
|
|
1174
|
-
type: "
|
|
1297
|
+
type: "scalar",
|
|
1175
1298
|
description: ( localize(
|
|
1176
|
-
|
|
1299
|
+
7148,
|
|
1177
1300
|
"A description of what this rule covers, used to provide context about when it applies."
|
|
1178
1301
|
))
|
|
1179
1302
|
},
|
|
1180
1303
|
"paths": {
|
|
1181
|
-
type: "
|
|
1304
|
+
type: "sequence",
|
|
1182
1305
|
description: ( localize(
|
|
1183
|
-
|
|
1306
|
+
7149,
|
|
1184
1307
|
"Array of glob patterns that describe for which files the rule applies. Based on these patterns, the file is automatically included in the prompt when the context contains a file that matches.\nExample: `['src/**/*.ts', 'test/**']`"
|
|
1185
1308
|
))
|
|
1186
1309
|
}
|
|
@@ -1311,4 +1434,4 @@ let ModelTracker = class ModelTracker extends Disposable {
|
|
|
1311
1434
|
};
|
|
1312
1435
|
ModelTracker = ( __decorate([( __param(3, IPromptsService)), ( __param(4, IMarkerService))], ModelTracker));
|
|
1313
1436
|
|
|
1314
|
-
export { MARKERS_OWNER_ID, PromptValidator, PromptValidatorContribution, claudeAgentAttributes, claudeRulesAttributes, getAttributeDescription, getTarget, getValidAttributeNames, isNonRecommendedAttribute, isVSCodeOrDefaultTarget, knownClaudeModels, knownClaudeTools, knownGithubCopilotTools, mapClaudeModels, mapClaudeTools };
|
|
1437
|
+
export { MARKERS_OWNER_ID, PromptValidator, PromptValidatorContribution, claudeAgentAttributes, claudeRulesAttributes, getAttributeDescription, getTarget, getValidAttributeNames, githubPermissionScopes, isNonRecommendedAttribute, isVSCodeOrDefaultTarget, knownClaudeModels, knownClaudeTools, knownGithubCopilotTools, mapClaudeModels, mapClaudeTools };
|