feat: add [CUSTOM] markers to custom steps in all 4 export generators
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -160,7 +160,11 @@ def generate_markdown_export(session: Session, options: SessionExport) -> str:
|
|||||||
notes = decision.get("notes", "")
|
notes = decision.get("notes", "")
|
||||||
duration_seconds = _get_step_duration_seconds(decision)
|
duration_seconds = _get_step_duration_seconds(decision)
|
||||||
|
|
||||||
lines.append(f"### Step {i}: {question}")
|
is_custom = decision.get("node_id", "").startswith("custom-")
|
||||||
|
prefix = "[CUSTOM] " if is_custom else ""
|
||||||
|
lines.append(f"### Step {i}: {prefix}{question}")
|
||||||
|
if is_custom:
|
||||||
|
lines.append("*Custom step added by engineer*")
|
||||||
if answer:
|
if answer:
|
||||||
lines.append(f"**Answer:** {answer}")
|
lines.append(f"**Answer:** {answer}")
|
||||||
if notes:
|
if notes:
|
||||||
@@ -247,7 +251,9 @@ def generate_text_export(session: Session, options: SessionExport) -> str:
|
|||||||
notes = decision.get("notes", "")
|
notes = decision.get("notes", "")
|
||||||
duration_seconds = _get_step_duration_seconds(decision)
|
duration_seconds = _get_step_duration_seconds(decision)
|
||||||
|
|
||||||
lines.append(f"\n{i}. {question}")
|
is_custom = decision.get("node_id", "").startswith("custom-")
|
||||||
|
prefix = "[CUSTOM] " if is_custom else ""
|
||||||
|
lines.append(f"\n{i}. {prefix}{question}")
|
||||||
if answer:
|
if answer:
|
||||||
lines.append(f" Answer: {answer}")
|
lines.append(f" Answer: {answer}")
|
||||||
if notes:
|
if notes:
|
||||||
@@ -339,7 +345,9 @@ def generate_html_export(session: Session, options: SessionExport) -> str:
|
|||||||
duration_seconds = _get_step_duration_seconds(decision)
|
duration_seconds = _get_step_duration_seconds(decision)
|
||||||
|
|
||||||
html_parts.append('<div class="step">')
|
html_parts.append('<div class="step">')
|
||||||
html_parts.append(f'<h3>Step {i}: {question}</h3>')
|
is_custom = decision.get("node_id", "").startswith("custom-")
|
||||||
|
custom_badge = '<span style="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.75em; margin-right: 6px;">CUSTOM</span>' if is_custom else ''
|
||||||
|
html_parts.append(f'<h3>{custom_badge}Step {i}: {question}</h3>')
|
||||||
if answer:
|
if answer:
|
||||||
html_parts.append(f'<p class="answer">Answer: {answer}</p>')
|
html_parts.append(f'<p class="answer">Answer: {answer}</p>')
|
||||||
if notes:
|
if notes:
|
||||||
@@ -410,7 +418,9 @@ def generate_psa_export(session: Session, options: SessionExport) -> str:
|
|||||||
notes = decision.get("notes", "")
|
notes = decision.get("notes", "")
|
||||||
duration_seconds = _get_step_duration_seconds(decision)
|
duration_seconds = _get_step_duration_seconds(decision)
|
||||||
|
|
||||||
line = f"{i}. {question}"
|
is_custom = decision.get("node_id", "").startswith("custom-")
|
||||||
|
prefix = "[CUSTOM] " if is_custom else ""
|
||||||
|
line = f"{i}. {prefix}{question}"
|
||||||
if answer:
|
if answer:
|
||||||
line += f" -> {answer}"
|
line += f" -> {answer}"
|
||||||
if duration_seconds is not None:
|
if duration_seconds is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user