feat(tui): add Activity Bar + Panels as extensible plugin#310
Open
WqyJh wants to merge 3 commits into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts the hardcoded Activity Bar + Panels into an extensible plugin system.
Changes
activity_barandsidebar_panelinTuiHostSlotMapActivityBarPanelsregistered as internal pluginFiles Changed
packages/plugin/src/tui.ts- Added slot typespackages/opencode/src/cli/cmd/tui/feature-plugins/activity-bar/- New pluginpackages/opencode/src/cli/cmd/tui/routes/session/activity-bar.tsx- Dynamic panelspackages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx- Plugin supportpackages/opencode/src/cli/cmd/tui/routes/session/panels/- New panel implementationsUsage
The plugin is automatically loaded as an internal plugin. For external plugins:
~/.codex/plugins/plugin: ["activity-bar-panels"]Extensibility
New panels can be added by:
PANELSarraysidebar_panelslotMirrored from XiaomiMiMo/MiMo-Code#528 — original author @odxbsnkh4572543.