Feat: LLM Chat and Nightlight shader #155

Open
zach wants to merge 21 commits from feat/llm-chat-tab into main
Owner

What & why

New chat interface in sidebar

The sidebar now has two tabs, notifications and chat. The chat is a frontend for whatever endpoint API the user sets in Config.llm.endpoint. Currently hardcoded-ish for llama.cpp endpoints but will generalize.

Tools

The chat has these tools defined:

  • WebFetch (self-explanatory)

New nightlight shader

Hyprland plugin + C++ QML extension combo to support a custom shader implementation for nightlight which hooks Hyprland's render pipeline to insert itself after the buffer has been mirrored, meaning the shader doesn't shouldn't show up in screen captures.

New config options

  • Config.display.nightlight.useNative
  • Config.display.nightlight.fadeDuration

Fade duration is not available when useNative == false due to insufficient support from hyprsunset.

Backend config migration

We now have a reliable way to migrate objects in the config file, preserving the user's values cleanly. Can be found in Plugins/ZShell/Config/migration.{c,h}pp.

Usage

// migration.cpp
const QList<ConfigMigrationRule>& ConfigMigrations::rules() {
	static const QList<ConfigMigrationRule> s_rules = {
		migrate("old.object.path", "new.object.path"),
	};
	return s_rules;
}

