✨ feat(vscode): 原型提示词改用通用技能,测试提示词带上合入判断
This commit is contained in:
1 parent
53b5a8021f
commit
12d9080248
5 files changed
+66
-4
No files matched your search
@@ -19,7 +19,7 @@ import { seedCommitProfilePath } from '../cc/commitProfile'
|
||||
import { listClaudeProfiles } from '../cc/profiles'
|
||||
import { normalizeReleasePrefix } from '../git/release'
|
||||
import { PREVIOUS_DEFAULT_REVIEW_PROMPT } from './previousReviewPrompt'
|
||||
import { planPromptMigration, planReviewPromptMigration } from './promptMigration'
|
||||
import { planDefaultPromptReplacement, planPromptMigration, planReviewPromptMigration, PREVIOUS_PROTOTYPE_PROMPTS } from './promptMigration'
|
||||
|
||||
/**
|
||||
* Fallback prompt strings used when the on-disk markdown can't be read.
|
||||
@@ -524,9 +524,17 @@ export function migratePromptTemplates(ctx: ExtensionContext): MigrationNote[] {
|
||||
PREVIOUS_DEFAULT_REVIEW_PROMPT,
|
||||
readDefaultPrompt(ctx.extensionPath, 'review'),
|
||||
)
|
||||
const blob = review
|
||||
let blob = review
|
||||
? { ...(planned.blob ?? stored), reviewPrompt: review.prompt }
|
||||
: planned.blob
|
||||
const prototype = planDefaultPromptReplacement(
|
||||
(blob ?? stored).prototypePrompt,
|
||||
PREVIOUS_PROTOTYPE_PROMPTS,
|
||||
readDefaultPrompt(ctx.extensionPath, 'prototype'),
|
||||
'原型提示词还是旧的 Figma 插件技能,已换成通用的 ui-prototyping',
|
||||
)
|
||||
if (prototype)
|
||||
blob = { ...(blob ?? stored), prototypePrompt: prototype.prompt }
|
||||
if (!blob)
|
||||
return []
|
||||
const out: MigrationNote[] = []
|
||||
@@ -548,6 +556,8 @@ export function migratePromptTemplates(ctx: ExtensionContext): MigrationNote[] {
|
||||
out.push(...planned.notes)
|
||||
if (review)
|
||||
out.push(...review.notes)
|
||||
if (prototype)
|
||||
out.push(...prototype.notes)
|
||||
if (planned.blob)
|
||||
out.push({ level: 'info', message: '提示词模板已迁到 Handlebars' })
|
||||
return out
|
||||
|
||||
Reference in new issue
Block a user