mirror of
https://github.com/usestrix/strix.git
synced 2026-08-19 18:13:34 +02:00
feat(interface): show resume hint on the existing exit panel
When a scan ends without calling ``finish_scan`` (Ctrl+C, TUI quit,
crash), ``display_completion_message`` now appends one extra line
inside the existing completion panel:
Resume strix --run-name <run_name>
Same ``dim``-label / coloured-value styling as the panel's ``Target``
and ``Output`` rows. Only rendered when ``scan_completed`` is False —
a finished scan doesn't need a resume nudge.
Triggers ``orchestration/scan.py``'s implicit-resume path on the next
invocation (presence of ``{run_dir}/bus.json`` is the trigger), so
the user gets back exactly where they left off — root + every
non-terminal subagent's full LLM history, bus topology, prior
findings.
Covers both ``run_cli`` and ``run_tui`` paths since
``display_completion_message`` is called from ``main()`` regardless
of which front-end ran.
This commit is contained in:
@@ -21,7 +21,6 @@ from strix.telemetry.tracer import Tracer, set_global_tracer
|
||||
|
||||
from .utils import (
|
||||
build_live_stats_text,
|
||||
format_resume_hint,
|
||||
format_vulnerability_report,
|
||||
)
|
||||
|
||||
@@ -140,10 +139,6 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
|
||||
def signal_handler(_signum: int, _frame: Any) -> None:
|
||||
tracer.cleanup()
|
||||
hint = format_resume_hint(args.run_name)
|
||||
if hint is not None:
|
||||
console.print()
|
||||
console.print(hint)
|
||||
sys.exit(1)
|
||||
|
||||
atexit.register(cleanup_on_exit)
|
||||
@@ -217,10 +212,6 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
|
||||
except Exception as e:
|
||||
console.print(f"[bold red]Error during penetration test:[/] {e}")
|
||||
hint = format_resume_hint(args.run_name)
|
||||
if hint is not None:
|
||||
console.print()
|
||||
console.print(hint)
|
||||
raise
|
||||
|
||||
if tracer.final_scan_result:
|
||||
|
||||
Reference in New Issue
Block a user