Compare commits

...

5 Commits

Author SHA1 Message Date
Peter Tripp
576b38d598 zed 0.153.1 2024-09-10 17:52:25 -04:00
Piotr Osiewicz
7e4bc1235a pane: Fix pinned tabs being persisted after closing (#17666)
Release Notes:

- Fixed tabs staying pinned after closing unrelated tabs
2024-09-10 17:51:21 -04:00
Peter Tripp
39f57fa538 Revert tokenizer for custom OpenAI models (#17660)
Fix for custom openai models tokenizer settings.
2024-09-10 17:51:17 -04:00
Conrad Irwin
7058a91b82 Correctly merge settings for vtsls (#17657)
Release Notes:

- Fixed vtsls initialization_options in project settings files
2024-09-10 17:51:12 -04:00
Joseph T Lyons
f9ec8405c5 v0.153.x preview 2024-09-10 14:40:26 -04:00
6 changed files with 31 additions and 12 deletions

2
Cargo.lock generated
View File

@@ -14197,7 +14197,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.153.0"
version = "0.153.1"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -370,7 +370,11 @@ pub fn count_open_ai_tokens(
})
.collect::<Vec<_>>();
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
if let open_ai::Model::Custom { .. } = model {
tiktoken_rs::num_tokens_from_messages("gpt-4", &messages)
} else {
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
}
})
.boxed()
}

View File

@@ -7,14 +7,14 @@ use lsp::{CodeActionKind, LanguageServerBinary};
use node_runtime::NodeRuntime;
use project::project_settings::{BinarySettings, ProjectSettings};
use serde_json::{json, Value};
use settings::Settings;
use settings::{Settings, SettingsLocation};
use std::{
any::Any,
ffi::OsString,
path::{Path, PathBuf},
sync::Arc,
};
use util::{maybe, ResultExt};
use util::{maybe, merge_json_value_into, ResultExt};
fn typescript_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
vec![server_path.into(), "--stdio".into()]
@@ -274,17 +274,29 @@ impl LspAdapter for VtslsLspAdapter {
cx: &mut AsyncAppContext,
) -> Result<Value> {
let override_options = cx.update(|cx| {
ProjectSettings::get_global(cx)
.lsp
.get(SERVER_NAME)
.and_then(|s| s.initialization_options.clone())
ProjectSettings::get(
Some(SettingsLocation {
worktree_id: adapter.worktree_id(),
path: adapter.worktree_root_path(),
}),
cx,
)
.lsp
.get(SERVER_NAME)
.and_then(|s| s.initialization_options.clone())
})?;
if let Some(options) = override_options {
return Ok(options);
}
self.initialization_options(adapter)
let mut initialization_options = self
.initialization_options(adapter)
.await
.map(|o| o.unwrap())
.map(|o| o.unwrap())?;
if let Some(override_options) = override_options {
merge_json_value_into(override_options, &mut initialization_options)
}
Ok(initialization_options)
}
fn language_ids(&self) -> HashMap<String, String> {

View File

@@ -1364,6 +1364,9 @@ impl Pane {
self.activation_history
.retain(|entry| entry.entity_id != self.items[item_index].item_id());
if self.is_tab_pinned(item_index) {
self.pinned_tab_count -= 1;
}
if item_index == self.active_item_index {
let index_to_activate = self
.activation_history

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.153.0"
version = "0.153.1"
publish = false
license = "GPL-3.0-or-later"
authors = ["Zed Team <hi@zed.dev>"]

View File

@@ -1 +1 @@
dev
preview