Skip to content

Feat/tool card#72

Merged
rusty4444 merged 2 commits into
rusty4444:mainfrom
grunjol:feat/tool-card
Jul 7, 2026
Merged

Feat/tool card#72
rusty4444 merged 2 commits into
rusty4444:mainfrom
grunjol:feat/tool-card

Conversation

@grunjol

@grunjol grunjol commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Groups consecutive tool calls into compact emoji cards instead of
rendering individual tool-bubbles. Tool cards appear during streaming
(via SSE hermes.tool.progress events) and persist after the response
completes. Also filters out empty ghost bubbles left behind during
token-by-token streaming.

Changes

_toolMessages — a separate state list populated during streaming
via SSE tool-progress events. On stream completion (onDone), server
messages with role: 'tool' are parsed to extract tool names via
_extractToolMessages().

_extractToolMessages() — scans the server message list for
role: 'tool' entries. Extracts the tool name from the name field,
or parses source="..." from the content (e.g.
<untrusted_tool_result source="browser_navigate">).

_toolEmoji() — maps tool names to emojis: 🌐 browser, 📄
read_file, ✏️ write_file, 🔍 search, 💻 execute, 🧠 think, 🔧 default.

_ToolProgressCard — a compact inline widget showing ✅ 🌐 🔍 📄
(completed) or ⏳ 🌐 🔍 with a spinner (active). Consecutive tool
calls are grouped into separate cards (e.g. user → 🌐 📄 → assistant → user → 🔍 → assistant).

Empty bubble filter — assistant messages with empty content are
excluded from the display list, eliminating phantom bubbles during
streaming.

Real-time streaming — tools from SSE events that arrive during
streaming are shown immediately, before the server response is
complete. Previously they only appeared after onDone or on re-entry.

@rusty4444 rusty4444 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hermes Agent Automated Review — PR #72

Verdict: APPROVE

Summary

Groups tool execution messages into compact progress cards with emoji indicators. Separates tool messages from the main message list and renders them as card widgets between user/assistant bubbles.

✅ Looks Good

  • Clear emoji mapping for common tool types (browser, file, search, shell, reasoning)
  • Proper display list construction that interleaves tool cards with messages
  • Handles unmatched SSE tool events gracefully (shown at end as separate card)
  • Clean _ToolProgressCard widget with dark/light theme support
  • Active tools show spinner; completed tools show checkmark

💡 Suggestions (non-blocking)

  • _extractToolMessages uses regex source="([^"]+)" for tool name discovery — this is fragile and depends on server message format. Consider a more structured approach or a fallback that's clearer when the regex doesn't match.
  • The _toolMessages list is kept in parallel with _messages — ensure indices stay synchronized if the message list is ever filtered/reordered elsewhere.

Reviewed by Hermes Agent — July 8, 2026

@rusty4444 rusty4444 merged commit 375d085 into rusty4444:main Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants