Порівняти коміти
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
392c974028 | ||
|
|
d45b0b8032 | ||
|
|
44b021392a | ||
|
|
415ade72e7 | ||
|
|
9ac4c379a4 | ||
|
|
bb151b1d86 | ||
|
|
b3b4cbbe1a | ||
|
|
c6a4361513 | ||
|
|
01ecf9866e | ||
|
|
58dbb8eb1d | ||
|
|
357b728f1d |
No files matched your search
@@ -33,3 +33,6 @@ playwright-report/
|
||||
# Local AI agent files
|
||||
CLAUDE.md
|
||||
.claude/
|
||||
|
||||
# Local reference screenshots
|
||||
pycharm-screenshots/
|
||||
@@ -3974,7 +3974,7 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
|
||||
|
||||
[[package]]
|
||||
name = "ide-agent"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-jsonrpc",
|
||||
@@ -3992,7 +3992,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-analysis"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ast-grep-core",
|
||||
"ide-core",
|
||||
@@ -4006,7 +4006,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-build"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dirs 6.0.0",
|
||||
"dunce",
|
||||
@@ -4021,11 +4021,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-clipboard"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
|
||||
[[package]]
|
||||
name = "ide-core"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"serde",
|
||||
@@ -4038,7 +4038,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-coverage"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-run",
|
||||
@@ -4052,7 +4052,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-dap"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-jsonrpc",
|
||||
@@ -4069,7 +4069,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-db"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dirs 6.0.0",
|
||||
"futures",
|
||||
@@ -4088,7 +4088,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-docker"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"libc",
|
||||
@@ -4102,7 +4102,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-github"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-vcs",
|
||||
@@ -4116,7 +4116,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-host"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dirs 6.0.0",
|
||||
"dunce",
|
||||
@@ -4157,7 +4157,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-http"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"parking_lot",
|
||||
@@ -4175,7 +4175,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-index"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"criterion",
|
||||
@@ -4197,7 +4197,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-jsonrpc"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"futures",
|
||||
@@ -4213,7 +4213,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-language"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"criterion",
|
||||
@@ -4267,7 +4267,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-lsp"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"globset",
|
||||
@@ -4290,7 +4290,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-plugin"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-language",
|
||||
@@ -4308,7 +4308,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-profiler"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-run",
|
||||
@@ -4321,7 +4321,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-remote"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"globset",
|
||||
"ide-core",
|
||||
@@ -4338,7 +4338,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-run"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"ide-core",
|
||||
@@ -4358,7 +4358,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-sdk"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"ide-core",
|
||||
@@ -4377,7 +4377,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-search"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"globset",
|
||||
@@ -4397,7 +4397,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-spell"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"parking_lot",
|
||||
@@ -4410,7 +4410,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-ssh"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dirs 6.0.0",
|
||||
"flate2",
|
||||
@@ -4429,7 +4429,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-syntax"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"ide-language",
|
||||
@@ -4444,7 +4444,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-terminal"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"libc",
|
||||
@@ -4457,7 +4457,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-text"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"ide-core",
|
||||
@@ -4469,7 +4469,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-tools"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"hex",
|
||||
@@ -4489,7 +4489,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-vcs"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"gix",
|
||||
@@ -4506,7 +4506,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-vfs"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"chardetng",
|
||||
"dunce",
|
||||
@@ -4527,7 +4527,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-web"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"ide-core",
|
||||
"open",
|
||||
@@ -4543,7 +4543,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ide-workspace"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"dunce",
|
||||
@@ -5968,7 +5968,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "openidea"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"dirs 6.0.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ resolver = "3"
|
||||
members = ["crates/*", "src-tauri"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
edition = "2024"
|
||||
rust-version = "1.96"
|
||||
license = "Apache-2.0"
|
||||
|
||||
@@ -79,15 +79,25 @@ user's app-data directory only when the user asks; none of them ships with OpenI
|
||||
unmodified, and its source is available from the repository above.
|
||||
- **Eclipse JDT Language Server** (jdtls): EPL-2.0, from download.eclipse.org.
|
||||
|
||||
## en_US Hunspell dictionary
|
||||
## en_US / en_GB Hunspell dictionaries
|
||||
|
||||
`crates/ide-spell/src/dict/en_US.{aff,dic}` (the spell checker's bundled dictionary) is the
|
||||
SCOWL-derived en_US Hunspell dictionary (version 2020.12.07, from the `dictionary-en` npm
|
||||
package 4.0.0), copied unmodified. Copyright Kevin Atkinson and the SCOWL / Hunspell
|
||||
dictionary contributors; MIT- and BSD-style licences, full text in
|
||||
`crates/ide-spell/src/dict/LICENSE-en_US`. It is checked with the
|
||||
`crates/ide-spell/src/dict/LICENSE-en_US`. `crates/ide-spell/src/dict/en_GB-extra.dic` holds the
|
||||
entries of the matching en_GB dictionary (`dictionary-en-gb` npm package 3.0.0, same SCOWL
|
||||
version, licence and affix file) that en_US lacks. They are checked with the
|
||||
[spellbook](https://github.com/helix-editor/spellbook) crate (MPL-2.0).
|
||||
|
||||
## cspell-dicts word lists
|
||||
|
||||
`crates/ide-spell/src/dict/cspell-terms.txt` (programming terms the spell checker accepts)
|
||||
is derived from the software-terms, typescript, node, rust, fullstack, golang, java, cpp,
|
||||
shell and css dictionaries of [cspell-dicts](https://github.com/streetsidesoftware/cspell-dicts)
|
||||
(October 2026): lowercased, filtered and merged by OpenIDEA. Copyright Street Side Software;
|
||||
MIT licence, full text in `crates/ide-spell/src/dict/LICENSE-cspell-dicts`.
|
||||
|
||||
## nvim-treesitter queries
|
||||
|
||||
`crates/ide-syntax/queries/<grammar>/locals.scm` are derived from the `locals.scm`
|
||||
|
||||
@@ -191,7 +191,7 @@ struct Task {
|
||||
dirty: Mutex<BTreeSet<usize>>,
|
||||
flush_scheduled: AtomicBool,
|
||||
stderr: Mutex<VecDeque<String>>,
|
||||
/// Set by `delete`; held while saving, so a late save can't bring the file back.
|
||||
/// Set by `delete`; held while saving.
|
||||
deleted: Mutex<bool>,
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ impl AgentManager {
|
||||
if matches!(f.task.status, AgentStatus::Running | AgentStatus::NeedsInput | AgentStatus::Starting) {
|
||||
f.task.status = AgentStatus::Ready;
|
||||
let mut timeline = Timeline::from_entries(std::mem::take(&mut f.entries));
|
||||
timeline.end_turn();
|
||||
timeline.end_turn(None);
|
||||
f.entries = timeline.entries;
|
||||
}
|
||||
let task = Task::restore(f, shared.clone());
|
||||
@@ -577,7 +577,13 @@ impl Task {
|
||||
|
||||
fn cwd_and_base(&self) -> (PathBuf, String) {
|
||||
let s = self.state.lock();
|
||||
(s.task.cwd.0.clone(), s.task.base_commit.clone().unwrap_or_else(|| "HEAD".into()))
|
||||
// In the project's own checkout the user commits too: compare against the current HEAD,
|
||||
// as the Commit tool window does, so commits made since the task started drop out.
|
||||
let base = match s.task.isolation {
|
||||
Isolation::Local => None,
|
||||
Isolation::Worktree => s.task.base_commit.clone(),
|
||||
};
|
||||
(s.task.cwd.0.clone(), base.unwrap_or_else(|| "HEAD".into()))
|
||||
}
|
||||
|
||||
fn emit_task(&self) {
|
||||
@@ -598,6 +604,11 @@ impl Task {
|
||||
}
|
||||
|
||||
fn persist(&self) {
|
||||
// Held from snapshot to rename, so saves land in order and none follows a delete.
|
||||
let deleted = self.deleted.lock();
|
||||
if *deleted {
|
||||
return;
|
||||
}
|
||||
let bytes = {
|
||||
let s = self.state.lock();
|
||||
serde_json::to_vec(&TaskFile {
|
||||
@@ -608,10 +619,6 @@ impl Task {
|
||||
})
|
||||
};
|
||||
let path = self.shared.paths.store_dir.join(format!("{}.json", self.id));
|
||||
let deleted = self.deleted.lock();
|
||||
if *deleted {
|
||||
return;
|
||||
}
|
||||
if let Err(e) = bytes.map_err(|e| e.to_string()).and_then(|b| write_file(&path, &b)) {
|
||||
tracing::warn!("saving agent task {}: {e}", self.id);
|
||||
}
|
||||
@@ -658,7 +665,7 @@ impl Task {
|
||||
loop {
|
||||
let result = self.turn(&prompt).await;
|
||||
tokio::time::sleep(TURN_GRACE).await;
|
||||
let changed = self.state.lock().timeline.end_turn();
|
||||
let changed = self.state.lock().timeline.end_turn(Some(now_ms()));
|
||||
self.mark_dirty(changed);
|
||||
let send_now = self.send_now.swap(false, Ordering::AcqRel);
|
||||
let next = {
|
||||
@@ -702,7 +709,12 @@ impl Task {
|
||||
.map(|f| file_name(&f.0))
|
||||
.chain(prompt.images.iter().map(|i| i.name.clone().unwrap_or_else(|| "image".into())))
|
||||
.collect();
|
||||
self.push_entry(AgentEntry::User { text: prompt.text.clone(), attachments });
|
||||
self.push_entry(AgentEntry::User {
|
||||
text: prompt.text.clone(),
|
||||
attachments,
|
||||
sent_ms: Some(now_ms()),
|
||||
done_ms: None,
|
||||
});
|
||||
// Launching the agent can take a while (`npx` fetches its adapter on first use).
|
||||
let starting = self.live.lock().as_ref().is_none_or(|l| l.peer.is_closed());
|
||||
self.set_status(if starting { AgentStatus::Starting } else { AgentStatus::Running }, None);
|
||||
@@ -870,6 +882,16 @@ impl Task {
|
||||
|
||||
fn on_update(self: &Arc<Self>, update: &Value) {
|
||||
let kind = update.get("sessionUpdate").and_then(Value::as_str).unwrap_or_default();
|
||||
if kind == "session_info_update" {
|
||||
// The agent's own title for the session replaces the first line of the prompt.
|
||||
let title = update.get("title").and_then(Value::as_str).map(str::trim).filter(|t| !t.is_empty());
|
||||
if let Some(title) = title {
|
||||
self.state.lock().task.title = title.to_owned();
|
||||
self.persist();
|
||||
self.emit_task();
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Session state (also while `session/load` replays history).
|
||||
let provider = self.state.lock().task.provider.clone();
|
||||
let task_changed = {
|
||||
|
||||
@@ -44,7 +44,7 @@ pub struct AgentTask {
|
||||
pub branch: Option<String>,
|
||||
/// Branch (or revision) the worktree was created from.
|
||||
pub base: Option<String>,
|
||||
/// Commit the task's changes are compared against.
|
||||
/// Commit the task's changes are compared against (worktree tasks; local ones use `HEAD`).
|
||||
pub base_commit: Option<String>,
|
||||
/// Why the task failed, when it did.
|
||||
pub error: Option<String>,
|
||||
@@ -194,6 +194,12 @@ pub enum AgentEntry {
|
||||
text: String,
|
||||
/// Names of the files and images sent with it.
|
||||
attachments: Vec<String>,
|
||||
/// When it was sent (ms since the epoch); `None` in tasks saved before this was kept.
|
||||
#[serde(default)]
|
||||
sent_ms: Option<f64>,
|
||||
/// When the turn it started ended; `None` while it runs or when it was cut off.
|
||||
#[serde(default)]
|
||||
done_ms: Option<f64>,
|
||||
},
|
||||
Agent {
|
||||
text: String,
|
||||
|
||||
@@ -66,6 +66,7 @@ impl Handler for FakeAgent {
|
||||
"availableCommands": [{"name": "review", "description": "Review", "input": {"hint": "focus"}}]}),
|
||||
);
|
||||
self.update(&session, json!({"sessionUpdate": "usage_update", "used": 50, "size": 1000}));
|
||||
self.update(&session, json!({"sessionUpdate": "session_info_update", "title": "Lexer fix"}));
|
||||
self.say(&session, "Hi");
|
||||
self.update(
|
||||
&session,
|
||||
@@ -226,6 +227,7 @@ async fn a_task_runs_asks_for_permission_and_survives_a_restart() {
|
||||
assert_eq!((modes.via, modes.current.as_deref()), (AgentConfigVia::Mode, Some("ask")));
|
||||
assert_eq!(t.commands.iter().map(|c| c.name.as_str()).collect::<Vec<_>>(), ["review"]);
|
||||
assert_eq!(t.usage.as_ref().map(|u| (u.used, u.size)), Some((50, 1000)));
|
||||
assert_eq!(t.title, "Lexer fix", "the agent's title replaces the prompt's first line");
|
||||
}
|
||||
mgr.set_config(&task.id, "mode", "code".into()).await.unwrap();
|
||||
assert!(agent.calls.lock().contains(&"session/set_mode \"code\"".to_owned()));
|
||||
@@ -238,10 +240,17 @@ async fn a_task_runs_asks_for_permission_and_survives_a_restart() {
|
||||
events.iter().any(|e| matches!(e, AgentEvent::Task { task } if task.status == AgentStatus::NeedsInput))
|
||||
);
|
||||
let last_entry = events.iter().rev().find_map(|e| match e {
|
||||
AgentEvent::Entry { index, entry, .. } => Some((*index, entry.clone())),
|
||||
AgentEvent::Entry { index, entry, .. } if !matches!(entry, AgentEntry::User { .. }) => {
|
||||
Some((*index, entry.clone()))
|
||||
}
|
||||
_ => None,
|
||||
});
|
||||
assert_eq!(last_entry, Some((4, AgentEntry::Agent { text: "chose yes".into() })));
|
||||
// The turn's end is recorded on the message that started it.
|
||||
assert!(events.iter().any(|e| matches!(
|
||||
e,
|
||||
AgentEvent::Entry { index: 0, entry: AgentEntry::User { sent_ms: Some(_), done_ms: Some(_), .. }, .. }
|
||||
)));
|
||||
}
|
||||
let providers = mgr.providers();
|
||||
let claude = providers.iter().find(|p| p.id == "claude").unwrap();
|
||||
@@ -253,6 +262,7 @@ async fn a_task_runs_asks_for_permission_and_survives_a_restart() {
|
||||
let agent2 = Arc::new(FakeAgent::default());
|
||||
let mgr2 = manager(tmp.path(), agent2.clone());
|
||||
assert_eq!(mgr2.entries(&task.id).unwrap().len(), 5);
|
||||
assert_eq!(mgr2.task(&task.id).unwrap().state.lock().task.title, "Lexer fix");
|
||||
assert_eq!(mgr2.providers().iter().find(|p| p.id == "claude").unwrap().config.len(), 2);
|
||||
mgr2.prompt(&task.id, text("again"), false).await.unwrap();
|
||||
tokio::time::sleep(Duration::from_millis(50)).await;
|
||||
|
||||
@@ -166,11 +166,17 @@ impl Timeline {
|
||||
}
|
||||
}
|
||||
|
||||
/// Settles what an ended turn left open: running tools and pending permissions.
|
||||
pub fn end_turn(&mut self) -> Vec<usize> {
|
||||
/// Settles what an ended turn left open: running tools and pending permissions,
|
||||
/// and records when the turn ended (`done`) on the message that started it.
|
||||
pub fn end_turn(&mut self, done: Option<f64>) -> Vec<usize> {
|
||||
let mut changed = Vec::new();
|
||||
let started = self.entries.iter().rposition(|e| matches!(e, AgentEntry::User { .. }));
|
||||
for (i, e) in self.entries.iter_mut().enumerate() {
|
||||
match e {
|
||||
AgentEntry::User { done_ms, .. } if Some(i) == started && done.is_some() && done_ms.is_none() => {
|
||||
*done_ms = done;
|
||||
changed.push(i);
|
||||
}
|
||||
AgentEntry::Tool { status, .. }
|
||||
if matches!(status, AgentToolStatus::Pending | AgentToolStatus::Running) =>
|
||||
{
|
||||
@@ -286,12 +292,27 @@ mod tests {
|
||||
assert_eq!(t.apply(&plan("completed")).changed, vec![0]);
|
||||
t.apply(&json!({"sessionUpdate": "tool_call", "toolCallId": "c", "title": "Run", "status": "in_progress"}));
|
||||
t.push(AgentEntry::Permission { id: 1, title: "Run?".into(), options: vec![], chosen: None });
|
||||
assert_eq!(t.end_turn(), vec![2, 3]);
|
||||
assert_eq!(t.end_turn(None), vec![2, 3]);
|
||||
let again = Timeline::from_entries(t.entries.clone());
|
||||
assert_eq!(again.plan, Some(0));
|
||||
assert_eq!(again.tools.get("c"), Some(&2));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn end_turn_records_when_the_last_message_was_answered() {
|
||||
let user =
|
||||
|sent: f64| AgentEntry::User { text: "q".into(), attachments: vec![], sent_ms: Some(sent), done_ms: None };
|
||||
let mut t = Timeline::default();
|
||||
t.push(user(1.0));
|
||||
t.push(AgentEntry::Agent { text: "a".into() });
|
||||
t.push(user(2.0));
|
||||
assert_eq!(t.end_turn(Some(5.0)), vec![2]);
|
||||
assert!(matches!(t.entries[0], AgentEntry::User { done_ms: None, .. }));
|
||||
assert!(matches!(t.entries[2], AgentEntry::User { done_ms: Some(5.0), .. }));
|
||||
// Settled once: a later end (a restart) doesn't move it.
|
||||
assert_eq!(t.end_turn(Some(9.0)), Vec::<usize>::new());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn long_output_keeps_its_tail() {
|
||||
let s = tail("é".repeat(MAX_OUTPUT));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ide-spell"
|
||||
description = "Spell checking (Proofreading › Typo): word extraction from comments, strings and declared names, Hunspell en_US dictionary, user dictionaries"
|
||||
description = "Spell checking (Proofreading › Typo): word extraction from comments, strings and declared names, Hunspell en_US / en_GB dictionary, programming terms, user dictionaries"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017-2025 Street Side Software <[email protected]>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,246 @@
|
||||
# Tool and file names, abbreviations and words common in code the other lists lack.
|
||||
# Accepted on their own, never as part of a compound (`conf` would pass `conflift`).
|
||||
# One lowercase word per line; checked case-insensitively.
|
||||
accel
|
||||
acked
|
||||
adoc
|
||||
adoptium
|
||||
allman
|
||||
askpass
|
||||
assignees
|
||||
avif
|
||||
basedpyright
|
||||
bytea
|
||||
canceller
|
||||
cand
|
||||
cands
|
||||
cjs
|
||||
closable
|
||||
clsx
|
||||
codelldb
|
||||
colima
|
||||
commitish
|
||||
condvar
|
||||
conf
|
||||
conftest
|
||||
conns
|
||||
cte
|
||||
ctes
|
||||
cts
|
||||
customizations
|
||||
dap
|
||||
ddl
|
||||
debuggee
|
||||
decapitalize
|
||||
deemphasize
|
||||
defmodule
|
||||
desync
|
||||
dialogs
|
||||
dic
|
||||
disassembler
|
||||
dists
|
||||
dlsym
|
||||
dlv
|
||||
dnd
|
||||
dup
|
||||
emmet
|
||||
envrc
|
||||
eslintrc
|
||||
expando
|
||||
exs
|
||||
fallbacks
|
||||
fixup
|
||||
fori
|
||||
gdscript
|
||||
gdshader
|
||||
gfm
|
||||
gitattributes
|
||||
gitoxide
|
||||
gix
|
||||
glyphs
|
||||
gomod
|
||||
gopath
|
||||
gopls
|
||||
goroot
|
||||
gpgsign
|
||||
gradle
|
||||
gradlew
|
||||
graphql
|
||||
guice
|
||||
hamcrest
|
||||
haspopup
|
||||
hcl
|
||||
hotswap
|
||||
htdocs
|
||||
hxx
|
||||
ideavimrc
|
||||
ime
|
||||
inflight
|
||||
inlines
|
||||
inplace
|
||||
integrations
|
||||
intelephense
|
||||
interp
|
||||
inv
|
||||
ipynb
|
||||
jacoco
|
||||
javac
|
||||
javaw
|
||||
javax
|
||||
jdt
|
||||
jdtls
|
||||
jdwp
|
||||
jenkinsfile
|
||||
jre
|
||||
jsdom
|
||||
jshell
|
||||
jsonl
|
||||
kapt
|
||||
kotlinc
|
||||
kts
|
||||
labelledby
|
||||
latencies
|
||||
lcov
|
||||
lemminx
|
||||
lexically
|
||||
lezer
|
||||
linkify
|
||||
lldb
|
||||
lockb
|
||||
logpoint
|
||||
logpoints
|
||||
lombok
|
||||
lossily
|
||||
lossy
|
||||
mapleader
|
||||
matview
|
||||
memmem
|
||||
menlo
|
||||
menuitemcheckbox
|
||||
mjs
|
||||
msvc
|
||||
mts
|
||||
mvn
|
||||
mvnw
|
||||
natively
|
||||
nextest
|
||||
nocapture
|
||||
nodelay
|
||||
nonmatching
|
||||
noopener
|
||||
noreferrer
|
||||
noremap
|
||||
notif
|
||||
notnull
|
||||
nvm
|
||||
ord
|
||||
osgi
|
||||
pathing
|
||||
pdm
|
||||
pipfile
|
||||
pred
|
||||
preds
|
||||
prunable
|
||||
psvm
|
||||
publickey
|
||||
pwa
|
||||
pyc
|
||||
pycache
|
||||
pyenv
|
||||
pyi
|
||||
pylsp
|
||||
pyvenv
|
||||
recency
|
||||
recents
|
||||
redb
|
||||
redecl
|
||||
reformats
|
||||
reinstalls
|
||||
rekey
|
||||
replit
|
||||
rerunnable
|
||||
rescan
|
||||
restorable
|
||||
retarget
|
||||
rfind
|
||||
rollup
|
||||
rsplit
|
||||
rsplitn
|
||||
rss
|
||||
rst
|
||||
runserver
|
||||
sbt
|
||||
scm
|
||||
sdkman
|
||||
segs
|
||||
sel
|
||||
severities
|
||||
shorthands
|
||||
sig
|
||||
sigil
|
||||
solarized
|
||||
sout
|
||||
specta
|
||||
splitn
|
||||
storable
|
||||
stty
|
||||
subclassed
|
||||
subsequence
|
||||
subsequences
|
||||
subtest
|
||||
subtests
|
||||
supabase
|
||||
sym
|
||||
syms
|
||||
taplo
|
||||
tauri
|
||||
tcpip
|
||||
tcsh
|
||||
temurin
|
||||
texlab
|
||||
tgz
|
||||
timescaledb
|
||||
timestamptz
|
||||
toks
|
||||
topo
|
||||
tpl
|
||||
tsdk
|
||||
tsv
|
||||
unclosed
|
||||
unformatted
|
||||
unlisten
|
||||
unmarking
|
||||
unmatch
|
||||
unminimize
|
||||
unqueue
|
||||
unshelve
|
||||
unsplit
|
||||
unsub
|
||||
unsubs
|
||||
untag
|
||||
untagged
|
||||
uptime
|
||||
vcs
|
||||
vendored
|
||||
vimrc
|
||||
visibilities
|
||||
vite
|
||||
vitest
|
||||
vmargs
|
||||
volar
|
||||
vsix
|
||||
vtsls
|
||||
wasi
|
||||
wasmtime
|
||||
webflux
|
||||
webmanifest
|
||||
wip
|
||||
xcrun
|
||||
xdebug
|
||||
zig
|
||||
zlogin
|
||||
zls
|
||||
zprofile
|
||||
zshenv
|
||||
zshrc
|
||||
zustand
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Spell checking for IDEA's "Proofreading › Typo" inspection: words of
|
||||
//! comments, string literals and declared names (regions come from the
|
||||
//! syntax layer), checked against the bundled en_US Hunspell dictionary, a
|
||||
//! syntax layer), checked against the bundled en_US / en_GB Hunspell dictionary, a
|
||||
//! list of programming terms and the user's accepted words and dictionaries.
|
||||
//! Regular agent nouns of known words (`checkpointer`) pass everywhere; in
|
||||
//! identifiers so do closed compounds of known words (`codebase`).
|
||||
@@ -98,12 +98,17 @@ impl SpellScope {
|
||||
/// At most this many typos are reported per text.
|
||||
pub const MAX_TYPOS: usize = 2000;
|
||||
|
||||
/// The en_GB entries en_US lacks (`colour`, `behaviour`, `normalise`), in the
|
||||
/// same affix scheme: either spelling passes.
|
||||
const EN_GB_EXTRA: &str = include_str!("dict/en_GB-extra.dic");
|
||||
|
||||
/// The en_US dictionary plus [`EN_GB_EXTRA`].
|
||||
fn english() -> &'static spellbook::Dictionary {
|
||||
static DICT: OnceLock<spellbook::Dictionary> = OnceLock::new();
|
||||
DICT.get_or_init(|| {
|
||||
let aff = include_str!("dict/en_US.aff");
|
||||
let dic = include_str!("dict/en_US.dic");
|
||||
spellbook::Dictionary::new(aff, dic).expect("bundled en_US dictionary parses")
|
||||
let dic = format!("{}{EN_GB_EXTRA}", include_str!("dict/en_US.dic"));
|
||||
spellbook::Dictionary::new(aff, &dic).expect("bundled en dictionary parses")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -114,6 +119,7 @@ fn lemmas() -> &'static HashSet<&'static str> {
|
||||
include_str!("dict/en_US.dic")
|
||||
.lines()
|
||||
.skip(1)
|
||||
.chain(EN_GB_EXTRA.lines())
|
||||
.map(|l| l.split('/').next().unwrap_or(l).trim())
|
||||
.filter(|w| !w.is_empty() && w.chars().all(|c| c.is_ascii_lowercase()))
|
||||
.collect()
|
||||
@@ -136,13 +142,12 @@ fn doubles_final_consonant(stem: &str) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether dropping one letter or swapping two adjacent ones gives a dictionary
|
||||
/// Whether dropping one letter or swapping two adjacent ones gives a `known`
|
||||
/// word: then a compound (`writ`+`ting`) is more likely a typo of
|
||||
/// it (`writing`), as Hunspell's CHECKCOMPOUNDREP reasons.
|
||||
fn near_word(lower: &str) -> bool {
|
||||
fn near_word(lower: &str, known: impl Fn(&str) -> bool) -> bool {
|
||||
let b = lower.as_bytes();
|
||||
let dict = english();
|
||||
let check = |v: &[u8]| std::str::from_utf8(v).is_ok_and(|w| dict.check(w));
|
||||
let check = |v: &[u8]| std::str::from_utf8(v).is_ok_and(&known);
|
||||
(0..b.len()).any(|i| check(&[&b[..i], &b[i + 1..]].concat()))
|
||||
|| (0..b.len().saturating_sub(1)).any(|i| {
|
||||
let mut v = b.to_vec();
|
||||
@@ -151,23 +156,41 @@ fn near_word(lower: &str) -> bool {
|
||||
})
|
||||
}
|
||||
|
||||
fn software_terms() -> &'static HashSet<&'static str> {
|
||||
fn term_list(text: &'static str) -> HashSet<&'static str> {
|
||||
text.lines().map(str::trim).filter(|l| !l.is_empty() && !l.starts_with('#')).collect()
|
||||
}
|
||||
|
||||
/// Hand-picked programming terms: short ones (`url`) may be part of a compound.
|
||||
fn curated_terms() -> &'static HashSet<&'static str> {
|
||||
static TERMS: OnceLock<HashSet<&'static str>> = OnceLock::new();
|
||||
TERMS.get_or_init(|| term_list(include_str!("dict/software.txt")))
|
||||
}
|
||||
|
||||
/// Imported programming terms, tool and library names, and abbreviations:
|
||||
/// never part of a compound.
|
||||
fn other_terms() -> &'static HashSet<&'static str> {
|
||||
static TERMS: OnceLock<HashSet<&'static str>> = OnceLock::new();
|
||||
TERMS.get_or_init(|| {
|
||||
include_str!("dict/software.txt")
|
||||
.lines()
|
||||
.map(str::trim)
|
||||
.filter(|l| !l.is_empty() && !l.starts_with('#'))
|
||||
.collect()
|
||||
let mut terms = term_list(include_str!("dict/cspell-terms.txt"));
|
||||
terms.extend(term_list(include_str!("dict/code-words.txt")));
|
||||
terms
|
||||
})
|
||||
}
|
||||
|
||||
/// A software term, or its plural (`endpoints`, `regexes`).
|
||||
fn term(lower: &str) -> bool {
|
||||
curated_terms().contains(lower) || other_terms().contains(lower)
|
||||
}
|
||||
|
||||
/// A software term, or the plural of one Hunspell doesn't know (`endpoints`,
|
||||
/// `regexes`; not `filess`, `contextes`, `checkings`). [`other_terms`] need
|
||||
/// 4+ letters for that (`acses` stays flagged).
|
||||
fn software_term(lower: &str) -> bool {
|
||||
let terms = software_terms();
|
||||
terms.contains(lower)
|
||||
|| lower.strip_suffix('s').is_some_and(|w| terms.contains(w))
|
||||
|| lower.strip_suffix("es").is_some_and(|w| terms.contains(w))
|
||||
let plural_of = |w: &str| (curated_terms().contains(w) || w.len() >= MIN_PART && term(w)) && !english().check(w);
|
||||
term(lower)
|
||||
|| lower.strip_suffix('s').is_some_and(|w| !w.ends_with('s') && plural_of(w))
|
||||
|| lower
|
||||
.strip_suffix("es")
|
||||
.is_some_and(|w| ["s", "x", "z", "ch", "sh"].iter().any(|e| w.ends_with(e)) && plural_of(w))
|
||||
}
|
||||
|
||||
/// Words of a custom dictionary file: a plain word list or a Hunspell `.dic`
|
||||
@@ -224,11 +247,15 @@ impl Speller {
|
||||
|
||||
/// Whether `word` (of prose, a comment or a string) is spelt correctly.
|
||||
/// Case is forgiven the way identifiers need it: `url` passes for `URL`,
|
||||
/// `paris` for `Paris`. Regular agent nouns of known words pass too
|
||||
/// (`checkpointer`, `serializers`).
|
||||
/// `paris` for `Paris`. Possessives (`backend's`), regular agent nouns
|
||||
/// (`checkpointer`, `serializers`) and `-ed` / `-ing` / `-able` forms of
|
||||
/// programming terms (`stringified`) pass too.
|
||||
pub fn is_correct(&self, word: &str) -> bool {
|
||||
if let Some(base) = word.strip_suffix("'s") {
|
||||
return self.is_correct(base);
|
||||
}
|
||||
let lower = word.to_lowercase();
|
||||
self.listed(word, &lower) || self.agent_noun(&lower)
|
||||
self.listed(word, &lower) || self.agent_noun(&lower) || self.term_form(&lower)
|
||||
}
|
||||
|
||||
/// [`Self::is_correct`] for a part of an identifier, which may also be two
|
||||
@@ -261,30 +288,63 @@ impl Speller {
|
||||
let singular = lower.strip_suffix('s').unwrap_or(lower);
|
||||
let Some(before_r) = singular.strip_suffix('r') else { return false };
|
||||
let Some(before_er) = before_r.strip_suffix('e') else { return false };
|
||||
// (stem, root the `-or` noun would be built on)
|
||||
let mut stems = vec![(before_r.to_string(), before_er)];
|
||||
let mut stems = vec![before_r.to_string()];
|
||||
if let Some(y) = before_er.strip_suffix('i') {
|
||||
stems.push((format!("{y}y"), before_er));
|
||||
stems.push(format!("{y}y"));
|
||||
} else if !before_er.ends_with('e') && !doubles_final_consonant(before_er) {
|
||||
stems.push((before_er.to_string(), before_er));
|
||||
stems.push(before_er.to_string());
|
||||
}
|
||||
stems.into_iter().any(|(stem, root)| {
|
||||
stem.len() >= MIN_PART
|
||||
&& (lemmas().contains(stem.as_str()) || self.user_word(&stem))
|
||||
&& !english().check(&format!("{root}or"))
|
||||
})
|
||||
let or_noun = format!("{before_er}or");
|
||||
stems
|
||||
.into_iter()
|
||||
.any(|stem| stem.len() >= MIN_PART && (lemmas().contains(stem.as_str()) || self.term_stem(&stem)))
|
||||
&& !self.listed(&or_noun, &or_noun)
|
||||
}
|
||||
|
||||
/// A programming term or accepted word of 5+ letters Hunspell doesn't know
|
||||
/// (`stringify`; not `calls` or `calc`), to derive other words from.
|
||||
fn term_stem(&self, s: &str) -> bool {
|
||||
s.len() > MIN_PART && self.user_word(s) && !english().check(s)
|
||||
}
|
||||
|
||||
/// `<term>ed` / `<term>ing` / `<term>able` of a programming term or an
|
||||
/// accepted word of 5+ letters: `stringified` (stringify), `memoizing`
|
||||
/// (memoize), `upserted`. Dictionary words only take the endings Hunspell
|
||||
/// knows: `falled`, `quiting` stay flagged. Not when one letter off a known
|
||||
/// word (`preprocesssing`).
|
||||
fn term_form(&self, lower: &str) -> bool {
|
||||
if !lower.bytes().all(|c| c.is_ascii_lowercase()) {
|
||||
return false;
|
||||
}
|
||||
let stem = |s: &str| self.term_stem(s);
|
||||
let derived = ["ed", "ing", "able"].into_iter().any(|suffix| {
|
||||
let Some(root) = lower.strip_suffix(suffix) else { return false };
|
||||
let b = root.as_bytes();
|
||||
(stem(root) && !doubles_final_consonant(root))
|
||||
|| stem(&format!("{root}e"))
|
||||
|| (suffix != "ing" && root.strip_suffix('i').is_some_and(|y| stem(&format!("{y}y"))))
|
||||
|| (b.len() > 2 && b[b.len() - 1] == b[b.len() - 2] && stem(&root[..root.len() - 1]))
|
||||
});
|
||||
derived && !near_word(lower, |w| english().check(w) || self.user_word(w))
|
||||
}
|
||||
|
||||
/// Two known words run together, each at least [`MIN_PART`] letters (or a
|
||||
/// 3-letter programming term: `urlpath`). Proper nouns don't count.
|
||||
/// hand-picked or accepted 3-letter term: `urlpath`). Proper nouns and
|
||||
/// [`other_terms`] don't count (`guid` + `lines` would pass `guidlines`).
|
||||
fn compound(&self, lower: &str) -> bool {
|
||||
if lower.len() < 6 || !lower.bytes().all(|c| c.is_ascii_lowercase()) || NOT_COMPOUNDS.contains(&lower) {
|
||||
return false;
|
||||
}
|
||||
let part = |p: &str| {
|
||||
(p.len() >= 3 && self.user_word(p)) || (p.len() >= MIN_PART && (english().check(p) || self.agent_noun(p)))
|
||||
let known = |p: &str| {
|
||||
self.accepted.contains(p) || curated_terms().contains(p) || self.custom.iter().any(|d| d.contains(p))
|
||||
};
|
||||
(3..=lower.len() - 3).any(|i| part(&lower[..i]) && part(&lower[i..])) && !near_word(lower)
|
||||
let part = |p: &str| match p.len() {
|
||||
0..3 => false,
|
||||
3 => known(p),
|
||||
_ => known(p) || english().check(p) || self.agent_noun(p),
|
||||
};
|
||||
(3..=lower.len() - 3).any(|i| part(&lower[..i]) && part(&lower[i..]))
|
||||
&& !near_word(lower, |w| english().check(w))
|
||||
}
|
||||
|
||||
/// Replacements for `word`, best first, in the word's case style.
|
||||
@@ -301,6 +361,14 @@ impl Speller {
|
||||
out
|
||||
}
|
||||
|
||||
/// Whether the letter run `w` was split from is a known term as a whole:
|
||||
/// `IntelliJ` (`Intelli` + `J`), `PostgreSQL` (`Postgre` + `SQL`).
|
||||
fn known_run(&self, text: &str, w: &WordSpan) -> bool {
|
||||
let start = text[..w.start].rfind(|c: char| !c.is_alphabetic()).map_or(0, |i| i + 1);
|
||||
let end = text[w.end..].find(|c: char| !c.is_alphabetic()).map_or(text.len(), |i| w.end + i);
|
||||
(start, end) != (w.start, w.end) && self.user_word(&text[start..end].to_lowercase())
|
||||
}
|
||||
|
||||
/// Misspelt words of `regions` (document order) in `text`; `None` when
|
||||
/// `cancelled` fires.
|
||||
pub fn check(&self, text: &str, regions: &[Region], cancelled: &dyn Fn() -> bool) -> Option<Vec<Typo>> {
|
||||
@@ -319,7 +387,7 @@ impl Speller {
|
||||
let ok = *verdicts
|
||||
.entry((word, name))
|
||||
.or_insert_with(|| if name { self.is_correct_identifier(word) } else { self.is_correct(word) });
|
||||
if !ok {
|
||||
if !ok && !self.known_run(text, w) {
|
||||
bad.push((*w, r.kind));
|
||||
}
|
||||
}
|
||||
@@ -451,6 +519,45 @@ mod tests {
|
||||
for ok in ["breakpoint", "breakpoints", "endpoints", "datasets", "regexes"] {
|
||||
assert!(s.is_correct(ok), "{ok}");
|
||||
}
|
||||
for ok in
|
||||
["stringify", "instanceof", "keydown", "submenu", "truthy", "vitest", "gradle", "unstaged", "rebasing"]
|
||||
{
|
||||
assert!(s.is_correct(ok), "{ok}");
|
||||
}
|
||||
for bad in ["filess", "contextes", "checkings", "acses"] {
|
||||
assert!(!s.is_correct(bad), "{bad}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn british_spellings() {
|
||||
let s = Speller::default();
|
||||
for ok in ["colour", "behaviours", "normalised", "centred", "analyse", "cancelled", "dialogs"] {
|
||||
assert!(s.is_correct(ok), "{ok}");
|
||||
}
|
||||
for bad in ["colur", "behavour", "normalsed"] {
|
||||
assert!(!s.is_correct(bad), "{bad}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_terms_checked_whole() {
|
||||
let s = Speller::default();
|
||||
let text = "// Open IntelliJ or PostgreSQL, not Intelli alone";
|
||||
let words: Vec<_> =
|
||||
s.check(text, &whole(text, RegionKind::Comment), &|| false).unwrap().into_iter().map(|t| t.word).collect();
|
||||
assert_eq!(words, ["Intelli"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn possessives_and_term_forms() {
|
||||
let s = Speller::default();
|
||||
for ok in ["backend's", "commit's", "stringified", "memoizing", "upserted"] {
|
||||
assert!(s.is_correct(ok), "{ok}");
|
||||
}
|
||||
for bad in ["recieve's", "falled", "quiting", "preprocesssing", "perfer", "callser"] {
|
||||
assert!(!s.is_correct(bad), "{bad}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -471,7 +578,7 @@ mod tests {
|
||||
for ok in ["filepath", "dataframe", "username", "codebase", "pathname", "urlpath", "timestampfile"] {
|
||||
assert!(s.is_correct_identifier(ok), "{ok}");
|
||||
}
|
||||
assert!(!s.is_correct("dataframe"));
|
||||
assert!(!s.is_correct("timestampfile"));
|
||||
for bad in ["eachother", "everytime", "publically", "mesage", "lenght", "recieve", "comming", "withold"] {
|
||||
assert!(!s.is_correct_identifier(bad), "{bad}");
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# 核心体验运行验收补测(2026-10-25)
|
||||
|
||||
本轮按用户缩小后的“核心体验”范围执行,**27个明确场景:修复复测后27通过、0失败**。这不是原94项清单全量完成声明;首轮发现的中文漏译及原清单未完成项仍保留。
|
||||
|
||||
实际版本:`d3feb05`(功能提交 `1e00ea5` 加版本更新)。macOS 原生调试应用,使用真实窗口、编辑器、已安装语言服务器、实际子进程与磁盘结果。测试项目是 `fixtures/ts-app` 的 `/tmp/idea-parity-qa/core-ts` 副本;Python调试和终端脚本仅写入该副本。首次验收未修改产品源码;随后按用户要求修复下列两处问题,运行版本为 `d3feb05` 加工作区改动,未在本仓库提交;Git验收仅在独立core-git副本里创建QA提交。
|
||||
|
||||
通过判定仅针对表内明确写出的步骤。重点编辑、查找、导航、补全、格式化、项目视图和 npm 运行做了亮/暗复测;调试、启动链等执行逻辑没有逐一覆盖所有主题和语言组合。数据库、Docker部署、复杂Git图/merge/rebase/worktree、设置导入导出、完整书签/布局/宏管理不在这次缩小后的核心范围内,原清单相关待测项仍保留。
|
||||
|
||||
## 修复复测(同日)
|
||||
|
||||
- IN-2:保留未过滤的服务器诊断;检查方案编辑时重新投影已完成或进行中的结果,同步严重级别和问题计数,保留排除状态。原生应用亮/暗各验证 error → warning → disabled → restored;还验证了禁用时执行检查,再启用无需重跑即恢复2条诊断。[结构化证据](/tmp/idea-parity-qa/fix-IN2-results.json)、[暗色恢复截图](/tmp/idea-parity-qa/fix-IN2-dark-restored.png)。
|
||||
- CSS:为共享语言服务器的 CSS、SCSS、Less 配置提供默认对象,避免 workspace/configuration 返回 null。三种文件分别打开 `.qa { colr: red; }`,均返回 unknownProperties 警告;新进程日志无 validProperties 异常。[诊断证据](/tmp/idea-parity-qa/fix-css-results.json)、[原生日志](/tmp/idea-parity-qa/fix-app.log)。
|
||||
- 验证:前端分析相关10项测试、LSP协议26项测试均通过;pnpm typecheck、原生 debug build、cargo clippy -p ide-lsp --all-targets -- -D warnings、cargo fmt 与 git diff --check 通过。新增回归覆盖方案修改、禁用后恢复、流式检查中修改方案、计数和原始严重级别恢复,以及真实内置配置的协议响应。
|
||||
|
||||
## 首次失败记录(已修复,保留复现过程)
|
||||
|
||||
### A. IN-2:旧 Inspect Code 结果不随检查方案更新
|
||||
|
||||
1. 打开 `src/qa-diagnostic.ts`:`const qaNumber: number = "wrong";`。
|
||||
2. 默认方案执行 Code › Inspect Code,仅检查当前文件,得到2条 TypeScript 错误。
|
||||
3. 将 TypeScript 检查严重级别设为 warning:编辑器变为黄色波浪线、Problems 显示 warning;旧 Inspection Results 仍是红色错误。
|
||||
4. 禁用该检查:编辑器无波浪线、Problems 清空;旧 Inspection Results 仍显示“2 problems in 1 file”。
|
||||
|
||||
期望:按 IN-2 的“同时变化”要求,三处采用同一有效方案。实际只有前两处即时更新。亮/暗均复现。[暗色截图](/tmp/idea-parity-qa/core-IN2-repro-dark.png)、[亮色截图](/tmp/idea-parity-qa/core-IN2-batch-disabled.png)、[结构化结果](/tmp/idea-parity-qa/core-IN2-repro-dark.json)。
|
||||
|
||||
**边界:重新执行 Inspect Code 后确实得到0条结果**,所以不是方案永远无效,而是已有批量结果的实时同步缺失。[重跑结果](/tmp/idea-parity-qa/core-IN2-rerun-disabled.json)。
|
||||
|
||||
实现线索:[inspect.ts](/Users/thomas/repo/kalo/idea/src/features/analysis/inspect.ts:183) 在启动时取得方案,接收事件时过滤一次并保存;[InspectionView.tsx](/Users/thomas/repo/kalo/idea/src/features/analysis/InspectionView.tsx:219) 的树以已有 files 构建,没有将方案变化作为依赖。这与首次运行现象一致;现已按上节修复。
|
||||
|
||||
### B. CSS 语言服务器校验抛异常
|
||||
|
||||
1. 在副本新建并打开 `src/qa-validation.css`:`.qa { colr: red; }`。
|
||||
2. 等待已安装的 `vscode-css-language-server` 校验。
|
||||
3. 日志出现 `TypeError: Cannot read properties of null (reading 'validProperties')`,诊断列表为空,错误属性没有提示。
|
||||
|
||||
期望:默认 CSS 校验正常运行并对未知属性给出诊断,不抛异常。新建两个空 CSS 时已出现同一异常;专用错误样例和原生进程重启后再次复现。[运行日志及诊断](/tmp/idea-parity-qa/core-css-validation.json)、[编辑器截图](/tmp/idea-parity-qa/core-css-validation.png)、[重启日志](/tmp/idea-parity-qa/core-app-restart.log)。
|
||||
|
||||
首次排查线索为 [handler.rs](/Users/thomas/repo/kalo/idea/crates/ide-lsp/src/handler.rs:119) 的 workspace/configuration:未配置 section 返回 null。现已验证默认配置对象可修复该异常,见上节。
|
||||
|
||||
## 完成的核心场景
|
||||
|
||||
| 编号 | 结果 | 场景 | 实际验证 | 证据 |
|
||||
|---|---|---|---|---|
|
||||
| C01 | 通过 | 编辑与保存 | 输入、撤销、重做、保存磁盘、外部写入自动重载;亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-edit-confirm-results.json) |
|
||||
| C02 | 通过 | 常用编辑命令 | 同一行注释/取消注释、复制行,验证实际文档结果;亮/暗各复测。注释命令会移动到下一行,复测时重新定位原行。 | [记录](/tmp/idea-parity-qa/core-edit-commands-final-dark.json) |
|
||||
| C03 | 通过 | 项目视图与恢复 | 五种视图均切换;Open Files 成目录树;All Changed Files 仅包含被修改的已跟踪 index.ts。结束并重新启动原生进程后仍为 Open Files,23个打开路径与重启前完全一致。 | [记录](/tmp/idea-parity-qa/core-persist-after.json) |
|
||||
| C04 | 通过 | New 搜索和创建 | 项目树焦点下 ⌘N 出现 Search for file type;css 能找到 Stylesheet。CSS/SCSS/Less、Dockerfile、EditorConfig、gitignore、JSON/YAML/TOML/Shell/HTTP 的磁盘结果沿用首轮实际创建证据。 | [记录](/tmp/idea-parity-qa/core-NF1-dark.png) |
|
||||
| C05 | 通过 | ⌘N 上下文路由 | Python/Markdown 打开 New,并实际在当前文件的 src 目录创建 CSS;Java/Kotlin/TS 的动作轨迹为 code.generate,未打开 New。Kotlin 只验证路由,未声称生成代码可用。 | [记录](/tmp/idea-parity-qa/core-lastkeys.log) |
|
||||
| C06 | 通过 | 项目树文件操作 | 从选中的 src 目录 New › File 创建 qa-tree-created.txt;Rename 后旧路径消失、新路径存在;确认移至 Trash 后新路径消失。 | [记录](/tmp/idea-parity-qa/core-tree-deleted.json) |
|
||||
| C07 | 通过 | 文件内上下文查找 | In Comments 仅选中三个注释内的 shared(含 shared_history),Next/Previous 在位置3/38/78间导航,不命中代码和字符串;亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-find-final.log) |
|
||||
| C08 | 通过 | 替换大小写与排除 | Preserve Case 实际得到 bar/Bar/BAR;排除项出现删除线,Replace All 保留该项、替换其余项;亮/暗重新验证。 | [记录](/tmp/idea-parity-qa/core-FB4-final-dark.png) |
|
||||
| C09 | 通过 | 多行及搜索历史 | ⇧⌘↵ 输入跨行 alpha/beta 后计数1/1并选中完整跨行文本;⌥↓ 能打开编辑器历史,Find in Files 也显示新增 QA_shared_history。 | [记录](/tmp/idea-parity-qa/core-FB5-dark-confirm.png) |
|
||||
| C10 | 通过 | 自定义搜索范围 | 三个文件同一标记:不限定时3个文件;file:src//*.ts&&!file:*test* 仅命中 qa_scope.ts;Inspect Code 的 Custom scope 可选同一 Core TS Scope。 | [记录](/tmp/idea-parity-qa/core-FF3-final.png) |
|
||||
| C11 | 通过 | 跨文件替换与预览 | 两个文本文件6处替换,预览显示 Bar/BAR/bar,确认后磁盘一致;多行搜索可命中多个文件。保留大小写在亮/暗分别确认。 | [记录](/tmp/idea-parity-qa/core-FF4-dark-final.json) |
|
||||
| C12 | 通过 | 搜索排除归档 | 在项目内放入含唯一标记的 zip、jar,Find in Files 返回 No matches;不是只根据代码推断。 | [记录](/tmp/idea-parity-qa/core-FF5-archive.png) |
|
||||
| C13 | 通过 | 文件/类型/符号导航 | Go to File 打开 money.ts,Go to Class 打开 Cart,Go to Symbol 打开 formatMoney;调用点转到 Cart 定义,Back/Forward 正确返回和前进;亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-navigation.log) |
|
||||
| C14 | 通过 | Search Everywhere 筛选 | Files 排除 TypeScript、Classes 排除 Classes、Symbols 排除 Functions、Text 设 *.py,结果分别被过滤;切换页后各页值独立保留;亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-filters-final.log) |
|
||||
| C15 | 通过 | Actions 跳转设置 | 复选框为 Include disabled actions;搜索 code completion 有 Settings: Editor | General,选中后回车打开原生 Settings 的 Code Completion 页。 | [记录](/tmp/idea-parity-qa/core-NV2-target-final.png) |
|
||||
| C16 | 通过 | 重命名与 Generate | ⇧F6 原地重命名,第二次 ⇧F6 打开名称对话框;qaOriginalName 的声明和引用一起改为 qaRenamed。TS ⌘N 对缺失接口方法执行 Generate,生成 run() 实现。 | [记录](/tmp/idea-parity-qa/core-rename-clean.log) |
|
||||
| C17 | 通过 | LSP 补全 | 单候选自动插入开关实际改变行为;字母排序有效;函数补全插入(),有参数时光标在括号内且显示参数提示;无参光标在括号后;已有(不重复。亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-completion.log) |
|
||||
| C18 | 通过 | 格式化保护区 | 手动 Reformat 与保存时格式化都格式化保护区外的代码,@formatter:off/on 中间保持逐字不变;亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-IN7-save-dark.json) |
|
||||
| C19 | 通过 | 检查结果同步(IN-2) | 修复后亮/暗均验证严重级别、禁用和恢复即时同步,禁用时运行后重新启用也可恢复旧结果,无需重跑。 | [记录](/tmp/idea-parity-qa/fix-IN2-results.json) |
|
||||
| C20 | 通过 | 运行与测试反馈 | npm start 输出购物车合计 $134.97、退出0;正常测试通过;开启 opt-in 失败测试后树显示1 failed/4 passed、断言和源文件行、退出1。亮/暗各复测。 | [记录](/tmp/idea-parity-qa/core-runactual-final.log) |
|
||||
| C21 | 通过 | Current File 与调试 | Current File 直接运行 TS 输出 QA_CURRENT_FILE_OK;Python Current File 调试命中断点,显示 number=21,进入 double、越过后 answer=42,求值返回42,跳出、恢复后输出42、退出0。TS 调试器另列环境阻塞。 | [记录](/tmp/idea-parity-qa/core-debug-final-console.png) |
|
||||
| C22 | 通过 | Before launch 执行链 | 先运行子配置,再成功 Build,再 shell,最后主进程;记录 child/shell/main,Build 成功且主子退出0。额外验证非0步骤阻止启动并通知、循环引用被拒绝。 | [记录](/tmp/idea-parity-qa/core-RC6-success.json) |
|
||||
| C23 | 通过 | Compound | 两个成员17ms间隔启动并同时处于 running;选择 compound、从编辑器触发 Stop 后两个成员均 finished/130。 | [记录](/tmp/idea-parity-qa/core-RC7-stopped.json) |
|
||||
| C24 | 通过 | 交互终端 | PTY 输入 hello 得到回显;QA_RED 在亮/暗为红色;窗口缩放使子进程收到尺寸233→89列,恢复后120列;输入exit正常退出0,另一次Stop退出130。 | [记录](/tmp/idea-parity-qa/core-RC9-resize.png) |
|
||||
| C25 | 通过 | Power Save 核心行为 | 正常模式自动补全弹出;开启后同样输入不弹出,编辑器有横幅;有效配置同时关闭 usages Code Vision 等后台提示。随后关闭并确认重启后 false;未把这等同于全部后台任务性能验证。 | [记录](/tmp/idea-parity-qa/core-WB7-enabled.json) |
|
||||
| C26 | 通过 | CSS 校验集成 | 修复后重新编译并启动原生应用,CSS/SCSS/Less 均对 colr 返回 unknownProperties 警告,日志无原异常。 | [记录](/tmp/idea-parity-qa/fix-css-results.json) |
|
||||
| C27 | 通过 | Git常用流程 | 独立Python副本中查看HEAD与工作区diff,显示唯一QA标记差异;Commit先报告已有2个警告,选择Commit Anyway后实际提交,git diff为空,Git Log显示新提交。未推送。 | [记录](/tmp/idea-parity-qa/core-git-final.json) |
|
||||
|
||||
## 环境和验证边界
|
||||
|
||||
- Python debugpy 1.8.22 已安装,断点、变量、求值、三种单步和正常退出都实际验证。`js-debug` 未安装,**TypeScript/Node 调试没有通过判定**,没有拿 Python 的结果替代它。
|
||||
- Kotlin 两个语言服务器和 Marksman 缺失。Kotlin 的 ⌘N 仅确认路由到 Generate;未声称 Kotlin 代码生成/补全/重构已通过。
|
||||
- 部分配置通过真实 settings IPC 写入副本,运行配置执行链通过真实注册动作启动;没有把这些视作配置编辑器每个鼠标流程都已验收。
|
||||
- 第一次应用运行经过热更新,产生过状态模块/焦点残留;已关闭该调试进程、单独启动Vite和编译好的原生二进制后复测快捷键。干净启动后重命名和 Generate 正常,因此不列为产品失败。
|
||||
- `document.execCommand` 在终端缩放后的第二次注入没有发送文本;改用 textarea 的 InputEvent 后回显与正常退出均成功。这是驱动差异,不列为产品键入失败。使用的桥接输入均未被等同于人工键盘全矩阵验证。
|
||||
- 已结束并重启原生进程,Open Files 模式和23个打开路径完整恢复。[重启前](/tmp/idea-parity-qa/core-persist-before.json)、[重启后](/tmp/idea-parity-qa/core-persist-after.json)。记录中的 `/tmp` 与 `/private/tmp` 双路径是测试脚本先后用两种路径打开同一文件造成,没有将其直接列为正常用户路径问题。
|
||||
- 本轮没有应用崩溃;没有做量化卡顿测试。故意失败的测试、Before launch失败和Stop后的130通知均为测试输入产生;独立异常是上面的CSS服务器错误。
|
||||
- 本轮无产品代码改动,因此没有重复运行完整构建测试;首轮的 typecheck 与30个相关Vitest结果仍单独记录,不作为运行场景的替代。
|
||||
- 测试进程已停止;Power Save 恢复为false;全局语言/主题未新增改动。副本和截图保留供复核。
|
||||
@@ -1,125 +0,0 @@
|
||||
# IDEA 对齐运行验收记录(2026-10-25)
|
||||
|
||||
结论:**尚未达到全量验收通过条件**。累计94项中,功能断言通过35项、失败1项、部分验证58项。IN-2与清单外CSS校验异常已修复并经原生应用复测。核心复测27场景的具体范围、修复后27通过/0失败结论见[核心补测报告](acceptance-idea-core-result.md);不能把本次核心补测当作原94项全部完成。
|
||||
|
||||
目标提交为 `1e00ea5`;启动后仓库由外部更新为 `d3feb05 chore: v0.1.14`,仅版本文件变化,实际后续验收运行此版本。首次验收未改动产品源码;随后按用户要求修复IN-2和CSS配置,版本为 `d3feb05` 加工作区改动,未提交。测试均使用 `/tmp/idea-parity-qa/` 下的 fixture 副本。
|
||||
|
||||
使用 `pnpm tauri dev` 启动真实 macOS Tauri 应用,桥接操作真实 DOM、注册动作,并读取运行结果。部分设置通过真实 IPC 写入测试项目配置,以核对运行时行为;这不替代 Settings 原始鼠标路径或快捷键验证。热更新造成的旧模块实例问题已识别,相关外部库检查重新使用运行中的模块后重做;以 `libraries-final.log` 为准。
|
||||
|
||||
亮/暗主题已抽查 New、查找、运行配置、数据库、工具栏、Cleanup;未做到94项各自双主题全覆盖,主题总要求仍未完成。中文抽查发现可复现漏译。未观察到功能整体缺失;未覆盖项不能据此判定已实现。
|
||||
|
||||
辅助检查:`pnpm typecheck` 退出码0;4个相关 Vitest 文件共30个测试通过(libraries、NewPopup、file templates、run-anything)。没有重新运行完整 Rust/前端测试,不沿用清单中旧提交的通过数作为本轮证据。
|
||||
|
||||
## 逐项记录
|
||||
|
||||
| 编号 | 结果 | 现象、范围和证据 |
|
||||
|---|---|---|
|
||||
| PV-1 | 通过 | 真实 Project 标题下拉列出五种要求的模式;[证据](/tmp/idea-parity-qa/PV-1-menu.png) |
|
||||
| PV-2 | 通过 | 核心复测:五种模式已操作;Open Files 成树、All Changed Files 仅显示修改的已跟踪文件;原生进程重启后 Open Files 和23个打开路径恢复。[证据](/tmp/idea-parity-qa/core-persist-after.json) |
|
||||
| PV-3 | 通过 | Open Files 中定位未打开的 README.md,自动回到 Project 并选中 |
|
||||
| PV-4 | 部分 | Python 副本已建 .venv,External Libraries 注册标准库、venv 库和 site-packages;.venv 下逐级展开对照未完成;[证据](/tmp/idea-parity-qa/PV-6-python-app.png) |
|
||||
| PV-5 | 部分 | 在副本 site-packages 新建 qa_library.py,经编辑器插入文字后内容和磁盘均不变,readOnly=true,横幅正常;节点重命名/删除/新建/拖拽未逐项操作;[证据](/tmp/idea-parity-qa/PV-5-blocked-input.png) |
|
||||
| PV-6 | 部分 | Rust stdlib、Go SDK、JDK/src.zip、Gradle junit-jupiter 源码 jar、TS 的 typescript/vitest 直接依赖均已识别并注册到树;Cargo 依赖、Go 模块和 Maven 分组未完整覆盖;[证据](/tmp/idea-parity-qa/libraries-final.log) |
|
||||
| PV-7 | 部分 | JDK src.zip!/java.base/java/lang/String.java 实际打开,语法高亮、readOnly=true;树内逐级浏览及另一个 jar 未完整操作;[证据](/tmp/idea-parity-qa/PV-7-archive.png) |
|
||||
| PV-8 | 通过 | TS 副本 package.json 添加已在 node_modules 中的 qa-dep;857ms 后 External Libraries 已出现该依赖,随后恢复清单;[证据](/tmp/idea-parity-qa/PV-8-refresh.json) |
|
||||
| NF-1 | 通过 | 核心复测:项目树选中src,⌘N 打开带搜索框的 New;css 找到 Stylesheet。随后 New › File 实际在src创建文件。[证据](/tmp/idea-parity-qa/core-tree-new-parent.json) |
|
||||
| NF-2 | 通过 | 实际创建 CSS、SCSS、Less、Dockerfile、.editorconfig、.gitignore、JSON、YAML、TOML、Shell 和 HTTP 文件;核对磁盘扩展名及模板内容;[证据](/tmp/idea-parity-qa/templatesactual.log) |
|
||||
| NF-3 | 通过 | 核心复测:Python/Markdown 的 ⌘N 均打开 New,实际创建的CSS都在当前文件的src目录。[证据](/tmp/idea-parity-qa/core-lastkeys.log) |
|
||||
| NF-4 | 通过 | 核心复测:Java/Kotlin/TS 的 ⌘N 动作轨迹为 code.generate,均不打开 New;TS 实际生成缺失接口方法。Kotlin只验证路由,语言服务器缺失。[证据](/tmp/idea-parity-qa/core-NF4-generate.png) |
|
||||
| NF-5 | 部分 | 动作能弹出 New 并在当前 worker 目录创建文件;任意焦点和 ⌃⌥N 按键矩阵未完整验证;[证据](/tmp/idea-parity-qa/NF-5.png) |
|
||||
| NF-6 | 通过 | 创建 /tmp/idea-parity-qa/qa-new-project,勾选 Git,磁盘 .git 存在,出现独立 project-1 窗口;[证据](/tmp/idea-parity-qa/NF-6-created.json) |
|
||||
| NF-7 | 部分 | 重命名为 QA renamed project 后原生窗口标题更新,polyglot 磁盘目录保持原名;最近项目列表未单独检查;[证据](/tmp/idea-parity-qa/NF-7-renamed.png) |
|
||||
| FB-1 | 通过 | 漏斗列出 Search In Selection 和清单中的六种上下文范围;[证据](/tmp/idea-parity-qa/FB-1-filter.png) |
|
||||
| FB-2 | 通过 | 核心复测:In Comments 计数3;Next/Previous在三个注释位置间跳转,不命中代码/字符串;亮暗均验证。[证据](/tmp/idea-parity-qa/core-find-final.log) |
|
||||
| FB-3 | 通过 | 9 处 foo/Foo/FOO 替换为 bar/Bar/BAR,磁盘副本编辑内容符合预期;[证据](/tmp/idea-parity-qa/FB-3-result.png) |
|
||||
| FB-4 | 通过 | 排除第一处匹配后显示删除线,Replace All 保留该处 bar,其余变为 baz;[证据](/tmp/idea-parity-qa/FB-4-result.png) |
|
||||
| FB-5 | 通过 | 核心复测:⇧⌘↵ 后跨行输入alpha/beta,计数1/1、选择完整跨行内容;亮暗均确认。[证据](/tmp/idea-parity-qa/core-FB5-dark-confirm.png) |
|
||||
| FB-6 | 通过 | 核心复测:⌥↓ 打开编辑器最近搜索,新增QA_shared_history同时出现在 Find in Files 的最近搜索。[证据](/tmp/idea-parity-qa/core-find-final.log) |
|
||||
| FF-1 | 通过 | 真实窗口显示 In Project/Module/Directory/Scope,polyglot Module 下拉含根模块及 api、web;[证据](/tmp/idea-parity-qa/FF-1-options.json) |
|
||||
| FF-2 | 通过 | 新建并保存自定义 scope;!(file:src//* 实时显示 Missing `)` 错误,合法表达式出现在下拉;[证据](/tmp/idea-parity-qa/FF-2-real-invalid.png) |
|
||||
| FF-3 | 通过 | 核心复测:自定义Scope将3个标记文件缩至唯一qa_scope.ts;Inspect Code的Custom scope也能选Core TS Scope。[证据](/tmp/idea-parity-qa/core-FF3-final.png) |
|
||||
| FF-4 | 通过 | 核心复测:跨文件多行搜索命中;6处替换的保留大小写预览与磁盘Bar/BAR/bar一致;亮暗均确认。[证据](/tmp/idea-parity-qa/core-FF4-dark-final.json) |
|
||||
| FF-5 | 通过 | 核心复测:项目内jar/zip包含唯一标记,Find in Files不命中。[证据](/tmp/idea-parity-qa/core-FF5-archive.png) |
|
||||
| NV-1 | 通过 | 核心复测:四页分别过滤文件类型/类种类/符号种类/文件掩码,结果变化且各页保留独立选择;亮暗均验证。[证据](/tmp/idea-parity-qa/core-filters-final.log) |
|
||||
| NV-2 | 通过 | 核心复测:文案正确;Settings: Code Completion结果回车打开原生设置的对应页面。[证据](/tmp/idea-parity-qa/core-NV2-target-final.png) |
|
||||
| NV-3 | 部分 | 未执行:动作快捷键录入、生效与三种冲突解决 |
|
||||
| NV-4 | 部分 | 未执行:书签列表新建/重命名/删除/默认列表/移动矩阵 |
|
||||
| NV-5 | 部分 | 书签弹窗入口存在且空状态正常;文件、文件夹、行书签及按列表分组跳转未执行;[证据](/tmp/idea-parity-qa/NV-5.png) |
|
||||
| NV-6 | 部分 | 未执行:Structure 字段/非公开成员/可见性排序 |
|
||||
| NV-7 | 部分 | 未执行:支持 typeHierarchy 的 TS/Java 继承成员及跳转 |
|
||||
| NV-8 | 部分 | Recent Locations 有相对时间和代码片段;类/方法面包屑和片段高亮未完整核对;[证据](/tmp/idea-parity-qa/NV-8.png) |
|
||||
| NV-9 | 部分 | 已提交 fixture 的 Python 函数出现 Thomas Hong 作者;Settings 有 Code author;多人 +N 及关闭效果未验证 |
|
||||
| ED-1 | 通过 | 核心复测:关闭单候选自动插入时保留一个候选,开启后实际自动插入;亮暗均确认。[证据](/tmp/idea-parity-qa/core-completion.log) |
|
||||
| ED-2 | 通过 | 核心复测:打开Sort suggestions alphabetically后真实候选按名称排序,popup含Sort by name;通过设置开关路径验证。[证据](/tmp/idea-parity-qa/core-ED2-sorted-dark.png) |
|
||||
| ED-3 | 通过 | 核心复测:有参/无参函数自动括号、光标落点和参数提示符合要求;已有(不重复;亮暗均验证。[证据](/tmp/idea-parity-qa/core-completion.log) |
|
||||
| ED-4 | 部分 | Top/Bottom/Left/Right/None 均切换并截图,左右为竖排,None 隐藏标签;滚动、拖拽和菜单一致性未逐项验证;[证据](/tmp/idea-parity-qa/ED-4-none.png) |
|
||||
| ED-5 | 部分 | Editor Tabs 的相关设置项齐全;每种选项实际行为未逐项验证;[证据](/tmp/idea-parity-qa/settings-Editor-Tabs.png) |
|
||||
| ED-6 | 部分 | Inline Completion 设置页存在;未配置支持 inlineCompletion 的服务,运行预览及快捷键跳过,不能视为通过;[证据](/tmp/idea-parity-qa/settings-Inline-Completion.png) |
|
||||
| IN-1 | 部分 | Inspections 页面有方案、搜索、按语言树和描述区域;三态与 Severity 的编辑操作未完成;[证据](/tmp/idea-parity-qa/IN-1-settings.png) |
|
||||
| IN-2 | 通过 | 修复复测:亮/暗下编辑器和旧Inspect Code结果随严重级别、禁用、恢复即时同步,计数同步;禁用时运行后也能重新启用恢复诊断,无需重跑。[证据](/tmp/idea-parity-qa/fix-IN2-results.json) |
|
||||
| IN-3 | 部分 | 未执行:检查方案 Duplicate/Copy/Rename/Delete 和内置方案保护 |
|
||||
| IN-4 | 部分 | 测试副本已写入 recieve;注释/字符串/声明和调用名的诊断对照未完成 |
|
||||
| IN-5 | 部分 | Spelling 设置页面存在;Typo 上下文候选及保存两类词典未执行;[证据](/tmp/idea-parity-qa/settings-Spelling.png) |
|
||||
| IN-6 | 部分 | Code Style 页面有 Default (IDE) Scheme 与 Copy to Project;语言子页面联动未完整操作;[证据](/tmp/idea-parity-qa/settings-Code-Style.png) |
|
||||
| IN-7 | 通过 | 核心复测:手动及保存格式化都格式化保护区之外,formatter:off/on之间逐字保持;亮暗均验证。[证据](/tmp/idea-parity-qa/core-IN7-save-dark.json) |
|
||||
| IN-8 | 通过 | 项目配置 Do not format 为 *.json,执行 Reformat Code 出现明确跳过提示;[证据](/tmp/idea-parity-qa/IN-8-excluded.png) |
|
||||
| IN-9 | 部分 | Cleanup 范围及 fix/import/format 选项存在,可取消;实际清理结果和中途取消未执行;[证据](/tmp/idea-parity-qa/IN-9.png) |
|
||||
| FT-1 | 部分 | 打开 x.foo 后添加 YAML 关联,现有 editor context 立即变为 yaml/YAML;图标及 Go to File 未独立核对;[证据](/tmp/idea-parity-qa/FT-1-yaml.png) |
|
||||
| FT-2 | 部分 | 调用同名注册动作使 YAML→JSON→YAML,现有编辑器立即更新;右键菜单路径及撤销未操作;[证据](/tmp/idea-parity-qa/FT-2-revert.json) |
|
||||
| FT-3 | 通过 | 无扩展名 qa-hashbang 带 #!/usr/bin/env python3,实际 editor context 为 python/Python;[证据](/tmp/idea-parity-qa/FT-3-hashbang.png) |
|
||||
| PS-1 | 部分 | 添加外部 extra-root 后树出现根,Find in Files 命中 extra.ts;Go to File 和外部文件修改刷新未完整验证;[证据](/tmp/idea-parity-qa/PS-1-search.png) |
|
||||
| PS-2 | 部分 | 即时设置 *.log;tmp* 后 Find in Files 不再命中 qa.log 中的唯一标记;树与索引侧未独立核对;[证据](/tmp/idea-parity-qa/PS-2-search.png) |
|
||||
| TP-1 | 部分 | File and Code Templates 页面包含 Includes,说明支持 #parse;编辑 File Header 后新建 Java/Kotlin 未执行 |
|
||||
| TP-2 | 部分 | 模板页有 Code 标签;修改测试方法模板并生成测试未执行 |
|
||||
| TP-3 | 部分 | Reformat according to style 默认已勾选;$END$ 光标及格式化效果未单独验证;[证据](/tmp/idea-parity-qa/settings-File-and-Code-Templates.png) |
|
||||
| RC-1 | 通过 | 核心复测:Current File保持可选,直接运行TS输出正确;Python Current File调试命中断点并可单步/求值/正常退出。Node调试器缺失单独记为环境阻塞。[证据](/tmp/idea-parity-qa/core-debug-final-console.png) |
|
||||
| RC-2 | 通过 | + 菜单列出所有要求类型,含 Compound 与 Docker 三种子类型,搜索输入存在;[证据](/tmp/idea-parity-qa/RC-2-types.png) |
|
||||
| RC-3 | 部分 | 实际新建 Shell/Program,Program env 运行成功,检测配置正常;其余每种类型执行及旧配置兼容未覆盖;[证据](/tmp/idea-parity-qa/RC-8-process-output.png) |
|
||||
| RC-4 | 部分 | 表单支持复制/分组/排序/Templates;对话框 Run 成功,local TOML 已落盘且 git check-ignore 命中 .openidea/.gitignore;其余子流程未逐项执行 |
|
||||
| RC-5 | 部分 | Modify options 显示各类可选项;移除控件与各选项的运行效果未完整验证;[证据](/tmp/idea-parity-qa/RC-5.json) |
|
||||
| RC-6 | 通过 | 核心复测:实际子配置→Build→Shell→主进程;Build成功,记录child/shell/main;失败步骤中止并通知,循环被拒绝。[证据](/tmp/idea-parity-qa/core-RC6-success.json) |
|
||||
| RC-7 | 通过 | 核心复测:两成员17ms间隔启动并同时running,选中compound从编辑器触发Stop后都结束、退出130。[证据](/tmp/idea-parity-qa/core-RC7-stopped.json) |
|
||||
| RC-8 | 部分 | A=1;B=2 输入后对话框拆成两行,关闭系统环境后 /usr/bin/env 仅输出 A/B,退出码 0;独立 Paste 按钮未操作;[证据](/tmp/idea-parity-qa/RC-8-process-output.png) |
|
||||
| RC-9 | 通过 | 核心复测:PTY回显、亮暗ANSI颜色、resize传到子进程(233→89列)均正常;输入exit退出0,另次Stop退出130。[证据](/tmp/idea-parity-qa/core-RC9-resize.png) |
|
||||
| RC-10 | 部分 | 空 Run 显示三条提示及 run configuration 链接;点击链接未操作 |
|
||||
| RC-11 | 部分 | 本机 Docker 可用,但未运行/停止 fixture Docker 和 Compose,不能视为通过 |
|
||||
| GT-1 | 部分 | Graph Options 所列排序和分支选项齐全;复杂分支图下的效果未执行;[证据](/tmp/idea-parity-qa/GT-1-options.png) |
|
||||
| GT-2 | 部分 | View Options 所列显示项和 Highlight 存在;开关效果及重启持久化未完整验证;[证据](/tmp/idea-parity-qa/GT-2-options.png) |
|
||||
| GT-3 | 部分 | 未执行:Log 焦点 ⌘F、补全、跳转及自动加载更多 |
|
||||
| GT-4 | 部分 | 未执行:设置 Date 过滤后图仍保留 |
|
||||
| GT-5 | 部分 | 七种对话框均实际打开,选项可见;未执行 pull/merge/rebase/worktree/clone 的磁盘变化;[证据](/tmp/idea-parity-qa/gitcheck.log) |
|
||||
| SV-1 | 部分 | Add Service 菜单有三类要求入口;⌘N 和无连接空状态未完整验证;[证据](/tmp/idea-parity-qa/SV-1.png) |
|
||||
| SV-2 | 部分 | 实际 Program/Run Anything/PTY 均已启动;Services 中运行配置分组与停止/重跑/输出跳转未验证 |
|
||||
| SV-3 | 部分 | 自动连接 orbstack,显示容器、镜像、卷和网络;新建多个连接及绑定操作路由未执行;[证据](/tmp/idea-parity-qa/SV-1.png) |
|
||||
| TD-1 | 部分 | TODO 有 Scope Based、Changes,显示7条 fixture TODO/FIXME;自定义范围和多个 changelist 下拉未验证;[证据](/tmp/idea-parity-qa/TD-1.png) |
|
||||
| CV-1 | 部分 | LCOV 导入显示 app.ts 50%(1/2),管理弹窗列出报告;Go/JaCoCo、多报告切换和 gutter 未完整验证;[证据](/tmp/idea-parity-qa/CV-1-import.png) |
|
||||
| DB-1 | 部分 | Driver 下拉按字母列出 CockroachDB/Redshift/TiDB 等;逐种默认端口未核对;[证据](/tmp/idea-parity-qa/DB-1-list.png) |
|
||||
| DB-2 | 通过 | 指定 JDBC URL 解析出 h、5432、db,SSL 页为 Verify Full;[证据](/tmp/idea-parity-qa/DB-2-ssl.png) |
|
||||
| DB-3 | 部分 | Options/Schemas/Advanced 页签存在;未连 SQLite/Postgres 验证只读/启动脚本/时区/过滤/驱动属性 |
|
||||
| DB-4 | 部分 | 颜色和 Add comment 控件存在;树节点、console 标签及 hover 效果未验证 |
|
||||
| WB-1 | 部分 | Run Anything 执行 pwd,输出进入 Run,cwd 为 fixture,退出码0,并列出检测配置;双 Ctrl、Maven/Gradle 和新历史未完整验证;[证据](/tmp/idea-parity-qa/WB-1-output.png) |
|
||||
| WB-2 | 部分 | Customize Main Toolbar 可打开并显示增删/排序/恢复控件;实际保存和重启持久化未执行;[证据](/tmp/idea-parity-qa/WB-2.png) |
|
||||
| WB-3 | 部分 | Save Current Layout as 弹出命名输入;另存、恢复、重命名、删除完整流程未执行;[证据](/tmp/idea-parity-qa/WB-3-save.json) |
|
||||
| WB-4 | 部分 | 未执行:原生 View › Tool Windows 与注册表的一一核对 |
|
||||
| WB-5 | 部分 | Quick Switch Scheme 弹出四类选项;其余菜单命令及所有效果未完整验证;[证据](/tmp/idea-parity-qa/WB-5.png) |
|
||||
| WB-6 | 部分 | 无可用重构位置弹出 Nothing here;原生菜单上下文置灰未验证;[证据](/tmp/idea-parity-qa/WB-6.png) |
|
||||
| WB-7 | 部分 | Power Save Mode 切换后编辑器出现横幅,随后关闭恢复;后台高亮与自动弹出抑制未完整验证;[证据](/tmp/idea-parity-qa/WB-7-real.png) |
|
||||
| WB-8 | 部分 | 未执行:完整 Export/Import 设置与快捷键、模板、宏、布局恢复 |
|
||||
| WB-9 | 部分 | 录制 QA macro 后回放,内容为 QA macroQA macro;保存命名和 Keymap 绑定未执行;[证据](/tmp/idea-parity-qa/WB-9-replay-result.png) |
|
||||
| WB-10 | 部分 | Coverage 导入的信息通知显示 Don’t Show Again;点击后同类通知抑制未验证 |
|
||||
| I18N-1 | 失败 | 复现:切换中文,打开 Code › Code Cleanup。实际 Whole project、Module or directory、Uncommitted files 和底部说明仍为英文;打开 Customize Main Toolbar 后 Project Widget/VCS Widget/Build Project/Run Widget 仍为英文;Services 的 Containers/Images/Volumes/Networks 仍为英文。期望这些新增界面文案均翻译;均不属于清单已知例外;[证据](/tmp/idea-parity-qa/IN-zh-dark.png) |
|
||||
|
||||
## 独立问题与环境说明
|
||||
|
||||
- 崩溃:已执行流程中未观察到应用崩溃。版本更新引起的 dev 自动重编译不是崩溃。
|
||||
- 控制台:有自动化自身造成的错误(错误 action id、首次尝试不存在的文件、带换行注入脚本的 Unexpected EOF)和手动 reload 后 Tauri callback 警告;不归为产品功能失败。尚不能声明控制台全量无错误。应用日志在 [/tmp/idea-parity-qa.log](/tmp/idea-parity-qa.log)。
|
||||
- 卡顿:未观察到已执行操作中的明显持续卡顿;没有完成量化性能验收。桥接脚本等待用户输入对话框导致的超时不按应用卡顿计。
|
||||
- 核心补测新增的CSS语言服务器validProperties空值异常已修复;CSS/SCSS/Less真实校验均返回未知属性警告,见核心报告修复复测。
|
||||
- Python REPL 的 Stop 先发中断(出现 KeyboardInterrupt),随后超时强制结束,最终137/SIGKILL;这是本轮观察结果,未仅凭此判失败。
|
||||
- 首轮安装TS依赖时pnpm提示esbuild脚本未批准;核心补测已实际运行npm start及正常/故意失败测试。Build通过专用最小TS目标验证,未据此宣称所有原始QA文件能通过类型检查。
|
||||
- 全量放行前仍需完成表中的未执行子项,包括所有语言/运行类型、Docker、复杂Git图与合并/变基、数据库、设置导入导出、完整书签/布局管理等;双主题逐项与中文复测也未全覆盖。Before launch、Compound、补全和基础运行/调试已有核心复测证据,见对应行。
|
||||
|
||||
截图和结构化证据目录:[/tmp/idea-parity-qa](/tmp/idea-parity-qa)。验收期间使用的全局主题、语言和 Power Save Mode 已恢复;最后录制宏为 QA 样例,测试项目仍保留供复核。
|
||||
|
||||
|
||||
核心补测:新增真实编辑、导航、补全、重命名、检查同步、运行/调试、Before launch/Compound、PTY和原生重启验证;详情见[核心补测报告](acceptance-idea-core-result.md)。原表中其他待测子项仍保留,不因核心补测而自动变绿。
|
||||
|
До Ширина: | Висота: | Розмір: 169 KiB |
|
До Ширина: | Висота: | Розмір: 133 KiB |
|
До Ширина: | Висота: | Розмір: 171 KiB |
|
До Ширина: | Висота: | Розмір: 135 KiB |
|
До Ширина: | Висота: | Розмір: 164 KiB |
|
До Ширина: | Висота: | Розмір: 129 KiB |
|
До Ширина: | Висота: | Розмір: 168 KiB |
|
До Ширина: | Висота: | Розмір: 131 KiB |
@@ -10,10 +10,8 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<div id="splash" class="splash" data-tauri-drag-region>
|
||||
<svg class="splash-logo" viewBox="0 0 64 64" aria-hidden="true">
|
||||
<rect width="64" height="64" rx="15" fill="#0E0E10" />
|
||||
<circle cx="26" cy="32" r="11" fill="none" stroke="#FFFFFF" stroke-width="8" />
|
||||
<rect x="43" y="18" width="8" height="28" rx="1.5" fill="#FF4F1A" />
|
||||
<svg class="splash-logo" viewBox="22 24 56 56" aria-hidden="true">
|
||||
<rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C" /><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A" /><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7" /><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0" /><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0" /><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0" /><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0" />
|
||||
</svg>
|
||||
<!-- "OpenIDEA" in Inter 500 as outlines: the web font loads late in dev and would swap in. -->
|
||||
<svg class="splash-wordmark" viewBox="0 -1984 9994 2478" role="img" aria-label="OpenIDEA">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "openidea",
|
||||
"private": true,
|
||||
"description": "An open-source IDE inspired by IntelliJ IDEA",
|
||||
"version": "0.1.18",
|
||||
"version": "0.1.19",
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* Linked, not inlined in index.html: release builds hash inline <style> blocks into the CSP,
|
||||
which voids style-src 'unsafe-inline' and blocks the editor's runtime-injected styles. */
|
||||
/* Start-up splash over the page until the window's launch project is open (platform/splash.ts).
|
||||
Until tokens load, the colours are the last theme's --bg-frame / --fg-muted / --accent that
|
||||
boot.js restored as --boot-*, else these built-in ones. */
|
||||
Until tokens load, the colours are the last theme's --bg-frame / --fg-muted that boot.js
|
||||
restored as --boot-*, else these built-in ones; the bar keeps the last --accent throughout. */
|
||||
/* Not on html: the canvas then takes body's (themed) background, which a fast resize shows before relayout. */
|
||||
body, .splash { background: var(--bg-frame, var(--boot-frame, #e9eaee)); }
|
||||
:root[data-theme="dark"] :is(body, .splash) { background: var(--bg-frame, var(--boot-frame, #26282c)); }
|
||||
@@ -33,11 +33,13 @@ body, .splash { background: var(--bg-frame, var(--boot-frame, #e9eaee)); }
|
||||
/* 15px Inter: 2048 units per em, the line box from ascender to descender. */
|
||||
.splash-wordmark { width: 73.2px; height: 18.15px; }
|
||||
.splash-bar { width: 120px; height: 2px; border-radius: 1px; overflow: hidden; background: rgb(127 127 127 / 0.18); }
|
||||
/* Fake progress: eases towards ~90% over the 4 s cap; hideSplash() fills it before fading out. */
|
||||
/* Fake progress: eases towards ~90% over the 4 s cap; hideSplash() fills it before fading out.
|
||||
The remembered accent comes first: tokens.css brings the theme's default --accent before
|
||||
settings restore a custom one, which would flash the default mid-load. */
|
||||
.splash-bar > i {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background: var(--accent, var(--boot-accent, #3871e1));
|
||||
background: var(--boot-accent, var(--accent, #3871e1));
|
||||
transform-origin: left;
|
||||
animation: splash-fill 4s cubic-bezier(0.1, 0.7, 0.3, 1) both;
|
||||
}
|
||||
|
||||
|
До Ширина: | Висота: | Розмір: 4.1 KiB Після Ширина: | Висота: | Розмір: 2.6 KiB |
|
До Ширина: | Висота: | Розмір: 8.9 KiB Після Ширина: | Висота: | Розмір: 4.9 KiB |
|
До Ширина: | Висота: | Розмір: 877 B Після Ширина: | Висота: | Розмір: 718 B |
|
До Ширина: | Висота: | Розмір: 3.2 KiB Після Ширина: | Висота: | Розмір: 2.1 KiB |
|
До Ширина: | Висота: | Розмір: 4.5 KiB Після Ширина: | Висота: | Розмір: 2.9 KiB |
|
До Ширина: | Висота: | Розмір: 4.7 KiB Після Ширина: | Висота: | Розмір: 2.9 KiB |
|
До Ширина: | Висота: | Розмір: 10 KiB Після Ширина: | Висота: | Розмір: 5.5 KiB |
|
До Ширина: | Висота: | Розмір: 870 B Після Ширина: | Висота: | Розмір: 710 B |
|
До Ширина: | Висота: | Розмір: 11 KiB Після Ширина: | Висота: | Розмір: 5.8 KiB |
|
До Ширина: | Висота: | Розмір: 1.2 KiB Після Ширина: | Висота: | Розмір: 993 B |
|
До Ширина: | Висота: | Розмір: 2.1 KiB Після Ширина: | Висота: | Розмір: 1.5 KiB |
|
До Ширина: | Висота: | Розмір: 2.7 KiB Після Ширина: | Висота: | Розмір: 1.8 KiB |
|
До Ширина: | Висота: | Розмір: 1.4 KiB Після Ширина: | Висота: | Розмір: 1.1 KiB |
|
До Ширина: | Висота: | Розмір: 13 KiB Після Ширина: | Висота: | Розмір: 10 KiB |
|
До Ширина: | Висота: | Розмір: 20 KiB Після Ширина: | Висота: | Розмір: 9.9 KiB |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><title>OpenIDEA</title><rect width="64" height="64" rx="15" fill="#0E0E10"/><circle cx="26" cy="32" r="11" fill="none" stroke="#FFFFFF" stroke-width="8"/><rect x="43" y="18" width="8" height="28" rx="1.5" fill="#FF4F1A"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="22 24 56 56"><title>OpenIDEA</title><rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C"/><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A"/><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7"/><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0"/><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0"/><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0"/><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0"/></svg>
|
||||
|
До Ширина: | Висота: | Розмір: 311 B Після Ширина: | Висота: | Розмір: 573 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" role="img" aria-label="OpenIDEA"><rect x="100" y="100" width="824" height="824" rx="185" fill="#0E0E10"/><g transform="translate(100 100) scale(12.875)"><rect width="64" height="64" rx="15" fill="none"/><circle cx="26" cy="32" r="11" fill="none" stroke="#FFFFFF" stroke-width="8"/><rect x="43" y="18" width="8" height="28" rx="1.5" fill="#FF4F1A"/></g><rect x="102" y="102" width="820" height="820" rx="183" fill="none" stroke="#FFFFFF" stroke-opacity="0.10" stroke-width="4"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 100 100" role="img" aria-label="OpenIDEA"><rect x="10" y="10" width="80" height="80" rx="18" fill="#EAE7E0"/><g transform="translate(50 50) scale(1.25) translate(-50 -52)"><rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C"/><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A"/><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7"/><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0"/><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0"/><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0"/><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0"/></g></svg>
|
||||
|
До Ширина: | Висота: | Розмір: 575 B Після Ширина: | Висота: | Розмір: 721 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="435" height="128" viewBox="0 0 435 128" role="img" aria-label="OpenIDEA"><title>OpenIDEA</title><g transform="translate(24 24) scale(1.25)"><rect width="64" height="64" rx="15" fill="#FFFFFF"/><circle cx="26.5" cy="32" r="11" fill="none" stroke="#0E0E10" stroke-width="6"/><rect x="43.5" y="19" width="6" height="26" rx="1.5" fill="#FF4F1A"/></g><g transform="translate(0 88.01)"><path fill="#FFFFFF" d="M150.72 0.64Q144.35 0.64 139.25 -2.26Q134.15 -5.16 131.19 -10.66Q128.23 -16.17 128.23 -23.98Q128.23 -31.83 131.19 -37.36Q134.15 -42.88 139.25 -45.77Q144.35 -48.66 150.72 -48.66Q157.11 -48.66 162.19 -45.77Q167.27 -42.88 170.23 -37.36Q173.19 -31.83 173.19 -23.98Q173.19 -16.15 170.23 -10.64Q167.27 -5.14 162.19 -2.25Q157.11 0.64 150.72 0.64ZM150.72 -8.33Q154.42 -8.33 157.15 -10.13Q159.89 -11.93 161.4 -15.42Q162.91 -18.92 162.91 -23.98Q162.91 -29.07 161.4 -32.58Q159.89 -36.09 157.15 -37.89Q154.42 -39.69 150.72 -39.69Q147.05 -39.69 144.31 -37.89Q141.57 -36.09 140.04 -32.58Q138.52 -29.07 138.52 -23.98Q138.52 -18.92 140.04 -15.42Q141.57 -11.93 144.31 -10.13Q147.05 -8.33 150.72 -8.33ZM176.05 13.47V-36.03H185.86V-29.94H186.31Q186.98 -31.42 188.23 -32.94Q189.48 -34.45 191.52 -35.47Q193.55 -36.48 196.56 -36.48Q200.52 -36.48 203.83 -34.43Q207.13 -32.38 209.13 -28.27Q211.13 -24.15 211.13 -17.96Q211.13 -11.94 209.19 -7.81Q207.26 -3.67 203.95 -1.54Q200.63 0.58 196.51 0.58Q193.62 0.58 191.59 -0.39Q189.57 -1.37 188.28 -2.83Q187 -4.29 186.31 -5.77H186.02V13.47ZM193.36 -7.36Q195.83 -7.36 197.5 -8.71Q199.17 -10.06 200.04 -12.46Q200.9 -14.86 200.9 -17.98Q200.9 -21.11 200.04 -23.48Q199.18 -25.86 197.52 -27.2Q195.85 -28.54 193.36 -28.54Q190.95 -28.54 189.26 -27.24Q187.57 -25.95 186.68 -23.58Q185.8 -21.21 185.8 -17.98Q185.8 -14.79 186.69 -12.41Q187.58 -10.02 189.28 -8.69Q190.97 -7.36 193.36 -7.36ZM229.58 0.7Q224.05 0.7 220.03 -1.56Q216.01 -3.81 213.86 -7.97Q211.72 -12.14 211.72 -17.84Q211.72 -23.4 213.86 -27.6Q216 -31.79 219.91 -34.13Q223.82 -36.48 229.11 -36.48Q232.68 -36.48 235.77 -35.34Q238.87 -34.21 241.19 -31.93Q243.51 -29.65 244.8 -26.22Q246.1 -22.79 246.1 -18.19V-15.46H215.69V-21.62H241.26L236.61 -20.01Q236.61 -22.76 235.77 -24.79Q234.93 -26.81 233.28 -27.92Q231.63 -29.04 229.18 -29.04Q226.74 -29.04 225.03 -27.92Q223.33 -26.79 222.44 -24.85Q221.55 -22.91 221.55 -20.39V-16.04Q221.55 -13.12 222.57 -11.04Q223.6 -8.96 225.45 -7.85Q227.3 -6.74 229.74 -6.74Q231.4 -6.74 232.75 -7.22Q234.11 -7.69 235.09 -8.62Q236.07 -9.56 236.57 -10.91L245.79 -10.29Q245.08 -6.96 242.95 -4.49Q240.81 -2.02 237.42 -0.66Q234.04 0.7 229.58 0.7ZM258 -20.81V0H248.03V-36.03H257.84V-29.62H258.2Q259.42 -32.8 262.09 -34.64Q264.75 -36.48 268.79 -36.48Q272.55 -36.48 275.33 -34.84Q278.12 -33.21 279.66 -30.16Q281.2 -27.12 281.2 -22.92V0H271.24V-21.14Q271.24 -24.43 269.54 -26.31Q267.83 -28.19 264.83 -28.19Q262.83 -28.19 261.28 -27.31Q259.74 -26.43 258.87 -24.79Q258 -23.15 258 -20.81Z"/><path fill="#A3A7B0" d="M291.88 -48.02V0H286.08V-48.02ZM312.9 0H301.36V-5.16H312.51Q318.48 -5.16 322.39 -7.44Q326.31 -9.73 328.24 -13.99Q330.17 -18.24 330.17 -24.11Q330.17 -29.91 328.27 -34.11Q326.37 -38.32 322.59 -40.59Q318.8 -42.86 313.16 -42.86H301.11V-48.02H313.55Q320.54 -48.02 325.52 -45.15Q330.5 -42.28 333.14 -36.92Q335.78 -31.55 335.78 -24.11Q335.78 -16.6 333.11 -11.2Q330.43 -5.8 325.32 -2.9Q320.22 0 312.9 0ZM303.88 -48.02V0H298.08V-48.02ZM340.11 0V-48.02H369.11V-42.86H345.91V-26.81H367.57V-21.66H345.91V-5.16H369.44V0ZM376.15 0H370.03L387.69 -48.02H393.68L411.28 0H405.22L390.85 -40.41H390.46ZM378.41 -18.76H402.96V-13.6H378.41Z"/></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="435" height="128" viewBox="0 0 435 128" role="img" aria-label="OpenIDEA"><title>OpenIDEA</title><g transform="translate(14 14)"><rect x="10" y="10" width="80" height="80" rx="18" fill="#EAE7E0"/><g transform="translate(50 50) scale(1.25) translate(-50 -52)"><rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C"/><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A"/><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7"/><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0"/><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0"/><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0"/><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0"/></g></g><g transform="translate(0 88.01)"><path fill="#FFFFFF" d="M150.72 0.64Q144.35 0.64 139.25 -2.26Q134.15 -5.16 131.19 -10.66Q128.23 -16.17 128.23 -23.98Q128.23 -31.83 131.19 -37.36Q134.15 -42.88 139.25 -45.77Q144.35 -48.66 150.72 -48.66Q157.11 -48.66 162.19 -45.77Q167.27 -42.88 170.23 -37.36Q173.19 -31.83 173.19 -23.98Q173.19 -16.15 170.23 -10.64Q167.27 -5.14 162.19 -2.25Q157.11 0.64 150.72 0.64ZM150.72 -8.33Q154.42 -8.33 157.15 -10.13Q159.89 -11.93 161.4 -15.42Q162.91 -18.92 162.91 -23.98Q162.91 -29.07 161.4 -32.58Q159.89 -36.09 157.15 -37.89Q154.42 -39.69 150.72 -39.69Q147.05 -39.69 144.31 -37.89Q141.57 -36.09 140.04 -32.58Q138.52 -29.07 138.52 -23.98Q138.52 -18.92 140.04 -15.42Q141.57 -11.93 144.31 -10.13Q147.05 -8.33 150.72 -8.33ZM176.05 13.47V-36.03H185.86V-29.94H186.31Q186.98 -31.42 188.23 -32.94Q189.48 -34.45 191.52 -35.47Q193.55 -36.48 196.56 -36.48Q200.52 -36.48 203.83 -34.43Q207.13 -32.38 209.13 -28.27Q211.13 -24.15 211.13 -17.96Q211.13 -11.94 209.19 -7.81Q207.26 -3.67 203.95 -1.54Q200.63 0.58 196.51 0.58Q193.62 0.58 191.59 -0.39Q189.57 -1.37 188.28 -2.83Q187 -4.29 186.31 -5.77H186.02V13.47ZM193.36 -7.36Q195.83 -7.36 197.5 -8.71Q199.17 -10.06 200.04 -12.46Q200.9 -14.86 200.9 -17.98Q200.9 -21.11 200.04 -23.48Q199.18 -25.86 197.52 -27.2Q195.85 -28.54 193.36 -28.54Q190.95 -28.54 189.26 -27.24Q187.57 -25.95 186.68 -23.58Q185.8 -21.21 185.8 -17.98Q185.8 -14.79 186.69 -12.41Q187.58 -10.02 189.28 -8.69Q190.97 -7.36 193.36 -7.36ZM229.58 0.7Q224.05 0.7 220.03 -1.56Q216.01 -3.81 213.86 -7.97Q211.72 -12.14 211.72 -17.84Q211.72 -23.4 213.86 -27.6Q216 -31.79 219.91 -34.13Q223.82 -36.48 229.11 -36.48Q232.68 -36.48 235.77 -35.34Q238.87 -34.21 241.19 -31.93Q243.51 -29.65 244.8 -26.22Q246.1 -22.79 246.1 -18.19V-15.46H215.69V-21.62H241.26L236.61 -20.01Q236.61 -22.76 235.77 -24.79Q234.93 -26.81 233.28 -27.92Q231.63 -29.04 229.18 -29.04Q226.74 -29.04 225.03 -27.92Q223.33 -26.79 222.44 -24.85Q221.55 -22.91 221.55 -20.39V-16.04Q221.55 -13.12 222.57 -11.04Q223.6 -8.96 225.45 -7.85Q227.3 -6.74 229.74 -6.74Q231.4 -6.74 232.75 -7.22Q234.11 -7.69 235.09 -8.62Q236.07 -9.56 236.57 -10.91L245.79 -10.29Q245.08 -6.96 242.95 -4.49Q240.81 -2.02 237.42 -0.66Q234.04 0.7 229.58 0.7ZM258 -20.81V0H248.03V-36.03H257.84V-29.62H258.2Q259.42 -32.8 262.09 -34.64Q264.75 -36.48 268.79 -36.48Q272.55 -36.48 275.33 -34.84Q278.12 -33.21 279.66 -30.16Q281.2 -27.12 281.2 -22.92V0H271.24V-21.14Q271.24 -24.43 269.54 -26.31Q267.83 -28.19 264.83 -28.19Q262.83 -28.19 261.28 -27.31Q259.74 -26.43 258.87 -24.79Q258 -23.15 258 -20.81Z"/><path fill="#A3A7B0" d="M291.88 -48.02V0H286.08V-48.02ZM312.9 0H301.36V-5.16H312.51Q318.48 -5.16 322.39 -7.44Q326.31 -9.73 328.24 -13.99Q330.17 -18.24 330.17 -24.11Q330.17 -29.91 328.27 -34.11Q326.37 -38.32 322.59 -40.59Q318.8 -42.86 313.16 -42.86H301.11V-48.02H313.55Q320.54 -48.02 325.52 -45.15Q330.5 -42.28 333.14 -36.92Q335.78 -31.55 335.78 -24.11Q335.78 -16.6 333.11 -11.2Q330.43 -5.8 325.32 -2.9Q320.22 0 312.9 0ZM303.88 -48.02V0H298.08V-48.02ZM340.11 0V-48.02H369.11V-42.86H345.91V-26.81H367.57V-21.66H345.91V-5.16H369.44V0ZM376.15 0H370.03L387.69 -48.02H393.68L411.28 0H405.22L390.85 -40.41H390.46ZM378.41 -18.76H402.96V-13.6H378.41Z"/></g></svg>
|
||||
|
До Ширина: | Висота: | Розмір: 3.5 KiB Після Ширина: | Висота: | Розмір: 3.9 KiB |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="435" height="128" viewBox="0 0 435 128" role="img" aria-label="OpenIDEA"><title>OpenIDEA</title><g transform="translate(24 24) scale(1.25)"><rect width="64" height="64" rx="15" fill="#0E0E10"/><circle cx="26.5" cy="32" r="11" fill="none" stroke="#FFFFFF" stroke-width="6"/><rect x="43.5" y="19" width="6" height="26" rx="1.5" fill="#FF4F1A"/></g><g transform="translate(0 88.01)"><path fill="#0E0E10" d="M150.72 0.64Q144.35 0.64 139.25 -2.26Q134.15 -5.16 131.19 -10.66Q128.23 -16.17 128.23 -23.98Q128.23 -31.83 131.19 -37.36Q134.15 -42.88 139.25 -45.77Q144.35 -48.66 150.72 -48.66Q157.11 -48.66 162.19 -45.77Q167.27 -42.88 170.23 -37.36Q173.19 -31.83 173.19 -23.98Q173.19 -16.15 170.23 -10.64Q167.27 -5.14 162.19 -2.25Q157.11 0.64 150.72 0.64ZM150.72 -8.33Q154.42 -8.33 157.15 -10.13Q159.89 -11.93 161.4 -15.42Q162.91 -18.92 162.91 -23.98Q162.91 -29.07 161.4 -32.58Q159.89 -36.09 157.15 -37.89Q154.42 -39.69 150.72 -39.69Q147.05 -39.69 144.31 -37.89Q141.57 -36.09 140.04 -32.58Q138.52 -29.07 138.52 -23.98Q138.52 -18.92 140.04 -15.42Q141.57 -11.93 144.31 -10.13Q147.05 -8.33 150.72 -8.33ZM176.05 13.47V-36.03H185.86V-29.94H186.31Q186.98 -31.42 188.23 -32.94Q189.48 -34.45 191.52 -35.47Q193.55 -36.48 196.56 -36.48Q200.52 -36.48 203.83 -34.43Q207.13 -32.38 209.13 -28.27Q211.13 -24.15 211.13 -17.96Q211.13 -11.94 209.19 -7.81Q207.26 -3.67 203.95 -1.54Q200.63 0.58 196.51 0.58Q193.62 0.58 191.59 -0.39Q189.57 -1.37 188.28 -2.83Q187 -4.29 186.31 -5.77H186.02V13.47ZM193.36 -7.36Q195.83 -7.36 197.5 -8.71Q199.17 -10.06 200.04 -12.46Q200.9 -14.86 200.9 -17.98Q200.9 -21.11 200.04 -23.48Q199.18 -25.86 197.52 -27.2Q195.85 -28.54 193.36 -28.54Q190.95 -28.54 189.26 -27.24Q187.57 -25.95 186.68 -23.58Q185.8 -21.21 185.8 -17.98Q185.8 -14.79 186.69 -12.41Q187.58 -10.02 189.28 -8.69Q190.97 -7.36 193.36 -7.36ZM229.58 0.7Q224.05 0.7 220.03 -1.56Q216.01 -3.81 213.86 -7.97Q211.72 -12.14 211.72 -17.84Q211.72 -23.4 213.86 -27.6Q216 -31.79 219.91 -34.13Q223.82 -36.48 229.11 -36.48Q232.68 -36.48 235.77 -35.34Q238.87 -34.21 241.19 -31.93Q243.51 -29.65 244.8 -26.22Q246.1 -22.79 246.1 -18.19V-15.46H215.69V-21.62H241.26L236.61 -20.01Q236.61 -22.76 235.77 -24.79Q234.93 -26.81 233.28 -27.92Q231.63 -29.04 229.18 -29.04Q226.74 -29.04 225.03 -27.92Q223.33 -26.79 222.44 -24.85Q221.55 -22.91 221.55 -20.39V-16.04Q221.55 -13.12 222.57 -11.04Q223.6 -8.96 225.45 -7.85Q227.3 -6.74 229.74 -6.74Q231.4 -6.74 232.75 -7.22Q234.11 -7.69 235.09 -8.62Q236.07 -9.56 236.57 -10.91L245.79 -10.29Q245.08 -6.96 242.95 -4.49Q240.81 -2.02 237.42 -0.66Q234.04 0.7 229.58 0.7ZM258 -20.81V0H248.03V-36.03H257.84V-29.62H258.2Q259.42 -32.8 262.09 -34.64Q264.75 -36.48 268.79 -36.48Q272.55 -36.48 275.33 -34.84Q278.12 -33.21 279.66 -30.16Q281.2 -27.12 281.2 -22.92V0H271.24V-21.14Q271.24 -24.43 269.54 -26.31Q267.83 -28.19 264.83 -28.19Q262.83 -28.19 261.28 -27.31Q259.74 -26.43 258.87 -24.79Q258 -23.15 258 -20.81Z"/><path fill="#5F6470" d="M291.88 -48.02V0H286.08V-48.02ZM312.9 0H301.36V-5.16H312.51Q318.48 -5.16 322.39 -7.44Q326.31 -9.73 328.24 -13.99Q330.17 -18.24 330.17 -24.11Q330.17 -29.91 328.27 -34.11Q326.37 -38.32 322.59 -40.59Q318.8 -42.86 313.16 -42.86H301.11V-48.02H313.55Q320.54 -48.02 325.52 -45.15Q330.5 -42.28 333.14 -36.92Q335.78 -31.55 335.78 -24.11Q335.78 -16.6 333.11 -11.2Q330.43 -5.8 325.32 -2.9Q320.22 0 312.9 0ZM303.88 -48.02V0H298.08V-48.02ZM340.11 0V-48.02H369.11V-42.86H345.91V-26.81H367.57V-21.66H345.91V-5.16H369.44V0ZM376.15 0H370.03L387.69 -48.02H393.68L411.28 0H405.22L390.85 -40.41H390.46ZM378.41 -18.76H402.96V-13.6H378.41Z"/></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="435" height="128" viewBox="0 0 435 128" role="img" aria-label="OpenIDEA"><title>OpenIDEA</title><g transform="translate(14 14)"><rect x="10" y="10" width="80" height="80" rx="18" fill="#EAE7E0"/><g transform="translate(50 50) scale(1.25) translate(-50 -52)"><rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C"/><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A"/><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7"/><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0"/><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0"/><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0"/><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0"/></g></g><g transform="translate(0 88.01)"><path fill="#0E0E10" d="M150.72 0.64Q144.35 0.64 139.25 -2.26Q134.15 -5.16 131.19 -10.66Q128.23 -16.17 128.23 -23.98Q128.23 -31.83 131.19 -37.36Q134.15 -42.88 139.25 -45.77Q144.35 -48.66 150.72 -48.66Q157.11 -48.66 162.19 -45.77Q167.27 -42.88 170.23 -37.36Q173.19 -31.83 173.19 -23.98Q173.19 -16.15 170.23 -10.64Q167.27 -5.14 162.19 -2.25Q157.11 0.64 150.72 0.64ZM150.72 -8.33Q154.42 -8.33 157.15 -10.13Q159.89 -11.93 161.4 -15.42Q162.91 -18.92 162.91 -23.98Q162.91 -29.07 161.4 -32.58Q159.89 -36.09 157.15 -37.89Q154.42 -39.69 150.72 -39.69Q147.05 -39.69 144.31 -37.89Q141.57 -36.09 140.04 -32.58Q138.52 -29.07 138.52 -23.98Q138.52 -18.92 140.04 -15.42Q141.57 -11.93 144.31 -10.13Q147.05 -8.33 150.72 -8.33ZM176.05 13.47V-36.03H185.86V-29.94H186.31Q186.98 -31.42 188.23 -32.94Q189.48 -34.45 191.52 -35.47Q193.55 -36.48 196.56 -36.48Q200.52 -36.48 203.83 -34.43Q207.13 -32.38 209.13 -28.27Q211.13 -24.15 211.13 -17.96Q211.13 -11.94 209.19 -7.81Q207.26 -3.67 203.95 -1.54Q200.63 0.58 196.51 0.58Q193.62 0.58 191.59 -0.39Q189.57 -1.37 188.28 -2.83Q187 -4.29 186.31 -5.77H186.02V13.47ZM193.36 -7.36Q195.83 -7.36 197.5 -8.71Q199.17 -10.06 200.04 -12.46Q200.9 -14.86 200.9 -17.98Q200.9 -21.11 200.04 -23.48Q199.18 -25.86 197.52 -27.2Q195.85 -28.54 193.36 -28.54Q190.95 -28.54 189.26 -27.24Q187.57 -25.95 186.68 -23.58Q185.8 -21.21 185.8 -17.98Q185.8 -14.79 186.69 -12.41Q187.58 -10.02 189.28 -8.69Q190.97 -7.36 193.36 -7.36ZM229.58 0.7Q224.05 0.7 220.03 -1.56Q216.01 -3.81 213.86 -7.97Q211.72 -12.14 211.72 -17.84Q211.72 -23.4 213.86 -27.6Q216 -31.79 219.91 -34.13Q223.82 -36.48 229.11 -36.48Q232.68 -36.48 235.77 -35.34Q238.87 -34.21 241.19 -31.93Q243.51 -29.65 244.8 -26.22Q246.1 -22.79 246.1 -18.19V-15.46H215.69V-21.62H241.26L236.61 -20.01Q236.61 -22.76 235.77 -24.79Q234.93 -26.81 233.28 -27.92Q231.63 -29.04 229.18 -29.04Q226.74 -29.04 225.03 -27.92Q223.33 -26.79 222.44 -24.85Q221.55 -22.91 221.55 -20.39V-16.04Q221.55 -13.12 222.57 -11.04Q223.6 -8.96 225.45 -7.85Q227.3 -6.74 229.74 -6.74Q231.4 -6.74 232.75 -7.22Q234.11 -7.69 235.09 -8.62Q236.07 -9.56 236.57 -10.91L245.79 -10.29Q245.08 -6.96 242.95 -4.49Q240.81 -2.02 237.42 -0.66Q234.04 0.7 229.58 0.7ZM258 -20.81V0H248.03V-36.03H257.84V-29.62H258.2Q259.42 -32.8 262.09 -34.64Q264.75 -36.48 268.79 -36.48Q272.55 -36.48 275.33 -34.84Q278.12 -33.21 279.66 -30.16Q281.2 -27.12 281.2 -22.92V0H271.24V-21.14Q271.24 -24.43 269.54 -26.31Q267.83 -28.19 264.83 -28.19Q262.83 -28.19 261.28 -27.31Q259.74 -26.43 258.87 -24.79Q258 -23.15 258 -20.81Z"/><path fill="#5F6470" d="M291.88 -48.02V0H286.08V-48.02ZM312.9 0H301.36V-5.16H312.51Q318.48 -5.16 322.39 -7.44Q326.31 -9.73 328.24 -13.99Q330.17 -18.24 330.17 -24.11Q330.17 -29.91 328.27 -34.11Q326.37 -38.32 322.59 -40.59Q318.8 -42.86 313.16 -42.86H301.11V-48.02H313.55Q320.54 -48.02 325.52 -45.15Q330.5 -42.28 333.14 -36.92Q335.78 -31.55 335.78 -24.11Q335.78 -16.6 333.11 -11.2Q330.43 -5.8 325.32 -2.9Q320.22 0 312.9 0ZM303.88 -48.02V0H298.08V-48.02ZM340.11 0V-48.02H369.11V-42.86H345.91V-26.81H367.57V-21.66H345.91V-5.16H369.44V0ZM376.15 0H370.03L387.69 -48.02H393.68L411.28 0H405.22L390.85 -40.41H390.46ZM378.41 -18.76H402.96V-13.6H378.41Z"/></g></svg>
|
||||
|
До Ширина: | Висота: | Розмір: 3.5 KiB Після Ширина: | Висота: | Розмір: 3.9 KiB |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" role="img" aria-label="OpenIDEA"><defs><filter id="oi-shadow" x="-20%" y="-20%" width="140%" height="150%"><feDropShadow dx="0" dy="14" stdDeviation="16" flood-color="#000000" flood-opacity="0.28"/></filter></defs><rect x="100" y="100" width="824" height="824" rx="185" fill="#0E0E10" filter="url(#oi-shadow)"/><g transform="translate(100 100) scale(12.875)"><rect width="64" height="64" rx="15" fill="none"/><circle cx="26.5" cy="32" r="11" fill="none" stroke="#FFFFFF" stroke-width="6"/><rect x="43.5" y="19" width="6" height="26" rx="1.5" fill="#FF4F1A"/></g><rect x="102" y="102" width="820" height="820" rx="183" fill="none" stroke="#FFFFFF" stroke-opacity="0.10" stroke-width="4"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 100 100" role="img" aria-label="OpenIDEA"><rect x="10" y="10" width="80" height="80" rx="18" fill="#EAE7E0"/><g transform="translate(50 50) scale(1.25) translate(-50 -52)"><rect x="22" y="26" width="56" height="52" rx="12" fill="#D9582C"/><rect x="27" y="26" width="46" height="42" rx="9" fill="#1B1A1A"/><circle cx="44" cy="47.4" r="4.1" fill="none" stroke="#EAE7E0" stroke-width="2.7"/><rect x="54.3" y="42" width="2.8" height="10.5" fill="#EAE7E0"/><rect x="51.2" y="42" width="5.9" height="2.5" fill="#EAE7E0"/><rect x="51.2" y="50" width="9.4" height="2.5" fill="#EAE7E0"/><circle cx="55.7" cy="38.4" r="1.8" fill="#EAE7E0"/></g></svg>
|
||||
|
До Ширина: | Висота: | Розмір: 785 B Після Ширина: | Висота: | Розмір: 721 B |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "OpenIDEA",
|
||||
"version": "0.1.18",
|
||||
"version": "0.1.19",
|
||||
"identifier": "ai.l0ng.openidea",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
|
||||
@@ -986,7 +986,11 @@ export type AgentConfigVia =
|
||||
/** One item of a task's conversation. */
|
||||
export type AgentEntry = { type: "user"; text: string;
|
||||
/** Names of the files and images sent with it. */
|
||||
attachments: string[] } | { type: "agent"; text: string } | { type: "thought"; text: string } | { type: "tool"; id: string; title: string;
|
||||
attachments: string[];
|
||||
/** When it was sent (ms since the epoch); `None` in tasks saved before this was kept. */
|
||||
sentMs?: number | null;
|
||||
/** When the turn it started ended; `None` while it runs or when it was cut off. */
|
||||
doneMs?: number | null } | { type: "agent"; text: string } | { type: "thought"; text: string } | { type: "tool"; id: string; title: string;
|
||||
/** ACP tool kind: `read`, `edit`, `execute`, `search`, `fetch`, `think`… */
|
||||
kind: string; status: AgentToolStatus; locations: IpcPath[];
|
||||
/** Text the tool reported (command output…), truncated. */
|
||||
@@ -1069,7 +1073,7 @@ export type AgentTask = {
|
||||
branch: string | null,
|
||||
/** Branch (or revision) the worktree was created from. */
|
||||
base: string | null,
|
||||
/** Commit the task's changes are compared against. */
|
||||
/** Commit the task's changes are compared against (worktree tasks; local ones use `HEAD`). */
|
||||
baseCommit: string | null,
|
||||
/** Why the task failed, when it did. */
|
||||
error: string | null,
|
||||
|
||||
@@ -80,6 +80,15 @@ export function Composer(props: ComposerProps) {
|
||||
if (props.autoFocus) ref.current?.focus();
|
||||
}, [props.autoFocus]);
|
||||
|
||||
const focus = useAgents((s) => (s.focus?.key === id ? s.focus.seq : 0));
|
||||
useEffect(() => {
|
||||
const el = ref.current;
|
||||
if (!focus || !el) return;
|
||||
el.focus();
|
||||
el.setSelectionRange(el.value.length, el.value.length);
|
||||
el.scrollTop = el.scrollHeight;
|
||||
}, [focus]);
|
||||
|
||||
// Grow with the text, up to a limit.
|
||||
useLayoutEffect(() => {
|
||||
const el = ref.current;
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
/** Agent messages: Markdown → sanitized HTML (marked + DOMPurify). */
|
||||
import { useMemo } from "react";
|
||||
/**
|
||||
* Agent messages: Markdown → sanitized HTML (marked + DOMPurify). Fenced code is
|
||||
* highlighted and gets a Copy button; inline code naming a file of the task opens it.
|
||||
*/
|
||||
import { useLayoutEffect, useMemo, useRef } from "react";
|
||||
import { Marked } from "marked";
|
||||
import DOMPurify from "dompurify";
|
||||
import { highlightInto } from "@/editor/lsp/markdown";
|
||||
import { iconNode } from "@/editor/lsp/iconMarkup";
|
||||
import { call, commands } from "@/platform/ipc";
|
||||
import { tx } from "@/platform/i18n";
|
||||
import { openExternalUrl } from "@/platform/openUrl";
|
||||
import { copyText } from "@/ui";
|
||||
import { editorService } from "@/workbench/contributions";
|
||||
import { pathLink, type PathLink } from "./conversation";
|
||||
import styles from "./Session.module.css";
|
||||
|
||||
const marked = new Marked({ gfm: true, breaks: true });
|
||||
@@ -12,13 +22,85 @@ export function markdownHtml(text: string): string {
|
||||
return DOMPurify.sanitize(html, { USE_PROFILES: { html: true } });
|
||||
}
|
||||
|
||||
export function Markdown({ text }: { text: string }) {
|
||||
/** Whether a path names an existing file, per path (agents name the same files again and again). */
|
||||
const existing = new Map<string, Promise<boolean>>();
|
||||
function fileExists(path: string): Promise<boolean> {
|
||||
let known = existing.get(path);
|
||||
if (!known) {
|
||||
known = call(commands.fsProbe(path)).then(
|
||||
() => true,
|
||||
() => false,
|
||||
);
|
||||
existing.set(path, known);
|
||||
}
|
||||
return known;
|
||||
}
|
||||
|
||||
export function openPathLink(link: PathLink) {
|
||||
const selection = link.line === undefined ? undefined : { line: link.line, col: link.col ?? 0 };
|
||||
void editorService().openFile(link.path, { selection, focus: true });
|
||||
}
|
||||
|
||||
/** Highlighting, Copy buttons and file links over freshly rendered `root`. */
|
||||
function enhance(root: HTMLElement, cwd: string): () => void {
|
||||
let alive = true;
|
||||
root.querySelectorAll<HTMLElement>("pre > code").forEach((code) => {
|
||||
const pre = code.parentElement!;
|
||||
const lang = [...code.classList].find((c) => c.startsWith("language-"))?.slice("language-".length) ?? null;
|
||||
const text = (code.textContent ?? "").replace(/\n+$/, "");
|
||||
code.textContent = text;
|
||||
void highlightInto(code, text, lang);
|
||||
const copy = document.createElement("button");
|
||||
copy.type = "button";
|
||||
copy.className = styles.codeCopy!;
|
||||
const label = tx("Copy Code");
|
||||
copy.title = label;
|
||||
copy.setAttribute("aria-label", label);
|
||||
copy.appendChild(iconNode("copy", 14));
|
||||
copy.dataset.copy = text;
|
||||
pre.appendChild(copy);
|
||||
});
|
||||
root.querySelectorAll<HTMLElement>("code").forEach((code) => {
|
||||
if (code.parentElement?.tagName === "PRE" || code.closest("a")) return;
|
||||
const link = pathLink(code.textContent ?? "", cwd);
|
||||
if (!link) return;
|
||||
void fileExists(link.path).then((exists) => {
|
||||
if (!alive || !exists) return;
|
||||
code.classList.add(styles.fileLink!);
|
||||
code.dataset.path = link.path;
|
||||
if (link.line !== undefined) code.dataset.line = String(link.line);
|
||||
if (link.col !== undefined) code.dataset.col = String(link.col);
|
||||
code.title = tx`Open ${link.path}`;
|
||||
});
|
||||
});
|
||||
return () => {
|
||||
alive = false;
|
||||
};
|
||||
}
|
||||
|
||||
export function Markdown({ text, cwd }: { text: string; cwd: string }) {
|
||||
const html = useMemo(() => markdownHtml(text), [text]);
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
useLayoutEffect(() => (ref.current ? enhance(ref.current, cwd) : undefined), [html, cwd]);
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={styles.markdown}
|
||||
onClick={(e) => {
|
||||
const a = (e.target as HTMLElement).closest("a");
|
||||
const target = e.target as HTMLElement;
|
||||
const copy = target.closest<HTMLElement>("button[data-copy]");
|
||||
if (copy) {
|
||||
void copyText(copy.dataset.copy ?? "");
|
||||
return;
|
||||
}
|
||||
const file = target.closest<HTMLElement>("code[data-path]");
|
||||
if (file && !window.getSelection()?.toString()) {
|
||||
const line = file.dataset.line === undefined ? undefined : Number(file.dataset.line);
|
||||
const col = file.dataset.col === undefined ? undefined : Number(file.dataset.col);
|
||||
openPathLink({ path: file.dataset.path!, line, col });
|
||||
return;
|
||||
}
|
||||
const a = target.closest("a");
|
||||
if (!a) return;
|
||||
e.preventDefault();
|
||||
if (/^https?:/i.test(a.href)) void openExternalUrl(a.href);
|
||||
|
||||
@@ -96,6 +96,15 @@
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* The conversation with its find bar. */
|
||||
.streamArea {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.stream {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -105,6 +114,60 @@
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.stream:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Your message with its actions, shown on hover. */
|
||||
.message {
|
||||
position: relative;
|
||||
}
|
||||
.messageMeta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 20px;
|
||||
padding-left: 12px;
|
||||
font-size: var(--fs-small);
|
||||
}
|
||||
.messageActions {
|
||||
display: inline-flex;
|
||||
gap: 2px;
|
||||
margin-left: 6px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.message:hover .messageActions,
|
||||
.messageActions:focus-within {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.findBar {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.findField {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.findCount {
|
||||
color: var(--fg-subtle);
|
||||
font-size: var(--fs-small);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
::highlight(agent-find) {
|
||||
background-color: var(--bg-text-search-result);
|
||||
}
|
||||
::highlight(agent-find-current) {
|
||||
background-color: var(--bg-text-search-result-current);
|
||||
}
|
||||
|
||||
.user {
|
||||
padding: 2px 0 2px 10px;
|
||||
@@ -141,6 +204,79 @@
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
.markdown :global(pre) {
|
||||
position: relative;
|
||||
}
|
||||
.codeCopy {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: var(--radius-small);
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg-secondary);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
}
|
||||
.markdown :global(pre:hover) .codeCopy,
|
||||
.codeCopy:focus-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
.codeCopy:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
.fileLink {
|
||||
color: var(--link);
|
||||
cursor: pointer;
|
||||
}
|
||||
.fileLink:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Lezer classHighlighter tokens in fenced code (same colours as the Markdown preview). */
|
||||
.markdown :global(.tok-keyword),
|
||||
.markdown :global(.tok-modifier),
|
||||
.markdown :global(.tok-controlKeyword),
|
||||
.markdown :global(.tok-operatorKeyword) {
|
||||
color: var(--syn-keyword);
|
||||
}
|
||||
.markdown :global(.tok-string),
|
||||
.markdown :global(.tok-string2) {
|
||||
color: var(--syn-string);
|
||||
}
|
||||
.markdown :global(.tok-number),
|
||||
.markdown :global(.tok-bool),
|
||||
.markdown :global(.tok-atom) {
|
||||
color: var(--syn-number);
|
||||
}
|
||||
.markdown :global(.tok-typeName),
|
||||
.markdown :global(.tok-className),
|
||||
.markdown :global(.tok-namespace) {
|
||||
color: var(--syn-type);
|
||||
}
|
||||
.markdown :global(.tok-comment) {
|
||||
color: var(--syn-comment);
|
||||
}
|
||||
.markdown :global(.tok-meta),
|
||||
.markdown :global(.tok-macroName) {
|
||||
color: var(--syn-annotation);
|
||||
}
|
||||
.markdown :global(.tok-propertyName) {
|
||||
color: var(--syn-property);
|
||||
}
|
||||
.markdown :global(.tok-variableName.tok-definition) {
|
||||
color: var(--syn-function);
|
||||
}
|
||||
.markdown :global(.tok-punctuation),
|
||||
.markdown :global(.tok-operator) {
|
||||
color: var(--syn-punct);
|
||||
}
|
||||
.markdown :global(ul),
|
||||
.markdown :global(ol) {
|
||||
margin: 0 0 8px;
|
||||
|
||||
@@ -1,16 +1,32 @@
|
||||
/** An agent task as an editor tab: the conversation, a composer and the task's changed files. */
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState, type RefObject } from "react";
|
||||
import clsx from "clsx";
|
||||
import type { AgentChange, AgentEntry, AgentTask } from "@/bindings";
|
||||
import { executeAction } from "@/platform/actions";
|
||||
import { call, commands } from "@/platform/ipc";
|
||||
import { basename, relativeDir, useProject } from "@/platform/project";
|
||||
import { editorService, notifications, type EditorInput } from "@/workbench/contributions";
|
||||
import { Button, EmptyState, Icon, IconButton, Spinner, T, Tree, fileIconName } from "@/ui";
|
||||
import {
|
||||
Button,
|
||||
EmptyState,
|
||||
Icon,
|
||||
IconButton,
|
||||
SearchField,
|
||||
Spinner,
|
||||
T,
|
||||
Tree,
|
||||
copyMenuFor,
|
||||
copyText,
|
||||
fileIconName,
|
||||
selectableText,
|
||||
showContextMenu,
|
||||
} from "@/ui";
|
||||
import { useTx } from "@/platform/i18n";
|
||||
import { TaskStatusIcon } from "./AgentsView";
|
||||
import { Composer } from "./Composer";
|
||||
import { canSend, emptyDraft, usageLabel } from "./composerModel";
|
||||
import { ConfigPickers } from "./ConfigPickers";
|
||||
import { findRanges, formatDuration, formatSentAt } from "./conversation";
|
||||
import { Markdown } from "./Markdown";
|
||||
import { branchLabel, isBusy, providerIcon, statusLabel } from "./model";
|
||||
import {
|
||||
@@ -19,8 +35,11 @@ import {
|
||||
loadEntries,
|
||||
markVisible,
|
||||
refreshChanges,
|
||||
editMessage,
|
||||
editQueued,
|
||||
quoteInComposer,
|
||||
removeQueued,
|
||||
resendMessage,
|
||||
respond,
|
||||
sendMessage,
|
||||
sendQueuedNow,
|
||||
@@ -28,6 +47,7 @@ import {
|
||||
useAgentCommands,
|
||||
useAgents,
|
||||
} from "./store";
|
||||
import { setFocusedSession, focusedSession, type FocusedSession } from "./sessionFocus";
|
||||
import styles from "./Session.module.css";
|
||||
|
||||
export function SessionEditor({ input }: { input: EditorInput }) {
|
||||
@@ -40,13 +60,41 @@ export function SessionEditor({ input }: { input: EditorInput }) {
|
||||
void refreshChanges(id);
|
||||
return markVisible(id);
|
||||
}, [id]);
|
||||
const [finding, setFinding] = useState(false);
|
||||
const [findFocus, setFindFocus] = useState(0);
|
||||
const [session] = useState<FocusedSession>(() => ({
|
||||
openFind: () => {
|
||||
setFinding(true);
|
||||
setFindFocus((n) => n + 1);
|
||||
},
|
||||
}));
|
||||
useEffect(
|
||||
() => () => {
|
||||
if (focusedSession() === session) setFocusedSession(null);
|
||||
},
|
||||
[session],
|
||||
);
|
||||
if (!task) return <EmptyState title="This agent task no longer exists" />;
|
||||
return (
|
||||
<div className={styles.session}>
|
||||
<div
|
||||
className={styles.session}
|
||||
onFocusCapture={() => setFocusedSession(session)}
|
||||
onBlurCapture={(e) => {
|
||||
if (!e.currentTarget.contains(e.relatedTarget as Node | null) && focusedSession() === session) {
|
||||
setFocusedSession(null);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className={styles.conversation}>
|
||||
<Header task={task} />
|
||||
<PermissionBanner task={task} entries={entries ?? null} />
|
||||
<Stream task={task} entries={entries ?? null} />
|
||||
<Stream
|
||||
task={task}
|
||||
entries={entries ?? null}
|
||||
finding={finding}
|
||||
findFocus={findFocus}
|
||||
onCloseFind={() => setFinding(false)}
|
||||
/>
|
||||
<SessionComposer task={task} entries={entries ?? null} />
|
||||
</div>
|
||||
<ChangesPane task={task} changes={changes ?? null} />
|
||||
@@ -106,7 +154,16 @@ function Usage({ task }: { task: AgentTask }) {
|
||||
);
|
||||
}
|
||||
|
||||
function Stream({ task, entries }: { task: AgentTask; entries: AgentEntry[] | null }) {
|
||||
interface StreamProps {
|
||||
task: AgentTask;
|
||||
entries: AgentEntry[] | null;
|
||||
finding: boolean;
|
||||
/** Bumped by Find in Conversation: focus the find field again. */
|
||||
findFocus: number;
|
||||
onCloseFind: () => void;
|
||||
}
|
||||
|
||||
function Stream({ task, entries, finding, findFocus, onCloseFind }: StreamProps) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const stick = useRef(true);
|
||||
useLayoutEffect(() => {
|
||||
@@ -114,26 +171,207 @@ function Stream({ task, entries }: { task: AgentTask; entries: AgentEntry[] | nu
|
||||
if (el && stick.current) el.scrollTop = el.scrollHeight;
|
||||
});
|
||||
const waiting = entries?.some((e) => e.type === "permission" && !e.chosen);
|
||||
const lastUser = entries?.findLast((e): e is UserEntry => e.type === "user");
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={styles.stream}
|
||||
onScroll={(e) => {
|
||||
const el = e.currentTarget;
|
||||
stick.current = el.scrollHeight - el.scrollTop - el.clientHeight < 40;
|
||||
}}
|
||||
>
|
||||
{entries === null ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
entries.map((entry, i) => <Entry key={i} task={task} entry={entry} />)
|
||||
)}
|
||||
{(task.status === "running" || task.status === "starting") && !waiting && (
|
||||
<div className={styles.working}>
|
||||
<Spinner size={12} />
|
||||
<T>{task.status === "starting" ? "Starting the agent…" : "Working…"}</T>
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.streamArea}>
|
||||
{finding && <FindBar streamRef={ref} focus={findFocus} onClose={onCloseFind} />}
|
||||
<div
|
||||
ref={ref}
|
||||
// The conversation is read and copied like a document; focusable so ⌘F reaches it.
|
||||
className={clsx(styles.stream, selectableText)}
|
||||
tabIndex={-1}
|
||||
onScroll={(e) => {
|
||||
const el = e.currentTarget;
|
||||
stick.current = el.scrollHeight - el.scrollTop - el.clientHeight < 40;
|
||||
}}
|
||||
// Copy, plus Quote for a selection: replies to it in the composer.
|
||||
onContextMenu={(e) => {
|
||||
const text = selectionIn(e.currentTarget);
|
||||
const items = copyMenuFor(e.target) ?? [];
|
||||
if (text.trim() && task.status !== "archived") {
|
||||
items.push({ id: "quote", label: "Quote", icon: "edit", run: () => quoteInComposer(task.id, text) });
|
||||
}
|
||||
if (!items.length) return;
|
||||
e.preventDefault();
|
||||
showContextMenu(e, items);
|
||||
}}
|
||||
>
|
||||
{entries === null ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
entries.map((entry, i) => <Entry key={i} task={task} entry={entry} />)
|
||||
)}
|
||||
{(task.status === "running" || task.status === "starting") && !waiting && (
|
||||
<div className={styles.working}>
|
||||
<Spinner size={12} />
|
||||
<T>{task.status === "starting" ? "Starting the agent…" : "Working…"}</T>
|
||||
{lastUser?.sentMs != null && !lastUser.doneMs && <Elapsed since={lastUser.sentMs} />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
type UserEntry = Extract<AgentEntry, { type: "user" }>;
|
||||
|
||||
/** Time since `since`, ticking every second. */
|
||||
function Elapsed({ since }: { since: number }) {
|
||||
const [now, setNow] = useState(() => Date.now());
|
||||
useEffect(() => {
|
||||
const t = setInterval(() => setNow(Date.now()), 1000);
|
||||
return () => clearInterval(t);
|
||||
}, []);
|
||||
return <span className={styles.muted}>{formatDuration(now - since)}</span>;
|
||||
}
|
||||
|
||||
/** Text selected in `stream`, or "" when the selection is elsewhere. */
|
||||
function selectionIn(stream: HTMLElement): string {
|
||||
const sel = window.getSelection();
|
||||
if (!sel || sel.isCollapsed || !sel.rangeCount) return "";
|
||||
return stream.contains(sel.getRangeAt(0).commonAncestorContainer) ? sel.toString() : "";
|
||||
}
|
||||
|
||||
interface RangeSet {
|
||||
clear(): void;
|
||||
add(range: Range): void;
|
||||
}
|
||||
const highlights = (globalThis as { CSS?: { highlights?: Map<string, RangeSet> } }).CSS?.highlights;
|
||||
const HighlightCtor = (globalThis as { Highlight?: new () => RangeSet }).Highlight;
|
||||
|
||||
/**
|
||||
* Sets the ranges of highlight `name`. One registered highlight per name, changed in
|
||||
* place: WebKit doesn't repaint where a replaced highlight object was.
|
||||
*/
|
||||
function setHighlight(name: string, ranges: Range[]) {
|
||||
if (!highlights || !HighlightCtor) return;
|
||||
let set = highlights.get(name);
|
||||
if (!set) {
|
||||
set = new HighlightCtor();
|
||||
highlights.set(name, set);
|
||||
}
|
||||
set.clear();
|
||||
for (const r of ranges) set.add(r);
|
||||
}
|
||||
|
||||
/** Scrolls `range` into view in `stream`, opening the collapsed tool output or thought holding it. */
|
||||
function revealRange(range: Range, stream: HTMLElement) {
|
||||
for (let el = range.startContainer.parentElement; el && el !== stream; el = el.parentElement) {
|
||||
if (el instanceof HTMLDetailsElement) el.open = true;
|
||||
}
|
||||
const r = range.getBoundingClientRect();
|
||||
const box = stream.getBoundingClientRect();
|
||||
if (r.top < box.top + 24 || r.bottom > box.bottom - 24) {
|
||||
stream.scrollTop += r.top - box.top - box.height / 3;
|
||||
}
|
||||
}
|
||||
|
||||
/** Find in Conversation: every match highlighted, Enter / ⇧Enter step through them. */
|
||||
function FindBar({
|
||||
streamRef,
|
||||
focus,
|
||||
onClose,
|
||||
}: {
|
||||
streamRef: RefObject<HTMLDivElement | null>;
|
||||
focus: number;
|
||||
onClose: () => void;
|
||||
}) {
|
||||
const tx = useTx();
|
||||
const input = useRef<HTMLInputElement>(null);
|
||||
const [query, setQuery] = useState("");
|
||||
const [ranges, setRanges] = useState<Range[]>([]);
|
||||
const [current, setCurrent] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
input.current?.focus();
|
||||
input.current?.select();
|
||||
}, [focus]);
|
||||
|
||||
// Matches follow the conversation as it streams in (and as code gets highlighted).
|
||||
useEffect(() => {
|
||||
const stream = streamRef.current;
|
||||
if (!stream) return;
|
||||
let frame = 0;
|
||||
const update = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(() => setRanges(findRanges(stream, query.trim())));
|
||||
};
|
||||
update();
|
||||
const observer = new MutationObserver(update);
|
||||
observer.observe(stream, { subtree: true, childList: true, characterData: true });
|
||||
return () => {
|
||||
cancelAnimationFrame(frame);
|
||||
observer.disconnect();
|
||||
};
|
||||
}, [query, streamRef]);
|
||||
|
||||
const index = ranges.length ? Math.min(current, ranges.length - 1) : -1;
|
||||
// Expanding or collapsing a tool output shows or hides its matches.
|
||||
const [shown, setShown] = useState(0);
|
||||
useEffect(() => {
|
||||
const stream = streamRef.current;
|
||||
const toggled = () => setShown((n) => n + 1);
|
||||
stream?.addEventListener("toggle", toggled, true);
|
||||
return () => stream?.removeEventListener("toggle", toggled, true);
|
||||
}, [streamRef]);
|
||||
useEffect(() => {
|
||||
// Only rendered matches: WebKit paints those in collapsed <details> over the text next to them.
|
||||
const visible = (r: Range) => r.getClientRects().length > 0;
|
||||
const current = index >= 0 ? ranges[index]! : null;
|
||||
setHighlight("agent-find", ranges.filter(visible));
|
||||
setHighlight("agent-find-current", current && visible(current) ? [current] : []);
|
||||
}, [ranges, index, shown]);
|
||||
useEffect(
|
||||
() => () => {
|
||||
setHighlight("agent-find", []);
|
||||
setHighlight("agent-find-current", []);
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
const step = (dir: 1 | -1) => {
|
||||
const stream = streamRef.current;
|
||||
if (!ranges.length || !stream) return;
|
||||
const next = (index + dir + ranges.length) % ranges.length;
|
||||
setCurrent(next);
|
||||
revealRange(ranges[next]!, stream);
|
||||
};
|
||||
const close = () => {
|
||||
onClose();
|
||||
streamRef.current?.focus();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.findBar} role="search">
|
||||
<SearchField
|
||||
ref={input}
|
||||
value={query}
|
||||
onChange={(v) => {
|
||||
setQuery(v);
|
||||
setCurrent(0);
|
||||
}}
|
||||
aria-label={tx("Find in Conversation")}
|
||||
placeholder={tx("Find in conversation")}
|
||||
className={styles.findField}
|
||||
trailing={
|
||||
query.trim() ? (
|
||||
<span className={styles.findCount}>{ranges.length ? `${index + 1}/${ranges.length}` : tx("0 results")}</span>
|
||||
) : null
|
||||
}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
step(e.shiftKey ? -1 : 1);
|
||||
} else if (e.key === "Escape") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
close();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<IconButton icon="arrow-up" title={tx("Previous Occurrence")} size="small" disabled={!ranges.length} onClick={() => step(-1)} />
|
||||
<IconButton icon="arrow-down" title={tx("Next Occurrence")} size="small" disabled={!ranges.length} onClick={() => step(1)} />
|
||||
<IconButton icon="close" title={tx("Close")} size="small" onClick={close} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -152,23 +390,9 @@ const TOOL_ICONS: Record<string, string> = {
|
||||
function Entry({ task, entry }: { task: AgentTask; entry: AgentEntry }) {
|
||||
switch (entry.type) {
|
||||
case "user":
|
||||
return (
|
||||
<div className={styles.user}>
|
||||
{entry.text}
|
||||
{entry.attachments.length > 0 && (
|
||||
<div className={styles.attachments}>
|
||||
{entry.attachments.map((a, i) => (
|
||||
<span key={i} className={styles.attachment}>
|
||||
<Icon name={fileIconName(a)} size={12} />
|
||||
{a}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
return <UserMessage task={task} entry={entry} />;
|
||||
case "agent":
|
||||
return <Markdown text={entry.text} />;
|
||||
return <Markdown text={entry.text} cwd={task.cwd} />;
|
||||
case "thought":
|
||||
return (
|
||||
<details className={styles.thought}>
|
||||
@@ -206,6 +430,60 @@ function Entry({ task, entry }: { task: AgentTask; entry: AgentEntry }) {
|
||||
}
|
||||
}
|
||||
|
||||
function UserMessage({ task, entry }: { task: AgentTask; entry: UserEntry }) {
|
||||
const tx = useTx();
|
||||
const fail = (e: unknown) => notifications().notify({ level: "error", title: "Couldn't send the message", body: String(e) });
|
||||
const archived = task.status === "archived";
|
||||
return (
|
||||
<div className={styles.message}>
|
||||
<div className={styles.user}>
|
||||
{entry.text}
|
||||
{entry.attachments.length > 0 && (
|
||||
<div className={styles.attachments}>
|
||||
{entry.attachments.map((a, i) => (
|
||||
<span key={i} className={styles.attachment}>
|
||||
<Icon name={fileIconName(a)} size={12} />
|
||||
{a}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.messageMeta}>
|
||||
{entry.sentMs != null && (
|
||||
<span className={styles.muted} title={new Date(entry.sentMs).toLocaleString()}>
|
||||
{formatSentAt(entry.sentMs)}
|
||||
</span>
|
||||
)}
|
||||
{entry.sentMs != null && entry.doneMs != null && (
|
||||
<span className={styles.muted} title={tx("Time the agent took to answer")}>
|
||||
{`\u00a0· ${formatDuration(entry.doneMs - entry.sentMs)}`}
|
||||
</span>
|
||||
)}
|
||||
<span className={styles.messageActions}>
|
||||
<IconButton icon="copy" title="Copy" size="small" onClick={() => void copyText(entry.text)} />
|
||||
{!archived && entry.text && (
|
||||
<IconButton
|
||||
icon="edit"
|
||||
title="Edit and Resend"
|
||||
size="small"
|
||||
onClick={() => editMessage(task.id, entry.text)}
|
||||
/>
|
||||
)}
|
||||
{!archived && entry.text && entry.attachments.length === 0 && (
|
||||
<IconButton
|
||||
icon="refresh"
|
||||
title="Send Again"
|
||||
size="small"
|
||||
onClick={() => void resendMessage(task.id, entry.text).catch(fail)}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ToolEntry({ task, entry }: { task: AgentTask; entry: Extract<AgentEntry, { type: "tool" }> }) {
|
||||
const head = (
|
||||
<>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { findAll, findRanges, formatDuration, pathLink, quoteText, withQuote } from "./conversation";
|
||||
|
||||
describe("quoting", () => {
|
||||
it("quotes each line and leaves a line to type on", () => {
|
||||
expect(quoteText("one\n\ntwo\n")).toBe("> one\n>\n> two\n\n");
|
||||
});
|
||||
it("adds the quote after a draft", () => {
|
||||
expect(withQuote("", "x")).toBe("> x\n\n");
|
||||
expect(withQuote("Why? ", "x")).toBe("Why?\n\n> x\n\n");
|
||||
});
|
||||
});
|
||||
|
||||
describe("pathLink", () => {
|
||||
const cwd = "/repo";
|
||||
it("resolves relative paths with a line and column", () => {
|
||||
expect(pathLink("src/lib.rs", cwd)).toEqual({ path: "/repo/src/lib.rs" });
|
||||
expect(pathLink("./src/main.rs:12", cwd)).toEqual({ path: "/repo/src/main.rs", line: 11 });
|
||||
expect(pathLink("a/b.ts:3:5", cwd)).toEqual({ path: "/repo/a/b.ts", line: 2, col: 4 });
|
||||
expect(pathLink("Cargo.toml", cwd)).toEqual({ path: "/repo/Cargo.toml" });
|
||||
expect(pathLink("/abs/x.py#L7", cwd)).toEqual({ path: "/abs/x.py", line: 6 });
|
||||
});
|
||||
it("ignores code that isn't a path", () => {
|
||||
for (const t of ["foo()", "cargo test", "https://x.dev/a.md", "inventory", "1.5", "v2.0", "a.b()", "failing-tests", "tests/"]) {
|
||||
expect(pathLink(t, cwd)).toBeNull();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("formatDuration", () => {
|
||||
it("scales the unit", () => {
|
||||
expect(formatDuration(850)).toBe("850ms");
|
||||
expect(formatDuration(12_400)).toBe("12s");
|
||||
expect(formatDuration(65_000)).toBe("1m 05s");
|
||||
expect(formatDuration(2 * 3600_000 + 3 * 60_000)).toBe("2h 03m");
|
||||
});
|
||||
});
|
||||
|
||||
describe("finding", () => {
|
||||
it("finds every occurrence, ignoring case", () => {
|
||||
expect(findAll("Abc abc ABC", "abc")).toEqual([0, 4, 8]);
|
||||
expect(findAll("aaa", "")).toEqual([]);
|
||||
});
|
||||
it("maps matches to DOM ranges", () => {
|
||||
const root = document.createElement("div");
|
||||
root.innerHTML = "<p>one <code>two</code> one</p>";
|
||||
expect(findRanges(root, "one").map((r) => r.toString())).toEqual(["one", "one"]);
|
||||
expect(findRanges(root, "TWO")).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,88 @@
|
||||
/** Reading an agent conversation: quoting, file links, turn times and finding text. */
|
||||
|
||||
/** `text` as a Markdown quote for the composer, followed by an empty line to type in. */
|
||||
export function quoteText(text: string): string {
|
||||
const lines = text.replace(/\s+$/, "").split("\n");
|
||||
return `${lines.map((l) => (l ? `> ${l}` : ">")).join("\n")}\n\n`;
|
||||
}
|
||||
|
||||
/** Appends a quote to a draft, on its own paragraph. */
|
||||
export function withQuote(draft: string, text: string): string {
|
||||
if (!draft.trim()) return quoteText(text);
|
||||
return `${draft.replace(/\s+$/, "")}\n\n${quoteText(text)}`;
|
||||
}
|
||||
|
||||
export interface PathLink {
|
||||
/** Absolute path. */
|
||||
path: string;
|
||||
/** 0-based line and column, when the text names them. */
|
||||
line?: number;
|
||||
col?: number;
|
||||
}
|
||||
|
||||
const PATH = /^(?:\.\/)?([\w.@-]+(?:\/[\w.@-]+)*\.[A-Za-z][A-Za-z0-9]*)(?::(\d+)(?::(\d+))?|#L(\d+))?$/;
|
||||
|
||||
/**
|
||||
* The file an inline code span names (`src/lib.rs`, `src/main.rs:12`, `a/b.ts:3:5`,
|
||||
* `/abs/x.py#L7`), resolved against `cwd`; null for text that isn't a file path
|
||||
* (`foo()`, `cargo test`, URLs, `1.5`, folders, words without an extension).
|
||||
*/
|
||||
export function pathLink(text: string, cwd: string): PathLink | null {
|
||||
const t = text.trim();
|
||||
if (!t || /\s|:\/\//.test(t)) return null;
|
||||
const absolute = t.startsWith("/");
|
||||
const m = PATH.exec(absolute ? t.slice(1) : t);
|
||||
if (!m) return null;
|
||||
const rel = m[1]!;
|
||||
const path = absolute ? `/${rel}` : `${cwd.replace(/\/$/, "")}/${rel}`;
|
||||
const line = m[2] ?? m[4];
|
||||
const out: PathLink = { path };
|
||||
if (line) out.line = Math.max(0, Number(line) - 1);
|
||||
if (m[3]) out.col = Math.max(0, Number(m[3]) - 1);
|
||||
return out;
|
||||
}
|
||||
|
||||
/** `850ms`, `12s`, `1m 05s`, `2h 03m`. */
|
||||
export function formatDuration(ms: number): string {
|
||||
if (ms < 1000) return `${Math.max(0, Math.round(ms))}ms`;
|
||||
const s = Math.floor(ms / 1000);
|
||||
if (s < 60) return `${s}s`;
|
||||
const m = Math.floor(s / 60);
|
||||
if (m < 60) return `${m}m ${String(s % 60).padStart(2, "0")}s`;
|
||||
return `${Math.floor(m / 60)}h ${String(m % 60).padStart(2, "0")}m`;
|
||||
}
|
||||
|
||||
/** Clock time of a message: `14:03` today, else with the date. */
|
||||
export function formatSentAt(ms: number, now = Date.now()): string {
|
||||
const d = new Date(ms);
|
||||
const time = d.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" });
|
||||
return new Date(now).toDateString() === d.toDateString()
|
||||
? time
|
||||
: `${d.toLocaleDateString(undefined, { month: "short", day: "numeric" })} ${time}`;
|
||||
}
|
||||
|
||||
/** Start offsets of `query` in `text`, ignoring case; empty for an empty query. */
|
||||
export function findAll(text: string, query: string): number[] {
|
||||
if (!query) return [];
|
||||
const hay = text.toLowerCase();
|
||||
const needle = query.toLowerCase();
|
||||
const out: number[] = [];
|
||||
for (let i = hay.indexOf(needle); i >= 0; i = hay.indexOf(needle, i + needle.length)) out.push(i);
|
||||
return out;
|
||||
}
|
||||
|
||||
/** DOM ranges of `query` in the text under `root` (matches within one text node). */
|
||||
export function findRanges(root: Node, query: string): Range[] {
|
||||
const out: Range[] = [];
|
||||
if (!query) return out;
|
||||
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
|
||||
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
||||
for (const at of findAll(node.textContent ?? "", query)) {
|
||||
const range = document.createRange();
|
||||
range.setStart(node, at);
|
||||
range.setEnd(node, at + query.length);
|
||||
out.push(range);
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
import { AgentsStatus } from "./AgentsStatus";
|
||||
import { HOME_KIND, SESSION_KIND, TOOL_WINDOW } from "./model";
|
||||
import { sendPaths, sendSelection } from "./references";
|
||||
import { focusedSession } from "./sessionFocus";
|
||||
import { connect, disconnect, openHome, useAgents } from "./store";
|
||||
|
||||
export function activate(): () => void {
|
||||
@@ -71,6 +72,14 @@ export function activate(): () => void {
|
||||
: [],
|
||||
}),
|
||||
registerActions([
|
||||
{
|
||||
id: "agents.findInConversation",
|
||||
title: "Find in Conversation",
|
||||
category: "Agents",
|
||||
icon: "search",
|
||||
when: "agentSessionFocus",
|
||||
run: () => focusedSession()?.openFind(),
|
||||
},
|
||||
{
|
||||
id: "agents.newTask",
|
||||
title: "New Agent Task",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/** The agent session tab holding focus, for actions that act on it (Find in Conversation). */
|
||||
import { setContext } from "@/platform/context";
|
||||
|
||||
export interface FocusedSession {
|
||||
openFind(): void;
|
||||
}
|
||||
|
||||
let focused: FocusedSession | null = null;
|
||||
|
||||
export function setFocusedSession(session: FocusedSession | null) {
|
||||
focused = session;
|
||||
setContext("agentSessionFocus", !!session);
|
||||
}
|
||||
|
||||
export const focusedSession = () => focused;
|
||||
@@ -14,6 +14,7 @@ import type {
|
||||
import { call, commands, isTauri } from "@/platform/ipc";
|
||||
import { editorService, notifications } from "@/workbench/contributions";
|
||||
import { canSend, emptyDraft, toPrompt, type ComposerDraft, type FileRef } from "./composerModel";
|
||||
import { withQuote } from "./conversation";
|
||||
import { HOME_KEY, HOME_KIND, SESSION_KIND, attentionChange, isBusy, sessionKey, upsertEntry } from "./model";
|
||||
|
||||
/** New Task page settings (its text lives in the `HOME` composer). */
|
||||
@@ -44,6 +45,8 @@ interface AgentsState {
|
||||
lastComposer: string;
|
||||
/** First messages of past tasks, newest first (New Task page ↑). */
|
||||
history: string[];
|
||||
/** The composer asked to take focus (`seq` tells repeated requests apart). */
|
||||
focus: { key: string; seq: number } | null;
|
||||
}
|
||||
|
||||
const DRAFT_KEY = "openidea.agents.draft.v2";
|
||||
@@ -80,6 +83,7 @@ export const useAgents = create<AgentsState>(() => ({
|
||||
composers: new Map(),
|
||||
lastComposer: HOME,
|
||||
history: load<string[]>(HISTORY_KEY, []),
|
||||
focus: null,
|
||||
}));
|
||||
|
||||
export function updateDraft(patch: Partial<Draft>) {
|
||||
@@ -307,6 +311,28 @@ export async function sendMessage(task: string, now: boolean): Promise<void> {
|
||||
updateComposer(task, emptyDraft());
|
||||
}
|
||||
|
||||
/** Moves the caret to the end of composer `key`. */
|
||||
export function focusComposer(key: string) {
|
||||
useAgents.setState((s) => ({ focus: { key, seq: (s.focus?.seq ?? 0) + 1 } }));
|
||||
}
|
||||
|
||||
/** Quotes `text` (a selection of the conversation) in the task's composer, to reply to it. */
|
||||
export function quoteInComposer(task: string, text: string) {
|
||||
updateComposer(task, { text: withQuote(composerDraft(task).text, text) });
|
||||
focusComposer(task);
|
||||
}
|
||||
|
||||
/** Puts an earlier message back into the composer to edit and send again. */
|
||||
export function editMessage(task: string, text: string) {
|
||||
const current = composerDraft(task).text;
|
||||
updateComposer(task, { text: current.trim() ? `${text}\n${current}` : text });
|
||||
focusComposer(task);
|
||||
}
|
||||
|
||||
/** Sends an earlier message again (queued while the agent works). */
|
||||
export const resendMessage = (task: string, text: string) =>
|
||||
call(commands.agentPrompt(task, { text, files: [], images: [] }, false));
|
||||
|
||||
/** Takes a queued message back into the composer to edit it. */
|
||||
export async function editQueued(task: string, queued: string): Promise<void> {
|
||||
const item = await call(commands.agentUnqueue(task, queued));
|
||||
|
||||
@@ -147,24 +147,37 @@
|
||||
}
|
||||
|
||||
.groupPage {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.groupDescription {
|
||||
margin: 0 0 14px;
|
||||
max-width: 720px;
|
||||
color: var(--fg);
|
||||
line-height: 1.45;
|
||||
}
|
||||
.groupLinks {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 420px;
|
||||
align-items: flex-start;
|
||||
gap: 2px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
.groupLink {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 28px;
|
||||
padding: 0 8px;
|
||||
border-radius: var(--radius-row);
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: var(--link);
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.groupLink:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
.groupLink:focus-visible {
|
||||
outline: 2px solid var(--focus-ring, var(--accent));
|
||||
}
|
||||
|
||||
.footerStatus {
|
||||
|
||||
@@ -42,20 +42,46 @@ import { PageErrorBoundary } from "./PageErrorBoundary";
|
||||
import styles from "./SettingsDialog.module.css";
|
||||
import { tx } from "@/platform/i18n";
|
||||
|
||||
/** Keys of the nodes above `key`, root first. */
|
||||
function ancestorKeys(nodes: readonly PageNode[], key: string): string[] {
|
||||
for (const n of nodes) {
|
||||
if (n.key === key) return [];
|
||||
const sub = ancestorKeys(n.children, key);
|
||||
if (sub.length || n.children.some((c) => c.key === key)) return [n.key, ...sub];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function firstPage(nodes: readonly PageNode[]): string | null {
|
||||
const list = flatten(nodes).filter((n) => n.page);
|
||||
return (list.find((n) => n.matched) ?? list[0])?.key ?? null;
|
||||
}
|
||||
|
||||
const GROUP_DESCRIPTIONS: Record<string, string> = {
|
||||
"Appearance & Behavior":
|
||||
"Customize IDE appearance and behavior: change themes and font size, configure system settings and notifications.",
|
||||
Editor: "Configure code editing: completion, folding, tabs, fonts, colors, code style and inspections.",
|
||||
"Build, Execution, Deployment": "Configure build tools, run configurations, debugger and deployment.",
|
||||
"Languages & Frameworks": "Configure language servers, interpreters, SDKs and framework support.",
|
||||
Tools: "Configure external tools, terminal, database and other integrations.",
|
||||
};
|
||||
|
||||
function GroupPage({ node }: { node: PageNode }) {
|
||||
const description = GROUP_DESCRIPTIONS[node.title];
|
||||
return (
|
||||
<div className={styles.groupPage}>
|
||||
{node.children.map((c) => (
|
||||
<button key={c.key} type="button" className={styles.groupLink} onClick={() => selectPage(c.key)}>
|
||||
<SearchLabel text={c.title} />
|
||||
<Icon name="chevron-right" size={12} />
|
||||
</button>
|
||||
))}
|
||||
{description && (
|
||||
<p className={styles.groupDescription}>
|
||||
<T>{description}</T>
|
||||
</p>
|
||||
)}
|
||||
<div className={styles.groupLinks}>
|
||||
{node.children.map((c) => (
|
||||
<button key={c.key} type="button" className={styles.groupLink} onClick={() => selectPage(c.key)}>
|
||||
<SearchLabel text={c.title} />
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -263,7 +289,7 @@ export function SettingsLayout() {
|
||||
getLabel={(n) => tx(n.title)}
|
||||
getChildren={(n) => (n.children.length ? n.children : undefined)}
|
||||
isExpandable={(n) => n.children.length > 0}
|
||||
defaultExpanded={all.filter((n) => n.children.length).map((n) => n.key)}
|
||||
defaultExpanded={current ? ancestorKeys(tree, current.key) : []}
|
||||
expanded={query ? expanded : undefined}
|
||||
selected={current ? new Set([current.key]) : new Set()}
|
||||
onSelectionChange={(_sel, node) => node && selectPage(node.key)}
|
||||
|
||||
@@ -15,7 +15,10 @@ import styles from "../../components/Form.module.css";
|
||||
function NaturalLanguagesPage() {
|
||||
return (
|
||||
<Section title="Languages">
|
||||
<Row label="English (USA)" hint="Bundled Hunspell dictionary (SCOWL en_US) and common programming terms.">
|
||||
<Row
|
||||
label="English (USA, UK)"
|
||||
hint="Bundled Hunspell dictionaries (SCOWL en_US and en_GB) and common programming terms."
|
||||
>
|
||||
<span className={styles.hint}>
|
||||
<T>Used by Proofreading › Typo</T>
|
||||
</span>
|
||||
|
||||
@@ -61,6 +61,7 @@ export const intellijMacos: Record<string, string[]> = {
|
||||
|
||||
// Find
|
||||
"find.inFile": ["Meta+F"],
|
||||
"agents.findInConversation": ["Meta+F"],
|
||||
"find.replaceInFile": ["Meta+R"],
|
||||
"find.next": ["Meta+G"],
|
||||
"find.previous": ["Meta+Shift+G"],
|
||||
|
||||
@@ -62,6 +62,7 @@ export const intellijWindows: Record<string, string[]> = {
|
||||
|
||||
// Find
|
||||
"find.inFile": ["Ctrl+F"],
|
||||
"agents.findInConversation": ["Ctrl+F"],
|
||||
"find.replaceInFile": ["Ctrl+R"],
|
||||
"find.next": ["F3", "Ctrl+L"],
|
||||
"find.previous": ["Shift+F3", "Ctrl+Shift+L"],
|
||||
|
||||
@@ -62,6 +62,7 @@ export const vscodeMacos: Record<string, string[]> = {
|
||||
|
||||
// Find
|
||||
"find.inFile": ["Meta+F"],
|
||||
"agents.findInConversation": ["Meta+F"],
|
||||
"find.replaceInFile": ["Meta+Alt+F"],
|
||||
"find.next": ["Meta+G"],
|
||||
"find.previous": ["Meta+Shift+G"],
|
||||
|
||||
@@ -3014,8 +3014,8 @@
|
||||
"Reports tables, columns and aliases in query consoles that the data source's schema does not contain.": "报告查询控制台中数据源架构不包含的表、列和别名。",
|
||||
"Proofreading": "校对",
|
||||
"Reports misspelt words in comments, string literals and the names declarations introduce (camelCase and snake_case parts checked separately), and in plain text and Markdown. Agent nouns of known words (checkpointer) and, in names, two known words run together (filepath) are accepted. Words can be saved to the project or application dictionary (Editor › Natural Languages › Spelling). Correcting a name renames the symbol and its references.": "报告注释、字符串字面量和声明引入的名称(camelCase 和 snake_case 的各部分分别检查)以及纯文本和 Markdown 中拼写错误的单词。已知单词的施动名词(checkpointer)以及名称中连写的两个已知单词(filepath)视为正确。单词可以保存到项目词典或应用程序词典(编辑器 › 自然语言 › 拼写)。更正名称会重命名该符号及其引用。",
|
||||
"English (USA)": "英语(美国)",
|
||||
"Bundled Hunspell dictionary (SCOWL en_US) and common programming terms.": "捆绑的 Hunspell 词典 (SCOWL en_US) 和常用编程术语。",
|
||||
"English (USA, UK)": "英语(美国、英国)",
|
||||
"Bundled Hunspell dictionaries (SCOWL en_US and en_GB) and common programming terms.": "捆绑的 Hunspell 词典 (SCOWL en_US 和 en_GB) 和常用编程术语。",
|
||||
"Used by Proofreading › Typo": "由“校对 › 拼写错误”使用",
|
||||
"Accepted words": "已接受的单词",
|
||||
"Project dictionary": "项目词典",
|
||||
@@ -4190,5 +4190,18 @@
|
||||
"Starting the IDE backend…": "正在启动 IDE 后端…",
|
||||
"Opening the project…": "正在打开项目…",
|
||||
"Cannot load agent tasks": "无法加载智能体任务",
|
||||
"Opening {name}…": "正在打开 {name}…"
|
||||
"Opening {name}…": "正在打开 {name}…",
|
||||
"Copy Code": "复制代码",
|
||||
"Quote": "引用",
|
||||
"Find in Conversation": "在对话中查找",
|
||||
"Find in conversation": "在对话中查找",
|
||||
"0 results": "0 个结果",
|
||||
"Time the agent took to answer": "智能体回答所用的时间",
|
||||
"Edit and Resend": "编辑后重新发送",
|
||||
"Send Again": "再次发送",
|
||||
"Customize IDE appearance and behavior: change themes and font size, configure system settings and notifications.": "自定义 IDE 的外观和行为:更改主题和字号,配置系统设置和通知。",
|
||||
"Configure code editing: completion, folding, tabs, fonts, colors, code style and inspections.": "配置代码编辑:补全、折叠、标签页、字体、配色、代码样式和检查。",
|
||||
"Configure build tools, run configurations, debugger and deployment.": "配置构建工具、运行配置、调试器和部署。",
|
||||
"Configure language servers, interpreters, SDKs and framework support.": "配置语言服务器、解释器、SDK 和框架支持。",
|
||||
"Configure external tools, terminal, database and other integrations.": "配置外部工具、终端、数据库和其他集成。"
|
||||
}
|
||||
@@ -19,6 +19,11 @@
|
||||
background: var(--bg-elev);
|
||||
box-shadow: inset 0 -1px 0 var(--border);
|
||||
}
|
||||
/* Dialog window (Settings): the title sits on the dialog surface, no hairline. */
|
||||
.dialogBar {
|
||||
background: var(--bg-dialog, var(--bg-elev));
|
||||
box-shadow: none;
|
||||
}
|
||||
.windowTitle {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -292,7 +292,7 @@ export function TitleBar({
|
||||
const entry = (id: string) => <ToolbarEntry key={id} id={id} items={map} />;
|
||||
return (
|
||||
<header
|
||||
className={clsx(className, minimal && styles.minimal)}
|
||||
className={clsx(className, minimal && styles.minimal, dialog && styles.dialogBar)}
|
||||
data-tauri-drag-region
|
||||
onContextMenu={(e) => {
|
||||
if (minimal || e.defaultPrevented) return;
|
||||
|
||||