@luxass/pi-questions 0.1.1 → 0.1.3
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 +6 -4
- package/package.json +4 -1
- package/src/dialog.ts +376 -269
- package/src/index.ts +16 -11
- package/src/questions.ts +76 -124
- package/src/viewport.ts +40 -0
package/README.md
CHANGED
|
@@ -10,13 +10,13 @@ pi install npm:@luxass/pi-questions
|
|
|
10
10
|
|
|
11
11
|
Requires interactive Pi. RPC, JSON, and print modes are not supported. There are no commands or configuration files.
|
|
12
12
|
|
|
13
|
-
With Herdr's Pi integration installed and loaded, Herdr marks the agent as blocked while a questionnaire is open. Submission, cancellation, an abort, or an error clears this questionnaire's
|
|
13
|
+
With Herdr's Pi integration installed and loaded, Herdr marks the agent as blocked while a questionnaire is open. The bundled `@luxass/herdr-agent-shared` library adds the sidebar label `Waiting for answers`. Include `state_text` in Herdr's agent sidebar rows to display it. No extra Pi extension is needed. Submission, cancellation, an abort, or an error clears this questionnaire's state and label. Without Herdr, questionnaires work as usual.
|
|
14
14
|
|
|
15
15
|
## Use
|
|
16
16
|
|
|
17
17
|
The model can use `ask_questions` without an explicit request. Its instructions tell it to clarify unclear goals, scope, and constraints before implementing a new system or substantial feature. It skips questions you already answered and routine implementation details. You can also ask it to use the tool explicitly.
|
|
18
18
|
|
|
19
|
-
Each questionnaire accepts one to four questions, with two to
|
|
19
|
+
Each questionnaire accepts one to four questions, with two to six options per question.
|
|
20
20
|
|
|
21
21
|
The questionnaire opens below the conversation in Pi's editor area. With one question, confirming an answer submits it directly. With multiple questions, selecting an option moves to the next tab. The final Review tab lets you submit or cancel.
|
|
22
22
|
|
|
@@ -27,7 +27,7 @@ The questionnaire opens below the conversation in Pi's editor area. With one que
|
|
|
27
27
|
| Up / Down | Move between choices. |
|
|
28
28
|
| Enter | Choose an option, toggle a checkbox, or save custom text. |
|
|
29
29
|
| Space | Toggle an authored checkbox in a multi-select question. |
|
|
30
|
-
| 1–
|
|
30
|
+
| 1–6 | Choose the corresponding authored option. |
|
|
31
31
|
| n | Edit a question note, or a global note on the Review tab. |
|
|
32
32
|
| q / p | Read the complete question or the focused option preview. |
|
|
33
33
|
| Ctrl+] | Collapse or expand without losing answers or drafts. |
|
|
@@ -43,4 +43,6 @@ Press n outside text editors to add a note. Enter or Escape saves the note. Note
|
|
|
43
43
|
|
|
44
44
|
Cancelling discards all draft answers. The questionnaire also closes when the agent aborts its request. Unanswered questions remain undecided.
|
|
45
45
|
|
|
46
|
-
In fullscreen Pi, click
|
|
46
|
+
In fullscreen Pi, click an option label or any line of its description to choose it or toggle its checkbox. Click `Type something.` to write a custom answer. Next, Submit, and the Review actions appear as plain clickable rows. Clicking Next or Submit saves custom text that you are still editing.
|
|
47
|
+
|
|
48
|
+
Click a question header or Review to switch tabs. Clicking another tab saves an open note and keeps custom-answer drafts. Page Up, Page Down, and the mouse wheel scroll the conversation while you answer. In regular mode, use keyboard navigation and your terminal's scrollback controls.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/pi-questions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Ask structured questions in Pi with tabs, choices, notes, and Markdown previews.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@luxass/herdr-agent-shared": "^0.1.0"
|
|
28
|
+
},
|
|
26
29
|
"peerDependencies": {
|
|
27
30
|
"@earendil-works/pi-coding-agent": "*",
|
|
28
31
|
"@earendil-works/pi-tui": "*",
|