wip(desktop): progress

thinking-toggle-wip
Adam 2025-12-15 04:43:01 -06:00 committed by Aiden Cline
parent df844dc408
commit ce4d0d76ea
1 changed files with 1 additions and 0 deletions

View File

@ -249,6 +249,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
set(model: ModelKey | undefined, options?: { recent?: boolean }) {
batch(() => {
setEphemeral("model", agent.current().name, model ?? fallbackModel())
if (model) updateVisibility(model, "show")
if (options?.recent && model) {
const uniq = uniqueBy([model, ...store.recent], (x) => x.providerID + x.modelID)
if (uniq.length > 5) uniq.pop()