Restore tool cards on thread deserialization (#30053)
Release Notes: - N/A --------- Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
This commit is contained in:
parent
ab3e5cdc6c
commit
0cdd8bdded
30 changed files with 307 additions and 135 deletions
|
@ -178,7 +178,7 @@ impl Tool for TerminalTool {
|
|||
let exit_status = child.wait()?;
|
||||
let (processed_content, _) =
|
||||
process_content(content, &input.command, Some(exit_status));
|
||||
Ok(processed_content)
|
||||
Ok(processed_content.into())
|
||||
});
|
||||
return ToolResult {
|
||||
output: task,
|
||||
|
@ -266,7 +266,7 @@ impl Tool for TerminalTool {
|
|||
card.elapsed_time = Some(card.start_instant.elapsed());
|
||||
});
|
||||
|
||||
Ok(processed_content)
|
||||
Ok(processed_content.into())
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -661,7 +661,7 @@ mod tests {
|
|||
)
|
||||
});
|
||||
|
||||
let output = result.output.await.log_err();
|
||||
let output = result.output.await.log_err().map(|output| output.content);
|
||||
assert_eq!(output, Some("Command executed successfully.".into()));
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,11 @@ mod tests {
|
|||
cx,
|
||||
);
|
||||
cx.spawn(async move |_| {
|
||||
let output = headless_result.output.await.log_err();
|
||||
let output = headless_result
|
||||
.output
|
||||
.await
|
||||
.log_err()
|
||||
.map(|output| output.content);
|
||||
assert_eq!(output, expected);
|
||||
})
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue