feat(polish): 清晰结构改为两层层级 — 主题 1./2. + 要点 a./b.,去掉中间括号层

用户反馈:括号中间层("1)" "2)")多余,希望保留主题编号 + 字母要点的清爽结构。

变更:
- polish.rs Structured prompt:层级规则从 3 层改为 2 层;明确禁用带括号中间层;
  示例改为 "1. 主题 / a. 要点 / b. 要点 / 2. 主题 / ..."
- i18n style.modes.structured.sample(zh-CN / en):与新 prompt 输出格式同步

代价:极复杂的多级嵌套口述(如"登录页里的密码错与图形验证码")在 2 层结构下会
被压扁;复杂场景建议改用「原文」或「轻度润色」mode。
This commit is contained in:
baiqing committed 2026-04-30 12:34:55 +08:00
1 parent 72a86960ea
commit da7b426959
3 files changed
+11 -16

No files matched your search

+9 -14
View File
@@ -347,28 +347,23 @@ pub mod prompts {
PolishMode::Structured => "# 任务(清晰结构)\n\
把口述整理为脉络清晰、可直接用作 AI prompt 或工作文档的结构化文本。\n\
\n\
内容涉及 \u{2265}2 个主题、步骤或要求时,强制使用以下三层层级:\n\
- 第一层(大板块):行首用 \"1.\" \"2.\" \"3.\" \u{2026},每个大板块一行短标题;\n\
- 第二层(要点):在大板块下缩进 3 个空格,行首用 \"1)\" \"2)\" \"3)\" \u{2026},每条一句;\n\
- 第三层(细分项):必要时再缩进 3 个空格,行首用 \"a.\" \"b.\" \"c.\" \u{2026}。\n\
内容涉及 \u{2265}2 个主题、步骤或要求时,使用两层层级:\n\
- 第一层(主题):行首用 \"1.\" \"2.\" \"3.\" \u{2026},每个主题一行短标题;\n\
- 第二层(要点):另起一行,行首用 \"a.\" \"b.\" \"c.\" \u{2026},每条一句。\n\
\u{4E0D}使用带括号的中间层(如 \"1)\" \"2)\")。\n\
\n\
即使原文没有显式说\u{201C}第一/第二\u{201D},只要可以归并到 \u{2265}2 个主题,也要自动归类。\n\
单一简短主题 \u{2192} 直接输出连贯段落,\u{4E0D}硬塞层级。\n\
\n\
# 示例\n\
原:发布前要做几件事,第一是回归测试,要测登录页和支付页,登录页里测正常登录、密码错和图形验证码,支付页测信用卡和微信,第二是文档要更新,要改 README 和 changelog\n\
原:发布前要做几件事,第一是回归测试,要测登录页和支付页,第二是文档要更新,要改 README 和 changelog\n\
出:\n\
1. 回归测试\n\
1) 登录页\n\
a. 正常登录。\n\
b. 密码错误提示。\n\
c. 图形验证码刷新。\n\
2) 支付页\n\
a. 信用卡支付。\n\
b. 微信支付。\n\
a. 登录页。\n\
b. 支付页。\n\
2. 文档更新\n\
1) 更新 README。\n\
2) 更新 changelog。",
a. 更新 README。\n\
b. 更新 changelog。",
PolishMode::Formal => "# 任务(正式表达)\n\
输出适合工作沟通和邮件的正式表达。\n\
+1 -1
View File
@@ -141,7 +141,7 @@ export const en: typeof zhCN = {
modes: {
raw: { name: 'Raw', desc: 'Only adds punctuation and natural breaks — no rewriting or expansion.', sample: "Keeps spoken cadence; fillers like 'um' or 'you know' get dropped, but sentences stay intact." },
light: { name: 'Light polish', desc: 'Drops fillers, adds punctuation, and produces sendable natural prose.', sample: "Makes the transcript flow well without sounding scripted — your tone and habits remain." },
structured: { name: 'Structured', desc: 'Auto-organizes into a numbered outline when you cover several topics or steps.', sample: '1. Topic one\n 1) Point a\n 2) Point b\n2. Topic two\n 1) Point c' },
structured: { name: 'Structured', desc: 'Auto-organizes into a numbered outline when you cover several topics or steps.', sample: '1. Topic one\na. Point\nb. Point\n2. Topic two\na. Point\nb. Point' },
formal: { name: 'Formal', desc: 'Email and workplace tone — more complete, more professional.', sample: 'Detects greetings/sign-offs in email contexts; avoids empty pleasantries.' },
},
},
+1 -1
View File
@@ -139,7 +139,7 @@ export const zhCN = {
modes: {
raw: { name: '原文', desc: '只补标点和必要分句,不改写不扩写。', sample: '保留原始口语;嗯、那个等口癖会被去除,但不会重组语句。' },
light: { name: '轻度润色', desc: '去口癖、补标点,整理为可发送的自然文字。', sample: '让转写听起来不像念稿——保留语气和表达习惯,但行文流畅。' },
structured: { name: '清晰结构', desc: '多个主题或步骤时,自动组织为分点列表。', sample: '1. 主题一\n 1) 要点 a\n 2) 要点 b\n2. 主题二\n 1) 要点 c' },
structured: { name: '清晰结构', desc: '多个主题或步骤时,自动组织为分点列表。', sample: '1. 主题一\na. 要点\nb. 要点\n2. 主题二\na. 要点\nb. 要点' },
formal: { name: '正式表达', desc: '工作沟通和邮件场景,更专业更完整。', sample: '邮件场景自动识别问候 / 落款;不引入空泛客套。' },
},
},