Conversation
Implements RFD 048, separating JP's output into four distinct channels: stdout for assistant responses, stderr for chrome (tool headers, progress indicators), `/dev/tty` for interactive prompts, and a log file for tracing. `Printer` gains a `PrintTarget::Tty` variant backed by `/dev/tty` on Unix and `CONOUT$` on Windows. A new `prompt_writer()` method routes interactive prompts to the TTY when available, falling back to stdout. All tool renderers, retry notifications, and reasoning progress indicators are moved to `err_writer()`, keeping stdout clean for assistant output that downstream consumers can pipe or capture reliably. Tracing is now written to a log file by default and suppressed on stderr unless explicitly requested via `-v` or `--log-file=-`. This keeps `2> chrome.log` free of tracing noise. A new `--log-file` flag supports directing logs to an alternate destination, with `--log-file=-` restoring the previous behavior of logging to stderr. Closes: #518 Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements RFD 048, separating JP's output into four distinct channels: stdout for assistant responses, stderr for chrome (tool headers, progress indicators),
/dev/ttyfor interactive prompts, and a log file for tracing.Printergains aPrintTarget::Ttyvariant backed by/dev/ttyon Unix andCONOUT$on Windows. A newprompt_writer()method routes interactive prompts to the TTY when available, falling back to stdout. All tool renderers, retry notifications, and reasoning progress indicators are moved toerr_writer(), keeping stdout clean for assistant output that downstream consumers can pipe or capture reliably.Tracing is now written to a log file by default and suppressed on stderr unless explicitly requested via
-vor--log-file=-. This keeps2> chrome.logfree of tracing noise. A new--log-fileflag supports directing logs to an alternate destination, with--log-file=-restoring the previous behavior of logging to stderr.Closes: #518