mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
Fixed model selection persistence bug
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
73443585e5
commit
f22edc15ba
1 changed files with 2 additions and 2 deletions
|
|
@ -30,10 +30,10 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||
}
|
||||
}
|
||||
|
||||
// Automatically update model when agent changes
|
||||
// Automatically update model when agent changes, but only if user hasn't selected a model
|
||||
createEffect(() => {
|
||||
const value = agent.current()
|
||||
if (value.model) {
|
||||
if (value.model && !modelStore.model[value.name]) {
|
||||
if (isModelValid(value.model))
|
||||
model.set({
|
||||
providerID: value.model.providerID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue