mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(platform/blocks): remove redundant _skip alias, improve truncation marker for large default values
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user