Merge 573de826fb into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2025-10-02 22:55:35 -07:00
committed by GitHub
3 changed files with 21 additions and 6 deletions
@@ -536,6 +536,19 @@ impl EventProcessor for EventProcessorWithHumanOutput {
format_with_separators(usage_info.total_token_usage.blended_total())
);
}
// If the user has not piped the final message to a file, they will see
// it twice: once written to stderr as part of the normal event
// processing, and once here on stdout. We print the token summary above
// to help break up the output visually in that case.
#[allow(clippy::print_stdout)]
if let Some(mut message) = self.final_message.take() {
if !message.ends_with('\n') {
message.push('\n');
}
print!("{message}");
}
}
}
+3 -1
View File
@@ -2,7 +2,9 @@ event: response.created
data: {"type":"response.created","response":{"id":"resp1"}}
event: response.output_item.done
data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"fixture hello"}]}}
data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"model: gpt-5-high
sandbox: workspace-write
resume marker"}]}}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp1","output":[]}}
+5 -5
View File
@@ -229,14 +229,14 @@ fn exec_resume_preserves_cli_configuration_overrides() -> anyhow::Result<()> {
assert!(output.status.success(), "resume run failed: {output:?}");
let stdout = String::from_utf8(output.stdout)?;
let stderr = String::from_utf8(output.stderr)?;
assert!(
stdout.contains("model: gpt-5-high"),
"stdout missing model override: {stdout}"
stderr.contains("model: gpt-5-high"),
"stderr missing model override: {stderr}"
);
assert!(
stdout.contains("sandbox: workspace-write"),
"stdout missing sandbox override: {stdout}"
stderr.contains("sandbox: workspace-write"),
"stderr missing sandbox override: {stderr}"
);
let resumed_path = find_session_file_containing_marker(&sessions_dir, &marker2)