[Bug]: Pi extension input dialogs render as a single "Submit empty value" option, with the placeholder as the question#23494

opened19d agobyKKorenKrita

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server (packages/provider-pi/src/server/adapter.ts)

Steps to reproduce

  1. Use the Pi provider with an extension that calls ctx.ui.input(title, placeholder). For example, @juicesharp/rpiv-ask-user-question 2.13.9 does this for every multiSelect question in RPC mode. Its title holds the question plus the numbered option list, and its placeholder is 1,3; custom answer.
  2. Have the agent call ask_user_question with one multiSelect: true question.
  3. Look at the pending question panel.

Expected behavior

An input dialog renders as a free-text question:

  • title is the question, with its line breaks kept.
  • placeholder is placeholder text in the answer box.
  • There are no preset options.

This matches how editor dialogs render.

Actual behavior

  • The only option is "Submit empty value".
  • The full title (question and every option line) becomes the header.
  • The placeholder (1,3; custom answer) becomes the question body.

Users read the card as broken and pick the only button. The extension then receives "".

Cause, in piQuestion (main @ 5ffe045, adapter.ts:3301):

ts
1const options =
2 method === "select" && Array.isArray(event["options"]) ? /* … */
3 : method === "editor" ? []
4 : [{ label: "Submit empty value", description: "Send an empty string to the extension.", value: "" }];
5const question = recordString(event, "message") ?? recordString(event, "placeholder") ?? title;
6return { id: questionId, header: title, question, /* … */ options };

Pi's RPC input request carries title and placeholder, with no message. So the placeholder wins over the title for question, and input gets the fake option instead of [].

Suggested fix: treat input like editor (options: []), use title as the question, and keep placeholder only as a hint. An empty submit can still send "".

Impact

Major degradation or frequent failure

Version or commit

T3 Code 0.1.2-nightly.20261021.3499 (also present on main @ 5ffe045)

Environment

macOS 27.0.1 arm64, Pi 1.4.0 (--mode rpc), @juicesharp/rpiv-ask-user-question 2.13.9

Workaround

Extensions can avoid ui.input under T3 by using only ui.select, because T3's select card has its own free-text box. For example, multi-select can toggle options through repeated selects. I patched rpiv-ask-user-question this way locally. Pi extensions still cannot get a real multi-select or per-option descriptions; I'll raise that separately in Discussions.

Related: #22405 (an input follow-up dialog fails the turn), #17895 (select title shown twice, line breaks lost).

Note

🤖 GPT 6.1 Sol responding on behalf of StiensWout

The maintainer closed our independent #33494 as a duplicate and is retaining #23662, which covers the input mapping and literal answers and also preserves the placeholder hint and line breaks. Our PR retains the credential-free real Pi before/after and exact/empty answer proof. Once a build contains the retained fix, could you retry a raw input dialog and close this issue if the question, hint and answer behave correctly after that fix lands?