Skip to content

Commit 4ee6c7d

Browse files
committed
use the waveaiModeConfigAtom, not the fullConfig modes...
1 parent c50bf86 commit 4ee6c7d

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

frontend/app/aipanel/aipanel.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ KeyCap.displayName = "KeyCap";
8484

8585
const AIWelcomeMessage = memo(() => {
8686
const modKey = isMacOS() ? "⌘" : "Alt";
87-
const fullConfig = jotai.useAtomValue(atoms.fullConfigAtom);
88-
const hasCustomModes = fullConfig?.waveai
89-
? Object.keys(fullConfig.waveai).some((key) => !key.startsWith("waveai@"))
90-
: false;
87+
const aiModeConfigs = jotai.useAtomValue(atoms.waveaiModeConfigAtom);
88+
const hasCustomModes = Object.keys(aiModeConfigs).some((key) => !key.startsWith("waveai@"));
9189
return (
9290
<div className="text-secondary py-8">
9391
<div className="text-center">

frontend/app/aipanel/waveai-model.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ export class WaveAIModel {
8585
const modelMetaAtom = getOrefMetaKeyAtom(this.orefContext, "waveai:model");
8686
return get(modelMetaAtom) ?? "gpt-5.1";
8787
});
88-
this.aiModeConfigs = jotai.atom((get) => {
89-
const fullConfig = get(atoms.fullConfigAtom);
90-
return fullConfig?.waveai ?? {};
91-
});
88+
this.aiModeConfigs = atoms.waveaiModeConfigAtom;
9289

9390

9491
this.widgetAccessAtom = jotai.atom((get) => {

0 commit comments

Comments
 (0)