Skip to content

Commit e454dbe

Browse files
committed
fix(app): prevent last message model/varient from overwritting set agent config
1 parent 2208cad commit e454dbe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/app/src/pages/session.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ export default function Page() {
405405
() => {
406406
const msg = lastUserMessage()
407407
if (!msg) return
408-
if (msg.agent) local.agent.set(msg.agent)
408+
if (msg.agent) {
409+
local.agent.set(msg.agent)
410+
if (local.agent.current()?.model) return
411+
}
409412
if (msg.model) local.model.set(msg.model)
410413
},
411414
),

0 commit comments

Comments
 (0)