@juicesharp/rpiv-ask-user-question 2.6.0 → 2.6.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/README.md CHANGED
@@ -52,6 +52,7 @@ Optional. Settings live in `~/.config/rpiv-ask-user-question/config.json`; the f
52
52
  | Setting | What it does | Default |
53
53
  | --- | --- | --- |
54
54
  | `collapseKey` | Key that collapses and expands the dialog. Accepts Pi keybinding ids such as `alt+o`; `"off"` disables the shortcut. | `"ctrl+]"` |
55
+ | `guidance.description` | Full replacement for the tool description the model sees. A non-empty string replaces the built-in text entirely — no merging. | built-in description |
55
56
  | `guidance.promptSnippet` | One-line description of the tool in the system prompt — tune how eagerly the model asks. | built-in snippet |
56
57
  | `guidance.promptGuidelines` | Usage guidelines given to the model, as a list of strings. | 4 built-in guidelines |
57
58
 
@@ -138,12 +138,7 @@ export const DEFAULT_PROMPT_GUIDELINES: string[] = [
138
138
  "Do not stack multiple ask_user_question calls back-to-back — group all clarifying questions into one invocation.",
139
139
  ];
140
140
 
141
- export function registerAskUserQuestionTool(pi: ExtensionAPI): void {
142
- const guidance = validateGuidanceFields(loadConfig().guidance);
143
- pi.registerTool({
144
- name: ASK_USER_QUESTION_TOOL_NAME,
145
- label: "Ask User Question",
146
- description: `Ask the user one or more structured questions during execution. Use when you need to:
141
+ export const DEFAULT_TOOL_DESCRIPTION = `Ask the user one or more structured questions during execution. Use when you need to:
147
142
  1. Gather user preferences or requirements
148
143
  2. Clarify ambiguous instructions
149
144
  3. Get decisions on implementation choices as you work
@@ -161,7 +156,14 @@ Use the optional \`preview\` field on options when presenting concrete artifacts
161
156
  - Diagram variations
162
157
  - Configuration examples
163
158
 
164
- Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).`,
159
+ Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).`;
160
+
161
+ export function registerAskUserQuestionTool(pi: ExtensionAPI): void {
162
+ const guidance = validateGuidanceFields(loadConfig().guidance);
163
+ pi.registerTool({
164
+ name: ASK_USER_QUESTION_TOOL_NAME,
165
+ label: "Ask User Question",
166
+ description: guidance.description ?? DEFAULT_TOOL_DESCRIPTION,
165
167
  promptSnippet: guidance.promptSnippet ?? DEFAULT_PROMPT_SNIPPET,
166
168
  promptGuidelines: guidance.promptGuidelines ?? DEFAULT_PROMPT_GUIDELINES,
167
169
  parameters: QuestionParamsSchema,
@@ -19,6 +19,7 @@ A complete example:
19
19
  {
20
20
  "collapseKey": "alt+o",
21
21
  "guidance": {
22
+ "description": "Ask the user structured questions whenever requirements are ambiguous.",
22
23
  "promptSnippet": "Ask me before guessing on anything ambiguous",
23
24
  "promptGuidelines": [
24
25
  "Batch every clarifying question into one ask_user_question call.",
@@ -58,6 +59,7 @@ type are likewise dropped back to their default without a warning.
58
59
  | Setting | What it does | Default |
59
60
  | --- | --- | --- |
60
61
  | `collapseKey` | Key that collapses and expands the dialog overlay. | `"ctrl+]"` |
62
+ | `guidance.description` | Full text of the tool description the model sees. Replaces the built-in default entirely — no merging. | built-in description |
61
63
  | `guidance.promptSnippet` | One-line snippet describing the tool in the system prompt. | built-in snippet |
62
64
  | `guidance.promptGuidelines` | List of usage guidelines given to the model. | 4 built-in guidelines |
63
65
 
@@ -87,7 +89,13 @@ One known rough edge: the footer hint line inside the dialog always reads `Ctrl+
87
89
  collapse` and does not interpolate a custom `collapseKey`. The one-shot notification you
88
90
  get when the dialog first collapses *does* name your configured key.
89
91
 
90
- ### `guidance.promptSnippet` and `guidance.promptGuidelines`
92
+ ### `guidance.description`, `guidance.promptSnippet` and `guidance.promptGuidelines`
93
+
94
+ `guidance.description` replaces the entire built-in description Pi registers for the
95
+ `ask_user_question` tool — the text the model reads when deciding how to use it. There is
96
+ no merging: a valid value wins wholesale. It is used only when it is a non-empty string;
97
+ anything else falls back to the built-in default. Like the other guidance fields it is read
98
+ once, when the extension registers the tool, so changes take effect on the next Pi restart.
91
99
 
92
100
  These replace the text Pi puts in the system prompt about when to reach for
93
101
  `ask_user_question`. Use them to make the model ask more or less often, or to enforce a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-ask-user-question",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Pi extension. A structured questionnaire the model can put to you when it would otherwise guess, with typed options instead of free-form replies.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -78,6 +78,7 @@
78
78
  "view/tab-content-strategy.ts"
79
79
  ],
80
80
  "pi": {
81
+ "image": "https://raw.githubusercontent.com/juicesharp/rpiv-mono/main/packages/rpiv-ask-user-question/docs/cover.png",
81
82
  "extensions": [
82
83
  "./index.ts"
83
84
  ]
@@ -93,7 +94,7 @@
93
94
  }
94
95
  },
95
96
  "dependencies": {
96
- "@juicesharp/rpiv-config": "^2.6.0",
97
+ "@juicesharp/rpiv-config": "^2.6.2",
97
98
  "typebox": "^1.1.24"
98
99
  }
99
100
  }