Implement to_string tool
This commit is contained in:
parent
13e10cd4a8
commit
2e3f9ebee2
@ -364,7 +364,12 @@ impl AbstractTree for Tool {
|
|||||||
|
|
||||||
Ok(Value::String(json))
|
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) => {
|
Tool::Bash(expressions) => {
|
||||||
let mut command = Command::new("bash");
|
let mut command = Command::new("bash");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user