fix: skip RESOLUTION section in PSA export for incomplete sessions

Mid-session "Copy for Ticket" no longer shows a misleading Resolution
section that echoed the last step's answer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-02-13 10:50:55 -05:00
parent 1869da4fcb
commit f8a14d8b4c

View File

@@ -429,7 +429,8 @@ def generate_psa_export(session: Session, options: SessionExport) -> str:
lines.append("No steps recorded.") lines.append("No steps recorded.")
lines.append("") lines.append("")
# Resolution # Resolution — only for completed sessions
if session.completed_at:
lines.append("--- RESOLUTION ---") lines.append("--- RESOLUTION ---")
_raw_notes = getattr(session, 'outcome_notes', None) _raw_notes = getattr(session, 'outcome_notes', None)
outcome_notes = _raw_notes if isinstance(_raw_notes, str) else '' outcome_notes = _raw_notes if isinstance(_raw_notes, str) else ''