Files
zach cd3da1941b
C++ / fmt (pull_request) Successful in 4s
C++ / build (pull_request) Failing after 2m6s
C++ / clang-tidy (pull_request) Failing after 2m5s
JS/TS / fmt (pull_request) Failing after 3m8s
Python / static (pull_request) Successful in 24s
Python / verify (pull_request) Successful in 1m21s
JS/TS / lint (pull_request) Successful in 5m10s
Rust / fmt (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 56s
Rust / clippy (pull_request) Successful in 46s
fix: truncate context logic
2026-09-04 02:20:37 +02:00

119 lines
2.2 KiB
QML

pragma ComponentBehavior: Bound
import ZShell.Config
import QtQuick
import QtQuick.Layouts
import qs.Components
import qs.Modules.Notifications.Sidebar.Chat
import qs.Services
Item {
id: root
required property Props props
required property var visibilities
Connections {
function onIsWindowChanged(): void {
if (ChatState.isWindow)
root.props.currentTab = 0;
}
target: ChatState
}
ColumnLayout {
id: layout
anchors.fill: parent
spacing: Tokens.spacing.small
Tabs {
Layout.fillWidth: true
Layout.preferredHeight: ChatState.isWindow || !Config.llm.enabled ? 0 : implicitHeight
dashState: root.props
nonAnimWidth: layout.width
visible: height > 0
}
CustomClippingRect {
Layout.fillHeight: true
Layout.fillWidth: true
radius: Tokens.rounding.small
Item {
id: pages
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: parent.width
opacity: root.props.currentTab === 0 ? 1 : 0
visible: opacity > 0
x: root.props.currentTab === 0 ? 0 : -root.width
Behavior on opacity {
Anim {}
}
Behavior on x {
Anim {}
}
CustomRect {
anchors.fill: parent
color: Colors.tPalette.m3surfaceContainerLow
radius: Tokens.rounding.small
NotifDock {
props: root.props
visibilities: root.visibilities
}
}
}
Loader {
id: chatLoader
anchors.bottom: parent.bottom
anchors.top: parent.top
active: Config.llm.enabled
width: parent.width
property bool tre: true
sourceComponent: Item {
id: chatPage
opacity: root.props.currentTab === 1 ? 1 : 0
visible: opacity > 0
x: root.props.currentTab === 0 ? root.width : 0
z: 1
Behavior on opacity {
Anim {}
}
Behavior on x {
Anim {}
}
CustomRect {
anchors.fill: parent
color: Colors.tPalette.m3surfaceContainerLow
radius: Tokens.rounding.small
ChatPanel {
anchors.fill: parent
}
}
}
}
}
CustomRect {
Layout.fillWidth: true
Layout.topMargin: Tokens.padding.small - layout.spacing
color: Colors.tPalette.m3outlineVariant
implicitHeight: 1
}
}
}