✨ feat(vscode): 自带提示词变了就问要不要换成新版
This commit is contained in:
1 parent
12d9080248
commit
38d06153bb
7 files changed
+138
-54
No files matched your search
@@ -237,31 +237,3 @@ export function planReviewPromptMigration(
|
||||
notes: [{ level: 'info', message: '审查提示词末尾已追加「审查结论」,其余段落未改' }],
|
||||
}
|
||||
}
|
||||
|
||||
/** 存的提示词和旧默认一样时,整段换成新默认。改过的不动。 */
|
||||
export function planDefaultPromptReplacement(
|
||||
stored: unknown,
|
||||
previousDefaults: string[],
|
||||
nextDefault: string,
|
||||
note: string,
|
||||
): { prompt: string, notes: MigrationNote[] } | null {
|
||||
if (typeof stored !== 'string' || stored.length === 0)
|
||||
return null
|
||||
const now = normalizePrompt(stored)
|
||||
const next = normalizePrompt(nextDefault)
|
||||
if (!next || now === next)
|
||||
return null
|
||||
if (!previousDefaults.some(prev => normalizePrompt(prev) === now))
|
||||
return null
|
||||
return {
|
||||
prompt: nextDefault.endsWith('\n') ? nextDefault : `${nextDefault}\n`,
|
||||
notes: [{ level: 'info', message: note }],
|
||||
}
|
||||
}
|
||||
|
||||
export const PREVIOUS_PROTOTYPE_PROMPTS = [
|
||||
'/ecc:figma-plugin-prototyping 给 {{issueNumber}} 号工单画原型:先读工单正文锁定要画的界面和状态,再写本地 Figma 插件把画板和点击流做出来。画完汇报插件路径和怎么导入,不要改业务代码。',
|
||||
`/ecc:figma-plugin-prototyping 给 {{issueNumber}} 号工单画原型:先读工单正文锁定要画的界面和状态,再写本地 Figma 插件把画板和点击流做出来。画完汇报插件路径和怎么导入,不要改业务代码。
|
||||
|
||||
画完用 \`opencli spx issue marker --issue {{issueNumber}} --type prototype --value <manifest.json 的仓库相对路径>\` 把原型插件挂到工单上,再汇报。`,
|
||||
]
|
||||
Reference in new issue
Block a user