@sendevia/pi-ask-author 1.0.5 → 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.
@@ -0,0 +1,150 @@
1
+ {
2
+ "tool": { "label": "向作者请示" },
3
+ "command": {
4
+ "name": "ask-author",
5
+ "description": "查看 ask_author 创作请示工具说明",
6
+ "notify": "在提示词中指示 AI 调用 ask_author,即可向您请示创作决策"
7
+ },
8
+ "common": { "optionSeparator": "、", "bulletPrefix": "• ", "helpSeparator": " • " },
9
+ "tabs": {
10
+ "questionTab": { "template": "第{index}题", "params": ["index"] },
11
+ "submitTab": { "template": "{icon.check} 提交答卷" }
12
+ },
13
+ "view": {
14
+ "modeSingle": "[单选]",
15
+ "conditionalBadge": "[条件显示]",
16
+ "modeMultiAtLeast": { "template": "[多选 至少{min}项{maxPart}]", "params": ["min", "maxPart"] },
17
+ "modeMultiOptional": { "template": "[多选 可不选{maxPart}]", "params": ["maxPart"] },
18
+ "modeMultiUnconstrained": { "template": "[多选{maxPart}]", "params": ["maxPart"] },
19
+ "modeMultiMaxPart": { "template": " 至多{max}项", "params": ["max"] },
20
+ "attachedNoteBanner": { "template": "{icon.note} 题目补充说明:{text}", "params": ["text"] },
21
+ "optionAttachedNoteBanner": {
22
+ "template": "{icon.note} [{label}] 选项补充说明:{text}",
23
+ "params": ["label", "text"]
24
+ },
25
+ "listTopMore": { "template": " {icon.scrollUp} 向上还有 {count} 项", "params": ["count"] },
26
+ "listBottomMore": { "template": " {icon.scrollDown} 向下还有 {count} 项", "params": ["count"] },
27
+ "optionNotePanelTitle": "选项补充说明",
28
+ "storyDescriptionPanelTitle": "情节设定推演",
29
+ "storyDraftPanelTitle": "正文草稿/分镜头试撰写",
30
+ "customNotePanelTitle": "题目补充说明",
31
+ "confirmPanelTitle": "操作说明",
32
+ "customNotePanelCurrent": "当前填写内容:",
33
+ "previewScrollInfo": { "template": "(行 {start}-{end}/{total},用 [ ] 滚动)", "params": ["start", "end", "total"] },
34
+ "previewNoDraft": "(无内容预览)",
35
+ "customNotePanelTips": [
36
+ "• 随时按「N」或选择此项按「Enter」填写/修改本题补充说明",
37
+ "• 按「x」清空本题补充说明",
38
+ "• 补充说明将随所选选项及选项专属补充说明一并提交给 AI 助手"
39
+ ],
40
+ "confirmPanelTips": ["• 按 `Enter` 确认本题并前往下一题", "• 最后一题确认后自动进入总览提交页"],
41
+ "sectionTitle": { "template": "### {title}", "params": ["title"] },
42
+ "fieldLabel": { "template": "**{label}**", "params": ["label"] },
43
+ "italicLine": { "template": "_{text}_", "params": ["text"] }
44
+ },
45
+ "menu": {
46
+ "customNoteLabel": { "template": "{icon.note} 题目补充说明" },
47
+ "customNoteLabelFilled": { "template": "{icon.note} 题目补充说明 (已填写)" },
48
+ "confirmDetailMulti": { "template": "已选 {selectedCount} 项", "params": ["selectedCount", "minSelect"] },
49
+ "confirmDetailMultiBelowMin": {
50
+ "template": "已选 {selectedCount}/{minSelect} 项",
51
+ "params": ["selectedCount", "minSelect"]
52
+ },
53
+ "confirmLabel": { "template": "{icon.check} 确认本题 ({detail}{noteSuffix})", "params": ["detail", "noteSuffix"] },
54
+ "confirmNoteSuffix": " + 补充说明",
55
+ "confirmDesc": "确认并前往下一题或总览页"
56
+ },
57
+ "editor": {
58
+ "title": { "template": " {icon.note} 填写题目补充说明({questionTitle})", "params": ["questionTitle"] },
59
+ "optionTitle": {
60
+ "template": " {icon.note} 填写选项补充说明({optionLabel} - {questionTitle})",
61
+ "params": ["questionTitle", "optionLabel"]
62
+ },
63
+ "footerHelp": " [Enter] 保存并返回 • [Esc/Ctrl+C] 取消"
64
+ },
65
+ "status": {
66
+ "questionNoteSaved": "已保存本题补充说明",
67
+ "noteCleared": "已清空本题补充说明",
68
+ "optionNoteSaved": { "template": "已保存「{label}」补充说明", "params": ["label"] },
69
+ "optionNoteSavedUnselected": {
70
+ "template": "已保存「{label}」批注(该选项未勾选,仅作批注提交)",
71
+ "params": ["label"]
72
+ },
73
+ "optionNoteSavedAtLimit": {
74
+ "template": "已达上限(至多 {max} 项):批注已保存,但该选项未勾选",
75
+ "params": ["max"]
76
+ },
77
+ "optionNoteCleared": { "template": "已清空「{label}」补充说明", "params": ["label"] },
78
+ "selectedUpToLimit": { "template": "已达选择上限(至多 {limit} 项)", "params": ["limit"] },
79
+ "maxSelectExceeded": { "template": "已达上限(至多 {max} 项):请按「空格」取消已选项后重选", "params": ["max"] },
80
+ "minSelectRequired": {
81
+ "template": "未达下限(至少需 {min} 项):请按「空格」继续勾选,或按「n/N」填写说明",
82
+ "params": ["min"]
83
+ },
84
+ "pleaseAnswerBeforeSubmit": "本题未完成:请按「空格/Enter」选定选项,或按「n/N」填写补充说明",
85
+ "editorDiscardConfirm": "再次按 Esc/Ctrl+C 放弃修改(未保存内容将丢失),继续输入可撤销",
86
+ "errorNonTui": "当前为非交互式终端环境,无法启动交互界面,请在交互式 TUI 会话中重试",
87
+ "errorNoQuestions": "未提供有效的问题或选项,请提供至少一个带选项的问题",
88
+ "errorInvalidCondition": {
89
+ "template": "自适应条件无效:{details}(请让 showIf 指向更早的题目,并引用该题已有选项的标签,或改用 answered)",
90
+ "params": ["details"]
91
+ },
92
+ "errorExecutionFailed": { "template": "组件执行异常:{reason}(可修正参数后重试)", "params": ["reason"] }
93
+ },
94
+ "help": {
95
+ "cancel": "Esc/Ctrl+C 取消",
96
+ "clearNote": "x 清空补充说明",
97
+ "confirmQuestion": "Enter 确认",
98
+ "confirmSubmit": "Enter 提交",
99
+ "editNote": "n 补充说明",
100
+ "editOptionNote": "n 选项补充说明",
101
+ "editQuestionNote": "N 题目补充说明",
102
+ "jumpQuestion": "1~9 跳转题目",
103
+ "moveCursor": "↑↓/jk 移动",
104
+ "scrollDraft": "[ ] 滚动草稿",
105
+ "scrollSummary": "↑↓/[ ] 滚动",
106
+ "selectOptionSingle": "空格/Enter 选定",
107
+ "switchQuestion": "Tab/←→/hl 切换题目",
108
+ "toggleAll": "a 全选/清空",
109
+ "toggleCheckMulti": "空格 勾选"
110
+ },
111
+ "summary": {
112
+ "title": "【答卷总览与确认】",
113
+ "statusDone": "[已完成]",
114
+ "statusPending": "[未完成]",
115
+ "questionPrefix": { "template": "第{index}题:{title}", "params": ["index", "title"] },
116
+ "selectedLabel": "已选:",
117
+ "optionNoteBadge": { "template": "({icon.note} 批注)" },
118
+ "optionNotePrefix": { "template": "{icon.note} 选项补充说明({optLabel}):", "params": ["optLabel"] },
119
+ "customNoteLabel": { "template": "{icon.note} 题目补充说明:" },
120
+ "allDonePrompt": { "template": " {icon.check} 全部完成,按 Enter/Ctrl+S 提交答卷,Tab/hl/1-9 返回修改" },
121
+ "pendingWarning": { "template": " {icon.unchecked} 尚有题目未完成,按 Enter 前往作答,Tab/hl/1-9 切换修改" },
122
+ "topMore": { "template": " {icon.scrollUp} 向上还有 {count} 行", "params": ["count"] },
123
+ "bottomMore": { "template": " {icon.scrollDown} 向下还有 {count} 行", "params": ["count"] }
124
+ },
125
+ "card": {
126
+ "callQuestionAndOptionCount": { "template": "{qCount} 题 • {optCount} 选项", "params": ["qCount", "optCount"] },
127
+ "callOptionCountOnly": { "template": "{optCount} 选项", "params": ["optCount"] },
128
+ "resultCancelled": { "template": "{icon.cancel} 已取消" },
129
+ "resultErrorShort": { "template": "{icon.error} 执行失败" },
130
+ "resultCompleted": { "template": "{icon.check} 已完成" },
131
+ "resultCount": { "template": "{n} 项", "params": ["n"] },
132
+ "optionBullet": { "template": "• {title}:{content}", "params": ["title", "content"] },
133
+ "optionWithNote": { "template": "{label} [{icon.note} {note}]", "params": ["label", "note"] },
134
+ "questionNoteTag": { "template": " ({icon.note} 题目补充说明: {text})", "params": ["text"] },
135
+ "errorBullet": { "template": "• 错误原因:{err}", "params": ["err"] }
136
+ },
137
+ "fallbacks": {
138
+ "defaultFormTitle": "创作决策",
139
+ "defaultQuestionTitle": "请选择接下来的创作方案",
140
+ "defaultCustomPlaceholder": "输入本题整体补充要求、伏笔细节或修改意见...",
141
+ "defaultOptionCustomPlaceholder": "输入针对该选项的具体补充要求或修改细节...",
142
+ "defaultCustomChoiceName": "自定义方案",
143
+ "defaultOptionLabel": "默认方案",
144
+ "unnamedOptionLabel": "未命名方案",
145
+ "unselectedOption": "未选",
146
+ "autoQuestionId": { "template": "q_{n}", "params": ["n"] },
147
+ "autoQuestionTitle": { "template": "问题 {n}", "params": ["n"] },
148
+ "autoOptionLabel": { "template": "选项 {n}", "params": ["n"] }
149
+ }
150
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendevia/pi-ask-author",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "面向文字创作者的决策询问 Pi 扩展",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -25,20 +25,15 @@
25
25
  "main": "./dist/index.js",
26
26
  "types": "./dist/index.d.ts",
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "lang"
29
30
  ],
