aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Assistant.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/assistant/Assistant.qml')
-rw-r--r--desktop/assistant/Assistant.qml8
1 files changed, 7 insertions, 1 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
}