From d008a2e6a8c346f5f42f50bef01ac0138099ec65 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 29 Jul 2026 16:23:37 +0200 Subject: [PATCH] gui: collapse call blocks by default, click to expand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tool call args are less interesting than results. Show only the call name with a ▶ toggle; click to expand and see the full args. --- gui/ChatPane.qml | 11 +++++++++-- gui/main-kf5.qml | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gui/ChatPane.qml b/gui/ChatPane.qml index 27c0d2f..de6ed94 100644 --- a/gui/ChatPane.qml +++ b/gui/ChatPane.qml @@ -795,6 +795,8 @@ Item { Item { implicitHeight: callLayout.implicitHeight + 12 + property bool expanded: false + HoverHandler { id: callHover } Rectangle { @@ -831,13 +833,18 @@ Item { spacing: 4 Label { - text: "\u26A1 call: " + (block ? (block.blockName || "") : "") + text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "") font.pixelSize: Qt.application.font.pixelSize * 0.8 color: "#ff9800" + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: expanded = !expanded + } } Repeater { - model: block ? block.subBlocks : [] + model: expanded && block ? block.subBlocks : [] delegate: Loader { Layout.fillWidth: true property var subBlock: modelData diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index dd53882..27293df 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -1644,6 +1644,8 @@ ApplicationWindow { Item { implicitHeight: callLayout.implicitHeight + 12 + property bool expanded: false + HoverHandler { id: callHover } Rectangle { @@ -1680,13 +1682,18 @@ ApplicationWindow { spacing: 4 Label { - text: "\u26A1 call: " + (block ? (block.blockName || "") : "") + text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "") font.pixelSize: Qt.application.font.pixelSize * 0.8 color: "#ff9800" + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: expanded = !expanded + } } Repeater { - model: block ? block.subBlocks : [] + model: expanded && block ? block.subBlocks : [] delegate: Loader { Layout.fillWidth: true property var subBlock: modelData