npm.io
0.0.1 • Published 1 week ago

@zhushanwen/pi-ask-user

Licence
MIT
Version
0.0.1
Deps
0
Size
130 kB
Vulns
0
Weekly
0

@zhushanwen/pi-ask-user

Inline adaptive ask_user tool for Pi coding agent. Single question (no tabs) or 1-4 questions (tab view + submit). Split-pane Markdown preview on wide terminals, inline free-text editor, optional comments.

Install

pi install npm:@zhushanwen/pi-ask-user

Tool

ask_user — structured clarifying questions with 2-4 options each. Users can always pick "Other" for free-text input. Supports multiSelect and optional per-question comments.

Features

  • Adaptive layout: single question → no tab bar; 1-4 questions → tabbed view + Submit tab
  • Split-pane preview (≥84 cols): option list left, selected option details right
  • Inline free-text editor: select "Other" → Enter → type custom answer
  • Optional comments: allowComment: true → after selection, prompt for a comment
  • Multi-select: multiSelect: true → toggle checkboxes, Enter to confirm
  • Headless-safe: disables the tool and returns isError when no UI available

Keywords