@sendevia/pi-ask-author 1.0.6 → 1.1.0
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/README.md +16 -14
- package/dist/component.d.ts +23 -93
- package/dist/format.d.ts +5 -5
- package/dist/i18n.d.ts +52 -0
- package/dist/index.d.ts +15 -39
- package/dist/index.js +1 -1
- package/dist/layout.d.ts +78 -0
- package/dist/llm-texts.d.ts +179 -0
- package/dist/model.d.ts +106 -12
- package/dist/novel-markdown.d.ts +2 -2
- package/dist/novel-syntax.d.ts +38 -0
- package/dist/schema.d.ts +115 -3
- package/dist/texts.d.ts +183 -424
- package/dist/tool-card.d.ts +64 -0
- package/dist/tool-result.d.ts +69 -0
- package/dist/view-editor.d.ts +24 -0
- package/dist/view-question.d.ts +127 -0
- package/dist/view-rows.d.ts +11 -2
- package/dist/view-summary.d.ts +42 -8
- package/lang/en_US.json +172 -0
- package/lang/zh_CN.json +150 -0
- package/package.json +10 -10
package/dist/texts.d.ts
CHANGED
|
@@ -1,492 +1,251 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file texts.ts
|
|
3
|
-
* @description
|
|
3
|
+
* @description 全局双向文案字典的组装点:LLM 面协议常量与当前系统语言的作者面文案在此汇合
|
|
4
4
|
*
|
|
5
5
|
* 核心架构特性:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* - `
|
|
9
|
-
* - `TEXTS` 按受众严格分区,LLM 面恒为英文,作者面恒为中文,两侧文案不得互相渗透
|
|
6
|
+
* - 作者可见文案一律来自 `lang/*.json`,LLM 面文案来自 `llm-texts.ts`;本文件只做装载、组合与派生,不新增字面量
|
|
7
|
+
* - 派生函数(多选模式标签、确认按钮明细与标签)集中在此,避免组件层与排版层各自拼接
|
|
8
|
+
* - 语言探测与模板编译在 `i18n.ts` 完成,语言资源键集合以 `en_US` 为规范
|
|
10
9
|
*
|
|
11
|
-
*
|
|
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
|
-
*
|
|
85
|
-
*
|
|
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 项`
|
|
26
|
+
*/
|
|
27
|
+
declare const confirmDetailMulti: (selectedCount: number, minSelect: number) => string;
|
|
28
|
+
/**
|
|
29
|
+
* 渲染确认本题按钮标签
|
|
30
|
+
* @param detail - 已选计数明细(取自 `confirmDetailMulti`)
|
|
31
|
+
* @param hasNote - 是否已填写题目补充说明
|
|
32
|
+
* @returns 形如 ` 确认本题 (已选 2 项 + 补充说明)`
|
|
86
33
|
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
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) 的界面文案 */
|
|
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
|
-
|
|
117
|
-
readonly
|
|
118
|
-
|
|
119
|
-
readonly
|
|
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 choose between concrete narrative directions. Supports one question or a batch of related questions, with options, optional Markdown draft previews, author notes, and conditional follow-ups based on earlier answers.";
|
|
41
|
+
readonly promptSnippet: "Ask the author to choose narrative directions with options, draft previews, and conditional follow-ups";
|
|
42
|
+
readonly promptGuidelines: readonly ["ask_author: Call it directly 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: Use flat mode (formTitle + question + options) for one decision, or the questions array for related decisions. Batch related choices into one call instead of consecutive calls, always give a concise formTitle, and add tabLabel when a long question title needs a short tab name.", "ask_author: Label options with concrete actions and put consequences in description. Add preview only when a Markdown draft or storyboard helps the author judge.", "ask_author: Omit optional fields that use defaults. Add a question id only when a later showIf references it, and point showIf at an earlier question id plus one of its option labels, or answered.", "ask_author: The author may choose multiple options, add notes, and edit drafts. Confirmed drafts return as [Draft directive: ...] lines.", "ask_author: [Author Decision Cancelled] means drop the decision. [Author Consultation Error] means fix the arguments and retry once, then continue without the confirmation."];
|
|
43
|
+
readonly label: string;
|
|
127
44
|
};
|
|
128
|
-
/** LLM 端 TypeBox
|
|
45
|
+
/** LLM 端 TypeBox 字段描述字典 */
|
|
129
46
|
readonly schema: {
|
|
130
|
-
|
|
131
|
-
readonly
|
|
132
|
-
|
|
133
|
-
readonly
|
|
134
|
-
|
|
135
|
-
readonly
|
|
136
|
-
|
|
137
|
-
readonly
|
|
138
|
-
|
|
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 excerpt (optional)";
|
|
50
|
+
readonly optionCustomPlaceholder: "Placeholder for the option note (optional)";
|
|
51
|
+
readonly optionShowIf: "Show only when an earlier answer matches (condition or array; all must hold)";
|
|
52
|
+
readonly questionId: "Stable id for showIf references (optional)";
|
|
53
|
+
readonly questionTitle: "Question text";
|
|
54
|
+
readonly questionTabLabel: "Short label for the tab bar (default: Q<index>)";
|
|
55
|
+
readonly questionDesc: "Context for the question (optional)";
|
|
145
56
|
readonly questionMultiSelect: "Allow multiple selections (default false)";
|
|
146
|
-
|
|
147
|
-
readonly
|
|
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 项) */
|
|
57
|
+
readonly questionMinSelect: "Minimum selections (default 1)";
|
|
58
|
+
readonly questionMaxSelect: "Maximum selections (default: all options)";
|
|
59
|
+
readonly questionAllowEmpty: "Allow submitting with no selection (default false)";
|
|
153
60
|
readonly questionOptions: "Candidate options (1-30, 2-10 recommended)";
|
|
154
|
-
|
|
155
|
-
readonly
|
|
156
|
-
|
|
157
|
-
readonly
|
|
158
|
-
|
|
159
|
-
readonly
|
|
160
|
-
|
|
161
|
-
readonly formDesc: "Overall context
|
|
162
|
-
|
|
163
|
-
readonly
|
|
164
|
-
/** 平铺模式的题目标题(可选;与批量模式的 `questionTitle` 同义) */
|
|
165
|
-
readonly formSingleQuestion: "Question title for flat single-question mode";
|
|
166
|
-
/** 平铺单题模式字段描述的统一区分前缀(LLM 端英文,`schema.ts` 逐字段拼接) */
|
|
61
|
+
readonly questionAllowCustom: "Allow author notes (default true)";
|
|
62
|
+
readonly questionCustomPlaceholder: "Placeholder for the author note (optional)";
|
|
63
|
+
readonly questionShowIf: "Show only when an earlier answer matches (condition or array; all must hold)";
|
|
64
|
+
readonly conditionQuestionId: "Id of an earlier question";
|
|
65
|
+
readonly conditionOption: "Option label that activates the condition";
|
|
66
|
+
readonly conditionAnswered: "Match any answer (default true) or no answer (false); ignored with option";
|
|
67
|
+
readonly formTitle: "Short title for the consultation";
|
|
68
|
+
readonly formDesc: "Overall context (optional)";
|
|
69
|
+
readonly formQuestions: "Related questions (1-20); batch related decisions into one call";
|
|
70
|
+
readonly formSingleQuestion: "Question for flat mode";
|
|
167
71
|
readonly flatPrefix: "(Flat single-question mode only) ";
|
|
168
|
-
|
|
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)";
|
|
170
73
|
};
|
|
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
|
-
*/
|
|
74
|
+
/** LLM 端返回封套与纠正指令模板 */
|
|
177
75
|
readonly markdown: {
|
|
178
|
-
/** 完成封套首行标识(固定英文令牌,恒为返回正文第一行) */
|
|
179
76
|
readonly envelopePrefix: "[Author Decision Finalized]";
|
|
180
|
-
|
|
181
|
-
readonly
|
|
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
|
-
*/
|
|
77
|
+
readonly envelopeSuffix: "Proceed with the author decisions and draft directives above without conversational acknowledgment.";
|
|
78
|
+
readonly envelopeCancelled: "[Author Decision Cancelled]\nThe author cancelled. Do not proceed with the discarded decision; propose next steps or ask for clarification.";
|
|
189
79
|
readonly envelopeError: (reason: string, guidance: string) => string;
|
|
190
|
-
/** 错误封套原因行字典(英文单句,按失败路径枚举) */
|
|
191
80
|
readonly errorReasons: {
|
|
192
|
-
|
|
193
|
-
readonly
|
|
194
|
-
/** 入参无有效题目或选项(对应作者端 {@link TEXTS.status.errorNoQuestions}) */
|
|
195
|
-
readonly noQuestions: "No valid questions or options were provided in arguments.";
|
|
196
|
-
/** 构建执行期异常的原因行(`details` 为宿主异常摘要,对应作者端 {@link TEXTS.status.errorExecutionFailed}) */
|
|
81
|
+
readonly nonTui: "Interactive TUI is unavailable in the current mode.";
|
|
82
|
+
readonly noQuestions: "No questions or options were provided.";
|
|
197
83
|
readonly runtimeError: (details: string) => string;
|
|
84
|
+
readonly invalidCondition: (details: string) => string;
|
|
198
85
|
};
|
|
199
|
-
/** 错误封套纠正指引行字典(英文单句,与 `errorReasons` 一一对应) */
|
|
200
86
|
readonly errorGuidances: {
|
|
201
|
-
|
|
202
|
-
readonly nonTui: "Proceed using defaults or ask user via standard chat/message if crucial.";
|
|
203
|
-
/** `noQuestions` 的纠正指引 */
|
|
87
|
+
readonly nonTui: "Use defaults, or ask the user in chat if the decision is crucial.";
|
|
204
88
|
readonly noQuestions: "Provide at least one question with concrete options.";
|
|
205
|
-
|
|
206
|
-
readonly
|
|
89
|
+
readonly runtimeError: "Check the arguments and retry with valid questions and options.";
|
|
90
|
+
readonly invalidCondition: "Reference an earlier question id plus one of its option labels, or use answered.";
|
|
91
|
+
};
|
|
92
|
+
readonly adaptiveErrors: {
|
|
93
|
+
readonly unknownQuestion: (questionId: string) => string;
|
|
94
|
+
readonly forwardQuestion: (questionId: string) => string;
|
|
95
|
+
readonly unknownOption: (questionId: string, option: string) => string;
|
|
207
96
|
};
|
|
208
|
-
|
|
209
|
-
readonly
|
|
210
|
-
/** 单题无任何作答(未勾选且无批注)时的英文占位正文 */
|
|
211
|
-
readonly noSelection: "(No selection; author skipped this question)";
|
|
212
|
-
/** 行内批注令牌左定界符(尾随 1 空格,与 `noteSuffix` 成对) */
|
|
97
|
+
readonly envelopeEmpty: "The author submitted no answers. Use your defaults, or ask a follow-up if the decision is crucial.";
|
|
98
|
+
readonly noSelection: "(No selection; the author skipped this question)";
|
|
213
99
|
readonly notePrefix: "[Author note: ";
|
|
214
|
-
/** 行内批注令牌右定界符 */
|
|
215
100
|
readonly noteSuffix: "]";
|
|
216
|
-
/** 分镜头草稿指令令牌左定界符(尾随 1 空格,与 `draftDirectiveSuffix` 成对) */
|
|
217
101
|
readonly draftDirectivePrefix: "[Draft directive: ";
|
|
218
|
-
/** 分镜头草稿指令令牌右定界符 */
|
|
219
102
|
readonly draftDirectiveSuffix: "]";
|
|
220
|
-
/** 构建封套单题作答行(`index` 为 1-based 题号,`title` 为题目标题,`body` 为单行正文) */
|
|
221
103
|
readonly answerLine: (index: number, title: string, body: string) => string;
|
|
222
|
-
/** 同一作答行内多个片段(选项推演 / 批注令牌 / 草稿指令)的分隔符(纯 ASCII;作者文本中的 `;` 已在 `sanitizeEnvelopeText` 归一为全角 `;` 消除歧义) */
|
|
223
104
|
readonly partSeparator: "; ";
|
|
224
|
-
/** 正文草稿 / 分镜头草稿压缩为单行指令时的分镜头片段分隔符(LLM 端纯 ASCII) */
|
|
225
105
|
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
106
|
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
107
|
readonly optionWithoutDesc: (label: string, draftDirective?: string, note?: string) => string;
|
|
243
|
-
/**
|
|
244
|
-
* 构建未选中选项上的孤立批注片段(英文前缀 + 标签 + 批注令牌)
|
|
245
|
-
* @param label - 选项标签原文(调用方已过 `sanitizeEnvelopeText`)
|
|
246
|
-
* @param note - 已包装的 `[Author note: …]` 令牌(非原文)
|
|
247
|
-
*/
|
|
248
108
|
readonly unselectedOptionNote: (label: string, note: string) => string;
|
|
249
|
-
/** 生成题目标题的英文占位(`index` 为 1-based 题号;仅封套编译期替换 `fallbacks.autoQuestionTitle` 与 `fallbacks.defaultQuestionTitle`,作者界面保留中文占位) */
|
|
250
109
|
readonly fallbackQuestionTitle: (index: number) => string;
|
|
251
|
-
/** 生成选项标签的英文占位(`index` 为 1-based 选项序号;仅封套编译期替换 `fallbacks.autoOptionLabel` / `fallbacks.unnamedOptionLabel` / `fallbacks.defaultOptionLabel`,作者界面保留中文占位) */
|
|
252
110
|
readonly fallbackOptionLabel: (index: number) => string;
|
|
253
111
|
};
|
|
254
112
|
/** `/ask-author` 辅助命令的注册元数据与作者可见提示文案 */
|
|
255
113
|
readonly command: {
|
|
256
|
-
|
|
257
|
-
readonly
|
|
258
|
-
|
|
259
|
-
readonly description: "查看 ask_author 创作请示工具说明";
|
|
260
|
-
/** 命令执行后的提示通知(引导作者改用自然语言指示 AI 调用工具) */
|
|
261
|
-
readonly notify: "在提示词中指示 AI 调用 ask_author,即可向您请示创作决策";
|
|
114
|
+
readonly name: string;
|
|
115
|
+
readonly description: string;
|
|
116
|
+
readonly notify: string;
|
|
262
117
|
};
|
|
263
118
|
/** 跨视图共享的通用排版片段(枚举分隔符、列表条目前缀与按键帮助分隔符) */
|
|
264
119
|
readonly common: {
|
|
265
|
-
|
|
266
|
-
readonly
|
|
267
|
-
|
|
268
|
-
readonly bulletPrefix: "• ";
|
|
269
|
-
/** 底部按键帮助行各片段之间的分隔符 */
|
|
270
|
-
readonly helpSeparator: " • ";
|
|
120
|
+
readonly optionSeparator: string;
|
|
121
|
+
readonly bulletPrefix: string;
|
|
122
|
+
readonly helpSeparator: string;
|
|
271
123
|
};
|
|
272
124
|
/** Tab 导航栏标签文案(各题目页与答卷提交页) */
|
|
273
125
|
readonly tabs: {
|
|
274
|
-
|
|
275
|
-
readonly
|
|
276
|
-
/** 答卷提交页标签(末尾固定页,前面附带完成徽标) */
|
|
277
|
-
readonly submitTab: " 提交答卷";
|
|
126
|
+
readonly questionTab: (...args: Array<string | number>) => string;
|
|
127
|
+
readonly submitTab: string;
|
|
278
128
|
};
|
|
279
|
-
/**
|
|
129
|
+
/** 作答视图与预览面板的结构化文案(`modeMulti` 由多选模式片段组合而成) */
|
|
280
130
|
readonly view: {
|
|
281
|
-
|
|
282
|
-
readonly
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
readonly
|
|
292
|
-
|
|
293
|
-
readonly
|
|
294
|
-
|
|
295
|
-
readonly
|
|
296
|
-
|
|
297
|
-
readonly
|
|
298
|
-
|
|
299
|
-
readonly
|
|
300
|
-
|
|
301
|
-
readonly
|
|
302
|
-
|
|
303
|
-
readonly
|
|
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;
|
|
131
|
+
readonly modeSingle: string;
|
|
132
|
+
readonly conditionalBadge: string;
|
|
133
|
+
readonly modeMultiAtLeast: (...args: Array<string | number>) => string;
|
|
134
|
+
readonly modeMultiOptional: (...args: Array<string | number>) => string;
|
|
135
|
+
readonly modeMultiUnconstrained: (...args: Array<string | number>) => string;
|
|
136
|
+
readonly modeMultiMaxPart: (...args: Array<string | number>) => string;
|
|
137
|
+
readonly attachedNoteBanner: (...args: Array<string | number>) => string;
|
|
138
|
+
readonly optionAttachedNoteBanner: (...args: Array<string | number>) => string;
|
|
139
|
+
readonly listTopMore: (...args: Array<string | number>) => string;
|
|
140
|
+
readonly listBottomMore: (...args: Array<string | number>) => string;
|
|
141
|
+
readonly optionNotePanelTitle: string;
|
|
142
|
+
readonly storyDescriptionPanelTitle: string;
|
|
143
|
+
readonly storyDraftPanelTitle: string;
|
|
144
|
+
readonly customNotePanelTitle: string;
|
|
145
|
+
readonly confirmPanelTitle: string;
|
|
146
|
+
readonly customNotePanelCurrent: string;
|
|
147
|
+
readonly previewScrollInfo: (...args: Array<string | number>) => string;
|
|
148
|
+
readonly previewNoDraft: string;
|
|
149
|
+
readonly customNotePanelTips: readonly string[];
|
|
150
|
+
readonly confirmPanelTips: readonly string[];
|
|
151
|
+
readonly sectionTitle: (...args: Array<string | number>) => string;
|
|
152
|
+
readonly fieldLabel: (...args: Array<string | number>) => string;
|
|
153
|
+
readonly italicLine: (...args: Array<string | number>) => string;
|
|
154
|
+
readonly modeMulti: typeof modeMultiLabel;
|
|
326
155
|
};
|
|
327
|
-
/**
|
|
156
|
+
/** 题目菜单条目文案(`confirmDetailMulti` / `confirmLabel` 由已选数片段组合而成) */
|
|
328
157
|
readonly menu: {
|
|
329
|
-
|
|
330
|
-
readonly
|
|
331
|
-
|
|
332
|
-
readonly
|
|
333
|
-
|
|
334
|
-
readonly confirmDetailMulti:
|
|
335
|
-
|
|
336
|
-
readonly confirmLabel: (detail: string, hasNote: boolean) => string;
|
|
337
|
-
/** 确认按钮的下方说明(声明确认后的跳转目标) */
|
|
338
|
-
readonly confirmDesc: "确认并前往下一题或总览页";
|
|
158
|
+
readonly customNoteLabel: string;
|
|
159
|
+
readonly customNoteLabelFilled: string;
|
|
160
|
+
readonly confirmDetailMultiBelowMin: (...args: Array<string | number>) => string;
|
|
161
|
+
readonly confirmNoteSuffix: string;
|
|
162
|
+
readonly confirmDesc: string;
|
|
163
|
+
readonly confirmDetailMulti: typeof confirmDetailMulti;
|
|
164
|
+
readonly confirmLabel: typeof confirmLabel;
|
|
339
165
|
};
|
|
340
166
|
/** 全屏补充说明编辑器的标题与页脚按键帮助文案 */
|
|
341
167
|
readonly editor: {
|
|
342
|
-
|
|
343
|
-
readonly
|
|
344
|
-
|
|
345
|
-
readonly optionTitle: (questionTitle: string, optionLabel: string) => string;
|
|
346
|
-
/** 编辑器页脚按键帮助(保存与取消) */
|
|
347
|
-
readonly footerHelp: " [Enter] 保存并返回 • [Esc/Ctrl+C] 取消";
|
|
168
|
+
readonly title: (...args: Array<string | number>) => string;
|
|
169
|
+
readonly optionTitle: (...args: Array<string | number>) => string;
|
|
170
|
+
readonly footerHelp: string;
|
|
348
171
|
};
|
|
349
172
|
/** 底部临时状态栏通知(操作结果、阻断原因与阻断后的纠正操作路径) */
|
|
350
173
|
readonly status: {
|
|
351
|
-
|
|
352
|
-
readonly
|
|
353
|
-
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
readonly
|
|
357
|
-
|
|
358
|
-
readonly
|
|
359
|
-
|
|
360
|
-
readonly
|
|
361
|
-
|
|
362
|
-
readonly
|
|
363
|
-
|
|
364
|
-
readonly
|
|
365
|
-
|
|
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;
|
|
174
|
+
readonly questionNoteSaved: string;
|
|
175
|
+
readonly noteCleared: string;
|
|
176
|
+
readonly optionNoteSaved: (...args: Array<string | number>) => string;
|
|
177
|
+
readonly optionNoteSavedUnselected: (...args: Array<string | number>) => string;
|
|
178
|
+
readonly optionNoteSavedAtLimit: (...args: Array<string | number>) => string;
|
|
179
|
+
readonly optionNoteCleared: (...args: Array<string | number>) => string;
|
|
180
|
+
readonly selectedUpToLimit: (...args: Array<string | number>) => string;
|
|
181
|
+
readonly maxSelectExceeded: (...args: Array<string | number>) => string;
|
|
182
|
+
readonly minSelectRequired: (...args: Array<string | number>) => string;
|
|
183
|
+
readonly pleaseAnswerBeforeSubmit: string;
|
|
184
|
+
readonly editorDiscardConfirm: string;
|
|
185
|
+
readonly errorNonTui: string;
|
|
186
|
+
readonly errorNoQuestions: string;
|
|
187
|
+
readonly errorInvalidCondition: (...args: Array<string | number>) => string;
|
|
188
|
+
readonly errorExecutionFailed: (...args: Array<string | number>) => string;
|
|
379
189
|
};
|
|
380
|
-
/**
|
|
190
|
+
/** 底部按键帮助行片段(经 `common.helpSeparator` 拼接;条目按按键字母序排列) */
|
|
381
191
|
readonly help: {
|
|
382
|
-
|
|
383
|
-
readonly
|
|
384
|
-
|
|
385
|
-
readonly
|
|
386
|
-
|
|
387
|
-
readonly
|
|
388
|
-
|
|
389
|
-
readonly
|
|
390
|
-
|
|
391
|
-
readonly
|
|
392
|
-
|
|
393
|
-
readonly
|
|
394
|
-
|
|
395
|
-
readonly
|
|
396
|
-
|
|
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: "空格 勾选";
|
|
192
|
+
readonly cancel: string;
|
|
193
|
+
readonly clearNote: string;
|
|
194
|
+
readonly confirmQuestion: string;
|
|
195
|
+
readonly confirmSubmit: string;
|
|
196
|
+
readonly editNote: string;
|
|
197
|
+
readonly editOptionNote: string;
|
|
198
|
+
readonly editQuestionNote: string;
|
|
199
|
+
readonly jumpQuestion: string;
|
|
200
|
+
readonly moveCursor: string;
|
|
201
|
+
readonly scrollDraft: string;
|
|
202
|
+
readonly scrollSummary: string;
|
|
203
|
+
readonly selectOptionSingle: string;
|
|
204
|
+
readonly switchQuestion: string;
|
|
205
|
+
readonly toggleAll: string;
|
|
206
|
+
readonly toggleCheckMulti: string;
|
|
412
207
|
};
|
|
413
|
-
/**
|
|
208
|
+
/** 答卷总览确认页文案(完成状态徽标、已选项标签、选项批注角标与滚动提示) */
|
|
414
209
|
readonly summary: {
|
|
415
|
-
|
|
416
|
-
readonly
|
|
417
|
-
|
|
418
|
-
readonly
|
|
419
|
-
|
|
420
|
-
readonly
|
|
421
|
-
|
|
422
|
-
readonly
|
|
423
|
-
|
|
424
|
-
readonly
|
|
425
|
-
|
|
426
|
-
readonly
|
|
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;
|
|
210
|
+
readonly title: string;
|
|
211
|
+
readonly statusDone: string;
|
|
212
|
+
readonly statusPending: string;
|
|
213
|
+
readonly questionPrefix: (...args: Array<string | number>) => string;
|
|
214
|
+
readonly selectedLabel: string;
|
|
215
|
+
readonly optionNoteBadge: string;
|
|
216
|
+
readonly optionNotePrefix: (...args: Array<string | number>) => string;
|
|
217
|
+
readonly customNoteLabel: string;
|
|
218
|
+
readonly allDonePrompt: string;
|
|
219
|
+
readonly pendingWarning: string;
|
|
220
|
+
readonly topMore: (...args: Array<string | number>) => string;
|
|
221
|
+
readonly bottomMore: (...args: Array<string | number>) => string;
|
|
439
222
|
};
|
|
440
223
|
/** 会话回放卡片文案(调用态摘要、结果态徽标与展开态明细) */
|
|
441
224
|
readonly card: {
|
|
442
|
-
|
|
443
|
-
readonly
|
|
444
|
-
|
|
445
|
-
readonly
|
|
446
|
-
|
|
447
|
-
readonly
|
|
448
|
-
|
|
449
|
-
readonly
|
|
450
|
-
|
|
451
|
-
readonly
|
|
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;
|
|
225
|
+
readonly callQuestionAndOptionCount: (...args: Array<string | number>) => string;
|
|
226
|
+
readonly callOptionCountOnly: (...args: Array<string | number>) => string;
|
|
227
|
+
readonly resultCancelled: string;
|
|
228
|
+
readonly resultErrorShort: string;
|
|
229
|
+
readonly resultCompleted: string;
|
|
230
|
+
readonly resultCount: (...args: Array<string | number>) => string;
|
|
231
|
+
readonly optionBullet: (...args: Array<string | number>) => string;
|
|
232
|
+
readonly optionWithNote: (...args: Array<string | number>) => string;
|
|
233
|
+
readonly questionNoteTag: (...args: Array<string | number>) => string;
|
|
234
|
+
readonly errorBullet: (...args: Array<string | number>) => string;
|
|
462
235
|
};
|
|
463
|
-
/**
|
|
464
|
-
* 兜底文案与自动命名派生:任一缺失 / 越界输入的最终回退,保证界面与封套永不空白
|
|
465
|
-
* 语言归属:本组为作者端中文占位,作者界面始终呈现中文
|
|
466
|
-
* 约定:`model.ts` 在封套编译期把 `autoQuestionTitle` / `defaultQuestionTitle` / `autoOptionLabel` / `unnamedOptionLabel` / `defaultOptionLabel` 替换为 `markdown.fallbackQuestionTitle` / `markdown.fallbackOptionLabel` 的英文占位
|
|
467
|
-
*/
|
|
236
|
+
/** 兜底文案与自动命名派生:任一缺失 / 越界输入的最终回退,保证界面与封套永不空白 */
|
|
468
237
|
readonly fallbacks: {
|
|
469
|
-
|
|
470
|
-
readonly
|
|
471
|
-
|
|
472
|
-
readonly
|
|
473
|
-
|
|
474
|
-
readonly
|
|
475
|
-
|
|
476
|
-
readonly
|
|
477
|
-
|
|
478
|
-
readonly
|
|
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;
|
|
238
|
+
readonly defaultFormTitle: string;
|
|
239
|
+
readonly defaultQuestionTitle: string;
|
|
240
|
+
readonly defaultCustomPlaceholder: string;
|
|
241
|
+
readonly defaultOptionCustomPlaceholder: string;
|
|
242
|
+
readonly defaultCustomChoiceName: string;
|
|
243
|
+
readonly defaultOptionLabel: string;
|
|
244
|
+
readonly unnamedOptionLabel: string;
|
|
245
|
+
readonly unselectedOption: string;
|
|
246
|
+
readonly autoQuestionId: (...args: Array<string | number>) => string;
|
|
247
|
+
readonly autoQuestionTitle: (...args: Array<string | number>) => string;
|
|
248
|
+
readonly autoOptionLabel: (...args: Array<string | number>) => string;
|
|
491
249
|
};
|
|
492
250
|
};
|
|
251
|
+
export {};
|