initial commit for llm chat tab in sidebar

This commit is contained in:
2026-08-20 00:27:48 +02:00
parent d3e61efd86
commit 47bab21e22
22 changed files with 2085 additions and 9 deletions
+16
View File
@@ -1,7 +1,11 @@
pragma ComponentBehavior: Bound
import qs.Components
import qs.Components.Toast
import ZShell
import ZShell.Config
import ZShell.Llm
import Quickshell
import QtQuick
Item {
@@ -12,6 +16,7 @@ Item {
readonly property Props props: Props {
}
readonly property bool shouldBeActive: root.visibilities.sidebar && Config.sidebar.enabled
readonly property bool chatActive: props.currentTab === 1
required property var visibilities
anchors.rightMargin: (-implicitWidth - 5) * offsetScale
@@ -26,6 +31,17 @@ Item {
}
}
Connections {
target: Chat
function onErrorOccurred(message: string): void {
if (root.shouldBeActive && root.chatActive)
return;
Toaster.toast(qsTr("Chat"), message, "error_outline", Toast.Error);
}
}
Loader {
id: content