diff options
Diffstat (limited to 'desktop/assistant/Message.qml')
| -rw-r--r-- | desktop/assistant/Message.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/desktop/assistant/Message.qml b/desktop/assistant/Message.qml index c724c2e..fcf77ec 100644 --- a/desktop/assistant/Message.qml +++ b/desktop/assistant/Message.qml @@ -22,6 +22,7 @@ Column { required property string reply required property string think required property string tools + required property string files // JSON: [{name, kind, pages, truncated}] required property string error required property bool live required property bool stopped @@ -43,6 +44,32 @@ Column { } } + // The files that went with the question, as the daemon read them. + Flow { + width: msg.width + spacing: 6 + visible: msg.files !== "[]" + Repeater { + model: JSON.parse(msg.files) + Rectangle { + required property var modelData + width: f.implicitWidth + 16 + height: f.implicitHeight + 6 + radius: height / 2 + color: Qt.alpha(Theme.surface, 0.6) + Text { + id: f + anchors.centerIn: parent + text: parent.modelData.name + + (parent.modelData.pages ? ` · ${parent.modelData.pages} pages` : "") + + (parent.modelData.truncated ? " · truncated" : "") + color: parent.modelData.truncated ? Theme.yellow : Theme.subtext + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 5 } + } + } + } + } + // Collapsed by default; a click shows the reasoning as plain text. Text { visible: msg.think !== "" |
