Per-tool emoji on tool cards (gateway-resolved via hermes get_tool_emoji)
CI / Gateway plugin tests (push) Successful in 5m6s
CI / Kotlin tests (android host + desktop) (push) Successful in 6m45s

tool.start gains an optional cosmetic 'emoji' field, resolved server-side
through hermes' own display layer (active-skin overrides, then the tool
registry's per-tool emoji) so icons track the user's hermes theme and
new/plugin tools get their glyph for free. Omitted for unknown tools so
the app falls back to its default wrench.

- protocol.py: tool_start(emoji=...) kwarg, payload field when set
- adapter.py: _tool_emoji() helper (lazy import, None on unknown/failure)
- frames.schema.json + docs/04: field documented
- app: ToolStartPayload.emoji -> ToolItem.emoji -> ToolCard header
- tests: frame shape, resolution/fallback, end-to-end tool.start emoji
This commit is contained in:
ARIA committed 2026-08-22 20:26:38 +02:00
1 parent e6015033b6
commit 7f0bdcbbc1
8 files changed
+98 -3

No files matched your search

@@ -103,6 +103,9 @@ data class ToolItem(
val name: String,
val preview: String? = null,
val args: JsonElement? = null,
/** Cosmetic per-tool glyph from the gateway (hermes get_tool_emoji);
* null for unknown tools / older frames — the UI falls back to 🔧. */
val emoji: String? = null,
val note: String? = null,
val done: Boolean = false,
val ok: Boolean = true,
@@ -450,6 +453,7 @@ class ChatStore {
name = p.name,
preview = p.preview,
args = p.args,
emoji = p.emoji,
anchorId = anchorId,
)
}
@@ -271,6 +271,9 @@ data class ToolStartPayload(
val name: String,
val preview: String? = null,
val args: JsonElement? = null,
/** Cosmetic per-tool glyph resolved server-side (hermes get_tool_emoji);
* absent for unknown tools — the UI falls back to its default. */
val emoji: String? = null,
)
@Serializable
@@ -2767,7 +2767,7 @@ private fun ToolCard(
Spacer(modifier = Modifier.width(6.dp))
}
Text(
"🔧 ${tool.name}",
"${tool.emoji ?: "🔧"} ${tool.name}",
fontSize = 13.sp,
fontWeight = FontWeight.Medium,
color = IrisColors.textBright,