Implement to_string tool

This commit is contained in:
Jeff 2023-10-21 18:31:46 -04:00
parent 13e10cd4a8
commit 2e3f9ebee2

View File

@ -364,7 +364,12 @@ impl AbstractTree for Tool {
Ok(Value::String(json))
}
Tool::ToString(_) => todo!(),
Tool::ToString(expression) => {
let value = expression.run(source, context)?;
let string = value.to_string();
Ok(Value::String(string))
}
Tool::Bash(expressions) => {
let mut command = Command::new("bash");