dfdfsdd
This commit is contained in:
29
models.py
29
models.py
@@ -150,6 +150,35 @@ class PipeObject:
|
||||
# Truncate key if needed
|
||||
key_display = key if len(key) <= 15 else key[:12] + "..."
|
||||
debug(f"│ {key_display:<15}: {val_display:<42}│")
|
||||
|
||||
# If we have structured provider metadata, expand it for debugging.
|
||||
full_md = self.extra.get("full_metadata")
|
||||
if isinstance(full_md, dict) and full_md:
|
||||
debug("├─────────────────────────────────────────────────────────────┤")
|
||||
debug("│ full_metadata: │")
|
||||
for md_key in sorted(full_md.keys(), key=lambda x: str(x)):
|
||||
md_val = full_md.get(md_key)
|
||||
if isinstance(md_val, (str, int, float)) or md_val is None or isinstance(md_val, bool):
|
||||
md_display = str(md_val)
|
||||
elif isinstance(md_val, list):
|
||||
if len(md_val) <= 6 and all(isinstance(x, (str, int, float, bool)) or x is None for x in md_val):
|
||||
md_display = "[" + ", ".join(str(x) for x in md_val) + "]"
|
||||
else:
|
||||
md_display = f"list({len(md_val)})"
|
||||
elif isinstance(md_val, dict):
|
||||
# Avoid dumping huge nested dicts (like raw provider docs).
|
||||
keys = list(md_val.keys())
|
||||
preview = ",".join(str(k) for k in keys[:6])
|
||||
md_display = f"dict({len(keys)})[{preview}{',...' if len(keys) > 6 else ''}]"
|
||||
else:
|
||||
md_str = str(md_val)
|
||||
md_display = md_str if len(md_str) <= 40 else md_str[:37] + "..."
|
||||
|
||||
md_key_display = str(md_key)
|
||||
md_key_display = md_key_display if len(md_key_display) <= 15 else md_key_display[:12] + "..."
|
||||
if len(md_display) > 42:
|
||||
md_display = md_display[:39] + "..."
|
||||
debug(f"│ {md_key_display:<15}: {md_display:<42}│")
|
||||
|
||||
if self.action:
|
||||
debug("├─────────────────────────────────────────────────────────────┤")
|
||||
|
||||
Reference in New Issue
Block a user