@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
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js
CHANGED
|
@@ -15,6 +15,7 @@ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
15
15
|
import { getCleanPromptName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
16
16
|
import { PromptsType, HOOK_DOCUMENTATION_URL, SKILL_DOCUMENTATION_URL, AGENT_DOCUMENTATION_URL, INSTRUCTIONS_DOCUMENTATION_URL, PROMPT_DOCUMENTATION_URL } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
17
17
|
import { NEW_PROMPT_COMMAND_ID, NEW_INSTRUCTIONS_COMMAND_ID, NEW_AGENT_COMMAND_ID, NEW_SKILL_COMMAND_ID } from '../newPromptFileActions.js';
|
|
18
|
+
import { GENERATE_AGENT_INSTRUCTIONS_COMMAND_ID, GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID, GENERATE_PROMPT_COMMAND_ID, GENERATE_SKILL_COMMAND_ID, GENERATE_AGENT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
18
19
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
19
20
|
import { askForPromptFileName } from './askForPromptName.js';
|
|
20
21
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -24,37 +25,38 @@ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
|
|
|
24
25
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
25
26
|
import { PromptFileRewriter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/promptSyntax/promptFileRewriter';
|
|
26
27
|
import { isOrganizationPromptFile } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/utils/promptsServiceUtils';
|
|
28
|
+
import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
27
29
|
|
|
28
30
|
function newHelpButton(type) {
|
|
29
31
|
const iconClass = ThemeIcon.asClassName(Codicon.question);
|
|
30
32
|
switch (type) {
|
|
31
33
|
case PromptsType.prompt:
|
|
32
34
|
return {
|
|
33
|
-
tooltip: ( localize(
|
|
35
|
+
tooltip: ( localize(6255, "Show help on prompt files")),
|
|
34
36
|
helpURI: ( URI.parse(PROMPT_DOCUMENTATION_URL)),
|
|
35
37
|
iconClass
|
|
36
38
|
};
|
|
37
39
|
case PromptsType.instructions:
|
|
38
40
|
return {
|
|
39
|
-
tooltip: ( localize(
|
|
41
|
+
tooltip: ( localize(6256, "Show help on instruction files")),
|
|
40
42
|
helpURI: ( URI.parse(INSTRUCTIONS_DOCUMENTATION_URL)),
|
|
41
43
|
iconClass
|
|
42
44
|
};
|
|
43
45
|
case PromptsType.agent:
|
|
44
46
|
return {
|
|
45
|
-
tooltip: ( localize(
|
|
47
|
+
tooltip: ( localize(6257, "Show help on custom agent files")),
|
|
46
48
|
helpURI: ( URI.parse(AGENT_DOCUMENTATION_URL)),
|
|
47
49
|
iconClass
|
|
48
50
|
};
|
|
49
51
|
case PromptsType.skill:
|
|
50
52
|
return {
|
|
51
|
-
tooltip: ( localize(
|
|
53
|
+
tooltip: ( localize(6258, "Show help on skill files")),
|
|
52
54
|
helpURI: ( URI.parse(SKILL_DOCUMENTATION_URL)),
|
|
53
55
|
iconClass
|
|
54
56
|
};
|
|
55
57
|
case PromptsType.hook:
|
|
56
58
|
return {
|
|
57
|
-
tooltip: ( localize(
|
|
59
|
+
tooltip: ( localize(6259, "Show help on hook files")),
|
|
58
60
|
helpURI: ( URI.parse(HOOK_DOCUMENTATION_URL)),
|
|
59
61
|
iconClass
|
|
60
62
|
};
|
|
@@ -71,7 +73,7 @@ function isExtensionPromptPath(prompt) {
|
|
|
71
73
|
}
|
|
72
74
|
const NEW_PROMPT_FILE_OPTION = {
|
|
73
75
|
type: "item",
|
|
74
|
-
label: `$(plus) ${( localize(
|
|
76
|
+
label: `$(plus) ${( localize(6260, "New prompt file..."))}`,
|
|
75
77
|
pickable: false,
|
|
76
78
|
alwaysShow: true,
|
|
77
79
|
buttons: [newHelpButton(PromptsType.prompt)],
|
|
@@ -79,23 +81,31 @@ const NEW_PROMPT_FILE_OPTION = {
|
|
|
79
81
|
};
|
|
80
82
|
const NEW_INSTRUCTIONS_FILE_OPTION = {
|
|
81
83
|
type: "item",
|
|
82
|
-
label: `$(plus) ${( localize(
|
|
84
|
+
label: `$(plus) ${( localize(6261, "New instruction file..."))}`,
|
|
83
85
|
pickable: false,
|
|
84
86
|
alwaysShow: true,
|
|
85
87
|
buttons: [newHelpButton(PromptsType.instructions)],
|
|
86
88
|
commandId: NEW_INSTRUCTIONS_COMMAND_ID
|
|
87
89
|
};
|
|
88
|
-
const
|
|
90
|
+
const GENERATE_AGENT_INSTRUCTIONS_OPTION = {
|
|
89
91
|
type: "item",
|
|
90
|
-
label: `$(
|
|
92
|
+
label: `$(sparkle) ${( localize(6262, "Generate agent instructions..."))}`,
|
|
91
93
|
pickable: false,
|
|
92
94
|
alwaysShow: true,
|
|
93
95
|
buttons: [newHelpButton(PromptsType.instructions)],
|
|
94
|
-
commandId:
|
|
96
|
+
commandId: GENERATE_AGENT_INSTRUCTIONS_COMMAND_ID
|
|
97
|
+
};
|
|
98
|
+
const GENERATE_ON_DEMAND_INSTRUCTIONS_OPTION = {
|
|
99
|
+
type: "item",
|
|
100
|
+
label: `$(sparkle) ${( localize(6263, "Generate on-demand instructions..."))}`,
|
|
101
|
+
pickable: false,
|
|
102
|
+
alwaysShow: true,
|
|
103
|
+
buttons: [newHelpButton(PromptsType.instructions)],
|
|
104
|
+
commandId: GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID
|
|
95
105
|
};
|
|
96
106
|
const NEW_AGENT_FILE_OPTION = {
|
|
97
107
|
type: "item",
|
|
98
|
-
label: `$(plus) ${( localize(
|
|
108
|
+
label: `$(plus) ${( localize(6264, "Create new custom agent..."))}`,
|
|
99
109
|
pickable: false,
|
|
100
110
|
alwaysShow: true,
|
|
101
111
|
buttons: [newHelpButton(PromptsType.agent)],
|
|
@@ -103,36 +113,60 @@ const NEW_AGENT_FILE_OPTION = {
|
|
|
103
113
|
};
|
|
104
114
|
const NEW_SKILL_FILE_OPTION = {
|
|
105
115
|
type: "item",
|
|
106
|
-
label: `$(plus) ${( localize(
|
|
116
|
+
label: `$(plus) ${( localize(6265, "New skill..."))}`,
|
|
107
117
|
pickable: false,
|
|
108
118
|
alwaysShow: true,
|
|
109
119
|
buttons: [newHelpButton(PromptsType.skill)],
|
|
110
120
|
commandId: NEW_SKILL_COMMAND_ID
|
|
111
121
|
};
|
|
122
|
+
const GENERATE_PROMPT_OPTION = {
|
|
123
|
+
type: "item",
|
|
124
|
+
label: `$(sparkle) ${( localize(6266, "Generate prompt..."))}`,
|
|
125
|
+
pickable: false,
|
|
126
|
+
alwaysShow: true,
|
|
127
|
+
buttons: [newHelpButton(PromptsType.prompt)],
|
|
128
|
+
commandId: GENERATE_PROMPT_COMMAND_ID
|
|
129
|
+
};
|
|
130
|
+
const GENERATE_SKILL_OPTION = {
|
|
131
|
+
type: "item",
|
|
132
|
+
label: `$(sparkle) ${( localize(6267, "Generate skill..."))}`,
|
|
133
|
+
pickable: false,
|
|
134
|
+
alwaysShow: true,
|
|
135
|
+
buttons: [newHelpButton(PromptsType.skill)],
|
|
136
|
+
commandId: GENERATE_SKILL_COMMAND_ID
|
|
137
|
+
};
|
|
138
|
+
const GENERATE_AGENT_OPTION = {
|
|
139
|
+
type: "item",
|
|
140
|
+
label: `$(sparkle) ${( localize(6268, "Generate agent..."))}`,
|
|
141
|
+
pickable: false,
|
|
142
|
+
alwaysShow: true,
|
|
143
|
+
buttons: [newHelpButton(PromptsType.agent)],
|
|
144
|
+
commandId: GENERATE_AGENT_COMMAND_ID
|
|
145
|
+
};
|
|
112
146
|
const EDIT_BUTTON = {
|
|
113
|
-
tooltip: ( localize(
|
|
147
|
+
tooltip: ( localize(6269, "Open in Editor")),
|
|
114
148
|
iconClass: ThemeIcon.asClassName(Codicon.fileCode)
|
|
115
149
|
};
|
|
116
150
|
const DELETE_BUTTON = {
|
|
117
|
-
tooltip: ( localize(
|
|
151
|
+
tooltip: ( localize(6270, "Delete")),
|
|
118
152
|
iconClass: ThemeIcon.asClassName(Codicon.trash)
|
|
119
153
|
};
|
|
120
154
|
const RENAME_BUTTON = {
|
|
121
|
-
tooltip: ( localize(
|
|
155
|
+
tooltip: ( localize(6271, "Move and/or Rename")),
|
|
122
156
|
iconClass: ThemeIcon.asClassName(Codicon.replace)
|
|
123
157
|
};
|
|
124
158
|
const COPY_BUTTON = {
|
|
125
|
-
tooltip: ( localize(
|
|
159
|
+
tooltip: ( localize(6272, "Make a Copy")),
|
|
126
160
|
iconClass: ThemeIcon.asClassName(Codicon.copy)
|
|
127
161
|
};
|
|
128
162
|
const MAKE_VISIBLE_BUTTON = {
|
|
129
|
-
tooltip: ( localize(
|
|
163
|
+
tooltip: ( localize(6273, "Hidden from chat view agent picker. Click to show.")),
|
|
130
164
|
iconClass: ThemeIcon.asClassName(Codicon.eyeClosed),
|
|
131
165
|
alwaysVisible: true
|
|
132
166
|
};
|
|
133
167
|
const MAKE_INVISIBLE_BUTTON = {
|
|
134
|
-
tooltip: ( localize(
|
|
135
|
-
iconClass: ThemeIcon.asClassName(Codicon.
|
|
168
|
+
tooltip: ( localize(6274, "Shown in chat view agent picker. Click to hide.")),
|
|
169
|
+
iconClass: ThemeIcon.asClassName(Codicon.eye)
|
|
136
170
|
};
|
|
137
171
|
let PromptFilePickers = class PromptFilePickers {
|
|
138
172
|
constructor(
|
|
@@ -162,7 +196,7 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
162
196
|
useSeparators: true
|
|
163
197
|
});
|
|
164
198
|
quickPick.busy = true;
|
|
165
|
-
quickPick.placeholder = ( localize(
|
|
199
|
+
quickPick.placeholder = ( localize(6275, "Searching file system..."));
|
|
166
200
|
try {
|
|
167
201
|
const fileOptions = await this._createPromptPickItems(options, cts.token);
|
|
168
202
|
const activeItem = options.resource && fileOptions.find(
|
|
@@ -260,7 +294,7 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
260
294
|
if (locals.length) {
|
|
261
295
|
result.push({
|
|
262
296
|
type: "separator",
|
|
263
|
-
label: ( localize(
|
|
297
|
+
label: ( localize(6276, "Workspace"))
|
|
264
298
|
});
|
|
265
299
|
result.push(...sortByLabel(await Promise.all(( locals.map(l => this._createPromptPickItem(l, buttons, getVisibility(l), token))))));
|
|
266
300
|
}
|
|
@@ -283,7 +317,7 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
283
317
|
const agentButtons = buttons.filter(b => b !== RENAME_BUTTON);
|
|
284
318
|
result.push({
|
|
285
319
|
type: "separator",
|
|
286
|
-
label: ( localize(
|
|
320
|
+
label: ( localize(6277, "Agent Instructions"))
|
|
287
321
|
});
|
|
288
322
|
result.push(...sortByLabel(await Promise.all(( agentInstructionFiles.map(l => this._createPromptPickItem(l, agentButtons, getVisibility(l), token))))));
|
|
289
323
|
}
|
|
@@ -317,28 +351,44 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
317
351
|
if (users.length) {
|
|
318
352
|
result.push({
|
|
319
353
|
type: "separator",
|
|
320
|
-
label: ( localize(
|
|
354
|
+
label: ( localize(6278, "User Data"))
|
|
321
355
|
});
|
|
322
356
|
result.push(...sortByLabel(await Promise.all(( users.map(u => this._createPromptPickItem(u, buttons, getVisibility(u), token))))));
|
|
323
357
|
}
|
|
358
|
+
const plugins = await this._promptsService.listPromptFilesForStorage(options.type, PromptsStorage.plugin, token);
|
|
359
|
+
if (plugins.length) {
|
|
360
|
+
const pluginButtons = [];
|
|
361
|
+
if (options.optionCopy !== false) {
|
|
362
|
+
pluginButtons.push(COPY_BUTTON);
|
|
363
|
+
}
|
|
364
|
+
result.push({
|
|
365
|
+
type: "separator",
|
|
366
|
+
label: ( localize(6279, "Plugins"))
|
|
367
|
+
});
|
|
368
|
+
result.push(...sortByLabel(await Promise.all(( plugins.map(p => this._createPromptPickItem(p, pluginButtons, getVisibility(p), token))))));
|
|
369
|
+
}
|
|
324
370
|
return result;
|
|
325
371
|
}
|
|
326
372
|
_getExtensionGroupLabel(extPath) {
|
|
327
373
|
if (isOrganizationPromptFile(extPath.uri, extPath.extension.identifier, this._productService)) {
|
|
328
|
-
return localize(
|
|
374
|
+
return localize(6280, "Organization");
|
|
329
375
|
}
|
|
330
|
-
return localize(
|
|
376
|
+
return localize(6281, "Extensions");
|
|
331
377
|
}
|
|
332
378
|
_getNewItems(type) {
|
|
333
379
|
switch (type) {
|
|
334
380
|
case PromptsType.prompt:
|
|
335
|
-
return [NEW_PROMPT_FILE_OPTION];
|
|
381
|
+
return [NEW_PROMPT_FILE_OPTION, GENERATE_PROMPT_OPTION];
|
|
336
382
|
case PromptsType.instructions:
|
|
337
|
-
return [
|
|
383
|
+
return [
|
|
384
|
+
NEW_INSTRUCTIONS_FILE_OPTION,
|
|
385
|
+
GENERATE_ON_DEMAND_INSTRUCTIONS_OPTION,
|
|
386
|
+
GENERATE_AGENT_INSTRUCTIONS_OPTION
|
|
387
|
+
];
|
|
338
388
|
case PromptsType.agent:
|
|
339
|
-
return [NEW_AGENT_FILE_OPTION];
|
|
389
|
+
return [NEW_AGENT_FILE_OPTION, GENERATE_AGENT_OPTION];
|
|
340
390
|
case PromptsType.skill:
|
|
341
|
-
return [NEW_SKILL_FILE_OPTION];
|
|
391
|
+
return [NEW_SKILL_FILE_OPTION, GENERATE_SKILL_OPTION];
|
|
342
392
|
default:
|
|
343
393
|
throw ( new Error(`Unknown prompt type '${type}'.`));
|
|
344
394
|
}
|
|
@@ -360,12 +410,17 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
360
410
|
case PromptsStorage.user:
|
|
361
411
|
tooltip = undefined;
|
|
362
412
|
break;
|
|
413
|
+
case PromptsStorage.plugin:
|
|
414
|
+
tooltip = promptFile.name;
|
|
415
|
+
break;
|
|
416
|
+
default:
|
|
417
|
+
assertNever();
|
|
363
418
|
}
|
|
364
419
|
let iconClass;
|
|
365
420
|
if (visibility === false) {
|
|
366
421
|
buttons = (buttons ?? []).concat(MAKE_VISIBLE_BUTTON);
|
|
367
|
-
promptName = ( localize(
|
|
368
|
-
tooltip = ( localize(
|
|
422
|
+
promptName = ( localize(6282, "{0} (hidden)", promptName));
|
|
423
|
+
tooltip = ( localize(6283, "Hidden from chat view agent picker"));
|
|
369
424
|
} else if (visibility === true) {
|
|
370
425
|
buttons = (buttons ?? []).concat(MAKE_INVISIBLE_BUTTON);
|
|
371
426
|
}
|
|
@@ -433,7 +488,7 @@ let PromptFilePickers = class PromptFilePickers {
|
|
|
433
488
|
if (button === DELETE_BUTTON) {
|
|
434
489
|
return await this.keepQuickPickOpen(quickPick, async () => {
|
|
435
490
|
const filename = getCleanPromptName(value);
|
|
436
|
-
const message = ( localize(
|
|
491
|
+
const message = ( localize(6284, "Are you sure you want to delete '{0}'?", filename));
|
|
437
492
|
const {
|
|
438
493
|
confirmed
|
|
439
494
|
} = await this._dialogService.confirm({
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js
CHANGED
|
@@ -20,7 +20,7 @@ import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
20
20
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
21
21
|
import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariables.service';
|
|
22
22
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
23
|
-
import { ChatDynamicVariableModel } from '
|
|
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
|
|
|
26
26
|
var CopyAttachmentsProvider_1;
|
|
@@ -78,7 +78,7 @@ let PasteImageProvider = class PasteImageProvider {
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
const attachedVariables = widget.attachmentModel.attachments;
|
|
81
|
-
const displayName = ( localize(
|
|
81
|
+
const displayName = ( localize(6744, "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(
|
|
103
|
+
const edit = createCustomPasteEdit(model, [scaledImageContext], mimeType, this.kind, ( localize(6745, "Pasted Image Attachment")), this.chatWidgetService);
|
|
104
104
|
return createEditSession(edit);
|
|
105
105
|
}
|
|
106
106
|
};
|
|
@@ -219,7 +219,7 @@ let CopyAttachmentsProvider = class CopyAttachmentsProvider {
|
|
|
219
219
|
}
|
|
220
220
|
const edit = {
|
|
221
221
|
insertText: textdata,
|
|
222
|
-
title: ( localize(
|
|
222
|
+
title: ( localize(6746, "Insert Prompt & Attachments")),
|
|
223
223
|
kind: this.kind,
|
|
224
224
|
handledMimeType: CopyAttachmentsProvider_1.ATTACHMENT_MIME_TYPE,
|
|
225
225
|
additionalEdit: {
|
|
@@ -295,7 +295,7 @@ class PasteTextProvider {
|
|
|
295
295
|
if (( currentContextIds.has(copiedContext.id))) {
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
const edit = createCustomPasteEdit(model, [copiedContext], Mimes.text, this.kind, ( localize(
|
|
298
|
+
const edit = createCustomPasteEdit(model, [copiedContext], Mimes.text, this.kind, ( localize(6747, "Pasted Code Attachment")), this.chatWidgetService);
|
|
299
299
|
edit.yieldTo = [{
|
|
300
300
|
kind: HierarchicalKind.Empty.append("text", "plain")
|
|
301
301
|
}];
|
|
@@ -307,7 +307,7 @@ function getCopiedContext(code, file, language, range) {
|
|
|
307
307
|
const start = range.startLineNumber;
|
|
308
308
|
const end = range.endLineNumber;
|
|
309
309
|
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(
|
|
310
|
+
const pastedLines = start === end ? ( localize(6748, "1 line")) : ( localize(6749, "{0} lines", end + 1 - start));
|
|
311
311
|
return {
|
|
312
312
|
kind: "paste",
|
|
313
313
|
value: resultText,
|
|
@@ -329,7 +329,7 @@ function getCopiedContext(code, file, language, range) {
|
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
function createCustomPasteEdit(model, context, handledMimeType, kind, title, chatWidgetService) {
|
|
332
|
-
const label = context.length === 1 ? context[0].name : ( localize(
|
|
332
|
+
const label = context.length === 1 ? context[0].name : ( localize(6750, "{0} and {1} more", context[0].name, context.length - 1));
|
|
333
333
|
const customEdit = {
|
|
334
334
|
resource: model.uri,
|
|
335
335
|
variable: context,
|
|
@@ -44,10 +44,16 @@ export declare class PromptValidator {
|
|
|
44
44
|
private validateHandoffs;
|
|
45
45
|
private validateInfer;
|
|
46
46
|
private validateTarget;
|
|
47
|
+
private validateUserInvocable;
|
|
47
48
|
private validateUserInvokable;
|
|
48
49
|
private validateDisableModelInvocation;
|
|
49
50
|
private validateAgentsAttribute;
|
|
51
|
+
private validateGithubPermissions;
|
|
50
52
|
}
|
|
53
|
+
export declare const githubPermissionScopes: Record<string, {
|
|
54
|
+
allowedValues: string[];
|
|
55
|
+
description: string;
|
|
56
|
+
}>;
|
|
51
57
|
export declare function getValidAttributeNames(promptType: PromptsType, includeNonRecommended: boolean, target: Target): string[];
|
|
52
58
|
export declare function isNonRecommendedAttribute(attributeName: string): boolean;
|
|
53
59
|
export declare function getAttributeDescription(attributeName: string, promptType: PromptsType, target: Target): string | undefined;
|