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:
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user