A high-performance inference engine for AI models
mirai gpui app
eugene29081e23ae27
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 90a0e4b51..c7e55a89e 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -40,6 +40,11 @@ jobs:if: ${{ always() && steps.setup.outcome == 'success' }}run: cargo +nightly fmt --check+ - name: Check Rust formatting (mirai app)+ if: ${{ always() && steps.setup.outcome == 'success' }}+ working-directory: apps/mirai+ run: cargo +nightly fmt --all --check+- name: Check Metal formattingif: ${{ always() && steps.setup.outcome == 'success' }}run: ./scripts/clang-format.sh --check@@ -48,6 +53,11 @@ jobs:if: ${{ always() && steps.setup.outcome == 'success' }}run: cargo +nightly clippy --workspace --all-targets -- -D warnings+ - name: Lint mirai app with clippy+ if: ${{ always() && steps.setup.outcome == 'success' }}+ working-directory: apps/mirai+ run: cargo +nightly clippy --workspace --all-targets -- -D warnings+- name: Check that Cargo.lock is consistent with Cargo.tomlif: ${{ always() && steps.setup.outcome == 'success' }}run: |diff --git a/apps/mirai/.gitignore b/apps/mirai/.gitignorenew file mode 100644index 000000000..ea8c4bf7f--- /dev/null+++ b/apps/mirai/.gitignore@@ -0,0 +1 @@+/targetdiff --git a/apps/mirai/Cargo.lock b/apps/mirai/Cargo.locknew file mode 100644index 000000000..348cbd08e--- /dev/null+++ b/apps/mirai/Cargo.lock@@ -0,0 +1,10502 @@+# This file is automatically @generated by Cargo.+# It is not intended for manual editing.+version = 4++[[package]]+name = "accesskit"+version = "0.24.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320"+dependencies = [+ "uuid",+]++[[package]]+name = "accesskit_atspi_common"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.36.0",+ "atspi-common",+ "phf",+ "serde",+ "zvariant",+]++[[package]]+name = "accesskit_consumer"+version = "0.36.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60"+dependencies = [+ "accesskit",+ "hashbrown 0.16.1",+]++[[package]]+name = "accesskit_consumer"+version = "0.37.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb"+dependencies = [+ "accesskit",+ "hashbrown 0.16.1",+]++[[package]]+name = "accesskit_macos"+version = "0.26.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "17cb8b66cef272d48161b02a6317cc2bdd5f98bb0a5e79c68f704a5862aa396b"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.37.0",+ "hashbrown 0.16.1",+ "objc2 0.5.2",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "accesskit_unix"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c"+dependencies = [+ "accesskit",+ "accesskit_atspi_common",+ "async-channel",+ "async-executor",+ "async-task",+ "atspi",+ "futures-lite",+ "futures-util",+ "serde",+ "zbus",+]++[[package]]+name = "accesskit_windows"+version = "0.33.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "36e93ac7bf50b964f1cbb75f741629a4e950571baa1ef1274457ab5a80d9bcc2"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.37.0",+ "hashbrown 0.16.1",+ "static_assertions",+ "windows 0.62.2",+ "windows-core 0.62.2",+]++[[package]]+name = "addr2line"+version = "0.25.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"+dependencies = [+ "gimli",+]++[[package]]+name = "adler2"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"++[[package]]+name = "aes"+version = "0.8.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"+dependencies = [+ "cfg-if",+ "cipher",+ "cpufeatures 0.2.17",+ "zeroize",+]++[[package]]+name = "ahash"+version = "0.8.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"+dependencies = [+ "cfg-if",+ "const-random",+ "getrandom 0.3.4",+ "once_cell",+ "serde",+ "version_check",+ "zerocopy",+]++[[package]]+name = "aho-corasick"+version = "1.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"+dependencies = [+ "memchr",+]++[[package]]+name = "aligned"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685"+dependencies = [+ "as-slice",+]++[[package]]+name = "aligned-vec"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b"+dependencies = [+ "equator",+]++[[package]]+name = "allocator-api2"+version = "0.2.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"++[[package]]+name = "alsa"+version = "0.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "812947049edcd670a82cd5c73c3661d2e58468577ba8489de58e1a73c04cbd5d"+dependencies = [+ "alsa-sys",+ "bitflags 2.13.0",+ "cfg-if",+ "libc",+]++[[package]]+name = "alsa-sys"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ad7569085a265dd3f607ebecce7458eaab2132a84393534c95b18dcbc3f31e04"+dependencies = [+ "libc",+ "pkg-config",+]++[[package]]+name = "android_system_properties"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"+dependencies = [+ "libc",+]++[[package]]+name = "anstream"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"+dependencies = [+ "anstyle",+ "anstyle-parse",+ "anstyle-query",+ "anstyle-wincon",+ "colorchoice",+ "is_terminal_polyfill",+ "utf8parse",+]++[[package]]+name = "anstyle"+version = "1.0.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"++[[package]]+name = "anstyle-parse"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"+dependencies = [+ "utf8parse",+]++[[package]]+name = "anstyle-query"+version = "1.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "anstyle-wincon"+version = "3.0.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"+dependencies = [+ "anstyle",+ "once_cell_polyfill",+ "windows-sys 0.61.2",+]++[[package]]+name = "anyhow"+version = "1.0.103"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"++[[package]]+name = "apple-native-keyring-store"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7be2f067ccd8d4b4d4a66ddafe0f32a5dff31732f32dbff85fefc40929b1f72"+dependencies = [+ "keyring-core",+ "log",+ "security-framework",+]++[[package]]+name = "ar_archive_writer"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4087686b4b0a3427190bae57a1d9a478dbb2d40c5dc1bd6e2b6d797913bdd348"+dependencies = [+ "object",+]++[[package]]+name = "arbitrary"+version = "1.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"+dependencies = [+ "derive_arbitrary",+]++[[package]]+name = "arg_enum_proc_macro"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "arrayref"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"++[[package]]+name = "arrayvec"+version = "0.7.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"++[[package]]+name = "as-slice"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"+dependencies = [+ "stable_deref_trait",+]++[[package]]+name = "ash"+version = "0.38.0+1.3.281"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"+dependencies = [+ "libloading 0.8.9",+]++[[package]]+name = "ashpd"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2f3f79755c74fd155000314eb349864caa787c6592eace6c6882dad873d9c39"+dependencies = [+ "async-fs",+ "async-net",+ "enumflags2",+ "futures-channel",+ "futures-util",+ "rand 0.9.4",+ "raw-window-handle",+ "serde",+ "serde_repr",+ "url",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "zbus",+]++[[package]]+name = "ashpd"+version = "0.13.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "281e6645758940dee594495e28807a7672ce40f11ebf4df6c22c4fcd59e2689f"+dependencies = [+ "enumflags2",+ "futures-util",+ "getrandom 0.4.3",+ "serde",+ "zbus",+]++[[package]]+name = "async-broadcast"+version = "0.7.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-channel"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"+dependencies = [+ "concurrent-queue",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-compression"+version = "0.4.42"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac"+dependencies = [+ "compression-codecs",+ "compression-core",+ "futures-io",+ "pin-project-lite",+]++[[package]]+name = "async-executor"+version = "1.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"+dependencies = [+ "async-task",+ "concurrent-queue",+ "fastrand",+ "futures-lite",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "async-fs"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5"+dependencies = [+ "async-lock",+ "blocking",+ "futures-lite",+]++[[package]]+name = "async-io"+version = "2.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"+dependencies = [+ "autocfg",+ "cfg-if",+ "concurrent-queue",+ "futures-io",+ "futures-lite",+ "parking",+ "polling",+ "rustix 1.1.4",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-lock"+version = "3.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "pin-project-lite",+]++[[package]]+name = "async-net"+version = "2.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"+dependencies = [+ "async-io",+ "blocking",+ "futures-lite",+]++[[package]]+name = "async-openai"+version = "0.35.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "583553a05a8cbf55bbd67d6a824a206c21030556fdc5f43de387959f888fb6be"+dependencies = [+ "async-openai-macros",+ "backoff",+ "base64 0.22.1",+ "bytes",+ "derive_builder",+ "eventsource-stream",+ "futures",+ "getrandom 0.3.4",+ "rand 0.9.4",+ "reqwest 0.12.28",+ "reqwest-eventsource",+ "secrecy",+ "serde",+ "serde_json",+ "serde_urlencoded",+ "thiserror 2.0.18",+ "tokio",+ "tokio-stream",+ "tokio-util",+ "tracing",+ "url",+]++[[package]]+name = "async-openai-macros"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "81872a8e595e8ceceab71c6ba1f9078e313b452a1e31934e6763ef5d308705e4"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "async-process"+version = "2.5.0"+source = "git+https://github.com/zed-industries/async-process.git?rev=0b6d6713570af61806e1e5cb40e0f757cb93fd9d#0b6d6713570af61806e1e5cb40e0f757cb93fd9d"+dependencies = [+ "async-channel",+ "async-io",+ "async-lock",+ "async-signal",+ "async-task",+ "blocking",+ "cfg-if",+ "event-listener",+ "futures-lite",+ "rustix 1.1.4",+]++[[package]]+name = "async-recursion"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "async-signal"+version = "0.2.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"+dependencies = [+ "async-io",+ "async-lock",+ "atomic-waker",+ "cfg-if",+ "futures-core",+ "futures-io",+ "rustix 1.1.4",+ "signal-hook-registry",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-stream"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"+dependencies = [+ "async-stream-impl",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-stream-impl"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "async-task"+version = "4.7.1"+source = "git+https://github.com/smol-rs/async-task.git?rev=b4486cd71e4e94fbda54ce6302444de14f4d190e#b4486cd71e4e94fbda54ce6302444de14f4d190e"++[[package]]+name = "async-trait"+version = "0.1.89"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "atk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"+dependencies = [+ "atk-sys",+ "glib",+ "libc",+]++[[package]]+name = "atk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "atomic"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"++[[package]]+name = "atomic-waker"+version = "1.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"++[[package]]+name = "atspi"+version = "0.29.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d"+dependencies = [+ "atspi-common",+ "atspi-proxies",+]++[[package]]+name = "atspi-common"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d"+dependencies = [+ "enumflags2",+ "serde",+ "static_assertions",+ "zbus",+ "zbus-lockstep",+ "zbus-lockstep-macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "atspi-proxies"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc"+dependencies = [+ "atspi-common",+ "serde",+ "zbus",+]++[[package]]+name = "auto-launch"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1f012b8cc0c850f34117ec8252a44418f2e34a2cf501de89e29b241ae5f79471"+dependencies = [+ "dirs 4.0.0",+ "thiserror 1.0.69",+ "winreg 0.10.1",+]++[[package]]+name = "autocfg"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"++[[package]]+name = "av-scenechange"+version = "0.14.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394"+dependencies = [+ "aligned",+ "anyhow",+ "arg_enum_proc_macro",+ "arrayvec",+ "log",+ "num-rational",+ "num-traits",+ "pastey",+ "rayon",+ "thiserror 2.0.18",+ "v_frame",+ "y4m",+]++[[package]]+name = "av1-grain"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8"+dependencies = [+ "anyhow",+ "arrayvec",+ "log",+ "nom 8.0.0",+ "num-rational",+ "v_frame",+]++[[package]]+name = "avif-serialize"+version = "0.8.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38"+dependencies = [+ "arrayvec",+]++[[package]]+name = "aws-lc-rs"+version = "1.17.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad"+dependencies = [+ "aws-lc-sys",+ "zeroize",+]++[[package]]+name = "aws-lc-sys"+version = "0.42.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444"+dependencies = [+ "cc",+ "cmake",+ "dunce",+ "fs_extra",+ "pkg-config",+]++[[package]]+name = "backend-remote"+version = "0.5.12"+dependencies = [+ "async-openai",+ "futures",+ "indexmap 2.14.0",+ "reqwest 0.13.4",+ "serde",+ "serde_json",+ "shoji",+ "thiserror 2.0.18",+ "tokio-util",+]++[[package]]+name = "backend-uzu"+version = "0.5.12"+dependencies = [+ "anyhow",+ "async-stream",+ "async-trait",+ "bindgen 0.72.1",+ "bitflags 2.13.0",+ "blake3",+ "bytemuck",+ "bytesize",+ "cbindgen 0.29.4",+ "clang-ast",+ "depfile",+ "derive_more",+ "futures",+ "half",+ "itertools 0.14.0",+ "keisoku",+ "libc",+ "libm",+ "memmap2",+ "minijinja",+ "minijinja-contrib",+ "monostate",+ "mtl-rs",+ "ndarray",+ "num-traits",+ "obfstr",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+ "prettyplease",+ "proc-macro2",+ "proc-macros",+ "quote",+ "rand 0.10.2",+ "rangemap",+ "regex",+ "rhai",+ "rustix 1.1.4",+ "schemars 1.2.1",+ "serde",+ "serde_json",+ "shoji",+ "syn 2.0.118",+ "sysinfo 0.38.4",+ "tempfile",+ "thiserror 2.0.18",+ "tokenizers",+ "tokio",+ "tokio-util",+ "walkdir",+ "xxhash-rust",+ "zerocopy",+]++[[package]]+name = "backoff"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"+dependencies = [+ "futures-core",+ "getrandom 0.2.17",+ "instant",+ "pin-project-lite",+ "rand 0.8.6",+ "tokio",+]++[[package]]+name = "backtrace"+version = "0.3.76"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"+dependencies = [+ "addr2line",+ "cfg-if",+ "libc",+ "miniz_oxide",+ "object",+ "rustc-demangle",+ "windows-link 0.2.1",+]++[[package]]+name = "base64"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"++[[package]]+name = "base64"+version = "0.22.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"++[[package]]+name = "beef"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"++[[package]]+name = "bindgen"+version = "0.71.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"+dependencies = [+ "bitflags 2.13.0",+ "cexpr",+ "clang-sys",+ "itertools 0.13.0",+ "log",+ "prettyplease",+ "proc-macro2",+ "quote",+ "regex",+ "rustc-hash 2.1.3",+ "shlex 1.3.0",+ "syn 2.0.118",+]++[[package]]+name = "bindgen"+version = "0.72.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"+dependencies = [+ "bitflags 2.13.0",+ "cexpr",+ "clang-sys",+ "itertools 0.13.0",+ "log",+ "prettyplease",+ "proc-macro2",+ "quote",+ "regex",+ "rustc-hash 2.1.3",+ "shlex 1.3.0",+ "syn 2.0.118",+]++[[package]]+name = "bindings"+version = "0.5.12"+dependencies = [+ "heck 0.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "bindings-types"+version = "0.5.12"++[[package]]+name = "bit-set"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"+dependencies = [+ "bit-vec 0.6.3",+]++[[package]]+name = "bit-set"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"+dependencies = [+ "bit-vec 0.8.0",+]++[[package]]+name = "bit-set"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd"+dependencies = [+ "bit-vec 0.9.1",+]++[[package]]+name = "bit-vec"+version = "0.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"++[[package]]+name = "bit-vec"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"++[[package]]+name = "bit-vec"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"++[[package]]+name = "bit_field"+version = "0.10.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6"++[[package]]+name = "bitflags"+version = "1.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"++[[package]]+name = "bitflags"+version = "2.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"+dependencies = [+ "serde_core",+]++[[package]]+name = "bitstream-io"+version = "4.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f"+dependencies = [+ "no_std_io2",+]++[[package]]+name = "blake3"+version = "1.8.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce"+dependencies = [+ "arrayref",+ "arrayvec",+ "cc",+ "cfg-if",+ "constant_time_eq",+ "cpufeatures 0.3.0",+]++[[package]]+name = "block"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"++[[package]]+name = "block-buffer"+version = "0.10.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"+dependencies = [+ "generic-array",+]++[[package]]+name = "block-padding"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"+dependencies = [+ "generic-array",+]++[[package]]+name = "block2"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"+dependencies = [+ "objc2 0.5.2",+]++[[package]]+name = "block2"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"+dependencies = [+ "objc2 0.6.4",+]++[[package]]+name = "blocking"+version = "1.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"+dependencies = [+ "async-channel",+ "async-task",+ "futures-io",+ "futures-lite",+ "piper",+]++[[package]]+name = "borrow-or-share"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c"++[[package]]+name = "borsh"+version = "1.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145"+dependencies = [+ "bytes",+ "cfg_aliases",+]++[[package]]+name = "bs58"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"+dependencies = [+ "tinyvec",+]++[[package]]+name = "bstr"+version = "1.12.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5cee35f73844aa3014bb606320a6c1f010249dbdf43342fe54b5a4f6a8ed4b79"+dependencies = [+ "memchr",+ "regex-automata",+ "serde_core",+]++[[package]]+name = "built"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9"++[[package]]+name = "bumpalo"+version = "3.20.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"++[[package]]+name = "bytecount"+version = "0.6.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e"++[[package]]+name = "bytemuck"+version = "1.25.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"+dependencies = [+ "bytemuck_derive",+]++[[package]]+name = "bytemuck_derive"+version = "1.10.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "byteorder"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"++[[package]]+name = "byteorder-lite"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"++[[package]]+name = "bytes"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"++[[package]]+name = "bytesize"+version = "2.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d7c8918969267b2932ffd5655509bbbea0833823058c378876953217f5fc50e"++[[package]]+name = "bzip2"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"+dependencies = [+ "libbz2-rs-sys",+]++[[package]]+name = "cairo-rs"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"+dependencies = [+ "bitflags 2.13.0",+ "cairo-sys-rs",+ "glib",+ "libc",+ "once_cell",+ "thiserror 1.0.69",+]++[[package]]+name = "cairo-sys-rs"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"+dependencies = [+ "glib-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "calloop"+version = "0.14.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7"+dependencies = [+ "bitflags 2.13.0",+ "polling",+ "rustix 1.1.4",+ "slab",+ "tracing",+]++[[package]]+name = "castaway"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"+dependencies = [+ "rustversion",+]++[[package]]+name = "cbc"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"+dependencies = [+ "cipher",+]++[[package]]+name = "cbindgen"+version = "0.28.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff"+dependencies = [+ "heck 0.4.1",+ "indexmap 2.14.0",+ "log",+ "proc-macro2",+ "quote",+ "serde",+ "serde_json",+ "syn 2.0.118",+ "tempfile",+ "toml 0.8.23",+]++[[package]]+name = "cbindgen"+version = "0.29.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2ecb53484c9c167ba674026b656d8a27d7657a58e6066aa902bfb1a4aa00ae20"+dependencies = [+ "clap",+ "heck 0.5.0",+ "indexmap 2.14.0",+ "log",+ "proc-macro2",+ "quote",+ "serde",+ "serde_json",+ "syn 2.0.118",+ "tempfile",+ "toml 0.9.12+spec-1.1.0",+]++[[package]]+name = "cc"+version = "1.2.65"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96"+dependencies = [+ "find-msvc-tools",+ "jobserver",+ "libc",+ "shlex 2.0.1",+]++[[package]]+name = "cesu8"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"++[[package]]+name = "cexpr"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"+dependencies = [+ "nom 7.1.3",+]++[[package]]+name = "cfg-expr"+version = "0.15.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"+dependencies = [+ "smallvec",+ "target-lexicon",+]++[[package]]+name = "cfg-if"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"++[[package]]+name = "cfg_aliases"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"++[[package]]+name = "cgl"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"+dependencies = [+ "libc",+]++[[package]]+name = "chacha20"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"+dependencies = [+ "cfg-if",+ "cpufeatures 0.3.0",+ "rand_core 0.10.1",+]++[[package]]+name = "chrono"+version = "0.4.45"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"+dependencies = [+ "iana-time-zone",+ "js-sys",+ "num-traits",+ "serde",+ "wasm-bindgen",+ "windows-link 0.2.1",+]++[[package]]+name = "cipher"+version = "0.4.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"+dependencies = [+ "crypto-common",+ "inout",+ "zeroize",+]++[[package]]+name = "clang-ast"+version = "0.1.35"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2d76fac0a007075fa8d38a6ec08df340bea2035cc0a6e9b0f6594bff1627692b"+dependencies = [+ "foldhash 0.2.0",+ "serde_core",+]++[[package]]+name = "clang-sys"+version = "1.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"+dependencies = [+ "glob",+ "libc",+ "libloading 0.8.9",+]++[[package]]+name = "clap"+version = "4.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"+dependencies = [+ "clap_builder",+ "clap_derive",+]++[[package]]+name = "clap_builder"+version = "4.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"+dependencies = [+ "anstream",+ "anstyle",+ "clap_lex",+ "strsim",+]++[[package]]+name = "clap_derive"+version = "4.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"+dependencies = [+ "heck 0.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "clap_lex"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"++[[package]]+name = "cmake"+version = "0.1.58"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"+dependencies = [+ "cc",+]++[[package]]+name = "cocoa"+version = "0.25.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c"+dependencies = [+ "bitflags 1.3.2",+ "block",+ "cocoa-foundation 0.1.2",+ "core-foundation 0.9.4",+ "core-graphics 0.23.2",+ "foreign-types",+ "libc",+ "objc",+]++[[package]]+name = "cocoa"+version = "0.26.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"+dependencies = [+ "bitflags 2.13.0",+ "block",+ "cocoa-foundation 0.2.0",+ "core-foundation 0.10.0",+ "core-graphics 0.24.0",+ "foreign-types",+ "libc",+ "objc",+]++[[package]]+name = "cocoa-foundation"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7"+dependencies = [+ "bitflags 1.3.2",+ "block",+ "core-foundation 0.9.4",+ "core-graphics-types 0.1.3",+ "libc",+ "objc",+]++[[package]]+name = "cocoa-foundation"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"+dependencies = [+ "bitflags 2.13.0",+ "block",+ "core-foundation 0.10.0",+ "core-graphics-types 0.2.0",+ "libc",+ "objc",+]++[[package]]+name = "codespan-reporting"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"+dependencies = [+ "serde",+ "termcolor",+ "unicode-width",+]++[[package]]+name = "collections"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "gpui_util",+ "indexmap 2.14.0",+ "rustc-hash 2.1.3",+]++[[package]]+name = "color_quant"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"++[[package]]+name = "colorchoice"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"++[[package]]+name = "combine"+version = "4.6.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"+dependencies = [+ "bytes",+ "memchr",+]++[[package]]+name = "compact_str"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab"+dependencies = [+ "castaway",+ "cfg-if",+ "itoa",+ "rustversion",+ "ryu",+ "serde",+ "static_assertions",+]++[[package]]+name = "compression-codecs"+version = "0.4.38"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf"+dependencies = [+ "bzip2",+ "compression-core",+ "flate2",+ "memchr",+]++[[package]]+name = "compression-core"+version = "0.4.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789"++[[package]]+name = "concurrent-queue"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "confy"+version = "2.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8807c397789cbe02bbdb1a27ea5f345584132808697b2a3f957c829829ee4814"+dependencies = [+ "etcetera",+ "lazy_static",+ "serde",+ "thiserror 2.0.18",+ "toml 0.9.12+spec-1.1.0",+]++[[package]]+name = "console_error_panic_hook"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"+dependencies = [+ "cfg-if",+ "wasm-bindgen",+]++[[package]]+name = "const-random"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"+dependencies = [+ "const-random-macro",+]++[[package]]+name = "const-random-macro"+version = "0.1.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"+dependencies = [+ "getrandom 0.2.17",+ "once_cell",+ "tiny-keccak",+]++[[package]]+name = "constant_time_eq"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"++[[package]]+name = "convert_case"+version = "0.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9"+dependencies = [+ "unicode-segmentation",+]++[[package]]+name = "core-foundation"+version = "0.9.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"+dependencies = [+ "core-foundation-sys",+ "libc",+]++[[package]]+name = "core-foundation"+version = "0.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"+dependencies = [+ "core-foundation-sys",+ "libc",+]++[[package]]+name = "core-foundation-sys"+version = "0.8.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"++[[package]]+name = "core-graphics"+version = "0.23.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"+dependencies = [+ "bitflags 1.3.2",+ "core-foundation 0.9.4",+ "core-graphics-types 0.1.3",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-graphics"+version = "0.24.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.10.0",+ "core-graphics-types 0.2.0",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-graphics-helmer-fork"+version = "0.24.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32eb7c354ae9f6d437a6039099ce7ecd049337a8109b23d73e48e8ffba8e9cd5"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.9.4",+ "core-graphics-types 0.1.3",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-graphics-types"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"+dependencies = [+ "bitflags 1.3.2",+ "core-foundation 0.9.4",+ "libc",+]++[[package]]+name = "core-graphics-types"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.10.0",+ "libc",+]++[[package]]+name = "core-graphics2"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4416167a69126e617f8d0a214af0e3c1dbdeffcb100ddf72dcd1a1ac9893c146"+dependencies = [+ "bitflags 2.13.0",+ "block",+ "cfg-if",+ "core-foundation 0.10.0",+ "libc",+]++[[package]]+name = "core-text"+version = "21.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a593227b66cbd4007b2a050dfdd9e1d1318311409c8d600dc82ba1b15ca9c130"+dependencies = [+ "core-foundation 0.10.0",+ "core-graphics 0.24.0",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-video"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "139679cc63eb9504bdbe37e37874b0247136177655f0008588781e90863afa62"+dependencies = [+ "block",+ "core-foundation 0.10.0",+ "core-graphics2",+ "io-surface",+ "libc",+ "metal",+]++[[package]]+name = "core_maths"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30"+dependencies = [+ "libm",+]++[[package]]+name = "coreaudio-rs"+version = "0.14.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7d5d7dca3ebcf65a035582c9ad4385371a9d9ee6537474d2a278f4e1e475bb58"+dependencies = [+ "bitflags 2.13.0",+ "libc",+ "objc2-audio-toolbox",+ "objc2-core-audio",+ "objc2-core-audio-types",+ "objc2-core-foundation",+]++[[package]]+name = "cosmic-text"+version = "0.19.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73"+dependencies = [+ "bitflags 2.13.0",+ "fontdb",+ "harfrust",+ "linebender_resource_handle",+ "log",+ "rangemap",+ "rustc-hash 2.1.3",+ "self_cell",+ "skrifa 0.40.0",+ "smol_str",+ "swash",+ "sys-locale",+ "unicode-bidi",+ "unicode-linebreak",+ "unicode-script",+ "unicode-segmentation",+]++[[package]]+name = "cpal"+version = "0.17.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8942da362c0f0d895d7cac616263f2f9424edc5687364dfd1d25ef7eba506d7"+dependencies = [+ "alsa",+ "coreaudio-rs",+ "dasp_sample",+ "jni 0.21.1",+ "js-sys",+ "libc",+ "mach2",+ "ndk",+ "ndk-context",+ "num-derive",+ "num-traits",+ "objc2 0.6.4",+ "objc2-audio-toolbox",+ "objc2-avf-audio",+ "objc2-core-audio",+ "objc2-core-audio-types",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "windows 0.62.2",+]++[[package]]+name = "cpufeatures"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"+dependencies = [+ "libc",+]++[[package]]+name = "cpufeatures"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"+dependencies = [+ "libc",+]++[[package]]+name = "crc32c"+version = "0.6.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47"+dependencies = [+ "rustc_version",+]++[[package]]+name = "crc32fast"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"+dependencies = [+ "cfg-if",+]++[[package]]+name = "crossbeam-channel"+version = "0.5.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-deque"+version = "0.8.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"+dependencies = [+ "crossbeam-epoch",+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-epoch"+version = "0.9.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-queue"+version = "0.3.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-utils"+version = "0.8.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"++[[package]]+name = "crunchy"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"++[[package]]+name = "crypto-common"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"+dependencies = [+ "generic-array",+ "typenum",+]++[[package]]+name = "ctor"+version = "1.0.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "01334b89b69ff726750c5ce5073fc8bd860e99aa9a8fc5ca11b04730e3aee97a"+dependencies = [+ "link-section",+ "linktime-proc-macro",+]++[[package]]+name = "darling"+version = "0.20.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"+dependencies = [+ "darling_core 0.20.11",+ "darling_macro 0.20.11",+]++[[package]]+name = "darling"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"+dependencies = [+ "darling_core 0.23.0",+ "darling_macro 0.23.0",+]++[[package]]+name = "darling_core"+version = "0.20.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"+dependencies = [+ "fnv",+ "ident_case",+ "proc-macro2",+ "quote",+ "strsim",+ "syn 2.0.118",+]++[[package]]+name = "darling_core"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"+dependencies = [+ "ident_case",+ "proc-macro2",+ "quote",+ "strsim",+ "syn 2.0.118",+]++[[package]]+name = "darling_macro"+version = "0.20.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"+dependencies = [+ "darling_core 0.20.11",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "darling_macro"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"+dependencies = [+ "darling_core 0.23.0",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "dary_heap"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b1e3a325bc115f096c8b77bbf027a7c2592230e70be2d985be950d3d5e60ebe"+dependencies = [+ "serde",+]++[[package]]+name = "dasp_sample"+version = "0.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f"++[[package]]+name = "data-encoding"+version = "2.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8"++[[package]]+name = "data-url"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"++[[package]]+name = "depfile"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ab7b3a8c29cb8b0b8e17acfcdb203b4a89a3e50718efe5f8e4f4d765be0dd1a1"+dependencies = [+ "logos",+]++[[package]]+name = "deranged"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"+dependencies = [+ "serde_core",+]++[[package]]+name = "derive_arbitrary"+version = "1.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "derive_builder"+version = "0.20.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"+dependencies = [+ "derive_builder_macro",+]++[[package]]+name = "derive_builder_core"+version = "0.20.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"+dependencies = [+ "darling 0.20.11",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "derive_builder_macro"+version = "0.20.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"+dependencies = [+ "derive_builder_core",+ "syn 2.0.118",+]++[[package]]+name = "derive_more"+version = "2.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"+dependencies = [+ "derive_more-impl",+]++[[package]]+name = "derive_more-impl"+version = "2.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"+dependencies = [+ "convert_case",+ "proc-macro2",+ "quote",+ "rustc_version",+ "syn 2.0.118",+ "unicode-xid",+]++[[package]]+name = "derive_refineable"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "digest"+version = "0.10.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"+dependencies = [+ "block-buffer",+ "crypto-common",+ "subtle",+]++[[package]]+name = "dirs"+version = "4.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"+dependencies = [+ "dirs-sys 0.3.7",+]++[[package]]+name = "dirs"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"+dependencies = [+ "dirs-sys 0.5.0",+]++[[package]]+name = "dirs-sys"+version = "0.3.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"+dependencies = [+ "libc",+ "redox_users 0.4.6",+ "winapi",+]++[[package]]+name = "dirs-sys"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"+dependencies = [+ "libc",+ "option-ext",+ "redox_users 0.5.2",+ "windows-sys 0.61.2",+]++[[package]]+name = "dispatch"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"++[[package]]+name = "dispatch2"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "libc",+ "objc2 0.6.4",+]++[[package]]+name = "displaydoc"+version = "0.2.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "dlib"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a"+dependencies = [+ "libloading 0.8.9",+]++[[package]]+name = "document-features"+version = "0.2.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"+dependencies = [+ "litrs",+]++[[package]]+name = "downcast-rs"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"++[[package]]+name = "download-manager"+version = "0.5.12"+dependencies = [+ "async-trait",+ "base64 0.22.1",+ "block2 0.6.2",+ "chrono",+ "crc32c",+ "futures-util",+ "libc",+ "objc-sys",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+ "reqwest 0.13.4",+ "serde",+ "serde_json",+ "thiserror 2.0.18",+ "tokio",+ "tokio-stream",+ "tracing",+ "uuid",+]++[[package]]+name = "dpi"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"++[[package]]+name = "dunce"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"++[[package]]+name = "dwrote"+version = "0.11.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e1b35532432acc8b19ceed096e35dfa088d3ea037fe4f3c085f1f97f33b4d02"+dependencies = [+ "lazy_static",+ "libc",+ "winapi",+ "wio",+]++[[package]]+name = "dyn-clone"+version = "1.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"++[[package]]+name = "either"+version = "1.16.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"++[[package]]+name = "email_address"+version = "0.2.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449"+dependencies = [+ "serde",+]++[[package]]+name = "embed-resource"+version = "3.0.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd"+dependencies = [+ "cc",+ "memchr",+ "rustc_version",+ "toml 1.1.2+spec-1.1.0",+ "vswhom",+ "winreg 0.55.0",+]++[[package]]+name = "encoding_rs"+version = "0.8.35"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"+dependencies = [+ "cfg-if",+]++[[package]]+name = "endi"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"++[[package]]+name = "enumflags2"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"+dependencies = [+ "enumflags2_derive",+ "serde",+]++[[package]]+name = "enumflags2_derive"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "equator"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc"+dependencies = [+ "equator-macro",+]++[[package]]+name = "equator-macro"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "equivalent"+version = "1.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"++[[package]]+name = "erased-serde"+version = "0.4.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec"+dependencies = [+ "serde",+ "serde_core",+ "typeid",+]++[[package]]+name = "errno"+version = "0.3.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"+dependencies = [+ "libc",+ "windows-sys 0.61.2",+]++[[package]]+name = "esaxx-rs"+version = "0.1.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6"++[[package]]+name = "etagere"+version = "0.2.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc89bf99e5dc15954a60f707c1e09d7540e5cd9af85fa75caa0b510bc08c5342"+dependencies = [+ "euclid",+ "svg_fmt",+]++[[package]]+name = "etcetera"+version = "0.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26c7b13d0780cb82722fd59f6f57f925e143427e4a75313a6c77243bf5326ae6"+dependencies = [+ "cfg-if",+ "home",+ "windows-sys 0.59.0",+]++[[package]]+name = "euclid"+version = "0.22.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06"+dependencies = [+ "num-traits",+]++[[package]]+name = "event-listener"+version = "5.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"+dependencies = [+ "concurrent-queue",+ "parking",+ "pin-project-lite",+]++[[package]]+name = "event-listener-strategy"+version = "0.5.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"+dependencies = [+ "event-listener",+ "pin-project-lite",+]++[[package]]+name = "eventsource-stream"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab"+dependencies = [+ "futures-core",+ "nom 7.1.3",+ "pin-project-lite",+]++[[package]]+name = "exr"+version = "1.74.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be"+dependencies = [+ "bit_field",+ "half",+ "lebe",+ "miniz_oxide",+ "rayon-core",+ "smallvec",+ "zune-inflate",+]++[[package]]+name = "extended"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365"++[[package]]+name = "fancy-regex"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2"+dependencies = [+ "bit-set 0.5.3",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "fancy-regex"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298"+dependencies = [+ "bit-set 0.8.0",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "fancy-regex"+version = "0.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72cf461f865c862bb7dc573f643dd6a2b6842f7c30b07882b56bd148cc2761b8"+dependencies = [+ "bit-set 0.8.0",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "fancy-regex"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1e1dacd0d2082dfcf1351c4bdd566bbe89a2b263235a2b50058f1e130a47277"+dependencies = [+ "bit-set 0.8.0",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "fastrand"+version = "2.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"++[[package]]+name = "fax"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"++[[package]]+name = "fdeflate"+version = "0.3.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"+dependencies = [+ "simd-adler32",+]++[[package]]+name = "field-offset"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"+dependencies = [+ "memoffset",+ "rustc_version",+]++[[package]]+name = "find-msvc-tools"+version = "0.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"++[[package]]+name = "fixedbitset"+version = "0.5.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"++[[package]]+name = "flate2"+version = "1.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"+dependencies = [+ "crc32fast",+ "miniz_oxide",+]++[[package]]+name = "float-cmp"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"++[[package]]+name = "float-ord"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d"++[[package]]+name = "float_next_after"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8"++[[package]]+name = "fluent-uri"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc74ac4d8359ae70623506d512209619e5cf8f347124910440dbc221714b328e"+dependencies = [+ "borrow-or-share",+ "ref-cast",+ "serde",+]++[[package]]+name = "flume"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"+dependencies = [+ "futures-core",+ "futures-sink",+ "nanorand",+ "spin 0.9.8",+]++[[package]]+name = "fnv"+version = "1.0.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"++[[package]]+name = "foldhash"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"++[[package]]+name = "foldhash"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"++[[package]]+name = "font-types"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7"+dependencies = [+ "bytemuck",+]++[[package]]+name = "fontconfig-parser"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646"+dependencies = [+ "roxmltree 0.20.0",+]++[[package]]+name = "fontdb"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"+dependencies = [+ "fontconfig-parser",+ "log",+ "memmap2",+ "slotmap",+ "tinyvec",+ "ttf-parser",+]++[[package]]+name = "foreign-types"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"+dependencies = [+ "foreign-types-macros",+ "foreign-types-shared",+]++[[package]]+name = "foreign-types-macros"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "foreign-types-shared"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"++[[package]]+name = "form_urlencoded"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"+dependencies = [+ "percent-encoding",+]++[[package]]+name = "fraction"+version = "0.15.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e076045bb43dac435333ed5f04caf35c7463631d0dae2deb2638d94dd0a5b872"+dependencies = [+ "lazy_static",+ "num",+]++[[package]]+name = "freetype-sys"+version = "0.20.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e7edc5b9669349acfda99533e9e0bcf26a51862ab43b08ee7745c55d28eb134"+dependencies = [+ "cc",+ "libc",+ "pkg-config",+]++[[package]]+name = "fs_extra"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"++[[package]]+name = "futures"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"+dependencies = [+ "futures-channel",+ "futures-core",+ "futures-executor",+ "futures-io",+ "futures-sink",+ "futures-task",+ "futures-util",+]++[[package]]+name = "futures-channel"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"+dependencies = [+ "futures-core",+ "futures-sink",+]++[[package]]+name = "futures-concurrency"+version = "7.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "175cd8cca9e1d45b87f18ffa75088f2099e3c4fe5e2f83e42de112560bea8ea6"+dependencies = [+ "fixedbitset",+ "futures-core",+ "futures-lite",+ "pin-project",+ "smallvec",+]++[[package]]+name = "futures-core"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"++[[package]]+name = "futures-executor"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"+dependencies = [+ "futures-core",+ "futures-task",+ "futures-util",+]++[[package]]+name = "futures-io"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"++[[package]]+name = "futures-lite"+version = "2.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"+dependencies = [+ "fastrand",+ "futures-core",+ "futures-io",+ "parking",+ "pin-project-lite",+]++[[package]]+name = "futures-macro"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "futures-sink"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"++[[package]]+name = "futures-task"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"++[[package]]+name = "futures-timer"+version = "3.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968"++[[package]]+name = "futures-util"+version = "0.3.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"+dependencies = [+ "futures-channel",+ "futures-core",+ "futures-io",+ "futures-macro",+ "futures-sink",+ "futures-task",+ "memchr",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "gdk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"+dependencies = [+ "cairo-rs",+ "gdk-pixbuf",+ "gdk-sys",+ "gio",+ "glib",+ "libc",+ "pango",+]++[[package]]+name = "gdk-pixbuf"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"+dependencies = [+ "gdk-pixbuf-sys",+ "gio",+ "glib",+ "libc",+ "once_cell",+]++[[package]]+name = "gdk-pixbuf-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"+dependencies = [+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "gdk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"+dependencies = [+ "cairo-sys-rs",+ "gdk-pixbuf-sys",+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "pango-sys",+ "pkg-config",+ "system-deps",+]++[[package]]+name = "generic-array"+version = "0.14.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"+dependencies = [+ "typenum",+ "version_check",+]++[[package]]+name = "getrandom"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"+dependencies = [+ "cfg-if",+ "js-sys",+ "libc",+ "wasi",+ "wasm-bindgen",+]++[[package]]+name = "getrandom"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"+dependencies = [+ "cfg-if",+ "js-sys",+ "libc",+ "r-efi 5.3.0",+ "wasip2",+ "wasm-bindgen",+]++[[package]]+name = "getrandom"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"+dependencies = [+ "cfg-if",+ "libc",+ "r-efi 6.0.0",+ "rand_core 0.10.1",+]++[[package]]+name = "gif"+version = "0.14.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159"+dependencies = [+ "color_quant",+ "weezl",+]++[[package]]+name = "gimli"+version = "0.32.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"++[[package]]+name = "gio"+version = "0.18.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"+dependencies = [+ "futures-channel",+ "futures-core",+ "futures-io",+ "futures-util",+ "gio-sys",+ "glib",+ "libc",+ "once_cell",+ "pin-project-lite",+ "smallvec",+ "thiserror 1.0.69",+]++[[package]]+name = "gio-sys"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+ "winapi",+]++[[package]]+name = "gl_generator"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"+dependencies = [+ "khronos_api",+ "log",+ "xml-rs",+]++[[package]]+name = "glib"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"+dependencies = [+ "bitflags 2.13.0",+ "futures-channel",+ "futures-core",+ "futures-executor",+ "futures-task",+ "futures-util",+ "gio-sys",+ "glib-macros",+ "glib-sys",+ "gobject-sys",+ "libc",+ "memchr",+ "once_cell",+ "smallvec",+ "thiserror 1.0.69",+]++[[package]]+name = "glib-macros"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"+dependencies = [+ "heck 0.4.1",+ "proc-macro-crate 2.0.0",+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "glib-sys"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"+dependencies = [+ "libc",+ "system-deps",+]++[[package]]+name = "glob"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"++[[package]]+name = "glow"+version = "0.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5"+dependencies = [+ "js-sys",+ "slotmap",+ "wasm-bindgen",+ "web-sys",+]++[[package]]+name = "glutin_wgl_sys"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e"+dependencies = [+ "gl_generator",+]++[[package]]+name = "gobject-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"+dependencies = [+ "glib-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "gpu-allocator"+version = "0.28.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"+dependencies = [+ "ash",+ "hashbrown 0.16.1",+ "log",+ "presser",+ "thiserror 2.0.18",+ "windows 0.62.2",+]++[[package]]+name = "gpu-descriptor"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca"+dependencies = [+ "bitflags 2.13.0",+ "gpu-descriptor-types",+ "hashbrown 0.15.5",+]++[[package]]+name = "gpu-descriptor-types"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91"+dependencies = [+ "bitflags 2.13.0",+]++[[package]]+name = "gpui"+version = "0.2.2"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "accesskit",+ "anyhow",+ "async-channel",+ "async-task",+ "bindgen 0.71.1",+ "bitflags 2.13.0",+ "block",+ "cbindgen 0.28.0",+ "chrono",+ "cocoa 0.26.0",+ "cocoa-foundation 0.2.0",+ "collections",+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "core-graphics 0.24.0",+ "core-text",+ "core-video",+ "ctor",+ "derive_more",+ "embed-resource",+ "etagere",+ "foreign-types",+ "futures",+ "futures-concurrency",+ "getrandom 0.3.4",+ "gpui_macros",+ "gpui_shared_string",+ "gpui_util",+ "heapless",+ "http_client",+ "image",+ "inventory",+ "itertools 0.14.0",+ "log",+ "lyon",+ "mach2",+ "media",+ "metal",+ "num_cpus",+ "objc",+ "parking",+ "parking_lot",+ "pathfinder_geometry",+ "pin-project",+ "pollster 0.4.0",+ "postage",+ "profiling",+ "rand 0.9.4",+ "raw-window-handle",+ "refineable",+ "regex",+ "resvg",+ "scheduler",+ "schemars 1.2.1",+ "seahash",+ "serde",+ "serde_json",+ "slotmap",+ "smallvec",+ "spin 0.10.0",+ "stacksafe",+ "strum",+ "sum_tree",+ "taffy",+ "thiserror 2.0.18",+ "ttf-parser",+ "url",+ "usvg",+ "util_macros",+ "uuid",+ "waker-fn",+ "web-time",+ "windows 0.61.3",+ "zed-font-kit",+ "zed-scap",+]++[[package]]+name = "gpui_linux"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "accesskit",+ "accesskit_unix",+ "anyhow",+ "bytemuck",+ "calloop",+ "collections",+ "futures",+ "gpui",+ "gpui_util",+ "http_client",+ "image",+ "itertools 0.14.0",+ "libc",+ "log",+ "oo7",+ "parking_lot",+ "pathfinder_geometry",+ "pollster 0.4.0",+ "profiling",+ "raw-window-handle",+ "smallvec",+ "smol",+ "strum",+ "swash",+ "url",+ "uuid",+]++[[package]]+name = "gpui_macos"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "accesskit",+ "accesskit_macos",+ "anyhow",+ "async-task",+ "block",+ "cbindgen 0.28.0",+ "cocoa 0.26.0",+ "collections",+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "core-graphics 0.24.0",+ "core-text",+ "core-video",+ "ctor",+ "derive_more",+ "dispatch2",+ "etagere",+ "foreign-types",+ "futures",+ "gpui",+ "gpui_util",+ "image",+ "itertools 0.14.0",+ "libc",+ "log",+ "mach2",+ "media",+ "metal",+ "objc",+ "objc2 0.6.4",+ "objc2-app-kit 0.3.2",+ "objc2-foundation 0.3.2",+ "parking_lot",+ "pathfinder_geometry",+ "raw-window-handle",+ "semver",+ "smallvec",+ "strum",+ "uuid",+ "zed-font-kit",+]++[[package]]+name = "gpui_macros"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "heck 0.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "gpui_platform"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "console_error_panic_hook",+ "gpui",+ "gpui_linux",+ "gpui_macos",+ "gpui_web",+ "gpui_windows",+]++[[package]]+name = "gpui_shared_string"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "schemars 1.2.1",+ "serde",+ "smol_str",+]++[[package]]+name = "gpui_tokio"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "gpui",+ "gpui_util",+ "tokio",+]++[[package]]+name = "gpui_util"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "log",+ "which",+]++[[package]]+name = "gpui_web"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "console_error_panic_hook",+ "futures",+ "gpui",+ "gpui_wgpu",+ "http_client",+ "js-sys",+ "log",+ "parking_lot",+ "raw-window-handle",+ "smallvec",+ "uuid",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wasm_thread",+ "web-sys",+ "web-time",+]++[[package]]+name = "gpui_wgpu"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "bytemuck",+ "collections",+ "cosmic-text",+ "etagere",+ "gpui",+ "gpui_util",+ "itertools 0.14.0",+ "js-sys",+ "log",+ "parking_lot",+ "pollster 0.4.0",+ "profiling",+ "raw-window-handle",+ "smallvec",+ "swash",+ "unicode-segmentation",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "wgpu",+]++[[package]]+name = "gpui_windows"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "accesskit",+ "accesskit_windows",+ "anyhow",+ "collections",+ "dunce",+ "etagere",+ "futures",+ "gpui",+ "gpui_util",+ "image",+ "itertools 0.14.0",+ "log",+ "parking_lot",+ "rand 0.9.4",+ "raw-window-handle",+ "smallvec",+ "uuid",+ "windows 0.61.3",+ "windows-core 0.61.2",+ "windows-numerics 0.2.0",+ "windows-registry 0.5.3",+]++[[package]]+name = "grid"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5"++[[package]]+name = "gtk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"+dependencies = [+ "atk",+ "cairo-rs",+ "field-offset",+ "futures-channel",+ "gdk",+ "gdk-pixbuf",+ "gio",+ "glib",+ "gtk-sys",+ "gtk3-macros",+ "libc",+ "pango",+ "pkg-config",+]++[[package]]+name = "gtk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"+dependencies = [+ "atk-sys",+ "cairo-sys-rs",+ "gdk-pixbuf-sys",+ "gdk-sys",+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "pango-sys",+ "system-deps",+]++[[package]]+name = "gtk3-macros"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"+dependencies = [+ "proc-macro-crate 1.3.1",+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "h2"+version = "0.4.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155"+dependencies = [+ "atomic-waker",+ "bytes",+ "fnv",+ "futures-core",+ "futures-sink",+ "http",+ "indexmap 2.14.0",+ "slab",+ "tokio",+ "tokio-util",+ "tracing",+]++[[package]]+name = "half"+version = "2.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"+dependencies = [+ "bytemuck",+ "cfg-if",+ "crunchy",+ "num-traits",+ "zerocopy",+]++[[package]]+name = "hanashi"+version = "0.5.12"+dependencies = [+ "fancy-regex 0.17.0",+ "indexmap 2.14.0",+ "libc",+ "llm_json",+ "minijinja",+ "minijinja-contrib",+ "openai-harmony",+ "regex",+ "serde",+ "serde_json",+ "shoji",+ "thiserror 2.0.18",+ "token-stream-parser",+ "tokenizers",+]++[[package]]+name = "harfrust"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9"+dependencies = [+ "bitflags 2.13.0",+ "bytemuck",+ "core_maths",+ "read-fonts 0.37.0",+ "smallvec",+]++[[package]]+name = "hash32"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"+dependencies = [+ "byteorder",+]++[[package]]+name = "hashbrown"+version = "0.12.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"++[[package]]+name = "hashbrown"+version = "0.15.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"+dependencies = [+ "foldhash 0.1.5",+]++[[package]]+name = "hashbrown"+version = "0.16.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"+dependencies = [+ "allocator-api2",+ "equivalent",+ "foldhash 0.2.0",+]++[[package]]+name = "hashbrown"+version = "0.17.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"++[[package]]+name = "heapless"+version = "0.9.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4"+dependencies = [+ "hash32",+ "stable_deref_trait",+]++[[package]]+name = "heck"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"++[[package]]+name = "heck"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"++[[package]]+name = "hermit-abi"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"++[[package]]+name = "hex"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"++[[package]]+name = "hexf-parse"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"++[[package]]+name = "hkdf"+version = "0.12.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"+dependencies = [+ "hmac",+]++[[package]]+name = "hmac"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"+dependencies = [+ "digest",+]++[[package]]+name = "home"+version = "0.5.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "hound"+version = "3.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"++[[package]]+name = "http"+version = "1.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425"+dependencies = [+ "bytes",+ "itoa",+]++[[package]]+name = "http-body"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"+dependencies = [+ "bytes",+ "http",+]++[[package]]+name = "http-body-util"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"+dependencies = [+ "bytes",+ "futures-core",+ "http",+ "http-body",+ "pin-project-lite",+]++[[package]]+name = "http_client"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "async-compression",+ "bytes",+ "derive_more",+ "futures",+ "http",+ "http-body",+ "log",+ "parking_lot",+ "serde",+ "serde_json",+ "serde_urlencoded",+ "url",+]++[[package]]+name = "http_client_tls"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "rustls",+ "rustls-platform-verifier 0.5.3",+]++[[package]]+name = "httparse"+version = "1.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"++[[package]]+name = "hyper"+version = "1.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498"+dependencies = [+ "atomic-waker",+ "bytes",+ "futures-channel",+ "futures-core",+ "h2",+ "http",+ "http-body",+ "httparse",+ "itoa",+ "pin-project-lite",+ "smallvec",+ "tokio",+ "want",+]++[[package]]+name = "hyper-rustls"+version = "0.27.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f"+dependencies = [+ "http",+ "hyper",+ "hyper-util",+ "rustls",+ "rustls-native-certs",+ "tokio",+ "tokio-rustls",+ "tower-service",+ "webpki-roots",+]++[[package]]+name = "hyper-util"+version = "0.1.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "futures-channel",+ "futures-util",+ "http",+ "http-body",+ "hyper",+ "ipnet",+ "libc",+ "percent-encoding",+ "pin-project-lite",+ "socket2",+ "system-configuration 0.7.0",+ "tokio",+ "tower-service",+ "tracing",+ "windows-registry 0.6.1",+]++[[package]]+name = "iana-time-zone"+version = "0.1.65"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"+dependencies = [+ "android_system_properties",+ "core-foundation-sys",+ "iana-time-zone-haiku",+ "js-sys",+ "log",+ "wasm-bindgen",+ "windows-core 0.62.2",+]++[[package]]+name = "iana-time-zone-haiku"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"+dependencies = [+ "cc",+]++[[package]]+name = "icu_collections"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"+dependencies = [+ "displaydoc",+ "potential_utf",+ "utf8_iter",+ "yoke",+ "zerofrom",+ "zerovec",+]++[[package]]+name = "icu_locale_core"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"+dependencies = [+ "displaydoc",+ "litemap",+ "tinystr",+ "writeable",+ "zerovec",+]++[[package]]+name = "icu_normalizer"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"+dependencies = [+ "icu_collections",+ "icu_normalizer_data",+ "icu_properties",+ "icu_provider",+ "smallvec",+ "zerovec",+]++[[package]]+name = "icu_normalizer_data"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"++[[package]]+name = "icu_properties"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"+dependencies = [+ "icu_collections",+ "icu_locale_core",+ "icu_properties_data",+ "icu_provider",+ "zerotrie",+ "zerovec",+]++[[package]]+name = "icu_properties_data"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"++[[package]]+name = "icu_provider"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"+dependencies = [+ "displaydoc",+ "icu_locale_core",+ "writeable",+ "yoke",+ "zerofrom",+ "zerotrie",+ "zerovec",+]++[[package]]+name = "ident_case"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"++[[package]]+name = "idna"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"+dependencies = [+ "idna_adapter",+ "smallvec",+ "utf8_iter",+]++[[package]]+name = "idna_adapter"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"+dependencies = [+ "icu_normalizer",+ "icu_properties",+]++[[package]]+name = "image"+version = "0.25.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"+dependencies = [+ "bytemuck",+ "byteorder-lite",+ "color_quant",+ "exr",+ "gif",+ "image-webp",+ "moxcms",+ "num-traits",+ "png 0.18.1",+ "qoi",+ "ravif",+ "rayon",+ "rgb",+ "tiff",+ "zune-core",+ "zune-jpeg",+]++[[package]]+name = "image-webp"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3"+dependencies = [+ "byteorder-lite",+ "quick-error",+]++[[package]]+name = "imagesize"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c"++[[package]]+name = "imgref"+version = "1.12.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "89194689a993ab15268672e99e7b0e19da2da3268ac682e8f02d29d4d1434cd7"++[[package]]+name = "indexmap"+version = "1.9.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"+dependencies = [+ "autocfg",+ "hashbrown 0.12.3",+ "serde",+]++[[package]]+name = "indexmap"+version = "2.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"+dependencies = [+ "equivalent",+ "hashbrown 0.17.1",+ "serde",+ "serde_core",+]++[[package]]+name = "inout"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"+dependencies = [+ "block-padding",+ "generic-array",+]++[[package]]+name = "instant"+version = "0.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"+dependencies = [+ "cfg-if",+]++[[package]]+name = "interpolate_name"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "inventory"+version = "0.3.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b"+dependencies = [+ "rustversion",+]++[[package]]+name = "io-surface"+version = "0.16.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "554b8c5d64ec09a3a520fe58e4d48a73e00ff32899cdcbe32a4877afd4968b8e"+dependencies = [+ "cgl",+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "leaky-cow",+]++[[package]]+name = "ipnet"+version = "2.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"++[[package]]+name = "is_terminal_polyfill"+version = "1.70.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"++[[package]]+name = "itertools"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"+dependencies = [+ "either",+]++[[package]]+name = "itertools"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"+dependencies = [+ "either",+]++[[package]]+name = "itoa"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"++[[package]]+name = "jni"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"+dependencies = [+ "cesu8",+ "cfg-if",+ "combine",+ "jni-sys 0.3.1",+ "log",+ "thiserror 1.0.69",+ "walkdir",+ "windows-sys 0.45.0",+]++[[package]]+name = "jni"+version = "0.22.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"+dependencies = [+ "cfg-if",+ "combine",+ "jni-macros",+ "jni-sys 0.4.1",+ "log",+ "simd_cesu8",+ "thiserror 2.0.18",+ "walkdir",+ "windows-link 0.2.1",+]++[[package]]+name = "jni-macros"+version = "0.22.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"+dependencies = [+ "proc-macro2",+ "quote",+ "rustc_version",+ "simd_cesu8",+ "syn 2.0.118",+]++[[package]]+name = "jni-sys"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"+dependencies = [+ "jni-sys 0.4.1",+]++[[package]]+name = "jni-sys"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"+dependencies = [+ "jni-sys-macros",+]++[[package]]+name = "jni-sys-macros"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"+dependencies = [+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "jobserver"+version = "0.1.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"+dependencies = [+ "getrandom 0.3.4",+ "libc",+]++[[package]]+name = "js-sys"+version = "0.3.103"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"+dependencies = [+ "cfg-if",+ "futures-util",+ "wasm-bindgen",+]++[[package]]+name = "json-transform"+version = "0.5.12"+dependencies = [+ "fancy-regex 0.17.0",+ "indexmap 2.14.0",+ "llm_json",+ "regex",+ "serde",+ "serde_json",+ "thiserror 2.0.18",+ "tracing",+]++[[package]]+name = "jsonschema"+version = "0.46.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d865ca7ca04445fcaa1d751fda3dc43b0113ba2fcddc65d5a0fcb474a7c3bba"+dependencies = [+ "ahash",+ "bytecount",+ "data-encoding",+ "email_address",+ "fancy-regex 0.18.0",+ "fraction",+ "getrandom 0.3.4",+ "idna",+ "itoa",+ "jsonschema-regex",+ "num-cmp",+ "num-traits",+ "percent-encoding",+ "referencing",+ "regex",+ "reqwest 0.13.4",+ "rustls",+ "serde",+ "serde_json",+ "unicode-general-category",+ "uuid-simd",+]++[[package]]+name = "jsonschema-regex"+version = "0.46.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4b7fc96cd6677cc81b00607d43477327d719419937ef1c44b3556a40f517d54c"+dependencies = [+ "regex-syntax",+]++[[package]]+name = "kanka"+version = "0.5.12"+dependencies = [+ "libc",+ "obfstr",+ "objc2-core-foundation",+]++[[package]]+name = "keisoku"+version = "0.5.12"+dependencies = [+ "kanka",+ "libc",+ "obfstr",+ "objc2-core-foundation",+ "objc2-io-kit",+ "serde",+ "serde_json",+ "sysinfo 0.38.4",+]++[[package]]+name = "keyboard-types"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a"+dependencies = [+ "bitflags 2.13.0",+ "serde",+ "unicode-segmentation",+]++[[package]]+name = "keyring-core"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb1e621458ca9c51aa110bd0339d4751a056b9576bf1253aee1aa560dda0fc9d"+dependencies = [+ "log",+]++[[package]]+name = "khronos-egl"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"+dependencies = [+ "libc",+ "libloading 0.8.9",+ "pkg-config",+]++[[package]]+name = "khronos_api"+version = "3.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"++[[package]]+name = "kurbo"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2"+dependencies = [+ "arrayvec",+ "euclid",+ "polycool",+ "smallvec",+]++[[package]]+name = "lazy_static"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"++[[package]]+name = "leak"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"++[[package]]+name = "leaky-cow"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"+dependencies = [+ "leak",+]++[[package]]+name = "lebe"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8"++[[package]]+name = "libappindicator"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a"+dependencies = [+ "glib",+ "gtk",+ "gtk-sys",+ "libappindicator-sys",+ "log",+]++[[package]]+name = "libappindicator-sys"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"+dependencies = [+ "gtk-sys",+ "libloading 0.7.4",+ "once_cell",+]++[[package]]+name = "libbz2-rs-sys"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c"++[[package]]+name = "libc"+version = "0.2.186"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"++[[package]]+name = "libfuzzer-sys"+version = "0.4.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2"+dependencies = [+ "arbitrary",+ "cc",+]++[[package]]+name = "libloading"+version = "0.7.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"+dependencies = [+ "cfg-if",+ "winapi",+]++[[package]]+name = "libloading"+version = "0.8.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"+dependencies = [+ "cfg-if",+ "windows-link 0.2.1",+]++[[package]]+name = "libm"+version = "0.2.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"++[[package]]+name = "libredox"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652"+dependencies = [+ "libc",+]++[[package]]+name = "libxdo"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db"+dependencies = [+ "libxdo-sys",+]++[[package]]+name = "libxdo-sys"+version = "0.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212"+dependencies = [+ "libc",+ "x11",+]++[[package]]+name = "linebender_resource_handle"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"++[[package]]+name = "link-section"+version = "0.18.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "24670b639492630905459a6c7d47f063d33c2d4fcd5362f6e5827c5613976c9f"++[[package]]+name = "linktime-proc-macro"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8c7b0a3383c2a1002d11349c92c85a666a5fb679e96c79d782cf0dbe557fd6ee"++[[package]]+name = "linux-raw-sys"+version = "0.4.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"++[[package]]+name = "linux-raw-sys"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"++[[package]]+name = "litemap"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"++[[package]]+name = "litrs"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"++[[package]]+name = "llm_json"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e3a81b4dfc9cbadf5adde6e601f1b8ec0806d2b41da589e40cdc082e8e223b2"+dependencies = [+ "clap",+ "serde_json",+ "thiserror 1.0.69",+]++[[package]]+name = "lock_api"+version = "0.4.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"+dependencies = [+ "scopeguard",+]++[[package]]+name = "log"+version = "0.4.33"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"+dependencies = [+ "serde_core",+ "value-bag",+]++[[package]]+name = "logos"+version = "0.15.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154"+dependencies = [+ "logos-derive",+]++[[package]]+name = "logos-codegen"+version = "0.15.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c"+dependencies = [+ "beef",+ "fnv",+ "lazy_static",+ "proc-macro2",+ "quote",+ "regex-syntax",+ "rustc_version",+ "syn 2.0.118",+]++[[package]]+name = "logos-derive"+version = "0.15.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470"+dependencies = [+ "logos-codegen",+]++[[package]]+name = "loop9"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"+dependencies = [+ "imgref",+]++[[package]]+name = "lru-slab"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"++[[package]]+name = "lyon"+version = "1.0.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd0578bdecb7d6d88987b8b2b1e3a4e2f81df9d0ece1078623324a567904e7b7"+dependencies = [+ "lyon_algorithms",+ "lyon_tessellation",+]++[[package]]+name = "lyon_algorithms"+version = "1.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8575c0d003ae459399623c4def180c63b77f343b1a7fee64f249b349e7699a31"+dependencies = [+ "lyon_path",+ "num-traits",+]++[[package]]+name = "lyon_geom"+version = "1.0.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4336502e29e32af93cf2dad2214ed6003c17ceb5bd499df77b1de663b9042b92"+dependencies = [+ "arrayvec",+ "euclid",+ "num-traits",+]++[[package]]+name = "lyon_path"+version = "1.0.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c463f9c428b7fc5ec885dcd39ce4aa61e29111d0e33483f6f98c74e89d8621e"+dependencies = [+ "lyon_geom",+ "num-traits",+]++[[package]]+name = "lyon_tessellation"+version = "1.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e43b7e44161571868f5c931d12583592c223c5583eef86b08aa02b7048a3552"+dependencies = [+ "float_next_after",+ "lyon_path",+ "num-traits",+]++[[package]]+name = "mach2"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea"+dependencies = [+ "libc",+]++[[package]]+name = "macro_rules_attribute"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520"+dependencies = [+ "macro_rules_attribute-proc_macro",+ "paste",+]++[[package]]+name = "macro_rules_attribute-proc_macro"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30"++[[package]]+name = "malloc_buf"+version = "0.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"+dependencies = [+ "libc",+]++[[package]]+name = "matchers"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"+dependencies = [+ "regex-automata",+]++[[package]]+name = "matrixmultiply"+version = "0.3.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"+dependencies = [+ "autocfg",+ "rawpointer",+]++[[package]]+name = "maybe-rayon"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"+dependencies = [+ "cfg-if",+ "rayon",+]++[[package]]+name = "md-5"+version = "0.10.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"+dependencies = [+ "cfg-if",+ "digest",+]++[[package]]+name = "media"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "bindgen 0.71.1",+ "core-foundation 0.10.0",+ "core-video",+ "ctor",+ "foreign-types",+ "metal",+ "objc",+]++[[package]]+name = "memchr"+version = "2.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"++[[package]]+name = "memmap2"+version = "0.9.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0"+dependencies = [+ "libc",+]++[[package]]+name = "memo-map"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38d1115007560874e373613744c6fba374c17688327a71c1476d1a5954cc857b"++[[package]]+name = "memoffset"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"+dependencies = [+ "autocfg",+]++[[package]]+name = "metal"+version = "0.33.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15"+dependencies = [+ "bitflags 2.13.0",+ "block",+ "core-graphics-types 0.2.0",+ "foreign-types",+ "log",+ "objc",+ "paste",+]++[[package]]+name = "micromap"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2a86d3146ed3995b5913c414f6664344b9617457320782e64f0bb44afd49d74"++[[package]]+name = "mime"+version = "0.3.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"++[[package]]+name = "mime_guess"+version = "2.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"+dependencies = [+ "mime",+ "unicase",+]++[[package]]+name = "minijinja"+version = "2.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb3d648e68cea56d9858d535ee28f9538404e2dd8cb08ed0bd05dca379477f39"+dependencies = [+ "indexmap 2.14.0",+ "memo-map",+ "serde",+ "serde_json",+]++[[package]]+name = "minijinja-contrib"+version = "2.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85342f6fac0be8ccd5bd00d9066be538f34f393f577b75d81b17c8398a6b43bb"+dependencies = [+ "minijinja",+ "serde",+]++[[package]]+name = "minimal-lexical"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"++[[package]]+name = "miniz_oxide"+version = "0.8.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"+dependencies = [+ "adler2",+ "simd-adler32",+]++[[package]]+name = "mio"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda"+dependencies = [+ "libc",+ "wasi",+ "windows-sys 0.61.2",+]++[[package]]+name = "mirai-app"+version = "0.1.0"+dependencies = [+ "anyhow",+ "auto-launch",+ "dirs 6.0.0",+ "futures",+ "gpui",+ "gpui_platform",+ "gpui_tokio",+ "hound",+ "image",+ "reqwest 0.13.4",+ "reqwest_client",+ "rfd",+ "rust-embed",+ "serde",+ "serde_json",+ "tray-icon",+ "ui-kit",+ "uzu",+ "zip",+]++[[package]]+name = "monostate"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3341a273f6c9d5bef1908f17b7267bbab0e95c9bf69a0d4dcf8e9e1b2c76ef67"+dependencies = [+ "monostate-impl",+ "serde",+ "serde_core",+]++[[package]]+name = "monostate-impl"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "moxcms"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"+dependencies = [+ "num-traits",+ "pxfm",+]++[[package]]+name = "mtl-rs"+version = "0.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eb19a6103808f1af363f96d845bd734c49df73eda4ada4177d118560cd4cf0ba"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "dispatch2",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "objc2-io-surface",+]++[[package]]+name = "muda"+version = "0.15.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484"+dependencies = [+ "crossbeam-channel",+ "dpi",+ "gtk",+ "keyboard-types",+ "libxdo",+ "objc2 0.5.2",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+ "once_cell",+ "png 0.17.16",+ "thiserror 1.0.69",+ "windows-sys 0.59.0",+]++[[package]]+name = "naga"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "arrayvec",+ "bit-set 0.9.1",+ "bitflags 2.13.0",+ "cfg-if",+ "cfg_aliases",+ "codespan-reporting",+ "half",+ "hashbrown 0.16.1",+ "hexf-parse",+ "indexmap 2.14.0",+ "libm",+ "log",+ "num-traits",+ "once_cell",+ "rustc-hash 1.1.0",+ "spirv",+ "thiserror 2.0.18",+ "unicode-ident",+]++[[package]]+name = "nagare"+version = "0.5.12"+dependencies = [+ "bindings",+ "bindings-types",+ "chrono",+ "futures",+ "hanashi",+ "indexmap 2.14.0",+ "keisoku",+ "reqwest 0.13.4",+ "serde",+ "serde_json",+ "shoji",+ "thiserror 2.0.18",+ "tokio",+ "tokio-util",+ "tracing",+ "uuid",+]++[[package]]+name = "nanorand"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"+dependencies = [+ "getrandom 0.2.17",+]++[[package]]+name = "ndarray"+version = "0.17.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"+dependencies = [+ "matrixmultiply",+ "num-complex",+ "num-integer",+ "num-traits",+ "portable-atomic",+ "portable-atomic-util",+ "rawpointer",+]++[[package]]+name = "ndk"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"+dependencies = [+ "bitflags 2.13.0",+ "jni-sys 0.3.1",+ "log",+ "ndk-sys",+ "num_enum",+ "thiserror 1.0.69",+]++[[package]]+name = "ndk-context"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"++[[package]]+name = "ndk-sys"+version = "0.6.0+11769913"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"+dependencies = [+ "jni-sys 0.3.1",+]++[[package]]+name = "new_debug_unreachable"+version = "1.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"++[[package]]+name = "no_std_io2"+version = "0.9.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003"+dependencies = [+ "memchr",+]++[[package]]+name = "nom"+version = "7.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"+dependencies = [+ "memchr",+ "minimal-lexical",+]++[[package]]+name = "nom"+version = "8.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"+dependencies = [+ "memchr",+]++[[package]]+name = "noop_proc_macro"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"++[[package]]+name = "ntapi"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae"+dependencies = [+ "winapi",+]++[[package]]+name = "nu-ansi-term"+version = "0.50.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "num"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"+dependencies = [+ "num-bigint",+ "num-complex",+ "num-integer",+ "num-iter",+ "num-rational",+ "num-traits",+]++[[package]]+name = "num-bigint"+version = "0.4.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c863e9ab5e7bf9c99ba75e1050f1e4d624ae87ed3532d6238ffbdc7b585dbbe6"+dependencies = [+ "num-integer",+ "num-traits",+]++[[package]]+name = "num-bigint-dig"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7f9a86e097b0d187ad0e65667c2f58b9254671e86e7dbb78036b16692eae099"+dependencies = [+ "libm",+ "num-integer",+ "num-iter",+ "num-traits",+ "once_cell",+ "rand 0.9.4",+ "serde",+ "smallvec",+ "zeroize",+]++[[package]]+name = "num-cmp"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa"++[[package]]+name = "num-complex"+version = "0.4.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"+dependencies = [+ "num-traits",+]++[[package]]+name = "num-conv"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"++[[package]]+name = "num-derive"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "num-integer"+version = "0.1.46"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"+dependencies = [+ "num-traits",+]++[[package]]+name = "num-iter"+version = "0.1.45"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"+dependencies = [+ "autocfg",+ "num-integer",+ "num-traits",+]++[[package]]+name = "num-rational"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"+dependencies = [+ "num-bigint",+ "num-integer",+ "num-traits",+]++[[package]]+name = "num-traits"+version = "0.2.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"+dependencies = [+ "autocfg",+ "libm",+]++[[package]]+name = "num_cpus"+version = "1.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"+dependencies = [+ "hermit-abi",+ "libc",+]++[[package]]+name = "num_enum"+version = "0.7.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26"+dependencies = [+ "num_enum_derive",+ "rustversion",+]++[[package]]+name = "num_enum_derive"+version = "0.7.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "obfstr"+version = "0.4.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fac6bb46461d099d52dbd345e021b92d21d1be9be967ef2bb4430b23af439a4f"++[[package]]+name = "objc"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"+dependencies = [+ "malloc_buf",+ "objc_exception",+]++[[package]]+name = "objc-foundation"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"+dependencies = [+ "block",+ "objc",+ "objc_id",+]++[[package]]+name = "objc-sys"+version = "0.3.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"++[[package]]+name = "objc2"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"+dependencies = [+ "objc-sys",+ "objc2-encode",+]++[[package]]+name = "objc2"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"+dependencies = [+ "objc2-encode",+]++[[package]]+name = "objc2-app-kit"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.5.1",+ "libc",+ "objc2 0.5.2",+ "objc2-core-data",+ "objc2-core-image",+ "objc2-foundation 0.2.2",+ "objc2-quartz-core 0.2.2",+]++[[package]]+name = "objc2-app-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-audio-toolbox"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08"+dependencies = [+ "bitflags 2.13.0",+ "libc",+ "objc2 0.6.4",+ "objc2-core-audio",+ "objc2-core-audio-types",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-avf-audio"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "13a380031deed8e99db00065c45937da434ca987c034e13b87e4441f9e4090be"+dependencies = [+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-core-audio"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2"+dependencies = [+ "dispatch2",+ "objc2 0.6.4",+ "objc2-core-audio-types",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-core-audio-types"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c"+dependencies = [+ "bitflags 2.13.0",+ "objc2 0.6.4",+]++[[package]]+name = "objc2-core-data"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.5.1",+ "objc2 0.5.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-core-foundation"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "dispatch2",+ "libc",+ "objc2 0.6.4",+]++[[package]]+name = "objc2-core-graphics"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"+dependencies = [+ "bitflags 2.13.0",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-core-image"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.2",+ "objc2-foundation 0.2.2",+ "objc2-metal 0.2.2",+]++[[package]]+name = "objc2-encode"+version = "4.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"++[[package]]+name = "objc2-foundation"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.5.1",+ "libc",+ "objc2 0.5.2",+]++[[package]]+name = "objc2-foundation"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "libc",+ "objc2 0.6.4",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-io-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"+dependencies = [+ "libc",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-io-surface"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"+dependencies = [+ "bitflags 2.13.0",+ "libc",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-metal"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.5.1",+ "objc2 0.5.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-metal"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-quartz-core"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.5.1",+ "objc2 0.5.2",+ "objc2-foundation 0.2.2",+ "objc2-metal 0.2.2",+]++[[package]]+name = "objc2-quartz-core"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"+dependencies = [+ "bitflags 2.13.0",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "objc2-metal 0.3.2",+]++[[package]]+name = "objc2-security"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "709fe137109bd1e8b5a99390f77a7d8b2961dafc1a1c5db8f2e60329ad6d895a"+dependencies = [+ "bitflags 2.13.0",+ "block2 0.6.2",+ "libc",+ "objc2 0.6.4",+ "objc2-core-foundation",+]++[[package]]+name = "objc_exception"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"+dependencies = [+ "cc",+]++[[package]]+name = "objc_id"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"+dependencies = [+ "objc",+]++[[package]]+name = "object"+version = "0.37.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"+dependencies = [+ "memchr",+]++[[package]]+name = "once_cell"+version = "1.21.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"+dependencies = [+ "portable-atomic",+]++[[package]]+name = "once_cell_polyfill"+version = "1.70.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"++[[package]]+name = "oo7"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "78f2bfed90f1618b4b48dcad9307f25e14ae894e2949642c87c351601d62cebd"+dependencies = [+ "aes",+ "ashpd 0.13.12",+ "async-fs",+ "async-io",+ "async-lock",+ "blocking",+ "cbc",+ "cipher",+ "digest",+ "endi",+ "futures-lite",+ "futures-util",+ "getrandom 0.4.3",+ "hkdf",+ "hmac",+ "md-5",+ "num",+ "num-bigint-dig",+ "pbkdf2",+ "serde",+ "serde_bytes",+ "sha2",+ "subtle",+ "zbus",+ "zbus_macros",+ "zeroize",+ "zvariant",+]++[[package]]+name = "openai-harmony"+version = "0.0.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e77e82af451fc95deeb728a40b84db8ee82d341e136c268de415123a560b9b72"+dependencies = [+ "anyhow",+ "base64 0.22.1",+ "bstr",+ "clap",+ "fancy-regex 0.13.0",+ "futures",+ "image",+ "regex",+ "reqwest 0.12.28",+ "rustc-hash 1.1.0",+ "serde",+ "serde_json",+ "serde_with",+ "sha1",+ "sha2",+ "thiserror 2.0.18",+]++[[package]]+name = "openssl-probe"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"++[[package]]+name = "option-ext"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"++[[package]]+name = "ordered-float"+version = "5.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e"+dependencies = [+ "num-traits",+]++[[package]]+name = "ordered-stream"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"+dependencies = [+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "outref"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e"++[[package]]+name = "pango"+version = "0.18.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"+dependencies = [+ "gio",+ "glib",+ "libc",+ "once_cell",+ "pango-sys",+]++[[package]]+name = "pango-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "parking"+version = "2.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"++[[package]]+name = "parking_lot"+version = "0.12.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"+dependencies = [+ "lock_api",+ "parking_lot_core",+]++[[package]]+name = "parking_lot_core"+version = "0.9.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"+dependencies = [+ "cfg-if",+ "libc",+ "redox_syscall",+ "smallvec",+ "windows-link 0.2.1",+]++[[package]]+name = "paste"+version = "1.0.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"++[[package]]+name = "pastey"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec"++[[package]]+name = "pathfinder_geometry"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3"+dependencies = [+ "log",+ "pathfinder_simd",+]++[[package]]+name = "pathfinder_simd"+version = "0.5.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4500030c302e4af1d423f36f3b958d1aecb6c04184356ed5a833bf6b60435777"+dependencies = [+ "rustc_version",+]++[[package]]+name = "pbkdf2"+version = "0.12.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"+dependencies = [+ "digest",+ "hmac",+]++[[package]]+name = "percent-encoding"+version = "2.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"++[[package]]+name = "perf"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "collections",+ "serde",+ "serde_json",+]++[[package]]+name = "phf"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"+dependencies = [+ "phf_macros",+ "phf_shared",+ "serde",+]++[[package]]+name = "phf_generator"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"+dependencies = [+ "fastrand",+ "phf_shared",+]++[[package]]+name = "phf_macros"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"+dependencies = [+ "phf_generator",+ "phf_shared",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "phf_shared"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"+dependencies = [+ "siphasher",+]++[[package]]+name = "pico-args"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"++[[package]]+name = "pin-project"+version = "1.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"+dependencies = [+ "pin-project-internal",+]++[[package]]+name = "pin-project-internal"+version = "1.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "pin-project-lite"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"++[[package]]+name = "piper"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"+dependencies = [+ "atomic-waker",+ "fastrand",+ "futures-io",+]++[[package]]+name = "pkg-config"+version = "0.3.33"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"++[[package]]+name = "png"+version = "0.17.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"+dependencies = [+ "bitflags 1.3.2",+ "crc32fast",+ "fdeflate",+ "flate2",+ "miniz_oxide",+]++[[package]]+name = "png"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"+dependencies = [+ "bitflags 2.13.0",+ "crc32fast",+ "fdeflate",+ "flate2",+ "miniz_oxide",+]++[[package]]+name = "polling"+version = "3.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"+dependencies = [+ "cfg-if",+ "concurrent-queue",+ "hermit-abi",+ "pin-project-lite",+ "rustix 1.1.4",+ "windows-sys 0.61.2",+]++[[package]]+name = "pollster"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7"++[[package]]+name = "pollster"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"++[[package]]+name = "polycool"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6"+dependencies = [+ "arrayvec",+]++[[package]]+name = "portable-atomic"+version = "1.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"++[[package]]+name = "portable-atomic-util"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618"+dependencies = [+ "portable-atomic",+]++[[package]]+name = "postage"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af3fb618632874fb76937c2361a7f22afd393c982a2165595407edc75b06d3c1"+dependencies = [+ "atomic",+ "crossbeam-queue",+ "futures",+ "log",+ "parking_lot",+ "pin-project",+ "pollster 0.2.5",+ "static_assertions",+ "thiserror 1.0.69",+]++[[package]]+name = "potential_utf"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"+dependencies = [+ "zerovec",+]++[[package]]+name = "powerfmt"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"++[[package]]+name = "ppv-lite86"+version = "0.2.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"+dependencies = [+ "zerocopy",+]++[[package]]+name = "presser"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"++[[package]]+name = "prettyplease"+version = "0.2.37"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"+dependencies = [+ "proc-macro2",+ "syn 2.0.118",+]++[[package]]+name = "proc-macro-crate"+version = "1.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"+dependencies = [+ "once_cell",+ "toml_edit 0.19.15",+]++[[package]]+name = "proc-macro-crate"+version = "2.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"+dependencies = [+ "toml_edit 0.20.7",+]++[[package]]+name = "proc-macro-crate"+version = "3.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"+dependencies = [+ "toml_edit 0.25.12+spec-1.1.0",+]++[[package]]+name = "proc-macro-error"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"+dependencies = [+ "proc-macro-error-attr",+ "proc-macro2",+ "quote",+ "syn 1.0.109",+ "version_check",+]++[[package]]+name = "proc-macro-error-attr"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"+dependencies = [+ "proc-macro2",+ "quote",+ "version_check",+]++[[package]]+name = "proc-macro-error-attr2"+version = "2.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"+dependencies = [+ "proc-macro2",+ "quote",+]++[[package]]+name = "proc-macro-error2"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"+dependencies = [+ "proc-macro-error-attr2",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "proc-macro2"+version = "1.0.106"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "proc-macros"+version = "0.5.12"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "profiling"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5"+dependencies = [+ "profiling-procmacros",+]++[[package]]+name = "profiling-procmacros"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb"+dependencies = [+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "psm"+version = "0.1.31"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea"+dependencies = [+ "ar_archive_writer",+ "cc",+]++[[package]]+name = "pxfm"+version = "0.1.29"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f"++[[package]]+name = "qoi"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"+dependencies = [+ "bytemuck",+]++[[package]]+name = "quick-error"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"++[[package]]+name = "quick-xml"+version = "0.30.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"+dependencies = [+ "memchr",+]++[[package]]+name = "quick-xml"+version = "0.39.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e"+dependencies = [+ "memchr",+ "serde",+]++[[package]]+name = "quinn"+version = "0.11.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8"+dependencies = [+ "bytes",+ "cfg_aliases",+ "pin-project-lite",+ "quinn-proto",+ "quinn-udp",+ "rustc-hash 2.1.3",+ "rustls",+ "socket2",+ "thiserror 2.0.18",+ "tokio",+ "tracing",+ "web-time",+]++[[package]]+name = "quinn-proto"+version = "0.11.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e"+dependencies = [+ "aws-lc-rs",+ "bytes",+ "getrandom 0.3.4",+ "lru-slab",+ "rand 0.9.4",+ "ring",+ "rustc-hash 2.1.3",+ "rustls",+ "rustls-pki-types",+ "slab",+ "thiserror 2.0.18",+ "tinyvec",+ "tracing",+ "web-time",+]++[[package]]+name = "quinn-udp"+version = "0.5.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"+dependencies = [+ "cfg_aliases",+ "libc",+ "once_cell",+ "socket2",+ "tracing",+ "windows-sys 0.60.2",+]++[[package]]+name = "quote"+version = "1.0.46"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"+dependencies = [+ "proc-macro2",+]++[[package]]+name = "r-efi"+version = "5.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"++[[package]]+name = "r-efi"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"++[[package]]+name = "rand"+version = "0.8.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"+dependencies = [+ "libc",+ "rand_chacha 0.3.1",+ "rand_core 0.6.4",+]++[[package]]+name = "rand"+version = "0.9.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"+dependencies = [+ "rand_chacha 0.9.0",+ "rand_core 0.9.5",+]++[[package]]+name = "rand"+version = "0.10.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"+dependencies = [+ "chacha20",+ "getrandom 0.4.3",+ "rand_core 0.10.1",+]++[[package]]+name = "rand_chacha"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"+dependencies = [+ "ppv-lite86",+ "rand_core 0.6.4",+]++[[package]]+name = "rand_chacha"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"+dependencies = [+ "ppv-lite86",+ "rand_core 0.9.5",+]++[[package]]+name = "rand_core"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"+dependencies = [+ "getrandom 0.2.17",+]++[[package]]+name = "rand_core"+version = "0.9.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"+dependencies = [+ "getrandom 0.3.4",+]++[[package]]+name = "rand_core"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"++[[package]]+name = "range-alloc"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"++[[package]]+name = "rangemap"+version = "1.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68"++[[package]]+name = "rav1e"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b"+dependencies = [+ "aligned-vec",+ "arbitrary",+ "arg_enum_proc_macro",+ "arrayvec",+ "av-scenechange",+ "av1-grain",+ "bitstream-io",+ "built",+ "cfg-if",+ "interpolate_name",+ "itertools 0.14.0",+ "libc",+ "libfuzzer-sys",+ "log",+ "maybe-rayon",+ "new_debug_unreachable",+ "noop_proc_macro",+ "num-derive",+ "num-traits",+ "paste",+ "profiling",+ "rand 0.9.4",+ "rand_chacha 0.9.0",+ "simd_helpers",+ "thiserror 2.0.18",+ "v_frame",+ "wasm-bindgen",+]++[[package]]+name = "ravif"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45"+dependencies = [+ "avif-serialize",+ "imgref",+ "loop9",+ "quick-error",+ "rav1e",+ "rayon",+ "rgb",+]++[[package]]+name = "raw-window-handle"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"++[[package]]+name = "raw-window-metal"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135"+dependencies = [+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "objc2-quartz-core 0.3.2",+]++[[package]]+name = "rawpointer"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"++[[package]]+name = "rayon"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"+dependencies = [+ "either",+ "rayon-core",+]++[[package]]+name = "rayon-cond"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2964d0cf57a3e7a06e8183d14a8b527195c706b7983549cd5462d5aa3747438f"+dependencies = [+ "either",+ "itertools 0.14.0",+ "rayon",+]++[[package]]+name = "rayon-core"+version = "1.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"+dependencies = [+ "crossbeam-deque",+ "crossbeam-utils",+]++[[package]]+name = "read-fonts"+version = "0.37.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5"+dependencies = [+ "bytemuck",+ "core_maths",+ "font-types",+]++[[package]]+name = "read-fonts"+version = "0.39.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81"+dependencies = [+ "bytemuck",+ "font-types",+]++[[package]]+name = "redox_syscall"+version = "0.5.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"+dependencies = [+ "bitflags 2.13.0",+]++[[package]]+name = "redox_users"+version = "0.4.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"+dependencies = [+ "getrandom 0.2.17",+ "libredox",+ "thiserror 1.0.69",+]++[[package]]+name = "redox_users"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"+dependencies = [+ "getrandom 0.2.17",+ "libredox",+ "thiserror 2.0.18",+]++[[package]]+name = "ref-cast"+version = "1.0.25"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"+dependencies = [+ "ref-cast-impl",+]++[[package]]+name = "ref-cast-impl"+version = "1.0.25"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "referencing"+version = "0.46.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77954d81b2e1c5e8ab889f9f597a92f852ab073255de9e37ee3fb443efd57051"+dependencies = [+ "ahash",+ "fluent-uri",+ "getrandom 0.3.4",+ "hashbrown 0.16.1",+ "itoa",+ "micromap",+ "parking_lot",+ "percent-encoding",+ "serde_json",+]++[[package]]+name = "refineable"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "derive_refineable",+]++[[package]]+name = "regex"+version = "1.12.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "regex-automata"+version = "0.4.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-syntax",+]++[[package]]+name = "regex-syntax"+version = "0.8.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"++[[package]]+name = "renderdoc-sys"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"++[[package]]+name = "reqwest"+version = "0.12.28"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "futures-channel",+ "futures-core",+ "futures-util",+ "http",+ "http-body",+ "http-body-util",+ "hyper",+ "hyper-rustls",+ "hyper-util",+ "js-sys",+ "log",+ "mime_guess",+ "percent-encoding",+ "pin-project-lite",+ "quinn",+ "rustls",+ "rustls-native-certs",+ "rustls-pki-types",+ "serde",+ "serde_json",+ "serde_urlencoded",+ "sync_wrapper",+ "tokio",+ "tokio-rustls",+ "tokio-util",+ "tower",+ "tower-http",+ "tower-service",+ "url",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wasm-streams 0.4.2",+ "web-sys",+ "webpki-roots",+]++[[package]]+name = "reqwest"+version = "0.13.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "encoding_rs",+ "futures-channel",+ "futures-core",+ "futures-util",+ "h2",+ "http",+ "http-body",+ "http-body-util",+ "hyper",+ "hyper-rustls",+ "hyper-util",+ "js-sys",+ "log",+ "mime",+ "percent-encoding",+ "pin-project-lite",+ "quinn",+ "rustls",+ "rustls-pki-types",+ "rustls-platform-verifier 0.7.0",+ "serde",+ "serde_json",+ "serde_urlencoded",+ "sync_wrapper",+ "tokio",+ "tokio-rustls",+ "tokio-util",+ "tower",+ "tower-http",+ "tower-service",+ "url",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wasm-streams 0.5.0",+ "web-sys",+]++[[package]]+name = "reqwest-eventsource"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "632c55746dbb44275691640e7b40c907c16a2dc1a5842aa98aaec90da6ec6bde"+dependencies = [+ "eventsource-stream",+ "futures-core",+ "futures-timer",+ "mime",+ "nom 7.1.3",+ "pin-project-lite",+ "reqwest 0.12.28",+ "thiserror 1.0.69",+]++[[package]]+name = "reqwest_client"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "bytes",+ "futures",+ "gpui_util",+ "http_client",+ "http_client_tls",+ "log",+ "regex",+ "serde",+ "tokio",+ "zed-reqwest",+]++[[package]]+name = "resvg"+version = "0.46.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b563218631706d614e23059436526d005b50ab5f2d506b55a17eb65c5eb83419"+dependencies = [+ "gif",+ "image-webp",+ "log",+ "pico-args",+ "rgb",+ "svgtypes",+ "tiny-skia",+ "usvg",+ "zune-jpeg",+]++[[package]]+name = "rfd"+version = "0.15.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed"+dependencies = [+ "ashpd 0.11.1",+ "block2 0.6.2",+ "dispatch2",+ "js-sys",+ "log",+ "objc2 0.6.4",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "pollster 0.4.0",+ "raw-window-handle",+ "urlencoding",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "windows-sys 0.59.0",+]++[[package]]+name = "rgb"+version = "0.8.53"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"+dependencies = [+ "bytemuck",+]++[[package]]+name = "rhai"+version = "1.25.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dd4dd0f8c36625202a4ba553c416c19b719947cd2a31d1bda06126e4a5727daf"+dependencies = [+ "ahash",+ "bitflags 2.13.0",+ "num-traits",+ "once_cell",+ "rhai_codegen",+ "smallvec",+ "smartstring",+ "thin-vec",+ "web-time",+]++[[package]]+name = "rhai_codegen"+version = "3.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3cd3a7535e50bf36857e7be7bec276d334e8c2dfa469c2201226fd01638ea5ca"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "ring"+version = "0.17.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"+dependencies = [+ "cc",+ "cfg-if",+ "getrandom 0.2.17",+ "libc",+ "untrusted",+ "windows-sys 0.52.0",+]++[[package]]+name = "rodio"+version = "0.22.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d0a536bb79db59098ef71a4dd4246c02eb87b316deceb1b68e0cde7167ec01eb"+dependencies = [+ "cpal",+ "dasp_sample",+ "num-rational",+ "symphonia",+ "thiserror 2.0.18",+]++[[package]]+name = "roxmltree"+version = "0.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"++[[package]]+name = "roxmltree"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb"+dependencies = [+ "memchr",+]++[[package]]+name = "rust-embed"+version = "8.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27"+dependencies = [+ "rust-embed-impl",+ "rust-embed-utils",+ "walkdir",+]++[[package]]+name = "rust-embed-impl"+version = "8.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa"+dependencies = [+ "proc-macro2",+ "quote",+ "rust-embed-utils",+ "syn 2.0.118",+ "walkdir",+]++[[package]]+name = "rust-embed-utils"+version = "8.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1"+dependencies = [+ "sha2",+ "walkdir",+]++[[package]]+name = "rustc-demangle"+version = "0.1.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"++[[package]]+name = "rustc-hash"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"++[[package]]+name = "rustc-hash"+version = "2.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"++[[package]]+name = "rustc_version"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"+dependencies = [+ "semver",+]++[[package]]+name = "rustix"+version = "0.38.44"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"+dependencies = [+ "bitflags 2.13.0",+ "errno",+ "libc",+ "linux-raw-sys 0.4.15",+ "windows-sys 0.59.0",+]++[[package]]+name = "rustix"+version = "1.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"+dependencies = [+ "bitflags 2.13.0",+ "errno",+ "libc",+ "linux-raw-sys 0.12.1",+ "windows-sys 0.61.2",+]++[[package]]+name = "rustls"+version = "0.23.41"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"+dependencies = [+ "aws-lc-rs",+ "log",+ "once_cell",+ "ring",+ "rustls-pki-types",+ "rustls-webpki",+ "subtle",+ "zeroize",+]++[[package]]+name = "rustls-native-certs"+version = "0.8.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d"+dependencies = [+ "openssl-probe",+ "rustls-pki-types",+ "schannel",+ "security-framework",+]++[[package]]+name = "rustls-pemfile"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"+dependencies = [+ "rustls-pki-types",+]++[[package]]+name = "rustls-pki-types"+version = "1.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046"+dependencies = [+ "web-time",+ "zeroize",+]++[[package]]+name = "rustls-platform-verifier"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "19787cda76408ec5404443dc8b31795c87cd8fec49762dc75fa727740d34acc1"+dependencies = [+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "jni 0.21.1",+ "log",+ "once_cell",+ "rustls",+ "rustls-native-certs",+ "rustls-platform-verifier-android",+ "rustls-webpki",+ "security-framework",+ "security-framework-sys",+ "webpki-root-certs 0.26.11",+ "windows-sys 0.59.0",+]++[[package]]+name = "rustls-platform-verifier"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0"+dependencies = [+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "jni 0.22.4",+ "log",+ "once_cell",+ "rustls",+ "rustls-native-certs",+ "rustls-platform-verifier-android",+ "rustls-webpki",+ "security-framework",+ "security-framework-sys",+ "webpki-root-certs 1.0.8",+ "windows-sys 0.61.2",+]++[[package]]+name = "rustls-platform-verifier-android"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"++[[package]]+name = "rustls-webpki"+version = "0.103.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"+dependencies = [+ "aws-lc-rs",+ "ring",+ "rustls-pki-types",+ "untrusted",+]++[[package]]+name = "rustversion"+version = "1.0.22"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"++[[package]]+name = "rustybuzz"+version = "0.20.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702"+dependencies = [+ "bitflags 2.13.0",+ "bytemuck",+ "core_maths",+ "log",+ "smallvec",+ "ttf-parser",+ "unicode-bidi-mirroring",+ "unicode-ccc",+ "unicode-properties",+ "unicode-script",+]++[[package]]+name = "ryu"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"++[[package]]+name = "same-file"+version = "1.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"+dependencies = [+ "winapi-util",+]++[[package]]+name = "schannel"+version = "0.1.29"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "scheduler"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "async-task",+ "backtrace",+ "chrono",+ "flume",+ "futures",+ "parking_lot",+ "rand 0.9.4",+ "web-time",+]++[[package]]+name = "schemars"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"+dependencies = [+ "dyn-clone",+ "ref-cast",+ "serde",+ "serde_json",+]++[[package]]+name = "schemars"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"+dependencies = [+ "dyn-clone",+ "indexmap 2.14.0",+ "ref-cast",+ "schemars_derive",+ "serde",+ "serde_json",+]++[[package]]+name = "schemars_derive"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f"+dependencies = [+ "proc-macro2",+ "quote",+ "serde_derive_internals",+ "syn 2.0.118",+]++[[package]]+name = "scoped-tls"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"++[[package]]+name = "scopeguard"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"++[[package]]+name = "screencapturekit"+version = "0.2.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a5eeeb57ac94960cfe5ff4c402be6585ae4c8d29a2cf41b276048c2e849d64e"+dependencies = [+ "screencapturekit-sys",+]++[[package]]+name = "screencapturekit-sys"+version = "0.2.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "22411b57f7d49e7fe08025198813ee6fd65e1ee5eff4ebc7880c12c82bde4c60"+dependencies = [+ "block",+ "dispatch",+ "objc",+ "objc-foundation",+ "objc_id",+ "once_cell",+]++[[package]]+name = "seahash"+version = "4.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"++[[package]]+name = "secrecy"+version = "0.10.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a"+dependencies = [+ "serde",+ "zeroize",+]++[[package]]+name = "security-framework"+version = "3.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.10.0",+ "core-foundation-sys",+ "libc",+ "security-framework-sys",+]++[[package]]+name = "security-framework-sys"+version = "2.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"+dependencies = [+ "core-foundation-sys",+ "libc",+]++[[package]]+name = "self_cell"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89"++[[package]]+name = "semver"+version = "1.0.28"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"+dependencies = [+ "serde",+ "serde_core",+]++[[package]]+name = "serde"+version = "1.0.228"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"+dependencies = [+ "serde_core",+ "serde_derive",+]++[[package]]+name = "serde_bytes"+version = "0.11.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"+dependencies = [+ "serde",+ "serde_core",+]++[[package]]+name = "serde_core"+version = "1.0.228"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"+dependencies = [+ "serde_derive",+]++[[package]]+name = "serde_derive"+version = "1.0.228"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "serde_derive_internals"+version = "0.29.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "serde_fmt"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed"+dependencies = [+ "serde_core",+]++[[package]]+name = "serde_json"+version = "1.0.150"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"+dependencies = [+ "indexmap 2.14.0",+ "itoa",+ "memchr",+ "serde",+ "serde_core",+ "zmij",+]++[[package]]+name = "serde_repr"+version = "0.1.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "serde_spanned"+version = "0.6.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"+dependencies = [+ "serde",+]++[[package]]+name = "serde_spanned"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"+dependencies = [+ "serde_core",+]++[[package]]+name = "serde_urlencoded"+version = "0.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"+dependencies = [+ "form_urlencoded",+ "itoa",+ "ryu",+ "serde",+]++[[package]]+name = "serde_with"+version = "3.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c"+dependencies = [+ "base64 0.22.1",+ "bs58",+ "chrono",+ "hex",+ "indexmap 1.9.3",+ "indexmap 2.14.0",+ "schemars 0.9.0",+ "schemars 1.2.1",+ "serde_core",+ "serde_json",+ "serde_with_macros",+ "time",+]++[[package]]+name = "serde_with_macros"+version = "3.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660"+dependencies = [+ "darling 0.23.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "sha1"+version = "0.10.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"+dependencies = [+ "cfg-if",+ "cpufeatures 0.2.17",+ "digest",+]++[[package]]+name = "sha1_smol"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"++[[package]]+name = "sha2"+version = "0.10.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"+dependencies = [+ "cfg-if",+ "cpufeatures 0.2.17",+ "digest",+]++[[package]]+name = "sharded-slab"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"+dependencies = [+ "lazy_static",+]++[[package]]+name = "shlex"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"++[[package]]+name = "shlex"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"++[[package]]+name = "shoji"+version = "0.5.12"+dependencies = [+ "bindings",+ "bindings-types",+ "futures",+ "hound",+ "indexmap 2.14.0",+ "serde",+ "serde_json",+ "thiserror 2.0.18",+ "tokenizers",+ "tokio-util",+]++[[package]]+name = "signal-hook-registry"+version = "1.4.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"+dependencies = [+ "errno",+ "libc",+]++[[package]]+name = "simd-adler32"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"++[[package]]+name = "simd_cesu8"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33"+dependencies = [+ "rustc_version",+ "simdutf8",+]++[[package]]+name = "simd_helpers"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"+dependencies = [+ "quote",+]++[[package]]+name = "simdutf8"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"++[[package]]+name = "simplecss"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c"+dependencies = [+ "log",+]++[[package]]+name = "siphasher"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"++[[package]]+name = "skrifa"+version = "0.40.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac"+dependencies = [+ "bytemuck",+ "read-fonts 0.37.0",+]++[[package]]+name = "skrifa"+version = "0.42.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564"+dependencies = [+ "bytemuck",+ "read-fonts 0.39.2",+]++[[package]]+name = "slab"+version = "0.4.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"++[[package]]+name = "slotmap"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"+dependencies = [+ "version_check",+]++[[package]]+name = "smallvec"+version = "1.15.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"++[[package]]+name = "smartstring"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"+dependencies = [+ "autocfg",+ "static_assertions",+ "version_check",+]++[[package]]+name = "smol"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f"+dependencies = [+ "async-channel",+ "async-executor",+ "async-fs",+ "async-io",+ "async-lock",+ "async-net",+ "async-process",+ "blocking",+ "futures-lite",+]++[[package]]+name = "smol_str"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523"+dependencies = [+ "borsh",+ "serde_core",+]++[[package]]+name = "socket2"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"+dependencies = [+ "libc",+ "windows-sys 0.61.2",+]++[[package]]+name = "spin"+version = "0.9.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"+dependencies = [+ "lock_api",+]++[[package]]+name = "spin"+version = "0.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591"+dependencies = [+ "lock_api",+]++[[package]]+name = "spirv"+version = "0.4.0+sdk-1.4.341.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"+dependencies = [+ "bitflags 2.13.0",+]++[[package]]+name = "spm_precompiled"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5851699c4033c63636f7ea4cf7b7c1f1bf06d0cc03cfb42e711de5a5c46cf326"+dependencies = [+ "base64 0.13.1",+ "nom 7.1.3",+ "serde",+ "unicode-segmentation",+]++[[package]]+name = "stable_deref_trait"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"++[[package]]+name = "stacker"+version = "0.1.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190"+dependencies = [+ "cc",+ "cfg-if",+ "libc",+ "psm",+ "windows-sys 0.61.2",+]++[[package]]+name = "stacksafe"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d9c1172965d317e87ddb6d364a040d958b40a1db82b6ef97da26253a8b3d090"+dependencies = [+ "stacker",+ "stacksafe-macro",+]++[[package]]+name = "stacksafe-macro"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "172175341049678163e979d9107ca3508046d4d2a7c6682bee46ac541b17db69"+dependencies = [+ "proc-macro-error2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "static_assertions"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"++[[package]]+name = "strict-num"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"+dependencies = [+ "float-cmp",+]++[[package]]+name = "strsim"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"++[[package]]+name = "strum"+version = "0.27.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"+dependencies = [+ "strum_macros",+]++[[package]]+name = "strum_macros"+version = "0.27.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"+dependencies = [+ "heck 0.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "subtle"+version = "2.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"++[[package]]+name = "sum_tree"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "heapless",+ "log",+ "rayon",+ "tracing",+ "ztracing",+]++[[package]]+name = "sval"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fb9efbae90f97301f4d25f3be63dfd99d6b7af9d088228a52ec960d649b2e7d"++[[package]]+name = "sval_buffer"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff5c0280ea0af40b3a1fd0b532680b5067482ffb81412ee66ec04b1d9952b49a"+dependencies = [+ "sval",+ "sval_ref",+]++[[package]]+name = "sval_dynamic"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "59b9067f2e68f58e110cf8019a268057e3791cf74b0fdb1b3c7c6e49104f44e6"+dependencies = [+ "sval",+]++[[package]]+name = "sval_fmt"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96ebdbf0e4b175884aa587fcf551c16dabe245ea04235abdd8cbbd160b27ed5a"+dependencies = [+ "itoa",+ "ryu",+ "sval",+]++[[package]]+name = "sval_json"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e448d9fa216a6c16670b28d624fbbcf5c04e41eb187bd7c52e01222ffa72a12"+dependencies = [+ "itoa",+ "ryu",+ "sval",+]++[[package]]+name = "sval_nested"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "021de5b5c26efd544c694cef9b8a9abe8633481bf3be1ea145a18a740818b291"+dependencies = [+ "sval",+ "sval_buffer",+ "sval_ref",+]++[[package]]+name = "sval_ref"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "54ef5ffec8bc52ded04ee424ab8d959e25e64fd40a48a16d21f8991ce824c1bb"+dependencies = [+ "sval",+]++[[package]]+name = "sval_serde"+version = "2.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b983833a8a2390f89ebcf9b9acd06883017014b4ffd72ee28e0c9de6852039f5"+dependencies = [+ "serde_core",+ "sval",+ "sval_nested",+]++[[package]]+name = "svg_fmt"+version = "0.4.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb"++[[package]]+name = "svgtypes"+version = "0.16.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d"+dependencies = [+ "kurbo",+ "siphasher",+]++[[package]]+name = "swash"+version = "0.2.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0811b01ca2c4e8718760713911feaf4675c24f94e50530a015ec646cfb622f7c"+dependencies = [+ "skrifa 0.42.1",+ "yazi",+ "zeno",+]++[[package]]+name = "symlink"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a"++[[package]]+name = "symphonia"+version = "0.5.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5773a4c030a19d9bfaa090f49746ff35c75dfddfa700df7a5939d5e076a57039"+dependencies = [+ "lazy_static",+ "symphonia-codec-pcm",+ "symphonia-core",+ "symphonia-format-riff",+ "symphonia-metadata",+]++[[package]]+name = "symphonia-codec-pcm"+version = "0.5.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e89d716c01541ad3ebe7c91ce4c8d38a7cf266a3f7b2f090b108fb0cb031d95"+dependencies = [+ "log",+ "symphonia-core",+]++[[package]]+name = "symphonia-core"+version = "0.5.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ea00cc4f79b7f6bb7ff87eddc065a1066f3a43fe1875979056672c9ef948c2af"+dependencies = [+ "arrayvec",+ "bitflags 1.3.2",+ "bytemuck",+ "lazy_static",+ "log",+]++[[package]]+name = "symphonia-format-riff"+version = "0.5.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2d7c3df0e7d94efb68401d81906eae73c02b40d5ec1a141962c592d0f11a96f"+dependencies = [+ "extended",+ "log",+ "symphonia-core",+ "symphonia-metadata",+]++[[package]]+name = "symphonia-metadata"+version = "0.5.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "36306ff42b9ffe6e5afc99d49e121e0bd62fe79b9db7b9681d48e29fa19e6b16"+dependencies = [+ "encoding_rs",+ "lazy_static",+ "log",+ "symphonia-core",+]++[[package]]+name = "syn"+version = "1.0.109"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"+dependencies = [+ "proc-macro2",+ "unicode-ident",+]++[[package]]+name = "syn"+version = "2.0.118"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[package]]+name = "sync_wrapper"+version = "1.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"+dependencies = [+ "futures-core",+]++[[package]]+name = "synstructure"+version = "0.13.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "sys-locale"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4"+dependencies = [+ "libc",+]++[[package]]+name = "sysinfo"+version = "0.31.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"+dependencies = [+ "core-foundation-sys",+ "libc",+ "memchr",+ "ntapi",+ "rayon",+ "windows 0.57.0",+]++[[package]]+name = "sysinfo"+version = "0.38.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f"+dependencies = [+ "libc",+ "memchr",+ "ntapi",+ "objc2-core-foundation",+ "objc2-io-kit",+ "windows 0.62.2",+]++[[package]]+name = "system-configuration"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.9.4",+ "system-configuration-sys",+]++[[package]]+name = "system-configuration"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"+dependencies = [+ "bitflags 2.13.0",+ "core-foundation 0.9.4",+ "system-configuration-sys",+]++[[package]]+name = "system-configuration-sys"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"+dependencies = [+ "core-foundation-sys",+ "libc",+]++[[package]]+name = "system-deps"+version = "6.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"+dependencies = [+ "cfg-expr",+ "heck 0.5.0",+ "pkg-config",+ "toml 0.8.23",+ "version-compare",+]++[[package]]+name = "taffy"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aea22054047c16c3f34d3ac473a2170be1424b1115b2a3adcf28cfb067c88859"+dependencies = [+ "arrayvec",+ "grid",+ "serde",+ "slotmap",+]++[[package]]+name = "tao-core-video-sys"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "271450eb289cb4d8d0720c6ce70c72c8c858c93dd61fc625881616752e6b98f6"+dependencies = [+ "cfg-if",+ "core-foundation-sys",+ "libc",+ "objc",+]++[[package]]+name = "target-lexicon"+version = "0.12.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"++[[package]]+name = "tempfile"+version = "3.27.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"+dependencies = [+ "fastrand",+ "getrandom 0.4.3",+ "once_cell",+ "rustix 1.1.4",+ "windows-sys 0.61.2",+]++[[package]]+name = "termcolor"+version = "1.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"+dependencies = [+ "winapi-util",+]++[[package]]+name = "thin-vec"+version = "0.2.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b0f7e269b48f0a7dd0146680fa24b50cc67fc0373f086a5b2f99bd084639b482"++[[package]]+name = "thiserror"+version = "1.0.69"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"+dependencies = [+ "thiserror-impl 1.0.69",+]++[[package]]+name = "thiserror"+version = "2.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"+dependencies = [+ "thiserror-impl 2.0.18",+]++[[package]]+name = "thiserror-impl"+version = "1.0.69"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "thiserror-impl"+version = "2.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "thread_local"+version = "1.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"+dependencies = [+ "cfg-if",+]++[[package]]+name = "tiff"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"+dependencies = [+ "fax",+ "flate2",+ "half",+ "quick-error",+ "weezl",+ "zune-jpeg",+]++[[package]]+name = "time"+version = "0.3.53"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50"+dependencies = [+ "deranged",+ "num-conv",+ "powerfmt",+ "serde_core",+ "time-core",+ "time-macros",+]++[[package]]+name = "time-core"+version = "0.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"++[[package]]+name = "time-macros"+version = "0.2.31"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f"+dependencies = [+ "num-conv",+ "time-core",+]++[[package]]+name = "tiny-keccak"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"+dependencies = [+ "crunchy",+]++[[package]]+name = "tiny-skia"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab"+dependencies = [+ "arrayref",+ "arrayvec",+ "bytemuck",+ "cfg-if",+ "log",+ "png 0.17.16",+ "tiny-skia-path",+]++[[package]]+name = "tiny-skia-path"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93"+dependencies = [+ "arrayref",+ "bytemuck",+ "strict-num",+]++[[package]]+name = "tinystr"+version = "0.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"+dependencies = [+ "displaydoc",+ "zerovec",+]++[[package]]+name = "tinyvec"+version = "1.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"+dependencies = [+ "tinyvec_macros",+]++[[package]]+name = "tinyvec_macros"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"++[[package]]+name = "token-stream-parser"+version = "0.5.12"+dependencies = [+ "indexmap 2.14.0",+ "json-transform",+ "jsonschema",+ "serde",+ "serde_json",+ "thiserror 2.0.18",+ "tracing",+]++[[package]]+name = "tokenizers"+version = "0.22.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b238e22d44a15349529690fb07bd645cf58149a1b1e44d6cb5bd1641ff1a6223"+dependencies = [+ "ahash",+ "aho-corasick",+ "compact_str",+ "dary_heap",+ "derive_builder",+ "esaxx-rs",+ "fancy-regex 0.14.0",+ "getrandom 0.3.4",+ "itertools 0.14.0",+ "log",+ "macro_rules_attribute",+ "monostate",+ "paste",+ "rand 0.9.4",+ "rayon",+ "rayon-cond",+ "regex",+ "regex-syntax",+ "serde",+ "serde_json",+ "spm_precompiled",+ "thiserror 2.0.18",+ "unicode-normalization-alignments",+ "unicode-segmentation",+ "unicode_categories",+]++[[package]]+name = "tokio"+version = "1.52.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"+dependencies = [+ "bytes",+ "libc",+ "mio",+ "parking_lot",+ "pin-project-lite",+ "signal-hook-registry",+ "socket2",+ "tokio-macros",+ "windows-sys 0.61.2",+]++[[package]]+name = "tokio-macros"+version = "2.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "tokio-rustls"+version = "0.26.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"+dependencies = [+ "rustls",+ "tokio",+]++[[package]]+name = "tokio-socks"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7e2948f60dbe26b35f2c7fb74ac2854c1fddded0fe9d7548fcc674a246f7615"+dependencies = [+ "either",+ "futures-util",+ "thiserror 1.0.69",+ "tokio",+]++[[package]]+name = "tokio-stream"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"+dependencies = [+ "futures-core",+ "pin-project-lite",+ "tokio",+ "tokio-util",+]++[[package]]+name = "tokio-util"+version = "0.7.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"+dependencies = [+ "bytes",+ "futures-core",+ "futures-sink",+ "futures-util",+ "pin-project-lite",+ "tokio",+]++[[package]]+name = "toml"+version = "0.8.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"+dependencies = [+ "serde",+ "serde_spanned 0.6.9",+ "toml_datetime 0.6.11",+ "toml_edit 0.22.27",+]++[[package]]+name = "toml"+version = "0.9.12+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"+dependencies = [+ "indexmap 2.14.0",+ "serde_core",+ "serde_spanned 1.1.1",+ "toml_datetime 0.7.5+spec-1.1.0",+ "toml_parser",+ "toml_writer",+ "winnow 0.7.15",+]++[[package]]+name = "toml"+version = "1.1.2+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee"+dependencies = [+ "indexmap 2.14.0",+ "serde_core",+ "serde_spanned 1.1.1",+ "toml_datetime 1.1.1+spec-1.1.0",+ "toml_parser",+ "toml_writer",+ "winnow 1.0.3",+]++[[package]]+name = "toml_datetime"+version = "0.6.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"+dependencies = [+ "serde",+]++[[package]]+name = "toml_datetime"+version = "0.7.5+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"+dependencies = [+ "serde_core",+]++[[package]]+name = "toml_datetime"+version = "1.1.1+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"+dependencies = [+ "serde_core",+]++[[package]]+name = "toml_edit"+version = "0.19.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"+dependencies = [+ "indexmap 2.14.0",+ "toml_datetime 0.6.11",+ "winnow 0.5.40",+]++[[package]]+name = "toml_edit"+version = "0.20.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"+dependencies = [+ "indexmap 2.14.0",+ "toml_datetime 0.6.11",+ "winnow 0.5.40",+]++[[package]]+name = "toml_edit"+version = "0.22.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"+dependencies = [+ "indexmap 2.14.0",+ "serde",+ "serde_spanned 0.6.9",+ "toml_datetime 0.6.11",+ "toml_write",+ "winnow 0.7.15",+]++[[package]]+name = "toml_edit"+version = "0.25.12+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7"+dependencies = [+ "indexmap 2.14.0",+ "toml_datetime 1.1.1+spec-1.1.0",+ "toml_parser",+ "winnow 1.0.3",+]++[[package]]+name = "toml_parser"+version = "1.1.2+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"+dependencies = [+ "winnow 1.0.3",+]++[[package]]+name = "toml_write"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"++[[package]]+name = "toml_writer"+version = "1.1.1+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"++[[package]]+name = "tower"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"+dependencies = [+ "futures-core",+ "futures-util",+ "pin-project-lite",+ "sync_wrapper",+ "tokio",+ "tower-layer",+ "tower-service",+]++[[package]]+name = "tower-http"+version = "0.6.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"+dependencies = [+ "bitflags 2.13.0",+ "bytes",+ "futures-util",+ "http",+ "http-body",+ "pin-project-lite",+ "tower",+ "tower-layer",+ "tower-service",+ "url",+]++[[package]]+name = "tower-layer"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"++[[package]]+name = "tower-service"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"++[[package]]+name = "tracing"+version = "0.1.44"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"+dependencies = [+ "log",+ "pin-project-lite",+ "tracing-attributes",+ "tracing-core",+]++[[package]]+name = "tracing-appender"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c"+dependencies = [+ "crossbeam-channel",+ "symlink",+ "thiserror 2.0.18",+ "time",+ "tracing-subscriber",+]++[[package]]+name = "tracing-attributes"+version = "0.1.31"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "tracing-core"+version = "0.1.36"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"+dependencies = [+ "once_cell",+ "valuable",+]++[[package]]+name = "tracing-log"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"+dependencies = [+ "log",+ "once_cell",+ "tracing-core",+]++[[package]]+name = "tracing-subscriber"+version = "0.3.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"+dependencies = [+ "matchers",+ "nu-ansi-term",+ "once_cell",+ "regex-automata",+ "sharded-slab",+ "smallvec",+ "thread_local",+ "tracing",+ "tracing-core",+ "tracing-log",+]++[[package]]+name = "tray-icon"+version = "0.19.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eadd75f5002e2513eaa19b2365f533090cc3e93abd38788452d9ea85cff7b48a"+dependencies = [+ "crossbeam-channel",+ "dirs 6.0.0",+ "libappindicator",+ "muda",+ "objc2 0.6.4",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+ "once_cell",+ "png 0.17.16",+ "thiserror 2.0.18",+ "windows-sys 0.59.0",+]++[[package]]+name = "try-lock"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"++[[package]]+name = "ttf-parser"+version = "0.25.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"+dependencies = [+ "core_maths",+]++[[package]]+name = "typeid"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"++[[package]]+name = "typenum"+version = "1.20.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"++[[package]]+name = "uds_windows"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"+dependencies = [+ "memoffset",+ "tempfile",+ "windows-sys 0.61.2",+]++[[package]]+name = "ui-kit"+version = "0.1.0"+dependencies = [+ "gpui",+ "unicode-segmentation",+]++[[package]]+name = "unicase"+version = "2.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"++[[package]]+name = "unicode-bidi"+version = "0.3.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"++[[package]]+name = "unicode-bidi-mirroring"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe"++[[package]]+name = "unicode-ccc"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"++[[package]]+name = "unicode-general-category"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f"++[[package]]+name = "unicode-ident"+version = "1.0.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"++[[package]]+name = "unicode-linebreak"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"++[[package]]+name = "unicode-normalization-alignments"+version = "0.1.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "43f613e4fa046e69818dd287fdc4bc78175ff20331479dab6e1b0f98d57062de"+dependencies = [+ "smallvec",+]++[[package]]+name = "unicode-properties"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"++[[package]]+name = "unicode-script"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee"++[[package]]+name = "unicode-segmentation"+version = "1.13.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"++[[package]]+name = "unicode-vo"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94"++[[package]]+name = "unicode-width"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"++[[package]]+name = "unicode-xid"+version = "0.2.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"++[[package]]+name = "unicode_categories"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"++[[package]]+name = "untrusted"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"++[[package]]+name = "url"+version = "2.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"+dependencies = [+ "form_urlencoded",+ "idna",+ "percent-encoding",+ "serde",+ "serde_derive",+]++[[package]]+name = "urlencoding"+version = "2.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"++[[package]]+name = "usvg"+version = "0.46.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e419dff010bb12512b0ae9e3d2f318dfbdf0167fde7eb05465134d4e8756076f"+dependencies = [+ "base64 0.22.1",+ "data-url",+ "flate2",+ "fontdb",+ "imagesize",+ "kurbo",+ "log",+ "pico-args",+ "roxmltree 0.21.1",+ "rustybuzz",+ "simplecss",+ "siphasher",+ "strict-num",+ "svgtypes",+ "tiny-skia-path",+ "unicode-bidi",+ "unicode-script",+ "unicode-vo",+ "xmlwriter",+]++[[package]]+name = "utf8_iter"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"++[[package]]+name = "utf8parse"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"++[[package]]+name = "util_macros"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "perf",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "uuid"+version = "1.23.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53"+dependencies = [+ "getrandom 0.4.3",+ "js-sys",+ "serde_core",+ "sha1_smol",+ "wasm-bindgen",+]++[[package]]+name = "uuid-simd"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8"+dependencies = [+ "outref",+ "vsimd",+]++[[package]]+name = "uzu"+version = "0.5.12"+dependencies = [+ "anyhow",+ "apple-native-keyring-store",+ "async-openai",+ "backend-remote",+ "backend-uzu",+ "bindings",+ "bindings-types",+ "confy",+ "dirs 6.0.0",+ "download-manager",+ "fancy-regex 0.17.0",+ "futures",+ "futures-util",+ "indexmap 2.14.0",+ "keyring-core",+ "nagare",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+ "objc2-security",+ "reqwest 0.13.4",+ "rodio",+ "serde",+ "serde_json",+ "shoji",+ "sysinfo 0.38.4",+ "thiserror 2.0.18",+ "tokio",+ "tokio-stream",+ "tracing",+ "tracing-appender",+ "tracing-subscriber",+ "unicode-segmentation",+ "unicode-width",+ "uuid",+]++[[package]]+name = "v_frame"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2"+dependencies = [+ "aligned-vec",+ "num-traits",+ "wasm-bindgen",+]++[[package]]+name = "valuable"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"++[[package]]+name = "value-bag"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0"+dependencies = [+ "value-bag-serde1",+ "value-bag-sval2",+]++[[package]]+name = "value-bag-serde1"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "16530907bfe2999a1773ca5900a65101e092c70f642f25cc23ca0c43573262c5"+dependencies = [+ "erased-serde",+ "serde_core",+ "serde_fmt",+]++[[package]]+name = "value-bag-sval2"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d00ae130edd690eaa877e4f40605d534790d1cf1d651e7685bd6a144521b251f"+dependencies = [+ "sval",+ "sval_buffer",+ "sval_dynamic",+ "sval_fmt",+ "sval_json",+ "sval_ref",+ "sval_serde",+]++[[package]]+name = "version-compare"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"++[[package]]+name = "version_check"+version = "0.9.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"++[[package]]+name = "vsimd"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"++[[package]]+name = "vswhom"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b"+dependencies = [+ "libc",+ "vswhom-sys",+]++[[package]]+name = "vswhom-sys"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150"+dependencies = [+ "cc",+ "libc",+]++[[package]]+name = "waker-fn"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7"++[[package]]+name = "walkdir"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"+dependencies = [+ "same-file",+ "winapi-util",+]++[[package]]+name = "want"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"+dependencies = [+ "try-lock",+]++[[package]]+name = "wasi"+version = "0.11.1+wasi-snapshot-preview1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"++[[package]]+name = "wasip2"+version = "1.0.4+wasi-0.2.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"+dependencies = [+ "wit-bindgen",+]++[[package]]+name = "wasm-bindgen"+version = "0.2.126"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"+dependencies = [+ "cfg-if",+ "once_cell",+ "rustversion",+ "wasm-bindgen-macro",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-futures"+version = "0.4.76"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "wasm-bindgen-macro"+version = "0.2.126"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"+dependencies = [+ "quote",+ "wasm-bindgen-macro-support",+]++[[package]]+name = "wasm-bindgen-macro-support"+version = "0.2.126"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"+dependencies = [+ "bumpalo",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-shared"+version = "0.2.126"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "wasm-streams"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"+dependencies = [+ "futures-util",+ "js-sys",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+]++[[package]]+name = "wasm-streams"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"+dependencies = [+ "futures-util",+ "js-sys",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+]++[[package]]+name = "wasm_thread"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b7516db7f32decdadb1c3b8deb1b7d78b9df7606c5cc2f6241737c2ab3a0258e"+dependencies = [+ "futures",+ "js-sys",+ "wasm-bindgen",+ "web-sys",+]++[[package]]+name = "wayland-backend"+version = "0.3.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2857dd20b54e916ec7253b3d6b4d5c4d7d4ca2c33c2e11c6c76a99bd8744755d"+dependencies = [+ "cc",+ "downcast-rs",+ "rustix 1.1.4",+ "scoped-tls",+ "smallvec",+ "wayland-sys",+]++[[package]]+name = "wayland-client"+version = "0.31.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144"+dependencies = [+ "bitflags 2.13.0",+ "rustix 1.1.4",+ "wayland-backend",+ "wayland-scanner",+]++[[package]]+name = "wayland-protocols"+version = "0.32.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6"+dependencies = [+ "bitflags 2.13.0",+ "wayland-backend",+ "wayland-client",+ "wayland-scanner",+]++[[package]]+name = "wayland-scanner"+version = "0.31.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a"+dependencies = [+ "proc-macro2",+ "quick-xml 0.39.4",+ "quote",+]++[[package]]+name = "wayland-sys"+version = "0.31.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be"+dependencies = [+ "dlib",+ "log",+ "once_cell",+ "pkg-config",+]++[[package]]+name = "web-sys"+version = "0.3.103"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "web-time"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "webpki-root-certs"+version = "0.26.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e"+dependencies = [+ "webpki-root-certs 1.0.8",+]++[[package]]+name = "webpki-root-certs"+version = "1.0.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267"+dependencies = [+ "rustls-pki-types",+]++[[package]]+name = "webpki-roots"+version = "1.0.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf"+dependencies = [+ "rustls-pki-types",+]++[[package]]+name = "weezl"+version = "0.1.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"++[[package]]+name = "wgpu"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "arrayvec",+ "bitflags 2.13.0",+ "bytemuck",+ "cfg-if",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.16.1",+ "js-sys",+ "log",+ "naga",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "smallvec",+ "static_assertions",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "wgpu-core",+ "wgpu-hal",+ "wgpu-types",+]++[[package]]+name = "wgpu-core"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "arrayvec",+ "bit-set 0.9.1",+ "bit-vec 0.9.1",+ "bitflags 2.13.0",+ "bytemuck",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.16.1",+ "indexmap 2.14.0",+ "log",+ "naga",+ "once_cell",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "rustc-hash 1.1.0",+ "smallvec",+ "thiserror 2.0.18",+ "wgpu-core-deps-apple",+ "wgpu-core-deps-emscripten",+ "wgpu-core-deps-windows-linux-android",+ "wgpu-hal",+ "wgpu-naga-bridge",+ "wgpu-types",+]++[[package]]+name = "wgpu-core-deps-apple"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-core-deps-emscripten"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-core-deps-windows-linux-android"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-hal"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "android_system_properties",+ "arrayvec",+ "ash",+ "bit-set 0.9.1",+ "bitflags 2.13.0",+ "block2 0.6.2",+ "bytemuck",+ "cfg-if",+ "cfg_aliases",+ "glow",+ "glutin_wgl_sys",+ "gpu-allocator",+ "gpu-descriptor",+ "hashbrown 0.16.1",+ "js-sys",+ "khronos-egl",+ "libc",+ "libloading 0.8.9",+ "log",+ "naga",+ "ndk-sys",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "objc2-metal 0.3.2",+ "objc2-quartz-core 0.3.2",+ "once_cell",+ "ordered-float",+ "parking_lot",+ "portable-atomic",+ "portable-atomic-util",+ "profiling",+ "range-alloc",+ "raw-window-handle",+ "raw-window-metal",+ "renderdoc-sys",+ "smallvec",+ "thiserror 2.0.18",+ "wasm-bindgen",+ "wayland-sys",+ "web-sys",+ "wgpu-naga-bridge",+ "wgpu-types",+ "windows 0.62.2",+ "windows-core 0.62.2",+ "windows-result 0.4.1",+]++[[package]]+name = "wgpu-naga-bridge"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "naga",+ "wgpu-types",+]++[[package]]+name = "wgpu-types"+version = "29.0.3"+source = "git+https://github.com/zed-industries/wgpu.git?rev=357a0c56e0070480ad9daea5d2eaa83150b79e88#357a0c56e0070480ad9daea5d2eaa83150b79e88"+dependencies = [+ "bitflags 2.13.0",+ "bytemuck",+ "js-sys",+ "log",+ "raw-window-handle",+ "web-sys",+]++[[package]]+name = "which"+version = "6.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f"+dependencies = [+ "either",+ "home",+ "rustix 0.38.44",+ "winsafe",+]++[[package]]+name = "winapi"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"+dependencies = [+ "winapi-i686-pc-windows-gnu",+ "winapi-x86_64-pc-windows-gnu",+]++[[package]]+name = "winapi-i686-pc-windows-gnu"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"++[[package]]+name = "winapi-util"+version = "0.1.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "winapi-x86_64-pc-windows-gnu"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"++[[package]]+name = "windows"+version = "0.57.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"+dependencies = [+ "windows-core 0.57.0",+ "windows-targets 0.52.6",+]++[[package]]+name = "windows"+version = "0.61.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"+dependencies = [+ "windows-collections 0.2.0",+ "windows-core 0.61.2",+ "windows-future 0.2.1",+ "windows-link 0.1.3",+ "windows-numerics 0.2.0",+]++[[package]]+name = "windows"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"+dependencies = [+ "windows-collections 0.3.2",+ "windows-core 0.62.2",+ "windows-future 0.3.2",+ "windows-numerics 0.3.1",+]++[[package]]+name = "windows-capture"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a4df73e95feddb9ec1a7e9c2ca6323b8c97d5eeeff78d28f1eccdf19c882b24"+dependencies = [+ "parking_lot",+ "rayon",+ "thiserror 2.0.18",+ "windows 0.61.3",+ "windows-future 0.2.1",+]++[[package]]+name = "windows-collections"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"+dependencies = [+ "windows-core 0.61.2",+]++[[package]]+name = "windows-collections"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"+dependencies = [+ "windows-core 0.62.2",+]++[[package]]+name = "windows-core"+version = "0.57.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"+dependencies = [+ "windows-implement 0.57.0",+ "windows-interface 0.57.0",+ "windows-result 0.1.2",+ "windows-targets 0.52.6",+]++[[package]]+name = "windows-core"+version = "0.61.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"+dependencies = [+ "windows-implement 0.60.2",+ "windows-interface 0.59.3",+ "windows-link 0.1.3",+ "windows-result 0.3.4",+ "windows-strings 0.4.2",+]++[[package]]+name = "windows-core"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"+dependencies = [+ "windows-implement 0.60.2",+ "windows-interface 0.59.3",+ "windows-link 0.2.1",+ "windows-result 0.4.1",+ "windows-strings 0.5.1",+]++[[package]]+name = "windows-future"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"+dependencies = [+ "windows-core 0.61.2",+ "windows-link 0.1.3",+ "windows-threading 0.1.0",+]++[[package]]+name = "windows-future"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"+dependencies = [+ "windows-core 0.62.2",+ "windows-link 0.2.1",+ "windows-threading 0.2.1",+]++[[package]]+name = "windows-implement"+version = "0.57.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "windows-implement"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "windows-interface"+version = "0.57.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "windows-interface"+version = "0.59.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "windows-link"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"++[[package]]+name = "windows-link"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"++[[package]]+name = "windows-numerics"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"+dependencies = [+ "windows-core 0.61.2",+ "windows-link 0.1.3",+]++[[package]]+name = "windows-numerics"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"+dependencies = [+ "windows-core 0.62.2",+ "windows-link 0.2.1",+]++[[package]]+name = "windows-registry"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"+dependencies = [+ "windows-result 0.3.4",+ "windows-strings 0.3.1",+ "windows-targets 0.53.5",+]++[[package]]+name = "windows-registry"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e"+dependencies = [+ "windows-link 0.1.3",+ "windows-result 0.3.4",+ "windows-strings 0.4.2",+]++[[package]]+name = "windows-registry"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"+dependencies = [+ "windows-link 0.2.1",+ "windows-result 0.4.1",+ "windows-strings 0.5.1",+]++[[package]]+name = "windows-result"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"+dependencies = [+ "windows-targets 0.52.6",+]++[[package]]+name = "windows-result"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-result"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-strings"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-strings"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-strings"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-sys"+version = "0.45.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"+dependencies = [+ "windows-targets 0.42.2",+]++[[package]]+name = "windows-sys"+version = "0.52.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"+dependencies = [+ "windows-targets 0.52.6",+]++[[package]]+name = "windows-sys"+version = "0.59.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"+dependencies = [+ "windows-targets 0.52.6",+]++[[package]]+name = "windows-sys"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"+dependencies = [+ "windows-targets 0.53.5",+]++[[package]]+name = "windows-sys"+version = "0.61.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-targets"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"+dependencies = [+ "windows_aarch64_gnullvm 0.42.2",+ "windows_aarch64_msvc 0.42.2",+ "windows_i686_gnu 0.42.2",+ "windows_i686_msvc 0.42.2",+ "windows_x86_64_gnu 0.42.2",+ "windows_x86_64_gnullvm 0.42.2",+ "windows_x86_64_msvc 0.42.2",+]++[[package]]+name = "windows-targets"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"+dependencies = [+ "windows_aarch64_gnullvm 0.52.6",+ "windows_aarch64_msvc 0.52.6",+ "windows_i686_gnu 0.52.6",+ "windows_i686_gnullvm 0.52.6",+ "windows_i686_msvc 0.52.6",+ "windows_x86_64_gnu 0.52.6",+ "windows_x86_64_gnullvm 0.52.6",+ "windows_x86_64_msvc 0.52.6",+]++[[package]]+name = "windows-targets"+version = "0.53.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"+dependencies = [+ "windows-link 0.2.1",+ "windows_aarch64_gnullvm 0.53.1",+ "windows_aarch64_msvc 0.53.1",+ "windows_i686_gnu 0.53.1",+ "windows_i686_gnullvm 0.53.1",+ "windows_i686_msvc 0.53.1",+ "windows_x86_64_gnu 0.53.1",+ "windows_x86_64_gnullvm 0.53.1",+ "windows_x86_64_msvc 0.53.1",+]++[[package]]+name = "windows-threading"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-threading"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"++[[package]]+name = "windows_aarch64_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"++[[package]]+name = "windows_aarch64_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"++[[package]]+name = "windows_aarch64_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"++[[package]]+name = "windows_i686_gnu"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"++[[package]]+name = "windows_i686_gnu"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"++[[package]]+name = "windows_i686_gnu"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"++[[package]]+name = "windows_i686_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"++[[package]]+name = "windows_i686_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"++[[package]]+name = "windows_i686_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"++[[package]]+name = "windows_i686_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"++[[package]]+name = "windows_i686_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"++[[package]]+name = "windows_x86_64_gnu"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"++[[package]]+name = "windows_x86_64_gnu"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"++[[package]]+name = "windows_x86_64_gnu"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"++[[package]]+name = "windows_x86_64_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"++[[package]]+name = "windows_x86_64_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"++[[package]]+name = "windows_x86_64_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"++[[package]]+name = "winnow"+version = "0.5.40"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"+dependencies = [+ "memchr",+]++[[package]]+name = "winnow"+version = "0.7.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"+dependencies = [+ "memchr",+]++[[package]]+name = "winnow"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1"+dependencies = [+ "memchr",+]++[[package]]+name = "winreg"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"+dependencies = [+ "winapi",+]++[[package]]+name = "winreg"+version = "0.55.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97"+dependencies = [+ "cfg-if",+ "windows-sys 0.59.0",+]++[[package]]+name = "winsafe"+version = "0.0.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"++[[package]]+name = "wio"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"+dependencies = [+ "winapi",+]++[[package]]+name = "wit-bindgen"+version = "0.57.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"++[[package]]+name = "writeable"+version = "0.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"++[[package]]+name = "x11"+version = "2.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"+dependencies = [+ "libc",+ "pkg-config",+]++[[package]]+name = "xcb"+version = "1.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee4c580d8205abb0a5cf4eb7e927bd664e425b6c3263f9c5310583da96970cf6"+dependencies = [+ "bitflags 1.3.2",+ "libc",+ "quick-xml 0.30.0",+ "x11",+]++[[package]]+name = "xml-rs"+version = "0.8.28"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f"++[[package]]+name = "xmlwriter"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"++[[package]]+name = "xxhash-rust"+version = "0.8.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4d93c89cdc2d3a63c3ec48ffe926931bdc069eafa8e4402fe6d8f790c9d1e576"++[[package]]+name = "y4m"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448"++[[package]]+name = "yazi"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"++[[package]]+name = "yeslogic-fontconfig-sys"+version = "6.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76"+dependencies = [+ "dlib",+ "once_cell",+ "pkg-config",+]++[[package]]+name = "yoke"+version = "0.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"+dependencies = [+ "stable_deref_trait",+ "yoke-derive",+ "zerofrom",+]++[[package]]+name = "yoke-derive"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "synstructure",+]++[[package]]+name = "zbus"+version = "5.16.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eee682d202a77e4a9f3b2c2bdf48a7b28af5c08c34ddf66f98c93e5e39464285"+dependencies = [+ "async-broadcast",+ "async-executor",+ "async-io",+ "async-lock",+ "async-process",+ "async-recursion",+ "async-task",+ "async-trait",+ "blocking",+ "enumflags2",+ "event-listener",+ "futures-core",+ "futures-lite",+ "hex",+ "libc",+ "ordered-stream",+ "rustix 1.1.4",+ "serde",+ "serde_repr",+ "tracing",+ "uds_windows",+ "uuid",+ "windows-sys 0.61.2",+ "winnow 1.0.3",+ "zbus_macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zbus-lockstep"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863"+dependencies = [+ "zbus_xml",+ "zvariant",+]++[[package]]+name = "zbus-lockstep-macros"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "zbus-lockstep",+ "zbus_xml",+ "zvariant",+]++[[package]]+name = "zbus_macros"+version = "5.16.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "adf1bd45a81a103745b1757754762a26e8cd01e4532e4d6c8ec431624b80d1d6"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "zbus_names",+ "zvariant",+ "zvariant_utils",+]++[[package]]+name = "zbus_names"+version = "4.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d"+dependencies = [+ "serde",+ "winnow 1.0.3",+ "zvariant",+]++[[package]]+name = "zbus_xml"+version = "5.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8067892e940ed1727dea64690378601603b31d62dfde019a5335fbb7c0e0ed9"+dependencies = [+ "quick-xml 0.39.4",+ "serde",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zed-font-kit"+version = "0.14.1-zed"+source = "git+https://github.com/zed-industries/font-kit?rev=94b0f28166665e8fd2f53ff6d268a14955c82269#94b0f28166665e8fd2f53ff6d268a14955c82269"+dependencies = [+ "bitflags 2.13.0",+ "byteorder",+ "core-foundation 0.10.0",+ "core-graphics 0.24.0",+ "core-text",+ "dirs 6.0.0",+ "dwrote",+ "float-ord",+ "freetype-sys",+ "lazy_static",+ "libc",+ "log",+ "pathfinder_geometry",+ "pathfinder_simd",+ "walkdir",+ "winapi",+ "yeslogic-fontconfig-sys",+]++[[package]]+name = "zed-reqwest"+version = "0.12.15-zed"+source = "git+https://github.com/zed-industries/reqwest.git?rev=c15662463bda39148ba154100dd44d3fba5873a4#c15662463bda39148ba154100dd44d3fba5873a4"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "encoding_rs",+ "futures-core",+ "futures-util",+ "h2",+ "http",+ "http-body",+ "http-body-util",+ "hyper",+ "hyper-rustls",+ "hyper-util",+ "ipnet",+ "js-sys",+ "log",+ "mime",+ "mime_guess",+ "once_cell",+ "percent-encoding",+ "pin-project-lite",+ "quinn",+ "rustls",+ "rustls-native-certs",+ "rustls-pemfile",+ "rustls-pki-types",+ "serde",+ "serde_json",+ "serde_urlencoded",+ "sync_wrapper",+ "system-configuration 0.6.1",+ "tokio",+ "tokio-rustls",+ "tokio-socks",+ "tokio-util",+ "tower",+ "tower-service",+ "url",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wasm-streams 0.4.2",+ "web-sys",+ "windows-registry 0.4.0",+]++[[package]]+name = "zed-scap"+version = "0.0.8-zed"+source = "git+https://github.com/zed-industries/scap?rev=4afea48c3b002197176fb19cd0f9b180dd36eaac#4afea48c3b002197176fb19cd0f9b180dd36eaac"+dependencies = [+ "anyhow",+ "cocoa 0.25.0",+ "core-graphics-helmer-fork",+ "log",+ "objc",+ "rand 0.8.6",+ "screencapturekit",+ "screencapturekit-sys",+ "sysinfo 0.31.4",+ "tao-core-video-sys",+ "windows 0.61.3",+ "windows-capture",+ "x11",+ "xcb",+]++[[package]]+name = "zeno"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"++[[package]]+name = "zerocopy"+version = "0.8.52"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f"+dependencies = [+ "zerocopy-derive",+]++[[package]]+name = "zerocopy-derive"+version = "0.8.52"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "zerofrom"+version = "0.1.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"+dependencies = [+ "zerofrom-derive",+]++[[package]]+name = "zerofrom-derive"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "synstructure",+]++[[package]]+name = "zeroize"+version = "1.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"+dependencies = [+ "zeroize_derive",+]++[[package]]+name = "zeroize_derive"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "zerotrie"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"+dependencies = [+ "displaydoc",+ "yoke",+ "zerofrom",+]++[[package]]+name = "zerovec"+version = "0.11.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"+dependencies = [+ "yoke",+ "zerofrom",+ "zerovec-derive",+]++[[package]]+name = "zerovec-derive"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.118",+]++[[package]]+name = "zip"+version = "2.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50"+dependencies = [+ "arbitrary",+ "crc32fast",+ "crossbeam-utils",+ "displaydoc",+ "flate2",+ "indexmap 2.14.0",+ "memchr",+ "thiserror 2.0.18",+ "zopfli",+]++[[package]]+name = "zlog"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "anyhow",+ "chrono",+ "collections",+ "log",+]++[[package]]+name = "zmij"+version = "1.0.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"++[[package]]+name = "zopfli"+version = "0.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"+dependencies = [+ "bumpalo",+ "crc32fast",+ "log",+ "simd-adler32",+]++[[package]]+name = "ztracing"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"+dependencies = [+ "tracing",+ "tracing-subscriber",+ "zlog",+ "ztracing_macro",+]++[[package]]+name = "ztracing_macro"+version = "0.1.0"+source = "git+https://github.com/zed-industries/zed.git?rev=d655580d9b9beb34949e1902c1d6ebeba740e972#d655580d9b9beb34949e1902c1d6ebeba740e972"++[[package]]+name = "zune-core"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"++[[package]]+name = "zune-inflate"+version = "0.2.54"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"+dependencies = [+ "simd-adler32",+]++[[package]]+name = "zune-jpeg"+version = "0.5.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296"+dependencies = [+ "zune-core",+]++[[package]]+name = "zvariant"+version = "5.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a192a0bde63360d77a7523c833d4b4ce6070a927e2c53246e4c540b1a3e27be0"+dependencies = [+ "endi",+ "enumflags2",+ "serde",+ "serde_bytes",+ "url",+ "winnow 1.0.3",+ "zvariant_derive",+ "zvariant_utils",+]++[[package]]+name = "zvariant_derive"+version = "5.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "90bc6cde9c01c511074be97f7ccb6c19d0da89e3f8662e812e999dcfd4638737"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.118",+ "zvariant_utils",+]++[[package]]+name = "zvariant_utils"+version = "3.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e8535915cfa75547e559d8c68e8139909a4aeee076831e4ef7fc59d8172c4d6"+dependencies = [+ "proc-macro2",+ "quote",+ "serde",+ "syn 2.0.118",+ "winnow 1.0.3",+]diff --git a/apps/mirai/Cargo.toml b/apps/mirai/Cargo.tomlnew file mode 100644index 000000000..257b2d429--- /dev/null+++ b/apps/mirai/Cargo.toml@@ -0,0 +1,31 @@+# Standalone workspace for the Mirai GPUI app (lives under `apps/`, alongside+# the Swift `apps/playground`).+#+# Intentionally NOT a member of the uzu workspace at the repo root. GPUI resolves+# dozens of `*.workspace = true` deps against Zed's workspace and relies on a+# `[patch.crates-io]` override that only applies from the workspace root cargo is+# invoked from. A dedicated workspace here keeps those Zed-specific patches out of+# the published uzu engine's workspace.+[workspace]+members = ["mirai-app", "ui-kit"]+resolver = "3"++# GPUI + platform entry point + Tokio bridge + HTTP client, pinned to an upstream+# Zed commit via git so the build needs no local Zed checkout.+[workspace.dependencies]+gpui = { git = "https://github.com/zed-industries/zed.git", rev = "d655580d9b9beb34949e1902c1d6ebeba740e972" }+gpui_platform = { git = "https://github.com/zed-industries/zed.git", rev = "d655580d9b9beb34949e1902c1d6ebeba740e972" }+gpui_tokio = { git = "https://github.com/zed-industries/zed.git", rev = "d655580d9b9beb34949e1902c1d6ebeba740e972" }+reqwest_client = { git = "https://github.com/zed-industries/zed.git", rev = "d655580d9b9beb34949e1902c1d6ebeba740e972" }++# Replicated from Zed's [patch.crates-io] at that rev. GPUI's executor depends on+# these specific revisions of async-task/async-process. Other entries in Zed's+# table (livekit, calloop, notify, windows-capture) are for crates we don't pull.+[patch.crates-io]+async-process = { git = "https://github.com/zed-industries/async-process.git", rev = "0b6d6713570af61806e1e5cb40e0f757cb93fd9d" }+async-task = { git = "https://github.com/smol-rs/async-task.git", rev = "b4486cd71e4e94fbda54ce6302444de14f4d190e" }++# Build scripts (uzu's Metal kernel compiler, gpui's shader/bindgen scripts) and+# proc-macros are painfully slow at opt-level 0.+[profile.dev.build-override]+opt-level = 3diff --git a/apps/mirai/mirai-app/Cargo.toml b/apps/mirai/mirai-app/Cargo.tomlnew file mode 100644index 000000000..ca584f59d--- /dev/null+++ b/apps/mirai/mirai-app/Cargo.toml@@ -0,0 +1,47 @@+[package]+name = "mirai-app"+version = "0.1.0"+edition = "2024"+publish = false++[[bin]]+name = "mirai-app"+path = "src/main.rs"++[dependencies]+# Local LLM inference engine (this repo). Metal backend only for now; grammar /+# structured-output (capability-grammar, a heavy C++ xgrammar build) is added+# later when needed.+uzu = { path = "../../../crates/uzu", default-features = false, features = ["backend-metal"] }++# GPUI UI framework + platform entry point + Tokio bridge, pinned to an upstream+# Zed commit (see workspace.dependencies). `font-kit` on gpui_platform is required+# for glyph rasterization.+gpui = { workspace = true }+gpui_platform = { workspace = true, features = ["font-kit"] }+gpui_tokio = { workspace = true }+# HTTP client for loading remote provider-icon images via gpui's image cache.+reqwest_client = { workspace = true }++# Mirai design system (theme + reusable components), mirroring the structure of+# @trymirai-schemas/ui-kit. The app builds its UI from this crate.+ui-kit = { path = "../ui-kit" }++futures = "0.3"+anyhow = "1"+serde = { version = "1", features = ["derive"] }+serde_json = "1"+dirs = "6"+zip = { version = "2", default-features = false, features = ["deflate"] }+rfd = "0.15"+hound = "3.5.1"+reqwest = { version = "0.13.2", features = ["json"] }+# Embeds `assets/` (SVG icons) into the release binary so the shipped `.app`+# bundle is self-contained; reads from disk in debug builds for live reload.+rust-embed = "8"+# "Run on startup" — registers the bundled `.app` as a macOS login item.+auto-launch = "0.5"+# "Show in menu bar" — NSStatusItem + menu (GPUI has no status-item API).+tray-icon = "0.19"+# Decode the embedded menu-bar PNG to RGBA for the tray icon.+image = { version = "0.25", default-features = false, features = ["png"] }diff --git a/apps/mirai/mirai-app/TODO.md b/apps/mirai/mirai-app/TODO.mdnew file mode 100644index 000000000..2cb054514--- /dev/null+++ b/apps/mirai/mirai-app/TODO.md@@ -0,0 +1,86 @@+# mirai-app (GPUI) — what's left to implement++Status: core AI features run (chat, cloud, routers, TTS, model management, history,+settings, welcome). Settings UI matches mirai-chat for General / Privacy / About.+Offscreen snapshot suite is green (14 screens + logic/unit tests).++## Verification++- **Automated (headless):** `cargo test -p mirai-app -p ui-kit` from `app/` — logic+ snapshots, chat request helpers, markdown golden output, 14 UI PNG baselines+ (5 engine snapshots via `cargo test -p mirai-app -- --ignored`).+- **Manual:** live chat streaming, classify, TTS audio playback, light mode, pixel+ parity vs Electron (different rasterizer — compare layout, not raw pixels).++## Settings — done vs remaining++| Item | Status |+|------|--------|+| Inner sidebar (General / Privacy / About Mirai) | ✅ |+| Instructions card, OS prefs, reasoning, auto-eject UI | ✅ |+| Privacy export chats (zip + save dialog) | ✅ |+| Privacy export logs | ✅ |+| Clear data modal (dialogs / audio / models / logs) | ✅ |+| Share usage data toggle (persists, no telemetry backend) | preference only |+| Run on startup / menu bar / global shortcut | preference only — needs macOS hooks |+| Auto-eject idle timer | preference only — needs engine unload API |++## Chat++- ✅ Markdown rendering (bold/italic/code/links, lists, headings, blockquotes, code blocks + copy)+- ✅ Message versions + regenerate pager+- ✅ Model picker, generation settings (temperature, max tokens, sampling modes)+- ✅ Multiline composer (Shift+Enter)+- **P2** ~~Title generation via LLM~~ (after first reply; vendor fallbacks)+- **P2** ~~Session reuse / context caching~~ (reuse loaded session; reset + full history each turn)+- **P3** File attachments, streaming shimmer, empty-state suggestions++## Chats / History++- ✅ Sidebar recent chats, search, bulk delete, global instructions card+- ✅ Markdown chat-file interop (`.md` mirror on save; load JSON or markdown)+- **P2** ~~Rename chat modal~~ (selection mode, single chat)+- **P3** Export all chats from Chats page (Settings export exists)++## Local Models++- ✅ Family list → detail, vendor icons, download/delete, Mirai quant styling+- **P2** ~~Sort dropdown, device header + recommended model row~~+- **P3** Quantization / thinking badges on detail++## Cloud Models++- ✅ Runtime API-key entry (Connect providers UI, keychain persist, hot registry reload)+- **P3** Additional vendor polish++## Routers / TTS++- ✅ Screens + engine integration (basic)+- ⛔ TTS generation settings blocked by uzu API (no config struct on synthesize)+- ✅ TTS generated-audio history (persist + replay)+- **P2** Reference-voice recording, playback scrubber++## App shell++- ✅ Footer model indicator + Eject (UI deselect; no GPU unload in uzu yet)+- **P2** Window drag region on title bar+- **P3** Sidebar collapse, Apps placeholder++## Engine / inference++- ✅ Temperature + max-tokens + stochastic/argmax modes+- **P2** top-p / top-k / repetition-penalty / seed+- **P2** Single-resident-session eviction across chat/router/tts+- **P3** Structured output / grammar UI++## System integration (deferred)++- **P2** Global quick-entry shortcut capture, login item, menu-bar agent+- **P3** Auto-update, analytics, Sentry, Google auth (likely N/A for native rebuild)++## Design / polish++- **P2** Animations, thin scrollbars, 0.5px border pass+- **P3** Full Mirai wordmark asset bundle++See [TESTING.md](TESTING.md) for the three-layer verification strategy.diff --git a/apps/mirai/mirai-app/assets/icons/apps.svg b/apps/mirai/mirai-app/assets/icons/apps.svgnew file mode 100644index 000000000..850408faf--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/apps.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">+ <path+ d="M4.5 7.25C4.5 6.52065 4.78973 5.82118 5.30546 5.30546C5.82118 4.78973 6.52065 4.5 7.25 4.5H12.75C13.4793 4.5 14.1788 4.78973 14.6945 5.30546C15.2103 5.82118 15.5 6.52065 15.5 7.25V12.75C15.5 13.4793 15.2103 14.1788 14.6945 14.6945C14.1788 15.2103 13.4793 15.5 12.75 15.5H7.25C6.52065 15.5 5.82118 15.2103 5.30546 14.6945C4.78973 14.1788 4.5 13.4793 4.5 12.75V7.25Z"+ stroke="currentColor"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/chats.svg b/apps/mirai/mirai-app/assets/icons/chats.svgnew file mode 100644index 000000000..f6b81ef5e--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/chats.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">+ <path+ d="M13.8681 13.5282C13.8681 13.5282 13.9195 13.4916 14.0015 13.4289C15.2301 12.4789 16.0015 11.1022 16.0015 9.56955C16.0015 6.71222 13.3148 4.39355 10.0015 4.39355C6.68813 4.39355 4.00146 6.71222 4.00146 9.56955C4.00146 12.4282 6.68813 14.6669 10.0015 14.6669C10.2841 14.6669 10.7481 14.6482 11.3935 14.6109C12.2348 15.1576 13.4628 15.6062 14.5375 15.6062C14.8701 15.6062 15.0268 15.3329 14.8135 15.0542C14.4895 14.6569 14.0428 14.0202 13.8695 13.5276L13.8681 13.5282Z"+ stroke="currentColor"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/check.svg b/apps/mirai/mirai-app/assets/icons/check.svgnew file mode 100644index 000000000..463b7c882--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/check.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M20 6 9 17l-5-5" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/chevron-down.svg b/apps/mirai/mirai-app/assets/icons/chevron-down.svgnew file mode 100644index 000000000..a23735c65--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/chevron-down.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="m6 9 6 6 6-6" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/chevron-left.svg b/apps/mirai/mirai-app/assets/icons/chevron-left.svgnew file mode 100644index 000000000..32b34b020--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/chevron-left.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"/></svg>diff --git a/apps/mirai/mirai-app/assets/icons/chevron-right.svg b/apps/mirai/mirai-app/assets/icons/chevron-right.svgnew file mode 100644index 000000000..efa5b663d--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/chevron-right.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="m9 18 6-6-6-6" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/chevron-up.svg b/apps/mirai/mirai-app/assets/icons/chevron-up.svgnew file mode 100644index 000000000..5a670076d--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/chevron-up.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="m6 15 6-6 6 6" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/close.svg b/apps/mirai/mirai-app/assets/icons/close.svgnew file mode 100644index 000000000..8bc50aba0--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/close.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M18 6 6 18M6 6l12 12" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/copy.svg b/apps/mirai/mirai-app/assets/icons/copy.svgnew file mode 100644index 000000000..79dad1c24--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/copy.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/devices.svg b/apps/mirai/mirai-app/assets/icons/devices.svgnew file mode 100644index 000000000..7567d03d9--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/devices.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M13 9a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1v-10z" />+ <path d="M18 8v-3a1 1 0 0 0 -1 -1h-13a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h9" />+ <path d="M16 9h2" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/discord.svg b/apps/mirai/mirai-app/assets/icons/discord.svgnew file mode 100644index 000000000..0a34ddc95--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/discord.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 15" fill="currentColor"><path d="M15.3202 1.6725C14.1495 1.12475 12.8977 0.72667 11.589 0.5C11.4283 0.790583 11.2405 1.18142 11.1111 1.49234C9.71987 1.28312 8.34148 1.28312 6.97588 1.49234C6.84644 1.18142 6.6544 0.790583 6.49224 0.5C5.18213 0.72667 3.92891 1.12621 2.7582 1.6754C0.39686 5.24369 -0.243259 8.72334 0.0768009 12.1536C1.64296 13.3232 3.16076 14.0336 4.65295 14.4986C5.02138 13.9915 5.34997 13.4525 5.63304 12.8844C5.09392 12.6795 4.57756 12.4267 4.08966 12.1333C4.21909 12.0374 4.34571 11.9371 4.46803 11.834C7.44387 13.2258 10.6772 13.2258 13.6175 11.834C13.7412 11.9371 13.8678 12.0374 13.9959 12.1333C13.5065 12.4282 12.9887 12.681 12.4496 12.8859C12.7327 13.4525 13.0599 13.993 13.4297 14.5C14.9233 14.0351 16.4425 13.3246 18.0087 12.1536C18.3843 8.17706 17.3672 4.72936 15.3202 1.6725ZM6.03846 10.044C5.14514 10.044 4.41254 9.21005 4.41254 8.19449C4.41254 7.17892 5.12949 6.34352 6.03846 6.34352C6.94744 6.34352 7.68001 7.17746 7.66437 8.19449C7.66578 9.21005 6.94744 10.044 6.03846 10.044ZM12.0471 10.044C11.1537 10.044 10.4212 9.21005 10.4212 8.19449C10.4212 7.17892 11.1381 6.34352 12.0471 6.34352C12.956 6.34352 13.6886 7.17746 13.673 8.19449C13.673 9.21005 12.956 10.044 12.0471 10.044Z"/></svg>diff --git a/apps/mirai/mirai-app/assets/icons/download.svg b/apps/mirai/mirai-app/assets/icons/download.svgnew file mode 100644index 000000000..0d9387e54--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/download.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />+ <path d="M7 10l5 5 5-5" />+ <path d="M12 15V3" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/eject.svg b/apps/mirai/mirai-app/assets/icons/eject.svgnew file mode 100644index 000000000..98537807e--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/eject.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 8" fill="none">+ <path d="M0 4H7L3.5 0L0 4Z" fill="currentColor" />+ <path+ d="M0 6.5C0 6.36739 0.0526785 6.24021 0.146447 6.14645C0.240215 6.05268 0.367392 6 0.5 6H6.5C6.63261 6 6.75979 6.05268 6.85355 6.14645C6.94732 6.24021 7 6.36739 7 6.5V7.5C7 7.63261 6.94732 7.75979 6.85355 7.85355C6.75979 7.94732 6.63261 8 6.5 8H0.5C0.367392 8 0.240215 7.94732 0.146447 7.85355C0.0526785 7.75979 0 7.63261 0 7.5V6.5Z"+ fill="currentColor"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/github.svg b/apps/mirai/mirai-app/assets/icons/github.svgnew file mode 100644index 000000000..adba29a49--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/github.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.33987 0.5C3.91242 0.5 0.333252 4.16665 0.333252 8.7028C0.333252 12.3288 2.62655 15.3981 5.80795 16.4844C6.20571 16.5661 6.35141 16.3079 6.35141 16.0908C6.35141 15.9006 6.3383 15.2488 6.3383 14.5696C4.11105 15.0586 3.64725 13.5918 3.64725 13.5918C3.28931 12.6411 2.75897 12.3968 2.75897 12.3968C2.02999 11.8943 2.81207 11.8943 2.81207 11.8943C3.6207 11.9486 4.045 12.7363 4.045 12.7363C4.76071 13.9856 5.91399 13.6326 6.37796 13.4153C6.44417 12.8856 6.65641 12.5189 6.88175 12.3153C5.10536 12.1251 3.23638 11.419 3.23638 8.26813C3.23638 7.3718 3.55432 6.63847 4.05812 6.06814C3.97863 5.86448 3.70018 5.02231 4.13776 3.89515C4.13776 3.89515 4.81381 3.67782 6.33813 4.73715C6.99075 4.55759 7.66379 4.46625 8.33987 4.46548C9.01591 4.46548 9.70506 4.56065 10.3414 4.73715C11.8659 3.67782 12.542 3.89515 12.542 3.89515C12.9796 5.02231 12.7009 5.86448 12.6215 6.06814C13.1385 6.63847 13.4434 7.3718 13.4434 8.26813C13.4434 11.419 11.5744 12.1115 9.78471 12.3153C10.0764 12.5733 10.3282 13.0621 10.3282 13.8363C10.3282 14.9363 10.3151 15.8191 10.3151 16.0906C10.3151 16.3079 10.4609 16.5661 10.8585 16.4846C14.0399 15.3979 16.3332 12.3288 16.3332 8.7028C16.3463 4.16665 12.7541 0.5 8.33987 0.5Z"/></svg>diff --git a/apps/mirai/mirai-app/assets/icons/heart.svg b/apps/mirai/mirai-app/assets/icons/heart.svgnew file mode 100644index 000000000..4db07fba3--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/heart.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/lightning.svg b/apps/mirai/mirai-app/assets/icons/lightning.svgnew file mode 100644index 000000000..72235e4d8--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/lightning.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 15" fill="none">+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"+ d="M7.81546 1.13128C8.053 1.2344 8.19413 1.48177 8.16201 1.73873L7.66063 5.74971H12.2498C12.4762 5.74971 12.6821 5.88064 12.7781 6.08562C12.8741 6.29059 12.8429 6.5326 12.698 6.70648L6.86464 13.7065C6.69886 13.9054 6.42177 13.9712 6.18423 13.8681C5.94669 13.765 5.80556 13.5176 5.83768 13.2607L6.33905 9.24971H1.74984C1.5235 9.24971 1.31759 9.11877 1.22158 8.9138C1.12558 8.70882 1.15681 8.46681 1.30172 8.29293L7.13505 1.29293C7.30083 1.094 7.57791 1.02817 7.81546 1.13128ZM2.99529 8.08304H6.99984C7.16716 8.08304 7.32643 8.15489 7.43716 8.28032C7.54789 8.40576 7.59943 8.5727 7.57867 8.73873L7.24213 11.4311L11.0044 6.91637H6.99984C6.83253 6.91637 6.67326 6.84453 6.56253 6.71909C6.4518 6.59366 6.40026 6.42671 6.42102 6.26069L6.75756 3.56831L2.99529 8.08304Z"+ fill="currentColor"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/lock.svg b/apps/mirai/mirai-app/assets/icons/lock.svgnew file mode 100644index 000000000..4cad9cd92--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/lock.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <rect x="3" y="11" width="18" height="11" rx="2" ry="2" />+ <path d="M7 11V7a5 5 0 0 1 10 0v4" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/logo.svg b/apps/mirai/mirai-app/assets/icons/logo.svgnew file mode 100644index 000000000..ad21a2451--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/logo.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66 57" fill="none">+ <path+ d="M10.1444 17.0774V36.9292C10.1444 37.3422 10.2067 37.6654 10.3313 37.8989C10.4737 38.1144 10.6962 38.267 10.9989 38.3568L12.2539 38.5992C12.6099 38.7429 12.7879 38.9763 12.7879 39.2995C12.7879 39.7664 12.5298 39.9999 12.0136 39.9999H2.988C2.73878 39.9999 2.54296 39.937 2.40054 39.8113C2.25813 39.6856 2.18692 39.515 2.18692 39.2995C2.18692 39.12 2.23142 38.9673 2.32043 38.8416C2.42725 38.7159 2.57856 38.6082 2.77438 38.5184L4.08282 38.276C4.38545 38.1862 4.59908 38.0425 4.72369 37.845C4.8483 37.6475 4.91061 37.3512 4.91061 36.9561V20.606C4.91061 20.2828 4.8572 20.0494 4.75039 19.9057C4.66138 19.762 4.50116 19.6633 4.26974 19.6094L2.58746 19.5825C2.39164 19.5106 2.24033 19.4209 2.13351 19.3131C2.0445 19.2054 2 19.0707 2 18.9091C2 18.7295 2.06231 18.5769 2.18692 18.4512C2.31153 18.3075 2.51625 18.1908 2.80108 18.101L7.92803 16.4848C8.30187 16.3412 8.5867 16.2514 8.78252 16.2155C8.97834 16.1796 9.16526 16.1616 9.34328 16.1616C9.61031 16.1616 9.80613 16.2514 9.93074 16.431C10.0732 16.5926 10.1444 16.8081 10.1444 17.0774ZM9.61031 22.5185L8.88933 21.6835L9.87733 20.7138C11.6041 18.9899 13.1885 17.7778 14.6304 17.0774C16.0902 16.3591 17.4876 16 18.8228 16C20.6742 16 22.1784 16.6016 23.3356 17.8047C24.4927 18.9899 25.0712 20.7497 25.0712 23.0841V36.9022C25.0712 37.3512 25.1336 37.6924 25.2582 37.9258C25.4006 38.1413 25.632 38.2939 25.9524 38.3837L27.0473 38.5992C27.3855 38.7608 27.5546 38.9943 27.5546 39.2995C27.5546 39.7664 27.2876 39.9999 26.7535 39.9999H17.9149C17.4164 39.9999 17.1672 39.7664 17.1672 39.2995C17.1672 38.9763 17.3452 38.7429 17.7013 38.5992L18.9296 38.3568C19.3034 38.249 19.5438 38.0784 19.6506 37.845C19.7752 37.5936 19.8375 37.2344 19.8375 36.7676V24.0538C19.8375 22.4556 19.4547 21.2435 18.6893 20.4175C17.9416 19.5914 16.9625 19.1784 15.752 19.1784C14.9153 19.1784 14.0608 19.376 13.1885 19.771C12.3162 20.1481 11.4172 20.7856 10.4915 21.6835L9.61031 22.5185ZM24.4037 22.3569L23.6827 21.5488L24.644 20.5522C26.175 18.936 27.5724 17.7778 28.8363 17.0774C30.1003 16.3591 31.3731 16 32.6548 16C34.4172 16 35.7969 16.5746 36.7938 17.7239C37.8085 18.8552 38.4583 20.5342 38.7431 22.7609L40.6123 36.8753C40.6657 37.3242 40.7547 37.6564 40.8793 37.8719C41.0217 38.0874 41.2443 38.2401 41.5469 38.3298L42.7285 38.6087C42.9065 38.6985 42.9265 38.7429 43.0155 38.8686C43.1223 38.9763 43.1758 39.12 43.1758 39.2995C43.1758 39.515 43.1045 39.6856 42.9621 39.8113C42.8375 39.937 42.6417 39.9999 42.3747 39.9999H33.3491C32.8507 39.9999 32.6014 39.7664 32.6014 39.2995C32.6014 38.9943 32.7795 38.7608 33.1355 38.5992L34.3638 38.3568C34.7377 38.267 34.9958 38.0964 35.1382 37.845C35.2984 37.5936 35.3518 37.2434 35.2984 36.7945L33.5894 24.0808C33.3758 22.4467 32.9575 21.2256 32.3344 20.4175C31.7113 19.5914 30.8213 19.1784 29.6641 19.1784C28.9699 19.1784 28.2667 19.367 27.5546 19.7441C26.8603 20.1032 26.0949 20.6868 25.2582 21.4949L24.4037 22.3569Z"+ fill="currentColor"+ />+ <path+ d="M43.4962 20.2155C43.0693 19.7855 43.0693 19.0883 43.4962 18.6583L45.8151 16.3225C46.242 15.8925 46.9341 15.8925 47.361 16.3225L49.6799 18.6583C50.1068 19.0883 50.1068 19.7855 49.6799 20.2155L47.361 22.5512C46.9341 22.9812 46.242 22.9812 45.8151 22.5512L43.4962 20.2155Z"+ fill="currentColor"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/model-menu.svg b/apps/mirai/mirai-app/assets/icons/model-menu.svgnew file mode 100644index 000000000..145b48d47--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/model-menu.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" fill="none">+ <path+ d="M10.9092 9.96376C12.3137 9.54601 13.2364 8.83503 13.2364 8.02747C13.2364 6.74165 10.8917 5.7002 8.00008 5.7002C5.10845 5.7002 2.76372 6.74165 2.76372 8.02747C2.76372 9.31329 5.10845 10.3547 8.00008 10.3547M8.00008 10.3547L6.25463 8.60929M8.00008 10.3547L6.25463 12.1002"+ stroke="currentColor"+ stroke-width="1.2"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/models.svg b/apps/mirai/mirai-app/assets/icons/models.svgnew file mode 100644index 000000000..0e70b03ca--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/models.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">+ <path+ d="M6.41667 7.33366L3.75 10.0003L6.41667 12.667M13.0833 7.33366L15.75 10.0003L13.0833 12.667M11.0833 4.66699L8.41667 15.3337"+ stroke="currentColor"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/pause.svg b/apps/mirai/mirai-app/assets/icons/pause.svgnew file mode 100644index 000000000..996160336--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/pause.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <line x1="9" y1="4" x2="9" y2="20" />+ <line x1="15" y1="4" x2="15" y2="20" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/performance.svg b/apps/mirai/mirai-app/assets/icons/performance.svgnew file mode 100644index 000000000..ae462fbe5--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/performance.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 8" fill="none">+ <path+ d="M1.97777 5.9998L5.44444 1.95536L8.33333 4.84425L11.2222 1.37758M7.75555 4.84425C7.75555 4.99749 7.81642 5.14445 7.92478 5.2528C8.03313 5.36115 8.18009 5.42203 8.33333 5.42203C8.48656 5.42203 8.63352 5.36115 8.74188 5.2528C8.85023 5.14445 8.91111 4.99749 8.91111 4.84425C8.91111 4.69101 8.85023 4.54405 8.74188 4.4357C8.63352 4.32734 8.48656 4.26647 8.33333 4.26647C8.18009 4.26647 8.03313 4.32734 7.92478 4.4357C7.81642 4.54405 7.75555 4.69101 7.75555 4.84425ZM4.86666 1.95536C4.86666 2.1086 4.92753 2.25556 5.03589 2.36391C5.14424 2.47227 5.2912 2.53314 5.44444 2.53314C5.59767 2.53314 5.74463 2.47227 5.85299 2.36391C5.96134 2.25556 6.02222 2.1086 6.02222 1.95536C6.02222 1.80212 5.96134 1.65516 5.85299 1.54681C5.74463 1.43846 5.59767 1.37758 5.44444 1.37758C5.2912 1.37758 5.14424 1.43846 5.03589 1.54681C4.92753 1.65516 4.86666 1.80212 4.86666 1.95536ZM1.39999 5.9998C1.39999 6.15304 1.46087 6.3 1.56922 6.40836C1.67758 6.51671 1.82454 6.57758 1.97777 6.57758C2.13101 6.57758 2.27797 6.51671 2.38632 6.40836C2.49468 6.3 2.55555 6.15304 2.55555 5.9998C2.55555 5.84657 2.49468 5.69961 2.38632 5.59125C2.27797 5.4829 2.13101 5.42203 1.97777 5.42203C1.82454 5.42203 1.67758 5.4829 1.56922 5.59125C1.46087 5.69961 1.39999 5.84657 1.39999 5.9998ZM10.6444 1.37758C10.6444 1.53082 10.7053 1.67778 10.8137 1.78613C10.922 1.89449 11.069 1.95536 11.2222 1.95536C11.3755 1.95536 11.5224 1.89449 11.6308 1.78613C11.7391 1.67778 11.8 1.53082 11.8 1.37758C11.8 1.22435 11.7391 1.07739 11.6308 0.969032C11.5224 0.860678 11.3755 0.799805 11.2222 0.799805C11.069 0.799805 10.922 0.860678 10.8137 0.969032C10.7053 1.07739 10.6444 1.22435 10.6444 1.37758Z"+ stroke="currentColor"+ stroke-width="1.2"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/plus.svg b/apps/mirai/mirai-app/assets/icons/plus.svgnew file mode 100644index 000000000..c24eaa063--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/plus.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 5v14M5 12h14" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/rename.svg b/apps/mirai/mirai-app/assets/icons/rename.svgnew file mode 100644index 000000000..252423c77--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/rename.svg@@ -0,0 +1,16 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none">+ <path+ d="M7.33329 2.66602H5.86663C4.74652 2.66602 4.18647 2.66602 3.75865 2.884C3.38232 3.07575 3.07636 3.38171 2.88461 3.75804C2.66663 4.18586 2.66663 4.74591 2.66663 5.86602V10.1327C2.66663 11.2528 2.66663 11.8128 2.88461 12.2407C3.07636 12.617 3.38232 12.9229 3.75865 13.1147C4.18647 13.3327 4.74652 13.3327 5.86663 13.3327H10.1333C11.2534 13.3327 11.8134 13.3327 12.2413 13.1147C12.6176 12.9229 12.9236 12.617 13.1153 12.2407C13.3333 11.8128 13.3333 11.2528 13.3333 10.1327V8.66602"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <path+ d="M6 10.0002V8.27629C6 8.09949 6.07024 7.92989 6.19526 7.80489L11.5 2.50015C12.0523 1.94787 12.9477 1.94787 13.5 2.50015C14.0523 3.05243 14.0523 3.94786 13.5 4.50015L8.19527 9.80489C8.07027 9.92989 7.90067 10.0002 7.72387 10.0002H6Z"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="square"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/routers.svg b/apps/mirai/mirai-app/assets/icons/routers.svgnew file mode 100644index 000000000..1b5e4590d--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/routers.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <circle cx="6" cy="19" r="3" />+ <path d="M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" />+ <circle cx="18" cy="5" r="3" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/search.svg b/apps/mirai/mirai-app/assets/icons/search.svgnew file mode 100644index 000000000..25eb7c111--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/search.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <circle cx="11" cy="11" r="8" />+ <path d="m21 21-4.3-4.3" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/send.svg b/apps/mirai/mirai-app/assets/icons/send.svgnew file mode 100644index 000000000..37a2f5ccd--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/send.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 19V5M5 12l7-7 7 7" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/settings.svg b/apps/mirai/mirai-app/assets/icons/settings.svgnew file mode 100644index 000000000..491e748cb--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/settings.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />+ <circle cx="12" cy="12" r="3" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/shield.svg b/apps/mirai/mirai-app/assets/icons/shield.svgnew file mode 100644index 000000000..cc378f707--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/shield.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/speech.svg b/apps/mirai/mirai-app/assets/icons/speech.svgnew file mode 100644index 000000000..27a4896ed--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/speech.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">+ <path d="M8 4V20" stroke="currentColor" stroke-width="2" stroke-linecap="round" />+ <path d="M4 10V14" stroke="currentColor" stroke-width="2" stroke-linecap="round" />+ <path d="M12 8V13" stroke="currentColor" stroke-width="2" stroke-linecap="round" />+ <path d="M16 6V10" stroke="currentColor" stroke-width="2" stroke-linecap="round" />+ <path d="M20 10V13" stroke="currentColor" stroke-width="2" stroke-linecap="round" />+ <path d="M17.2405 15.1852L16.5436 13.3733C16.4571 13.1484 16.241 13 16 13C15.759 13 15.5429 13.1484 15.4564 13.3733L14.7595 15.1852C14.658 15.4493 14.4493 15.658 14.1852 15.7595L12.3733 16.4564C12.1484 16.5429 12 16.759 12 17C12 17.241 12.1484 17.4571 12.3733 17.5436L14.1852 18.2405C14.4493 18.342 14.658 18.5507 14.7595 18.8148L15.4564 20.6267C15.5429 20.8516 15.759 21 16 21C16.241 21 16.4571 20.8516 16.5436 20.6267L17.2405 18.8148C17.342 18.5507 17.5507 18.342 17.8148 18.2405L19.6267 17.5436C19.8516 17.4571 20 17.241 20 17C20 16.759 19.8516 16.5429 19.6267 16.4564L17.8148 15.7595C17.5507 15.658 17.342 15.4493 17.2405 15.1852Z" fill="currentColor" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/spinner.svg b/apps/mirai/mirai-app/assets/icons/spinner.svgnew file mode 100644index 000000000..c359cfed5--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/spinner.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">+ <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-dasharray="42 100"/>+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/stop.svg b/apps/mirai/mirai-app/assets/icons/stop.svgnew file mode 100644index 000000000..9e539aa42--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/stop.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">+ <rect x="6" y="6" width="12" height="12" rx="2" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/thinking.svg b/apps/mirai/mirai-app/assets/icons/thinking.svgnew file mode 100644index 000000000..2ae0ae8c4--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/thinking.svg@@ -0,0 +1,13 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 15" fill="none">+ <path+ d="M6.40727 3.05139C6.22778 3.22339 5.97187 3.29849 5.72697 3.25586C5.57912 3.23013 5.42705 3.21672 5.27188 3.21672C3.81005 3.21672 2.625 4.40689 2.625 5.87505C2.625 6.69763 2.99702 7.43298 3.58131 7.92058C3.72927 8.04408 3.8265 8.21989 3.8523 8.41088C4.02762 9.70833 5.13503 10.7083 6.475 10.7083C7.11638 10.7083 7.70449 10.4792 8.16258 10.0981C8.34178 9.94895 8.58136 9.88589 8.81014 9.9304C8.98899 9.96517 9.17367 9.98343 9.36256 9.98343C10.9573 9.98343 12.2501 8.68504 12.2501 7.08338C12.2501 6.30427 11.9442 5.5969 11.4463 5.07585C11.3426 4.9673 11.274 4.82929 11.2501 4.68109C11.0269 3.30244 9.83587 2.25 8.40012 2.25C7.62737 2.25 6.92551 2.55487 6.40727 3.05139Z"+ stroke="currentColor"+ stroke-width="1.1"+ stroke-linejoin="round"+ />+ <path+ d="M3.49935 12.1667C3.49935 12.811 2.97701 13.3333 2.33268 13.3333C1.68835 13.3333 1.16602 12.811 1.16602 12.1667C1.16602 11.5223 1.68835 11 2.33268 11C2.97701 11 3.49935 11.5223 3.49935 12.1667Z"+ stroke="currentColor"+ stroke-width="1.1"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/trash.svg b/apps/mirai/mirai-app/assets/icons/trash.svgnew file mode 100644index 000000000..cb3bbab03--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/trash.svg@@ -0,0 +1,37 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none">+ <path+ d="M3.33337 4.33398L3.8716 12.1383C3.94392 13.1869 4.81569 14.0007 5.86686 14.0007H10.1332C11.1844 14.0007 12.0562 13.1869 12.1285 12.1383L12.6667 4.33398"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <path+ d="M6.66663 7.33398V10.6673"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <path+ d="M9.33337 7.33398V10.6673"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <path+ d="M2.33337 4H13.6667"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <path+ d="M5.38049 3.83016C5.61553 2.59765 6.69888 1.66602 7.99988 1.66602C9.30088 1.66602 10.3842 2.59765 10.6193 3.83016"+ stroke="currentColor"+ stroke-width="1.33333"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/tray.png b/apps/mirai/mirai-app/assets/icons/tray.pngnew file mode 100644index 000000000..7ae3406a6Binary files /dev/null and b/apps/mirai/mirai-app/assets/icons/tray.png differdiff --git a/apps/mirai/mirai-app/assets/icons/wifi-off.svg b/apps/mirai/mirai-app/assets/icons/wifi-off.svgnew file mode 100644index 000000000..32d472485--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/wifi-off.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 20h.01" />+ <path d="M8.5 16.429a5 5 0 0 1 7 0" />+ <path d="M5 12.859a10 10 0 0 1 5.17-2.69" />+ <path d="M19 12.859a10 10 0 0 0-2.007-1.523" />+ <path d="M2 8.82a15 15 0 0 1 4.177-2.643" />+ <path d="M22 8.82a15 15 0 0 0-11.288-3.764" />+ <path d="m2 2 20 20" />+</svg>diff --git a/apps/mirai/mirai-app/assets/icons/x.svg b/apps/mirai/mirai-app/assets/icons/x.svgnew file mode 100644index 000000000..a3d1bf578--- /dev/null+++ b/apps/mirai/mirai-app/assets/icons/x.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" fill="currentColor"><path d="M0.762431 0.636564C0.815065 0.711665 2.03403 2.4859 3.47124 4.5793C4.90846 6.67269 6.23774 8.60863 6.42523 8.88141C6.6127 9.15419 6.7661 9.38284 6.7661 9.38953C6.7661 9.39623 6.69628 9.48231 6.61096 9.58081C6.52564 9.67931 6.2853 9.95815 6.07692 10.2004C5.86851 10.4427 5.5172 10.8511 5.29621 11.1079C5.07524 11.3648 4.68648 11.8167 4.4323 12.1123C4.17813 12.4079 3.72106 12.9394 3.41658 13.2933C2.47489 14.388 2.33899 14.5461 1.62215 15.3811C1.23938 15.8269 0.872334 16.2531 0.806501 16.3283C0.740669 16.4035 0.686801 16.4729 0.686801 16.4825C0.686801 16.4938 0.927224 16.5 1.36418 16.5H2.04153L2.78622 15.6322C3.19581 15.1548 3.59984 14.685 3.68407 14.5881C3.86622 14.3786 5.25529 12.7623 5.37205 12.6241C5.41676 12.5711 5.48169 12.4958 5.51635 12.4567C5.55103 12.4175 5.82432 12.1 6.12366 11.7511C6.423 11.4022 6.67614 11.1082 6.68617 11.0977C6.69621 11.0873 6.85468 10.9029 7.03833 10.6881C7.22197 10.4732 7.3779 10.2974 7.38483 10.2974C7.39177 10.2974 8.33514 11.6632 9.48123 13.3326C10.6273 15.002 11.5855 16.3974 11.6105 16.4335L11.656 16.4992L13.9794 16.4996C15.8902 16.4999 16.3013 16.4959 16.294 16.4769C16.2863 16.4566 15.1731 14.8329 12.3172 10.6762C10.2613 7.68386 9.98791 7.28174 9.99575 7.26134C10.0034 7.2415 10.2834 6.91397 12.1244 4.77167C12.4402 4.40419 12.8756 3.89736 13.0918 3.64537C13.3081 3.39339 13.5264 3.13965 13.5771 3.0815C13.6277 3.02335 13.8938 2.7141 14.1684 2.39427C14.443 2.07445 14.9099 1.53101 15.2059 1.18664C15.5019 0.842273 15.755 0.546908 15.7682 0.530256C15.791 0.501762 15.7523 0.5 15.1044 0.5H14.4164L14.1104 0.856828C13.7031 1.33172 12.9669 2.18809 12.7578 2.43008C12.6655 2.537 12.5502 2.67138 12.5018 2.72869C12.4533 2.78599 12.3577 2.89674 12.2893 2.9748C12.2209 3.05286 11.8763 3.45374 11.5234 3.86564C11.1706 4.27753 10.877 4.6185 10.8711 4.62335C10.8652 4.62819 10.7896 4.71589 10.7031 4.81825C10.5518 4.99729 10.3978 5.17649 9.69168 5.99542C9.38173 6.35489 9.36583 6.37033 9.3397 6.33729C9.32467 6.31825 8.41632 4.99715 7.32116 3.40152L5.32997 0.50037L2.99836 0.500176L0.666748 0.5L0.762431 0.636564ZM2.58222 1.58796C2.59974 1.6147 3.03536 2.23921 3.55031 2.97577C4.52692 4.3727 8.36463 9.86539 10.8327 13.3987C11.6214 14.5278 12.2763 15.4615 12.2881 15.4737C12.3049 15.4911 12.5345 15.4949 13.3611 15.4913L14.4127 15.4868L11.6608 11.5485C10.1473 9.38238 7.95588 6.24626 6.79108 4.5793L4.67327 1.54846L3.61184 1.54391L2.55041 1.53937L2.58222 1.58796Z"/></svg>diff --git a/apps/mirai/mirai-app/build.rs b/apps/mirai/mirai-app/build.rsnew file mode 100644index 000000000..0c06fd27c--- /dev/null+++ b/apps/mirai/mirai-app/build.rs@@ -0,0 +1,7 @@+fn main() {+ let key = "MIRAI_BUNDLED_API_KEY";+ println!("cargo:rerun-if-env-changed={key}");+ if let Ok(value) = std::env::var(key) {+ println!("cargo:rustc-env={key}={value}");+ }+}diff --git a/apps/mirai/mirai-app/bundle.sh b/apps/mirai/mirai-app/bundle.shnew file mode 100755index 000000000..eed5a5b76--- /dev/null+++ b/apps/mirai/mirai-app/bundle.sh@@ -0,0 +1,84 @@+#!/usr/bin/env bash+# Build a macOS `Mirai.app` bundle (icon + Info.plist + ad-hoc signature) and a+# drag-to-Applications `Mirai.dmg` installer.+#+# ./bundle.sh # release build (default)+# PROFILE=debug ./bundle.sh # fast debug build, for verifying the bundle+#+# Output: app/target/Mirai.app and app/target/Mirai.dmg+set -euo pipefail++SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # mirai-app/+APP_WS="$(cd "$SCRIPT_DIR/.." && pwd)" # app/ (cargo workspace)+PROFILE="${PROFILE:-release}"++if [[ "$PROFILE" == "release" ]]; then+ CARGO_FLAG="--release"+ TARGET_SUBDIR="release"+else+ CARGO_FLAG=""+ TARGET_SUBDIR="debug"+fi++VERSION="$(grep -m1 '^version' "$SCRIPT_DIR/Cargo.toml" | sed -E 's/.*"(.*)".*/\1/')"+BIN="$APP_WS/target/$TARGET_SUBDIR/mirai-app"+APP="$APP_WS/target/Mirai.app"+DMG="$APP_WS/target/Mirai.dmg"++ENV_FILE="$(cd "$SCRIPT_DIR/../../.." && pwd)/.env"+read_env() { { [[ -f "$ENV_FILE" ]] && grep -m1 "^$1=" "$ENV_FILE" | cut -d= -f2-; } || true; }+if key="$(read_env MIRAI_API_KEY)" && [[ -n "$key" ]]; then+ export MIRAI_BUNDLED_API_KEY="$key"+ echo "==> Embedding MIRAI_API_KEY from .env"+fi+unset key++echo "==> Building mirai-app ($PROFILE, v$VERSION)"+# shellcheck disable=SC2086+(cd "$APP_WS" && cargo build -p mirai-app $CARGO_FLAG)++unset MIRAI_BUNDLED_API_KEY++echo "==> Assembling $APP"+rm -rf "$APP"+mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"+cp "$BIN" "$APP/Contents/MacOS/mirai-app"+chmod +x "$APP/Contents/MacOS/mirai-app"+cp "$SCRIPT_DIR/resources/Mirai.icns" "$APP/Contents/Resources/Mirai.icns"+sed "s/__VERSION__/$VERSION/g" "$SCRIPT_DIR/resources/Info.plist" >"$APP/Contents/Info.plist"++# Sign with $MACOS_SIGNING_IDENTITY (a Developer ID) if set, else ad-hoc. The+# entitlements are applied either way; hardened runtime (--options runtime,+# required for notarization) is only added for a real identity, mirroring Zed's+# script/bundle-mac. Distribution still needs notarytool + stapler afterwards.+IDENTITY="${MACOS_SIGNING_IDENTITY:--}"+ENTITLEMENTS="$SCRIPT_DIR/resources/Mirai.entitlements"+if [[ "$IDENTITY" == "-" ]]; then+ echo "==> Ad-hoc code-signing (set MACOS_SIGNING_IDENTITY for distribution)"+ codesign --force --deep --entitlements "$ENTITLEMENTS" --sign - "$APP"+else+ echo "==> Code-signing + hardened runtime as '$IDENTITY'"+ codesign --force --deep --timestamp --options runtime \+ --entitlements "$ENTITLEMENTS" --sign "$IDENTITY" "$APP"+fi++echo "==> Building $DMG"+STAGE="$(mktemp -d)"+cp -R "$APP" "$STAGE/Mirai.app"+ln -s /Applications "$STAGE/Applications"+# `.VolumeIcon.icns` at the volume root + the volume's custom-icon attribute+# gives the mounted disk image its icon in Finder. That attribute can only be+# set on a writable image, so build UDRW, stamp it, then compress to UDZO.+cp "$SCRIPT_DIR/resources/VolumeIcon.icns" "$STAGE/.VolumeIcon.icns"+RW="$(mktemp -d)/rw.dmg"+hdiutil create -volname "Mirai" -srcfolder "$STAGE" -fs HFS+ -format UDRW -ov "$RW" >/dev/null+MNT="$(hdiutil attach "$RW" -nobrowse -noverify | grep Volumes | awk '{print $3}')"+SetFile -a C "$MNT"+hdiutil detach "$MNT" >/dev/null+rm -f "$DMG"+hdiutil convert "$RW" -format UDZO -o "$DMG" >/dev/null+rm -rf "$STAGE" "$(dirname "$RW")"++echo "==> Done:"+echo " $APP"+echo " $DMG"diff --git a/apps/mirai/mirai-app/resources/Info.plist b/apps/mirai/mirai-app/resources/Info.plistnew file mode 100644index 000000000..56bfd5494--- /dev/null+++ b/apps/mirai/mirai-app/resources/Info.plist@@ -0,0 +1,34 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>CFBundleName</key>+ <string>Mirai</string>+ <key>CFBundleDisplayName</key>+ <string>Mirai</string>+ <key>CFBundleIdentifier</key>+ <string>co.getmirai.app</string>+ <key>CFBundleExecutable</key>+ <string>mirai-app</string>+ <key>CFBundleIconFile</key>+ <string>Mirai</string>+ <key>CFBundlePackageType</key>+ <string>APPL</string>+ <key>CFBundleInfoDictionaryVersion</key>+ <string>6.0</string>+ <key>CFBundleShortVersionString</key>+ <string>__VERSION__</string>+ <key>CFBundleVersion</key>+ <string>__VERSION__</string>+ <key>LSMinimumSystemVersion</key>+ <string>13.0</string>+ <key>LSApplicationCategoryType</key>+ <string>public.app-category.productivity</string>+ <key>NSHighResolutionCapable</key>+ <true/>+ <key>NSSupportsAutomaticGraphicsSwitching</key>+ <true/>+ <key>NSHumanReadableCopyright</key>+ <string>© Mirai Tech Inc.</string>+</dict>+</plist>diff --git a/apps/mirai/mirai-app/resources/Mirai.entitlements b/apps/mirai/mirai-app/resources/Mirai.entitlementsnew file mode 100644index 000000000..e12db91f1--- /dev/null+++ b/apps/mirai/mirai-app/resources/Mirai.entitlements@@ -0,0 +1,14 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <!-- "Run on startup" toggles a login item via AppleScript (auto-launch). -->+ <key>com.apple.security.automation.apple-events</key>+ <true/>+ <!-- File upload, chat/log export, and model downloads. -->+ <key>com.apple.security.files.user-selected.read-write</key>+ <true/>+ <key>com.apple.security.files.downloads.read-write</key>+ <true/>+</dict>+</plist>diff --git a/apps/mirai/mirai-app/resources/Mirai.icns b/apps/mirai/mirai-app/resources/Mirai.icnsnew file mode 100644index 000000000..11e81b24dBinary files /dev/null and b/apps/mirai/mirai-app/resources/Mirai.icns differdiff --git a/apps/mirai/mirai-app/resources/VolumeIcon.icns b/apps/mirai/mirai-app/resources/VolumeIcon.icnsnew file mode 100644index 000000000..c0064eb60Binary files /dev/null and b/apps/mirai/mirai-app/resources/VolumeIcon.icns differdiff --git a/apps/mirai/mirai-app/src/app_shell/mod.rs b/apps/mirai/mirai-app/src/app_shell/mod.rsnew file mode 100644index 000000000..bdbf2f713--- /dev/null+++ b/apps/mirai/mirai-app/src/app_shell/mod.rs@@ -0,0 +1,6 @@+mod route;+mod section;+mod shell;+mod sidebar;++pub use shell::{MiraiApp, open_window};diff --git a/apps/mirai/mirai-app/src/app_shell/route.rs b/apps/mirai/mirai-app/src/app_shell/route.rsnew file mode 100644index 000000000..0700f633d--- /dev/null+++ b/apps/mirai/mirai-app/src/app_shell/route.rs@@ -0,0 +1,26 @@+use super::section::Section;++#[derive(Clone)]+pub(super) enum Route {+ Welcome,+ Chat(Option<String>),+ Chats,+ LocalModels,+ Routers,+ Tts,+ Settings,+}++impl Route {+ pub(super) fn section(&self) -> Section {+ match self {+ Route::Welcome => Section::Welcome,+ Route::Chat(_) => Section::Chat,+ Route::Chats => Section::Chats,+ Route::LocalModels => Section::LocalModels,+ Route::Routers => Section::Routers,+ Route::Tts => Section::Tts,+ Route::Settings => Section::Settings,+ }+ }+}diff --git a/apps/mirai/mirai-app/src/app_shell/section.rs b/apps/mirai/mirai-app/src/app_shell/section.rsnew file mode 100644index 000000000..1b0cb4f25--- /dev/null+++ b/apps/mirai/mirai-app/src/app_shell/section.rs@@ -0,0 +1,10 @@+#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum Section {+ Welcome,+ Chat,+ Chats,+ LocalModels,+ Routers,+ Tts,+ Settings,+}diff --git a/apps/mirai/mirai-app/src/app_shell/shell.rs b/apps/mirai/mirai-app/src/app_shell/shell.rsnew file mode 100644index 000000000..694b4cd0e--- /dev/null+++ b/apps/mirai/mirai-app/src/app_shell/shell.rs@@ -0,0 +1,315 @@+use gpui::{+ AnyElement, App, Bounds, Context, CursorStyle, Entity, IntoElement, Render, TitlebarOptions, Window, WindowBounds,+ WindowOptions, div, point, prelude::*, px, size,+};++use super::route::Route;+use crate::{+ components::{Icon, IconEl},+ menu_bar::{self, TrayAction},+ models_store::{ModelKind, ModelsStore},+ persistence,+ screens::{+ ChatEvent, ChatView, ChatsEvent, ChatsView, LocalModelsEvent, LocalModelsView, RoutersView, SettingsEvent,+ SettingsView, TtsView, WelcomeEvent, WelcomeView,+ },+ settings_state,+ theme::{self, ActiveTheme, FONT_SANS, TEXT_SIZE, layout::FOOTER_HEIGHT},+ toast, tokens,+};++const APP_VERSION: &str = env!("CARGO_PKG_VERSION");++pub struct MiraiApp {+ pub(super) route: Route,+ local_models: Entity<LocalModelsView>,+ chat: Entity<ChatView>,+ chats: Entity<ChatsView>,+ welcome: Entity<WelcomeView>,+ settings: Entity<SettingsView>,+ routers: Entity<RoutersView>,+ tts: Entity<TtsView>,++ pub(super) recent_chats: Vec<persistence::StoredChat>,++ pub(super) settings_menu_open: bool,+}++impl MiraiApp {+ pub fn new(cx: &mut Context<Self>) -> Self {+ if !settings_state::current(cx).dark_mode {+ theme::set_theme(cx, theme::Theme::light());+ }++ theme::observe_theme(cx, |_, cx| cx.notify()).detach();+ toast::observe(cx, |_, cx| cx.notify()).detach();++ let weak = cx.entity().downgrade();+ menu_bar::register_app(cx, weak);++ let models = cx.new(|cx| ModelsStore::new(ModelKind::Chat, cx));+ let cloud_store = cx.new(|cx| ModelsStore::new(ModelKind::CloudChat, cx));+ let local_models = cx.new(|cx| LocalModelsView::new(models.clone(), cx));+ let chat = cx.new(|cx| ChatView::new(models.clone(), cloud_store.clone(), cx));++ cx.subscribe(&local_models, |this, _view, event, cx| match event {+ LocalModelsEvent::UseModel(model) => {+ this.chat.update(cx, |chat, cx| chat.use_model(model.clone(), cx));+ this.route = Route::Chat(None);+ cx.notify();+ },+ })+ .detach();+ let chats = cx.new(ChatsView::new);+ let welcome = cx.new(WelcomeView::new);+ let settings = cx.new(SettingsView::new);+ let routers_store = cx.new(|cx| ModelsStore::new(ModelKind::Classification, cx));+ let routers = cx.new(|cx| RoutersView::new(routers_store, cx));+ let tts_store = cx.new(|cx| ModelsStore::new(ModelKind::TextToSpeech, cx));+ let tts = cx.new(|cx| TtsView::new(tts_store, cx));++ cx.subscribe(&chats, |this, _chats, event, cx| match event {+ ChatsEvent::Open(id) => this.open_chat(id.clone(), cx),+ ChatsEvent::Changed => {+ this.recent_chats = persistence::list_chats();+ cx.notify();+ },+ })+ .detach();++ cx.subscribe(&chat, |this, _chat, event, cx| match event {+ ChatEvent::Updated => {+ this.recent_chats = persistence::list_chats();+ cx.notify();+ },+ ChatEvent::OpenLocalModels => this.navigate(Route::LocalModels, cx),+ })+ .detach();++ cx.subscribe(&settings, |this, _settings, event, cx| match event {+ SettingsEvent::DataCleared {+ dialogs,+ audio,+ } => {+ this.recent_chats = persistence::list_chats();++ if *dialogs {+ this.chat.update(cx, |chat, cx| chat.start_new(cx));+ }++ if *audio {+ this.tts.update(cx, |tts, cx| tts.reload_after_clear(cx));+ }+ cx.notify();+ },+ })+ .detach();++ cx.subscribe(&welcome, |this, _welcome, event, cx| match event {+ WelcomeEvent::Continue => {+ persistence::set_seen_welcome();+ this.navigate(Route::LocalModels, cx);+ },+ })+ .detach();++ let route = if persistence::has_seen_welcome() {+ Route::LocalModels+ } else {+ Route::Welcome+ };++ Self {+ route,+ local_models,+ chat,+ chats,+ welcome,+ settings,+ routers,+ tts,+ recent_chats: persistence::list_chats(),+ settings_menu_open: false,+ }+ }++ pub fn handle_tray_action(+ &mut self,+ action: TrayAction,+ cx: &mut Context<Self>,+ ) {+ let route = match action {+ TrayAction::NewChat => Route::Chat(None),+ TrayAction::OpenChats => Route::Chats,+ TrayAction::Settings => Route::Settings,+ };+ self.navigate(route, cx);+ }++ pub(super) fn toggle_dark_mode(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let mut settings = settings_state::current(cx);+ settings.dark_mode = !settings.dark_mode;+ let next = if settings.dark_mode {+ theme::Theme::dark()+ } else {+ theme::Theme::light()+ };+ theme::set_theme(cx, next);+ settings_state::set(cx, settings);+ cx.notify();+ }++ pub(super) fn navigate(+ &mut self,+ route: Route,+ cx: &mut Context<Self>,+ ) {+ match &route {+ Route::Chat(None) => self.chat.update(cx, |chat, cx| chat.start_new(cx)),+ Route::Chats => self.chats.update(cx, |chats, cx| chats.reload(cx)),+ _ => {},+ }+ self.recent_chats = persistence::list_chats();+ self.route = route;+ cx.notify();+ }++ pub(super) fn open_chat(+ &mut self,+ id: String,+ cx: &mut Context<Self>,+ ) {+ if let Some(stored) = persistence::load_chat(&id) {+ self.chat.update(cx, |chat, cx| chat.load_stored(stored, cx));+ self.recent_chats = persistence::list_chats();+ self.route = Route::Chat(Some(id));+ cx.notify();+ }+ }++ fn render_content(+ &self,+ _cx: &mut Context<Self>,+ ) -> AnyElement {+ match &self.route {+ Route::LocalModels => self.local_models.clone().into_any_element(),+ Route::Chat(_) => self.chat.clone().into_any_element(),+ Route::Chats => self.chats.clone().into_any_element(),+ Route::Routers => self.routers.clone().into_any_element(),+ Route::Tts => self.tts.clone().into_any_element(),+ Route::Settings => self.settings.clone().into_any_element(),++ Route::Welcome => div().into_any_element(),+ }+ }++ fn render_footer(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover_bg = theme.bg_hover;+ let loaded = self.chat.read(cx).loaded_model_name();++ let left = match loaded {+ Some(name) => div()+ .flex()+ .items_center()+ .gap_2()+ .child(div().text_color(theme.text).child(name))+ .child(+ div()+ .id("footer-eject")+ .flex()+ .items_center()+ .gap_1()+ .px_1()+ .rounded_md()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover_bg))+ .on_click(cx.listener(|this, _, _, cx| {+ this.chat.update(cx, |chat, cx| chat.eject(cx));+ }))+ .child(IconEl::new(Icon::Eject, theme.text_muted).size(11.))+ .child("Eject"),+ )+ .into_any_element(),+ None => div().child("No model loaded").into_any_element(),+ };++ div()+ .h(px(FOOTER_HEIGHT))+ .flex_none()+ .w_full()+ .flex()+ .items_center()+ .justify_between()+ .px_3()+ .bg(theme.bg_sidebar)+ .border_t_1()+ .border_color(theme.border)+ .text_color(theme.text_muted)+ .text_size(tokens::font::CAPTION)+ .child(left)+ .child(div().child(format!("v{APP_VERSION}")))+ }+}++impl Render for MiraiApp {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let root = div()+ .size_full()+ .relative()+ .bg(theme.bg)+ .text_color(theme.text)+ .font_family(FONT_SANS)+ .text_size(px(TEXT_SIZE));++ if matches!(self.route, Route::Welcome) {+ return root.child(self.welcome.clone()).children(toast::render_overlay(cx));+ }++ root.flex()+ .flex_col()+ .child(+ div()+ .flex()+ .flex_row()+ .flex_1()+ .min_h_0()+ .overflow_hidden()+ .child(self.render_sidebar(cx))+ .child(div().flex_1().min_h_0().overflow_hidden().child(self.render_content(cx))),+ )+ .child(self.render_footer(cx))+ .children(toast::render_overlay(cx))+ }+}++pub fn open_window(cx: &mut App) {+ let bounds = Bounds::centered(None, size(px(1200.), px(800.)), cx);+ let window = cx.open_window(+ WindowOptions {+ window_bounds: Some(WindowBounds::Windowed(bounds)),+ titlebar: Some(TitlebarOptions {+ title: None,+ appears_transparent: true,+ traffic_light_position: Some(point(px(20.), px(18.))),+ }),+ window_min_size: Some(size(px(720.), px(560.))),+ ..Default::default()+ },+ |_, cx| cx.new(MiraiApp::new),+ );+ if window.is_ok() {+ cx.activate(true);+ }+}diff --git a/apps/mirai/mirai-app/src/app_shell/sidebar.rs b/apps/mirai/mirai-app/src/app_shell/sidebar.rsnew file mode 100644index 000000000..311b510a4--- /dev/null+++ b/apps/mirai/mirai-app/src/app_shell/sidebar.rs@@ -0,0 +1,315 @@+use gpui::{Context, CursorStyle, IntoElement, SharedString, div, prelude::*, px, transparent_black};++use super::{route::Route, section::Section, shell::MiraiApp};+use crate::{+ components::{Icon, IconEl, Toggle},+ engine_capabilities::{CLASSIFICATION, TEXT_TO_SPEECH},+ settings_state,+ text::truncate_with_ellipsis,+ theme::{ActiveTheme, layout::SIDEBAR_WIDTH},+ tokens,+};++impl MiraiApp {+ fn nav_item(+ &self,+ cx: &mut Context<Self>,+ id: &'static str,+ icon: Icon,+ label: &'static str,+ target: Route,+ active: bool,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let fg = theme.text;+ let bg = if active {+ theme.bg_hover+ } else {+ transparent_black()+ };+ let hover_bg = theme.bg_hover;++ div()+ .id(id)+ .flex()+ .items_center()+ .gap_2()+ .h(px(34.))+ .px_2()+ .mx_2()+ .rounded_md()+ .bg(bg)+ .text_color(fg)+ .text_sm()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover_bg))+ .child(IconEl::new(icon, fg).size(tokens::icon::LG))+ .child(label)+ .on_click(cx.listener(move |this, _event, _window, cx| {+ this.navigate(target.clone(), cx);+ }))+ }++ fn apps_soon_item(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ div()+ .flex()+ .items_center()+ .justify_between()+ .h(px(34.))+ .px_2()+ .mx_2()+ .rounded_md()+ .text_color(theme.text)+ .text_sm()+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Apps, theme.text).size(tokens::icon::LG))+ .child("Apps"),+ )+ .child(div().text_xs().text_color(theme.text_muted).child("Soon"))+ }++ pub(super) fn render_sidebar(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let section = self.route.section();++ div()+ .w(px(SIDEBAR_WIDTH))+ .flex_none()+ .h_full()+ .flex()+ .flex_col()+ .bg(theme.bg_sidebar)+ .border_r_1()+ .border_color(theme.border)+ .child(div().h(px(52.)))+ .child(+ div()+ .flex()+ .flex_col()+ .py_1()+ .child(self.nav_item(+ cx,+ "nav-new-chat",+ Icon::Plus,+ "New Chat",+ Route::Chat(None),+ section == Section::Chat,+ ))+ .child(self.nav_item(+ cx,+ "nav-chats",+ Icon::Chats,+ "Chats",+ Route::Chats,+ section == Section::Chats,+ ))+ .child(self.nav_item(+ cx,+ "nav-models",+ Icon::Models,+ "Local Models",+ Route::LocalModels,+ section == Section::LocalModels,+ ))+ .when(TEXT_TO_SPEECH, |column| {+ column.child(self.nav_item(+ cx,+ "nav-tts",+ Icon::Speech,+ "Text to Speech",+ Route::Tts,+ section == Section::Tts,+ ))+ })+ .when(CLASSIFICATION, |column| {+ column.child(self.nav_item(+ cx,+ "nav-routers",+ Icon::Routers,+ "Routers",+ Route::Routers,+ section == Section::Routers,+ ))+ })+ .child(self.apps_soon_item(cx)),+ )+ .child(self.render_recent_chats(cx))+ .child(self.render_settings_menu(cx))+ }++ fn render_settings_menu(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let open = self.settings_menu_open;+ let dark = settings_state::current(cx).dark_mode;+ let hover = theme.bg_hover;++ let mut wrap = div().flex().flex_col().border_t_1().border_color(theme.border);++ wrap = wrap.child(+ div()+ .id("settings-trigger")+ .flex()+ .items_center()+ .justify_between()+ .h(px(40.))+ .px_4()+ .text_sm()+ .text_color(theme.text)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(|this, _, _, cx| {+ this.settings_menu_open = !this.settings_menu_open;+ cx.notify();+ }))+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Settings, theme.text).size(tokens::icon::LG))+ .child("Settings"),+ )+ .child(+ IconEl::new(+ if open {+ Icon::ChevronUp+ } else {+ Icon::ChevronDown+ },+ theme.text_muted,+ )+ .size(tokens::icon::SM),+ ),+ );++ if open {+ let muted = theme.text_muted;+ let link_hover = theme.text;+ let mut links = div().flex().items_center().gap_4().px_4().pt_2().pb_2();+ for (id, icon, url) in [+ ("lnk-github", Icon::Github, "https://github.com/trymirai"),+ ("lnk-x", Icon::XSocial, "https://x.com/trymirai"),+ ("lnk-discord", Icon::Discord, "https://discord.gg/trymirai"),+ ] {+ let url = url.to_string();+ links = links.child(+ div()+ .id(id)+ .flex()+ .items_center()+ .justify_center()+ .size(px(28.))+ .rounded_md()+ .text_color(muted)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.text_color(link_hover).bg(hover))+ .on_click(move |_, _, cx| cx.open_url(&url))+ .child(IconEl::new(icon, muted).size(tokens::icon::LG)),+ );+ }+ wrap = wrap+ .child(links)+ .child(+ div()+ .id("settings-open")+ .flex()+ .items_center()+ .h(px(34.))+ .px_4()+ .text_sm()+ .text_color(theme.text)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(|this, _, _, cx| {+ this.settings_menu_open = false;+ this.navigate(Route::Settings, cx);+ }))+ .child("Settings"),+ )+ .child(+ div()+ .flex()+ .items_center()+ .justify_between()+ .h(px(38.))+ .px_4()+ .text_sm()+ .text_color(theme.text)+ .child("Dark mode")+ .child(+ Toggle::new("dark-mode", dark)+ .on_click(cx.listener(|this, _, _, cx| this.toggle_dark_mode(cx))),+ ),+ );+ }++ wrap+ }++ fn render_recent_chats(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover_bg = theme.bg_hover;+ let active = match &self.route {+ Route::Chat(Some(id)) => Some(id.clone()),+ _ => None,+ };++ let mut col = div().id("recent-chats").flex_1().min_h_0().flex().flex_col().overflow_y_scroll().px_2().pt_2();++ if self.recent_chats.is_empty() {+ return col+ .child(div().px_2().text_xs().text_color(theme.text_muted).child("No chats yet"))+ .into_any_element();+ }++ col = col.child(div().px_2().pb_1().text_xs().text_color(theme.text_muted).child("Recent"));+ for chat in &self.recent_chats {+ let id = chat.id.clone();+ let is_active = active.as_deref() == Some(chat.id.as_str());+ let fg = if is_active {+ theme.text+ } else {+ theme.text_muted+ };+ let bg = if is_active {+ theme.bg_hover+ } else {+ transparent_black()+ };+ col = col.child(+ div()+ .id(SharedString::from(format!("recent-{}", chat.id)))+ .h(px(30.))+ .px_2()+ .flex()+ .items_center()+ .rounded_md()+ .bg(bg)+ .text_sm()+ .text_color(fg)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover_bg))+ .on_click(cx.listener(move |this, _, _, cx| this.open_chat(id.clone(), cx)))+ .child(truncate_with_ellipsis(&chat.title, 26)),+ );+ }+ col.into_any_element()+ }+}diff --git a/apps/mirai/mirai-app/src/assets.rs b/apps/mirai/mirai-app/src/assets.rsnew file mode 100644index 000000000..79805fa42--- /dev/null+++ b/apps/mirai/mirai-app/src/assets.rs@@ -0,0 +1,32 @@+use std::borrow::Cow;++use anyhow::Result;+use gpui::{AssetSource, SharedString};++#[derive(rust_embed::RustEmbed)]+#[folder = "assets"]+struct Embedded;++pub struct Assets;++impl Assets {+ pub fn new() -> Self {+ Self+ }+}++impl AssetSource for Assets {+ fn load(+ &self,+ path: &str,+ ) -> Result<Option<Cow<'static, [u8]>>> {+ Ok(Embedded::get(path).map(|file| file.data))+ }++ fn list(+ &self,+ path: &str,+ ) -> Result<Vec<SharedString>> {+ Ok(Embedded::iter().filter(|p| p.starts_with(path)).map(|p| SharedString::from(p.to_string())).collect())+ }+}diff --git a/apps/mirai/mirai-app/src/data_ops.rs b/apps/mirai/mirai-app/src/data_ops.rsnew file mode 100644index 000000000..0bea733b0--- /dev/null+++ b/apps/mirai/mirai-app/src/data_ops.rs@@ -0,0 +1,331 @@+use std::{+ collections::HashSet,+ fs,+ io::{Cursor, Write},+ path::{Path, PathBuf},+};++use uzu::{engine::Engine, storage::types::DownloadPhase};++use crate::{persistence, tts_history};++#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]+pub enum CleanupCategory {+ Dialogs,+ Files,+ Models,+ Logs,+}++impl CleanupCategory {+ pub const ALL: [Self; 4] = [Self::Dialogs, Self::Files, Self::Models, Self::Logs];++ pub fn label(self) -> &'static str {+ match self {+ Self::Dialogs => "Dialogs",+ Self::Files => "Generated audio",+ Self::Models => "Downloaded models",+ Self::Logs => "Logs",+ }+ }+}++#[derive(Clone, Debug, Default)]+pub struct CategoryStats {+ pub count: u32,+ pub size_bytes: u64,+}++#[derive(Clone, Debug, Default)]+pub struct CleanupPreview {+ pub dialogs: CategoryStats,+ pub files: CategoryStats,+ pub models: CategoryStats,+ pub logs_size_bytes: u64,+}++pub fn log_file_path() -> PathBuf {+ dirs::home_dir().unwrap_or_default().join(".cache").join("mirai").join("mirai.log")+}++pub fn tts_audio_dir() -> PathBuf {+ persistence::mirai_data_dir().join("tts-audio")+}++pub fn format_bytes(bytes: u64) -> String {+ const KB: u64 = 1024;+ const MB: u64 = KB * 1024;+ const GB: u64 = MB * 1024;+ if bytes >= GB {+ format!("{:.1} GB", bytes as f64 / GB as f64)+ } else if bytes >= MB {+ format!("{:.1} MB", bytes as f64 / MB as f64)+ } else if bytes >= KB {+ format!("{:.1} KB", bytes as f64 / KB as f64)+ } else {+ format!("{bytes} B")+ }+}++pub fn category_description(+ cat: CleanupCategory,+ preview: &CleanupPreview,+) -> String {+ match cat {+ CleanupCategory::Dialogs => {+ let n = preview.dialogs.count;+ let word = if n == 1 {+ "chat"+ } else {+ "chats"+ };+ format!("{n} {word} · {}", format_bytes(preview.dialogs.size_bytes))+ },+ CleanupCategory::Files => {+ let n = preview.files.count;+ let word = if n == 1 {+ "file"+ } else {+ "files"+ };+ format!("{n} {word} · {}", format_bytes(preview.files.size_bytes))+ },+ CleanupCategory::Models => {+ let n = preview.models.count;+ let word = if n == 1 {+ "model"+ } else {+ "models"+ };+ format!("{n} {word} · {}", format_bytes(preview.models.size_bytes))+ },+ CleanupCategory::Logs => format_bytes(preview.logs_size_bytes),+ }+}++fn dir_file_stats(+ dir: &Path,+ ext: Option<&str>,+) -> CategoryStats {+ let Ok(entries) = fs::read_dir(dir) else {+ return CategoryStats::default();+ };+ let mut stats = CategoryStats::default();+ for entry in entries.flatten() {+ let path = entry.path();+ if !path.is_file() {+ continue;+ }+ if ext.is_some_and(|e| path.extension().and_then(|x| x.to_str()) != Some(e)) {+ continue;+ }+ stats.count += 1;+ stats.size_bytes += fs::metadata(&path).map(|m| m.len()).unwrap_or(0);+ }+ stats+}++fn file_size(path: &Path) -> u64 {+ fs::metadata(path).map(|m| m.len()).unwrap_or(0)+}++pub fn cleanup_preview_disk() -> CleanupPreview {+ let chats = persistence::chats_dir();+ CleanupPreview {+ dialogs: dir_file_stats(&chats, Some("md")),+ files: dir_file_stats(&tts_audio_dir(), None),+ logs_size_bytes: file_size(&log_file_path()) + file_size(&log_file_path_with_suffix(".1")),+ ..Default::default()+ }+}++pub async fn model_cleanup_stats(engine: &Engine) -> CategoryStats {+ let Ok(models) = engine.models().await else {+ return CategoryStats::default();+ };+ let states = engine.download_states().await;+ let mut stats = CategoryStats::default();+ for model in models {+ let Some(state) = states.get(&model.identifier) else {+ continue;+ };+ if !matches!(state.phase, DownloadPhase::Downloaded {} | DownloadPhase::Error { .. }) {+ continue;+ }+ stats.count += 1;+ stats.size_bytes += model.properties.as_ref().map(|p| p.size.max(0) as u64).unwrap_or(0);+ }+ stats+}++pub fn export_chats_zip() -> Option<Vec<u8>> {+ let dir = persistence::chats_dir();+ let mut names: Vec<String> = Vec::new();+ let mut seen: HashSet<String> = HashSet::new();++ if let Ok(entries) = fs::read_dir(&dir) {+ for entry in entries.flatten() {+ let path = entry.path();+ if path.extension().and_then(|e| e.to_str()) == Some("md")+ && let Some(name) = path.file_name().and_then(|n| n.to_str())+ && seen.insert(name.to_string())+ {+ names.push(name.to_string());+ }+ }+ }++ for chat in persistence::list_chats() {+ let name = format!("{}.md", chat.id);+ if seen.insert(name.clone()) {+ names.push(name);+ }+ }+ if names.is_empty() {+ return None;+ }+ names.sort();++ let mut buf = Cursor::new(Vec::new());+ {+ let mut zip = zip::ZipWriter::new(&mut buf);+ let opts = zip::write::SimpleFileOptions::default().compression_method(zip::CompressionMethod::Deflated);+ for name in names {+ let path = dir.join(&name);+ let content = if path.exists() {+ fs::read_to_string(&path).unwrap_or_default()+ } else if let Some(stem) = name.strip_suffix(".md") {+ persistence::load_chat(stem).map(|c| persistence::serialize_markdown(&c)).unwrap_or_default()+ } else {+ String::new()+ };+ if content.is_empty() {+ continue;+ }+ zip.start_file(name, opts).ok()?;+ zip.write_all(content.as_bytes()).ok()?;+ }+ zip.finish().ok()?;+ }+ Some(buf.into_inner())+}++pub fn export_zip_default_name() -> String {+ let stamp = persistence::fmt_utc(persistence::now_ms()).replace(':', ".").replace(" UTC", "");+ format!("mirai-chats {stamp}.zip")+}++pub fn read_log_bytes() -> Option<Vec<u8>> {+ let rotated = log_file_path_with_suffix(".1");+ let primary = log_file_path();+ let mut bytes = Vec::new();+ if let Ok(mut rotated_bytes) = fs::read(&rotated) {+ bytes.append(&mut rotated_bytes);+ }+ if let Ok(mut primary_bytes) = fs::read(&primary) {+ bytes.append(&mut primary_bytes);+ }+ if bytes.is_empty() {+ None+ } else {+ Some(bytes)+ }+}++fn log_file_path_with_suffix(suffix: &str) -> PathBuf {+ let mut p = log_file_path().into_os_string();+ p.push(suffix);+ PathBuf::from(p)+}++pub fn clear_dialogs() -> bool {+ let dir = persistence::chats_dir();+ let Ok(entries) = fs::read_dir(&dir) else {+ return true;+ };+ let mut ok = true;+ for entry in entries.flatten() {+ let path = entry.path();+ if !path.is_file() {+ continue;+ }+ let ext = path.extension().and_then(|e| e.to_str());+ if ext == Some("md") || ext == Some("json") {+ ok &= fs::remove_file(path).is_ok();+ }+ }+ let _ = fs::remove_file(persistence::global_instructions_path());+ ok+}++pub fn clear_generated_audio() -> bool {+ tts_history::clear_all();+ let dir = tts_audio_dir();+ let Ok(entries) = fs::read_dir(&dir) else {+ return true;+ };+ let mut ok = true;+ for entry in entries.flatten() {+ let path = entry.path();+ if path.is_file() {+ ok &= fs::remove_file(path).is_ok();+ }+ }+ ok+}++pub fn clear_logs() -> bool {+ let primary = log_file_path();+ let mut ok = true;+ if primary.exists() {+ ok &= fs::write(&primary, []).is_ok();+ }+ let rotated = log_file_path_with_suffix(".1");+ if rotated.exists() {+ ok &= fs::remove_file(&rotated).is_ok();+ }+ ok+}++pub async fn clear_downloaded_models(engine: &Engine) -> bool {+ let Ok(models) = engine.models().await else {+ return false;+ };+ let states = engine.download_states().await;+ let mut ok = true;+ for model in models {+ let Some(state) = states.get(&model.identifier) else {+ continue;+ };+ if !matches!(state.phase, DownloadPhase::Downloaded {} | DownloadPhase::Error { .. }) {+ continue;+ }+ if engine.downloader(&model).delete().await.is_err() {+ ok = false;+ }+ }+ ok+}++pub async fn execute_cleanup(+ engine: Option<&Engine>,+ categories: &[CleanupCategory],+) -> Vec<(CleanupCategory, bool)> {+ let mut results = Vec::new();+ for &cat in categories {+ let ok = match cat {+ CleanupCategory::Dialogs => clear_dialogs(),+ CleanupCategory::Files => clear_generated_audio(),+ CleanupCategory::Logs => clear_logs(),+ CleanupCategory::Models => {+ if let Some(engine) = engine {+ clear_downloaded_models(engine).await+ } else {+ false+ }+ },+ };+ results.push((cat, ok));+ }+ results+}diff --git a/apps/mirai/mirai-app/src/device_info.rs b/apps/mirai/mirai-app/src/device_info.rsnew file mode 100644index 000000000..292b1491d--- /dev/null+++ b/apps/mirai/mirai-app/src/device_info.rs@@ -0,0 +1,12 @@+use uzu::device::Device;++pub fn description() -> String {+ let Ok(device) = Device::create() else {+ return String::new();+ };+ let mem_gb = (device.memory_total as f64 / (1024.0 * 1024.0 * 1024.0)).round() as i64;+ match device.cpu_name.as_deref() {+ Some(cpu) if !cpu.is_empty() => format!("{cpu} · {mem_gb} GB memory"),+ _ => format!("{mem_gb} GB memory"),+ }+}diff --git a/apps/mirai/mirai-app/src/engine.rs b/apps/mirai/mirai-app/src/engine.rsnew file mode 100644index 000000000..258f9d3f8--- /dev/null+++ b/apps/mirai/mirai-app/src/engine.rs@@ -0,0 +1,17 @@+use gpui::{App, Global};+use uzu::engine::Engine;++struct GlobalEngine(Engine);++impl Global for GlobalEngine {}++pub fn init(+ cx: &mut App,+ engine: Engine,+) {+ cx.set_global(GlobalEngine(engine));+}++pub fn try_engine(cx: &App) -> Option<Engine> {+ cx.try_global::<GlobalEngine>().map(|g| g.0.clone())+}diff --git a/apps/mirai/mirai-app/src/engine_capabilities.rs b/apps/mirai/mirai-app/src/engine_capabilities.rsnew file mode 100644index 000000000..e3add9630--- /dev/null+++ b/apps/mirai/mirai-app/src/engine_capabilities.rs@@ -0,0 +1,2 @@+pub const TEXT_TO_SPEECH: bool = false;+pub const CLASSIFICATION: bool = false;diff --git a/apps/mirai/mirai-app/src/instructions_card.rs b/apps/mirai/mirai-app/src/instructions_card.rsnew file mode 100644index 000000000..08de3b686--- /dev/null+++ b/apps/mirai/mirai-app/src/instructions_card.rs@@ -0,0 +1,106 @@+use gpui::{+ Context, CursorStyle, ElementId, Entity, FontWeight, IntoElement, Render, SharedString, Window, div, prelude::*,+};++use crate::{+ components::{Icon, IconEl, InputEvent, TextInput},+ persistence,+ theme::ActiveTheme,+ tokens,+};++pub struct InstructionsCard {+ element_id: ElementId,+ input: Entity<TextInput>,+ open: bool,+}++impl InstructionsCard {+ pub fn new(+ cx: &mut Context<Self>,+ element_id: impl Into<ElementId>,+ placeholder: impl Into<SharedString>,+ ) -> Self {+ let input = cx.new(|cx| TextInput::new(cx, placeholder).multiline(false, 3, 6));+ let current = persistence::global_instructions();+ if !current.is_empty() {+ input.update(cx, |input, cx| input.set_text(current, cx));+ }+ cx.subscribe(&input, |_this, _input, event, _cx| match event {+ InputEvent::Submit(text) | InputEvent::Changed(text) => persistence::set_global_instructions(text),+ })+ .detach();+ Self {+ element_id: element_id.into(),+ input,+ open: false,+ }+ }+}++impl Render for InstructionsCard {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let open = self.open;++ let header = div()+ .id(self.element_id.clone())+ .flex()+ .items_center()+ .gap_3()+ .px_4()+ .py_3()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(|this, _, _, cx| {+ this.open = !this.open;+ if this.open {+ let current = persistence::global_instructions();+ this.input.update(cx, |input, cx| input.set_text(¤t, cx));+ }+ cx.notify();+ }))+ .child(IconEl::new(Icon::Plus, theme.text).size(tokens::icon::MD).rotate(if open {+ 45.+ } else {+ 0.+ }))+ .child(+ div()+ .flex()+ .flex_col()+ .child(+ div()+ .text_sm()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text)+ .child("Add instructions to all chats"),+ )+ .child(div().text_xs().text_color(theme.text_muted).child("Tailor the way the model responds")),+ );++ let mut card = div().w_full().rounded_lg().border_1().border_color(theme.border).bg(theme.card).child(header);++ if open {+ card = card.child(+ div().px_4().pb_3().child(+ div()+ .w_full()+ .px_3()+ .py_2()+ .rounded_md()+ .border_1()+ .border_color(theme.border)+ .bg(theme.bg)+ .child(self.input.clone()),+ ),+ );+ }+ card+ }+}diff --git a/apps/mirai/mirai-app/src/main.rs b/apps/mirai/mirai-app/src/main.rsnew file mode 100644index 000000000..dec140ee5--- /dev/null+++ b/apps/mirai/mirai-app/src/main.rs@@ -0,0 +1,81 @@+mod app_shell;+mod assets;+mod data_ops;+mod device_info;+mod engine;+mod engine_capabilities;+mod instructions_card;+mod menu_bar;+mod model_recommend;+mod model_sort;+mod models_store;+mod native_dialog;+mod persistence;+mod provider_keys;+mod screens;+mod settings_state;+mod startup;+mod text;+mod title_gen;+mod toast;+mod tts_history;+use std::sync::Arc;++use gpui::{App, KeyBinding, Menu, MenuItem, actions};+use gpui_platform::application;+use gpui_tokio::Tokio;+use reqwest_client::ReqwestClient;+pub(crate) use ui_kit::{components, theme, tokens};+use uzu::engine::{Engine, EngineConfig};++actions!(mirai, [Quit]);++fn main() {+ let app = application().with_http_client(Arc::new(ReqwestClient::new())).with_assets(assets::Assets::new());+ app.on_reopen(|cx| {+ if cx.windows().is_empty() {+ app_shell::open_window(cx);+ } else {+ cx.activate(true);+ }+ });+ app.run(move |cx: &mut App| {+ theme::init(cx);+ settings_state::init(cx);+ if let Some(enabled) = startup::status() {+ let mut s = settings_state::current(cx);+ if s.run_on_startup != enabled {+ s.run_on_startup = enabled;+ settings_state::set(cx, s);+ }+ }+ toast::init(cx);+ components::text_input::register(cx);++ cx.on_action(|_: &Quit, cx: &mut App| cx.quit());+ cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);+ cx.set_menus([Menu::new("Mirai").items([MenuItem::action("Quit Mirai", Quit)])]);++ gpui_tokio::init(cx);+ let engine = Tokio::handle(cx).block_on(async {+ let mut config =+ EngineConfig::default().with_application_identifier(provider_keys::APPLICATION_ID.to_string());+ if config.mirai_api_key.is_none()+ && let Some(key) = option_env!("MIRAI_BUNDLED_API_KEY")+ {+ config = config.with_mirai_api_key(key.to_string());+ }+ Engine::new(config).await+ });+ match engine {+ Ok(engine) => {+ engine.set_usage_reporting(settings_state::current(cx).share_usage_data);+ engine::init(cx, engine);+ },+ Err(error) => eprintln!("uzu engine init failed: {error}"),+ }++ menu_bar::init(cx);+ app_shell::open_window(cx);+ });+}diff --git a/apps/mirai/mirai-app/src/menu_bar/mod.rs b/apps/mirai/mirai-app/src/menu_bar/mod.rsnew file mode 100644index 000000000..51815f5e6--- /dev/null+++ b/apps/mirai/mirai-app/src/menu_bar/mod.rs@@ -0,0 +1,116 @@+mod tray_action;++use std::time::Duration;++use gpui::{App, AsyncApp, Global, WeakEntity};+pub use tray_action::TrayAction;+use tray_icon::{+ Icon, TrayIcon, TrayIconBuilder,+ menu::{Menu, MenuEvent, MenuItem, PredefinedMenuItem},+};++use crate::{+ app_shell::{self, MiraiApp},+ settings_state,+};++const OPEN: &str = "mirai.open";+const NEW_CHAT: &str = "mirai.new_chat";+const OPEN_CHATS: &str = "mirai.open_chats";+const SETTINGS: &str = "mirai.settings";+const QUIT: &str = "mirai.quit";++#[derive(Default)]+struct MenuBar {+ tray: Option<TrayIcon>,+ app: Option<WeakEntity<MiraiApp>>,+}+impl Global for MenuBar {}++pub fn init(cx: &mut App) {+ cx.set_global(MenuBar::default());+ cx.spawn(async move |cx: &mut AsyncApp| {+ loop {+ cx.background_executor().timer(Duration::from_millis(250)).await;+ cx.update(tick);+ }+ })+ .detach();+}++pub fn register_app(+ cx: &mut App,+ app: WeakEntity<MiraiApp>,+) {+ if !cx.has_global::<MenuBar>() {+ cx.set_global(MenuBar::default());+ }+ cx.global_mut::<MenuBar>().app = Some(app);+}++fn tick(cx: &mut App) {+ let want = settings_state::current(cx).show_in_menu_bar;+ {+ let mb = cx.global_mut::<MenuBar>();+ if want && mb.tray.is_none() {+ mb.tray = build();+ } else if !want {+ mb.tray = None;+ }+ }+ while let Ok(event) = MenuEvent::receiver().try_recv() {+ match event.id.0.as_str() {+ QUIT => cx.quit(),+ OPEN => focus_window(cx, None),+ NEW_CHAT => focus_window(cx, Some(TrayAction::NewChat)),+ OPEN_CHATS => focus_window(cx, Some(TrayAction::OpenChats)),+ SETTINGS => focus_window(cx, Some(TrayAction::Settings)),+ _ => {},+ }+ }+}++fn focus_window(+ cx: &mut App,+ action: Option<TrayAction>,+) {+ if cx.windows().is_empty() {+ app_shell::open_window(cx);+ }+ cx.activate(true);+ let Some(action) = action else {+ return;+ };+ let app = cx.global::<MenuBar>().app.clone().and_then(|app| app.upgrade());+ if let Some(app) = app {+ app.update(cx, |app, cx| app.handle_tray_action(action, cx));+ }+}++fn build() -> Option<TrayIcon> {+ let menu = Menu::new();+ menu.append_items(&[+ &MenuItem::with_id(OPEN, "Open Mirai", true, None),+ &PredefinedMenuItem::separator(),+ &MenuItem::with_id(NEW_CHAT, "New Chat", true, None),+ &MenuItem::with_id(OPEN_CHATS, "Open Chats", true, None),+ &MenuItem::with_id(SETTINGS, "Settings", true, None),+ &PredefinedMenuItem::separator(),+ &MenuItem::with_id(QUIT, "Quit Mirai", true, None),+ ])+ .ok()?;++ TrayIconBuilder::new()+ .with_menu(Box::new(menu))+ .with_tooltip("Mirai")+ .with_icon_as_template(true)+ .with_icon(icon()?)+ .build()+ .ok()+}++fn icon() -> Option<Icon> {+ let rgba = image::load_from_memory(include_bytes!("../../assets/icons/tray.png")).ok()?.to_rgba8();+ let (w, h) = rgba.dimensions();+ Icon::from_rgba(rgba.into_raw(), w, h).ok()+}diff --git a/apps/mirai/mirai-app/src/menu_bar/tray_action.rs b/apps/mirai/mirai-app/src/menu_bar/tray_action.rsnew file mode 100644index 000000000..762108391--- /dev/null+++ b/apps/mirai/mirai-app/src/menu_bar/tray_action.rs@@ -0,0 +1,6 @@+#[derive(Clone, Copy)]+pub enum TrayAction {+ NewChat,+ OpenChats,+ Settings,+}diff --git a/apps/mirai/mirai-app/src/model_recommend.rs b/apps/mirai/mirai-app/src/model_recommend.rsnew file mode 100644index 000000000..b2fe31857--- /dev/null+++ b/apps/mirai/mirai-app/src/model_recommend.rs@@ -0,0 +1,23 @@+use std::env;++use reqwest::Client;+use uzu::device::Device;++#[derive(serde::Deserialize)]+struct RecommendResponse {+ #[serde(rename = "repoId")]+ repo_id: Option<String>,+}++pub async fn fetch_repo_id() -> Option<String> {+ let base =+ env::var("SDK_API_BASE").or_else(|_| env::var("MIRAI_SDK_API_BASE")).ok()?.trim_end_matches('/').to_string();+ let mem = Device::create().ok()?.memory_total;+ let version = env::var("ENGINE_VERSION").ok().filter(|v| !v.trim().is_empty());+ let path = version.as_ref().map(|v| format!("models/recommend/{v}")).unwrap_or_else(|| "models/recommend".into());+ let url = format!("{base}/{path}");+ let client = Client::new();+ let res = client.get(url).query(&[("mem", mem)]).send().await.ok()?;+ let body: RecommendResponse = res.json().await.ok()?;+ body.repo_id.filter(|id| !id.is_empty())+}diff --git a/apps/mirai/mirai-app/src/model_sort.rs b/apps/mirai/mirai-app/src/model_sort.rsnew file mode 100644index 000000000..ea687e137--- /dev/null+++ b/apps/mirai/mirai-app/src/model_sort.rs@@ -0,0 +1,60 @@+use std::cmp::Ordering;++#[derive(Clone, Copy, PartialEq, Eq, Default)]+pub enum ModelSort {+ #[default]+ Size,+ Name,+ Newest,+}++impl ModelSort {+ pub fn label(self) -> &'static str {+ match self {+ Self::Size => "Size",+ Self::Name => "Name",+ Self::Newest => "Newest",+ }+ }+}++pub fn sort_by_name(+ a: &str,+ b: &str,+) -> Ordering {+ a.to_lowercase().cmp(&b.to_lowercase())+}++pub fn sort_by_newest(+ a: &str,+ b: &str,+) -> Ordering {+ fn score(name: &str) -> (i64, i64) {+ let params = parse_params(name).map(|p| (p * 1000.0) as i64).unwrap_or(0);+ let dated = name+ .split(['-', '_'])+ .filter_map(|t| t.parse::<i64>().ok())+ .filter(|n| (10_000..1_000_000).contains(n))+ .max()+ .unwrap_or(0);+ (params, dated)+ }+ score(b).cmp(&score(a)).then_with(|| sort_by_name(a, b))+}++pub fn parse_params(name: &str) -> Option<f64> {+ for raw in name.split([' ', '-']) {+ let token = raw.trim();+ if let Some(num) = token.strip_suffix('B').or_else(|| token.strip_suffix('b'))+ && let Ok(v) = num.parse::<f64>()+ {+ return Some(v * 1000.0);+ }+ if let Some(num) = token.strip_suffix('M').or_else(|| token.strip_suffix('m'))+ && let Ok(v) = num.parse::<f64>()+ {+ return Some(v);+ }+ }+ None+}diff --git a/apps/mirai/mirai-app/src/models_store/mod.rs b/apps/mirai/mirai-app/src/models_store/mod.rsnew file mode 100644index 000000000..d672ac8c5--- /dev/null+++ b/apps/mirai/mirai-app/src/models_store/mod.rs@@ -0,0 +1,227 @@+mod model_kind;+mod model_row;++use std::{collections::HashMap, fs, path::PathBuf};++use futures::{StreamExt, channel::mpsc};+use gpui::Context;+use gpui_tokio::Tokio;+pub use model_kind::ModelKind;+pub use model_row::ModelRow;+use uzu::{+ storage::types::{DownloadPhase, DownloadState},+ types::model::Model,+};++use crate::{+ engine, persistence,+ toast::{self, ToastKind},+};++pub struct ModelsStore {+ pub rows: Vec<ModelRow>,+ pub loading: bool,+ pub error: Option<String>,+ installed_at: HashMap<String, u64>,+}++impl ModelsStore {+ pub fn new(+ kind: ModelKind,+ cx: &mut Context<Self>,+ ) -> Self {+ Self::spawn_load(kind, cx);+ Self::spawn_watch(cx);+ Self {+ rows: Vec::new(),+ loading: true,+ error: None,+ installed_at: load_installed_at(),+ }+ }++ pub fn installed_at(+ &self,+ id: &str,+ ) -> u64 {+ self.installed_at.get(id).copied().unwrap_or(0)+ }++ pub fn resolve_installed(+ &self,+ selected: Option<&Model>,+ ) -> Option<Model> {+ if let Some(model) = selected+ && self.rows.iter().any(|r| r.model.identifier == model.identifier && r.is_installed())+ {+ return Some(model.clone());+ }+ self.rows.iter().find(|r| r.is_installed()).map(|r| r.model.clone())+ }++ pub fn installed_model_by_id(+ &self,+ id: &str,+ ) -> Option<Model> {+ self.rows.iter().find(|row| row.id() == id && row.is_installed()).map(|row| row.model.clone())+ }++ fn installed_at_path() -> PathBuf {+ persistence::mirai_data_dir().join("installed-at.json")+ }++ fn save_installed_at(map: &HashMap<String, u64>) {+ if fs::create_dir_all(persistence::mirai_data_dir()).is_ok()+ && let Ok(json) = serde_json::to_string(map)+ {+ let _ = fs::write(Self::installed_at_path(), json);+ }+ }++ fn spawn_load(+ kind: ModelKind,+ cx: &mut Context<Self>,+ ) {+ let Some(engine) = engine::try_engine(cx) else {+ cx.spawn(async move |this, cx| {+ let _ = this.update(cx, |store, cx| {+ store.loading = false;+ store.error = Some("Engine unavailable".to_string());+ cx.notify();+ });+ })+ .detach();+ return;+ };+ let task = Tokio::spawn_result(cx, async move {+ let models = engine.models().await?;+ let states = engine.download_states().await;+ let rows: Vec<ModelRow> = models+ .into_iter()+ .filter(|m| kind.matches(m))+ .map(|model| {+ let state = states.get(&model.identifier).cloned();+ ModelRow {+ model,+ state,+ }+ })+ .collect();+ anyhow::Ok(rows)+ });+ cx.spawn(async move |this, cx| {+ let result = task.await;+ this.update(cx, |store, cx| {+ store.loading = false;+ match result {+ Ok(rows) => {+ store.rows = rows;+ store.error = None;+ },+ Err(err) => store.error = Some(err.to_string()),+ }+ cx.notify();+ })+ .ok();+ })+ .detach();+ }++ fn spawn_watch(cx: &mut Context<Self>) {+ let Some(engine) = engine::try_engine(cx) else {+ return;+ };+ let (tx, mut rx) = mpsc::unbounded::<(String, DownloadState)>();++ Tokio::spawn(cx, async move {+ let mut stream = engine.storage_subscribe().await;+ while let Some(item) = stream.next().await {+ if let Ok(event) = item+ && tx.unbounded_send(event).is_err()+ {+ break;+ }+ }+ })+ .detach();++ cx.spawn(async move |this, cx| {+ while let Some((id, state)) = rx.next().await {+ if this+ .update(cx, |store, cx| {+ if let Some(row) = store.rows.iter_mut().find(|r| r.id() == id) {+ let was_installed = row.is_installed();+ row.state = Some(state);+ let now_installed = row.is_installed();+ let just_installed = !was_installed && now_installed;+ if just_installed {+ store.installed_at.insert(id.clone(), persistence::now_ms());+ Self::save_installed_at(&store.installed_at);+ } else if was_installed && !now_installed {+ store.installed_at.remove(&id);+ Self::save_installed_at(&store.installed_at);+ }+ let downloaded_name = just_installed.then(|| row.name());+ cx.notify();+ if let Some(name) = downloaded_name {+ toast::push(cx, format!("{name} downloaded"), ToastKind::Success);+ }+ }+ })+ .is_err()+ {+ break;+ }+ }+ })+ .detach();+ }++ pub fn toggle_download(+ &mut self,+ id: String,+ cx: &mut Context<Self>,+ ) {+ let Some(engine) = engine::try_engine(cx) else {+ return;+ };+ let Some(model) = self.rows.iter().find(|r| r.id() == id).map(|r| r.model.clone()) else {+ return;+ };+ Tokio::spawn(cx, async move {+ let downloader = engine.downloader(&model);+ match downloader.state().await.map(|s| s.phase) {+ Some(DownloadPhase::Downloading {}) => {+ let _ = downloader.pause().await;+ },++ _ => {+ let _ = downloader.resume().await;+ },+ }+ })+ .detach();+ }++ pub fn delete(+ &mut self,+ id: String,+ cx: &mut Context<Self>,+ ) {+ let Some(engine) = engine::try_engine(cx) else {+ return;+ };+ let Some(model) = self.rows.iter().find(|r| r.id() == id).map(|r| r.model.clone()) else {+ return;+ };+ Tokio::spawn(cx, async move {+ let _ = engine.downloader(&model).delete().await;+ })+ .detach();+ }+}++fn load_installed_at() -> HashMap<String, u64> {+ let path = ModelsStore::installed_at_path();+ fs::read_to_string(path).ok().and_then(|s| serde_json::from_str(&s).ok()).unwrap_or_default()+}diff --git a/apps/mirai/mirai-app/src/models_store/model_kind.rs b/apps/mirai/mirai-app/src/models_store/model_kind.rsnew file mode 100644index 000000000..f10dc3ad7--- /dev/null+++ b/apps/mirai/mirai-app/src/models_store/model_kind.rs@@ -0,0 +1,24 @@+use uzu::types::model::Model;++#[derive(Clone, Copy, PartialEq, Eq)]+pub enum ModelKind {+ Chat,++ CloudChat,+ Classification,+ TextToSpeech,+}++impl ModelKind {+ pub(super) fn matches(+ self,+ model: &Model,+ ) -> bool {+ match self {+ ModelKind::Chat => model.is_chat_capable() && model.is_local(),+ ModelKind::CloudChat => model.is_chat_capable() && model.is_remote(),+ ModelKind::Classification => model.is_classification_capable(),+ ModelKind::TextToSpeech => model.is_text_to_speech_capable(),+ }+ }+}diff --git a/apps/mirai/mirai-app/src/models_store/model_row.rs b/apps/mirai/mirai-app/src/models_store/model_row.rsnew file mode 100644index 000000000..7309ad20b--- /dev/null+++ b/apps/mirai/mirai-app/src/models_store/model_row.rs@@ -0,0 +1,66 @@+use uzu::{+ storage::types::{DownloadPhase, DownloadState},+ types::{+ basic::{Image, ImageTheme},+ model::Model,+ },+};++pub struct ModelRow {+ pub model: Model,+ pub state: Option<DownloadState>,+}++impl ModelRow {+ pub fn id(&self) -> &str {+ &self.model.identifier+ }++ pub fn name(&self) -> String {+ self.model.name()+ }++ pub fn vendor(&self) -> Option<String> {+ self.model.family.as_ref().map(|f| f.vendor.name())+ }++ pub fn icon_url(+ &self,+ prefer_dark: bool,+ ) -> Option<String> {+ let icons = &self.model.family.as_ref()?.vendor.metadata.icons;+ let want = if prefer_dark {+ ImageTheme::Dark+ } else {+ ImageTheme::Light+ };+ let is_svg = |i: &&Image| i.url.ends_with(".svg");+ icons+ .iter()+ .find(|i| i.theme == want && is_svg(i))+ .or_else(|| icons.iter().find(is_svg))+ .or_else(|| icons.iter().find(|i| i.theme == want))+ .or_else(|| icons.first())+ .map(|i| i.url.clone())+ }++ pub fn size_bytes(&self) -> i64 {+ self.model.properties.as_ref().map(|p| p.size).unwrap_or(0)+ }++ pub fn display_size_bytes(&self) -> i64 {+ self.state.as_ref().map(|s| s.total_bytes).filter(|b| *b > 0).unwrap_or_else(|| self.size_bytes())+ }++ pub fn phase(&self) -> DownloadPhase {+ self.state.as_ref().map(|s| s.phase.clone()).unwrap_or(DownloadPhase::NotDownloaded {})+ }++ pub fn progress(&self) -> f32 {+ self.state.as_ref().map(|s| s.progress()).unwrap_or(0.0)+ }++ pub fn is_installed(&self) -> bool {+ matches!(self.phase(), DownloadPhase::Downloaded {}) || (self.model.is_local() && !self.model.is_downloadable())+ }+}diff --git a/apps/mirai/mirai-app/src/native_dialog.rs b/apps/mirai/mirai-app/src/native_dialog.rsnew file mode 100644index 000000000..f0a3379ad--- /dev/null+++ b/apps/mirai/mirai-app/src/native_dialog.rs@@ -0,0 +1,17 @@+use std::path::{Path, PathBuf};++pub fn save_file(+ title: &str,+ default_name: &str,+ extension: &str,+ type_label: &str,+) -> Option<PathBuf> {+ rfd::FileDialog::new().set_title(title).set_file_name(default_name).add_filter(type_label, &[extension]).save_file()+}++pub fn write_bytes(+ path: &Path,+ data: &[u8],+) -> bool {+ std::fs::write(path, data).is_ok()+}diff --git a/apps/mirai/mirai-app/src/persistence.rs b/apps/mirai/mirai-app/src/persistence.rsnew file mode 100644index 000000000..6a371cde8--- /dev/null+++ b/apps/mirai/mirai-app/src/persistence.rs@@ -0,0 +1,473 @@+use std::{+ cmp::Reverse,+ collections::HashSet,+ fs,+ path::{Path, PathBuf},+ time::{SystemTime, UNIX_EPOCH},+};++use serde::{Deserialize, Serialize};++#[derive(Serialize, Deserialize, Clone)]+pub struct StoredMessage {+ pub role: String,+ pub text: String,+ #[serde(default)]+ pub reasoning: Option<String>,+ #[serde(default)]+ pub tps: Option<f32>,+ #[serde(default)]+ pub tokens: Option<u32>,+ #[serde(default)]+ pub ttft: Option<f32>,+ #[serde(default)]+ pub total_time: Option<f32>,+}++#[derive(Serialize, Deserialize, Clone)]+pub struct StoredChat {+ pub id: String,+ pub title: String,+ #[serde(default)]+ pub model_name: Option<String>,++ #[serde(default)]+ pub model_id: Option<String>,+ pub created_at: u64,+ pub updated_at: u64,+ pub messages: Vec<StoredMessage>,+}++fn mirai_dir() -> PathBuf {+ dirs::data_dir().unwrap_or_else(|| PathBuf::from(".")).join("Mirai")+}++pub fn mirai_data_dir() -> PathBuf {+ mirai_dir()+}++pub fn chats_dir() -> PathBuf {+ mirai_dir().join("chats")+}++fn welcome_marker_path() -> PathBuf {+ mirai_dir().join("welcomed")+}++fn settings_path() -> PathBuf {+ mirai_dir().join("settings.json")+}++pub fn has_seen_welcome() -> bool {+ welcome_marker_path().exists()+}++pub fn set_seen_welcome() {+ if fs::create_dir_all(mirai_dir()).is_ok() {+ let _ = fs::write(welcome_marker_path(), b"1");+ }+}++#[derive(Serialize, Deserialize, Clone)]+pub struct AppSettings {+ #[serde(default = "default_true")]+ pub dark_mode: bool,+ #[serde(default = "default_true")]+ pub reasoning: bool,+ #[serde(default)]+ pub run_on_startup: bool,+ #[serde(default)]+ pub show_in_menu_bar: bool,+ #[serde(default)]+ pub auto_eject: bool,+ #[serde(default = "default_idle_timeout")]+ pub idle_timeout_minutes: u32,+ #[serde(default)]+ pub share_usage_data: bool,+}++fn default_true() -> bool {+ true+}++fn default_idle_timeout() -> u32 {+ 2+}++impl Default for AppSettings {+ fn default() -> Self {+ Self {+ dark_mode: true,+ reasoning: true,+ run_on_startup: false,+ show_in_menu_bar: false,+ auto_eject: false,+ idle_timeout_minutes: 2,+ share_usage_data: false,+ }+ }+}++pub fn load_settings() -> AppSettings {+ fs::read(settings_path()).ok().and_then(|bytes| serde_json::from_slice(&bytes).ok()).unwrap_or_default()+}++pub fn save_settings(settings: &AppSettings) {+ if fs::create_dir_all(mirai_dir()).is_ok()+ && let Ok(json) = serde_json::to_string_pretty(settings)+ {+ let _ = fs::write(settings_path(), json);+ }+}++pub(crate) fn global_instructions_path() -> PathBuf {+ chats_dir().join("global-instructions.txt")+}++pub fn now_ms() -> u64 {+ SystemTime::now().duration_since(UNIX_EPOCH).map(|d| d.as_millis() as u64).unwrap_or(0)+}++fn file_mtime_ms(path: &Path) -> u64 {+ fs::metadata(path)+ .and_then(|m| m.modified())+ .ok()+ .and_then(|t| t.duration_since(UNIX_EPOCH).ok())+ .map(|d| d.as_millis() as u64)+ .unwrap_or(0)+}++pub fn save_chat(chat: &StoredChat) {+ let dir = chats_dir();+ if fs::create_dir_all(&dir).is_err() {+ return;+ }+ if let Ok(json) = serde_json::to_string_pretty(chat) {+ let _ = fs::write(dir.join(format!("{}.json", chat.id)), json);+ }++ let _ = fs::write(dir.join(format!("{}.md", chat.id)), serialize_markdown(chat));+}++pub fn load_chat(id: &str) -> Option<StoredChat> {+ let dir = chats_dir();+ if let Ok(bytes) = fs::read(dir.join(format!("{id}.json")))+ && let Ok(chat) = serde_json::from_slice(&bytes)+ {+ return Some(chat);+ }++ let md_path = dir.join(format!("{id}.md"));+ let text = fs::read_to_string(&md_path).ok()?;+ parse_markdown(&text, id, file_mtime_ms(&md_path))+}++pub fn delete_chat(id: &str) {+ let dir = chats_dir();+ let _ = fs::remove_file(dir.join(format!("{id}.json")));+ let _ = fs::remove_file(dir.join(format!("{id}.md")));+}++pub fn rename_chat(+ id: &str,+ title: &str,+) -> bool {+ let Some(mut chat) = load_chat(id) else {+ return false;+ };+ chat.title = title.to_string();+ chat.updated_at = now_ms();+ save_chat(&chat);+ true+}++pub fn list_chats() -> Vec<StoredChat> {+ let dir = chats_dir();+ let mut chats: Vec<StoredChat> = Vec::new();+ let mut seen: HashSet<String> = HashSet::new();++ if let Ok(entries) = fs::read_dir(&dir) {+ for entry in entries.flatten() {+ let path = entry.path();+ if path.extension().and_then(|e| e.to_str()) == Some("json")+ && let Ok(bytes) = fs::read(&path)+ && let Ok(chat) = serde_json::from_slice::<StoredChat>(&bytes)+ {+ seen.insert(chat.id.clone());+ chats.push(chat);+ }+ }+ }+ if let Ok(entries) = fs::read_dir(&dir) {+ for entry in entries.flatten() {+ let path = entry.path();+ if path.extension().and_then(|e| e.to_str()) != Some("md") {+ continue;+ }+ let Some(stem) = path.file_stem().and_then(|s| s.to_str()) else {+ continue;+ };+ if seen.contains(stem) {+ continue;+ }+ if let Ok(text) = fs::read_to_string(&path)+ && let Some(chat) = parse_markdown(&text, stem, file_mtime_ms(&path))+ {+ chats.push(chat);+ }+ }+ }+ chats.sort_by_key(|chat| Reverse(chat.updated_at));+ chats+}++pub fn global_instructions() -> String {+ fs::read_to_string(global_instructions_path()).unwrap_or_default()+}++pub fn set_global_instructions(text: &str) {+ let dir = chats_dir();+ if fs::create_dir_all(&dir).is_ok() {+ let _ = fs::write(global_instructions_path(), text);+ }+}++pub fn serialize_markdown(chat: &StoredChat) -> String {+ let date = fmt_utc(chat.created_at);+ let mut out = String::new();+ out.push_str(&format!("# {}\n\n", chat.title));+ out.push_str(&format!("**Model:** {}\n", chat.model_name.as_deref().unwrap_or("Unknown")));+ out.push_str(&format!("**Created:** {}\n", fmt_utc(chat.created_at)));+ out.push_str(&format!("**Updated:** {}\n", fmt_utc(chat.updated_at)));+ out.push_str(&format!("**Messages:** {}\n\n---\n\n", chat.messages.len()));++ for (i, m) in chat.messages.iter().enumerate() {+ let (icon, who) = if m.role == "assistant" {+ ("🤖", "Assistant")+ } else {+ ("👤", "User")+ };+ let model = if m.role == "assistant" {+ chat.model_name.as_deref().map(|n| format!(" ({n})")).unwrap_or_default()+ } else {+ String::new()+ };+ out.push_str(&format!("## {icon} {who}{model} - {date}\n\n"));+ out.push_str(&format!("<!-- ID: msg-{i} -->\n"));++ let mut perf: Vec<String> = Vec::new();+ if let Some(tps) = m.tps.filter(|v| *v > 0.0) {+ perf.push(format!("**TPS:** {}", tps.round() as i64));+ }+ if let Some(tok) = m.tokens.filter(|v| *v > 0) {+ perf.push(format!("**TokensOut:** {tok}"));+ }+ if !perf.is_empty() {+ out.push_str("<!-- START_PERF -->\n");+ for line in &perf {+ out.push_str(line);+ out.push('\n');+ }+ out.push_str("<!-- END_PERF -->\n");+ }+ if let Some(cot) = m.reasoning.as_deref().filter(|s| !s.is_empty()) {+ out.push_str("<!-- START_COT -->\n");+ out.push_str(cot);+ out.push_str("\n<!-- END_COT -->\n");+ }+ out.push_str("<!-- START_CONTENT -->\n");+ out.push_str(&m.text);+ out.push_str("\n<!-- END_CONTENT -->\n\n---\n\n");+ }+ out+}++pub fn parse_markdown(+ md: &str,+ id: &str,+ fallback_ms: u64,+) -> Option<StoredChat> {+ let title = first_line_prefixed(md, "# ")?.trim().to_string();+ let model_name = first_line_prefixed(md, "**Model:** ").map(|s| s.trim().to_string()).filter(|s| s != "Unknown");+ let created_at = first_line_prefixed(md, "**Created:** ").and_then(parse_utc).unwrap_or(fallback_ms);+ let updated_at = first_line_prefixed(md, "**Updated:** ").and_then(parse_utc).unwrap_or(fallback_ms);++ let mut messages = Vec::new();+ for block in message_blocks(md) {+ let role = if block.starts_with("## 🤖") {+ "assistant"+ } else {+ "user"+ };+ let scope = active_version_slice(block);+ let Some(text) = between(scope, "<!-- START_CONTENT -->\n", "\n<!-- END_CONTENT -->") else {+ continue;+ };+ let reasoning = between(scope, "<!-- START_COT -->\n", "\n<!-- END_COT -->")+ .map(|s| s.to_string())+ .filter(|s| !s.is_empty());+ messages.push(StoredMessage {+ role: role.to_string(),+ text: text.to_string(),+ reasoning,+ tps: perf_value(scope, "TPS").map(|v| v as f32),+ tokens: perf_value(scope, "TokensOut").map(|v| v as u32),++ ttft: None,+ total_time: None,+ });+ }+ if messages.is_empty() {+ return None;+ }+ Some(StoredChat {+ id: id.to_string(),+ title,+ model_name,++ model_id: None,+ created_at,+ updated_at,+ messages,+ })+}++fn first_line_prefixed<'a>(+ md: &'a str,+ prefix: &str,+) -> Option<&'a str> {+ md.lines().find_map(|l| l.strip_prefix(prefix))+}++fn between<'a>(+ text: &'a str,+ start: &str,+ end: &str,+) -> Option<&'a str> {+ let s = text.find(start)? + start.len();+ let e = text[s..].find(end)? + s;+ Some(&text[s..e])+}++fn message_blocks(md: &str) -> Vec<&str> {+ let mut starts = Vec::new();+ let mut idx = 0;+ for line in md.split_inclusive('\n') {+ let t = line.trim_end_matches('\n');+ if t.starts_with("## 👤") || t.starts_with("## 🤖") {+ starts.push(idx);+ }+ idx += line.len();+ }+ starts.iter().enumerate().map(|(i, &s)| &md[s..starts.get(i + 1).copied().unwrap_or(md.len())]).collect()+}++fn active_version_slice(block: &str) -> &str {+ if !block.contains("#### Version") {+ return block;+ }+ let mut starts = Vec::new();+ let mut idx = 0;+ for line in block.split_inclusive('\n') {+ if line.trim_end().starts_with("#### Version") {+ starts.push(idx);+ }+ idx += line.len();+ }+ let seg = |i: usize| &block[starts[i]..starts.get(i + 1).copied().unwrap_or(block.len())];+ let active = (0..starts.len()).find(|&i| seg(i).contains("⭐ ACTIVE")).unwrap_or(0);+ if starts.is_empty() {+ block+ } else {+ seg(active)+ }+}++fn perf_value(+ text: &str,+ label: &str,+) -> Option<f64> {+ let needle = format!("**{label}:** ");+ text.lines()+ .find_map(|l| l.trim().strip_prefix(needle.as_str()))+ .and_then(|v| v.trim().trim_end_matches('s').parse::<f64>().ok())+}++pub fn fmt_utc(ms: u64) -> String {+ let secs = (ms / 1000) as i64;+ let (y, m, d) = civil_from_days(secs.div_euclid(86_400));+ let rem = secs.rem_euclid(86_400);+ format!("{y:04}-{m:02}-{d:02} {:02}:{:02} UTC", rem / 3600, (rem % 3600) / 60)+}++fn parse_utc(s: &str) -> Option<u64> {+ let s = s.trim().trim_end_matches("UTC").trim();+ let (date, time) = s.split_once(' ')?;+ let mut dp = date.split('-');+ let y: i64 = dp.next()?.parse().ok()?;+ let mo: i64 = dp.next()?.parse().ok()?;+ let d: i64 = dp.next()?.parse().ok()?;+ let mut tp = time.split(':');+ let h: i64 = tp.next()?.parse().ok()?;+ let mi: i64 = tp.next()?.parse().ok()?;+ let secs = days_from_civil(y, mo, d) * 86_400 + h * 3600 + mi * 60;+ (secs >= 0).then(|| secs as u64 * 1000)+}++fn civil_from_days(z: i64) -> (i64, u32, u32) {+ let z = z + 719_468;+ let era = if z >= 0 {+ z+ } else {+ z - 146_096+ } / 146_097;+ let doe = z - era * 146_097;+ let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365;+ let y = yoe + era * 400;+ let doy = doe - (365 * yoe + yoe / 4 - yoe / 100);+ let mp = (5 * doy + 2) / 153;+ let d = (doy - (153 * mp + 2) / 5 + 1) as u32;+ let m = if mp < 10 {+ mp + 3+ } else {+ mp - 9+ } as u32;+ (+ if m <= 2 {+ y + 1+ } else {+ y+ },+ m,+ d,+ )+}++fn days_from_civil(+ y: i64,+ m: i64,+ d: i64,+) -> i64 {+ let y = if m <= 2 {+ y - 1+ } else {+ y+ };+ let era = if y >= 0 {+ y+ } else {+ y - 399+ } / 400;+ let yoe = y - era * 400;+ let doy =+ (153 * (if m > 2 {+ m - 3+ } else {+ m + 9+ }) + 2)+ / 5+ + d+ - 1;+ let doe = yoe * 365 + yoe / 4 - yoe / 100 + doy;+ era * 146_097 + doe - 719_468+}diff --git a/apps/mirai/mirai-app/src/provider_keys.rs b/apps/mirai/mirai-app/src/provider_keys.rsnew file mode 100644index 000000000..8fa3185a2--- /dev/null+++ b/apps/mirai/mirai-app/src/provider_keys.rs@@ -0,0 +1 @@+pub const APPLICATION_ID: &str = "Mirai";diff --git a/apps/mirai/mirai-app/src/screens/chat/chat_turn.rs b/apps/mirai/mirai-app/src/screens/chat/chat_turn.rsnew file mode 100644index 000000000..70a1e114f--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/chat_turn.rs@@ -0,0 +1,39 @@+use super::{role::Role, version::Version};++pub(super) struct ChatTurn {+ pub role: Role,+ pub versions: Vec<Version>,+ pub current: usize,+ pub reasoning_collapsed: bool,+}++impl ChatTurn {+ pub(super) fn user(text: String) -> Self {+ Self {+ role: Role::User,+ versions: vec![Version {+ text,+ ..Default::default()+ }],+ current: 0,+ reasoning_collapsed: false,+ }+ }++ pub(super) fn assistant(version: Version) -> Self {+ Self {+ role: Role::Assistant,+ versions: vec![version],+ current: 0,+ reasoning_collapsed: false,+ }+ }++ pub(super) fn cur(&self) -> &Version {+ &self.versions[self.current]+ }++ pub(super) fn cur_mut(&mut self) -> &mut Version {+ &mut self.versions[self.current]+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/conversation.rs b/apps/mirai/mirai-app/src/screens/chat/conversation.rsnew file mode 100644index 000000000..ad84a6437--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/conversation.rs@@ -0,0 +1,6 @@+use super::{chat_turn::ChatTurn, role::Role};++pub(super) fn conversation_for_request(messages: &[ChatTurn]) -> Vec<(Role, String)> {+ let upto = messages.len().saturating_sub(1);+ messages[..upto].iter().filter(|m| !m.cur().error).map(|m| (m.role, m.cur().text.clone())).collect()+}diff --git a/apps/mirai/mirai-app/src/screens/chat/event.rs b/apps/mirai/mirai-app/src/screens/chat/event.rsnew file mode 100644index 000000000..7998bee68--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/event.rs@@ -0,0 +1,4 @@+pub enum ChatEvent {+ Updated,+ OpenLocalModels,+}diff --git a/apps/mirai/mirai-app/src/screens/chat/gen_settings.rs b/apps/mirai/mirai-app/src/screens/chat/gen_settings.rsnew file mode 100644index 000000000..b8bec65d4--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/gen_settings.rs@@ -0,0 +1,253 @@+use gpui::{AnyElement, Context, FontWeight, IntoElement, black, div, prelude::*, px};++use super::{+ params::{param_checkbox, param_row, round2, slider_param},+ sampling::SamplingMode,+ state::ChatState,+ view::{ChatView, dark_icon_url},+};+use crate::{+ components::{Icon, IconButton, IconEl, SegmentedControl, Toggle, VendorIcon},+ settings_state,+ theme::{ActiveTheme, Theme},+ tokens,+};++impl ChatView {+ pub(super) fn gen_settings_overlay(+ &self,+ cx: &mut Context<Self>,+ ) -> Option<AnyElement> {+ if !self.state.gen_settings_open {+ return None;+ }+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let border = theme.border;+ let fg = theme.text;++ let mode_row = div().flex().flex_col().gap_1().child(div().text_sm().text_color(fg).child("Sampling")).child(+ SegmentedControl::new("sampling-mode", self.state.sampling_mode as usize)+ .segment(+ "Default",+ cx.listener(|this, _, _, cx| {+ this.state.sampling_mode = SamplingMode::Default;+ cx.notify();+ }),+ )+ .segment(+ "Argmax",+ cx.listener(|this, _, _, cx| {+ this.state.sampling_mode = SamplingMode::Argmax;+ cx.notify();+ }),+ )+ .segment(+ "Stochastic",+ cx.listener(|this, _, _, cx| {+ this.state.sampling_mode = SamplingMode::Stochastic;+ cx.notify();+ }),+ ),+ );++ let resolved = self.resolved_model(cx);+ let model_name = resolved.as_ref().map(|m| m.name()).unwrap_or_else(|| "No model".to_string());+ let vendor = resolved.as_ref().and_then(|m| m.family.as_ref().map(|f| f.vendor.name())).unwrap_or_default();+ let icon_url = resolved.as_ref().and_then(dark_icon_url);+ let reasoning_on = settings_state::current(cx).reasoning;++ let header = div()+ .flex()+ .items_center()+ .justify_between()+ .child(div().text_lg().font_weight(FontWeight::SEMIBOLD).text_color(fg).child("Edit parameters"))+ .child(+ IconButton::new("gen-close", Icon::Close)+ .color(theme.text_muted)+ .icon_size(16.)+ .hit_size(28.)+ .on_click(cx.listener(|this, _, _, cx| {+ this.state.gen_settings_open = false;+ cx.notify();+ })),+ );++ let model_row = div()+ .flex()+ .items_center()+ .gap_2()+ .child(VendorIcon::new(vendor).size(tokens::icon::XL).icon_url(icon_url))+ .child(div().flex_1().min_w_0().truncate().text_sm().text_color(fg).child(model_name))+ .child(IconEl::new(Icon::ChevronDown, theme.text_muted).size(tokens::icon::MD));++ let reasoning_row = div()+ .flex()+ .items_center()+ .justify_between()+ .child(div().text_sm().text_color(fg).child("Reasoning"))+ .child(Toggle::new("gen-reasoning", reasoning_on).on_click(|_, _, cx| {+ let mut s = settings_state::current(cx);+ s.reasoning = !s.reasoning;+ settings_state::set(cx, s);+ }));++ let mut card = div()+ .occlude()+ .absolute()+ .top_0()+ .right_0()+ .bottom_0()+ .w(px(380.))+ .flex()+ .flex_col()+ .gap_4()+ .p_5()+ .bg(theme.bg)+ .border_l_1()+ .border_color(theme.border)+ .child(header)+ .child(model_row)+ .child(mode_row);++ if self.state.sampling_mode == SamplingMode::Stochastic {+ card = card+ .child(self.param_slider(+ cx,+ &theme,+ "Temperature",+ "temp-slider",+ round2(self.state.temperature).to_string(),+ (self.state.temperature / 2.0).clamp(0., 1.),+ None,+ |state, frac| state.temperature = round2(frac * 2.0),+ ))+ .child(self.param_slider(+ cx,+ &theme,+ "Top K",+ "topk-slider",+ self.state.top_k.to_string(),+ (self.state.top_k as f32 / 200.0).clamp(0., 1.),+ None,+ |state, frac| state.top_k = (frac * 200.0).round() as u32,+ ));++ let top_p_toggle = self.param_toggle(cx, &theme, "topp-cb", self.state.top_p > 0.0, |state| {+ state.top_p = if state.top_p > 0.0 {+ 0.0+ } else {+ 0.95+ };+ });+ card = card.child(self.param_slider(+ cx,+ &theme,+ "Top P",+ "topp-slider",+ round2(self.state.top_p).to_string(),+ self.state.top_p.clamp(0., 1.),+ Some(top_p_toggle),+ |state, frac| state.top_p = round2(frac),+ ));++ let min_p_toggle = self.param_toggle(cx, &theme, "minp-cb", self.state.min_p > 0.0, |state| {+ state.min_p = if state.min_p > 0.0 {+ 0.0+ } else {+ 0.05+ };+ });+ card = card.child(self.param_slider(+ cx,+ &theme,+ "Min P",+ "minp-slider",+ round2(self.state.min_p).to_string(),+ self.state.min_p.clamp(0., 1.),+ Some(min_p_toggle),+ |state, frac| state.min_p = round2(frac),+ ));+ }++ card = card.child(div().h_px().bg(border)).child(reasoning_row);++ let tokens_str = if self.state.max_tokens == 0 {+ "∞".to_string()+ } else {+ self.state.max_tokens.to_string()+ };+ card = card.child(param_row(+ "Max tokens",+ tokens_str,+ "tok-dec",+ "tok-inc",+ border,+ fg,+ hover,+ cx.listener(|this, _, _, cx| {+ this.state.max_tokens = this.state.max_tokens.saturating_sub(128);+ cx.notify();+ }),+ cx.listener(|this, _, _, cx| {+ this.state.max_tokens = (this.state.max_tokens + 128).min(8192);+ cx.notify();+ }),+ ));++ Some(+ div()+ .id("gen-settings-backdrop")+ .absolute()+ .size_full()+ .bg(black().opacity(0.4))+ .occlude()+ .on_click(cx.listener(|this, _, _, cx| {+ this.state.gen_settings_open = false;+ cx.notify();+ }))+ .child(card)+ .into_any_element(),+ )+ }++ #[allow(clippy::too_many_arguments)]+ fn param_slider(+ &self,+ cx: &mut Context<Self>,+ theme: &Theme,+ label: &'static str,+ id: &'static str,+ value_text: String,+ fraction: f32,+ checkbox: Option<AnyElement>,+ set: fn(&mut ChatState, f32),+ ) -> AnyElement {+ let view = cx.entity();+ slider_param(label, checkbox, value_text, fraction, id, theme, move |frac, _, cx| {+ view.update(cx, |this, cx| {+ set(&mut this.state, frac);+ cx.notify();+ });+ })+ .into_any_element()+ }++ fn param_toggle(+ &self,+ cx: &mut Context<Self>,+ theme: &Theme,+ id: &'static str,+ on: bool,+ toggle: fn(&mut ChatState),+ ) -> AnyElement {+ let view = cx.entity();+ param_checkbox(id, on, theme, move |_, _, cx| {+ view.update(cx, |this, cx| {+ toggle(&mut this.state);+ cx.notify();+ });+ })+ .into_any_element()+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/mod.rs b/apps/mirai/mirai-app/src/screens/chat/mod.rsnew file mode 100644index 000000000..c41c32c07--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/mod.rs@@ -0,0 +1,16 @@+mod chat_turn;+mod conversation;+mod event;+mod gen_settings;+mod overlays;+mod params;+mod reveal_pacer;+mod role;+mod sampling;+mod state;+mod stream;+mod version;+mod view;++pub use event::ChatEvent;+pub use view::ChatView;diff --git a/apps/mirai/mirai-app/src/screens/chat/overlays.rs b/apps/mirai/mirai-app/src/screens/chat/overlays.rsnew file mode 100644index 000000000..2bc7a9097--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/overlays.rs@@ -0,0 +1,320 @@+use gpui::{Anchor, App, Context, FontWeight, IntoElement, anchored, deferred, div, prelude::*, px};+use uzu::types::model::Model;++use super::{event::ChatEvent, version::Version, view::ChatView};+use crate::{+ components::{Icon, IconEl, VendorIcon},+ theme::ActiveTheme,+ toast::{self, ToastKind},+};++type ModelEntry = (String, Model, String, String, Option<String>);++fn model_entry(r: &crate::models_store::ModelRow) -> ModelEntry {+ (r.id().to_string(), r.model.clone(), r.name(), r.vendor().unwrap_or_default(), r.icon_url(true))+}++impl ChatView {+ fn pick_file(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ const MAX_SIZE: u64 = 256 * 1024;+ const MAX_FILES: usize = 5;+ const SUPPORTED: &[&str] = &[+ "txt", "md", "markdown", "json", "csv", "tsv", "yaml", "yml", "py", "js", "ts", "tsx", "jsx", "rs", "html",+ "css", "xml",+ ];++ if self.state.attached_files.len() >= MAX_FILES {+ toast::push(cx, "Maximum 5 files per message", ToastKind::Info);+ return;+ }+ let remaining_slots = MAX_FILES - self.state.attached_files.len();++ let rx = cx.prompt_for_paths(gpui::PathPromptOptions {+ files: true,+ directories: false,+ multiple: true,+ prompt: Some("Attach text file".into()),+ });++ cx.spawn(async move |this, cx| {+ let Ok(Ok(Some(paths))) = rx.await else {+ return;+ };+ for path in paths.iter().take(remaining_slots) {+ let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("txt").to_lowercase();+ if !SUPPORTED.contains(&ext.as_str()) {+ let _ = this.update(cx, |_, cx| {+ toast::push(cx, format!("Unsupported file type: .{ext}"), ToastKind::Info);+ });+ continue;+ }+ let meta = std::fs::metadata(path);+ if meta.map(|m| m.len()).unwrap_or(0) > MAX_SIZE {+ let _ = this.update(cx, |_, cx| {+ toast::push(cx, "File too large (max 256 KB)", ToastKind::Info);+ });+ continue;+ }+ match std::fs::read_to_string(path) {+ Ok(content) => {+ let name = path.file_name().and_then(|n| n.to_str()).unwrap_or("file").to_string();+ let _ = this.update(cx, |this, cx| {+ if this.state.attached_files.len() < MAX_FILES {+ this.state.attached_files.push((name, ext, content));+ cx.notify();+ }+ });+ },+ Err(_) => {+ let _ = this.update(cx, |_, cx| {+ toast::push(cx, "Could not read file", ToastKind::Info);+ });+ },+ }+ }+ })+ .detach();+ }++ fn collect_model_entries(+ &self,+ cx: &App,+ ) -> (Vec<ModelEntry>, Vec<ModelEntry>) {+ let local = self.store.read(cx).rows.iter().filter(|r| r.is_installed()).map(model_entry).collect();+ let cloud = self.cloud_store.read(cx).rows.iter().map(model_entry).collect();+ (local, cloud)+ }++ pub(super) fn anchored_popover(+ panel: impl gpui::IntoElement + 'static,+ corner: Anchor,+ close: impl Fn(&mut Self, &gpui::MouseDownEvent, &mut gpui::Window, &mut gpui::Context<Self>) + 'static,+ cx: &mut Context<Self>,+ ) -> gpui::AnyElement {+ deferred(+ anchored()+ .anchor(corner)+ .snap_to_window_with_margin(px(8.))+ .child(div().on_mouse_down_out(cx.listener(close)).child(panel)),+ )+ .priority(1)+ .into_any_element()+ }++ fn picker_row(+ &self,+ cx: &mut Context<Self>,+ entry: ModelEntry,+ is_local: bool,+ hover: gpui::Hsla,+ for_message: Option<usize>,+ ) -> gpui::AnyElement {+ let (id, model, name, vendor, icon_url) = entry;+ let theme = cx.theme().clone();++ let badge =+ div().flex_none().text_size(crate::tokens::font::SMALL).text_color(theme.text_muted).child(if is_local {+ "Local"+ } else {+ "Cloud"+ });++ div()+ .id(gpui::SharedString::from(format!("pick-{id}")))+ .flex()+ .items_center()+ .gap_3()+ .w_full()+ .px_4()+ .h(px(48.))+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .child(VendorIcon::new(vendor).size(crate::tokens::icon::XXL).icon_url(icon_url))+ .child(div().flex_1().min_w_0().text_sm().text_color(theme.text).child(name))+ .child(badge)+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(msg_idx) = for_message {+ this.regenerate_at_with_model(msg_idx, Some(model.clone()), cx);+ } else {+ if this.state.streaming {+ this.cancel_stream();+ }+ this.state.model = Some(model.clone());+ this.clear_session();+ this.close_popovers();+ cx.notify();+ }+ }))+ .into_any_element()+ }++ pub(super) fn model_picker_panel(+ &self,+ cx: &mut Context<Self>,+ for_message: Option<usize>,+ ) -> gpui::AnyElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let (local, cloud) = self.collect_model_entries(cx);++ let mut list = div().id("model-picker-list").flex().flex_col().gap_2().max_h(px(360.)).overflow_y_scroll();+ if local.is_empty() && cloud.is_empty() {+ list = list+ .child(div().px(px(14.)).py_2().text_sm().text_color(theme.text_muted).child("No models available"));+ } else {+ for entry in local {+ list = list.child(self.picker_row(cx, entry, true, hover, for_message));+ }+ for entry in cloud {+ list = list.child(self.picker_row(cx, entry, false, hover, for_message));+ }+ }++ div()+ .occlude()+ .w(px(520.))+ .flex()+ .flex_col()+ .rounded_xl()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .child(div().py_2().child(list))+ .child(div().h_px().bg(theme.border))+ .child(+ div()+ .id("model-picker-more")+ .flex()+ .items_center()+ .justify_between()+ .w_full()+ .px_4()+ .h(px(48.))+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ this.state.pending_regen = for_message;+ this.close_popovers();+ cx.emit(ChatEvent::OpenLocalModels);+ cx.notify();+ }))+ .child(div().text_sm().text_color(theme.text).child("More local models"))+ .child(IconEl::new(Icon::ChevronRight, theme.text_muted).size(crate::tokens::icon::MD)),+ )+ .into_any_element()+ }++ pub(super) fn performance_panel(+ &self,+ msg_idx: usize,+ cur: &Version,+ cx: &mut Context<Self>,+ ) -> Option<gpui::AnyElement> {+ if self.state.perf_open_msg != Some(msg_idx) {+ return None;+ }+ let theme = cx.theme().clone();+ let tps = cur+ .tps+ .filter(|value| value.is_finite())+ .map(|value| (value.round() as i64).to_string())+ .unwrap_or_else(|| "—".into());+ let format_seconds = |seconds: Option<f32>| {+ seconds.filter(|value| value.is_finite()).map(|value| format!("{value:.3}s")).unwrap_or_else(|| "—".into())+ };+ let ttft = format_seconds(cur.ttft);+ let total = format_seconds(cur.total_time);+ let stat = |value: String, label: &'static str| {+ div()+ .flex()+ .flex_col()+ .items_center()+ .gap_1()+ .child(+ div()+ .text_size(crate::tokens::font::HEADING)+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text)+ .child(value),+ )+ .child(div().text_size(crate::tokens::font::CAPTION).text_color(theme.text_muted).child(label))+ };+ let sep = || div().w_px().h(px(40.)).bg(theme.border).self_center();+ Some(+ div()+ .occlude()+ .py_4()+ .px_6()+ .rounded_xl()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .child(+ div()+ .flex()+ .items_center()+ .gap_6()+ .child(stat(ttft, "T to 1st token"))+ .child(sep())+ .child(stat(tps, "№ of t/s"))+ .child(sep())+ .child(stat(total, "Total time")),+ )+ .into_any_element(),+ )+ }++ pub(super) fn file_upload_panel(+ &self,+ cx: &mut Context<Self>,+ ) -> Option<gpui::AnyElement> {+ if !self.state.file_upload_open {+ return None;+ }+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ Some(+ div()+ .occlude()+ .rounded_md()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .p(px(6.))+ .child(+ div()+ .id("file-upload-option")+ .flex()+ .items_center()+ .gap_2()+ .w(px(300.))+ .px(px(14.))+ .py_2()+ .rounded_md()+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(|this, _, _, cx| {+ this.state.file_upload_open = false;+ this.pick_file(cx);+ }))+ .child(IconEl::new(Icon::Rename, theme.text_muted).size(crate::tokens::icon::MD))+ .child(+ div()+ .flex()+ .flex_col()+ .child(div().text_sm().text_color(theme.text).child("Upload a file"))+ .child(+ div()+ .text_size(crate::tokens::font::CAPTION)+ .text_color(theme.text_muted)+ .child("TXT · MD · JSON · CSV · YAML · PY · JS · TS · RS"),+ ),+ ),+ )+ .into_any_element(),+ )+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/params.rs b/apps/mirai/mirai-app/src/screens/chat/params.rsnew file mode 100644index 000000000..fb8c53f27--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/params.rs@@ -0,0 +1,131 @@+use gpui::{AnyElement, App, ClickEvent, CursorStyle, Hsla, IntoElement, Window, div, prelude::*, px};++use crate::{+ components::{Icon, IconEl, Slider},+ theme::Theme,+};++fn step_button(+ id: &'static str,+ symbol: &'static str,+ border: Hsla,+ fg: Hsla,+ hover: Hsla,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+) -> impl IntoElement {+ div()+ .id(id)+ .w(px(24.))+ .h(px(24.))+ .flex()+ .items_center()+ .justify_center()+ .rounded_md()+ .border_1()+ .border_color(border)+ .text_color(fg)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(handler)+ .child(symbol)+}++pub(super) fn round2(v: f32) -> f32 {+ (v * 100.0).round() / 100.0+}++fn value_box(+ text: String,+ theme: &Theme,+) -> impl IntoElement {+ div()+ .min_w(px(76.))+ .px_3()+ .py_1p5()+ .rounded_md()+ .border_1()+ .border_color(theme.border)+ .bg(theme.bg)+ .text_sm()+ .text_color(theme.text)+ .child(text)+}++pub(super) fn param_checkbox(+ id: &'static str,+ checked: bool,+ theme: &Theme,+ on_click: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+) -> impl IntoElement {+ let mut b = div()+ .id(id)+ .size(px(18.))+ .flex_none()+ .rounded(crate::tokens::radius::SM)+ .border_1()+ .border_color(theme.border)+ .flex()+ .items_center()+ .justify_center()+ .cursor(CursorStyle::PointingHand)+ .on_click(on_click);+ if checked {+ b = b.bg(theme.text).child(IconEl::new(Icon::Check, theme.bg).size(crate::tokens::icon::XS));+ }+ b+}++#[allow(clippy::too_many_arguments)]+pub(super) fn slider_param(+ label: &'static str,+ checkbox: Option<AnyElement>,+ value_text: String,+ frac: f32,+ slider_id: &'static str,+ theme: &Theme,+ on_change: impl Fn(f32, &mut Window, &mut App) + 'static,+) -> impl IntoElement {+ div()+ .flex()+ .flex_col()+ .gap_2()+ .child(+ div()+ .flex()+ .items_center()+ .justify_between()+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(div().text_sm().text_color(theme.text).child(label))+ .children(checkbox),+ )+ .child(value_box(value_text, theme)),+ )+ .child(Slider::new(slider_id, frac).on_change(on_change))+}++#[allow(clippy::too_many_arguments)]+pub(super) fn param_row(+ label: &str,+ value: String,+ dec_id: &'static str,+ inc_id: &'static str,+ border: Hsla,+ fg: Hsla,+ hover: Hsla,+ on_dec: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ on_inc: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+) -> impl IntoElement {+ div().flex().items_center().justify_between().child(div().text_sm().text_color(fg).child(label.to_string())).child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(step_button(dec_id, "−", border, fg, hover, on_dec))+ .child(div().w(px(44.)).text_color(fg).child(value))+ .child(step_button(inc_id, "+", border, fg, hover, on_inc)),+ )+}diff --git a/apps/mirai/mirai-app/src/screens/chat/reveal_pacer.rs b/apps/mirai/mirai-app/src/screens/chat/reveal_pacer.rsnew file mode 100644index 000000000..8a08929b9--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/reveal_pacer.rs@@ -0,0 +1,204 @@+const WARMUP_SECONDS: f32 = 0.2;+const MAX_REVEAL_PER_SECOND: f32 = 600.0;+const MIN_ELAPSED_SECONDS: f32 = 0.05;++pub(super) struct RevealPacer {+ revealed: f32,+ elapsed: f32,+ show_all: bool,+}++impl Default for RevealPacer {+ fn default() -> Self {+ Self::shown()+ }+}++impl RevealPacer {+ pub(super) fn shown() -> Self {+ Self {+ revealed: 0.0,+ elapsed: 0.0,+ show_all: true,+ }+ }++ pub(super) fn streaming() -> Self {+ Self {+ revealed: 0.0,+ elapsed: 0.0,+ show_all: false,+ }+ }++ pub(super) fn revealed_chars(&self) -> usize {+ if self.show_all {+ usize::MAX+ } else {+ self.revealed as usize+ }+ }++ pub(super) fn advance(+ &mut self,+ received: usize,+ dt: f32,+ done: bool,+ ) -> bool {+ if self.show_all {+ return false;+ }+ if received > 0 {+ self.elapsed += dt;+ }+ if !done && self.elapsed < WARMUP_SECONDS {+ return true;+ }+ let received = received as f32;+ let rate = (received / self.elapsed.max(MIN_ELAPSED_SECONDS)).min(MAX_REVEAL_PER_SECOND);+ self.revealed = (self.revealed + rate * dt).min(received);+ !done || self.revealed < received+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ const DT: f32 = 0.016;+ const MAX_STEP: usize = (MAX_REVEAL_PER_SECOND * DT) as usize + 1;++ struct Trace {+ revealed: Vec<usize>,+ received: Vec<usize>,+ }++ fn run(+ received_at_frame: impl Fn(usize) -> usize,+ frames: usize,+ done_frame: usize,+ ) -> Trace {+ let mut pacer = RevealPacer::streaming();+ let mut revealed = Vec::with_capacity(frames);+ let mut received = Vec::with_capacity(frames);+ for frame in 0..frames {+ let got = received_at_frame(frame);+ pacer.advance(got, DT, frame >= done_frame);+ revealed.push(pacer.revealed_chars());+ received.push(got);+ }+ Trace {+ revealed,+ received,+ }+ }++ fn max_step(revealed: &[usize]) -> usize {+ revealed.windows(2).map(|w| w[1] - w[0]).max().unwrap_or(0)+ }++ fn max_zero_run_with_pending(trace: &Trace) -> usize {+ let mut run = 0usize;+ let mut worst = 0usize;+ for frame in 1..trace.revealed.len() {+ let pending = trace.received[frame] > trace.revealed[frame];+ let stalled = trace.revealed[frame] == trace.revealed[frame - 1];+ if pending && stalled {+ run += 1;+ worst = worst.max(run);+ } else {+ run = 0;+ }+ }+ worst+ }++ fn assert_never_exceeds_received(trace: &Trace) {+ for frame in 0..trace.revealed.len() {+ assert!(+ trace.revealed[frame] <= trace.received[frame],+ "frame {frame}: revealed {} > received {}",+ trace.revealed[frame],+ trace.received[frame]+ );+ }+ }++ fn assert_monotonic(revealed: &[usize]) {+ for frame in 1..revealed.len() {+ assert!(revealed[frame] >= revealed[frame - 1], "reveal went backwards at frame {frame}");+ }+ }++ fn coefficient_of_variation(samples: &[f32]) -> f32 {+ let mean = samples.iter().sum::<f32>() / samples.len() as f32;+ if mean <= 0.0 {+ return 0.0;+ }+ let variance = samples.iter().map(|s| (s - mean).powi(2)).sum::<f32>() / samples.len() as f32;+ variance.sqrt() / mean+ }++ #[test]+ fn bursty_arrival_never_stalls() {+ // 60 chars arrive every 10 frames (~160ms gaps); the standing buffer must bridge the gaps.+ let trace = run(|frame| (frame / 10 + 1) * 60, 200, 200);+ assert_monotonic(&trace.revealed);+ assert_never_exceeds_received(&trace);+ let warm = Trace {+ revealed: trace.revealed[30..].to_vec(),+ received: trace.received[30..].to_vec(),+ };+ assert!(max_zero_run_with_pending(&warm) <= 2, "stall detected: {}", max_zero_run_with_pending(&warm));+ assert!(max_step(&trace.revealed) <= MAX_STEP, "chunky jump: {}", max_step(&trace.revealed));+ }++ #[test]+ fn constant_speed_under_bursty_arrival() {+ // The key property: bursty INPUT must produce a steady OUTPUT rate, not one that lurches up and down.+ let trace = run(|frame| (frame / 10 + 1) * 60, 200, 200);+ let windows: Vec<f32> =+ (20..160).step_by(10).map(|frame| (trace.revealed[frame + 10] - trace.revealed[frame]) as f32).collect();+ let cv = coefficient_of_variation(&windows);+ assert!(cv < 0.2, "reveal speed varies too much across windows (cv={cv:.3})");+ }++ #[test]+ fn steady_arrival_is_smooth() {+ let trace = run(|frame| frame * 5, 200, 200);+ assert_monotonic(&trace.revealed);+ assert_never_exceeds_received(&trace);+ assert!(max_step(&trace.revealed) <= MAX_STEP, "chunky jump: {}", max_step(&trace.revealed));+ // Skip the ~0.2s warmup (reveal is intentionally 0 while the cushion builds; the loader shows).+ let warm = Trace {+ revealed: trace.revealed[30..].to_vec(),+ received: trace.received[30..].to_vec(),+ };+ assert!(max_zero_run_with_pending(&warm) <= 2, "stall: {}", max_zero_run_with_pending(&warm));+ }++ #[test]+ fn completes_after_done_without_dumping() {+ // Whole message present immediately, stream already done: reveal as a smooth typewriter, no dump.+ let trace = run(|_| 1000, 160, 0);+ assert_monotonic(&trace.revealed);+ assert!(max_step(&trace.revealed) <= MAX_STEP, "dumped {} chars in one frame", max_step(&trace.revealed));+ assert_eq!(*trace.revealed.last().unwrap(), 1000, "did not finish revealing");+ }++ #[test]+ fn drains_remaining_buffer_after_generation_stops() {+ // Fast generation for 40 frames, then stops and is marked done; the leftover buffer must drain.+ let trace = run(|frame| frame.min(40) * 20, 160, 40);+ assert_never_exceeds_received(&trace);+ assert_eq!(*trace.revealed.last().unwrap(), 800, "buffer not drained after done");+ assert!(max_step(&trace.revealed) <= MAX_STEP, "chunky drain: {}", max_step(&trace.revealed));+ }++ #[test]+ fn reveal_lags_generation_by_a_bounded_amount() {+ let trace = run(|frame| frame * 6, 300, 300);+ let worst_lag = (30..trace.revealed.len()).map(|f| trace.received[f] - trace.revealed[f]).max().unwrap_or(0);+ assert!(worst_lag <= 200, "reveal lagged generation by {worst_lag} chars");+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/role.rs b/apps/mirai/mirai-app/src/screens/chat/role.rsnew file mode 100644index 000000000..6d0e6e774--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/role.rs@@ -0,0 +1,5 @@+#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum Role {+ User,+ Assistant,+}diff --git a/apps/mirai/mirai-app/src/screens/chat/sampling.rs b/apps/mirai/mirai-app/src/screens/chat/sampling.rsnew file mode 100644index 000000000..cc575b426--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/sampling.rs@@ -0,0 +1,29 @@+use uzu::types::basic::SamplingMethod;++#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum SamplingMode {+ Default,+ Argmax,+ Stochastic,+}++pub(super) fn sampling_method(+ mode: SamplingMode,+ temperature: f32,+ top_k: u32,+ top_p: f32,+ min_p: f32,+) -> Option<SamplingMethod> {+ match mode {+ SamplingMode::Default => None,+ SamplingMode::Argmax => Some(SamplingMethod::Greedy {}),+ SamplingMode::Stochastic => Some(SamplingMethod::Stochastic {+ temperature: Some(temperature as f64),+ top_k: (top_k > 0).then_some(top_k as i64),+ top_p: (top_p > 0.0).then_some(top_p as f64),+ min_p: (min_p > 0.0).then_some(min_p as f64),+ repetition_penalty: None,+ suffix_repetition_length: None,+ }),+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/state.rs b/apps/mirai/mirai-app/src/screens/chat/state.rsnew file mode 100644index 000000000..9d9ca2a41--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/state.rs@@ -0,0 +1,41 @@+use uzu::{+ session::chat::ChatSession,+ types::{basic::CancelToken, model::Model},+};++use super::{chat_turn::ChatTurn, reveal_pacer::RevealPacer, sampling::SamplingMode};+use crate::components::markdown::ParsedMarkdown;++pub(super) struct ChatState {+ pub messages: Vec<ChatTurn>,+ pub model: Option<Model>,+ pub streaming: bool,+ pub waiting_for_model: bool,+ pub cancel: Option<CancelToken>,+ pub stream_gen: u64,+ pub reveal: RevealPacer,+ pub stream_parsed: Option<ParsedMarkdown>,+ pub stream_stable_len: usize,+ pub stream_parse_in_flight: bool,+ pub stream_parse_pending: bool,+ pub chat_id: Option<String>,+ pub created_at: u64,+ pub model_picker_open: bool,+ pub msg_model_picker_open: Option<usize>,+ pub pending_regen: Option<usize>,+ pub perf_open_msg: Option<usize>,+ pub file_upload_open: bool,+ pub attached_files: Vec<(String, String, String)>,+ pub loaded_model: Option<String>,+ pub gen_settings_open: bool,+ pub sampling_mode: SamplingMode,+ pub temperature: f32,+ pub top_k: u32,+ pub top_p: f32,+ pub min_p: f32,+ pub max_tokens: u32,+ pub chat_title: String,+ pub title_pending: bool,+ pub session: Option<ChatSession>,+ pub session_model_id: Option<String>,+}diff --git a/apps/mirai/mirai-app/src/screens/chat/stream.rs b/apps/mirai/mirai-app/src/screens/chat/stream.rsnew file mode 100644index 000000000..d0f561a85--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/stream.rs@@ -0,0 +1,464 @@+use std::fmt::Write;++use futures::{StreamExt, channel::mpsc};+use gpui::Context;+use uzu::{+ session::chat::{ChatSession, ChatSessionStreamChunk},+ types::{+ basic::CancelToken,+ model::Model,+ session::chat::{ChatConfig, ChatMessage, ChatReplyConfig},+ },+};++use super::{+ chat_turn::ChatTurn, conversation::conversation_for_request, event::ChatEvent, reveal_pacer::RevealPacer,+ role::Role, sampling::sampling_method, version::Version, view::ChatView,+};+use crate::{components::markdown, engine, persistence, title_gen};++const REVEAL_INTERVAL: std::time::Duration = std::time::Duration::from_millis(16);++fn safe_split(prefix: &str) -> usize {+ let mut boundary = 0;+ let mut index = 0;+ while let Some(offset) = prefix[index..].find("\n\n") {+ let candidate = index + offset + 2;+ if prefix[..candidate].matches("```").count().is_multiple_of(2) {+ boundary = candidate;+ }+ index = candidate;+ }+ boundary+}++pub(super) enum StreamMsg {+ Started(CancelToken),+ Session(ChatSession, String),+ DropSession,+ Update {+ text: String,+ reasoning: Option<String>,+ tps: Option<f32>,+ tokens: Option<u32>,+ ttft: Option<f32>,+ total_time: Option<f32>,+ },+ Done,+ Error(String),+}++impl ChatView {+ pub(super) fn send(+ &mut self,+ text: String,+ cx: &mut Context<Self>,+ ) {+ if self.state.streaming {+ return;+ }+ self.last_active = std::time::Instant::now();+ let text = text.trim().to_string();+ if text.is_empty() && self.state.attached_files.is_empty() {+ return;+ }++ let full_text = if self.state.attached_files.is_empty() {+ text+ } else {+ let mut combined = text;+ for (name, extension, content) in self.state.attached_files.drain(..) {+ let _ = write!(combined, "\n\n```{extension}\n# {name}\n{content}\n```");+ }+ combined+ };+ let first_user = !self.state.messages.iter().any(|m| m.role == Role::User);+ self.state.messages.push(ChatTurn::user(full_text));+ if first_user {+ self.state.title_pending = true;+ }+ self.run_inference(cx);+ }++ fn run_inference(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let model_name = self.state.model.as_ref().map(|m| m.name());+ self.state.messages.push(ChatTurn::assistant(Version {+ model_name,+ ..Default::default()+ }));+ self.state.streaming = true;+ self.state.waiting_for_model = true;+ self.spawn_reply(cx);+ }++ pub(super) fn regenerate_at_with_model(+ &mut self,+ msg_idx: usize,+ model: Option<Model>,+ cx: &mut Context<Self>,+ ) {+ if self.state.streaming {+ return;+ }+ let Some(msg) = self.state.messages.get(msg_idx) else {+ return;+ };+ if msg.role != Role::Assistant {+ return;+ }+ if let Some(model) = model {+ self.state.model = Some(model);+ self.clear_session();+ }+ self.state.messages.truncate(msg_idx + 1);+ let model_name = self.state.model.as_ref().map(|m| m.name());+ if let Some(last) = self.state.messages.last_mut() {+ last.versions.push(Version {+ model_name,+ ..Default::default()+ });+ last.current = last.versions.len() - 1;+ }+ self.close_popovers();+ self.state.streaming = true;+ self.state.waiting_for_model = true;+ self.spawn_reply(cx);+ }++ fn spawn_reply(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let Some(model) = self.resolved_model(cx) else {+ if let Some(last) = self.state.messages.last_mut() {+ let v = last.cur_mut();+ v.text = "No local model installed yet. Open Local Models to download one.".to_string();+ v.error = true;+ }+ self.state.streaming = false;+ cx.notify();+ return;+ };+ self.state.model = Some(model.clone());+ self.state.loaded_model = Some(model.name());++ let mut history: Vec<ChatMessage> = Vec::new();+ let instructions = persistence::global_instructions();+ if !instructions.trim().is_empty() {+ history.push(ChatMessage::system().with_text(instructions));+ }+ history.extend(conversation_for_request(&self.state.messages).into_iter().map(|(role, text)| match role {+ Role::User => ChatMessage::user().with_text(text),+ Role::Assistant => ChatMessage::assistant().with_text(text),+ }));++ let Some(engine) = engine::try_engine(cx) else {+ self.apply_stream(StreamMsg::Error("engine unavailable".to_string()), cx);+ return;+ };++ let method = sampling_method(+ self.state.sampling_mode,+ self.state.temperature,+ self.state.top_k,+ self.state.top_p,+ self.state.min_p,+ );+ let mut reply_config = ChatReplyConfig::default();+ if let Some(method) = method {+ reply_config = reply_config.with_sampling_method(method);+ }+ let reply_config = reply_config.with_token_limit((self.state.max_tokens > 0).then_some(self.state.max_tokens));++ let model_id = model.identifier.clone();+ let cached_session = self.cached_session(&model_id);++ self.state.stream_gen = self.state.stream_gen.wrapping_add(1);+ let gen_id = self.state.stream_gen;+ self.state.reveal = RevealPacer::streaming();+ self.state.stream_parsed = None;+ self.state.stream_stable_len = 0;+ self.state.stream_parse_in_flight = false;+ self.state.stream_parse_pending = false;++ let (tx, mut rx) = mpsc::unbounded::<StreamMsg>();++ gpui_tokio::Tokio::spawn(cx, async move {+ let session = match cached_session {+ Some(session) => session,+ None => match engine.chat(model.clone(), ChatConfig::default()).await {+ Ok(session) => {+ let _ = tx.unbounded_send(StreamMsg::Session(session.clone(), model.identifier.clone()));+ session+ },+ Err(err) => {+ let _ = tx.unbounded_send(StreamMsg::Error(err.to_string()));+ return;+ },+ },+ };+ if let Err(err) = session.reset().await {+ let _ = tx.unbounded_send(StreamMsg::DropSession);+ let _ = tx.unbounded_send(StreamMsg::Error(format!("{err:?}")));+ return;+ }+ let stream = session.reply_with_stream(history, reply_config).await;+ let _ = tx.unbounded_send(StreamMsg::Started(stream.cancel_token()));+ while let Some(chunk) = stream.next().await {+ match chunk {+ ChatSessionStreamChunk::Replies {+ replies,+ } => {+ if let Some(reply) = replies.into_iter().next() {+ let _ = tx.unbounded_send(StreamMsg::Update {+ text: reply.message.text().unwrap_or_default(),+ reasoning: reply.message.reasoning(),+ tps: reply.stats.generate_tokens_per_second.map(|v| v as f32),+ tokens: reply.stats.tokens_count_output,+ ttft: reply.stats.time_to_first_token.map(|v| v as f32),+ total_time: Some(reply.stats.duration as f32),+ });+ }+ },+ ChatSessionStreamChunk::Error {+ error,+ } => {+ let _ = tx.unbounded_send(StreamMsg::Error(format!("{error:?}")));+ },+ }+ }+ let _ = tx.unbounded_send(StreamMsg::Done);+ })+ .detach();++ cx.spawn(async move |this, cx| {+ while let Some(message) = rx.next().await {+ let keep = this.update(cx, |view, cx| {+ if view.state.stream_gen != gen_id {+ return false;+ }+ view.apply_stream(message, cx);+ true+ });+ if !matches!(keep, Ok(true)) {+ break;+ }+ }+ })+ .detach();++ cx.spawn(async move |this, cx| {+ loop {+ cx.background_executor().timer(REVEAL_INTERVAL).await;+ let keep = this.update(cx, |view, cx| {+ if view.state.stream_gen != gen_id {+ return false;+ }+ view.advance_reveal(cx)+ });+ if !matches!(keep, Ok(true)) {+ break;+ }+ }+ })+ .detach();++ self.pin_to_bottom();+ cx.notify();+ }++ fn last_assistant_mut(&mut self) -> Option<&mut ChatTurn> {+ self.state.messages.last_mut().filter(|message| message.role == Role::Assistant)+ }++ fn advance_reveal(+ &mut self,+ cx: &mut Context<Self>,+ ) -> bool {+ let full = {+ let Some(message) = self.state.messages.last() else {+ return false;+ };+ if message.role != Role::Assistant {+ return false;+ }+ message.cur().text.chars().count()+ };+ let before = self.state.reveal.revealed_chars();+ let keep = self.state.reveal.advance(full, REVEAL_INTERVAL.as_secs_f32(), !self.state.streaming);+ if self.state.reveal.revealed_chars() != before {+ self.request_stream_parse(cx);+ if self.should_auto_scroll() {+ self.pin_to_bottom();+ }+ cx.notify();+ }+ keep+ }++ fn request_stream_parse(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ if self.state.stream_parse_in_flight {+ self.state.stream_parse_pending = true;+ return;+ }+ let Some(message) = self.state.messages.last() else {+ return;+ };+ if message.role != Role::Assistant {+ return;+ }+ let revealed: String = message.cur().text.chars().take(self.state.reveal.revealed_chars()).collect();+ let boundary = safe_split(&revealed);+ if boundary == 0 {+ return;+ }+ let stable = revealed[..boundary].to_string();+ self.state.stream_parse_in_flight = true;+ let gen_id = self.state.stream_gen;+ let parse_task = cx.background_executor().spawn(async move { markdown::parse(&stable) });+ cx.spawn(async move |this, cx| {+ let parsed = parse_task.await;+ let _ = this.update(cx, |view, cx| {+ if view.state.stream_gen != gen_id {+ return;+ }+ view.state.stream_parsed = Some(parsed);+ view.state.stream_stable_len = boundary;+ view.state.stream_parse_in_flight = false;+ cx.notify();+ if view.state.stream_parse_pending {+ view.state.stream_parse_pending = false;+ view.request_stream_parse(cx);+ }+ });+ })+ .detach();+ }++ fn apply_stream(+ &mut self,+ msg: StreamMsg,+ cx: &mut Context<Self>,+ ) {+ match msg {+ StreamMsg::Started(token) => {+ self.state.cancel = Some(token);+ self.state.waiting_for_model = false;+ },+ StreamMsg::Session(session, model_id) => {+ self.store_session(session, &model_id);+ },+ StreamMsg::DropSession => self.clear_session(),+ StreamMsg::Update {+ text,+ reasoning,+ tps,+ tokens,+ ttft,+ total_time,+ } => {+ if let Some(message) = self.last_assistant_mut() {+ let had_text = !message.cur().text.is_empty();+ let version = message.cur_mut();+ version.text = text;+ version.reasoning = reasoning;+ version.tps = tps;+ version.tokens = tokens;+ version.ttft = ttft;+ version.total_time = total_time;+ if !had_text && !message.cur().text.is_empty() {+ message.reasoning_collapsed = true;+ }+ }+ self.reasoning_scroll.scroll_to_bottom();+ cx.notify();+ },+ StreamMsg::Done => {+ self.state.streaming = false;+ self.state.waiting_for_model = false;+ self.state.cancel = None;+ self.last_active = std::time::Instant::now();+ if let Some(message) = self.last_assistant_mut() {+ let version = message.cur_mut();+ if !version.error && version.text.is_empty() {+ version.text = "(The model returned no text.)".to_string();+ version.error = true;+ }+ }+ self.save();+ cx.emit(ChatEvent::Updated);+ self.maybe_generate_title(cx);+ cx.notify();+ },+ StreamMsg::Error(err) => {+ if let Some(message) = self.last_assistant_mut() {+ let version = message.cur_mut();+ version.text = format!("Error: {err}");+ version.error = true;+ }+ self.state.streaming = false;+ self.state.waiting_for_model = false;+ self.state.cancel = None;+ self.save();+ cx.emit(ChatEvent::Updated);+ crate::toast::push(cx, "Inference failed", crate::toast::ToastKind::Error);+ cx.notify();+ },+ }+ }++ pub(super) fn stop(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.cancel_stream();+ cx.notify();+ }++ fn maybe_generate_title(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ if !self.state.title_pending {+ return;+ }+ let Some(model) = self.state.model.clone() else {+ return;+ };+ let Some(user_text) = self.state.messages.iter().find(|m| m.role == Role::User).map(|m| m.cur().text.clone())+ else {+ return;+ };+ self.state.title_pending = false;+ let chat_id = self.state.chat_id.clone();++ let Some(engine) = engine::try_engine(cx) else {+ return;+ };+ let (tx, mut rx) = mpsc::unbounded::<Result<String, String>>();+ gpui_tokio::Tokio::spawn(cx, async move {+ let _ = tx.unbounded_send(title_gen::run(&engine, model, &user_text).await);+ })+ .detach();+ cx.spawn(async move |this, cx| {+ if let Some(Ok(title)) = rx.next().await {+ let _ = this.update(cx, |view, cx| {+ if view.state.chat_id != chat_id {+ return;+ }+ view.state.chat_title = title;+ view.save();+ cx.emit(ChatEvent::Updated);+ cx.notify();+ });+ }+ })+ .detach();+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/version.rs b/apps/mirai/mirai-app/src/screens/chat/version.rsnew file mode 100644index 000000000..414709df2--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/version.rs@@ -0,0 +1,29 @@+use std::cell::RefCell;++use crate::components::markdown::ParsedMarkdown;++#[derive(Clone, Default)]+pub(super) struct Version {+ pub text: String,+ pub reasoning: Option<String>,+ pub tps: Option<f32>,+ pub tokens: Option<u32>,+ pub ttft: Option<f32>,+ pub total_time: Option<f32>,+ pub error: bool,+ pub model_name: Option<String>,+ pub parsed: RefCell<Option<(String, ParsedMarkdown)>>,+}++impl Version {+ pub(super) fn parsed_markdown(&self) -> std::cell::Ref<'_, ParsedMarkdown> {+ {+ let mut cache = self.parsed.borrow_mut();+ let stale = cache.as_ref().map(|(t, _)| t != &self.text).unwrap_or(true);+ if stale {+ *cache = Some((self.text.clone(), crate::components::markdown::parse(&self.text)));+ }+ }+ std::cell::Ref::map(self.parsed.borrow(), |c| &c.as_ref().unwrap().1)+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chat/view.rs b/apps/mirai/mirai-app/src/screens/chat/view.rsnew file mode 100644index 000000000..b14dcca07--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chat/view.rs@@ -0,0 +1,1002 @@+use std::time::{Duration, Instant};++use gpui::{+ Anchor, Animation, AnimationExt, Context, CursorStyle, Entity, EventEmitter, IntoElement, Render, ScrollHandle,+ SharedString, Window, div, prelude::*, px,+};+use uzu::{session::chat::ChatSession, types::model::Model};++use super::{+ chat_turn::ChatTurn, event::ChatEvent, reveal_pacer::RevealPacer, role::Role, sampling::SamplingMode,+ state::ChatState, version::Version,+};+use crate::{+ components::{Icon, IconButton, IconEl, InputEvent, Loader, TextInput, VendorIcon},+ models_store::ModelsStore,+ persistence::{self, StoredChat, StoredMessage},+ settings_state,+ text::truncate_with_ellipsis,+ theme::{ActiveTheme, FONT_MONO, layout::CONTENT_MAX_WIDTH},+ title_gen,+};++pub(super) fn dark_icon_url(model: &Model) -> Option<String> {+ let icons = &model.family.as_ref()?.vendor.metadata.icons;+ icons+ .iter()+ .find(|i| i.theme == uzu::types::basic::ImageTheme::Dark)+ .or_else(|| icons.first())+ .map(|i| i.url.clone())+}++pub struct ChatView {+ pub(super) state: ChatState,+ pub(super) store: Entity<ModelsStore>,++ pub(super) cloud_store: Entity<ModelsStore>,+ pub(super) input: Entity<TextInput>,+ pub(super) scroll: ScrollHandle,++ pub(super) reasoning_scroll: ScrollHandle,++ pub(super) pin_bottom_frames: u8,++ pub(super) last_active: Instant,+}++impl EventEmitter<ChatEvent> for ChatView {}++impl ChatView {+ pub fn new(+ store: Entity<ModelsStore>,+ cloud_store: Entity<ModelsStore>,+ cx: &mut Context<Self>,+ ) -> Self {+ let input = cx.new(|cx| TextInput::new(cx, "Add message…").multiline(true, 1, 8));+ cx.subscribe(&input, |this, input, event, cx| match event {+ InputEvent::Submit(text) => {+ if this.state.streaming {+ return;+ }+ let text = text.clone();+ input.update(cx, |input, cx| input.clear(cx));+ this.send(text, cx);+ },+ InputEvent::Changed(_) => {},+ })+ .detach();+ cx.observe(&store, |_, _, cx| cx.notify()).detach();+ cx.observe(&cloud_store, |_, _, cx| cx.notify()).detach();+ settings_state::observe(cx, |_, cx| cx.notify()).detach();++ cx.spawn(async move |this, cx| {+ loop {+ cx.background_executor().timer(Duration::from_secs(30)).await;+ if this.update(cx, |view, cx| view.maybe_auto_eject(cx)).is_err() {+ break;+ }+ }+ })+ .detach();+ Self {+ state: ChatState {+ messages: Vec::new(),+ model: None,+ streaming: false,+ waiting_for_model: false,+ cancel: None,+ stream_gen: 0,+ reveal: RevealPacer::shown(),+ stream_parsed: None,+ stream_stable_len: 0,+ stream_parse_in_flight: false,+ stream_parse_pending: false,+ chat_id: None,+ created_at: persistence::now_ms(),+ model_picker_open: false,+ msg_model_picker_open: None,+ pending_regen: None,+ perf_open_msg: None,+ file_upload_open: false,+ attached_files: Vec::new(),+ loaded_model: None,+ gen_settings_open: false,+ sampling_mode: SamplingMode::Default,+ temperature: 0.7,+ top_k: 40,+ top_p: 0.95,+ min_p: 0.05,+ max_tokens: 0,+ chat_title: String::new(),+ title_pending: false,+ session: None,+ session_model_id: None,+ },+ store,+ cloud_store,+ input,+ scroll: ScrollHandle::new(),+ reasoning_scroll: ScrollHandle::new(),+ pin_bottom_frames: 0,+ last_active: Instant::now(),+ }+ }++ fn maybe_auto_eject(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let settings = settings_state::current(cx);+ if !settings.auto_eject || self.state.streaming || self.state.loaded_model.is_none() {+ return;+ }+ let idle = self.last_active.elapsed().as_secs();+ if idle >= u64::from(settings.idle_timeout_minutes.max(1)) * 60 {+ self.eject(cx);+ }+ }++ pub(super) fn clear_session(&mut self) {+ self.state.session = None;+ self.state.session_model_id = None;+ }++ pub(super) fn cancel_stream(&mut self) {+ if let Some(token) = self.state.cancel.take() {+ token.cancel();+ }++ self.state.stream_gen = self.state.stream_gen.wrapping_add(1);+ self.state.streaming = false;+ self.state.waiting_for_model = false;+ self.state.reveal = RevealPacer::shown();+ self.state.stream_parsed = None;+ self.state.stream_stable_len = 0;+ }++ pub(super) fn cached_session(+ &self,+ model_id: &str,+ ) -> Option<ChatSession> {+ self.state.session.as_ref().filter(|_| self.state.session_model_id.as_deref() == Some(model_id)).cloned()+ }++ pub(super) fn store_session(+ &mut self,+ session: ChatSession,+ model_id: &str,+ ) {+ self.state.session = Some(session);+ self.state.session_model_id = Some(model_id.to_string());+ }++ pub fn loaded_model_name(&self) -> Option<String> {+ self.state.loaded_model.clone()+ }++ pub fn eject(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.cancel_stream();+ self.state.loaded_model = None;+ self.clear_session();+ cx.notify();+ }++ pub(super) fn close_popovers(&mut self) {+ self.state.model_picker_open = false;+ self.state.msg_model_picker_open = None;+ self.state.perf_open_msg = None;+ self.state.file_upload_open = false;+ }++ pub fn start_new(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.state.messages.clear();+ self.state.chat_id = None;+ self.state.created_at = persistence::now_ms();+ self.state.chat_title.clear();+ self.state.title_pending = false;+ self.cancel_stream();+ self.state.attached_files.clear();+ self.state.pending_regen = None;+ self.clear_session();+ cx.notify();+ }++ pub fn use_model(+ &mut self,+ model: Model,+ cx: &mut Context<Self>,+ ) {+ if let Some(idx) = self.state.pending_regen.take() {+ let valid = self.state.messages.get(idx).is_some_and(|m| m.role == Role::Assistant);+ if valid && !self.state.streaming {+ self.regenerate_at_with_model(idx, Some(model), cx);+ return;+ }+ }+ self.state.model = Some(model);+ self.start_new(cx);+ }++ pub fn load_stored(+ &mut self,+ stored: StoredChat,+ cx: &mut Context<Self>,+ ) {+ self.state.messages = stored+ .messages+ .into_iter()+ .map(|m| ChatTurn {+ role: if m.role == "assistant" {+ Role::Assistant+ } else {+ Role::User+ },+ versions: vec![Version {+ text: m.text,+ reasoning: m.reasoning,+ tps: m.tps,+ tokens: m.tokens,+ ttft: m.ttft,+ total_time: m.total_time,+ error: false,+ ..Default::default()+ }],+ current: 0,++ reasoning_collapsed: true,+ })+ .collect();+ self.state.chat_id = Some(stored.id);+ self.state.created_at = stored.created_at;+ self.state.chat_title = stored.title;+ self.state.title_pending = false;++ self.state.model = stored+ .model_id+ .as_deref()+ .and_then(|id| self.find_model(cx, |r| r.model.identifier == id))+ .or_else(|| stored.model_name.as_deref().and_then(|name| self.find_model(cx, |r| r.name() == name)));+ self.cancel_stream();+ self.state.pending_regen = None;+ self.clear_session();++ self.pin_to_bottom();+ cx.notify();+ }++ pub(super) fn pin_to_bottom(&mut self) {+ self.scroll.scroll_to_bottom();+ self.pin_bottom_frames = 8;+ }++ pub(super) fn should_auto_scroll(&self) -> bool {+ let offset = self.scroll.offset();+ let max = self.scroll.max_offset();+ if max.y <= px(0.) {+ return true;+ }+ offset.y <= -(max.y - px(32.))+ }++ pub(super) fn save(&mut self) {+ if !self.state.messages.iter().any(|m| m.role == Role::User) {+ return;+ }+ let id = self.state.chat_id.clone().unwrap_or_else(|| format!("chat-{}", self.state.created_at));+ self.state.chat_id = Some(id.clone());+ let title = if title_gen::is_placeholder(&self.state.chat_title) {+ self.state+ .messages+ .iter()+ .find(|m| m.role == Role::User)+ .map(|m| truncate_with_ellipsis(&m.cur().text, 48))+ .unwrap_or_else(|| "New chat".to_string())+ } else {+ self.state.chat_title.clone()+ };+ let messages = self+ .state+ .messages+ .iter()+ .filter(|m| !m.cur().error && !m.cur().text.is_empty())+ .map(|m| StoredMessage {+ role: match m.role {+ Role::User => "user".to_string(),+ Role::Assistant => "assistant".to_string(),+ },+ text: m.cur().text.clone(),+ reasoning: m.cur().reasoning.clone(),+ tps: m.cur().tps,+ tokens: m.cur().tokens,+ ttft: m.cur().ttft,+ total_time: m.cur().total_time,+ })+ .collect();+ persistence::save_chat(&StoredChat {+ id,+ title,+ model_name: self.state.model.as_ref().map(|m| m.name()),+ model_id: self.state.model.as_ref().map(|m| m.identifier.clone()),+ created_at: self.state.created_at,+ updated_at: persistence::now_ms(),+ messages,+ });+ }++ pub(super) fn resolved_model(+ &self,+ cx: &Context<Self>,+ ) -> Option<Model> {+ let store = self.store.read(cx);++ if let Some(model) = &self.state.model+ && !store.rows.iter().any(|r| r.model.identifier == model.identifier)+ {+ return Some(model.clone());+ }+ store.resolve_installed(self.state.model.as_ref())+ }++ fn find_model(+ &self,+ cx: &Context<Self>,+ matches: impl Fn(&crate::models_store::ModelRow) -> bool,+ ) -> Option<Model> {+ let lookup =+ |store: &Entity<ModelsStore>| store.read(cx).rows.iter().find(|r| matches(r)).map(|r| r.model.clone());+ lookup(&self.store).or_else(|| lookup(&self.cloud_store))+ }++ fn submit_from_button(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let text = self.input.read(cx).text();+ self.input.update(cx, |input, cx| input.clear(cx));+ self.send(text, cx);+ }+}++impl Render for ChatView {+ fn render(+ &mut self,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let streaming = self.state.streaming;++ if self.pin_bottom_frames > 0 {+ self.pin_bottom_frames -= 1;+ self.scroll.scroll_to_bottom();+ let entity = cx.entity();+ window.on_next_frame(move |_, cx| entity.update(cx, |_, cx| cx.notify()));+ }+ let show_reasoning = settings_state::current(cx).reasoning;+ let resolved = self.resolved_model(cx);+ let model_name = resolved.as_ref().map(|m| m.name()).unwrap_or_else(|| "Select model".to_string());+ let has_model = resolved.is_some();+ let trigger_icon_url = resolved.as_ref().and_then(dark_icon_url);+ let trigger_vendor =+ resolved.as_ref().and_then(|m| m.family.as_ref().map(|f| f.vendor.name())).unwrap_or_default();++ let mut column = div().flex().flex_col().gap_4().pt_4().w_full();+ if self.state.messages.is_empty() {+ column = column.child(+ div()+ .flex()+ .items_center()+ .justify_center()+ .gap_2()+ .pt(px(220.))+ .text_sm()+ .text_color(theme.text_muted)+ .child("Start your new private and local conversation")+ .child(IconEl::new(Icon::Logo, theme.text_muted).size(13.)),+ );+ } else {+ let msg_count = self.state.messages.len();+ for (idx, msg) in self.state.messages.iter().enumerate() {+ let streaming_here = streaming && idx + 1 == msg_count;+ let cur = msg.cur();+ let revealing_here = idx + 1 == msg_count+ && (streaming || self.state.reveal.revealed_chars() < cur.text.chars().count());+ column = column.child(match msg.role {+ Role::User => div()+ .flex()+ .w_full()+ .justify_end()+ .child(+ div()+ .max_w(px(560.))+ .flex_shrink_0()+ .px_3()+ .py_2()+ .rounded_lg()+ .bg(theme.bg_hover)+ .text_color(theme.text)+ .child(crate::components::markdown::render(&cur.parsed_markdown(), &theme, idx)),+ )+ .into_any_element(),+ Role::Assistant => {+ let mut block = div().flex().flex_col().gap_2().w_full().min_w_0().pb_3();++ if show_reasoning+ && let Some(reasoning) = &cur.reasoning+ && !reasoning.trim().is_empty()+ {+ let collapsed = msg.reasoning_collapsed;+ let chevron = if collapsed {+ Icon::ChevronDown+ } else {+ Icon::ChevronUp+ };+ let header = div()+ .id(SharedString::from(format!("think-hdr-{idx}")))+ .flex()+ .items_center()+ .justify_between()+ .text_xs()+ .text_color(theme.text_muted)+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(m) = this.state.messages.get_mut(idx) {+ m.reasoning_collapsed = !m.reasoning_collapsed;+ cx.notify();+ }+ }))+ .child(+ div()+ .flex()+ .items_center()+ .gap_1()+ .child(IconEl::new(Icon::Thinking, theme.text_muted).size(13.))+ .child(if streaming_here {+ "thinking…"+ } else {+ "Thoughts"+ }),+ )+ .child(IconEl::new(chevron, theme.text_muted).size(crate::tokens::icon::XS));++ let mut panel = div()+ .flex()+ .flex_col()+ .gap_2()+ .p_3()+ .rounded_lg()+ .bg(theme.bg_sub)+ .border_l_2()+ .border_color(theme.border)+ .child(header);++ if !collapsed {+ let text = div()+ .font_family(FONT_MONO)+ .text_size(crate::tokens::font::SMALL)+ .text_color(theme.text_muted)+ .child(reasoning.clone());+ if streaming_here {+ panel = panel.child(+ div()+ .relative()+ .child(+ div()+ .id(SharedString::from(format!("think-body-{idx}")))+ .max_h(px(180.))+ .overflow_y_scroll()+ .track_scroll(&self.reasoning_scroll)+ .child(text),+ )+ .child(div().absolute().bottom_0().left_0().right_0().h(px(28.)).bg(+ gpui::linear_gradient(+ 180.,+ gpui::linear_color_stop(theme.bg_sub.opacity(0.), 0.),+ gpui::linear_color_stop(theme.bg_sub, 1.),+ ),+ )),+ );+ } else {+ panel = panel.child(text);+ }+ }+ block = block.child(panel);+ }++ let body = if cur.error {+ div()+ .p_3()+ .rounded_md()+ .border_1()+ .border_color(theme.error.opacity(0.3))+ .bg(theme.error.opacity(0.08))+ .text_sm()+ .text_color(theme.error)+ .child(cur.text.clone())+ .into_any_element()+ } else if streaming && self.state.reveal.revealed_chars() == 0 {+ let label = if self.state.waiting_for_model {+ "Waiting for model…"+ } else {+ "Generating…"+ };++ div()+ .child(Loader::new().label(label))+ .with_animation(+ "stream-pulse",+ Animation::new(Duration::from_millis(1400)).repeat(),+ |el, delta| {+ let t = 1.0 - (2.0 * delta - 1.0).abs();+ el.opacity(0.5 + 0.5 * t)+ },+ )+ .into_any_element()+ } else if revealing_here {+ let revealed_byte = cur+ .text+ .char_indices()+ .nth(self.state.reveal.revealed_chars())+ .map(|(byte, _)| byte)+ .unwrap_or(cur.text.len());+ let stable_len = self.state.stream_stable_len.min(revealed_byte);+ let tail = cur.text[stable_len..revealed_byte].to_string();+ div()+ .w_full()+ .min_w_0()+ .flex()+ .flex_col()+ .text_color(theme.text)+ .children(+ self.state+ .stream_parsed+ .as_ref()+ .map(|parsed| crate::components::markdown::render(parsed, &theme, idx)),+ )+ .child(tail)+ .into_any_element()+ } else {+ div()+ .w_full()+ .min_w_0()+ .text_color(theme.text)+ .child(crate::components::markdown::render(&cur.parsed_markdown(), &theme, idx))+ .into_any_element()+ };+ block = block.child(body);++ let has_reasoning = cur.reasoning.as_ref().is_some_and(|r| !r.trim().is_empty());+ let show_actions = !streaming+ && (msg.versions.len() > 1 || !cur.text.is_empty() || cur.error || has_reasoning);+ if show_actions {+ let copy_text = cur.text.clone();+ let show_perf =+ cur.tps.is_some_and(|t| t.is_finite() && t > 0.0) || cur.tokens.is_some_and(|t| t > 0);++ let mut left = div().flex().items_center().gap_1();+ if msg.versions.len() > 1 {+ let total = msg.versions.len();+ let cur_n = msg.current + 1;+ left = left+ .child(+ div()+ .id(gpui::SharedString::from(format!("ver-prev-{idx}")))+ .cursor(gpui::CursorStyle::PointingHand)+ .text_xs()+ .text_color(theme.text_muted)+ .child("◀")+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(m) = this.state.messages.get_mut(idx) {+ m.current = m.current.saturating_sub(1);+ }+ cx.notify();+ })),+ )+ .child(+ div()+ .flex()+ .items_center()+ .gap_1()+ .text_xs()+ .text_color(theme.text_muted)+ .child(format!("{cur_n}/{total}"))+ .when_some(cur.model_name.clone(), |el, name| {+ el.child(+ div()+ .text_color(theme.text_muted.opacity(0.6))+ .child(format!("· {name}")),+ )+ }),+ )+ .child(+ div()+ .id(gpui::SharedString::from(format!("ver-next-{idx}")))+ .cursor(gpui::CursorStyle::PointingHand)+ .text_xs()+ .text_color(theme.text_muted)+ .child("▶")+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(m) = this.state.messages.get_mut(idx) {+ let max = m.versions.len().saturating_sub(1);+ m.current = (m.current + 1).min(max);+ }+ cx.notify();+ })),+ );+ }+ if !cur.text.is_empty() || cur.error {+ left = left.child(+ IconButton::new(gpui::SharedString::from(format!("copy-{idx}")), Icon::Copy)+ .color(theme.text_muted)+ .icon_size(14.)+ .hit_size(24.)+ .on_click(cx.listener(move |_this, _, _, cx| {+ cx.write_to_clipboard(gpui::ClipboardItem::new_string(copy_text.clone()));+ })),+ );+ }++ let mut right = div().flex().items_center().gap_4();+ right = right.child({+ let is_open = self.state.msg_model_picker_open == Some(idx);+ let msg_picker = self.model_picker_panel(cx, Some(idx));+ let btn_bg = if is_open {+ theme.bg_hover+ } else {+ gpui::transparent_black()+ };+ div()+ .relative()+ .child(+ div()+ .id(gpui::SharedString::from(format!("msg-model-{idx}")))+ .flex()+ .items_center()+ .gap_2()+ .px(px(6.))+ .py_1()+ .rounded_md()+ .bg(btn_bg)+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(|s| s.bg(theme.bg_hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ let opening = this.state.msg_model_picker_open != Some(idx);+ this.close_popovers();+ if opening {+ this.state.msg_model_picker_open = Some(idx);+ }+ cx.notify();+ }))+ .child(+ IconEl::new(Icon::ModelMenu, theme.text_muted)+ .size(crate::tokens::icon::SM),+ )+ .child(+ div()+ .text_size(crate::tokens::font::COMPACT)+ .text_color(theme.text_muted)+ .child("Model"),+ ),+ )+ .when(is_open, |el| {+ el.child(Self::anchored_popover(+ msg_picker,+ Anchor::BottomRight,+ |this, _, _, cx| {+ this.state.msg_model_picker_open = None;+ cx.notify();+ },+ cx,+ ))+ })+ });+ if show_perf {+ let perf_open = self.state.perf_open_msg == Some(idx);+ let perf_btn_bg = if perf_open {+ theme.bg_hover+ } else {+ gpui::transparent_black()+ };+ let perf_panel = self.performance_panel(idx, cur, cx);+ right = right.child(+ div()+ .relative()+ .child(+ div()+ .id(gpui::SharedString::from(format!("msg-perf-{idx}")))+ .flex()+ .items_center()+ .gap_2()+ .px(px(6.))+ .py_1()+ .rounded_md()+ .bg(perf_btn_bg)+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(|s| s.bg(theme.bg_hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ let opening = this.state.perf_open_msg != Some(idx);+ this.close_popovers();+ if opening {+ this.state.perf_open_msg = Some(idx);+ }+ cx.notify();+ }))+ .child(+ IconEl::new(Icon::Performance, theme.text_muted)+ .size(crate::tokens::icon::SM),+ )+ .child(+ div()+ .text_size(crate::tokens::font::COMPACT)+ .text_color(theme.text_muted)+ .child("Performance"),+ ),+ )+ .when(perf_open, |el| {+ el.children(perf_panel.map(|panel| {+ Self::anchored_popover(+ panel,+ Anchor::BottomRight,+ |this, _, _, cx| {+ this.state.perf_open_msg = None;+ cx.notify();+ },+ cx,+ )+ }))+ }),+ );+ }++ block = block.child(+ div().flex().items_center().justify_between().pt_6().pr_6().child(left).child(right),+ );+ }++ block.into_any_element()+ },+ });+ }+ }++ let (btn_id, btn_icon, btn_icon_size) = if streaming {+ ("chat-stop", Icon::Stop, crate::tokens::icon::SM)+ } else {+ ("chat-send", Icon::Send, crate::tokens::icon::MD)+ };+ let send_button = div()+ .id(btn_id)+ .flex()+ .items_center()+ .justify_center()+ .size(px(24.))+ .rounded_md()+ .bg(theme.text)+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(|s| s.bg(theme.button_border_hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ if streaming {+ this.stop(cx);+ } else {+ this.submit_from_button(cx);+ }+ }))+ .child(IconEl::new(btn_icon, theme.text_inverse).size(btn_icon_size));++ div()+ .size_full()+ .min_h_0()+ .relative()+ .flex()+ .flex_col()+ .child(+ div()+ .flex_1()+ .min_h_0()+ .w_full()+ .flex()+ .flex_col()+ .px_5()+ .pt_4()+ .pb_5()+ .items_center()+ .child(+ div().w_full().max_w(px(CONTENT_MAX_WIDTH)).flex_1().min_h_0().flex().flex_col().child(+ div()+ .id("chat-scroll")+ .flex_1()+ .min_h_0()+ .min_w_0()+ .w_full()+ .overflow_y_scroll()+ .track_scroll(&self.scroll)+ .child(column),+ ),+ )+ .child(+ div().w_full().flex_shrink_0().flex().flex_col().items_center().child(+ div().w_full().max_w(px(CONTENT_MAX_WIDTH)).flex().flex_col().items_end().gap_2().child(+ div()+ .flex()+ .flex_col()+ .gap_4()+ .w_full()+ .p_4()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .child(div().w_full().child(self.input.clone()))+ .when(!self.state.attached_files.is_empty(), |el| {+ let chips = self+ .state+ .attached_files+ .iter()+ .enumerate()+ .map(|(i, (name, ext, _))| {+ let label = format!("{name} .{ext}");+ div()+ .id(SharedString::from(format!("attach-{i}")))+ .flex()+ .items_center()+ .gap_1()+ .px_2()+ .py_0p5()+ .rounded_md()+ .bg(theme.bg_hover)+ .border_1()+ .border_color(theme.border)+ .text_size(crate::tokens::font::CAPTION)+ .text_color(theme.text_muted)+ .child(IconEl::new(Icon::Rename, theme.text_muted).size(11.))+ .child(label)+ .child(+ div()+ .id(SharedString::from(format!("attach-rm-{i}")))+ .cursor(gpui::CursorStyle::PointingHand)+ .text_color(theme.text_muted)+ .child("×")+ .on_click(cx.listener(move |this, _, _, cx| {+ if i < this.state.attached_files.len() {+ this.state.attached_files.remove(i);+ cx.notify();+ }+ })),+ )+ .into_any_element()+ })+ .collect::<Vec<_>>();+ el.child(div().flex().flex_wrap().gap_1().children(chips))+ })+ .child(+ div()+ .flex()+ .items_center()+ .justify_between()+ .child({+ let upload_panel = self.file_upload_panel(cx);+ div()+ .relative()+ .child(+ div()+ .id("file-upload-trigger")+ .flex()+ .items_center()+ .px(px(6.))+ .py_1()+ .rounded_md()+ .cursor(gpui::CursorStyle::PointingHand)+ .hover(|s| s.bg(theme.bg_hover))+ .on_click(cx.listener(|this, _, _, cx| {+ this.state.file_upload_open =+ !this.state.file_upload_open;+ if this.state.file_upload_open {+ this.state.model_picker_open = false;+ this.state.msg_model_picker_open = None;+ this.state.perf_open_msg = None;+ }+ cx.notify();+ }))+ .child(+ IconEl::new(Icon::Plus, theme.text_muted)+ .size(crate::tokens::icon::MD),+ ),+ )+ .when_some(upload_panel, |el, panel| {+ el.child(Self::anchored_popover(+ panel,+ Anchor::BottomLeft,+ |this, _, _, cx| {+ this.state.file_upload_open = false;+ cx.notify();+ },+ cx,+ ))+ })+ })+ .child({+ let mut controls = div().flex().items_center().gap(px(10.));+ if has_model {+ controls = controls.child(+ IconButton::new("gen-settings", Icon::Settings)+ .color(theme.text_muted)+ .icon_size(18.)+ .hit_size(32.)+ .on_click(cx.listener(|this, _, _, cx| {+ this.state.gen_settings_open =+ !this.state.gen_settings_open;+ cx.notify();+ })),+ );+ }+ let picker_panel = self.model_picker_panel(cx, None);+ controls = controls+ .child(+ div()+ .relative()+ .child(+ div()+ .id("model-trigger")+ .flex()+ .items_center()+ .gap_1()+ .px(px(6.))+ .cursor(gpui::CursorStyle::PointingHand)+ .on_click(cx.listener(|this, _, _, cx| {+ let opening = !this.state.model_picker_open;+ this.close_popovers();+ if opening {+ this.state.model_picker_open = true;+ }+ cx.notify();+ }))+ .when(has_model, |el| {+ el.child(+ VendorIcon::new(trigger_vendor.clone())+ .size(crate::tokens::icon::MD)+ .icon_url(trigger_icon_url.clone()),+ )+ })+ .child(+ div()+ .text_size(crate::tokens::font::COMPACT)+ .text_color(theme.text_muted)+ .child(model_name.clone()),+ )+ .child(+ IconEl::new(+ Icon::ChevronDown,+ theme.text_muted,+ )+ .size(crate::tokens::icon::XS),+ ),+ )+ .when(self.state.model_picker_open, |el| {+ el.child(Self::anchored_popover(+ picker_panel,+ Anchor::BottomRight,+ |this, _, _, cx| {+ this.state.model_picker_open = false;+ cx.notify();+ },+ cx,+ ))+ }),+ )+ .child(send_button);+ controls+ }),+ ),+ ),+ ),+ ),+ )+ .children(self.gen_settings_overlay(cx))+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chats/event.rs b/apps/mirai/mirai-app/src/screens/chats/event.rsnew file mode 100644index 000000000..6d358ad62--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/event.rs@@ -0,0 +1,5 @@+pub enum ChatsEvent {+ Open(String),++ Changed,+}diff --git a/apps/mirai/mirai-app/src/screens/chats/mod.rs b/apps/mirai/mirai-app/src/screens/chats/mod.rsnew file mode 100644index 000000000..e4c1c0060--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/mod.rs@@ -0,0 +1,9 @@+mod event;+mod rename;+mod rows;+mod toolbar;+mod util;+mod view;++pub use event::ChatsEvent;+pub use view::ChatsView;diff --git a/apps/mirai/mirai-app/src/screens/chats/rename.rs b/apps/mirai/mirai-app/src/screens/chats/rename.rsnew file mode 100644index 000000000..9d196198f--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/rename.rs@@ -0,0 +1,114 @@+use gpui::{Context, FontWeight, IntoElement, black, div, prelude::*, px};++use super::{util::validate_rename_name, view::ChatsView};+use crate::{+ components::{Button, ButtonKind, ButtonSize},+ persistence,+ theme::ActiveTheme,+};++impl ChatsView {+ pub(super) fn open_rename(+ &mut self,+ title: &str,+ cx: &mut Context<Self>,+ ) {+ self.rename_open = true;+ self.rename_error = None;+ self.rename_input.update(cx, |input, cx| input.set_text(title, cx));+ cx.notify();+ }++ fn close_rename(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.rename_open = false;+ self.rename_error = None;+ cx.notify();+ }++ pub(super) fn confirm_rename(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let Some(id) = self.selected.iter().next().cloned().filter(|_| self.selected.len() == 1) else {+ return;+ };+ let text = self.rename_input.read(cx).text();+ match validate_rename_name(&text) {+ Err(msg) => {+ self.rename_error = Some(msg);+ cx.notify();+ },+ Ok(title) => {+ if persistence::rename_chat(&id, &title) {+ self.close_rename(cx);+ self.reload(cx);+ } else {+ self.rename_error = Some("failed to rename chat");+ cx.notify();+ }+ },+ }+ }++ pub(super) fn rename_modal(+ &self,+ cx: &mut Context<Self>,+ ) -> Option<impl IntoElement> {+ if !self.rename_open {+ return None;+ }+ let theme = cx.theme().clone();+ let error = self.rename_error;++ Some(+ div()+ .absolute()+ .size_full()+ .flex()+ .items_center()+ .justify_center()+ .bg(black().opacity(0.5))+ .occlude()+ .child(+ div()+ .w(px(400.))+ .flex()+ .flex_col()+ .gap_3()+ .p_4()+ .rounded_xl()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .child(div().text_color(theme.text).font_weight(FontWeight::MEDIUM).child("Rename chat"))+ .child(self.rename_input.clone())+ .children(error.map(|msg| div().text_xs().text_color(theme.error).child(msg)))+ .child(+ div()+ .flex()+ .justify_end()+ .gap_2()+ .child(+ Button::new("rename-cancel", "Cancel")+ .kind(ButtonKind::Secondary)+ .size(ButtonSize::Small)+ .on_click(cx.listener(|this, _, _, cx| {+ this.close_rename(cx);+ })),+ )+ .child(+ Button::new("rename-save", "Save")+ .kind(ButtonKind::Primary)+ .size(ButtonSize::Small)+ .on_click(cx.listener(|this, _, _, cx| {+ this.confirm_rename(cx);+ })),+ ),+ ),+ ),+ )+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chats/rows.rs b/apps/mirai/mirai-app/src/screens/chats/rows.rsnew file mode 100644index 000000000..64928dbf8--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/rows.rs@@ -0,0 +1,94 @@+use gpui::{AnyElement, Context, CursorStyle, FontWeight, IntoElement, SharedString, div, prelude::*, px};++use super::{event::ChatsEvent, util::relative_time, view::ChatsView};+use crate::{+ components::{Icon, IconEl},+ persistence::StoredChat,+ theme::{ActiveTheme, FONT_MONO},+ tokens,+};++impl ChatsView {+ pub(super) fn row(+ &self,+ cx: &mut Context<Self>,+ chat: &StoredChat,+ selection_mode: bool,+ selected: bool,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let hover_bg = theme.bg_hover;+ let click_id = chat.id.clone();+ let subtitle = relative_time(chat.updated_at);++ let mut checkbox = div()+ .size(px(18.))+ .flex_none()+ .rounded(tokens::radius::SM)+ .border_1()+ .border_color(theme.border)+ .flex()+ .items_center()+ .justify_center();+ if selected {+ checkbox = checkbox.bg(theme.info).child(IconEl::new(Icon::Check, theme.card).size(tokens::icon::XS));+ }++ let mut left = div().flex().flex_1().min_w_0().items_center().gap_3();+ if selection_mode {+ left = left.child(checkbox);+ } else {+ left = left.child(IconEl::new(Icon::Chats, theme.text_muted).size(tokens::icon::LG));+ }+ left = left.child(+ div()+ .min_w_0()+ .overflow_hidden()+ .text_sm()+ .text_color(theme.text)+ .font_weight(FontWeight::MEDIUM)+ .child(chat.title.clone()),+ );++ let timestamp = div().flex_none().font_family(FONT_MONO).text_xs().text_color(theme.text_muted).child(subtitle);++ let border = if selected {+ theme.info+ } else {+ theme.border+ };+ div()+ .pb_2()+ .child(+ div()+ .id(SharedString::from(chat.id.clone()))+ .flex()+ .w_full()+ .items_center()+ .justify_between()+ .gap_3()+ .min_h(px(46.))+ .px_3()+ .py_1p5()+ .rounded_lg()+ .border_1()+ .border_color(border)+ .bg(theme.card)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover_bg))+ .on_click(cx.listener(move |this, _, _, cx| {+ if this.selection_mode {+ if !this.selected.remove(&click_id) {+ this.selected.insert(click_id.clone());+ }+ cx.notify();+ } else {+ cx.emit(ChatsEvent::Open(click_id.clone()));+ }+ }))+ .child(left)+ .child(timestamp),+ )+ .into_any_element()+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chats/toolbar.rs b/apps/mirai/mirai-app/src/screens/chats/toolbar.rsnew file mode 100644index 000000000..dbf17ce1e--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/toolbar.rs@@ -0,0 +1,137 @@+use gpui::{AnyElement, Context, CursorStyle, FontWeight, IntoElement, div, prelude::*, px};++use super::view::ChatsView;+use crate::{+ components::{Button, ButtonKind, ButtonSize, Icon, IconButton, IconEl},+ theme::ActiveTheme,+ tokens,+};++impl ChatsView {+ pub(super) fn toolbar(+ &self,+ cx: &mut Context<Self>,+ filtered: Vec<String>,+ empty: bool,+ ) -> AnyElement {+ let theme = cx.theme().clone();++ if self.selection_mode {+ let total = filtered.len();+ let count = self.selected.len();+ let all = total > 0 && count == total;++ let mut select_all = div()+ .id("select-all")+ .size(px(18.))+ .flex_none()+ .rounded(tokens::radius::SM)+ .border_1()+ .border_color(theme.border)+ .flex()+ .items_center()+ .justify_center()+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(move |this, _, _, cx| {+ if this.selected.len() == filtered.len() && !filtered.is_empty() {+ this.selected.clear();+ } else {+ this.selected = filtered.iter().cloned().collect();+ }+ cx.notify();+ }));+ if all {+ select_all =+ select_all.bg(theme.info).child(IconEl::new(Icon::Check, theme.card).size(tokens::icon::XS));+ }++ let show_rename = count == 1 && !all;++ let mut actions = div().flex().items_center().gap_2();+ if show_rename {+ let title = self+ .chats+ .iter()+ .find(|c| self.selected.contains(&c.id))+ .map(|c| c.title.clone())+ .unwrap_or_default();+ actions = actions.child(IconButton::new("rename-one", Icon::Rename).color(theme.text_muted).on_click(+ cx.listener(move |this, _, _, cx| {+ this.open_rename(&title, cx);+ }),+ ));+ }+ actions = actions+ .child(+ Button::new("bulk-delete", "Delete")+ .kind(ButtonKind::Danger)+ .size(ButtonSize::Small)+ .disabled(count == 0)+ .on_click(cx.listener(|this, _, _, cx| {+ if !this.selected.is_empty() {+ this.confirm_bulk_delete = true;+ cx.notify();+ }+ })),+ )+ .child(IconButton::new("sel-exit", Icon::Close).color(theme.text_muted).on_click(cx.listener(+ |this, _, _, cx| {+ this.selection_mode = false;+ this.selected.clear();+ cx.notify();+ },+ )));++ div()+ .flex()+ .items_center()+ .justify_between()+ .mb_3()+ .child(div().flex().items_center().gap_3().child(select_all).child(+ div().text_sm().text_color(theme.text_muted).child(if count == 0 {+ "Select all".to_string()+ } else if all {+ "All selected".to_string()+ } else {+ format!("{count} selected")+ }),+ ))+ .child(actions)+ .into_any_element()+ } else {+ div()+ .flex()+ .items_center()+ .gap_3()+ .mb_3()+ .child(div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child("Your chats"))+ .child(+ div()+ .flex_1()+ .flex()+ .items_center()+ .gap_2()+ .px_3()+ .py_2()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .child(IconEl::new(Icon::Search, theme.text_muted).size(tokens::icon::SM))+ .child(self.search.clone()),+ )+ .child(+ Button::new("select-mode", "Select")+ .kind(ButtonKind::Secondary)+ .size(ButtonSize::Small)+ .disabled(empty)+ .on_click(cx.listener(|this, _, _, cx| {+ this.selection_mode = true;+ this.selected.clear();+ cx.notify();+ })),+ )+ .into_any_element()+ }+ }+}diff --git a/apps/mirai/mirai-app/src/screens/chats/util.rs b/apps/mirai/mirai-app/src/screens/chats/util.rsnew file mode 100644index 000000000..1fffa0c40--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/util.rs@@ -0,0 +1,74 @@+use crate::persistence;++pub(super) fn relative_time(updated_at: u64) -> String {+ let now = persistence::now_ms();+ let secs = now.saturating_sub(updated_at) / 1000;+ let mins = secs / 60;+ let hours = mins / 60;+ let days = hours / 24;+ if secs < 45 {+ "just now".to_string()+ } else if mins < 60 {+ let n = mins.max(1);+ format!(+ "{n} minute{} ago",+ if n == 1 {+ ""+ } else {+ "s"+ }+ )+ } else if hours < 24 {+ format!(+ "{hours} hour{} ago",+ if hours == 1 {+ ""+ } else {+ "s"+ }+ )+ } else if days < 30 {+ format!(+ "{days} day{} ago",+ if days == 1 {+ ""+ } else {+ "s"+ }+ )+ } else if days < 365 {+ let n = days / 30;+ format!(+ "{n} month{} ago",+ if n == 1 {+ ""+ } else {+ "s"+ }+ )+ } else {+ let n = days / 365;+ format!(+ "{n} year{} ago",+ if n == 1 {+ ""+ } else {+ "s"+ }+ )+ }+}++pub(super) fn validate_rename_name(name: &str) -> Result<String, &'static str> {+ let trimmed = name.trim();+ if trimmed.is_empty() {+ return Err("Name cannot be empty");+ }+ if trimmed.len() < 3 {+ return Err("Name must be at least 3 characters long");+ }+ if trimmed.len() > 50 {+ return Err("Name must be at most 50 characters long");+ }+ Ok(trimmed.to_string())+}diff --git a/apps/mirai/mirai-app/src/screens/chats/view.rs b/apps/mirai/mirai-app/src/screens/chats/view.rsnew file mode 100644index 000000000..ec8493fd9--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/chats/view.rs@@ -0,0 +1,184 @@+use std::{collections::HashSet, ops::Range};++use gpui::{Context, Entity, EventEmitter, FontWeight, IntoElement, Render, Window, div, prelude::*, px, uniform_list};++use super::event::ChatsEvent;+use crate::{+ components::{ConfirmModal, InputEvent, TextInput},+ instructions_card::InstructionsCard,+ persistence::{self, StoredChat},+ theme::{ActiveTheme, layout::CONTENT_MAX_WIDTH},+};++pub struct ChatsView {+ pub(super) chats: Vec<StoredChat>,+ pub(super) search: Entity<TextInput>,+ pub(super) instructions: Entity<InstructionsCard>,+ pub(super) rename_input: Entity<TextInput>,+ pub(super) rename_open: bool,+ pub(super) rename_error: Option<&'static str>,+ pub(super) confirm_delete: Option<(String, String)>,+ pub(super) selection_mode: bool,+ pub(super) selected: HashSet<String>,+ pub(super) confirm_bulk_delete: bool,+}++impl EventEmitter<ChatsEvent> for ChatsView {}++impl ChatsView {+ pub fn new(cx: &mut Context<Self>) -> Self {+ let search = cx.new(|cx| TextInput::new(cx, "Search chats…"));+ cx.observe(&search, |_, _, cx| cx.notify()).detach();++ let instructions = cx.new(|cx| InstructionsCard::new(cx, "instr-card", "Tailor the way the model responds"));++ let rename_input = cx.new(|cx| TextInput::new(cx, "Enter chat name"));+ cx.subscribe(&rename_input, |this, _, event, cx| {+ if matches!(event, InputEvent::Submit(_)) {+ this.confirm_rename(cx);+ }+ })+ .detach();++ Self {+ chats: persistence::list_chats(),+ search,+ instructions,+ rename_input,+ rename_open: false,+ rename_error: None,+ confirm_delete: None,+ selection_mode: false,+ selected: HashSet::new(),+ confirm_bulk_delete: false,+ }+ }++ pub fn reload(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.chats = persistence::list_chats();++ cx.emit(ChatsEvent::Changed);+ cx.notify();+ }+}++impl Render for ChatsView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let query = self.search.read(cx).text().to_lowercase();+ let query = query.trim();++ let chats_empty = self.chats.is_empty();+ let hit = |chat: &StoredChat| {+ query.is_empty()+ || chat.title.to_lowercase().contains(query)+ || chat.model_name.as_deref().is_some_and(|m| m.to_lowercase().contains(query))+ };+ let filtered: Vec<String> = self.chats.iter().filter(|c| hit(c)).map(|c| c.id.clone()).collect();+ let toolbar = self.toolbar(cx, filtered.clone(), chats_empty);++ let empty_msg = if chats_empty {+ Some("No chats yet. Start a new conversation!")+ } else if filtered.is_empty() {+ Some("No chats found matching your search.")+ } else {+ None+ };+ let list_area = match empty_msg {+ Some(msg) => div()+ .id("chats-list")+ .flex_1()+ .min_h_0()+ .overflow_y_scroll()+ .child(div().py_8().text_color(theme.text_muted).child(msg))+ .into_any_element(),+ None => {+ let ids = filtered;+ uniform_list(+ "chats-list",+ ids.len(),+ cx.processor(move |this, range: Range<usize>, _window, cx| {+ range+ .filter_map(|ix| {+ let id = ids.get(ix)?;+ let chat = this.chats.iter().find(|c| &c.id == id)?;+ let selected = this.selected.contains(id);+ Some(this.row(cx, chat, this.selection_mode, selected).into_any_element())+ })+ .collect()+ }),+ )+ .flex_1()+ .min_h_0()+ .into_any_element()+ },+ };++ let modal = self.confirm_delete.clone().map(|(id, title)| {+ ConfirmModal::new("Delete chat", format!("Delete \"{title}\"? This can't be undone."))+ .confirm_label("Delete")+ .danger(true)+ .on_confirm(cx.listener(move |this, _, _, cx| {+ persistence::delete_chat(&id);+ this.confirm_delete = None;+ this.reload(cx);+ }))+ .on_cancel(cx.listener(|this, _, _, cx| {+ this.confirm_delete = None;+ cx.notify();+ }))+ });++ let bulk_modal = self.confirm_bulk_delete.then(|| {+ let n = self.selected.len();+ ConfirmModal::new("Delete chats", format!("Delete {n} selected chat(s)? This can't be undone."))+ .confirm_label("Delete")+ .danger(true)+ .on_confirm(cx.listener(|this, _, _, cx| {+ for id in this.selected.drain() {+ persistence::delete_chat(&id);+ }+ this.confirm_bulk_delete = false;+ this.selection_mode = false;+ this.reload(cx);+ }))+ .on_cancel(cx.listener(|this, _, _, cx| {+ this.confirm_bulk_delete = false;+ cx.notify();+ }))+ });++ div()+ .size_full()+ .relative()+ .flex()+ .flex_col()+ .items_center()+ .child(+ div()+ .w_full()+ .max_w(px(CONTENT_MAX_WIDTH))+ .h_full()+ .min_h_0()+ .flex()+ .flex_col()+ .px_6()+ .child(div().pt_10().pb_2().text_xl().font_weight(FontWeight::MEDIUM).child("Chat history"))+ .child(div().mb_3().child(self.instructions.clone()))+ .child(div().h_px().w_full().bg(theme.border).mb_3())+ .child(toolbar)+ .child(list_area),+ )+ .children(modal)+ .children(bulk_modal)+ .children(self.rename_modal(cx))+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/event.rs b/apps/mirai/mirai-app/src/screens/local_models/event.rsnew file mode 100644index 000000000..6049388ff--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/event.rs@@ -0,0 +1,5 @@+use uzu::types::model::Model;++pub enum LocalModelsEvent {+ UseModel(Model),+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/families.rs b/apps/mirai/mirai-app/src/screens/local_models/families.rsnew file mode 100644index 000000000..658aca59c--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/families.rs@@ -0,0 +1,167 @@+use std::{cmp::Ordering, collections::HashMap};++use gpui::Context;++use super::{+ family_view_model::FamilyViewModel,+ format::{format_params, format_size, quant_label},+ model_view_model::ModelViewModel,+ view::LocalModelsView,+};+use crate::{+ model_recommend,+ model_sort::{self, ModelSort},+ theme::ActiveTheme,+};++impl LocalModelsView {+ pub(super) fn spawn_recommend(cx: &mut Context<Self>) {+ cx.spawn(async move |this, cx| {+ let id = model_recommend::fetch_repo_id().await;+ let _ = this.update(cx, |view, cx| {+ view.recommended_id = id;+ view.families_cache = None;+ cx.notify();+ });+ })+ .detach();+ }++ pub fn open_family(+ &mut self,+ key: String,+ cx: &mut Context<Self>,+ ) {+ self.selected_family = Some(key);+ self.search.update(cx, |i, cx| i.clear(cx));+ cx.notify();+ }++ pub(super) fn back_to_families(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.selected_family = None;+ self.search.update(cx, |i, cx| i.clear(cx));+ cx.notify();+ }++ fn families(+ &self,+ cx: &Context<Self>,+ ) -> Vec<FamilyViewModel> {+ let dark = cx.theme().dark;+ let store = self.store.read(cx);+ let recommended_id = self.recommended_id.as_deref();+ let mut order: Vec<String> = Vec::new();+ let mut families: HashMap<String, FamilyViewModel> = Default::default();+ let mut recommended_family: Option<String> = None;++ for row in &store.rows {+ let (key, name, vendor) = match &row.model.family {+ Some(f) => (f.identifier.clone(), f.name(), f.vendor.name()),+ None => ("other".to_string(), "Other".to_string(), String::new()),+ };++ let is_recommended = recommended_id.is_some_and(|rid| row.model.repo_ids().iter().any(|r| r == rid));+ if is_recommended {+ recommended_family = Some(key.clone());+ }+ let quant = quant_label(&row.model);+ let is_mirai = row+ .model+ .quantization+ .as_ref()+ .map(|q| q.method.to_lowercase().contains("mirai") || q.identifier.to_lowercase().contains("mirai"))+ .unwrap_or(false);+ let bytes = row.display_size_bytes();+ let installed_at = store.installed_at(row.id());+ let vm = ModelViewModel {+ id: row.id().to_string(),+ name: row.name(),+ size: format_size(bytes),+ bytes,+ quant,+ phase: row.phase(),+ progress: row.progress(),+ is_mirai,+ recommended: is_recommended,+ };+ let entry = families.entry(key.clone()).or_insert_with(|| {+ order.push(key.clone());+ FamilyViewModel {+ key: key.clone(),+ name,+ vendor,+ icon_url: row.icon_url(dark),+ range: None,+ has_mirai: false,+ last_installed_at: 0,+ models: Vec::new(),+ }+ });+ entry.has_mirai = entry.has_mirai || is_mirai;+ entry.last_installed_at = entry.last_installed_at.max(installed_at);+ entry.models.push(vm);+ }++ for fam in families.values_mut() {+ let mut params: Vec<f64> = fam.models.iter().filter_map(|m| model_sort::parse_params(&m.name)).collect();+ params.sort_by(|a, b| a.partial_cmp(b).unwrap_or(Ordering::Equal));+ if let (Some(min), Some(max)) = (params.first(), params.last()) {+ fam.range = Some(if (min - max).abs() < f64::EPSILON {+ format_params(*max)+ } else {+ format!("{} – {}", format_params(*min), format_params(*max))+ });+ }+ }++ let mut list: Vec<FamilyViewModel> = order.into_iter().filter_map(|k| families.remove(&k)).collect();++ let rec_key = recommended_family;+ list.sort_by(|a, b| {+ let rank = |f: &FamilyViewModel| -> u8 {+ if f.has_mirai {+ 0+ } else if rec_key.as_deref() == Some(f.key.as_str()) {+ 1+ } else if f.last_installed_at > 0 {+ 2+ } else {+ 3+ }+ };+ rank(a).cmp(&rank(b)).then_with(|| match (rank(a), rank(b)) {+ (2, 2) => b.last_installed_at.cmp(&a.last_installed_at),+ _ => a.name.cmp(&b.name),+ })+ });+ list+ }++ pub(super) fn ensure_families(+ &mut self,+ cx: &Context<Self>,+ ) {+ let dark = cx.theme().dark;+ let valid = matches!(&self.families_cache, Some((d, _)) if *d == dark);+ if !valid {+ let built = self.families(cx);+ self.families_cache = Some((dark, built));+ }+ }++ pub(super) fn sort_models(+ &self,+ models: &mut [ModelViewModel],+ ) {+ match self.sort {+ ModelSort::Size => {+ models.sort_by(|a, b| a.bytes.cmp(&b.bytes).then_with(|| model_sort::sort_by_name(&a.name, &b.name)))+ },+ ModelSort::Name => models.sort_by(|a, b| model_sort::sort_by_name(&a.name, &b.name)),+ ModelSort::Newest => models.sort_by(|a, b| model_sort::sort_by_newest(&a.name, &b.name)),+ }+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/family_view_model.rs b/apps/mirai/mirai-app/src/screens/local_models/family_view_model.rsnew file mode 100644index 000000000..0cb78f8f2--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/family_view_model.rs@@ -0,0 +1,18 @@+use super::model_view_model::ModelViewModel;++pub(super) struct FamilyViewModel {+ pub key: String,+ pub name: String,+ pub vendor: String,+ pub icon_url: Option<String>,+ pub range: Option<String>,+ pub has_mirai: bool,+ pub last_installed_at: u64,+ pub models: Vec<ModelViewModel>,+}++impl FamilyViewModel {+ pub(super) fn installed_count(&self) -> usize {+ self.models.iter().filter(|model| model.installed()).count()+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/format.rs b/apps/mirai/mirai-app/src/screens/local_models/format.rsnew file mode 100644index 000000000..76db13bb2--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/format.rs@@ -0,0 +1,58 @@+use gpui::{FontWeight, IntoElement, div, prelude::*, px};+use uzu::types::model::Model;++use crate::theme::Theme;++pub(super) fn section_header(+ label: &str,+ theme: &Theme,+) -> impl IntoElement {+ div()+ .flex()+ .items_center()+ .gap_4()+ .pt_4()+ .pb_1()+ .px_4()+ .text_xs()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text_muted)+ .child(div().flex_1().child(label.to_uppercase()))+ .child(div().w(px(80.)).child("SIZE"))+ .child(div().w(px(140.)).child("QUANTIZATION"))+ .child(div().w(px(100.)))+}++pub(super) fn quant_label(model: &Model) -> String {+ match &model.quantization {+ Some(q) => format!("{} · {}-bit", q.method.to_uppercase(), q.bits_per_weight),+ None => "Unquantized".to_string(),+ }+}++pub(super) fn format_params(millions: f64) -> String {+ if millions >= 1000.0 {+ let b = millions / 1000.0;+ if (b.fract()).abs() < f64::EPSILON {+ format!("{b:.0}B")+ } else {+ format!("{b:.1}B")+ }+ } else {+ format!("{millions:.0}M")+ }+}++pub(crate) fn format_size(bytes: i64) -> String {+ if bytes <= 0 {+ return "—".to_string();+ }+ let b = bytes as f64;+ const GB: f64 = 1_000_000_000.0;+ const MB: f64 = 1_000_000.0;+ if b >= GB {+ format!("{:.1} GB", b / GB)+ } else {+ format!("{:.0} MB", b / MB)+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/mod.rs b/apps/mirai/mirai-app/src/screens/local_models/mod.rsnew file mode 100644index 000000000..83d2b8c93--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/mod.rs@@ -0,0 +1,12 @@+mod event;+mod families;+mod family_view_model;+mod format;+mod model_row_view;+mod model_view_model;+mod rows;+mod view;++pub use event::LocalModelsEvent;+pub(crate) use format::format_size;+pub use view::LocalModelsView;diff --git a/apps/mirai/mirai-app/src/screens/local_models/model_row_view.rs b/apps/mirai/mirai-app/src/screens/local_models/model_row_view.rsnew file mode 100644index 000000000..22c8eb977--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/model_row_view.rs@@ -0,0 +1,157 @@+use gpui::{Context, CursorStyle, IntoElement, SharedString, div, prelude::*, px, relative};++use super::{event::LocalModelsEvent, model_view_model::ModelViewModel, view::LocalModelsView};+use crate::{+ components::{Icon, IconButton, IconEl, VendorIcon},+ theme::ActiveTheme,+ tokens,+};++impl LocalModelsView {+ pub(super) fn model_row(+ &self,+ cx: &mut Context<Self>,+ vm: &ModelViewModel,+ vendor: &str,+ icon_url: Option<&str>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let id = vm.id.clone();++ let vendor_icon =+ VendorIcon::new(vendor.to_string()).size(tokens::icon::XL).icon_url(icon_url.map(|u| u.to_string()));+ let name_label = div()+ .flex()+ .items_center()+ .gap_2()+ .child(div().text_sm().text_color(theme.text).child(vm.name.clone()))+ .when(vm.recommended, |el| el.child(self.chip("Recommended".to_string(), true, cx)));+ let chat_id = id.clone();+ let info = div()+ .id(SharedString::from(format!("use-{}", vm.id)))+ .flex_1()+ .flex()+ .items_center()+ .gap_2()+ .h_full()+ .when(vm.installed(), |el| {+ el.cursor(CursorStyle::PointingHand).on_click(cx.listener(move |this, _, _, cx| {+ if let Some(model) =+ this.store.read(cx).rows.iter().find(|r| r.id() == chat_id).map(|r| r.model.clone())+ {+ cx.emit(LocalModelsEvent::UseModel(model));+ }+ }))+ })+ .child(vendor_icon)+ .child(name_label)+ .into_any_element();++ let action = if vm.installed() {+ let del_id = id.clone();+ let del_name = vm.name.clone();+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Check, theme.success).size(15.))+ .child(+ IconButton::new(SharedString::from(format!("del-{}", vm.id)), Icon::Trash)+ .color(theme.text_muted)+ .on_click(cx.listener(move |this, _, _, cx| {+ this.confirm_delete = Some((del_id.clone(), del_name.clone()));+ cx.notify();+ })),+ )+ .into_any_element()+ } else if vm.downloading() || vm.paused() {+ let toggle_id = id.clone();+ let cancel_id = id.clone();+ div()+ .flex()+ .items_center()+ .gap_1p5()+ .child(div().text_sm().text_color(theme.text_muted).child(format!("{:.0}%", vm.progress * 100.0)))+ .child(+ IconButton::new(+ SharedString::from(format!("tog-{}", vm.id)),+ if vm.paused() {+ Icon::Download+ } else {+ Icon::Pause+ },+ )+ .icon_size(14.)+ .hit_size(26.)+ .color(theme.text)+ .background(theme.bg_hover)+ .on_click(cx.listener(move |this, _, _, cx| {+ let id = toggle_id.clone();+ this.store.update(cx, |s, cx| s.toggle_download(id, cx));+ })),+ )+ .child(+ IconButton::new(SharedString::from(format!("cancel-{}", vm.id)), Icon::Close)+ .icon_size(14.)+ .hit_size(26.)+ .color(theme.text)+ .background(theme.bg_hover)+ .on_click(cx.listener(move |this, _, _, cx| {+ let id = cancel_id.clone();+ this.store.update(cx, |s, cx| s.delete(id, cx));+ })),+ )+ .into_any_element()+ } else {+ let dl_id = id.clone();+ IconButton::new(SharedString::from(format!("dl-{}", vm.id)), Icon::Download)+ .color(theme.text_muted)+ .on_click(cx.listener(move |this, _, _, cx| {+ let id = dl_id.clone();+ this.store.update(cx, |s, cx| s.toggle_download(id, cx));+ }))+ .into_any_element()+ };++ let active_dl = vm.downloading() || vm.paused();+ let track = theme.bg_hover;+ let fill = theme.text;+ let content = div()+ .flex()+ .items_center()+ .gap_4()+ .h(px(52.))+ .w_full()+ .child(info)+ .child(div().w(px(80.)).text_sm().text_color(theme.text_muted).child(vm.size.clone()))+ .child(div().w(px(140.)).text_sm().text_color(theme.text_muted).child(vm.quant.clone()))+ .child(div().w(px(100.)).flex().justify_end().child(action));++ div()+ .id(SharedString::from(format!("model-{}", vm.id)))+ .flex()+ .flex_col()+ .px_4()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .cursor(CursorStyle::PointingHand)+ .when(vm.is_mirai, |el| el.bg(theme.success.opacity(0.12)))+ .hover(move |s| s.bg(hover))+ .child(content)+ .when(active_dl, |el| {+ el.child(+ div().w_full().pb(px(6.)).child(+ div()+ .w_full()+ .h(px(4.))+ .rounded_full()+ .bg(track)+ .child(div().h_full().w(relative(vm.progress.clamp(0., 1.))).rounded_full().bg(fill)),+ ),+ )+ })+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/model_view_model.rs b/apps/mirai/mirai-app/src/screens/local_models/model_view_model.rsnew file mode 100644index 000000000..9267efb2c--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/model_view_model.rs@@ -0,0 +1,26 @@+use uzu::storage::types::DownloadPhase;++#[derive(Clone)]+pub(super) struct ModelViewModel {+ pub id: String,+ pub name: String,+ pub size: String,+ pub bytes: i64,+ pub quant: String,+ pub phase: DownloadPhase,+ pub progress: f32,+ pub is_mirai: bool,+ pub recommended: bool,+}++impl ModelViewModel {+ pub(super) fn installed(&self) -> bool {+ matches!(self.phase, DownloadPhase::Downloaded {})+ }+ pub(super) fn downloading(&self) -> bool {+ matches!(self.phase, DownloadPhase::Downloading {})+ }+ pub(super) fn paused(&self) -> bool {+ matches!(self.phase, DownloadPhase::Paused {})+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/rows.rs b/apps/mirai/mirai-app/src/screens/local_models/rows.rsnew file mode 100644index 000000000..c1a8ca7df--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/rows.rs@@ -0,0 +1,247 @@+use gpui::{+ AnyElement, Context, CursorStyle, FontWeight, IntoElement, SharedString, deferred, div, prelude::*, px,+ transparent_black,+};++use super::{family_view_model::FamilyViewModel, model_view_model::ModelViewModel, view::LocalModelsView};+use crate::{+ components::{Icon, IconEl, Loader, VendorIcon},+ model_sort::ModelSort,+ theme::ActiveTheme,+ tokens,+};++impl LocalModelsView {+ pub(super) fn chip(+ &self,+ text: String,+ accent: bool,+ cx: &Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let (fg, bg, border) = if accent {+ (theme.success, theme.success.opacity(0.08), theme.success.opacity(0.45))+ } else {+ (theme.text_muted, transparent_black(), theme.button_border)+ };+ div()+ .flex()+ .items_center()+ .h(px(26.))+ .px_2p5()+ .rounded_lg()+ .border_1()+ .border_color(border)+ .bg(bg)+ .text_color(fg)+ .text_xs()+ .child(text)+ }++ pub(super) fn family_row(+ &self,+ cx: &mut Context<Self>,+ fam: &FamilyViewModel,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let key = fam.key.clone();+ let installed = fam.installed_count();+ let total = fam.models.len();++ let mut chips = div().flex().items_center().gap_2();+ if fam.has_mirai {+ chips = chips.child(self.chip("Mirai quantizations".to_string(), true, cx));+ }+ chips = chips.child(self.chip(+ format!(+ "{total} model{}",+ if total == 1 {+ ""+ } else {+ "s"+ }+ ),+ false,+ cx,+ ));+ if installed > 0 {+ chips = chips.child(self.chip(+ format!(+ "{installed} installed model{}",+ if installed == 1 {+ ""+ } else {+ "s"+ }+ ),+ true,+ cx,+ ));+ }+ if let Some(range) = &fam.range {+ chips = chips.child(self.chip(range.clone(), false, cx));+ }++ div()+ .id(SharedString::from(format!("fam-{}", fam.key)))+ .flex()+ .items_center()+ .gap_3()+ .h(px(56.))+ .px_4()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| this.open_family(key.clone(), cx)))+ .child(VendorIcon::new(fam.vendor.clone()).size(tokens::icon::XL).icon_url(fam.icon_url.clone()))+ .child(+ div()+ .flex_1()+ .flex()+ .items_baseline()+ .gap_2()+ .child(div().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(fam.name.clone()))+ .child(div().text_sm().text_color(theme.text_muted).child(format!("from {}", fam.vendor))),+ )+ .child(chips)+ .child(IconEl::new(Icon::ChevronRight, theme.text_muted).size(tokens::icon::MD))+ }++ pub(super) fn recommended_row(+ &self,+ cx: &mut Context<Self>,+ vm: &ModelViewModel,+ family_key: &str,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let key = family_key.to_string();+ let name = vm.name.clone();+ div()+ .id("recommended-model")+ .flex()+ .items_center()+ .gap_3()+ .h(px(56.))+ .px_4()+ .mb_2()+ .rounded_lg()+ .border_1()+ .border_color(theme.success.opacity(0.45))+ .bg(theme.success.opacity(0.08))+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| this.open_family(key.clone(), cx)))+ .child(+ div()+ .flex_1()+ .flex()+ .flex_col()+ .gap_0p5()+ .child(div().text_xs().text_color(theme.success).child("Recommended for your device"))+ .child(div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(name)),+ )+ .child(IconEl::new(Icon::ChevronRight, theme.text_muted).size(tokens::icon::MD))+ }++ pub(super) fn sort_control(+ &self,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let label = self.sort.label();+ let mut menu = div().flex().flex_col().gap_0p5();+ for sort in [ModelSort::Size, ModelSort::Name, ModelSort::Newest] {+ let active = self.sort == sort;+ menu = menu.child(+ div()+ .id(SharedString::from(format!("sort-{label}", label = sort.label())))+ .px_3()+ .py_1p5()+ .rounded_md()+ .text_sm()+ .text_color(if active {+ theme.text+ } else {+ theme.text_muted+ })+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ this.sort = sort;+ this.sort_open = false;+ cx.notify();+ }))+ .child(sort.label()),+ );+ }+ div()+ .relative()+ .child(+ div()+ .id("sort-trigger")+ .flex()+ .items_center()+ .gap_1()+ .h(px(32.))+ .px_2p5()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(|this, _, _, cx| {+ this.sort_open = !this.sort_open;+ cx.notify();+ }))+ .child(div().text_sm().text_color(theme.text_muted).child(format!("Sort: {label}")))+ .child(IconEl::new(Icon::ChevronDown, theme.text_muted).size(tokens::icon::SM)),+ )+ .when(self.sort_open, |el| {+ el.child(+ deferred(+ div()+ .absolute()+ .top(px(36.))+ .right_0()+ .w(px(140.))+ .p_1()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .shadow_md()+ .child(menu),+ )+ .priority(1),+ )+ })+ }++ pub(super) fn empty_message(+ &self,+ cx: &Context<Self>,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let store = self.store.read(cx);+ if store.loading {+ return div()+ .py_8()+ .flex()+ .justify_center()+ .child(Loader::new().label("Loading models…"))+ .into_any_element();+ }+ let msg = match &store.error {+ Some(err) => format!("Failed to load models: {err}"),+ None => "No models".to_string(),+ };+ div().py_8().text_color(theme.text_muted).child(msg).into_any_element()+ }+}diff --git a/apps/mirai/mirai-app/src/screens/local_models/view.rs b/apps/mirai/mirai-app/src/screens/local_models/view.rsnew file mode 100644index 000000000..abc92f9d9--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/local_models/view.rs@@ -0,0 +1,227 @@+use gpui::{Context, Entity, EventEmitter, FontWeight, IntoElement, Render, Window, div, prelude::*, px};++use super::{+ event::LocalModelsEvent, family_view_model::FamilyViewModel, format::section_header,+ model_view_model::ModelViewModel,+};+use crate::{+ components::{ConfirmModal, Icon, IconButton, IconEl, TextInput, VendorIcon},+ device_info,+ model_sort::ModelSort,+ models_store::ModelsStore,+ theme::{ActiveTheme, layout::CONTENT_MAX_WIDTH},+ tokens,+};++pub struct LocalModelsView {+ pub(super) store: Entity<ModelsStore>,+ pub(super) search: Entity<TextInput>,+ pub(super) selected_family: Option<String>,+ pub(super) confirm_delete: Option<(String, String)>,+ pub(super) device_label: String,+ pub(super) recommended_id: Option<String>,+ pub(super) sort: ModelSort,+ pub(super) sort_open: bool,++ pub(super) families_cache: Option<(bool, Vec<FamilyViewModel>)>,+}++impl EventEmitter<LocalModelsEvent> for LocalModelsView {}++impl LocalModelsView {+ pub fn new(+ store: Entity<ModelsStore>,+ cx: &mut Context<Self>,+ ) -> Self {+ let search = cx.new(|cx| TextInput::new(cx, "Search families"));++ cx.observe(&store, |this, _, cx| {+ this.families_cache = None;+ cx.notify();+ })+ .detach();+ cx.observe(&search, |_, _, cx| cx.notify()).detach();+ Self::spawn_recommend(cx);+ Self {+ store,+ search,+ selected_family: None,+ confirm_delete: None,+ device_label: device_info::description(),+ recommended_id: None,+ sort: ModelSort::default(),+ sort_open: false,+ families_cache: None,+ }+ }+}++impl Render for LocalModelsView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let query = self.search.read(cx).text().to_lowercase();++ self.ensure_families(cx);+ let cache = self.families_cache.take().expect("ensure_families populates cache");+ let families: &[FamilyViewModel] = &cache.1;+ let selected = self.selected_family.clone();++ let modal = self.confirm_delete.clone().map(|(id, name)| {+ ConfirmModal::new("Delete model", format!("Delete \"{name}\"? You can download it again later."))+ .confirm_label("Delete")+ .danger(true)+ .on_confirm(cx.listener(move |this, _, _, cx| {+ this.store.update(cx, |s, cx| s.delete(id.clone(), cx));+ this.confirm_delete = None;+ cx.notify();+ }))+ .on_cancel(cx.listener(|this, _, _, cx| {+ this.confirm_delete = None;+ cx.notify();+ }))+ });++ let header = match &selected {+ Some(key) => {+ let title = families+ .iter()+ .find(|f| &f.key == key)+ .map(|f| (f.name.clone(), f.vendor.clone(), f.icon_url.clone()))+ .unwrap_or_else(|| ("Models".to_string(), String::new(), None));+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(+ IconButton::new("models-back", Icon::ChevronLeft)+ .color(theme.text_muted)+ .on_click(cx.listener(|this, _, _, cx| this.back_to_families(cx))),+ )+ .child(VendorIcon::new(title.1.clone()).size(tokens::icon::XXL).icon_url(title.2.clone()))+ .child(div().text_xl().font_weight(FontWeight::MEDIUM).child(title.0))+ .child(div().text_sm().text_color(theme.text_muted).child(format!("from {}", title.1)))+ .into_any_element()+ },+ None => {+ let mut header_col = div().flex().flex_col().gap_0p5().child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Devices, theme.text).size(tokens::icon::XXL))+ .child(div().text_xl().font_weight(FontWeight::MEDIUM).child("Choose local model to chat")),+ );+ if !self.device_label.is_empty() {+ header_col = header_col.child(+ div().pl(px(30.)).text_sm().text_color(theme.text_muted).child(self.device_label.clone()),+ );+ }+ header_col.into_any_element()+ },+ };++ let recommended =+ families.iter().find_map(|f| f.models.iter().find(|m| m.recommended).map(|vm| (vm.clone(), f.key.clone())));++ let mut list = div().flex().flex_col().gap_2().pb_6();+ match &selected {+ None => {+ if let Some((vm, key)) = recommended {+ list = list.child(self.recommended_row(cx, &vm, &key));+ }+ let visible: Vec<&FamilyViewModel> = families+ .iter()+ .filter(|f| {+ query.is_empty()+ || f.name.to_lowercase().contains(&query)+ || f.vendor.to_lowercase().contains(&query)+ })+ .collect();+ if visible.is_empty() {+ list = list.child(self.empty_message(cx));+ } else {+ for fam in visible {+ list = list.child(self.family_row(cx, fam));+ }+ }+ },+ Some(key) => {+ if let Some(fam) = families.iter().find(|f| &f.key == key) {+ let mut matched: Vec<ModelViewModel> = fam+ .models+ .iter()+ .filter(|m| query.is_empty() || m.name.to_lowercase().contains(&query))+ .cloned()+ .collect();+ self.sort_models(&mut matched);+ let installed: Vec<&ModelViewModel> = matched.iter().filter(|m| m.installed()).collect();+ let available: Vec<&ModelViewModel> = matched.iter().filter(|m| !m.installed()).collect();++ let vendor = fam.vendor.clone();+ let icon_url = fam.icon_url.clone();+ if !installed.is_empty() {+ list = list.child(section_header("Installed models", &theme));+ for vm in installed {+ list = list.child(self.model_row(cx, vm, &vendor, icon_url.as_deref()));+ }+ }+ if !available.is_empty() {+ list = list.child(section_header("Available models", &theme));+ for vm in available {+ list = list.child(self.model_row(cx, vm, &vendor, icon_url.as_deref()));+ }+ }+ }+ },+ }++ self.families_cache = Some(cache);++ div()+ .size_full()+ .relative()+ .flex()+ .flex_col()+ .items_center()+ .child(+ div()+ .w_full()+ .max_w(px(CONTENT_MAX_WIDTH))+ .h_full()+ .min_h_0()+ .flex()+ .flex_col()+ .px_6()+ .child(+ div().pt_10().pb_3().flex().items_center().justify_between().gap_4().child(header).child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .when(selected.is_some(), |el| el.child(self.sort_control(cx)))+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .w(px(280.))+ .h(px(32.))+ .px_3()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .child(IconEl::new(Icon::Search, theme.text_muted).size(15.))+ .child(div().flex_1().child(self.search.clone())),+ ),+ ),+ )+ .child(div().id("models-list").flex_1().min_h_0().overflow_y_scroll().child(list)),+ )+ .children(modal)+ }+}diff --git a/apps/mirai/mirai-app/src/screens/mod.rs b/apps/mirai/mirai-app/src/screens/mod.rsnew file mode 100644index 000000000..67679f7a7--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/mod.rs@@ -0,0 +1,15 @@+pub mod chat;+pub mod chats;+pub mod local_models;+pub mod routers;+pub mod settings;+pub mod tts;+pub mod welcome;++pub use chat::{ChatEvent, ChatView};+pub use chats::{ChatsEvent, ChatsView};+pub use local_models::{LocalModelsEvent, LocalModelsView};+pub use routers::RoutersView;+pub use settings::{SettingsEvent, SettingsView};+pub use tts::TtsView;+pub use welcome::{WelcomeEvent, WelcomeView};diff --git a/apps/mirai/mirai-app/src/screens/routers/classification_outcome.rs b/apps/mirai/mirai-app/src/screens/routers/classification_outcome.rsnew file mode 100644index 000000000..0421e07b7--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/classification_outcome.rs@@ -0,0 +1,4 @@+pub(super) enum ClassificationOutcome {+ Ok(Vec<(String, f64)>),+ Err(String),+}diff --git a/apps/mirai/mirai-app/src/screens/routers/classify.rs b/apps/mirai/mirai-app/src/screens/routers/classify.rsnew file mode 100644index 000000000..32d11b21c--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/classify.rs@@ -0,0 +1,113 @@+use std::cmp::Ordering;++use futures::{StreamExt, channel::mpsc};+use gpui::Context;+use gpui_tokio::Tokio;+use uzu::types::{model::Model, session::classification::ClassificationMessage};++use super::{classification_outcome::ClassificationOutcome, view::RoutersView};+use crate::engine;++impl RoutersView {+ pub(super) fn clear(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.input.update(cx, |input, cx| input.set_text("", cx));++ self.classify_gen = self.classify_gen.wrapping_add(1);+ self.classifying = false;+ self.result = None;+ self.error = None;+ cx.notify();+ }++ pub(super) fn resolved_router(+ &self,+ cx: &Context<Self>,+ ) -> Option<Model> {+ self.store.read(cx).resolve_installed(self.selected.as_ref())+ }++ fn classify(+ &mut self,+ text: String,+ cx: &mut Context<Self>,+ ) {+ if self.classifying {+ return;+ }+ let text = text.trim().to_string();+ if text.is_empty() {+ return;+ }+ let Some(model) = self.resolved_router(cx) else {+ self.error = Some("Download and select a router first.".to_string());+ cx.notify();+ return;+ };+ self.selected = Some(model.clone());+ self.classifying = true;+ self.error = None;+ self.result = None;+ self.classify_gen = self.classify_gen.wrapping_add(1);+ let gen_id = self.classify_gen;+ cx.notify();++ let Some(engine) = engine::try_engine(cx) else {+ self.classifying = false;+ self.error = Some("engine unavailable".to_string());+ cx.notify();+ return;+ };++ let (tx, mut rx) = mpsc::unbounded::<ClassificationOutcome>();+ Tokio::spawn(cx, async move {+ match engine.classification(model).await {+ Ok(session) => match session.classify(vec![ClassificationMessage::user(text)]).await {+ Ok(output) => {+ let mut values: Vec<(String, f64)> = output.probabilities.values.into_iter().collect();+ values.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap_or(Ordering::Equal));+ let _ = tx.unbounded_send(ClassificationOutcome::Ok(values));+ },+ Err(err) => {+ let _ = tx.unbounded_send(ClassificationOutcome::Err(format!("{err:?}")));+ },+ },+ Err(err) => {+ let _ = tx.unbounded_send(ClassificationOutcome::Err(err.to_string()));+ },+ }+ })+ .detach();++ cx.spawn(async move |this, cx| {+ while let Some(msg) = rx.next().await {+ let keep = this.update(cx, |view, cx| {+ if view.classify_gen != gen_id {+ return false;+ }+ match msg {+ ClassificationOutcome::Ok(values) => view.result = Some(values),+ ClassificationOutcome::Err(err) => view.error = Some(err),+ }+ view.classifying = false;+ cx.notify();+ true+ });+ if !matches!(keep, Ok(true)) {+ break;+ }+ }+ })+ .detach();+ }++ pub(super) fn classify_from_button(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let text = self.input.read(cx).text();+ self.classify(text, cx);+ }+}diff --git a/apps/mirai/mirai-app/src/screens/routers/mod.rs b/apps/mirai/mirai-app/src/screens/routers/mod.rsnew file mode 100644index 000000000..c23aef835--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/mod.rs@@ -0,0 +1,7 @@+mod classification_outcome;+mod classify;+mod rows;+mod view;+mod vm;++pub use view::RoutersView;diff --git a/apps/mirai/mirai-app/src/screens/routers/rows.rs b/apps/mirai/mirai-app/src/screens/routers/rows.rsnew file mode 100644index 000000000..178b0439b--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/rows.rs@@ -0,0 +1,146 @@+use gpui::{Context, CursorStyle, FontWeight, IntoElement, SharedString, div, prelude::*, px, transparent_black};++use super::{view::RoutersView, vm::RouterVm};+use crate::{+ components::{Icon, IconButton, IconEl, VendorIcon},+ theme::{ActiveTheme, Theme},+ tokens,+};++impl RoutersView {+ pub(super) fn router_row(+ &self,+ cx: &mut Context<Self>,+ vm: &RouterVm,+ selected: bool,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let id = vm.id.clone();++ let control = if vm.installed {+ let del = id.clone();+ div()+ .flex()+ .items_center()+ .gap_1()+ .child(IconEl::new(Icon::Check, theme.success).size(15.))+ .child(+ IconButton::new(SharedString::from(format!("del-{}", vm.id)), Icon::Trash)+ .color(theme.text_muted)+ .icon_size(15.)+ .on_click(cx.listener(move |this, _, _, cx| {+ let del = del.clone();+ this.store.update(cx, |s, cx| s.delete(del, cx));+ })),+ )+ .into_any_element()+ } else if vm.downloading || vm.paused {+ let toggle = id.clone();+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(div().text_xs().text_color(theme.text_muted).child(format!("{:.0}%", vm.progress * 100.0)))+ .child(+ IconButton::new(+ SharedString::from(format!("tog-{}", vm.id)),+ if vm.paused {+ Icon::Download+ } else {+ Icon::Pause+ },+ )+ .color(theme.text_muted)+ .icon_size(15.)+ .on_click(cx.listener(move |this, _, _, cx| {+ let toggle = toggle.clone();+ this.store.update(cx, |s, cx| s.toggle_download(toggle, cx));+ })),+ )+ .into_any_element()+ } else {+ let dl = id.clone();+ IconButton::new(SharedString::from(format!("dl-{}", vm.id)), Icon::Download)+ .color(theme.text_muted)+ .icon_size(15.)+ .on_click(cx.listener(move |this, _, _, cx| {+ let dl = dl.clone();+ this.store.update(cx, |s, cx| s.toggle_download(dl, cx));+ }))+ .into_any_element()+ };++ let select_id = id.clone();+ let bg = if selected {+ theme.bg_hover+ } else {+ transparent_black()+ };+ div()+ .id(SharedString::from(vm.id.clone()))+ .flex()+ .items_center()+ .gap_3()+ .h(px(56.))+ .px_3()+ .rounded_lg()+ .bg(bg)+ .when(vm.installed, |el| el.cursor(CursorStyle::PointingHand))+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(model) = this.store.read(cx).installed_model_by_id(&select_id) {+ this.selected = Some(model);+ cx.notify();+ }+ }))+ .child(VendorIcon::new(vm.vendor.clone()).size(tokens::icon::XL).icon_url(vm.icon_url.clone()))+ .child(+ div()+ .flex_1()+ .min_w_0()+ .flex()+ .flex_col()+ .child(+ div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(vm.name.clone()),+ )+ .child(div().text_xs().text_color(theme.text_muted).child(vm.vendor.clone())),+ )+ .child(div().text_xs().text_color(theme.text_muted).child(vm.size.clone()))+ .child(control)+ .child(IconEl::new(Icon::ChevronRight, theme.text_muted).size(tokens::icon::MD))+ }+}++pub(super) fn router_section(+ label: &str,+ theme: &Theme,+) -> impl IntoElement {+ div()+ .pt_4()+ .pb_1()+ .px_3()+ .text_xs()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text_muted)+ .child(label.to_uppercase())+}++pub(super) fn tag_chip(+ label: &str,+ prob: f64,+ theme: &Theme,+) -> impl IntoElement {+ div()+ .flex()+ .items_center()+ .gap_2()+ .px_3()+ .py_1()+ .rounded_full()+ .border_1()+ .border_color(theme.border)+ .bg(theme.bg_sub)+ .text_sm()+ .text_color(theme.text)+ .child(label.to_string())+ .child(div().text_xs().text_color(theme.text_muted).child(format!("{:.0}%", prob * 100.0)))+}diff --git a/apps/mirai/mirai-app/src/screens/routers/view.rs b/apps/mirai/mirai-app/src/screens/routers/view.rsnew file mode 100644index 000000000..4a53f1dae--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/view.rs@@ -0,0 +1,184 @@+use gpui::{Context, Entity, FontWeight, IntoElement, Render, Window, div, prelude::*, px};+use uzu::types::model::Model;++use super::{+ rows::{router_section, tag_chip},+ vm::RouterVm,+};+use crate::{+ components::{Button, ButtonKind, Icon, IconEl, InputEvent, Loader, TextInput},+ models_store::ModelsStore,+ theme::{ActiveTheme, layout::CONTENT_MAX_WIDTH},+ tokens,+};++pub struct RoutersView {+ pub(super) store: Entity<ModelsStore>,+ pub(super) input: Entity<TextInput>,+ pub(super) selected: Option<Model>,+ pub(super) result: Option<Vec<(String, f64)>>,+ pub(super) classifying: bool,+ pub(super) error: Option<String>,++ pub(super) classify_gen: u64,+}++impl RoutersView {+ pub fn new(+ store: Entity<ModelsStore>,+ cx: &mut Context<Self>,+ ) -> Self {+ let input = cx.new(|cx| TextInput::new(cx, "Enter text to classify…").multiline(false, 6, 18));+ cx.subscribe(&input, |_, _input, event, cx| match event {+ InputEvent::Submit(_) | InputEvent::Changed(_) => cx.notify(),+ })+ .detach();+ cx.observe(&store, |_, _, cx| cx.notify()).detach();+ Self {+ store,+ input,+ selected: None,+ result: None,+ classifying: false,+ error: None,+ classify_gen: 0,+ }+ }+}++impl Render for RoutersView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let selected_id = self.selected.as_ref().map(|m| m.identifier.clone());+ let resolved_name = self.resolved_router(cx).map(|m| m.name()).unwrap_or_else(|| "No router".to_string());++ let (loading, routers): (bool, Vec<RouterVm>) = {+ let store = self.store.read(cx);+ let rows = store.rows.iter().map(|r| RouterVm::from_row(r, theme.dark)).collect();+ (store.loading, rows)+ };+ let any_installed = routers.iter().any(|r| r.installed);++ let mut list = div().flex().flex_col().gap_1();+ if routers.is_empty() {+ list = list.child(if loading {+ div().py_6().flex().justify_center().child(Loader::new().label("Loading routers…")).into_any_element()+ } else {+ div().py_6().text_color(theme.text_muted).child("No routers available.").into_any_element()+ });+ } else {+ let installed: Vec<&RouterVm> = routers.iter().filter(|r| r.installed).collect();+ let available: Vec<&RouterVm> = routers.iter().filter(|r| !r.installed).collect();+ if !installed.is_empty() {+ list = list.child(router_section("Installed", &theme));+ for vm in installed {+ let selected = selected_id.as_deref() == Some(vm.id.as_str());+ list = list.child(self.router_row(cx, vm, selected));+ }+ }+ if !available.is_empty() {+ list = list.child(router_section("Available", &theme));+ for vm in available {+ list = list.child(self.router_row(cx, vm, false));+ }+ }+ }++ let result_block = if self.classifying {+ div().pt_2().text_sm().text_color(theme.text_muted).child("Classifying…").into_any_element()+ } else if let Some(err) = &self.error {+ div()+ .mt_2()+ .p_3()+ .rounded_md()+ .border_1()+ .border_color(theme.error.opacity(0.3))+ .bg(theme.error.opacity(0.08))+ .text_sm()+ .text_color(theme.error)+ .child(err.clone())+ .into_any_element()+ } else if let Some(values) = &self.result {+ let mut pills = div().pt_2().flex().flex_wrap().gap_2();+ for (label, prob) in values {+ pills = pills.child(tag_chip(label, *prob, &theme));+ }+ pills.into_any_element()+ } else {+ div().into_any_element()+ };++ div().size_full().flex().flex_col().items_center().child(+ div()+ .id("routers-scroll")+ .w_full()+ .max_w(px(CONTENT_MAX_WIDTH))+ .flex_1()+ .min_h_0()+ .flex()+ .flex_col()+ .overflow_y_scroll()+ .px_6()+ .child(+ div()+ .pt_10()+ .pb_3()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Routers, theme.text).size(tokens::icon::XXL))+ .child(div().text_xl().font_weight(FontWeight::MEDIUM).child("Choose router")),+ )+ .child(div().h_px().bg(theme.border))+ .child(list)+ .child(+ div()+ .pt_6()+ .pb_6()+ .flex()+ .flex_col()+ .gap_2()+ .child(+ div()+ .text_xs()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text_muted)+ .child(format!("Classify with {resolved_name}")),+ )+ .child(+ div()+ .px_3()+ .py_2()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .child(self.input.clone()),+ )+ .child(+ div()+ .flex()+ .items_center()+ .justify_end()+ .gap_2()+ .child(+ Button::new("clear", "Clear")+ .kind(ButtonKind::Secondary)+ .on_click(cx.listener(|this, _, _, cx| this.clear(cx))),+ )+ .child(+ Button::new("classify", "Classify")+ .kind(ButtonKind::Primary)+ .disabled(!any_installed || self.classifying)+ .on_click(cx.listener(|this, _, _, cx| this.classify_from_button(cx))),+ ),+ )+ .child(result_block),+ ),+ )+ }+}diff --git a/apps/mirai/mirai-app/src/screens/routers/vm.rs b/apps/mirai/mirai-app/src/screens/routers/vm.rsnew file mode 100644index 000000000..119e32236--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/routers/vm.rs@@ -0,0 +1,35 @@+use uzu::storage::types::DownloadPhase;++use crate::{models_store::ModelRow, screens::local_models::format_size};++pub(super) struct RouterVm {+ pub id: String,+ pub name: String,+ pub vendor: String,+ pub icon_url: Option<String>,+ pub size: String,+ pub installed: bool,+ pub downloading: bool,+ pub paused: bool,+ pub progress: f32,+}++impl RouterVm {+ pub(super) fn from_row(+ row: &ModelRow,+ dark: bool,+ ) -> Self {+ let phase = row.phase();+ Self {+ id: row.id().to_string(),+ name: row.name(),+ vendor: row.vendor().unwrap_or_else(|| "Other".to_string()),+ icon_url: row.icon_url(dark),+ size: format_size(row.display_size_bytes()),+ installed: row.is_installed(),+ downloading: matches!(phase, DownloadPhase::Downloading {}),+ paused: matches!(phase, DownloadPhase::Paused {}),+ progress: row.progress(),+ }+ }+}diff --git a/apps/mirai/mirai-app/src/screens/settings/actions.rs b/apps/mirai/mirai-app/src/screens/settings/actions.rsnew file mode 100644index 000000000..95bfa56ca--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/actions.rs@@ -0,0 +1,81 @@+use gpui::Context;++use super::{setting_kind::SettingKind, view::SettingsView};+use crate::{+ data_ops, engine, native_dialog, settings_state, startup,+ toast::{self, ToastKind},+};++impl SettingsView {+ pub(super) fn export_chats(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let Some(data) = data_ops::export_chats_zip() else {+ toast::push(cx, "No chats to export", ToastKind::Info);+ return;+ };+ let default_name = data_ops::export_zip_default_name();+ let Some(path) = native_dialog::save_file("Export chats", &default_name, "zip", "ZIP archive") else {+ return;+ };+ if native_dialog::write_bytes(&path, &data) {+ toast::push(cx, "Chats exported", ToastKind::Info);+ } else {+ toast::push(cx, "Export failed", ToastKind::Error);+ }+ }++ pub(super) fn export_logs(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let Some(data) = data_ops::read_log_bytes() else {+ toast::push(cx, "No log file found", ToastKind::Info);+ return;+ };+ let Some(path) = native_dialog::save_file("Export logs", "mirai.log", "log", "Log file") else {+ return;+ };+ if native_dialog::write_bytes(&path, &data) {+ toast::push(cx, "Logs exported", ToastKind::Info);+ } else {+ toast::push(cx, "Export failed", ToastKind::Error);+ }+ }++ pub(super) fn flip(+ &mut self,+ kind: SettingKind,+ cx: &mut Context<Self>,+ ) {+ let mut settings = settings_state::current(cx);+ match kind {+ SettingKind::Reasoning => settings.reasoning = !settings.reasoning,+ SettingKind::RunOnStartup => {+ settings.run_on_startup = !settings.run_on_startup;+ startup::set(settings.run_on_startup);+ },+ SettingKind::ShowInMenuBar => settings.show_in_menu_bar = !settings.show_in_menu_bar,+ SettingKind::AutoEject => settings.auto_eject = !settings.auto_eject,+ SettingKind::ShareUsage => {+ settings.share_usage_data = !settings.share_usage_data;+ if let Some(engine) = engine::try_engine(cx) {+ engine.set_usage_reporting(settings.share_usage_data);+ }+ },+ }+ settings_state::set(cx, settings);+ }++ pub(super) fn bump_idle(+ &mut self,+ delta: i32,+ cx: &mut Context<Self>,+ ) {+ let mut settings = settings_state::current(cx);+ let next = settings.idle_timeout_minutes as i32 + delta;+ settings.idle_timeout_minutes = next.clamp(1, 120) as u32;+ settings_state::set(cx, settings);+ }+}diff --git a/apps/mirai/mirai-app/src/screens/settings/clear_data.rs b/apps/mirai/mirai-app/src/screens/settings/clear_data.rsnew file mode 100644index 000000000..5b9711b65--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/clear_data.rs@@ -0,0 +1,321 @@+use gpui::{+ AnyElement, Context, CursorStyle, FontWeight, IntoElement, SharedString, black, div, prelude::*, px,+ transparent_black,+};++use super::{event::SettingsEvent, view::SettingsView};+use crate::{+ components::{Button, ButtonKind, ButtonSize},+ data_ops::{self, CleanupCategory},+ engine,+ theme::ActiveTheme,+};++#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum ClearDataStep {+ Select,+ Confirm,+ Result,+}++fn confirm_summary(categories: &[CleanupCategory]) -> String {+ let labels: Vec<&str> = categories.iter().map(|c| c.label()).collect();+ match labels.len() {+ 0 => String::new(),+ 1 => labels[0].to_string(),+ 2 => format!("{} and {}", labels[0], labels[1]),+ _ => format!("{}, and {}", labels[..labels.len() - 1].join(", "), labels[labels.len() - 1]),+ }+}++impl SettingsView {+ pub(super) fn clear_data_modal(+ &self,+ cx: &mut Context<Self>,+ ) -> Option<AnyElement> {+ if !self.clear_data_open {+ return None;+ }+ let theme = cx.theme().clone();+ let preview = self.clear_data_preview.clone();+ let selected = self.clear_data_selected.clone();+ let busy = self.clear_data_busy;+ let step = self.clear_data_step;++ let checkbox_row = |cat: CleanupCategory| {+ let checked = selected.contains(&cat);+ let desc = data_ops::category_description(cat, &preview);+ let box_color = if checked {+ theme.info+ } else {+ theme.border+ };+ div()+ .id(SharedString::from(format!("clear-cat-{:?}", cat)))+ .flex()+ .items_start()+ .gap_3()+ .pb_2()+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(move |this, _, _, cx| this.toggle_clear_category(cat, cx)))+ .child(+ div()+ .mt(px(2.))+ .size(px(14.))+ .rounded_sm()+ .border_1()+ .border_color(box_color)+ .bg(if checked {+ theme.info.opacity(0.15)+ } else {+ transparent_black()+ })+ .flex()+ .items_center()+ .justify_center()+ .text_xs()+ .text_color(theme.info)+ .child(if checked {+ "✓"+ } else {+ ""+ }),+ )+ .child(+ div()+ .flex()+ .flex_col()+ .gap_0p5()+ .child(+ div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(cat.label()),+ )+ .child(div().text_xs().text_color(theme.text_muted).child(desc)),+ )+ };++ let (title, body, footer): (SharedString, AnyElement, AnyElement) =+ match step {+ ClearDataStep::Select => {+ let selected_count = CleanupCategory::ALL.iter().filter(|c| selected.contains(c)).count();+ let review = Button::new("clear-review", "Review")+ .kind(ButtonKind::Danger)+ .size(ButtonSize::Small)+ .disabled(selected_count == 0 || busy)+ .on_click(cx.listener(|this, _, _, cx| {+ this.clear_data_step = ClearDataStep::Confirm;+ cx.notify();+ }));+ let cancel = Button::new("clear-cancel", "Cancel")+ .kind(ButtonKind::Secondary)+ .size(ButtonSize::Small)+ .on_click(cx.listener(|this, _, _, cx| this.close_clear_data(cx)));+ (+ "Clear data".into(),+ div()+ .flex()+ .flex_col()+ .gap_3()+ .child(+ div()+ .text_sm()+ .text_color(theme.text_muted)+ .child("Select the data categories you want to permanently delete."),+ )+ .child(div().flex().flex_col().children(CleanupCategory::ALL.map(checkbox_row)))+ .into_any_element(),+ div().flex().justify_end().gap_2().child(cancel).child(review).into_any_element(),+ )+ },+ ClearDataStep::Confirm => {+ let cats: Vec<CleanupCategory> =+ CleanupCategory::ALL.into_iter().filter(|c| selected.contains(c)).collect();+ let summary = confirm_summary(&cats);+ let delete = Button::new("clear-delete", "Delete")+ .kind(ButtonKind::Danger)+ .size(ButtonSize::Small)+ .disabled(busy)+ .on_click(cx.listener(|this, _, _, cx| this.run_clear_data(cx)));+ let back = Button::new("clear-back", "Back")+ .kind(ButtonKind::Secondary)+ .size(ButtonSize::Small)+ .disabled(busy)+ .on_click(cx.listener(|this, _, _, cx| {+ this.clear_data_step = ClearDataStep::Select;+ cx.notify();+ }));+ let cancel = Button::new("clear-cancel", "Cancel")+ .kind(ButtonKind::Secondary)+ .size(ButtonSize::Small)+ .disabled(busy)+ .on_click(cx.listener(|this, _, _, cx| this.close_clear_data(cx)));+ (+ "Are you sure?".into(),+ div()+ .flex()+ .flex_col()+ .gap_3()+ .child(div().text_sm().text_color(theme.text_muted).child(format!(+ "This will permanently delete: {summary}. This action cannot be undone."+ )))+ .into_any_element(),+ div().flex().justify_end().gap_2().child(cancel).child(back).child(delete).into_any_element(),+ )+ },+ ClearDataStep::Result => {+ let close = Button::new("clear-close", "Close")+ .kind(ButtonKind::Primary)+ .size(ButtonSize::Small)+ .on_click(cx.listener(|this, _, _, cx| this.close_clear_data(cx)));+ let mut lines = div().flex().flex_col().gap_2();+ for cat in CleanupCategory::ALL.iter().filter(|c| selected.contains(c)) {+ let done = self.clear_data_results.iter().find(|(c, _)| c == cat).is_some_and(|(_, ok)| *ok);+ let mark = if done {+ "✓"+ } else {+ "✗"+ };+ let status = if done {+ "cleared"+ } else {+ "failed"+ };+ lines = lines.child(+ div().flex().items_center().gap_2().child(div().text_sm().child(mark)).child(+ div()+ .text_sm()+ .text_color(if done {+ theme.text+ } else {+ theme.text_muted+ })+ .child(format!("{} {status}", cat.label())),+ ),+ );+ }+ (+ "Done".into(),+ lines.into_any_element(),+ div().flex().justify_end().gap_2().child(close).into_any_element(),+ )+ },+ };++ Some(+ div()+ .absolute()+ .size_full()+ .flex()+ .items_center()+ .justify_center()+ .bg(black().opacity(0.5))+ .occlude()+ .child(+ div()+ .w(px(400.))+ .flex()+ .flex_col()+ .gap_3()+ .p_4()+ .rounded_xl()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .child(div().text_color(theme.text).font_weight(FontWeight::MEDIUM).child(title))+ .child(body)+ .child(footer),+ )+ .into_any_element(),+ )+ }++ pub(super) fn open_clear_data(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.clear_data_open = true;+ self.clear_data_step = ClearDataStep::Select;+ self.clear_data_results.clear();+ self.clear_data_busy = false;+ self.clear_data_preview = data_ops::cleanup_preview_disk();+ self.clear_data_selected = CleanupCategory::ALL.into_iter().collect();+ if self.clear_data_preview.dialogs.count == 0 {+ self.clear_data_selected.remove(&CleanupCategory::Dialogs);+ }+ if self.clear_data_preview.files.count == 0 {+ self.clear_data_selected.remove(&CleanupCategory::Files);+ }+ if self.clear_data_preview.logs_size_bytes == 0 {+ self.clear_data_selected.remove(&CleanupCategory::Logs);+ }+ cx.notify();++ if let Some(engine) = engine::try_engine(cx) {+ let view = cx.entity();+ cx.spawn(async move |_, cx| {+ let models = data_ops::model_cleanup_stats(&engine).await;+ view.update(cx, |this, cx| {+ if !this.clear_data_open {+ return;+ }+ this.clear_data_preview.models = models;+ if this.clear_data_preview.models.count == 0 {+ this.clear_data_selected.remove(&CleanupCategory::Models);+ }+ cx.notify();+ });+ })+ .detach();+ }+ }++ pub(super) fn close_clear_data(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.clear_data_open = false;+ self.clear_data_busy = false;+ cx.notify();+ }++ pub(super) fn toggle_clear_category(+ &mut self,+ cat: CleanupCategory,+ cx: &mut Context<Self>,+ ) {+ if !self.clear_data_selected.remove(&cat) {+ self.clear_data_selected.insert(cat);+ }+ cx.notify();+ }++ pub(super) fn run_clear_data(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let selected: Vec<CleanupCategory> =+ CleanupCategory::ALL.into_iter().filter(|c| self.clear_data_selected.contains(c)).collect();+ if selected.is_empty() {+ return;+ }+ self.clear_data_busy = true;+ cx.notify();++ let engine = engine::try_engine(cx);+ let view = cx.entity();+ cx.spawn(async move |_, cx| {+ let results = data_ops::execute_cleanup(engine.as_ref(), &selected).await;+ view.update(cx, |this, cx| {+ this.clear_data_busy = false;+ this.clear_data_results = results;+ this.clear_data_step = ClearDataStep::Result;++ cx.emit(SettingsEvent::DataCleared {+ dialogs: selected.contains(&CleanupCategory::Dialogs),+ audio: selected.contains(&CleanupCategory::Files),+ });+ cx.notify();+ });+ })+ .detach();+ }+}diff --git a/apps/mirai/mirai-app/src/screens/settings/event.rs b/apps/mirai/mirai-app/src/screens/settings/event.rsnew file mode 100644index 000000000..fa0469fcd--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/event.rs@@ -0,0 +1,6 @@+pub enum SettingsEvent {+ DataCleared {+ dialogs: bool,+ audio: bool,+ },+}diff --git a/apps/mirai/mirai-app/src/screens/settings/mod.rs b/apps/mirai/mirai-app/src/screens/settings/mod.rsnew file mode 100644index 000000000..73fddeea6--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/mod.rs@@ -0,0 +1,11 @@+mod actions;+mod clear_data;+mod event;+mod rows;+mod setting_kind;+mod settings_tab;+mod tabs;+mod view;++pub use event::SettingsEvent;+pub use view::SettingsView;diff --git a/apps/mirai/mirai-app/src/screens/settings/rows.rs b/apps/mirai/mirai-app/src/screens/settings/rows.rsnew file mode 100644index 000000000..670fae042--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/rows.rs@@ -0,0 +1,216 @@+use gpui::{AnyElement, Context, CursorStyle, FontWeight, IntoElement, div, prelude::*, px, transparent_black};++use super::{setting_kind::SettingKind, settings_tab::SettingsTab, view::SettingsView};+use crate::{+ components::{Button, ButtonKind, ButtonSize, Icon, IconEl, Toggle},+ theme::ActiveTheme,+ tokens,+};++const DISCORD_URL: &str = "https://discord.com/invite/gUhyn6Rb7x";++impl SettingsView {+ pub(super) fn action_button(+ &self,+ cx: &mut Context<Self>,+ id: &'static str,+ icon: Icon,+ label: &'static str,+ on_click: impl Fn(&mut Self, &mut Context<Self>) + 'static,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ div()+ .id(id)+ .flex()+ .items_center()+ .gap_1()+ .h(px(28.))+ .px_3()+ .rounded_md()+ .border_1()+ .border_color(theme.border)+ .bg(theme.card)+ .text_xs()+ .text_color(theme.text)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| on_click(this, cx)))+ .child(IconEl::new(icon, theme.text_muted).size(13.))+ .child(label)+ .into_any_element()+ }++ pub(super) fn toggle_row(+ &self,+ cx: &mut Context<Self>,+ title: &'static str,+ desc: &'static str,+ on: bool,+ kind: SettingKind,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let view = cx.entity();+ div()+ .flex()+ .items_center()+ .justify_between()+ .py_3()+ .child(+ div()+ .flex()+ .flex_col()+ .child(div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(title))+ .child(div().text_xs().text_color(theme.text_muted).child(desc)),+ )+ .child(Toggle::new(title, on).on_click(move |_, _, cx| {+ view.update(cx, |this, cx| this.flip(kind, cx));+ }))+ }++ pub(super) fn action_row(+ &self,+ cx: &mut Context<Self>,+ title: &'static str,+ desc: &'static str,+ right: AnyElement,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ div()+ .flex()+ .items_center()+ .justify_between()+ .py_3()+ .child(+ div()+ .flex()+ .flex_col()+ .child(div().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child(title))+ .child(div().text_xs().text_color(theme.text_muted).child(desc)),+ )+ .child(right)+ .into_any_element()+ }++ pub(super) fn idle_timeout_row(+ &self,+ cx: &mut Context<Self>,+ minutes: u32,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let border = theme.border;+ let hover = theme.bg_hover;+ let stepper = |id: &'static str, label: &'static str| {+ div()+ .id(id)+ .flex()+ .items_center()+ .justify_center()+ .size(px(24.))+ .text_color(theme.text)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .child(label)+ };+ div()+ .flex()+ .items_center()+ .justify_between()+ .pb_3()+ .child(div().text_sm().text_color(theme.text_muted).child("Idle timeout (minutes)"))+ .child(+ div()+ .flex()+ .items_center()+ .rounded_md()+ .border_1()+ .border_color(border)+ .bg(theme.bg)+ .child(stepper("idle-dec", "−").on_click(cx.listener(|this, _, _, cx| this.bump_idle(-1, cx))))+ .child(div().w(px(36.)).text_center().text_sm().text_color(theme.text).child(format!("{minutes}")))+ .child(stepper("idle-inc", "+").on_click(cx.listener(|this, _, _, cx| this.bump_idle(1, cx)))),+ )+ .into_any_element()+ }++ pub(super) fn nav_item(+ &self,+ cx: &mut Context<Self>,+ label: &'static str,+ tab: SettingsTab,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let active = self.tab == tab;+ let hover = theme.bg_hover;+ div()+ .id(label)+ .flex()+ .items_center()+ .h(px(32.))+ .px_2()+ .rounded_md()+ .text_sm()+ .text_color(if active {+ theme.text+ } else {+ theme.text_muted+ })+ .bg(if active {+ theme.bg_hover+ } else {+ transparent_black()+ })+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(cx.listener(move |this, _, _, cx| {+ this.tab = tab;+ cx.notify();+ }))+ .child(label)+ .into_any_element()+ }++ pub(super) fn divider(+ &self,+ cx: &mut Context<Self>,+ ) -> AnyElement {+ div().h(px(1.)).w_full().bg(cx.theme().border).into_any_element()+ }++ pub(super) fn feedback_footer(+ &self,+ cx: &mut Context<Self>,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ div()+ .w_full()+ .flex()+ .items_center()+ .justify_between()+ .child(+ div()+ .flex_1()+ .min_w_0()+ .flex()+ .items_center()+ .gap_2()+ .child(IconEl::new(Icon::Heart, theme.info).size(tokens::icon::MD))+ .child(+ div()+ .min_w_0()+ .text_xs()+ .text_color(theme.text_muted)+ .child("Let us know your feedback or request a new feature"),+ ),+ )+ .child(+ div().flex_shrink_0().child(+ Button::new("give-feedback", "Give Feedback")+ .kind(ButtonKind::Primary)+ .size(ButtonSize::Small)+ .on_click(|_, _, cx| cx.open_url(DISCORD_URL)),+ ),+ )+ .into_any_element()+ }+}diff --git a/apps/mirai/mirai-app/src/screens/settings/setting_kind.rs b/apps/mirai/mirai-app/src/screens/settings/setting_kind.rsnew file mode 100644index 000000000..f8286457c--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/setting_kind.rs@@ -0,0 +1,8 @@+#[derive(Clone, Copy)]+pub(super) enum SettingKind {+ Reasoning,+ RunOnStartup,+ ShowInMenuBar,+ AutoEject,+ ShareUsage,+}diff --git a/apps/mirai/mirai-app/src/screens/settings/settings_tab.rs b/apps/mirai/mirai-app/src/screens/settings/settings_tab.rsnew file mode 100644index 000000000..e122e3a00--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/settings_tab.rs@@ -0,0 +1,6 @@+#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum SettingsTab {+ General,+ Privacy,+ About,+}diff --git a/apps/mirai/mirai-app/src/screens/settings/tabs.rs b/apps/mirai/mirai-app/src/screens/settings/tabs.rsnew file mode 100644index 000000000..d8cd7cd10--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/tabs.rs@@ -0,0 +1,297 @@+use gpui::{AnyElement, Context, CursorStyle, FontWeight, IntoElement, div, prelude::*, px};++use super::{setting_kind::SettingKind, view::SettingsView};+use crate::{+ components::{Icon, IconEl},+ settings_state,+ theme::{ActiveTheme, Theme},+ toast::{self, ToastKind},+ tokens,+};++impl SettingsView {+ pub(super) fn general_content(+ &self,+ cx: &mut Context<Self>,+ ) -> AnyElement {+ let settings = settings_state::current(cx);+ let theme = cx.theme().clone();++ let shortcut_hover = theme.text.opacity(0.85);+ let set_shortcut = div()+ .id("set-shortcut")+ .flex()+ .items_center()+ .justify_center()+ .h(px(28.))+ .px_3()+ .rounded_md()+ .bg(theme.text)+ .text_xs()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.bg)+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(shortcut_hover))+ .on_click(cx.listener(|_, _, _, cx| {+ toast::push(cx, "Global shortcut capture is coming soon", ToastKind::Info);+ }))+ .child("Set shortcut")+ .into_any_element();++ let mut col = div()+ .flex()+ .flex_col()+ .gap_3()+ .child(self.instructions.clone())+ .child(self.divider(cx))+ .child(self.toggle_row(+ cx,+ "Run on startup",+ "Automatically start Mirai when you log in to your computer",+ settings.run_on_startup,+ SettingKind::RunOnStartup,+ ))+ .child(self.toggle_row(+ cx,+ "Show in the menu bar",+ "Mirai will be always available in your menu bar",+ settings.show_in_menu_bar,+ SettingKind::ShowInMenuBar,+ ))+ .child(self.action_row(+ cx,+ "Quick entry keyboard shortcut",+ "Open Mirai from anywhere with a shortcut",+ set_shortcut,+ ))+ .child(self.toggle_row(+ cx,+ "Default reasoning mode",+ "Let reasoning models think by default. You can override this for each model.",+ settings.reasoning,+ SettingKind::Reasoning,+ ))+ .child(self.toggle_row(+ cx,+ "Auto-eject models when idle",+ "Automatically unload local models after inactivity",+ settings.auto_eject,+ SettingKind::AutoEject,+ ));+ if settings.auto_eject {+ col = col.child(self.idle_timeout_row(cx, settings.idle_timeout_minutes));+ }+ col.into_any_element()+ }++ pub(super) fn privacy_content(+ &self,+ cx: &mut Context<Self>,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let settings = settings_state::current(cx);+ let export_chats = self.action_button(cx, "export-chats", Icon::Download, "Export", |this, cx| {+ this.export_chats(cx);+ });+ let export_logs = self.action_button(cx, "export-logs", Icon::Download, "Export", |this, cx| {+ this.export_logs(cx);+ });+ let clear_data = self.action_button(cx, "clear-data", Icon::Trash, "Clear data", |this, cx| {+ this.open_clear_data(cx);+ });+ div()+ .flex()+ .flex_col()+ .gap_1()+ .child(+ div()+ .flex()+ .flex_col()+ .gap_2()+ .pb_2()+ .child(IconEl::new(Icon::Shield, theme.info).size(tokens::icon::XXL))+ .child(+ div()+ .text_lg()+ .font_weight(FontWeight::SEMIBOLD)+ .text_color(theme.text)+ .child("All data is processed and stored locally on your device."),+ )+ .child(+ div()+ .text_xs()+ .text_color(theme.text_muted)+ .child("Your privacy is built into the core of how Mirai runs."),+ ),+ )+ .child(self.divider(cx))+ .child(legal_row(+ "terms",+ "Terms of Service",+ "https://artifacts.trymirai.com/legal/Mirai_Tech_Terms_of_Use.pdf",+ &theme,+ ))+ .child(legal_row(+ "privacy-policy",+ "Privacy Policy",+ "https://artifacts.trymirai.com/legal/Mirai_Tech_Privacy_Policy.pdf",+ &theme,+ ))+ .child(self.action_row(cx, "Export all your chats", "As Markdown files in .zip archive", export_chats))+ .child(self.action_row(cx, "Export logs", "Save the current Mirai log file for debugging", export_logs))+ .child(self.action_row(cx, "Clear data", "Delete dialogs, generated audio, models, or logs", clear_data))+ .child(self.toggle_row(+ cx,+ "Share anonymous usage data",+ "Help us improve Mirai by sharing anonymous usage data.",+ settings.share_usage_data,+ SettingKind::ShareUsage,+ ))+ .into_any_element()+ }++ pub(super) fn about_content(+ &self,+ cx: &mut Context<Self>,+ ) -> AnyElement {+ let theme = cx.theme().clone();+ let text = theme.text;+ let muted = theme.text_muted;+ let hover = theme.bg_hover;+ let border = theme.border;++ let cell = |id: &'static str, label: &'static str, url: &'static str| {+ div()+ .id(id)+ .flex_1()+ .flex()+ .items_center()+ .justify_between()+ .h(px(52.))+ .px_4()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(move |_, _, cx| cx.open_url(url))+ .child(div().text_sm().text_color(text).child(label))+ .child(IconEl::new(Icon::ChevronRight, muted).size(tokens::icon::SM))+ };+ let vsep = || div().w(px(1.)).h(px(24.)).bg(border);++ let header_card = div()+ .rounded_lg()+ .border_1()+ .border_color(border)+ .overflow_hidden()+ .child(+ div()+ .flex()+ .flex_col()+ .gap_2()+ .p_4()+ .child(IconEl::new(Icon::Heart, theme.info).size(tokens::icon::XXL))+ .child(div().text_lg().font_weight(FontWeight::SEMIBOLD).text_color(text).child(+ "Done by a team who share a vision for accessible and powerful \+ local AI.",+ )),+ )+ .child(+ div()+ .flex()+ .items_center()+ .border_t_1()+ .border_color(border)+ .child(cell("about-website", "Website", "https://trymirai.com/"))+ .child(vsep())+ .child(cell("about-github", "GitHub", "https://github.com/trymirai"))+ .child(vsep())+ .child(cell("about-vision", "Vision", "https://trymirai.com/about-us"))+ .child(vsep())+ .child(cell("about-docs", "Docs", "https://docs.trymirai.com/")),+ );++ div()+ .flex()+ .flex_col()+ .gap_3()+ .child(header_card)+ .child(div().pt_6().text_xs().font_weight(FontWeight::MEDIUM).text_color(muted).child("Our products"))+ .child(product_row(+ "prod-platform",+ "Mirai platform",+ "a web console where you can set up the SDK for your product",+ "https://platform.trymirai.com",+ &theme,+ ))+ .child(self.divider(cx))+ .child(product_row(+ "prod-cli",+ "Command-line interface",+ "that allows you to interactively send messages to a model or start a local server",+ "https://docs.trymirai.com/overview/cli",+ &theme,+ ))+ .child(self.divider(cx))+ .child(product_row(+ "prod-engine",+ "Rust inference engine",+ "designed to run models on specific hardware",+ "https://github.com/trymirai/uzu",+ &theme,+ ))+ .into_any_element()+ }+}++fn legal_row(+ id: &'static str,+ label: &'static str,+ url: &'static str,+ theme: &Theme,+) -> impl IntoElement {+ let hover = theme.bg_hover;+ let text = theme.text;+ let muted = theme.text_muted;+ div()+ .id(id)+ .flex()+ .items_center()+ .justify_between()+ .py_3()+ .rounded_md()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(move |_, _, cx| cx.open_url(url))+ .child(div().text_sm().text_color(text).child(label))+ .child(IconEl::new(Icon::ChevronRight, muted).size(tokens::icon::MD))+}++fn product_row(+ id: &'static str,+ title: &'static str,+ desc: &'static str,+ url: &'static str,+ theme: &Theme,+) -> impl IntoElement {+ let hover = theme.bg_hover;+ let text = theme.text;+ let muted = theme.text_muted;+ div()+ .id(id)+ .flex()+ .items_center()+ .justify_between()+ .py_2()+ .px_2()+ .rounded_md()+ .cursor(CursorStyle::PointingHand)+ .hover(move |s| s.bg(hover))+ .on_click(move |_, _, cx| cx.open_url(url))+ .child(+ div()+ .flex()+ .flex_col()+ .child(div().text_sm().text_color(text).child(title))+ .child(div().text_xs().text_color(muted).child(desc)),+ )+ .child(IconEl::new(Icon::ChevronRight, muted).size(tokens::icon::SM))+}diff --git a/apps/mirai/mirai-app/src/screens/settings/view.rs b/apps/mirai/mirai-app/src/screens/settings/view.rsnew file mode 100644index 000000000..1049ea82e--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/settings/view.rs@@ -0,0 +1,125 @@+use std::collections::HashSet;++use gpui::{Context, Entity, EventEmitter, FontWeight, IntoElement, Render, Window, div, prelude::*, px};++use super::{clear_data::ClearDataStep, event::SettingsEvent, settings_tab::SettingsTab};+use crate::{+ data_ops::{CleanupCategory, CleanupPreview},+ instructions_card::InstructionsCard,+ settings_state,+ theme::ActiveTheme,+ tokens,+};++pub struct SettingsView {+ pub(super) instructions: Entity<InstructionsCard>,+ pub(super) tab: SettingsTab,+ pub(super) clear_data_open: bool,+ pub(super) clear_data_step: ClearDataStep,+ pub(super) clear_data_selected: HashSet<CleanupCategory>,+ pub(super) clear_data_preview: CleanupPreview,+ pub(super) clear_data_results: Vec<(CleanupCategory, bool)>,+ pub(super) clear_data_busy: bool,+}++impl EventEmitter<SettingsEvent> for SettingsView {}++impl SettingsView {+ pub fn new(cx: &mut Context<Self>) -> Self {+ let instructions =+ cx.new(|cx| InstructionsCard::new(cx, "settings-instr-card", "Instructions applied to every chat…"));+ settings_state::observe(cx, |_, cx| cx.notify()).detach();+ Self {+ instructions,+ tab: SettingsTab::General,+ clear_data_open: false,+ clear_data_step: ClearDataStep::Select,+ clear_data_selected: CleanupCategory::ALL.into_iter().collect(),+ clear_data_preview: CleanupPreview::default(),+ clear_data_results: Vec::new(),+ clear_data_busy: false,+ }+ }+}++impl Render for SettingsView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let content = match self.tab {+ SettingsTab::General => self.general_content(cx),+ SettingsTab::Privacy => self.privacy_content(cx),+ SettingsTab::About => self.about_content(cx),+ };++ let nav = div()+ .w(px(160.))+ .flex_none()+ .h_full()+ .flex()+ .flex_col()+ .gap_1()+ .p_2()+ .border_r_1()+ .border_color(theme.border)+ .child(self.nav_item(cx, "General", SettingsTab::General))+ .child(self.nav_item(cx, "Privacy", SettingsTab::Privacy))+ .child(self.nav_item(cx, "About Mirai", SettingsTab::About));++ let modal = self.clear_data_modal(cx);++ let mut root = div()+ .size_full()+ .relative()+ .flex()+ .flex_col()+ .child(+ div().w_full().flex_none().pt_10().pb_3().px_6().border_b_1().border_color(theme.border).child(+ div()+ .text_size(tokens::font::LABEL)+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text)+ .child("Settings"),+ ),+ )+ .child(+ div().flex().flex_1().min_h_0().child(nav).child(+ div()+ .flex_1()+ .min_h_0()+ .flex()+ .flex_col()+ .child(+ div()+ .id("settings-content")+ .flex_1()+ .min_h_0()+ .overflow_y_scroll()+ .px_6()+ .py_4()+ .child(content),+ )+ .when(matches!(self.tab, SettingsTab::General | SettingsTab::Privacy), |el| {+ el.child(+ div()+ .flex_none()+ .w_full()+ .border_t_1()+ .border_color(theme.border)+ .px_6()+ .py_3()+ .child(self.feedback_footer(cx)),+ )+ }),+ ),+ );+ if let Some(modal) = modal {+ root = root.child(modal);+ }+ root+ }+}diff --git a/apps/mirai/mirai-app/src/screens/tts/cards.rs b/apps/mirai/mirai-app/src/screens/tts/cards.rsnew file mode 100644index 000000000..4e1ab0818--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/cards.rs@@ -0,0 +1,246 @@+use gpui::{+ Context, CursorStyle, FontWeight, IntoElement, SharedString, div, prelude::*, px, relative, transparent_black,+};++use super::{right_pane_tab::RightPaneTab, view::TtsView, vm::TtsVm};+use crate::{+ components::{Icon, IconButton, IconEl, VendorIcon},+ text::truncate_with_ellipsis,+ theme::ActiveTheme,+ tokens,+ tts_history::TtsHistoryEntry,+};++impl TtsView {+ pub(super) fn model_card(+ &self,+ cx: &mut Context<Self>,+ vm: &TtsVm,+ selected: bool,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let id = vm.id.clone();++ let control = if vm.installed {+ let id = id.clone();+ IconButton::new(SharedString::from(format!("del-{}", vm.id)), Icon::Trash)+ .color(theme.text_muted)+ .icon_size(15.)+ .on_click(cx.listener(move |this, _, _, cx| {+ let id = id.clone();+ this.store.update(cx, |s, cx| s.delete(id, cx));+ }))+ .into_any_element()+ } else if vm.downloading {+ div()+ .text_xs()+ .text_color(theme.text_muted)+ .child(format!("{:.0}%", vm.progress * 100.0))+ .into_any_element()+ } else {+ let id = id.clone();+ IconButton::new(SharedString::from(format!("dl-{}", vm.id)), Icon::Download)+ .color(theme.text_muted)+ .icon_size(15.)+ .on_click(cx.listener(move |this, _, _, cx| {+ let id = id.clone();+ this.store.update(cx, |s, cx| s.toggle_download(id, cx));+ }))+ .into_any_element()+ };++ let badge = if vm.installed {+ div()+ .flex()+ .items_center()+ .gap_1()+ .px_2()+ .py_0p5()+ .rounded_md()+ .bg(theme.success.opacity(0.12))+ .text_size(tokens::font::CAPTION)+ .text_color(theme.success)+ .child(IconEl::new(Icon::Check, theme.success).size(11.))+ .child("Installed")+ .into_any_element()+ } else if vm.downloading {+ div()+ .text_size(tokens::font::CAPTION)+ .text_color(theme.text_muted)+ .child(format!("Downloading {:.0}%", vm.progress * 100.0))+ .into_any_element()+ } else {+ div()+ .text_size(tokens::font::CAPTION)+ .text_color(theme.text_muted)+ .child("Not installed")+ .into_any_element()+ };++ let select_id = id.clone();+ let border = if selected {+ theme.success+ } else {+ theme.border+ };+ div()+ .id(SharedString::from(vm.id.clone()))+ .flex()+ .flex_col()+ .gap_2()+ .p_3()+ .rounded_lg()+ .border_1()+ .border_color(border)+ .bg(theme.bg_sub)+ .when(vm.installed, |el| el.cursor(CursorStyle::PointingHand))+ .on_click(cx.listener(move |this, _, _, cx| {+ if let Some(model) = this.store.read(cx).installed_model_by_id(&select_id) {+ this.selected = Some(model);+ cx.notify();+ }+ }))+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(VendorIcon::new(vm.vendor.clone()).size(tokens::icon::XXL).icon_url(vm.icon_url.clone()))+ .child(+ div()+ .flex_1()+ .min_w_0()+ .text_sm()+ .font_weight(FontWeight::MEDIUM)+ .text_color(theme.text)+ .child(vm.name.clone()),+ )+ .child(div().text_xs().text_color(theme.text_muted).child(vm.size.clone()))+ .child(control),+ )+ .child(div().flex().child(badge))+ .when(vm.downloading, |el| {+ el.child(+ div()+ .w_full()+ .h(px(4.))+ .rounded_full()+ .bg(theme.bg_hover)+ .child(div().h_full().w(relative(vm.progress.clamp(0., 1.))).rounded_full().bg(theme.text)),+ )+ })+ }++ pub(super) fn history_row(+ &self,+ cx: &mut Context<Self>,+ entry: &TtsHistoryEntry,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let hover = theme.bg_hover;+ let playing = self.playing_id.as_deref() == Some(entry.id.as_str());+ let preview = truncate_with_ellipsis(&entry.text, 72);+ let id = entry.id.clone();+ let play_id = id.clone();+ let del_id = id.clone();+ let restore = entry.text.clone();++ div()+ .id(SharedString::from(format!("hist-{}", entry.id)))+ .flex()+ .items_center()+ .justify_between()+ .gap_3()+ .min_h(px(52.))+ .px_3()+ .rounded_lg()+ .hover(move |s| s.bg(hover))+ .child(+ div()+ .id(SharedString::from(format!("restore-{}", entry.id)))+ .flex_1()+ .min_w_0()+ .flex()+ .flex_col()+ .gap_1()+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(move |this, _, _, cx| {+ this.restore_text(&restore, cx);+ }))+ .child(div().text_sm().text_color(theme.text).overflow_hidden().child(preview))+ .child(+ div()+ .text_xs()+ .text_color(theme.text_muted)+ .child(format!("{} · {}", entry.model_name, entry.vendor)),+ ),+ )+ .child(+ div()+ .flex()+ .items_center()+ .gap_1()+ .child(+ IconButton::new(+ SharedString::from(format!("play-{}", entry.id)),+ if playing {+ Icon::Stop+ } else {+ Icon::Speech+ },+ )+ .color(theme.text_muted)+ .disabled(self.generating)+ .on_click(cx.listener(move |this, _, _, cx| {+ if playing {+ this.stop_playback(cx);+ } else {+ this.play_history(&play_id, cx);+ }+ })),+ )+ .child(+ IconButton::new(SharedString::from(format!("del-hist-{}", entry.id)), Icon::Trash)+ .color(theme.text_muted)+ .on_click(cx.listener(move |this, _, _, cx| {+ this.delete_history(&del_id, cx);+ })),+ ),+ )+ }++ pub(super) fn tab_button(+ &self,+ cx: &mut Context<Self>,+ label: &'static str,+ tab: RightPaneTab,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let active = self.right_tab == tab;+ div()+ .id(label)+ .flex_1()+ .flex()+ .items_center()+ .justify_center()+ .h(px(48.))+ .text_sm()+ .text_color(if active {+ theme.text+ } else {+ theme.text_muted+ })+ .border_b_2()+ .border_color(if active {+ theme.text+ } else {+ transparent_black()+ })+ .cursor(CursorStyle::PointingHand)+ .on_click(cx.listener(move |this, _, _, cx| {+ this.right_tab = tab;+ cx.notify();+ }))+ .child(label)+ }+}diff --git a/apps/mirai/mirai-app/src/screens/tts/history.rs b/apps/mirai/mirai-app/src/screens/tts/history.rsnew file mode 100644index 000000000..2f30f615d--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/history.rs@@ -0,0 +1,118 @@+use std::fs;++use gpui::{Context, PathPromptOptions};++use super::view::TtsView;+use crate::tts_history;++impl TtsView {+ pub(super) fn pick_text_file(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let rx = cx.prompt_for_paths(PathPromptOptions {+ files: true,+ directories: false,+ multiple: false,+ prompt: Some("Open text file".into()),+ });+ cx.spawn(async move |this, cx| {+ let Ok(Ok(Some(paths))) = rx.await else {+ return;+ };+ let Some(path) = paths.first() else {+ return;+ };+ if let Ok(content) = fs::read_to_string(path) {+ let _ = this.update(cx, |this, cx| {+ this.input.update(cx, |input, cx| input.set_text(&content, cx));+ cx.notify();+ });+ }+ })+ .detach();+ }++ pub(super) fn reload_history(&mut self) {+ self.history = tts_history::list();+ }++ pub fn reload_after_clear(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.stop_playback(cx);+ self.generation_id = self.generation_id.wrapping_add(1);+ self.reload_history();+ cx.notify();+ }++ pub(super) fn play_history(+ &mut self,+ id: &str,+ cx: &mut Context<Self>,+ ) {+ if self.playing_id.as_deref() == Some(id) {+ self.stop_playback(cx);+ return;+ }+ let Some(batch) = tts_history::load_pcm(id) else {+ self.error = Some("audio file missing".into());+ cx.notify();+ return;+ };+ if let Some(player) = &self.player {+ player.stop();+ }+ if self.append_pcm(batch).is_err() {+ cx.notify();+ return;+ }+ self.playing_id = Some(id.to_string());+ self.error = None;+ cx.notify();+ }++ pub(super) fn stop_playback(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ if let Some(player) = &self.player {+ player.stop();+ }+ self.playing_id = None;+ cx.notify();+ }++ pub(super) fn tick_playback(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ if self.playing_id.is_some() && self.player.as_ref().is_some_and(|p| p.is_finished()) {+ self.playing_id = None;+ cx.notify();+ }+ }++ pub(super) fn delete_history(+ &mut self,+ id: &str,+ cx: &mut Context<Self>,+ ) {+ if self.playing_id.as_deref() == Some(id) {+ self.stop_playback(cx);+ }+ tts_history::delete(id);+ self.reload_history();+ cx.notify();+ }++ pub(super) fn restore_text(+ &mut self,+ text: &str,+ cx: &mut Context<Self>,+ ) {+ self.input.update(cx, |input, cx| input.set_text(text, cx));+ cx.notify();+ }+}diff --git a/apps/mirai/mirai-app/src/screens/tts/mod.rs b/apps/mirai/mirai-app/src/screens/tts/mod.rsnew file mode 100644index 000000000..5722d5aa4--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/mod.rs@@ -0,0 +1,10 @@+mod cards;+mod history;+mod pending_generation;+mod right_pane_tab;+mod synthesis;+mod synthesis_message;+mod view;+mod vm;++pub use view::TtsView;diff --git a/apps/mirai/mirai-app/src/screens/tts/pending_generation.rs b/apps/mirai/mirai-app/src/screens/tts/pending_generation.rsnew file mode 100644index 000000000..843af0c53--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/pending_generation.rs@@ -0,0 +1,7 @@+use uzu::types::model::Model;++pub(super) struct PendingGeneration {+ pub(super) text: String,+ pub(super) model: Model,+ pub(super) vendor: String,+}diff --git a/apps/mirai/mirai-app/src/screens/tts/right_pane_tab.rs b/apps/mirai/mirai-app/src/screens/tts/right_pane_tab.rsnew file mode 100644index 000000000..651aebcb8--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/right_pane_tab.rs@@ -0,0 +1,5 @@+#[derive(Clone, Copy, PartialEq, Eq)]+pub(super) enum RightPaneTab {+ Settings,+ History,+}diff --git a/apps/mirai/mirai-app/src/screens/tts/synthesis.rs b/apps/mirai/mirai-app/src/screens/tts/synthesis.rsnew file mode 100644index 000000000..1ba8a3156--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/synthesis.rs@@ -0,0 +1,207 @@+use futures::{StreamExt, channel::mpsc};+use gpui::Context;+use gpui_tokio::Tokio;+use uzu::{+ player::Player,+ session::text_to_speech::TextToSpeechSessionStreamChunk,+ types::{basic::PcmBatch, model::Model},+};++use super::{+ pending_generation::PendingGeneration,+ synthesis_message::SynthesisMessage,+ view::{CHAR_LIMIT, TtsView},+};+use crate::{engine, tts_history};++impl TtsView {+ fn generate(+ &mut self,+ text: String,+ cx: &mut Context<Self>,+ ) {+ if self.generating {+ return;+ }+ let text = text.trim().to_string();+ if text.is_empty() {+ return;+ }+ if text.chars().count() > CHAR_LIMIT {+ self.error = Some(format!("Text exceeds the {CHAR_LIMIT}-character limit."));+ cx.notify();+ return;+ }+ let Some(model) = self.resolved_model(cx) else {+ self.error = Some("Download and select a voice model first.".to_string());+ cx.notify();+ return;+ };++ if let Some(player) = &self.player {+ player.stop();+ }+ self.selected = Some(model.clone());+ self.generating = true;+ self.generation_id = self.generation_id.wrapping_add(1);+ let generation_id = self.generation_id;+ self.error = None;+ self.playing_id = None;+ self.pending_batches.clear();+ self.pending_gen = Some(PendingGeneration {+ text: text.clone(),+ model: model.clone(),+ vendor: self+ .store+ .read(cx)+ .rows+ .iter()+ .find(|r| r.model.identifier == model.identifier)+ .and_then(|r| r.vendor())+ .unwrap_or_else(|| "Other".to_string()),+ });+ cx.notify();++ let Some(engine) = engine::try_engine(cx) else {+ self.generating = false;+ self.error = Some("engine unavailable".to_string());+ cx.notify();+ return;+ };++ let (tx, mut rx) = mpsc::unbounded::<SynthesisMessage>();+ Tokio::spawn(cx, async move {+ let session = match engine.text_to_speech(model).await {+ Ok(session) => session,+ Err(err) => {+ let _ = tx.unbounded_send(SynthesisMessage::Error(err.to_string()));+ return;+ },+ };+ let stream = session.synthesize_stream(text).await;+ let _ = tx.unbounded_send(SynthesisMessage::Started(stream.cancel_token()));+ while let Some(event) = stream.next().await {+ match event {+ TextToSpeechSessionStreamChunk::Output {+ output,+ } => {+ let _ = tx.unbounded_send(SynthesisMessage::Batch(output.pcm_batch));+ },+ TextToSpeechSessionStreamChunk::Error {+ error,+ } => {+ let _ = tx.unbounded_send(SynthesisMessage::Error(format!("{error}")));+ },+ }+ }+ let _ = tx.unbounded_send(SynthesisMessage::Done);+ })+ .detach();++ cx.spawn(async move |this, cx| {+ while let Some(message) = rx.next().await {+ let still_current = this.update(cx, |view, cx| {+ if view.generation_id != generation_id {+ return false;+ }+ view.apply(message, cx);+ true+ });+ if !matches!(still_current, Ok(true)) {+ break;+ }+ }+ })+ .detach();+ }++ fn apply(+ &mut self,+ msg: SynthesisMessage,+ cx: &mut Context<Self>,+ ) {+ match msg {+ SynthesisMessage::Started(token) => self.cancel = Some(token),+ SynthesisMessage::Batch(batch) => {+ if !self.generating {+ return;+ }+ self.pending_batches.push(batch.clone());+ if let Err(err) = self.append_pcm(batch) {+ self.error = Some(err);+ self.generating = false;+ }+ },+ SynthesisMessage::Done => {+ self.generating = false;+ self.cancel = None;+ if self.error.is_none()+ && let Some(pending) = self.pending_gen.as_ref()+ && tts_history::save_generation(+ &pending.model,+ &pending.vendor,+ &pending.text,+ &self.pending_batches,+ )+ .is_some()+ {+ self.reload_history();+ }+ self.clear_gen();+ cx.notify();+ },+ SynthesisMessage::Error(err) => {+ self.error = Some(err);+ self.generating = false;+ self.cancel = None;+ self.clear_gen();+ cx.notify();+ },+ }+ }++ pub(super) fn resolved_model(+ &self,+ cx: &Context<Self>,+ ) -> Option<Model> {+ self.store.read(cx).resolve_installed(self.selected.as_ref())+ }++ pub(super) fn append_pcm(+ &mut self,+ batch: PcmBatch,+ ) -> Result<(), String> {+ if self.player.is_none() {+ self.player = Some(Player::new().map_err(|e| format!("audio: {e}"))?);+ }+ self.player.as_ref().expect("player just opened").append_pcm_batch(batch).map_err(|e| format!("audio: {e}"))+ }++ fn clear_gen(&mut self) {+ self.pending_batches.clear();+ self.pending_gen = None;+ }++ pub(super) fn generate_from_button(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ let text = self.input.read(cx).text();+ self.generate(text, cx);+ }++ pub(super) fn stop(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ if let Some(token) = &self.cancel {+ token.cancel();+ }+ self.stop_playback(cx);+ self.generating = false;+ self.generation_id = self.generation_id.wrapping_add(1);+ self.cancel = None;+ self.clear_gen();+ cx.notify();+ }+}diff --git a/apps/mirai/mirai-app/src/screens/tts/synthesis_message.rs b/apps/mirai/mirai-app/src/screens/tts/synthesis_message.rsnew file mode 100644index 000000000..276d54956--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/synthesis_message.rs@@ -0,0 +1,8 @@+use uzu::types::basic::{CancelToken, PcmBatch};++pub(super) enum SynthesisMessage {+ Started(CancelToken),+ Batch(PcmBatch),+ Done,+ Error(String),+}diff --git a/apps/mirai/mirai-app/src/screens/tts/view.rs b/apps/mirai/mirai-app/src/screens/tts/view.rsnew file mode 100644index 000000000..6b41e6f77--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/view.rs@@ -0,0 +1,274 @@+use std::time::Duration;++use gpui::{Context, Entity, FontWeight, IntoElement, Render, Window, div, prelude::*, px};+use uzu::{+ player::Player,+ types::{+ basic::{CancelToken, PcmBatch},+ model::Model,+ },+};++use super::{pending_generation::PendingGeneration, right_pane_tab::RightPaneTab, vm::TtsVm};+use crate::{+ components::{Button, ButtonKind, Icon, IconEl, InputEvent, Loader, TextInput, VendorIcon},+ models_store::ModelsStore,+ theme::ActiveTheme,+ tokens,+ tts_history::{self, TtsHistoryEntry},+};++pub(super) const CHAR_LIMIT: usize = 2000;++pub struct TtsView {+ pub(super) store: Entity<ModelsStore>,+ pub(super) input: Entity<TextInput>,+ pub(super) selected: Option<Model>,+ pub(super) player: Option<Player>,+ pub(super) generating: bool,+ pub(super) generation_id: u64,+ pub(super) cancel: Option<CancelToken>,+ pub(super) error: Option<String>,+ pub(super) history: Vec<TtsHistoryEntry>,+ pub(super) playing_id: Option<String>,+ pub(super) pending_batches: Vec<PcmBatch>,+ pub(super) pending_gen: Option<PendingGeneration>,+ pub(super) right_tab: RightPaneTab,+}++impl TtsView {+ pub fn new(+ store: Entity<ModelsStore>,+ cx: &mut Context<Self>,+ ) -> Self {+ let input = cx.new(|cx| {+ TextInput::new(cx, "Start typing here or paste any text you want to turn into speech…")+ .multiline(false, 16, 40)+ });++ cx.subscribe(&input, |_, _input, event, cx| match event {+ InputEvent::Submit(_) | InputEvent::Changed(_) => cx.notify(),+ })+ .detach();+ cx.observe(&store, |_, _, cx| cx.notify()).detach();++ cx.spawn(async move |this, cx| {+ loop {+ cx.background_executor().timer(Duration::from_millis(250)).await;+ if this.update(cx, |view, cx| view.tick_playback(cx)).is_err() {+ break;+ }+ }+ })+ .detach();+ Self {+ store,+ input,+ selected: None,+ player: None,+ generating: false,+ generation_id: 0,+ cancel: None,+ error: None,+ history: tts_history::list(),+ playing_id: None,+ pending_batches: Vec::new(),+ pending_gen: None,+ right_tab: RightPaneTab::Settings,+ }+ }+}++impl Render for TtsView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let selected_id = self.selected.as_ref().map(|m| m.identifier.clone());+ let resolved = self.resolved_model(cx);++ let (loading, models): (bool, Vec<TtsVm>) = {+ let store = self.store.read(cx);+ let rows = store.rows.iter().map(|r| TtsVm::from_row(r, theme.dark)).collect();+ (store.loading, rows)+ };+ let any_installed = models.iter().any(|r| r.installed);+ let char_count = self.input.read(cx).text().chars().count();+ let over = char_count > CHAR_LIMIT;++ let header_badge = resolved.as_ref().and_then(|m| models.iter().find(|v| v.id == m.identifier)).map(|vm| {+ div()+ .flex()+ .items_center()+ .gap_1()+ .px_2()+ .py_0p5()+ .rounded_md()+ .bg(theme.bg_sub)+ .child(VendorIcon::new(vm.vendor.clone()).size(tokens::icon::MD).icon_url(vm.icon_url.clone()))+ .child(div().text_sm().text_color(theme.text_muted).child(vm.name.clone()))+ });++ let mut settings_content = div().flex().flex_col().gap_2().p_4().child(+ div().pb_1().text_sm().font_weight(FontWeight::MEDIUM).text_color(theme.text).child("Select a model"),+ );+ if models.is_empty() {+ settings_content = settings_content.child(if loading {+ div()+ .py_6()+ .flex()+ .justify_center()+ .child(Loader::new().label("Loading voice models…"))+ .into_any_element()+ } else {+ div()+ .py_6()+ .text_sm()+ .text_color(theme.text_muted)+ .child("No voice models available.")+ .into_any_element()+ });+ } else {+ for vm in &models {+ let selected = selected_id.as_deref() == Some(vm.id.as_str());+ settings_content = settings_content.child(self.model_card(cx, vm, selected));+ }+ }++ let history_content = if self.history.is_empty() {+ div().p_4().text_sm().text_color(theme.text_muted).child("No generations yet.").into_any_element()+ } else {+ let mut rows = div().flex().flex_col().gap_1().p_2();+ for entry in &self.history {+ rows = rows.child(self.history_row(cx, entry));+ }+ rows.into_any_element()+ };++ let right_body = match self.right_tab {+ RightPaneTab::Settings => settings_content.into_any_element(),+ RightPaneTab::History => history_content,+ };++ let status = if self.generating {+ Some(("Generating…".to_string(), theme.text_muted))+ } else {+ self.error.as_ref().map(|e| (e.clone(), theme.error))+ };++ div()+ .size_full()+ .flex()+ .flex_col()+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .h(px(56.))+ .px_5()+ .border_b_1()+ .border_color(theme.border)+ .child(IconEl::new(Icon::Speech, theme.text).size(tokens::icon::XL))+ .child(+ div().text_lg().font_weight(FontWeight::MEDIUM).text_color(theme.text).child("Text to Speech"),+ )+ .children(header_badge),+ )+ .child(+ div()+ .flex_1()+ .min_h_0()+ .flex()+ .flex_row()+ .child(+ div()+ .flex_1()+ .min_h_0()+ .flex()+ .flex_col()+ .child(+ div()+ .id("tts-editor")+ .flex_1()+ .min_h_0()+ .overflow_y_scroll()+ .p_5()+ .text_color(theme.text)+ .child(self.input.clone()),+ )+ .children(+ status.map(|(text, color)| div().px_5().pb_1().text_sm().text_color(color).child(text)),+ )+ .child(+ div()+ .flex()+ .items_center()+ .justify_between()+ .gap_3()+ .h(px(60.))+ .px_5()+ .border_t_1()+ .border_color(theme.border)+ .child(+ div()+ .text_sm()+ .text_color(if over {+ theme.error+ } else {+ theme.text_muted+ })+ .child(format!("{char_count} / {CHAR_LIMIT} characters")),+ )+ .child(+ div()+ .flex()+ .items_center()+ .gap_2()+ .child(+ Button::new("tts-upload", "Upload text file")+ .kind(ButtonKind::Secondary)+ .icon(Icon::Download)+ .on_click(cx.listener(|this, _, _, cx| this.pick_text_file(cx))),+ )+ .child(if self.generating {+ Button::new("tts-stop", "Stop")+ .kind(ButtonKind::Danger)+ .on_click(cx.listener(|this, _, _, cx| this.stop(cx)))+ } else {+ Button::new("tts-generate", "Generate speech")+ .kind(ButtonKind::Primary)+ .disabled(!any_installed || char_count == 0 || over)+ .on_click(+ cx.listener(|this, _, _, cx| this.generate_from_button(cx)),+ )+ }),+ ),+ ),+ )+ .child(+ div()+ .w(px(360.))+ .flex_none()+ .min_h_0()+ .flex()+ .flex_col()+ .border_l_1()+ .border_color(theme.border)+ .child(+ div()+ .flex()+ .border_b_1()+ .border_color(theme.border)+ .child(self.tab_button(cx, "Settings", RightPaneTab::Settings))+ .child(self.tab_button(cx, "History", RightPaneTab::History)),+ )+ .child(+ div().id("tts-right-scroll").flex_1().min_h_0().overflow_y_scroll().child(right_body),+ ),+ ),+ )+ }+}diff --git a/apps/mirai/mirai-app/src/screens/tts/vm.rs b/apps/mirai/mirai-app/src/screens/tts/vm.rsnew file mode 100644index 000000000..02f955693--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/tts/vm.rs@@ -0,0 +1,32 @@+use uzu::storage::types::DownloadPhase;++use crate::{models_store::ModelRow, screens::local_models::format_size};++pub(super) struct TtsVm {+ pub id: String,+ pub name: String,+ pub vendor: String,+ pub icon_url: Option<String>,+ pub size: String,+ pub installed: bool,+ pub downloading: bool,+ pub progress: f32,+}++impl TtsVm {+ pub(super) fn from_row(+ row: &ModelRow,+ dark: bool,+ ) -> Self {+ Self {+ id: row.id().to_string(),+ name: row.name(),+ vendor: row.vendor().unwrap_or_else(|| "Other".to_string()),+ icon_url: row.icon_url(dark),+ size: format_size(row.display_size_bytes()),+ installed: row.is_installed(),+ downloading: matches!(row.phase(), DownloadPhase::Downloading {} | DownloadPhase::Paused {}),+ progress: row.progress(),+ }+ }+}diff --git a/apps/mirai/mirai-app/src/screens/welcome.rs b/apps/mirai/mirai-app/src/screens/welcome.rsnew file mode 100644index 000000000..e476c337e--- /dev/null+++ b/apps/mirai/mirai-app/src/screens/welcome.rs@@ -0,0 +1,131 @@+use std::time::Duration;++use gpui::{+ Animation, AnimationExt, Context, EventEmitter, FontWeight, Hsla, IntoElement, Render, Window, div, prelude::*, px,+};++use crate::{+ components::{Button, ButtonKind, Icon, IconEl},+ settings_state,+ theme::ActiveTheme,+};++pub enum WelcomeEvent {+ Continue,+}++pub struct WelcomeView;++impl EventEmitter<WelcomeEvent> for WelcomeView {}++impl WelcomeView {+ pub fn new(_cx: &mut Context<Self>) -> Self {+ Self+ }+}++fn feature(+ icon: Icon,+ label: &'static str,+ fg: Hsla,+) -> impl IntoElement {+ div()+ .flex()+ .items_center()+ .gap_2()+ .text_color(fg)+ .text_sm()+ .child(IconEl::new(icon, fg).size(crate::tokens::icon::MD))+ .child(label)+}++impl Render for WelcomeView {+ fn render(+ &mut self,+ _window: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let share = settings_state::current(cx).share_usage_data;++ let mut checkbox = div()+ .size(px(18.))+ .flex_none()+ .rounded(crate::tokens::radius::SM)+ .border_1()+ .border_color(theme.border)+ .flex()+ .items_center()+ .justify_center();+ if share {+ checkbox = checkbox.bg(theme.text).child(IconEl::new(Icon::Check, theme.bg).size(crate::tokens::icon::XS));+ }++ let content = div()+ .flex()+ .flex_col()+ .items_center()+ .gap_8()+ .child(IconEl::new(Icon::Logo, theme.text).size(crate::tokens::icon::HERO))+ .child(+ div()+ .flex()+ .flex_col()+ .items_center()+ .gap_2()+ .child(+ div()+ .text_size(crate::tokens::font::DISPLAY)+ .font_weight(FontWeight::MEDIUM)+ .child("Welcome to Mirai"),+ )+ .child(+ div()+ .text_sm()+ .text_color(theme.text_muted)+ .child("Try the full private and local AI potential of your Mac"),+ ),+ )+ .child(+ div()+ .flex()+ .gap_6()+ .child(feature(Icon::Lock, "100% Private", theme.text_muted))+ .child(feature(Icon::Lightning, "Blazing Fast", theme.text_muted))+ .child(feature(Icon::WifiOff, "Works Offline", theme.text_muted)),+ )+ .child(+ Button::new("welcome-continue", "Continue without account")+ .kind(ButtonKind::Primary)+ .on_click(cx.listener(|_, _, _, cx| cx.emit(WelcomeEvent::Continue))),+ )+ .child(+ div()+ .id("welcome-analytics")+ .flex()+ .items_center()+ .gap_2()+ .cursor(gpui::CursorStyle::PointingHand)+ .on_click(cx.listener(|_, _, _, cx| {+ let mut s = settings_state::current(cx);+ s.share_usage_data = !s.share_usage_data;+ settings_state::set(cx, s);+ cx.notify();+ }))+ .child(checkbox)+ .child(div().text_xs().text_color(theme.text_muted).child("Share anonymous usage data")),+ );++ let content = if cfg!(test) {+ content.into_any_element()+ } else {+ content+ .with_animation("welcome-in", Animation::new(Duration::from_millis(500)), |el, delta| {+ el.opacity(1.0 - (1.0 - delta).powi(3))+ })+ .into_any_element()+ };++ div().size_full().flex().items_center().justify_center().bg(theme.bg).text_color(theme.text).child(content)+ }+}diff --git a/apps/mirai/mirai-app/src/settings_state.rs b/apps/mirai/mirai-app/src/settings_state.rsnew file mode 100644index 000000000..99c0ee452--- /dev/null+++ b/apps/mirai/mirai-app/src/settings_state.rs@@ -0,0 +1,30 @@+use gpui::{App, Context, Global, Subscription};++use crate::persistence::{self, AppSettings};++struct GlobalSettings(AppSettings);++impl Global for GlobalSettings {}++pub fn init(cx: &mut App) {+ cx.set_global(GlobalSettings(persistence::load_settings()));+}++pub fn current(cx: &App) -> AppSettings {+ cx.try_global::<GlobalSettings>().map(|g| g.0.clone()).unwrap_or_default()+}++pub fn set(+ cx: &mut App,+ settings: AppSettings,+) {+ persistence::save_settings(&settings);+ cx.set_global(GlobalSettings(settings));+}++pub fn observe<V: 'static>(+ cx: &mut Context<V>,+ mut on_change: impl FnMut(&mut V, &mut Context<V>) + 'static,+) -> Subscription {+ cx.observe_global::<GlobalSettings>(move |this, cx| on_change(this, cx))+}diff --git a/apps/mirai/mirai-app/src/startup.rs b/apps/mirai/mirai-app/src/startup.rsnew file mode 100644index 000000000..d906fc2f5--- /dev/null+++ b/apps/mirai/mirai-app/src/startup.rs@@ -0,0 +1,24 @@+use std::env;++use auto_launch::AutoLaunchBuilder;++fn auto_launch() -> Option<auto_launch::AutoLaunch> {+ let exe = env::current_exe().ok()?;++ let bundle = exe.ancestors().find(|p| p.extension().is_some_and(|e| e == "app"))?;+ AutoLaunchBuilder::new().set_app_name("Mirai").set_app_path(bundle.to_str()?).build().ok()+}++pub fn status() -> Option<bool> {+ auto_launch().and_then(|al| al.is_enabled().ok())+}++pub fn set(enabled: bool) {+ if let Some(al) = auto_launch() {+ let _ = if enabled {+ al.enable()+ } else {+ al.disable()+ };+ }+}diff --git a/apps/mirai/mirai-app/src/text.rs b/apps/mirai/mirai-app/src/text.rsnew file mode 100644index 000000000..f581043c6--- /dev/null+++ b/apps/mirai/mirai-app/src/text.rs@@ -0,0 +1,12 @@+pub fn truncate_with_ellipsis(+ text: &str,+ max_chars: usize,+) -> String {+ let trimmed = text.trim();+ if trimmed.chars().count() <= max_chars {+ trimmed.to_string()+ } else {+ let head: String = trimmed.chars().take(max_chars).collect();+ format!("{head}…")+ }+}diff --git a/apps/mirai/mirai-app/src/title_gen.rs b/apps/mirai/mirai-app/src/title_gen.rsnew file mode 100644index 000000000..01bb817b0--- /dev/null+++ b/apps/mirai/mirai-app/src/title_gen.rs@@ -0,0 +1,85 @@+use uzu::{+ engine::Engine,+ session::chat::ChatSessionStreamChunk,+ types::{+ model::Model,+ session::chat::{ChatConfig, ChatMessage, ChatReplyConfig},+ },+};++pub fn is_placeholder(title: &str) -> bool {+ let n = title.trim().to_lowercase();+ n.is_empty() || n == "untitled" || n == "new chat"+}++pub fn sanitize(raw: &str) -> String {+ let mut title = raw.trim().replace(['\r', '\n'], " ");+ title = title.split_whitespace().collect::<Vec<_>>().join(" ");+ title.trim_matches(['"', '\'', '`']).trim().to_string()+}++pub fn prompt(user_message: &str) -> String {+ let quoted = user_message.split_whitespace().collect::<Vec<_>>().join(" ").replace('"', "\\\"");+ format!(+ "Generate a short, neutral chat title (2–4 words, no punctuation at the end) for the following user message. \+ If the topic is unclear, return \"General Chat\". Message: \"{quoted}\""+ )+}++pub fn vendor_fallback_title(model: &Model) -> Option<&'static str> {+ let vendor = model.family.as_ref().map(|f| f.vendor.name().to_lowercase())?;+ if vendor == "cartesia" || vendor == "liquidai" {+ Some("General Chat")+ } else {+ None+ }+}++pub async fn run(+ engine: &Engine,+ model: Model,+ user_message: &str,+) -> Result<String, String> {+ if let Some(fallback) = vendor_fallback_title(&model) {+ return Ok(fallback.to_string());+ }+ generate(engine, model, user_message).await+}++async fn generate(+ engine: &Engine,+ model: Model,+ user_message: &str,+) -> Result<String, String> {+ let session = engine.chat(model, ChatConfig::default()).await.map_err(|e| e.to_string())?;+ session.reset().await.map_err(|e| format!("{e:?}"))?;+ let messages = vec![ChatMessage::user().with_text(prompt(user_message))];+ let config = ChatReplyConfig::default().with_token_limit(Some(200));+ let stream = session.reply_with_stream(messages, config).await;+ let mut text = String::new();+ while let Some(chunk) = stream.next().await {+ match chunk {+ ChatSessionStreamChunk::Replies {+ replies,+ } => {+ if let Some(reply) = replies.into_iter().next() {+ text = reply.message.text().unwrap_or_default();+ if text.is_empty() {+ text = reply.message.reasoning().unwrap_or_default();+ }+ }+ },+ ChatSessionStreamChunk::Error {+ error,+ } => return Err(format!("{error:?}")),+ }+ }+ let candidate = sanitize(&text);+ Ok(if candidate.is_empty() {+ "General Chat".into()+ } else if candidate.chars().count() > 300 {+ "New chat".into()+ } else {+ candidate+ })+}diff --git a/apps/mirai/mirai-app/src/toast.rs b/apps/mirai/mirai-app/src/toast.rsnew file mode 100644index 000000000..8435ac156--- /dev/null+++ b/apps/mirai/mirai-app/src/toast.rs@@ -0,0 +1,97 @@+use std::time::Duration;++use gpui::{AnyElement, App, Context, Global, IntoElement, SharedString, Subscription, div, prelude::*, px, white};++use crate::theme::ActiveTheme;++#[derive(Clone, Copy, PartialEq, Eq)]+pub enum ToastKind {+ Info,+ Success,+ Error,+}++struct Toast {+ id: u64,+ message: SharedString,+ kind: ToastKind,+}++#[derive(Default)]+struct GlobalToasts {+ items: Vec<Toast>,+ next_id: u64,+}++impl Global for GlobalToasts {}++pub fn init(cx: &mut App) {+ cx.set_global(GlobalToasts::default());+}++pub fn push<T: 'static>(+ cx: &mut Context<T>,+ message: impl Into<SharedString>,+ kind: ToastKind,+) {+ let message = message.into();+ let id = cx.update_global::<GlobalToasts, _>(|toasts, _| {+ toasts.next_id += 1;+ let id = toasts.next_id;+ toasts.items.push(Toast {+ id,+ message,+ kind,+ });+ id+ });+ cx.spawn(async move |_this, cx| {+ cx.background_executor().timer(Duration::from_secs(4)).await;+ cx.update(|cx| {+ if cx.has_global::<GlobalToasts>() {+ cx.update_global::<GlobalToasts, _>(|toasts, _| {+ toasts.items.retain(|t| t.id != id);+ });+ }+ });+ })+ .detach();+}++pub fn observe<V: 'static>(+ cx: &mut Context<V>,+ mut on_change: impl FnMut(&mut V, &mut Context<V>) + 'static,+) -> Subscription {+ cx.observe_global::<GlobalToasts>(move |this, cx| on_change(this, cx))+}++pub fn render_overlay(cx: &App) -> Option<AnyElement> {+ let toasts = cx.try_global::<GlobalToasts>()?;+ if toasts.items.is_empty() {+ return None;+ }+ let theme = cx.theme().clone();+ let mut col = div().absolute().top_8().right_4().flex().flex_col().gap_2();+ for toast in &toasts.items {+ let (bg, fg) = match toast.kind {+ ToastKind::Success => (theme.success, white()),+ ToastKind::Error => (theme.error, white()),+ ToastKind::Info => (theme.card, theme.text),+ };+ col = col.child(+ div()+ .min_w(px(220.))+ .max_w(px(360.))+ .px_3()+ .py_2()+ .rounded_lg()+ .border_1()+ .border_color(theme.border)+ .bg(bg)+ .text_color(fg)+ .text_sm()+ .child(toast.message.clone()),+ );+ }+ Some(col.into_any_element())+}diff --git a/apps/mirai/mirai-app/src/tts_history.rs b/apps/mirai/mirai-app/src/tts_history.rsnew file mode 100644index 000000000..c8299b330--- /dev/null+++ b/apps/mirai/mirai-app/src/tts_history.rs@@ -0,0 +1,114 @@+use std::{+ fs,+ path::{Path, PathBuf},+};++use hound::WavReader;+use serde::{Deserialize, Serialize};+use uzu::types::{basic::PcmBatch, model::Model};++use crate::{+ data_ops::tts_audio_dir,+ persistence::{self, now_ms},+};++#[derive(Clone, Serialize, Deserialize)]+pub struct TtsHistoryEntry {+ pub id: String,+ pub model_id: String,+ pub model_name: String,+ pub vendor: String,+ pub text: String,+ pub created_at: u64,+}++fn history_path() -> PathBuf {+ persistence::mirai_data_dir().join("tts-history.json")+}++pub fn list() -> Vec<TtsHistoryEntry> {+ let Ok(bytes) = fs::read(history_path()) else {+ return Vec::new();+ };+ serde_json::from_slice(&bytes).unwrap_or_default()+}++fn write_all(entries: &[TtsHistoryEntry]) {+ let dir = persistence::mirai_data_dir();+ if fs::create_dir_all(&dir).is_err() {+ return;+ }+ if let Ok(json) = serde_json::to_string_pretty(entries) {+ let _ = fs::write(history_path(), json);+ }+}++fn merge_batches(batches: &[PcmBatch]) -> Option<PcmBatch> {+ let first = batches.first()?;+ Some(PcmBatch {+ samples: batches.iter().flat_map(|b| b.samples.iter().copied()).collect(),+ sample_rate: first.sample_rate,+ channels: first.channels,+ lengths: vec![batches.iter().flat_map(|b| b.lengths.iter().copied()).sum()],+ })+}++pub fn save_generation(+ model: &Model,+ vendor: &str,+ text: &str,+ batches: &[PcmBatch],+) -> Option<TtsHistoryEntry> {+ let merged = merge_batches(batches)?;+ if merged.samples.is_empty() {+ return None;+ }+ let id = format!("tts-{}", now_ms());+ let dir = tts_audio_dir();+ fs::create_dir_all(&dir).ok()?;+ let path = dir.join(format!("{id}.wav"));+ merged.save_as_wav(path.to_string_lossy().into_owned()).ok()?;+ let entry = TtsHistoryEntry {+ id,+ model_id: model.identifier.clone(),+ model_name: model.name(),+ vendor: vendor.to_string(),+ text: text.to_string(),+ created_at: now_ms(),+ };+ let mut entries = list();+ entries.insert(0, entry.clone());+ write_all(&entries);+ Some(entry)+}++pub fn delete(id: &str) {+ let mut entries = list();+ entries.retain(|e| e.id != id);+ write_all(&entries);+ let _ = fs::remove_file(tts_audio_dir().join(format!("{id}.wav")));+}++pub fn load_pcm(id: &str) -> Option<PcmBatch> {+ pcm_from_wav(&tts_audio_dir().join(format!("{id}.wav")))+}++pub fn clear_all() {+ write_all(&[]);+}++fn pcm_from_wav(path: &Path) -> Option<PcmBatch> {+ let mut reader = WavReader::open(path).ok()?;+ let spec = reader.spec();+ let channels = spec.channels as u32;+ let sample_rate = spec.sample_rate;+ let samples: Vec<f64> =+ reader.samples::<i16>().map(|s| s.map(|v| v as f64 / 32767.0)).collect::<Result<_, _>>().ok()?;+ let frames = samples.len() as u32 / channels.max(1);+ Some(PcmBatch {+ samples,+ sample_rate,+ channels,+ lengths: vec![frames],+ })+}diff --git a/apps/mirai/rust-toolchain.toml b/apps/mirai/rust-toolchain.tomlnew file mode 100644index 000000000..4eed5d0d3--- /dev/null+++ b/apps/mirai/rust-toolchain.toml@@ -0,0 +1,7 @@+# Match uzu's toolchain — uzu requires nightly, and GPUI builds fine on it+# (nightly is a superset of the stable 1.95 Zed pins).+[toolchain]+channel = "nightly"+profile = "default"+components = ["rust-src", "rust-analyzer"]+targets = ["aarch64-apple-darwin"]diff --git a/apps/mirai/ui-kit/Cargo.toml b/apps/mirai/ui-kit/Cargo.tomlnew file mode 100644index 000000000..026abe4d9--- /dev/null+++ b/apps/mirai/ui-kit/Cargo.toml@@ -0,0 +1,15 @@+# Mirai design-system crate: theme tokens + reusable GPUI components, ported to+# render like `@trymirai-schemas/ui-kit`. `mirai-app` builds its UI from here.+[package]+name = "ui-kit"+version = "0.1.0"+edition = "2024"+publish = false++[lib]+name = "ui_kit"+path = "src/lib.rs"++[dependencies]+gpui = { workspace = true }+unicode-segmentation = "1"diff --git a/apps/mirai/ui-kit/assets/fonts/GeistMono.ttf b/apps/mirai/ui-kit/assets/fonts/GeistMono.ttfnew file mode 100644index 000000000..f86f19518Binary files /dev/null and b/apps/mirai/ui-kit/assets/fonts/GeistMono.ttf differdiff --git a/apps/mirai/ui-kit/assets/fonts/InterVariable.ttf b/apps/mirai/ui-kit/assets/fonts/InterVariable.ttfnew file mode 100644index 000000000..4e1e724f5Binary files /dev/null and b/apps/mirai/ui-kit/assets/fonts/InterVariable.ttf differdiff --git a/apps/mirai/ui-kit/src/components/button.rs b/apps/mirai/ui-kit/src/components/button.rsnew file mode 100644index 000000000..4727237bc--- /dev/null+++ b/apps/mirai/ui-kit/src/components/button.rs@@ -0,0 +1,166 @@+use gpui::{+ App, ClickEvent, CursorStyle, ElementId, FontWeight, IntoElement, RenderOnce, SharedString, Window, div,+ prelude::*, px, transparent_black, white,+};++use super::ClickHandler;+use crate::{+ components::icon::{Icon, IconEl},+ theme::ActiveTheme,+};++#[derive(Clone, Copy, PartialEq, Eq)]+pub enum ButtonKind {+ Primary,+ Secondary,+ Danger,+ Ghost,+}++#[derive(Clone, Copy, PartialEq, Eq)]+pub enum ButtonSize {+ Small,+ Medium,+}++#[derive(IntoElement)]+pub struct Button {+ id: ElementId,+ label: SharedString,+ kind: ButtonKind,+ size: ButtonSize,+ icon: Option<Icon>,+ disabled: bool,+ full_width: bool,+ on_click: Option<ClickHandler>,+}++impl Button {+ pub fn new(+ id: impl Into<ElementId>,+ label: impl Into<SharedString>,+ ) -> Self {+ Self {+ id: id.into(),+ label: label.into(),+ kind: ButtonKind::Secondary,+ size: ButtonSize::Medium,+ icon: None,+ disabled: false,+ full_width: false,+ on_click: None,+ }+ }++ pub fn kind(+ mut self,+ kind: ButtonKind,+ ) -> Self {+ self.kind = kind;+ self+ }++ pub fn size(+ mut self,+ size: ButtonSize,+ ) -> Self {+ self.size = size;+ self+ }++ pub fn icon(+ mut self,+ icon: Icon,+ ) -> Self {+ self.icon = Some(icon);+ self+ }++ pub fn disabled(+ mut self,+ disabled: bool,+ ) -> Self {+ self.disabled = disabled;+ self+ }++ pub fn full_width(+ mut self,+ full_width: bool,+ ) -> Self {+ self.full_width = full_width;+ self+ }++ pub fn on_click(+ mut self,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_click = Some(Box::new(handler));+ self+ }+}++impl RenderOnce for Button {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let (bg, fg, border) = match self.kind {+ ButtonKind::Primary => (theme.text, theme.bg, None),+ ButtonKind::Secondary => (transparent_black(), theme.text, Some(theme.button_border)),+ ButtonKind::Danger => (theme.error, white(), None),+ ButtonKind::Ghost => (transparent_black(), theme.text_muted, None),+ };+ let hover_bg = match self.kind {+ ButtonKind::Primary => theme.text.opacity(0.85),+ ButtonKind::Danger => theme.error.opacity(0.85),+ _ => theme.bg_hover,+ };+ let (height, text_size) = match self.size {+ ButtonSize::Small => (28.0_f32, 13.0_f32),+ ButtonSize::Medium => (36.0, 14.0),+ };++ let mut el = div()+ .id(self.id)+ .flex()+ .items_center()+ .justify_center()+ .gap_2()+ .h(px(height))+ .px_3()+ .bg(bg)+ .text_color(fg)+ .text_size(px(text_size))+ .font_weight(FontWeight::MEDIUM);++ el = match self.size {+ ButtonSize::Small => el.rounded_md(),+ ButtonSize::Medium => el.rounded_lg(),+ };+ if self.full_width {+ el = el.w_full();+ }+ if let Some(border) = border {+ el = el.border_1().border_color(border);+ }+ if let Some(icon) = self.icon {+ el = el.child(IconEl::new(icon, fg).size(text_size + 2.0));+ }+ el = el.child(self.label);++ if self.disabled {+ el.opacity(0.5)+ } else {+ let mut el = el.cursor(CursorStyle::PointingHand).hover(move |s| s.bg(hover_bg));+ if let Some(handler) = self.on_click {+ el = el.on_click(handler);+ }+ el+ }+ }+}diff --git a/apps/mirai/ui-kit/src/components/icon.rs b/apps/mirai/ui-kit/src/components/icon.rsnew file mode 100644index 000000000..0286b3cc1--- /dev/null+++ b/apps/mirai/ui-kit/src/components/icon.rs@@ -0,0 +1,137 @@+use gpui::{App, Hsla, IntoElement, RenderOnce, Styled, Transformation, Window, px, radians, svg};++#[derive(Clone, Copy, PartialEq, Eq, Debug)]+pub enum Icon {+ Logo,+ Plus,+ Chats,+ Models,+ Routers,+ Speech,+ Apps,+ Settings,+ Eject,+ Send,+ Stop,+ Search,+ Copy,+ Check,+ ChevronDown,+ ChevronUp,+ ChevronRight,+ ChevronLeft,+ Close,+ Trash,+ Rename,+ Download,+ Pause,+ Lightning,+ Lock,+ WifiOff,+ ModelMenu,+ Performance,+ Thinking,+ Devices,+ Heart,+ Shield,+ Github,+ XSocial,+ Discord,+ Spinner,+}++impl Icon {+ pub fn path(self) -> &'static str {+ match self {+ Icon::Logo => "icons/logo.svg",+ Icon::Plus => "icons/plus.svg",+ Icon::Chats => "icons/chats.svg",+ Icon::Models => "icons/models.svg",+ Icon::Routers => "icons/routers.svg",+ Icon::Speech => "icons/speech.svg",+ Icon::Apps => "icons/apps.svg",+ Icon::Settings => "icons/settings.svg",+ Icon::Eject => "icons/eject.svg",+ Icon::Send => "icons/send.svg",+ Icon::Stop => "icons/stop.svg",+ Icon::Search => "icons/search.svg",+ Icon::Copy => "icons/copy.svg",+ Icon::Check => "icons/check.svg",+ Icon::ChevronDown => "icons/chevron-down.svg",+ Icon::ChevronUp => "icons/chevron-up.svg",+ Icon::ChevronRight => "icons/chevron-right.svg",+ Icon::ChevronLeft => "icons/chevron-left.svg",+ Icon::Close => "icons/close.svg",+ Icon::Trash => "icons/trash.svg",+ Icon::Rename => "icons/rename.svg",+ Icon::Download => "icons/download.svg",+ Icon::Pause => "icons/pause.svg",+ Icon::Lightning => "icons/lightning.svg",+ Icon::Lock => "icons/lock.svg",+ Icon::WifiOff => "icons/wifi-off.svg",+ Icon::ModelMenu => "icons/model-menu.svg",+ Icon::Performance => "icons/performance.svg",+ Icon::Thinking => "icons/thinking.svg",+ Icon::Devices => "icons/devices.svg",+ Icon::Heart => "icons/heart.svg",+ Icon::Shield => "icons/shield.svg",+ Icon::Github => "icons/github.svg",+ Icon::XSocial => "icons/x.svg",+ Icon::Discord => "icons/discord.svg",+ Icon::Spinner => "icons/spinner.svg",+ }+ }+}++#[derive(IntoElement)]+pub struct IconEl {+ icon: Icon,+ size: f32,+ color: Hsla,++ rotate_deg: f32,+}++impl IconEl {+ pub fn new(+ icon: Icon,+ color: Hsla,+ ) -> Self {+ Self {+ icon,+ size: 16.0,+ color,+ rotate_deg: 0.0,+ }+ }++ pub fn size(+ mut self,+ size: f32,+ ) -> Self {+ self.size = size;+ self+ }++ pub fn rotate(+ mut self,+ deg: f32,+ ) -> Self {+ self.rotate_deg = deg;+ self+ }+}++impl RenderOnce for IconEl {+ fn render(+ self,+ _window: &mut Window,+ _cx: &mut App,+ ) -> impl IntoElement {+ let mut el = svg().path(self.icon.path()).w(px(self.size)).h(px(self.size)).flex_none().text_color(self.color);+ if self.rotate_deg != 0.0 {+ el = el.with_transformation(Transformation::rotate(radians(self.rotate_deg.to_radians())));+ }+ el+ }+}diff --git a/apps/mirai/ui-kit/src/components/icon_button.rs b/apps/mirai/ui-kit/src/components/icon_button.rsnew file mode 100644index 000000000..d2be0e29f--- /dev/null+++ b/apps/mirai/ui-kit/src/components/icon_button.rs@@ -0,0 +1,122 @@+use gpui::{App, ClickEvent, CursorStyle, ElementId, Hsla, IntoElement, RenderOnce, Window, div, prelude::*, px};++use super::ClickHandler;+use crate::{+ components::icon::{Icon, IconEl},+ theme::ActiveTheme,+};++#[derive(IntoElement)]+pub struct IconButton {+ id: ElementId,+ icon: Icon,+ icon_size: f32,+ hit_size: f32,+ color: Option<Hsla>,+ background: Option<Hsla>,+ disabled: bool,+ on_click: Option<ClickHandler>,+}++impl IconButton {+ pub fn new(+ id: impl Into<ElementId>,+ icon: Icon,+ ) -> Self {+ Self {+ id: id.into(),+ icon,+ icon_size: 16.0,+ hit_size: 28.0,+ color: None,+ background: None,+ disabled: false,+ on_click: None,+ }+ }++ pub fn color(+ mut self,+ color: Hsla,+ ) -> Self {+ self.color = Some(color);+ self+ }++ pub fn background(+ mut self,+ background: Hsla,+ ) -> Self {+ self.background = Some(background);+ self+ }++ pub fn icon_size(+ mut self,+ size: f32,+ ) -> Self {+ self.icon_size = size;+ self+ }++ pub fn hit_size(+ mut self,+ size: f32,+ ) -> Self {+ self.hit_size = size;+ self+ }++ pub fn disabled(+ mut self,+ disabled: bool,+ ) -> Self {+ self.disabled = disabled;+ self+ }++ pub fn on_click(+ mut self,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_click = Some(Box::new(handler));+ self+ }+}++impl RenderOnce for IconButton {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let color = self.color.unwrap_or(theme.text_muted);++ let hover_bg = if self.background.is_some() {+ theme.bg_sub_hover+ } else {+ theme.bg_hover+ };++ let el = div()+ .id(self.id)+ .flex()+ .items_center()+ .justify_center()+ .size(px(self.hit_size))+ .rounded_md()+ .when_some(self.background, |el, bg| el.bg(bg))+ .child(IconEl::new(self.icon, color).size(self.icon_size));++ if self.disabled {+ el.opacity(0.5)+ } else {+ let mut el = el.cursor(CursorStyle::PointingHand).hover(move |s| s.bg(hover_bg));+ if let Some(handler) = self.on_click {+ el = el.on_click(handler);+ }+ el+ }+ }+}diff --git a/apps/mirai/ui-kit/src/components/loader.rs b/apps/mirai/ui-kit/src/components/loader.rsnew file mode 100644index 000000000..f5ab0dfe7--- /dev/null+++ b/apps/mirai/ui-kit/src/components/loader.rs@@ -0,0 +1,68 @@+use std::time::Duration;++use gpui::{+ Animation, AnimationExt, App, IntoElement, RenderOnce, SharedString, Styled, Transformation, Window, div,+ percentage, prelude::*, px, svg,+};++use crate::{components::icon::Icon, theme::ActiveTheme};++#[derive(IntoElement)]+pub struct Loader {+ size: f32,+ label: Option<SharedString>,+}++impl Default for Loader {+ fn default() -> Self {+ Self {+ size: 16.0,+ label: None,+ }+ }+}++impl Loader {+ pub fn new() -> Self {+ Self::default()+ }++ pub fn size(+ mut self,+ size: f32,+ ) -> Self {+ self.size = size;+ self+ }++ pub fn label(+ mut self,+ label: impl Into<SharedString>,+ ) -> Self {+ self.label = Some(label.into());+ self+ }+}++impl RenderOnce for Loader {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let color = cx.theme().text_muted;+ let size = self.size;++ let spinner = svg().path(Icon::Spinner.path()).size(px(size)).text_color(color).with_animation(+ "loader-spin",+ Animation::new(Duration::from_secs(1)).repeat(),+ |el, delta| el.with_transformation(Transformation::rotate(percentage(delta))),+ );++ let mut row = div().flex().items_center().gap_2().child(spinner);+ if let Some(label) = self.label {+ row = row.child(div().text_sm().text_color(color).child(label));+ }+ row+ }+}diff --git a/apps/mirai/ui-kit/src/components/markdown.rs b/apps/mirai/ui-kit/src/components/markdown.rsnew file mode 100644index 000000000..00635081f--- /dev/null+++ b/apps/mirai/ui-kit/src/components/markdown.rs@@ -0,0 +1,587 @@+use std::ops::Range;++use gpui::{+ AnyElement, ClipboardItem, CursorStyle, FontStyle, FontWeight, HighlightStyle, InteractiveText, IntoElement,+ SharedString, StyledText, div, prelude::*, px,+};++use crate::{+ components::icon::{Icon, IconEl},+ theme::{FONT_MONO, Theme},+ tokens,+};++#[derive(Clone)]+pub struct ParsedMarkdown {+ blocks: Vec<Block>,+}++#[derive(Clone)]+enum Block {+ Prose(Vec<Line>),+ Code {+ lang: String,+ code: String,+ },+}++#[derive(Clone)]+enum Line {+ Blank,+ Heading {+ level: u8,+ inline: Inline,+ },+ Quote(Inline),+ Bullet(Inline),+ Ordered {+ num: String,+ inline: Inline,+ },+ Plain(Inline),+}++#[derive(Clone, Default)]+struct Inline {+ text: String,+ runs: Vec<(Range<usize>, RunKind)>,+ links: Vec<(Range<usize>, String)>,+}++#[derive(Clone, Copy, PartialEq, Eq, Debug)]+enum RunKind {+ Code,+ Bold,+ Italic,+ Link,+}++pub fn parse(text: &str) -> ParsedMarkdown {+ let mut blocks = Vec::new();+ let mut in_code = false;+ let mut lang = String::new();+ let mut buf = String::new();++ for line in text.lines() {+ if line.trim_start().starts_with("```") {+ if in_code {+ blocks.push(Block::Code {+ lang: std::mem::take(&mut lang),+ code: buf.trim_end_matches('\n').to_string(),+ });+ buf.clear();+ in_code = false;+ } else {+ if !buf.trim().is_empty() {+ blocks.push(parse_prose(&buf));+ }+ buf.clear();+ lang = line.trim_start().trim_start_matches('`').trim().to_string();+ in_code = true;+ }+ continue;+ }+ buf.push_str(line);+ buf.push('\n');+ }+ if in_code {+ blocks.push(Block::Code {+ lang,+ code: buf.trim_end_matches('\n').to_string(),+ });+ } else if !buf.trim().is_empty() {+ blocks.push(parse_prose(&buf));+ }+ ParsedMarkdown {+ blocks,+ }+}++fn parse_prose(prose: &str) -> Block {+ let mut lines: Vec<Line> = Vec::new();+ let mut paragraph: Vec<Inline> = Vec::new();+ for raw in prose.trim_matches('\n').split('\n') {+ match parse_line(raw) {+ Line::Plain(inline) => paragraph.push(inline),+ other => {+ flush_paragraph(&mut paragraph, &mut lines);+ lines.push(other);+ },+ }+ }+ flush_paragraph(&mut paragraph, &mut lines);+ Block::Prose(lines)+}++fn flush_paragraph(+ paragraph: &mut Vec<Inline>,+ lines: &mut Vec<Line>,+) {+ if !paragraph.is_empty() {+ lines.push(Line::Plain(merge_inlines(std::mem::take(paragraph))));+ }+}++fn merge_inlines(parts: Vec<Inline>) -> Inline {+ let mut merged = Inline::default();+ for part in parts {+ if !merged.text.is_empty() {+ merged.text.push('\n');+ }+ let offset = merged.text.len();+ merged.text.push_str(&part.text);+ for (range, kind) in part.runs {+ merged.runs.push((offset + range.start..offset + range.end, kind));+ }+ for (range, url) in part.links {+ merged.links.push((offset + range.start..offset + range.end, url));+ }+ }+ merged+}++fn parse_line(line: &str) -> Line {+ if line.trim().is_empty() {+ return Line::Blank;+ }+ let trimmed = line.trim_start();++ let hashes = trimmed.chars().take_while(|c| *c == '#').count();+ if (1..=6).contains(&hashes) && trimmed[hashes..].starts_with(' ') {+ return Line::Heading {+ level: hashes as u8,+ inline: parse_inline(trimmed[hashes + 1..].trim_start()),+ };+ }++ if let Some(rest) = trimmed.strip_prefix("> ").or_else(|| trimmed.strip_prefix(">")) {+ return Line::Quote(parse_inline(rest.trim_start()));+ }++ if let Some(rest) = trimmed.strip_prefix("- ").or_else(|| trimmed.strip_prefix("* ")) {+ return Line::Bullet(parse_inline(rest));+ }++ let digits = trimmed.chars().take_while(|c| c.is_ascii_digit()).count();+ if digits > 0 && trimmed[digits..].starts_with(". ") {+ return Line::Ordered {+ num: trimmed[..digits].to_string(),+ inline: parse_inline(&trimmed[digits + 2..]),+ };+ }++ Line::Plain(parse_inline(line))+}++pub fn render(+ parsed: &ParsedMarkdown,+ theme: &Theme,+ id_seed: usize,+) -> AnyElement {+ let mut col = div().flex().flex_col().w_full().min_w_0().gap_2();+ let mut line_no = 0usize;++ for (bi, block) in parsed.blocks.iter().enumerate() {+ col = col.child(match block {+ Block::Prose(lines) => {+ let mut p = div().flex().flex_col().w_full().min_w_0().gap_1();+ for line in lines {+ if matches!(line, Line::Blank) {+ p = p.child(div().h(px(6.)));+ } else {+ let lid = id_seed.wrapping_mul(100_000).wrapping_add(line_no);+ line_no += 1;+ p = p.child(render_line(line, theme, lid));+ }+ }+ p.into_any_element()+ },+ Block::Code {+ lang,+ code,+ } => code_block(lang, code, theme, id_seed * 64 + bi),+ });+ }+ col.into_any_element()+}++fn code_block(+ lang: &str,+ code: &str,+ theme: &Theme,+ uid: usize,+) -> AnyElement {+ let label = if lang.trim().is_empty() {+ "code".to_string()+ } else {+ lang.trim().to_string()+ };+ let code_for_copy = code.to_string();++ let header = div()+ .flex()+ .items_center()+ .justify_between()+ .px_3()+ .py_1()+ .border_b_1()+ .border_color(theme.border)+ .child(div().text_size(tokens::font::CAPTION).text_color(theme.text_muted).child(label))+ .child(+ div()+ .id(SharedString::from(format!("md-copy-{uid}")))+ .flex()+ .items_center()+ .gap_1()+ .px_2()+ .py_0p5()+ .rounded_md()+ .cursor(CursorStyle::PointingHand)+ .text_size(tokens::font::CAPTION)+ .text_color(theme.text_muted)+ .hover(|s| s.text_color(theme.text))+ .child(IconEl::new(Icon::Copy, theme.text_muted).size(tokens::icon::XS))+ .child("Copy")+ .on_click(move |_, _, cx| {+ cx.write_to_clipboard(ClipboardItem::new_string(code_for_copy.clone()));+ }),+ );++ let body = div()+ .font_family(FONT_MONO)+ .text_size(tokens::font::SMALL)+ .text_color(theme.text)+ .p_3()+ .w_full()+ .min_w_0()+ .overflow_hidden()+ .child(StyledText::new(code.to_string()));++ div()+ .flex()+ .flex_col()+ .w_full()+ .min_w_0()+ .bg(theme.bg_sub)+ .border_1()+ .border_color(theme.border)+ .rounded_lg()+ .overflow_hidden()+ .child(header)+ .child(body)+ .into_any_element()+}++fn prose_wrap(el: AnyElement) -> AnyElement {+ div().w_full().min_w_0().overflow_hidden().child(el).into_any_element()+}++fn render_line(+ line: &Line,+ theme: &Theme,+ id: usize,+) -> AnyElement {+ match line {+ Line::Blank => div().h(px(6.)).into_any_element(),+ Line::Heading {+ level,+ inline,+ } => {+ let size = match level {+ 1 => tokens::font::H1,+ 2 => tokens::font::H2,+ 3 => tokens::font::H3,+ _ => tokens::font::BODY,+ };+ let weight = if *level <= 3 {+ FontWeight::SEMIBOLD+ } else {+ FontWeight::MEDIUM+ };+ prose_wrap(+ div()+ .text_size(size)+ .font_weight(weight)+ .text_color(theme.text)+ .child(inline_el(inline, theme, id))+ .into_any_element(),+ )+ },+ Line::Quote(inline) => prose_wrap(+ div()+ .border_l_2()+ .border_color(theme.border)+ .pl_3()+ .text_color(theme.text_muted)+ .child(inline_el(inline, theme, id))+ .into_any_element(),+ ),+ Line::Bullet(inline) => div()+ .flex()+ .w_full()+ .min_w_0()+ .gap_2()+ .child(div().flex_none().text_color(theme.text_muted).child("•"))+ .child(div().flex_1().min_w_0().overflow_hidden().child(inline_el(inline, theme, id)))+ .into_any_element(),+ Line::Ordered {+ num,+ inline,+ } => div()+ .flex()+ .w_full()+ .min_w_0()+ .gap_2()+ .child(div().flex_none().text_color(theme.text_muted).child(format!("{num}.")))+ .child(div().flex_1().min_w_0().overflow_hidden().child(inline_el(inline, theme, id)))+ .into_any_element(),+ Line::Plain(inline) => prose_wrap(inline_el(inline, theme, id)),+ }+}++fn style_for(+ kind: RunKind,+ theme: &Theme,+) -> HighlightStyle {+ match kind {+ RunKind::Code => HighlightStyle {+ background_color: Some(theme.bg_sub),+ color: Some(theme.text),+ ..Default::default()+ },+ RunKind::Bold => HighlightStyle {+ font_weight: Some(FontWeight::BOLD),+ ..Default::default()+ },+ RunKind::Italic => HighlightStyle {+ font_style: Some(FontStyle::Italic),+ ..Default::default()+ },+ RunKind::Link => HighlightStyle {+ color: Some(theme.info),+ ..Default::default()+ },+ }+}++fn inline_el(+ inline: &Inline,+ theme: &Theme,+ id: usize,+) -> AnyElement {+ let runs: Vec<(Range<usize>, HighlightStyle)> =+ inline.runs.iter().map(|(r, k)| (r.clone(), style_for(*k, theme))).collect();+ let styled = StyledText::new(inline.text.clone()).with_highlights(runs);+ if inline.links.is_empty() {+ return styled.into_any_element();+ }+ let urls: Vec<String> = inline.links.iter().map(|(_, u)| u.clone()).collect();+ let ranges: Vec<Range<usize>> = inline.links.iter().map(|(r, _)| r.clone()).collect();+ InteractiveText::new(SharedString::from(format!("md-link-{id}")), styled)+ .on_click(ranges, move |ix, _, cx| {+ if let Some(url) = urls.get(ix) {+ cx.open_url(url);+ }+ })+ .into_any_element()+}++fn parse_inline(line: &str) -> Inline {+ let mut out = String::new();+ let mut runs: Vec<(Range<usize>, RunKind)> = Vec::new();+ let mut links: Vec<(Range<usize>, String)> = Vec::new();+ let mut chars = line.chars().peekable();++ while let Some(c) = chars.next() {+ match c {+ '`' => {+ let start = out.len();+ while let Some(&nc) = chars.peek() {+ chars.next();+ if nc == '`' {+ break;+ }+ out.push(nc);+ }+ runs.push((start..out.len(), RunKind::Code));+ },+ '[' => {+ let mut link_text = String::new();+ let mut found_close = false;+ while let Some(&nc) = chars.peek() {+ chars.next();+ if nc == ']' {+ found_close = true;+ break;+ }+ link_text.push(nc);+ }+ if found_close && chars.peek() == Some(&'(') {+ chars.next();+ let mut url = String::new();+ while let Some(&nc) = chars.peek() {+ chars.next();+ if nc == ')' {+ break;+ }+ url.push(nc);+ }+ let start = out.len();+ out.push_str(&link_text);+ runs.push((start..out.len(), RunKind::Link));+ links.push((start..out.len(), url));+ } else {+ out.push('[');+ out.push_str(&link_text);+ if found_close {+ out.push(']');+ }+ }+ },+ '*' if chars.peek() == Some(&'*') => {+ chars.next();+ let start = out.len();+ loop {+ match chars.next() {+ Some('*') if chars.peek() == Some(&'*') => {+ chars.next();+ break;+ },+ Some(ch) => out.push(ch),+ None => break,+ }+ }+ runs.push((start..out.len(), RunKind::Bold));+ },+ '*' => {+ let start = out.len();+ while let Some(&nc) = chars.peek() {+ chars.next();+ if nc == '*' {+ break;+ }+ out.push(nc);+ }+ runs.push((start..out.len(), RunKind::Italic));+ },+ '_' => {+ if out.chars().last().is_some_and(char::is_alphanumeric) {+ out.push('_');+ } else {+ let mut content = String::new();+ let mut closed = false;+ while let Some(&nc) = chars.peek() {+ chars.next();+ if nc == '_' && !chars.peek().is_some_and(|n| n.is_alphanumeric()) {+ closed = true;+ break;+ }+ content.push(nc);+ }+ if closed {+ let start = out.len();+ out.push_str(&content);+ runs.push((start..out.len(), RunKind::Italic));+ } else {+ out.push('_');+ out.push_str(&content);+ }+ }+ },+ _ => out.push(c),+ }+ }++ Inline {+ text: out,+ runs,+ links,+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn prose(md: &ParsedMarkdown) -> &[Line] {+ match &md.blocks[0] {+ Block::Prose(lines) => lines,+ _ => panic!("expected prose block"),+ }+ }++ #[test]+ fn merges_consecutive_plain_lines_into_one_paragraph() {+ let md = parse("line one\nline two");+ let lines = prose(&md);+ assert_eq!(lines.len(), 1);+ let Line::Plain(inline) = &lines[0] else {+ panic!("expected plain paragraph");+ };+ assert_eq!(inline.text, "line one\nline two");+ }++ #[test]+ fn parses_heading_level_and_text() {+ let md = parse("## Title");+ let Line::Heading {+ level,+ inline,+ } = &prose(&md)[0]+ else {+ panic!("expected heading");+ };+ assert_eq!(*level, 2);+ assert_eq!(inline.text, "Title");+ }++ #[test]+ fn parses_inline_bold_and_code_runs() {+ let md = parse("a **b** `c`");+ let Line::Plain(inline) = &prose(&md)[0] else {+ panic!("expected plain");+ };+ assert_eq!(inline.text, "a b c");+ assert!(inline.runs.iter().any(|(r, k)| *k == RunKind::Bold && &inline.text[r.clone()] == "b"));+ assert!(inline.runs.iter().any(|(r, k)| *k == RunKind::Code && &inline.text[r.clone()] == "c"));+ }++ #[test]+ fn parses_link_range_and_url() {+ let md = parse("see [label](https://example.com)");+ let Line::Plain(inline) = &prose(&md)[0] else {+ panic!("expected plain");+ };+ assert_eq!(inline.text, "see label");+ assert_eq!(inline.links.len(), 1);+ let (range, url) = &inline.links[0];+ assert_eq!(&inline.text[range.clone()], "label");+ assert_eq!(url, "https://example.com");+ }++ #[test]+ fn parses_fenced_code_block_with_language() {+ let md = parse("```rust\nfn main() {}\n```");+ let Block::Code {+ lang,+ code,+ } = &md.blocks[0]+ else {+ panic!("expected code block");+ };+ assert_eq!(lang, "rust");+ assert_eq!(code, "fn main() {}");+ }++ #[test]+ fn merged_paragraph_offsets_runs_across_lines() {+ let md = parse("plain\n**bold**");+ let Line::Plain(inline) = &prose(&md)[0] else {+ panic!("expected plain");+ };+ assert_eq!(inline.text, "plain\nbold");+ let (range, kind) = &inline.runs[0];+ assert_eq!(*kind, RunKind::Bold);+ assert_eq!(&inline.text[range.clone()], "bold");+ }+}diff --git a/apps/mirai/ui-kit/src/components/mod.rs b/apps/mirai/ui-kit/src/components/mod.rsnew file mode 100644index 000000000..b8839ea7b--- /dev/null+++ b/apps/mirai/ui-kit/src/components/mod.rs@@ -0,0 +1,26 @@+use gpui::{App, ClickEvent, Window};++pub(crate) type ClickHandler = Box<dyn Fn(&ClickEvent, &mut Window, &mut App) + 'static>;++pub mod button;+pub mod icon;+pub mod icon_button;+pub mod loader;+pub mod markdown;+pub mod modal;+pub mod segmented_control;+pub mod slider;+pub mod text_input;+pub mod toggle;+pub mod vendor_icon;++pub use button::{Button, ButtonKind, ButtonSize};+pub use icon::{Icon, IconEl};+pub use icon_button::IconButton;+pub use loader::Loader;+pub use modal::ConfirmModal;+pub use segmented_control::SegmentedControl;+pub use slider::Slider;+pub use text_input::{InputEvent, TextInput};+pub use toggle::Toggle;+pub use vendor_icon::VendorIcon;diff --git a/apps/mirai/ui-kit/src/components/modal.rs b/apps/mirai/ui-kit/src/components/modal.rsnew file mode 100644index 000000000..c174cc0b7--- /dev/null+++ b/apps/mirai/ui-kit/src/components/modal.rs@@ -0,0 +1,107 @@+use gpui::{App, ClickEvent, FontWeight, IntoElement, RenderOnce, SharedString, Window, black, div, prelude::*, px};++use super::ClickHandler;+use crate::{+ components::{Button, ButtonKind, ButtonSize},+ theme::ActiveTheme,+};++#[derive(IntoElement)]+pub struct ConfirmModal {+ title: SharedString,+ message: SharedString,+ confirm_label: SharedString,+ danger: bool,+ on_confirm: Option<ClickHandler>,+ on_cancel: Option<ClickHandler>,+}++impl ConfirmModal {+ pub fn new(+ title: impl Into<SharedString>,+ message: impl Into<SharedString>,+ ) -> Self {+ Self {+ title: title.into(),+ message: message.into(),+ confirm_label: "Confirm".into(),+ danger: false,+ on_confirm: None,+ on_cancel: None,+ }+ }++ pub fn confirm_label(+ mut self,+ label: impl Into<SharedString>,+ ) -> Self {+ self.confirm_label = label.into();+ self+ }++ pub fn danger(+ mut self,+ danger: bool,+ ) -> Self {+ self.danger = danger;+ self+ }++ pub fn on_confirm(+ mut self,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_confirm = Some(Box::new(handler));+ self+ }++ pub fn on_cancel(+ mut self,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_cancel = Some(Box::new(handler));+ self+ }+}++impl RenderOnce for ConfirmModal {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let mut cancel = Button::new("modal-cancel", "Cancel").kind(ButtonKind::Secondary).size(ButtonSize::Small);+ if let Some(handler) = self.on_cancel {+ cancel = cancel.on_click(handler);+ }++ let mut confirm = Button::new("modal-confirm", self.confirm_label)+ .kind(if self.danger {+ ButtonKind::Danger+ } else {+ ButtonKind::Primary+ })+ .size(ButtonSize::Small);+ if let Some(handler) = self.on_confirm {+ confirm = confirm.on_click(handler);+ }++ div().absolute().size_full().flex().items_center().justify_center().bg(black().opacity(0.5)).occlude().child(+ div()+ .w(px(360.))+ .flex()+ .flex_col()+ .gap_3()+ .p_4()+ .rounded_xl()+ .bg(theme.card)+ .border_1()+ .border_color(theme.border)+ .child(div().text_color(theme.text).font_weight(FontWeight::MEDIUM).child(self.title))+ .child(div().text_sm().text_color(theme.text_muted).child(self.message))+ .child(div().flex().justify_end().gap_2().child(cancel).child(confirm)),+ )+ }+}diff --git a/apps/mirai/ui-kit/src/components/segmented_control.rs b/apps/mirai/ui-kit/src/components/segmented_control.rsnew file mode 100644index 000000000..2597878e1--- /dev/null+++ b/apps/mirai/ui-kit/src/components/segmented_control.rs@@ -0,0 +1,99 @@+use gpui::{+ App, ClickEvent, CursorStyle, ElementId, FontWeight, IntoElement, RenderOnce, SharedString, Window, div,+ prelude::*, px, white,+};++use super::ClickHandler;+use crate::{theme::ActiveTheme, tokens};++struct Segment {+ label: SharedString,+ on_click: Option<ClickHandler>,+}++#[derive(IntoElement)]+pub struct SegmentedControl {+ id: ElementId,+ segments: Vec<Segment>,+ selected: usize,+}++impl SegmentedControl {+ pub fn new(+ id: impl Into<ElementId>,+ selected: usize,+ ) -> Self {+ Self {+ id: id.into(),+ segments: Vec::new(),+ selected,+ }+ }++ pub fn segment(+ mut self,+ label: impl Into<SharedString>,+ on_click: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.segments.push(Segment {+ label: label.into(),+ on_click: Some(Box::new(on_click)),+ });+ self+ }+}++impl RenderOnce for SegmentedControl {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();+ let selected = self.selected;++ let mut row = div()+ .id(self.id)+ .flex()+ .items_center()+ .gap_1()+ .p(px(2.))+ .rounded_lg()+ .bg(theme.bg_sub)+ .border_1()+ .border_color(theme.border);++ for (i, seg) in self.segments.into_iter().enumerate() {+ let is_sel = i == selected;+ let mut cell = div()+ .id(SharedString::from(format!("seg-{i}")))+ .flex_1()+ .flex()+ .items_center()+ .justify_center()+ .px_3()+ .py_1()+ .rounded_md()+ .text_size(tokens::font::COMPACT)+ .cursor(CursorStyle::PointingHand)+ .child(seg.label);++ if is_sel {+ let label_color = if theme.dark {+ theme.bg+ } else {+ theme.text+ };+ cell = cell.bg(white()).text_color(label_color).font_weight(FontWeight::MEDIUM);+ } else {+ let hover = theme.bg_hover;+ cell = cell.text_color(theme.text_muted).hover(move |s| s.bg(hover));+ }+ if let Some(handler) = seg.on_click {+ cell = cell.on_click(handler);+ }+ row = row.child(cell);+ }+ row+ }+}diff --git a/apps/mirai/ui-kit/src/components/slider.rs b/apps/mirai/ui-kit/src/components/slider.rsnew file mode 100644index 000000000..58c1d82ec--- /dev/null+++ b/apps/mirai/ui-kit/src/components/slider.rs@@ -0,0 +1,162 @@+use std::{cell::Cell, rc::Rc};++use gpui::{+ App, Bounds, DispatchPhase, Element, ElementId, GlobalElementId, Hitbox, HitboxBehavior, InspectorElementId,+ IntoElement, LayoutId, MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent, Pixels, Style, Window, fill,+ point, px, relative, size,+};++use crate::theme::ActiveTheme;++type ChangeHandler = Box<dyn Fn(f32, &mut Window, &mut App)>;++pub struct Slider {+ id: ElementId,+ value: f32,+ on_change: Option<ChangeHandler>,+}++impl Slider {+ pub fn new(+ id: impl Into<ElementId>,+ value: f32,+ ) -> Self {+ Self {+ id: id.into(),+ value: value.clamp(0., 1.),+ on_change: None,+ }+ }++ pub fn on_change(+ mut self,+ handler: impl Fn(f32, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_change = Some(Box::new(handler));+ self+ }+}++#[derive(Default, Clone)]+struct SliderState {+ dragging: Rc<Cell<bool>>,+}++impl IntoElement for Slider {+ type Element = Self;+ fn into_element(self) -> Self::Element {+ self+ }+}++impl Element for Slider {+ type RequestLayoutState = ();+ type PrepaintState = Hitbox;++ fn id(&self) -> Option<ElementId> {+ Some(self.id.clone())+ }++ fn source_location(&self) -> Option<&'static core::panic::Location<'static>> {+ None+ }++ fn request_layout(+ &mut self,+ _: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ window: &mut Window,+ cx: &mut App,+ ) -> (LayoutId, ()) {+ let mut style = Style::default();+ style.size.width = relative(1.).into();+ style.size.height = px(16.).into();+ (window.request_layout(style, [], cx), ())+ }++ fn prepaint(+ &mut self,+ _: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ bounds: Bounds<Pixels>,+ _: &mut (),+ window: &mut Window,+ _: &mut App,+ ) -> Hitbox {+ window.insert_hitbox(bounds, HitboxBehavior::Normal)+ }++ fn paint(+ &mut self,+ global_id: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ bounds: Bounds<Pixels>,+ _: &mut (),+ hitbox: &mut Hitbox,+ window: &mut Window,+ cx: &mut App,+ ) {+ let theme = cx.theme().clone();+ let track_h = px(4.);+ let thumb_r = px(7.);+ let cy = bounds.center().y;+ let left = bounds.left();+ let width = bounds.size.width;+ let frac = self.value.clamp(0., 1.);+ let thumb_x = left + width * frac;++ window.paint_quad(+ fill(Bounds::new(point(left, cy - track_h / 2.), size(width, track_h)), theme.border)+ .corner_radii(track_h / 2.),+ );+ window.paint_quad(+ fill(Bounds::new(point(left, cy - track_h / 2.), size(width * frac, track_h)), theme.text)+ .corner_radii(track_h / 2.),+ );+ window.paint_quad(+ fill(Bounds::new(point(thumb_x - thumb_r, cy - thumb_r), size(thumb_r * 2., thumb_r * 2.)), theme.text)+ .corner_radii(thumb_r),+ );++ let Some(global_id) = global_id else {+ return;+ };+ let dragging = window.with_element_state::<SliderState, _>(global_id, |state, _| {+ let state = state.unwrap_or_default();+ (state.dragging.clone(), state)+ });++ let Some(on_change) = self.on_change.take() else {+ return;+ };+ let on_change = Rc::new(on_change);++ {+ let hitbox = hitbox.clone();+ let dragging = dragging.clone();+ let on_change = on_change.clone();+ window.on_mouse_event(move |e: &MouseDownEvent, phase, window, cx| {+ if phase == DispatchPhase::Bubble && e.button == MouseButton::Left && hitbox.is_hovered(window) {+ dragging.set(true);+ on_change(((e.position.x - left) / width).clamp(0., 1.), window, cx);+ }+ });+ }+ {+ let dragging = dragging.clone();+ let on_change = on_change.clone();+ window.on_mouse_event(move |e: &MouseMoveEvent, phase, window, cx| {+ if phase == DispatchPhase::Bubble && dragging.get() {+ on_change(((e.position.x - left) / width).clamp(0., 1.), window, cx);+ }+ });+ }+ {+ window.on_mouse_event(move |_: &MouseUpEvent, phase, _, _| {+ if phase == DispatchPhase::Bubble {+ dragging.set(false);+ }+ });+ }+ }+}diff --git a/apps/mirai/ui-kit/src/components/text_input.rs b/apps/mirai/ui-kit/src/components/text_input.rsnew file mode 100644index 000000000..012158176--- /dev/null+++ b/apps/mirai/ui-kit/src/components/text_input.rs@@ -0,0 +1,877 @@+use std::ops::Range;++use gpui::{+ App, Bounds, ClipboardItem, Context, CursorStyle, Element, ElementId, ElementInputHandler, Entity,+ EntityInputHandler, EventEmitter, FocusHandle, Focusable, GlobalElementId, InspectorElementId, KeyBinding,+ LayoutId, MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent, PaintQuad, Pixels, Point, ShapedLine,+ SharedString, Style, TextAlign, TextRun, UTF16Selection, UnderlineStyle, Window, actions, div, fill, point,+ prelude::*, px, relative, size,+};+use unicode_segmentation::UnicodeSegmentation;++use crate::theme::ActiveTheme;++actions!(+ text_input,+ [Backspace, Delete, Left, Right, SelectLeft, SelectRight, SelectAll, Home, End, Paste, Cut, Copy, Submit, Newline,]+);++pub fn register(cx: &mut App) {+ cx.bind_keys([+ KeyBinding::new("backspace", Backspace, Some("TextInput")),+ KeyBinding::new("delete", Delete, Some("TextInput")),+ KeyBinding::new("left", Left, Some("TextInput")),+ KeyBinding::new("right", Right, Some("TextInput")),+ KeyBinding::new("shift-left", SelectLeft, Some("TextInput")),+ KeyBinding::new("shift-right", SelectRight, Some("TextInput")),+ KeyBinding::new("cmd-a", SelectAll, Some("TextInput")),+ KeyBinding::new("home", Home, Some("TextInput")),+ KeyBinding::new("end", End, Some("TextInput")),+ KeyBinding::new("cmd-c", Copy, Some("TextInput")),+ KeyBinding::new("cmd-x", Cut, Some("TextInput")),+ KeyBinding::new("cmd-v", Paste, Some("TextInput")),+ KeyBinding::new("enter", Submit, Some("TextInput")),+ KeyBinding::new("shift-enter", Newline, Some("TextInput")),+ ]);+}++pub enum InputEvent {+ Submit(String),++ Changed(String),+}++pub struct TextInput {+ focus_handle: FocusHandle,+ content: SharedString,+ placeholder: SharedString,+ selected_range: Range<usize>,+ selection_reversed: bool,+ marked_range: Option<Range<usize>>,+ last_layout: Option<ShapedLine>,+ last_bounds: Option<Bounds<Pixels>>,+ is_selecting: bool,++ multiline: bool,++ submit_on_enter: bool,+ min_rows: usize,+ max_rows: usize,++ last_lines: Vec<(usize, ShapedLine)>,+ last_line_height: Pixels,+}++impl EventEmitter<InputEvent> for TextInput {}++impl TextInput {+ pub fn new(+ cx: &mut Context<Self>,+ placeholder: impl Into<SharedString>,+ ) -> Self {+ Self {+ focus_handle: cx.focus_handle(),+ content: "".into(),+ placeholder: placeholder.into(),+ selected_range: 0..0,+ selection_reversed: false,+ marked_range: None,+ last_layout: None,+ last_bounds: None,+ is_selecting: false,+ multiline: false,+ submit_on_enter: true,+ min_rows: 1,+ max_rows: 8,+ last_lines: Vec::new(),+ last_line_height: px(0.),+ }+ }++ pub fn multiline(+ mut self,+ submit_on_enter: bool,+ min_rows: usize,+ max_rows: usize,+ ) -> Self {+ self.multiline = true;+ self.submit_on_enter = submit_on_enter;+ self.min_rows = min_rows.max(1);+ self.max_rows = max_rows.max(min_rows.max(1));+ self+ }++ pub fn text(&self) -> String {+ self.content.to_string()+ }++ pub fn clear(+ &mut self,+ cx: &mut Context<Self>,+ ) {+ self.reset();+ cx.notify();+ }++ pub fn set_text(+ &mut self,+ text: impl Into<SharedString>,+ cx: &mut Context<Self>,+ ) {+ self.content = text.into();+ let len = self.content.len();+ self.selected_range = len..len;+ self.marked_range = None;+ cx.notify();+ }++ fn on_enter(+ &mut self,+ _: &Submit,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.multiline && !self.submit_on_enter {+ self.replace_text_in_range(None, "\n", window, cx);+ return;+ }+ let text = self.content.to_string();+ if text.trim().is_empty() {+ return;+ }++ cx.emit(InputEvent::Submit(text));+ }++ fn newline(+ &mut self,+ _: &Newline,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.multiline {+ self.replace_text_in_range(None, "\n", window, cx);+ }+ }++ fn left(+ &mut self,+ _: &Left,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.selected_range.is_empty() {+ self.move_to(self.previous_boundary(self.cursor_offset()), cx);+ } else {+ self.move_to(self.selected_range.start, cx)+ }+ }++ fn right(+ &mut self,+ _: &Right,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.selected_range.is_empty() {+ self.move_to(self.next_boundary(self.selected_range.end), cx);+ } else {+ self.move_to(self.selected_range.end, cx)+ }+ }++ fn select_left(+ &mut self,+ _: &SelectLeft,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.select_to(self.previous_boundary(self.cursor_offset()), cx);+ }++ fn select_right(+ &mut self,+ _: &SelectRight,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.select_to(self.next_boundary(self.cursor_offset()), cx);+ }++ fn select_all(+ &mut self,+ _: &SelectAll,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.move_to(0, cx);+ self.select_to(self.content.len(), cx)+ }++ fn home(+ &mut self,+ _: &Home,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.move_to(0, cx);+ }++ fn end(+ &mut self,+ _: &End,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.move_to(self.content.len(), cx);+ }++ fn backspace(+ &mut self,+ _: &Backspace,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.selected_range.is_empty() {+ self.select_to(self.previous_boundary(self.cursor_offset()), cx)+ }+ self.replace_text_in_range(None, "", window, cx)+ }++ fn delete(+ &mut self,+ _: &Delete,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.selected_range.is_empty() {+ self.select_to(self.next_boundary(self.cursor_offset()), cx)+ }+ self.replace_text_in_range(None, "", window, cx)+ }++ fn on_mouse_down(+ &mut self,+ event: &MouseDownEvent,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ self.is_selecting = true;+ if event.modifiers.shift {+ self.select_to(self.index_for_mouse_position(event.position), cx);+ } else {+ self.move_to(self.index_for_mouse_position(event.position), cx)+ }+ }++ fn on_mouse_up(+ &mut self,+ _: &MouseUpEvent,+ _: &mut Window,+ _: &mut Context<Self>,+ ) {+ self.is_selecting = false;+ }++ fn on_mouse_move(+ &mut self,+ event: &MouseMoveEvent,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if self.is_selecting {+ self.select_to(self.index_for_mouse_position(event.position), cx);+ }+ }++ fn paste(+ &mut self,+ _: &Paste,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if let Some(text) = cx.read_from_clipboard().and_then(|item| item.text()) {+ let text = if self.multiline {+ text+ } else {+ text.replace('\n', " ")+ };+ self.replace_text_in_range(None, &text, window, cx);+ }+ }++ fn copy(+ &mut self,+ _: &Copy,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if !self.selected_range.is_empty() {+ cx.write_to_clipboard(ClipboardItem::new_string(self.content[self.selected_range.clone()].to_string()));+ }+ }++ fn cut(+ &mut self,+ _: &Cut,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if !self.selected_range.is_empty() {+ cx.write_to_clipboard(ClipboardItem::new_string(self.content[self.selected_range.clone()].to_string()));+ self.replace_text_in_range(None, "", window, cx)+ }+ }++ fn move_to(+ &mut self,+ offset: usize,+ cx: &mut Context<Self>,+ ) {+ self.selected_range = offset..offset;+ cx.notify()+ }++ fn cursor_offset(&self) -> usize {+ if self.selection_reversed {+ self.selected_range.start+ } else {+ self.selected_range.end+ }+ }++ fn index_for_mouse_position(+ &self,+ position: Point<Pixels>,+ ) -> usize {+ if self.content.is_empty() {+ return 0;+ }+ if self.multiline {+ let Some(bounds) = self.last_bounds.as_ref() else {+ return 0;+ };+ if self.last_lines.is_empty() || self.last_line_height <= px(0.) {+ return 0;+ }+ let local_y = (position.y - bounds.top()).max(px(0.));+ let idx = ((local_y / self.last_line_height) as usize).min(self.last_lines.len() - 1);+ let (byte_start, line) = &self.last_lines[idx];+ return byte_start + line.closest_index_for_x(position.x - bounds.left());+ }+ let (Some(bounds), Some(line)) = (self.last_bounds.as_ref(), self.last_layout.as_ref()) else {+ return 0;+ };+ if position.y < bounds.top() {+ return 0;+ }+ if position.y > bounds.bottom() {+ return self.content.len();+ }+ line.closest_index_for_x(position.x - bounds.left())+ }++ fn select_to(+ &mut self,+ offset: usize,+ cx: &mut Context<Self>,+ ) {+ if self.selection_reversed {+ self.selected_range.start = offset+ } else {+ self.selected_range.end = offset+ };+ if self.selected_range.end < self.selected_range.start {+ self.selection_reversed = !self.selection_reversed;+ self.selected_range = self.selected_range.end..self.selected_range.start;+ }+ cx.notify()+ }++ fn offset_from_utf16(+ &self,+ offset: usize,+ ) -> usize {+ let mut utf8_offset = 0;+ let mut utf16_count = 0;+ for ch in self.content.chars() {+ if utf16_count >= offset {+ break;+ }+ utf16_count += ch.len_utf16();+ utf8_offset += ch.len_utf8();+ }+ utf8_offset+ }++ fn offset_to_utf16(+ &self,+ offset: usize,+ ) -> usize {+ let mut utf16_offset = 0;+ let mut utf8_count = 0;+ for ch in self.content.chars() {+ if utf8_count >= offset {+ break;+ }+ utf8_count += ch.len_utf8();+ utf16_offset += ch.len_utf16();+ }+ utf16_offset+ }++ fn range_to_utf16(+ &self,+ range: &Range<usize>,+ ) -> Range<usize> {+ self.offset_to_utf16(range.start)..self.offset_to_utf16(range.end)+ }++ fn range_from_utf16(+ &self,+ range_utf16: &Range<usize>,+ ) -> Range<usize> {+ self.offset_from_utf16(range_utf16.start)..self.offset_from_utf16(range_utf16.end)+ }++ fn previous_boundary(+ &self,+ offset: usize,+ ) -> usize {+ self.content.grapheme_indices(true).rev().find_map(|(idx, _)| (idx < offset).then_some(idx)).unwrap_or(0)+ }++ fn next_boundary(+ &self,+ offset: usize,+ ) -> usize {+ self.content+ .grapheme_indices(true)+ .find_map(|(idx, _)| (idx > offset).then_some(idx))+ .unwrap_or(self.content.len())+ }++ fn reset(&mut self) {+ self.content = "".into();+ self.selected_range = 0..0;+ self.selection_reversed = false;+ self.marked_range = None;+ self.last_layout = None;+ self.last_bounds = None;+ self.is_selecting = false;+ self.last_lines.clear();+ self.last_line_height = px(0.);+ }+}++impl EntityInputHandler for TextInput {+ fn text_for_range(+ &mut self,+ range_utf16: Range<usize>,+ actual_range: &mut Option<Range<usize>>,+ _: &mut Window,+ _: &mut Context<Self>,+ ) -> Option<String> {+ let range = self.range_from_utf16(&range_utf16);+ actual_range.replace(self.range_to_utf16(&range));+ Some(self.content[range].to_string())+ }++ fn selected_text_range(+ &mut self,+ _: bool,+ _: &mut Window,+ _: &mut Context<Self>,+ ) -> Option<UTF16Selection> {+ Some(UTF16Selection {+ range: self.range_to_utf16(&self.selected_range),+ reversed: self.selection_reversed,+ })+ }++ fn marked_text_range(+ &self,+ _: &mut Window,+ _: &mut Context<Self>,+ ) -> Option<Range<usize>> {+ self.marked_range.as_ref().map(|range| self.range_to_utf16(range))+ }++ fn unmark_text(+ &mut self,+ _: &mut Window,+ _: &mut Context<Self>,+ ) {+ self.marked_range = None;+ }++ fn replace_text_in_range(+ &mut self,+ range_utf16: Option<Range<usize>>,+ new_text: &str,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ let range = range_utf16+ .as_ref()+ .map(|range_utf16| self.range_from_utf16(range_utf16))+ .or_else(|| self.marked_range.clone())+ .unwrap_or_else(|| self.selected_range.clone());+ self.content = (self.content[0..range.start].to_owned() + new_text + &self.content[range.end..]).into();+ self.selected_range = range.start + new_text.len()..range.start + new_text.len();+ self.marked_range.take();+ cx.emit(InputEvent::Changed(self.content.to_string()));+ cx.notify();+ }++ fn replace_and_mark_text_in_range(+ &mut self,+ range_utf16: Option<Range<usize>>,+ new_text: &str,+ new_selected_range_utf16: Option<Range<usize>>,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) {+ let range = range_utf16+ .as_ref()+ .map(|range_utf16| self.range_from_utf16(range_utf16))+ .or_else(|| self.marked_range.clone())+ .unwrap_or_else(|| self.selected_range.clone());+ self.content = (self.content[0..range.start].to_owned() + new_text + &self.content[range.end..]).into();+ if !new_text.is_empty() {+ self.marked_range = Some(range.start..range.start + new_text.len());+ } else {+ self.marked_range = None;+ }+ self.selected_range = new_selected_range_utf16+ .as_ref()+ .map(|range_utf16| self.range_from_utf16(range_utf16))+ .map(|new_range| new_range.start + range.start..new_range.end + range.start)+ .unwrap_or_else(|| range.start + new_text.len()..range.start + new_text.len());+ cx.notify();+ }++ fn bounds_for_range(+ &mut self,+ range_utf16: Range<usize>,+ bounds: Bounds<Pixels>,+ _: &mut Window,+ _: &mut Context<Self>,+ ) -> Option<Bounds<Pixels>> {+ let last_layout = self.last_layout.as_ref()?;+ let range = self.range_from_utf16(&range_utf16);+ Some(Bounds::from_corners(+ point(bounds.left() + last_layout.x_for_index(range.start), bounds.top()),+ point(bounds.left() + last_layout.x_for_index(range.end), bounds.bottom()),+ ))+ }++ fn character_index_for_point(+ &mut self,+ point: Point<Pixels>,+ _: &mut Window,+ _: &mut Context<Self>,+ ) -> Option<usize> {+ let line_point = self.last_bounds?.localize(&point)?;+ let last_layout = self.last_layout.as_ref()?;+ let utf8_index = last_layout.index_for_x(point.x - line_point.x)?;+ Some(self.offset_to_utf16(utf8_index))+ }+}++impl Focusable for TextInput {+ fn focus_handle(+ &self,+ _: &App,+ ) -> FocusHandle {+ self.focus_handle.clone()+ }+}++impl Render for TextInput {+ fn render(+ &mut self,+ _: &mut Window,+ cx: &mut Context<Self>,+ ) -> impl IntoElement {+ div()+ .flex()+ .w_full()+ .key_context("TextInput")+ .track_focus(&self.focus_handle(cx))+ .cursor(CursorStyle::IBeam)+ .on_action(cx.listener(Self::on_enter))+ .on_action(cx.listener(Self::newline))+ .on_action(cx.listener(Self::backspace))+ .on_action(cx.listener(Self::delete))+ .on_action(cx.listener(Self::left))+ .on_action(cx.listener(Self::right))+ .on_action(cx.listener(Self::select_left))+ .on_action(cx.listener(Self::select_right))+ .on_action(cx.listener(Self::select_all))+ .on_action(cx.listener(Self::home))+ .on_action(cx.listener(Self::end))+ .on_action(cx.listener(Self::paste))+ .on_action(cx.listener(Self::cut))+ .on_action(cx.listener(Self::copy))+ .on_mouse_down(MouseButton::Left, cx.listener(Self::on_mouse_down))+ .on_mouse_up(MouseButton::Left, cx.listener(Self::on_mouse_up))+ .on_mouse_move(cx.listener(Self::on_mouse_move))+ .child(TextElement {+ input: cx.entity(),+ })+ }+}++struct TextElement {+ input: Entity<TextInput>,+}++struct PrepaintState {+ line: Option<ShapedLine>,++ lines: Vec<(Pixels, usize, ShapedLine)>,+ cursor: Option<PaintQuad>,+ selection: Option<PaintQuad>,+}++impl IntoElement for TextElement {+ type Element = Self;+ fn into_element(self) -> Self::Element {+ self+ }+}++impl Element for TextElement {+ type RequestLayoutState = ();+ type PrepaintState = PrepaintState;++ fn id(&self) -> Option<ElementId> {+ None+ }++ fn source_location(&self) -> Option<&'static core::panic::Location<'static>> {+ None+ }++ fn request_layout(+ &mut self,+ _: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ window: &mut Window,+ cx: &mut App,+ ) -> (LayoutId, Self::RequestLayoutState) {+ let rows = {+ let input = self.input.read(cx);+ if input.multiline {+ input.content.split('\n').count().clamp(input.min_rows, input.max_rows)+ } else {+ 1+ }+ };+ let mut style = Style::default();+ style.size.width = relative(1.).into();+ style.size.height = (window.line_height() * rows as f32).into();+ (window.request_layout(style, [], cx), ())+ }++ fn prepaint(+ &mut self,+ _: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ bounds: Bounds<Pixels>,+ _: &mut Self::RequestLayoutState,+ window: &mut Window,+ cx: &mut App,+ ) -> Self::PrepaintState {+ let theme = cx.theme().clone();+ let input = self.input.read(cx);+ let content = input.content.clone();+ let selected_range = input.selected_range.clone();+ let cursor = input.cursor_offset();+ let style = window.text_style();++ if input.multiline {+ let line_height = window.line_height();+ let font_size = style.font_size.to_pixels(window.rem_size());+ let empty = content.is_empty();+ let display = if empty {+ input.placeholder.to_string()+ } else {+ content.to_string()+ };+ let text_color = if empty {+ theme.text_muted.opacity(0.7)+ } else {+ style.color+ };++ let mut lines: Vec<(Pixels, usize, ShapedLine)> = Vec::new();+ let mut byte = 0usize;+ for (i, seg) in display.split('\n').enumerate() {+ let run = TextRun {+ len: seg.len(),+ font: style.font(),+ color: text_color,+ background_color: None,+ underline: None,+ strikethrough: None,+ };+ let shaped =+ window.text_system().shape_line(SharedString::from(seg.to_string()), font_size, &[run], None);+ lines.push((line_height * i as f32, byte, shaped));+ byte += seg.len() + 1;+ }++ let cursor_quad = if empty {+ Some(fill(Bounds::new(point(bounds.left(), bounds.top()), size(px(2.), line_height)), theme.text))+ } else {+ let cline = content[..cursor].matches('\n').count();+ let lstart = content[..cursor].rfind('\n').map(|p| p + 1).unwrap_or(0);+ let col = cursor.saturating_sub(lstart);+ let x = lines.get(cline).map(|(_, _, l)| l.x_for_index(col)).unwrap_or(px(0.));+ Some(fill(+ Bounds::new(+ point(bounds.left() + x, bounds.top() + line_height * cline as f32),+ size(px(2.), line_height),+ ),+ theme.text,+ ))+ };++ return PrepaintState {+ line: None,+ lines,+ cursor: cursor_quad,+ selection: None,+ };+ }++ let (display_text, text_color) = if content.is_empty() {+ (input.placeholder.clone(), theme.text_muted.opacity(0.7))+ } else {+ (content, style.color)+ };++ let run = TextRun {+ len: display_text.len(),+ font: style.font(),+ color: text_color,+ background_color: None,+ underline: None,+ strikethrough: None,+ };+ let runs = if let Some(marked_range) = input.marked_range.as_ref() {+ vec![+ TextRun {+ len: marked_range.start,+ ..run.clone()+ },+ TextRun {+ len: marked_range.end - marked_range.start,+ underline: Some(UnderlineStyle {+ color: Some(run.color),+ thickness: px(1.0),+ wavy: false,+ }),+ ..run.clone()+ },+ TextRun {+ len: display_text.len() - marked_range.end,+ ..run+ },+ ]+ .into_iter()+ .filter(|run| run.len > 0)+ .collect()+ } else {+ vec![run]+ };++ let font_size = style.font_size.to_pixels(window.rem_size());+ let line = window.text_system().shape_line(display_text, font_size, &runs, None);++ let cursor_pos = line.x_for_index(cursor);+ let (selection, cursor) = if selected_range.is_empty() {+ (+ None,+ Some(fill(+ Bounds::new(+ point(bounds.left() + cursor_pos, bounds.top()),+ size(px(2.), bounds.bottom() - bounds.top()),+ ),+ theme.text,+ )),+ )+ } else {+ (+ Some(fill(+ Bounds::from_corners(+ point(bounds.left() + line.x_for_index(selected_range.start), bounds.top()),+ point(bounds.left() + line.x_for_index(selected_range.end), bounds.bottom()),+ ),+ theme.accent.opacity(0.25),+ )),+ None,+ )+ };+ PrepaintState {+ line: Some(line),+ lines: Vec::new(),+ cursor,+ selection,+ }+ }++ fn paint(+ &mut self,+ _: Option<&GlobalElementId>,+ _: Option<&InspectorElementId>,+ bounds: Bounds<Pixels>,+ _: &mut Self::RequestLayoutState,+ prepaint: &mut Self::PrepaintState,+ window: &mut Window,+ cx: &mut App,+ ) {+ let focus_handle = self.input.read(cx).focus_handle.clone();+ window.handle_input(&focus_handle, ElementInputHandler::new(bounds, self.input.clone()), cx);+ if let Some(selection) = prepaint.selection.take() {+ window.paint_quad(selection)+ }++ if prepaint.line.is_none() {+ let line_height = window.line_height();+ let lines = std::mem::take(&mut prepaint.lines);+ for (y, _b, shaped) in &lines {+ shaped+ .paint(point(bounds.left(), bounds.top() + *y), line_height, TextAlign::Left, None, window, cx)+ .ok();+ }+ if focus_handle.is_focused(window)+ && let Some(cursor) = prepaint.cursor.take()+ {+ window.paint_quad(cursor);+ }+ self.input.update(cx, |input, _| {+ input.last_bounds = Some(bounds);+ input.last_line_height = line_height;+ input.last_lines = lines.into_iter().map(|(_, b, l)| (b, l)).collect();+ });+ return;+ }++ let line = prepaint.line.take().unwrap();+ line.paint(bounds.origin, window.line_height(), TextAlign::Left, None, window, cx).unwrap();++ if focus_handle.is_focused(window)+ && let Some(cursor) = prepaint.cursor.take()+ {+ window.paint_quad(cursor);+ }++ self.input.update(cx, |input, _| {+ input.last_layout = Some(line);+ input.last_bounds = Some(bounds);+ });+ }+}diff --git a/apps/mirai/ui-kit/src/components/toggle.rs b/apps/mirai/ui-kit/src/components/toggle.rsnew file mode 100644index 000000000..2ccdca17f--- /dev/null+++ b/apps/mirai/ui-kit/src/components/toggle.rs@@ -0,0 +1,83 @@+use gpui::{App, ClickEvent, CursorStyle, ElementId, IntoElement, RenderOnce, Window, div, prelude::*, px, white};++use super::ClickHandler;+use crate::theme::ActiveTheme;++#[derive(IntoElement)]+pub struct Toggle {+ id: ElementId,+ on: bool,+ on_click: Option<ClickHandler>,+}++impl Toggle {+ pub fn new(+ id: impl Into<ElementId>,+ on: bool,+ ) -> Self {+ Self {+ id: id.into(),+ on,+ on_click: None,+ }+ }++ pub fn on_click(+ mut self,+ handler: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,+ ) -> Self {+ self.on_click = Some(Box::new(handler));+ self+ }+}++impl RenderOnce for Toggle {+ fn render(+ self,+ _window: &mut Window,+ cx: &mut App,+ ) -> impl IntoElement {+ let theme = cx.theme().clone();++ let on_track = if theme.dark {+ white()+ } else {+ theme.text+ };+ let track = if self.on {+ on_track+ } else {+ theme.bg_sub_hover+ };+ let knob = if self.on {+ theme.bg+ } else {+ white()+ };+ let mut el = div()+ .id(self.id)+ .w(px(40.))+ .h(px(22.))+ .rounded_full()+ .bg(track)+ .relative()+ .cursor(CursorStyle::PointingHand)+ .child(+ div()+ .absolute()+ .top(px(2.))+ .left(px(if self.on {+ 20.+ } else {+ 2.+ }))+ .size(px(18.))+ .rounded_full()+ .bg(knob),+ );+ if let Some(handler) = self.on_click {+ el = el.on_click(handler);+ }+ el+ }+}diff --git a/apps/mirai/ui-kit/src/components/vendor_icon.rs b/apps/mirai/ui-kit/src/components/vendor_icon.rsnew file mode 100644index 000000000..84cafcea2--- /dev/null+++ b/apps/mirai/ui-kit/src/components/vendor_icon.rs@@ -0,0 +1,74 @@+use gpui::{App, FontWeight, IntoElement, RenderOnce, SharedString, Window, div, hsla, img, prelude::*, px, white};++#[derive(IntoElement)]+pub struct VendorIcon {+ vendor: SharedString,+ size: f32,+ icon_url: Option<SharedString>,+}++impl VendorIcon {+ pub fn new(vendor: impl Into<SharedString>) -> Self {+ Self {+ vendor: vendor.into(),+ size: 20.0,+ icon_url: None,+ }+ }++ pub fn size(+ mut self,+ size: f32,+ ) -> Self {+ self.size = size;+ self+ }++ pub fn icon_url(+ mut self,+ url: Option<impl Into<SharedString>>,+ ) -> Self {+ self.icon_url = url.map(Into::into);+ self+ }+}++impl RenderOnce for VendorIcon {+ fn render(+ self,+ _window: &mut Window,+ _cx: &mut App,+ ) -> impl IntoElement {+ let name = self.vendor.trim();+ let size = self.size;+ let base = div().w(px(size)).h(px(size)).flex_none().rounded_md().overflow_hidden();++ match self.icon_url {+ Some(url) => base.child(img(url).size_full()),+ None => {+ let initial = name+ .chars()+ .find(|c| c.is_alphanumeric())+ .map(|c| c.to_ascii_uppercase().to_string())+ .unwrap_or_else(|| "?".to_string());+ base.bg(hsla(vendor_hue(name), 0.5, 0.45, 1.0))+ .flex()+ .items_center()+ .justify_center()+ .text_color(white())+ .text_size(px(size * 0.5))+ .font_weight(FontWeight::SEMIBOLD)+ .child(initial)+ },+ }+ }+}++fn vendor_hue(name: &str) -> f32 {+ let mut h: u32 = 2166136261;+ for b in name.to_lowercase().bytes() {+ h ^= b as u32;+ h = h.wrapping_mul(16777619);+ }+ (h % 360) as f32 / 360.0+}diff --git a/apps/mirai/ui-kit/src/lib.rs b/apps/mirai/ui-kit/src/lib.rsnew file mode 100644index 000000000..021954f5a--- /dev/null+++ b/apps/mirai/ui-kit/src/lib.rs@@ -0,0 +1,3 @@+pub mod components;+pub mod theme;+pub mod tokens;diff --git a/apps/mirai/ui-kit/src/theme.rs b/apps/mirai/ui-kit/src/theme.rsnew file mode 100644index 000000000..a20a4892e--- /dev/null+++ b/apps/mirai/ui-kit/src/theme.rs@@ -0,0 +1,134 @@+use std::{borrow::Cow, sync::Arc};++use gpui::{App, Context, Global, Hsla, Subscription, rgb, rgba};++pub const FONT_SANS: &str = "Inter Variable";+pub const FONT_MONO: &str = "Geist Mono";++pub const TEXT_SIZE: f32 = 14.0;++pub use crate::tokens::layout;++#[inline]+fn hex(c: u32) -> Hsla {+ rgb(c).into()+}++#[inline]+fn hexa(c: u32) -> Hsla {+ rgba(c).into()+}++#[derive(Clone)]+pub struct Theme {+ pub dark: bool,++ pub bg: Hsla,+ pub bg_sidebar: Hsla,+ pub bg_hover: Hsla,+ pub bg_sub: Hsla,+ pub bg_sub_hover: Hsla,+ pub card: Hsla,++ pub text: Hsla,+ pub text_muted: Hsla,+ pub text_inverse: Hsla,++ pub border: Hsla,+ pub button_border: Hsla,+ pub button_border_hover: Hsla,++ pub accent: Hsla,+ pub success: Hsla,+ pub error: Hsla,+ pub info: Hsla,+}++impl Theme {+ pub fn dark() -> Self {+ Self {+ dark: true,+ bg: hex(0x0B0B0B),+ bg_sidebar: hex(0x080808),+ bg_hover: hex(0x191919),+ bg_sub: hex(0x222222),+ bg_sub_hover: hex(0x313131),+ card: hex(0x0F0F0F),+ text: hex(0xEEEEEE),+ text_muted: hex(0x7B7B7B),+ text_inverse: hex(0x0F0F0F),+ border: hexa(0xFFFFFF12),+ button_border: hexa(0xFFFFFF26),+ button_border_hover: hexa(0xFFFFFF38),+ accent: hex(0xFF6A20),+ success: hex(0x00C758),+ error: hex(0xFB2C36),+ info: hex(0x3080FF),+ }+ }++ pub fn light() -> Self {+ Self {+ dark: false,+ bg: hex(0xFCFCFC),+ bg_sidebar: hex(0xF5F5F5),+ bg_hover: hex(0xF0F0F0),+ bg_sub: hex(0xF0F0F0),+ bg_sub_hover: hex(0xE8E8E8),+ card: hex(0xFFFFFF),+ text: hex(0x202020),+ text_muted: hex(0x838383),+ text_inverse: hex(0xFFFFFF),+ border: hexa(0x0000001A),+ button_border: hexa(0x00000026),+ button_border_hover: hexa(0x00000038),+ accent: hex(0xFF6A20),+ success: hex(0x00C758),+ error: hex(0xFB2C36),+ info: hex(0x3080FF),+ }+ }+}++struct GlobalTheme(Arc<Theme>);++impl Global for GlobalTheme {}++pub trait ActiveTheme {+ fn theme(&self) -> &Arc<Theme>;+}++impl ActiveTheme for App {+ fn theme(&self) -> &Arc<Theme> {+ &self.global::<GlobalTheme>().0+ }+}++pub fn init(cx: &mut App) {+ register_fonts(cx);+ cx.set_global(GlobalTheme(Arc::new(Theme::dark())));+}++pub fn set_theme(+ cx: &mut App,+ theme: Theme,+) {+ cx.set_global(GlobalTheme(Arc::new(theme)));+}++pub fn observe_theme<V: 'static>(+ cx: &mut Context<V>,+ mut on_change: impl FnMut(&mut V, &mut Context<V>) + 'static,+) -> Subscription {+ cx.observe_global::<GlobalTheme>(move |this, cx| on_change(this, cx))+}++fn register_fonts(cx: &mut App) {+ let fonts: Vec<Cow<'static, [u8]>> = vec![+ Cow::Borrowed(include_bytes!("../assets/fonts/InterVariable.ttf").as_slice()),+ Cow::Borrowed(include_bytes!("../assets/fonts/GeistMono.ttf").as_slice()),+ ];+ if let Err(err) = cx.text_system().add_fonts(fonts) {+ eprintln!("[mirai-app] failed to register bundled fonts: {err}");+ }+}diff --git a/apps/mirai/ui-kit/src/tokens.rs b/apps/mirai/ui-kit/src/tokens.rsnew file mode 100644index 000000000..e2f75f141--- /dev/null+++ b/apps/mirai/ui-kit/src/tokens.rs@@ -0,0 +1,36 @@+use gpui::{Pixels, px};++pub mod font {+ use super::*;+ pub const CAPTION: Pixels = px(11.0);+ pub const SMALL: Pixels = px(12.0);+ pub const COMPACT: Pixels = px(13.0);+ pub const BODY: Pixels = px(14.0);+ pub const LABEL: Pixels = px(16.0);+ pub const H3: Pixels = px(18.0);+ pub const H2: Pixels = px(20.0);+ pub const HEADING: Pixels = px(22.0);+ pub const H1: Pixels = px(24.0);+ pub const DISPLAY: Pixels = px(32.0);+}++pub mod icon {+ pub const XS: f32 = 12.0;+ pub const SM: f32 = 14.0;+ pub const MD: f32 = 16.0;+ pub const LG: f32 = 18.0;+ pub const XL: f32 = 20.0;+ pub const XXL: f32 = 22.0;+ pub const HERO: f32 = 64.0;+}++pub mod radius {+ use super::*;+ pub const SM: Pixels = px(4.0);+}++pub mod layout {+ pub const SIDEBAR_WIDTH: f32 = 200.0;+ pub const FOOTER_HEIGHT: f32 = 24.0;+ pub const CONTENT_MAX_WIDTH: f32 = 800.0;+}diff --git a/crates/uzu/src/engine/mod.rs b/crates/uzu/src/engine/mod.rsindex b0662de98..697054462 100644--- a/crates/uzu/src/engine/mod.rs+++ b/crates/uzu/src/engine/mod.rs@@ -4,7 +4,14 @@ mod download_manager;mod downloader;mod error;-use std::{collections::HashMap, sync::Arc, time::Duration};+use std::{+ collections::HashMap,+ sync::{+ Arc,+ atomic::{AtomicBool, Ordering},+ },+ time::Duration,+};use backend_remote::openai::Backend as OpenAIBackend;use backend_uzu::bridge::UzuLlmBackend;@@ -57,6 +64,10 @@ pub struct Engine {backends: SharedAccess<HashMap<String, Arc<dyn Backend>>>,callback: SharedAccess<Option<Arc<EngineCallback>>>,telemetry: SharedAccess<Telemetry>,+ /// Whether anonymous usage telemetry may be reported. Defaults to `true`;+ /// consumers (e.g. an app with a privacy toggle) flip it via+ /// `set_usage_reporting`.+ report_usage: Arc<AtomicBool>,}impl Engine {@@ -111,6 +122,7 @@ impl Engine {backends: SharedAccess::new(HashMap::new()),callback: SharedAccess::new(None),telemetry,+ report_usage: Arc::new(AtomicBool::new(true)),};engine.spawn_storage_listener().await;@@ -184,10 +196,7 @@ impl Engine {openai_configs.push(OpenAIConfig::openrouter(openrouter_api_key));}for config in openai_configs {- let registry = OpenAIRegistry::new(config.clone())?;- let backend = OpenAIBackend::new(config.into()).map_err(|_| EngineError::UnableToCreateBackend {})?;- engine.add_registry(Box::new(registry)).await?;- engine.add_backend(Arc::new(backend) as Arc<dyn Backend>).await;+ engine.connect_openai(config).await?;}Ok(engine)@@ -230,6 +239,34 @@ impl Engine {) {self.backends.lock().await.insert(backend.identifier(), backend);}++ /// Register (or replace) an OpenAI-compatible provider's registry *and*+ /// execution backend in one step, so a model connected at runtime is+ /// immediately usable — `add_registry` alone leaves `chat` failing with+ /// `BackendNotFound` until restart. Mirrors the provider setup `Engine::new`+ /// does at startup. The registry and backend are constructed *before* any+ /// existing provider is dropped, so an invalid config leaves it untouched.+ pub async fn connect_openai(+ &self,+ config: OpenAIConfig,+ ) -> Result<(), EngineError> {+ let registry = OpenAIRegistry::new(config.clone())?;+ let backend = OpenAIBackend::new(config.into()).map_err(|_| EngineError::UnableToCreateBackend {})?;+ let identifier = registry.indentifier();+ self.registry.lock().await.remove(&identifier)?;+ self.add_registry(Box::new(registry)).await?;+ self.add_backend(Arc::new(backend) as Arc<dyn Backend>).await;+ Ok(())+ }++ /// Enable or disable anonymous usage telemetry at runtime (e.g. from a+ /// privacy toggle). Affects download-event reporting; defaults to enabled.+ pub fn set_usage_reporting(+ &self,+ enabled: bool,+ ) {+ self.report_usage.store(enabled, Ordering::Relaxed);+ }}#[bindings::export(Implementation)]@@ -565,6 +602,7 @@ impl Engine {let mut stream = self.storage_subscribe().await;let callback = self.callback.clone();let telemetry = self.telemetry.lock().await.clone();+ let report_usage = self.report_usage.clone();tokio::spawn(async move {let mut last_phase: HashMap<String, DownloadPhase> = HashMap::new();while let Some(update) = stream.next().await {@@ -585,7 +623,9 @@ impl Engine {},_ => None,};- if let Some(event) = event {+ if let Some(event) = event+ && report_usage.load(Ordering::Relaxed)+ {telemetry.report(event);}if let Some(callback) = callback.lock().await.as_ref().cloned() {diff --git a/crates/uzu/src/player/mod.rs b/crates/uzu/src/player/mod.rsindex 7894f1174..9fdad2a95 100644--- a/crates/uzu/src/player/mod.rs+++ b/crates/uzu/src/player/mod.rs@@ -29,6 +29,12 @@ impl Player {}),})}++ /// True once the queue has drained — all appended audio has finished+ /// playing. Callers poll this since rodio offers no completion callback.+ pub fn is_finished(&self) -> bool {+ self.context.player.empty()+ }}#[bindings::export(Implementation)]