@xyz-agent/extension-protocol 0.2.0 → 0.3.1-dev.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/dist/index.d.mts +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -195,7 +195,7 @@ interface AskUserQuestion {
|
|
|
195
195
|
* - 有 options 时:默认 true,前端在选项末尾追加 Other 输入框;设 false 则不追加
|
|
196
196
|
* - 无 options 时:整个问题就是自由输入,此字段被忽略 */
|
|
197
197
|
allowOther?: boolean;
|
|
198
|
-
/**
|
|
198
|
+
/** 是否允许附加评论。选中后可追加短文本(4.0.1 restore:0.3.0 误删导致 pi-ask-user@4.0.0 ESM import 崩溃,见 .changeset/restore-ask-user-comment.md) */
|
|
199
199
|
allowComment?: boolean;
|
|
200
200
|
}
|
|
201
201
|
interface AskUserOption {
|
|
@@ -266,7 +266,7 @@ declare function askUserInteract(ctx: GuiContext, questions: AskUserQuestion[],
|
|
|
266
266
|
declare function getAskUserAnswer(answers: AskUserAnswers, question: AskUserQuestion): string | string[] | undefined;
|
|
267
267
|
/** 从 answers 中提取 Other 自由文本 */
|
|
268
268
|
declare function getAskUserOther(answers: AskUserAnswers, question: AskUserQuestion): string | undefined;
|
|
269
|
-
/** 从 answers
|
|
269
|
+
/** 从 answers 中提取评论(4.0.1 restore:ask-user TUI 评论模式与 renderer AskUserOverlay 仍消费此 helper) */
|
|
270
270
|
declare function getAskUserComment(answers: AskUserAnswers, question: AskUserQuestion): string | undefined;
|
|
271
271
|
/**
|
|
272
272
|
* 类型守卫:验证 unknown 是否为合法的 AskUserQuestion。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyz-agent/extension-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1-dev.0",
|
|
4
4
|
"description": "Extension GUI rendering protocol: types and helpers for pi extension dual-mode (TUI/GUI) rendering",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"module": "dist/index.mjs",
|