Порівняти коміти

..
Автор SHA1 Повідомлення Дата
l0ng-ai 975b910c34 feat(database): data editor row and toolbar commands as actions
Reload Page, First / Previous / Next / Last Page, Add Row, Export Data,
Delete Rows, Restore Rows, Edit Cell and the cell copy commands were
menu items or toolbar buttons only. They are now db.* actions, so they
appear in Find Action and take Keymap shortcuts; the table editor and
the console result grid supply them through their focus handle, and
the menus and buttons run the same actions. IDEA's defaults bind Reload
Page, Previous / Next Page and Add Row (and Delete Rows on Windows).

Closes #3506
2026-11-15 23:03:20 +08:00
266 змінених файлів з 1238 додано та 3407 видалено

No files matched your search

-1
Переглянути файл
@@ -42,7 +42,6 @@ Visual style: dark, low-contrast greys, one cool accent
shortcuts live in `src/platform/keymaps/`.
- Styling: CSS Modules + tokens only (no hex literals in components). Inline SVG
icons from `src/ui/icons.tsx`, never emoji. Real `<button>`/`<input>`; `aria-label` on icon buttons.
`gap` uses the `--space-*` scale (`src/styles/tokens.css`, 4px grid) where a value is on it.
- User-visible text goes through the text catalog: add every new string to both
`src/platform/locales/text/en.json` and `zh.json` (`textCatalog.test.ts` enforces it).
Other locales may lack entries; their UI shows the English text until a translator adds it.
+10 -8
Переглянути файл
@@ -10,14 +10,12 @@ use crate::provider::ProviderSpec;
use crate::{Shared, client_info};
use parking_lot::Mutex;
use serde_json::{Value, json};
use std::collections::BTreeMap;
use std::sync::Arc;
use std::time::Duration;
const DISCOVER_TIMEOUT: Duration = if cfg!(test) { Duration::from_secs(3) } else { Duration::from_secs(120) };
/// Opens `session/new`, reads `configOptions`, and records the `thought_level` choices of the
/// session's model: they describe that model only, and other models may offer different ones.
/// Opens `session/new`, reads `configOptions`, and records per-model `thought_level` choices.
pub(crate) async fn run(shared: &Arc<Shared>, spec: &ProviderSpec) -> Result<Discovered, String> {
let prefer_stored = crate::provider::prefer_stored_copilot_auth();
match run_once(shared, spec, prefer_stored).await {
@@ -64,17 +62,21 @@ async fn run_once(shared: &Arc<Shared>, spec: &ProviderSpec, strip_ambient: bool
.map_err(|e| e.to_string())?;
let mut options = config::options_of(&new);
config::add_client_options(&launch.id, &mut options);
let model = options.iter().find(|o| o.category.as_deref() == Some("model")).and_then(|o| o.current.clone());
let levels = match (model, levels_for_model_from_slice(&options)) {
(Some(model), Some(effort)) => BTreeMap::from([(model, effort)]),
_ => BTreeMap::new(),
let model_option = options.iter().find(|o| o.category.as_deref() == Some("model"));
let effort = levels_for_model_from_slice(&options);
let levels: Vec<(String, Vec<AgentConfigOption>)> = match (model_option, effort) {
(Some(model), Some(effort)) if !model.values.is_empty() => {
model.values.iter().map(|v| (v.value.clone(), effort.clone())).collect()
}
(Some(model), Some(effort)) => model.current.clone().map(|m| vec![(m, effort)]).unwrap_or_default(),
_ => Vec::new(),
};
let commands = updates
.commands
.lock()
.clone()
.or_else(|| new.get("availableCommands").map(|_| config::commands_of(&new, &launch.id)));
Ok::<_, String>(Discovered { config: options, commands, levels })
Ok::<_, String>(Discovered { config: options, commands, levels: levels.into_iter().collect() })
};
let result = tokio::time::timeout(DISCOVER_TIMEOUT, work).await;
peer.kill();
-2
Переглянути файл
@@ -58,8 +58,6 @@ fn client_capabilities() -> Value {
"terminal": false,
// Subagents as sessions of their own (ACP subagents RFD; v2 baseline).
"subagents": {},
// Forms the agent asks the user to fill in (`elicitation/create`); not URL mode.
"elicitation": { "form": {} },
// Cursor exposes model parameters (e.g. Composer `fast`) as separate config options
// only when the client advertises this flag (undocumented Cursor ACP extension).
"_meta": { "parameterizedModelPicker": true },
+1 -5
Переглянути файл
@@ -97,13 +97,10 @@ fn the_negotiating_request_carries_both_versions() {
p["clientCapabilities"]["_meta"]["parameterizedModelPicker"], true,
"Cursor and similar agents need parameterized model options (e.g. fast on/off)"
);
// Forms only: URL mode would open pages the agent names.
assert_eq!(p["clientCapabilities"]["elicitation"], json!({ "form": {} }));
// What we sent in the capture is what claude-agent-acp negotiated v2 and v1 from.
let sent = frames(TURN, "out")[0]["params"]["clientCapabilities"].clone();
let mut expected = sent;
expected["_meta"] = p["clientCapabilities"]["_meta"].clone();
expected["elicitation"] = p["clientCapabilities"]["elicitation"].clone();
assert_eq!(expected, p["clientCapabilities"]);
}
@@ -171,8 +168,7 @@ async fn discovery_reads_effort_and_fast_from_session_new_then_stops_the_agent()
let fast = cursor.config.iter().find(|o| o.id == "fast").expect("fast option");
assert_eq!(fast.category.as_deref(), Some("model_config"));
assert_eq!(fast.current.as_deref(), Some("false"));
// The effort option belongs to the session's model; m2 may offer other levels.
assert_eq!(cursor.thought_levels.keys().collect::<Vec<_>>(), ["m1"]);
assert!(cursor.thought_levels.contains_key("m1") && cursor.thought_levels.contains_key("m2"));
assert!(cursor.thought_levels["m1"].iter().any(|o| o.category.as_deref() == Some("thought_level")));
}
+1 -53
Переглянути файл
@@ -56,16 +56,6 @@ pub(crate) struct CatalogData {
pub refreshed_at_ms: Option<f64>,
}
impl CatalogData {
fn model_option(&self) -> Option<&AgentConfigOption> {
self.config.iter().find(|o| o.category.as_deref() == Some("model"))
}
fn lists(&self, model: &str) -> bool {
self.model_option().is_some_and(|o| o.values.iter().any(|v| v.value == model))
}
}
#[derive(Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct SavedCatalog {
@@ -339,17 +329,11 @@ impl AgentCatalogs {
Ok(found) => {
let mut cache = shared.known.lock();
let known = cache.entry(key.2.clone()).or_default();
let mut catalog = CatalogData {
let catalog = CatalogData {
config: found.config,
thought_levels: found.levels,
refreshed_at_ms: Some(self.epoch_ms()),
};
// Efforts sessions reported for models discovery doesn't read stay while listed.
for (model, levels) in entry.catalog.take().map(|old| old.thought_levels).unwrap_or_default() {
if catalog.lists(&model) && !catalog.thought_levels.contains_key(&model) {
catalog.thought_levels.insert(model, levels);
}
}
known.config = catalog.config.clone();
known.thought_levels = catalog.thought_levels.clone();
if let Some(commands) = found.commands {
@@ -382,42 +366,6 @@ impl AgentCatalogs {
}
}
/// Records the efforts a session reported for a listed `model` other than the one discovery
/// read: ACP discovery opens one session, so it knows only that model's efforts.
pub(crate) fn learn_levels(&self, shared: &Shared, provider: &str, model: &str, levels: Vec<AgentConfigOption>) {
let lacks = |catalog: &CatalogData| {
catalog.lists(model)
&& catalog.model_option().and_then(|o| o.current.as_deref()) != Some(model)
&& catalog.thought_levels.get(model) != Some(&levels)
};
let key = Self::key(shared, provider);
let mut state = self.state.lock();
let mut learned = false;
if let Some(catalog) = state.entries.get_mut(&key).and_then(|e| e.catalog.as_mut()).filter(|c| lacks(c)) {
catalog.thought_levels.insert(model.to_owned(), levels.clone());
learned = true;
}
let mut cache = shared.known.lock();
if let Some(saved) = cache
.get_mut(provider)
.and_then(|known| known.catalogs.get_mut(&shared.root_key()))
.filter(|saved| lacks(&saved.catalog))
{
saved.catalog.thought_levels.insert(model.to_owned(), levels);
learned = true;
}
if !learned {
return;
}
shared.persist_known(&cache);
drop(cache);
let snapshot = state.entries.get(&key).map(|entry| self.snapshot(shared, provider, entry));
drop(state);
if let Some(snapshot) = snapshot {
self.broadcast(shared, &snapshot);
}
}
fn subscribers(&self, shared: &Shared) -> Vec<Arc<Shared>> {
self.state
.lock()
+1 -38
Переглянути файл
@@ -199,8 +199,7 @@ async fn successful_refresh_replaces_models_and_efforts_and_old_sessions_cannot_
pending.reply.send(Ok(response(&["retained", "new"], &["medium"]))).unwrap();
let fresh = completed(&mut events).await;
assert_eq!(model_values(&fresh), ["retained", "new"]);
// The session's efforts describe its own model, not "new".
assert_eq!(fresh.thought_levels.keys().map(String::as_str).collect::<Vec<_>>(), ["retained"]);
assert_eq!(fresh.thought_levels.keys().map(String::as_str).collect::<Vec<_>>(), ["new", "retained"]);
assert_eq!(fresh.thought_levels["retained"][0].values[0].value, "medium");
assert!(fresh.refreshed_at_ms.is_some() && fresh.retry_at_ms.is_some());
manager.shared.remember(PROVIDER, Some(&old), None, Some("old"));
@@ -221,42 +220,6 @@ async fn successful_refresh_replaces_models_and_efforts_and_old_sessions_cannot_
assert!(!tmp.path().join("store").exists(), "refresh never creates tasks");
}
#[tokio::test]
async fn a_session_adds_the_efforts_of_a_model_discovery_did_not_read() {
let tmp = tempfile::tempdir().unwrap();
configure(tmp.path(), "one");
let mut harness = Harness::new();
let catalogs = Arc::new(AgentCatalogs::default());
let manager = make_manager(tmp.path(), catalogs.clone(), &harness);
let mut events = events(&manager);
manager.refresh_models(PROVIDER, false).unwrap();
harness.next().await.reply.send(Ok(response(&["first", "second"], &["low", "high"]))).unwrap();
completed(&mut events).await;
// A session on "second" reports its own efforts; one on a model the catalog lacks, or on
// "first" with other efforts, changes nothing.
let second = config::options_of(&response(&["second"], &["off", "auto"]));
manager.shared.remember(PROVIDER, Some(&second), None, Some("second"));
manager.shared.remember(PROVIDER, Some(&config::options_of(&response(&["gone"], &["x"]))), None, Some("gone"));
manager.shared.remember(PROVIDER, Some(&config::options_of(&response(&["first"], &["max"]))), None, Some("first"));
let efforts = |catalog: &AgentModelCatalog, model: &str| -> Vec<String> {
catalog.thought_levels[model][0].values.iter().map(|v| v.value.clone()).collect()
};
let catalog = manager.refresh_models(PROVIDER, false).unwrap();
assert_eq!(catalog.thought_levels.keys().map(String::as_str).collect::<Vec<_>>(), ["first", "second"]);
assert_eq!(efforts(&catalog, "first"), ["low", "high"]);
assert_eq!(efforts(&catalog, "second"), ["off", "auto"]);
let restored = make_manager(tmp.path(), Arc::default(), &harness).refresh_models(PROVIDER, false).unwrap();
assert_eq!(efforts(&restored, "second"), ["off", "auto"], "persisted with the project's catalog");
// Discovery again reads "first" only; "second" keeps what its session reported.
advance(&catalogs, 60);
while events.try_recv().is_ok() {}
manager.refresh_models(PROVIDER, true).unwrap();
harness.next().await.reply.send(Ok(response(&["first", "second"], &["medium"]))).unwrap();
let fresh = completed(&mut events).await;
assert_eq!(efforts(&fresh, "first"), ["medium"]);
assert_eq!(efforts(&fresh, "second"), ["off", "auto"]);
}
#[tokio::test]
async fn legacy_cache_loads_without_claiming_authoritative_freshness() {
let tmp = tempfile::tempdir().unwrap();
-250
Переглянути файл
@@ -1,250 +0,0 @@
//! ACP elicitation in form mode: the agent's restricted JSON Schema as form fields, and the
//! user's answer as the `elicitation/create` response.
use crate::model::{AgentForm, AgentFormField, AgentFormFieldKind, AgentFormOption, AgentPermissionOption};
use serde_json::{Map, Value, json};
/// The reply that declines the form; a JSON object of field name to values accepts it, and
/// anything else cancels it.
const DECLINE: &str = "decline";
/// The form `elicitation/create` asks for; `Err` when it asks for something else.
pub(crate) fn form_of(params: &Value) -> Result<AgentForm, String> {
if params.get("mode").and_then(Value::as_str) != Some("form") {
return Err("only form elicitation is supported".to_owned());
}
let schema = params.get("requestedSchema").ok_or("requestedSchema is missing")?;
let required: Vec<&str> = schema
.get("required")
.and_then(Value::as_array)
.map(|names| names.iter().filter_map(Value::as_str).collect())
.unwrap_or_default();
let properties = schema.get("properties").and_then(Value::as_object).ok_or("requestedSchema has no properties")?;
let fields = properties
.iter()
.map(|(name, property)| field(name, property, required.contains(&name.as_str())))
.collect::<Result<_, _>>()?;
Ok(AgentForm { fields })
}
fn field(name: &str, property: &Value, required: bool) -> Result<AgentFormField, String> {
let text = |key: &str| property.get(key).and_then(Value::as_str).unwrap_or_default().trim().to_owned();
let number = |key: &str| property.get(key).and_then(Value::as_f64);
let unsupported = || format!("field {name} has an unsupported schema");
let (kind, options, min, max) = match property.get("type").and_then(Value::as_str) {
Some("string") => match choices(property) {
Some(options) => (AgentFormFieldKind::Choice, options, None, None),
None => (AgentFormFieldKind::Text, Vec::new(), number("minLength"), number("maxLength")),
},
Some("number") => (AgentFormFieldKind::Number, Vec::new(), number("minimum"), number("maximum")),
Some("integer") => (AgentFormFieldKind::Integer, Vec::new(), number("minimum"), number("maximum")),
Some("boolean") => (AgentFormFieldKind::Boolean, Vec::new(), None, None),
Some("array") => {
let options = property.get("items").and_then(choices).ok_or_else(unsupported)?;
(AgentFormFieldKind::Choices, options, number("minItems"), number("maxItems"))
}
_ => return Err(unsupported()),
};
let default = match property.get("default") {
Some(Value::Array(values)) => values.iter().filter_map(scalar).collect(),
Some(value) => scalar(value).into_iter().collect(),
None => Vec::new(),
};
let title = text("title");
Ok(AgentFormField {
name: name.to_owned(),
title: if title.is_empty() { name.to_owned() } else { title },
description: text("description"),
required,
kind,
options,
default,
min,
max,
})
}
/// The values of a choice: `enum` (titled by the legacy `enumNames`), or `oneOf` / `anyOf`
/// of `{ const, title }`.
fn choices(schema: &Value) -> Option<Vec<AgentFormOption>> {
let option = |value: &str, label: Option<&str>, description: Option<&str>| AgentFormOption {
value: value.to_owned(),
label: label.filter(|l| !l.trim().is_empty()).unwrap_or(value).to_owned(),
description: description.unwrap_or_default().trim().to_owned(),
};
if let Some(values) = schema.get("enum").and_then(Value::as_array) {
let names = schema.get("enumNames").and_then(Value::as_array);
return Some(
values
.iter()
.enumerate()
.filter_map(|(i, value)| {
Some(option(value.as_str()?, names.and_then(|n| n.get(i)).and_then(Value::as_str), None))
})
.collect(),
);
}
let listed = schema.get("oneOf").or_else(|| schema.get("anyOf"))?.as_array()?;
Some(
listed
.iter()
.filter_map(|o| {
let text = |key: &str| o.get(key).and_then(Value::as_str);
Some(option(text("const")?, text("title"), text("description")))
})
.collect(),
)
}
fn scalar(value: &Value) -> Option<String> {
match value {
Value::String(text) => Some(text.clone()),
Value::Number(number) => Some(number.to_string()),
Value::Bool(flag) => Some(flag.to_string()),
_ => None,
}
}
/// A form is submitted from its own card; this option only names a declined form.
pub(crate) fn options() -> Vec<AgentPermissionOption> {
vec![AgentPermissionOption { id: DECLINE.to_owned(), name: "Decline".to_owned(), kind: "reject_once".to_owned() }]
}
/// The `elicitation/create` response to the user's `reply`, and what the conversation
/// records as chosen.
pub(crate) fn answer(form: &AgentForm, reply: Option<&str>) -> (Value, String) {
let values = match reply {
Some(DECLINE) => return (json!({ "action": "decline" }), "Decline".to_owned()),
Some(reply) => serde_json::from_str::<Map<String, Value>>(reply).ok(),
None => None,
};
let Some(values) = values else { return (json!({ "action": "cancel" }), "Cancelled".to_owned()) };
let mut content = Map::new();
let mut shown = Vec::new();
for field in &form.fields {
let given: Vec<&str> = match values.get(&field.name) {
Some(Value::Array(items)) => items.iter().filter_map(Value::as_str).collect(),
Some(Value::String(item)) => vec![item.as_str()],
_ => Vec::new(),
};
let given: Vec<&str> = given.into_iter().map(str::trim).filter(|v| !v.is_empty()).collect();
let Some(&first) = given.first() else { continue };
let value = match field.kind {
AgentFormFieldKind::Text | AgentFormFieldKind::Choice => json!(first),
AgentFormFieldKind::Number => match first.parse::<f64>() {
Ok(number) => json!(number),
Err(_) => continue,
},
AgentFormFieldKind::Integer => match first.parse::<i64>() {
Ok(number) => json!(number),
Err(_) => continue,
},
AgentFormFieldKind::Boolean => json!(first == "true"),
AgentFormFieldKind::Choices => json!(given),
};
let label = |value: &str| {
field.options.iter().find(|o| o.value == value).map_or_else(|| value.to_owned(), |o| o.label.clone())
};
let text = match field.kind {
AgentFormFieldKind::Boolean => (if first == "true" { "yes" } else { "no" }).to_owned(),
AgentFormFieldKind::Choices => given.iter().map(|v| label(v)).collect::<Vec<_>>().join(", "),
_ => label(first),
};
shown.push(format!("{}: {text}", field.title));
content.insert(field.name.clone(), value);
}
let chosen = if shown.is_empty() { "Submitted".to_owned() } else { shown.join("; ") };
(json!({ "action": "accept", "content": content }), chosen)
}
#[cfg(test)]
mod tests {
use super::*;
/// The form OMP's `ask` tool sends: a choice with a recommended default, then an
/// optional typed answer beside it.
fn ask() -> Value {
json!({
"sessionId": "s", "mode": "form", "message": "Which database?",
"requestedSchema": { "type": "object", "properties": {
"q0": { "type": "string", "title": "Which database?", "description": "Storage",
"oneOf": [{ "const": "pg", "title": "Postgres", "description": "Relational" },
{ "const": "sqlite", "title": "SQLite" }],
"default": "pg" },
"q0__other": { "type": "string", "title": "Other (type your own)" }
} }
})
}
#[test]
fn reads_choices_and_text_fields() {
let form = form_of(&ask()).unwrap();
let [choice, other] = form.fields.as_slice() else { panic!("{form:?}") };
assert_eq!((choice.name.as_str(), choice.kind, choice.required), ("q0", AgentFormFieldKind::Choice, false));
assert_eq!(choice.options[0].label, "Postgres");
assert_eq!(choice.options[0].description, "Relational");
assert_eq!(choice.default, ["pg"]);
assert_eq!((other.kind, other.title.as_str()), (AgentFormFieldKind::Text, "Other (type your own)"));
}
#[test]
fn reads_every_restricted_schema_kind() {
let form = form_of(&json!({ "mode": "form", "requestedSchema": {
"type": "object", "required": ["count"],
"properties": {
"count": { "type": "integer", "minimum": 1, "maximum": 5 },
"ratio": { "type": "number" },
"ok": { "type": "boolean", "default": true },
"size": { "type": "string", "enum": ["s", "l"], "enumNames": ["Small", "Large"] },
"tags": { "type": "array", "items": { "anyOf": [{ "const": "a" }, { "const": "b" }] },
"default": ["b"], "maxItems": 2 }
}
} }))
.unwrap();
let field = |name: &str| form.fields.iter().find(|f| f.name == name).unwrap();
use AgentFormFieldKind::*;
let kinds: Vec<_> = ["count", "ratio", "ok", "size", "tags"].map(|name| field(name).kind).into();
assert_eq!(kinds, [Integer, Number, Boolean, Choice, Choices]);
assert!(field("count").required && !field("ratio").required);
assert_eq!((field("count").min, field("count").max), (Some(1.0), Some(5.0)));
assert_eq!(field("ok").default, ["true"]);
assert_eq!(field("size").options[1].label, "Large");
assert_eq!((field("tags").default.as_slice(), field("tags").max), (["b".to_owned()].as_slice(), Some(2.0)));
}
#[test]
fn url_mode_and_unsupported_fields_are_refused() {
assert!(form_of(&json!({ "mode": "url", "url": "https://example.com" })).is_err());
let nested = json!({ "mode": "form", "requestedSchema": { "type": "object", "properties": {
"address": { "type": "object" }
} } });
assert!(form_of(&nested).is_err());
}
#[test]
fn an_answer_is_typed_by_its_field() {
let form = form_of(&json!({ "mode": "form", "requestedSchema": { "type": "object", "properties": {
"count": { "type": "integer" },
"ok": { "type": "boolean" },
"size": { "type": "string", "oneOf": [{ "const": "s", "title": "Small" }] },
"tags": { "type": "array", "items": { "enum": ["a", "b"] } },
"note": { "type": "string" }
} } }))
.unwrap();
let reply = json!({ "count": ["3"], "ok": ["false"], "size": ["s"], "tags": ["a", "b"], "note": [" "] });
let (response, chosen) = answer(&form, Some(&reply.to_string()));
assert_eq!(
response,
json!({ "action": "accept", "content": { "count": 3, "ok": false, "size": "s", "tags": ["a", "b"] } })
);
assert_eq!(chosen, "count: 3; ok: no; size: Small; tags: a, b");
}
#[test]
fn declining_and_dismissing_send_no_content() {
let form = form_of(&ask()).unwrap();
assert_eq!(answer(&form, Some(DECLINE)), (json!({ "action": "decline" }), "Decline".to_owned()));
assert_eq!(answer(&form, None).0, json!({ "action": "cancel" }));
assert_eq!(answer(&form, Some("cancel")).0, json!({ "action": "cancel" }));
}
}
+20 -95
Переглянути файл
@@ -11,7 +11,6 @@ mod acp;
mod catalogs;
mod config;
mod conversation;
mod elicitation;
mod external;
pub mod mcp;
mod model;
@@ -224,7 +223,6 @@ impl Shared {
commands: Option<&[AgentCommand]>,
model: Option<&str>,
) {
let acp = self.spec(provider).is_some_and(|spec| spec.driver == provider::Driver::Acp);
let mut cache = self.known.lock();
let known = cache.entry(provider.to_owned()).or_default();
let mut changed = false;
@@ -246,12 +244,6 @@ impl Shared {
changed = true;
}
}
// Discovery reads one model's efforts; a session on another model reports that model's.
let learned = model.filter(|_| acp && known.authoritative).zip(config).map(|(model, config)| {
let levels: Vec<_> =
config.iter().filter(|o| o.category.as_deref() == Some("thought_level")).cloned().collect();
(model, levels)
});
if let Some(commands) = commands.filter(|c| !c.is_empty())
&& known.commands.get(&self.root_key()).map(Vec::as_slice) != Some(commands)
{
@@ -262,9 +254,6 @@ impl Shared {
self.persist_known(&cache);
}
drop(cache);
if let Some((model, levels)) = learned.filter(|(_, levels)| !levels.is_empty()) {
self.paths.catalogs.learn_levels(self, provider, model, levels);
}
if changed {
self.emit(AgentEvent::Providers);
}
@@ -1872,24 +1861,12 @@ impl Task {
let s = self.state.lock();
s.busy && s.task.status == AgentStatus::Running
};
let Some((live, method)) = live
.filter(|l| running && (prompt.images.is_empty() || l.capabilities.images))
.and_then(|l| steer_method(&l.init).map(|m| (l, m)))
else {
let Some(live) = live.filter(|l| running && (prompt.images.is_empty() || l.capabilities.images)) else {
return Err(prompt);
};
let content = self.content(&live, &prompt).await;
let sent: Result<Value, RpcError> =
live.peer.request(method, json!({ "sessionId": live.session, "prompt": content }), None).await;
// `_session/steering` answers with an outcome: only `injected` joined the turn
// (`promptRequired`: no turn is running any more).
let sent = match sent {
Ok(reply) => match reply.get("outcome").and_then(Value::as_str) {
None | Some("injected") => Ok(()),
Some(outcome) => Err(reply.get("reason").and_then(Value::as_str).unwrap_or(outcome).to_owned()),
},
Err(e) => Err(e.to_string()),
};
live.peer.request("_openidea/steer", json!({ "sessionId": live.session, "prompt": content }), None).await;
if let Err(e) = sent {
// The turn ended meanwhile: the message waits for the next one instead.
tracing::debug!("agent task {}: steering failed: {e}", self.id);
@@ -2389,7 +2366,12 @@ impl Task {
// first question says what it wants, as the Claude Code adapter titles its own.
let title =
if by_index { questions.first().map(|question| question.question.clone()).unwrap_or(title) } else { title };
let title = self.labelled(params, title);
// A subagent's request is answered in the task's conversation, named after the subagent.
let session = params.get("sessionId").and_then(Value::as_str);
let title = match session.and_then(|s| self.state.lock().conversation.label(s)) {
Some(label) => format!("{label}: {title}"),
None => title,
};
let options: Vec<AgentPermissionOption> = params
.get("options")
.and_then(Value::as_array)
@@ -2421,7 +2403,6 @@ impl Task {
command: None,
options,
questions: Vec::new(),
form: None,
chosen: Some("Denied: side conversations are read-only".to_owned()),
});
return match reject {
@@ -2448,7 +2429,6 @@ impl Task {
command: shown.clone(),
options,
questions: Vec::new(),
form: None,
chosen: Some(format!("Blocked by policy ({pattern})")),
});
return match reject {
@@ -2469,7 +2449,6 @@ impl Task {
command: shown.clone(),
options,
questions: Vec::new(),
form: None,
chosen: Some(format!("{} (whitelisted)", allow.name)),
});
return json!({ "outcome": { "outcome": "selected", "optionId": allow.id } });
@@ -2485,7 +2464,6 @@ impl Task {
command: shown,
options: options.clone(),
questions,
form: None,
chosen: None,
});
self.permissions.lock().insert(id, tx);
@@ -2512,7 +2490,17 @@ impl Task {
.and_then(|reply| options.iter().find(|option| &option.id == reply))
.map_or_else(|| "Cancelled".to_owned(), |option| option.name.clone()),
};
self.settle(entry, name);
{
let mut s = self.state.lock();
if let Some(AgentEntry::Permission { chosen, .. }) = s.conversation.main.entries.get_mut(entry) {
*chosen = Some(name);
}
}
self.mark_dirty([(None, entry)]);
let still_asking = !self.permissions.lock().is_empty();
if !still_asking && self.state.lock().task.status == AgentStatus::NeedsInput {
self.set_status(AgentStatus::Running, None);
}
// An agent that answers by index reads the answers beside the outcome, keyed by
// question index, with its Submit option chosen; anything less cancels the request.
if by_index {
@@ -2544,54 +2532,6 @@ impl Task {
}
}
/// A request from a subagent is answered in the task's conversation, named after the subagent.
fn labelled(&self, params: &Value, title: String) -> String {
let session = params.get("sessionId").and_then(Value::as_str);
match session.and_then(|s| self.state.lock().conversation.label(s)) {
Some(label) => format!("{label}: {title}"),
None => title,
}
}
/// An agent's form (`elicitation/create`): asked in the conversation like a permission
/// request, and answered with its values, declined or cancelled. Blocks like `ask_permission`.
fn elicit(self: &Arc<Self>, params: &Value) -> Result<Value, String> {
let form = elicitation::form_of(params)?;
let id = self.next_permission.fetch_add(1, Ordering::Relaxed);
let message = params.get("message").and_then(Value::as_str).unwrap_or_default().trim().to_owned();
let (tx, rx) = std::sync::mpsc::channel();
let entry = self.push_entry(AgentEntry::Permission {
id,
title: self.labelled(params, message),
command: None,
options: elicitation::options(),
questions: Vec::new(),
form: Some(form.clone()),
chosen: None,
});
self.permissions.lock().insert(id, tx);
self.set_status(AgentStatus::NeedsInput, None);
let reply = rx.recv().ok().flatten();
let (response, chosen) = elicitation::answer(&form, reply.as_deref());
self.settle(entry, chosen);
Ok(response)
}
/// Records the answer to the request at `entry`; the turn runs on once nothing else waits.
fn settle(self: &Arc<Self>, entry: usize, chosen: String) {
{
let mut s = self.state.lock();
if let Some(AgentEntry::Permission { chosen: answer, .. }) = s.conversation.main.entries.get_mut(entry) {
*answer = Some(chosen);
}
}
self.mark_dirty([(None, entry)]);
let still_asking = !self.permissions.lock().is_empty();
if !still_asking && self.state.lock().task.status == AgentStatus::NeedsInput {
self.set_status(AgentStatus::Running, None);
}
}
fn approve_pending(&self) {
let s = self.state.lock();
if self.cancel_pending.load(Ordering::Acquire) || !config::bypass_approvals(&s.task.config) {
@@ -2656,7 +2596,6 @@ impl Handler for Client {
let task = self.task.upgrade().ok_or((codes::INTERNAL_ERROR, "task closed".to_owned()))?;
match method {
"session/request_permission" => Ok(task.ask_permission(&params)),
"elicitation/create" => task.elicit(&params).map_err(|e| (codes::INVALID_PARAMS, e)),
_ => Err((codes::METHOD_NOT_FOUND, format!("unsupported method {method}"))),
}
}
@@ -2926,27 +2865,13 @@ fn shown_background(tasks: &[Value], known: &[AgentBackgroundTask]) -> Vec<Agent
.collect()
}
/// The method that adds a message to the running turn: OpenIDEA's own, or the
/// `_session/steering` extension an agent advertises in the response's top-level `_meta`
/// (OMP).
fn steer_method(init: &acp::Negotiated) -> Option<&'static str> {
let supported = |v: Option<&Value>| v.and_then(Value::as_bool) == Some(true);
if supported(init.meta("/openidea/steer")) {
Some("_openidea/steer")
} else if supported(init.meta.as_ref().and_then(|m| m.pointer("/steering/supported"))) {
Some("_session/steering")
} else {
None
}
}
fn capabilities_of(init: &acp::Negotiated) -> (AgentCapabilities, bool) {
let meta = |p: &str| init.meta(p).and_then(Value::as_bool) == Some(true);
let capabilities = AgentCapabilities {
images: init.prompt("image"),
fork: init.session("fork"),
rollback: meta("/openidea/rollback"),
steer: steer_method(init).is_some(),
steer: meta("/openidea/steer"),
background_tasks: meta("/openidea/backgroundTasks"),
read_only: false,
};
-57
Переглянути файл
@@ -316,59 +316,6 @@ pub struct AgentQuestionOption {
pub preview: Option<String>,
}
/// A form the agent asks the user to fill in (ACP `elicitation/create`, form mode).
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct AgentForm {
pub fields: Vec<AgentFormField>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct AgentFormField {
/// The property name the answer is keyed by.
pub name: String,
pub title: String,
#[serde(default)]
pub description: String,
#[serde(default)]
pub required: bool,
pub kind: AgentFormFieldKind,
/// The choices of a `choice` or `choices` field.
#[serde(default)]
pub options: Vec<AgentFormOption>,
/// The initial answer: option values, a text, a number, or `true` / `false`.
#[serde(default)]
pub default: Vec<String>,
/// Bounds: the number of a `number` / `integer`, the length of a `text`, the count of `choices`.
#[serde(default)]
pub min: Option<f64>,
#[serde(default)]
pub max: Option<f64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub enum AgentFormFieldKind {
Text,
Number,
Integer,
Boolean,
/// One of `options`.
Choice,
/// Any of `options`.
Choices,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct AgentFormOption {
pub value: String,
pub label: String,
#[serde(default)]
pub description: String,
}
/// One item of a task's conversation.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Type)]
#[serde(tag = "type", rename_all = "camelCase", rename_all_fields = "camelCase")]
@@ -449,10 +396,6 @@ pub enum AgentEntry {
/// of question to answer instead of an option.
#[serde(default)]
questions: Vec<AgentQuestion>,
/// Set when the agent asks for a form (ACP elicitation); answered with a JSON object of
/// field name to its values, `decline`, or nothing to cancel.
#[serde(default)]
form: Option<AgentForm>,
/// Name of the chosen option, or `None` while pending. Cancelled requests read "Cancelled".
chosen: Option<String>,
},
-119
Переглянути файл
@@ -51,9 +51,6 @@ struct FakeAgent {
/// Config options `session/new` reports after the model one (per-model efforts, say).
extra_options: Mutex<Vec<Value>>,
model_options: Mutex<HashMap<String, Vec<Value>>>,
/// Advertises steering as OMP does (`_meta.steering` at the top of `initialize`)
/// instead of `_meta.openidea.steer`.
session_steering: bool,
}
impl FakeAgent {
@@ -159,10 +156,6 @@ impl Handler for FakeAgent {
if params.pointer("/clientCapabilities/subagents").is_some_and(Value::is_object) {
self.calls.lock().push("subagents".into());
}
if self.session_steering {
return Ok(json!({"protocolVersion": 1, "agentCapabilities": {"loadSession": true},
"_meta": {"steering": {"supported": true}}}));
}
Ok(
json!({"protocolVersion": 1, "authMethods": self.auth_methods, "agentCapabilities": {"loadSession": !self.no_load,
"sessionCapabilities": {"fork": {}}, "_meta": {"openidea": {"rollback": true, "steer": true, "backgroundTasks": true}}}}),
@@ -190,13 +183,6 @@ impl Handler for FakeAgent {
self.calls.lock().push(format!("{method} {detail}"));
Ok(json!({}))
}
"_session/steering" => {
let text = params["prompt"][0]["text"].clone();
self.calls.lock().push(format!("{method} {text}"));
// OMP answers whether the message joined the turn rather than failing.
let outcome = if text == "too late" { "promptRequired" } else { "injected" };
Ok(json!({"outcome": outcome, "queue": "steering"}))
}
"session/load" => {
self.say(&session, "replayed history");
Ok(json!({}))
@@ -295,23 +281,6 @@ impl Handler for FakeAgent {
self.say(&session, &format!("escalation chose {chosen}"));
return Ok(json!({"stopReason": "end_turn"}));
}
if text == "form" {
let peer = self.latest();
let answer: Value = tokio::runtime::Handle::current()
.block_on(peer.request(
"elicitation/create",
json!({"sessionId": session, "mode": "form", "message": "How should I refactor?",
"requestedSchema": {"type": "object", "required": ["strategy"], "properties": {
"strategy": {"type": "string", "title": "Strategy",
"oneOf": [{"const": "safe", "title": "Conservative"},
{"const": "bold", "title": "Aggressive"}]},
"tests": {"type": "boolean", "title": "Run tests"}}}}),
None,
))
.unwrap();
self.say(&session, &format!("form {answer}"));
return Ok(json!({ "stopReason": "end_turn" }));
}
if text == "ask" {
let peer = self.latest();
let answer: Value = tokio::runtime::Handle::current()
@@ -1091,42 +1060,6 @@ fn text(t: &str) -> AgentPrompt {
AgentPrompt { text: t.into(), ..AgentPrompt::default() }
}
#[tokio::test(flavor = "multi_thread")]
async fn steers_through_session_steering() {
let tmp = tempfile::tempdir().unwrap();
let agent = Arc::new(FakeAgent { session_steering: true, ..FakeAgent::default() });
let mgr = manager(tmp.path(), agent.clone());
let task = mgr
.create(NewAgentTask {
project_root: None,
prompt: text("wait"),
provider: "claude".into(),
config: vec![],
isolation: Isolation::Local,
base: None,
})
.await
.unwrap();
wait_for(&mgr, &task.id, AgentStatus::Running).await;
assert!(mgr.task(&task.id).unwrap().state.lock().task.capabilities.steer);
mgr.prompt(&task.id, text("also this"), true).await.unwrap();
assert!(agent.calls.lock().iter().any(|c| c == "_session/steering \"also this\""));
let entries = mgr.entries(&task.id, None).unwrap();
assert!(matches!(entries.last(), Some(AgentEntry::User { steered: true, .. })));
assert!(mgr.task(&task.id).unwrap().state.lock().task.queue.is_empty());
// The agent didn't take it into the turn: the turn stops and it goes next, as without
// steering (the fake agent's next turn asks for permission).
mgr.prompt(&task.id, text("too late"), true).await.unwrap();
wait_for(&mgr, &task.id, AgentStatus::NeedsInput).await;
let entries = mgr.entries(&task.id, None).unwrap();
assert!(entries.iter().any(|e| matches!(e, AgentEntry::User { text, steered: false, .. } if text == "too late")));
assert!(!entries.iter().any(|e| matches!(e, AgentEntry::User { text, steered: true, .. } if text == "too late")));
mgr.cancel(&task.id, None).unwrap();
wait_for(&mgr, &task.id, AgentStatus::Ready).await;
}
#[tokio::test(flavor = "multi_thread")]
async fn messages_sent_while_busy_are_queued_and_send_now_interrupts() {
let tmp = tempfile::tempdir().unwrap();
@@ -2052,58 +1985,6 @@ async fn bypass_approvals_keeps_both_question_dialects_pending_but_allows_permis
}
}
#[tokio::test(flavor = "multi_thread")]
async fn an_agent_form_is_answered_declined_or_cancelled_even_when_approvals_are_bypassed() {
let accept = json!({"strategy": ["bold"], "tests": ["true"]}).to_string();
for (reply, said, chosen) in [
(
Some(accept.as_str()),
r#"form {"action":"accept","content":{"strategy":"bold","tests":true}}"#,
"Strategy: Aggressive; Run tests: yes",
),
(Some("decline"), r#"form {"action":"decline"}"#, "Decline"),
(None, r#"form {"action":"cancel"}"#, "Cancelled"),
] {
let tmp = tempfile::tempdir().unwrap();
let mgr = manager(tmp.path(), Arc::new(FakeAgent::default()));
let task = mgr
.create(NewAgentTask {
project_root: None,
prompt: text("form"),
provider: "cursor".into(),
config: vec![AgentConfigChoice { id: config::CURSOR_APPROVAL.into(), value: "bypass".into() }],
isolation: Isolation::Local,
base: None,
})
.await
.unwrap();
wait_for(&mgr, &task.id, AgentStatus::NeedsInput).await;
let (id, form) = mgr
.entries(&task.id, None)
.unwrap()
.into_iter()
.find_map(|entry| match entry {
AgentEntry::Permission { id, title, form: Some(form), chosen: None, .. }
if title == "How should I refactor?" =>
{
Some((id, form))
}
_ => None,
})
.unwrap();
assert_eq!(form.fields.iter().map(|f| f.name.as_str()).collect::<Vec<_>>(), ["strategy", "tests"]);
mgr.respond(&task.id, id, reply.map(str::to_owned)).unwrap();
wait_for(&mgr, &task.id, AgentStatus::Ready).await;
let entries = mgr.entries(&task.id, None).unwrap();
assert!(entries.iter().any(|e| matches!(e, AgentEntry::Agent { text } if text == said)), "{entries:?}");
assert!(
entries.iter().any(|e| matches!(e, AgentEntry::Permission { chosen: Some(c), .. } if c == chosen)),
"{entries:?}"
);
mgr.shutdown();
}
}
#[tokio::test(flavor = "multi_thread")]
async fn cursor_approval_choice_applies_before_first_prompt() {
let tmp = tempfile::tempdir().unwrap();
-1
Переглянути файл
@@ -441,7 +441,6 @@ mod tests {
command: None,
options: vec![],
questions: vec![],
form: None,
chosen: None,
});
assert_eq!(t.end_turn(None), vec![2, 3]);
-2
Переглянути файл
@@ -19,7 +19,6 @@ pub enum Tool {
Maven,
Gradle,
Ruby,
Zig,
}
impl Tool {
@@ -33,7 +32,6 @@ impl Tool {
Tool::Maven => &["maven"],
Tool::Gradle => &["gradle"],
Tool::Ruby => &["ruby"],
Tool::Zig => &["zig"],
}
}
}
+1 -3
Переглянути файл
@@ -1275,9 +1275,7 @@ impl Project {
}
let defaults = self.documents.file_defaults();
let fallback = defaults.fallback_for(path);
// The working file only when it is a regular file: a path that is a directory there
// (a committed symlink to a folder, a file replaced by a folder) has only its blob.
if path.is_file() {
if path.exists() {
let loaded = ide_vfs::load_text_with_fallback(path, fallback)?;
return encoding_rs::Encoding::for_label(loaded.encoding.as_bytes())
.ok_or_else(|| ide_core::IdeError::invalid("unknown file encoding"));
-46
Переглянути файл
@@ -111,49 +111,3 @@ async fn gbk_document_gutter_diff_stage_and_rollback_share_encoding() {
assert_eq!(vcs::vcs_file_at(&host, "main", utf8, None).await.unwrap().as_deref(), Some(old));
host.close_project("main");
}
/// A committed symlink to a folder (#3528): its revision is the link target, even though the
/// working path is a directory.
#[cfg(unix)]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn a_directory_symlink_revision_is_its_target() {
let temp = tempfile::tempdir().unwrap();
let base = dunce::canonicalize(temp.path()).unwrap();
let root = base.join("project");
std::fs::create_dir_all(root.join("target")).unwrap();
git(&root, &["init", "-b", "main"]);
git(&root, &["config", "user.name", "Test"]);
git(&root, &["config", "user.email", "[email protected]"]);
git(&root, &["config", "commit.gpgsign", "false"]);
std::fs::write(root.join("target/file.txt"), "example\n").unwrap();
std::os::unix::fs::symlink("target", root.join("dir-link")).unwrap();
git(&root, &["add", "."]);
git(&root, &["commit", "-m", "Add a directory symlink"]);
let host = Host::new(HostConfig {
config_dir: base.join("config"),
data_dir: base.join("data"),
local_data_dir: base.join("data"),
languages: Arc::new(ide_language::LanguageRegistry::load(None).unwrap()),
syntax: Arc::default(),
sink_for: Box::new(|_| Arc::new(NullSink)),
owner: |w| w,
runtime: tokio::runtime::Handle::current(),
project_environment: false,
});
host.trust.decide(&root, true, false).unwrap();
let project = host.open_project("main", &root).unwrap();
for _ in 0..500 {
if !project.repos().is_empty() {
break;
}
tokio::time::sleep(Duration::from_millis(10)).await;
}
let link = root.join("dir-link");
assert!(link.is_dir());
assert_eq!(
vcs::vcs_file_at(&host, "main", link.clone(), Some("HEAD".into())).await.unwrap().as_deref(),
Some("target")
);
assert_eq!(vcs::vcs_file_mode(&host, "main", link, Some("HEAD".into())).await.unwrap().as_deref(), Some("120000"));
host.close_project("main");
}
+11 -25
Переглянути файл
@@ -78,8 +78,8 @@ impl Needle {
let mut b = 0;
if n.eq_ignore_ascii_case(q) {
b += EXACT;
} else if let Some(dot) = n.iter().position(|&b| b == b'.')
&& n[..dot].eq_ignore_ascii_case(q)
} else if let Some(dot) = name.find('.')
&& name.as_bytes()[..dot].eq_ignore_ascii_case(q)
{
b += EXACT_STEM;
} else if n.len() >= q.len() && n[..q.len()].eq_ignore_ascii_case(q) {
@@ -97,31 +97,17 @@ fn hump_bonus(s: &str, indices: &[u32]) -> u32 {
if indices.is_empty() {
return 0;
}
// One pass over `s`: `indices` is sorted, and whether position `i` is a
// word start only needs the char before it, so no `Vec<char>` is collected.
let is_start = |prev: Option<char>, c: char| match prev {
None => true,
Some(p) => {
!p.is_alphanumeric()
|| (p.is_lowercase() && c.is_uppercase())
|| (!p.is_ascii_digit() && c.is_ascii_digit())
let chars: Vec<char> = s.chars().collect();
let is_start = |i: usize| {
if i == 0 {
return true;
}
let (p, c) = (chars[i - 1], chars[i]);
!p.is_alphanumeric() || (p.is_lowercase() && c.is_uppercase()) || (!p.is_ascii_digit() && c.is_ascii_digit())
};
let (mut humps, mut next, mut first_start) = (0u32, 0usize, false);
let (mut prev, mut at) = (None, 0u32);
for c in s.chars() {
if next < indices.len() && indices[next] == at {
let started = is_start(prev, c);
humps += u32::from(started);
if next == 0 {
first_start = started;
}
next += 1;
}
prev = Some(c);
at += 1;
}
humps * HUMP + u32::from(first_start) * FIRST_AT_START
let humps = indices.iter().filter(|&&i| (i as usize) < chars.len() && is_start(i as usize)).count() as u32;
let first = if is_start(indices[0] as usize) { FIRST_AT_START } else { 0 };
humps * HUMP + first
}
#[derive(Clone, Copy)]
-5
Переглянути файл
@@ -170,11 +170,6 @@ pub struct LanguageServerConfig {
/// basedpyright): only used while none of those is installed.
#[serde(default)]
pub fallback: bool,
/// Names of servers listed after this one that it makes redundant (a PHP server
/// with its own Laravel support replaces `laravel-lsp`): they aren't used while
/// this one serves the file.
#[serde(default)]
pub replaces: Vec<String>,
/// What the server is used for (`completion`, `code-action`, `diagnostics`,
/// … `FEATURES` in `ide-lsp/src/caps.rs`); empty means everything. The other
/// capabilities it announces are ignored, so a refactoring-only server next
+1 -4
Переглянути файл
@@ -758,10 +758,7 @@ mod tests {
let cfg = reg.get(&LanguageId::new("php")).unwrap();
let names: Vec<&str> = cfg.language_servers.iter().map(|s| s.name.as_str()).collect();
// After the fallback: hover, rename and symbols stay with Intelephense.
assert_eq!(names, ["intelephense", "phpactor", "phoxite", "laravel-lsp"]);
// Phoxite answers the Laravel strings itself.
let phoxite = cfg.language_servers.iter().find(|s| s.name == "phoxite").unwrap();
assert!(phoxite.fallback && phoxite.replaces == ["laravel-lsp"]);
assert_eq!(names, ["intelephense", "phpactor", "laravel-lsp"]);
let lsp = cfg.language_servers.iter().find(|s| s.name == "laravel-lsp").unwrap();
assert_eq!(lsp.command.as_str(), "laravel-lsp");
// Its `lsp` command takes no options and speaks over stdio; `--stdio` stops it at startup.
+9 -26
Переглянути файл
@@ -660,17 +660,15 @@ impl LspManager {
/// The servers serving `path`: every regular one, and each `fallback` one
/// only while all servers listed before it have given up (missing, not
/// launchable, or crashed for good). One that requires a root marker serves
/// only files below one, and stands in for no other. One that a server before
/// it `replaces` is left out while that server serves the file.
/// only files below one, and stands in for no other.
fn servers_for(&self, language: &LanguageId, path: &Path) -> Vec<Arc<Server>> {
if let Some(servers) = self.arduino_servers(language, path) {
return servers;
}
let mut out = Vec::new();
let mut available_before = false;
let mut replaced: Vec<String> = Vec::new();
for sc in &self.language_servers(language) {
if (sc.fallback && available_before) || replaced.contains(&sc.name) {
if sc.fallback && available_before {
continue;
}
if sc.require_root_marker
@@ -680,9 +678,6 @@ impl LspManager {
}
let server = self.server_for(sc, language, path);
available_before |= !sc.require_root_marker && !server.gave_up();
if !server.gave_up() {
replaced.extend(sc.replaces.iter().cloned());
}
out.push(server);
}
out
@@ -870,7 +865,7 @@ impl LspManager {
ide_core::event::ServerStatus::Missing,
Some(message),
) {
self.fallbacks_take_over().await;
self.attach_fallbacks();
}
return;
}
@@ -883,7 +878,7 @@ impl LspManager {
ide_core::event::ServerStatus::Misconfigured,
Some(message),
) {
self.fallbacks_take_over().await;
self.attach_fallbacks();
}
return;
}
@@ -896,7 +891,7 @@ impl LspManager {
ide_core::event::ServerStatus::Crashed,
Some(message),
) {
self.fallbacks_take_over().await;
self.attach_fallbacks();
}
return;
}
@@ -1044,7 +1039,7 @@ impl LspManager {
}
}
// Gave up (crashed repeatedly, or its build expired): the fallbacks it hid take over.
None => self.fallbacks_take_over().await,
None => self.attach_fallbacks(),
}
}
@@ -3469,10 +3464,7 @@ impl LspManager {
virtual_doc::is_decompiled(&text)
};
let title = title.unwrap_or_else(|| virtual_doc::title(uri, decompiled));
let mut detected = self.languages.detect(Path::new(&title), None);
if let Some(stem) = title.strip_suffix(".class").filter(|_| virtual_doc::is_java_class_stub(&text)) {
detected = self.languages.detect(Path::new(&format!("{stem}.java")), None);
}
let detected = self.languages.detect(Path::new(&title), None);
let language_id = if detected == LanguageId::plain_text() {
languages.first().cloned().unwrap_or(detected)
} else {
@@ -3836,16 +3828,8 @@ impl LspManager {
}
}
/// A server gave up: its fallbacks take over the open documents, and the servers
/// they replace leave.
async fn fallbacks_take_over(&self) {
self.attach_fallbacks();
self.detach_shadowed_fallbacks().await;
}
/// A server enabled again shadows the fallbacks attached in its place, and a
/// fallback that took over may replace a server attached earlier: they leave the
/// open documents, and stop once no document uses them.
/// A server enabled again shadows the fallbacks attached in its place: they
/// leave the open documents, and stop once no document uses them.
async fn detach_shadowed_fallbacks(&self) {
let open: Vec<(DocId, LanguageId, PathBuf)> =
self.docs.lock().iter().map(|(id, d)| (*id, d.language.clone(), d.path.clone())).collect();
@@ -3861,7 +3845,6 @@ impl LspManager {
.filter(|a| {
!wanted.iter().any(|w| w.id == a.server.id)
&& (configs.iter().any(|c| c.fallback && c.name == a.server.name)
|| configs.iter().any(|c| c.replaces.contains(&a.server.name))
|| (a.server.name == "clangd" && wanted.iter().any(|s| s.name == arduino::SERVER)))
})
.map(|a| a.server.id)
-22
Переглянути файл
@@ -110,17 +110,6 @@ pub fn is_decompiled(text: &str) -> bool {
})
}
/// Whether a `.class` stub is written in Java: its first `package` or `import` line ends with `;`.
/// The Kotlin language server shows Java classes from jars as Java and Kotlin ones as Kotlin, under
/// the same `.class` name.
pub fn is_java_class_stub(text: &str) -> bool {
text.lines()
.take(200)
.map(str::trim)
.find(|line| line.starts_with("package ") || line.starts_with("import "))
.is_some_and(|line| line.ends_with(';'))
}
/// `scheme` of a URI (`jdt` for `jdt://…`).
pub fn scheme(uri: &str) -> &str {
uri.split_once(':').map(|(s, _)| s).unwrap_or("")
@@ -216,17 +205,6 @@ mod tests {
const JDT: &str = "jdt://contents/spring-boot-4.1.1.jar/org.springframework.boot/SpringApplication.class?=spring-demo/%5C/Users%5C/me%5C/.m2%5C/repository%5C/spring-boot-4.1.1.jar%3Corg.springframework.boot%28SpringApplication.class";
#[test]
fn class_stubs_in_java_or_kotlin() {
let java = "// IntelliJ API Decompiler stub source generated from a class file\n\npackage com.boydti.fawe.util;\n\npublic class EditSessionBuilder {\n}\n";
let kotlin = "// IntelliJ API Decompiler stub source generated from a class file\n// Implementation of methods is not available\n\npackage kotlin.collections\n\npublic fun <T> listOf(): List<T> { /* compiled code */ }\n";
let imports_only = "import java.util.List;\n\npublic class A {}\n";
assert!(is_java_class_stub(java));
assert!(is_java_class_stub(imports_only));
assert!(!is_java_class_stub(kotlin));
assert!(!is_java_class_stub("public class A {}"));
}
#[test]
fn csharp_metadata_titles_and_kinds() {
for (uri, expected) in [
-62
Переглянути файл
@@ -264,7 +264,6 @@ fn server_cfg(name: &str) -> LanguageServerConfig {
install_hint: Some(format!("install {name}")),
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
@@ -3287,67 +3286,6 @@ async fn a_server_requiring_a_root_marker_serves_only_files_below_one() {
h.wait_status("alt", ServerStatus::Ready).await;
}
/// A server that `replaces` another (a PHP server with its own Laravel support and
/// `laravel-lsp`) keeps it away while it serves, and only then.
#[tokio::test(flavor = "multi_thread")]
async fn a_replaced_server_stays_away_while_its_replacement_serves() {
let servers = [("main", incremental_caps()), ("alt", incremental_caps()), ("framework", incremental_caps())];
let configure = |cfg: &mut LanguageServerConfig| match cfg.name.as_str() {
"alt" => {
cfg.fallback = true;
cfg.replaces = vec!["framework".into()];
}
"framework" => cfg.require_root_marker = true,
_ => {}
};
let h = harness_configured("mock", "mk", &servers, configure);
let disabled: Arc<Mutex<Vec<String>>> = Default::default();
{
let disabled = disabled.clone();
h.mgr.set_servers_hook(Box::new(move |_, defined| {
defined.iter().filter(|c| !disabled.lock().contains(&c.name)).cloned().collect()
}));
}
std::fs::write(h.root.join("mock.toml"), "").unwrap();
let (_, path) = h.open("a.mk", "x");
let uri = uri_of(&path);
// The preferred server serves: the framework's server joins it, the alternative stays away.
h.wait_status("main", ServerStatus::Ready).await;
h.wait_status("framework", ServerStatus::Ready).await;
eventually(|| h.launcher.state("framework").docs.lock().contains_key(&uri)).await;
assert!(h.statuses("alt").is_empty());
// The alternative takes over: the server it replaces closes the document and stops.
disabled.lock().push("main".into());
h.mgr.reconfigure().await;
h.wait_status("alt", ServerStatus::Ready).await;
eventually(|| h.launcher.state("alt").docs.lock().contains_key(&uri)).await;
assert!(!h.launcher.state("framework").notified("textDocument/didClose").is_empty());
assert_eq!(h.statuses("framework").last(), Some(&ServerStatus::Stopped));
assert_eq!(h.mgr.servers().iter().map(|s| s.name.as_str()).collect::<Vec<_>>(), ["alt"]);
// The preferred server again: the framework's server comes back with it.
disabled.lock().clear();
h.mgr.reconfigure().await;
h.wait_status("main", ServerStatus::Ready).await;
eventually(|| h.statuses("framework").last() == Some(&ServerStatus::Ready)).await;
assert_eq!(h.statuses("alt").last(), Some(&ServerStatus::Stopped));
// A preferred server that is not installed: the alternative replaces the framework's
// server although that one attached first.
let servers = [("ghost", json!({})), ("alt", incremental_caps()), ("framework", incremental_caps())];
let h = harness_configured("mock", "mk", &servers, configure);
h.launcher.state("ghost").missing.store(true, Ordering::SeqCst);
std::fs::write(h.root.join("mock.toml"), "").unwrap();
let (_, path) = h.open("a.mk", "x");
let uri = uri_of(&path);
h.wait_status("ghost", ServerStatus::Missing).await;
h.wait_status("alt", ServerStatus::Ready).await;
eventually(|| h.launcher.state("alt").docs.lock().contains_key(&uri)).await;
eventually(|| !h.mgr.servers().iter().any(|s| s.name == "framework")).await;
}
#[tokio::test(flavor = "multi_thread")]
async fn a_fallback_leaves_when_the_preferred_server_is_enabled_again() {
let h = harness_with_fallbacks(&[("main", incremental_caps()), ("alt", incremental_caps())], &["alt"]);
-3
Переглянути файл
@@ -419,7 +419,6 @@ async fn missing_binary_is_reported_with_install_hint() {
install_hint: Some("npm i -g nope-ls".into()),
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
@@ -693,7 +692,6 @@ async fn typescript_language_server_end_to_end() {
install_hint: None,
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
@@ -747,7 +745,6 @@ fn npm_server(tools: &Path, name: &str, bin: &str, init: Option<serde_json::Valu
install_hint: None,
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
-1
Переглянути файл
@@ -1306,7 +1306,6 @@ fn custom_server(name: &str, ls: &LanguageServerSettings) -> LanguageServerConfi
}),
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
-82
Переглянути файл
@@ -25,7 +25,6 @@ pub fn detect(kind: SdkKind, root: Option<&Path>) -> Vec<Sdk> {
SdkKind::Jdk => jdk(),
SdkKind::Maven => maven(),
SdkKind::Ruby => crate::ruby::detect(root),
SdkKind::Zig => zig(),
};
if let Some(root) = root {
pinned_first(&mut out, kind, root);
@@ -41,7 +40,6 @@ fn tool_of(kind: SdkKind) -> Option<Tool> {
SdkKind::Jdk => Some(Tool::Java),
SdkKind::Maven => Some(Tool::Maven),
SdkKind::Ruby => Some(Tool::Ruby),
SdkKind::Zig => Some(Tool::Zig),
SdkKind::Php | SdkKind::PackageManager | SdkKind::Rust | SdkKind::TypeScript => None,
}
}
@@ -741,86 +739,6 @@ fn go() -> Vec<Sdk> {
})
}
// ------------------------------------------------------------------ zig
/// The directory holding the `zig` executable of the install rooted at `base`,
/// the way the common distributions lay it out: `zig` at the root (official
/// tarballs, mise / asdf installs), `<base>/bin/zig` (Homebrew) or one
/// directory down (zvm's nested version folders).
fn zig_dir(base: &Path) -> Option<PathBuf> {
if base.join(exe("zig")).is_file() {
return Some(base.to_path_buf());
}
let bin = base.join(bin_dir());
if bin.join(exe("zig")).is_file() {
return Some(bin);
}
subdirs(base).into_iter().find(|d| d.join(exe("zig")).is_file())
}
/// Zig toolchains: PATH, Homebrew, zvm and mise / asdf installs. `path` is the
/// directory holding `zig`, which is what `languages.zig.zig` stores.
fn zig() -> Vec<Sdk> {
let mut roots: Vec<(PathBuf, &'static str)> = Vec::new();
if let Some(bin) = which("zig").filter(|p| !version_managers::is_shim(p))
&& let Some(dir) = bin.parent()
{
roots.push((dir.to_path_buf(), "path"));
}
for p in ["/opt/homebrew/opt/zig", "/usr/local/opt/zig"] {
roots.push((PathBuf::from(p), "system"));
}
if let Some(home) = home_dir() {
for d in subdirs(&home.join(".zvm")) {
roots.push((d, "zvm"));
}
}
for (d, manager) in version_managers::installs(Tool::Zig) {
roots.push((d, manager));
}
let mut dirs: Vec<(PathBuf, &'static str)> =
roots.into_iter().filter_map(|(base, source)| zig_dir(&base).map(|dir| (dir, source))).collect();
let mut seen = HashSet::new();
dirs.retain(|(dir, _)| seen.insert(dir.canonicalize().unwrap_or_else(|_| dir.clone())));
par_map(&dirs, |(dir, source)| {
let version = query(&dir.join(exe("zig")), &["version"], VERSION_TIMEOUT).map(|v| v.trim().to_owned());
Some(Sdk {
path: dir.clone().into(),
name: format!("Zig {}", version.as_deref().unwrap_or_default()).trim().to_owned(),
version,
source: (*source).to_owned(),
home: Some(dir.clone().into()),
extra: None,
})
})
}
#[cfg(test)]
mod zig_tests {
use super::*;
#[test]
fn finds_the_zig_directory_of_each_layout() {
let tmp = tempfile::tempdir().unwrap();
let install = |rel: &str| {
let dir = tmp.path().join(rel);
std::fs::create_dir_all(&dir).unwrap();
std::fs::write(dir.join(exe("zig")), "").unwrap();
dir
};
// Official tarballs and mise / asdf installs: `zig` at the root.
let root = install("0.14.1");
assert_eq!(zig_dir(&root), Some(root));
// Homebrew: <opt>/bin/zig.
let brew = install("brew/bin");
assert_eq!(zig_dir(brew.parent().unwrap()), Some(brew));
// zvm: one directory down.
let zvm = install("zvm/x");
assert_eq!(zig_dir(&tmp.path().join("zvm")), Some(zvm));
assert_eq!(zig_dir(&tmp.path().join("missing")), None);
}
}
// ------------------------------------------------------------------ typescript
/// `node_modules/typescript/lib` of the project (root or a direct workspace member).
-2
Переглянути файл
@@ -52,8 +52,6 @@ pub enum SdkKind {
/// Maven homes.
Maven,
Ruby,
/// Zig toolchain directories.
Zig,
}
/// One installed interpreter / toolchain.
-1
Переглянути файл
@@ -35,7 +35,6 @@ pub(crate) fn server(name: &str) -> LanguageServerConfig {
install_hint: None,
connect: None,
fallback: false,
replaces: Vec::new(),
features: Vec::new(),
code_action_kinds: Vec::new(),
max_java: None,
-10
Переглянути файл
@@ -61,9 +61,6 @@ fn mise_and_asdf_installs_are_detected_and_pinned_versions_used() {
script(&maven.join("bin/mvn"), "Apache Maven 3.9.6");
write(&maven.join("lib/maven-core-3.9.6.jar"), "");
script(&installs.join("gradle/8.7/bin/gradle"), "Gradle 8.7");
// Zig: asdf keeps the executable at the install root, zvm under ~/.zvm.
script(&asdf.join("installs/zig/0.14.1/zig"), "0.14.1");
script(&tmp.join("home/.zvm/0.13.0/zig"), "0.13.0");
let project = tmp.join("project");
write(
@@ -94,13 +91,6 @@ fn mise_and_asdf_installs_are_detected_and_pinned_versions_used() {
let mvn = find(&mavens, &maven);
assert_eq!((mvn.source.as_str(), mvn.version.as_deref()), ("mise", Some("3.9.6")));
let zigs = detect(SdkKind::Zig, Some(&project));
let zig = find(&zigs, &asdf.join("installs/zig"));
assert_eq!((zig.source.as_str(), zig.version.as_deref()), ("asdf", Some("0.14.1")));
assert_eq!(zig.path, asdf.join("installs/zig/0.14.1"), "the setting stores the directory");
let zvm = find(&zigs, &tmp.join("home/.zvm"));
assert_eq!((zvm.source.as_str(), zvm.version.as_deref()), ("zvm", Some("0.13.0")));
// Nothing configured in Settings: the pinned versions apply.
let s = Settings::default();
let jdk = ide_sdk::apply::project_jdk(&project, &s).expect("pinned JDK");
-22
Переглянути файл
@@ -170,28 +170,6 @@ mod tests {
assert_eq!(select_asset(&["laravel-lsp"], rules, LINUX_X64), None);
}
#[test]
fn phoxite_assets() {
let names = [
"phoxite-lsp-aarch64-apple-darwin",
"phoxite-lsp-x86_64-apple-darwin",
"phoxite-lsp-aarch64-unknown-linux-gnu",
"phoxite-lsp-x86_64-unknown-linux-gnu",
"phoxite-lsp-x86_64-pc-windows-msvc.exe",
// Not for any platform here: the musl build, the checksums, the VS Code packages.
"phoxite-lsp-x86_64-unknown-linux-musl",
"phoxite-lsp-x86_64-unknown-linux-gnu.sha256",
"phoxite-lsp-x86_64-pc-windows-msvc.exe.sha256",
"phoxite-linux-x64-0.2.1.vsix",
];
let rules = crate::registry::find("phoxite").unwrap().asset_rules();
assert_eq!(select_asset(&names, rules, MAC_ARM), Some(names[0]));
assert_eq!(select_asset(&names, rules, MAC_X64), Some(names[1]));
assert_eq!(select_asset(&names, rules, LINUX_ARM), Some(names[2]));
assert_eq!(select_asset(&names, rules, LINUX_X64), Some(names[3]));
assert_eq!(select_asset(&names, rules, WIN), Some(names[4]));
}
#[test]
fn kmp_lsp_assets_include_the_native_jar_indexer() {
let names = [
-32
Переглянути файл
@@ -458,38 +458,6 @@ pub static TOOLS: &[ToolSpec] = &[
homepage: "https://github.com/laravel/lsp",
needs: &[],
},
ToolSpec {
name: "phoxite",
display: "Phoxite",
kind: LanguageServer,
commands: &["phoxite-lsp"],
// Plain binaries per platform (`phoxite-lsp-<target triple>[.exe]`), each with a
// `.sha256` beside it.
method: Method::Release {
source: ReleaseSource::GitHub { repo: "samehelhawary/phoxite" },
assets: &[
rule(Mac, Arm64, "phoxite-lsp-aarch64-apple-darwin"),
rule(Mac, X64, "phoxite-lsp-x86_64-apple-darwin"),
rule(Linux, Arm64, "phoxite-lsp-aarch64-unknown-linux-gnu"),
rule(Linux, X64, "phoxite-lsp-x86_64-unknown-linux-gnu"),
rule(Windows, Arm64, "phoxite-lsp-aarch64-pc-windows-msvc.exe"),
rule(Windows, X64, "phoxite-lsp-x86_64-pc-windows-msvc.exe"),
],
locate: &[
"phoxite-lsp",
"phoxite-lsp-aarch64-apple-darwin",
"phoxite-lsp-x86_64-apple-darwin",
"phoxite-lsp-aarch64-unknown-linux-gnu",
"phoxite-lsp-x86_64-unknown-linux-gnu",
"phoxite-lsp-aarch64-pc-windows-msvc",
"phoxite-lsp-x86_64-pc-windows-msvc",
],
},
fallback: None,
version: ver("phoxite-lsp"),
homepage: "https://github.com/samehelhawary/phoxite",
needs: &[],
},
ToolSpec {
name: "gopls",
display: "gopls",
+1 -1
Переглянути файл
@@ -43,7 +43,7 @@ User-visible text is written in English at the call site and goes through the te
## WebKit compatibility
On macOS and Linux the app runs in WebKit, and the supported floor is Safari 15.4, the engine of macOS 12 (the app's minimum). `pnpm build` runs `scripts/check-webkit.ts` on the bundle, and `src/platform/webkitCompatibility.test.ts` checks application regexes. Avoid:
On macOS and Linux the app runs in WebKit, and the supported floor is Safari 16, the engine of macOS 13 (on macOS 11 and 12 a Safari update doesn't update the engine other apps use). `pnpm build` runs `scripts/check-webkit.ts` on the bundle, and `src/platform/webkitCompatibility.test.ts` checks application regexes. Avoid:
- regex lookbehind (`(?<=…)`, `(?<!…)`), which needs Safari 16.4, and the regex `v` flag;
- import attributes;
+1 -1
Переглянути файл
@@ -117,7 +117,7 @@ With tabs placed left or right, the tab column is as wide as its longest name, u
| **Go to Next Splitter** | `⌥⇥` | `Alt+Tab` |
| **Go to Previous Splitter** | `⌥⇧⇥` | `Alt+Shift+Tab` |
**Window › Editor Tabs** also offers **Split Down**, **Unsplit**, **Unsplit All**, **Move to Opposite Group**, **Open in Opposite Group** and **Change Splitter Orientation**. You can also drag a tab to an edge of the editor area to split it. In the Project view, **Open in Right Split** (`⇧↵` / `Shift+Enter`, also in the context menu) opens the selected file in the split to the right.
**Window › Editor Tabs** also offers **Split Down**, **Unsplit**, **Unsplit All**, **Move to Opposite Group**, **Open in Opposite Group** and **Change Splitter Orientation**. You can also drag a tab to an edge of the editor area to split it.
## View options
+1 -1
Переглянути файл
@@ -9,7 +9,7 @@ In the file names below, `<version>` is the release version, for example `0.1.40
## macOS
macOS 12 Monterey or later.
macOS 13 Ventura or later.
| Mac | File |
| ------------- | -------------------------------- |
-1
Переглянути файл
@@ -101,7 +101,6 @@ Each entry starts one LSP server. Servers are listed in order; all regular serve
| `settings` | table | Answers the server's `workspace/configuration` requests. Without it, the requested sections are looked up in `initialization-options`. |
| `install-hint` | string | Shown when the server is missing and the IDE cannot install it. |
| `fallback` | bool | An alternative to the servers listed before it; used only while none of them is installed. |
| `replaces` | string array | Names of servers listed after this one that it makes redundant. They are not used while this server serves the file. Use it for an alternative that covers what an added server does. |
| `features` | string array | Use the server only for these features; empty means everything. Values: `completion`, `inline-completion`, `hover`, `signature-help`, `definition`, `declaration`, `type-definition`, `implementation`, `references`, `document-highlight`, `document-symbol`, `workspace-symbol`, `code-action`, `code-lens`, `rename`, `formatting`, `inlay-hint`, `semantic-tokens`, `document-link`, `call-hierarchy`, `type-hierarchy`, `folding-range`, `selection-range`, `diagnostics`. |
| `code-action-kinds` | string array | Keep only these code action kinds, matched by prefix (`refactor` keeps `refactor.extract`); empty keeps all. |
| `connect` | string | `host:port` of a server that speaks LSP over TCP. See [TCP servers](#tcp-servers). |
+1 -1
Переглянути файл
@@ -148,7 +148,7 @@ The table lists every built-in language definition. Server and debugger names in
| OCaml | `ocaml` | `.ml`, `.mll`, `.mly` | Yes | Yes | ocamllsp | ocamlearlybird |
| OCaml Interface | `ocaml.interface` | `.mli` | Yes | Yes | ocamllsp | — |
| Perl | `perl` | `.pl`, `.pm`, `.pod`, `.psgi`, `.cgi` | Yes | — | **perlnavigator** | — |
| PHP | `php` | `.php`, `.phtml`, `.php3`, `.php4`, `.php5`, … | Yes | Yes | **intelephense** → phpactor → **phoxite** + **laravel-lsp** | **php-debug** |
| PHP | `php` | `.php`, `.phtml`, `.php3`, `.php4`, `.php5`, … | Yes | Yes | **intelephense** → phpactor + **laravel-lsp** | **php-debug** |
| Plain Text | `plaintext` | `.txt`, `.text` | — | — | — | — |
| PowerShell | `powershell` | `.ps1`, `.psm1`, `.psd1`, `.pssc`, `.psrc` | Yes | — | powershell-editor-services | — |
| Prisma | `prisma` | `.prisma` | Yes | Yes | **prisma-language-server** | — |
+7 -11
Переглянути файл
@@ -7,14 +7,11 @@ OpenIDEA highlights PHP files (`.php`, `.phtml`, `.phpt` and older `.php3`–`.p
## Language servers
| Server | When it runs |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `intelephense` | Default. Workspace root: `composer.json`, `.phpactor.json` or `index.php`. |
| `phpactor` | Fallback: used only while Intelephense is not installed. |
| `phoxite` | Alternative with its own Laravel and Blade support: used while neither server above is installed, or when you pick it in **Settings › Languages & Frameworks › Language Servers**. |
| `laravel-lsp` | Laravel projects only (below an `artisan` file): hover, definition and completion inside `config('…')`, `route('…')` and `view('…')`. |
While Phoxite serves a project, `laravel-lsp` is not started: Phoxite answers the Laravel strings itself.
| Server | When it runs |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `intelephense` | Default. Workspace root: `composer.json`, `.phpactor.json` or `index.php`. |
| `phpactor` | Fallback: used only while Intelephense is not installed. |
| `laravel-lsp` | Laravel projects only (below an `artisan` file): hover, definition and completion inside `config('…')`, `route('…')` and `view('…')`. |
Intelephense checks code against the project's PHP version (see [Language level](#language-level)) and indexes the stubs and include paths you configure.
@@ -28,7 +25,6 @@ When a `.php` file opens and Intelephense is missing, a notification offers **In
| ------------------ | ---------------------------------------------------------------------- |
| Intelephense | npm (`intelephense`) |
| Laravel LSP | GitHub release (`laravel/lsp`) |
| Phoxite | GitHub release (`samehelhawary/phoxite`) |
| PHP Debug (Xdebug) | Open VSX (`xdebug.php-debug`); needs Node.js to run |
| phpactor | Not installable from the IDE; install it yourself and put it on `PATH` |
@@ -81,12 +77,12 @@ See [Debugging](/en/guide/debugging).
## Framework support
- **Laravel**: Laravel LSP for `config()`, `route()` and `view()` strings, and an `artisan serve` configuration. With Phoxite as the PHP server, routes, views, config, translations and Eloquent models get completion, navigation and rename from it instead.
- **Laravel**: Laravel LSP for `config()`, `route()` and `view()` strings, and an `artisan serve` configuration.
- **WordPress** and similar platforms: add their stubs under **Additional stubs** and the platform folder under **Include paths**.
## Limitations
- No Blade or Twig template support with Intelephense; only `.php` files get PHP code insight. Phoxite adds code insight in `.blade.php` files, without Blade highlighting.
- No Blade or Twig template support; only `.php` files get PHP code insight.
- phpactor is not installed by the IDE.
- Run with Coverage is not available for PHPUnit.
- Debugging needs the Xdebug extension in your PHP; the IDE does not install it.
+1 -1
Переглянути файл
@@ -43,7 +43,7 @@ description: "前端 UI 代码的规则:设计 token、CSS Modules、图标、
## WebKit 兼容性
在 macOS 和 Linux 上应用运行于 WebKit,最低支持 Safari 15.4,即 macOS 12 的引擎(应用的最低系统版本)。`pnpm build` 会对产物运行 `scripts/check-webkit.ts`,`src/platform/webkitCompatibility.test.ts` 会检查应用中的正则。请避免:
在 macOS 和 Linux 上应用运行于 WebKit,最低支持 Safari 16,即 macOS 13 的引擎(macOS 11、12 上更新 Safari 不会更新其他应用使用的引擎)。`pnpm build` 会对产物运行 `scripts/check-webkit.ts`,`src/platform/webkitCompatibility.test.ts` 会检查应用中的正则。请避免:
- 正则后行断言(`(?<=…)`、`(?<!…)`,需要 Safari 16.4)和正则 `v` 标志;
- import attributes;
+1 -1
Переглянути файл
@@ -117,7 +117,7 @@ description: "多光标与选区、行编辑、剪贴板历史、代码折叠、
| **转到下一个拆分器** | `⌥⇥` | `Alt+Tab` |
| **转到上一个拆分器** | `⌥⇧⇥` | `Alt+Shift+Tab` |
**窗口 › 编辑器标签页** 中还有 **向下拆分**、**取消拆分**、**全部取消拆分**、**移动到另一组**、**在相对组中打开** 和 **更改拆分方向**。也可以把标签页拖到编辑区的某一侧边缘来拆分。在 Project 视图中,**在右侧拆分中打开**(`⇧↵` / `Shift+Enter`,右键菜单中也有)会把选中的文件打开到右侧拆分中。
**窗口 › 编辑器标签页** 中还有 **向下拆分**、**取消拆分**、**全部取消拆分**、**移动到另一组**、**在相对组中打开** 和 **更改拆分方向**。也可以把标签页拖到编辑区的某一侧边缘来拆分。
## 显示选项
+1 -1
Переглянути файл
@@ -9,7 +9,7 @@ description: "在 macOS、Windows 或 Linux 上下载并安装 OpenIDEA,以及
## macOS
需要 macOS 12 Monterey 或更高版本。
需要 macOS 13 Ventura 或更高版本。
| Mac | 文件 |
| ---------- | -------------------------------- |
-1
Переглянути файл
@@ -101,7 +101,6 @@ root-markers = ["angular.json", "node_modules/@angular/core"]
| `settings` | 表 | 用于响应服务器的 `workspace/configuration` 请求。不写时,从 `initialization-options` 中查找请求的配置节。 |
| `install-hint` | 字符串 | 服务器缺失且 IDE 无法安装时显示的提示。 |
| `fallback` | 布尔 | 作为前面服务器的备选,只在它们都未安装时使用。 |
| `replaces` | 字符串数组 | 排在它后面、因它而变得多余的服务器名称。它为文件提供服务时,这些服务器不会被使用。用于能覆盖附加服务器功能的备选服务器。 |
| `features` | 字符串数组 | 只把服务器用于这些功能;为空表示全部。可选值:`completion`、`inline-completion`、`hover`、`signature-help`、`definition`、`declaration`、`type-definition`、`implementation`、`references`、`document-highlight`、`document-symbol`、`workspace-symbol`、`code-action`、`code-lens`、`rename`、`formatting`、`inlay-hint`、`semantic-tokens`、`document-link`、`call-hierarchy`、`type-hierarchy`、`folding-range`、`selection-range`、`diagnostics`。 |
| `code-action-kinds` | 字符串数组 | 只保留这些种类的代码操作,按前缀匹配(`refactor` 包含 `refactor.extract`);为空则全部保留。 |
| `connect` | 字符串 | 通过 TCP 提供 LSP 的服务器地址 `host:port`,见 [TCP 服务器](#tcp-服务器)。 |
+1 -1
Переглянути файл
@@ -143,7 +143,7 @@ IDE 安装工具从不需要 `sudo`。工具装在本地数据目录下 IDE 自
| OCaml | `ocaml` | `.ml`, `.mll`, `.mly` | 是 | 是 | ocamllsp | ocamlearlybird |
| OCaml Interface | `ocaml.interface` | `.mli` | 是 | 是 | ocamllsp | — |
| Perl | `perl` | `.pl`, `.pm`, `.pod`, `.psgi`, `.cgi` | 是 | — | **perlnavigator** | — |
| PHP | `php` | `.php`, `.phtml`, `.php3`, `.php4`, `.php5`, … | 是 | 是 | **intelephense** → phpactor → **phoxite** + **laravel-lsp** | **php-debug** |
| PHP | `php` | `.php`, `.phtml`, `.php3`, `.php4`, `.php5`, … | 是 | 是 | **intelephense** → phpactor + **laravel-lsp** | **php-debug** |
| Plain Text | `plaintext` | `.txt`, `.text` | — | — | — | — |
| PowerShell | `powershell` | `.ps1`, `.psm1`, `.psd1`, `.pssc`, `.psrc` | 是 | — | powershell-editor-services | — |
| Prisma | `prisma` | `.prisma` | 是 | 是 | **prisma-language-server** | — |
+7 -11
Переглянути файл
@@ -7,14 +7,11 @@ OpenIDEA 开箱即可高亮 PHP 文件(`.php`、`.phtml`、`.phpt` 以及老
## 语言服务器
| 服务器 | 启用条件 |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `intelephense` | 默认。工作区根:`composer.json`、`.phpactor.json` 或 `index.php`。 |
| `phpactor` | 备选:仅在未安装 Intelephense 时使用。 |
| `phoxite` | 备选,自带 Laravel 和 Blade 支持:仅在以上两个服务器都未安装时使用,或在 **设置 › 语言和框架 › 语言服务器** 中选中它时使用。 |
| `laravel-lsp` | 仅限 Laravel 项目(`artisan` 文件所在目录之下):在 `config('…')`、`route('…')`、`view('…')` 中提供悬停、跳转和补全。 |
Phoxite 为项目提供服务时不会启动 `laravel-lsp`:Laravel 相关的字符串由 Phoxite 自己处理。
| 服务器 | 启用条件 |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| `intelephense` | 默认。工作区根:`composer.json`、`.phpactor.json` 或 `index.php`。 |
| `phpactor` | 备选:仅在未安装 Intelephense 时使用。 |
| `laravel-lsp` | 仅限 Laravel 项目(`artisan` 文件所在目录之下):在 `config('…')`、`route('…')`、`view('…')` 中提供悬停、跳转和补全。 |
Intelephense 会按项目的 PHP 版本检查代码(见下文“语言级别”),并索引你配置的 stub 和包含路径。
@@ -28,7 +25,6 @@ Intelephense 会按项目的 PHP 版本检查代码(见下文“语言级别
| ------------------ | -------------------------------------------------- |
| Intelephense | npm(`intelephense`) |
| Laravel LSP | GitHub release(`laravel/lsp`) |
| Phoxite | GitHub release(`samehelhawary/phoxite`) |
| PHP Debug (Xdebug) | Open VSX(`xdebug.php-debug`),运行时需要 Node.js |
| phpactor | IDE 不负责安装,请自行安装并放到 `PATH` 上 |
@@ -81,12 +77,12 @@ PHPUnit 运行配置类型包含 **目标**、**配置文件**、**测试过滤
## 框架支持
- **Laravel**:Laravel LSP 支持 `config()`、`route()`、`view()` 中的字符串,并提供 `artisan serve` 运行配置。以 Phoxite 作为 PHP 服务器时,路由、视图、配置、翻译和 Eloquent 模型的补全、跳转和重命名改由它提供。
- **Laravel**:Laravel LSP 支持 `config()`、`route()`、`view()` 中的字符串,并提供 `artisan serve` 运行配置。
- **WordPress** 等平台:在 **附加存根** 中加入对应 stub,在 **包含路径** 中加入平台代码目录。
## 已知限制
- 使用 Intelephense 时不支持 Blade 或 Twig 模板,只有 `.php` 文件有 PHP 代码智能。Phoxite 为 `.blade.php` 文件提供代码智能,但没有 Blade 语法高亮。
- 不支持 Blade 或 Twig 模板,只有 `.php` 文件有 PHP 代码智能。
- IDE 不会安装 phpactor。
- PHPUnit 不支持使用覆盖率运行。
- 调试需要 PHP 已安装 Xdebug 扩展,IDE 不负责安装。
-11
Переглянути файл
@@ -26,17 +26,6 @@ args = ["language-server"]
root-markers = ["composer.json", ".phpactor.json"]
install-hint = "Install phpactor (https://phpactor.readthedocs.io/en/master/usage/standalone.html)"
# Alternative with its own Laravel and Blade support. https://github.com/samehelhawary/phoxite
[[language-servers]]
name = "phoxite"
fallback = true
command = "phoxite-lsp"
args = []
root-markers = ["composer.json", "artisan", "index.php"]
# It answers the Laravel strings itself.
replaces = ["laravel-lsp"]
install-hint = "Install phoxite-lsp from https://github.com/samehelhawary/phoxite/releases and put it on PATH"
# Laravel projects only: hover, definition and completion inside
# config('…'), route('…') and view('…'). Last: Intelephense keeps PHP hover,
# rename and symbols. https://github.com/laravel/lsp
+12 -6
Переглянути файл
@@ -13,7 +13,7 @@
details: "启动错误详情",
timeout: "启动未在 60 秒内完成。",
outdatedMac:
"这台 Mac 的系统网页引擎过旧:OpenIDEA 的界面运行在 macOS 自带的 WebKit 引擎上,需要 macOS 12 Monterey 或更高版本(引擎为 Safari 15.4 或更新)。更旧的系统缺少应用所需的引擎,需要升级 macOS。",
"这台 Mac 的系统网页引擎过旧:OpenIDEA 的界面运行在 macOS 自带的 WebKit 引擎上,需要 macOS 13 Ventura 或更高版本。在 macOS 11、12 上更新 Safari 不会更新其他应用使用的引擎,需要升级 macOS。",
outdated:
"系统的 WebKitGTK 版本过旧:OpenIDEA 需要较新的 WebKitGTK(webkit2gtk-4.1)。请通过系统的包管理器更新后重新打开 OpenIDEA。",
}
@@ -27,14 +27,20 @@
details: "Startup error details",
timeout: "Startup did not finish within 60 seconds.",
outdatedMac:
"The system web engine on this Mac is too old: OpenIDEA's interface runs on macOS's built-in WebKit and needs macOS 12 Monterey or later (Safari 15.4 or newer). Older macOS releases lack the engine the app needs, so macOS itself needs upgrading.",
"The system web engine on this Mac is too old: OpenIDEA's interface runs on macOS's built-in WebKit and needs macOS 13 Ventura or later. On macOS 11 and 12 a Safari update doesn't update the engine other apps use, so macOS itself needs upgrading.",
outdated:
"The system's WebKitGTK is too old: OpenIDEA needs a recent WebKitGTK (webkit2gtk-4.1). Update it with your package manager, then open OpenIDEA again.",
};
// The bundle targets Safari 15.4 (vite.config.ts), so an older system web engine can't
// even parse it. structuredClone came with Safari 15.4, and WebKit's user agent doesn't
// name its version.
const outdated = () => typeof structuredClone !== "function";
// The bundle targets Safari 16 (vite.config.ts); an older system web engine can't even
// parse it. Container queries came with Safari 16, and WebKit's user agent doesn't name
// its version. Unknown (no CSS.supports) counts as current.
const outdated = () => {
try {
return typeof window.CSS?.supports === "function" && !window.CSS.supports("container-type", "inline-size");
} catch {
return false;
}
};
let failed = false;
let ready = false;
const describe = (reason) => {
+1 -5
Переглянути файл
@@ -10,16 +10,12 @@ it.each([
"Object.groupBy(items, key)",
"Array.fromAsync(items)",
"text.toWellFormed()",
"input.showPicker()",
'Intl.supportedValuesOf("collator")',
"items.toSorted(compare)",
"path.toReversed()",
'new RegExp("[a-z]", "v")',
'RegExp("(?<=a)b")',
"/[a-z]/v",
"/(?<!a)b/",
'import data from "./data.json" with { type: "json" }',
])("rejects %s in the Safari 15.4 startup graph", (source) => {
])("rejects %s in the Safari 16 startup graph", (source) => {
expect(checkSource(source, true).length).toBeGreaterThan(0);
});
+4 -13
Переглянути файл
@@ -3,7 +3,7 @@ import { dirname, resolve } from "node:path";
import { pathToFileURL } from "node:url";
import ts from "typescript";
// Safari 15.4 is the bundle's floor, macOS 12's engine (the app's minimum). Keep this floor in sync with vite.config.ts.
// Safari 16 is macOS 13's system engine (the app's minimum). Keep this floor in sync with vite.config.ts.
// Syntax lowering does not replace newer runtime APIs in dependencies.
const newerStatics = new Set([
"Promise.withResolvers",
@@ -15,16 +15,7 @@ const newerStatics = new Set([
"Uint8Array.fromBase64",
"Uint8Array.fromHex",
]);
const newerMethods = new Set([
"isWellFormed",
"toWellFormed",
// Safari 16 / 16.4 APIs above the floor.
"showPicker",
"supportedValuesOf",
"toSorted",
"toReversed",
"toSpliced",
]);
const newerMethods = new Set(["isWellFormed", "toWellFormed"]);
export function checkSource(source: string, startup: boolean): string[] {
const tree = ts.createSourceFile("bundle.js", source, ts.ScriptTarget.Latest, true, ts.ScriptKind.JS);
@@ -93,6 +84,6 @@ export function checkBuild(dir: string): string[] {
if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) {
const errors = checkBuild(resolve("dist"));
if (errors.length) throw new Error(`Safari 15.4 compatibility check failed:\n${errors.join("\n")}`);
console.log("Safari 15.4 startup API and bundle syntax checks passed");
if (errors.length) throw new Error(`Safari 16 compatibility check failed:\n${errors.join("\n")}`);
console.log("Safari 16 startup API and bundle syntax checks passed");
}
+1 -1
Переглянути файл
@@ -41,7 +41,7 @@
"longDescription": "OpenIDEA is an open-source IDE inspired by IntelliJ IDEA. Not affiliated with JetBrains.",
"macOS": {
"entitlements": "./Entitlements.plist",
"minimumSystemVersion": "12.0"
"minimumSystemVersion": "13.0"
}
},
"mainBinaryName": "openidea",
+1 -41
Переглянути файл
@@ -2056,11 +2056,6 @@ command?: string | null; options: AgentPermissionOption[];
* of question to answer instead of an option.
*/
questions?: AgentQuestion[];
/**
* Set when the agent asks for a form (ACP elicitation); answered with a JSON object of
* field name to its values, `decline`, or nothing to cancel.
*/
form?: AgentForm | null;
/** Name of the chosen option, or `None` while pending. Cancelled requests read "Cancelled". */
chosen: string | null } | { type: "error"; message: string };
@@ -2084,39 +2079,6 @@ export type AgentEvent =
/** The installed or configured agent providers changed. */
{ type: "providers" };
/** A form the agent asks the user to fill in (ACP `elicitation/create`, form mode). */
export type AgentForm = {
fields: AgentFormField[],
};
export type AgentFormField = {
/** The property name the answer is keyed by. */
name: string,
title: string,
description?: string,
required?: boolean,
kind: AgentFormFieldKind,
/** The choices of a `choice` or `choices` field. */
options?: AgentFormOption[],
/** The initial answer: option values, a text, a number, or `true` / `false`. */
default?: string[],
/** Bounds: the number of a `number` / `integer`, the length of a `text`, the count of `choices`. */
min?: number | null,
max?: number | null,
};
export type AgentFormFieldKind = "text" | "number" | "integer" | "boolean" |
/** One of `options`. */
"choice" |
/** Any of `options`. */
"choices";
export type AgentFormOption = {
value: string,
label: string,
description?: string,
};
export type AgentImage = {
mimeType: string,
/** Base64, without a `data:` prefix. */
@@ -9665,9 +9627,7 @@ export type SdkKind = "python" | "node" |
/** JDK homes. */
"jdk" |
/** Maven homes. */
"maven" | "ruby" |
/** Zig toolchain directories. */
"zig";
"maven" | "ruby";
/**
* IDEA's search context: matches anywhere, only in, or outside comments and
-14
Переглянути файл
@@ -290,20 +290,6 @@ export const documentSynced = Facet.define<() => Promise<void>, (() => Promise<v
combine: (values) => values[0] ?? null,
});
/**
* Undo / Redo of an editor whose history is kept outside CodeMirror (notebook cells share
* the notebook's backend history). Commands that would call CodeMirror's history (Vim's
* `u` / `Ctrl-R`) go through it instead.
*/
export interface ExternalHistory {
undo(): void;
redo(): void;
}
export const externalHistory = Facet.define<ExternalHistory, ExternalHistory | null>({
combine: (values) => values[0] ?? null,
});
export function whenSynced(view: EditorView): Promise<void> {
return view.state.facet(documentSynced)?.() ?? Promise.resolve();
}
+2 -25
Переглянути файл
@@ -75,7 +75,7 @@ import { resetAllEditorsFontZoom, stepAllEditorsFontZoom } from "./cm/prefs";
import { useProject } from "@/platform/project";
import { call, commands } from "@/platform/ipc";
import { editorPrefs } from "@/platform/editorSettings";
import { menuGroupItems, notifications } from "@/workbench/contributions";
import { notifications } from "@/workbench/contributions";
import { togglePinSelectedContent } from "@/workbench/toolwindows/content";
import { useToolWindowLayout } from "@/workbench/toolwindows/store";
import { toggleReadOnly } from "./fileAttributes";
@@ -529,29 +529,7 @@ function copyReference(reference: Promise<string>) {
function copyPathReferencePopup(view: EditorView, slot: EditorSlot) {
const path = slot.model.path;
const { doc, selection } = view.state;
const line = doc.lineAt(selection.main.head).number;
const { from, to } = selection.main;
// The selected lines, leaving out the one a selection ends at the start of.
const first = doc.lineAt(from).number;
const last = Math.max(first, doc.lineAt(to).number - (to > from && doc.lineAt(to).from === to ? 1 : 0));
const contributed = menuGroupItems("copyPath", {
paths: [path],
line: first - 1,
endLine: last > first ? last - 1 : undefined,
}).flatMap((item) =>
(item.kind ?? "item") === "item" && "run" in item && item.id && item.run && item.preview
? [
{
id: item.id,
label: item.verbatim ? item.label : tx(item.label),
preview: item.preview,
shortcut: shortcutLabel(item.id),
run: item.run,
},
]
: [],
);
const line = view.state.doc.lineAt(view.state.selection.main.head).number;
const flavours = [
{ id: "project.copyAbsolutePath", label: "Absolute Path", value: pathToCopy("absolute", path) },
{ id: "project.copyFileName", label: "File Name", value: pathToCopy("name", path) },
@@ -579,7 +557,6 @@ function copyPathReferencePopup(view: EditorView, slot: EditorSlot) {
void executeAction(f.id, f.id === "editor.copyPathWithLineNumber" ? f.value : path);
},
})),
...contributed,
{
id: "editor.copyReference",
label: tx("Reference"),
+2 -5
Переглянути файл
@@ -1,7 +1,4 @@
import { tags as t, type styleTags } from "@lezer/highlight";
/**
* @lezer/javascript styles `.` as a deref operator, but not `?.`; it tags `this` as `self` (Python's
* `self` colour) and `super` as an atom, which WebStorm colours as keywords.
*/
export const JS_TAGS: Parameters<typeof styleTags>[0] = { "?.": t.derefOperator, "this super": t.keyword };
/** @lezer/javascript styles `.` as a deref operator, but not `?.`. */
export const JS_TAGS: Parameters<typeof styleTags>[0] = { "?.": t.derefOperator };
-25
Переглянути файл
@@ -270,31 +270,6 @@ describe("language modes", () => {
}
});
it("colours `this` and `super` as keywords in Java, JavaScript, TypeScript and C++", async () => {
const highlighter = tagHighlighter([
{ tag: t.keyword, class: "keyword" },
{ tag: t.self, class: "self" },
{ tag: t.atom, class: "atom" },
]);
for (const [mode, path, doc, expected] of [
["Java", "/p/A.java", "class A extends B { A() { super(); this.a = 1; } }", ["super", "this"]],
["JavaScript", "/p/a.js", "class A extends B { m() { super.m(); this.a = 1; } }", ["super", "this"]],
["TypeScript", "/p/a.ts", "class A extends B { m() { super.m(); this.a = 1; } }", ["super", "this"]],
["C++", "/p/a.cpp", "void A::m() { this->a = 1; }", ["this"]],
] as const) {
const support = await loadSupport(findLanguageDescription(mode, path)!);
const found: Array<[string, string]> = [];
highlightTree(support!.language.parser.parse(doc), highlighter, (from, to, style) =>
found.push([doc.slice(from, to), style]),
);
const words = new Set<string>(expected);
expect(
found.filter(([text]) => words.has(text)),
mode,
).toEqual(expected.map((word) => [word, "keyword"]));
}
});
it("recognizes go.mod and go.work files by mode and filename", async () => {
for (const [mode, path] of [
["GoMod", "/project/go.mod"],
+1 -5
Переглянути файл
@@ -293,11 +293,9 @@ const CSS_TAGS: Parameters<typeof styleTags>[0] = {
"ClassName IdName PseudoClassName ColorLiteral CallTag": t.tagName,
};
// @lezer/java tags annotations as plain identifiers, and `this` as `self` (Python's `self` colour);
// IntelliJ colours `this` as a keyword.
// @lezer/java tags annotations as plain identifiers.
export const JAVA_TAGS: Parameters<typeof styleTags>[0] = {
"MarkerAnnotation/Identifier Annotation/Identifier MarkerAnnotation Annotation": t.annotation,
this: t.keyword,
};
/** Highlighting the stock grammars lack or colour unlike IntelliJ. */
@@ -308,8 +306,6 @@ const EXTRA_TAGS: Record<string, Parameters<typeof styleTags>[0]> = {
JSX: JS_TAGS,
TSX: JS_TAGS,
Java: JAVA_TAGS,
// CLion colours `this` as a keyword.
"C++": { this: t.keyword },
PHP: {
"; ,": t.separator,
"ClassDeclaration/Name BaseClause/Name InterfaceClause/Name": t.className,
+1 -39
Переглянути файл
@@ -10,7 +10,7 @@ import { LspPopups } from "@/editor/lsp/Popups";
import { registerProjectActions } from "@/features/project-tree/actions";
import { useProjectTree } from "@/features/project-tree/store";
import { useContextMenuStore } from "@/ui";
import { provideNotificationService, registerMenuGroup, type MenuGroupContext } from "@/workbench/contributions";
import { provideNotificationService } from "@/workbench/contributions";
import * as controller from "./controller";
import { createMemoryBackend } from "./backend";
import { registerEditorActions } from "./actions";
@@ -189,44 +189,6 @@ describe("editor Copy Path/Reference chooser", () => {
expect(useLspPopup.getState().popup).toBeNull();
});
it("lists contributed links before Reference, for the selected lines", async () => {
const contexts: MenuGroupContext[] = [];
const run = vi.fn();
disposers.push(
registerMenuGroup({
id: "test.link",
menus: ["copyPath"],
items: (_menu, ctx) => {
contexts.push(ctx);
return [{ id: "test.copyLink", label: "Host Link", verbatim: true, preview: "https://host/a#L1", run }];
},
}),
);
const view = ctrl.activeSlot!.view!;
await executeAction("editor.copyPathReference");
expect(
popup()
.items.map((item) => item.label)
.slice(-2),
).toEqual(["Host Link", "Reference"]);
expect(popup().items.at(-2)).toMatchObject({
preview: "https://host/a#L1",
shortcut: shortcutLabel("test.copyLink"),
});
await popup().items.at(-2)!.run();
expect(run).toHaveBeenCalledOnce();
// From the first line into the second; then ending at the start of the second line.
view.dispatch({ selection: { anchor: 0, head: documentText.indexOf("A {}") } });
await executeAction("editor.copyPathReference");
view.dispatch({ selection: { anchor: 0, head: documentText.indexOf("class") } });
await executeAction("editor.copyPathReference");
expect(contexts.map(({ paths, line, endLine }) => [paths, line, endLine])).toEqual([
[[path], 1, undefined],
[[path], 0, 1],
[[path], 0, undefined],
]);
});
it("adds the chooser to Copy / Paste Special", () => {
vi.spyOn(ctrl.activeSlot!.view!, "posAtCoords").mockReturnValue(null);
ctrl.onContextMenu(ctrl.activeSlot!, new MouseEvent("contextmenu"));
+8 -8
Переглянути файл
@@ -74,7 +74,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 0 6px 0 8px;
}
.pin {
@@ -89,7 +89,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-height: 36px;
padding: 0 12px;
background: var(--bg-editor-banner, color-mix(in srgb, var(--accent) 7%, var(--bg-editor, var(--bg-elev))));
@@ -133,8 +133,8 @@
display: grid;
grid-template-columns: minmax(220px, 420px) auto 1fr;
align-items: center;
column-gap: var(--space-1-5);
row-gap: var(--space-1-5);
column-gap: 6px;
row-gap: 6px;
padding: 6px 8px 6px 10px;
background: var(--bg-editor-inline, var(--bg-elev));
border-bottom: 1px solid var(--border-editor-tabs, var(--border));
@@ -155,7 +155,7 @@
.findButtons {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
}
.findCount {
font-size: var(--fs-ui);
@@ -173,14 +173,14 @@
.replaceButtons {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
/* Go to line */
.gotoBody {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 8px 16px 0;
}
.gotoHint {
@@ -316,7 +316,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
height: 26px;
padding: 0 8px;
overflow: hidden;
+1 -1
Переглянути файл
@@ -115,7 +115,7 @@ function EmptyEditorArea() {
return (
<div ref={ref} className={styles.area}>
<EmptyEditor />
{over && <div className={styles.dropZone} aria-hidden="true" />}
{over && <div className={clsx(styles.dropZone, styles["drop-center"])} aria-hidden="true" />}
</div>
);
}
+2 -2
Переглянути файл
@@ -58,7 +58,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-list-row);
padding: 0 6px;
border-radius: var(--radius-row);
@@ -87,7 +87,7 @@
.childHeader {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-list-row);
padding: 0 6px;
margin-bottom: 2px;
+10 -10
Переглянути файл
@@ -11,7 +11,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 0 12px;
font-size: var(--fs-ui);
font-weight: 600;
@@ -96,7 +96,7 @@
.item {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
width: 100%;
font-size: var(--fs-ui);
@@ -263,7 +263,7 @@
bottom: 0;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 2px 6px;
border-top: 1px solid var(--border-popup);
background: var(--bg-popup);
@@ -283,7 +283,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 0 6px 0 12px;
background: var(--bg-popup-inline, var(--bg-elev));
border-bottom: 1px solid var(--border-popup);
@@ -342,7 +342,7 @@
height: var(--h-row);
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 0 14px;
font-size: var(--fs-ui);
}
@@ -368,7 +368,7 @@
flex: none;
display: flex;
align-items: flex-start;
gap: var(--space-1-5);
gap: 6px;
padding: 10px 14px 0;
font-size: var(--fs-ui);
color: var(--fg-muted);
@@ -421,7 +421,7 @@
border: 0;
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.reformatLegend {
margin-bottom: 6px;
@@ -432,21 +432,21 @@
.reformatOption {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
font-size: var(--fs-ui);
}
.pasteImports {
display: flex;
flex-direction: column;
gap: var(--space-3);
gap: 12px;
padding: 14px;
font-size: var(--fs-ui);
}
.pasteImportList {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
max-height: 280px;
overflow: auto;
overflow-wrap: anywhere;
+3 -3
Переглянути файл
@@ -19,7 +19,7 @@
flex: none;
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.targets {
@@ -41,7 +41,7 @@
display: grid;
grid-template-columns: 1fr 110px;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 0 8px;
min-height: var(--h-list-row);
}
@@ -88,6 +88,6 @@
.busy {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
color: var(--fg-muted);
}
+10 -10
Переглянути файл
@@ -35,7 +35,7 @@
.agentRow {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
width: 100%;
min-width: 0;
padding: 0 8px;
@@ -69,7 +69,7 @@
.registryState {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 12px;
border-top: 1px solid var(--border);
color: var(--fg-muted);
@@ -79,7 +79,7 @@
.customActions {
display: flex;
flex-wrap: wrap;
gap: var(--space-1-5);
gap: 6px;
padding: 8px;
border-top: 1px solid var(--border);
}
@@ -116,7 +116,7 @@
.facts {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
margin-top: 2px;
color: var(--fg-muted);
@@ -143,12 +143,12 @@
.actions {
display: flex;
flex: none;
gap: var(--space-1-5);
gap: 6px;
}
.progress {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
max-width: 360px;
margin: 10px 0 0 34px;
}
@@ -182,7 +182,7 @@
}
.links {
display: flex;
gap: var(--space-3);
gap: 12px;
}
.link {
padding: 0;
@@ -209,7 +209,7 @@
.sectionTitle {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
height: 22px;
margin-bottom: 4px;
color: var(--fg-strong);
@@ -244,7 +244,7 @@
grid-template-columns: minmax(150px, max-content) minmax(0, 1fr);
align-items: center;
column-gap: 10px;
row-gap: var(--space-1);
row-gap: 4px;
min-width: 0;
}
.label {
@@ -278,7 +278,7 @@
display: flex;
flex: 1;
align-items: center;
gap: var(--space-1);
gap: 4px;
min-width: 0;
max-width: 480px;
}
+1 -1
Переглянути файл
@@ -575,7 +575,7 @@ function Details({
{job && (
<div className={styles.progress}>
<ProgressBar value={job.fraction} aria-label={tx`Installing ${agent.name}`} />
<span>{job.message}</span>
<span className={styles.hint}>{job.message}</span>
</div>
)}
{!job && installed && update && <p className={styles.notice}>{tx`${update} is available`}</p>}
+6 -6
Переглянути файл
@@ -18,14 +18,14 @@
min-height: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: var(--space-3);
gap: 12px;
}
.column {
min-height: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 10px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-control);
@@ -42,7 +42,7 @@
min-height: 120px;
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
overflow: auto;
}
@@ -50,9 +50,9 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-1-5);
gap: 6px;
padding: 4px 8px;
background: var(--bg-hover);
background: var(--bg-subtle);
border-radius: var(--radius-control);
font-family: var(--font-mono);
font-size: var(--fs-small);
@@ -65,7 +65,7 @@
.add {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.input {
+1 -1
Переглянути файл
@@ -1,7 +1,7 @@
.body {
display: flex;
flex-direction: column;
gap: var(--space-3);
gap: 12px;
height: 100%;
min-height: 0;
}
+7 -7
Переглянути файл
@@ -31,7 +31,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
}
@@ -105,7 +105,7 @@
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-1);
gap: 4px;
padding: 24px 12px;
color: var(--fg-muted);
}
@@ -154,7 +154,7 @@
.dockedBar {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 2px 8px;
border-bottom: 1px solid var(--border);
}
@@ -215,7 +215,7 @@
padding: 4px 12px 8px;
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
}
.external > .row {
flex: none;
@@ -225,7 +225,7 @@
.chooser {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.chooserList {
height: 312px;
@@ -242,14 +242,14 @@
.chooserRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
width: 100%;
}
.chooserFooter {
display: flex;
align-items: center;
gap: var(--space-3);
gap: 12px;
}
.chooserFolder {
flex: 0 0 auto;
+12 -12
Переглянути файл
@@ -75,7 +75,7 @@
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
gap: 8px;
border-radius: inherit;
background: color-mix(in srgb, var(--bg-popup) 82%, transparent);
color: var(--fg-strong);
@@ -85,7 +85,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 4px 6px 6px;
cursor: default;
}
@@ -95,13 +95,13 @@
flex-wrap: wrap;
align-items: center;
min-width: 0;
gap: var(--space-0-5);
gap: 2px;
}
.actions {
display: flex;
flex: none;
align-items: center;
gap: var(--space-1);
gap: 4px;
margin-left: auto;
}
/* Attach/reference buttons share the send button's 24px footprint and chrome. */
@@ -135,7 +135,7 @@
display: grid;
grid-template-columns: minmax(0, 80px) minmax(0, 1fr);
align-items: center;
gap: var(--space-3);
gap: 12px;
margin-top: 8px;
}
.settingsLabel {
@@ -147,7 +147,7 @@
.chip {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-control);
min-width: 0;
padding: 0 4px 0 6px;
@@ -229,7 +229,7 @@
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--space-3);
gap: 12px;
}
.effortValue {
color: var(--fg-strong);
@@ -295,7 +295,7 @@
.modeOption {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: 24px;
margin: 0 6px;
padding: 0 8px;
@@ -318,7 +318,7 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
gap: 12px;
margin-top: 6px;
padding: 8px 14px 2px;
border-top: 1px solid var(--border);
@@ -329,7 +329,7 @@
.bar {
flex-direction: row;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.toolbar {
flex-wrap: nowrap;
@@ -392,7 +392,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 8px 10px 0;
cursor: default;
}
@@ -539,7 +539,7 @@
.popupFooter {
display: flex;
flex-wrap: wrap;
gap: var(--space-1) 14px;
gap: 4px 14px;
padding: 5px 12px 6px;
border-top: 1px solid var(--border);
color: var(--fg-subtle);
-183
Переглянути файл
@@ -1,183 +0,0 @@
import { useId, useState } from "react";
import type { AgentForm, AgentFormField, AgentTask } from "@/bindings";
import { Button, Checkbox, Input, Radio, T } from "@/ui";
import type { PermissionEntry } from "./permission";
import { respond } from "./store";
import styles from "./Session.module.css";
/** Each field's answer as the backend reads it: option values, a text, a number, or `true` / `false`. */
type Values = Record<string, string[]>;
const within = (field: AgentFormField, n: number) =>
(field.min == null || n >= field.min) && (field.max == null || n <= field.max);
function isValid(field: AgentFormField, value: string[]) {
const given = value.map((item) => item.trim()).filter(Boolean);
if (!given.length) return !field.required;
switch (field.kind) {
case "number":
case "integer": {
const n = Number(given[0]);
return Number.isFinite(n) && (field.kind === "number" || Number.isInteger(n)) && within(field, n);
}
case "text":
return within(field, given[0]!.length);
case "choices":
return within(field, given.length);
default:
return true;
}
}
/** An agent's open form (ACP elicitation), answered above the composer like a question. */
export function FormCard({ task, entry, form }: { task: AgentTask; entry: PermissionEntry; form: AgentForm }) {
const [values, setValues] = useState<Values>(() =>
Object.fromEntries(
form.fields.map((field) => [
field.name,
field.kind === "boolean" ? [String(field.default?.[0] === "true")] : (field.default ?? []),
]),
),
);
const [busy, setBusy] = useState(false);
const complete = form.fields.every((field) => isValid(field, values[field.name] ?? []));
// `decline` declines the form, nothing cancels it, and the values accept it.
const send = (reply: string | null) => {
setBusy(true);
void respond(task.id, entry.id, reply).finally(() => setBusy(false));
};
return (
<form
className={styles.questionCard}
aria-label={entry.title}
onSubmit={(event) => {
event.preventDefault();
if (complete) send(JSON.stringify(values));
}}
onKeyDown={(event) => {
if (event.key === "Escape") send(null);
}}
>
{/* A one-question form often titles its field with the message; it is shown once, as the field's. */}
{entry.title && !form.fields.some((field) => field.title === entry.title) && (
<p className={styles.formMessage}>{entry.title}</p>
)}
<fieldset className={styles.formFields} disabled={busy}>
{form.fields.map((field) => (
<FormField
key={field.name}
field={field}
value={values[field.name] ?? []}
onChange={(value) => setValues({ ...values, [field.name]: value })}
/>
))}
</fieldset>
<div className={styles.questionActions}>
<Button variant="ghost" disabled={busy} onClick={() => send(null)}>
Cancel
</Button>
<Button disabled={busy} onClick={() => send("decline")}>
Decline
</Button>
<Button type="submit" variant="primary" disabled={busy || !complete}>
Submit
</Button>
</div>
</form>
);
}
function FormField({
field,
value,
onChange,
}: {
field: AgentFormField;
value: string[];
onChange: (value: string[]) => void;
}) {
const id = useId();
const title = (
<>
{field.title}
{field.required && (
<span className={styles.questionTag}>
<T>Required</T>
</span>
)}
</>
);
const description = field.description && <span className={styles.questionDescription}>{field.description}</span>;
const optionLabel = (label: string, about?: string) => (
<span className={styles.questionOptionText}>
<span className={styles.questionLabel}>{label}</span>
{about && <span className={styles.questionDescription}>{about}</span>}
</span>
);
if (field.kind === "boolean") {
return (
<div className={styles.question}>
<div className={styles.questionChoices}>
<Checkbox
className={styles.questionOption}
checked={value[0] === "true"}
label={optionLabel(field.title, field.description)}
onChange={(checked) => onChange([String(checked)])}
/>
</div>
</div>
);
}
if (field.kind === "choice" || field.kind === "choices") {
return (
<fieldset className={styles.question}>
<legend className={styles.questionText}>{title}</legend>
{description}
<div className={styles.questionChoices}>
{(field.options ?? []).map((option) =>
field.kind === "choices" ? (
<Checkbox
key={option.value}
className={styles.questionOption}
checked={value.includes(option.value)}
label={optionLabel(option.label, option.description)}
onChange={(checked) =>
onChange(checked ? [...value, option.value] : value.filter((v) => v !== option.value))
}
/>
) : (
<Radio
key={option.value}
className={styles.questionOption}
name={id}
checked={value[0] === option.value}
label={optionLabel(option.label, option.description)}
onChange={() => onChange([option.value])}
/>
),
)}
</div>
</fieldset>
);
}
const numeric = field.kind !== "text";
return (
<div className={styles.question}>
<label className={styles.questionText} htmlFor={id}>
{title}
</label>
<Input
id={id}
type={numeric ? "number" : "text"}
inputMode={field.kind === "integer" ? "numeric" : numeric ? "decimal" : undefined}
step={field.kind === "integer" ? 1 : numeric ? "any" : undefined}
min={numeric ? (field.min ?? undefined) : undefined}
max={numeric ? (field.max ?? undefined) : undefined}
maxLength={numeric ? undefined : (field.max ?? undefined)}
invalid={value.some((item) => item.trim()) && !isValid(field, value)}
value={value[0] ?? ""}
onChange={(event) => onChange([event.target.value])}
/>
</div>
);
}
+4 -4
Переглянути файл
@@ -15,7 +15,7 @@
width: min(var(--agent-conversation-width), 100%);
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.fitWidth .inner {
width: 100%;
@@ -35,7 +35,7 @@
flex-wrap: wrap;
align-items: center;
/* The chips' own padding spaces them. */
gap: var(--space-0-5);
gap: 2px;
padding: 0 2px;
font-size: var(--fs-small);
}
@@ -66,7 +66,7 @@
padding: 16px 12px 12px;
}
.docked .inner {
gap: var(--space-2);
gap: 8px;
}
.docked .where {
flex-wrap: nowrap;
@@ -95,7 +95,7 @@
.notes {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
height: 0;
}
.docked .notes {
+17 -11
Переглянути файл
@@ -10,13 +10,13 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
gap: 12px;
}
.headerActions {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.title {
@@ -52,7 +52,7 @@
.error {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 8px;
border-radius: var(--radius-control);
background: color-mix(in srgb, var(--danger) 12%, transparent);
@@ -63,7 +63,7 @@
.notice {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 8px;
border-radius: var(--radius-control);
background: var(--accent-soft);
@@ -89,13 +89,13 @@
justify-content: space-between;
min-height: 32px;
padding: 2px 4px;
gap: var(--space-2);
gap: 8px;
}
.sectionToggle {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
flex: 1;
min-width: 0;
padding: 4px 2px;
@@ -143,6 +143,12 @@
padding: 2px 0 6px;
}
.emptySection {
padding: 6px 24px 8px;
color: var(--fg-muted);
font-size: var(--fs-small);
}
.sectionNote {
margin: 0;
padding: 2px 24px 6px;
@@ -155,7 +161,7 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
gap: 12px;
padding: 6px 8px 6px 22px;
border-radius: var(--radius-control);
}
@@ -167,7 +173,7 @@
.rowMain {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
min-width: 0;
flex: 1;
}
@@ -191,7 +197,7 @@
.rowActions {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
flex-shrink: 0;
}
@@ -200,7 +206,7 @@
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
align-items: start;
gap: 10px var(--space-3);
gap: 10px 12px;
padding: 12px 16px 4px;
}
@@ -217,7 +223,7 @@
.formControl {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
min-width: 0;
}
+3 -3
Переглянути файл
@@ -2,7 +2,7 @@
.chip {
display: inline-flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
max-width: 100%;
height: 20px;
padding: 0 6px 0 4px;
@@ -126,7 +126,7 @@
.cardHead {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 10px;
}
.cardPath {
@@ -201,7 +201,7 @@
.codeHead {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: 26px;
padding: 0 4px 0 8px;
border-bottom: 1px solid var(--border);
+54 -95
Переглянути файл
@@ -91,7 +91,7 @@
flex-wrap: wrap;
/* The changes chip sits above the line; the facts stay on that line's baseline. */
align-items: flex-end;
gap: var(--space-0-5) var(--space-1-5);
gap: 2px 6px;
min-width: 0;
padding: 0 2px;
overflow: hidden;
@@ -104,7 +104,7 @@
flex: 0 1 auto;
max-width: 100%;
align-items: center;
gap: var(--space-1);
gap: 4px;
height: 22px;
min-width: 0;
color: var(--fg-secondary);
@@ -122,7 +122,7 @@
max-width: 100%;
align-items: center;
/* The chips' own padding spaces them. */
gap: var(--space-0-5);
gap: 2px;
min-width: 0;
overflow: hidden;
}
@@ -144,7 +144,7 @@
flex: 1 1 auto;
flex-wrap: wrap;
align-items: center;
gap: var(--space-0-5) var(--space-2);
gap: 2px 8px;
min-width: 0;
}
/* Shrinks before the terminal buttons do: in a narrow docked session the meters clip, not the controls. */
@@ -154,7 +154,7 @@
margin-left: auto;
align-items: center;
height: 22px;
gap: var(--space-2);
gap: 8px;
max-width: 100%;
min-width: 0;
overflow: hidden;
@@ -163,13 +163,13 @@
display: flex;
flex: none;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
}
/* What changed (files, commits) above the meters; both open the Changes pane. */
.statusChips {
display: inline-flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
max-width: 100%;
min-width: 0;
}
@@ -177,7 +177,7 @@
composes: surface from "../../ui/Chip.module.css";
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
max-width: 100%;
min-width: 0;
padding: 0 8px;
@@ -207,31 +207,6 @@
color: var(--fg-subtle);
}
/* The archived-task notice: an editor notification banner above the conversation. */
.banner {
flex: none;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: var(--space-1) var(--space-2);
min-height: 36px;
padding: 9px 12px;
background: var(--bg-feedback-warning);
border-bottom: 1px solid var(--border-feedback-warning);
color: var(--fg-strong);
}
.bannerText {
flex: 1 1 240px;
min-width: 0;
max-height: 33vh;
overflow-y: auto;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.bannerSpacer {
flex: 1;
}
/* The conversation with its find bar. */
.streamArea {
min-width: 0;
@@ -345,7 +320,7 @@
.messageFooter {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-height: var(--h-control-small);
max-width: 100%;
flex-wrap: wrap;
@@ -403,7 +378,7 @@
}
.messageActions {
display: inline-flex;
gap: var(--space-1);
gap: 4px;
max-width: 100%;
flex-wrap: wrap;
opacity: 0;
@@ -467,7 +442,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
@@ -523,14 +498,14 @@
.editBar {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
margin-top: 6px;
font-size: var(--fs-small);
}
.editButtons {
display: flex;
gap: var(--space-1-5);
gap: 6px;
margin-left: auto;
}
@@ -760,7 +735,7 @@
.thought summary {
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
min-width: 0;
height: var(--h-row);
color: var(--fg-muted);
@@ -798,7 +773,7 @@
.tool {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
box-sizing: border-box;
min-height: var(--h-row);
@@ -853,7 +828,7 @@
.processSummary {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
width: 100%;
max-width: 100%;
box-sizing: border-box;
@@ -901,7 +876,7 @@
.processBody {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
max-height: calc(var(--h-row) * 16);
overflow-y: auto;
margin-top: 2px;
@@ -925,7 +900,7 @@
.plan {
display: grid;
gap: var(--space-0-5);
gap: 2px;
}
.planTitle {
font-weight: 600;
@@ -934,7 +909,7 @@
.planItem {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.planDone {
color: var(--fg-muted);
@@ -1042,7 +1017,7 @@
.error {
display: flex;
gap: var(--space-1-5);
gap: 6px;
align-items: flex-start;
color: var(--danger);
white-space: pre-wrap;
@@ -1052,7 +1027,7 @@
.working {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
color: var(--fg-muted);
}
@@ -1074,7 +1049,7 @@
flex: none;
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
align-self: center;
width: 100%;
max-width: calc(var(--session-content-width) + var(--space-3) * 2);
@@ -1085,12 +1060,12 @@
.background {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.backgroundTask {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 24px;
padding: 0 4px 0 8px;
border-radius: var(--radius-row);
@@ -1110,12 +1085,12 @@
.queue {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.queued {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 28px;
padding: 0 4px 0 8px;
border-radius: var(--radius-row);
@@ -1170,7 +1145,7 @@
.images {
display: flex;
flex-wrap: wrap;
gap: var(--space-1-5);
gap: 6px;
margin-top: 4px;
}
.imageItem {
@@ -1210,14 +1185,14 @@
.attachments {
display: flex;
flex-wrap: wrap;
gap: var(--space-1) var(--space-1-5);
gap: 4px 6px;
margin-top: 4px;
font-size: var(--fs-small);
}
.attachment {
display: inline-flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
}
.changes {
@@ -1250,7 +1225,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: 32px;
flex: none;
padding: 0 6px 0 10px;
@@ -1295,7 +1270,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
}
.changeName {
flex: 0 1 auto;
@@ -1327,7 +1302,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.changeGroupName {
min-width: 0;
@@ -1342,7 +1317,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.changeCommitHash {
flex: none;
@@ -1373,7 +1348,7 @@
.subagent {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
@@ -1382,7 +1357,7 @@
.subagentHead {
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
min-width: 0;
}
.subagentOpen {
@@ -1390,7 +1365,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 2px 4px;
margin: -2px -4px;
border: 0;
@@ -1466,7 +1441,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: 30px;
padding: 0 8px 0 6px;
border-bottom: 1px solid var(--border);
@@ -1477,7 +1452,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
overflow: hidden;
}
.crumb {
@@ -1523,12 +1498,12 @@
.subagentStrip {
display: flex;
flex-wrap: wrap;
gap: var(--space-1);
gap: 4px;
}
.subagentChip {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
max-width: 240px;
height: 22px;
padding: 0 8px;
@@ -1556,7 +1531,7 @@
flex: none;
display: flex;
flex-direction: column;
gap: var(--space-3);
gap: 12px;
max-height: 50vh;
overflow-y: auto;
/* The composer's width, so the card sits exactly over the box it belongs to. */
@@ -1598,7 +1573,7 @@
.question {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
min-width: 0;
margin: 0;
padding: 0;
@@ -1632,7 +1607,7 @@
.questionChoices {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.question .questionChoices > * {
border: 1px solid var(--border);
@@ -1658,7 +1633,7 @@
.questionChoice {
display: flex;
align-items: flex-start;
gap: var(--space-2);
gap: 8px;
}
.questionOptionText {
display: flex;
@@ -1688,19 +1663,19 @@
.questionBody {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.questionChoices {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
min-width: 0;
}
@container question-card (min-width: 640px) {
.questionBodyWithPreview {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: var(--space-3);
gap: 12px;
align-items: start;
}
.questionBodyWithPreview .questionPreview {
@@ -1716,7 +1691,7 @@
display: flex;
flex-direction: column;
grid-area: 1 / 1;
gap: var(--space-1);
gap: 4px;
min-width: 0;
visibility: hidden;
}
@@ -1749,12 +1724,12 @@
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: var(--space-2);
gap: 8px;
}
.questionPager {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.questionPage {
color: var(--fg-subtle);
@@ -1762,22 +1737,6 @@
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
/* An agent's form (ACP elicitation): its message, then every field at once, in the question card. */
.formMessage {
margin: 0;
color: var(--fg-strong);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.formFields {
display: flex;
flex-direction: column;
gap: var(--space-3);
min-width: 0;
margin: 0;
padding: 0;
border: 0;
}
/* Reasoning while it streams (auto): bounded, its tail in view. */
.thoughtLive .thoughtBody {
@@ -1812,7 +1771,7 @@
.tray {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.tray:empty {
display: none;
@@ -1824,12 +1783,12 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1);
gap: 4px;
}
.trayChip {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-row);
padding: 0 var(--space-2);
border: none;
@@ -1848,7 +1807,7 @@
.trayPlan {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
padding: 2px var(--space-2) 4px calc(var(--space-2) * 2);
font-size: var(--fs-small);
}
+9 -8
Переглянути файл
@@ -97,9 +97,7 @@ import {
type Activity,
} from "./workingStatus";
import { AgentReply, MessageActions, ReplyActions } from "./AgentReply";
import { FormCard } from "./FormCard";
import {
asksInCard,
commandPrefix,
permissionDetails,
permissionOption,
@@ -2307,7 +2305,9 @@ function PermissionLine({ task, entry }: { task: AgentTask; entry: PermissionEnt
) : (
<span className={styles.permissionDetail}>{shortTitle(task, detail)}</span>
)}
{!asksInCard(entry) && <PermissionAnswers task={task} entry={entry} className={styles.permissionAnswers} />}
{!entry.questions?.length && (
<PermissionAnswers task={task} entry={entry} className={styles.permissionAnswers} />
)}
</>
)}
</div>
@@ -2332,13 +2332,12 @@ const isRecommended = (label: string) => label.endsWith(RECOMMENDED_SUFFIX);
const plainLabel = (label: string) => (isRecommended(label) ? label.slice(0, -RECOMMENDED_SUFFIX.length) : label);
/** An open `AskUserQuestion` request or agent form, as a card above the composer; one question at a time. */
/** An open `AskUserQuestion` request, as a card above the composer; one question at a time. */
function QuestionCard({ task, entries }: { task: AgentTask; entries: AgentEntry[] | null }) {
const entry = entries?.find(
(candidate): candidate is PermissionEntry =>
candidate.type === "permission" && !candidate.chosen && asksInCard(candidate),
candidate.type === "permission" && !candidate.chosen && !!candidate.questions?.length,
);
if (entry?.form) return <FormCard key={entry.id} task={task} entry={entry} form={entry.form} />;
return entry?.questions ? (
<QuestionForm key={entry.id} task={task} entry={entry} questions={entry.questions} />
) : null;
@@ -2630,7 +2629,9 @@ function QuestionForm({
*/
function Tray({ task, entries, children }: { task: AgentTask; entries: AgentEntry[] | null; children: ReactNode }) {
const tx = useTx();
const pending = entries?.find((e): e is PermissionEntry => e.type === "permission" && !e.chosen && !asksInCard(e));
const pending = entries?.find(
(e): e is PermissionEntry => e.type === "permission" && !e.chosen && !e.questions?.length,
);
const plan = entries?.findLast((e): e is Extract<AgentEntry, { type: "plan" }> => e.type === "plan");
const [planOpen, setPlanOpen] = useState(false);
const done = plan?.items.filter((i) => i.status === "completed").length ?? 0;
@@ -2704,7 +2705,7 @@ function WorkingRow({
);
}
if (task.status !== "running" && task.status !== "starting") return null;
if (entries?.some((e) => e.type === "permission" && !e.chosen && !asksInCard(e))) return null;
if (entries?.some((e) => e.type === "permission" && !e.chosen && !e.questions?.length)) return null;
const userAt = entries?.findLastIndex((e) => e.type === "user") ?? -1;
const lastUser = userAt >= 0 ? (entries![userAt] as UserEntry) : undefined;
return (
+6 -6
Переглянути файл
@@ -16,13 +16,13 @@
.activity {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.after {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.seconds {
@@ -35,7 +35,7 @@
min-height: 120px;
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
padding: 8px;
overflow: auto;
border: 1px solid var(--border-strong);
@@ -46,9 +46,9 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-1-5);
gap: 6px;
padding: 4px 8px;
background: var(--bg-hover);
background: var(--bg-subtle);
border-radius: var(--radius-control);
}
@@ -64,7 +64,7 @@
.add {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.input {
-3
Переглянути файл
@@ -3,9 +3,6 @@ import { tx } from "@/platform/i18n";
export type PermissionEntry = Extract<AgentEntry, { type: "permission" }>;
/** Questions and forms are answered in a card above the composer, not with the request's options. */
export const asksInCard = (entry: PermissionEntry) => !!entry.questions?.length || !!entry.form;
export function permissionDetails(entry: PermissionEntry, provider = "Codex") {
// The backend names the command from the request's structured input; the title is the
// agent's own words and never makes a request a command.
-62
Переглянути файл
@@ -1460,68 +1460,6 @@ describe("a pending AskUserQuestion", () => {
});
});
describe("a pending agent form", () => {
const form = {
type: "permission" as const,
id: 12,
title: "How should I refactor?",
chosen: null,
options: [{ id: "decline", name: "Decline", kind: "reject_once" }],
form: {
fields: [
{
name: "strategy",
title: "Strategy",
required: true,
kind: "choice" as const,
options: [
{ value: "safe", label: "Conservative", description: "Small steps" },
{ value: "bold", label: "Aggressive" },
],
},
{ name: "count", title: "Files", kind: "integer" as const, min: 1, max: 5 },
{ name: "tests", title: "Run tests", kind: "boolean" as const },
],
},
};
const open = async () => {
backend.entries.set("A", [form]);
backend.answers = [];
useAgents.setState({ entries: new Map(backend.entries) });
render(<SessionEditor input={input("A")} />);
return screen.findByRole("form", { name: "How should I refactor?" });
};
it("sends the values once every required field is valid", async () => {
const card = await open();
const submit = within(card).getByRole("button", { name: "Submit" });
expect(submit).toHaveProperty("disabled", true);
fireEvent.click(within(card).getByRole("radio", { name: /^Aggressive/ }));
expect(submit).toHaveProperty("disabled", false);
const files = within(card).getByRole("spinbutton", { name: /^Files/ });
fireEvent.change(files, { target: { value: "9" } });
expect(submit).toHaveProperty("disabled", true);
fireEvent.change(files, { target: { value: "3" } });
fireEvent.click(within(card).getByRole("checkbox", { name: /^Run tests/ }));
fireEvent.click(submit);
await waitFor(() =>
expect(backend.answers).toEqual([
["A", 12, JSON.stringify({ strategy: ["bold"], count: ["3"], tests: ["true"] })],
]),
);
});
it("declines with Decline and cancels with Escape", async () => {
const card = await open();
fireEvent.click(within(card).getByRole("button", { name: "Decline" }));
await waitFor(() => expect(backend.answers).toEqual([["A", 12, "decline"]]));
backend.answers = [];
fireEvent.keyDown(within(card).getByRole("radio", { name: /^Conservative/ }), { key: "Escape" });
await waitFor(() => expect(backend.answers).toEqual([["A", 12, null]]));
});
});
describe("a pending permission request above the composer", () => {
const command = 'python3 -c \'from pathlib import Path\np = Path("note.txt")\np.write_text("one\\ntwo")\'';
const options = [
+12 -12
Переглянути файл
@@ -18,7 +18,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
height: var(--h-row);
padding: 0 10px;
border-bottom: 1px solid var(--border);
@@ -39,7 +39,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
@@ -115,7 +115,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
width: 100%;
height: var(--h-row);
padding: 0 8px;
@@ -163,7 +163,7 @@
.scope {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
margin: 0;
padding: 0;
border: 0;
@@ -176,7 +176,7 @@
.radioRow {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 3px 0;
color: var(--fg);
cursor: default;
@@ -187,7 +187,7 @@
}
.dirRow {
display: flex;
gap: var(--space-1-5);
gap: 6px;
padding: 4px 0 0 22px;
}
.grow {
@@ -197,7 +197,7 @@
.fieldRow {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.languageSelect {
min-width: 180px;
@@ -245,7 +245,7 @@
.previewItem {
display: flex;
align-items: flex-start;
gap: var(--space-2);
gap: 8px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
@@ -257,7 +257,7 @@
flex: 1;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.previewWhere {
color: var(--fg-subtle);
@@ -298,7 +298,7 @@
.details {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 10px 12px;
overflow: auto;
border-left: 1px solid var(--border);
@@ -312,7 +312,7 @@
.detailsTitle {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
color: var(--fg-strong);
}
.detailsMessage {
@@ -322,5 +322,5 @@
}
.detailsActions {
display: flex;
gap: var(--space-1-5);
gap: 6px;
}
+3 -3
Переглянути файл
@@ -1,19 +1,19 @@
.body {
display: flex;
flex-direction: column;
gap: var(--space-4);
gap: 16px;
padding: 20px;
}
.field {
display: grid;
grid-template-columns: 80px 1fr;
align-items: center;
gap: var(--space-3);
gap: 12px;
}
.row {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
}
.row > input {
-2
Переглянути файл
@@ -499,7 +499,6 @@ describe("launch", () => {
path: "/x/b.txt",
left: { type: "file", path: "/x/a.txt", label: "/x/a.txt" },
right: { type: "worktree", label: "/x/b.txt" },
swappable: true,
},
]);
});
@@ -515,7 +514,6 @@ describe("launch", () => {
path: "/p/b.txt",
left: { type: "file", path: "/p/a.txt", label: "a.txt" },
right: { type: "worktree", label: "b.txt" },
swappable: true,
},
]);
});
+9 -9
Переглянути файл
@@ -14,7 +14,7 @@
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
line-height: 1.55;
}
.productName {
@@ -37,7 +37,7 @@
}
.fact {
display: flex;
gap: var(--space-1);
gap: 4px;
min-width: 0;
}
.fact dt {
@@ -57,7 +57,7 @@
.links {
display: flex;
flex-wrap: wrap;
gap: var(--space-1) var(--space-4);
gap: 4px 16px;
}
.link {
padding: 0;
@@ -94,7 +94,7 @@
.keymapBar {
display: flex;
align-items: center;
gap: var(--space-3);
gap: 12px;
padding: 8px 12px;
border-bottom: 1px solid var(--border-popup);
}
@@ -139,7 +139,7 @@
.keymapRow {
display: flex;
align-items: center;
gap: var(--space-3);
gap: 12px;
min-height: var(--h-row);
padding: 0 4px;
border-radius: var(--radius-row);
@@ -157,13 +157,13 @@
.keymapKeys {
flex: none;
display: flex;
gap: var(--space-1);
gap: 4px;
}
.invalidateBody {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 14px;
color: var(--fg);
font-size: var(--fs-ui);
@@ -185,13 +185,13 @@
.importSummary {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.importList {
margin: 0;
display: grid;
grid-template-columns: max-content 1fr;
gap: var(--space-0-5) var(--space-4);
gap: 2px 16px;
}
.importList dt {
color: var(--fg-muted);
-2
Переглянути файл
@@ -78,9 +78,7 @@ export function appActions(): Action[] {
id,
title: t(key),
category: t("app.category.edit"),
// The native ⌘C / Ctrl+C keep working unbound; listed so another key can be added (IDEA's $Copy…).
hidden: true,
keymap: true,
run: editCommand(command),
});
return [
+7 -7
Переглянути файл
@@ -31,7 +31,7 @@
.entry {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
width: 100%;
height: 26px;
padding: 0 8px;
@@ -68,7 +68,7 @@
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
align-items: center;
gap: var(--space-2) var(--space-3);
gap: 8px 12px;
}
.label {
color: var(--fg);
@@ -76,7 +76,7 @@
}
.inline {
display: flex;
gap: var(--space-2);
gap: 8px;
}
.inline > :first-child {
flex: 1;
@@ -103,7 +103,7 @@
.missing {
display: flex;
align-items: flex-start;
gap: var(--space-2);
gap: 8px;
padding: 8px 10px;
border: 1px solid var(--border-feedback-warning);
border-radius: var(--radius-control, 4px);
@@ -136,17 +136,17 @@
.dependencies {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: var(--space-1);
gap: 4px;
}
.chip {
display: inline-flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
height: 22px;
padding: 0 6px 0 8px;
border: 1px solid var(--border);
+8 -8
Переглянути файл
@@ -9,7 +9,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 0 6px;
}
.sep {
@@ -22,7 +22,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 28px;
padding: 2px 10px;
font-size: var(--fs-small);
@@ -57,14 +57,14 @@
.loading {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 12px;
color: var(--fg-muted);
}
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
@@ -110,7 +110,7 @@
.popupHeader {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
height: var(--h-row);
padding: 4px 10px 0;
font-size: var(--fs-small);
@@ -124,7 +124,7 @@
.inputRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 10px;
border-bottom: 1px solid var(--border-popup);
}
@@ -164,7 +164,7 @@
.completion {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
flex: 1;
}
@@ -196,7 +196,7 @@
.popupFooter {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 6px 10px;
border-top: 1px solid var(--border-popup);
font-size: var(--fs-small);
+7 -7
Переглянути файл
@@ -10,7 +10,7 @@
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-1-5);
gap: 6px;
min-height: 36px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
@@ -37,7 +37,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 28px;
padding: 2px 10px;
font-size: var(--fs-small);
@@ -74,7 +74,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
@@ -124,7 +124,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 32px;
padding: 0 10px;
border-bottom: 1px solid var(--border);
@@ -142,7 +142,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 6px 10px;
font-size: var(--fs-small);
color: var(--fg-secondary);
@@ -162,7 +162,7 @@
.usageHeader {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 26px;
}
.usageVersion {
@@ -190,7 +190,7 @@
.step {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 22px;
white-space: nowrap;
}
+1 -1
Переглянути файл
@@ -22,7 +22,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
+2 -2
Переглянути файл
@@ -14,7 +14,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 0 6px;
}
.sep {
@@ -43,7 +43,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
+1 -1
Переглянути файл
@@ -29,7 +29,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
+1 -1
Переглянути файл
@@ -50,7 +50,7 @@
.line {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
min-height: 24px;
}
.name {
+1 -1
Переглянути файл
@@ -1,7 +1,7 @@
.toolbar {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 3px 6px;
flex-shrink: 0;
}
+2 -2
Переглянути файл
@@ -9,7 +9,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 0 10px;
border-bottom: 1px solid var(--border-popup);
font-size: var(--fs-small);
@@ -62,7 +62,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
width: 100%;
}
+3 -3
Переглянути файл
@@ -14,7 +14,7 @@
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 4px 0;
border-right: 1px solid var(--border);
}
@@ -29,7 +29,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 0 10px;
font-size: var(--fs-ui);
color: var(--fg-subtle);
@@ -72,7 +72,7 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
+3 -3
Переглянути файл
@@ -46,7 +46,7 @@
bottom: 0;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
width: 104px;
height: 54px;
padding: 0 10px;
@@ -79,7 +79,7 @@
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
color: var(--fg-muted);
font-size: var(--fs-small);
text-align: center;
@@ -111,7 +111,7 @@
.recent {
display: grid;
grid-template-columns: repeat(10, minmax(0, 1fr));
gap: var(--space-2) 5px;
gap: 8px 5px;
margin: 12px 12px 0;
padding-top: 10px;
border-top: 1px solid var(--border);
+6 -6
Переглянути файл
@@ -20,7 +20,7 @@
display: grid;
grid-template-columns: minmax(120px, 1fr) 170px 170px;
align-items: center;
column-gap: var(--space-2);
column-gap: 8px;
}
.header.noBranches,
.row.noBranches {
@@ -35,7 +35,7 @@
.headerCell {
display: inline-flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
min-width: 0;
padding: 0;
border: 0;
@@ -62,7 +62,7 @@
.name {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
}
.icon {
@@ -75,7 +75,7 @@
.cell {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
}
.bar {
@@ -112,7 +112,7 @@
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
/* Manage Coverage Reports */
@@ -126,7 +126,7 @@
.reportRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
flex: 1;
white-space: nowrap;
+46 -46
Переглянути файл
@@ -31,7 +31,7 @@
position: relative;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
padding: 0 6px;
border-right: 1px solid var(--border);
overflow: hidden;
@@ -139,7 +139,7 @@
.toolbar {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
height: var(--h-header);
padding: 0 6px;
flex: none;
@@ -237,7 +237,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 0 6px;
}
.dbToolbarSep {
@@ -259,7 +259,7 @@
.nodeRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
}
/* The whole tree row, indent included, so a coloured source and its children form one band. */
@@ -307,7 +307,7 @@
.consoleBar {
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
height: var(--h-header);
padding: 0 8px;
background: var(--bg-editor);
@@ -338,7 +338,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 0 8px;
color: var(--fg-muted);
}
@@ -352,7 +352,7 @@
.pager {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
color: var(--fg-secondary);
font-size: var(--fs-small);
white-space: nowrap;
@@ -370,7 +370,7 @@
display: grid;
grid-template-columns: fit-content(40%) minmax(0, 1fr);
align-items: center;
gap: var(--space-2) var(--space-3);
gap: 8px 12px;
min-width: 0;
padding: 14px;
overflow-wrap: anywhere;
@@ -397,7 +397,7 @@
}
.formRow {
display: flex;
gap: var(--space-2);
gap: 8px;
align-items: center;
}
.formRow[hidden],
@@ -409,7 +409,7 @@
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
color: var(--fg-strong);
}
.formSection::after {
@@ -490,7 +490,7 @@
.colorValue {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.colorSwatch {
width: 12px;
@@ -500,12 +500,12 @@
.namePicker {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
.nameList {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
max-height: 180px;
overflow: auto;
padding-left: 22px;
@@ -513,14 +513,14 @@
.propertyTable {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
}
.propertyHead,
.propertyRow {
display: grid;
grid-template-columns: 1fr 1fr 24px;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
}
.propertyHead {
color: var(--fg-secondary);
@@ -620,7 +620,7 @@
:global(.cm-openidea-db-banner) {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-height: 28px;
padding: 0 6px 0 10px;
background: color-mix(in srgb, var(--danger) 10%, var(--bg-editor));
@@ -682,7 +682,7 @@
.previewBlock {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
min-width: 0;
}
.previewTitle {
@@ -734,7 +734,7 @@
}
.modifyToolbar {
display: flex;
gap: var(--space-0-5);
gap: 2px;
padding: 2px 4px;
border-bottom: 1px solid var(--border);
}
@@ -746,7 +746,7 @@
.modifyItem {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: 24px;
padding: 0 8px;
cursor: default;
@@ -767,7 +767,7 @@
grid-template-columns: max-content 1fr;
align-content: start;
align-items: center;
gap: var(--space-2) var(--space-3);
gap: 8px 12px;
padding: 12px;
overflow: auto;
}
@@ -777,17 +777,17 @@
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.quickDocRows {
margin: 0;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.quickDocRows > div {
display: flex;
gap: var(--space-1-5);
gap: 6px;
}
.quickDocRows dt {
font-weight: 600;
@@ -837,7 +837,7 @@
right: 12px;
bottom: 12px;
display: flex;
gap: var(--space-2);
gap: 8px;
align-items: center;
padding: 3px 10px;
border: 1px solid var(--border);
@@ -859,7 +859,7 @@
.columnsPopup {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
width: 320px;
padding: 8px;
}
@@ -870,14 +870,14 @@
display: flex;
flex: 1;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-width: 0;
white-space: nowrap;
}
.filterPopup {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
width: 280px;
padding: 8px;
}
@@ -888,7 +888,7 @@
.filterValue {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: var(--h-row);
}
.filterValue > :first-child {
@@ -910,7 +910,7 @@
.filterButtons {
display: flex;
flex-wrap: wrap;
gap: var(--space-1-5);
gap: 6px;
}
.sidePanel {
flex: none;
@@ -934,24 +934,24 @@
.recordFields {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 8px;
}
.recordField {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
}
.recordLabel {
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
color: var(--fg-secondary);
}
.valueView {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
height: 100%;
padding: 8px;
box-sizing: border-box;
@@ -998,7 +998,7 @@
flex-direction: column;
flex: 1;
min-height: 0;
gap: var(--space-1-5);
gap: 6px;
overflow: hidden;
}
.valueWindowBody .valueEditor {
@@ -1040,7 +1040,7 @@
.chartBar {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-header);
padding: 0 8px;
flex: none;
@@ -1102,7 +1102,7 @@
.planRow {
display: grid;
grid-template-columns: minmax(160px, 1fr) 1fr;
gap: var(--space-3);
gap: 12px;
width: 100%;
}
.planHeader {
@@ -1113,7 +1113,7 @@
.planOperation {
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -1144,14 +1144,14 @@
/* Export / history / import dialogs. */
.exportDialog {
display: flex;
gap: var(--space-4);
gap: 16px;
height: 420px;
padding: 14px;
}
.exportOptions {
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
width: 300px;
flex: none;
}
@@ -1164,7 +1164,7 @@
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.exportPreviewText,
.historyPreview {
@@ -1206,21 +1206,21 @@
}
.historyDialog {
display: flex;
gap: var(--space-3);
gap: 12px;
height: 440px;
padding: 14px;
}
.historyList {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
width: 300px;
flex: none;
min-height: 0;
}
.historyItem {
display: flex;
gap: var(--space-2);
gap: 8px;
align-items: baseline;
width: 100%;
min-width: 0;
@@ -1263,7 +1263,7 @@
}
.sqlCompletionOption {
display: flex;
gap: var(--space-3);
gap: 12px;
align-items: center;
width: 100%;
padding: 4px 8px;
@@ -1346,7 +1346,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
padding: 4px 8px;
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
@@ -1382,7 +1382,7 @@
transform: translateX(-50%);
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 2px 4px;
border: 1px solid var(--border-popup, var(--border));
border-radius: var(--radius-small);
+1 -2
Переглянути файл
@@ -149,8 +149,7 @@ export function DatabaseView() {
if (!st.treeReveal) return;
const path = st.treeReveal.path;
const frame = requestAnimationFrame(() => {
// Spread + reverse instead of toReversed(), which needs Safari 16.4 (the floor is 15.4).
[...path].reverse().some((key) => tree.current?.reveal(key));
path.toReversed().some((key) => tree.current?.reveal(key));
tree.current?.focus();
});
return () => cancelAnimationFrame(frame);
+10 -10
Переглянути файл
@@ -16,7 +16,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-2) var(--space-4);
gap: 8px 16px;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
}
@@ -25,14 +25,14 @@
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.title,
.totals {
display: flex;
flex-wrap: wrap;
align-items: baseline;
column-gap: var(--space-3);
column-gap: 12px;
min-width: 0;
}
.label {
@@ -56,7 +56,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.compare {
width: 200px;
@@ -126,7 +126,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
@@ -138,7 +138,7 @@
.note {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 8px 12px;
color: var(--fg-subtle);
}
@@ -177,7 +177,7 @@
display: grid;
grid-template-columns: var(--heap-columns);
align-items: center;
column-gap: var(--space-3);
column-gap: 12px;
width: 100%;
}
.head {
@@ -252,7 +252,7 @@
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-3);
gap: 12px;
}
.treeRow > :first-child {
flex: 1;
@@ -274,7 +274,7 @@
.object {
display: inline-flex;
align-items: baseline;
gap: var(--space-2);
gap: 8px;
min-width: 0;
max-width: 100%;
overflow: hidden;
@@ -336,5 +336,5 @@
.openProgress {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
gap: 6px;
}
+4 -4
Переглянути файл
@@ -6,7 +6,7 @@
padding: 6px 12px 8px;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.title {
@@ -31,13 +31,13 @@
.groups {
display: flex;
flex-wrap: wrap;
gap: var(--space-1) 20px;
gap: 4px 20px;
}
.group {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.groupTitle {
@@ -49,6 +49,6 @@
.row {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 22px;
}
+5 -5
Переглянути файл
@@ -9,7 +9,7 @@
.toolbar {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
@@ -23,7 +23,7 @@
.categories {
display: flex;
flex: none;
gap: var(--space-0-5);
gap: 2px;
}
.category {
@@ -49,7 +49,7 @@
.actions {
display: flex;
gap: var(--space-1);
gap: 4px;
padding-top: 6px;
}
@@ -78,7 +78,7 @@
.row {
display: grid;
grid-template-columns: minmax(120px, 3fr) minmax(60px, 1.4fr) 64px 88px 76px 76px;
gap: var(--space-2);
gap: 8px;
padding: 0 8px;
align-items: center;
min-height: 22px;
@@ -159,7 +159,7 @@
.header {
display: flex;
gap: var(--space-2);
gap: 8px;
font-family: var(--font-mono);
font-size: var(--fs-small);
user-select: text;
+3 -3
Переглянути файл
@@ -36,7 +36,7 @@
.item {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
min-height: 24px;
padding: 0 8px 0 12px;
}
@@ -76,7 +76,7 @@
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
padding: 10px 12px;
}
@@ -126,7 +126,7 @@
.actions {
display: flex;
gap: var(--space-2);
gap: 8px;
}
.note {
+3 -3
Переглянути файл
@@ -12,7 +12,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
height: var(--h-row);
padding: 0 4px 0 12px;
border-bottom: 1px solid var(--border);
@@ -35,7 +35,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 4px 12px;
font-size: var(--fs-ui);
}
@@ -95,7 +95,7 @@
}
.message {
gap: var(--space-2);
gap: 8px;
color: var(--fg-subtle);
}
+6 -6
Переглянути файл
@@ -12,7 +12,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
@@ -52,7 +52,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-3);
gap: 12px;
padding-block: 4px;
border-bottom: 1px solid var(--border);
}
@@ -85,7 +85,7 @@
display: grid;
grid-template-columns: var(--memory-columns);
align-items: center;
column-gap: var(--space-3);
column-gap: 12px;
width: 100%;
}
@@ -106,7 +106,7 @@
flex: 1;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
min-width: 0;
height: 100%;
padding: 0;
@@ -161,7 +161,7 @@
.className {
display: flex;
align-items: baseline;
gap: var(--space-2);
gap: 8px;
min-width: 0;
font-family: var(--font-mono);
}
@@ -223,7 +223,7 @@
display: flex;
flex-wrap: wrap;
align-items: baseline;
column-gap: var(--space-3);
column-gap: 12px;
padding: 4px 12px;
border-top: 1px solid var(--border);
color: var(--fg-muted);
+6 -6
Переглянути файл
@@ -23,7 +23,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 0 8px 0 4px;
border-bottom: 1px solid var(--border);
min-width: 0;
@@ -47,7 +47,7 @@
.tabs {
display: flex;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
flex: none;
}
@@ -112,7 +112,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 0 8px;
border-radius: var(--radius-small);
text-align: left;
@@ -180,7 +180,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1);
gap: 4px;
padding: 0 4px 0 12px;
border-bottom: 1px solid var(--border);
}
@@ -190,7 +190,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
}
.prompt {
@@ -231,7 +231,7 @@
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-0-5);
gap: 2px;
padding: 4px 0;
border-right: 1px solid var(--border);
}
+1 -1
Переглянути файл
@@ -11,7 +11,7 @@
.item {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
height: var(--h-list-row);
margin: 0 6px;
padding: 0 8px 0 6px;
+11 -11
Переглянути файл
@@ -12,7 +12,7 @@
.field {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 4px;
}
.label {
@@ -26,13 +26,13 @@
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: var(--space-2);
gap: 8px;
}
.bpTitle {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
color: var(--fg-emphasis);
font-weight: 500;
}
@@ -71,14 +71,14 @@
.bpFooter {
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
margin-top: 2px;
}
.link {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
color: var(--accent);
font-size: var(--fs-ui);
cursor: pointer;
@@ -108,7 +108,7 @@
flex: none;
display: flex;
align-items: center;
gap: var(--space-1-5);
gap: 6px;
padding: 0 8px 0 12px;
border-bottom: 1px solid var(--border-popup);
}
@@ -122,7 +122,7 @@
.chooserRow {
display: flex;
align-items: center;
gap: var(--space-2);
gap: 8px;
min-width: 0;
width: 100%;
padding: 0 8px;
@@ -185,7 +185,7 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1) var(--space-2);
gap: 4px 8px;
}
/* Grows with the dialog when it is resized. */
@@ -211,7 +211,7 @@
padding: 6px 12px 8px;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.exceptionsTitle {
font-size: var(--fs-small);
@@ -226,7 +226,7 @@
.exceptionGroup {
display: flex;
flex-direction: column;
gap: var(--space-0-5);
gap: 2px;
}
.exceptionAdapter {
font-size: var(--fs-small);
@@ -260,7 +260,7 @@
.evalInputRow {
display: flex;
align-items: flex-start;
gap: var(--space-1);
gap: 4px;
}
.evalInput {
flex: 1;
Loaded 100 of 266 files, more files were not shown because too many files have changed in this diff. Show more