Compare commits

...

1 Commits

Author SHA1 Message Date
HAL9000 3dcc6154f1 fix(cli): emit JSON envelope for session delete in non-rich formats
The delete command's non-rich output path used console.print with ANSI
markup instead of the spec-required format_output envelope. Fixed to use
format_output(data, fmt.value) for machine-parseable output.
2026-05-11 01:59:50 +00:00
+3 -2
View File
@@ -559,8 +559,9 @@ def delete(
console.print()
console.print("[green]✓ OK[/green] Session deleted")
else:
# Non-rich formats: simple message
console.print(f"[green]✓ OK[/green] Session {session_id} deleted")
# Non-rich formats: emit proper JSON envelope via format_output
data = {"session_id": session_id, "status": "deleted"}
typer.echo(format_output(data, fmt.value))
except SessionNotFoundError as exc:
console.print(f"[red]Session not found:[/red] {session_id}")