aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Message.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 15:23:41 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 15:23:41 +0200
commitf5da8d8ee2cb4ace1fa6841437b4798e7799c100 (patch)
tree9a1d51d8e61782852de2779cc77bfa5d2ca94a65 /desktop/assistant/Message.qml
parent13a10999f53802858f87883db381842d741eab69 (diff)
downloadquickshell-f5da8d8ee2cb4ace1fa6841437b4798e7799c100.tar.gz
quickshell-f5da8d8ee2cb4ace1fa6841437b4798e7799c100.zip
feat(assistant): entry line, file state, staged files and a picker
The card has three states: an entry line, a file state for staged files with Chat about it, and the chat. SUPER+Home resumes a conversation active in the last 10 minutes and otherwise starts a new one. The paperclip opens a picker drawn in the card, since a system dialog would open beneath the overlay that holds the keyboard. Button gains a font alias for the paperclip glyph, and the canvas a socketPath property so a check can point it at a scratch daemon. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/assistant/Message.qml')
-rw-r--r--desktop/assistant/Message.qml27
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 !== ""