mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 17:32:58 +02:00
refactor: remove unused readability optimization prompts and update related localization keys
This commit is contained in:
@@ -839,14 +839,6 @@
|
||||
"listeners.panel.dataListener.createDataFile.noFileName": "No filename provided.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.noActiveArticle": "No active article found.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.noArticleContent": "No article content found.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.intro": "You are helping me improve readability for this markdown article.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.objective.sentence": "Optimize the article to reduce average words per sentence by splitting overly long sentences.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.objective.word": "Optimize the article to reduce average syllables per word by replacing complex words with simpler alternatives.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.preserve": "Preserve meaning, markdown structure, links, code blocks, and front matter unchanged.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.return": "Return revised markdown body suggestions and explain key edits.",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.file": "File: {0}",
|
||||
"listeners.panel.dataListener.copilotOptimizeReadability.prompt.content": "Content:",
|
||||
|
||||
"listeners.panel.taxonomyListener.aiSuggestTaxonomy.noEditor.error": "No active editor",
|
||||
"listeners.panel.taxonomyListener.aiSuggestTaxonomy.noData.error": "No article data",
|
||||
|
||||
|
||||
@@ -173,23 +173,14 @@ export class DataListener extends BaseListener {
|
||||
|
||||
const objective =
|
||||
type === 'sentence'
|
||||
? l10n.t(
|
||||
LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptObjectiveSentence
|
||||
)
|
||||
: l10n.t(
|
||||
LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptObjectiveWord
|
||||
);
|
||||
? `Optimize the article to reduce average words per sentence by splitting overly long sentences.`
|
||||
: `Optimize the article to reduce average syllables per word by replacing complex words with simpler alternatives.`;
|
||||
|
||||
const prompt = [
|
||||
l10n.t(LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptIntro),
|
||||
`You are helping me improve readability for this article.`,
|
||||
objective,
|
||||
l10n.t(LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptPreserve),
|
||||
l10n.t(LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptReturn),
|
||||
l10n.t(
|
||||
LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptFile,
|
||||
articlePath
|
||||
),
|
||||
l10n.t(LocalizationKey.listenersPanelDataListenerCopilotOptimizeReadabilityPromptContent)
|
||||
`Preserve meaning, markdown structure, links, code blocks, and front matter unchanged.`,
|
||||
`Return revised markdown body suggestions and explain key edits.`
|
||||
].join('\n\n');
|
||||
|
||||
try {
|
||||
|
||||
@@ -2800,34 +2800,6 @@ export enum LocalizationKey {
|
||||
* No article content found.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityNoArticleContent = 'listeners.panel.dataListener.copilotOptimizeReadability.noArticleContent',
|
||||
/**
|
||||
* You are helping me improve readability for this markdown article.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptIntro = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.intro',
|
||||
/**
|
||||
* Optimize the article to reduce average words per sentence by splitting overly long sentences.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptObjectiveSentence = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.objective.sentence',
|
||||
/**
|
||||
* Optimize the article to reduce average syllables per word by replacing complex words with simpler alternatives.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptObjectiveWord = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.objective.word',
|
||||
/**
|
||||
* Preserve meaning, markdown structure, links, code blocks, and front matter unchanged.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptPreserve = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.preserve',
|
||||
/**
|
||||
* Return revised markdown body suggestions and explain key edits.
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptReturn = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.return',
|
||||
/**
|
||||
* File: {0}
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptFile = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.file',
|
||||
/**
|
||||
* Content:
|
||||
*/
|
||||
listenersPanelDataListenerCopilotOptimizeReadabilityPromptContent = 'listeners.panel.dataListener.copilotOptimizeReadability.prompt.content',
|
||||
/**
|
||||
* No active editor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user