Skip to content

Commit

Permalink
fix: update thread's title edge cases (#4320)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Dec 23, 2024
1 parent 365cdfa commit 9c4dcd3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/hooks/useCreateNewThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ export const useCreateNewThread = () => {
async (thread: Thread) => {
updateThread(thread)

setActiveAssistant(thread.assistants[0])
updateThreadCallback(thread)
updateAssistantCallback(thread.id, thread.assistants[0])
if (thread.assistants && thread.assistants?.length > 0) {
setActiveAssistant(thread.assistants[0])
updateAssistantCallback(thread.id, thread.assistants[0])
}
},
[
updateThread,
Expand Down

0 comments on commit 9c4dcd3

Please sign in to comment.