web: render a turn's input and output as their markdown bodies

The stage pane stringified the step's single-key {markdown} map, so a turn's
output appeared under a literal "markdown:" line inside a code card. The pane now
shows that body as the document it is, with "(no output)" for an empty turn; an
ordinary value map still shows its keys.
This commit is contained in:
2026-10-19 23:32:51 +01:00
parent b1482b554b
commit 793b62f53e
4 changed files with 47 additions and 2 deletions
+5
View File
@@ -315,6 +315,11 @@ function renderFieldValue(value) {
function renderStageField(field) {
if (field.block) {
// A turn's input/output is one markdown document: render it as the document,
// not as a code card whose label repeats the section title.
if (looksLikeMarkdown(field.value)) {
return h("div", { class: "stage-field-markdown" }, renderFieldValue(field.value));
}
return h(
"div",
{ class: "codeblock" },