|
@@ -319,11 +319,12 @@ def _render_step_card(
|
|
|
title: str,
|
|
title: str,
|
|
|
inner_html: str,
|
|
inner_html: str,
|
|
|
) -> str:
|
|
) -> str:
|
|
|
|
|
+ title_html = f'<div class="card-title">{title}</div>' if title else ""
|
|
|
return f"""
|
|
return f"""
|
|
|
<article class="card card-step" id="step-{step_no}">
|
|
<article class="card card-step" id="step-{step_no}">
|
|
|
<header class="card-header">
|
|
<header class="card-header">
|
|
|
<div class="step-num">Step {step_no}</div>
|
|
<div class="step-num">Step {step_no}</div>
|
|
|
- <div class="card-title">{title}</div>
|
|
|
|
|
|
|
+ {title_html}
|
|
|
<div class="card-tags">
|
|
<div class="card-tags">
|
|
|
<span class="tag">iteration {iteration}</span>
|
|
<span class="tag">iteration {iteration}</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -403,7 +404,7 @@ def _render_timeline(events: list[dict[str, Any]]) -> str:
|
|
|
_render_step_card(
|
|
_render_step_card(
|
|
|
step_no,
|
|
step_no,
|
|
|
_event_iteration(input_ev),
|
|
_event_iteration(input_ev),
|
|
|
- "LLM 输入 · 输出",
|
|
|
|
|
|
|
+ "",
|
|
|
input_html + output_html,
|
|
input_html + output_html,
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
@@ -450,7 +451,7 @@ def _nav_items(events: list[dict[str, Any]]) -> str:
|
|
|
for step_no, group in enumerate(_group_visible_events(events), start=1):
|
|
for step_no, group in enumerate(_group_visible_events(events), start=1):
|
|
|
if len(group) == 2:
|
|
if len(group) == 2:
|
|
|
ev = group[0]
|
|
ev = group[0]
|
|
|
- label = "LLM 输入 · 输出"
|
|
|
|
|
|
|
+ label = ""
|
|
|
nav_class = "nav-step-pair"
|
|
nav_class = "nav-step-pair"
|
|
|
detail = f" · iter {_event_iteration(ev)}"
|
|
detail = f" · iter {_event_iteration(ev)}"
|
|
|
else:
|
|
else:
|
|
@@ -867,7 +868,6 @@ def render_html(events: list[dict[str, Any]]) -> str:
|
|
|
|
|
|
|
|
<section class="timeline">
|
|
<section class="timeline">
|
|
|
<h2 style="margin:0 0 0.5rem;font-size:1.1rem">执行时间线</h2>
|
|
<h2 style="margin:0 0 0.5rem;font-size:1.1rem">执行时间线</h2>
|
|
|
- <p class="muted" style="margin:0 0 1rem">按步骤展示:LLM 输入 → 思考/输出</p>
|
|
|
|
|
{_render_timeline(events)}
|
|
{_render_timeline(events)}
|
|
|
</section>
|
|
</section>
|
|
|
</main>
|
|
</main>
|