web: show a turn's markdown output as the result
A turn run carries one markdown body. The Output tab now renders that body directly instead of hiding it behind a collapsed field named "markdown"; legacy field maps keep their collapsible sections.
This commit is contained in:
@@ -331,6 +331,13 @@ function renderRunFieldTab(map, keyPrefix, emptyMessage) {
|
||||
wrap.append(h("div", { class: "run-empty muted", text: emptyMessage }));
|
||||
return wrap;
|
||||
}
|
||||
// A turn's output is one markdown body: render it as the result, not as a
|
||||
// collapsed field named "markdown". Legacy field maps keep their sections.
|
||||
const single = sections.length === 1 ? sections[0] : null;
|
||||
if (single && single.key.toLowerCase() === "markdown") {
|
||||
wrap.append(h("div", { class: "run-markdown-body" }, renderFieldValue(single.value)));
|
||||
return wrap;
|
||||
}
|
||||
for (const section of sections) {
|
||||
const key = `${keyPrefix}-${section.key}`;
|
||||
wrap.append(
|
||||
|
||||
Reference in New Issue
Block a user