Skip to content

Commit

Permalink
[config]: fix localization ID compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
legomushroom committed Jan 31, 2025
1 parent 0724e5a commit 5fcbdaf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/vs/workbench/contrib/chat/common/promptSyntax/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,14 @@ export namespace PromptFilesConfig {
return DEFAULT_LOCATION;
};

const localizationID = `${CONFIG_KEY}.config`;
const descriptionLocalizationID = `${localizationID}.description`;
const usageExample1 = nls.localize(
`${descriptionLocalizationID}.example1`,
`chat.promptFiles.config.description.example1`,
"Enable with the default location of the prompt files (`{0}`):\n{1}",
DEFAULT_LOCATION[0],
`\`\`\`json\n{\n "${CONFIG_KEY}": true,\n}\n\`\`\``,
);
const usageExample2 = nls.localize(
`${descriptionLocalizationID}.example2`,
`chat.promptFiles.config.description.example2`,
"Specify custom location(s) of the prompt files:\n{0}",
`\`\`\`json\n{\n "${CONFIG_KEY}": {\n ".github/prompts": true,\n "/Users/vscode/prompts": true,\n}\n\`\`\``,
);
Expand All @@ -234,7 +232,7 @@ export namespace PromptFilesConfig {
* Configuration setting description to use in the settings UI.
*/
export const CONFIG_DESCRIPTION = nls.localize(
descriptionLocalizationID,
'chat.promptFiles.config.description',
"Enable support for attaching reusable prompt files (`*{0}`) for Chat, Edits, and Inline Chat sessions. [Learn More]({1}).\n\nSet to `true` or use the `{ \"/path/to/folder\": boolean }` notation to specify a different path (or a couple of them). Relative paths are resolved from the root folder(s) of your workspace, and the default value of `{2}` is used if no other paths provided.\n### Examples\n{3}\n{4}",
PROMPT_SNIPPET_FILE_EXTENSION,
DOCUMENTATION_URL,
Expand All @@ -247,7 +245,7 @@ export namespace PromptFilesConfig {
* Configuration setting title to use in the settings UI.
*/
export const CONFIG_TITLE = nls.localize(
`${localizationID}.title`,
`chat.promptFiles.config.title`,
"Prompt Files",
);
}
Expand Down

0 comments on commit 5fcbdaf

Please sign in to comment.