Keep active task transcripts in memory for instant task switching

This commit is contained in:
Ian Gulliver
2026-10-16 10:45:38 -07:00
parent 8200ffd17e
commit 91d95d0581
17 changed files with 252 additions and 84 deletions
+3 -1
View File
@@ -1,11 +1,12 @@
import { post } from "./api.js";
import { h } from "./dom.js";
import { currentLead, state } from "./state.js";
import { currentLead, leadLoading, state } from "./state.js";
import { compactButton, mountChat, type ChatSource, type Head } from "./task.js";
const leadSource: ChatSource = {
key: () => "lead",
events: () => state.leadTranscript,
loading: leadLoading,
session: currentLead,
root: () => "",
taskId: () => undefined,
@@ -13,6 +14,7 @@ const leadSource: ChatSource = {
refreshTopics: ["lead.sessions"],
transcriptTopic: "lead.transcript",
streamTopic: "lead.stream",
readyTopic: "lead.ready",
empty: "",
canSend: () => true,
placeholder: "Message your lead. Paste or drop images to attach them.",