Once migrated, rules are a no-op and can stay indefinitely (though they shouldn't.)

Related issue

No response

Type

New feature

Tested

  • Build succeeds
  • Existing tests pass
  • Manually verified

Breaking changes?

No response

Checklist

  • CI passes (format, lint, typecheck)
  • Clean commits
  • No new warnings
  • Docs updated if needed
### What & why ## New chat interface in sidebar The sidebar now has two tabs, notifications and chat. The chat is a frontend for whatever endpoint API the user sets in `Config.llm.endpoint`. Currently hardcoded-ish for `llama.cpp` endpoints but will generalize. ### Tools The chat has these tools defined: - WebFetch (self-explanatory) ## New nightlight shader Hyprland plugin + C++ QML extension combo to support a custom shader implementation for nightlight which hooks Hyprland's render pipeline to insert itself after the buffer has been mirrored, meaning the shader ~~doesn't~~ shouldn't show up in screen captures. New config options - `Config.display.nightlight.useNative` - `Config.display.nightlight.fadeDuration` Fade duration is not available when `useNative == false` due to insufficient support from hyprsunset. ## Backend config migration We now have a reliable way to migrate objects in the config file, preserving the user's values cleanly. Can be found in `Plugins/ZShell/Config/migration.{c,h}pp`. ### Usage ```cpp // migration.cpp const QList<ConfigMigrationRule>& ConfigMigrations::rules() { static const QList<ConfigMigrationRule> s_rules = { migrate("old.object.path", "new.object.path"), }; return s_rules; } ``` Once migrated, rules are a no-op and can stay indefinitely (though they shouldn't.) ### Related issue _No response_ ### Type New feature ### Tested - [x] Build succeeds - [ ] Existing tests pass - [x] Manually verified ### Breaking changes? _No response_ ### Checklist - [ ] CI passes (format, lint, typecheck) - [x] Clean commits - [ ] No new warnings - [x] Docs updated if needed
zach added 15 commits 2026-08-31 18:57:52 +02:00
feat: config object migration path and add new options to settings
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 12s
JS/TS / fmt (pull_request) Successful in 15s
JS/TS / lint (pull_request) Successful in 15s
C++ / clang-tidy (pull_request) Failing after 33s
Python / static (pull_request) Failing after 36s
Rust / fmt (pull_request) Successful in 1m14s
Rust / build (pull_request) Successful in 1m49s
Rust / clippy (pull_request) Successful in 1m33s
Python / verify (pull_request) Successful in 2m10s
dbb51ceadd
zach added 1 commit 2026-08-31 19:02:30 +02:00
chore: format llm c files
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 9s
JS/TS / lint (pull_request) Successful in 9s
JS/TS / fmt (pull_request) Successful in 16s
C++ / clang-tidy (pull_request) Failing after 43s
Python / static (pull_request) Failing after 57s
Rust / fmt (pull_request) Successful in 1m30s
Rust / build (pull_request) Successful in 2m5s
Rust / clippy (pull_request) Successful in 1m55s
Python / verify (pull_request) Successful in 2m23s
52feb6006a
zach added 1 commit 2026-08-31 19:05:27 +02:00
chore: format llm c files
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 22s
JS/TS / lint (pull_request) Successful in 16s
Python / static (pull_request) Failing after 37s
C++ / clang-tidy (pull_request) Failing after 1m19s
Rust / fmt (pull_request) Successful in 1m24s
Rust / clippy (pull_request) Successful in 1m59s
Rust / build (pull_request) Successful in 2m12s
Python / verify (pull_request) Successful in 2m48s
c5a089adaf
zach added 1 commit 2026-08-31 19:06:56 +02:00
chore: format llm c files
C++ / fmt (pull_request) Successful in 16s
C++ / build (pull_request) Failing after 19s
JS/TS / fmt (pull_request) Successful in 10s
C++ / clang-tidy (pull_request) Failing after 29s
JS/TS / lint (pull_request) Successful in 23s
Python / static (pull_request) Failing after 48s
Rust / fmt (pull_request) Successful in 1m15s
Rust / build (pull_request) Successful in 1m46s
Rust / clippy (pull_request) Successful in 1m33s
Python / verify (pull_request) Successful in 2m16s
cef91caebc
Collaborator

AI concern

My main concern would be if the chat window is an opt-in setting. I would personally think many users are not waiting for an llm integration into a quickshell project; I know I am not.

Will this be an opt-in feature? Meaning that the user would need to go into settings or the config file to enable the front-end to even show the chat window.

Build failure

It seems build is failing due to missing libcmark-gfm. I'm not sure what package this is as in artix repo + arch extra and multilib as I can't find it. I cannot find it in https://archlinux.org/packages or https://aur.archlinux.org either.

### AI concern My main concern would be if the chat window is an opt-in setting. I would personally think many users are not waiting for an llm integration into a quickshell project; I know I am not. Will this be an opt-in feature? Meaning that the user would need to go into settings or the config file to enable the front-end to even show the chat window. ### Build failure It seems build is failing due to missing `libcmark-gfm`. I'm not sure what package this is as in artix repo + arch extra and multilib as I can't find it. I cannot find it in https://archlinux.org/packages or https://aur.archlinux.org either.
Author
Owner

There will be a config option to disable it, like everything else. It'll most likely be enabled by default though so that users can see that it exists without going deep into settings and stumble upon it.

I would personally think many users are not waiting for an llm integration into a quickshell project; I know I am not.

I disagree with that statement wholeheartedly, I don't think that LLM integration and Quickshell projects are mutually exclusive, in fact there's already multiple Quickshell configs that implement an LLM chat interface.

The package is just called cmark.

There will be a config option to disable it, like everything else. It'll most likely be enabled by default though so that users can see that it exists without going deep into settings and stumble upon it. >I would personally think many users are not waiting for an llm integration into a quickshell project; I know I am not. I disagree with that statement wholeheartedly, I don't think that LLM integration and Quickshell projects are mutually exclusive, in fact there's already multiple Quickshell configs that implement an LLM chat interface. The package is just called `cmark`.
Collaborator

I meant to say opt-out, not opt-in. I'd prefer opt-in personally.

I mean to say that a general user using a desktop environment or a desktop like shell would unlikely want llm chat integration. There are no statistics I have found of this, but reading people leaving windows generally do not like AI. Granted; Microsoft shoves Copilot everywhere in Windows.

It's up to you. I'm okay with it so long it can be hidden completely (apart from the setting to be able to toggle it to enable the feature). Since it is a config option, all good for me.

I meant to say opt-out, not opt-in. I'd prefer opt-in personally. I mean to say that a general user using a desktop environment or a desktop like shell would unlikely want llm chat integration. There are no statistics I have found of this, but reading people leaving windows generally do not like AI. Granted; Microsoft shoves Copilot everywhere in Windows. It's up to you. I'm okay with it so long it can be hidden completely (apart from the setting to be able to toggle it to enable the feature). Since it is a config option, all good for me.
AramJonghu added 2 commits 2026-08-31 22:48:06 +02:00
fix(Docker): add required deps to dockerfile
JS/TS / fmt (pull_request) Successful in 11s
JS/TS / lint (pull_request) Successful in 11s
Python / static (pull_request) Successful in 45s
Rust / fmt (pull_request) Successful in 2m0s
Rust / build (pull_request) Successful in 2m24s
Rust / clippy (pull_request) Successful in 2m24s
Python / verify (pull_request) Successful in 2m48s
C++ / fmt (pull_request) Successful in 4s
C++ / clang-tidy (pull_request) Canceled after 5m34s
C++ / build (pull_request) Canceled after 0s
c9f7856982
AramJonghu force-pushed feat/llm-chat-tab from 24593472e3 to c9f7856982 2026-08-31 22:48:06 +02:00 Compare
zach added 1 commit 2026-08-31 22:54:55 +02:00
fix: font family
JS/TS / fmt (pull_request) Successful in 19s
JS/TS / lint (pull_request) Successful in 18s
Rust / fmt (pull_request) Canceled after 0s
Rust / clippy (pull_request) Canceled after 0s
Rust / build (pull_request) Canceled after 5m56s
Python / static (pull_request) Canceled after 6m44s
Python / verify (pull_request) Canceled after 6m40s
C++ / fmt (pull_request) Successful in 8s
C++ / clang-tidy (pull_request) Canceled after 7m8s
C++ / build (pull_request) Failing after 1m24s
2150859847
Collaborator

c9f7856982 fixes the missing dependencies in the Dockerfile. Issue is that the build still fails, maybe related to ci/CMakeLists mismatch with new dependencies.

[c9f7856982](https://git.zach-dev.cc/zach/z-bar-qt/commit/c9f7856982d970955ac87db29098ac6eb929f81d) fixes the missing dependencies in the Dockerfile. Issue is that the build still fails, maybe related to ci/CMakeLists mismatch with new dependencies.
Some required checks failed
JS/TS / fmt (pull_request) Successful in 19s
JS/TS / lint (pull_request) Successful in 18s
Rust / fmt (pull_request) Canceled after 0s
Rust / clippy (pull_request) Canceled after 0s
Rust / build (pull_request) Canceled after 5m56s
Required
Details
Python / static (pull_request) Canceled after 6m44s
Python / verify (pull_request) Canceled after 6m40s
Required
Details
C++ / fmt (pull_request) Successful in 8s
C++ / clang-tidy (pull_request) Canceled after 7m8s
C++ / build (pull_request) Failing after 1m24s
Required
Details
Some required checks were not successful.
This pull request doesn't have enough required approvals yet. 0 of 1 official approvals granted.
You are not authorized to merge this pull request.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/llm-chat-tab:feat/llm-chat-tab
git checkout feat/llm-chat-tab
Sign in to join this conversation.