Remove all ellipsis truncation from CLI output

- Show full CIDs/hashes in runs list, cache list, effects list
- Show full output CIDs in plan steps and artifacts
- Show full CIDs in recipe fixed_inputs
- Use block format for better readability with long IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-12 17:11:50 +00:00
parent efca939c7d
commit 599f181f8c

View File

@@ -434,12 +434,18 @@ def list_runs(limit, offset):
end = offset + len(runs) end = offset + len(runs)
click.echo(f"Showing {start}-{end}" + (" (more available)" if has_more else "")) click.echo(f"Showing {start}-{end}" + (" (more available)" if has_more else ""))
click.echo() click.echo()
click.echo(f"{'ID':<36} {'Status':<10} {'Recipe':<10} {'Output Hash':<20}")
click.echo("-" * 80)
for run in runs: for run in runs:
output = run.get("output_cid", "")[:16] + "..." if run.get("output_cid") else "-" click.echo(f"Run ID: {run['run_id']}")
click.echo(f"{run['run_id']} {run['status']:<10} {run['recipe']:<10} {output}") click.echo(f" Status: {run['status']}")
click.echo(f" Recipe: {run['recipe']}")
if run.get("recipe_name"):
click.echo(f" Recipe Name: {run['recipe_name']}")
if run.get("output_cid"):
click.echo(f" Output: {run['output_cid']}")
if run.get("created_at"):
click.echo(f" Created: {run['created_at']}")
click.echo()
@cli.command() @cli.command()
@@ -504,9 +510,10 @@ def status(run_id, plan, artifacts, analysis):
step_id = step.get("id", step.get("node_id", f"step_{i}")) step_id = step.get("id", step.get("node_id", f"step_{i}"))
step_type = step.get("type", "unknown") step_type = step.get("type", "unknown")
output_cid = step.get("output_cid", "") output_cid = step.get("output_cid", "")
output_str = f"{output_cid[:16]}..." if output_cid else ""
click.echo(f" {i}. {status_badge:<10} {step_id:<20} ({step_type}) {output_str}") click.echo(f" {i}. {status_badge:<10} {step_id} ({step_type})")
if output_cid:
click.echo(f" Output: {output_cid}")
else: else:
click.echo(" No plan steps available.") click.echo(" No plan steps available.")
else: else:
@@ -530,9 +537,12 @@ def status(run_id, plan, artifacts, analysis):
name = art.get("name", art.get("step_id", "output")) name = art.get("name", art.get("step_id", "output"))
media_type = art.get("media_type", art.get("content_type", "")) media_type = art.get("media_type", art.get("content_type", ""))
size = art.get("size", "") size = art.get("size", "")
size_str = f" ({size})" if size else "" click.echo(f" {name}:")
type_str = f" [{media_type}]" if media_type else "" click.echo(f" CID: {cid}")
click.echo(f" {name}: {cid[:24]}...{type_str}{size_str}") if media_type:
click.echo(f" Type: {media_type}")
if size:
click.echo(f" Size: {size}")
else: else:
click.echo(" No artifacts available.") click.echo(" No artifacts available.")
else: else:
@@ -739,10 +749,12 @@ def cache(limit, offset, media_type):
name = item.get("friendly_name") or item.get("filename") if isinstance(item, dict) else None name = item.get("friendly_name") or item.get("filename") if isinstance(item, dict) else None
content_type = item.get("content_type", "") if isinstance(item, dict) else "" content_type = item.get("content_type", "") if isinstance(item, dict) else ""
type_badge = f"[{content_type.split('/')[0]}]" if content_type else "" type_badge = f"[{content_type.split('/')[0]}]" if content_type else ""
click.echo(f"CID: {cid}")
if name: if name:
click.echo(f" {cid[:24]}... {name} {type_badge}") click.echo(f" Name: {name}")
else: if type_badge:
click.echo(f" {cid} {type_badge}") click.echo(f" Type: {type_badge}")
click.echo()
@cli.command() @cli.command()
@@ -1555,11 +1567,13 @@ def list_effects(limit, offset):
for effect in effects: for effect in effects:
meta = effect.get("meta", {}) meta = effect.get("meta", {})
click.echo(f" {meta.get('name', 'unknown')} v{meta.get('version', '?')}") click.echo(f"Name: {meta.get('name', 'unknown')} v{meta.get('version', '?')}")
click.echo(f" Hash: {effect['cid'][:32]}...") click.echo(f" CID: {effect['cid']}")
click.echo(f" Temporal: {meta.get('temporal', False)}") if effect.get('friendly_name'):
click.echo(f" Friendly Name: {effect['friendly_name']}")
click.echo(f" Temporal: {meta.get('temporal', False)}")
if meta.get('params'): if meta.get('params'):
click.echo(f" Params: {', '.join(p['name'] for p in meta['params'])}") click.echo(f" Params: {', '.join(p['name'] for p in meta['params'])}")
click.echo() click.echo()
except requests.RequestException as e: except requests.RequestException as e:
click.echo(f"Failed to list effects: {e}", err=True) click.echo(f"Failed to list effects: {e}", err=True)
@@ -1720,7 +1734,7 @@ def show_recipe(recipe_id):
if recipe.get("fixed_inputs"): if recipe.get("fixed_inputs"):
click.echo("\nFixed Inputs:") click.echo("\nFixed Inputs:")
for inp in recipe["fixed_inputs"]: for inp in recipe["fixed_inputs"]:
click.echo(f" - {inp['asset']}: {inp['cid'][:16]}...") click.echo(f" - {inp['asset']}: {inp['cid']}")
@cli.command("run-recipe") @cli.command("run-recipe")