Files
LLeMbas/src/lembas/web/templates/partials/icons.html
T
Jaroslav Beneš 374982174f Say what a tool did, not where it ran
An agent event set its label to the SSH profile's name, so the transcript read
"homeserver · ls -la" -- naming the machine rather than the thing that was done.
Built-in tools set no label at all and fell back to the function name, so a
saved memory read "memory_add". The status line said "Running shell_run…" and
the approval card had its own hand-written wording. Four places, four answers,
nothing checking that any of them agreed.

services/tool_labels.py is the one table all of them read now. Bash, Read,
Write, List, Web search, Memory saved; an icon each, instead of everything
being the sparkle.

The precedence is inverted on purpose. Tool events are persisted in
Message.tool_calls_json, so every agent row already on disk carries the profile
name -- a resolver that preferred the stored value would fix nothing for any
transcript that already exists. So a name the table knows resolves from the
table, and a name it does not -- a custom HTTP tool, an MCP tool, whose labels
are per row and cannot be tabulated -- keeps its own. One rule, both cases
correct. The machine moves to `detail`, where "where this ran" belongs.

tool_label and tool_icon are Jinja globals because a message bubble is rendered
from four handlers, and a fifth thing each of them must remember to pass is a
fifth thing one of them will forget.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 10:58:02 +02:00

221 lines
9.3 KiB
HTML

