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 { return {
activeKey, activeKey,
collapseKeys, collapseKeys,
setCollapseKeys,
handleActiveChange, handleActiveChange,
handleOnCollapseChange, handleOnCollapseChange,
updateActiveKey updateActiveKey
+9
View File
@@ -51,6 +51,7 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
const { const {
activeKey, activeKey,
collapseKeys, collapseKeys,
setCollapseKeys,
handleActiveChange, handleActiveChange,
handleOnCollapseChange, handleOnCollapseChange,
updateActiveKey updateActiveKey
@@ -147,6 +148,14 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
const customConfigYaml = json2Yaml( const customConfigYaml = json2Yaml(
_.omit(currentData.config, ['type', 'openaiCustomUrl']) || {} _.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({ form.setFieldsValue({
...currentData, ...currentData,
models: (currentData.models || []).map((item) => ({ models: (currentData.models || []).map((item) => ({