Repository navigation
feat(omp): ask multiple-choice and batched questions in chat view - #38684
Merged
Merged
Conversation
Orca's ACP client never advertised form elicitation, so OMP started in the chat view left out its ask tool and extension dialogs. The OMP dialect now advertises forms and maps each elicitation onto the existing question card: multi-question tabs, multi-select and Other. PI_NO_PTY keeps `pty: true` bash from opening a TUI overlay ACP can't draw. Co-authored-by: Narry <[email protected]>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
5 tasks done
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When you chat with OMP (oh-my-pi) in Orca's chat view, OMP can now ask you questions with options. It can ask several at once, each in its own tab, with single or multiple picks and a box to type your own answer. Before this, OMP in the chat view had no way to ask, so it guessed or asked in plain text.
What Changed
ask. OMP only adds that tool, and only routes its extension dialogs (select, confirm, input, plan approval) to the client, when the ACP client says it can answer forms (clientCapabilities.elicitation.form). Orca never said so.elicitation/createform into the existing question card:askquestion becomes one taboneOf/enumfields become single choice, with OMP's recommended option labelled "(Recommended)"arrayfields become multi-selectqN__otherbecomes the card's typed answer{action: 'accept', content}. Stop, steer and teardown sendcancelthrough the existing prompt plumbing. A form Orca can't draw gets a JSON-RPC error, which OMP treats as dismissed, the same as today.PI_NO_PTY=1is now set in OMP's ACP env. Once forms are advertised, OMP believes a UI is attached, and a bash call withpty: truethen tries to open a terminal overlay that ACP can't draw. That fails withundefined is not an object (evaluating 'Z.cancelled'). OMP's own headless modes set the same variable.[], the same as "picked nothing".Why
Linked Issue
Fixes #26924
Visual Proof
Before: no screenshot is possible. On main, OMP's chat-view tool list has no
ask, so no card ever appears.After, from a hidden dev build running real
omp acpagainst a scripted local model:Single choice, with OMP's recommended option:

Multi-select:

Typed answer:

Answered:

Dark theme:

Testing
Raw
omp acpprobes on 18.16.0 and 18.12.2, with a scripted OpenAI-compatible local server (no keys, no spend):ask; with it,askis therepty: truebash fails withoutPI_NO_PTYand runs with itA hidden dev build on macOS, running an OMP chat against the same local model:
User answers:\ndb: SQLite\nfeat: [Auth, Search]\nname: "orca-demo"pty: truebash both ranNew
acp-form-elicitation.test.tsuses OMP's verbatim payload. The launch parity snapshots now includePI_NO_PTY. Typecheck, full lint, changed-code gates and the tests affected since main all pass. Two load-sensitive files failed once in the full parallel run and pass on their own.Not tested: Linux, Windows, SSH or a phone. Nothing here is platform-specific, and mobile renders the same journal item.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
__otherfield, so the question's text never reaches Orca and the tab reads "Other (type your own)". A single question is unaffected, because Orca uses the form message.Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
options/freeTextQuestionId, as Claude and Pi questions do, so older clients can answer it.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)