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);
|
this.updateSettle(false);
|
||||||
let needUpdate = false;
|
let needUpdate = false;
|
||||||
const newConfig = { ...data };
|
const newConfig = { ...data };
|
||||||
if (!data.models) {
|
newConfig.models = newConfig.models || {};
|
||||||
newConfig.models = {};
|
newConfig.providers = newConfig.providers || {};
|
||||||
}
|
newConfig.providers.openai = newConfig.providers.openai || {
|
||||||
if (!newConfig.providers?.openai) {
|
|
||||||
newConfig.providers.openai = {
|
|
||||||
api_key: "",
|
api_key: "",
|
||||||
api_base: "",
|
api_base: "",
|
||||||
};
|
};
|
||||||
}
|
newConfig.providers.devchat = newConfig.providers.devchat || {
|
||||||
if (!newConfig.providers?.devchat) {
|
|
||||||
newConfig.providers.devchat = {
|
|
||||||
api_key: "",
|
api_key: "",
|
||||||
api_base: "",
|
api_base: "",
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
self.modelsTemplate.forEach((item) => {
|
self.modelsTemplate.forEach((item) => {
|
||||||
const currentModel: any = {
|
const currentModel: any = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user