Run UI on a dedicated OS thread

The UI event loop was running on the same tokio runtime as inference,
tool execution, and background agents. When the runtime was busy, the
UI's select loop couldn't wake up to render — causing visible latency
and input lag.

Give the UI its own OS thread with a dedicated single-threaded tokio
runtime. The mind loop stays on the main runtime. Cross-runtime
communication (channels, watch, Notify) works unchanged.

Also drops the tokio-scoped dependency, which was only used to scope
the two tasks together.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-09 20:31:07 -04:00
parent d3f0b3f3f7
commit b115cec096
3 changed files with 22 additions and 40 deletions

View file

@ -57,7 +57,6 @@ rayon = "1"
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] }
tokio-scoped = "0.2.0"
futures = "0.3"
capnp = "0.25"
capnp-rpc = "0.25"