@zhushanwen/pi-ask-user 7.0.14 → 7.0.16
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/package.json +6 -6
- package/src/question-view.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-ask-user",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.16",
|
|
4
4
|
"description": "Inline adaptive ask_user tool for Pi — single/multi-question structured input with split-pane preview, inline editor and optional comments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"ARCHITECTURE.md"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xyz-agent/extension-protocol": "0.
|
|
33
|
-
"@zhushanwen/pi-extension-logger": "0.3.
|
|
32
|
+
"@xyz-agent/extension-protocol": "0.7.0",
|
|
33
|
+
"@zhushanwen/pi-extension-logger": "0.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
36
|
+
"@earendil-works/pi-tui": "^0.84.4",
|
|
37
37
|
"@types/node": "^24.0.0",
|
|
38
38
|
"@vitest/coverage-v8": "^4.1.9",
|
|
39
39
|
"fast-check": "^4.9.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"vitest": "^4.1.8"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@earendil-works/pi-coding-agent": "^0.84.
|
|
45
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
44
|
+
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
45
|
+
"@earendil-works/pi-tui": "^0.84.4",
|
|
46
46
|
"typebox": "*"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
package/src/question-view.ts
CHANGED
|
@@ -18,6 +18,8 @@ const SPLIT_PANE_LEFT_RATIO = 0.42;
|
|
|
18
18
|
const DESCRIPTION_INDENT_MULTI = 10;
|
|
19
19
|
const DESCRIPTION_INDENT_SINGLE = 8;
|
|
20
20
|
const PREVIEW_MIN_WIDTH = 10;
|
|
21
|
+
/** 分屏右列(详情预览)最小行数(左列较短时占位,避免预览区域过矮)。 */
|
|
22
|
+
const PREVIEW_MIN_LINES = 8;
|
|
21
23
|
const QUESTION_TEXT_MARGIN = 2;
|
|
22
24
|
|
|
23
25
|
export interface DisplayOption {
|
|
@@ -238,7 +240,7 @@ function buildSplitPane(
|
|
|
238
240
|
const leftCtx: RenderContext = { ...ctx, width: split.left };
|
|
239
241
|
const rightCtx: RenderContext = { ...ctx, width: split.right };
|
|
240
242
|
const leftLines = buildOptionLines(leftCtx, true);
|
|
241
|
-
const rightLines = buildPreviewLines(rightCtx, Math.max(leftLines.length,
|
|
243
|
+
const rightLines = buildPreviewLines(rightCtx, Math.max(leftLines.length, PREVIEW_MIN_LINES));
|
|
242
244
|
const rowCount = Math.max(leftLines.length, rightLines.length);
|
|
243
245
|
const sep = t.fg("dim", SPLIT_PANE_SEPARATOR);
|
|
244
246
|
for (let i = 0; i < rowCount; i++) {
|