From dfca04e734243df6e445b04894b76162d210d741 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Thu, 16 Jul 2026 07:29:30 +0200 Subject: [PATCH] all blocks use markdown rendering by default - Tool blocks: expanded via sub-blocks (same as assistant) so embedded diffs and code fences render properly with coloring - Call blocks: always JSON, use formattedContent (pretty-print + highlight) - Prose sub-blocks use Text.MarkdownText for native backtick/bold/link support --- gui/main.qml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/main.qml b/gui/main.qml index bfa077b..7418803 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -601,18 +601,22 @@ ApplicationWindow { id: callDelegate ColumnLayout { spacing: 2 + + property bool expanded: false + Label { - text: (callText.visible ? "\u25BC" : "\u25B6") + " call: " + (block.blockName || "") + text: (parent.expanded ? "\u25BC" : "\u25B6") + " call: " + (block.blockName || "") font.pixelSize: Qt.application.font.pixelSize * 0.8 opacity: 0.5 MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: callText.visible = !callText.visible + onClicked: parent.parent.expanded = !parent.parent.expanded } } + + // Call args are always JSON - use pretty-printed highlighted HTML Text { - id: callText Layout.fillWidth: true text: block.formattedContent || "" textFormat: Text.RichText @@ -620,7 +624,7 @@ ApplicationWindow { font.family: "monospace" font.pixelSize: Qt.application.font.pixelSize * 0.85 opacity: 0.7 - visible: false + visible: parent.expanded color: palette.text } }