@fyeeme/pi-ask-user 2.0.0 → 2.0.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/CHANGELOG.md +33 -30
- package/README.md +99 -79
- package/index.ts +473 -814
- package/package.json +6 -3
- package/src/ask-dialog.ts +1115 -0
- package/src/ask-legacy.ts +642 -0
- package/src/compat.ts +104 -0
- package/src/countdown-timer.ts +83 -0
- package/src/overlay-box.ts +53 -0
- package/src/types.ts +78 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,52 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
## [2.0.
|
|
5
|
+
## [2.0.2] - 2026-09-09
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Fixed
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Terminal bell fires only in TUI mode (`ctx.mode === "tui"`) — RPC stdout is the JSON protocol channel.
|
|
10
|
+
- Removed an unreachable empty-questions error branch (the schema's `minItems: 1` already rejects it).
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
- Per-question status strip (`●`/`○` chips labeled with `header`) showing which questions are answered.
|
|
13
|
-
- Inline free-text editor for `Other` answers and notes: the option list stays visible while typing, `esc` returns to the rows, an empty submit declines, and revising prefills the previous text. The dialog no longer closes and reopens around a plain input.
|
|
14
|
-
- Numbered options: rows render `1. label` and answers echo the number back to the LLM (`auth: 1. JWT`).
|
|
15
|
-
- `tab` / `shift+tab` as aliases for `right` / `left` question navigation.
|
|
12
|
+
## [2.0.1] - 2026-08-27
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Single-select questions no longer look multi-selectable: `space` is now a no-op outside `multi` mode, and selecting a different option replaces the previous `(o)` marker instead of stacking another one.
|
|
20
|
-
- Multi-select `enter` with nothing checked is now a no-op instead of recording an empty answer that lit the status chip `●` but echoed `(no selection)` back to the LLM. Users who mean "none of these" can say so via `Other`.
|
|
14
|
+
Renamed to `@fyeeme/pi-ask-user` (formerly `@fyeeme/pi-omp-ask`, whose 2.0.0 release carried this codebase); the lightweight `ask_user` extension formerly published under this name now lives as `@fyeeme/pi-ask-user-lite`.
|
|
21
15
|
|
|
22
16
|
### Changed
|
|
23
17
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
18
|
+
- README synced with the current code: per-answer-note and chat-redirect references removed, the transcript description updated to the compact one-line render, and the timeout expiry wording fixed (recommended option, not "noted or recommended"); added a sister-extension comparison table and a user-facing Features section.
|
|
19
|
+
- Transcript subtraction: `renderResult` now renders one compact `question → answer` line per question (multi-question lines prefixed `[id]`) instead of a framed block that re-listed every option with radio/checkbox markers; unselected options no longer appear in the transcript, and the framed chrome (`FramedComponent`) is gone.
|
|
20
|
+
- The Submit review tab now appears only for 3+ questions or any `multi` question; 1–2 single-select questions advance Enter-to-submit without a review page.
|
|
21
|
+
- Side-by-side preview: on wide terminals (inner width ≥ 80) questions carrying previews split into an options pane and a preview pane that follows the cursor (fzf-style, anchored at the top of the body); narrow terminals keep the inline preview under each option.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
- IME drift in the custom-input prompt, fixed the way pi's TUI documents it (Focusable / "Container Components with Embedded Inputs"): the dialog now implements `Focusable` (propagating focus to an embedded pi-tui `Input` while the prompt is open), and the `Input` renders the input line itself — emitting `CURSOR_MARKER` at the cursor so the TUI positions the hardware cursor and the IME candidate window at the input point — with the full pi-tui input semantics for free: multi-char CJK IME commits, grapheme-aware cursor/delete (emoji as one unit), bracketed paste buffering, kitty CSI-u printable decoding, undo, and kill ring.
|
|
26
|
+
- Transcript no longer shows the questions twice around an ask: `renderCall` now renders only a `Ask · N questions`
|
|
27
|
+
summary line while the dialog is pending, and the full framed question/options/answer block renders once from
|
|
28
|
+
`renderResult` after the user answers. omp updates the framed block in place; pi's `ToolExecutionComponent` appends
|
|
29
|
+
result renders below call renders, so the call-side block was removed instead of duplicated. The call-side
|
|
30
|
+
streaming-args normalization (`normalizeRenderOptions`/`normalizeRenderQuestions`) became dead code and was removed.
|
|
31
|
+
### Removed
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
- The per-answer note subsystem (`n` key, `✎ note` markers, note lines in the Submit review and transcript, `note` fields in results/details, and the legacy path's note plumbing).
|
|
34
|
+
- Dead chat-redirect surface: `ExtensionAskDialogChatResult`, `AskToolDetails.chatRedirect`/`questions`, and the unreachable `kind: "chat"` branches (the dialog never produced a chat result).
|
|
30
35
|
|
|
31
|
-
- `/ask-demo` command: interactive four-phase battery covering all question types, free-form `Other` input, timeout auto-selection, chat redirect, and cancel semantics — each phase reports the exact text the LLM would receive.
|
|
32
36
|
|
|
33
|
-
## [
|
|
37
|
+
## [0.1.0] - 2026-08-23
|
|
34
38
|
|
|
35
|
-
###
|
|
39
|
+
### Fixed
|
|
36
40
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- `
|
|
40
|
-
-
|
|
41
|
-
- Reserved-label collision check in the execution path (fails fast instead of rendering duplicate rows).
|
|
42
|
-
- Agent abort now closes an open dialog and settles the tool as cancelled instead of leaving it pending.
|
|
41
|
+
- Embedded prompt (Other/note) submit ordering: the input is now applied to state before the deferred timeout runs, so a countdown that expires mid-typing keeps the user's answer instead of discarding it and force-picking (omp `#promptForCustomInput` ordering; the old behavior was also asserted by a test, now corrected).
|
|
42
|
+
- Transcript rendering now measures at the live frame width instead of a hardcoded 80 columns, so narrow terminals no longer clip question text.
|
|
43
|
+
- `raceWithSignal` propagates dialog failures instead of swallowing them as a phantom "user cancelled" outcome (matches omp `untilAborted` and the local legacy-path helper).
|
|
44
|
+
- Restored omp's `helpText` construction for the legacy path's select dialogs.
|
|
43
45
|
|
|
44
46
|
### Changed
|
|
45
47
|
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
## [1.0.0] - 2026-07-20
|
|
48
|
+
- Terminal bell on ask can be disabled with `PI_OMK_ASK_NOTIFY=0`; the `timeoutSeconds` schema description now states exactly when the countdown resets and what expiry picks.
|
|
49
|
+
- Removed unused imports and zero-call-site helper exports; typed the test harness result.
|
|
49
50
|
|
|
50
51
|
### Added
|
|
51
52
|
|
|
52
|
-
- `
|
|
53
|
-
-
|
|
53
|
+
- Source migration of oh-my-pi's `ask` tool into a pi extension: `AskTool.execute` (chat redirect, empty-single-select cancellation, multi-question navigation loop), the tabbed `AskDialogComponent` (Submit review tab, radio/checkbox markers, per-answer notes, markdown/code previews, fixed-height panel, cursor-following scroll, inactivity countdown with deferred expiry mid-prompt), the legacy per-question selector path (multi-select toggle loop, `+ Done selecting`, timeout tolerance heuristic), the countdown timer, overlay box chrome, theme symbol defaults, and the `ask.md` tool description.
|
|
54
|
+
- pi host adaptation: rich dialog via `ctx.ui.custom()`, RPC degradation to native `ui.select`/`ui.editor`, headless hiding through `session_start` + `setActiveTools` with an execute backstop, `executionMode: "sequential"` in place of omp's exclusive concurrency, `timeoutSeconds` parameter replacing the settings-driven `ask.timeout`, terminal bell replacing desktop notifications, and keybinding-aware select keys via the injected `KeybindingsManager`.
|
|
55
|
+
- omp error semantics: cancel aborts the agent turn (`ctx.abort()` + tool error); unreachable hosts raise a distinct "question was never shown" error.
|
|
56
|
+
- 45 tests covering the dialog component, the legacy selector logic (driven against the full omp UIContext contract), and the tool's host gating.
|
package/README.md
CHANGED
|
@@ -1,75 +1,129 @@
|
|
|
1
1
|
# pi-ask-user
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
- **Faithful omp port** — the tabbed ask dialog (Submit review tab, radio/checkbox markers, markdown/code previews with fence splitting and render caching), the inactivity countdown, and the legacy per-question selector path carried over file-by-file.
|
|
4
|
+
- **Compact transcript** — the pending call renders only an `Ask · N questions` summary; the result renders one compact `question → answer` line per question (multi-question lines prefixed `[id]`) — no framed block, no re-listed options.
|
|
5
|
+
- **Robustness fixes over the omp source** — countdown expiry mid-typing keeps the user's answer, live frame-width measurement replaces the hardcoded 80 columns, and dialog failures propagate instead of degrading to a phantom "user cancelled".
|
|
6
|
+
- **Headless-safe** — print/JSON hosts cannot prompt, so the tool is stripped from the active set; a stray call throws a "question was never shown" error instead of hanging.
|
|
4
7
|
|
|
5
|
-
-
|
|
6
|
-
- **Inline free-text editor** — `Other` answers and notes type directly inside the dialog (option list stays visible, `esc` returns, empty submit declines).
|
|
7
|
-
- **Numbered options** — rows render `1. label` and answers echo the number back (`auth: 1. JWT`), plus a per-question status strip and `tab`/`shift+tab` navigation.
|
|
8
|
-
- Selection semantics hardened: single-select no longer stacks markers, multi-select `enter` with nothing checked is a no-op, custom `Other` answers clear stale checkboxes.
|
|
8
|
+
oh-my-pi's `ask` tool, migrated to a [pi](https://github.com/earendil-works/pi-coding-agent) extension.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
This is a source migration of the interactive ask feature from
|
|
11
|
+
[oh-my-pi](https://github.com/can1357/oh-my-pi) (a fork of badlogic/pi-mono), not a reimplementation: the tool flow,
|
|
12
|
+
the tabbed ask dialog, the legacy per-question selector path, and the result wording are carried over from
|
|
13
|
+
`packages/coding-agent/src/tools/ask.ts` and `src/modes/components/ask-dialog.ts`, then adapted file-by-file to pi's
|
|
14
|
+
public extension API. Sister extension of [pi-ask-user-lite](../pi-ask-user-lite); the two expose different tools
|
|
15
|
+
(`ask` vs `ask_user`) and should not be enabled together — see
|
|
16
|
+
[pi-ask-user or pi-ask-user-lite?](#pi-ask-user-or-pi-ask-user-lite) below.
|
|
13
17
|
|
|
14
18
|
## Features
|
|
15
19
|
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
- **Tabbed multi-question dialog** — one question per tab with `header` chips in the tab bar, radio markers for single-select, checkboxes for `multi`; select keys resolve through the injected `KeybindingsManager`, so rebound keys keep working.
|
|
21
|
+
- **Submit review gate** — calls with 3+ questions or any `multi` question get a Submit review tab before the answers go out; 1–2 single-select questions advance Enter-to-submit without a review page.
|
|
22
|
+
- **Markdown/code previews** — an option's `preview` (markdown, fenced code) renders fence-split with render caching. On wide terminals (inner width ≥ 80) the dialog splits into an options pane and a cursor-following preview pane (fzf-style); narrow terminals keep the preview inline under the cursored row.
|
|
23
|
+
- **Inline `Other` input with real editor semantics** — the dialog implements pi's `Focusable` contract and embeds a pi-tui `Input` that renders the input line itself: the hardware cursor and IME candidate window sit at the input point, with multi-char CJK IME commits, grapheme-aware cursor/delete (emoji as one unit), bracketed paste, kitty CSI-u decoding, undo, and kill ring. A countdown expiring mid-typing keeps the typed answer.
|
|
24
|
+
- **Inactivity countdown** — `timeoutSeconds` is an idle budget: dialog keypresses reset it (not while typing); expiry auto-picks the recommended option (or the first) and marks it `auto-selected after timeout`.
|
|
25
|
+
- **Compact transcript** — the pending call renders a single `Ask · N questions` line; the result renders one compact `question → answer` line per question (`[id]`-prefixed on multi-question calls) without re-listing unselected options.
|
|
26
|
+
- **omp semantics kept** — cancelling aborts the agent turn; headless hosts (print/JSON) strip the tool at `session_start` with an execute backstop that errors "question was never shown"; a terminal bell rings on ask (opt out with `PI_OMK_ASK_NOTIFY=0`); answers persist in the tool result `details`.
|
|
27
|
+
|
|
28
|
+
## What migrated
|
|
29
|
+
|
|
30
|
+
| oh-my-pi source | Here | Notes |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `tools/ask.ts` — `AskTool.execute` | `index.ts` | result-count validation, empty-single-select cancellation (#8265), multi-question loop with navigation state, cancel-aborts-turn semantics |
|
|
33
|
+
| `tools/ask.ts` — `askSingleQuestion` + custom-input title windowing | `src/ask-legacy.ts` | multi-select toggle loop with `+ Done selecting`, recommended suffixes, `Other` via editor, timeout tolerance heuristic (`TIMEOUT_DETECTION_TOLERANCE_MS`), `(i/n)` progress titles |
|
|
34
|
+
| `modes/components/ask-dialog.ts` — `AskDialogComponent` | `src/ask-dialog.ts` | tabbed dialog, Submit review tab, radio/checkbox markers, markdown/code previews with fence splitting and render caching, fixed-height panel sizing, cursor-following scroll, inactivity countdown, malformed-args normalization |
|
|
35
|
+
| `modes/components/countdown-timer.ts` | `src/countdown-timer.ts` | verbatim |
|
|
36
|
+
| `modes/components/overlay-box.ts` (subset) | `src/overlay-box.ts` | `topBorder`/`divider`/`row`/`bottomBorder`/`fit` |
|
|
37
|
+
| `prompts/tools/ask.md` | `index.ts` | tool description, verbatim |
|
|
38
|
+
| theme symbol defaults (`modes/theme/symbols.ts`) | `src/compat.ts` | `❯ ◉ ○ ☑ ☐ ╭╮╰╯` |
|
|
39
|
+
|
|
40
|
+
## Adaptation notes (omp surface → pi extension API)
|
|
41
|
+
|
|
42
|
+
Each omp-internal surface maps onto the closest public pi extension boundary:
|
|
43
|
+
|
|
44
|
+
- **`AgentTool` + `createIf` gate** → `pi.registerTool` + `session_start` strip: print/JSON hosts cannot prompt, so the
|
|
45
|
+
tool is removed from the active set; if it is still called, `execute` throws with a "question was never shown" error
|
|
46
|
+
so the model stops retrying instead of misreading a cancel.
|
|
47
|
+
- **ArkType schema + reserved-label narrow** → typebox schema; the narrow runs at the top of `execute`.
|
|
48
|
+
- **`concurrency: "exclusive"`** → `executionMode: "sequential"` (pi tool batches).
|
|
49
|
+
- **`ExtensionUIContext.askDialog`** → `ctx.ui.custom()` mounting `AskDialogComponent`.
|
|
50
|
+
- **`#presentDialog` serial queue** → not needed: `ui.custom()` is a single editor slot and the sequential execution
|
|
51
|
+
mode already serializes ask calls.
|
|
52
|
+
- **Nested `HookEditorComponent` prompts** (Other) → an embedded prompt mode inside the dialog: pi extensions own
|
|
53
|
+
one custom component slot, so the dialog renders the input row itself (`#promptActive`) with Enter confirm / Esc back.
|
|
54
|
+
- **Keybindings** — omp's global `matchesSelectUp/…` matchers resolve through the `KeybindingsManager` pi injects into
|
|
55
|
+
`ui.custom()`, so rebound select keys keep working; footer hints use the configured keys.
|
|
56
|
+
- **`ui.select` dialog options** — pi's select accepts only `{signal, timeout}`. The legacy path keeps the full omp
|
|
57
|
+
`UIContext` logic (initial index, navigation, markers, timeout callbacks) and degrades on pi: no radio/checkbox
|
|
58
|
+
markers, no initial cursor, no ←/→ question navigation, and option descriptions are dropped from the visible list.
|
|
59
|
+
- **`ui.editor` prompt style** → pi's `ui.editor` (multi-line) with a signal race; falls back to `ui.input`.
|
|
60
|
+
- **settings `ask.timeout` / `ask.notify`** → `timeoutSeconds` tool parameter + terminal bell, opt-out with
|
|
61
|
+
`PI_OMK_ASK_NOTIFY=0` (pi extensions cannot read pi settings or send desktop notifications).
|
|
62
|
+
- **`ToolAbortError` + `context.abort()`** → `ctx.abort()` + thrown error (cancel aborts the agent turn, omp semantics).
|
|
63
|
+
- **Transcript renderer** — omp merges call+result in one framed block that updates in place when the user answers;
|
|
64
|
+
pi's tool rows append the result render below the call render, so the call slot renders only a `Ask · N questions`
|
|
65
|
+
summary line while pending, and the result slot renders one compact `question → answer` line per question
|
|
66
|
+
(multi-question lines prefixed `[id]`, with the `auto-selected after timeout — not a user choice` marker).
|
|
67
|
+
|
|
68
|
+
**Dropped (no pi extension surface):** TTS vocalizer, plan-mode timeout suppression, collab guest racing, ACP
|
|
69
|
+
elicitation forms, `/tree` re-answer, `loadMode: "discoverable"`, the draft-editor input guard, and
|
|
70
|
+
`renderInlineMarkdown` for labels (labels render as plain text; block markdown in questions/previews still uses pi's
|
|
71
|
+
Markdown component + `getMarkdownTheme`). Post-2.0 the per-answer note subsystem and the dead chat-redirect surface
|
|
72
|
+
were also removed (see [Unreleased](./CHANGELOG.md)).
|
|
28
73
|
|
|
29
74
|
## Tool schema
|
|
30
75
|
|
|
31
76
|
```text
|
|
32
|
-
|
|
77
|
+
ask(
|
|
33
78
|
questions: [
|
|
34
79
|
{
|
|
35
80
|
id: string // stable identifier, echoed in the answer
|
|
36
81
|
question: string // shown to the user
|
|
37
|
-
header?: string // short chip
|
|
38
|
-
options: [{
|
|
82
|
+
header?: string // short chip in the tab bar
|
|
83
|
+
options: [{
|
|
39
84
|
label,
|
|
40
85
|
description?, // tradeoff text under the label
|
|
41
|
-
preview? //
|
|
86
|
+
preview? // markdown / fenced code shown under the cursored option
|
|
42
87
|
}]
|
|
43
88
|
multi?: boolean // allow multiple selections
|
|
44
|
-
recommended?: number // 0-based index
|
|
89
|
+
recommended?: number // 0-based index; "(Recommended)" added automatically
|
|
45
90
|
}
|
|
46
91
|
],
|
|
47
|
-
timeoutSeconds?: number //
|
|
92
|
+
timeoutSeconds?: number // omp settings ask.timeout, parameterized; idle budget,
|
|
93
|
+
// dialog keypresses reset it (not while typing Other),
|
|
94
|
+
// expiry auto-picks the recommended option (or the first)
|
|
48
95
|
)
|
|
49
96
|
```
|
|
50
97
|
|
|
51
|
-
##
|
|
98
|
+
## Result semantics (omp wording, verbatim)
|
|
52
99
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| `esc` | Cancel the whole call (inside the inline editor: back to the rows) |
|
|
100
|
+
```text
|
|
101
|
+
User selected: JWT
|
|
102
|
+
User provided custom input: mTLS everywhere
|
|
103
|
+
User answers:
|
|
104
|
+
auth: JWT
|
|
105
|
+
deploy: [staging, prod]
|
|
106
|
+
deploy: staging (auto-selected after timeout)
|
|
107
|
+
```
|
|
62
108
|
|
|
63
|
-
|
|
109
|
+
Cancelling (Escape) aborts the agent turn — omp's "cancel the whole call" semantics, via `ctx.abort()` plus a tool
|
|
110
|
+
error. An unreachable host (print/JSON) raises a different error stating the question was never displayed.
|
|
64
111
|
|
|
65
|
-
|
|
112
|
+
## pi-ask-user or pi-ask-user-lite?
|
|
66
113
|
|
|
67
|
-
|
|
68
|
-
2. **Timeout** — a dialog with a 6-second budget; do nothing and watch it auto-select the recommended option.
|
|
69
|
-
3. **Chat redirect** — pick the `Chat about this` row.
|
|
70
|
-
4. **Cancel** — press `Esc` on the first of two questions and confirm the second is never asked.
|
|
114
|
+
Sister packages with intentionally different scopes — pick one, do not enable both:
|
|
71
115
|
|
|
72
|
-
|
|
116
|
+
| | pi-ask-user (this one, tool `ask`) | pi-ask-user-lite (tool `ask_user`) |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| Lineage | File-by-file source port of oh-my-pi's `ask` tool | Pi-native reimplementation of the ask flow |
|
|
119
|
+
| Dialog | Tabbed dialog; Submit review tab for 3+ questions or any `multi`; fzf-style side-by-side preview pane on wide terminals | Single question-page dialog with `[n/m]` counter and per-question status strip; review page after the last question |
|
|
120
|
+
| Option rows | omp radio/checkbox markers | Numbered (`1. label`); answers echo the number back |
|
|
121
|
+
| Previews | Markdown/code, fence-split with render caching | Plain `preview` lines under the cursored option |
|
|
122
|
+
| Timeout | Inactivity countdown reset by keypresses (paused while typing); expiry auto-picks the recommended option | Whole-dialog budget; expiry auto-selects recommended and flags `timedOut` |
|
|
123
|
+
| Notes | Not available (removed post-2.0) | Per-answer notes via `n`, echoed to the LLM |
|
|
124
|
+
| Chat redirect | Removed (dead omp surface) | Reserved `Chat about this` row |
|
|
125
|
+
| Cancel | Aborts the agent turn (omp semantics) | Tool settles cancelled; the LLM is told to proceed conservatively |
|
|
126
|
+
| Extras | Terminal bell (opt out with `PI_OMK_ASK_NOTIFY=0`) | `/ask-demo` interactive battery |
|
|
73
127
|
|
|
74
128
|
## Install
|
|
75
129
|
|
|
@@ -87,48 +141,14 @@ Or load ad hoc:
|
|
|
87
141
|
pi -e ./packages/extensions/pi-ask-user/index.ts
|
|
88
142
|
```
|
|
89
143
|
|
|
90
|
-
## Usage
|
|
91
|
-
|
|
92
|
-
Just ask the agent something ambiguous; with the tool active the LLM can call:
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"questions": [
|
|
97
|
-
{
|
|
98
|
-
"id": "storage",
|
|
99
|
-
"question": "Which storage backend should this feature use?",
|
|
100
|
-
"options": [
|
|
101
|
-
{ "label": "SQLite", "description": "Zero-config, file-based" },
|
|
102
|
-
{ "label": "PostgreSQL", "description": "Full server, richer types" }
|
|
103
|
-
],
|
|
104
|
-
"recommended": 0
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"id": "flags",
|
|
108
|
-
"question": "Which extras should be enabled?",
|
|
109
|
-
"multi": true,
|
|
110
|
-
"options": [{ "label": "Telemetry" }, { "label": "Auto-update" }]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The user picks with arrow keys (`space` toggles in multi mode, `enter` submits, `←` revises earlier answers, `esc` cancels). Cancelling marks the call cancelled and tells the LLM to proceed conservatively.
|
|
117
|
-
|
|
118
|
-
## Boundaries
|
|
119
|
-
|
|
120
|
-
- Requires an interactive session (TUI or RPC); in print/JSON mode the tool errors out.
|
|
121
|
-
- No per-question timers: `timeoutSeconds` budgets the whole dialog, not each question.
|
|
122
|
-
- No TTS, system-level notifications, or `/tree` re-answer branching — pi's extension API does not expose those surfaces; answers remain inspectable via persisted `details`.
|
|
123
|
-
|
|
124
144
|
## Development
|
|
125
145
|
|
|
126
146
|
```bash
|
|
127
|
-
npm install
|
|
147
|
+
npm install
|
|
128
148
|
npm run typecheck
|
|
129
149
|
npm test
|
|
130
150
|
```
|
|
131
151
|
|
|
132
152
|
## License
|
|
133
153
|
|
|
134
|
-
MIT
|
|
154
|
+
MIT — the migrated oh-my-pi sources retain their upstream origin (can1357/oh-my-pi, fork of badlogic/pi-mono).
|