opencode
opencode copied to clipboard
feat: Add sessions sidebar view
Summary
Adds a new sessions sidebar mode that displays all sessions in a persistent sidebar, allowing users to quickly navigate between sessions without opening a modal.
Changes
-
New Component:
SessionsSidebar- Displays all sessions grouped by date -
Configuration: Added
sidebar_modeoption to toggle between:-
context(default): Shows current session's context, MCP, LSP, todos, diffs -
sessions: Shows list of all sessions
-
-
Keybind: Added
sidebar_mode_toggle(default:none) to switch between modes -
UI Features:
- Sessions grouped by date (Today, Yesterday, etc.)
- Current session highlighted
- Visual indicators for active/working sessions
- Click to switch sessions
- Displays up to 50 most recent sessions for performance
Usage
- Toggle sidebar:
Ctrl+XthenB(or configured keybind) - Switch sidebar mode: Configure
sidebar_mode_togglekeybind in config, or use command palette - In sessions sidebar, click on any session to switch to it
Configuration Example
{
"keybinds": {
"sidebar_mode_toggle": "<leader>v"
}
}
Motivation
Closes common user request for persistent sessions list in sidebar instead of modal popup. Makes it easier to navigate between many active sessions.
Screenshots/Demo
(Would be added before final merge with actual screenshots)
Testing
- Tested sidebar toggle between context and sessions modes
- Verified session grouping by date
- Confirmed click navigation works
- Checked visual indicators for active sessions
Checklist
- [x] Code follows project style guidelines
- [x] Added configuration documentation in code
- [x] Feature is backward compatible (defaults to existing behavior)
- [ ] Screenshots/demo added (pending)
- [ ] Tested in actual OpenCode TUI environment (requires build)