Skip to content

Commit fe023c0

Browse files
[MISC] Fix blank LLM profile edit form and settings menu bold style (#1896)
- Replace form.resetFields() with form.setFieldsValue() to fix blank edit form caused by Ant Design's initialValues being a one-time snapshot - Remove Strict Mode-incompatible cleanup that cleared editLlmProfileId - Clear editLlmProfileId in parent when adding new profile - Remove unconditional bold on first settings popover menu item Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7983c98 commit fe023c0

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ function AddLlmProfile({
6464

6565
useEffect(() => {
6666
setAdaptorProfilesDropdown();
67-
68-
return () => {
69-
setEditLlmProfileId(null);
70-
};
7167
}, []);
7268

7369
// Load retrieval strategies when tool_id is available (only once)
@@ -163,7 +159,7 @@ function AddLlmProfile({
163159

164160
useEffect(() => {
165161
if (resetForm) {
166-
form.resetFields();
162+
form.setFieldsValue(formDetails);
167163
setResetForm(false);
168164
}
169165
}, [formDetails]);

frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function ManageLlmProfiles() {
166166
}, [llmProfiles, defaultLlmProfile]);
167167

168168
const handleAddNewLlmProfileBtnClick = () => {
169+
setEditLlmProfileId(null);
169170
setIsAddLlm(true);
170171

171172
try {

frontend/src/components/settings/settings/Settings.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
}
3535

3636
.settings-menu-item:first-child {
37-
font-weight: 600;
3837
margin-bottom: 4px;
3938
}
4039

0 commit comments

Comments
 (0)