spacr.qt.ai.issue_preview

Editable, explicitly approved preview for a public GitHub report.

Classes

IssuePreviewDialog

Show the exact public payload and require a Send click.

Module Contents

class spacr.qt.ai.issue_preview.IssuePreviewDialog(report: Mapping[str, str], parent=None, console=None, traceback_text: str = '')[source]

Bases: PySide6.QtWidgets.QDialog

Show the exact public payload and require a Send click.

Parameters:
  • report – the payload, as body and fingerprint. The dialog shows the text that would be sent; nothing is added to it afterwards.

  • parent – parent widget.

  • console – the AI console that owns the conversation. Taken from parent when not given, so the screen opening this does not have to know about the button.

  • traceback_text – the traceback to offer, if there is one.

Build the review dialog shown before anything is posted publicly.

Nothing has been sent when this opens, and the warning at the top says so: a public issue is world-readable, indexed and mirrored, and cannot be reliably unpublished. Path stripping is on by default.

Diagnose asks spaCR AI to explain the error before the report is sent. Its analysis is added to the report body.

Parameters:
  • report – the drafted issue – its title, body and fingerprint.

  • parent – parent widget, or None.

  • console – the console that owns the AI conversation; taken from the parent when not given, so the screen opening this need not know about the button.

  • traceback_text – the traceback to diagnose.

approved_report() → dict[str, str][source]

Return exactly the currently displayed, editable payload.