[FEATURE]: Plugin Status Bar / Widget Area for Real-Time Plugin State #7445

Open
opened 2026-02-16 18:07:11 -05:00 by yindo · 1 comment
Owner

Originally created by @cvrt-jh on GitHub (Jan 24, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

Add a dedicated UI area in the TUI where plugins can display real-time status information. This would enable plugins to show persistent state (like rate limits, connection status, account info) without requiring the user to ask the agent or check logs.

Problem Statement

Current Behavior

Plugins can:

  • Hook into events (event, stop, tool.execute.*)
  • Transform system prompts
  • Add custom tools
  • Log to console/files

Plugins CANNOT:

  • Display persistent status in the TUI
  • Show real-time updates (rate limits, connection state, etc.)
  • Provide at-a-glance information to users

Use Case: Multi-Account OAuth Plugin

I maintain opencode-anthropic-multi-auth, a plugin that provides multi-account OAuth with automatic failover on rate limits.

What users need to see:

  • Current active account
  • Which accounts are rate-limited (and time remaining)
  • Total accounts available
  • Request count / session stats

Current workarounds (all suboptimal):

  1. MULTI_AUTH_DEBUG=1 + tail log file in separate terminal
  2. Custom tool that agent can call (adds latency, uses context)
  3. Inject into system prompt (invisible to user)

Proposed Solution

Option A: Status Bar Area

A dedicated line/area at the bottom or top of the TUI where plugins can register status widgets:

┌─────────────────────────────────────────────────────────────┐
│ [multi-auth] Account: "work" │ Rate Limited: 1/3 │ ⏱ 4m 32s │
└─────────────────────────────────────────────────────────────┘

Option B: Plugin Status Panel

A collapsible panel (like the file tree) showing plugin states:

▼ Plugin Status
  multi-auth: ✓ work (2 rate limited)
  my-plugin: ● connected

Option C: Status Hook with Periodic Updates

return {
  "status.provide": async (input, output) => {
    output.items.push({
      plugin: "multi-auth",
      icon: "🔐",
      text: `${currentAccount.label} (${rateLimitedCount} limited)`,
      tooltip: "Click for details",
      priority: 10,
    })
  }
}

API Design Proposal

interface StatusItem {
  id: string           // Unique identifier
  text: string         // Short display text
  icon?: string        // Emoji or icon
  tooltip?: string     // Hover/expand text
  priority?: number    // Sort order (higher = more prominent)
  color?: "default" | "success" | "warning" | "error"
}

interface Hooks {
  "status.provide"?: (
    input: { timestamp: number },
    output: { items: StatusItem[] }
  ) => Promise<void>
}

The TUI would call this hook periodically (e.g., every 5 seconds) or on specific events.

Benefits

  1. Better UX - Users see plugin state at a glance
  2. Debugging - No need for separate terminal/log tailing
  3. Professional feel - Status bars are standard in IDEs/terminals
  4. Plugin ecosystem - Enables richer plugin experiences

Related Issues

  • #5558 - Plugin-Provided Autocomplete (similar extensibility pattern)
  • #5305 - Plugin Hook for Instant TUI Commands

Implementation Notes

  • Could reuse the existing hook pattern from other plugin APIs
  • Status area could be toggled with a keybind (like Ctrl+S)
  • Consider rate-limiting status updates to prevent performance issues

Happy to help implement this if the design direction is approved!

Originally created by @cvrt-jh on GitHub (Jan 24, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## Summary Add a dedicated UI area in the TUI where plugins can display real-time status information. This would enable plugins to show persistent state (like rate limits, connection status, account info) without requiring the user to ask the agent or check logs. ## Problem Statement ### Current Behavior Plugins can: - Hook into events (`event`, `stop`, `tool.execute.*`) - Transform system prompts - Add custom tools - Log to console/files **Plugins CANNOT:** - Display persistent status in the TUI - Show real-time updates (rate limits, connection state, etc.) - Provide at-a-glance information to users ### Use Case: Multi-Account OAuth Plugin I maintain [opencode-anthropic-multi-auth](https://github.com/cvrt-gmbh/opencode-anthropic-multi-auth), a plugin that provides multi-account OAuth with automatic failover on rate limits. **What users need to see:** - Current active account - Which accounts are rate-limited (and time remaining) - Total accounts available - Request count / session stats **Current workarounds (all suboptimal):** 1. `MULTI_AUTH_DEBUG=1` + tail log file in separate terminal 2. Custom tool that agent can call (adds latency, uses context) 3. Inject into system prompt (invisible to user) ## Proposed Solution ### Option A: Status Bar Area A dedicated line/area at the bottom or top of the TUI where plugins can register status widgets: ``` ┌─────────────────────────────────────────────────────────────┐ │ [multi-auth] Account: "work" │ Rate Limited: 1/3 │ ⏱ 4m 32s │ └─────────────────────────────────────────────────────────────┘ ``` ### Option B: Plugin Status Panel A collapsible panel (like the file tree) showing plugin states: ``` ▼ Plugin Status multi-auth: ✓ work (2 rate limited) my-plugin: ● connected ``` ### Option C: Status Hook with Periodic Updates ```typescript return { "status.provide": async (input, output) => { output.items.push({ plugin: "multi-auth", icon: "🔐", text: `${currentAccount.label} (${rateLimitedCount} limited)`, tooltip: "Click for details", priority: 10, }) } } ``` ## API Design Proposal ```typescript interface StatusItem { id: string // Unique identifier text: string // Short display text icon?: string // Emoji or icon tooltip?: string // Hover/expand text priority?: number // Sort order (higher = more prominent) color?: "default" | "success" | "warning" | "error" } interface Hooks { "status.provide"?: ( input: { timestamp: number }, output: { items: StatusItem[] } ) => Promise<void> } ``` The TUI would call this hook periodically (e.g., every 5 seconds) or on specific events. ## Benefits 1. **Better UX** - Users see plugin state at a glance 2. **Debugging** - No need for separate terminal/log tailing 3. **Professional feel** - Status bars are standard in IDEs/terminals 4. **Plugin ecosystem** - Enables richer plugin experiences ## Related Issues - #5558 - Plugin-Provided Autocomplete (similar extensibility pattern) - #5305 - Plugin Hook for Instant TUI Commands ## Implementation Notes - Could reuse the existing hook pattern from other plugin APIs - Status area could be toggled with a keybind (like `Ctrl+S`) - Consider rate-limiting status updates to prevent performance issues --- Happy to help implement this if the design direction is approved!
yindo added the opentui label 2026-02-16 18:07:11 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 24, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8619: Native StatusLine Hook for Plugins (Context-Free Display)
  • #5971: Plugin API for custom sidebar panels
  • #6521: Window System as Foundation for UI Plugin Ecosystem
  • #9911: Plugin Hooks for spawning dialogs
  • #8322: Show background tasks status in sidebar
  • #9655: Show running tools and LLM status in sidebar
  • #8280: Show actually installed version of plugins in TUI
  • #7927: Display Project Name and Git Status in TUI
  • #7482: Dynamically registered MCP servers are not presented in TUI status
  • #9991: Display current working directory (cwd) permanently in TUI
  • #10111: Add Status button popover to session header
  • #7533: Display loaded skills in status page and sidebar
  • #6330: Generic UI Intent Channel for cross-client plugin-driven UX
  • #5305: Plugin Hook for Instant TUI Commands
  • #6810: Proposal: TUI Input Changed Hook
  • #8791: Expose hooks for modifying API usage and context window display

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue might be a duplicate of existing issues. Please check: - #8619: Native StatusLine Hook for Plugins (Context-Free Display) - #5971: Plugin API for custom sidebar panels - #6521: Window System as Foundation for UI Plugin Ecosystem - #9911: Plugin Hooks for spawning dialogs - #8322: Show background tasks status in sidebar - #9655: Show running tools and LLM status in sidebar - #8280: Show actually installed version of plugins in TUI - #7927: Display Project Name and Git Status in TUI - #7482: Dynamically registered MCP servers are not presented in TUI status - #9991: Display current working directory (cwd) permanently in TUI - #10111: Add Status button popover to session header - #7533: Display loaded skills in status page and sidebar - #6330: Generic UI Intent Channel for cross-client plugin-driven UX - #5305: Plugin Hook for Instant TUI Commands - #6810: Proposal: TUI Input Changed Hook - #8791: Expose hooks for modifying API usage and context window display Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7445