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
+12 -1
View File
@@ -9,6 +9,7 @@
#include "dock.hpp"
#include "general.hpp"
#include "launcher.hpp"
#include "llm.hpp"
#include "lock.hpp"
#include "notifs.hpp"
#include "osd.hpp"
@@ -33,6 +34,8 @@
namespace ZShell::config {
Config* Config::s_instance = nullptr;
Config::Config(QObject* parent)
: ConfigObject(parent)
, m_appearance(new Appearance(this))
@@ -44,6 +47,7 @@ Config::Config(QObject* parent)
, m_dock(new Dock(this))
, m_general(new General(this))
, m_launcher(new Launcher(this))
, m_llm(new Llm(this))
, m_lock(new Lock(this))
, m_notifs(new Notifs(this))
, m_osd(new Osd(this))
@@ -51,6 +55,7 @@ Config::Config(QObject* parent)
, m_services(new Services(this))
, m_sidebar(new Sidebar(this))
, m_utilities(new Utilities(this)) {
s_instance = this;
connect(this, &ConfigObject::propertiesChanged, this, &Config::scheduleSave);
m_saveTimer.setSingleShot(true);
@@ -81,8 +86,14 @@ Config::Config(QObject* parent)
m_firstLoadDone = true;
}
Config* Config::instance() {
return s_instance;
}
Config* Config::create(QQmlEngine*, QJSEngine*) {
return new Config();
if (!s_instance)
s_instance = new Config();
return s_instance;
}
QString Config::filePath() const {