| 1 | import type { SettingsView } from "./types"; |
| 2 | |
| 3 | type MockSessionSettings = Pick<SettingsView, |
| 4 | "sessionExperience" | "displayMode" | "reasoningDisplayMode" | "reasoningDisplayModeExplicit" |
| 5 | >; |
| 6 | |
| 7 | export function applyMockSessionExperience(settings: MockSessionSettings, value: unknown): void { |
| 8 | if (value !== "standard" && value !== "deep") throw new Error("invalid session experience"); |
| 9 | settings.sessionExperience = value; |
| 10 | settings.displayMode = "standard"; |
| 11 | settings.reasoningDisplayMode = value === "deep" ? "expanded" : "auto"; |
| 12 | settings.reasoningDisplayModeExplicit = true; |
| 13 | } |
| 14 | |
| 15 | export function applyMockLegacyReasoningMode(settings: MockSessionSettings, value: string): void { |
| 16 | applyMockSessionExperience(settings, value === "expanded" ? "deep" : "standard"); |
| 17 | } |
| 18 |