@sendevia/pi-ask-author 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/texts.d.ts CHANGED
@@ -1,492 +1,291 @@
1
1
  /**
2
2
  * @file texts.ts
3
- * @description 布局常量、终端图标、小说语法模板表与全局双向文案字典的单一来源,禁止各层直接书写文案字面量
3
+ * @description 全局双向文案字典的组装点:LLM 面协议常量与当前系统语言的作者面文案在此汇合
4
4
  *
5
5
  * 核心架构特性:
6
- * - 全插件唯一文案来源:任何可见字符串均必须经由本模块获取数值,其余各层只做获取数值、组合与排版
7
- * - `LAYOUT_CONFIG` / `ICONS` / `MAX_*` 集中声明可调参数与强制上限,便于统一调整参数与验证边界
8
- * - `NOVEL_TEMPLATES` 以「定界符 → 语义哨兵 → 原生 Markdown 载体 → 主题样式」单表声明小说语法,新增语法只需在表尾追加一项
9
- * - `TEXTS` 按受众严格分区,LLM 面恒为英文,作者面恒为中文,两侧文案不得互相渗透
6
+ * - 作者可见文案一律来自 `lang/*.json`,LLM 面文案来自 `llm-texts.ts`;本文件只做装载、组合与派生,不新增字面量
7
+ * - 派生函数(多选模式标签、确认按钮明细与标签)集中在此,避免组件层与排版层各自拼接
8
+ * - 语言探测与模板编译在 `i18n.ts` 完成,语言资源键集合以 `en_US` 为规范
10
9
  *
11
- * 分区导航(与文件自上而下的顺序一致):终端呈现常量 → 载荷上限 → 小说语法资产 → 共享排版字面量 → 文案字典 `TEXTS`
12
- * 受众划分:`tool`(`label` 除外)/ `schema` / `markdown` 面向 LLM,唯一非英文片段为封套定界符 `【】`;`tool.label` / `command` / `common` / `tabs` / `view` / `menu` / `editor` / `status` / `help` / `summary` / `card` / `fallbacks` 面向作者
13
- *
14
- * 依赖方向:texts.ts → theme.ts(仅类型);作为叶层被 format / schema / model / novel-markdown / view-rows / view-summary / component / index 消费,禁止任何反向导入
10
+ * 依赖方向:texts.ts → layout.ts / llm-texts.ts / i18n.ts;作为作者面文案的装配点被 schema / model / novel-markdown / view-* / tool-* / component / index 消费
15
11
  */
16
- import type { Theme } from "./theme.js";
17
- /** TUI 视图几何、分栏与滚动行为配置(数值项均标注单位 ms / cols / lines;分隔线条目为字符文本,不带单位) */
18
- export declare const LAYOUT_CONFIG: {
19
- /** 双栏中间分隔符文本 */
20
- readonly dividerChar: " │ ";
21
- /** 外层框架分割线字符(双横线) */
22
- readonly dividerThick: "═";
23
- /** 内部内容分割线字符(单横线) */
24
- readonly dividerThin: "─";
25
- /** 中间分隔符可见宽度 (cols) */
26
- readonly dividerWidth: 3;
27
- /** 左栏最大可见宽度 (cols) */
28
- readonly leftColMax: 46;
29
- /** 左栏最小可见宽度 (cols) */
30
- readonly leftColMin: 30;
31
- /** 宽屏双栏下左栏占视口比例 */
32
- readonly leftColRatio: 0.42;
33
- /** 触发宽屏双栏的终端最小列宽 (cols) */
34
- readonly splitViewMinWidth: 72;
35
- /** 预览区单次翻页滚动行数 (lines) */
36
- readonly previewScrollStep: 3;
37
- /** 窄屏单栏折叠预览区最大可见行数 (lines) */
38
- readonly singlePreviewHeight: 7;
39
- /** 宽屏双栏右侧预览区最大可见行数 (lines) */
40
- readonly splitPreviewHeight: 14;
41
- /** 总览页单页最大内容行数 (lines) */
42
- readonly summaryPageSize: 16;
43
- /** 总览页单次滚动步长 (lines) */
44
- readonly summaryScrollStep: 3;
45
- /** 菜单每页最大可见选项数 (项) */
46
- readonly visibleOptionCount: 7;
47
- /** 底部状态通知停留时长 (ms) */
48
- readonly statusDurationMs: 3000;
49
- };
50
- /** Nerd Font 状态与操作语义图标字典(按语义分区排列;四个选择指示符自带 1 空格尾随填充以拉开与标签的间距) */
51
- export declare const ICONS: {
52
- /** 取消 / 中止 */
53
- readonly cancel: "󰜺";
54
- /** 完成与确认(结果卡片与总览页完成态) */
55
- readonly check: "󰄬";
56
- /** 题目已完成 */
57
- readonly checked: "󰐾";
58
- /** 题目未完成 */
59
- readonly unchecked: "󰄰";
60
- /** 失败 */
61
- readonly error: "󰅚";
62
- /** 补充说明 */
63
- readonly note: "󰷬";
64
- /** 菜单行首聚焦指示 */
65
- readonly cursor: "";
66
- /** 列表与总览页向上方向提示 */
67
- readonly scrollUp: "";
68
- /** 列表与总览页向下方向提示 */
69
- readonly scrollDown: "";
70
- /** 多选已勾选(方括号复选框样式) */
71
- readonly checkedMulti: "[󰄬] ";
72
- /** 多选未勾选(方括号复选框样式) */
73
- readonly uncheckedMulti: "[ ] ";
74
- /** 单选已选中(圆括号圆钮样式) */
75
- readonly checkedSingle: "(•) ";
76
- /** 单选未选中(圆括号圆钮样式) */
77
- readonly uncheckedSingle: "( ) ";
78
- };
79
- /** 单题最大选项数上限(项;同时约束 `schema.ts` 的 `options.maxItems`(批量与平铺两处)与 `sanitize.ts` 的选项截断) */
80
- export declare const MAX_OPTIONS = 30;
81
- /** 单份问卷最大题目数上限(题;同时约束 `schema.ts` 的 `questions.maxItems` 与 `sanitize.ts` 的题目截断) */
82
- export declare const MAX_QUESTIONS = 20;
83
12
  /**
84
- * 语义哨兵前缀:不可见 NUL 控制字符,仅存在于 transform 产出与 `theme.code` 消费之间的中间态
85
- * 约定:输入侧已在 `format.ts` 边界剥离,分类时立即剥离,绝不进入终端输出
13
+ * 渲染多选模式标签(形如 `[多选 可不选 至多3项]` / `[Multi, optional, up to 3]`)
14
+ * @param min - 模型收敛后的最小勾选数(区间 `0 ~ optionCount`)
15
+ * @param max - 模型收敛后的最大勾选数(区间 `min ~ optionCount`)
16
+ * @param optionCount - 本题候选选项数
17
+ * @param allowEmpty - 是否允许零勾选提交
18
+ * @returns `min > 1` 时标注强制下限;`min === 0` 或 `allowEmpty` 时标注可不选;`max` 小于选项总数时追加上限标注,等于总数则视为无额外上限而省略
19
+ */
20
+ declare const modeMultiLabel: (min: number, max: number, optionCount: number, allowEmpty: boolean) => string;
21
+ /**
22
+ * 渲染多选确认按钮的已选计数明细
23
+ * @param selectedCount - 已选数
24
+ * @param minSelect - 本题下限
25
+ * @returns 未达下限时呈现为 `已选 n/min 项`,否则呈现为 `已选 n 项`
86
26
  */
