From 6778a2fc657620a34b2f32cc8c209dc11ef25ce9 Mon Sep 17 00:00:00 2001 From: rarebuffalo Date: Fri, 12 Jun 2026 19:10:58 +0530 Subject: [PATCH] enable pdf export in cli interactive chat repl --- cli/securelens/repl.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/securelens/repl.py b/cli/securelens/repl.py index 9faeb90..afb6e7f 100644 --- a/cli/securelens/repl.py +++ b/cli/securelens/repl.py @@ -37,6 +37,7 @@ HELP_TEXT = """ [bold]/issues critical[/bold] Filter issues by severity (critical/high/medium/low) [bold]/export markdown[/bold] Save the report as a Markdown file [bold]/export json[/bold] Save the report as a JSON file + [bold]/export pdf[/bold] Save the report as a PDF file [bold]/model [/bold] Switch AI model (e.g. /model gpt-4o-mini) [bold]/clear[/bold] Clear the terminal [bold]/exit[/bold] Exit the REPL @@ -233,6 +234,10 @@ async def _handle_slash_command(cmd: str, ctx: ReplContext) -> bool: if fmt == "json": path = save_json(ctx.scan_result, target_type) console.print(f"\n [bold green]✓ JSON report saved:[/bold green] [dim]{path}[/dim]\n") + elif fmt == "pdf": + from securelens.output.exporters import save_pdf + path = save_pdf(ctx.scan_result, target_type) + console.print(f"\n [bold green]✓ PDF report saved:[/bold green] [dim]{path}[/dim]\n") else: path = save_markdown(ctx.scan_result, target_type) console.print(f"\n [bold green]✓ Markdown report saved:[/bold green] [dim]{path}[/dim]\n")