You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
console.warn in anonymizer.js spams TUI stdout in OpenCode plugin #47
src/core/anonymizer.ts (compiled to dist/core/anonymizer.js:315) contains a raw console.warn("Validation warnings:", safeErrors) call that dumps PII leak validation warnings directly to stdout.
In TUI-based editors like OpenCode, console.warn from plugins bypasses the log-level system and renders directly in the terminal UI, making the interface unusable when the anonymizer fires frequent validation warnings (e.g. POTENTIAL_PII_LEAK).
Screenshot
The output looks like this, repeated for every tool call:
Be suppressed entirely (they're informational, not actionable by the user)
Be routed through the plugin's structured logging (client.app.log) instead of raw console.warn
Use an optional onValidationWarning callback in the config
Context
The OpenCode plugin (dist/opencode-plugin/plugin.js) already correctly uses client.app.log() for all its own logging. The issue is that the core anonymizer still uses a raw console.warn that leaks through.
Remove or gate the console.warn in the anonymizer's anonymize() method. The validation result is already available in the return value's stats.leakScanPassed field, so callers can handle it if needed.
Activity