From 4af35e03ea9f7e4c7da047293a5c9bf25a192f0a Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Sat, 24 Jan 2026 02:22:15 -0800 Subject: [PATCH] Fix copilot chat title --- apps/sim/stores/panel/copilot/store.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/sim/stores/panel/copilot/store.ts b/apps/sim/stores/panel/copilot/store.ts index 10d66b398..e368d412e 100644 --- a/apps/sim/stores/panel/copilot/store.ts +++ b/apps/sim/stores/panel/copilot/store.ts @@ -1125,6 +1125,17 @@ const sseHandlers: Record = { await get().handleNewChatCreation(context.newChatId) } }, + title_updated: (_data, _context, get, set) => { + const title = _data.title + if (!title) return + const { currentChat, chats } = get() + if (currentChat) { + set({ + currentChat: { ...currentChat, title }, + chats: chats.map((c) => (c.id === currentChat.id ? { ...c, title } : c)), + }) + } + }, tool_result: (data, context, get, set) => { try { const toolCallId: string | undefined = data?.toolCallId || data?.data?.id