diff --git a/Cargo.lock b/Cargo.lock
index d827b314c82b5417dd24e2bf75c2e98e259302b9..e2e5de95c5f456f770e689feeab26a5be76b9ad6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -91,6 +91,7 @@ dependencies = [
"futures 0.3.28",
"gpui",
"isahc",
+ "language",
"lazy_static",
"log",
"matrixmultiply",
@@ -1467,7 +1468,7 @@ dependencies = [
[[package]]
name = "collab"
-version = "0.24.0"
+version = "0.25.0"
dependencies = [
"anyhow",
"async-trait",
@@ -1503,6 +1504,7 @@ dependencies = [
"lsp",
"nanoid",
"node_runtime",
+ "notifications",
"parking_lot 0.11.2",
"pretty_assertions",
"project",
@@ -1558,13 +1560,17 @@ dependencies = [
"fuzzy",
"gpui",
"language",
+ "lazy_static",
"log",
"menu",
+ "notifications",
"picker",
"postage",
+ "pretty_assertions",
"project",
"recent_projects",
"rich_text",
+ "rpc",
"schemars",
"serde",
"serde_derive",
@@ -1573,6 +1579,7 @@ dependencies = [
"theme",
"theme_selector",
"time",
+ "tree-sitter-markdown",
"util",
"vcs_menu",
"workspace",
@@ -4730,6 +4737,26 @@ dependencies = [
"minimal-lexical",
]
+[[package]]
+name = "notifications"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "channel",
+ "client",
+ "clock",
+ "collections",
+ "db",
+ "feature_flags",
+ "gpui",
+ "rpc",
+ "settings",
+ "sum_tree",
+ "text",
+ "time",
+ "util",
+]
+
[[package]]
name = "ntapi"
version = "0.3.7"
@@ -6404,8 +6431,10 @@ dependencies = [
"rsa 0.4.0",
"serde",
"serde_derive",
+ "serde_json",
"smol",
"smol-timeout",
+ "strum",
"tempdir",
"tracing",
"util",
@@ -6626,6 +6655,12 @@ dependencies = [
"untrusted",
]
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+
[[package]]
name = "rustybuzz"
version = "0.3.0"
@@ -7700,6 +7735,22 @@ name = "strum"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.25.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.37",
+]
[[package]]
name = "subtle"
@@ -9098,6 +9149,7 @@ name = "vcs_menu"
version = "0.1.0"
dependencies = [
"anyhow",
+ "fs",
"fuzzy",
"gpui",
"picker",
@@ -10042,7 +10094,7 @@ dependencies = [
[[package]]
name = "zed"
-version = "0.109.0"
+version = "0.110.0"
dependencies = [
"activity_indicator",
"ai",
@@ -10097,6 +10149,7 @@ dependencies = [
"log",
"lsp",
"node_runtime",
+ "notifications",
"num_cpus",
"outline",
"parking_lot 0.11.2",
diff --git a/Cargo.toml b/Cargo.toml
index 995cd15edd45d6c983fa20c19c6ba82749300260..cf977b8fe6dcecd39641f07802001afa1456d220 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,6 +47,7 @@ members = [
"crates/media",
"crates/menu",
"crates/node_runtime",
+ "crates/notifications",
"crates/outline",
"crates/picker",
"crates/plugin",
@@ -112,6 +113,7 @@ serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
smallvec = { version = "1.6", features = ["union"] }
smol = { version = "1.2" }
+strum = { version = "0.25.0", features = ["derive"] }
sysinfo = "0.29.10"
tempdir = { version = "0.3.7" }
thiserror = { version = "1.0.29" }
diff --git a/assets/icons/bell.svg b/assets/icons/bell.svg
new file mode 100644
index 0000000000000000000000000000000000000000..ea1c6dd42e8821b632f6de97d143a7b9f4b97fd2
--- /dev/null
+++ b/assets/icons/bell.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 4143e5dd41f1a1596ea532433d91cfaffe35f92a..e70b56335915c8b4b2397dcae73def3d0a7bcda3 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -142,6 +142,14 @@
// Default width of the channels panel.
"default_width": 240
},
+ "notification_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": "right",
+ // Default width of the channels panel.
+ "default_width": 240
+ },
"assistant": {
// Whether to show the assistant panel button in the status bar.
"button": true,
diff --git a/crates/ai/Cargo.toml b/crates/ai/Cargo.toml
index 542d7f422fe8c1eaec7d10bf59cb5ccaa2d65ca3..b24c4e5ece5b02eac003a6c18f186faa1eaef7ef 100644
--- a/crates/ai/Cargo.toml
+++ b/crates/ai/Cargo.toml
@@ -11,6 +11,7 @@ doctest = false
[dependencies]
gpui = { path = "../gpui" }
util = { path = "../util" }
+language = { path = "../language" }
async-trait.workspace = true
anyhow.workspace = true
futures.workspace = true
diff --git a/crates/ai/src/ai.rs b/crates/ai/src/ai.rs
index 5256a6a6432907dd22c30d6a03e492a46fef77df..f168c157934f6b70be775f7e17e9ba27ef9b3103 100644
--- a/crates/ai/src/ai.rs
+++ b/crates/ai/src/ai.rs
@@ -1,2 +1,4 @@
pub mod completion;
pub mod embedding;
+pub mod models;
+pub mod templates;
diff --git a/crates/ai/src/completion.rs b/crates/ai/src/completion.rs
index 170b2268f9ed1132fad1bfe69194d8cc7a2e91bf..de6ce9da711ee17f9fc072276a499d1769b874ce 100644
--- a/crates/ai/src/completion.rs
+++ b/crates/ai/src/completion.rs
@@ -53,6 +53,8 @@ pub struct OpenAIRequest {
pub model: String,
pub messages: Vec,
pub stream: bool,
+ pub stop: Vec,
+ pub temperature: f32,
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
diff --git a/crates/ai/src/embedding.rs b/crates/ai/src/embedding.rs
index 4587ece0a23d116c55f07405e009497486d583d7..4d5e40fad984229ff5c7bf6b562ee86793cdb283 100644
--- a/crates/ai/src/embedding.rs
+++ b/crates/ai/src/embedding.rs
@@ -2,7 +2,7 @@ use anyhow::{anyhow, Result};
use async_trait::async_trait;
use futures::AsyncReadExt;
use gpui::executor::Background;
-use gpui::serde_json;
+use gpui::{serde_json, ViewContext};
use isahc::http::StatusCode;
use isahc::prelude::Configurable;
use isahc::{AsyncBody, Response};
@@ -20,9 +20,11 @@ use std::sync::Arc;
use std::time::{Duration, Instant};
use tiktoken_rs::{cl100k_base, CoreBPE};
use util::http::{HttpClient, Request};
+use util::ResultExt;
+
+use crate::completion::OPENAI_API_URL;
lazy_static! {
- static ref OPENAI_API_KEY: Option = env::var("OPENAI_API_KEY").ok();
static ref OPENAI_BPE_TOKENIZER: CoreBPE = cl100k_base().unwrap();
}
@@ -87,6 +89,7 @@ impl Embedding {
#[derive(Clone)]
pub struct OpenAIEmbeddings {
+ pub api_key: Option,
pub client: Arc,
pub executor: Arc,
rate_limit_count_rx: watch::Receiver