Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
chore: new thread without existing assistant
Faisal Amir8ef92d5a216c
diff --git a/web-app/src/routes/settings/providers/$providerName.tsx b/web-app/src/routes/settings/providers/$providerName.tsxindex 5edb4f944..c3d6c2d89 100644--- a/web-app/src/routes/settings/providers/$providerName.tsx+++ b/web-app/src/routes/settings/providers/$providerName.tsx@@ -541,7 +541,6 @@ function ProviderDetail() {variant="outline"size="sm"className={cn(- 'p-0',isCheckingBackendUpdate &&'pointer-events-none')}@@ -568,7 +567,6 @@ function ProviderDetail() {<Buttonvariant="outline"size="sm"- className="p-0"onClick={handleInstallBackendFromFile}disabled={isInstallingBackend}>diff --git a/web-app/src/routes/threads/$threadId.tsx b/web-app/src/routes/threads/$threadId.tsxindex 8dcb387b9..00907b57a 100644--- a/web-app/src/routes/threads/$threadId.tsx+++ b/web-app/src/routes/threads/$threadId.tsx@@ -112,16 +112,16 @@ function ThreadDetail() {const selectedModel = useModelProvider((state) => state.selectedModel)const selectedProvider = useModelProvider((state) => state.selectedProvider)const getProviderByName = useModelProvider((state) => state.getProviderByName)+ const threadRef = useRef(thread)+ const projectId = threadRef.current?.metadata?.project?.id// Get system message from thread's assistant instructions (if thread has an assigned assistant)// Only use assistant instructions if the thread was created with one (e.g., via a project)- const threadAssistant = thread?.assistants?.[0]+ const threadAssistant = !projectId && thread?.assistants?.[0]const systemMessage = threadAssistant?.instructions? renderInstructions(threadAssistant.instructions): undefined- const threadRef = useRef(thread)-useEffect(() => {threadRef.current = thread}, [thread])@@ -191,7 +191,6 @@ function ThreadDetail() {// Get cached tool names from store (initialized in useTools hook)const ragToolNames = useAppState.getState().ragToolNamesconst mcpToolNames = useAppState.getState().mcpToolNames- const projectId = threadRef.current?.metadata?.project?.id// Process tool calls sequentially, requesting approval for each if needed;(async () => {