Skip to content

[FEATURE]: Allow TUI plugins to extend built-in dialogs and search #57938

Open

Description

@maharshi365

Feature hasn't been suggested before.

  • I searched existing open issues and did not find a matching request.

Describe the enhancement you want to request

Summary

Add a supported plugin API to extend built-in TUI dialogs, starting with session search.

Use case

I want to keep session tabs enabled while also pinning sessions in session search. Currently, tab mode hides the built-in pin action and pinned group.

A plugin could provide this behavior, but the documented API only supports creating a separate dialog—not extending the existing session picker. This means duplicating core search and navigation behavior or maintaining a core patch.

Proposed capabilities

Allow plugins to:

  • Add actions and keyboard shortcuts for the selected item.
  • Add item decorations, such as pin indicators.
  • Add groups and customize filtering or result order.
  • Refresh dialog content when plugin state changes.

These extensions should use stable item IDs and clean up when the plugin unloads. They should not require access to internal UI components.

Expected outcome

A plugin can add pin/unpin and a “Pinned” group to the existing session search while preserving tabs and built-in search behavior.

Session search is the initial use case, but the same extension model could support other built-in pickers.

Alternatives

  • A separate plugin-owned picker duplicates core functionality.
  • A core patch requires maintaining a custom build.
  • A config option could solve pinning alone, but not the broader extensibility gap.

Environment

  • OpenCode: v2.1.2
  • OS: Windows NT 10.0.26300.0
  • Terminal: TERM=xterm-256color; terminal application not identified

Activity

  1. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed request, @maharshi365!

    To restate it: you'd like a supported plugin API for adding to built-in TUI dialogs, starting with session search. Plugins could add actions and keybinds for the selected item, item decorations, extra groups, and custom filtering or ordering, all keyed by stable IDs. Your first use case is pinning sessions while session tabs stay on.

    You're right about the current state. The session list deliberately hides the Pinned group and the pin action when tabs are on. The TUI plugin API only lets a plugin open its own dialogs (dialog.select and similar), not add to the built-in ones. So there isn't a clean plugin you can use today. I've passed the API gap on to the maintainers so they can consider it.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions