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
This commit is contained in:
parent
7f226e2012
commit
dfca04e734
12
gui/main.qml
12
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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue