@ftrdotdev/pi-inquiry 0.5.0 → 0.5.2
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 +8 -8
- package/src/core/domain.ts +2 -2
- package/src/core/scene.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftrdotdev/pi-inquiry",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Interactive questions for the pi coding agent: a single `question` tool renders option lists, tabbed forms, and free-text answers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect",
|
|
@@ -34,24 +34,24 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"prepare": "bun effect-tsgo patch --typescript --oxlint",
|
|
38
37
|
"test": "vitest run",
|
|
39
38
|
"test:watch": "vitest",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
40
|
"lint": "oxlint && oxlint --type-aware -A all -D typescript/unbound-method",
|
|
41
41
|
"lint:fix": "oxlint --fix",
|
|
42
42
|
"fmt": "oxfmt -c oxfmt.config.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ftrdotdev/pi-tui": "^0.5.
|
|
46
|
-
"effect": "4.0.0
|
|
45
|
+
"@ftrdotdev/pi-tui": "^0.5.2",
|
|
46
|
+
"effect": "4.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@earendil-works/pi-ai": "0.
|
|
50
|
-
"@effect/tsgo": "0.
|
|
51
|
-
"@effect/vitest": "4.0.0
|
|
49
|
+
"@earendil-works/pi-ai": "1.0.0",
|
|
50
|
+
"@effect/tsgo": "0.47.2",
|
|
51
|
+
"@effect/vitest": "4.0.0",
|
|
52
52
|
"@types/bun": "latest",
|
|
53
53
|
"oxfmt": "^0.63.0",
|
|
54
|
-
"oxlint": "1.
|
|
54
|
+
"oxlint": "1.82.0",
|
|
55
55
|
"oxlint-tsgolint": "7.0.2001",
|
|
56
56
|
"typescript": "7.0.2",
|
|
57
57
|
"vitest": "^4.1.10"
|
package/src/core/domain.ts
CHANGED
|
@@ -65,12 +65,12 @@ export type QuestionListParams = typeof QuestionListParamsSchema.Type;
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* JSON Schema form of the wire params, passed to pi as the tool's
|
|
68
|
-
* `parameters`. `
|
|
68
|
+
* `parameters`. `onExcessProperty: "ignore"` mirrors the legacy typebox
|
|
69
69
|
* contract (unknown keys such as the old `value` field are tolerated) and
|
|
70
70
|
* matches Effect's own struct decoding, which ignores unknown keys.
|
|
71
71
|
*/
|
|
72
72
|
export const QuestionListParamsJsonSchema = Schema.toJsonSchemaDocument(QuestionListParamsSchema, {
|
|
73
|
-
|
|
73
|
+
onExcessProperty: "ignore",
|
|
74
74
|
}).schema;
|
|
75
75
|
|
|
76
76
|
/** Decode raw tool arguments into validated params. Throws `Schema.SchemaError` on invalid input. */
|
package/src/core/scene.ts
CHANGED
|
@@ -373,7 +373,7 @@ export const buildScene = (state: MachineState, width: number): Scene => {
|
|
|
373
373
|
* pre-wrapped, so this should never truncate once widths are accurate.
|
|
374
374
|
*/
|
|
375
375
|
export const clampLine = (content: SceneLine, width: number): SceneLine => {
|
|
376
|
-
const out:
|
|
376
|
+
const out: Span[] = [];
|
|
377
377
|
let used = 0;
|
|
378
378
|
for (const s of content) {
|
|
379
379
|
const w = visibleWidth(s.text);
|