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 9c02bc3d33
commit c91ff5fbf6
4 changed files with 71 additions and 8 deletions

View File

@@ -1431,11 +1431,13 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
Promise.resolve().then(async () => {
try {
const generatedTitle = await options.onSummarize!(input.description);
if (generatedTitle) {
// Guard against races: fetch current task and only update if no title set
const currentTask = await this.getTask(id);
const normalizedTitle = generatedTitle?.trim();
if (normalizedTitle) {
// Guard against races: read directly from SQLite to avoid extra
// prompt/step file I/O in this background path.
const currentTask = this.readTaskFromDb(id);
if (currentTask && !currentTask.title) {
await this.updateTask(id, { title: generatedTitle });
await this.updateTask(id, { title: normalizedTitle });
}
}
} catch (err) {