mind: use tokio-scoped for Mind/UI loop lifetimes

Both event loops borrow &mind through a scoped spawn — no Arc on
Mind needed. Interior Arcs on agent/shared stay (background spawns
need 'static), but event_loop::run() now takes &Arc refs instead
of cloned Arcs.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 04:53:33 -04:00
parent aae9687de2
commit 5eaba3c951
3 changed files with 30 additions and 12 deletions

11
Cargo.lock generated
View file

@ -2953,6 +2953,7 @@ dependencies = [
"tiktoken-rs",
"tokio",
"tokio-rustls",
"tokio-scoped",
"tokio-util",
"toml",
"tracing",
@ -4371,6 +4372,16 @@ dependencies = [
"tokio",
]
[[package]]
name = "tokio-scoped"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4beb8ba13bc53ac53ce1d52b42f02e5d8060f0f42138862869beb769722b256"
dependencies = [
"tokio",
"tokio-stream",
]
[[package]]
name = "tokio-stream"
version = "0.1.18"