mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix: reset tool name mappings in handleCancel and handleCreate
Addresses Greptile feedback: toolNameToDisplayName and toolNameToDescription were not being reset when the modal was cancelled or after successful creation, which could leak stale data from a duplicated server into the next fresh create modal. https://claude.ai/code/session_01Wx49QQnsCngnJ7hsfaC1yC
This commit is contained in:
parent
f0578f7124
commit
7c23282da7
2 changed files with 4 additions and 5 deletions
|
|
@ -1517,11 +1517,6 @@
|
|||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/components/organisms/RegenerateKeyModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/components/organisms/create_key_button.test.tsx": {
|
||||
"@typescript-eslint/no-require-imports": {
|
||||
"count": 2
|
||||
|
|
|
|||
|
|
@ -569,6 +569,8 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({
|
|||
setHasToolAllowlistInteraction(false);
|
||||
setAliasManuallyEdited(false);
|
||||
setLogoUrl(undefined);
|
||||
setToolNameToDisplayName({});
|
||||
setToolNameToDescription({});
|
||||
setModalVisible(false);
|
||||
onCreateSuccess(response);
|
||||
}
|
||||
|
|
@ -591,6 +593,8 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({
|
|||
setHasToolAllowlistInteraction(false);
|
||||
setAliasManuallyEdited(false);
|
||||
setLogoUrl(undefined);
|
||||
setToolNameToDisplayName({});
|
||||
setToolNameToDescription({});
|
||||
setModalVisible(false);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue