From da7b426959ec13d268afae7babd0d783192d44e9 Mon Sep 17 00:00:00 2001 From: baiqing Date: Thu, 30 Apr 2026 12:34:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(polish):=20=E6=B8=85=E6=99=B0=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E6=94=B9=E4=B8=BA=E4=B8=A4=E5=B1=82=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=20=E2=80=94=20=E4=B8=BB=E9=A2=98=201./2.=20+=20=E8=A6=81?= =?UTF-8?q?=E7=82=B9=20a./b.=EF=BC=8C=E5=8E=BB=E6=8E=89=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E6=8B=AC=E5=8F=B7=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户反馈:括号中间层("1)" "2)")多余,希望保留主题编号 + 字母要点的清爽结构。 变更: - polish.rs Structured prompt:层级规则从 3 层改为 2 层;明确禁用带括号中间层; 示例改为 "1. 主题 / a. 要点 / b. 要点 / 2. 主题 / ..." - i18n style.modes.structured.sample(zh-CN / en):与新 prompt 输出格式同步 代价:极复杂的多级嵌套口述(如"登录页里的密码错与图形验证码")在 2 层结构下会 被压扁;复杂场景建议改用「原文」或「轻度润色」mode。 --- openless-all/app/src-tauri/src/polish.rs | 23 +++++++++-------------- openless-all/app/src/i18n/en.ts | 2 +- openless-all/app/src/i18n/zh-CN.ts | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/openless-all/app/src-tauri/src/polish.rs b/openless-all/app/src-tauri/src/polish.rs index 456b04f0..3297f6c1 100644 --- a/openless-all/app/src-tauri/src/polish.rs +++ b/openless-all/app/src-tauri/src/polish.rs @@ -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\ diff --git a/openless-all/app/src/i18n/en.ts b/openless-all/app/src/i18n/en.ts index 7d9061bf..826e4a2f 100644 --- a/openless-all/app/src/i18n/en.ts +++ b/openless-all/app/src/i18n/en.ts @@ -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.' }, }, }, diff --git a/openless-all/app/src/i18n/zh-CN.ts b/openless-all/app/src/i18n/zh-CN.ts index eee47765..a8b92296 100644 --- a/openless-all/app/src/i18n/zh-CN.ts +++ b/openless-all/app/src/i18n/zh-CN.ts @@ -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: '邮件场景自动识别问候 / 落款;不引入空泛客套。' }, }, },