From 9c3e663cd8a07d0e4b89935b24b0d52ac6428182 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Date: Sat, 24 Jan 2026 10:18:13 -0800 Subject: [PATCH] fix(copilot): update copilot chat title (#2968) --- 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