mirror of
https://github.com/openai/codex.git
synced 2026-05-05 03:47:01 +00:00
Redirect debug client output to a file (#17234)
In the app-server debug client, allow redirecting output to a file in addition to just stdout. Shell redirecting works OK but is a bit weird with the interactive mode of the debug client since a bunch of newlines get dumped into the shell. With async messages from MCPs starting it's also tricky to actually type in a prompt.
This commit is contained in:
@@ -67,8 +67,8 @@ pub fn start_reader(
|
||||
}
|
||||
|
||||
let line = buffer.trim_end_matches(['\n', '\r']);
|
||||
if !line.is_empty() && !filtered_output {
|
||||
let _ = output.server_line(line);
|
||||
if !line.is_empty() {
|
||||
let _ = output.server_json_line(line, filtered_output);
|
||||
}
|
||||
|
||||
let Ok(message) = serde_json::from_str::<JSONRPCMessage>(line) else {
|
||||
|
||||
Reference in New Issue
Block a user