opencode
opencode copied to clipboard
refactor: replace debug console.logs with structured logging
Replace 12 console.log statements with proper Log.Default.debug() calls:
- app.tsx: Route data debugging
- theme.tsx: Theme resolution debugging (2 logs)
- sync.tsx: Bootstrap debugging
- route.tsx: Navigation debugging
- prompt/index.tsx: Command debugging
- clipboard.tsx: Platform detection debugging (6 logs) Benefits:
- Configurable via log levels (DEBUG/INFO/WARN/ERROR)
- Structured output with metadata and timestamps
- File-based logging (~/.opencode/logs/)
- Consistent with rest of codebase
- Better production experience (no console spam) Testing:
- All type checks pass
- Manual TUI testing shows no console output
- Log files written correctly with structured entries"