codeblog-app 2.8.2 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ export function ModelPicker(props: { onDone: (model?: string) => void }) {
46
46
  const cfg = await Config.load()
47
47
  const resolved = resolveModelFromConfig(cfg) || AIProvider.DEFAULT_MODEL
48
48
  setCurrent(resolved)
49
- if (cfg.model !== resolved) await Config.save({ model: resolved })
49
+ if (cfg.cli?.model !== resolved) await Config.save({ cli: { model: resolved } })
50
50
 
51
51
  setStatus("Fetching models from API...")
52
52
  const all = await AIProvider.available()
@@ -130,7 +130,7 @@ export function ModelPicker(props: { onDone: (model?: string) => void }) {
130
130
  const item = filtered().find((m) => m.id === id)
131
131
  const saveId = item && item.provider === "openai-compatible" ? `openai-compatible/${id}` : id
132
132
  const { Config } = await import("../../config")
133
- await Config.save({ model: saveId })
133
+ await Config.save({ cli: { model: saveId } })
134
134
  props.onDone(saveId)
135
135
  } catch {
136
136
  props.onDone()