fix: open the advanced when configured

This commit is contained in:
jialin
2026-03-17 17:29:38 +08:00
parent 94b3206111
commit 19b88f3375
2 changed files with 10 additions and 0 deletions
@@ -30,6 +30,7 @@ const useScrollActiveChange = (options: {
return {
activeKey,
collapseKeys,
setCollapseKeys,
handleActiveChange,
handleOnCollapseChange,
updateActiveKey
+9
View File
@@ -51,6 +51,7 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
const {
activeKey,
collapseKeys,
setCollapseKeys,
handleActiveChange,
handleOnCollapseChange,
updateActiveKey
@@ -147,6 +148,14 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
const customConfigYaml = json2Yaml(
_.omit(currentData.config, ['type', 'openaiCustomUrl']) || {}
);
const customConfig =
_.omit(currentData.config, ['type', 'openaiCustomUrl']) || {};
if (Object.keys(customConfig).length > 0) {
setCollapseKeys((prev) => [...new Set([...prev, TABKeysMap.ADVANCED])]);
}
form.setFieldsValue({
...currentData,
models: (currentData.models || []).map((item) => ({