diff --git a/.github/workflows/publish_collab_image.yml b/.github/workflows/publish_collab_image.yml
index 3421409287dfdf..b012e65841a1ab 100644
--- a/.github/workflows/publish_collab_image.yml
+++ b/.github/workflows/publish_collab_image.yml
@@ -11,7 +11,7 @@ env:
jobs:
publish:
- name: Publish collab server image
+ name: Publish collab server image
runs-on:
- self-hosted
- deploy
@@ -22,6 +22,9 @@ jobs:
- name: Sign into DigitalOcean docker registry
run: doctl registry login
+ - name: Prune Docker system
+ run: docker system prune
+
- name: Checkout repo
uses: actions/checkout@v3
with:
@@ -41,6 +44,6 @@ jobs:
- name: Build docker image
run: docker build . --tag registry.digitalocean.com/zed/collab:v${COLLAB_VERSION}
-
+
- name: Publish docker image
run: docker push registry.digitalocean.com/zed/collab:v${COLLAB_VERSION}
diff --git a/Cargo.lock b/Cargo.lock
index e27b5756aa9f19..f4bf4506e45f73 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -102,14 +102,20 @@ dependencies = [
"anyhow",
"chrono",
"collections",
+ "ctor",
"editor",
+ "env_logger 0.9.3",
"fs",
"futures 0.3.28",
"gpui",
+ "indoc",
"isahc",
"language",
+ "log",
"menu",
+ "ordered-float",
"project",
+ "rand 0.8.5",
"regex",
"schemars",
"search",
@@ -126,18 +132,17 @@ dependencies = [
[[package]]
name = "alacritty_config"
version = "0.1.2-dev"
-source = "git+https://github.com/alacritty/alacritty?rev=7b9f32300ee0a249c0872302c97635b460e45ba5#7b9f32300ee0a249c0872302c97635b460e45ba5"
+source = "git+https://github.com/zed-industries/alacritty?rev=33306142195b354ef3485ca2b1d8a85dfc6605ca#33306142195b354ef3485ca2b1d8a85dfc6605ca"
dependencies = [
"log",
"serde",
"toml 0.7.6",
- "winit",
]
[[package]]
name = "alacritty_config_derive"
version = "0.2.2-dev"
-source = "git+https://github.com/alacritty/alacritty?rev=7b9f32300ee0a249c0872302c97635b460e45ba5#7b9f32300ee0a249c0872302c97635b460e45ba5"
+source = "git+https://github.com/zed-industries/alacritty?rev=33306142195b354ef3485ca2b1d8a85dfc6605ca#33306142195b354ef3485ca2b1d8a85dfc6605ca"
dependencies = [
"proc-macro2",
"quote",
@@ -147,7 +152,7 @@ dependencies = [
[[package]]
name = "alacritty_terminal"
version = "0.20.0-dev"
-source = "git+https://github.com/alacritty/alacritty?rev=7b9f32300ee0a249c0872302c97635b460e45ba5#7b9f32300ee0a249c0872302c97635b460e45ba5"
+source = "git+https://github.com/zed-industries/alacritty?rev=33306142195b354ef3485ca2b1d8a85dfc6605ca#33306142195b354ef3485ca2b1d8a85dfc6605ca"
dependencies = [
"alacritty_config",
"alacritty_config_derive",
@@ -213,30 +218,6 @@ version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec8ad6edb4840b78c5c3d88de606b22252d552b55f3a4699fbb10fc070ec3049"
-[[package]]
-name = "android-activity"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0"
-dependencies = [
- "android-properties",
- "bitflags 1.3.2",
- "cc",
- "jni-sys",
- "libc",
- "log",
- "ndk",
- "ndk-context",
- "ndk-sys",
- "num_enum 0.6.1",
-]
-
-[[package]]
-name = "android-properties"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
-
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -926,25 +907,6 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "block-sys"
-version = "0.1.0-beta.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146"
-dependencies = [
- "objc-sys",
-]
-
-[[package]]
-name = "block2"
-version = "0.2.0-alpha.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42"
-dependencies = [
- "block-sys",
- "objc2-encode",
-]
-
[[package]]
name = "blocking"
version = "1.3.1"
@@ -1107,6 +1069,7 @@ dependencies = [
"anyhow",
"async-broadcast",
"audio",
+ "channel",
"client",
"collections",
"fs",
@@ -1126,20 +1089,6 @@ dependencies = [
"util",
]
-[[package]]
-name = "calloop"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8"
-dependencies = [
- "bitflags 1.3.2",
- "log",
- "nix 0.25.1",
- "slotmap",
- "thiserror",
- "vec_map",
-]
-
[[package]]
name = "cap-fs-ext"
version = "0.24.4"
@@ -1249,10 +1198,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "cfg_aliases"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+name = "channel"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "client",
+ "collections",
+ "db",
+ "feature_flags",
+ "futures 0.3.28",
+ "gpui",
+ "image",
+ "language",
+ "lazy_static",
+ "log",
+ "parking_lot 0.11.2",
+ "postage",
+ "rand 0.8.5",
+ "rpc",
+ "schemars",
+ "serde",
+ "serde_derive",
+ "settings",
+ "smol",
+ "sum_tree",
+ "tempfile",
+ "text",
+ "thiserror",
+ "time 0.3.24",
+ "tiny_http",
+ "url",
+ "util",
+ "uuid 1.4.1",
+]
[[package]]
name = "chrono"
@@ -1376,12 +1354,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
-[[package]]
-name = "claxon"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688"
-
[[package]]
name = "cli"
version = "0.1.0"
@@ -1407,6 +1379,7 @@ dependencies = [
"async-tungstenite",
"collections",
"db",
+ "feature_flags",
"futures 0.3.28",
"gpui",
"image",
@@ -1421,9 +1394,9 @@ dependencies = [
"serde_derive",
"settings",
"smol",
- "staff_mode",
"sum_tree",
"tempfile",
+ "text",
"thiserror",
"time 0.3.24",
"tiny_http",
@@ -1479,7 +1452,7 @@ dependencies = [
[[package]]
name = "collab"
-version = "0.16.0"
+version = "0.19.0"
dependencies = [
"anyhow",
"async-tungstenite",
@@ -1488,8 +1461,11 @@ dependencies = [
"axum-extra",
"base64 0.13.1",
"call",
+ "channel",
"clap 3.2.25",
"client",
+ "clock",
+ "collab_ui",
"collections",
"ctor",
"dashmap",
@@ -1514,6 +1490,7 @@ dependencies = [
"pretty_assertions",
"project",
"prometheus",
+ "prost 0.8.0",
"rand 0.8.5",
"reqwest",
"rpc",
@@ -1526,6 +1503,7 @@ dependencies = [
"settings",
"sha-1 0.9.8",
"sqlx",
+ "text",
"theme",
"time 0.3.24",
"tokio",
@@ -1548,21 +1526,26 @@ dependencies = [
"anyhow",
"auto_update",
"call",
+ "channel",
"client",
"clock",
"collections",
"context_menu",
+ "db",
"editor",
+ "feature_flags",
"feedback",
"futures 0.3.28",
"fuzzy",
"gpui",
+ "language",
"log",
"menu",
"picker",
"postage",
"project",
"recent_projects",
+ "schemars",
"serde",
"serde_derive",
"settings",
@@ -1623,6 +1606,19 @@ dependencies = [
"workspace",
]
+[[package]]
+name = "component_test"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "gpui",
+ "project",
+ "settings",
+ "theme",
+ "util",
+ "workspace",
+]
+
[[package]]
name = "concurrent-queue"
version = "2.2.0"
@@ -2070,15 +2066,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "cursor-icon"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "740bb192a8e2d1350119916954f4409ee7f62f149b536911eeb78ba5a20526bf"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "dashmap"
version = "5.5.0"
@@ -2161,6 +2148,15 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "derive_refineable"
+version = "0.1.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "dhat"
version = "0.3.2"
@@ -2285,12 +2281,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "dispatch"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
-
[[package]]
name = "dlib"
version = "0.5.2"
@@ -2544,6 +2534,14 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
+[[package]]
+name = "feature_flags"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "gpui",
+]
+
[[package]]
name = "feedback"
version = "0.1.0"
@@ -2769,6 +2767,7 @@ dependencies = [
"smol",
"sum_tree",
"tempfile",
+ "text",
"time 0.3.24",
"util",
]
@@ -3149,6 +3148,7 @@ dependencies = [
"png",
"postage",
"rand 0.8.5",
+ "refineable",
"resvg",
"schemars",
"seahash",
@@ -3160,6 +3160,7 @@ dependencies = [
"smol",
"sqlez",
"sum_tree",
+ "taffy",
"time 0.3.24",
"tiny-skia",
"usvg",
@@ -3172,12 +3173,18 @@ dependencies = [
name = "gpui_macros"
version = "0.1.0"
dependencies = [
- "gpui",
+ "lazy_static",
"proc-macro2",
"quote",
"syn 1.0.109",
]
+[[package]]
+name = "grid"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eec1c01eb1de97451ee0d60de7d81cf1e72aabefb021616027f3d1c3ec1c723c"
+
[[package]]
name = "h2"
version = "0.3.20"
@@ -3967,17 +3974,6 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
-[[package]]
-name = "lewton"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030"
-dependencies = [
- "byteorder",
- "ogg",
- "tinyvec",
-]
-
[[package]]
name = "libc"
version = "0.2.147"
@@ -4530,7 +4526,7 @@ dependencies = [
"bitflags 1.3.2",
"jni-sys",
"ndk-sys",
- "num_enum 0.5.11",
+ "num_enum",
"raw-window-handle",
"thiserror",
]
@@ -4572,19 +4568,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "nix"
-version = "0.25.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
-dependencies = [
- "autocfg",
- "bitflags 1.3.2",
- "cfg-if 1.0.0",
- "libc",
- "memoffset 0.6.5",
-]
-
[[package]]
name = "nix"
version = "0.26.2"
@@ -4750,16 +4733,7 @@ version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
dependencies = [
- "num_enum_derive 0.5.11",
-]
-
-[[package]]
-name = "num_enum"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1"
-dependencies = [
- "num_enum_derive 0.6.1",
+ "num_enum_derive",
]
[[package]]
@@ -4774,18 +4748,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "num_enum_derive"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
-dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 2.0.28",
-]
-
[[package]]
name = "nvim-rs"
version = "0.5.0"
@@ -4811,32 +4773,6 @@ dependencies = [
"objc_exception",
]
-[[package]]
-name = "objc-sys"
-version = "0.2.0-beta.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7"
-
-[[package]]
-name = "objc2"
-version = "0.3.0-beta.3.patch-leaks.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468"
-dependencies = [
- "block2",
- "objc-sys",
- "objc2-encode",
-]
-
-[[package]]
-name = "objc2-encode"
-version = "2.0.0-pre.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512"
-dependencies = [
- "objc-sys",
-]
-
[[package]]
name = "objc_exception"
version = "0.1.2"
@@ -4890,15 +4826,6 @@ dependencies = [
"cc",
]
-[[package]]
-name = "ogg"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e"
-dependencies = [
- "byteorder",
-]
-
[[package]]
name = "once_cell"
version = "1.18.0"
@@ -4955,15 +4882,6 @@ dependencies = [
"vcpkg",
]
-[[package]]
-name = "orbclient"
-version = "0.3.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "221d488cd70617f1bd599ed8ceb659df2147d9393717954d82a0f5e8032a6ab1"
-dependencies = [
- "redox_syscall 0.3.5",
-]
-
[[package]]
name = "ordered-float"
version = "2.10.0"
@@ -5258,6 +5176,33 @@ version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+[[package]]
+name = "playground"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "derive_more",
+ "gpui",
+ "log",
+ "parking_lot 0.11.2",
+ "playground_macros",
+ "refineable",
+ "serde",
+ "simplelog",
+ "smallvec",
+ "taffy",
+ "util",
+]
+
+[[package]]
+name = "playground_macros"
+version = "0.1.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "plist"
version = "1.5.0"
@@ -5711,6 +5656,18 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "quick_action_bar"
+version = "0.1.0"
+dependencies = [
+ "ai",
+ "editor",
+ "gpui",
+ "search",
+ "theme",
+ "workspace",
+]
+
[[package]]
name = "quote"
version = "1.0.32"
@@ -5924,6 +5881,16 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "refineable"
+version = "0.1.0"
+dependencies = [
+ "derive_refineable",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "regalloc2"
version = "0.2.3"
@@ -6142,11 +6109,8 @@ version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdf1d4dea18dff2e9eb6dca123724f8b60ef44ad74a9ad283cdfe025df7e73fa"
dependencies = [
- "claxon",
"cpal",
"hound",
- "lewton",
- "symphonia",
]
[[package]]
@@ -6238,9 +6202,9 @@ dependencies = [
[[package]]
name = "rust-embed"
-version = "6.8.1"
+version = "8.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661"
+checksum = "b1e7d90385b59f0a6bf3d3b757f3ca4ece2048265d70db20a2016043d4509a40"
dependencies = [
"rust-embed-impl",
"rust-embed-utils",
@@ -6249,9 +6213,9 @@ dependencies = [
[[package]]
name = "rust-embed-impl"
-version = "6.8.1"
+version = "8.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac"
+checksum = "3c3d8c6fd84090ae348e63a84336b112b5c3918b3bf0493a581f7bd8ee623c29"
dependencies = [
"proc-macro2",
"quote",
@@ -6262,9 +6226,9 @@ dependencies = [
[[package]]
name = "rust-embed-utils"
-version = "7.8.1"
+version = "8.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74"
+checksum = "873feff8cb7bf86fdf0a71bb21c95159f4e4a37dd7a4bd1855a940909b583ada"
dependencies = [
"globset",
"sha2 0.10.7",
@@ -6727,6 +6691,7 @@ dependencies = [
"serde",
"serde_json",
"settings",
+ "sha1",
"smol",
"tempdir",
"theme",
@@ -6890,6 +6855,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"collections",
+ "feature_flags",
"fs",
"futures 0.3.28",
"gpui",
@@ -6905,7 +6871,6 @@ dependencies = [
"serde_json_lenient",
"smallvec",
"sqlez",
- "staff_mode",
"toml 0.5.11",
"tree-sitter",
"tree-sitter-json 0.19.0",
@@ -7145,15 +7110,6 @@ dependencies = [
"pin-project-lite 0.1.12",
]
-[[package]]
-name = "smol_str"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "snippet"
version = "0.1.0"
@@ -7339,14 +7295,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-[[package]]
-name = "staff_mode"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "gpui",
-]
-
[[package]]
name = "static_assertions"
version = "1.1.0"
@@ -7480,56 +7428,6 @@ dependencies = [
"siphasher",
]
-[[package]]
-name = "symphonia"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62e48dba70095f265fdb269b99619b95d04c89e619538138383e63310b14d941"
-dependencies = [
- "lazy_static",
- "symphonia-bundle-mp3",
- "symphonia-core",
- "symphonia-metadata",
-]
-
-[[package]]
-name = "symphonia-bundle-mp3"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f31d7fece546f1e6973011a9eceae948133bbd18fd3d52f6073b1e38ae6368a"
-dependencies = [
- "bitflags 1.3.2",
- "lazy_static",
- "log",
- "symphonia-core",
- "symphonia-metadata",
-]
-
-[[package]]
-name = "symphonia-core"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7c73eb88fee79705268cc7b742c7bc93a7b76e092ab751d0833866970754142"
-dependencies = [
- "arrayvec 0.7.4",
- "bitflags 1.3.2",
- "bytemuck",
- "lazy_static",
- "log",
-]
-
-[[package]]
-name = "symphonia-metadata"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89c3e1937e31d0e068bbe829f66b2f2bfaa28d056365279e0ef897172c3320c0"
-dependencies = [
- "encoding_rs",
- "lazy_static",
- "log",
- "symphonia-core",
-]
-
[[package]]
name = "syn"
version = "1.0.109"
@@ -7599,6 +7497,17 @@ dependencies = [
"winx",
]
+[[package]]
+name = "taffy"
+version = "0.3.11"
+source = "git+https://github.com/DioxusLabs/taffy?rev=dab541d6104d58e2e10ce90c4a1dad0b703160cd#dab541d6104d58e2e10ce90c4a1dad0b703160cd"
+dependencies = [
+ "arrayvec 0.7.4",
+ "grid",
+ "num-traits",
+ "slotmap",
+]
+
[[package]]
name = "take-until"
version = "0.2.0"
@@ -7723,7 +7632,6 @@ dependencies = [
"ctor",
"digest 0.9.0",
"env_logger 0.9.3",
- "fs",
"gpui",
"lazy_static",
"log",
@@ -7766,6 +7674,7 @@ name = "theme_selector"
version = "0.1.0"
dependencies = [
"editor",
+ "feature_flags",
"fs",
"fuzzy",
"gpui",
@@ -7775,7 +7684,6 @@ dependencies = [
"postage",
"settings",
"smol",
- "staff_mode",
"theme",
"util",
"workspace",
@@ -8278,7 +8186,7 @@ dependencies = [
[[package]]
name = "tree-sitter"
version = "0.20.10"
-source = "git+https://github.com/tree-sitter/tree-sitter?rev=1c65ca24bc9a734ab70115188f465e12eecf224e#1c65ca24bc9a734ab70115188f465e12eecf224e"
+source = "git+https://github.com/tree-sitter/tree-sitter?rev=35a6052fbcafc5e5fc0f9415b8652be7dcaf7222#35a6052fbcafc5e5fc0f9415b8652be7dcaf7222"
dependencies = [
"cc",
"regex",
@@ -8840,12 +8748,6 @@ dependencies = [
"workspace",
]
-[[package]]
-name = "vec_map"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
-
[[package]]
name = "version_check"
version = "0.9.4"
@@ -9310,17 +9212,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "web-time"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19353897b48e2c4d849a2d73cb0aeb16dc2be4e00c565abfc11eb65a806e47de"
-dependencies = [
- "js-sys",
- "once_cell",
- "wasm-bindgen",
-]
-
[[package]]
name = "webpki"
version = "0.21.4"
@@ -9636,42 +9527,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
-[[package]]
-name = "winit"
-version = "0.29.0-beta.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f1afaf8490cc3f1309520ebb53a4cd3fc3642c7df8064a4b074bb9867998d44"
-dependencies = [
- "android-activity",
- "atomic-waker",
- "bitflags 2.3.3",
- "calloop",
- "cfg_aliases",
- "core-foundation",
- "core-graphics",
- "cursor-icon",
- "dispatch",
- "js-sys",
- "libc",
- "log",
- "ndk",
- "ndk-sys",
- "objc2",
- "once_cell",
- "orbclient",
- "raw-window-handle",
- "redox_syscall 0.3.5",
- "serde",
- "smol_str",
- "unicode-segmentation",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
- "web-time",
- "windows-sys",
- "xkbcommon-dl",
-]
-
[[package]]
name = "winnow"
version = "0.5.2"
@@ -9730,6 +9585,7 @@ dependencies = [
"async-recursion 1.0.4",
"bincode",
"call",
+ "channel",
"client",
"collections",
"context_menu",
@@ -9789,25 +9645,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "xkbcommon-dl"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699"
-dependencies = [
- "bitflags 2.3.3",
- "dlib",
- "log",
- "once_cell",
- "xkeysym",
-]
-
-[[package]]
-name = "xkeysym"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621"
-
[[package]]
name = "xmlparser"
version = "0.13.5"
@@ -9860,7 +9697,7 @@ dependencies = [
[[package]]
name = "zed"
-version = "0.100.0"
+version = "0.103.0"
dependencies = [
"activity_indicator",
"ai",
@@ -9874,6 +9711,7 @@ dependencies = [
"backtrace",
"breadcrumbs",
"call",
+ "channel",
"chrono",
"cli",
"client",
@@ -9881,6 +9719,7 @@ dependencies = [
"collab_ui",
"collections",
"command_palette",
+ "component_test",
"context_menu",
"copilot",
"copilot_button",
@@ -9889,6 +9728,7 @@ dependencies = [
"diagnostics",
"editor",
"env_logger 0.9.3",
+ "feature_flags",
"feedback",
"file_finder",
"fs",
@@ -9919,6 +9759,7 @@ dependencies = [
"project",
"project_panel",
"project_symbols",
+ "quick_action_bar",
"rand 0.8.5",
"recent_projects",
"regex",
@@ -9934,7 +9775,6 @@ dependencies = [
"simplelog",
"smallvec",
"smol",
- "staff_mode",
"sum_tree",
"tempdir",
"terminal_view",
diff --git a/Cargo.toml b/Cargo.toml
index 1938e832e9cdb7..5938ecb4024076 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,6 +6,7 @@ members = [
"crates/auto_update",
"crates/breadcrumbs",
"crates/call",
+ "crates/channel",
"crates/cli",
"crates/client",
"crates/clock",
@@ -13,10 +14,13 @@ members = [
"crates/collab_ui",
"crates/collections",
"crates/command_palette",
+ "crates/component_test",
"crates/context_menu",
"crates/copilot",
"crates/copilot_button",
"crates/db",
+ "crates/refineable",
+ "crates/refineable/derive_refineable",
"crates/diagnostics",
"crates/drag_and_drop",
"crates/editor",
@@ -28,6 +32,8 @@ members = [
"crates/git",
"crates/go_to_line",
"crates/gpui",
+ "crates/gpui/playground",
+ "crates/gpui/playground_macros",
"crates/gpui_macros",
"crates/install_cli",
"crates/journal",
@@ -56,7 +62,7 @@ members = [
"crates/snippet",
"crates/sqlez",
"crates/sqlez_macros",
- "crates/staff_mode",
+ "crates/feature_flags",
"crates/sum_tree",
"crates/terminal",
"crates/text",
@@ -91,9 +97,11 @@ log = { version = "0.4.16", features = ["kv_unstable_serde"] }
ordered-float = { version = "2.1.1" }
parking_lot = { version = "0.11.1" }
postage = { version = "0.5", features = ["futures-traits"] }
+prost = { version = "0.8" }
rand = { version = "0.8.5" }
+refineable = { path = "./crates/refineable" }
regex = { version = "1.5" }
-rust-embed = { version = "6.3", features = ["include-exclude"] }
+rust-embed = { version = "8.0", features = ["include-exclude"] }
schemars = { version = "0.8" }
serde = { version = "1.0", features = ["derive", "rc"] }
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
@@ -135,7 +143,7 @@ tree-sitter-lua = "0.0.14"
tree-sitter-nix = { git = "https://github.com/nix-community/tree-sitter-nix", rev = "66e3e9ce9180ae08fc57372061006ef83f0abde7" }
[patch.crates-io]
-tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "1c65ca24bc9a734ab70115188f465e12eecf224e" }
+tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "35a6052fbcafc5e5fc0f9415b8652be7dcaf7222" }
async-task = { git = "https://github.com/zed-industries/async-task", rev = "341b57d6de98cdfd7b418567b8de2022ca993a6e" }
# TODO - Remove when a version is released with this PR: https://github.com/servo/core-foundation-rs/pull/457
diff --git a/Dockerfile b/Dockerfile
index 77d011490e5821..208700f7fb5f25 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
-FROM rust:1.71-bullseye as builder
+FROM rust:1.72-bullseye as builder
WORKDIR app
COPY . .
diff --git a/assets/icons/ai.svg b/assets/icons/ai.svg
new file mode 100644
index 00000000000000..5b3faaa9ccd868
--- /dev/null
+++ b/assets/icons/ai.svg
@@ -0,0 +1,23 @@
+
diff --git a/assets/icons/arrow_left.svg b/assets/icons/arrow_left.svg
new file mode 100644
index 00000000000000..186c9c7457c484
--- /dev/null
+++ b/assets/icons/arrow_left.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/arrow_right.svg b/assets/icons/arrow_right.svg
new file mode 100644
index 00000000000000..7bae7f4801a10b
--- /dev/null
+++ b/assets/icons/arrow_right.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/case_insensitive_12.svg b/assets/icons/case_insensitive_12.svg
new file mode 100644
index 00000000000000..8c943e7509c82d
--- /dev/null
+++ b/assets/icons/case_insensitive_12.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/assets/icons/channel_hash.svg b/assets/icons/channel_hash.svg
new file mode 100644
index 00000000000000..edd04626782e52
--- /dev/null
+++ b/assets/icons/channel_hash.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/check.svg b/assets/icons/check.svg
new file mode 100644
index 00000000000000..77b180892cfaf3
--- /dev/null
+++ b/assets/icons/check.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/check_circle.svg b/assets/icons/check_circle.svg
new file mode 100644
index 00000000000000..b48fe346316e01
--- /dev/null
+++ b/assets/icons/check_circle.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/chevron_down.svg b/assets/icons/chevron_down.svg
new file mode 100644
index 00000000000000..b971555cfa0b8c
--- /dev/null
+++ b/assets/icons/chevron_down.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/chevron_left.svg b/assets/icons/chevron_left.svg
new file mode 100644
index 00000000000000..8e61beed5df055
--- /dev/null
+++ b/assets/icons/chevron_left.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/chevron_right.svg b/assets/icons/chevron_right.svg
new file mode 100644
index 00000000000000..fcd9d83fc20357
--- /dev/null
+++ b/assets/icons/chevron_right.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/chevron_up.svg b/assets/icons/chevron_up.svg
new file mode 100644
index 00000000000000..171cdd61c0511a
--- /dev/null
+++ b/assets/icons/chevron_up.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/conversations.svg b/assets/icons/conversations.svg
new file mode 100644
index 00000000000000..fe8ad03dda712b
--- /dev/null
+++ b/assets/icons/conversations.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/copilot.svg b/assets/icons/copilot.svg
new file mode 100644
index 00000000000000..06dbf178ae9727
--- /dev/null
+++ b/assets/icons/copilot.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/icons/copy.svg b/assets/icons/copy.svg
new file mode 100644
index 00000000000000..4aa44979c39de0
--- /dev/null
+++ b/assets/icons/copy.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/ellipsis.svg b/assets/icons/ellipsis.svg
new file mode 100644
index 00000000000000..1858c655202cf6
--- /dev/null
+++ b/assets/icons/ellipsis.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/error.svg b/assets/icons/error.svg
new file mode 100644
index 00000000000000..593629beee2510
--- /dev/null
+++ b/assets/icons/error.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/exit.svg b/assets/icons/exit.svg
new file mode 100644
index 00000000000000..7e45535773e4e6
--- /dev/null
+++ b/assets/icons/exit.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/feedback.svg b/assets/icons/feedback.svg
new file mode 100644
index 00000000000000..2703f701199486
--- /dev/null
+++ b/assets/icons/feedback.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/file_icons/elixir.svg b/assets/icons/file_icons/elixir.svg
new file mode 100644
index 00000000000000..15a10043287bd5
--- /dev/null
+++ b/assets/icons/file_icons/elixir.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/file_icons/file_types.json b/assets/icons/file_icons/file_types.json
index 9ea75d07309d85..a65155d4ebb461 100644
--- a/assets/icons/file_icons/file_types.json
+++ b/assets/icons/file_icons/file_types.json
@@ -21,23 +21,27 @@
"dll": "storage",
"doc": "document",
"docx": "document",
+ "eex": "elixir",
"eslintrc": "eslint",
"eslintrc.js": "eslint",
"eslintrc.json": "eslint",
+ "ex": "elixir",
+ "exs": "elixir",
+ "fish": "terminal",
+ "flac": "audio",
"fmp": "storage",
"fp7": "storage",
- "flac": "audio",
- "fish": "terminal",
"frm": "storage",
"gdb": "storage",
+ "gif": "image",
"gitattributes": "vcs",
"gitignore": "vcs",
"gitmodules": "vcs",
- "gif": "image",
"go": "code",
"h": "code",
"handlebars": "code",
"hbs": "template",
+ "heex": "elixir",
"htm": "template",
"html": "template",
"ib": "storage",
@@ -51,16 +55,16 @@
"ldf": "storage",
"lock": "lock",
"log": "log",
- "mdb": "storage",
"md": "document",
+ "mdb": "storage",
"mdf": "storage",
"mdx": "document",
"mp3": "audio",
"mp4": "video",
"myd": "storage",
"myi": "storage",
- "ods": "document",
"odp": "document",
+ "ods": "document",
"odt": "document",
"ogg": "video",
"pdb": "storage",
@@ -74,24 +78,24 @@
"profile": "terminal",
"ps1": "terminal",
"psd": "image",
- "py": "code",
+ "py": "python",
"rb": "code",
"rkt": "code",
"rs": "rust",
"rtf": "document",
"sav": "storage",
"scm": "code",
+ "sdf": "storage",
"sh": "terminal",
"sqlite": "storage",
- "sdf": "storage",
"svelte": "template",
"svg": "image",
"swift": "code",
- "ts": "typescript",
- "tsx": "code",
"tiff": "image",
"toml": "toml",
+ "ts": "typescript",
"tsv": "storage",
+ "tsx": "code",
"txt": "document",
"wav": "audio",
"webm": "video",
@@ -103,9 +107,9 @@
"zlogin": "terminal",
"zsh": "terminal",
"zsh_aliases": "terminal",
- "zshenv": "terminal",
"zsh_histfile": "terminal",
"zsh_profile": "terminal",
+ "zshenv": "terminal",
"zshrc": "terminal"
},
"types": {
@@ -127,6 +131,9 @@
"document": {
"icon": "icons/file_icons/book.svg"
},
+ "elixir": {
+ "icon": "icons/file_icons/elixir.svg"
+ },
"eslint": {
"icon": "icons/file_icons/eslint.svg"
},
@@ -145,9 +152,15 @@
"log": {
"icon": "icons/file_icons/info.svg"
},
+ "phoenix": {
+ "icon": "icons/file_icons/phoenix.svg"
+ },
"prettier": {
"icon": "icons/file_icons/prettier.svg"
},
+ "python": {
+ "icon": "icons/file_icons/python.svg"
+ },
"rust": {
"icon": "icons/file_icons/rust.svg"
},
diff --git a/assets/icons/file_icons/phoenix.svg b/assets/icons/file_icons/phoenix.svg
new file mode 100644
index 00000000000000..424b75380669ac
--- /dev/null
+++ b/assets/icons/file_icons/phoenix.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/file_icons/python.svg b/assets/icons/file_icons/python.svg
new file mode 100644
index 00000000000000..dbc8565f9055e6
--- /dev/null
+++ b/assets/icons/file_icons/python.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/filter.svg b/assets/icons/filter.svg
new file mode 100644
index 00000000000000..80ce656f571992
--- /dev/null
+++ b/assets/icons/filter.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/filter_12.svg b/assets/icons/filter_12.svg
new file mode 100644
index 00000000000000..9c1ad5ba5cc0ee
--- /dev/null
+++ b/assets/icons/filter_12.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/filter_14.svg b/assets/icons/filter_14.svg
new file mode 100644
index 00000000000000..379be15b51c491
--- /dev/null
+++ b/assets/icons/filter_14.svg
@@ -0,0 +1,6 @@
+
+
diff --git a/assets/icons/hash.svg b/assets/icons/hash.svg
new file mode 100644
index 00000000000000..f685245ed3c2a2
--- /dev/null
+++ b/assets/icons/hash.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/html.svg b/assets/icons/html.svg
new file mode 100644
index 00000000000000..1e676fe313401f
--- /dev/null
+++ b/assets/icons/html.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/inlay_hint.svg b/assets/icons/inlay_hint.svg
new file mode 100644
index 00000000000000..c8e6bb2d3626e1
--- /dev/null
+++ b/assets/icons/inlay_hint.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/kebab.svg b/assets/icons/kebab.svg
new file mode 100644
index 00000000000000..1858c655202cf6
--- /dev/null
+++ b/assets/icons/kebab.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/lock.svg b/assets/icons/lock.svg
new file mode 100644
index 00000000000000..652f45a7e84379
--- /dev/null
+++ b/assets/icons/lock.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/magnifying_glass.svg b/assets/icons/magnifying_glass.svg
new file mode 100644
index 00000000000000..0b539adb6c7644
--- /dev/null
+++ b/assets/icons/magnifying_glass.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/match_case.svg b/assets/icons/match_case.svg
new file mode 100644
index 00000000000000..82f4529c1b054d
--- /dev/null
+++ b/assets/icons/match_case.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/match_word.svg b/assets/icons/match_word.svg
new file mode 100644
index 00000000000000..69ba8eb9e6bc52
--- /dev/null
+++ b/assets/icons/match_word.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/maximize.svg b/assets/icons/maximize.svg
new file mode 100644
index 00000000000000..4dc7755714990d
--- /dev/null
+++ b/assets/icons/maximize.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/microphone.svg b/assets/icons/microphone.svg
new file mode 100644
index 00000000000000..8974fd939d233b
--- /dev/null
+++ b/assets/icons/microphone.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/minimize.svg b/assets/icons/minimize.svg
new file mode 100644
index 00000000000000..d8941ee1f0ed6a
--- /dev/null
+++ b/assets/icons/minimize.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/plus.svg b/assets/icons/plus.svg
new file mode 100644
index 00000000000000..a54dd0ad66226f
--- /dev/null
+++ b/assets/icons/plus.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/project.svg b/assets/icons/project.svg
new file mode 100644
index 00000000000000..525109db4ce74d
--- /dev/null
+++ b/assets/icons/project.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/replace.svg b/assets/icons/replace.svg
new file mode 100644
index 00000000000000..af1092189130fe
--- /dev/null
+++ b/assets/icons/replace.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/icons/replace_all.svg b/assets/icons/replace_all.svg
new file mode 100644
index 00000000000000..4838e82242f38d
--- /dev/null
+++ b/assets/icons/replace_all.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/replace_next.svg b/assets/icons/replace_next.svg
new file mode 100644
index 00000000000000..ba751411afc33e
--- /dev/null
+++ b/assets/icons/replace_next.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/screen.svg b/assets/icons/screen.svg
new file mode 100644
index 00000000000000..49e097b02325ce
--- /dev/null
+++ b/assets/icons/screen.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/split.svg b/assets/icons/split.svg
new file mode 100644
index 00000000000000..4c131466c2e2db
--- /dev/null
+++ b/assets/icons/split.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/success.svg b/assets/icons/success.svg
new file mode 100644
index 00000000000000..85450cdc433b80
--- /dev/null
+++ b/assets/icons/success.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/terminal.svg b/assets/icons/terminal.svg
new file mode 100644
index 00000000000000..15dd705b0b3139
--- /dev/null
+++ b/assets/icons/terminal.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/icons/warning.svg b/assets/icons/warning.svg
new file mode 100644
index 00000000000000..e581def0d05072
--- /dev/null
+++ b/assets/icons/warning.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/icons/word_search_12.svg b/assets/icons/word_search_12.svg
new file mode 100644
index 00000000000000..4cf6401fd2fc5c
--- /dev/null
+++ b/assets/icons/word_search_12.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/assets/icons/word_search_14.svg b/assets/icons/word_search_14.svg
new file mode 100644
index 00000000000000..adb4976bcc41a9
--- /dev/null
+++ b/assets/icons/word_search_14.svg
@@ -0,0 +1,6 @@
+
+
diff --git a/assets/icons/x.svg b/assets/icons/x.svg
new file mode 100644
index 00000000000000..31c5aa31a6b2e9
--- /dev/null
+++ b/assets/icons/x.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json
index 38ec8ffb4057d2..7c8d7f01daeb37 100644
--- a/assets/keymaps/default.json
+++ b/assets/keymaps/default.json
@@ -13,6 +13,7 @@
"cmd-up": "menu::SelectFirst",
"cmd-down": "menu::SelectLast",
"enter": "menu::Confirm",
+ "ctrl-enter": "menu::ShowContextMenu",
"cmd-enter": "menu::SecondaryConfirm",
"escape": "menu::Cancel",
"ctrl-c": "menu::Cancel",
@@ -172,6 +173,7 @@
"context": "Editor && mode == full",
"bindings": {
"enter": "editor::Newline",
+ "shift-enter": "editor::Newline",
"cmd-shift-enter": "editor::NewlineAbove",
"cmd-enter": "editor::NewlineBelow",
"alt-z": "editor::ToggleSoftWrap",
@@ -224,7 +226,8 @@
"tab": "buffer_search::FocusEditor",
"enter": "search::SelectNextMatch",
"shift-enter": "search::SelectPrevMatch",
- "alt-enter": "search::SelectAllMatches"
+ "alt-enter": "search::SelectAllMatches",
+ "alt-tab": "search::CycleMode"
}
},
{
@@ -237,7 +240,8 @@
{
"context": "ProjectSearchBar",
"bindings": {
- "escape": "project_search::ToggleFocus"
+ "escape": "project_search::ToggleFocus",
+ "alt-tab": "search::CycleMode"
}
},
{
@@ -250,7 +254,8 @@
{
"context": "ProjectSearchView",
"bindings": {
- "escape": "project_search::ToggleFocus"
+ "escape": "project_search::ToggleFocus",
+ "alt-tab": "search::CycleMode"
}
},
{
@@ -262,7 +267,8 @@
"alt-enter": "search::SelectAllMatches",
"alt-cmd-c": "search::ToggleCaseSensitive",
"alt-cmd-w": "search::ToggleWholeWord",
- "alt-cmd-r": "search::ToggleRegex"
+ "alt-tab": "search::CycleMode",
+ "alt-cmd-f": "project_search::ToggleFilters"
}
},
// Bindings from VS Code
@@ -513,8 +519,10 @@
{
"bindings": {
"ctrl-alt-cmd-f": "workspace::FollowNextCollaborator",
- "cmd-shift-c": "collab::ToggleContactsMenu",
- "cmd-alt-i": "zed::DebugElements"
+ // TODO: Move this to a dock open action
+ "cmd-shift-c": "collab_panel::ToggleFocus",
+ "cmd-alt-i": "zed::DebugElements",
+ "ctrl-shift-:": "editor::ToggleInlayHints",
}
},
{
@@ -522,7 +530,8 @@
"bindings": {
"alt-enter": "editor::OpenExcerpts",
"cmd-f8": "editor::GoToHunk",
- "cmd-shift-f8": "editor::GoToPrevHunk"
+ "cmd-shift-f8": "editor::GoToPrevHunk",
+ "ctrl-enter": "assistant::InlineAssist"
}
},
{
@@ -536,6 +545,8 @@
"bindings": {
"left": "project_panel::CollapseSelectedEntry",
"right": "project_panel::ExpandSelectedEntry",
+ "cmd-n": "project_panel::NewFile",
+ "alt-cmd-n": "project_panel::NewDirectory",
"cmd-x": "project_panel::Cut",
"cmd-c": "project_panel::Copy",
"cmd-v": "project_panel::Paste",
@@ -549,6 +560,25 @@
"alt-shift-f": "project_panel::NewSearchInDirectory"
}
},
+ {
+ "context": "CollabPanel",
+ "bindings": {
+ "ctrl-backspace": "collab_panel::Remove",
+ "space": "menu::Confirm"
+ }
+ },
+ {
+ "context": "ChannelModal",
+ "bindings": {
+ "tab": "channel_modal::ToggleMode"
+ }
+ },
+ {
+ "context": "ChannelModal > Picker > Editor",
+ "bindings": {
+ "tab": "channel_modal::ToggleMode"
+ }
+ },
{
"context": "Terminal",
"bindings": {
diff --git a/assets/keymaps/textmate.json b/assets/keymaps/textmate.json
index 90eb090211a753..dd3e217ae9cb3d 100644
--- a/assets/keymaps/textmate.json
+++ b/assets/keymaps/textmate.json
@@ -2,7 +2,6 @@
{
"bindings": {
"cmd-shift-o": "projects::OpenRecent",
- "cmd-shift-b": "branches::OpenRecent",
"cmd-alt-tab": "project_panel::ToggleFocus"
}
},
@@ -12,8 +11,9 @@
"cmd-l": "go_to_line::Toggle",
"ctrl-shift-d": "editor::DuplicateLine",
"cmd-b": "editor::GoToDefinition",
- "alt-cmd-b": "editor::GoToDefinition",
"cmd-j": "editor::ScrollCursorCenter",
+ "cmd-enter": "editor::NewlineBelow",
+ "cmd-alt-enter": "editor::NewLineAbove",
"cmd-shift-l": "editor::SelectLine",
"cmd-shift-t": "outline::Toggle",
"alt-backspace": "editor::DeleteToPreviousWordStart",
@@ -51,14 +51,17 @@
}
],
"ctrl-shift-left": "editor::SelectToPreviousSubwordStart",
- "ctrl-shift-right": "editor::SelectToNextSubwordEnd"
+ "ctrl-shift-right": "editor::SelectToNextSubwordEnd",
+ "ctrl-w": "editor::SelectNext",
+ "ctrl-u": "editor::ConvertToUpperCase",
+ "ctrl-shift-u": "editor::ConvertToLowerCase",
+ "ctrl-alt-u": "editor::ConvertToUpperCamelCase",
+ "ctrl-_": "editor::ConvertToSnakeCase"
}
},
{
"context": "Editor && mode == full",
- "bindings": {
- "cmd-alt-enter": "editor::NewlineAbove"
- }
+ "bindings": {}
},
{
"context": "BufferSearchBar",
@@ -85,5 +88,9 @@
{
"context": "ProjectPanel",
"bindings": {}
+ },
+ {
+ "context": "Dock",
+ "bindings": {}
}
]
diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json
index 02c09b33af1e2a..c7e6199f444f6c 100644
--- a/assets/keymaps/vim.json
+++ b/assets/keymaps/vim.json
@@ -103,9 +103,19 @@
],
"v": "vim::ToggleVisual",
"shift-v": "vim::ToggleVisualLine",
+ "ctrl-v": "vim::ToggleVisualBlock",
+ "ctrl-q": "vim::ToggleVisualBlock",
"*": "vim::MoveToNext",
"#": "vim::MoveToPrev",
"0": "vim::StartOfLine", // When no number operator present, use start of line motion
+ "ctrl-f": "vim::PageDown",
+ "pagedown": "vim::PageDown",
+ "ctrl-b": "vim::PageUp",
+ "pageup": "vim::PageUp",
+ "ctrl-d": "vim::ScrollDown",
+ "ctrl-u": "vim::ScrollUp",
+ "ctrl-e": "vim::LineDown",
+ "ctrl-y": "vim::LineUp",
// "g" commands
"g g": "vim::StartOfDocument",
"g h": "editor::Hover",
@@ -127,10 +137,67 @@
"partialWord": true
}
],
+ "g j": [
+ "vim::Down",
+ {
+ "displayLines": true
+ }
+ ],
+ "g down": [
+ "vim::Down",
+ {
+ "displayLines": true
+ }
+ ],
+ "g k": [
+ "vim::Up",
+ {
+ "displayLines": true
+ }
+ ],
+ "g up": [
+ "vim::Up",
+ {
+ "displayLines": true
+ }
+ ],
+ "g $": [
+ "vim::EndOfLine",
+ {
+ "displayLines": true
+ }
+ ],
+ "g end": [
+ "vim::EndOfLine",
+ {
+ "displayLines": true
+ }
+ ],
+ "g 0": [
+ "vim::StartOfLine",
+ {
+ "displayLines": true
+ }
+ ],
+ "g home": [
+ "vim::StartOfLine",
+ {
+ "displayLines": true
+ }
+ ],
+ "g ^": [
+ "vim::FirstNonWhitespace",
+ {
+ "displayLines": true
+ }
+ ],
// z commands
"z t": "editor::ScrollCursorTop",
"z z": "editor::ScrollCursorCenter",
"z b": "editor::ScrollCursorBottom",
+ "z c": "editor::Fold",
+ "z o": "editor::UnfoldLines",
+ "z f": "editor::FoldSelectedRanges",
// Count support
"1": [
"vim::Number",
@@ -277,6 +344,12 @@
"shift-o": "vim::InsertLineAbove",
"~": "vim::ChangeCase",
"p": "vim::Paste",
+ "shift-p": [
+ "vim::Paste",
+ {
+ "before": true
+ }
+ ],
"u": "editor::Undo",
"ctrl-r": "editor::Redo",
"/": "vim::Search",
@@ -293,14 +366,6 @@
"backwards": true
}
],
- "ctrl-f": "vim::PageDown",
- "pagedown": "vim::PageDown",
- "ctrl-b": "vim::PageUp",
- "pageup": "vim::PageUp",
- "ctrl-d": "vim::ScrollDown",
- "ctrl-u": "vim::ScrollUp",
- "ctrl-e": "vim::LineDown",
- "ctrl-y": "vim::LineUp",
"r": [
"vim::PushOperator",
"Replace"
@@ -365,7 +430,7 @@
}
},
{
- "context": "Editor && vim_mode == visual && !VimWaiting",
+ "context": "Editor && vim_mode == visual && !VimWaiting && !VimObject",
"bindings": {
"u": "editor::Undo",
"o": "vim::OtherEnd",
@@ -373,10 +438,21 @@
"d": "vim::VisualDelete",
"x": "vim::VisualDelete",
"y": "vim::VisualYank",
- "p": "vim::VisualPaste",
+ "p": "vim::Paste",
+ "shift-p": [
+ "vim::Paste",
+ {
+ "preserveClipboard": true
+ }
+ ],
"s": "vim::Substitute",
"c": "vim::Substitute",
"~": "vim::ChangeCase",
+ "shift-i": [
+ "vim::SwitchMode",
+ "Insert"
+ ],
+ "shift-a": "vim::InsertAfter",
"r": [
"vim::PushOperator",
"Replace"
@@ -394,11 +470,27 @@
"Normal"
],
">": "editor::Indent",
- "<": "editor::Outdent"
+ "<": "editor::Outdent",
+ "i": [
+ "vim::PushOperator",
+ {
+ "Object": {
+ "around": false
+ }
+ }
+ ],
+ "a": [
+ "vim::PushOperator",
+ {
+ "Object": {
+ "around": true
+ }
+ }
+ ],
}
},
{
- "context": "Editor && vim_mode == insert",
+ "context": "Editor && vim_mode == insert && !menu",
"bindings": {
"escape": "vim::NormalBefore",
"ctrl-c": "vim::NormalBefore",
diff --git a/assets/settings/default.json b/assets/settings/default.json
index c6235e80a1ab37..6739819e713f38 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -98,6 +98,7 @@
// Whether to show selections in the scrollbar.
"selections": true
},
+ "relative_line_numbers": false,
// Inlay hint related settings
"inlay_hints": {
// Global switch to toggle hints on and off, switched off by default.
@@ -122,13 +123,29 @@
// Amount of indentation for nested items.
"indent_size": 20
},
+ "collaboration_panel": {
+ // Whether to show the collaboration panel button in the status bar.
+ "button": true,
+ // Where to dock channels panel. Can be 'left' or 'right'.
+ "dock": "left",
+ // Default width of the channels panel.
+ "default_width": 240
+ },
"assistant": {
+ // Whether to show the assistant panel button in the status bar.
+ "button": true,
// Where to dock the assistant. Can be 'left', 'right' or 'bottom'.
"dock": "right",
// Default width when the assistant is docked to the left or right.
"default_width": 640,
// Default height when the assistant is docked to the bottom.
- "default_height": 320
+ "default_height": 320,
+ // The default OpenAI model to use when starting new conversations. This
+ // setting can take two values:
+ //
+ // 1. "gpt-3.5-turbo-0613""
+ // 2. "gpt-4-0613""
+ "default_open_ai_model": "gpt-4-0613"
},
// Whether the screen sharing icon is shown in the os status bar.
"show_call_status_icon": true,
@@ -268,8 +285,6 @@
// "directory": "~/zed/projects/"
// }
// }
- //
- //
"working_directory": "current_project_directory",
// Set the cursor blinking behavior in the terminal.
// May take 4 values:
@@ -318,13 +333,32 @@
// "line_height": {
// "custom": 2
// },
- "line_height": "comfortable"
+ "line_height": "comfortable",
+ // Activate the python virtual environment, if one is found, in the
+ // terminal's working directory (as resolved by the working_directory
+ // setting). Set this to "off" to disable this behavior.
+ "detect_venv": {
+ "on": {
+ // Default directories to search for virtual environments, relative
+ // to the current working directory. We recommend overriding this
+ // in your project's settings, rather than globally.
+ "directories": [
+ ".env",
+ "env",
+ ".venv",
+ "venv"
+ ],
+ // Can also be 'csh' and 'fish'
+ "activate_script": "default"
+ }
+ }
// Set the terminal's font size. If this option is not included,
// the terminal will default to matching the buffer's font size.
- // "font_size": "15"
+ // "font_size": "15",
// Set the terminal's font family. If this option is not included,
// the terminal will default to matching the buffer's font family.
- // "font_family": "Zed Mono"
+ // "font_family": "Zed Mono",
+ // ---
},
// Difference settings for semantic_index
"semantic_index": {
diff --git a/crates/ai/Cargo.toml b/crates/ai/Cargo.toml
index 013565e14f4498..4438f88108988e 100644
--- a/crates/ai/Cargo.toml
+++ b/crates/ai/Cargo.toml
@@ -24,7 +24,9 @@ workspace = { path = "../workspace" }
anyhow.workspace = true
chrono = { version = "0.4", features = ["serde"] }
futures.workspace = true
+indoc.workspace = true
isahc.workspace = true
+ordered-float.workspace = true
regex.workspace = true
schemars.workspace = true
serde.workspace = true
@@ -35,3 +37,8 @@ tiktoken-rs = "0.4"
[dev-dependencies]
editor = { path = "../editor", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] }
+
+ctor.workspace = true
+env_logger.workspace = true
+log.workspace = true
+rand.workspace = true
diff --git a/crates/ai/src/ai.rs b/crates/ai/src/ai.rs
index 7cc5f08f7c1f30..2c2d7e774e1209 100644
--- a/crates/ai/src/ai.rs
+++ b/crates/ai/src/ai.rs
@@ -1,27 +1,33 @@
pub mod assistant;
mod assistant_settings;
+mod streaming_diff;
-use anyhow::Result;
+use anyhow::{anyhow, Result};
pub use assistant::AssistantPanel;
+use assistant_settings::OpenAIModel;
use chrono::{DateTime, Local};
use collections::HashMap;
use fs::Fs;
-use futures::StreamExt;
-use gpui::AppContext;
+use futures::{io::BufReader, AsyncBufReadExt, AsyncReadExt, Stream, StreamExt};
+use gpui::{executor::Background, AppContext};
+use isahc::{http::StatusCode, Request, RequestExt};
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::{
cmp::Reverse,
ffi::OsStr,
fmt::{self, Display},
+ io,
path::PathBuf,
sync::Arc,
};
use util::paths::CONVERSATIONS_DIR;
+const OPENAI_API_URL: &'static str = "https://api.openai.com/v1";
+
// Data types for chat completion requests
#[derive(Debug, Serialize)]
-struct OpenAIRequest {
+pub struct OpenAIRequest {
model: String,
messages: Vec,
stream: bool,
@@ -60,7 +66,7 @@ struct SavedConversation {
messages: Vec,
message_metadata: HashMap,
summary: String,
- model: String,
+ model: OpenAIModel,
}
impl SavedConversation {
@@ -115,7 +121,7 @@ struct RequestMessage {
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
-struct ResponseMessage {
+pub struct ResponseMessage {
role: Option,
content: Option,
}
@@ -149,7 +155,7 @@ impl Display for Role {
}
#[derive(Deserialize, Debug)]
-struct OpenAIResponseStreamEvent {
+pub struct OpenAIResponseStreamEvent {
pub id: Option,
pub object: String,
pub created: u32,
@@ -159,14 +165,14 @@ struct OpenAIResponseStreamEvent {
}
#[derive(Deserialize, Debug)]
-struct Usage {
+pub struct Usage {
pub prompt_tokens: u32,
pub completion_tokens: u32,
pub total_tokens: u32,
}
#[derive(Deserialize, Debug)]
-struct ChatChoiceDelta {
+pub struct ChatChoiceDelta {
pub index: u32,
pub delta: ResponseMessage,
pub finish_reason: Option,
@@ -190,3 +196,97 @@ struct OpenAIChoice {
pub fn init(cx: &mut AppContext) {
assistant::init(cx);
}
+
+pub async fn stream_completion(
+ api_key: String,
+ executor: Arc,
+ mut request: OpenAIRequest,
+) -> Result>> {
+ request.stream = true;
+
+ let (tx, rx) = futures::channel::mpsc::unbounded::>();
+
+ let json_data = serde_json::to_string(&request)?;
+ let mut response = Request::post(format!("{OPENAI_API_URL}/chat/completions"))
+ .header("Content-Type", "application/json")
+ .header("Authorization", format!("Bearer {}", api_key))
+ .body(json_data)?
+ .send_async()
+ .await?;
+
+ let status = response.status();
+ if status == StatusCode::OK {
+ executor
+ .spawn(async move {
+ let mut lines = BufReader::new(response.body_mut()).lines();
+
+ fn parse_line(
+ line: Result,
+ ) -> Result