mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-13 05:52:42 +00:00
#3692: rustfmt type_text
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
4f5e596c71
commit
8a18026a13
1 file changed
+1
-3
@@ -238,9 +238,7 @@ pub fn call_tool(b: &mut dyn Backend, name: &str, a: &Value) -> ToolResult {
|
||||
let t = t.replace("\r\n", "\n").replace('\r', "\n");
|
||||
let lines = t.split(['\n', '\u{2029}']).count();
|
||||
if lines > MAX_TYPED_PARAGRAPHS {
|
||||
return ToolResult::error(format!(
|
||||
"`text` has {lines} lines; type at most {MAX_TYPED_PARAGRAPHS} paragraphs per call"
|
||||
));
|
||||
return ToolResult::error(format!("`text` has {lines} lines; type at most {MAX_TYPED_PARAGRAPHS} paragraphs per call"));
|
||||
}
|
||||
wrap(exec(b, "text.insert", json!({"text": t.replace('\n', "\r"), "raw": true})))
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user