chore: restructure and refine the ui (#199)

* update deps

* clean up

* add account crate

* add person crate

* add chat and chat ui crates

* .

* clean up the ui crate

* .

* .
This commit is contained in:
reya
2025-11-01 09:16:02 +07:00
committed by GitHub
parent a1bd4954eb
commit 7091fa1cab
42 changed files with 980 additions and 794 deletions

231
Cargo.lock generated
View File

@@ -2,6 +2,20 @@
# It is not intended for manual editing.
version = 4
[[package]]
name = "account"
version = "0.2.11"
dependencies = [
"anyhow",
"gpui",
"log",
"nostr",
"nostr-sdk",
"smallvec",
"smol",
"states",
]
[[package]]
name = "adler2"
version = "2.0.1"
@@ -596,7 +610,7 @@ dependencies = [
"bitflags 2.10.0",
"cexpr",
"clang-sys",
"itertools 0.11.0",
"itertools 0.13.0",
"log",
"prettyplease",
"proc-macro2",
@@ -616,7 +630,7 @@ dependencies = [
"bitflags 2.10.0",
"cexpr",
"clang-sys",
"itertools 0.11.0",
"itertools 0.13.0",
"log",
"prettyplease",
"proc-macro2",
@@ -968,9 +982,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.43"
version = "1.2.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2"
checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -1048,6 +1062,59 @@ dependencies = [
"zeroize",
]
[[package]]
name = "chat"
version = "0.2.11"
dependencies = [
"account",
"anyhow",
"common",
"futures",
"fuzzy-matcher",
"gpui",
"itertools 0.13.0",
"log",
"nostr",
"nostr-sdk",
"person",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
"states",
]
[[package]]
name = "chat_ui"
version = "0.2.11"
dependencies = [
"account",
"anyhow",
"chat",
"common",
"emojis",
"gpui",
"gpui_tokio",
"indexset",
"itertools 0.13.0",
"linkify",
"log",
"nostr",
"nostr-sdk",
"once_cell",
"person",
"regex",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
"states",
"theme",
"ui",
]
[[package]]
name = "chrono"
version = "0.4.42"
@@ -1166,7 +1233,7 @@ dependencies = [
[[package]]
name = "collections"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"indexmap",
"rustc-hash 2.1.1",
@@ -1276,9 +1343,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
name = "coop"
version = "0.2.11"
dependencies = [
"account",
"anyhow",
"assets",
"auto_update",
"chat",
"chat_ui",
"common",
"dirs 5.0.1",
"flume",
@@ -1294,7 +1364,7 @@ dependencies = [
"nostr-connect",
"nostr-sdk",
"oneshot",
"registry",
"person",
"reqwest_client",
"rust-i18n",
"serde",
@@ -1606,7 +1676,7 @@ dependencies = [
[[package]]
name = "derive_refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"proc-macro2",
"quote",
@@ -1873,7 +1943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.59.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -2503,13 +2573,14 @@ dependencies = [
[[package]]
name = "gpui"
version = "0.2.2"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
"ashpd 0.11.0",
"async-task",
"bindgen 0.71.1",
"bitflags 2.10.0",
"blade-graphics",
"blade-macros",
"blade-util",
@@ -2583,6 +2654,7 @@ dependencies = [
"wayland-cursor",
"wayland-protocols 0.31.2",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"windows 0.61.3",
"windows-core 0.61.2",
"windows-numerics",
@@ -2598,7 +2670,7 @@ dependencies = [
[[package]]
name = "gpui_macros"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -2609,7 +2681,7 @@ dependencies = [
[[package]]
name = "gpui_tokio"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"gpui",
@@ -2838,7 +2910,7 @@ dependencies = [
[[package]]
name = "http_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"async-compression",
@@ -2863,7 +2935,7 @@ dependencies = [
[[package]]
name = "http_client_tls"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"rustls",
"rustls-platform-verifier",
@@ -3091,9 +3163,9 @@ dependencies = [
[[package]]
name = "ignore"
version = "0.4.24"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81776e6f9464432afcc28d03e52eb101c93b6f0566f52aef2427663e700f0403"
checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a"
dependencies = [
"crossbeam-deque",
"globset",
@@ -3350,23 +3422,16 @@ name = "key_store"
version = "0.2.11"
dependencies = [
"anyhow",
"common",
"futures",
"gpui",
"i18n",
"itertools 0.13.0",
"log",
"nostr",
"nostr-sdk",
"rust-i18n",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
"states",
"theme",
"ui",
]
[[package]]
@@ -3676,7 +3741,7 @@ dependencies = [
[[package]]
name = "media"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"bindgen 0.71.1",
@@ -3932,7 +3997,7 @@ dependencies = [
[[package]]
name = "nostr"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"aes",
"base64",
@@ -3956,7 +4021,7 @@ dependencies = [
[[package]]
name = "nostr-connect"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"async-utility",
"nostr",
@@ -3968,7 +4033,7 @@ dependencies = [
[[package]]
name = "nostr-database"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"flatbuffers",
"lru",
@@ -3979,7 +4044,7 @@ dependencies = [
[[package]]
name = "nostr-gossip"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"nostr",
]
@@ -3987,7 +4052,7 @@ dependencies = [
[[package]]
name = "nostr-gossip-memory"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"indexmap",
"lru",
@@ -3999,7 +4064,7 @@ dependencies = [
[[package]]
name = "nostr-lmdb"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"async-utility",
"flume",
@@ -4013,7 +4078,7 @@ dependencies = [
[[package]]
name = "nostr-relay-pool"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"async-utility",
"async-wsocket",
@@ -4030,7 +4095,7 @@ dependencies = [
[[package]]
name = "nostr-sdk"
version = "0.43.0"
source = "git+https://github.com/rust-nostr/nostr#8927f6630c071d982f9aa79fb9cd6807ae554abe"
source = "git+https://github.com/rust-nostr/nostr#6befa6de8ab080a8153b7f8b788981d7be365ebf"
dependencies = [
"async-utility",
"nostr",
@@ -4056,7 +4121,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.59.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -4548,13 +4613,29 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "perf"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"collections",
"serde",
"serde_json",
]
[[package]]
name = "person"
version = "0.2.11"
dependencies = [
"anyhow",
"common",
"gpui",
"itertools 0.13.0",
"log",
"nostr",
"nostr-sdk",
"smallvec",
"smol",
"states",
]
[[package]]
name = "phf"
version = "0.11.3"
@@ -4932,7 +5013,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
"windows-sys 0.59.0",
"windows-sys 0.60.2",
]
[[package]]
@@ -5165,7 +5246,7 @@ dependencies = [
[[package]]
name = "refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"derive_refineable",
]
@@ -5199,27 +5280,6 @@ version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
[[package]]
name = "registry"
version = "0.2.11"
dependencies = [
"anyhow",
"common",
"futures",
"fuzzy-matcher",
"gpui",
"itertools 0.13.0",
"log",
"nostr",
"nostr-sdk",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
"states",
]
[[package]]
name = "reqwest"
version = "0.12.24"
@@ -5272,7 +5332,7 @@ dependencies = [
[[package]]
name = "reqwest_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"bytes",
@@ -5326,11 +5386,11 @@ dependencies = [
[[package]]
name = "rope"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"arrayvec",
"gpui",
"log",
"rayon",
"sum_tree",
"unicode-segmentation",
"util",
@@ -5485,7 +5545,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.11.0",
"windows-sys 0.59.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -5792,7 +5852,7 @@ checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33"
[[package]]
name = "semantic_version"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"serde",
@@ -6239,11 +6299,12 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "sum_tree"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"arrayvec",
"futures",
"itertools 0.14.0",
"log",
"rayon",
]
[[package]]
@@ -6516,7 +6577,7 @@ dependencies = [
"getrandom 0.3.4",
"once_cell",
"rustix 1.1.2",
"windows-sys 0.59.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -7088,20 +7149,13 @@ version = "0.2.11"
dependencies = [
"anyhow",
"common",
"emojis",
"gpui",
"i18n",
"image",
"itertools 0.13.0",
"linkify",
"log",
"lsp-types",
"nostr-sdk",
"once_cell",
"regex",
"registry",
"rope",
"rust-i18n",
"serde",
"serde_json",
"smallvec",
@@ -7150,9 +7204,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
[[package]]
name = "unicode-ident"
version = "1.0.20"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]
name = "unicode-linebreak"
@@ -7162,18 +7216,18 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
[[package]]
name = "unicode-normalization"
version = "0.1.24"
version = "0.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8"
dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-properties"
version = "0.1.3"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"
[[package]]
name = "unicode-script"
@@ -7275,7 +7329,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "util"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"anyhow",
"async-fs",
@@ -7310,7 +7364,7 @@ dependencies = [
[[package]]
name = "util_macros"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#8b051d6cc3c7c3bcda16702f30dc0fabe7b9f881"
source = "git+https://github.com/zed-industries/zed#ecbdffc84f1165323f256e8485ae84320550c759"
dependencies = [
"perf",
"quote",
@@ -7391,9 +7445,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version-compare"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"
[[package]]
name = "version_check"
@@ -7612,6 +7666,19 @@ dependencies = [
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-wlr"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec"
dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
"wayland-protocols 0.32.9",
"wayland-scanner",
]
[[package]]
name = "wayland-scanner"
version = "0.31.7"
@@ -7758,7 +7825,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.61.2",
]
[[package]]