fix: open the advanced when configured

This commit is contained in:
jialin
2026-03-20 17:23:55 +08:00
committed by jialin
parent f0e19c8934
commit 0a0e03dc68
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) => ({