Delete apps/web/lib/chat-thread-settings.test.ts

This commit is contained in:
Ishaan Gupta 2026-08-03 19:57:17 +05:30
parent 8f2cf19e1f
commit 8407eb0f7e
2 changed files with 1 additions and 34 deletions

View file

@ -1,33 +0,0 @@
import { describe, expect, it } from "vitest"
import { AUTO_CHAT_SPACE_ID } from "./chat-auto-space"
import { readChatThreadSettings } from "./chat-thread-settings"
describe("chat thread settings", () => {
it("restores Auto mode independently of the physical default space", () => {
expect(
readChatThreadSettings(
{
model: "gemini-2.5-pro",
projectId: AUTO_CHAT_SPACE_ID,
reasoningEffort: "thinking",
spaceMode: "auto",
},
"sm_project_default",
),
).toEqual({
model: "gemini-2.5-pro",
projectId: AUTO_CHAT_SPACE_ID,
reasoningEffort: "thinking",
spaceMode: "auto",
})
})
it("falls back safely for a legacy manual-space thread", () => {
expect(readChatThreadSettings(undefined, "project_legacy")).toEqual({
model: "grok-4.3",
projectId: "project_legacy",
reasoningEffort: "instant",
spaceMode: "manual",
})
})
})

View file

@ -25,7 +25,7 @@ export function readChatThreadSettings(
typeof value === "object" && value !== null
? (value as Record<string, unknown>)
: {}
const model = isModelId(settings.model) ? settings.model : "grok-4.3"
const model = isModelId(settings.model) ? settings.model : "grok-4.5"
const reasoningEffort =
settings.reasoningEffort === "instant" ||
settings.reasoningEffort === "thinking"