diff --git a/Cargo.lock b/Cargo.lock
index 36164c7..66118fc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -286,9 +286,9 @@ dependencies = [
[[package]]
name = "async-compression"
-version = "0.4.39"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68650b7df54f0293fd061972a0fb05aaf4fc0879d3b3d21a638a182c5c543b9f"
+checksum = "7d67d43201f4d20c78bcda740c142ca52482d81da80681533d33bf3f0596c8e2"
dependencies = [
"compression-codecs",
"compression-core",
@@ -298,9 +298,9 @@ dependencies = [
[[package]]
name = "async-executor"
-version = "1.13.3"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8"
+checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
dependencies = [
"async-task",
"concurrent-queue",
@@ -605,9 +605,9 @@ dependencies = [
[[package]]
name = "aws-lc-rs"
-version = "1.15.4"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256"
+checksum = "d9a7b350e3bb1767102698302bc37256cbd48422809984b98d292c40e2579aa9"
dependencies = [
"aws-lc-sys",
"zeroize",
@@ -812,9 +812,9 @@ checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64"
[[package]]
name = "bumpalo"
-version = "3.19.1"
+version = "3.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
+checksum = "5c6f81257d10a0f602a294ae4182251151ff97dbb504ef9afcdda4a64b24d9b4"
[[package]]
name = "bytemuck"
@@ -1009,10 +1009,9 @@ dependencies = [
"chat",
"common",
"dock",
- "emojis",
+ "flume",
"gpui",
"gpui_tokio",
- "indexset",
"itertools 0.13.0",
"log",
"nostr-sdk",
@@ -1073,9 +1072,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.58"
+version = "4.5.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806"
+checksum = "c5caf74d17c3aec5495110c34cc3f78644bfa89af6c8993ed4de2790e49b6499"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1083,9 +1082,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.58"
+version = "4.5.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2"
+checksum = "370daa45065b80218950227371916a1633217ae42b2715b2287b606dcd618e24"
dependencies = [
"anstream",
"anstyle",
@@ -1194,7 +1193,7 @@ dependencies = [
[[package]]
name = "collections"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"indexmap",
"rustc-hash 2.1.1",
@@ -1253,9 +1252,9 @@ dependencies = [
[[package]]
name = "compression-codecs"
-version = "0.4.36"
+version = "0.4.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a"
+checksum = "eb7b51a7d9c967fc26773061ba86150f19c50c0d65c887cb1fbe295fd16619b7"
dependencies = [
"compression-core",
"deflate64",
@@ -1498,9 +1497,9 @@ dependencies = [
[[package]]
name = "cosmic-text"
-version = "0.17.1"
+version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c5c9868e64aa6c5410629a83450e142c80e721c727a5bc0fb18107af6c2d66b"
+checksum = "5d8c4e3a1d02f5269ed15c2d70b4647167856f66f228dcdf99050ab77bbb5a56"
dependencies = [
"bitflags 2.11.0",
"fontdb",
@@ -1639,7 +1638,7 @@ dependencies = [
[[package]]
name = "derive_refineable"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"proc-macro2",
"quote",
@@ -1848,15 +1847,6 @@ dependencies = [
"winreg",
]
-[[package]]
-name = "emojis"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99e1f1df1f181f2539bac8bf027d31ca5ffbf9e559e3f2d09413b9107b5c02f4"
-dependencies = [
- "phf",
-]
-
[[package]]
name = "encoding_rs"
version = "0.8.35"
@@ -2194,7 +2184,7 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"
dependencies = [
"fontconfig-parser",
"log",
- "memmap2 0.9.9",
+ "memmap2 0.9.10",
"slotmap",
"tinyvec",
"ttf-parser",
@@ -2299,9 +2289,9 @@ dependencies = [
[[package]]
name = "futures"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
+checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
dependencies = [
"futures-channel",
"futures-core",
@@ -2314,9 +2304,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
dependencies = [
"futures-core",
"futures-sink",
@@ -2324,15 +2314,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
[[package]]
name = "futures-executor"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
+checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
dependencies = [
"futures-core",
"futures-task",
@@ -2341,9 +2331,9 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
[[package]]
name = "futures-lite"
@@ -2375,9 +2365,9 @@ dependencies = [
[[package]]
name = "futures-macro"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
dependencies = [
"proc-macro2",
"quote",
@@ -2386,21 +2376,21 @@ dependencies = [
[[package]]
name = "futures-sink"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
[[package]]
name = "futures-task"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
[[package]]
name = "futures-util"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
dependencies = [
"futures-channel",
"futures-core",
@@ -2410,7 +2400,6 @@ dependencies = [
"futures-task",
"memchr",
"pin-project-lite",
- "pin-utils",
"slab",
]
@@ -2599,7 +2588,7 @@ dependencies = [
[[package]]
name = "gpui"
version = "0.2.2"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
@@ -2699,7 +2688,7 @@ dependencies = [
[[package]]
name = "gpui_macros"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -2710,7 +2699,7 @@ dependencies = [
[[package]]
name = "gpui_tokio"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"gpui",
@@ -2939,7 +2928,7 @@ dependencies = [
[[package]]
name = "http_client"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"async-compression",
@@ -2964,7 +2953,7 @@ dependencies = [
[[package]]
name = "http_client_tls"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"rustls",
"rustls-platform-verifier",
@@ -3202,7 +3191,7 @@ dependencies = [
"image-webp",
"moxcms",
"num-traits",
- "png 0.18.0",
+ "png 0.18.1",
"qoi",
"ravif",
"rayon",
@@ -3722,6 +3711,15 @@ 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 = "maybe-rayon"
version = "0.1.1"
@@ -3745,7 +3743,7 @@ dependencies = [
[[package]]
name = "media"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"bindgen",
@@ -3774,9 +3772,9 @@ dependencies = [
[[package]]
name = "memmap2"
-version = "0.9.9"
+version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490"
+checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
dependencies = [
"libc",
]
@@ -3910,9 +3908,9 @@ dependencies = [
[[package]]
name = "native-tls"
-version = "0.2.16"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d5d26952a508f321b4d3d2e80e78fc2603eaefcdf0c30783867f19586518bdc"
+checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
dependencies = [
"libc",
"log",
@@ -4004,7 +4002,7 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
[[package]]
name = "nostr"
version = "0.44.1"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"aes",
"base64",
@@ -4029,7 +4027,7 @@ dependencies = [
[[package]]
name = "nostr-connect"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"async-utility",
"futures-core",
@@ -4042,7 +4040,7 @@ dependencies = [
[[package]]
name = "nostr-database"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"btreecap",
"flatbuffers",
@@ -4054,7 +4052,7 @@ dependencies = [
[[package]]
name = "nostr-gossip"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"nostr",
]
@@ -4062,7 +4060,7 @@ dependencies = [
[[package]]
name = "nostr-gossip-memory"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"indexmap",
"lru",
@@ -4074,7 +4072,7 @@ dependencies = [
[[package]]
name = "nostr-lmdb"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"async-utility",
"flume",
@@ -4088,7 +4086,7 @@ dependencies = [
[[package]]
name = "nostr-sdk"
version = "0.44.1"
-source = "git+https://github.com/rust-nostr/nostr#8410867ef02376a5bd7c7ec3f2af46a1c276a2f4"
+source = "git+https://github.com/rust-nostr/nostr#bd92fd901e8b64856ad4f8373fbb87376314161c"
dependencies = [
"async-utility",
"async-wsocket",
@@ -4562,7 +4560,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "perf"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"collections",
"serde",
@@ -4711,9 +4709,9 @@ dependencies = [
[[package]]
name = "png"
-version = "0.18.0"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0"
+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
dependencies = [
"bitflags 2.11.0",
"crc32fast",
@@ -5238,7 +5236,7 @@ dependencies = [
[[package]]
name = "refineable"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"derive_refineable",
]
@@ -5343,7 +5341,7 @@ dependencies = [
[[package]]
name = "reqwest_client"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"bytes",
@@ -5398,7 +5396,7 @@ dependencies = [
[[package]]
name = "rope"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"arrayvec",
"log",
@@ -5660,7 +5658,7 @@ dependencies = [
[[package]]
name = "scheduler"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"async-task",
"backtrace",
@@ -6241,7 +6239,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "sum_tree"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"arrayvec",
"log",
@@ -6357,9 +6355,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.115"
+version = "2.0.116"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
+checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb"
dependencies = [
"proc-macro2",
"quote",
@@ -6837,9 +6835,9 @@ dependencies = [
[[package]]
name = "toml_parser"
-version = "1.0.8+spec-1.1.0"
+version = "1.0.9+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0742ff5ff03ea7e67c8ae6c93cac239e0d9784833362da3f9a9c1da8dfefcbdc"
+checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
dependencies = [
"winnow",
]
@@ -6951,10 +6949,14 @@ version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
dependencies = [
+ "matchers",
"nu-ansi-term",
+ "once_cell",
+ "regex-automata",
"sharded-slab",
"smallvec",
"thread_local",
+ "tracing",
"tracing-core",
"tracing-log",
]
@@ -7065,9 +7067,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
[[package]]
name = "unicode-ident"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "unicode-linebreak"
@@ -7197,7 +7199,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "util"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"async-fs",
@@ -7235,7 +7237,7 @@ dependencies = [
[[package]]
name = "util_macros"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"perf",
"quote",
@@ -8704,7 +8706,7 @@ checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9"
dependencies = [
"as-raw-xcb-connection",
"libc",
- "memmap2 0.9.9",
+ "memmap2 0.9.10",
"xkeysym",
]
@@ -9043,7 +9045,7 @@ dependencies = [
[[package]]
name = "zlog"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"anyhow",
"chrono",
@@ -9060,7 +9062,7 @@ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
[[package]]
name = "ztracing"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
dependencies = [
"tracing",
"tracing-subscriber",
@@ -9071,7 +9073,7 @@ dependencies = [
[[package]]
name = "ztracing_macro"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#b90a370c864a76dc53bc19b650a2a07fbb36b043"
+source = "git+https://github.com/zed-industries/zed#f07cec59def58dd8199bdced27b1aafbeb5755d8"
[[package]]
name = "zune-core"
diff --git a/assets/icons/paper-plane-fill.svg b/assets/icons/paper-plane-fill.svg
new file mode 100644
index 0000000..8231630
--- /dev/null
+++ b/assets/icons/paper-plane-fill.svg
@@ -0,0 +1,3 @@
+
diff --git a/crates/auto_update/src/lib.rs b/crates/auto_update/src/lib.rs
index f680a0a..3bb10a6 100644
--- a/crates/auto_update/src/lib.rs
+++ b/crates/auto_update/src/lib.rs
@@ -231,13 +231,13 @@ impl AutoUpdater {
fn subscribe_to_updates(cx: &App) -> Task<()> {
let nostr = NostrRegistry::global(cx);
- let client = nostr.read(cx).client();
+ let _client = nostr.read(cx).client();
cx.background_spawn(async move {
- let opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE);
+ let _opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE);
let app_pubkey = PublicKey::parse(APP_PUBKEY).unwrap();
- let filter = Filter::new()
+ let _filter = Filter::new()
.kind(Kind::ReleaseArtifactSet)
.author(app_pubkey)
.limit(1);
@@ -253,7 +253,7 @@ impl AutoUpdater {
});
cx.background_spawn(async move {
- let opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE);
+ let _opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE);
let app_pubkey = PublicKey::parse(APP_PUBKEY).unwrap();
let filter = Filter::new()
@@ -274,7 +274,7 @@ impl AutoUpdater {
// Get all file metadata event ids
let ids: Vec = event.tags.event_ids().copied().collect();
- let filter = Filter::new()
+ let _filter = Filter::new()
.kind(Kind::FileMetadata)
.author(app_pubkey)
.ids(ids.clone());
diff --git a/crates/chat/src/lib.rs b/crates/chat/src/lib.rs
index 43b6448..ab4b494 100644
--- a/crates/chat/src/lib.rs
+++ b/crates/chat/src/lib.rs
@@ -7,16 +7,14 @@ use std::time::Duration;
use anyhow::{anyhow, Context as AnyhowContext, Error};
use common::EventUtils;
-use device::DeviceRegistry;
-use flume::Sender;
use fuzzy_matcher::skim::SkimMatcherV2;
use fuzzy_matcher::FuzzyMatcher;
use gpui::{
- App, AppContext, Context, Entity, EventEmitter, Global, Subscription, Task, WeakEntity,
+ App, AppContext, Context, Entity, EventEmitter, Global, Subscription, Task, WeakEntity, Window,
};
use nostr_sdk::prelude::*;
use smallvec::{smallvec, SmallVec};
-use state::{tracker, NostrRegistry, RelayState, DEVICE_GIFTWRAP, USER_GIFTWRAP};
+use state::{NostrRegistry, DEVICE_GIFTWRAP, USER_GIFTWRAP};
mod message;
mod room;
@@ -24,8 +22,8 @@ mod room;
pub use message::*;
pub use room::*;
-pub fn init(cx: &mut App) {
- ChatRegistry::set_global(cx.new(ChatRegistry::new), cx);
+pub fn init(window: &mut Window, cx: &mut App) {
+ ChatRegistry::set_global(cx.new(|cx| ChatRegistry::new(window, cx)), cx);
}
struct GlobalChatRegistry(Entity);
@@ -45,11 +43,9 @@ pub enum ChatEvent {
/// Channel signal.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
-enum NostrEvent {
+enum Signal {
/// Message received from relay pool
Message(NewMessage),
- /// Unwrapping status
- Unwrapping(bool),
/// Eose received from relay pool
Eose,
}
@@ -60,23 +56,11 @@ pub struct ChatRegistry {
/// Collection of all chat rooms
rooms: Vec>,
- /// Loading status of the registry
- loading: bool,
-
- /// Channel's sender for communication between nostr and gpui
- sender: Sender,
-
/// Tracking the status of unwrapping gift wrap events.
tracking_flag: Arc,
- /// Handle tracking asynchronous task
- tracking: Option>>,
-
- /// Handle notifications asynchronous task
- notifications: Option>,
-
- /// Tasks for asynchronous operations
- tasks: Vec>,
+ /// Async tasks
+ tasks: SmallVec<[Task>; 2]>,
/// Subscriptions
_subscriptions: SmallVec<[Subscription; 1]>,
@@ -96,82 +80,38 @@ impl ChatRegistry {
}
/// Create a new chat registry instance
- fn new(cx: &mut Context) -> Self {
+ fn new(window: &mut Window, cx: &mut Context) -> Self {
let nostr = NostrRegistry::global(cx);
- let nip17_state = nostr.read(cx).nip17_state();
+ let nip65 = nostr.read(cx).nip65_state();
+ let nip17 = nostr.read(cx).nip17_state();
- let device = DeviceRegistry::global(cx);
- let device_signer = device.read(cx).device_signer.clone();
-
- // A flag to indicate if the registry is loading
- let tracking_flag = Arc::new(AtomicBool::new(false));
-
- // Channel for communication between nostr and gpui
- let (tx, rx) = flume::bounded::(2048);
-
- let mut tasks = vec![];
let mut subscriptions = smallvec![];
subscriptions.push(
- // Observe the identity
- cx.observe(&nip17_state, |this, state, cx| {
- if state.read(cx) == &RelayState::Configured {
- // Handle nostr notifications
- this.handle_notifications(cx);
- // Track unwrapping progress
- this.tracking(cx);
+ // Observe the nip65 state and load chat rooms on every state change
+ cx.observe(&nip65, |this, state, cx| {
+ if state.read(cx).idle() {
+ this.reset(cx);
}
- // Get chat rooms from the database on every identity change
+ }),
+ );
+
+ subscriptions.push(
+ // Observe the nip17 state and load chat rooms on every state change
+ cx.observe(&nip17, |this, _state, cx| {
this.get_rooms(cx);
}),
);
- subscriptions.push(
- // Observe the device signer state
- cx.observe(&device_signer, |this, state, cx| {
- if state.read(cx).is_some() {
- this.handle_notifications(cx);
- }
- }),
- );
-
- tasks.push(
- // Update GPUI states
- cx.spawn(async move |this, cx| {
- while let Ok(message) = rx.recv_async().await {
- match message {
- NostrEvent::Message(message) => {
- this.update(cx, |this, cx| {
- this.new_message(message, cx);
- })
- .ok();
- }
- NostrEvent::Unwrapping(status) => {
- this.update(cx, |this, cx| {
- this.set_loading(status, cx);
- this.get_rooms(cx);
- })
- .ok();
- }
- NostrEvent::Eose => {
- this.update(cx, |this, cx| {
- this.get_rooms(cx);
- })
- .ok();
- }
- };
- }
- }),
- );
+ cx.defer_in(window, |this, _window, cx| {
+ this.handle_notifications(cx);
+ this.tracking(cx);
+ });
Self {
rooms: vec![],
- loading: false,
- sender: tx.clone(),
- tracking_flag,
- tracking: None,
- notifications: None,
- tasks,
+ tracking_flag: Arc::new(AtomicBool::new(false)),
+ tasks: smallvec![],
_subscriptions: subscriptions,
}
}
@@ -180,18 +120,18 @@ impl ChatRegistry {
fn handle_notifications(&mut self, cx: &mut Context) {
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
-
- let device = DeviceRegistry::global(cx);
- let device_signer = device.read(cx).signer(cx);
-
+ let signer = nostr.read(cx).signer();
let status = self.tracking_flag.clone();
- let tx = self.sender.clone();
- self.notifications = Some(cx.background_spawn(async move {
- let initialized_at = Timestamp::now();
- let sub_id1 = SubscriptionId::new(DEVICE_GIFTWRAP);
- let sub_id2 = SubscriptionId::new(USER_GIFTWRAP);
+ let initialized_at = Timestamp::now();
+ let sub_id1 = SubscriptionId::new(DEVICE_GIFTWRAP);
+ let sub_id2 = SubscriptionId::new(USER_GIFTWRAP);
+ // Channel for communication between nostr and gpui
+ let (tx, rx) = flume::bounded::(1024);
+
+ self.tasks.push(cx.background_spawn(async move {
+ let device_signer = signer.get_encryption_signer().await;
let mut notifications = client.notifications();
let mut processed_events = HashSet::new();
@@ -213,23 +153,16 @@ impl ChatRegistry {
continue;
}
+ log::info!("Received gift wrap event: {:?}", event);
+
// Extract the rumor from the gift wrap event
match Self::extract_rumor(&client, &device_signer, event.as_ref()).await {
Ok(rumor) => match rumor.created_at >= initialized_at {
true => {
- // Check if the event is sent by coop
- let sent_by_coop = {
- let tracker = tracker().read().await;
- tracker.is_sent_by_coop(&event.id)
- };
- // No need to emit if sent by coop
- // the event is already emitted
- if !sent_by_coop {
- let new_message = NewMessage::new(event.id, rumor);
- let signal = NostrEvent::Message(new_message);
+ let new_message = NewMessage::new(event.id, rumor);
+ let signal = Signal::Message(new_message);
- tx.send_async(signal).await.ok();
- }
+ tx.send_async(signal).await?;
}
false => {
status.store(true, Ordering::Release);
@@ -242,29 +175,46 @@ impl ChatRegistry {
}
RelayMessage::EndOfStoredEvents(id) => {
if id.as_ref() == &sub_id1 || id.as_ref() == &sub_id2 {
- tx.send_async(NostrEvent::Eose).await.ok();
+ tx.send_async(Signal::Eose).await?;
}
}
_ => {}
}
}
+
+ Ok(())
+ }));
+
+ self.tasks.push(cx.spawn(async move |this, cx| {
+ while let Ok(message) = rx.recv_async().await {
+ match message {
+ Signal::Message(message) => {
+ this.update(cx, |this, cx| {
+ this.new_message(message, cx);
+ })?;
+ }
+ Signal::Eose => {
+ this.update(cx, |this, cx| {
+ this.get_rooms(cx);
+ })?;
+ }
+ };
+ }
+
+ Ok(())
}));
}
/// Tracking the status of unwrapping gift wrap events.
fn tracking(&mut self, cx: &mut Context) {
let status = self.tracking_flag.clone();
- let tx = self.sender.clone();
- self.tracking = Some(cx.background_spawn(async move {
- let loop_duration = Duration::from_secs(12);
+ self.tasks.push(cx.background_spawn(async move {
+ let loop_duration = Duration::from_secs(10);
loop {
if status.load(Ordering::Acquire) {
_ = status.compare_exchange(true, false, Ordering::Release, Ordering::Relaxed);
- tx.send_async(NostrEvent::Unwrapping(true)).await.ok();
- } else {
- tx.send_async(NostrEvent::Unwrapping(false)).await.ok();
}
smol::Timer::after(loop_duration).await;
}
@@ -273,13 +223,7 @@ impl ChatRegistry {
/// Get the loading status of the chat registry
pub fn loading(&self) -> bool {
- self.loading
- }
-
- /// Set the loading status of the chat registry
- pub fn set_loading(&mut self, loading: bool, cx: &mut Context) {
- self.loading = loading;
- cx.notify();
+ self.tracking_flag.load(Ordering::Acquire)
}
/// Get a weak reference to a room by its ID.
@@ -315,19 +259,19 @@ impl ChatRegistry {
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
- self.tasks.push(cx.spawn(async move |this, cx| {
- if let Some(signer) = client.signer() {
- if let Ok(public_key) = signer.get_public_key().await {
- this.update(cx, |this, cx| {
- this.rooms
- .insert(0, cx.new(|_| room.into().organize(&public_key)));
- cx.emit(ChatEvent::Ping);
- cx.notify();
- })
- .ok();
- }
- }
- }));
+ cx.spawn(async move |this, cx| {
+ let signer = client.signer()?;
+ let public_key = signer.get_public_key().await.ok()?;
+ let room: Room = room.into().organize(&public_key);
+
+ this.update(cx, |this, cx| {
+ this.rooms.insert(0, cx.new(|_| room));
+ cx.emit(ChatEvent::Ping);
+ cx.notify();
+ })
+ .ok()
+ })
+ .detach();
}
/// Emit an open room event.
@@ -420,20 +364,16 @@ impl ChatRegistry {
pub fn get_rooms(&mut self, cx: &mut Context) {
let task = self.get_rooms_from_database(cx);
- self.tasks.push(cx.spawn(async move |this, cx| {
- match task.await {
- Ok(rooms) => {
- this.update(cx, move |this, cx| {
- this.extend_rooms(rooms, cx);
- this.sort(cx);
- })
- .ok();
- }
- Err(e) => {
- log::error!("Failed to load rooms: {e}")
- }
- };
- }));
+ cx.spawn(async move |this, cx| {
+ let rooms = task.await.ok()?;
+
+ this.update(cx, move |this, cx| {
+ this.extend_rooms(rooms, cx);
+ this.sort(cx);
+ })
+ .ok()
+ })
+ .detach();
}
/// Create a task to load rooms from the database
diff --git a/crates/chat/src/message.rs b/crates/chat/src/message.rs
index 5ec33a7..6118331 100644
--- a/crates/chat/src/message.rs
+++ b/crates/chat/src/message.rs
@@ -6,8 +6,8 @@ use nostr_sdk::prelude::*;
/// New message.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct NewMessage {
- pub gift_wrap: EventId,
pub room: u64,
+ pub gift_wrap: EventId,
pub rumor: UnsignedEvent,
}
@@ -16,8 +16,8 @@ impl NewMessage {
let room = rumor.uniq_id();
Self {
- gift_wrap,
room,
+ gift_wrap,
rumor,
}
}
diff --git a/crates/chat/src/room.rs b/crates/chat/src/room.rs
index a09cfea..029debd 100644
--- a/crates/chat/src/room.rs
+++ b/crates/chat/src/room.rs
@@ -1,5 +1,4 @@
use std::cmp::Ordering;
-use std::collections::{HashMap, HashSet};
use std::hash::{Hash, Hasher};
use std::time::Duration;
@@ -9,73 +8,59 @@ use gpui::{App, AppContext, Context, EventEmitter, SharedString, Task};
use itertools::Itertools;
use nostr_sdk::prelude::*;
use person::{Person, PersonRegistry};
-use state::{tracker, NostrRegistry};
+use settings::{RoomConfig, SignerKind};
+use state::{NostrRegistry, TIMEOUT};
use crate::{ChatRegistry, NewMessage};
-const SEND_RETRY: usize = 10;
-
#[derive(Debug, Clone)]
pub struct SendReport {
pub receiver: PublicKey,
- pub status: Option