30
- "scripts": {
31
- "build": "tsc && esbuild src/index.ts --bundle --format=esm --platform=node --target=ESNext --external:@earendil-works/* --external:typebox --minify --tree-shaking=true --legal-comments=none --drop:debugger --drop:console --outfile=dist/index.js && terser dist/index.js --compress passes=3,pure_getters=true --mangle --output dist/index.js",
32
- "prepack": "pnpm build",
33
- "check": "tsc --noEmit -p tsconfig.json",
34
- "test": "node test/verify.test.mjs"
35
- },
36
31
  "devDependencies": {
37
- "@earendil-works/pi-coding-agent": "^0.86.1",
38
- "@earendil-works/pi-tui": "^0.86.1",
32
+ "@earendil-works/pi-coding-agent": "latest",
33
+ "@earendil-works/pi-tui": "latest",
39
34
  "esbuild": "^0.28.2",
40
35
  "terser": "^5.51.2",
41
- "typebox": "^1.3.34",
36
+ "typebox": "^1.4.2",
42
37
  "typescript": "^7.0.2"
43
38
  },
44
39
  "peerDependencies": {
@@ -50,5 +45,10 @@
50
45
  "extensions": [
51
46
  "./dist/index.js"
52
47
  ]
48
+ },
49
+ "scripts": {
50
+ "build": "tsc && esbuild src/index.ts --bundle --format=esm --platform=node --target=ESNext --external:@earendil-works/* --external:typebox --minify --tree-shaking=true --legal-comments=none --drop:debugger --drop:console --outfile=dist/index.js && terser dist/index.js --compress passes=3,pure_getters=true --mangle --output dist/index.js",
51
+ "check": "tsc --noEmit -p tsconfig.json",
52
+ "test": "node test/verify.test.mjs"
53
53
  }
54
- }
54
+ }