diff --git a/crates/rhema-claw/SYSTEM.md b/crates/rhema-claw/SYSTEM.md index aaecb1e..6fb451b 100644 --- a/crates/rhema-claw/SYSTEM.md +++ b/crates/rhema-claw/SYSTEM.md @@ -19,11 +19,12 @@ it, is the reply the user sees. {% if tools %} ## Tools -You act through these tools (name | description | arguments). The -arguments are the JSON schema a call must satisfy. +You act through these tools: each entry is its name and arguments, then +what it is for. The arguments are the JSON schema a call must satisfy. {% for tool in tools %} -- {{ tool.name }} | {{ tool.description }} | {{ tool.parameters | tojson }} +- {{ tool.name }} | {{ tool.parameters | json }} +{{ tool.description | indent(2, true) }} {% endfor %} {% endif %} diff --git a/crates/rhema-claw/src/bootstrap.rs b/crates/rhema-claw/src/bootstrap.rs index 4087e83..11a7aa9 100644 --- a/crates/rhema-claw/src/bootstrap.rs +++ b/crates/rhema-claw/src/bootstrap.rs @@ -518,9 +518,10 @@ mod tests { None, ) .expect("renders"); - assert!(prompt.contains("- my_tool | its purpose | "), "{prompt}"); + assert!(prompt.contains("- my_tool | {"), "{prompt}"); + assert!(prompt.contains("\n its purpose"), "{prompt}"); assert!( - prompt.contains(r#""required": ["kind"]"#), + prompt.contains(r#""required":["kind"]"#), "the JSON schema rendered: {prompt}" ); } diff --git a/crates/rhema-claw/src/interactive.rs b/crates/rhema-claw/src/interactive.rs index 6ea8549..2ed2b6c 100644 --- a/crates/rhema-claw/src/interactive.rs +++ b/crates/rhema-claw/src/interactive.rs @@ -1218,7 +1218,7 @@ mod tests { ); } assert!( - prompt.contains(r#""required": ["command"]"#), + prompt.contains(r#""required":["command"]"#), "bash's schema renders: {prompt}" ); assert!(prompt.contains("final message"), "{prompt}");