opencode
opencode copied to clipboard
fix: prevent console output from corrupting TUI
Summary
- Remove
console.logcalls in clipboard detection that fire on first clipboard use - Replace
console.errorwithLog.Default.errorin worker.ts and index.ts error handlers - Change
stderr: "inherit"tostderr: "ignore"in spawn.ts to prevent child process errors from corrupting parent TUI
Problem
Any raw console output during TUI operation corrupts the display because the TUI expects exclusive control of terminal output. The clipboard detection was logging on first use (affecting all Linux/macOS users), and error handlers were using console.error instead of the log system.
Testing
Added regression tests for each fix that verify no console output occurs in these code paths.