@yandy0725/pi-ask-user 0.2.0 → 0.3.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 CHANGED
@@ -58,7 +58,7 @@ The registered tool name is:
58
58
  | `options` | `(string \| {title, description?})[]?` | `[]` | Multiple-choice options |
59
59
  | `allowMultiple` | `boolean?` | `false` | Enable multi-select mode |
60
60
  | `allowFreeform` | `boolean?` | `true` | Add a "Type something" freeform option |
61
- | `allowComment` | `boolean?` | `false` | Expose a user-toggleable extra-context option in the custom UI (`ctrl+g` or the toggle row) and collect an optional comment in fallback dialogs |
61
+ | `allowComment` | `boolean?` | `true` | Expose a user-toggleable extra-context option in the custom UI (`ctrl+g` or the toggle row) and collect an optional comment in fallback dialogs |
62
62
  | `displayMode` | `"overlay" \| "inline"?` | env var or `"overlay"` | Controls custom UI rendering: `overlay` shows the centered modal (current behavior), `inline` renders without overlay framing |
63
63
  | `overlayToggleKey` | `string?` | env var or `"alt+o"` | Shortcut for hiding/showing the overlay popup (overlay mode only). Pi-TUI key spec, e.g. `"alt+o"`, `"ctrl+shift+h"`. Pass `"off"` to disable. |
64
64
  | `commentToggleKey` | `string?` | env var or `"ctrl+g"` | Shortcut for toggling the optional comment/extra-context row when `allowComment: true`. Pass `"off"` to disable. |
package/README.zh.md CHANGED
@@ -58,7 +58,7 @@ pi install npm:@yandy0725/pi-ask-user
58
58
  | `options` | `(string \| {title, description?})[]?` | `[]` | 多选选项 |
59
59
  | `allowMultiple` | `boolean?` | `false` | 启用多选模式 |
60
60
  | `allowFreeform` | `boolean?` | `true` | 添加"自定义输入"自由文本选项 |
61
- | `allowComment` | `boolean?` | `false` | 在自定义 UI 中提供可切换的额外上下文选项(`ctrl+g` 或切换行),并在回退对话框中收集可选注释 |
61
+ | `allowComment` | `boolean?` | `true` | 在自定义 UI 中提供可切换的额外上下文选项(`ctrl+g` 或切换行),并在回退对话框中收集可选注释 |
62
62
  | `displayMode` | `"overlay" \| "inline"?` | 环境变量或 `"overlay"` | 控制自定义 UI 渲染:`overlay` 显示居中模态框(当前行为),`inline` 不显示叠加框架渲染 |
63
63
  | `overlayToggleKey` | `string?` | 环境变量或 `"alt+o"` | 隐藏/显示叠加弹窗的快捷键(仅 overlay 模式)。Pi-TUI 键位格式,例如 `"alt+o"`、`"ctrl+shift+h"`。传入 `"off"` 禁用。 |
64
64
  | `commentToggleKey` | `string?` | 环境变量或 `"ctrl+g"` | 当 `allowComment: true` 时切换可选注释/额外上下文行的快捷键。传入 `"off"` 禁用。 |
package/index.ts CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  truncateToWidth,
33
33
  wrapTextWithAnsi,
34
34
  } from "@earendil-works/pi-tui";
35
- import { type TUnsafe, Type } from "@sinclair/typebox";
35
+ import { type TUnsafe, Type } from "typebox";
36
36
  import { type QuestionOption, renderSingleSelectRows } from "./src/single-select-layout.js";
37
37
 
38
38
  const _require = createRequire(import.meta.url);
@@ -1570,7 +1570,7 @@ export default function (pi: ExtensionAPI) {
1570
1570
  allowMultiple: Type.Optional(Type.Boolean({ description: "Allow selecting multiple options. Default: false" })),
1571
1571
  allowFreeform: Type.Optional(Type.Boolean({ description: "Add a freeform text option. Default: true" })),
1572
1572
  allowComment: Type.Optional(
1573
- Type.Boolean({ description: "Collect an optional comment after selecting one or more options. Default: false" }),
1573
+ Type.Boolean({ description: "Collect an optional comment after selecting one or more options. Default: true" }),
1574
1574
  ),
1575
1575
  displayMode: Type.Optional(
1576
1576
  StringEnum(["overlay", "inline"] as const, {
@@ -1609,7 +1609,7 @@ export default function (pi: ExtensionAPI) {
1609
1609
  options: rawOptions = [],
1610
1610
  allowMultiple = false,
1611
1611
  allowFreeform = true,
1612
- allowComment = false,
1612
+ allowComment = true,
1613
1613
  displayMode,
1614
1614
  overlayToggleKey,
1615
1615
  commentToggleKey,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.0",
6
+ "version": "0.3.0",
7
7
  "description": "Interactive ask_user tool for pi-coding-agent with searchable split-pane selection UI, multi-select, and freeform input",
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -25,8 +25,7 @@
25
25
  "test:watch": "vitest",
26
26
  "typecheck": "tsc --noEmit",
27
27
  "lint": "biome lint .",
28
- "format": "biome format --write .",
29
- "check": "biome check ."
28
+ "format": "biome format --write ."
30
29
  },
31
30
  "pi": {
32
31
  "extensions": [
@@ -39,12 +38,13 @@
39
38
  "peerDependencies": {
40
39
  "@earendil-works/pi-coding-agent": ">=0.80.2",
41
40
  "@earendil-works/pi-tui": ">=0.80.2",
42
- "@sinclair/typebox": "*"
41
+ "typebox": "*"
43
42
  },
44
43
  "devDependencies": {
45
- "@biomejs/biome": "^2.5.0",
46
- "@types/node": "^22.0.0",
47
- "typescript": "~5.7.0",
48
- "vitest": "^3.0.0"
44
+ "@biomejs/biome": "^2.5.14",
45
+ "@types/node": "^26.6.2",
46
+ "typebox": "^1.3.34",
47
+ "typescript": "~7.0.2",
48
+ "vitest": "^5.0.1"
49
49
  }
50
50
  }