vhaudiquet 1663dee661 fix(agent-tools): render tool schemas without HTML-safe escapes
minijinja's tojson escapes `<`, `>`, `&` and `'` so its output can ride
a script tag. A system prompt is not a script tag, so every apostrophe
in a field description reached the model as \u0027 and every
`<provider>` as \u003c: harder to read, and more tokens for the same
text.

The renderer registers a json filter that serializes through serde_json
and leaves those characters alone, and both tool sections use it.
tojson stays for a user template whose output does feed a page. The
serialization is also compact, which drops the spaces tojson puts
after every separator.

The tool row is `name | arguments` with the description indented
underneath, so a multi-line description can no longer push the schema
column below another tool's prose, where it read as part of that tool.
2026-11-11 18:13:17 +01:00
S
Description
No description provided
MIT
1 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 74.9%
Kotlin 13.8%
Vue 7.1%
TypeScript 3%
Dockerfile 0.5%
Other 0.6%