A standalone UI development environment for OpenCode VSCode extension components.
The UI Kit allows you to develop and test UI components in isolation without needing to rebuild and reload the VSCode extension every time. It provides:
- Hot reload: Changes to CSS and components instantly reflect in the browser
- Fake data: Pre-populated with sample messages, sessions, and agents
- Control panel: Toggle states (thinking indicator, messages, etc.) for testing different scenarios
- No backend required: Runs entirely in the browser with simulated responses
npm run uikitThis will open a browser window at http://localhost:5173/src/webview/uikit.html with hot reload enabled.
- Edit any component in
src/webview/components/ - Edit styles in
src/webview/App.css - Changes will automatically reflect in the browser
- No need to reload the VSCode extension!
The UI Kit includes a control panel at the top with buttons to:
- Start/Stop Thinking: Toggle the thinking indicator
- Clear Messages: Remove all messages from the view
- Load Fake Messages: Restore the default fake conversation
Edit src/webview/uikit.tsx to add more:
- Messages (user and assistant)
- Tool calls (read, write, bash, grep, etc.)
- Sessions
- Agents
src/webview/uikit.html- HTML entry pointsrc/webview/uikit.tsx- Main UI Kit component with fake datavite.config.ts- Vite configuration (includes uikit entry point)
- Use this for rapid UI/CSS iteration
- Test different states and edge cases easily
- Verify visual changes before testing in the full extension
- Great for taking screenshots or demos