@juicesharp/rpiv-ask-user-question 0.12.7 → 0.13.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 +20 -5
- package/ask-user-question.ts +560 -224
- package/body-residual-spacer.ts +25 -0
- package/columns.ts +71 -0
- package/dialog-builder.ts +281 -0
- package/dispatch.ts +267 -0
- package/fixed-height-box.ts +32 -0
- package/multi-select-options.ts +121 -0
- package/package.json +11 -1
- package/preview-pane.ts +384 -0
- package/submit-picker.ts +62 -0
- package/tab-bar.ts +61 -0
- package/types.ts +117 -0
- package/wrapping-select.ts +39 -3
package/README.md
CHANGED
|
@@ -3,9 +3,26 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@juicesharp/rpiv-ask-user-question)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
Let the model ask
|
|
6
|
+
Let the model ask you structured clarifying questions instead of guessing. `rpiv-ask-user-question` adds the `ask_user_question` tool to [Pi Agent](https://github.com/badlogic/pi-mono) — a tabbed dialog with single- and multi-select questions, side-by-side previews, per-option notes, and a Submit tab that reviews answers before they go back to the model.
|
|
7
7
|
|
|
8
|
-

|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Multi-question dialogs** — ask several questions in one turn with a tab bar (`Tab` to switch).
|
|
13
|
+
- **Preview pane** — render an ASCII diagram, code snippet, or markdown next to each option, side-by-side or stacked depending on terminal width.
|
|
14
|
+
- **Per-option notes** — press `n` on a previewed option to attach a free-text note that travels back with the answer.
|
|
15
|
+
- **Multi-select questions** — checkboxes with `Space` to toggle, Enter-as-toggle on rows, a `Next` sentinel to advance, and toggles persisted across tab switches.
|
|
16
|
+
- **Submit tab** — review every answer before submitting; warns about unanswered questions and offers a Submit picker.
|
|
17
|
+
- **Chat row on every tab** — redirect the conversation without leaving the dialog.
|
|
18
|
+
- **"Other" free-text fallback** — type a custom answer when no option fits.
|
|
19
|
+
|
|
20
|
+
## Screens
|
|
21
|
+
|
|
22
|
+
| | |
|
|
23
|
+
|---|---|
|
|
24
|
+
|  |  |
|
|
25
|
+
|  |  |
|
|
9
26
|
|
|
10
27
|
## Install
|
|
11
28
|
|
|
@@ -17,9 +34,7 @@ Then restart your Pi session.
|
|
|
17
34
|
|
|
18
35
|
## Tool
|
|
19
36
|
|
|
20
|
-
- **`ask_user_question`** — present
|
|
21
|
-
(optionally) a multi-select toggle. Returns the user's selection or free-text
|
|
22
|
-
answer. See the tool's `promptGuidelines` for usage policy.
|
|
37
|
+
- **`ask_user_question`** — present one or more structured questions, each with 2+ options, optional `multiSelect`, optional per-option `preview`, and an optional free-text "Other" fallback. Returns the user's selection(s) plus any notes. See the tool's `promptGuidelines` for usage policy.
|
|
23
38
|
|
|
24
39
|
## License
|
|
25
40
|
|