@xynogen/pix-ask 0.1.6 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-ask",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "Pi tool — structured questionnaire UI (ask_user)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -11,7 +11,6 @@ import {
11
11
  MAX_QUESTIONS,
12
12
  MIN_OPTIONS,
13
13
  ParamsSchema,
14
- SENTINEL_CHAT,
15
14
  SENTINEL_FREEFORM,
16
15
  } from "./schema.js";
17
16
  import type { QuestionAnswer, QuestionnaireResult } from "./types.js";
@@ -42,8 +41,8 @@ export default function registerAsk(pi: ExtensionAPI): void {
42
41
  promptSnippet: `Ask the user up to ${MAX_QUESTIONS} structured questions (${MIN_OPTIONS}-${MAX_OPTIONS} options each) when requirements are ambiguous`,
43
42
  promptGuidelines: [
44
43
  `Use ask whenever the user's request is underspecified and you cannot proceed without concrete decisions — you can ask up to ${MAX_QUESTIONS} questions per invocation.`,
45
- `Each question MUST have ${MIN_OPTIONS}-${MAX_OPTIONS} options. Every option requires a concise label (1-5 words) and a description explaining what the choice means or its trade-offs. The user can additionally type a custom answer ("${SENTINEL_FREEFORM}" row is appended automatically to single-select questions) or pick "${SENTINEL_CHAT}" to abandon the questionnaire.`,
46
- `Set multiSelect: true when multiple answers are valid; this suppresses the "${SENTINEL_FREEFORM}" row. Provide an options[].preview markdown string when an option benefits from richer side-by-side context (mockups, code snippets, diagrams, configs) — single-select only. NOTE: any non-empty preview on a single-select question ALSO suppresses the "${SENTINEL_FREEFORM}" row (no room in the side-by-side layout); "${SENTINEL_CHAT}" remains the escape hatch. If you recommend a specific option, make it the first option and append "(Recommended)" to its label.`,
44
+ `Each question MUST have ${MIN_OPTIONS}-${MAX_OPTIONS} options. Every option requires a concise label (1-5 words) and a description explaining what the choice means or its trade-offs. The user can additionally type a custom answer ("${SENTINEL_FREEFORM}" row is appended automatically to single-select questions).`,
45
+ `Set multiSelect: true when multiple answers are valid; this suppresses the "${SENTINEL_FREEFORM}" row. Provide an options[].preview markdown string when an option benefits from richer side-by-side context (mockups, code snippets, diagrams, configs) — single-select only. NOTE: any non-empty preview on a single-select question ALSO suppresses the "${SENTINEL_FREEFORM}" row (no room in the side-by-side layout). If you recommend a specific option, make it the first option and append "(Recommended)" to its label.`,
47
46
  "Do not stack multiple ask calls back-to-back — group all clarifying questions into one invocation.",
48
47
  ],
49
48
  executionMode: "sequential",
@@ -18,7 +18,6 @@ import { checkboxGlyphs, selectionGlyph } from "./glyphs.js";
18
18
  import { safeMarkdownTheme, sentinelsFor } from "./helpers.js";
19
19
  import type { OptionData, Params, QuestionData } from "./schema.js";
20
20
  import {
21
- SENTINEL_CHAT,
22
21
  SENTINEL_FREEFORM,
23
22
  SENTINEL_NEXT,
24
23
  SEPARATOR,
@@ -580,13 +579,6 @@ export class AskQuestionnaire extends Container {
580
579
  lines.push(row(`${t.fg("accent", "Filter:")} ${searchVal}`));
581
580
  }
582
581
 
583
- // Chat sentinel
584
- const chatLabel =
585
- this.selectedOptionIndex === -999
586
- ? t.fg("accent", t.bold(SENTINEL_CHAT))
587
- : t.fg("dim", SENTINEL_CHAT);
588
- lines.push(row(` ${t.fg("dim", "💬")} ${chatLabel}`));
589
-
590
582
  // Options (with optional split-pane preview)
591
583
  const optionLines = this.renderOptions(useSplit ? leftWidth : width);
592
584
  const previewLines = useSplit ? this.renderPreview(previewWidth) : [];
package/src/schema.ts CHANGED
@@ -45,7 +45,7 @@ export const QuestionSchema = Type.Object({
45
45
  minItems: MIN_OPTIONS,
46
46
  maxItems: MAX_OPTIONS,
47
47
  description:
48
- "2-4 options. 'Type something.' and 'Chat about this' are auto-appended.",
48
+ "2-4 options. 'Type something.' is auto-appended for single-select.",
49
49
  }),
50
50
  multiSelect: Type.Optional(
51
51
  Type.Boolean({