@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/README.md +17 -14
- package/dist/component.d.ts +76 -94
- package/dist/expansion.d.ts +52 -0
- package/dist/format.d.ts +5 -5
- package/dist/i18n.d.ts +52 -0
- package/dist/index.d.ts +18 -40
- package/dist/index.js +1 -1
- package/dist/layout.d.ts +78 -0
- package/dist/llm-texts.d.ts +230 -0
- package/dist/model.d.ts +219 -16
- package/dist/novel-markdown.d.ts +2 -2
- package/dist/novel-syntax.d.ts +38 -0
- package/dist/sanitize.d.ts +17 -2
- package/dist/schema.d.ts +161 -4
- package/dist/texts.d.ts +224 -425
- 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 +129 -0
- package/dist/view-rows.d.ts +21 -3
- package/dist/view-summary.d.ts +42 -8
- package/lang/en_US.json +181 -0
- package/lang/ja_JP.json +156 -0
- package/lang/ko_KR.json +156 -0
- package/lang/zh_CN.json +156 -0
- package/package.json +10 -10
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
|
-
* -
|
|
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 项`
|
|
86
26
|
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
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 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
|
|
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 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
|
-
|
|
147
|
-
readonly
|
|
148
|
-
|
|
149
|
-
readonly
|
|
150
|
-
|
|
151
|
-
readonly
|
|
152
|
-
|
|
153
|
-
readonly
|
|
154
|
-
|
|
155
|
-
readonly
|
|
156
|
-
|
|
157
|
-
readonly
|
|
158
|
-
|
|
159
|
-
readonly
|
|
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
|
-
|
|
169
|
-
readonly
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
|
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
|
-
|
|
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}) */
|
|
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
|
-
|
|
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
|
-
|
|
206
|
-
readonly
|
|
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
|
|
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
|
-
|
|
257
|
-
readonly
|
|
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
|
|
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
|
-
|
|
275
|
-
readonly
|
|
276
|
-
|
|
277
|
-
readonly submitTab: " 提交答卷";
|
|
160
|
+
readonly questionTab: (...args: Array<string | number>) => string;
|
|
161
|
+
readonly expansionPlaceholder: string;
|
|
162
|
+
readonly submitTab: string;
|
|
278
163
|
};
|
|
279
|
-
/**
|
|
164
|
+
/** 作答视图与预览面板的结构化文案(`modeMulti` 由多选模式片段组合而成) */
|
|
280
165
|
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;
|
|
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
|
|
331
|
-
|
|
332
|
-
readonly
|
|
333
|
-
|
|
334
|
-
readonly confirmDetailMulti:
|
|
335
|
-
|
|
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
|
-
|
|
343
|
-
readonly
|
|
344
|
-
|
|
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
|
|
353
|
-
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
readonly
|
|
357
|
-
|
|
358
|
-
readonly
|
|
359
|
-
|
|
360
|
-
readonly
|
|
361
|
-
|
|
362
|
-
readonly
|
|
363
|
-
|
|
364
|
-
readonly
|
|
365
|
-
|
|
366
|
-
readonly
|
|
367
|
-
|
|
368
|
-
readonly
|
|
369
|
-
|
|
370
|
-
readonly
|
|
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
|
-
/**
|
|
230
|
+
/** 底部按键帮助行片段(经 `common.helpSeparator` 拼接;条目按按键字母序排列) */
|
|
381
231
|
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: "空格 勾选";
|
|
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
|
|
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;
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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;
|
|
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 {};
|