diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-24 12:09:29 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-24 12:09:29 +0200 |
| commit | 78dcf288d9ae3a80002fe40d23c9ed85021f7e7a (patch) | |
| tree | cb987f88dd5ac0554499840965fdc6e4b4ee6eb7 | |
| parent | adb81f6d21b8152114b62acbfc6fa78c9ecec29f (diff) | |
| download | quickshell-78dcf288d9ae3a80002fe40d23c9ed85021f7e7a.tar.gz quickshell-78dcf288d9ae3a80002fe40d23c9ed85021f7e7a.zip | |
assistant: the canvas owns tall and the card's top
The companion needs both to sit on the chat card, and should not reach
into the card for them. Card.tall now reads the canvas's, so there is one
definition of when the card is tall.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| -rw-r--r-- | desktop/assistant/Assistant.qml | 8 | ||||
| -rw-r--r-- | desktop/assistant/Card.qml | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/desktop/assistant/Assistant.qml b/desktop/assistant/Assistant.qml index 0b7026d..4144910 100644 --- a/desktop/assistant/Assistant.qml +++ b/desktop/assistant/Assistant.qml @@ -112,6 +112,12 @@ Scope { readonly property var screenObj: Quickshell.screens.find(s => s.name === root.monitor) ?? Quickshell.screens[0] + // The tall card (a chat, or a panel) is fullHeight and centred, so its + // top only moves on entering or leaving tall. The companion sits there. + readonly property bool tall: root.mode === "chat" || root.historyOpen || root.pickerOpen || root.modelsOpen + readonly property int fullHeight: Math.round(root.screenObj.height * 0.7) + readonly property int cardTop: Math.round((root.screenObj.height - root.fullHeight) / 2) + function toggle() { if (root.open) root.close(); else root.show(); } // A conversation idle for 10 minutes is over: opening starts a new one, @@ -552,7 +558,7 @@ Scope { Card { anchors.centerIn: parent width: Math.min(760, parent.width - 48) - fullHeight: Math.round(parent.height * 0.7) + fullHeight: root.fullHeight canvas: root turnModel: turns } diff --git a/desktop/assistant/Card.qml b/desktop/assistant/Card.qml index 810920f..2f85e50 100644 --- a/desktop/assistant/Card.qml +++ b/desktop/assistant/Card.qml @@ -29,7 +29,7 @@ Rectangle { readonly property string mode: card.canvas.mode readonly property bool panel: card.canvas.historyOpen || card.canvas.pickerOpen || card.canvas.modelsOpen - readonly property bool tall: card.mode === "chat" || card.panel + readonly property bool tall: card.canvas.tall // Bottom-up: the input, then the actions (file state), then the chips. height: card.tall ? card.fullHeight |
