Skip to content

Commit 9c3e663

Browse files
authored
fix(copilot): update copilot chat title (#2968)
1 parent 48adaa0 commit 9c3e663

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

apps/sim/stores/panel/copilot/store.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,17 @@ const sseHandlers: Record<string, SSEHandler> = {
11251125
await get().handleNewChatCreation(context.newChatId)
11261126
}
11271127
},
1128+
title_updated: (_data, _context, get, set) => {
1129+
const title = _data.title
1130+
if (!title) return
1131+
const { currentChat, chats } = get()
1132+
if (currentChat) {
1133+
set({
1134+
currentChat: { ...currentChat, title },
1135+
chats: chats.map((c) => (c.id === currentChat.id ? { ...c, title } : c)),
1136+
})
1137+
}
1138+
},
11281139
tool_result: (data, context, get, set) => {
11291140
try {
11301141
const toolCallId: string | undefined = data?.toolCallId || data?.data?.id

0 commit comments

Comments
 (0)