Include output truncation message in tool call results (#2183)

To avoid model being confused about incomplete output.
This commit is contained in:
pakrym-oai
2025-08-11 11:52:05 -07:00
committed by GitHub
parent b76a562c49
commit 0cf57e1f42
6 changed files with 146 additions and 54 deletions

View File

@@ -76,7 +76,7 @@ async fn test_exec_stdout_stream_events_echo() {
};
assert_eq!(result.exit_code, 0);
assert_eq!(result.stdout, "hello-world\n");
assert_eq!(result.stdout.text, "hello-world\n");
let streamed = collect_stdout_events(rx);
// We should have received at least the same contents (possibly in one chunk)
@@ -128,8 +128,8 @@ async fn test_exec_stderr_stream_events_echo() {
};
assert_eq!(result.exit_code, 0);
assert_eq!(result.stdout, "");
assert_eq!(result.stderr, "oops\n");
assert_eq!(result.stdout.text, "");
assert_eq!(result.stderr.text, "oops\n");
// Collect only stderr delta events
let mut err = Vec::new();