mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
add prompt and instructions template, create prompt files empty (#247326)
This commit is contained in:
committed by
GitHub
parent
692bb22057
commit
4c87d311f0
@@ -67,7 +67,17 @@
|
||||
"editor.unicodeHighlight.invisibleCharacters": false,
|
||||
"diffEditor.ignoreTrimWhitespace": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"snippets": [
|
||||
{
|
||||
"language": "prompt",
|
||||
"path": "./snippets/prompt.code-snippets"
|
||||
},
|
||||
{
|
||||
"language": "instructions",
|
||||
"path": "./snippets/instructions.code-snippets"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {},
|
||||
"repository": {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"fileTemplate": {
|
||||
"prefix": "New Chat Instructions",
|
||||
"body": [
|
||||
"${1:instructions}",
|
||||
],
|
||||
"description": "Template for chat instructions",
|
||||
"isFileTemplate": true,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"fileTemplate": {
|
||||
"prefix": "New Chat Prompt",
|
||||
"body": [
|
||||
"---",
|
||||
"mode: '${1|ask,edit,agent|}'",
|
||||
"---",
|
||||
"${2:prompt}",
|
||||
],
|
||||
"description": "Template for chat prompt",
|
||||
"isFileTemplate": true,
|
||||
}
|
||||
}
|
||||
+1
-10
@@ -73,19 +73,10 @@ const command = async (
|
||||
return;
|
||||
}
|
||||
|
||||
const content = (type === 'instructions')
|
||||
? localize(
|
||||
'workbench.command.instructions.create.initial-content',
|
||||
"Add instructions...",
|
||||
)
|
||||
: localize(
|
||||
'workbench.command.prompt.create.initial-content',
|
||||
"Add prompt contents...",
|
||||
);
|
||||
const promptUri = await createPromptFile({
|
||||
fileName,
|
||||
folder: selectedFolder.uri,
|
||||
content,
|
||||
content: '',
|
||||
fileService,
|
||||
openerService,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user