Skip to content

feat(omp): ask multiple-choice and batched questions in chat view - #38684

Merged
AmoabaKelvin merged 5 commits into
mainfrom
feat/omp-chat-ask-questions
Nov 5, 2026
Merged

AmoabaKelvin merged 5 commits into
mainfrom
feat/omp-chat-ask-questions

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​135 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​135
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​201 $\color{#cf222e}{\Huge{\mathbf{−}}}$​15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​186

What Changed

  • Before: in chat view, OMP's tool list had no 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.
  • After: the OMP dialect advertises form elicitation. Orca's generic ACP request path turns each elicitation/create form into the existing question card:
    • each OMP ask question becomes one tab
    • oneOf/enum fields become single choice, with OMP's recommended option labelled "(Recommended)"
    • array fields become multi-select
    • qN__other becomes the card's typed answer
    • booleans become Yes/No
    • plain strings become a text field
  • The answer goes back as {action: 'accept', content}. Stop, steer and teardown send cancel through 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=1 is now set in OMP's ACP env. Once forms are advertised, OMP believes a UI is attached, and a bash call with pty: true then tries to open a terminal overlay that ACP can't draw. That fails with undefined is not an object (evaluating 'Z.cancelled'). OMP's own headless modes set the same variable.
  • The card shows at most 4 questions. Any further questions are answered with a note in their Other field telling the agent to ask again. OMP would otherwise report an unanswered multi-select as [], the same as "picked nothing".
  • No renderer, mobile or RPC changes. The translation runs on the host that owns the OMP process, so desktop, mobile and remote hosts all get the card.

Why

  • This fixes the cause: OMP was never told Orca can answer forms. Orca keeps one way to show questions; OMP's forms are mapped onto the card Claude, Codex and Grok already use.
  • The capability is opt-in per dialect, because advertising it changes what an agent does: OMP adds tools, and plan approval starts asking instead of auto-approving.
  • feat(omp): show native questions in chat #30688 by @NarryG found the same root cause first. It builds a general form engine across 39 files (number fields, "Leave unset", exclusive options, a decline button, renderer and mobile changes), and it is about 4,000 commits behind main. This PR keeps its core idea in under 200 production lines, all on the host, so it supersedes feat(omp): show native questions in chat #30688.
  • The overlap with feat(omp): use native RPC for structured chat #36258 (moving OMP chat onto RPC) is a separate decision.

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 acp against a scripted local model:

Single choice, with OMP's recommended option:
03-q1-single-light.png

Multi-select:
09-q2-two-picked-light.png

Typed answer:
10-q3-typed-light.png

Answered:
12-resolved-transcript-light.png

Dark theme:
07-q2-multi-dark.png

Testing

  • Raw omp acp probes on 18.16.0 and 18.12.2, with a scripted OpenAI-compatible local server (no keys, no spend):

    • without the capability, the tool list has no ask; with it, ask is there
    • the elicitation payload matches what the mapper expects
    • cancel ends the turn
    • pty: true bash fails without PI_NO_PTY and runs with it
  • A hidden dev build on macOS, running an OMP chat against the same local model:

    • the card rendered with three tabs
    • OMP sent the model User answers:\ndb: SQLite\nfeat: [Auth, Search]\nname: "orca-demo"
    • Cancel withdrew the card and ended the turn
    • plain and pty: true bash both ran
  • New acp-form-elicitation.test.ts uses OMP's verbatim payload. The launch parity snapshots now include PI_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

  • Changed for OMP chat users: plan approval now asks Approve/Refine instead of auto-approving, and extension dialogs appear as cards. This matches what OMP does in its own TUI.
  • No PTY in OMP chat: OMP chat bash never gets a PTY. That was already true in practice, since OMP's ACP mode had no UI to draw one.
  • Upstream limit: when a question in a batch has no options, OMP sends only its __other field, 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.
  • OMP-side timeout: if OMP's own ask timeout fires, the card stays open until you answer or press Stop, because ACP has no cancel for form requests.
  • Back out: a plain revert.

Level: Low

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • Security: form text is agent output shown in the existing card, and answers are checked against the offered options before they go back.
  • Older clients: a single question that isn't multi-select also fills the top-level options/freeTextQuestionId, as Claude and Pi questions do, so older clients can answer it.
  • Older OMP: versions without elicitation ignore the capability.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

AmoabaKelvin and others added 5 commits November 5, 2026 22:00
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]>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10b429ba-6719-4af3-ab95-51f9c93c8ff9
Commits

Reviewing files that changed from the base of the PR and between da0ba0d and b02ff8f.

Files ignored due to path filters: 1

  • src/main/runtime/agent-session/launch/__snapshots__/structured-agent-launch-parity.test.ts.snap is excluded by !**/*.snap
Files selected for processing: 10

  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/antigravity-dialect.ts
  • src/main/acp/acp-dialects/grok-requests.ts
  • src/main/acp/acp-dialects/omp-dialect.ts
  • src/main/acp/acp-form-elicitation.test.ts
  • src/main/acp/acp-form-elicitation.ts
  • src/main/acp/acp-launch-specs.ts
  • src/main/acp/acp-session-runtime.ts
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-timeline-requests.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@AmoabaKelvin
AmoabaKelvin merged commit 1dd6a86 into main Nov 5, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support ACP form elicitation so OMP sessions started in the chat UI get the ask tool

1 participant