{#
Icon sprite, inlined once at the top of <body>.
It lives here rather than in assets/ and is deliberately NOT loaded as an
external file: cross-document <use href="sprite.svg#id"> has patchy browser
support, while same-document <use href="#id"> is universal. Inlining also
costs zero extra requests.
Icons are 24x24, stroked (never filled), and inherit currentColor, so they
take the surrounding text colour in every theme automatically.
Use via the macro in _macros.html: {{ icon("send") }}
#}
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
<defs>
<g id="icon-defaults"></g>
</defs>
<symbol id="i-send" viewBox="0 0 24 24"><path d="M12 20V5M5 12l7-7 7 7"/></symbol>
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
<symbol id="i-minus" viewBox="0 0 24 24"><path d="M5 12h14"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path d="M4.5 12.5 9 17 19.5 6.5"/></symbol>
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></symbol>
<symbol id="i-menu" viewBox="0 0 24 24"><path d="M4 7h16M4 12h16M4 17h16"/></symbol>
<symbol id="i-dots" viewBox="0 0 24 24">
<circle cx="12" cy="5" r="1.4"/><circle cx="12" cy="12" r="1.4"/><circle cx="12" cy="19" r="1.4"/>
</symbol>
<symbol id="i-chevron-right" viewBox="0 0 24 24"><path d="m9.5 5.5 7 6.5-7 6.5"/></symbol>
<symbol id="i-chevron-down" viewBox="0 0 24 24"><path d="m5.5 9.5 6.5 7 6.5-7"/></symbol>
<symbol id="i-chat" viewBox="0 0 24 24">
<path d="M20.5 12.2a7.7 7.7 0 0 1-8.3 7.7l-5 2.4.9-3.7a7.7 7.7 0 1 1 12.4-6.4Z"/>
</symbol>
<symbol id="i-folder" viewBox="0 0 24 24">
<path d="M3 7.5A2 2 0 0 1 5 5.5h3.6a1 1 0 0 1 .8.4l1.2 1.6H19a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/>
</symbol>
<symbol id="i-folder-open" viewBox="0 0 24 24">
<path d="M3 18.5V7.5a2 2 0 0 1 2-2h3.6a1 1 0 0 1 .8.4l1.2 1.6H18a2 2 0 0 1 2 2v1"/>
<path d="M3 18.5 5.6 11a1 1 0 0 1 .95-.7H21a1 1 0 0 1 .95 1.3l-2.1 6.2a2 2 0 0 1-1.9 1.4H5a2 2 0 0 1-2-2Z"/>
</symbol>
<symbol id="i-trash" viewBox="0 0 24 24">
<path d="M4 7h16M9.5 7V5.4A1.4 1.4 0 0 1 10.9 4h2.2a1.4 1.4 0 0 1 1.4 1.4V7"/>
<path d="m6.5 7 .9 11.6A1.5 1.5 0 0 0 8.9 20h6.2a1.5 1.5 0 0 0 1.5-1.4L17.5 7"/>
</symbol>
<symbol id="i-pencil" viewBox="0 0 24 24">
<path d="M4 20h4L19.3 8.7a2.4 2.4 0 0 0-3.4-3.4L4.6 16.6 4 20Z"/>
<path d="m14.8 6.4 2.8 2.8"/>
</symbol>
<symbol id="i-copy" viewBox="0 0 24 24">
<rect x="9" y="9" width="11" height="11" rx="2"/>
<path d="M15 6.5V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h.5"/>
</symbol>
<symbol id="i-refresh" viewBox="0 0 24 24">
<path d="M20 12a8 8 0 1 1-2.6-5.9"/>
<path d="M20 4v4.5h-4.5"/>
</symbol>
<symbol id="i-pin" viewBox="0 0 24 24">
<path d="M9 3.5h6l-.8 5.2 3 3.1-.7 2.2H7.5l-.7-2.2 3-3.1Z"/>
<path d="M12 14v6.5"/>
</symbol>
<symbol id="i-search" viewBox="0 0 24 24">
<circle cx="11" cy="11" r="6.5"/><path d="m16 16 4 4"/>
</symbol>
<symbol id="i-attach" viewBox="0 0 24 24">
<path d="M17.5 8.5v7.8a5 5 0 0 1-10 0V7a3.2 3.2 0 0 1 6.4 0v9.1a1.5 1.5 0 0 1-3 0V8.5"/>
</symbol>
<symbol id="i-user" viewBox="0 0 24 24">
<circle cx="12" cy="8.3" r="3.8"/>
<path d="M4.5 20a7.5 7.5 0 0 1 15 0"/>
</symbol>
<symbol id="i-users" viewBox="0 0 24 24">
<circle cx="9.5" cy="8.5" r="3.4"/>
<path d="M3 19.5a6.5 6.5 0 0 1 13 0"/>
<path d="M16 5.6a3.4 3.4 0 0 1 0 5.9M17.5 14.4a5.6 5.6 0 0 1 3.5 5.1"/>
</symbol>
<symbol id="i-shield" viewBox="0 0 24 24">
<path d="M12 3.2 19.5 6v5.6c0 4.6-3.1 7.6-7.5 9.2-4.4-1.6-7.5-4.6-7.5-9.2V6Z"/>
</symbol>
<symbol id="i-logout" viewBox="0 0 24 24">
<path d="M14.5 4.5H18a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-3.5"/>
<path d="M9.5 8 5.5 12l4 4M5.5 12H15"/>
</symbol>
<symbol id="i-server" viewBox="0 0 24 24">
<rect x="3.5" y="4" width="17" height="6" rx="1.8"/>
<rect x="3.5" y="14" width="17" height="6" rx="1.8"/>
<path d="M7 7h.01M7 17h.01"/>
</symbol>
<symbol id="i-terminal" viewBox="0 0 24 24">
<rect x="3" y="4" width="18" height="16" rx="2"/>
<path d="m7.5 9.5 3 2.5-3 2.5M13 15h4"/>
</symbol>
<symbol id="i-sliders" viewBox="0 0 24 24">
<path d="M4 8h10M18 8h2M4 16h4M12 16h8"/>
<circle cx="16" cy="8" r="2"/><circle cx="10" cy="16" r="2"/>
</symbol>
<symbol id="i-gear" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3.2"/>
<path d="M12 3v2.2M12 18.8V21M3 12h2.2M18.8 12H21M5.6 5.6l1.6 1.6M16.8 16.8l1.6 1.6M18.4 5.6l-1.6 1.6M7.2 16.8l-1.6 1.6"/>
</symbol>
<symbol id="i-sun" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="4"/>
<path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4"/>
</symbol>
<symbol id="i-moon" viewBox="0 0 24 24">
<path d="M20.5 13.8A8.5 8.5 0 0 1 10.2 3.5a8.5 8.5 0 1 0 10.3 10.3Z"/>
</symbol>
<symbol id="i-sidebar" viewBox="0 0 24 24">
<rect x="3.5" y="4.5" width="17" height="15" rx="2"/>
<path d="M10 4.5v15"/>
</symbol>
<symbol id="i-archive" viewBox="0 0 24 24">
<rect x="3.5" y="4.5" width="17" height="4" rx="1.2"/>
<path d="M5 8.5v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9M10 12.5h4"/>
</symbol>
<symbol id="i-clock" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8.5"/>
<path d="M12 7.2V12l3.2 2"/>
</symbol>
<symbol id="i-warning" viewBox="0 0 24 24">
<path d="M12 4.2 21 19.5H3Z"/>
<path d="M12 10v4M12 16.8h.01"/>
</symbol>
<symbol id="i-sparkle" viewBox="0 0 24 24">
<path d="M12 3.5 13.9 9 19.5 11l-5.6 2-1.9 5.5L10.1 13 4.5 11l5.6-2Z"/>
<path d="M18.5 4v3M20 5.5h-3"/>
</symbol>
<symbol id="i-image" viewBox="0 0 24 24">
<rect x="3.5" y="5" width="17" height="14" rx="2"/>
<circle cx="9" cy="10" r="1.6"/>
<path d="m4.5 17 4.2-4.2a1.5 1.5 0 0 1 2.1 0l3 3 1.9-1.9a1.5 1.5 0 0 1 2.1 0l2 2"/>
</symbol>
<symbol id="i-arrow-up" viewBox="0 0 24 24"><path d="M12 19V6M6 12l6-6 6 6"/></symbol>
<symbol id="i-arrow-down" viewBox="0 0 24 24"><path d="M12 5v13M6 12l6 6 6-6"/></symbol>
<symbol id="i-star" viewBox="0 0 24 24">
<path d="m12 3.8 2.5 5.2 5.7.8-4.1 4 1 5.7-5.1-2.7-5.1 2.7 1-5.7-4.1-4 5.7-.8Z"/>
</symbol>
<symbol id="i-key" viewBox="0 0 24 24">
<circle cx="8" cy="12" r="4"/>
<path d="M12 12h8M17.5 12v3M20 12v2.5"/>
</symbol>
<symbol id="i-mic" viewBox="0 0 24 24">
<rect x="9" y="3" width="6" height="10.5" rx="3"/>
<path d="M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M9 21h6"/>
</symbol>
<symbol id="i-speaker" viewBox="0 0 24 24">
<path d="M11 5 6.5 9H3.5v6h3L11 19Z"/>
<path d="M14.8 9.2a4 4 0 0 1 0 5.6M17.6 6.4a8 8 0 0 1 0 11.2"/>
</symbol>
<symbol id="i-stop-circle" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8.5"/>
<rect x="9.2" y="9.2" width="5.6" height="5.6" rx="1"/>
</symbol>
<symbol id="i-globe" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8.5"/>
<path d="M3.5 12h17M12 3.5c2.2 2.4 3.3 5.3 3.3 8.5S14.2 18.1 12 20.5c-2.2-2.4-3.3-5.3-3.3-8.5S9.8 5.9 12 3.5Z"/>
</symbol>
<symbol id="i-link" viewBox="0 0 24 24">
<path d="M10.5 13.5a3.5 3.5 0 0 0 5 0l3-3a3.5 3.5 0 0 0-5-5l-1.5 1.5"/>
<path d="M13.5 10.5a3.5 3.5 0 0 0-5 0l-3 3a3.5 3.5 0 0 0 5 5L12 17"/>
</symbol>
<symbol id="i-chevron-left" viewBox="0 0 24 24">
<path d="M14.5 6 8.5 12l6 6"/>
</symbol>
<symbol id="i-chevron-up" viewBox="0 0 24 24">
<path d="M6 14.5 12 8.5l6 6"/>
</symbol>
<!-- @, for a mention. The tail stops short of closing so the ring reads as a
ring at 16px rather than as a filled blob. -->
<symbol id="i-at" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3.6"/>
<path d="M15.6 8.4v4.9a2.6 2.6 0 0 0 5.2 0V12a8.8 8.8 0 1 0-3.5 7"/>
</symbol>
<!-- The command key, which is what a command menu is. -->
<symbol id="i-command" viewBox="0 0 24 24">
<path d="M9 9h6v6H9z"/>
<path d="M9 9V7.5a2.5 2.5 0 1 0-2.5 2.5H9Zm6 0V7.5a2.5 2.5 0 1 1 2.5 2.5H15ZM9 15v1.5A2.5 2.5 0 1 1 6.5 14H9Zm6 0v1.5a2.5 2.5 0 1 0 2.5-2.5H15Z"/>
</symbol>
<symbol id="i-keyboard" viewBox="0 0 24 24">
<rect x="2.5" y="6" width="19" height="12" rx="2"/>
<path d="M6 9.5h.01M9 9.5h.01M12 9.5h.01M15 9.5h.01M18 9.5h.01M6 12.5h.01M9 12.5h.01M12 12.5h.01M15 12.5h.01M18 12.5h.01M8.5 15.5h7"/>
</symbol>
<symbol id="i-file-text" viewBox="0 0 24 24">
<path d="M13.5 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9l-5.5-5.5Z"/>
<path d="M13.5 3.5V9H19M8.5 13h7M8.5 16.5h7"/>
</symbol>
<!-- Changing part of a file. A plus over a minus, which is what a diff looks
like everywhere else; the pencil is already taken by writing one whole. -->
<symbol id="i-diff" viewBox="0 0 24 24">
<path d="M12 3.5v7M8.5 7h7M8.5 17h7"/>
</symbol>
<!-- A drag handle. Dots rather than lines: lines at this size read as a
hamburger, which means something else entirely. -->
<symbol id="i-grip" viewBox="0 0 24 24">
<path d="M10 6h.01M10 12h.01M10 18h.01M14 6h.01M14 12h.01M14 18h.01"/>
</symbol>
<!-- Agent chats. They borrowed `server`, which is the machine rather than
the act of working on one. -->
<symbol id="i-bolt" viewBox="0 0 24 24">
<path d="M13 2.5 4.5 13.5H11l-1 8 8.5-11H12l1-8Z"/>
</symbol>
<symbol id="i-leaf" viewBox="0 0 64 64">
<path d="M20.5 45.5C13.8 31.7 23.8 20.9 45.5 18.5 49.8 35 39.8 45.8 20.5 45.5Z"/>
<path d="M20.5 45.5C28 38 36 29 45.5 18.5"/>
</symbol>
</svg>