Skip to content

Conversation

@ShamanicArts
Copy link

@ShamanicArts ShamanicArts commented Jan 22, 2026

Closes #9911

What does this PR do?

Plugins currently can't interact with users beyond tool outputs. This adds a dialog API letting plugins create native interactive dialogs (select, confirm, alert, prompt) with full keyboard support.

Changes

  • packages/opencode/src/dialog/index.ts - Core dialog module
  • packages/opencode/src/server/routes/dialog.ts - Dialog reply endpoint
  • packages/opencode/src/plugin/index.ts - Exposes dialog.show() to plugins
  • packages/plugin/src/index.ts - Plugin-side types and hooks
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx - UI handlers

Example plugin

dialog-test.ts

Screenshots

image image image image

How did you verify your code works?

Ran the opencode tests against changes.
Built mock plugins that called the newly implemented dialog api & tested in build

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search results, I found one potentially related PR:

Related PR:

The other results (PR #5117 about agent details dialog and PR #9301 about /usage command) appear to be unrelated to the core dialog API feature.

No exact duplicate PRs found for the dialog API feature itself.

@ShamanicArts ShamanicArts marked this pull request as ready for review January 22, 2026 02:08
@ShamanicArts ShamanicArts marked this pull request as draft January 22, 2026 23:50
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]: Plugin Hooks for spawning dialogs

1 participant