fix(desktop): sync last agent and model when changing session

This commit is contained in:
Adam
2025-12-29 02:57:28 -06:00
parent 80f704ebbf
commit 9c8bc64138

View File

@@ -91,6 +91,18 @@ export default function Page() {
})
const lastUserMessage = createMemo(() => visibleUserMessages()?.at(-1))
createEffect(
on(
() => lastUserMessage()?.id,
() => {
const msg = lastUserMessage()
if (!msg) return
if (msg.agent) local.agent.set(msg.agent)
if (msg.model) local.model.set(msg.model)
},
),
)
const [store, setStore] = createStore({
clickTimer: undefined as number | undefined,
activeDraggable: undefined as string | undefined,