fix(FN-1992): show resolved agent names in chat avatars

- Resolve assistant avatar labels from the active session agent map with fallback handling
- Keep the built-in KB agent label as Fusion and fall back to a truncated agent ID when needed
- Apply resolved labels to both stored assistant messages and streaming assistant avatars
- Add ChatView tests for resolved labels, KB-agent fallback, and streaming avatar rendering
- Document the @fusion/engine prebuild prerequisite in .fusion/memory.md
This commit is contained in:
Fusion
2026-04-17 03:08:46 -07:00
committed by gsxdsm
parent f04b49804b
commit 8818d2ab8a
4 changed files with 71 additions and 8 deletions

View File

@@ -412,6 +412,12 @@ export function ChatView({ projectId, addToast }: ChatViewProps) {
);
};
const agentName =
agentsMap.get(activeSession?.agentId ?? "")?.name ||
(activeSession?.agentId === KB_AGENT_ID
? "Fusion"
: (activeSession?.agentId?.slice(0, 30) ?? "Fusion"));
return (
<div className="chat-view">
{/* Sidebar */}
@@ -566,7 +572,7 @@ export function ChatView({ projectId, addToast }: ChatViewProps) {
{message.role === "assistant" && (
<div className="chat-message-avatar">
<Bot size={14} />
<span>Fusion</span>
<span>{agentName}</span>
{activeSession && (() => {
const modelTag = formatModelTag(activeSession.modelProvider, activeSession.modelId);
return modelTag ? <span className="chat-model-tag">{modelTag}</span> : null;
@@ -587,7 +593,7 @@ export function ChatView({ projectId, addToast }: ChatViewProps) {
<div className="chat-message chat-message--assistant chat-message--streaming">
<div className="chat-message-avatar">
<Bot size={14} />
<span>Fusion</span>
<span>{agentName}</span>
{activeSession && (() => {
const modelTag = formatModelTag(activeSession.modelProvider, activeSession.modelId);
return modelTag ? <span className="chat-model-tag">{modelTag}</span> : null;