fix: make dropdown not repeat values on update, update mcp component (#7779)

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Lucas Oliveira 2025-04-24 13:01:43 -03:00 committed by GitHub
commit 3b660c26a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 8 deletions

View file

@ -203,6 +203,10 @@ class MCPToolsComponent(Component):
return processed_headers
return {}
def _is_valid_key_value_item(self, item: Any) -> bool:
"""Check if an item is a valid key-value dictionary."""
return isinstance(item, dict) and "key" in item and "value" in item
async def _validate_schema_inputs(self, tool_obj) -> list[InputTypes]:
"""Validate and process schema inputs for a tool."""
try:
@ -234,6 +238,7 @@ class MCPToolsComponent(Component):
try:
if field_name == "mode":
self.remove_non_default_keys(build_config)
build_config["tool"]["options"] = []
if field_value == "Stdio":
build_config["command"]["show"] = True
build_config["env"]["show"] = True