87
- export declare const NOVEL_MARKER_PREFIX = "\0";
88
- /** 小说语法模板的字段规范(定界符 → 语义哨兵 → 原生 Markdown 载体 → 主题样式) */
89
- export interface NovelSyntaxTemplate {
90
- /** 开始定界符 */
91
- readonly opener: string;
92
- /** 结束定界符 */
93
- readonly closer: string;
94
- /** 语义哨兵字符(紧随 {@link NOVEL_MARKER_PREFIX} 之后,`theme.code` 分类依据;`d` = dialogue、`m` = monologue) */
95
- readonly marker: string;
96
- /** 单个语义跨距最大字符数(含定界符;超出视为残缺定界符并放弃高亮) */
97
- readonly maxSpanLength: number;
98
- /**
99
- * 依据当前主题绘制语义文本
100
- * @param theme - 当前 TUI 主题实例(类型定义于叶层 `theme.ts`)
101
- * @param text - 已剥离哨兵的语义原文(含定界符)
102
- * @returns 应用语义样式后的富文本
103
- */
104
- readonly paint: (theme: Theme, text: string) => string;
105
- }
106
- /** 开定界符 → 语法模板 的 `O(1)` 索引(同开定界符按声明顺序后者覆盖前者) */
107
- export declare const NOVEL_TEMPLATE_BY_OPENER: ReadonlyMap<string, NovelSyntaxTemplate>;
108
- /** 语义哨兵字符 → 语法模板 的 `O(1)` 索引(`theme.code` 分类依据) */
109
- export declare const NOVEL_TEMPLATE_BY_MARKER: ReadonlyMap<string, NovelSyntaxTemplate>;
110
- /** 全局双向文案字典:统一定义面向大模型 (LLM) 的提示词规范与面向用户 (TUI) 的界面文案 */
27
+ declare const confirmDetailMulti: (selectedCount: number, minSelect: number) => string;
28
+ /**
29
+ * 渲染确认本题按钮标签
30
+ * @param detail - 已选计数明细(取自 `confirmDetailMulti`)
31
+ * @param hasNote - 是否已填写题目补充说明
32
+ * @returns 形如 `󰄬 确认本题 (已选 2 项 + 补充说明)`
33
+ */
34
+ declare const confirmLabel: (detail: string, hasNote: boolean) => string;
35
+ /** 全局双向文案字典:LLM 面固定英文协议常量,作者面取自当前系统语言对应的语言文件 */
111
36
  export declare const TEXTS: {
112
- /** 工具注册元数据:`name` / `description` / `promptSnippet` / `promptGuidelines` 面向 LLM(英文高信噪比),`label` 面向作者(TUI 工具行中文名) */
37
+ /** 工具注册元数据:`name` / `description` / `promptSnippet` / `promptGuidelines` 面向 LLM(英文高信噪比),`label` 面向作者(TUI 工具行标题) */
113
38
  readonly tool: {
114
- /** 工具调用名(LLM 协议标识,注册为 `ask_author`;不出现在作者界面) */
115
39
  readonly name: "ask_author";
116
- /** 工具展示名(作者端中文,经 `index.ts` 渲染为会话调用卡片标题) */
117
- readonly label: "向作者请示";
118
- /** 工具说明(LLM 端英文;业务能力概要与调用场景) */
119
- readonly description: "Consult the author on novel creative decisions, plot branches, scene drafting, or story settings. Supports single and batched questions with plot deductions and draft previews.";
120
- /** `Available tools` 区块单行条目(LLM 端英文;动词引导,无句末标点,缺省则工具不进入该区块) */
121
- readonly promptSnippet: "Consult author on novel creative decisions, plot branches, scene drafting, or story settings";
122
- /**
123
- * `Guidelines` 区块附加条目(LLM 端英文;分类标签前缀 + 行为要求)
124
- * 约定:宿主把条目扁平追加进 `Guidelines` 且不加工具名前缀,故每条首词必须显式点名 `ask_author`
125
- */
126
- readonly promptGuidelines: readonly ["Invoke ask_author DIRECTLY without conversational preambles or greetings whenever author confirmation is needed for plot, characters, scenes, branches, or settings.", "ask_author modes: Always provide a concise formTitle. Use flat mode (formTitle + question + options) for single decisions, or the questions array for batch consultations. Batch interrelated decisions into one ask_author call; never make consecutive single-question calls.", "ask_author payload minimization: Strictly omit optional fields (id, description, minSelect, maxSelect, allowEmpty, allowCustom, customPlaceholder) when using default behavior. Never output auto-generated IDs or default boolean flags.", "ask_author option quality: Provide clear, descriptive labels summarizing the core action (never generic placeholders like 'Option A'). Include cause-and-effect plot deductions in description, and draft excerpts or dialogue in preview when helpful.", "ask_author multi-select & notes: Set multiSelect: true only when choices are not mutually exclusive. The author can always submit free-form notes alongside choices (both per-question and per-option).", "ask_author draft directives: Confirmed draft previews are automatically condensed into single-line directives in the ask_author result to guide subsequent story drafting.", "ask_author envelopes: [Author Decision Cancelled] means do not proceed with the discarded decision; [Author Consultation Error] means fix the arguments and retry once, then continue without the confirmation if it fails again."];
40
+ readonly description: "Ask the author to decide between concrete narrative options in an interactive terminal form. Handles a single question or a batch, optional draft previews, author notes, conditional questions, and live follow-up questions generated while the author answers.";
41
+ readonly promptSnippet: "Ask the author to pick narrative directions in a terminal form";
42
+ readonly promptGuidelines: readonly ["ask_author: Use it when the author must choose a plot branch, character action, scene direction, or setting; do not ask the same question in chat first.", "ask_author: Prefer one call over several: flat mode (formTitle + question + options) for a single decision, the questions array for related decisions.", "ask_author: Write option labels as concrete actions, put consequences in description, and add preview only when a Markdown draft or storyboard helps the choice.", "ask_author: Give a short formTitle and a tabLabel for every long question title; omit fields that use defaults.", "ask_author: Add a question id only when a showIf or expansion.insert.after refers to it; showIf may only point at an earlier question's option label or answered.", 'ask_author: Pass expansion when follow-up decisions depend on the answers: declare only the first question and let the same model add questions and options on each confirmation; expansion.insert picks "follow" (default), "tail", or {"after":"question_id"}.', "ask_author: The author can multi-select, add notes, and edit drafts; confirmed drafts return as [Draft directive: ...] lines. Treat [Author Decision Cancelled] as no decision, and [Author Consultation Error] as a request to fix the arguments once."];
43
+ readonly label: string;
127
44
  };
128
- /** LLM 端 TypeBox 字段描述字典(单句浓缩英文,仅声明语义、必要性与省略规则;数量约束来自 {@link MAX_OPTIONS} / {@link MAX_QUESTIONS} 插值) */
45
+ /** LLM 端 TypeBox 字段描述字典 */
129
46
  readonly schema: {
130
- /** 选项标签(必须填写;要求简明动作导向,禁止占位式命名) */
131
- readonly optionLabel: "Concise, descriptive label summarizing the action or choice";
132
- /** 选项情节推演(可选;作者端渲染为「情节设定推演」预览面板) */
133
- readonly optionDesc: "Plot consequences, rationale, or deduction (optional)";
134
- /** 选项草稿预览(可选;作者端渲染为「正文草稿/分镜头试撰写」预览面板) */
135
- readonly optionPreview: "Draft prose excerpt or scene storyboard preview (optional, Markdown)";
136
- /** 选项批注占位符(可选;作者端作为选项补充说明编辑器的输入框占位文本) */
137
- readonly optionCustomPlaceholder: "Placeholder text for option note input (optional)";
138
- /** 题目 ID(可选;供批量模式与返回封套稳定引用) */
139
- readonly questionId: "Question identifier (optional, omit unless needed)";
140
- /** 题目标题(必须填写;作者端呈现为 Tab 标签与题头) */
141
- readonly questionTitle: "Question title (e.g., 'Choose the next route')";
142
- /** 题目背景说明(可选;作者端呈现为题头下方的上下文行) */
143
- readonly questionDesc: "Context or background for this question (optional)";
144
- /** 多选开关(可选;默认 false,开启后作者端展示多选模式标签与方框勾选指示符) */
47
+ readonly optionLabel: "Concrete action or choice label";
48
+ readonly optionDesc: "Consequences or rationale (optional)";
49
+ readonly optionPreview: "Markdown draft or storyboard for this option (optional)";
50
+ readonly optionCustomPlaceholder: "Placeholder for the author's note on this option (optional)";
51
+ readonly optionShowIf: "Show only if an earlier answer matches; array means all must hold (optional)";
52
+ readonly questionId: "Id referenced by showIf and expansion.insert.after (optional)";
53
+ readonly questionTitle: "Question text";
54
+ readonly questionTabLabel: "Short tab label (default: Q<index>)";
55
+ readonly questionDesc: "Context shown under the question (optional)";
145
56
  readonly questionMultiSelect: "Allow multiple selections (default false)";
146
- /** 最小勾选数(可选;默认 1,仅多选生效,作者端据此标注强制下限) */
147
- readonly questionMinSelect: "Minimum selections required (default 1)";
148
- /** 最大勾选数(可选;默认全部选项,仅多选生效,小于选项总数时作者端追加上限标注) */
149
- readonly questionMaxSelect: "Maximum selections allowed (default: all options)";
150
- /** 零勾选提交开关(可选;默认 false,仅多选生效,开启后作者端标注可不选) */
151
- readonly questionAllowEmpty: "Allow submitting with zero selections (default false)";
152
- /** 候选选项列表(必须填写;1~{@link MAX_OPTIONS} 项;建议 2~10 项) */
153
- readonly questionOptions: "Candidate options (1-30, 2-10 recommended)";
154
- /** 自由批注开关(可选;默认 true,开启后作者端可额外提交非选项文本) */
155
- readonly questionAllowCustom: "Allow author free-form custom notes (default true)";
156
- /** 作者批注占位符(可选;作者端作为题目补充说明编辑器的输入框占位文本) */
157
- readonly questionCustomPlaceholder: "Placeholder text for author note input (optional)";
158
- /** 问卷标题(必须填写;作者端呈现为卡片标题与总览页标题) */
159
- readonly formTitle: "Concise title describing the overall consultation task";
160
- /** 问卷背景(可选;作者端呈现为问卷级上下文) */
161
- readonly formDesc: "Overall context or background for the consultation (optional)";
162
- /** 批量模式题目数组(可选;1~{@link MAX_QUESTIONS} 题;与平铺单题模式互斥) */
163
- readonly formQuestions: "Batched related questions (1-20); batch interrelated decisions into one call instead of consecutive single-question calls";
164
- /** 平铺模式的题目标题(可选;与批量模式的 `questionTitle` 同义) */
165
- readonly formSingleQuestion: "Question title for flat single-question mode";
166
- /** 平铺单题模式字段描述的统一区分前缀(LLM 端英文,`schema.ts` 逐字段拼接) */
57
+ readonly questionMinSelect: "Minimum selections, multi-select only (default 1)";
58
+ readonly questionMaxSelect: "Maximum selections, multi-select only (default: all options)";
59
+ readonly questionAllowEmpty: "Allow submitting without a selection (default false)";
60
+ readonly questionOptions: "Options (1-30, 2-10 recommended)";
61
+ readonly questionAllowCustom: "Allow author notes (default true)";
62
+ readonly questionCustomPlaceholder: "Placeholder for the author's note (optional)";
63
+ readonly questionShowIf: "Show only if an earlier answer matches; array means all must hold (optional)";
64
+ readonly conditionQuestionId: "Earlier question id";
65
+ readonly conditionOption: "Option label of that question that activates the condition";
66
+ readonly conditionAnswered: "Any answer (default true) or no answer (false); ignored when option is set";
67
+ readonly formTitle: "Short title for the consultation";
68
+ readonly formDesc: "Overall context (optional)";
69
+ readonly formQuestions: "Questions (1-20); batch related decisions in one call";
70
+ readonly formSingleQuestion: "Question for flat mode";
167
71
  readonly flatPrefix: "(Flat single-question mode only) ";
168
- /** 平铺模式候选选项列表(可选;1~{@link MAX_OPTIONS} 项;建议 2~10 项) */
169
- readonly flatQuestionOptions: "Candidate options for flat single-question mode (1-30, 2-10 recommended)";
72
+ readonly flatQuestionOptions: "Options for flat mode (1-30, 2-10 recommended)";
73
+ readonly expansion: "Generate follow-up questions and options while the author answers; insert controls where they land (optional)";
74
+ readonly expansionMaxQuestions: "Question cap including declared ones (default 20)";
75
+ readonly expansionGuidance: "Standing hint for what the expansion should probe (optional)";
76
+ readonly expansionInsert: '"follow" (default, after the answered question), "tail" (end of the form), or {"after":"question_id"} (optional)';
77
+ readonly expansionInsertAfter: "Declared question id to insert after";
170
78
  };
171
- /**
172
- * LLM 端返回封套与纠正指令模板(全英文确定性结构,提升 Prompt Cache 命中率)
173
- *
174
- * 约定:首行方括号封套令牌 `[Author Decision Finalized]` / `[Author Decision Cancelled]` / `[Author Consultation Error]`;行内令牌 `[Author note: …]` / `[Draft directive: …]`;选项标签定界符 `【】`
175
- * 语言归属:`【】` 是本区段唯一的非英文片段,`model.ts` 的 `sanitizeEnvelopeText` 剥离作者文本中的 `【】` 并把 ASCII `;` 归一为全角 `;`,插值文本无法击穿上述定界符
176
- */
79
+ /** 实时推演协议(系统提示词、用户消息前缀与诊断文案) */
80
+ readonly expansion: {
81
+ readonly systemPrompt: `You extend an interactive author decision form while the author answers it.
82
+
83
+ Input JSON: formTitle, formDescription, guidance, insert, maxAdditionalQuestions, questions (with ids), answers (selected labels and notes).
84
+
85
+ Return JSON only:
86
+ {"questions":[{"id":"unique_id","title":"...","description":"...","options":[{"label":"...","description":"..."}]}],"options":[{"questionId":"existing_id","options":[{"label":"..."}]}]}
87
+
88
+ Rules:
89
+ - Add at most maxAdditionalQuestions questions; fewer is better.
90
+ - New questions may also set multiSelect, minSelect, maxSelect, allowEmpty; every option needs a label.
91
+ - Add options to a declared question only when the answers reveal a choice it cannot express; use its id and unused labels.
92
+ - Give new questions unique ids and 2-6 concrete options; put consequences in description.
93
+ - Never repeat a declared question or a declared label.
94
+ - showIf takes {"questionId":"id","option":"label"} or {"questionId":"id","answered":true} and may only reference a question above the insertion point or one of your earlier new questions.
95
+ - Reply {"questions":[],"options":[]} when the answers already determine the next step.
96
+ - No prose, no code fences, no trailing commas.`;
97
+ readonly userPreamble: "Extend this author decision form. Input JSON:";
98
+ readonly errors: {
99
+ readonly noModel: "no model is available for live expansion";
100
+ readonly aborted: "live expansion was aborted";
101
+ readonly providerFailed: "the expansion request failed";
102
+ readonly invalidReply: "the expansion reply was not a JSON object";
103
+ };
104
+ };
105
+ /** LLM 端返回封套与纠正指令模板 */
177
106
  readonly markdown: {
178
- /** 完成封套首行标识(固定英文令牌,恒为返回正文第一行) */
179
107
  readonly envelopePrefix: "[Author Decision Finalized]";
180
- /** 完成封套收尾指令(固定英文单行,驱动下游正文写作与大纲更新) */
181
- readonly envelopeSuffix: "Execute workflow and writing strictly according to the author decisions and draft directives above without conversational acknowledgments.";
182
- /** 取消封套(固定两行:标识行 + 禁止沿用被丢弃决策的英文处置指令) */
183
- readonly envelopeCancelled: "[Author Decision Cancelled]\nThe author cancelled the consultation. Do not proceed with the discarded decision; propose next steps or ask for clarification in chat.";
184
- /**
185
- * 构建错误封套(固定三行:标识行 + 原因行 + 指引行)
186
- * @param reason - 面向 LLM 的英文失败原因(取自 `errorReasons`)
187
- * @param guidance - 面向 LLM 的英文纠正指引(取自 `errorGuidances`)
188
- */
108
+ readonly envelopeSuffix: "Proceed with the author decisions and draft directives above without conversational acknowledgment.";
109
+ readonly envelopeCancelled: "[Author Decision Cancelled]\nThe author cancelled. Do not proceed with the discarded decision; propose next steps or ask for clarification.";
189
110
  readonly envelopeError: (reason: string, guidance: string) => string;
190
- /** 错误封套原因行字典(英文单句,按失败路径枚举) */
191
111
  readonly errorReasons: {
192
- /** 非交互式终端环境无法启动 TUI(对应作者端 {@link TEXTS.status.errorNonTui}) */
193
- readonly nonTui: "Interactive TUI is unavailable in the current execution mode.";
194
- /** 入参无有效题目或选项(对应作者端 {@link TEXTS.status.errorNoQuestions}) */
195
- readonly noQuestions: "No valid questions or options were provided in arguments.";
196
- /** 构建执行期异常的原因行(`details` 为宿主异常摘要,对应作者端 {@link TEXTS.status.errorExecutionFailed}) */
112
+ readonly nonTui: "Interactive TUI is unavailable in the current mode.";
113
+ readonly noQuestions: "No questions or options were provided.";
197
114
  readonly runtimeError: (details: string) => string;
115
+ readonly invalidCondition: (details: string) => string;
116
+ readonly expansionUnavailable: "Live expansion was requested but no model is available in this session.";
198
117
  };
199
- /** 错误封套纠正指引行字典(英文单句,与 `errorReasons` 一一对应) */
200
118
  readonly errorGuidances: {
201
- /** `nonTui` 的纠正指引 */
202
- readonly nonTui: "Proceed using defaults or ask user via standard chat/message if crucial.";
203
- /** `noQuestions` 的纠正指引 */
119
+ readonly nonTui: "Use defaults, or ask the user in chat if the decision is crucial.";
204
120
  readonly noQuestions: "Provide at least one question with concrete options.";
205
- /** `runtimeError` 的纠正指引 */
206
- readonly runtimeError: "Check arguments format and retry with valid questions and options.";
121
+ readonly runtimeError: "Check the arguments and retry with valid questions and options.";
122
+ readonly invalidCondition: "Reference an earlier question id plus one of its option labels, use answered, or point expansion.insert.after at a declared question id.";
123
+ readonly expansionUnavailable: "Drop the expansion field and declare the questions directly, or retry in a session with a model selected.";
124
+ };
125
+ readonly adaptiveErrors: {
126
+ readonly unknownQuestion: (questionId: string) => string;
127
+ readonly forwardQuestion: (questionId: string) => string;
128
+ readonly unknownOption: (questionId: string, option: string) => string;
129
+ readonly unknownInsertAnchor: (questionId: string) => string;
207
130
  };
208
- /** 空答卷封套正文(作者未作答时的英文处置指令,位于首尾标识之间) */
209
- readonly envelopeEmpty: "Author submitted the form without any answers. Proceed with your defaults, or ask a follow-up question in chat if the decision is crucial.";
210
- /** 单题无任何作答(未勾选且无批注)时的英文占位正文 */
211
- readonly noSelection: "(No selection; author skipped this question)";
212
- /** 行内批注令牌左定界符(尾随 1 空格,与 `noteSuffix` 成对) */
131
+ readonly envelopeEmpty: "The author submitted no answers. Use your defaults, or ask a follow-up if the decision is crucial.";
132
+ readonly noSelection: "(No selection; the author skipped this question)";
213
133
  readonly notePrefix: "[Author note: ";
214
- /** 行内批注令牌右定界符 */
215
134
  readonly noteSuffix: "]";
216
- /** 分镜头草稿指令令牌左定界符(尾随 1 空格,与 `draftDirectiveSuffix` 成对) */
217
135
  readonly draftDirectivePrefix: "[Draft directive: ";
218
- /** 分镜头草稿指令令牌右定界符 */
219
136
  readonly draftDirectiveSuffix: "]";
220
- /** 构建封套单题作答行(`index` 为 1-based 题号,`title` 为题目标题,`body` 为单行正文) */
221
137
  readonly answerLine: (index: number, title: string, body: string) => string;
222
- /** 同一作答行内多个片段(选项推演 / 批注令牌 / 草稿指令)的分隔符(纯 ASCII;作者文本中的 `;` 已在 `sanitizeEnvelopeText` 归一为全角 `;` 消除歧义) */
223
138
  readonly partSeparator: "; ";
224
- /** 正文草稿 / 分镜头草稿压缩为单行指令时的分镜头片段分隔符(LLM 端纯 ASCII) */
225
139
  readonly draftSegmentSeparator: " / ";
226
- /**
227
- * 构建带情节推演的选项片段:`【标签】推演 [Author note: …] [Draft directive: …]`
228
- * @param label - 选项标签原文(调用方已过 `sanitizeEnvelopeText`)
229
- * @param desc - 选项情节推演 / 设定阐述(调用方已过 `sanitizeEnvelopeText`)
230
- * @param draftDirective - 已包装的 `[Draft directive: …]` 令牌(可选,非原文)
231
- * @param note - 已包装的 `[Author note: …]` 令牌(可选,非原文)
232
- * @returns 输出顺序恒为「标签 → 推演 → 批注 → 草稿指令」,与形参顺序不同处在于批注先于草稿
233
- */
234
140
  readonly optionWithDesc: (label: string, desc: string, draftDirective?: string, note?: string) => string;
235
- /**
236
- * 构建无情节推演的选项片段:`【标签】[Author note: …] [Draft directive: …]`
237
- * @param label - 选项标签原文(调用方已过 `sanitizeEnvelopeText`)
238
- * @param draftDirective - 已包装的 `[Draft directive: …]` 令牌(可选,非原文)
239
- * @param note - 已包装的 `[Author note: …]` 令牌(可选,非原文)
240
- * @returns 输出顺序恒为「标签 → 批注 → 草稿指令」,与形参顺序不同处在于批注先于草稿
241
- */
242
141
  readonly optionWithoutDesc: (label: string, draftDirective?: string, note?: string) => string;
243
- /**
244
- * 构建未选中选项上的孤立批注片段(英文前缀 + 标签 + 批注令牌)
245
- * @param label - 选项标签原文(调用方已过 `sanitizeEnvelopeText`)
246
- * @param note - 已包装的 `[Author note: …]` 令牌(非原文)
247
- */
248
142
  readonly unselectedOptionNote: (label: string, note: string) => string;
249
- /** 生成题目标题的英文占位(`index` 为 1-based 题号;仅封套编译期替换 `fallbacks.autoQuestionTitle` 与 `fallbacks.defaultQuestionTitle`,作者界面保留中文占位) */
250
143
  readonly fallbackQuestionTitle: (index: number) => string;
251
- /** 生成选项标签的英文占位(`index` 为 1-based 选项序号;仅封套编译期替换 `fallbacks.autoOptionLabel` / `fallbacks.unnamedOptionLabel` / `fallbacks.defaultOptionLabel`,作者界面保留中文占位) */
252
144
  readonly fallbackOptionLabel: (index: number) => string;
253
145
  };
254
146
  /** `/ask-author` 辅助命令的注册元数据与作者可见提示文案 */
255
147
  readonly command: {
256
- /** 命令名(注册为 `ask-author`,作者输入 `/ask-author` 触发) */
257
- readonly name: "ask-author";
258
- /** 命令说明(命令面板与补全列表展示) */
259
- readonly description: "查看 ask_author 创作请示工具说明";
260
- /** 命令执行后的提示通知(引导作者改用自然语言指示 AI 调用工具) */
261
- readonly notify: "在提示词中指示 AI 调用 ask_author,即可向您请示创作决策";
148
+ readonly name: string;
149
+ readonly description: string;
150
+ readonly notify: string;
262
151
  };
263
152
  /** 跨视图共享的通用排版片段(枚举分隔符、列表条目前缀与按键帮助分隔符) */
264
153
  readonly common: {
265
- /** 选项标签并列展示时的中文枚举分隔符(总览页与结果卡片共用) */
266
- readonly optionSeparator: "、";
267
- /** 列表条目统一前缀(作者端圆点标记;卡片行与预览面板提示行的唯一字面量来源) */
268
- readonly bulletPrefix: "• ";
269
- /** 底部按键帮助行各片段之间的分隔符 */
270
- readonly helpSeparator: " • ";
154
+ readonly optionSeparator: string;
155
+ readonly bulletPrefix: string;
156
+ readonly helpSeparator: string;
271
157
  };
272
158
  /** Tab 导航栏标签文案(各题目页与答卷提交页) */
273
159
  readonly tabs: {
274
- /** 渲染题目页标签(`index` 为 1-based 题号) */
275
- readonly questionTab: (index: number) => string;
276
- /** 答卷提交页标签(末尾固定页,前面附带完成徽标) */
277
- readonly submitTab: "󰄬 提交答卷";
160
+ readonly questionTab: (...args: Array<string | number>) => string;
161
+ readonly expansionPlaceholder: string;
162
+ readonly submitTab: string;
278
163
  };
279
- /** 作答视图与预览面板的结构化文案(题目标签、补充横幅、滚动信息与 Markdown 区块构建器,按界面渲染顺序排列) */
164
+ /** 作答视图与预览面板的结构化文案(`modeMulti` 由多选模式片段组合而成) */
280
165
  readonly view: {
281
- /** 单选模式标签 */
282
- readonly modeSingle: "[单选]";
283
- /**
284
- * 按勾选数量上下限渲染多选模式标签(形如 `[多选 可不选 至多3项]`)
285
- * @param min - 模型收敛后的最小勾选数(区间 `0 ~ optionCount`)
286
- * @param max - 模型收敛后的最大勾选数(区间 `min ~ optionCount`)
287
- * @param optionCount - 本题候选选项数
288
- * @param allowEmpty - 是否允许零勾选提交
289
- * @returns `min > 1` 时标注强制下限;`min === 0` 或 `allowEmpty` 时标注可不选;`max` 小于选项总数时追加上限标注,等于总数则视为无额外上限而省略
290
- */
291
- readonly modeMulti: (min: number, max: number, optionCount: number, allowEmpty: boolean) => string;
292
- /** 渲染题目级补充说明横幅(`text` 为补充说明原文,位于题头下方) */
293
- readonly attachedNoteBanner: (text: string) => string;
294
- /** 渲染选项级补充说明横幅(`label` 为选项标签,位于对应选项行下方) */
295
- readonly optionAttachedNoteBanner: (label: string, text: string) => string;
296
- /** 渲染列表上方剩余项数提示(`count` 为剩余项数) */
297
- readonly listTopMore: (count: number) => string;
298
- /** 渲染列表下方剩余项数提示(`count` 为剩余项数) */
299
- readonly listBottomMore: (count: number) => string;
300
- /** 选项补充说明面板标题 */
301
- readonly optionNotePanelTitle: "选项补充说明";
302
- /** 选项情节推演面板标题 */
303
- readonly storyDescriptionPanelTitle: "情节设定推演";
304
- /** 选项正文草稿 / 分镜头面板标题 */
305
- readonly storyDraftPanelTitle: "正文草稿/分镜头试撰写";
306
- /** 题目补充说明面板标题 */
307
- readonly customNotePanelTitle: "题目补充说明";
308
- /** 确认入口的按键说明面板标题 */
309
- readonly confirmPanelTitle: "操作说明";
310
- /** 已填写的题目补充说明字段标签(下方接说明原文) */
311
- readonly customNotePanelCurrent: "当前填写内容:";
312
- /** 渲染草稿预览的行区间与滚动提示(`start` / `end` / `total` 均为 1-based 行号与总行数) */
313
- readonly previewScrollInfo: (start: number, end: number, total: number) => string;
314
- /** 草稿预览缺省占位(无内容可预览时) */
315
- readonly previewNoDraft: "(无内容预览)";
316
- /** 题目补充说明面板的按键提示行集合 */
317
- readonly customNotePanelTips: readonly ["• 随时按「N」或选择此项按「Enter」填写/修改本题补充说明", "• 按「x」清空本题补充说明", "• 补充说明将随所选选项及选项专属补充说明一并提交给 AI 助手"];
318
- /** 确认面板的按键提示行集合 */
319
- readonly confirmPanelTips: readonly ["• 按 `Enter` 确认本题并前往下一题", "• 最后一题确认后自动进入总览提交页"];
320
- /** 构建预览面板 Markdown 三级小节标题(`title` 为小节标题原文) */
321
- readonly sectionTitle: (title: string) => string;
322
- /** 构建预览面板 Markdown bold 字段标签(`label` 为字段标签原文) */
323
- readonly fieldLabel: (label: string) => string;
324
- /** 构建预览面板 Markdown 斜体提示行(`text` 为提示行原文) */
325
- readonly italicLine: (text: string) => string;
166
+ readonly modeSingle: string;
167
+ readonly conditionalBadge: string;
168
+ readonly expansionBadge: string;
169
+ readonly expansionPendingHint: string;
170
+ readonly modeMultiAtLeast: (...args: Array<string | number>) => string;
171
+ readonly modeMultiOptional: (...args: Array<string | number>) => string;
172
+ readonly modeMultiUnconstrained: (...args: Array<string | number>) => string;
173
+ readonly modeMultiMaxPart: (...args: Array<string | number>) => string;
174
+ readonly attachedNoteBanner: (...args: Array<string | number>) => string;
175
+ readonly optionAttachedNoteBanner: (...args: Array<string | number>) => string;
176
+ readonly listTopMore: (...args: Array<string | number>) => string;
177
+ readonly listBottomMore: (...args: Array<string | number>) => string;
178
+ readonly optionNotePanelTitle: string;
179
+ readonly storyDescriptionPanelTitle: string;
180
+ readonly storyDraftPanelTitle: string;
181
+ readonly customNotePanelTitle: string;
182
+ readonly confirmPanelTitle: string;
183
+ readonly previewScrollInfo: (...args: Array<string | number>) => string;
184
+ readonly previewNoDraft: string;
185
+ readonly customNotePanelTips: readonly string[];
186
+ readonly confirmPanelTips: readonly string[];
187
+ readonly sectionTitle: (...args: Array<string | number>) => string;
188
+ readonly italicLine: (...args: Array<string | number>) => string;
189
+ readonly modeMulti: typeof modeMultiLabel;
326
190
  };
327
- /** 题目菜单条目文案(补充说明入口与确认推进按钮) */
191
+ /** 题目菜单条目文案(`confirmDetailMulti` / `confirmLabel` 由已选数片段组合而成) */
328
192
  readonly menu: {
329
- /** 补充说明入口标签(未填写态) */
330
- readonly customNoteLabel: "󰷬 题目补充说明";
331
- /** 补充说明入口标签(已填写态) */
332
- readonly customNoteLabelFilled: "󰷬 题目补充说明 (已填写)";
333
- /** 渲染多选确认按钮的已选计数明细(`selectedCount` 为已选数,`minSelect` 为下限;未达下限时呈现为 `已选 n/min`) */
334
- readonly confirmDetailMulti: (selectedCount: number, minSelect: number) => string;
335
- /** 渲染确认本题按钮标签(`detail` 取自 `confirmDetailMulti`,空串时不显示括号;`hasNote` 为真时追加补充标记) */
336
- readonly confirmLabel: (detail: string, hasNote: boolean) => string;
337
- /** 确认按钮的下方说明(声明确认后的跳转目标) */
338
- readonly confirmDesc: "确认并前往下一题或总览页";
193
+ readonly customNoteLabel: string;
194
+ readonly customNoteLabelFilled: string;
195
+ readonly confirmDetailMultiBelowMin: (...args: Array<string | number>) => string;
196
+ readonly confirmNoteSuffix: string;
197
+ readonly confirmDesc: string;
198
+ readonly confirmDetailMulti: typeof confirmDetailMulti;
199
+ readonly confirmLabel: typeof confirmLabel;
339
200
  };
340
201
  /** 全屏补充说明编辑器的标题与页脚按键帮助文案 */
341
202
  readonly editor: {
342
- /** 渲染题目补充说明编辑器标题(`questionTitle` 为题目标题) */
343
- readonly title: (questionTitle: string) => string;
344
- /** 渲染选项补充说明编辑器标题(`optionLabel` 为选项标签,`questionTitle` 为题目标题) */
345
- readonly optionTitle: (questionTitle: string, optionLabel: string) => string;
346
- /** 编辑器页脚按键帮助(保存与取消) */
347
- readonly footerHelp: " [Enter] 保存并返回 • [Esc/Ctrl+C] 取消";
203
+ readonly title: (...args: Array<string | number>) => string;
204
+ readonly optionTitle: (...args: Array<string | number>) => string;
205
+ readonly footerHelp: string;
348
206
  };
349
207
  /** 底部临时状态栏通知(操作结果、阻断原因与阻断后的纠正操作路径) */
350
208
  readonly status: {
351
- /** 题目补充说明已保存 */
352
- readonly questionNoteSaved: "已保存本题补充说明";
353
- /** 题目补充说明已清空 */
354
- readonly noteCleared: "已清空本题补充说明";
355
- /** 提示选项批注已保存(`label` 为选项标签;该选项已勾选) */
356
- readonly optionNoteSaved: (label: string) => string;
357
- /** 提示选项批注已保存但该选项未勾选(`label` 为选项标签;批注仅作批注提交) */
358
- readonly optionNoteSavedUnselected: (label: string) => string;
359
- /** 提示已达批注选项数量上限(`max` 为上限值,批注保留但该选项不再勾选) */
360
- readonly optionNoteSavedAtLimit: (max: number) => string;
361
- /** 提示选项批注已清空(`label` 为选项标签) */
362
- readonly optionNoteCleared: (label: string) => string;
363
- /** 提示单选已达上限(`limit` 为本题勾选上限;再次勾选被拒) */
364
- readonly selectedUpToLimit: (limit: number) => string;
365
- /** 提示多选已达上限(`max` 为本题勾选上限;引导取消已选项后重选) */
366
- readonly maxSelectExceeded: (max: number) => string;
367
- /** 提示多选未达下限(`min` 为本题勾选下限;引导继续勾选或改用补充说明) */
368
- readonly minSelectRequired: (min: number) => string;
369
- /** 提交时本题仍无任何作答:并列给出两条通过路径 */
370
- readonly pleaseAnswerBeforeSubmit: "本题未完成:请按「空格/Enter」选定选项,或按「n/N」填写补充说明";
371
- /** 编辑器放弃修改的二次确认(首次 Esc/Ctrl+C 触发) */
372
- readonly editorDiscardConfirm: "再次按 Esc/Ctrl+C 放弃修改(未保存内容将丢失),继续输入可撤销";
373
- /** 非交互式终端环境无法启动交互界面(与 `markdown.errorReasons.nonTui` 对应) */
374
- readonly errorNonTui: "当前为非交互式终端环境,无法启动交互界面,请在交互式 TUI 会话中重试";
375
- /** 入参无有效题目或选项(与 `markdown.errorReasons.noQuestions` 对应) */
376
- readonly errorNoQuestions: "未提供有效的问题或选项,请提供至少一个带选项的问题";
377
- /** 生成组件执行期异常通知(`reason` 为宿主异常摘要,与 `markdown.errorReasons.runtimeError` 对应) */
378
- readonly errorExecutionFailed: (reason: string) => string;
209
+ readonly questionNoteSaved: string;
210
+ readonly noteCleared: string;
211
+ readonly optionNoteSaved: (...args: Array<string | number>) => string;
212
+ readonly optionNoteSavedUnselected: (...args: Array<string | number>) => string;
213
+ readonly optionNoteSavedAtLimit: (...args: Array<string | number>) => string;
214
+ readonly optionNoteCleared: (...args: Array<string | number>) => string;
215
+ readonly selectedUpToLimit: (...args: Array<string | number>) => string;
216
+ readonly maxSelectExceeded: (...args: Array<string | number>) => string;
217
+ readonly minSelectRequired: (...args: Array<string | number>) => string;
218
+ readonly pleaseAnswerBeforeSubmit: string;
219
+ readonly editorDiscardConfirm: string;
220
+ readonly errorNonTui: string;
221
+ readonly errorNoQuestions: string;
222
+ readonly errorInvalidCondition: (...args: Array<string | number>) => string;
223
+ readonly errorExecutionFailed: (...args: Array<string | number>) => string;
224
+ readonly expansionRunning: string;
225
+ readonly expansionAdded: (...args: Array<string | number>) => string;
226
+ readonly expansionRetracted: string;
227
+ readonly expansionStopped: string;
228
+ readonly expansionFailed: (...args: Array<string | number>) => string;
379
229
  };
380
- /** 底部按键帮助行片段(标准键名 + 动宾结构,经 {@link TEXTS.common.helpSeparator} 拼接;条目按按键字母序排列) */
230
+ /** 底部按键帮助行片段(经 `common.helpSeparator` 拼接;条目按按键字母序排列) */
381
231
  readonly help: {
382
- /** Esc / Ctrl+C:取消并关闭当前界面 */
383
- readonly cancel: "Esc/Ctrl+C 取消";
384
- /** x:清空光标所在位置的补充说明 */
385
- readonly clearNote: "x 清空补充说明";
386
- /** Enter:多选模式下确认本题并推进 */
387
- readonly confirmQuestion: "Enter 确认";
388
- /** Enter:总览页提交整份答卷 */
389
- readonly confirmSubmit: "Enter 提交";
390
- /** n:编辑题目补充说明(光标位于题目补充说明菜单项时) */
391
- readonly editNote: "n 补充说明";
392
- /** n:编辑当前选项的专属批注(光标位于选项行时) */
393
- readonly editOptionNote: "n 选项补充说明";
394
- /** N:直接编辑题目补充说明(光标位于选项行时的大写入口) */
395
- readonly editQuestionNote: "N 题目补充说明";
396
- /** 1~9:按题号直接跳转题目(题目数大于 1 时展示) */
397
- readonly jumpQuestion: "1~9 跳转题目";
398
- /** ↑↓ / jk:上下移动光标 */
399
- readonly moveCursor: "↑↓/jk 移动";
400
- /** PgUp / PgDn:作答页滚动草稿预览(存在预览内容时展示) */
401
- readonly scrollDraft: "PgUp/PgDn 滚动草稿";
402
- /** ↑↓ / PgUp / PgDn:总览页滚动内容 */
403
- readonly scrollSummary: "↑↓/PgUp/PgDn 滚动";
404
- /** 空格 / Enter:单选模式下选定当前项 */
405
- readonly selectOptionSingle: "空格/Enter 选定";
406
- /** Tab / ←→ / hl:切换题目或总览页 */
407
- readonly switchQuestion: "Tab/←→/hl 切换题目";
408
- /** a:多选模式下全选或清空 */
409
- readonly toggleAll: "a 全选/清空";
410
- /** 空格:多选模式下勾选或取消当前项 */
411
- readonly toggleCheckMulti: "空格 勾选";
232
+ readonly cancel: string;
233
+ readonly clearNote: string;
234
+ readonly confirmQuestion: string;
235
+ readonly confirmSubmit: string;
236
+ readonly editNote: string;
237
+ readonly editOptionNote: string;
238
+ readonly editQuestionNote: string;
239
+ readonly jumpQuestion: string;
240
+ readonly moveCursor: string;
241
+ readonly scrollDraft: string;
242
+ readonly scrollSummary: string;
243
+ readonly selectOptionSingle: string;
244
+ readonly switchQuestion: string;
245
+ readonly toggleAll: string;
246
+ readonly toggleCheckMulti: string;
412
247
  };
413
- /** 答卷总览确认页文案(完成状态徽标、已选项标签、选项批注角标与滚动提示,按页面自上而下的渲染顺序排列) */
248
+ /** 答卷总览确认页文案(完成状态徽标、已选项标签、选项批注角标与滚动提示) */
414
249
  readonly summary: {
415
- /** 页标题 */
416
- readonly title: "【答卷总览与确认】";
417
- /** 单题完成徽标 */
418
- readonly statusDone: "[已完成]";
419
- /** 单题未完成徽标 */
420
- readonly statusPending: "[未完成]";
421
- /** 渲染题目块标题(`index` 为 1-based 题号,`title` 为题目标题) */
422
- readonly questionPrefix: (index: number, title: string) => string;
423
- /** 已选选项行标签 */
424
- readonly selectedLabel: "已选:";
425
- /** 已选选项行尾的批注存在角标 */
426
- readonly optionNoteBadge: "(󰷬 批注)";
427
- /** 渲染选项级批注行标签(`optLabel` 为所属选项标签) */
428
- readonly optionNotePrefix: (optLabel: string) => string;
429
- /** 题目级补充说明行标签 */
430
- readonly customNoteLabel: "󰷬 题目补充说明:";
431
- /** 全部完成时的提交引导行 */
432
- readonly allDonePrompt: " 󰄬 全部完成,按 Enter/Ctrl+S 提交答卷,Tab/hl/1-9 返回修改";
433
- /** 存在未完成题目时的阻断提示行 */
434
- readonly pendingWarning: " 󰄰 尚有题目未完成,按 Enter 前往作答,Tab/hl/1-9 切换修改";
435
- /** 渲染总览页上方剩余行数提示(`count` 为剩余行数) */
436
- readonly topMore: (count: number) => string;
437
- /** 渲染总览页下方剩余行数提示(`count` 为剩余行数) */
438
- readonly bottomMore: (count: number) => string;
250
+ readonly title: string;
251
+ readonly statusDone: string;
252
+ readonly statusPending: string;
253
+ readonly questionPrefix: (...args: Array<string | number>) => string;
254
+ readonly selectedLabel: string;
255
+ readonly optionNoteBadge: string;
256
+ readonly optionNotePrefix: (...args: Array<string | number>) => string;
257
+ readonly customNoteLabel: string;
258
+ readonly allDonePrompt: string;
259
+ readonly pendingWarning: string;
260
+ readonly topMore: (...args: Array<string | number>) => string;
261
+ readonly bottomMore: (...args: Array<string | number>) => string;
439
262
  };
440
263
  /** 会话回放卡片文案(调用态摘要、结果态徽标与展开态明细) */
441
264
  readonly card: {
442
- /** 渲染调用态多题摘要(`qCount` 为题数,`optCount` 为选项总数;形如 `3 题 • 8 选项`) */
443
- readonly callQuestionAndOptionCount: (qCount: number, optCount: number) => string;
444
- /** 渲染调用态平铺单题摘要(`optCount` 为选项数;形如 `4 选项`) */
445
- readonly callOptionCountOnly: (optCount: number) => string;
446
- /** 作者取消(warning 配色) */
447
- readonly resultCancelled: "󰜺 已取消";
448
- /** 执行失败(error 配色;展开态另附错误原因) */
449
- readonly resultErrorShort: "󰅚 执行失败";
450
- /** 正常完成(success 配色) */
451
- readonly resultCompleted: "󰄬 已完成";
452
- /** 渲染结果态已作答题目数(`n` 为题目数;形如 `3 项`,经 `common.bulletPrefix` 拼接) */
453
- readonly resultCount: (n: number) => string;
454
- /** 渲染展开态单条作答行(`title` 为题目标题,`content` 为明细正文) */
455
- readonly optionBullet: (title: string, content: string) => string;
456
- /** 渲染带专属批注的选项标签角标(`label` 为选项标签,`note` 为批注原文;形如 `选项 [note 批注]`) */
457
- readonly optionWithNote: (label: string, note: string) => string;
458
- /** 渲染题目补充说明角标(`text` 为补充说明原文,追加于作答行行尾) */
459
- readonly questionNoteTag: (text: string) => string;
460
- /** 渲染展开态错误原因行(`err` 为宿主异常摘要) */
461
- readonly errorBullet: (err: string) => string;
265
+ readonly callQuestionAndOptionCount: (...args: Array<string | number>) => string;
266
+ readonly callOptionCountOnly: (...args: Array<string | number>) => string;
267
+ readonly resultCancelled: string;
268
+ readonly resultErrorShort: string;
269
+ readonly resultCompleted: string;
270
+ readonly resultCount: (...args: Array<string | number>) => string;
271
+ readonly optionBullet: (...args: Array<string | number>) => string;
272
+ readonly optionWithNote: (...args: Array<string | number>) => string;
273
+ readonly questionNoteTag: (...args: Array<string | number>) => string;
274
+ readonly errorBullet: (...args: Array<string | number>) => string;
462
275
  };
463
- /**
464
- * 兜底文案与自动命名派生:任一缺失 / 越界输入的最终回退,保证界面与封套永不空白
465
- * 语言归属:本组为作者端中文占位,作者界面始终呈现中文
466
- * 约定:`model.ts` 在封套编译期把 `autoQuestionTitle` / `defaultQuestionTitle` / `autoOptionLabel` / `unnamedOptionLabel` / `defaultOptionLabel` 替换为 `markdown.fallbackQuestionTitle` / `markdown.fallbackOptionLabel` 的英文占位
467
- */
276
+ /** 兜底文案与自动命名派生:任一缺失 / 越界输入的最终回退,保证界面与封套永不空白 */
468
277
  readonly fallbacks: {
469
- /** 问卷标题缺省(模型未提供 `formTitle` 时) */
470
- readonly defaultFormTitle: "创作决策";
471
- /** 题目标题缺省(模型未提供标题时的作者端中文占位,封套编译期替换为英文) */
472
- readonly defaultQuestionTitle: "请选择接下来的创作方案";
473
- /** 题目补充说明编辑器的缺省占位文本 */
474
- readonly defaultCustomPlaceholder: "输入本题整体补充要求、伏笔细节或修改意见...";
475
- /** 选项补充说明编辑器的缺省占位文本 */
476
- readonly defaultOptionCustomPlaceholder: "输入针对该选项的具体补充要求或修改细节...";
477
- /** 自由文本作答的选项名(作者填写自定义内容时占位) */
478
- readonly defaultCustomChoiceName: "自定义方案";
479
- /** 选项标签缺省(模型未提供标签时的作者端中文占位,封套编译期替换为英文) */
480
- readonly defaultOptionLabel: "默认方案";
481
- /** 选项标签缺失且无序号信息时的占位(封套编译期替换为英文) */
482
- readonly unnamedOptionLabel: "未命名方案";
483
- /** 未勾选且无补充说明时的展示占位(总览页与结果卡片共用;封套中由 `markdown.noSelection` 承担同义英文) */
484
- readonly unselectedOption: "未选";
485
- /** 生成自动题目 ID(`n` 为 1-based 序号) */
486
- readonly autoQuestionId: (n: number) => string;
487
- /** 生成自动题目标题(`n` 为 1-based 序号,作者端中文占位,封套编译期替换为英文) */
488
- readonly autoQuestionTitle: (n: number) => string;
489
- /** 生成自动选项标签(`n` 为 1-based 序号,作者端中文占位,封套编译期替换为英文) */
490
- readonly autoOptionLabel: (n: number) => string;
278
+ readonly defaultFormTitle: string;
279
+ readonly defaultQuestionTitle: string;
280
+ readonly defaultCustomPlaceholder: string;
281
+ readonly defaultOptionCustomPlaceholder: string;
282
+ readonly defaultCustomChoiceName: string;
283
+ readonly defaultOptionLabel: string;
284
+ readonly unnamedOptionLabel: string;
285
+ readonly unselectedOption: string;
286
+ readonly autoQuestionId: (...args: Array<string | number>) => string;
287
+ readonly autoQuestionTitle: (...args: Array<string | number>) => string;
288
+ readonly autoOptionLabel: (...args: Array<string | number>) => string;
491
289
  };
492
290
  };
291
+ export {};