Compare commits
9 commits
main
...
v0.200.2-p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2ab445dfd4 | ||
![]() |
b96f76f377 | ||
![]() |
e9a4f6767b | ||
![]() |
177cf12ca1 | ||
![]() |
fda9369bfd | ||
![]() |
08351cb3e7 | ||
![]() |
ab41359e24 | ||
![]() |
d29341bf44 | ||
![]() |
189ea49e00 |
24 changed files with 103 additions and 22 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -718,7 +718,7 @@ jobs:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: github-8vcpu-ubuntu-2404
|
runs-on: github-8vcpu-ubuntu-2404
|
||||||
if: |
|
if: |
|
||||||
( startsWith(github.ref, 'refs/tags/v')
|
false && ( startsWith(github.ref, 'refs/tags/v')
|
||||||
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
|
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
|
||||||
needs: [linux_tests]
|
needs: [linux_tests]
|
||||||
name: Build Zed on FreeBSD
|
name: Build Zed on FreeBSD
|
||||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -20500,7 +20500,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zed"
|
name = "zed"
|
||||||
version = "0.200.0"
|
version = "0.200.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activity_indicator",
|
"activity_indicator",
|
||||||
"agent",
|
"agent",
|
||||||
|
|
|
@ -21,7 +21,7 @@ use language::{
|
||||||
point_from_lsp, point_to_lsp,
|
point_from_lsp, point_to_lsp,
|
||||||
};
|
};
|
||||||
use lsp::{LanguageServer, LanguageServerBinary, LanguageServerId, LanguageServerName};
|
use lsp::{LanguageServer, LanguageServerBinary, LanguageServerId, LanguageServerName};
|
||||||
use node_runtime::NodeRuntime;
|
use node_runtime::{NodeRuntime, VersionCheck};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::DisableAiSettings;
|
use project::DisableAiSettings;
|
||||||
use request::StatusNotification;
|
use request::StatusNotification;
|
||||||
|
@ -1169,9 +1169,8 @@ async fn get_copilot_lsp(fs: Arc<dyn Fs>, node_runtime: NodeRuntime) -> anyhow::
|
||||||
const SERVER_PATH: &str =
|
const SERVER_PATH: &str =
|
||||||
"node_modules/@github/copilot-language-server/dist/language-server.js";
|
"node_modules/@github/copilot-language-server/dist/language-server.js";
|
||||||
|
|
||||||
let latest_version = node_runtime
|
// pinning it: https://github.com/zed-industries/zed/issues/36093
|
||||||
.npm_package_latest_version(PACKAGE_NAME)
|
const PINNED_VERSION: &str = "1.354";
|
||||||
.await?;
|
|
||||||
let server_path = paths::copilot_dir().join(SERVER_PATH);
|
let server_path = paths::copilot_dir().join(SERVER_PATH);
|
||||||
|
|
||||||
fs.create_dir(paths::copilot_dir()).await?;
|
fs.create_dir(paths::copilot_dir()).await?;
|
||||||
|
@ -1181,12 +1180,13 @@ async fn get_copilot_lsp(fs: Arc<dyn Fs>, node_runtime: NodeRuntime) -> anyhow::
|
||||||
PACKAGE_NAME,
|
PACKAGE_NAME,
|
||||||
&server_path,
|
&server_path,
|
||||||
paths::copilot_dir(),
|
paths::copilot_dir(),
|
||||||
&latest_version,
|
&PINNED_VERSION,
|
||||||
|
VersionCheck::VersionMismatch,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
if should_install {
|
if should_install {
|
||||||
node_runtime
|
node_runtime
|
||||||
.npm_install_packages(paths::copilot_dir(), &[(PACKAGE_NAME, &latest_version)])
|
.npm_install_packages(paths::copilot_dir(), &[(PACKAGE_NAME, &PINNED_VERSION)])
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20200,6 +20200,7 @@ impl Editor {
|
||||||
);
|
);
|
||||||
|
|
||||||
let old_cursor_shape = self.cursor_shape;
|
let old_cursor_shape = self.cursor_shape;
|
||||||
|
let old_show_breadcrumbs = self.show_breadcrumbs;
|
||||||
|
|
||||||
{
|
{
|
||||||
let editor_settings = EditorSettings::get_global(cx);
|
let editor_settings = EditorSettings::get_global(cx);
|
||||||
|
@ -20213,6 +20214,10 @@ impl Editor {
|
||||||
cx.emit(EditorEvent::CursorShapeChanged);
|
cx.emit(EditorEvent::CursorShapeChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if old_show_breadcrumbs != self.show_breadcrumbs {
|
||||||
|
cx.emit(EditorEvent::BreadcrumbsChanged);
|
||||||
|
}
|
||||||
|
|
||||||
let project_settings = ProjectSettings::get_global(cx);
|
let project_settings = ProjectSettings::get_global(cx);
|
||||||
self.serialize_dirty_buffers =
|
self.serialize_dirty_buffers =
|
||||||
!self.mode.is_minimap() && project_settings.session.restore_unsaved_buffers;
|
!self.mode.is_minimap() && project_settings.session.restore_unsaved_buffers;
|
||||||
|
@ -22834,6 +22839,7 @@ pub enum EditorEvent {
|
||||||
},
|
},
|
||||||
Reloaded,
|
Reloaded,
|
||||||
CursorShapeChanged,
|
CursorShapeChanged,
|
||||||
|
BreadcrumbsChanged,
|
||||||
PushedToNavHistory {
|
PushedToNavHistory {
|
||||||
anchor: Anchor,
|
anchor: Anchor,
|
||||||
is_deactivate: bool,
|
is_deactivate: bool,
|
||||||
|
|
|
@ -1036,6 +1036,10 @@ impl Item for Editor {
|
||||||
f(ItemEvent::UpdateBreadcrumbs);
|
f(ItemEvent::UpdateBreadcrumbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditorEvent::BreadcrumbsChanged => {
|
||||||
|
f(ItemEvent::UpdateBreadcrumbs);
|
||||||
|
}
|
||||||
|
|
||||||
EditorEvent::DirtyChanged => {
|
EditorEvent::DirtyChanged => {
|
||||||
f(ItemEvent::UpdateTab);
|
f(ItemEvent::UpdateTab);
|
||||||
}
|
}
|
||||||
|
|
|
@ -941,6 +941,7 @@ impl LanguageModel for CloudLanguageModel {
|
||||||
request,
|
request,
|
||||||
model.id(),
|
model.id(),
|
||||||
model.supports_parallel_tool_calls(),
|
model.supports_parallel_tool_calls(),
|
||||||
|
model.supports_prompt_cache_key(),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
|
@ -370,6 +370,7 @@ impl LanguageModel for OpenAiLanguageModel {
|
||||||
request,
|
request,
|
||||||
self.model.id(),
|
self.model.id(),
|
||||||
self.model.supports_parallel_tool_calls(),
|
self.model.supports_parallel_tool_calls(),
|
||||||
|
self.model.supports_prompt_cache_key(),
|
||||||
self.max_output_tokens(),
|
self.max_output_tokens(),
|
||||||
self.model.reasoning_effort(),
|
self.model.reasoning_effort(),
|
||||||
);
|
);
|
||||||
|
@ -386,6 +387,7 @@ pub fn into_open_ai(
|
||||||
request: LanguageModelRequest,
|
request: LanguageModelRequest,
|
||||||
model_id: &str,
|
model_id: &str,
|
||||||
supports_parallel_tool_calls: bool,
|
supports_parallel_tool_calls: bool,
|
||||||
|
supports_prompt_cache_key: bool,
|
||||||
max_output_tokens: Option<u64>,
|
max_output_tokens: Option<u64>,
|
||||||
reasoning_effort: Option<ReasoningEffort>,
|
reasoning_effort: Option<ReasoningEffort>,
|
||||||
) -> open_ai::Request {
|
) -> open_ai::Request {
|
||||||
|
@ -477,7 +479,11 @@ pub fn into_open_ai(
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
prompt_cache_key: request.thread_id,
|
prompt_cache_key: if supports_prompt_cache_key {
|
||||||
|
request.thread_id
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
},
|
||||||
tools: request
|
tools: request
|
||||||
.tools
|
.tools
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -355,10 +355,13 @@ impl LanguageModel for OpenAiCompatibleLanguageModel {
|
||||||
LanguageModelCompletionError,
|
LanguageModelCompletionError,
|
||||||
>,
|
>,
|
||||||
> {
|
> {
|
||||||
|
let supports_parallel_tool_call = true;
|
||||||
|
let supports_prompt_cache_key = false;
|
||||||
let request = into_open_ai(
|
let request = into_open_ai(
|
||||||
request,
|
request,
|
||||||
&self.model.name,
|
&self.model.name,
|
||||||
true,
|
supports_parallel_tool_call,
|
||||||
|
supports_prompt_cache_key,
|
||||||
self.max_output_tokens(),
|
self.max_output_tokens(),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
|
@ -355,6 +355,7 @@ impl LanguageModel for VercelLanguageModel {
|
||||||
request,
|
request,
|
||||||
self.model.id(),
|
self.model.id(),
|
||||||
self.model.supports_parallel_tool_calls(),
|
self.model.supports_parallel_tool_calls(),
|
||||||
|
self.model.supports_prompt_cache_key(),
|
||||||
self.max_output_tokens(),
|
self.max_output_tokens(),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
|
@ -359,6 +359,7 @@ impl LanguageModel for XAiLanguageModel {
|
||||||
request,
|
request,
|
||||||
self.model.id(),
|
self.model.id(),
|
||||||
self.model.supports_parallel_tool_calls(),
|
self.model.supports_parallel_tool_calls(),
|
||||||
|
self.model.supports_prompt_cache_key(),
|
||||||
self.max_output_tokens(),
|
self.max_output_tokens(),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
|
@ -103,7 +103,13 @@ impl LspAdapter for CssLspAdapter {
|
||||||
|
|
||||||
let should_install_language_server = self
|
let should_install_language_server = self
|
||||||
.node
|
.node
|
||||||
.should_install_npm_package(Self::PACKAGE_NAME, &server_path, &container_dir, &version)
|
.should_install_npm_package(
|
||||||
|
Self::PACKAGE_NAME,
|
||||||
|
&server_path,
|
||||||
|
&container_dir,
|
||||||
|
&version,
|
||||||
|
Default::default(),
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if should_install_language_server {
|
if should_install_language_server {
|
||||||
|
|
|
@ -340,7 +340,13 @@ impl LspAdapter for JsonLspAdapter {
|
||||||
|
|
||||||
let should_install_language_server = self
|
let should_install_language_server = self
|
||||||
.node
|
.node
|
||||||
.should_install_npm_package(Self::PACKAGE_NAME, &server_path, &container_dir, &version)
|
.should_install_npm_package(
|
||||||
|
Self::PACKAGE_NAME,
|
||||||
|
&server_path,
|
||||||
|
&container_dir,
|
||||||
|
&version,
|
||||||
|
Default::default(),
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if should_install_language_server {
|
if should_install_language_server {
|
||||||
|
|
|
@ -206,6 +206,7 @@ impl LspAdapter for PythonLspAdapter {
|
||||||
&server_path,
|
&server_path,
|
||||||
&container_dir,
|
&container_dir,
|
||||||
&version,
|
&version,
|
||||||
|
Default::default(),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,13 @@ impl LspAdapter for TailwindLspAdapter {
|
||||||
|
|
||||||
let should_install_language_server = self
|
let should_install_language_server = self
|
||||||
.node
|
.node
|
||||||
.should_install_npm_package(Self::PACKAGE_NAME, &server_path, &container_dir, &version)
|
.should_install_npm_package(
|
||||||
|
Self::PACKAGE_NAME,
|
||||||
|
&server_path,
|
||||||
|
&container_dir,
|
||||||
|
&version,
|
||||||
|
Default::default(),
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if should_install_language_server {
|
if should_install_language_server {
|
||||||
|
|
|
@ -589,6 +589,7 @@ impl LspAdapter for TypeScriptLspAdapter {
|
||||||
&server_path,
|
&server_path,
|
||||||
&container_dir,
|
&container_dir,
|
||||||
version.typescript_version.as_str(),
|
version.typescript_version.as_str(),
|
||||||
|
Default::default(),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,7 @@ impl LspAdapter for VtslsLspAdapter {
|
||||||
&server_path,
|
&server_path,
|
||||||
&container_dir,
|
&container_dir,
|
||||||
&latest_version.server_version,
|
&latest_version.server_version,
|
||||||
|
Default::default(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
@ -129,6 +130,7 @@ impl LspAdapter for VtslsLspAdapter {
|
||||||
&container_dir.join(Self::TYPESCRIPT_TSDK_PATH),
|
&container_dir.join(Self::TYPESCRIPT_TSDK_PATH),
|
||||||
&container_dir,
|
&container_dir,
|
||||||
&latest_version.typescript_version,
|
&latest_version.typescript_version,
|
||||||
|
Default::default(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,13 @@ impl LspAdapter for YamlLspAdapter {
|
||||||
|
|
||||||
let should_install_language_server = self
|
let should_install_language_server = self
|
||||||
.node
|
.node
|
||||||
.should_install_npm_package(Self::PACKAGE_NAME, &server_path, &container_dir, &version)
|
.should_install_npm_package(
|
||||||
|
Self::PACKAGE_NAME,
|
||||||
|
&server_path,
|
||||||
|
&container_dir,
|
||||||
|
&version,
|
||||||
|
Default::default(),
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if should_install_language_server {
|
if should_install_language_server {
|
||||||
|
|
|
@ -29,6 +29,15 @@ pub struct NodeBinaryOptions {
|
||||||
pub use_paths: Option<(PathBuf, PathBuf)>,
|
pub use_paths: Option<(PathBuf, PathBuf)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub enum VersionCheck {
|
||||||
|
/// Check whether the installed and requested version have a mismatch
|
||||||
|
VersionMismatch,
|
||||||
|
/// Only check whether the currently installed version is older than the newest one
|
||||||
|
#[default]
|
||||||
|
OlderVersion,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct NodeRuntime(Arc<Mutex<NodeRuntimeState>>);
|
pub struct NodeRuntime(Arc<Mutex<NodeRuntimeState>>);
|
||||||
|
|
||||||
|
@ -287,6 +296,7 @@ impl NodeRuntime {
|
||||||
local_executable_path: &Path,
|
local_executable_path: &Path,
|
||||||
local_package_directory: &Path,
|
local_package_directory: &Path,
|
||||||
latest_version: &str,
|
latest_version: &str,
|
||||||
|
version_check: VersionCheck,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
// In the case of the local system not having the package installed,
|
// In the case of the local system not having the package installed,
|
||||||
// or in the instances where we fail to parse package.json data,
|
// or in the instances where we fail to parse package.json data,
|
||||||
|
@ -311,7 +321,10 @@ impl NodeRuntime {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
installed_version < latest_version
|
match version_check {
|
||||||
|
VersionCheck::VersionMismatch => installed_version != latest_version,
|
||||||
|
VersionCheck::OlderVersion => installed_version < latest_version,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,13 @@ impl Model {
|
||||||
Self::O1 | Self::O3 | Self::O3Mini | Self::O4Mini | Model::Custom { .. } => false,
|
Self::O1 | Self::O3 | Self::O3Mini | Self::O4Mini | Model::Custom { .. } => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns whether the given model supports the `prompt_cache_key` parameter.
|
||||||
|
///
|
||||||
|
/// If the model does not support the parameter, do not pass it up.
|
||||||
|
pub fn supports_prompt_cache_key(&self) -> bool {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
@ -257,6 +264,7 @@ pub struct Request {
|
||||||
pub tools: Vec<ToolDefinition>,
|
pub tools: Vec<ToolDefinition>,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub prompt_cache_key: Option<String>,
|
pub prompt_cache_key: Option<String>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub reasoning_effort: Option<ReasoningEffort>,
|
pub reasoning_effort: Option<ReasoningEffort>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11813,14 +11813,16 @@ impl LspStore {
|
||||||
notify_server_capabilities_updated(&server, cx);
|
notify_server_capabilities_updated(&server, cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"textDocument/synchronization" => {
|
"textDocument/didChange" => {
|
||||||
if let Some(caps) = reg
|
if let Some(sync_kind) = reg
|
||||||
.register_options
|
.register_options
|
||||||
.map(serde_json::from_value)
|
.and_then(|opts| opts.get("syncKind").cloned())
|
||||||
|
.map(serde_json::from_value::<lsp::TextDocumentSyncKind>)
|
||||||
.transpose()?
|
.transpose()?
|
||||||
{
|
{
|
||||||
server.update_capabilities(|capabilities| {
|
server.update_capabilities(|capabilities| {
|
||||||
capabilities.text_document_sync = Some(caps);
|
capabilities.text_document_sync =
|
||||||
|
Some(lsp::TextDocumentSyncCapability::Kind(sync_kind));
|
||||||
});
|
});
|
||||||
notify_server_capabilities_updated(&server, cx);
|
notify_server_capabilities_updated(&server, cx);
|
||||||
}
|
}
|
||||||
|
@ -11970,7 +11972,7 @@ impl LspStore {
|
||||||
});
|
});
|
||||||
notify_server_capabilities_updated(&server, cx);
|
notify_server_capabilities_updated(&server, cx);
|
||||||
}
|
}
|
||||||
"textDocument/synchronization" => {
|
"textDocument/didChange" => {
|
||||||
server.update_capabilities(|capabilities| {
|
server.update_capabilities(|capabilities| {
|
||||||
capabilities.text_document_sync = None;
|
capabilities.text_document_sync = None;
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,4 +71,8 @@ impl Model {
|
||||||
Model::Custom { .. } => false,
|
Model::Custom { .. } => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn supports_prompt_cache_key(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,10 @@ impl Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn supports_prompt_cache_key(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
pub fn supports_tool(&self) -> bool {
|
pub fn supports_tool(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Self::Grok2Vision
|
Self::Grok2Vision
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
description = "The fast, collaborative code editor."
|
description = "The fast, collaborative code editor."
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
name = "zed"
|
name = "zed"
|
||||||
version = "0.200.0"
|
version = "0.200.2"
|
||||||
publish.workspace = true
|
publish.workspace = true
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
authors = ["Zed Team <hi@zed.dev>"]
|
authors = ["Zed Team <hi@zed.dev>"]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
dev
|
preview
|
Loading…
Add table
Add a link
Reference in a new issue