Skip to content

Commit 2f626b9

Browse files
authored
fix(ui): address error on deleting threads or messages (#4048)
1 parent f081714 commit 2f626b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: ee/tabby-ui/app/search/components/header.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ export function Header({
7777
})
7878

7979
const handleDeleteThread = (e: MouseEvent<HTMLButtonElement>) => {
80+
if (!threadId) return
81+
8082
e.preventDefault()
8183
setIsDeleting(true)
8284
deleteThread({
83-
id: threadIdFromURL!
85+
id: threadId
8486
})
8587
}
8688

Diff for: ee/tabby-ui/components/chat/chat.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,6 @@ export const Chat = React.forwardRef<ChatRef, ChatProps>(
288288
const onDeleteMessage = async (userMessageId: string) => {
289289
if (!threadId) return
290290

291-
// Stop generating first.
292-
stop()
293291
const qaPair = qaPairs.find(o => o.user.id === userMessageId)
294292
if (!qaPair?.user || !qaPair.assistant) return
295293

0 commit comments

Comments
 (0)