chore: don't stop inference and hide the stop button when creating a new thread (#4354)

This commit is contained in:
Louis 2024-12-30 12:32:44 +07:00 committed by GitHub
parent 3af34c0d56
commit 16dce88a75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,8 +21,6 @@ import { toaster } from '@/containers/Toast'
import { isLocalEngine } from '@/utils/modelEngine'
import { useActiveModel } from './useActiveModel'
import useRecommendedModel from './useRecommendedModel'
import useSetActiveThread from './useSetActiveThread'
@ -52,10 +50,8 @@ export const useCreateNewThread = () => {
const [activeAssistant, setActiveAssistant] = useAtom(activeAssistantAtom)
const experimentalEnabled = useAtomValue(experimentalFeatureEnabledAtom)
const setIsGeneratingResponse = useSetAtom(isGeneratingResponseAtom)
const threads = useAtomValue(threadsAtom)
const { stopInference } = useActiveModel()
const { recommendedModel } = useRecommendedModel()
@ -63,10 +59,6 @@ export const useCreateNewThread = () => {
assistant: (ThreadAssistantInfo & { id: string; name: string }) | Assistant,
model?: Model | undefined
) => {
// Stop generating if any
setIsGeneratingResponse(false)
stopInference()
const defaultModel = model || recommendedModel
if (!model) {