🐛 fix usage error & web channel edit label error

This commit is contained in:
Martial BE
2023-12-21 16:52:00 +08:00
parent 43d8bedbb4
commit b0fefd6dc5
8 changed files with 32 additions and 12 deletions

View File

@@ -70,13 +70,13 @@ const EditModal = ({ open, channelId, onCancel, onOk }) => {
const initChannel = (typeValue) => {
if (typeConfig[typeValue]?.inputLabel) {
setInputLabel({ ...inputLabel, ...typeConfig[typeValue].inputLabel });
setInputLabel({ ...defaultConfig.inputLabel, ...typeConfig[typeValue].inputLabel });
} else {
setInputLabel(defaultConfig.inputLabel);
}
if (typeConfig[typeValue]?.prompt) {
setInputPrompt({ ...inputPrompt, ...typeConfig[typeValue].prompt });
setInputPrompt({ ...defaultConfig.prompt, ...typeConfig[typeValue].prompt });
} else {
setInputPrompt(defaultConfig.prompt);
}

View File

@@ -78,11 +78,15 @@ const typeConfig = {
}
},
18: {
inputLabel: {
other: '版本号'
},
input: {
models: ['SparkDesk']
},
prompt: {
key: '按照如下格式输入APPID|APISecret|APIKey'
key: '按照如下格式输入APPID|APISecret|APIKey',
other: '请输入版本号例如v3.1'
}
},
19: {
@@ -104,8 +108,14 @@ const typeConfig = {
}
},
25: {
inputLabel: {
other: '版本号'
},
input: {
models: ['gemini-pro']
},
prompt: {
other: '请输入版本号例如v1'
}
}
};