@codingame/monaco-vscode-xterm-addons-common 26.1.0 → 26.1.2
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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +59 -35
- 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 +32 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +38 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1314 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-xterm-addons-common",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - common package depending on xterm addons",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "26.1.
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.1.2",
|
|
19
19
|
"@xterm/addon-clipboard": "0.3.0-beta.147",
|
|
20
20
|
"@xterm/addon-image": "0.10.0-beta.147",
|
|
21
21
|
"@xterm/addon-ligatures": "0.11.0-beta.147",
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js
CHANGED
|
@@ -23,8 +23,8 @@ class ManageInstructionsFilesAction extends Action2 {
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super({
|
|
25
25
|
id: CONFIGURE_INSTRUCTIONS_ACTION_ID,
|
|
26
|
-
title: ( localize2(
|
|
27
|
-
shortTitle: ( localize2(
|
|
26
|
+
title: ( localize2(5685, "Configure Instructions & Rules...")),
|
|
27
|
+
shortTitle: ( localize2(5686, "Instructions & Rules")),
|
|
28
28
|
icon: Codicon.bookmark,
|
|
29
29
|
f1: true,
|
|
30
30
|
precondition: ChatContextKeys.enabled,
|
|
@@ -41,7 +41,7 @@ class ManageInstructionsFilesAction extends Action2 {
|
|
|
41
41
|
const openerService = accessor.get(IOpenerService);
|
|
42
42
|
const instaService = accessor.get(IInstantiationService);
|
|
43
43
|
const pickers = instaService.createInstance(PromptFilePickers);
|
|
44
|
-
const placeholder = ( localize(
|
|
44
|
+
const placeholder = ( localize(5687, "Select the instructions file to open"));
|
|
45
45
|
const result = await pickers.selectPromptFile({
|
|
46
46
|
placeholder,
|
|
47
47
|
type: PromptsType.instructions,
|
|
@@ -59,7 +59,7 @@ let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
|
59
59
|
constructor(promptsService) {
|
|
60
60
|
this.promptsService = promptsService;
|
|
61
61
|
this.type = "pickerPick";
|
|
62
|
-
this.label = ( localize(
|
|
62
|
+
this.label = ( localize(5688, "Instructions..."));
|
|
63
63
|
this.icon = Codicon.bookmark;
|
|
64
64
|
this.commandId = ATTACH_INSTRUCTIONS_ACTION_ID;
|
|
65
65
|
}
|
|
@@ -89,10 +89,10 @@ let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
|
89
89
|
return result;
|
|
90
90
|
});
|
|
91
91
|
return {
|
|
92
|
-
placeholder: ( localize(
|
|
92
|
+
placeholder: ( localize(5689, "Select instructions files to attach")),
|
|
93
93
|
picks,
|
|
94
94
|
configure: {
|
|
95
|
-
label: ( localize(
|
|
95
|
+
label: ( localize(5690, "Configure Instructions...")),
|
|
96
96
|
commandId: CONFIGURE_INSTRUCTIONS_ACTION_ID
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -24,6 +24,8 @@ import { askForPromptFileName } from './pickers/askForPromptName.js';
|
|
|
24
24
|
import { askForPromptSourceFolder } from './pickers/askForPromptSourceFolder.js';
|
|
25
25
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
26
26
|
import { getCleanPromptName, SKILL_FILENAME } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
27
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
28
|
+
import { getTarget } from '../../common/promptSyntax/languageProviders/promptValidator.js';
|
|
27
29
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
28
30
|
|
|
29
31
|
class AbstractNewPromptFileAction extends Action2 {
|
|
@@ -70,7 +72,7 @@ class AbstractNewPromptFileAction extends Action2 {
|
|
|
70
72
|
if (editor && editor.hasModel() && isEqual(editor.getModel().uri, promptUri)) {
|
|
71
73
|
SnippetController2.get(editor)?.apply([{
|
|
72
74
|
range: editor.getModel().getFullModelRange(),
|
|
73
|
-
template: getDefaultContentSnippet(this.type, cleanName)
|
|
75
|
+
template: getDefaultContentSnippet(this.type, cleanName, getTarget(this.type, promptUri))
|
|
74
76
|
}]);
|
|
75
77
|
}
|
|
76
78
|
if (selectedFolder.storage !== "user") {
|
|
@@ -82,17 +84,17 @@ class AbstractNewPromptFileAction extends Action2 {
|
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
86
|
notificationService.prompt(Severity.Info, ( localize(
|
|
85
|
-
|
|
87
|
+
5718,
|
|
86
88
|
"Do you want to backup and sync your user prompt, instruction and custom agent files with Setting Sync?'"
|
|
87
89
|
)), [{
|
|
88
|
-
label: ( localize(
|
|
90
|
+
label: ( localize(5719, "Enable")),
|
|
89
91
|
run: () => {
|
|
90
92
|
commandService.executeCommand(CONFIGURE_SYNC_COMMAND_ID).catch(error => {
|
|
91
93
|
logService.error(`Failed to run '${CONFIGURE_SYNC_COMMAND_ID}' command: ${error}.`);
|
|
92
94
|
});
|
|
93
95
|
}
|
|
94
96
|
}, {
|
|
95
|
-
label: ( localize(
|
|
97
|
+
label: ( localize(5720, "Learn More")),
|
|
96
98
|
run: () => {
|
|
97
99
|
openerService.open(( URI.parse("https://aka.ms/vscode-settings-sync-help")));
|
|
98
100
|
}
|
|
@@ -104,7 +106,7 @@ class AbstractNewPromptFileAction extends Action2 {
|
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
function getDefaultContentSnippet(promptType, name) {
|
|
109
|
+
function getDefaultContentSnippet(promptType, name, target) {
|
|
108
110
|
switch (promptType) {
|
|
109
111
|
case PromptsType.prompt:
|
|
110
112
|
return [
|
|
@@ -115,23 +117,45 @@ function getDefaultContentSnippet(promptType, name) {
|
|
|
115
117
|
`\${3:Define the prompt content here. You can include instructions, examples, and any other relevant information to guide the AI's responses.}`
|
|
116
118
|
].join("\n");
|
|
117
119
|
case PromptsType.instructions:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
if (target === Target.Claude) {
|
|
121
|
+
return [
|
|
122
|
+
`---`,
|
|
123
|
+
`description: \${1:Describe when these instructions should be loaded}`,
|
|
124
|
+
`paths:`,
|
|
125
|
+
`. - "src/**/*.ts"`,
|
|
126
|
+
`---`,
|
|
127
|
+
`\${2:Provide coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.}`
|
|
128
|
+
].join("\n");
|
|
129
|
+
} else {
|
|
130
|
+
return [
|
|
131
|
+
`---`,
|
|
132
|
+
`description: \${1:Describe when these instructions should be loaded}`,
|
|
133
|
+
`# applyTo: '\${1|**,**/*.ts|}' # when provided, instructions will automatically be added to the request context when the pattern matches an attached file`,
|
|
134
|
+
`---`,
|
|
135
|
+
`\${2:Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.}`
|
|
136
|
+
].join("\n");
|
|
137
|
+
}
|
|
125
138
|
case PromptsType.agent:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
if (target === Target.Claude) {
|
|
140
|
+
return [
|
|
141
|
+
`---`,
|
|
142
|
+
`name: ${name ?? "${1:agent-name}"}`,
|
|
143
|
+
`description: \${2:Describe what this custom agent does and when to use it.}`,
|
|
144
|
+
`tools: Read, Grep, Glob, Bash # specify the tools this agent can use. If not set, all enabled tools are allowed.`,
|
|
145
|
+
`---`,
|
|
146
|
+
`\${4:Define what this custom agent does, including its behavior, capabilities, and any specific instructions for its operation.}`
|
|
147
|
+
].join("\n");
|
|
148
|
+
} else {
|
|
149
|
+
return [
|
|
150
|
+
`---`,
|
|
151
|
+
`name: ${name ?? "${1:agent-name}"}`,
|
|
152
|
+
`description: \${2:Describe what this custom agent does and when to use it.}`,
|
|
153
|
+
`argument-hint: \${3:The inputs this agent expects, e.g., "a task to implement" or "a question to answer".}`,
|
|
154
|
+
`# tools: ['vscode', 'execute', 'read', 'agent', 'edit', 'search', 'web', 'todo'] # specify the tools this agent can use. If not set, all enabled tools are allowed.`,
|
|
155
|
+
`---`,
|
|
156
|
+
`\${4:Define what this custom agent does, including its behavior, capabilities, and any specific instructions for its operation.}`
|
|
157
|
+
].join("\n");
|
|
158
|
+
}
|
|
135
159
|
case PromptsType.skill:
|
|
136
160
|
return [
|
|
137
161
|
`---`,
|
|
@@ -150,24 +174,24 @@ const NEW_AGENT_COMMAND_ID = "workbench.command.new.agent";
|
|
|
150
174
|
const NEW_SKILL_COMMAND_ID = "workbench.command.new.skill";
|
|
151
175
|
class NewPromptFileAction extends AbstractNewPromptFileAction {
|
|
152
176
|
constructor() {
|
|
153
|
-
super(NEW_PROMPT_COMMAND_ID, ( localize(
|
|
177
|
+
super(NEW_PROMPT_COMMAND_ID, ( localize(5721, "New Prompt File...")), PromptsType.prompt);
|
|
154
178
|
}
|
|
155
179
|
}
|
|
156
180
|
class NewInstructionsFileAction extends AbstractNewPromptFileAction {
|
|
157
181
|
constructor() {
|
|
158
|
-
super(NEW_INSTRUCTIONS_COMMAND_ID, ( localize(
|
|
182
|
+
super(NEW_INSTRUCTIONS_COMMAND_ID, ( localize(5722, "New Instructions File...")), PromptsType.instructions);
|
|
159
183
|
}
|
|
160
184
|
}
|
|
161
185
|
class NewAgentFileAction extends AbstractNewPromptFileAction {
|
|
162
186
|
constructor() {
|
|
163
|
-
super(NEW_AGENT_COMMAND_ID, ( localize(
|
|
187
|
+
super(NEW_AGENT_COMMAND_ID, ( localize(5723, "New Custom Agent...")), PromptsType.agent);
|
|
164
188
|
}
|
|
165
189
|
}
|
|
166
190
|
class NewSkillFileAction extends Action2 {
|
|
167
191
|
constructor() {
|
|
168
192
|
super({
|
|
169
193
|
id: NEW_SKILL_COMMAND_ID,
|
|
170
|
-
title: ( localize(
|
|
194
|
+
title: ( localize(5724, "New Skill File...")),
|
|
171
195
|
f1: false,
|
|
172
196
|
precondition: ChatContextKeys.enabled,
|
|
173
197
|
category: CHAT_CATEGORY,
|
|
@@ -192,29 +216,29 @@ class NewSkillFileAction extends Action2 {
|
|
|
192
216
|
}
|
|
193
217
|
const skillName = await quickInputService.input({
|
|
194
218
|
prompt: ( localize(
|
|
195
|
-
|
|
219
|
+
5725,
|
|
196
220
|
"Enter a name for the skill (lowercase letters, numbers, and hyphens only)"
|
|
197
221
|
)),
|
|
198
|
-
placeHolder: ( localize(
|
|
222
|
+
placeHolder: ( localize(5726, "e.g., pdf-processing, data-analysis")),
|
|
199
223
|
validateInput: async value => {
|
|
200
224
|
if (!value || !value.trim()) {
|
|
201
|
-
return localize(
|
|
225
|
+
return localize(5727, "Skill name is required");
|
|
202
226
|
}
|
|
203
227
|
const name = value.trim();
|
|
204
228
|
if (name.length > 64) {
|
|
205
|
-
return localize(
|
|
229
|
+
return localize(5728, "Skill name must be 64 characters or less");
|
|
206
230
|
}
|
|
207
231
|
if (!/^[a-z0-9-]+$/.test(name)) {
|
|
208
232
|
return localize(
|
|
209
|
-
|
|
233
|
+
5729,
|
|
210
234
|
"Skill name may only contain lowercase letters, numbers, and hyphens"
|
|
211
235
|
);
|
|
212
236
|
}
|
|
213
237
|
if (name.startsWith("-") || name.endsWith("-")) {
|
|
214
|
-
return localize(
|
|
238
|
+
return localize(5730, "Skill name must not start or end with a hyphen");
|
|
215
239
|
}
|
|
216
240
|
if (name.includes("--")) {
|
|
217
|
-
return localize(
|
|
241
|
+
return localize(5731, "Skill name must not contain consecutive hyphens");
|
|
218
242
|
}
|
|
219
243
|
return undefined;
|
|
220
244
|
}
|
|
@@ -232,7 +256,7 @@ class NewSkillFileAction extends Action2 {
|
|
|
232
256
|
if (editor && editor.hasModel() && isEqual(editor.getModel().uri, skillFileUri)) {
|
|
233
257
|
SnippetController2.get(editor)?.apply([{
|
|
234
258
|
range: editor.getModel().getFullModelRange(),
|
|
235
|
-
template: getDefaultContentSnippet(PromptsType.skill, trimmedName)
|
|
259
|
+
template: getDefaultContentSnippet(PromptsType.skill, trimmedName, Target.Undefined)
|
|
236
260
|
}]);
|
|
237
261
|
}
|
|
238
262
|
}
|
|
@@ -241,7 +265,7 @@ class NewUntitledPromptFileAction extends Action2 {
|
|
|
241
265
|
constructor() {
|
|
242
266
|
super({
|
|
243
267
|
id: "workbench.command.new.untitled.prompt",
|
|
244
|
-
title: ( localize2(
|
|
268
|
+
title: ( localize2(5732, "New Untitled Prompt File")),
|
|
245
269
|
f1: true,
|
|
246
270
|
precondition: ChatContextKeys.enabled,
|
|
247
271
|
category: CHAT_CATEGORY,
|
|
@@ -265,7 +289,7 @@ class NewUntitledPromptFileAction extends Action2 {
|
|
|
265
289
|
if (editor && editor.hasModel()) {
|
|
266
290
|
SnippetController2.get(editor)?.apply([{
|
|
267
291
|
range: editor.getModel().getFullModelRange(),
|
|
268
|
-
template: getDefaultContentSnippet(type, undefined)
|
|
292
|
+
template: getDefaultContentSnippet(type, undefined, Target.Undefined)
|
|
269
293
|
}]);
|
|
270
294
|
}
|
|
271
295
|
return input;
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js
CHANGED
|
@@ -23,20 +23,20 @@ async function askForPromptFileName(accessor, type, selectedFolder, existingFile
|
|
|
23
23
|
const fileName = sanitizeInput(value);
|
|
24
24
|
if (!fileName) {
|
|
25
25
|
return {
|
|
26
|
-
content: ( localize(
|
|
26
|
+
content: ( localize(5733, "Please enter a name.")),
|
|
27
27
|
severity: Severity.Warning
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
if (!isValidBasename(fileName)) {
|
|
31
31
|
return {
|
|
32
|
-
content: ( localize(
|
|
32
|
+
content: ( localize(5734, "The name contains invalid characters.")),
|
|
33
33
|
severity: Severity.Error
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
const fileUri = URI.joinPath(selectedFolder, fileName);
|
|
37
37
|
if (await fileService.exists(fileUri)) {
|
|
38
38
|
return {
|
|
39
|
-
content: ( localize(
|
|
39
|
+
content: ( localize(5735, "A file for the given name already exists.")),
|
|
40
40
|
severity: Severity.Error
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -56,11 +56,11 @@ async function askForPromptFileName(accessor, type, selectedFolder, existingFile
|
|
|
56
56
|
function getPlaceholderStringForNew(type) {
|
|
57
57
|
switch (type) {
|
|
58
58
|
case PromptsType.instructions:
|
|
59
|
-
return localize(
|
|
59
|
+
return localize(5736, "Enter the name of the instructions file");
|
|
60
60
|
case PromptsType.prompt:
|
|
61
|
-
return localize(
|
|
61
|
+
return localize(5737, "Enter the name of the prompt file");
|
|
62
62
|
case PromptsType.agent:
|
|
63
|
-
return localize(
|
|
63
|
+
return localize(5738, "Enter the name of the agent file");
|
|
64
64
|
default:
|
|
65
65
|
throw ( new Error("Unknown prompt type"));
|
|
66
66
|
}
|
|
@@ -68,11 +68,11 @@ function getPlaceholderStringForNew(type) {
|
|
|
68
68
|
function getPlaceholderStringForRename(type) {
|
|
69
69
|
switch (type) {
|
|
70
70
|
case PromptsType.instructions:
|
|
71
|
-
return localize(
|
|
71
|
+
return localize(5739, "Enter a new name of the instructions file");
|
|
72
72
|
case PromptsType.prompt:
|
|
73
|
-
return localize(
|
|
73
|
+
return localize(5740, "Enter a new name of the prompt file");
|
|
74
74
|
case PromptsType.agent:
|
|
75
|
-
return localize(
|
|
75
|
+
return localize(5741, "Enter a new name of the agent file");
|
|
76
76
|
default:
|
|
77
77
|
throw ( new Error("Unknown prompt type"));
|
|
78
78
|
}
|
|
@@ -27,7 +27,7 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
|
|
|
27
27
|
};
|
|
28
28
|
const foldersList = ( folders.map(folder => {
|
|
29
29
|
const uri = folder.uri;
|
|
30
|
-
const detail = (existingFolder && isEqual(uri, existingFolder)) ? ( localize(
|
|
30
|
+
const detail = (existingFolder && isEqual(uri, existingFolder)) ? ( localize(5742, "Current Location")) : undefined;
|
|
31
31
|
if (folder.storage !== PromptsStorage.local) {
|
|
32
32
|
return {
|
|
33
33
|
type: "item",
|
|
@@ -55,7 +55,7 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
|
|
|
55
55
|
}
|
|
56
56
|
return {
|
|
57
57
|
type: "item",
|
|
58
|
-
label: ( localize(
|
|
58
|
+
label: ( localize(5743, "Current Workspace")),
|
|
59
59
|
detail,
|
|
60
60
|
tooltip: labelService.getUriLabel(uri),
|
|
61
61
|
folder
|
|
@@ -70,13 +70,15 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
|
|
|
70
70
|
function getPlaceholderStringforNew(type) {
|
|
71
71
|
switch (type) {
|
|
72
72
|
case PromptsType.instructions:
|
|
73
|
-
return localize(
|
|
73
|
+
return localize(5744, "Select a location to create the instructions file");
|
|
74
74
|
case PromptsType.prompt:
|
|
75
|
-
return localize(
|
|
75
|
+
return localize(5745, "Select a location to create the prompt file");
|
|
76
76
|
case PromptsType.agent:
|
|
77
|
-
return localize(
|
|
77
|
+
return localize(5746, "Select a location to create the agent file");
|
|
78
78
|
case PromptsType.skill:
|
|
79
|
-
return localize(
|
|
79
|
+
return localize(5747, "Select a location to create the skill");
|
|
80
|
+
case PromptsType.hook:
|
|
81
|
+
return localize(5748, "Select a location to create the hook file");
|
|
80
82
|
default:
|
|
81
83
|
throw ( new Error("Unknown prompt type"));
|
|
82
84
|
}
|
|
@@ -85,26 +87,30 @@ function getPlaceholderStringforMove(type, isMove) {
|
|
|
85
87
|
if (isMove) {
|
|
86
88
|
switch (type) {
|
|
87
89
|
case PromptsType.instructions:
|
|
88
|
-
return localize(
|
|
90
|
+
return localize(5749, "Select a location to move the instructions file to");
|
|
89
91
|
case PromptsType.prompt:
|
|
90
|
-
return localize(
|
|
92
|
+
return localize(5750, "Select a location to move the prompt file to");
|
|
91
93
|
case PromptsType.agent:
|
|
92
|
-
return localize(
|
|
94
|
+
return localize(5751, "Select a location to move the agent file to");
|
|
93
95
|
case PromptsType.skill:
|
|
94
|
-
return localize(
|
|
96
|
+
return localize(5752, "Select a location to move the skill to");
|
|
97
|
+
case PromptsType.hook:
|
|
98
|
+
throw ( new Error("Hooks cannot be moved"));
|
|
95
99
|
default:
|
|
96
100
|
throw ( new Error("Unknown prompt type"));
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
switch (type) {
|
|
100
104
|
case PromptsType.instructions:
|
|
101
|
-
return localize(
|
|
105
|
+
return localize(5753, "Select a location to copy the instructions file to");
|
|
102
106
|
case PromptsType.prompt:
|
|
103
|
-
return localize(
|
|
107
|
+
return localize(5754, "Select a location to copy the prompt file to");
|
|
104
108
|
case PromptsType.agent:
|
|
105
|
-
return localize(
|
|
109
|
+
return localize(5755, "Select a location to copy the agent file to");
|
|
106
110
|
case PromptsType.skill:
|
|
107
|
-
return localize(
|
|
111
|
+
return localize(5756, "Select a location to copy the skill to");
|
|
112
|
+
case PromptsType.hook:
|
|
113
|
+
throw ( new Error("Hooks cannot be copied"));
|
|
108
114
|
default:
|
|
109
115
|
throw ( new Error("Unknown prompt type"));
|
|
110
116
|
}
|
|
@@ -130,13 +136,15 @@ async function showNoFoldersDialog(accessor, type) {
|
|
|
130
136
|
function getLearnLabel(type) {
|
|
131
137
|
switch (type) {
|
|
132
138
|
case PromptsType.prompt:
|
|
133
|
-
return localize(
|
|
139
|
+
return localize(5757, "Learn how to configure reusable prompts");
|
|
134
140
|
case PromptsType.instructions:
|
|
135
|
-
return localize(
|
|
141
|
+
return localize(5758, "Learn how to configure reusable instructions");
|
|
136
142
|
case PromptsType.agent:
|
|
137
|
-
return localize(
|
|
143
|
+
return localize(5759, "Learn how to configure custom agents");
|
|
138
144
|
case PromptsType.skill:
|
|
139
|
-
return localize(
|
|
145
|
+
return localize(5760, "Learn how to configure skills");
|
|
146
|
+
case PromptsType.hook:
|
|
147
|
+
return localize(5761, "Learn how to configure hooks");
|
|
140
148
|
default:
|
|
141
149
|
throw ( new Error("Unknown prompt type"));
|
|
142
150
|
}
|
|
@@ -144,13 +152,15 @@ function getLearnLabel(type) {
|
|
|
144
152
|
function getMissingSourceFolderString(type) {
|
|
145
153
|
switch (type) {
|
|
146
154
|
case PromptsType.instructions:
|
|
147
|
-
return localize(
|
|
155
|
+
return localize(5762, "No instruction source folders found.");
|
|
148
156
|
case PromptsType.prompt:
|
|
149
|
-
return localize(
|
|
157
|
+
return localize(5763, "No prompt source folders found.");
|
|
150
158
|
case PromptsType.agent:
|
|
151
|
-
return localize(
|
|
159
|
+
return localize(5764, "No agent source folders found.");
|
|
152
160
|
case PromptsType.skill:
|
|
153
|
-
return localize(
|
|
161
|
+
return localize(5765, "No skill source folders found.");
|
|
162
|
+
case PromptsType.hook:
|
|
163
|
+
return localize(5766, "No hook source folders found.");
|
|
154
164
|
default:
|
|
155
165
|
throw ( new Error("Unknown prompt type"));
|
|
156
166
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { IKeyMods } from "@codingame/monaco-vscode-api/vscode/vs/platform/quicki
|
|
|
9
9
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
10
10
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
11
11
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
12
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
13
12
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
14
13
|
/**
|
|
15
14
|
* Options for the {@link askToSelectInstructions} function.
|
|
@@ -52,9 +51,8 @@ export declare class PromptFilePickers {
|
|
|
52
51
|
private readonly _instaService;
|
|
53
52
|
private readonly _promptsService;
|
|
54
53
|
private readonly _labelService;
|
|
55
|
-
private readonly _configurationService;
|
|
56
54
|
private readonly _productService;
|
|
57
|
-
constructor(_quickInputService: IQuickInputService, _openerService: IOpenerService, _fileService: IFileService, _dialogService: IDialogService, _commandService: ICommandService, _instaService: IInstantiationService, _promptsService: IPromptsService, _labelService: ILabelService,
|
|
55
|
+
constructor(_quickInputService: IQuickInputService, _openerService: IOpenerService, _fileService: IFileService, _dialogService: IDialogService, _commandService: ICommandService, _instaService: IInstantiationService, _promptsService: IPromptsService, _labelService: ILabelService, _productService: IProductService);
|
|
58
56
|
/**
|
|
59
57
|
* Shows the prompt file selection dialog to the user that allows to run a prompt file(s).
|
|
60
58
|
*
|