Skip to content

Commit

Permalink
chore: don't stop inference and hide the stop button when creating a …
Browse files Browse the repository at this point in the history
…new thread (#4354)
  • Loading branch information
louis-jan authored Dec 30, 2024
1 parent 3af34c0 commit 16dce88
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions web/hooks/useCreateNewThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -52,21 +50,15 @@ 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()

const requestCreateNewThread = async (
assistant: (ThreadAssistantInfo & { id: string; name: string }) | Assistant,
model?: Model | undefined
) => {
// Stop generating if any
setIsGeneratingResponse(false)
stopInference()

const defaultModel = model || recommendedModel

if (!model) {
Expand Down

0 comments on commit 16dce88

Please sign in to comment.