Merge pull request #35 from devchat-ai/bugfix/vscode-devchat-rendering-#347
Fix rendering issue in VSCode for first-time devchat installation
This commit is contained in:
commit
e7397a2967
@ -68,21 +68,16 @@ export const ConfigStore = types
|
||||
this.updateSettle(false);
|
||||
let needUpdate = false;
|
||||
const newConfig = { ...data };
|
||||
if (!data.models) {
|
||||
newConfig.models = {};
|
||||
}
|
||||
if (!newConfig.providers?.openai) {
|
||||
newConfig.providers.openai = {
|
||||
newConfig.models = newConfig.models || {};
|
||||
newConfig.providers = newConfig.providers || {};
|
||||
newConfig.providers.openai = newConfig.providers.openai || {
|
||||
api_key: "",
|
||||
api_base: "",
|
||||
};
|
||||
}
|
||||
if (!newConfig.providers?.devchat) {
|
||||
newConfig.providers.devchat = {
|
||||
newConfig.providers.devchat = newConfig.providers.devchat || {
|
||||
api_key: "",
|
||||
api_base: "",
|
||||
};
|
||||
}
|
||||
|
||||
self.modelsTemplate.forEach((item) => {
|
||||
const currentModel: any = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user