fix(platform/blocks): remove redundant _skip alias, improve truncation marker for large default values

This commit is contained in:
Zamil Majdy
2026-03-26 11:36:17 +07:00
parent 8b289cacdd
commit e5d42fcb99

View File

@@ -306,7 +306,7 @@ def _disambiguate_tool_names(tools: list[dict[str, Any]]) -> None:
for k, v in defaults.items():
rendered = json.dumps(v)
if len(rendered) > 100:
rendered = rendered[:97] + "..."
rendered = rendered[:80] + "...<truncated>"
parts.append(f"{k}={rendered}")
summary = ", ".join(parts)
func["description"] = (
@@ -567,7 +567,6 @@ class OrchestratorBlock(Block):
# Exclude linked fields, private fields, and credential/auth fields
# to avoid leaking sensitive data into tool descriptions.
linked_fields = {link.sink_name for link in links}
_skip = _SENSITIVE_FIELD_NAMES
defaults = sink_node.input_default
tool_function["_hardcoded_defaults"] = (
{
@@ -575,7 +574,7 @@ class OrchestratorBlock(Block):
for k, v in defaults.items()
if k not in linked_fields
and not k.startswith("_")
and k.lower() not in _skip
and k.lower() not in _SENSITIVE_FIELD_NAMES
}
if isinstance(defaults, dict)
else {}