feat: pin sessions to workspace revisions
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { expect, test } from "vitest";
|
||||
import { workspacePreferences } from "./preferences";
|
||||
|
||||
test("migrates legacy selections once and keeps later browser choices", () => {
|
||||
localStorage.clear();
|
||||
|
||||
expect(workspacePreferences.migrate({
|
||||
workspaceId: "psd-clinical", provider: "zai", model: "glm-5.2", thinking: "medium",
|
||||
})).toMatchObject({ workspaceId: "psd-clinical", model: "glm-5.2" });
|
||||
workspacePreferences.save({ workspaceId: "research", provider: "deepseek", model: "deepseek-v4-pro", thinking: "high" });
|
||||
|
||||
expect(workspacePreferences.migrate({ workspaceId: "legacy" })).toMatchObject({
|
||||
workspaceId: "research", provider: "deepseek", model: "deepseek-v4-pro", thinking: "high",
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user