fix: check all required keys (#1489)

Co-authored-by: Lily Delalande <ldelalande@squareup.com>
This commit is contained in:
Yingjie He
2025-03-03 20:58:58 -08:00
committed by GitHub
parent b2ab9e0e21
commit cd4d6c4a28
2 changed files with 26 additions and 18 deletions
-3
View File
@@ -4,14 +4,11 @@ import { GOOSE_PROVIDER } from '../env_vars';
import { Model } from '../components/settings/models/ModelContext';
export function getStoredProvider(config: any): string | null {
console.log('config goose provider', config.GOOSE_PROVIDER);
console.log('local storage goose provider', localStorage.getItem(GOOSE_PROVIDER));
return config.GOOSE_PROVIDER || localStorage.getItem(GOOSE_PROVIDER);
}
export function getStoredModel(): string | null {
const storedModel = localStorage.getItem('GOOSE_MODEL'); // Adjust key name if necessary
console.log('local storage goose model', storedModel);
if (storedModel) {
try {