opencode
opencode copied to clipboard
"Did you know?" start screen tips
Summary
- Add "Did you know?" tips feature to the home screen that displays random tips, tricks, and shortcuts to help users discover OpenCode features
- Tips are hidden for first-time users and shown for returning users, with the ability to toggle visibility using ctrl+h Details New files:
- packages/opencode/src/cli/cmd/tui/component/tips.ts - Contains 101 tips covering keyboard shortcuts, slash commands, configuration options, CLI features, and more
- packages/opencode/src/cli/cmd/tui/component/did-you-know.tsx - Renders the tip box with styled highlights for keybinds and commands Features:
- Tips box appears in the bottom-right corner of the home screen (same width as sidebar)
- Important terms like keybinds (ctrl+h), slash commands (/undo), and file paths are highlighted in white
- First-time users (no sessions) don't see tips to avoid overwhelming the initial experience
- ctrl+h toggles tip visibility, persisted via KV store
- Tips randomize on each app start and when using /new command
- Responsive border that adapts to terminal width