Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

chore: update default thread model

Faisal Amir9ffce7dd39e1
diff --git a/web-app/src/containers/SetupScreen.tsx b/web-app/src/containers/SetupScreen.tsx
index 81cb285ac..b77cd1fc4 100644
--- a/web-app/src/containers/SetupScreen.tsx
+++ b/web-app/src/containers/SetupScreen.tsx
@@ -786,6 +786,15 @@ function SetupScreen() {
}
if (threadId && threadExists) {
+ // Update the thread with the downloaded model
+ await serviceHub.threads().updateThread({
+ id: threadId,
+ model: {
+ id: defaultVariant.model_id,
+ provider: 'llamacpp',
+ },
+ } as Thread)
+
navigate({
to: route.threadsDetail,
params: { threadId },
diff --git a/web-app/src/containers/ThreadList.tsx b/web-app/src/containers/ThreadList.tsx
index d15700270..f3f66365f 100644
--- a/web-app/src/containers/ThreadList.tsx
+++ b/web-app/src/containers/ThreadList.tsx
@@ -228,7 +228,7 @@ const ThreadItem = memo(
<DropdownMenuItem
variant="destructive"
disabled={thread.title === 'What is Jan?' && !localStorage.getItem('setup-completed')}
- onSelect={(e) => {
+ onSelect={() => {
if (thread.title !== 'What is Jan?' || localStorage.getItem('setup-completed')) {
setDeleteConfirmOpen(true)
}