Skip to content

fix: prevent stderr output that causes TUI ghost text#1

Open
Antonio-Bennett wants to merge 1 commit intobuzinas:mainfrom
Antonio-Bennett:fix/tui-ghost-text
Open

fix: prevent stderr output that causes TUI ghost text#1
Antonio-Bennett wants to merge 1 commit intobuzinas:mainfrom
Antonio-Bennett:fix/tui-ghost-text

Conversation

@Antonio-Bennett
Copy link

Summary

  • Replace all console.error() in hooks with client.app.log() (OpenCode's structured logger)
  • Set explicit dtype: 'q8' in embedder pipeline to prevent @huggingface/transformers warning
  • Set TRANSFORMERS_VERBOSITY=error as safety net for any remaining transformers stderr

Problem

OpenCode TUI renders plugin stderr into the input area, causing ghost text overlapping user input. Two sources:

  1. console.error() calls in src/hooks.ts (8 occurrences)
  2. @huggingface/transformers dtype warning from src/embedder.ts

Changes

  • src/hooks.ts: console.error()client.app.log(), thread client param into onSessionDeleted
  • src/index.ts: pass client to onSessionDeleted
  • src/embedder.ts: add dtype: 'q8' + TRANSFORMERS_VERBOSITY=error

Tested locally — no more ghost text in TUI after these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant