Skip to content

feat(tui): add Activity Bar + Panels as extensible plugin#310

Open
WqyJh wants to merge 3 commits into
mainfrom
mirror/pr-528
Open

feat(tui): add Activity Bar + Panels as extensible plugin#310
WqyJh wants to merge 3 commits into
mainfrom
mirror/pr-528

Conversation

@WqyJh

@WqyJh WqyJh commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Converts the hardcoded Activity Bar + Panels into an extensible plugin system.

Changes

  • New slots: activity_bar and sidebar_panel in TuiHostSlotMap
  • TUI Plugin: ActivityBarPanels registered as internal plugin
  • New panels: Tasks, Todo, MCP Servers, LSP Servers
  • Dynamic registration: Panels can be registered via plugin system

Files Changed

  • packages/plugin/src/tui.ts - Added slot types
  • packages/opencode/src/cli/cmd/tui/feature-plugins/activity-bar/ - New plugin
  • packages/opencode/src/cli/cmd/tui/routes/session/activity-bar.tsx - Dynamic panels
  • packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx - Plugin support
  • packages/opencode/src/cli/cmd/tui/routes/session/panels/ - New panel implementations

Usage

The plugin is automatically loaded as an internal plugin. For external plugins:

  • Place in ~/.codex/plugins/
  • Or add to config: plugin: ["activity-bar-panels"]

Extensibility

New panels can be added by:

  1. Creating a component
  2. Adding to PANELS array
  3. Registering via sidebar_panel slot

Mirrored from XiaomiMiMo/MiMo-Code#528 — original author @odxbsnkh4572543.

- Add ActivityBar component with icons for Files, Skills, Plugins, Sessions, Model
- Add panel components: FileExplorerPanel, SkillsPanel, PluginsPanel, SessionsPanel, ModelPanel
- Modify Sidebar to render active panels as sections in single scrollable view
- Toggle button (◁/▷) to show/hide entire sidebar
- Multiple panels can be active simultaneously
- Easy to extend: add component to PANEL_COMPONENTS + icon to PANELS
- Add SidebarPanels plugin with collapsible sections for Files, Skills, Plugins, Sessions, Model
- Register in internal plugins list
- Each section shows/hides content on click
- Add activity_bar and sidebar_panel slots to TuiHostSlotMap
- Create TUI plugin for Activity Bar with dynamic panel registration
- Add new panels: Tasks, Todo, MCP Servers, LSP Servers
- Make activity-bar.tsx and sidebar.tsx support plugin-registered panels
- Register ActivityBarPanels as internal plugin

Closes XiaomiMiMo#528
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.

2 participants