diff --git a/README.md b/README.md index 243092a6..98a1f75b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ No Rust toolchain is needed system-wide; the flake pins it. | `rust-toolchain.toml` | Pins the compiler (`stable` + clippy/rustfmt/rust-src) and the static `musl` target | | `Cargo.toml` | Workspace root (members + shared release profile) | | `crates/caos/` | The `caos` crate: shared `lib.rs` + `caos` and `caos-cli` binaries | +| `desktop/` | Native Tauri client, kept in its own Cargo workspace so desktop dependencies never enter worker images | | `crates/server/` | The `server` crate → `caos-server` | | `crates/worker-*/` | The worker crates | | `build-builtins.sh` | Bootstraps the seeded core and publishes `refs/caos/seed` | @@ -87,10 +88,26 @@ the signal to trust before committing. > files are included, but new files are not). After adding a new source file, > `git add` it before building. +### Desktop client + +The desktop client uses the same conversation engine as `caos tui` and is +scoped to the Git repository it is launched from. Its transcript scrolls +independently while the composer stays pinned to the bottom of the window. + +```bash +nix run .#caos-desktop +``` + +Build it without launching with `nix build .#caos-desktop`. The desktop remains +a separate Cargo workspace, and bare `nix build` continues to build only the +CLI and daemon host tools. See [`desktop/README.md`](desktop/README.md) for the +direct Cargo command, environment overrides, and current CLI-parity scope. + ## Building ```bash nix build .#caos # ./result/bin/{caos,caos-cli} +nix build .#caos-desktop # ./result/bin/caos-desktop nix build .#server # ./result/bin/server ``` diff --git a/crates/caos/src/bin/tui/app.rs b/crates/caos/src/bin/tui/app.rs index 9b96414c..9f78e8a9 100644 --- a/crates/caos/src/bin/tui/app.rs +++ b/crates/caos/src/bin/tui/app.rs @@ -5,14 +5,20 @@ use std::sync::mpsc::{self, Receiver, Sender}; use std::time::{Duration, Instant}; use caos::chat::{ - archive_user_conversation, compare_and_set_conversation_title, conversation_load, - conversation_load_at, conversation_reference, conversation_snapshot, describe_tool_set, - first_available_conversation_name, fork_conversation, generate_conversation_title, - interrupt_request, invite_user_to_conversation, list_user_conversations, - publish_user_conversation, resume_request, run_chat_turn, set_conversation_title, - submit_interjection, unarchive_user_conversation, ConversationLoad, ConversationRole, - ConversationSnapshot, InviteOutcome, ToolSetDescription, TurnEvent, TurnOptions, TurnOutcome, - TurnPhase, UserConversationStatus, UserConversationSummary, WorkspaceDiff, DEFAULT_MODEL, + archive_user_conversation, automatic_conversation_title, compare_and_set_conversation_title, + conversation_load, conversation_load_at, conversation_reference, conversation_snapshot, + describe_tool_set, first_available_conversation_name, fork_conversation, fresh_conversation_id, + generate_conversation_title, interrupt_request, invite_user_to_conversation, + list_user_conversations, publish_user_conversation, resume_request, run_chat_turn, + set_conversation_title, submit_interjection, unarchive_user_conversation, ConversationLoad, + ConversationRole, ConversationSnapshot, InviteOutcome, ToolSetDescription, TurnEvent, + TurnOptions, TurnOutcome, TurnPhase, UserConversationStatus, UserConversationSummary, + WorkspaceDiff, DEFAULT_MODEL, +}; +use caos::workspace::{ + commit_working_tree, fetch_remote_branch_tip, load_conversation_workspace, + local_default_branch_tip, prepare_publish_workspace, publish_conversation_pr, + publish_merge_target, remote_default_branch, }; use caos::{GitTransport, Transport}; use ratatui_core::buffer::{Buffer, CellWidth}; @@ -22,12 +28,6 @@ use ratatui_crossterm::crossterm::event::{ }; use super::args::Args; -use super::workspace::{ - commit_working_tree, fetch_remote_branch_tip, load_conversation_workspace, - local_default_branch_tip, prepare_publish_workspace, publish_conversation_pr, - publish_merge_target, remote_default_branch, -}; - #[path = "ui.rs"] pub(crate) mod ui; @@ -39,21 +39,6 @@ fn collapse_whitespace(text: &str) -> String { text.split_whitespace().collect::>().join(" ") } -fn automatic_title(prompt: &str) -> String { - const MAX_CHARS: usize = 60; - - let title = collapse_whitespace(prompt); - if title.chars().count() <= MAX_CHARS { - return title; - } - - title - .chars() - .take(MAX_CHARS - 1) - .chain(std::iter::once('…')) - .collect() -} - fn message_preview(text: &str, max_cells: u16) -> String { let text = collapse_whitespace(text); if max_cells == 0 { @@ -1327,7 +1312,7 @@ impl ConversationState { fn apply_automatic_title(&mut self, prompt: &str) { if !self.automatic_title_fallback_applied { - let fallback = automatic_title(prompt); + let fallback = automatic_conversation_title(prompt); if self.automatic_title { self.title = fallback.clone(); } @@ -3771,19 +3756,6 @@ fn screen_point(column: u16, row: u16, area: Rect) -> TranscriptPoint { } } -fn fresh_conversation_id(t: &GitTransport, user: &str) -> Result { - let created = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .map_err(|error| format!("reading the clock: {error}"))? - .as_nanos(); - let descriptor = format!( - "caos conversation\ncreator {user}\ncreated {created}\nprocess {}\n", - std::process::id() - ); - t.put_object("blob", descriptor.as_bytes()) - .map(|id| id.to_string()) -} - fn new_conversation_options( mut options: TurnOptions, requested_base: Option, @@ -4279,12 +4251,15 @@ mod tests { #[test] fn automatic_titles_collapse_whitespace_and_limit_unicode_scalars() { assert_eq!( - automatic_title(" Review\t the\nλ parser "), + automatic_conversation_title(" Review\t the\nλ parser "), "Review the λ parser" ); - assert_eq!(automatic_title(&"界".repeat(60)), "界".repeat(60)); assert_eq!( - automatic_title(&"界".repeat(61)), + automatic_conversation_title(&"界".repeat(60)), + "界".repeat(60) + ); + assert_eq!( + automatic_conversation_title(&"界".repeat(61)), format!("{}…", "界".repeat(59)) ); } diff --git a/crates/caos/src/bin/tui/mod.rs b/crates/caos/src/bin/tui/mod.rs index 401af72e..9b1ac45f 100644 --- a/crates/caos/src/bin/tui/mod.rs +++ b/crates/caos/src/bin/tui/mod.rs @@ -21,7 +21,6 @@ use ratatui_crossterm::CrosstermBackend; mod app; mod args; -mod workspace; use app::{ui::render, App, MouseAction, View}; use args::{usage, Args}; diff --git a/crates/caos/src/chat.rs b/crates/caos/src/chat.rs index 27fa4f2e..6758101b 100644 --- a/crates/caos/src/chat.rs +++ b/crates/caos/src/chat.rs @@ -1209,7 +1209,8 @@ fn remote_refs( .collect()) } -fn validate_conversation_title(title: &str) -> Result<&str, String> { +/// Trim and validate a title before a client displays or persists it. +pub fn normalize_conversation_title(title: &str) -> Result<&str, String> { if title.chars().any(char::is_control) { return Err("conversation title must contain no control characters".to_string()); } @@ -1241,7 +1242,7 @@ fn create_conversation_title_if_absent( id: &str, title: &str, ) -> Result<(), String> { - let title = validate_conversation_title(title)?; + let title = normalize_conversation_title(title)?; let title_ref = conversation_title_ref(id)?; if remote_ref(t, &title_ref)?.is_some() { return Ok(()); @@ -1345,7 +1346,7 @@ pub fn fork_conversation( from: &str, ) -> Result { validate_hash(from, "fork source")?; - let title = validate_conversation_title(title)?; + let title = normalize_conversation_title(title)?; let refname = conversation_ref(id)?; let title_ref = conversation_title_ref(id)?; let active_ref = user_conversation_ref(user, UserConversationStatus::Active, id)?; @@ -1384,7 +1385,7 @@ pub fn fork_conversation( } pub fn set_conversation_title(t: &GitTransport, id: &str, title: &str) -> Result<(), String> { - let title = validate_conversation_title(title)?; + let title = normalize_conversation_title(title)?; let hash = t.put_object("blob", title.as_bytes())?.to_string(); let title_ref = conversation_title_ref(id)?; t.git_capture( @@ -1407,8 +1408,8 @@ pub fn compare_and_set_conversation_title( expected: &str, title: &str, ) -> Result { - let expected = validate_conversation_title(expected)?; - let title = validate_conversation_title(title)?; + let expected = normalize_conversation_title(expected)?; + let title = normalize_conversation_title(title)?; let expected_hash = t.put_object("blob", expected.as_bytes())?.to_string(); let candidate = t.put_object("blob", title.as_bytes())?.to_string(); let title_ref = conversation_title_ref(id)?; @@ -1615,7 +1616,7 @@ pub fn list_user_conversations( } let title = String::from_utf8(bytes) .map_err(|_| format!("conversation {id:?} title is not UTF-8"))?; - validate_conversation_title(&title)?.to_string() + normalize_conversation_title(&title)?.to_string() } else { id.clone() }; @@ -1694,6 +1695,38 @@ pub fn first_available_conversation_name<'a>(names: impl IntoIterator Result { + let created = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map_err(|error| format!("reading the clock: {error}"))? + .as_nanos(); + let descriptor = format!( + "caos conversation\ncreator {user}\ncreated {created}\nprocess {}\n", + std::process::id() + ); + t.put_object("blob", descriptor.as_bytes()) + .map(|id| id.to_string()) +} + +/// Derive the immediate fallback title shown while best-effort title +/// generation is still running. +pub fn automatic_conversation_title(prompt: &str) -> String { + const MAX_CHARS: usize = 60; + + let title = prompt.split_whitespace().collect::>().join(" "); + if title.chars().count() <= MAX_CHARS { + return title; + } + + title + .chars() + .take(MAX_CHARS - 1) + .chain(std::iter::once('…')) + .collect() +} + fn value_text(value: &Value) -> String { value .as_str() @@ -2096,7 +2129,7 @@ fn parse_generated_title(text: &str) -> Result { if title.chars().count() > 60 { return Err("conversation title result exceeds 60 characters".to_string()); } - validate_conversation_title(&title).map(str::to_string) + normalize_conversation_title(&title).map(str::to_string) } pub fn describe_tool_set( @@ -3115,17 +3148,7 @@ fn waterfall_string(value: &Value, key: &str, target: &mut Option) -> Re } fn default_title(message: &str) -> String { - const MAX_CHARS: usize = 60; - let compact = message.split_whitespace().collect::>().join(" "); - if compact.chars().count() <= MAX_CHARS { - compact - } else { - compact - .chars() - .take(MAX_CHARS - 1) - .chain(std::iter::once('…')) - .collect() - } + automatic_conversation_title(message) } // --------------------------------------------------------------------------- @@ -3673,7 +3696,7 @@ mod tests { #[test] fn canonical_titles_reject_controls() { assert_eq!( - validate_conversation_title(" useful title ").unwrap(), + normalize_conversation_title(" useful title ").unwrap(), "useful title" ); for title in [ @@ -3683,11 +3706,11 @@ mod tests { "nul\0byte", ] { assert!( - validate_conversation_title(title).is_err(), + normalize_conversation_title(title).is_err(), "accepted {title:?}" ); } - assert!(validate_conversation_title(" ").is_err()); + assert!(normalize_conversation_title(" ").is_err()); } #[test] diff --git a/crates/caos/src/lib.rs b/crates/caos/src/lib.rs index e8705663..e030a38d 100644 --- a/crates/caos/src/lib.rs +++ b/crates/caos/src/lib.rs @@ -40,6 +40,8 @@ use gix::objs::WriteTo; pub mod chat; pub use chat::{cli_chat, cli_talk}; +pub mod workspace; + mod eval; pub use eval::cli_eval_path; diff --git a/crates/caos/src/bin/tui/workspace.rs b/crates/caos/src/workspace.rs similarity index 97% rename from crates/caos/src/bin/tui/workspace.rs rename to crates/caos/src/workspace.rs index 812d6c10..bd004881 100644 --- a/crates/caos/src/bin/tui/workspace.rs +++ b/crates/caos/src/workspace.rs @@ -3,19 +3,19 @@ use std::path::Path; use std::process::{Command, Output, Stdio}; #[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct PreparedPublishWorkspace { - pub(crate) head: String, - pub(crate) tree: String, +pub struct PreparedPublishWorkspace { + head: String, + tree: String, } /// Check out a conversation's head commit in the local working tree. /// /// This is deliberately client policy rather than part of the chat engine: -/// the TUI chooses when to mutate the checkout and requires confirmation before +/// clients choose when to mutate the checkout and require confirmation before /// calling it. Rather than applying the base-to-head diff as unstaged changes, /// this moves the local HEAD onto the conversation head commit so the checkout /// exactly matches it. -pub(crate) fn load_conversation_workspace(head: &str, cwd: &Path) -> Result<(), String> { +pub fn load_conversation_workspace(head: &str, cwd: &Path) -> Result<(), String> { let dirty = capture_required( "git", &["status", "--porcelain=v1", "--untracked-files=all"], @@ -43,7 +43,7 @@ pub(crate) fn load_conversation_workspace(head: &str, cwd: &Path) -> Result<(), /// committed the changes themselves), nothing is committed and the current /// `HEAD` is returned. `git add -A` respects `.gitignore`, so the commit /// mirrors what a normal commit of the working tree would contain. -pub(crate) fn commit_working_tree(message: &str, cwd: &Path) -> Result { +pub fn commit_working_tree(message: &str, cwd: &Path) -> Result { capture_required("git", &["add", "-A"], cwd)?; // `git diff --cached --quiet` exits non-zero exactly when the index differs // from HEAD, i.e. there is something to commit. @@ -59,7 +59,7 @@ pub(crate) fn commit_working_tree(message: &str, cwd: &Path) -> Result Result<(String, String), String> { +pub fn local_default_branch_tip(cwd: &Path) -> Result<(String, String), String> { // `refs/remotes/origin/HEAD` is the local symref recording origin's default // branch; it is set at clone time and refreshed by `git remote set-head`. let head_ref = capture_required("git", &["symbolic-ref", "refs/remotes/origin/HEAD"], cwd) @@ -260,7 +260,7 @@ pub(crate) fn local_default_branch_tip(cwd: &Path) -> Result<(String, String), S Ok((branch, commit)) } -pub(crate) fn remote_default_branch(cwd: &Path) -> Result { +pub fn remote_default_branch(cwd: &Path) -> Result { let output = command_output("git", &["ls-remote", "--symref", "origin", "HEAD"], cwd)?; let stdout = require_success("git", output)?; parse_remote_default_branch(&String::from_utf8_lossy(&stdout)) @@ -287,7 +287,7 @@ fn parse_remote_default_branch(output: &str) -> Result { Err("origin HEAD did not advertise a default branch".to_string()) } -pub(crate) fn fetch_remote_branch_tip(branch: &str, cwd: &Path) -> Result { +pub fn fetch_remote_branch_tip(branch: &str, cwd: &Path) -> Result { let remote_ref = format!("refs/heads/{branch}"); let tracking_ref = format!("refs/remotes/origin/{branch}"); let refspec = format!("+{remote_ref}:{tracking_ref}"); diff --git a/desktop/.gitignore b/desktop/.gitignore new file mode 100644 index 00000000..3d2bc626 --- /dev/null +++ b/desktop/.gitignore @@ -0,0 +1,2 @@ +/dist/ +/node_modules/ diff --git a/desktop/README.md b/desktop/README.md new file mode 100644 index 00000000..8a927fb5 --- /dev/null +++ b/desktop/README.md @@ -0,0 +1,83 @@ +# CAOS desktop + +`caos-desktop` is a native Tauri client for the CAOS agent harness. It is a +thin presentation layer over the same `caos::chat` engine used by `caos tui`. + +The app is intentionally scoped to one Git worktree. Launch it from inside the +repository you want CAOS to operate on; the repository must have a `caos` +remote and the ordinary CAOS environment (including `ANTHROPIC_API_KEY`). + +```bash +nix develop +npm ci --prefix desktop +npm run --prefix desktop dev +npm run --prefix desktop dev -- --username "Alice Smith" --model claude-opus-5 +``` + +The frontend build bundles the maintained Markdown, syntax-highlighting, and +diff-parsing libraries into the static assets embedded by Tauri. Nix performs +that build automatically; `npm run --prefix desktop dev` rebuilds it before a +local Cargo launch. The development shell supplies Node.js and the bundler. + +The reproducible Nix build is a separate flake output so it stays out of the +core workspace and worker images: + +```bash +nix build .#caos-desktop +./result/bin/caos-desktop +nix run .#caos-desktop +nix run .#caos-desktop -- --username "Alice Smith" --model claude-opus-5 +``` + +The package build runs the desktop Rust and JavaScript tests. It is also exposed +as `checks..caos-desktop`, so `nix flake check` validates the same +derivation without maintaining a second build path. Bare `nix build` continues +to build the CLI and daemon host tools; GUI dependencies remain opt-in. + +Set `CAOS_REPO` to launch against a different worktree without changing the +shell's current directory. The desktop uses `$USER` as its conversation +identity; `--username ` overrides it explicitly. + +The desktop package is its own Cargo workspace. Tauri and WebView dependencies +therefore do not enter the core CAOS workspace, its lockfile, or worker images. + +## Current scope + +- repo-scoped active conversation list +- reusable “New conversation” drafts based on the local default-branch tip, + with `/from ` for starting from another completed turn +- live chat turns using the existing harness +- a per-conversation model selector in the composer, initialized by the sole + model launch option, `--model `, plus the TUI-compatible `/model` + command +- durable multiplayer conversations with peer attribution, `/invite`, and + copyable `/ref` merge targets +- materialized `/from` forks and automatically discovered, parent-indented + subagent conversations +- interjections into active turns, durable activity polling after restarts, + and `Escape` interruption +- generated conversation titles with the first-prompt fallback used by the TUI +- inline, collapsible tool activity and intermediate responses reconstructed + from durable conversation history after reloads and restarts +- accumulated workspace diff in a conditional, resizable Changes inspector +- clean-checkout loading with `Ctrl+L`, and working-tree updates through + `/update-tree ` +- pull-request publishing through the same ordinary merge-turn workflow as the + TUI +- conversation archiving and restoration +- the project tool-set inspector available with `Ctrl+Shift+T` +- bottom-pinned composer with a separately scrolling transcript +- safe GitHub-style Markdown rendering for headings, lists, links, images, + blockquotes, inline and fenced code, tables, and text emphasis +- a persistent, pointer- and keyboard-resizable sidebar with native macOS + vibrancy and a heavily smudged, opaque frost layer +- visible repository and conversation loading states during startup +- TUI-style keyboard controls for sending, editing, switching conversations, + changing views, reloading, and opening shortcut help with `Ctrl+H` +- direct navigation to the first nine visible conversations with `Ctrl+1` + through `Ctrl+9` +- a clickable command palette that also opens with `Ctrl+Shift+P` or `/commands` +- slash-command completion in the composer +- persisted conversation renaming with `/rename ` or the TUI-compatible + `/title <title>` alias +- persistent whole-interface zoom with `Cmd++`, `Cmd+-`, and `Cmd+0` diff --git a/desktop/build.mjs b/desktop/build.mjs new file mode 100644 index 00000000..41a82fa1 --- /dev/null +++ b/desktop/build.mjs @@ -0,0 +1,22 @@ +import { execFileSync } from 'node:child_process'; +import { cp, mkdir, rm } from 'node:fs/promises'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const root = dirname(fileURLToPath(import.meta.url)); +const output = join(root, 'dist'); + +await rm(output, { force: true, recursive: true }); +await mkdir(output, { recursive: true }); +await Promise.all([ + cp(join(root, 'ui', 'index.html'), join(output, 'index.html')), + cp(join(root, 'ui', 'app.css'), join(output, 'app.css')) +]); +execFileSync('esbuild', [ + join(root, 'ui', 'app.js'), + '--bundle', + '--format=iife', + '--minify', + `--outfile=${join(output, 'app.js')}`, + '--target=chrome100,safari15' +], { stdio: 'inherit' }); diff --git a/desktop/package-lock.json b/desktop/package-lock.json new file mode 100644 index 00000000..ddcbf315 --- /dev/null +++ b/desktop/package-lock.json @@ -0,0 +1,581 @@ +{ + "name": "caos-desktop-ui", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "caos-desktop-ui", + "version": "0.1.0", + "dependencies": { + "@shikijs/core": "4.4.2", + "@shikijs/engine-javascript": "4.4.2", + "@shikijs/langs": "4.4.2", + "@shikijs/themes": "4.4.2", + "dompurify": "3.4.13", + "marked": "18.0.9", + "parse-diff": "0.12.0" + } + }, + "node_modules/@shikijs/core": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.4.2.tgz", + "integrity": "sha512-StyzbAyxg2/tBGf78gwbBkGyeQ73lf8UiJArFaQhTQIDqQOCKPCQFanvrs4/Yv3Yfyc+ONInJM6K+FMIf+P+kA==", + "license": "MIT", + "dependencies": { + "@shikijs/primitive": "4.4.2", + "@shikijs/types": "4.4.2", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.5", + "hast-util-to-html": "^9.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.4.2.tgz", + "integrity": "sha512-MnIkeqWdVPUWsxlx8gKLVCJFTsqrQJgpTPBPpQwaFeJ56lOnJxj5aN2LUFnfxUEcvOQuNocmbaMnVrCEln6rkw==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.4.2", + "@shikijs/vscode-textmate": "^10.0.2", + "oniguruma-to-es": "^4.3.6" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/langs": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.4.2.tgz", + "integrity": "sha512-8DfeusD+Zdv/eYIDdXyJTUnSMHt+aAWjAOCXV20HNGAHRlInXpG8wh421v6B91WOm9TFwRLN+b/LG5F2NAIojg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.4.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/primitive": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.4.2.tgz", + "integrity": "sha512-l6fQQKsOMlz72n38fztmSgZ76MO6KSWuw8o+GJ+FhmqrpC9pIOJNQNXGgbb5yX2AwpzlEHwsaLPnk/8o4Fm+rA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.4.2", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/themes": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.4.2.tgz", + "integrity": "sha512-H0CFoL07ddDC2Dd6EdrPYNkRhUR6YCkJlnuYFceYYUJJA5TIm2b5B33qqiDYryBExgbKMndFJPb2u1gTuqO37g==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.4.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/types": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.4.2.tgz", + "integrity": "sha512-PFYitV4vpDr/iPCIhnHp+Q4ftic5N5VeNJ3KQ1O8gn3h2ar8qgwMAXF7tq4m1CWaMS60fV4VqF6vfnWH4F7vqQ==", + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.3.tgz", + "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", + "license": "ISC" + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dompurify": { + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.13.tgz", + "integrity": "sha512-2vmYIoqjze2d+kakP8S/nS5shfsl587kzwEjcGlTdiksUVgFHnFCsLYDVj/JNqJVOQZGSYBTmuycv0PodwmnMQ==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/hast-util-to-html": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", + "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/marked": { + "version": "18.0.9", + "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.9.tgz", + "integrity": "sha512-/Sa4qiiHZxf0/FQdBBowr9q4r10krCwMvpK48FUBdXdUXScDxiQGR9zCPrFgRVR5LU3iySOiIjy09ZQvADir1w==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/oniguruma-parser": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", + "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", + "license": "MIT" + }, + "node_modules/oniguruma-to-es": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", + "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", + "license": "MIT", + "dependencies": { + "oniguruma-parser": "^0.12.2", + "regex": "^6.1.0", + "regex-recursion": "^6.0.2" + } + }, + "node_modules/parse-diff": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.12.0.tgz", + "integrity": "sha512-2Xr5mW4Bqd4CqYq2zttfw/RZraK+KcRuJvNkJzbDk3ea67Ap525XeTvBdtDE5tigJMVzIx/DMUzsShAf6+5SCA==", + "license": "MIT" + }, + "node_modules/property-information": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", + "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz", + "integrity": "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-recursion": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz", + "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "license": "MIT" + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", + "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/desktop/package.json b/desktop/package.json new file mode 100644 index 00000000..80867fa7 --- /dev/null +++ b/desktop/package.json @@ -0,0 +1,20 @@ +{ + "name": "caos-desktop-ui", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "build": "node build.mjs", + "dev": "npm run build && cargo run --manifest-path src-tauri/Cargo.toml --", + "test": "node --test tests/*.test.js" + }, + "dependencies": { + "@shikijs/core": "4.4.2", + "@shikijs/engine-javascript": "4.4.2", + "@shikijs/langs": "4.4.2", + "@shikijs/themes": "4.4.2", + "dompurify": "3.4.13", + "marked": "18.0.9", + "parse-diff": "0.12.0" + } +} diff --git a/desktop/src-tauri/.gitignore b/desktop/src-tauri/.gitignore new file mode 100644 index 00000000..79c707cb --- /dev/null +++ b/desktop/src-tauri/.gitignore @@ -0,0 +1,2 @@ +/target/ +/gen/ diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock new file mode 100644 index 00000000..cf1d6061 --- /dev/null +++ b/desktop/src-tauri/Cargo.lock @@ -0,0 +1,6195 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arc-swap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bstr" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f7dc094d718f2e1c1559ad110e27eeaae14a5465d3d56dd6dbd793079fbd530" +dependencies = [ + "memchr", + "regex-automata", + "serde_core", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d" +dependencies = [ + "serde_core", +] + +[[package]] +name = "caos" +version = "0.1.0" +dependencies = [ + "caos-world", + "flate2", + "gix", + "minreq", + "ratatui-core", + "ratatui-crossterm", + "ratatui-widgets", + "serde_json", + "tar", + "unicode-width", + "xattr", +] + +[[package]] +name = "caos-desktop" +version = "0.1.0" +dependencies = [ + "caos", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-opener", +] + +[[package]] +name = "caos-world" +version = "0.1.0" + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.19", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "clru" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197fd99cb113a8d5d9b6376f3aa817f32c1078f2343b714fff7d2ca44fdf67d5" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "compact_str" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags 2.13.1", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ctor" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + +[[package]] +name = "darling" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +dependencies = [ + "darling_core 0.24.0", + "darling_macro 0.24.0", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.3", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +dependencies = [ + "darling_core 0.24.0", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "defmt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror 2.0.19", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "dom_query" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dtor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[package]] +name = "embed-resource" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.4+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "faster-hex" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7223ae2d2f179b803433d9c830478527e92b8117eab39460edae7f1614d9fb73" +dependencies = [ + "heapless", + "serde", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-executor" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "futures-sink" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "gix" +version = "0.84.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae54ae0ebd1a5a3c3f8d95dd3b5ca6e63f4fed9bfd585e13801a97d7bde8f9ce" +dependencies = [ + "gix-actor", + "gix-commitgraph", + "gix-config", + "gix-date", + "gix-diff", + "gix-discover", + "gix-error", + "gix-features", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-lock", + "gix-object", + "gix-odb", + "gix-pack", + "gix-path", + "gix-protocol", + "gix-ref", + "gix-refspec", + "gix-revision", + "gix-revwalk", + "gix-sec", + "gix-shallow", + "gix-tempfile", + "gix-trace", + "gix-traverse", + "gix-url", + "gix-utils", + "gix-validate", + "gix-worktree-stream", + "nonempty", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-actor" +version = "0.41.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f9308ad6fd35b2a865cbe4117ac61b2be59e4a9ef1621c7a9794f7c8e52c5b" +dependencies = [ + "bstr", + "gix-date", + "gix-error", +] + +[[package]] +name = "gix-attributes" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39b40888d0ed415c0744a6cdc61eebf0304c9d26ab726725b718443c322e5ba4" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-quote", + "gix-trace", + "kstring", + "smallvec", + "thiserror 2.0.19", + "unicode-bom", +] + +[[package]] +name = "gix-chunk" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a871e5cab12ba568845714473505deefffb3c04eb47f4708ce344cd459c1cc" +dependencies = [ + "gix-error", +] + +[[package]] +name = "gix-command" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4363accdf6ef7ba861871d2d521ab7418a04aaaed919fadb022af71d379b12" +dependencies = [ + "bstr", + "gix-path", + "gix-quote", + "gix-trace", + "shell-words", +] + +[[package]] +name = "gix-commitgraph" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f675d0df484a7f6a47e64bd6f311af489d947c0323b0564f36d14f3d7762abb" +dependencies = [ + "bstr", + "gix-chunk", + "gix-error", + "gix-hash", + "memmap2", + "nonempty", +] + +[[package]] +name = "gix-config" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2372d4b49ca28431e7d150cab9d25edc1890f0184bd57eb0e917c7799e63de" +dependencies = [ + "bstr", + "gix-config-value", + "gix-features", + "gix-glob", + "gix-path", + "gix-ref", + "gix-sec", + "smallvec", + "thiserror 2.0.19", + "unicode-bom", +] + +[[package]] +name = "gix-config-value" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed42168329552f6c2e5df09665c104199d45d84bedb53683738a49b57fe1baab" +dependencies = [ + "bitflags 2.13.1", + "bstr", + "gix-path", + "libc", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-date" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e47b9e8cdc688296609b706428de570f88b1e0eed7156dde7b4a89d26fa4567" +dependencies = [ + "bstr", + "gix-error", + "itoa", + "jiff", +] + +[[package]] +name = "gix-diff" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6d9528f32d94cef2edf39a1ac01fe5a0fc44ddbb18d9e44099936047c3302b" +dependencies = [ + "bstr", + "gix-hash", + "gix-object", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-discover" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77bacdd12b7879d2178a80c58c2f319995e4654e1a7a23e3181e5c8a12b824f7" +dependencies = [ + "bstr", + "dunce", + "gix-fs", + "gix-path", + "gix-ref", + "gix-sec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-error" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9292309fd944e71b2a3c96d3c03a6feb8852db646febdde7cbb9f79cb5f329" +dependencies = [ + "bstr", +] + +[[package]] +name = "gix-features" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1849ae154d38bc403185be14fa871e38e3c93ee606875d94e207fdb9fba52dbc" +dependencies = [ + "bytes", + "crc32fast", + "gix-path", + "gix-trace", + "gix-utils", + "libc", + "once_cell", + "prodash", + "thiserror 2.0.19", + "walkdir", + "zlib-rs", +] + +[[package]] +name = "gix-filter" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecf74b7d16f6694ce4a3049074c41be0c7987105743674f1671807bd6dce09fa" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-hash", + "gix-object", + "gix-packetline", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-fs" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cdff46db8798e47e2f727d84b9379aac5add3dd3d9d0b07bb4d7d5d640771fe" +dependencies = [ + "bstr", + "fastrand", + "gix-features", + "gix-path", + "gix-utils", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-glob" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1fcb8ef5b16bcf874abe9b68d8abb3c0493c876d367ab824151f30a0f3f3756" +dependencies = [ + "bitflags 2.13.1", + "bstr", + "gix-features", + "gix-path", +] + +[[package]] +name = "gix-hash" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0926d3819c837750b4e03c7754901e73f68b8c9b690753a6372a1bed4eedce" +dependencies = [ + "faster-hex", + "gix-features", + "sha1-checked", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-hashtable" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e261d54091f0d1c729bc83f54548c071bdec60a697de1e58e88bdfd7a99d24e" +dependencies = [ + "gix-hash", + "hashbrown 0.17.1", + "parking_lot", +] + +[[package]] +name = "gix-lock" +version = "23.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9dedd9e90b0d47624d2ed241d394e09294118364e87b9b7e5f1fe755f3c2c" +dependencies = [ + "gix-tempfile", + "gix-utils", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-object" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5cd857e29429c7213bdef3f5aef83f8cc124774fe8ae0d27b1607d218d6d525" +dependencies = [ + "bstr", + "gix-actor", + "gix-date", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-utils", + "gix-validate", + "itoa", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-odb" +version = "0.81.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d004c32858b1556f2d7874405edb3c97dc78fc09beaa87d57bb077ee2858a7d" +dependencies = [ + "arc-swap", + "gix-features", + "gix-fs", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-pack", + "gix-path", + "gix-quote", + "memmap2", + "parking_lot", + "tempfile", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-pack" +version = "0.71.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e43626f2a27d1033674ec1a196b845614231e6bbd949d5e21c133045ff56b174" +dependencies = [ + "clru", + "gix-chunk", + "gix-error", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-path", + "memmap2", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-packetline" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b217dd0ee0c4021ecf169a4a519b1b4f80d15e3f3765f3dc466223dc0ac891d7" +dependencies = [ + "bstr", + "faster-hex", + "gix-trace", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-path" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "751d6bd162106f8c1e7e9aaccb5bbdd605267e91a930a17a4560c46e33a9100c" +dependencies = [ + "bstr", + "gix-trace", + "gix-validate", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-protocol" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51dea3acb390707ab868f1f9584f18449eb95d869deffae96768e47d303595ee" +dependencies = [ + "bstr", + "gix-date", + "gix-features", + "gix-hash", + "gix-ref", + "gix-shallow", + "gix-transport", + "gix-utils", + "maybe-async", + "nonempty", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-quote" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e541fc33cc2b783b7979040d445a0c86a2eca747c8faea4ca84230d06ae6ef" +dependencies = [ + "bstr", + "gix-error", + "gix-utils", +] + +[[package]] +name = "gix-ref" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c04f64c37eb7e6feb73c7060f8dc6f381cc5de5d53249bfd450bc48a86b2e8b" +dependencies = [ + "gix-actor", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-utils", + "gix-validate", + "memmap2", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-refspec" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b216ae06ec74b5f24ad0142026a997fb0a935b7410eaf9c1616fc3f0e6c5a6d3" +dependencies = [ + "bstr", + "gix-error", + "gix-glob", + "gix-hash", + "gix-revision", + "gix-validate", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-revision" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c88884dd3c1a19a39da19d10211fcdea2809aadc86869b6e824a1774340f" +dependencies = [ + "bstr", + "gix-commitgraph", + "gix-date", + "gix-error", + "gix-hash", + "gix-object", + "gix-revwalk", + "nonempty", +] + +[[package]] +name = "gix-revwalk" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85f5756abffe0917827aac683b13684ed99875bc398fa1f9b8f479b0681ef9e6" +dependencies = [ + "gix-commitgraph", + "gix-date", + "gix-error", + "gix-hash", + "gix-hashtable", + "gix-object", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-sec" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4fe6c152c1d50aea36f299825702cd37e303307832fec1d0fdd5844e47ce2f" +dependencies = [ + "bitflags 2.13.1", + "gix-path", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "gix-shallow" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a292fc2fe548c5dfa575479d16b445b0ddf1dd2f56f1fec6aed386f82553cd97" +dependencies = [ + "bstr", + "gix-hash", + "gix-lock", + "nonempty", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-tempfile" +version = "23.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef60812443484e67bf84e444cc71b4c78ae62deb822221774a4fa0c57fdb17f" +dependencies = [ + "gix-fs", + "libc", + "parking_lot", + "tempfile", +] + +[[package]] +name = "gix-trace" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be3eb81d9dc914335923e50d52829c551feefd6a72d176c4130c546b67a60814" + +[[package]] +name = "gix-transport" +version = "0.57.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186874f7ad1fb2f9a2f2aa9c2dabc7f9dd087bef74c1a0eee2b4a9cf0248fcb3" +dependencies = [ + "bstr", + "gix-command", + "gix-features", + "gix-packetline", + "gix-quote", + "gix-sec", + "gix-url", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-traverse" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8de590ecc86a3b2870665f2288324fa9f7f8672c7fc2d4e020fdd81cd1f7aed" +dependencies = [ + "bitflags 2.13.1", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "smallvec", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-url" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d68e70e96da0e5f9c871f1566349e0fd0e1a20bb483c7f54af1dd0b85b4b29" +dependencies = [ + "bstr", + "gix-path", + "percent-encoding", + "thiserror 2.0.19", +] + +[[package]] +name = "gix-utils" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1795bd2a970ca8b2185318c2abb97d955c71992f1cf28de73ad3b593a9f3ce8" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "unicode-normalization", +] + +[[package]] +name = "gix-validate" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a034e84d1e04e1b1f20f51f12491da230b6ac8b925d0c8e1b89bcd87a7c5ccc" +dependencies = [ + "bstr", +] + +[[package]] +name = "gix-worktree-stream" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25e9ed30100c63f7590bc581c225e53f731a53e06aa79a245739c07f7dcc557" +dependencies = [ + "gix-attributes", + "gix-error", + "gix-features", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-object", + "gix-path", + "gix-traverse", + "parking_lot", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" +dependencies = [ + "log", + "markup5ever", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "instability" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf84e73fa6f27f299dec58e13223cf70db80da872eb921d4f6138342a0eabc8" +dependencies = [ + "darling 0.24.0", + "indoc", + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jiff" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + +[[package]] +name = "jiff-static" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "kasuari" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +dependencies = [ + "hashbrown 0.16.1", + "portable-atomic", + "thiserror 2.0.19", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.13.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "kstring" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b609e7ca5ea38f093c20a4a102335b247221c9643b7a6bc3510f196f99499a9e" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa" +dependencies = [ + "libc", +] + +[[package]] +name = "line-clipping" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "lru" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2f2f9b4ba7e6b24d95e7e899329d35be83bcded72c8540cdd5368932d1d90a" +dependencies = [ + "hashbrown 0.17.1", +] + +[[package]] +name = "markup5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[package]] +name = "maybe-async" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "746873a384ad60adc5db74471dfaba74bd278afbdcfd81db93fafcdfc8b5ca0c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "minreq" +version = "2.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05015102dad0f7d61691ca347e9d9d9006685a64aefb3d79eecf62665de2153d" + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nonempty" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6" + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "open" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cfef937e9c486488c7e3d949ae31c0f1d06bdacd75b99c086cb35356e30408" +dependencies = [ + "dunce", + "is-wsl", + "libc", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "palette" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64" +dependencies = [ + "approx", + "libm", + "palette_derive", + "palette_math", +] + +[[package]] +name = "palette_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "palette_math" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12" +dependencies = [ + "libm", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "plist" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +dependencies = [ + "base64 0.22.1", + "indexmap 2.14.0", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.1", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prodash" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962200e2d7d551451297d9fdce85138374019ada198e30ea9ede38034e27604c" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "ratatui-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c" +dependencies = [ + "bitflags 2.13.1", + "compact_str", + "hashbrown 0.17.1", + "itertools", + "kasuari", + "lru", + "palette", + "serde", + "strum", + "thiserror 2.0.19", + "unicode-segmentation", + "unicode-truncate", + "unicode-width", +] + +[[package]] +name = "ratatui-crossterm" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0" +dependencies = [ + "cfg-if", + "crossterm", + "instability", + "ratatui-core", +] + +[[package]] +name = "ratatui-widgets" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1" +dependencies = [ + "bitflags 2.13.1", + "hashbrown 0.17.1", + "indoc", + "instability", + "itertools", + "line-clipping", + "ratatui-core", + "serde", + "strum", + "time", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.19", +] + +[[package]] +name = "ref-cast" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +dependencies = [ + "bitflags 2.13.1", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "phf", + "phf_codegen", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_with" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +dependencies = [ + "base64 0.22.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "schemars 0.9.0", + "schemars 1.2.2", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +dependencies = [ + "darling 0.23.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha1-checked" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89f599ac0c323ebb1c6082821a54962b839832b03984598375bff3975b804423" +dependencies = [ + "digest", + "sha1", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" +dependencies = [ + "bitflags 2.13.1", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "once_cell", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.19", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png 0.17.16", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.19", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "walkdir", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e1bea14edce6b793a04e2417e3fd924b9bc4faae83cdee7d714156cceeed29" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.19", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.19", + "toml 1.1.4+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.1.4+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-bom" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-truncate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.19", + "windows", + "windows-core 0.61.2", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wry" +version = "0.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe18fb60dc696039e738717b76eaea21e7a4489bbb1885020b43c94236d7e98a" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.4", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe96480bed92df2b442a1a30df364e12d08eed03aeb061f2b8dc6afb2be91119" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +dependencies = [ + "serde", + "winnow 1.0.4", + "zvariant", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zlib-rs" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zvariant" +version = "5.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee2a0bcd2a907786a456fff45aaaaf54c9ba5f50b71ae9ec1a4edd200c94911" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 1.0.4", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a708216a18780796770bfe3f4739c7c83a3e8f789b755534bbbc06e4e23e12" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90cb9383f9b45290407a1258b202d3f8f01db719eb60b4e4055c6375af4fc7c7" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.119", + "winnow 1.0.4", +] diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml new file mode 100644 index 00000000..f5d3f6e4 --- /dev/null +++ b/desktop/src-tauri/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "caos-desktop" +version = "0.1.0" +edition = "2021" +description = "Native desktop client for the CAOS agent harness" + +[workspace] +members = ["."] +resolver = "2" + +[lib] +name = "caos_desktop" +path = "src/lib.rs" + +[[bin]] +name = "caos-desktop" +path = "src/main.rs" + +[build-dependencies] +tauri-build = "2.6.3" + +[dependencies] +caos = { path = "../../crates/caos" } +serde = { version = "1", features = ["derive"] } +tauri = { version = "2.11.5", features = ["macos-private-api"] } +tauri-plugin-opener = "2.5.4" + +[dev-dependencies] +serde_json = "1" diff --git a/desktop/src-tauri/build.rs b/desktop/src-tauri/build.rs new file mode 100644 index 00000000..d860e1e6 --- /dev/null +++ b/desktop/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/desktop/src-tauri/capabilities/default.json b/desktop/src-tauri/capabilities/default.json new file mode 100644 index 00000000..9c3c7103 --- /dev/null +++ b/desktop/src-tauri/capabilities/default.json @@ -0,0 +1,11 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Default capability for the main CAOS window", + "windows": ["main"], + "permissions": [ + "core:default", + "core:window:allow-start-dragging", + "opener:default" + ] +} diff --git a/desktop/src-tauri/icons/icon.png b/desktop/src-tauri/icons/icon.png new file mode 100644 index 00000000..f4831da0 Binary files /dev/null and b/desktop/src-tauri/icons/icon.png differ diff --git a/desktop/src-tauri/icons/icon.svg b/desktop/src-tauri/icons/icon.svg new file mode 100644 index 00000000..d6edfcaf --- /dev/null +++ b/desktop/src-tauri/icons/icon.svg @@ -0,0 +1,4 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <rect width="512" height="512" rx="112" fill="#181b19"/> + <path d="M369 165C340 137 306 123 265 123C192 123 141 181 141 256C141 331 192 389 265 389C306 389 340 375 369 347" fill="none" stroke="#f2f4f0" stroke-linecap="round" stroke-width="26"/> +</svg> diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rs new file mode 100644 index 00000000..504f4a9d --- /dev/null +++ b/desktop/src-tauri/src/lib.rs @@ -0,0 +1,1289 @@ +use std::collections::{HashMap, HashSet}; +use std::path::PathBuf; +use std::sync::{Arc, Mutex}; + +use caos::chat::{ + archive_user_conversation, automatic_conversation_title, compare_and_set_conversation_title, + conversation_load, conversation_load_at, conversation_reference, conversation_snapshot, + describe_tool_set, first_available_conversation_name, fork_conversation, fresh_conversation_id, + generate_conversation_title, interrupt_request, invite_user_to_conversation, + list_user_conversations, normalize_conversation_title, normalized_username, + publish_user_conversation, resume_request, run_chat_turn, set_conversation_title, + submit_interjection, unarchive_user_conversation, ConversationLoad, ConversationRole, + InviteOutcome, TurnEvent, TurnOptions, TurnPhase, UserConversationStatus, + UserConversationSummary, DEFAULT_MODEL, +}; +use caos::workspace::{ + commit_working_tree, fetch_remote_branch_tip, load_conversation_workspace, + local_default_branch_tip, prepare_publish_workspace, publish_conversation_pr, + publish_merge_target, remote_default_branch, +}; +use caos::{GitTransport, Transport}; +use serde::{Deserialize, Serialize}; +use tauri::ipc::Channel; +use tauri::{State, WebviewWindow}; + +struct AppState { + repo_dir: PathBuf, + repo_name: String, + user: String, + initial_model: String, + discovery_error: Option<String>, + drafts: Arc<Mutex<HashMap<String, DraftState>>>, + active_turns: Arc<Mutex<HashSet<String>>>, + reconciling_requests: Arc<Mutex<HashSet<String>>>, +} + +struct DraftState { + title: Option<String>, + started: bool, + base: String, +} + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +struct DesktopArgs { + model: Option<String>, + username: Option<String>, +} + +impl DesktopArgs { + fn parse(raw: impl IntoIterator<Item = String>) -> Result<Self, String> { + let mut parsed = Self::default(); + let mut args = raw.into_iter(); + while let Some(arg) = args.next() { + match arg.as_str() { + "--model" => { + let model = args + .next() + .ok_or_else(|| "--model needs a value".to_string())?; + parsed.model = Some(model); + } + "--username" => { + let username = args + .next() + .ok_or_else(|| "--username needs a value".to_string())?; + parsed.username = Some(username); + } + "-h" | "--help" => return Err(desktop_usage()), + other => return Err(format!("unknown option {other:?}\n{}", desktop_usage())), + } + } + Ok(parsed) + } +} + +fn desktop_usage() -> String { + "usage: caos-desktop [--username <name>] [--model <model>]".to_string() +} + +struct ActiveTurnGuard { + conversation: String, + active_turns: Arc<Mutex<HashSet<String>>>, +} + +impl ActiveTurnGuard { + fn reserve( + active_turns: Arc<Mutex<HashSet<String>>>, + conversation: String, + ) -> Result<Option<Self>, String> { + let reserved = active_turns + .lock() + .map_err(|_| "desktop turn state is unavailable".to_string())? + .insert(conversation.clone()); + Ok(reserved.then_some(Self { + conversation, + active_turns, + })) + } + + fn start( + active_turns: Arc<Mutex<HashSet<String>>>, + conversation: String, + ) -> Result<Self, String> { + Self::reserve(active_turns, conversation.clone())? + .ok_or_else(|| format!("conversation {conversation:?} is already running")) + } +} + +impl Drop for ActiveTurnGuard { + fn drop(&mut self) { + if let Ok(mut active) = self.active_turns.lock() { + active.remove(&self.conversation); + } + } +} + +impl AppState { + fn discover(args: Result<DesktopArgs, String>) -> Self { + let (initial_model, explicit_user, argument_error) = match args { + Ok(args) => ( + args.model.unwrap_or_else(|| DEFAULT_MODEL.to_string()), + args.username, + None, + ), + Err(error) => (DEFAULT_MODEL.to_string(), None, Some(error)), + }; + let requested = std::env::var_os("CAOS_REPO") + .map(PathBuf::from) + .or_else(|| std::env::current_dir().ok()) + .unwrap_or_else(|| PathBuf::from(".")); + let (repo_dir, repo_name, repository_error) = match GitTransport::discover(&requested) { + Ok(transport) => { + let repo_dir = transport.work_dir().to_path_buf(); + let repo_name = repo_dir + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("repository") + .to_string(); + (repo_dir, repo_name, None) + } + Err(error) => { + let repo_name = requested + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("repository") + .to_string(); + (requested, repo_name, Some(error)) + } + }; + let (user, user_error) = match explicit_user { + Some(user) => match normalized_username(&user) { + Some(user) => (user, None), + None => ( + String::new(), + Some("--username must be 1-126 UTF-8 bytes and contain no control or invisible formatting characters".to_string()), + ), + }, + None => match std::env::var("USER") { + Ok(user) => match normalized_username(&user) { + Some(user) => (user, None), + None => ( + String::new(), + Some("$USER is not a usable identity; pass --username explicitly".to_string()), + ), + }, + Err(std::env::VarError::NotPresent) => ( + String::new(), + Some("--username is required when $USER is not set".to_string()), + ), + Err(std::env::VarError::NotUnicode(_)) => ( + String::new(), + Some("$USER is not valid UTF-8; pass --username explicitly".to_string()), + ), + }, + }; + Self { + repo_dir, + repo_name, + user, + initial_model, + discovery_error: argument_error.or(user_error).or(repository_error), + drafts: Arc::new(Mutex::new(HashMap::new())), + active_turns: Arc::new(Mutex::new(HashSet::new())), + reconciling_requests: Arc::new(Mutex::new(HashSet::new())), + } + } + + fn repo_dir(&self) -> Result<PathBuf, String> { + if let Some(error) = &self.discovery_error { + return Err(error.clone()); + } + Ok(self.repo_dir.clone()) + } +} + +async fn run_blocking<T, F>(operation: F) -> Result<T, String> +where + T: Send + 'static, + F: FnOnce() -> Result<T, String> + Send + 'static, +{ + tauri::async_runtime::spawn_blocking(operation) + .await + .map_err(|error| format!("desktop worker failed: {error}"))? +} + +#[tauri::command] +fn set_ui_zoom(window: WebviewWindow, scale: f64) -> Result<(), String> { + if !(0.8..=1.6).contains(&scale) { + return Err(format!("UI zoom {scale} is outside the supported range")); + } + window + .set_zoom(scale) + .map_err(|error| format!("could not change UI zoom: {error}")) +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct BootstrapPayload { + repo_name: String, + user: String, + default_model: &'static str, + initial_model: String, + conversations: Vec<ConversationPayload>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct ConversationPayload { + id: String, + title: String, + head: String, + short_head: String, + parent: Option<String>, + draft: bool, + started: bool, +} + +impl ConversationPayload { + fn draft(id: String, title: String) -> Self { + Self { + id, + title, + head: String::new(), + short_head: String::new(), + parent: None, + draft: true, + started: false, + } + } +} + +impl From<UserConversationSummary> for ConversationPayload { + fn from(summary: UserConversationSummary) -> Self { + Self { + short_head: short_hash(&summary.head).to_string(), + id: summary.id, + title: summary.title, + head: summary.head, + parent: summary.parent, + draft: false, + started: true, + } + } +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct HistoryEntryPayload { + commit: String, + short_commit: String, + author: String, + role: &'static str, + model: Option<String>, + message: String, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct HistoryTurnEventsPayload { + turn_commit: String, + events: Vec<TurnEventPayload>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct HistoryPayload { + turns: Vec<HistoryEntryPayload>, + turn_events: Vec<HistoryTurnEventsPayload>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct ConversationLoadPayload { + head: String, + short_head: String, + status: String, + request: Option<String>, + interrupted: bool, + history: HistoryPayload, + patch: String, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct ObservedConversationPayload { + id: String, + head: String, + status: Option<String>, + request: Option<String>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct ConversationPollPayload { + conversations: Vec<ConversationPayload>, + loads: HashMap<String, ConversationLoadPayload>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct TurnCompletionPayload { + title: String, + interjected: bool, + interrupted: bool, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct ConversationReferencePayload { + refname: String, + head: Option<String>, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct ToolSetPayload { + source: String, + tools: Vec<ToolPayload>, +} + +#[derive(Serialize)] +struct ToolPayload { + name: String, + docs: String, + image: String, +} + +#[derive(Serialize)] +#[serde( + tag = "kind", + rename_all = "camelCase", + rename_all_fields = "camelCase" +)] +enum TurnEventPayload { + Submitted { + commit: String, + }, + PhaseStarted { + phase: &'static str, + }, + PhaseComplete { + label: String, + elapsed_secs: f64, + }, + Status { + text: String, + }, + AssistantText { + text: String, + }, + ToolCall { + step_commit: String, + request: String, + round: u64, + tool_use_id: String, + name: String, + summary: String, + }, + ToolResult { + step_commit: String, + request: String, + round: u64, + tool_use_id: String, + is_error: bool, + content: String, + }, + Completed { + commit: String, + short_commit: String, + interrupted: bool, + }, +} + +impl From<TurnEvent> for TurnEventPayload { + fn from(event: TurnEvent) -> Self { + match event { + TurnEvent::PhaseStarted(phase) => Self::PhaseStarted { + phase: phase_name(phase), + }, + TurnEvent::PhaseComplete { + label, + elapsed_secs, + } => Self::PhaseComplete { + label, + elapsed_secs, + }, + TurnEvent::Status(text) => Self::Status { text }, + TurnEvent::AssistantText(text) => Self::AssistantText { text }, + TurnEvent::ToolCall { + step_commit, + request, + round, + tool_use_id, + name, + summary, + } => Self::ToolCall { + step_commit, + request, + round, + tool_use_id, + name, + summary, + }, + TurnEvent::ToolResult { + step_commit, + request, + round, + tool_use_id, + is_error, + content, + } => Self::ToolResult { + step_commit, + request, + round, + tool_use_id, + is_error, + content, + }, + TurnEvent::Completed(outcome) => Self::Completed { + commit: outcome.commit, + short_commit: outcome.short_commit, + interrupted: outcome.interrupted, + }, + } + } +} + +fn phase_name(phase: TurnPhase) -> &'static str { + match phase { + TurnPhase::System => "system", + TurnPhase::Model => "model", + } +} + +fn short_hash(hash: &str) -> &str { + hash.get(..7).unwrap_or(hash) +} + +fn request_is_active(status: &str) -> bool { + matches!(status, "queued" | "running") +} + +impl ConversationLoadPayload { + fn from_load(load: ConversationLoad, current_user: &str) -> Self { + let head = load.snapshot.head.clone(); + Self { + short_head: short_hash(&head).to_string(), + head, + status: load.snapshot.status, + request: load.snapshot.request, + interrupted: load.snapshot.interrupted, + history: HistoryPayload { + turns: load + .replay + .turns + .into_iter() + .map(|turn| HistoryEntryPayload { + commit: turn.commit, + short_commit: turn.short_commit, + role: match turn.role { + ConversationRole::Human if turn.author != current_user => "peer", + ConversationRole::Human => "human", + ConversationRole::Agent => "agent", + }, + author: turn.author, + model: turn.model, + message: turn.message, + }) + .collect(), + turn_events: load + .replay + .turn_events + .into_iter() + .map(|turn| HistoryTurnEventsPayload { + turn_commit: turn.turn_commit, + events: turn + .events + .into_iter() + .map(TurnEventPayload::from) + .collect(), + }) + .collect(), + }, + patch: load.workspace_diff.patch, + } + } +} + +fn schedule_resume( + repo_dir: PathBuf, + request: String, + reconciling_requests: Arc<Mutex<HashSet<String>>>, +) -> Result<(), String> { + { + let mut reconciling = reconciling_requests + .lock() + .map_err(|_| "desktop request state is unavailable".to_string())?; + if !reconciling.insert(request.clone()) { + return Ok(()); + } + } + std::thread::spawn(move || { + let _ = GitTransport::discover(repo_dir) + .and_then(|transport| resume_request(&transport, &request)); + if let Ok(mut reconciling) = reconciling_requests.lock() { + reconciling.remove(&request); + } + }); + Ok(()) +} + +fn reconcile_load( + repo_dir: &std::path::Path, + active_turns: &Arc<Mutex<HashSet<String>>>, + reconciling_requests: &Arc<Mutex<HashSet<String>>>, + conversation: &str, + load: &ConversationLoad, +) -> Result<(), String> { + if !request_is_active(&load.snapshot.status) + || active_turns + .lock() + .map_err(|_| "desktop turn state is unavailable".to_string())? + .contains(conversation) + { + return Ok(()); + } + let request = load.snapshot.request.clone().ok_or_else(|| { + format!("active conversation {conversation:?} has no durably recorded request") + })?; + schedule_resume( + repo_dir.to_path_buf(), + request, + Arc::clone(reconciling_requests), + ) +} + +fn ensure_conversation_idle( + state: &AppState, + conversation: &str, + action: &str, +) -> Result<(), String> { + if state + .active_turns + .lock() + .map_err(|_| "desktop turn state is unavailable".to_string())? + .contains(conversation) + { + return Err(format!( + "finish this conversation's operation before {action}" + )); + } + Ok(()) +} + +fn active_conversations( + transport: &GitTransport, + user: &str, +) -> Result<Vec<ConversationPayload>, String> { + list_user_conversations(transport, user, UserConversationStatus::Active) + .map(|items| items.into_iter().map(ConversationPayload::from).collect()) +} + +#[tauri::command] +async fn bootstrap(state: State<'_, AppState>) -> Result<BootstrapPayload, String> { + let repo_dir = state.repo_dir()?; + let repo_name = state.repo_name.clone(); + let initial_model = state.initial_model.clone(); + let user = state.user.clone(); + let payload_user = user.clone(); + run_blocking(move || { + let transport = GitTransport::discover(&repo_dir)?; + let conversations = active_conversations(&transport, &user)?; + Ok(BootstrapPayload { + repo_name, + user: payload_user, + default_model: DEFAULT_MODEL, + initial_model, + conversations, + }) + }) + .await +} + +#[tauri::command] +async fn get_conversation( + state: State<'_, AppState>, + conversation: String, +) -> Result<Option<ConversationLoadPayload>, String> { + if state + .drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .contains_key(&conversation) + { + return Ok(None); + } + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let active_turns = Arc::clone(&state.active_turns); + let reconciling_requests = Arc::clone(&state.reconciling_requests); + run_blocking(move || { + let transport = GitTransport::discover(&repo_dir)?; + let Some(load) = conversation_load(&transport, &conversation)? else { + return Ok(None); + }; + reconcile_load( + &repo_dir, + &active_turns, + &reconciling_requests, + &conversation, + &load, + )?; + Ok(Some(ConversationLoadPayload::from_load(load, &user))) + }) + .await +} + +#[tauri::command] +async fn poll_conversations( + state: State<'_, AppState>, + observed: Vec<ObservedConversationPayload>, +) -> Result<ConversationPollPayload, String> { + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let active_turns = Arc::clone(&state.active_turns); + let reconciling_requests = Arc::clone(&state.reconciling_requests); + run_blocking(move || { + let transport = GitTransport::discover(&repo_dir)?; + let mut observed_heads = HashMap::new(); + for item in observed { + if item.status.as_deref().is_some_and(request_is_active) + && !active_turns + .lock() + .map_err(|_| "desktop turn state is unavailable".to_string())? + .contains(&item.id) + { + let request = item.request.ok_or_else(|| { + format!( + "active conversation {:?} has no durably recorded request", + item.id + ) + })?; + schedule_resume(repo_dir.clone(), request, Arc::clone(&reconciling_requests))?; + } + observed_heads.insert(item.id, item.head); + } + let summaries = list_user_conversations(&transport, &user, UserConversationStatus::Active)?; + let mut loads = HashMap::new(); + for summary in &summaries { + if observed_heads.get(&summary.id) == Some(&summary.head) { + continue; + } + let load = conversation_load(&transport, &summary.id)?.ok_or_else(|| { + format!("conversation {:?} disappeared during refresh", summary.id) + })?; + reconcile_load( + &repo_dir, + &active_turns, + &reconciling_requests, + &summary.id, + &load, + )?; + loads.insert( + summary.id.clone(), + ConversationLoadPayload::from_load(load, &user), + ); + } + Ok(ConversationPollPayload { + conversations: summaries + .into_iter() + .map(ConversationPayload::from) + .collect(), + loads, + }) + }) + .await +} + +#[tauri::command] +async fn new_conversation( + state: State<'_, AppState>, + base: Option<String>, +) -> Result<ConversationPayload, String> { + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let drafts = Arc::clone(&state.drafts); + run_blocking(move || { + let requested_base = base.filter(|value| !value.trim().is_empty()); + if requested_base.is_none() { + if let Some((id, title)) = drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .iter() + .find(|(_, draft)| !draft.started) + .map(|(id, draft)| { + ( + id.clone(), + draft + .title + .clone() + .unwrap_or_else(|| "New conversation".to_string()), + ) + }) + { + return Ok(ConversationPayload::draft(id, title)); + } + } + let transport = GitTransport::discover(&repo_dir)?; + let id = fresh_conversation_id(&transport, &user)?; + if let Some(requested) = requested_base { + let source = transport + .resolve_revspec(requested.trim())? + .ok_or_else(|| format!("cannot resolve commit {requested:?}"))? + .to_string(); + let summaries = + list_user_conversations(&transport, &user, UserConversationStatus::Active)?; + let title = first_available_conversation_name( + summaries + .iter() + .map(|conversation| conversation.title.as_str()), + ); + let fork = fork_conversation(&transport, &user, &id, &title, &source)?; + conversation_load_at(&transport, &id, &fork)?; + return list_user_conversations(&transport, &user, UserConversationStatus::Active)? + .into_iter() + .find(|conversation| conversation.id == id) + .map(ConversationPayload::from) + .ok_or_else(|| format!("forked conversation {id:?} was not indexed")); + } + let base = local_default_branch_tip(&repo_dir)?.1; + drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .insert( + id.clone(), + DraftState { + title: None, + started: false, + base, + }, + ); + Ok(ConversationPayload::draft( + id, + "New conversation".to_string(), + )) + }) + .await +} + +#[tauri::command] +async fn rename_conversation( + state: State<'_, AppState>, + conversation: String, + title: String, +) -> Result<String, String> { + let title = normalize_conversation_title(&title)?.to_string(); + ensure_conversation_idle(&state, &conversation, "renaming it")?; + { + let mut drafts = state + .drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())?; + if let Some(draft) = drafts.get_mut(&conversation) { + draft.title = Some(title.clone()); + return Ok(title); + } + } + + let repo_dir = state.repo_dir()?; + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + set_conversation_title(&transport, &conversation, &title)?; + Ok(title) + }) + .await +} + +#[tauri::command] +async fn invite_conversation( + state: State<'_, AppState>, + conversation: String, + username: String, +) -> Result<String, String> { + let repo_dir = state.repo_dir()?; + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + match invite_user_to_conversation(&transport, &username, &conversation)? { + InviteOutcome::Created => Ok(format!( + "Invited username {username:?}. They must select that exact case-sensitive identity." + )), + InviteOutcome::AlreadyActive => { + Ok(format!("Username {username:?} already has this conversation active.")) + } + InviteOutcome::Archived => Ok(format!( + "Username {username:?} has archived this conversation; their choice was preserved." + )), + } + }) + .await +} + +#[tauri::command] +async fn get_conversation_reference( + state: State<'_, AppState>, + conversation: String, +) -> Result<ConversationReferencePayload, String> { + let repo_dir = state.repo_dir()?; + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + let (refname, head) = conversation_reference(&transport, &conversation)?; + Ok(ConversationReferencePayload { refname, head }) + }) + .await +} + +#[tauri::command] +async fn interrupt_conversation( + state: State<'_, AppState>, + conversation: String, +) -> Result<String, String> { + let repo_dir = state.repo_dir()?; + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + let wait_for_admission = conversation_snapshot(&transport, &conversation)? + .is_none_or(|snapshot| snapshot.request.is_none()); + let attempts = if wait_for_admission { 40 } else { 1 }; + let mut last_error = None; + for attempt in 0..attempts { + match interrupt_request(&transport, &conversation) { + Ok(commit) => return Ok(commit), + Err(error) => last_error = Some(error), + } + if attempt + 1 < attempts { + std::thread::sleep(std::time::Duration::from_millis(125)); + } + } + Err(last_error.unwrap_or_else(|| "recording Escape failed".to_string())) + }) + .await +} + +#[tauri::command] +async fn checkout_conversation( + state: State<'_, AppState>, + conversation: String, +) -> Result<String, String> { + ensure_conversation_idle(&state, &conversation, "checking it out")?; + let repo_dir = state.repo_dir()?; + run_blocking(move || { + let transport = GitTransport::discover(&repo_dir)?; + let load = conversation_load(&transport, &conversation)? + .ok_or_else(|| format!("no conversation {conversation:?}"))?; + load_conversation_workspace(&load.workspace_diff.head, &repo_dir)?; + Ok(short_hash(&load.workspace_diff.head).to_string()) + }) + .await +} + +#[tauri::command] +async fn default_publish_branch(state: State<'_, AppState>) -> Result<String, String> { + let repo_dir = state.repo_dir()?; + run_blocking(move || remote_default_branch(&repo_dir)).await +} + +#[tauri::command] +async fn publish_conversation( + state: State<'_, AppState>, + conversation: String, + base: Option<String>, + model: Option<String>, + on_event: Channel<TurnEventPayload>, +) -> Result<String, String> { + ensure_conversation_idle(&state, &conversation, "publishing it")?; + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let model = model + .map(|model| model.trim().to_string()) + .filter(|model| !model.is_empty()) + .unwrap_or_else(|| state.initial_model.clone()); + let active_turn = + ActiveTurnGuard::start(Arc::clone(&state.active_turns), conversation.clone())?; + run_blocking(move || { + let _active_turn = active_turn; + let transport = GitTransport::discover(&repo_dir)?; + let load = conversation_load(&transport, &conversation)? + .ok_or_else(|| format!("no conversation {conversation:?}"))?; + if request_is_active(&load.snapshot.status) { + return Err("finish this conversation's operation before publishing it".to_string()); + } + if load.workspace_diff.patch.is_empty() { + return Err("there are no conversation changes to publish".to_string()); + } + let default_base = remote_default_branch(&repo_dir)?; + let pr_base = base + .as_deref() + .map(str::trim) + .filter(|value| !value.is_empty()) + .unwrap_or(&default_base) + .to_string(); + let base_commit = fetch_remote_branch_tip(&pr_base, &repo_dir)?; + let target = publish_merge_target( + &load.workspace_diff.base_commit, + &base_commit, + pr_base != default_base, + &repo_dir, + )?; + transport.ensure_pushed(&target)?; + let message = format!( + "Prepare this conversation for publication. First call the existing `merge` tool \ + with `theirs` exactly `{target}`. Resolve every entry in `.caos/conflicts`, then \ + build and test. Finish only when the workspace is ready to publish." + ); + let options = TurnOptions { + model: Some(model), + username: Some(user), + ..TurnOptions::default() + }; + let outcome = run_chat_turn( + &transport, + &options, + &conversation, + &message, + None, + |_| {}, + |event| { + let _ = on_event.send(TurnEventPayload::from(event)); + }, + )?; + let workspace = prepare_publish_workspace(&outcome.commit, &target, &repo_dir)?; + let _ = on_event.send(TurnEventPayload::from(TurnEvent::Completed(outcome))); + publish_conversation_pr(&conversation, &workspace, &pr_base, &base_commit, &repo_dir) + }) + .await +} + +#[tauri::command] +async fn archive_conversation( + state: State<'_, AppState>, + conversation: String, +) -> Result<(), String> { + ensure_conversation_idle(&state, &conversation, "archiving it")?; + if state + .drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .remove(&conversation) + .is_some() + { + return Ok(()); + } + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + archive_user_conversation(&transport, &user, &conversation) + }) + .await +} + +#[tauri::command] +async fn get_archived_conversations( + state: State<'_, AppState>, +) -> Result<Vec<ConversationPayload>, String> { + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + list_user_conversations(&transport, &user, UserConversationStatus::Archived) + .map(|items| items.into_iter().map(ConversationPayload::from).collect()) + }) + .await +} + +#[tauri::command] +async fn restore_conversation( + state: State<'_, AppState>, + conversation: String, +) -> Result<ConversationPayload, String> { + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + run_blocking(move || { + let transport = GitTransport::discover(&repo_dir)?; + unarchive_user_conversation(&transport, &user, &conversation)?; + list_user_conversations(&transport, &user, UserConversationStatus::Active)? + .into_iter() + .find(|item| item.id == conversation) + .map(ConversationPayload::from) + .ok_or_else(|| format!("restored conversation {conversation:?} was not found")) + }) + .await +} + +#[tauri::command] +async fn get_tools( + state: State<'_, AppState>, + conversation: String, +) -> Result<ToolSetPayload, String> { + let base = state + .drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .get(&conversation) + .map(|draft| draft.base.clone()); + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let model = state.initial_model.clone(); + run_blocking(move || { + let transport = GitTransport::discover(repo_dir)?; + let options = TurnOptions { + base, + model: Some(model), + username: Some(user), + ..TurnOptions::default() + }; + let tools = describe_tool_set(&transport, &conversation, &options)?; + Ok(ToolSetPayload { + source: tools.source, + tools: tools + .tools + .into_iter() + .map(|tool| ToolPayload { + name: tool.name, + docs: tool.docs, + image: tool.image, + }) + .collect(), + }) + }) + .await +} + +#[tauri::command] +async fn send_message( + state: State<'_, AppState>, + conversation: String, + message: String, + title: String, + model: Option<String>, + update_tree: bool, + on_event: Channel<TurnEventPayload>, +) -> Result<TurnCompletionPayload, String> { + if message.trim().is_empty() { + return Err("empty message".to_string()); + } + let title = normalize_conversation_title(&title)?.to_string(); + let repo_dir = state.repo_dir()?; + let user = state.user.clone(); + let drafts = Arc::clone(&state.drafts); + let active_turns = Arc::clone(&state.active_turns); + let model = model + .map(|value| value.trim().to_string()) + .filter(|value| !value.is_empty()) + .unwrap_or_else(|| state.initial_model.clone()); + let active_turn = ActiveTurnGuard::reserve(active_turns, conversation.clone())?; + tauri::async_runtime::spawn_blocking(move || { + (|| { + let transport = GitTransport::discover(&repo_dir)?; + let remotely_active = conversation_snapshot(&transport, &conversation)? + .is_some_and(|snapshot| request_is_active(&snapshot.status)); + let human_tree = if update_tree { + Some(commit_working_tree(&message, &repo_dir)?) + } else { + None + }; + let options = TurnOptions { + model: Some(model), + username: Some(user.clone()), + ..TurnOptions::default() + }; + if active_turn.is_none() || remotely_active { + let commit = submit_interjection( + &transport, + &options, + &conversation, + &message, + human_tree.as_deref(), + )?; + let _ = on_event.send(TurnEventPayload::Submitted { commit }); + return Ok(TurnCompletionPayload { + title, + interjected: true, + interrupted: false, + }); + } + + let _active_turn = active_turn.expect("idle turns reserve their conversation"); + let draft = { + let mut drafts = drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())?; + drafts.get_mut(&conversation).map(|draft| { + draft.started = true; + (draft.title.clone(), draft.base.clone()) + }) + }; + let is_draft = draft.is_some(); + let (requested_title, base) = match draft { + Some((title, base)) => (title, Some(base)), + None => (None, None), + }; + let options = TurnOptions { base, ..options }; + let fallback_title = automatic_conversation_title(&message); + let title_task = (is_draft && requested_title.is_none()).then(|| { + let repo_dir = repo_dir.clone(); + let options = options.clone(); + let prompt = message.clone(); + std::thread::spawn(move || { + GitTransport::discover(repo_dir).and_then(|transport| { + generate_conversation_title(&transport, &options, &prompt) + }) + }) + }); + let turn = run_chat_turn( + &transport, + &options, + &conversation, + &message, + human_tree.as_deref(), + |commit| { + let _ = on_event.send(TurnEventPayload::Submitted { + commit: commit.to_string(), + }); + }, + |event| { + let _ = on_event.send(TurnEventPayload::from(event)); + }, + ); + if is_draft && conversation_snapshot(&transport, &conversation)?.is_some() { + drafts + .lock() + .map_err(|_| "desktop draft state is unavailable".to_string())? + .remove(&conversation); + } + let outcome = turn?; + let generated_title = title_task + .and_then(|task| task.join().ok()) + .and_then(Result::ok); + publish_user_conversation(&transport, &user, &conversation, &fallback_title)?; + if let Some(desired_title) = requested_title.or(generated_title) { + if desired_title != fallback_title { + let _ = compare_and_set_conversation_title( + &transport, + &conversation, + &fallback_title, + &desired_title, + )?; + } + } + let resolved_title = + list_user_conversations(&transport, &user, UserConversationStatus::Active)? + .into_iter() + .find(|summary| summary.id == conversation) + .map(|summary| summary.title) + .unwrap_or(fallback_title); + let interrupted = outcome.interrupted; + let _ = on_event.send(TurnEventPayload::from(TurnEvent::Completed(outcome))); + Ok(TurnCompletionPayload { + title: resolved_title, + interjected: false, + interrupted, + }) + })() + }) + .await + .map_err(|error| format!("desktop turn worker failed: {error}"))? +} + +#[cfg_attr(mobile, tauri::mobile_entry_point)] +pub fn run() { + tauri::Builder::default() + .plugin( + tauri_plugin_opener::Builder::new() + .open_js_links_on_click(true) + .build(), + ) + .manage(AppState::discover(DesktopArgs::parse( + std::env::args().skip(1), + ))) + .invoke_handler(tauri::generate_handler![ + bootstrap, + get_conversation, + poll_conversations, + new_conversation, + rename_conversation, + invite_conversation, + get_conversation_reference, + interrupt_conversation, + checkout_conversation, + default_publish_branch, + publish_conversation, + archive_conversation, + get_archived_conversations, + restore_conversation, + get_tools, + send_message, + set_ui_zoom + ]) + .run(tauri::generate_context!()) + .expect("error while running CAOS desktop"); +} + +#[cfg(test)] +mod tests { + use super::{short_hash, ActiveTurnGuard, DesktopArgs, TurnEventPayload}; + use caos::chat::TurnEvent; + use std::collections::HashSet; + use std::sync::{Arc, Mutex}; + + #[test] + fn hashes_are_safe_when_short() { + assert_eq!(short_hash("123456789"), "1234567"); + assert_eq!(short_hash("abc"), "abc"); + } + + #[test] + fn desktop_arguments_accept_identity_and_model() { + let parsed = DesktopArgs::parse([ + "--username".to_string(), + "Alice".to_string(), + "--model".to_string(), + "test-model".to_string(), + ]) + .unwrap(); + assert_eq!(parsed.username.as_deref(), Some("Alice")); + assert_eq!(parsed.model.as_deref(), Some("test-model")); + assert!(DesktopArgs::parse(["--base".to_string(), "main".to_string()]).is_err()); + assert!(DesktopArgs::parse(["--model".to_string()]).is_err()); + } + + #[test] + fn active_turns_are_exclusive_and_clear_on_drop() { + let active = Arc::new(Mutex::new(HashSet::new())); + let guard = ActiveTurnGuard::start(Arc::clone(&active), "talk-1".to_string()).unwrap(); + assert!(active.lock().unwrap().contains("talk-1")); + assert!(ActiveTurnGuard::start(Arc::clone(&active), "talk-1".to_string()).is_err()); + drop(guard); + assert!(active.lock().unwrap().is_empty()); + } + + #[test] + fn turn_event_payloads_are_tagged_without_null_fields() { + let payload = TurnEventPayload::from(TurnEvent::ToolResult { + step_commit: "abc1234".to_string(), + request: "request-1".to_string(), + round: 2, + tool_use_id: "tool-1".to_string(), + is_error: false, + content: "result".to_string(), + }); + assert_eq!( + serde_json::to_value(payload).unwrap(), + serde_json::json!({ + "kind": "toolResult", + "stepCommit": "abc1234", + "request": "request-1", + "round": 2, + "toolUseId": "tool-1", + "isError": false, + "content": "result" + }) + ); + let submitted = TurnEventPayload::Submitted { + commit: "def5678".to_string(), + }; + assert_eq!( + serde_json::to_value(submitted).unwrap(), + serde_json::json!({ "kind": "submitted", "commit": "def5678" }) + ); + } +} diff --git a/desktop/src-tauri/src/main.rs b/desktop/src-tauri/src/main.rs new file mode 100644 index 00000000..2033760a --- /dev/null +++ b/desktop/src-tauri/src/main.rs @@ -0,0 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + caos_desktop::run(); +} diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json new file mode 100644 index 00000000..d2b987bb --- /dev/null +++ b/desktop/src-tauri/tauri.conf.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "CAOS", + "version": "0.1.0", + "identifier": "dev.caos.desktop", + "build": { + "frontendDist": "../dist" + }, + "app": { + "macOSPrivateApi": true, + "withGlobalTauri": true, + "windows": [ + { + "label": "main", + "title": "CAOS", + "width": 1180, + "height": 780, + "minWidth": 720, + "minHeight": 520, + "resizable": true, + "fullscreen": false, + "theme": "Dark", + "transparent": true, + "windowEffects": { + "effects": ["sidebar"], + "state": "active" + }, + "decorations": true, + "titleBarStyle": "Overlay", + "hiddenTitle": true, + "trafficLightPosition": { + "x": 16, + "y": 18 + } + } + ], + "security": { + "csp": "default-src 'self'; connect-src ipc: http://ipc.localhost; img-src 'self' data: https: http:; style-src 'self' 'unsafe-inline'" + } + }, + "bundle": { + "active": false + } +} diff --git a/desktop/tests/activity.test.js b/desktop/tests/activity.test.js new file mode 100644 index 00000000..8e0a4c49 --- /dev/null +++ b/desktop/tests/activity.test.js @@ -0,0 +1,80 @@ +import assert from 'node:assert/strict'; +import { + activityGroupComplete, + activityGroupExpandable, + activityGroupSummary, + mergeReplayedHistory, + replayedTurnEntries, + sameToolCall, + scrollPositionIsNearBottom, + toolDescription +} from '../ui/activity.js'; + +const calls = [ + { name: 'bash', summary: '$ cargo test' }, + { name: 'read', summary: 'read desktop/ui/app.js' }, + { name: 'bash', summary: '$ git diff --check' } +]; +assert.equal(activityGroupSummary(calls), '2 commands, Read desktop/ui/app.js'); +assert.equal(toolDescription(calls[0]), 'Ran cargo test'); +assert.equal(toolDescription({ name: 'edit', summary: 'edit desktop/ui/app.css' }), 'Edited desktop/ui/app.css'); +assert.equal(activityGroupComplete({ calls: [] }), false); +assert.equal(activityGroupComplete({ calls: [{ result: { isError: false } }] }), true); +assert.equal(activityGroupComplete({ calls: [{ result: { isError: false } }, {}] }), false); +assert.equal(activityGroupExpandable({ calls: [{ name: 'bash' }] }), true); +assert.equal(activityGroupExpandable({ calls: [{ name: 'read' }] }), false); +assert.equal(activityGroupExpandable({ calls: [{ name: 'read' }, { name: 'edit' }] }), true); +assert.equal(scrollPositionIsNearBottom({ scrollHeight: 800, clientHeight: 300, scrollTop: 500 }), true); +assert.equal(scrollPositionIsNearBottom({ scrollHeight: 800, clientHeight: 300, scrollTop: 450 }), false); + +const replayed = replayedTurnEntries([ + { kind: 'assistantText', text: 'I will inspect it.' }, + { kind: 'toolCall', request: 'req-1', round: 0, toolUseId: 'tool-1', stepCommit: 'aaaaaaa', name: 'read', summary: 'read README.md' }, + { kind: 'toolResult', request: 'req-1', round: 0, toolUseId: 'tool-1', stepCommit: 'bbbbbbb', isError: false, content: 'README contents' } +]); +assert.equal(replayed.length, 2); +assert.deepEqual(replayed[0], { + role: 'agent', + message: 'I will inspect it.', + shortCommit: '' +}); +assert.equal(replayed[1].role, 'activity'); +assert.equal(replayed[1].running, false); +assert.equal(replayed[1].calls[0].result.content, 'README contents'); +assert.equal(sameToolCall( + { request: 'req-1', round: 1, toolUseId: 'tool-1' }, + { request: 'req-1', round: 1, toolUseId: 'tool-1' } +), true); +assert.equal(sameToolCall( + { request: 'req-1', round: 1, toolUseId: 'tool-1' }, + { request: 'req-2', round: 1, toolUseId: 'tool-1' } +), false); +const orphanResult = replayedTurnEntries([ + { kind: 'toolResult', request: 'req-3', round: 4, toolUseId: 'tool-1', isError: false, content: 'ok' } +]); +assert.equal(orphanResult[0].calls[0].request, 'req-3'); +assert.equal(orphanResult[0].calls[0].round, 4); + +const turns = [ + { role: 'human', message: 'New request', commit: '1111111', timestampUnix: 100 }, + { role: 'agent', message: 'Done.', commit: '2222222', timestampUnix: 123 } +]; +const history = mergeReplayedHistory(turns, [{ turnCommit: '2222222', events: [ + { kind: 'assistantText', text: 'I will inspect it.' }, + { kind: 'toolCall', request: 'req-1', round: 0, toolUseId: 'tool-1', stepCommit: 'aaaaaaa', name: 'read', summary: 'read README.md' }, + { kind: 'toolResult', request: 'req-1', round: 0, toolUseId: 'tool-1', stepCommit: 'bbbbbbb', isError: false, content: 'README contents' } +] }]); +assert.equal(history.length, 4); +assert.equal(history[0], turns[0]); +assert.equal(history[1].message, 'I will inspect it.'); +assert.equal(history[2].role, 'activity'); +assert.equal(history[3], turns[1]); + +const aggregateHistory = mergeReplayedHistory(turns, [{ turnCommit: 'canonical-head', events: [ + { kind: 'toolCall', request: 'req-2', round: 2, toolUseId: 'tool-1', name: 'bash', summary: '$ cargo test' }, + { kind: 'toolResult', request: 'req-2', round: 2, toolUseId: 'tool-1', isError: false, content: 'ok' } +] }]); +assert.equal(aggregateHistory.at(-2).role, 'activity'); +assert.equal(aggregateHistory.at(-1), turns[1]); + +console.log('activity timeline tests passed'); diff --git a/desktop/tests/changes.test.js b/desktop/tests/changes.test.js new file mode 100644 index 00000000..ca50fc65 --- /dev/null +++ b/desktop/tests/changes.test.js @@ -0,0 +1,68 @@ +import assert from 'node:assert/strict'; +import { + filePatchesFromPatch, + filePresentation, + highlightedHunkLines, + lineCounts, + unchangedLinesBefore +} from '../ui/changes.js'; +import { initializeHighlighting } from '../ui/highlight.js'; + +const patch = [ + 'diff --git a/desktop/ui/app.js b/desktop/ui/app.js', + 'index 1111111..2222222 100644', + '--- a/desktop/ui/app.js', + '+++ b/desktop/ui/app.js', + '@@ -10,3 +10,4 @@ function run() {', + ' const before = true;', + '-old app', + '+const next = "new app";', + '+return next;', + ' }', + '@@ -30 +31 @@ function finish() {', + '-old finish', + '+new finish', + 'diff --git a/desktop/ui/new.css b/desktop/ui/new.css', + 'new file mode 100644', + 'index 0000000..4444444', + '--- /dev/null', + '+++ b/desktop/ui/new.css', + '@@ -0,0 +1 @@', + '+.new { color: green; }', + '' +].join('\n'); + +const files = filePatchesFromPatch(patch); +assert.deepEqual(files.map((file) => file.path), ['desktop/ui/app.js', 'desktop/ui/new.css']); +assert.deepEqual(files[0].stats, { additions: 3, deletions: 2 }); +assert.equal(files[0].status, 'modified'); +assert.equal(files[1].status, 'added'); + +const [firstHunk, secondHunk] = files[0].hunks; +assert.deepEqual(firstHunk.lines.slice(0, 4), [ + { kind: 'context', oldLine: 10, newLine: 10, text: 'const before = true;' }, + { kind: 'delete', oldLine: 11, newLine: null, text: 'old app' }, + { kind: 'add', oldLine: null, newLine: 11, text: 'const next = "new app";' }, + { kind: 'add', oldLine: null, newLine: 12, text: 'return next;' } +]); +assert.equal(unchangedLinesBefore(firstHunk), 9); +assert.equal(unchangedLinesBefore(secondHunk, firstHunk), 17); + +assert.deepEqual(filePresentation('desktop/ui/app.js'), { + badge: 'JS', directory: 'desktop/ui', extension: 'js', name: 'app.js' +}); +assert.equal(filePresentation('flake.lock').badge, 'LOCK'); + +await initializeHighlighting(); +const highlighted = highlightedHunkLines(firstHunk, 'desktop/ui/app.js'); +assert.equal( + highlighted.map((line) => line.tokens.map((token) => token.content).join('')).join('\n'), + firstHunk.lines.map((line) => line.text).join('\n') +); +assert.ok(highlighted.flatMap((line) => line.tokens).some((token) => token.color)); + +assert.deepEqual(filePatchesFromPatch(''), []); +assert.deepEqual(lineCounts(files), { additions: 4, deletions: 2 }); +assert.deepEqual(lineCounts([]), { additions: 0, deletions: 0 }); + +console.log('change viewer tests passed'); diff --git a/desktop/tests/commands.test.js b/desktop/tests/commands.test.js new file mode 100644 index 00000000..b9fefb54 --- /dev/null +++ b/desktop/tests/commands.test.js @@ -0,0 +1,30 @@ +import assert from 'node:assert/strict'; +import { + modelChoices, + modelLabel, + parseComposerCommand, + slashCommandMatches +} from '../ui/commands.js'; + +assert.deepEqual(parseComposerCommand('/from abc123'), { kind: 'from', argument: 'abc123' }); +assert.deepEqual(parseComposerCommand('/title A useful title'), { kind: 'rename', argument: 'A useful title' }); +assert.deepEqual(parseComposerCommand('/update-tree include edits'), { + kind: 'update-tree', + argument: 'include edits' +}); +assert.deepEqual(parseComposerCommand('/commands'), { kind: 'commands', argument: '' }); +assert.deepEqual(parseComposerCommand('/invite Malcolm Handley'), { + kind: 'invite', + argument: 'Malcolm Handley' +}); +assert.deepEqual(parseComposerCommand('/model default'), { kind: 'model', argument: 'default' }); +assert.deepEqual(parseComposerCommand('/ref'), { kind: 'ref', argument: '' }); +assert.equal(parseComposerCommand('/unknown value'), null); + +assert.deepEqual(slashCommandMatches('/up').map((command) => command.name), ['/update-tree']); +assert.equal(slashCommandMatches('/from abc').length, 0); + +const choices = modelChoices('custom-model'); +assert.equal(choices.at(-1).value, 'custom-model'); +assert.equal(modelLabel('claude-opus-4-8', choices), 'Opus 4.8'); +assert.equal(modelLabel('custom-model', choices), 'custom-model'); diff --git a/desktop/tests/markdown.test.js b/desktop/tests/markdown.test.js new file mode 100644 index 00000000..00eddc5f --- /dev/null +++ b/desktop/tests/markdown.test.js @@ -0,0 +1,39 @@ +import assert from 'node:assert/strict'; + +import { markdownHtml } from '../ui/markdown.js'; + +const emphasis = markdownHtml('plain **bold _and italic_**'); +assert.match(emphasis, /<strong>bold <em>and italic<\/em><\/strong>/u); + +const literal = markdownHtml('`**not bold** _not italic_` and **bold**'); +assert.match(literal, /<code>\*\*not bold\*\* _not italic_<\/code>/u); +assert.match(literal, /<strong>bold<\/strong>/u); + +const table = markdownHtml(`| Name | Role | +| :--- | ---: | +| Ann | **dev** | +| A\\|B | lead |`); +assert.match(table, /<table>/u); +assert.match(table, /align="right"/u); +assert.match(table, /A\|B/u); + +const blocks = markdownHtml([ + '# Review', + '', + '1. First item', + ' - Nested item with `code`', + '2. Second item', + '', + '> Quoted **text**', + '', + '```rust', + 'fn main() {}', + '```' +].join('\n')); +assert.match(blocks, /<h1>Review<\/h1>/u); +assert.match(blocks, /<ol>/u); +assert.match(blocks, /<ul>/u); +assert.match(blocks, /<blockquote>/u); +assert.match(blocks, /class="language-rust"/u); + +console.log('markdown rendering tests passed'); diff --git a/desktop/ui/activity.js b/desktop/ui/activity.js new file mode 100644 index 00000000..2113f3e6 --- /dev/null +++ b/desktop/ui/activity.js @@ -0,0 +1,152 @@ +function pluralized(count, singular, plural = `${singular}s`) { + return `${count} ${count === 1 ? singular : plural}`; +} + +function summaryRemainder(call) { + const summary = String(call?.summary || '').trim(); + const name = String(call?.name || '').trim(); + if (!summary) return ''; + if (name && summary.toLowerCase().startsWith(`${name.toLowerCase()} `)) { + return summary.slice(name.length + 1); + } + return summary.replace(/^\$\s*/u, ''); +} + +function toolDescription(call) { + const detail = summaryRemainder(call); + switch (call?.name) { + case 'bash': return detail ? `Ran ${detail}` : 'Ran a command'; + case 'read': return detail ? `Read ${detail}` : 'Read a file'; + case 'write': return detail ? `Wrote ${detail}` : 'Wrote a file'; + case 'edit': return detail ? `Edited ${detail}` : 'Edited a file'; + case 'ls': return detail ? `Listed ${detail}` : 'Listed files'; + case 'grep': return detail ? `Searched ${detail}` : 'Searched files'; + default: { + if (call?.summary) return String(call.summary); + return call?.name ? `Used ${call.name}` : 'Used a tool'; + } + } +} + +function activityGroupSummary(calls) { + const commands = calls.filter((call) => call.name === 'bash'); + const otherCalls = calls.filter((call) => call.name !== 'bash'); + const parts = []; + if (commands.length > 0) parts.push(pluralized(commands.length, 'command')); + for (const call of otherCalls.slice(0, 2)) parts.push(toolDescription(call)); + const described = commands.length + Math.min(otherCalls.length, 2); + if (calls.length > described) parts.push(`+${calls.length - described} more`); + return parts.join(', ') || 'Working'; +} + +function activityGroupComplete(entry) { + return Boolean(entry?.calls?.length) && entry.calls.every((call) => call.result); +} + +function activityGroupExpandable(entry) { + return Boolean(entry?.calls?.length > 1) + || Boolean(entry?.calls?.some((call) => call.name === 'bash')); +} + +function scrollPositionIsNearBottom(position, threshold = 24) { + const remaining = position.scrollHeight - position.clientHeight - position.scrollTop; + return remaining <= threshold; +} + +function sameToolCall(left, right) { + return left?.toolUseId === right?.toolUseId + && left?.request === right?.request + && Number(left?.round || 0) === Number(right?.round || 0); +} + +function replayedTurnEntries(events) { + const entries = []; + let group = null; + const finishGroup = () => { + if (!group) return; + if (group.calls.length > 0) entries.push(group); + group = null; + }; + + for (const event of events || []) { + if (event.kind === 'assistantText' && event.text) { + finishGroup(); + entries.push({ + role: 'agent', + message: event.text, + shortCommit: '' + }); + } else if (event.kind === 'toolCall') { + if (activityGroupComplete(group)) finishGroup(); + group ||= { + role: 'activity', + calls: [], + expanded: false, + running: false, + status: '' + }; + group.calls.push({ ...event }); + } else if (event.kind === 'toolResult') { + let call = group?.calls.find((item) => sameToolCall(item, event)); + if (!call) { + group ||= { + role: 'activity', + calls: [], + expanded: false, + running: false, + status: '' + }; + call = { + kind: 'toolCall', + stepCommit: event.stepCommit, + request: event.request, + round: event.round, + toolUseId: event.toolUseId, + name: 'result', + summary: `result ${event.toolUseId}` + }; + group.calls.push(call); + } + call.result = { ...event }; + } + } + finishGroup(); + return entries; +} + +function mergeReplayedHistory(turns, turnEvents) { + const eventsByTurn = new Map( + (turnEvents || []).map((turn) => [turn.turnCommit, turn.events]) + ); + const consumed = new Set(); + const history = []; + for (const turn of turns || []) { + if (turn.role === 'agent' && eventsByTurn.has(turn.commit)) { + consumed.add(turn.commit); + history.push(...replayedTurnEntries(eventsByTurn.get(turn.commit))); + } + history.push(turn); + } + const durableActivity = (turnEvents || []) + .filter((turn) => !consumed.has(turn.turnCommit)) + .flatMap((turn) => replayedTurnEntries(turn.events)); + if (durableActivity.length > 0) { + let finalAgent = -1; + history.forEach((entry, index) => { + if (entry.role === 'agent') finalAgent = index; + }); + history.splice(finalAgent < 0 ? history.length : finalAgent, 0, ...durableActivity); + } + return history; +} + +export { + activityGroupComplete, + activityGroupExpandable, + activityGroupSummary, + mergeReplayedHistory, + replayedTurnEntries, + sameToolCall, + scrollPositionIsNearBottom, + toolDescription +}; diff --git a/desktop/ui/app.css b/desktop/ui/app.css new file mode 100644 index 00000000..2f9a85ba --- /dev/null +++ b/desktop/ui/app.css @@ -0,0 +1,1848 @@ +:root { + color-scheme: dark; + --ui-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; + --sidebar-width: 226px; + --inspector-width: 420px; + --chat-content-width: 920px; + --bg: #181818; + --sidebar: rgba(38, 38, 38, .9); + --surface: #272727; + --surface-soft: rgba(255, 255, 255, .075); + --surface-hover: rgba(255, 255, 255, .05); + --line: rgba(255, 255, 255, .09); + --line-strong: rgba(255, 255, 255, .17); + --text: #f3f3f1; + --muted: #aaa9a4; + --faint: #777873; + --accent: #82aef8; + --accent-soft: rgba(130, 174, 248, .18); + --success: #75c98f; + --danger: #ff8585; + --danger-soft: #3b2422; + --add: #1a3424; + --delete: #3a2221; + --shadow: rgba(0, 0, 0, .38); + font-family: var(--ui-font); + font-size: 13px; +} + +* { box-sizing: border-box; } + +html, +body { height: 100%; } + +body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + background: transparent; + color: var(--text); + font-weight: 400; + margin: 0; + overflow: hidden; + text-rendering: optimizeLegibility; +} + +.sidebar-titlebar { + -webkit-app-region: drag; + height: 40px; + left: 0; + position: absolute; + right: 0; + top: 0; + user-select: none; + z-index: 7; +} + +button, +textarea { font: inherit; } + +button { color: inherit; } + +svg { + fill: none; + height: 16px; + stroke: currentColor; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 1.7; + width: 16px; +} + +.sr-only { + clip: rect(0, 0, 0, 0); + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; +} + +.app-shell { + display: grid; + grid-template-columns: var(--sidebar-width) minmax(0, 1fr); + height: 100vh; + position: relative; +} + +.sidebar { + background: var(--sidebar); + -webkit-backdrop-filter: blur(88px) saturate(2.05) brightness(.86); + backdrop-filter: blur(88px) saturate(2.05) brightness(.86); + border-right: 1px solid var(--line); + box-shadow: inset -1px 0 rgba(255, 255, 255, .025), 8px 0 28px rgba(0, 0, 0, .1); + display: flex; + flex-direction: column; + min-height: 0; + min-width: 0; + padding: 40px 8px 10px; + position: relative; +} + +.sidebar-resizer { + bottom: 0; + cursor: col-resize; + left: calc(var(--sidebar-width) - 3px); + outline: none; + position: absolute; + top: 0; + width: 7px; + z-index: 6; +} + +.sidebar-resizer::after { + background: transparent; + bottom: 0; + content: ""; + left: 3px; + position: absolute; + top: 0; + transition: background-color 120ms ease; + width: 1px; +} + +.sidebar-resizer:hover::after, +.sidebar-resizer:focus-visible::after, +body.is-resizing-sidebar .sidebar-resizer::after { background: var(--accent); } + +body.is-resizing-sidebar { + cursor: col-resize; + user-select: none; +} + +body.is-resizing-inspector, +body.is-resizing-inspector * { + cursor: col-resize !important; + user-select: none; +} + +.sidebar-brand { + font-size: 13px; + font-weight: 550; + letter-spacing: .03em; + padding: 2px 9px 10px; +} + +.new-task, +.task-item { + background: transparent; + border: 0; + border-radius: 6px; + cursor: pointer; + text-align: left; + width: 100%; +} + +.new-task { + align-items: center; + display: flex; + font-size: 12px; + gap: 0; + margin-bottom: 8px; + padding: 7px 9px; +} + +.new-task svg { margin-right: 8px; } + +.new-task:hover, +.task-item:hover { background: var(--surface-hover); } + +.task-list { + min-height: 0; + overflow-y: auto; + padding-bottom: 12px; +} + +.task-item { + align-items: center; + display: flex; + font-size: 12px; + gap: 0; + min-width: 0; + padding: 6px 9px; +} + +.task-item.is-selected { background: rgba(255, 255, 255, .095); } + +.task-item.is-child { + margin-left: 14px; + width: calc(100% - 14px); +} + +.sidebar-identity { + border-top: 1px solid var(--line); + color: var(--faint); + display: grid; + flex: 0 0 auto; + font-size: 10px; + gap: 2px; + padding: 9px; +} + +.sidebar-identity span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#sidebar-user::before { content: "as "; } + +.task-skeleton { + display: grid; + gap: 8px; + padding: 7px 9px 0; +} + +.shortcut-hint { + color: var(--faint); + flex: 0 0 auto; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 9px; + margin-left: 0; + max-width: 0; + opacity: 0; + overflow: hidden; + transform: translateX(4px); + transition: max-width 120ms ease, margin-left 120ms ease, opacity 100ms ease, transform 120ms ease; + white-space: nowrap; +} + +body.is-control-held .shortcut-hint { + margin-left: 5px; + max-width: 112px; + opacity: 1; + transform: translateX(0); +} + +.task-skeleton span { + animation: loading-sheen 1.6s ease-in-out infinite; + background-color: rgba(255, 255, 255, .075); + background-image: linear-gradient( + 100deg, + transparent 24%, + rgba(255, 255, 255, .105) 45%, + transparent 66% + ); + background-position: 130% 0; + background-repeat: no-repeat; + background-size: 220% 100%; + border-radius: 5px; + height: 11px; + will-change: background-position; + width: 78%; +} + +.task-skeleton span:nth-child(2) { animation-delay: 80ms; width: 91%; } +.task-skeleton span:nth-child(3) { animation-delay: 160ms; width: 67%; } +.task-skeleton span:nth-child(4) { animation-delay: 240ms; width: 84%; } +.task-skeleton span:nth-child(5) { animation-delay: 320ms; width: 72%; } + +.startup-loading { + align-items: center; + color: var(--muted); + display: flex; + gap: 9px; + justify-content: center; + min-height: 240px; +} + +.loading-spinner { + animation: loading-spin .95s linear infinite; + border: 1.5px solid rgba(255, 255, 255, .12); + border-radius: 50%; + border-right-color: rgba(255, 255, 255, .38); + border-top-color: #b8b8b4; + box-sizing: border-box; + height: 14px; + will-change: transform; + width: 14px; +} + +@keyframes loading-sheen { + 0% { background-position: 130% 0; } + 58%, 100% { background-position: -130% 0; } +} + +@keyframes loading-spin { + from { transform: rotate(0turn); } + to { transform: rotate(1turn); } +} + +.task-item-title { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.task-status { + border-radius: 50%; + flex: 0 0 auto; + height: 10px; + margin-left: 7px; + width: 10px; +} + +.task-status.is-running { + background: conic-gradient(from -35deg, rgba(194, 195, 190, .72) 0 74%, transparent 74% 100%); + -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)); + mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)); +} + +.main-pane { + background: var(--bg); + display: grid; + grid-template-rows: auto minmax(0, 1fr); + min-height: 0; + min-width: 0; + overflow: hidden; + position: relative; +} + +.task-header { + align-items: center; + border-bottom: 1px solid var(--line); + display: flex; + justify-content: space-between; + min-height: 54px; + padding: 0 12px 0 20px; +} + +.task-header-title { + flex: 1; + min-width: 0; + padding: 8px 16px 8px 0; +} + +.task-title-cluster { + align-items: center; + display: flex; + max-width: 100%; + width: max-content; +} + +.task-header-actions { + align-items: stretch; + align-self: stretch; + display: flex; + flex: 0 0 auto; +} + +.command-palette-button { + align-items: center; + background: transparent; + border: 0; + border-radius: 6px; + color: var(--muted); + cursor: pointer; + display: inline-flex; + height: 28px; + justify-content: center; + margin: auto 0 auto 4px; + position: relative; + width: 30px; + z-index: 5; +} + +.command-palette-button:hover, +.command-palette-button[aria-expanded="true"] { + background: var(--surface-hover); + color: var(--text); +} + +.task-header h1 { + flex: 0 1 auto; + font-size: 14px; + font-weight: 500; + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.task-meta { + align-items: center; + color: var(--muted); + display: inline-flex; + flex: 0 0 auto; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 10px; + gap: 5px; + margin-left: 0; + max-width: 0; + opacity: 0; + overflow: hidden; + transform: translateX(-3px); + transition: margin-left 120ms ease, max-width 120ms ease, opacity 100ms ease, transform 120ms ease, visibility 0s linear 120ms; + visibility: hidden; + white-space: nowrap; +} + +.task-title-cluster:hover .task-meta:not(:empty) { + margin-left: 9px; + max-width: 120px; + opacity: 1; + transform: translateX(0); + transition-delay: 0s; + visibility: visible; +} + +.task-meta svg { + height: 12px; + stroke-width: 1.65; + width: 12px; +} + +.task-meta code { + color: inherit; + font: inherit; +} + +.tabs { + align-items: stretch; + display: flex; + gap: 3px; + min-height: 0; + padding: 0; +} + +.tab { + align-items: center; + background: transparent; + border: 0; + border-bottom: 2px solid transparent; + color: var(--muted); + cursor: pointer; + display: inline-flex; + font-size: 11px; + padding: 0 7px; +} + +.tab[hidden] { display: none; } + +.tab:not(button) { cursor: default; } + +.tab:hover { color: var(--text); } + +.tab.is-open { + border-bottom-color: var(--line-strong); + color: var(--text); +} + +.tab .change-stats { + align-items: center; + display: inline-flex; + gap: 3px; + margin-left: 5px; +} + +.tab .change-stat.is-add { color: var(--success); } +.tab .change-stat.is-delete { color: var(--danger); } + +.view { + min-height: 0; + min-width: 0; +} + +.view[hidden] { display: none !important; } + +.task-workspace { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + min-height: 0; + min-width: 0; + overflow: hidden; +} + +.chat-view { + display: grid; + grid-template-rows: minmax(0, 1fr) auto; + height: 100%; + min-width: 0; + overflow: hidden; +} + +.transcript-scroll { + min-height: 0; + min-width: 0; + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior: contain; +} + +.transcript { + margin: 0 auto; + max-width: calc(var(--chat-content-width) + 48px); + min-width: 0; + overflow-x: clip; + padding: 26px 24px 32px; + width: 100%; +} + +.empty-chat { + color: var(--muted); + display: grid; + min-height: 240px; + place-items: center; + text-align: center; +} + +.message { + margin-bottom: 10px; + min-width: 0; + overflow: hidden; + width: 100%; +} + +.message-human, +.message-peer { + display: grid; + justify-items: end; +} + +.message-author { + color: var(--faint); + font-size: 10px; + margin: 0 3px 4px; +} + +.message-bubble { + background: var(--surface-soft); + border-radius: 12px; + line-height: 1.5; + max-width: min(76%, 100%); + min-width: 0; + overflow-wrap: anywhere; + padding: 9px 12px; + white-space: normal; + word-break: break-word; +} + +.message-agent { + min-width: 0; + padding-right: 4%; +} + +.message-actions { + align-items: center; + color: #91928d; + display: flex; + font-size: 10px; + gap: 10px; + height: 24px; + margin-top: 2px; + opacity: 0; + pointer-events: none; + transition: opacity 100ms ease; +} + +.message:hover .message-actions, +.message:focus-within .message-actions { + opacity: 1; + pointer-events: auto; +} + +.message-human .message-actions, +.message-peer .message-actions { + justify-content: flex-end; + max-width: min(76%, 100%); + width: 100%; +} + +.inline-activity { + color: var(--muted); + margin: 2px 0 14px; + min-width: 0; + padding-right: 4%; +} + +.inline-activity-toggle { + align-items: center; + background: transparent; + border: 0; + border-radius: 6px; + color: inherit; + cursor: pointer; + display: flex; + font: inherit; + gap: 7px; + max-width: 100%; + min-height: 26px; + padding: 2px 5px 2px 1px; + text-align: left; + width: fit-content; +} + +.inline-activity-toggle:hover, +.inline-activity-toggle:focus-visible { + background: transparent; + color: var(--text); + outline: none; +} + +.inline-activity-toggle svg { + flex: 0 0 auto; + height: 14px; + width: 14px; +} + +.inline-activity-chevron { + opacity: .62; + transform: rotate(0deg); + transition: transform 120ms ease; +} + +.inline-activity-toggle[aria-expanded="true"] .inline-activity-chevron { + transform: rotate(90deg); +} + +.inline-activity-label { + flex: 0 1 auto; + min-width: 0; + overflow-wrap: anywhere; +} + +.inline-activity-spinner { + flex: 0 0 auto; + height: 12px; + width: 12px; +} + +.inline-activity-list { + margin: 3px 0 3px 21px; +} + +.inline-activity-list[hidden] { display: none; } + +.inline-activity-item { + align-items: center; + background: transparent; + border: 0; + color: inherit; + cursor: pointer; + display: grid; + font: inherit; + gap: 8px; + grid-template-columns: 16px minmax(0, 1fr); + min-height: 30px; + padding: 2px 5px; + text-align: left; + width: 100%; +} + +.inline-activity-item:hover, +.inline-activity-item:focus-visible, +.inline-activity-item.is-selected, +.inline-activity-toggle.is-result-selected { + color: var(--text); + outline: none; +} + +.inline-activity-item.is-running { + grid-template-columns: 16px 10px minmax(0, 1fr); +} + +.inline-activity-description { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.inline-activity-item.is-error { color: var(--danger); } + +.inline-activity-icon { + height: 15px; + opacity: .86; + width: 15px; +} + +.inline-activity-item-spinner { + height: 10px; + width: 10px; +} + +.message-action-button { + align-items: center; + background: transparent; + border: 0; + border-radius: 5px; + color: inherit; + cursor: pointer; + display: inline-flex; + height: 22px; + justify-content: center; + padding: 0; + width: 22px; +} + +.message-action-button:hover, +.message-action-button:focus-visible { + background: var(--surface-hover); + color: var(--text); + outline: none; +} + +.message-action-button svg, +.message-action-meta svg { + height: 13px; + stroke-width: 1.8; + width: 13px; +} + +.message-action-meta { + align-items: center; + display: inline-flex; + gap: 5px; + white-space: nowrap; +} + +.message .message-action-meta code { + background: transparent; + border: 0; + color: inherit; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: inherit; + font-weight: 400; + padding: 0; + white-space: nowrap; +} + +.message-text { + line-height: 1.65; + margin: 0; + overflow-wrap: anywhere; + white-space: normal; + word-break: break-word; +} + +.message :is(p, ul, ol, blockquote, pre, h1, h2, h3, h4, h5, h6) { + margin-block: 0 12px; +} + +.message :is(p, ul, ol, blockquote, pre, h1, h2, h3, h4, h5, h6):last-child { margin-bottom: 0; } + +.message :is(h1, h2, h3, h4, h5, h6) { + font-weight: 650; + line-height: 1.3; + margin-top: 18px; +} + +.message :is(h1, h2) { font-size: 1.18em; } +.message :is(h3, h4, h5, h6) { font-size: 1em; } + +.message ul, +.message ol { padding-left: 24px; } + +.message li { padding-left: 2px; } +.message li + li { margin-top: 5px; } +.message li > :is(ul, ol) { margin: 6px 0 2px; } + +.markdown-task-item { list-style: none; } +.markdown-task-item input { + accent-color: var(--accent); + margin: 0 7px 0 -21px; +} + +.message blockquote { + border-left: 2px solid var(--line-strong); + color: var(--muted); + padding-left: 12px; +} + +.message a { color: #9dbef8; text-decoration: none; } +.message a:hover { text-decoration: underline; } + +.message :not(pre) > code { + -webkit-box-decoration-break: clone; + background: rgba(255, 255, 255, .085); + border: 0; + border-radius: 6px; + box-decoration-break: clone; + color: #d8d8d5; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: .9em; + font-variant-ligatures: none; + font-weight: 400; + padding: 2px 6px; + -webkit-font-smoothing: antialiased; +} + +.markdown-code-block-wrap { + margin-bottom: 12px; + position: relative; +} + +.message .markdown-code-block-wrap:last-child { margin-bottom: 0; } + +.markdown-code-block { + background: #20201f; + border: 1px solid var(--line); + border-radius: 8px; + color: #e8e8e5; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 11px; + line-height: 1.55; + overflow: hidden; + margin: 0; + padding: 11px 43px 11px 12px; +} + +.markdown-code-copy { + align-items: center; + background: transparent; + border: 0; + border-radius: 6px; + color: var(--muted); + cursor: pointer; + display: inline-flex; + height: 26px; + justify-content: center; + opacity: .72; + padding: 0; + position: absolute; + right: 7px; + top: 7px; + width: 26px; +} + +.markdown-code-copy:hover, +.markdown-code-copy:focus-visible { + background: rgba(255, 255, 255, .055); + color: var(--text); + opacity: 1; + outline: none; +} + +.markdown-code-copy svg { + height: 14px; + stroke-width: 1.7; + width: 14px; +} + +.message hr { + border: 0; + border-top: 1px solid var(--line); + margin: 16px 0; +} + +.markdown-table-wrap { + max-width: 100%; + overflow-x: hidden; + padding: 5px 0 8px; +} + +.markdown-table { + border-collapse: collapse; + font-size: 12px; + line-height: 1.5; + max-width: 100%; + min-width: min(100%, 320px); + table-layout: fixed; + width: 100%; +} + +.markdown-table th, +.markdown-table td { + border: 1px solid var(--line-strong); + overflow-wrap: anywhere; + padding: 6px 8px; + vertical-align: top; + word-break: break-word; +} + +.markdown-table th { + background: rgba(255, 255, 255, .045); + font-weight: 600; +} + +.message img, +.message video { + height: auto; + max-width: 100%; +} + +.message pre, +.message code { + max-width: 100%; + overflow-wrap: anywhere; + white-space: pre-wrap; + word-break: break-word; +} + +.message pre code { + background: transparent; + border: 0; + font-family: inherit; + padding: 0; +} + +.message.is-failed .message-bubble, +.message.is-failed .message-text { color: var(--danger); } + +.composer-dock { + background: transparent; + flex: 0 0 auto; + padding: 8px 28px 18px; + position: relative; + z-index: 2; +} + +.turn-status { + color: var(--muted); + font-size: 11px; + height: 18px; + margin: 0 auto; + max-width: var(--chat-content-width); + overflow: hidden; + padding: 0 4px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.turn-status:empty { display: none; } + +.composer { + background: #292927; + border: 1px solid var(--line); + border-radius: 22px; + box-shadow: 0 9px 28px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .025); + margin: 0 auto; + max-width: var(--chat-content-width); + overflow: visible; +} + +.composer textarea { + background: transparent; + border: 0; + color: var(--text); + display: block; + line-height: 1.5; + max-height: 170px; + min-height: 58px; + outline: none; + overflow-y: auto; + padding: 16px 20px 6px; + resize: none; + width: 100%; +} + +.composer textarea::placeholder { color: var(--faint); } + +.composer-footer { + align-items: center; + color: var(--faint); + display: flex; + font-size: 10px; + justify-content: space-between; + padding: 2px 12px 10px; +} + +.model-control { position: relative; } + +.model-button { + align-items: center; + background: transparent; + border: 0; + border-radius: 8px; + color: var(--muted); + cursor: pointer; + display: inline-flex; + font-size: 12px; + gap: 6px; + min-height: 30px; + padding: 4px 7px; +} + +.model-button:hover, +.model-button:focus-visible, +.model-button[aria-expanded="true"] { + background: var(--surface-hover); + color: var(--text); + outline: none; +} + +.model-button .model-bolt { + fill: currentColor; + height: 14px; + stroke: none; + width: 14px; +} + +.model-button .model-chevron { + height: 13px; + opacity: .7; + width: 13px; +} + +.model-menu { + background: rgba(38, 38, 36, .99); + border: 1px solid var(--line-strong); + border-radius: 11px; + bottom: calc(100% + 7px); + box-shadow: 0 15px 45px rgba(0, 0, 0, .48); + left: 0; + min-width: 220px; + overflow: hidden; + padding: 5px; + position: absolute; + z-index: 12; +} + +.model-menu[hidden] { display: none; } + +.model-option { + align-items: center; + background: transparent; + border: 0; + border-radius: 7px; + cursor: pointer; + display: flex; + justify-content: space-between; + padding: 8px 9px; + text-align: left; + width: 100%; +} + +.model-option:hover, +.model-option:focus-visible, +.model-option[aria-selected="true"] { + background: var(--surface-soft); + outline: none; +} + +.model-option span { font-size: 12px; } +.model-option small { color: var(--faint); font-size: 10px; margin-left: 18px; } + +.slash-command-menu { + border-top: 1px solid var(--line); + max-height: 220px; + overflow-y: auto; + padding: 5px 7px; +} + +.slash-command-menu[hidden] { display: none; } + +.slash-command-item { + align-items: baseline; + background: transparent; + border: 0; + border-radius: 7px; + cursor: pointer; + display: grid; + gap: 10px; + grid-template-columns: minmax(150px, auto) 1fr; + padding: 7px 9px; + text-align: left; + width: 100%; +} + +.slash-command-item:hover, +.slash-command-item.is-selected { background: var(--surface-soft); } +.slash-command-item code { color: var(--text); font-size: 10px; } +.slash-command-item span { color: var(--muted); font-size: 11px; } + +.send-control { + align-items: center; + display: grid; + gap: 3px; + justify-items: center; +} + +.send-shortcut { + color: var(--faint); + font-size: 9px; + line-height: 1; + white-space: nowrap; +} + +.send-button { + align-items: center; + background: var(--text); + border: 0; + border-radius: 50%; + color: var(--bg); + cursor: pointer; + display: inline-flex; + height: 30px; + justify-content: center; + line-height: 0; + padding: 0; + width: 30px; +} + +.send-button svg { + display: block; + height: 16px; + stroke-width: 1.8; + width: 16px; +} + +.send-button:disabled { cursor: default; opacity: .38; } + +.shortcut-help { + inset: 0; + position: fixed; + z-index: 20; +} + +.shortcut-help[hidden] { display: none; } + +.shortcut-help-backdrop { + background: rgba(0, 0, 0, .45); + inset: 0; + position: absolute; +} + +.shortcut-help-panel { + background: rgba(38, 38, 36, .96); + border: 1px solid var(--line-strong); + border-radius: 14px; + box-shadow: 0 18px 60px rgba(0, 0, 0, .55); + left: 50%; + max-width: min(620px, calc(100vw - 40px)); + overflow: hidden; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + width: 100%; +} + +.shortcut-help-header { + align-items: baseline; + border-bottom: 1px solid var(--line); + display: flex; + justify-content: space-between; + padding: 16px 18px 14px; +} + +.shortcut-help-header h2 { + font-size: 14px; + font-weight: 600; + margin: 0; +} + +.shortcut-help-header span { + color: var(--faint); + font-size: 10px; +} + +.shortcut-help-grid { + display: grid; + gap: 26px; + grid-template-columns: repeat(2, minmax(0, 1fr)); + padding: 17px 18px 20px; +} + +.shortcut-group h3 { + color: var(--muted); + font-size: 11px; + font-weight: 500; + margin: 0 0 8px; + text-transform: uppercase; +} + +.shortcut-group dl { margin: 0; } + +.shortcut-group dl div { + align-items: baseline; + display: grid; + gap: 10px; + grid-template-columns: minmax(112px, auto) 1fr; + padding: 5px 0; +} + +.shortcut-group dt { + color: var(--text); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 10px; +} + +.shortcut-group dd { + color: var(--muted); + font-size: 11px; + margin: 0; +} + +.command-palette { + inset: 0; + position: fixed; + z-index: 30; +} + +.command-palette[hidden] { display: none; } + +.command-palette-backdrop { + background: rgba(0, 0, 0, .52); + inset: 0; + position: absolute; +} + +.command-palette-panel { + background: rgba(37, 37, 35, .98); + border: 1px solid var(--line-strong); + border-radius: 13px; + box-shadow: 0 22px 70px rgba(0, 0, 0, .62); + left: 50%; + max-width: min(560px, calc(100vw - 40px)); + overflow: hidden; + position: absolute; + top: min(18vh, 150px); + transform: translateX(-50%); + width: 100%; +} + +.command-palette-search { + align-items: center; + border-bottom: 1px solid var(--line); + display: flex; + gap: 9px; + padding: 10px 13px; +} + +.command-palette-search svg { color: var(--faint); flex: 0 0 auto; } + +.command-palette-search input { + background: transparent; + border: 0; + color: var(--text); + font: inherit; + font-size: 13px; + outline: none; + padding: 4px 0; + width: 100%; +} + +.command-palette-search input::placeholder { color: var(--faint); } +.command-palette-search input::-webkit-search-cancel-button { display: none; } + +.command-palette-results { + max-height: min(390px, 55vh); + overflow-y: auto; + padding: 6px; +} + +.command-palette-item { + align-items: center; + background: transparent; + border: 0; + border-radius: 7px; + cursor: pointer; + display: flex; + justify-content: space-between; + padding: 8px 10px; + text-align: left; + width: 100%; +} + +.command-palette-item.is-selected { background: var(--surface-soft); } +.command-palette-item-label { font-size: 12px; } +.command-palette-item-shortcut { + color: var(--faint); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 10px; + margin-left: 18px; +} + +.command-palette-empty { + color: var(--muted); + padding: 22px; + text-align: center; +} + +.command-palette-footer { + border-top: 1px solid var(--line); + color: var(--faint); + display: flex; + font-size: 10px; + justify-content: space-between; + padding: 8px 13px; +} + +.modal { + inset: 0; + position: fixed; + z-index: 35; +} + +.modal[hidden] { display: none; } + +.modal-backdrop { + background: rgba(0, 0, 0, .52); + inset: 0; + position: absolute; +} + +.modal-panel { + background: rgba(37, 37, 35, .99); + border: 1px solid var(--line-strong); + border-radius: 13px; + box-shadow: 0 22px 70px rgba(0, 0, 0, .62); + left: 50%; + max-height: min(560px, calc(100vh - 80px)); + max-width: min(560px, calc(100vw - 40px)); + overflow: hidden; + padding: 18px; + position: absolute; + top: min(18vh, 150px); + transform: translateX(-50%); + width: 100%; +} + +.modal-panel-small { max-width: min(440px, calc(100vw - 40px)); } +.modal-panel h2 { font-size: 14px; margin: 0; } +.modal-panel p { color: var(--muted); line-height: 1.5; margin: 7px 0 17px; } + +.modal-heading-row { + align-items: flex-start; + display: flex; + justify-content: space-between; +} + +.field-label { + color: var(--muted); + display: block; + font-size: 10px; + margin-bottom: 6px; + text-transform: uppercase; +} + +.field-input { + background: #20201f; + border: 1px solid var(--line-strong); + border-radius: 8px; + color: var(--text); + font: inherit; + outline: none; + padding: 9px 10px; + width: 100%; +} + +.field-input:focus { border-color: var(--accent); } + +.modal-actions { + display: flex; + gap: 8px; + justify-content: flex-end; + margin-top: 18px; +} + +.primary-button, +.secondary-button, +.icon-button { + border: 0; + border-radius: 7px; + cursor: pointer; +} + +.primary-button { background: var(--text); color: var(--bg); padding: 8px 13px; } +.secondary-button { background: var(--surface-soft); padding: 8px 13px; } +.primary-button:disabled { cursor: default; opacity: .4; } +.icon-button { background: transparent; color: var(--muted); padding: 5px; } +.icon-button:hover { background: var(--surface-hover); color: var(--text); } + +.archive-list { + max-height: min(410px, 55vh); + min-height: 120px; + overflow-y: auto; +} + +.archive-item { + align-items: center; + background: transparent; + border: 0; + border-radius: 7px; + cursor: pointer; + display: flex; + justify-content: space-between; + padding: 9px 10px; + text-align: left; + width: 100%; +} + +.archive-item:hover, +.archive-item:focus-visible { background: var(--surface-soft); outline: none; } +.archive-item code { color: var(--faint); font-size: 10px; margin-left: 18px; } + +.tool-set-source { + color: var(--faint); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 9px; + overflow-wrap: anywhere; + padding: 0 13px 7px; +} + +.tool-set-heading { + color: var(--muted); + font-size: 10px; + letter-spacing: .04em; + margin: 0; + padding: 13px 13px 2px; + text-transform: uppercase; +} + +.tool-set-heading:not(:first-child) { border-top: 1px solid var(--line); } +.tool-set-list { padding: 7px; } +.tool-set-item { border-radius: 7px; padding: 9px; } +.tool-set-item + .tool-set-item { border-top: 1px solid var(--line); } +.tool-set-item-heading { align-items: baseline; display: flex; justify-content: space-between; } +.tool-set-item code { color: var(--text); font-size: 11px; } +.tool-set-item small { + color: var(--faint); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 9px; + margin-left: 18px; + overflow-wrap: anywhere; +} +.tool-set-item p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 5px 0 0; } +.panel-empty.is-error { color: var(--danger); } + +.inspector { + background: #1b1b1a; + border-left: 1px solid var(--line); + display: flex; + flex-direction: column; + min-height: 0; + min-width: 0; + position: relative; + width: var(--inspector-width); +} + +.task-workspace.is-changes-view { grid-template-columns: minmax(0, 1fr); } +.task-workspace.is-changes-view .chat-view { display: none; } +.task-workspace.is-changes-view .inspector { + border-left: 0; + width: 100%; +} +.task-workspace.is-changes-view .inspector-resizer { display: none; } + +.inspector[hidden], +.inspector-pane[hidden] { display: none !important; } + +.inspector-resizer { + bottom: 0; + cursor: col-resize; + left: -4px; + outline: none; + position: absolute; + top: 0; + width: 7px; + z-index: 8; +} + +.inspector-resizer::after { + background: transparent; + bottom: 0; + content: ""; + left: 3px; + position: absolute; + top: 0; + transition: background-color 120ms ease; + width: 1px; +} + +.inspector-resizer:hover::after, +.inspector-resizer:focus-visible::after, +body.is-resizing-inspector .inspector-resizer::after { background: var(--accent); } + +.inspector-pane { + display: grid; + flex: 1; + grid-template-rows: auto minmax(0, 1fr); + min-height: 0; + min-width: 0; + overflow: hidden; +} + +.inspector-pane-header { + align-items: center; + border-bottom: 1px solid var(--line); + display: flex; + justify-content: space-between; + min-height: 38px; + padding: 0 10px 0 13px; +} + +.inspector-pane-header h2 { + flex: 1; + font-size: 12px; + font-weight: 500; + margin: 0; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.inspector-pane-title-group { + align-items: center; + display: flex; + gap: 10px; + min-width: 0; +} + +.inspector-pane-title-group .change-stats, +.diff-file-details .change-stats, +.file-button-meta .change-stats { + align-items: center; + display: inline-flex; + flex: 0 0 auto; + gap: 5px; +} + +.change-stat.is-add { color: var(--success); } +.change-stat.is-delete { color: var(--danger); } + +.inspector-pane-header button { + align-items: center; + background: transparent; + border: 0; + border-radius: 5px; + color: var(--muted); + cursor: pointer; + display: inline-flex; + flex: 0 0 auto; + height: 26px; + justify-content: center; + padding: 0; + width: 26px; +} + +.inspector-pane-header button:hover, +.inspector-pane-header button:focus-visible { + background: var(--surface-hover); + color: var(--text); + outline: none; +} + +.inspector-pane-header svg { height: 13px; width: 13px; } + +.inspector.has-stacked-panes .inspector-pane + .inspector-pane { + border-top: 1px solid var(--line); +} + +.action-result { + min-height: 0; + min-width: 0; + overflow: auto; + padding: 14px; +} + +.action-result-output { + color: #d8d8d5; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 11px; + line-height: 1.55; + margin: 0; + overflow-wrap: anywhere; + white-space: pre-wrap; + word-break: break-word; +} + +.action-result-output.is-error { color: var(--danger); } + +.action-result-output code { + font: inherit; + white-space: inherit; +} + +.changes-view { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(210px, 27%); + height: 100%; + min-height: 0; + min-width: 0; +} + +.inspector-pane.is-empty .changes-view { grid-template-columns: minmax(0, 1fr); } +.inspector-pane.is-empty .changed-files { display: none; } + +.diff-column { + background: #171716; + display: grid; + grid-template-rows: auto minmax(0, 1fr); + min-height: 0; + min-width: 0; +} + +.diff-file-header { + align-items: center; + background: #20201f; + border-bottom: 1px solid var(--line); + display: flex; + justify-content: space-between; + min-height: 48px; + padding: 0 14px; +} + +.diff-file-header[hidden] { display: none; } + +.diff-file-identity, +.diff-file-details, +.file-button-identity, +.file-button-meta { + align-items: center; + display: flex; + min-width: 0; +} + +.diff-file-identity { gap: 10px; } +.diff-file-details { flex: 0 0 auto; gap: 12px; margin-left: 18px; } +.diff-file-path { + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 12px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.file-status-label { + color: var(--faint); + font-size: 9px; + letter-spacing: .05em; + text-transform: uppercase; +} + +.file-status-label.is-added { color: var(--success); } +.file-status-label.is-deleted { color: var(--danger); } +.file-status-label.is-renamed { color: var(--accent); } + +.changed-files { + background: #191918; + border-left: 1px solid var(--line); + display: grid; + grid-template-rows: auto minmax(0, 1fr); + min-height: 0; + min-width: 0; +} + +.file-filter-control { + align-items: center; + background: #20201f; + border: 1px solid var(--line-strong); + border-radius: 9px; + display: flex; + margin: 10px; + padding: 0 10px; +} + +.file-filter-control:focus-within { border-color: rgba(255, 255, 255, .3); } +.file-filter-control svg { color: var(--muted); flex: 0 0 auto; height: 14px; width: 14px; } +.file-filter-control input { + background: transparent; + border: 0; + color: var(--text); + font: inherit; + min-width: 0; + outline: none; + padding: 8px; + width: 100%; +} +.file-filter-control input::placeholder { color: var(--faint); } + +.file-list { + min-height: 0; + overflow-y: auto; + padding: 0 8px 12px; +} + +.file-group + .file-group { margin-top: 8px; } + +.file-group-heading { + align-items: center; + color: var(--muted); + display: flex; + font-size: 11px; + gap: 6px; + overflow: hidden; + padding: 6px 8px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.file-group-heading svg { flex: 0 0 auto; height: 12px; width: 12px; } + +.file-list-empty { + color: var(--faint); + font-size: 11px; + padding: 20px 10px; + text-align: center; +} + +.file-button { + align-items: center; + background: transparent; + border: 0; + border-radius: 8px; + cursor: pointer; + display: flex; + font-size: 11px; + justify-content: space-between; + overflow: hidden; + padding: 8px 9px; + text-align: left; + width: 100%; +} + +.file-button:hover { background: var(--surface-hover); } +.file-button.is-active { background: var(--surface-soft); } +.file-button-identity { gap: 8px; overflow: hidden; } +.file-button-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.file-button-meta { gap: 8px; margin-left: 10px; } +.file-button-meta .change-stats { font-size: 9px; gap: 3px; } + +.file-badge { + align-items: center; + background: #45433a; + border-radius: 5px; + color: #e8cf64; + display: inline-flex; + flex: 0 0 auto; + font-family: var(--ui-font); + font-size: 8px; + font-weight: 650; + height: 19px; + justify-content: center; + letter-spacing: -.02em; + min-width: 20px; + padding: 0 3px; +} + +.file-badge[data-extension="css"], +.file-badge[data-extension="ts"], +.file-badge[data-extension="tsx"] { background: #263e55; color: #77b7ec; } +.file-badge[data-extension="html"] { background: #543226; color: #ed986d; } +.file-badge[data-extension="rs"] { background: #4b3027; color: #e49170; } +.file-badge[data-extension="md"] { background: #373a3c; color: #c4c9cc; } +.file-badge[data-extension="json"], +.file-badge[data-extension="toml"], +.file-badge[data-extension="nix"] { background: #3f3d2d; color: #d7c875; } + +.file-status { + background: #bd7443; + border-radius: 50%; + display: inline-block; + height: 6px; + width: 6px; +} +.file-status.is-added { background: var(--success); } +.file-status.is-deleted { background: var(--danger); } +.file-status.is-renamed { background: var(--accent); } + +.diff { + background: #171716; + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 12px; + line-height: 1.65; + margin: 0; + min-width: 0; + overflow: auto; + padding: 0 0 24px; +} + +.diff-row { + display: grid; + grid-template-columns: 48px 48px 20px minmax(max-content, 1fr); + min-height: 20px; + min-width: 100%; + width: max-content; +} + +.diff-row.is-add { background: rgba(37, 104, 58, .32); } +.diff-row.is-delete { background: rgba(133, 48, 39, .31); } +.diff-row.is-notice { color: var(--faint); font-style: italic; } + +.diff-line-number { + color: #777773; + padding: 0 10px 0 4px; + text-align: right; + user-select: none; +} + +.diff-marker { color: var(--faint); text-align: center; user-select: none; } +.diff-row.is-add .diff-marker { color: #48d278; } +.diff-row.is-delete .diff-marker { color: #ff6b62; } + +.diff-code { + color: #c8c8c4; + display: block; + padding-right: 24px; + white-space: pre; +} + +.diff-collapse { + align-items: center; + background: #2a2a29; + border-bottom: 1px solid rgba(255, 255, 255, .025); + border-top: 1px solid rgba(255, 255, 255, .035); + color: #9a9a96; + display: grid; + font-family: var(--ui-font); + font-size: 11px; + gap: 12px; + grid-template-columns: 96px auto; + min-height: 35px; + min-width: 100%; + width: max-content; +} + +.diff-collapse svg { height: 15px; justify-self: center; width: 15px; } + +.panel-empty { + color: var(--muted); + display: grid; + font-family: var(--ui-font); + font-size: 12px; + height: 100%; + line-height: 1.5; + min-height: 180px; + padding: 20px; + place-items: center; + text-align: center; +} + +.fatal-error { + background: var(--bg); + inset: 0; + padding: 64px; + position: absolute; + z-index: 10; +} + +.fatal-error h2 { font-size: 18px; } +.fatal-error p { color: var(--muted); line-height: 1.6; max-width: 680px; } +.fatal-error code { color: var(--text); } + +@media (max-width: 820px) { + .message-bubble { max-width: 84%; } + .changes-view { grid-template-columns: minmax(0, 1fr) 190px; } + .file-button-meta .change-stats { display: none; } + .shortcut-help-grid { grid-template-columns: 1fr; } +} + +@media (prefers-reduced-motion: reduce) { + .task-skeleton span { + animation: none; + background-image: none; + } +} diff --git a/desktop/ui/app.js b/desktop/ui/app.js new file mode 100644 index 00000000..b8a0eb30 --- /dev/null +++ b/desktop/ui/app.js @@ -0,0 +1,2325 @@ +import { + activityGroupComplete, + activityGroupExpandable, + activityGroupSummary, + mergeReplayedHistory, + sameToolCall, + scrollPositionIsNearBottom, + toolDescription +} from './activity.js'; +import { copyText } from './clipboard.js'; +import { + modelChoices, + modelLabel, + parseComposerCommand, + slashCommandMatches +} from './commands.js'; +import { + filePatchesFromPatch, + highlightedHunkLines, + lineCounts, + unchangedLinesBefore +} from './changes.js'; +import { appendTokens, initializeHighlighting } from './highlight.js'; +import { renderMarkdown } from './markdown.js'; + +const tauri = window.__TAURI__?.core; +const DEFAULT_SIDEBAR_WIDTH = 226; +const MIN_SIDEBAR_WIDTH = 180; +const MAX_SIDEBAR_WIDTH = 420; +const SIDEBAR_WIDTH_KEY = 'caos.sidebarWidth'; +const DEFAULT_INSPECTOR_WIDTH = 420; +const MIN_INSPECTOR_WIDTH = 280; +const MAX_INSPECTOR_WIDTH = 720; +const INSPECTOR_WIDTH_KEY = 'caos.inspectorWidth'; +const UI_ZOOM_KEY = 'caos.uiZoom'; +const MIN_UI_ZOOM = 0.8; +const MAX_UI_ZOOM = 1.6; +const UI_ZOOM_STEP = 0.1; +const PALETTE_COMMANDS = [ + { id: 'new', label: 'New conversation', shortcut: 'Ctrl+N', keywords: 'create start task', run: () => createConversation() }, + { id: 'chat', label: 'Focus conversation', shortcut: '', keywords: 'chat transcript close inspectors', run: () => closeInspectorPanes() }, + { id: 'checkout', label: 'Check out conversation', shortcut: 'Ctrl+L', keywords: 'load workspace git', run: () => checkoutSelectedConversation() }, + { id: 'publish', label: 'Publish pull request', shortcut: 'Ctrl+P twice', keywords: 'push pr github branch', run: () => openPublishDialog() }, + { id: 'changes', label: 'Toggle workspace changes', shortcut: 'Ctrl+Q', keywords: 'diff files pane', available: () => !elements.changesToggle.hidden, run: () => toggleChangesPane() }, + { id: 'tools', label: 'Show available tools', shortcut: 'Ctrl+Shift+T', keywords: 'commands agent project', run: () => toggleToolsPane() }, + { id: 'reload', label: 'Reload conversation', shortcut: 'Ctrl+R', keywords: 'refresh history', run: () => reloadSelectedConversation() }, + { id: 'invite', label: 'Invite a user', shortcut: '/invite', keywords: 'share multiplayer', run: () => prefillCommand('/invite ') }, + { id: 'reference', label: 'Copy conversation reference', shortcut: '/ref', keywords: 'hash merge target ref', run: () => copySelectedReference() }, + { id: 'rename', label: 'Rename conversation', shortcut: '/rename', keywords: 'title name', run: () => prefillCommand('/rename ') }, + { id: 'archive', label: 'Archive conversation', shortcut: 'Ctrl+E', keywords: 'close remove', run: () => archiveSelectedConversation() }, + { id: 'restore', label: 'Restore archived conversation', shortcut: '', keywords: 'unarchive reopen', run: () => openArchiveDialog() }, + { id: 'help', label: 'Show keyboard shortcuts', shortcut: 'Ctrl+H', keywords: 'help commands', run: () => setShortcutHelp(true) } +]; + +const state = { + repo: null, + user: '', + conversations: [], + selectedId: null, + histories: new Map(), + diffs: new Map(), + selectedDiffFiles: new Map(), + diffFileQueries: new Map(), + pendingActivityGroups: new Map(), + running: new Set(), + interrupting: new Set(), + composerDrafts: new Map(), + conversationModels: new Map(), + changesOpen: false, + selectedAction: null, + shortcutHelpOpen: false, + commandPaletteOpen: false, + commandPaletteSelection: 0, + modelChoices: modelChoices(null), + defaultModel: '', + initialModel: '', + modelMenuOpen: false, + slashCommandSelection: 0, + slashCommandDismissed: false, + publishDialogOpen: false, + archiveDialogOpen: false, + uiZoom: 1, + sidebarWidth: DEFAULT_SIDEBAR_WIDTH, + inspectorWidth: DEFAULT_INSPECTOR_WIDTH, + creatingConversation: false, + polling: false +}; + +const elements = { + taskList: document.getElementById('task-list'), + taskWorkspace: document.getElementById('task-workspace'), + sidebarResizer: document.getElementById('sidebar-resizer'), + inspector: document.getElementById('inspector'), + inspectorResizer: document.getElementById('inspector-resizer'), + changesPane: document.getElementById('changes-pane'), + changesSummary: document.getElementById('changes-summary'), + actionPane: document.getElementById('action-pane'), + actionPaneTitle: document.getElementById('action-pane-title'), + actionResult: document.getElementById('action-result'), + newTask: document.getElementById('new-task'), + sidebarRepo: document.getElementById('sidebar-repo'), + sidebarUser: document.getElementById('sidebar-user'), + taskTitle: document.getElementById('task-title'), + taskMeta: document.getElementById('task-meta'), + commandPaletteButton: document.getElementById('command-palette-button'), + changesToggle: document.getElementById('changes-toggle'), + changeCount: document.getElementById('change-count'), + transcript: document.getElementById('transcript'), + transcriptScroll: document.getElementById('transcript-scroll'), + composer: document.getElementById('composer'), + prompt: document.getElementById('prompt'), + slashCommandMenu: document.getElementById('slash-command-menu'), + modelButton: document.getElementById('model-button'), + modelLabel: document.getElementById('model-label'), + modelMenu: document.getElementById('model-menu'), + sendButton: document.getElementById('send-button'), + turnStatus: document.getElementById('turn-status'), + fileList: document.getElementById('file-list'), + fileFilter: document.getElementById('file-filter'), + diffFileHeader: document.getElementById('diff-file-header'), + diff: document.getElementById('diff'), + shortcutHelp: document.getElementById('shortcut-help'), + commandPalette: document.getElementById('command-palette'), + commandPaletteQuery: document.getElementById('command-palette-query'), + commandPaletteResults: document.getElementById('command-palette-results'), + publishDialog: document.getElementById('publish-dialog'), + publishBase: document.getElementById('publish-base'), + publishConfirm: document.getElementById('publish-confirm'), + archiveDialog: document.getElementById('archive-dialog'), + archiveList: document.getElementById('archive-list'), + fatalError: document.getElementById('fatal-error'), + fatalMessage: document.getElementById('fatal-message') +}; + +function selectedConversation() { + return state.conversations.find((item) => item.id === state.selectedId) || null; +} + +function requestIsActiveConversation(id) { + const status = state.conversations.find((item) => item.id === id)?.status; + return status === 'queued' || status === 'running'; +} + +function automaticConversationTitle(message) { + const title = message.trim().split(/\s+/u).join(' '); + const characters = [...title]; + return characters.length <= 60 ? title : `${characters.slice(0, 59).join('')}…`; +} + +function showFatal(error) { + clearStartupLoading(); + elements.taskTitle.textContent = 'Repository unavailable'; + elements.taskMeta.textContent = ''; + elements.taskList.replaceChildren(); + elements.transcript.replaceChildren(); + elements.fatalMessage.textContent = String(error); + elements.fatalError.hidden = false; +} + +function clearStartupLoading() { + elements.taskList.setAttribute('aria-busy', 'false'); +} + +function sidebarWidthBounds() { + const inspectorWidth = state.changesOpen || state.selectedAction ? state.inspectorWidth : 0; + return { + min: MIN_SIDEBAR_WIDTH, + max: Math.max(MIN_SIDEBAR_WIDTH, Math.min(MAX_SIDEBAR_WIDTH, window.innerWidth - inspectorWidth - 380)) + }; +} + +function setSidebarWidth(width, persist = false) { + const bounds = sidebarWidthBounds(); + const next = Math.round(Math.min(bounds.max, Math.max(bounds.min, width))); + state.sidebarWidth = next; + document.documentElement.style.setProperty('--sidebar-width', `${next}px`); + elements.sidebarResizer.setAttribute('aria-valuenow', String(next)); + elements.sidebarResizer.setAttribute('aria-valuemax', String(bounds.max)); + if (persist) { + try { + window.localStorage.setItem(SIDEBAR_WIDTH_KEY, String(next)); + } catch (_) { + // A persisted width is a convenience; resizing still works without storage. + } + } +} + +function restoreSidebarWidth() { + let stored = DEFAULT_SIDEBAR_WIDTH; + try { + stored = Number(window.localStorage.getItem(SIDEBAR_WIDTH_KEY)) || stored; + } catch (_) { + // Use the default when storage is unavailable. + } + setSidebarWidth(stored); +} + +function inspectorWidthBounds() { + return { + min: MIN_INSPECTOR_WIDTH, + max: Math.max( + MIN_INSPECTOR_WIDTH, + Math.min(MAX_INSPECTOR_WIDTH, window.innerWidth - state.sidebarWidth - 380) + ) + }; +} + +function setInspectorWidth(width, persist = false) { + const bounds = inspectorWidthBounds(); + const next = Math.round(Math.min(bounds.max, Math.max(bounds.min, width))); + state.inspectorWidth = next; + document.documentElement.style.setProperty('--inspector-width', `${next}px`); + elements.inspectorResizer.setAttribute('aria-valuenow', String(next)); + elements.inspectorResizer.setAttribute('aria-valuemax', String(bounds.max)); + if (persist) { + try { + window.localStorage.setItem(INSPECTOR_WIDTH_KEY, String(next)); + } catch (_) { + // Resizing remains available when storage is unavailable. + } + } +} + +function restoreInspectorWidth() { + let stored = DEFAULT_INSPECTOR_WIDTH; + try { + stored = Number(window.localStorage.getItem(INSPECTOR_WIDTH_KEY)) || stored; + } catch (_) { + // Use the default when storage is unavailable. + } + setInspectorWidth(stored); +} + +function normalizedUiZoom(scale) { + const clamped = Math.min(MAX_UI_ZOOM, Math.max(MIN_UI_ZOOM, scale)); + return Math.round(clamped * 10) / 10; +} + +function applyUiZoom(scale, persist = false) { + const next = normalizedUiZoom(scale); + state.uiZoom = next; + const applyCssFallback = () => { + document.documentElement.style.zoom = String(next); + }; + if (tauri) { + tauri.invoke('set_ui_zoom', { scale: next }) + .then(() => document.documentElement.style.removeProperty('zoom')) + .catch(applyCssFallback); + } else { + applyCssFallback(); + } + if (persist) { + try { + window.localStorage.setItem(UI_ZOOM_KEY, String(next)); + } catch (_) { + // Zoom still applies for the current session when storage is unavailable. + } + } +} + +function restoreUiZoom() { + let stored = 1; + try { + stored = Number(window.localStorage.getItem(UI_ZOOM_KEY)) || stored; + } catch (_) { + // Use the default zoom when storage is unavailable. + } + applyUiZoom(stored); +} + +function setStatus(text = '') { + elements.turnStatus.textContent = text; +} + +function setShortcutHelp(open) { + if (open && state.commandPaletteOpen) setCommandPalette(false); + if (open) setModelMenu(false); + state.shortcutHelpOpen = open; + elements.shortcutHelp.hidden = !open; + if (!open) elements.prompt.focus(); +} + +function matchingPaletteCommands() { + const terms = elements.commandPaletteQuery.value.toLowerCase().trim().split(/\s+/).filter(Boolean); + return PALETTE_COMMANDS.filter((command) => { + if (command.available && !command.available()) return false; + const haystack = `${command.label} ${command.keywords}`.toLowerCase(); + return terms.every((term) => haystack.includes(term)); + }); +} + +function selectPaletteIndex(index) { + const buttons = [...elements.commandPaletteResults.querySelectorAll('.command-palette-item')]; + if (buttons.length === 0) { + state.commandPaletteSelection = 0; + return; + } + state.commandPaletteSelection = (index + buttons.length) % buttons.length; + buttons.forEach((button, buttonIndex) => { + const selected = buttonIndex === state.commandPaletteSelection; + button.classList.toggle('is-selected', selected); + button.setAttribute('aria-selected', String(selected)); + }); +} + +function executePaletteCommand(index = state.commandPaletteSelection) { + const command = matchingPaletteCommands()[index]; + if (!command) return; + setCommandPalette(false); + command.run(); +} + +function renderCommandPalette() { + const commands = matchingPaletteCommands(); + elements.commandPaletteResults.replaceChildren(); + if (commands.length === 0) { + const empty = document.createElement('div'); + empty.className = 'command-palette-empty'; + empty.textContent = 'No matching commands'; + elements.commandPaletteResults.append(empty); + state.commandPaletteSelection = 0; + return; + } + state.commandPaletteSelection = Math.min(state.commandPaletteSelection, commands.length - 1); + commands.forEach((command, index) => { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'command-palette-item'; + button.setAttribute('role', 'option'); + const label = document.createElement('span'); + label.className = 'command-palette-item-label'; + label.textContent = command.label; + const shortcut = document.createElement('span'); + shortcut.className = 'command-palette-item-shortcut'; + shortcut.textContent = command.shortcut; + button.append(label, shortcut); + button.addEventListener('mousemove', () => selectPaletteIndex(index)); + button.addEventListener('click', () => executePaletteCommand(index)); + elements.commandPaletteResults.append(button); + }); + selectPaletteIndex(state.commandPaletteSelection); +} + +function setCommandPalette(open) { + if (open) setModelMenu(false); + if (open && state.shortcutHelpOpen) { + state.shortcutHelpOpen = false; + elements.shortcutHelp.hidden = true; + } + state.commandPaletteOpen = open; + elements.commandPalette.hidden = !open; + elements.commandPaletteButton.setAttribute('aria-expanded', String(open)); + if (open) { + elements.commandPaletteQuery.value = ''; + state.commandPaletteSelection = 0; + renderCommandPalette(); + requestAnimationFrame(() => elements.commandPaletteQuery.focus()); + } else { + elements.prompt.focus(); + } +} + +function resizePrompt() { + elements.prompt.style.height = 'auto'; + elements.prompt.style.height = `${Math.min(elements.prompt.scrollHeight, 170)}px`; +} + +function transcriptIsNearBottom() { + return scrollPositionIsNearBottom(elements.transcriptScroll); +} + +function scrollTranscriptToBottom() { + requestAnimationFrame(() => { + elements.transcriptScroll.scrollTop = elements.transcriptScroll.scrollHeight; + }); +} + +function saveSelectedDraft() { + if (state.selectedId) state.composerDrafts.set(state.selectedId, elements.prompt.value); +} + +function restoreSelectedDraft() { + elements.prompt.value = state.composerDrafts.get(state.selectedId) || ''; + resizePrompt(); + state.slashCommandDismissed = false; + renderSlashCommandMenu(); +} + +function clearComposer() { + state.composerDrafts.set(state.selectedId, ''); + elements.prompt.value = ''; + resizePrompt(); + state.slashCommandDismissed = false; + renderSlashCommandMenu(); +} + +function prefillCommand(command) { + state.composerDrafts.set(state.selectedId, command); + elements.prompt.value = command; + resizePrompt(); + state.slashCommandDismissed = false; + renderSlashCommandMenu(); + elements.prompt.focus({ preventScroll: true }); + elements.prompt.setSelectionRange(command.length, command.length); +} + +function selectedModel() { + if (!state.selectedId) return state.initialModel; + return state.conversationModels.has(state.selectedId) + ? state.conversationModels.get(state.selectedId) + : state.initialModel; +} + +function renderModelControl() { + const selected = selectedModel(); + elements.modelLabel.textContent = modelLabel(selected, state.modelChoices); + elements.modelButton.title = selected || 'Use the CAOS default model'; + elements.modelMenu.replaceChildren(); + for (const model of state.modelChoices) { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'model-option'; + button.setAttribute('role', 'option'); + button.setAttribute('aria-selected', String(model.value === selected)); + const label = document.createElement('span'); + label.textContent = model.label; + const detail = document.createElement('small'); + detail.textContent = model.detail; + button.append(label, detail); + button.addEventListener('click', () => { + if (state.selectedId) state.conversationModels.set(state.selectedId, model.value); + setModelMenu(false); + renderModelControl(); + }); + elements.modelMenu.append(button); + } +} + +function setModelMenu(open) { + state.modelMenuOpen = open; + elements.modelMenu.hidden = !open; + elements.modelButton.setAttribute('aria-expanded', String(open)); + if (open) renderModelControl(); +} + +function renderSlashCommandMenu() { + const matches = state.slashCommandDismissed ? [] : slashCommandMatches(elements.prompt.value); + elements.slashCommandMenu.replaceChildren(); + elements.slashCommandMenu.hidden = matches.length === 0; + if (matches.length === 0) { + state.slashCommandSelection = 0; + return; + } + state.slashCommandSelection = Math.min(state.slashCommandSelection, matches.length - 1); + matches.forEach((command, index) => { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'slash-command-item'; + button.classList.toggle('is-selected', index === state.slashCommandSelection); + button.setAttribute('role', 'option'); + button.setAttribute('aria-selected', String(index === state.slashCommandSelection)); + const usage = document.createElement('code'); + usage.textContent = command.usage; + const description = document.createElement('span'); + description.textContent = command.description; + button.append(usage, description); + button.addEventListener('mousedown', (event) => event.preventDefault()); + button.addEventListener('click', () => completeSlashCommand(index)); + elements.slashCommandMenu.append(button); + }); +} + +function completeSlashCommand(index = state.slashCommandSelection) { + const command = slashCommandMatches(elements.prompt.value)[index]; + if (!command) return false; + const takesArgument = command.usage.includes('<'); + prefillCommand(`${command.name}${takesArgument ? ' ' : ''}`); + elements.slashCommandMenu.hidden = true; + return true; +} + +function renderSidebar() { + elements.taskList.setAttribute('aria-busy', 'false'); + elements.taskList.replaceChildren(); + const selectedIndex = state.conversations.findIndex((item) => item.id === state.selectedId); + const previousIndex = state.conversations.length > 1 + ? (selectedIndex - 1 + state.conversations.length) % state.conversations.length + : -1; + const nextIndex = state.conversations.length > 1 + ? (selectedIndex + 1) % state.conversations.length + : -1; + state.conversations.forEach((conversation, index) => { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'task-item'; + button.dataset.conversationId = conversation.id; + button.classList.toggle('is-child', Boolean(conversation.parent)); + if (conversation.parent) button.title = `Subagent of ${conversation.parent}`; + if (conversation.id === state.selectedId) button.classList.add('is-selected'); + const title = document.createElement('span'); + title.className = 'task-item-title'; + title.textContent = conversation.title; + button.append(title); + const shortcuts = []; + if (index < 9) shortcuts.push(`Ctrl+${index + 1}`); + if (index === nextIndex) shortcuts.push('Ctrl+↓'); + if (index === previousIndex) shortcuts.push('Ctrl+↑'); + if (shortcuts.length > 0) { + const shortcut = document.createElement('span'); + shortcut.className = 'shortcut-hint task-shortcut-hint'; + shortcut.setAttribute('aria-hidden', 'true'); + shortcut.textContent = shortcuts.join(' · '); + button.append(shortcut); + } + if (state.running.has(conversation.id)) { + const status = document.createElement('span'); + status.className = 'task-status is-running'; + status.setAttribute('role', 'status'); + status.setAttribute('aria-label', 'Running'); + status.title = 'Running'; + button.append(status); + } + button.addEventListener('click', async () => { + await selectConversation(conversation.id, false); + const selectedButton = [...elements.taskList.querySelectorAll('.task-item')] + .find((item) => item.dataset.conversationId === conversation.id); + selectedButton?.focus({ preventScroll: true }); + }); + elements.taskList.append(button); + }); +} + +function renderHeader() { + const conversation = selectedConversation(); + elements.taskMeta.replaceChildren(); + elements.taskMeta.removeAttribute('title'); + if (!conversation) { + elements.taskTitle.textContent = state.repo?.repoName || 'CAOS'; + elements.taskTitle.removeAttribute('title'); + return; + } + elements.taskTitle.textContent = conversation.title; + elements.taskTitle.title = conversation.title; + if (conversation.draft && !conversation.started) return; + if (!conversation.shortHead) return; + const commit = iconElement([ + ['path', { d: 'M3 12h5' }], + ['circle', { cx: '12', cy: '12', r: '4' }], + ['path', { d: 'M16 12h5' }] + ]); + const hash = document.createElement('code'); + hash.textContent = conversation.shortHead; + elements.taskMeta.title = conversation.head || conversation.shortHead; + elements.taskMeta.append(commit, hash); +} + +function iconElement(children) { + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('aria-hidden', 'true'); + svg.setAttribute('viewBox', '0 0 24 24'); + for (const [tag, attributes] of children) { + const child = document.createElementNS('http://www.w3.org/2000/svg', tag); + for (const [name, value] of Object.entries(attributes)) child.setAttribute(name, value); + svg.append(child); + } + return svg; +} + +async function copyMessage(message, button) { + try { + await copyText(message); + button.setAttribute('aria-label', 'Copied message'); + button.title = 'Copied'; + window.setTimeout(() => { + button.setAttribute('aria-label', 'Copy message'); + button.title = 'Copy message'; + }, 1200); + } catch (_) { + button.title = 'Could not copy message'; + } +} + +function messageActionsElement(entry) { + const actions = document.createElement('div'); + actions.className = 'message-actions'; + + if (Number.isFinite(entry.timestampUnix)) { + const date = new Date(entry.timestampUnix * 1000); + const time = document.createElement('time'); + time.className = 'message-action-meta'; + time.dateTime = date.toISOString(); + time.title = date.toLocaleString(); + time.textContent = date.toLocaleTimeString(undefined, { + hour: 'numeric', minute: '2-digit' + }); + actions.append(time); + } + + if (entry.shortCommit) { + const commit = document.createElement('span'); + commit.className = 'message-action-meta'; + commit.title = entry.commit || entry.shortCommit; + commit.append(iconElement([ + ['path', { d: 'M3 12h5' }], + ['circle', { cx: '12', cy: '12', r: '4' }], + ['path', { d: 'M16 12h5' }] + ])); + const hash = document.createElement('code'); + hash.textContent = entry.shortCommit; + commit.append(hash); + actions.append(commit); + } + + const copy = document.createElement('button'); + copy.type = 'button'; + copy.className = 'message-action-button'; + copy.setAttribute('aria-label', 'Copy message'); + copy.title = 'Copy message'; + copy.append(iconElement([ + ['rect', { x: '9', y: '9', width: '10', height: '10', rx: '2' }], + ['path', { d: 'M15 6V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h1' }] + ])); + copy.addEventListener('click', () => copyMessage(entry.message, copy)); + actions.append(copy); + + return actions; +} + +function activityIcon(name) { + if (name === 'bash') { + return iconElement([ + ['rect', { x: '3', y: '4', width: '18', height: '16', rx: '3' }], + ['path', { d: 'm7 9 3 3-3 3' }], + ['path', { d: 'M13 15h4' }] + ]); + } + if (name === 'grep') { + return iconElement([ + ['circle', { cx: '10.5', cy: '10.5', r: '5.5' }], + ['path', { d: 'm15 15 5 5' }] + ]); + } + if (name === 'read' || name === 'ls') { + return iconElement([ + ['path', { d: 'M4 5.5A2.5 2.5 0 0 1 6.5 3H18a2 2 0 0 1 2 2v14H6.5A2.5 2.5 0 0 1 4 16.5Z' }], + ['path', { d: 'M4 16.5A2.5 2.5 0 0 1 6.5 14H20' }] + ]); + } + return iconElement([ + ['path', { d: 'M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16Z' }], + ['path', { d: 'm13.5 6.5 4 4' }] + ]); +} + +function actionCallIsSelected(call) { + if (state.selectedAction?.conversationId !== state.selectedId) return false; + return state.selectedAction.call === call + || sameToolCall(call, state.selectedAction.call); +} + +function activityGroupElement(entry) { + const section = document.createElement('section'); + section.className = 'inline-activity'; + if (entry.running) section.classList.add('is-running'); + + const hasCalls = entry.calls.length > 0; + const expandable = activityGroupExpandable(entry); + const directCall = !expandable && entry.calls.length === 1 ? entry.calls[0] : null; + const toggle = document.createElement(expandable || directCall ? 'button' : 'div'); + toggle.className = 'inline-activity-toggle'; + let chevron = null; + if (expandable) { + toggle.type = 'button'; + toggle.setAttribute('aria-expanded', String(entry.expanded)); + chevron = iconElement([['path', { d: 'm9 18 6-6-6-6' }]]); + chevron.classList.add('inline-activity-chevron'); + } else if (directCall) { + toggle.type = 'button'; + toggle.setAttribute('aria-controls', 'action-pane'); + if (actionCallIsSelected(directCall)) toggle.classList.add('is-result-selected'); + } else { + toggle.setAttribute('role', 'status'); + } + const label = document.createElement('span'); + label.className = 'inline-activity-label'; + label.textContent = hasCalls + ? activityGroupSummary(entry.calls) + : entry.status || 'Working'; + toggle.append(label); + if (entry.running) { + const spinner = document.createElement('span'); + spinner.className = 'loading-spinner inline-activity-spinner'; + spinner.setAttribute('aria-hidden', 'true'); + toggle.append(spinner); + } + if (chevron) toggle.append(chevron); + + const list = document.createElement('div'); + list.className = 'inline-activity-list'; + list.setAttribute('role', 'list'); + list.hidden = !expandable || !entry.expanded; + for (const call of entry.calls) { + const item = document.createElement('div'); + item.setAttribute('role', 'listitem'); + const row = document.createElement('button'); + row.type = 'button'; + row.className = 'inline-activity-item'; + row.setAttribute('aria-controls', 'action-pane'); + if (actionCallIsSelected(call)) row.classList.add('is-selected'); + if (call.result?.isError) row.classList.add('is-error'); + const icon = activityIcon(call.name); + icon.classList.add('inline-activity-icon'); + const description = document.createElement('span'); + description.className = 'inline-activity-description'; + description.textContent = toolDescription(call); + row.append(icon); + if (!call.result && entry.running) { + row.classList.add('is-running'); + const spinner = document.createElement('span'); + spinner.className = 'loading-spinner inline-activity-item-spinner'; + spinner.setAttribute('aria-label', 'Running'); + row.append(spinner); + } + row.append(description); + row.addEventListener('click', () => openActionResult(call, row)); + item.append(row); + list.append(item); + } + + if (expandable) { + toggle.addEventListener('click', () => { + const keepBottomAnchored = !entry.expanded && transcriptIsNearBottom(); + entry.expanded = !entry.expanded; + toggle.setAttribute('aria-expanded', String(entry.expanded)); + list.hidden = !entry.expanded; + if (keepBottomAnchored) scrollTranscriptToBottom(); + }); + } else if (directCall) { + toggle.addEventListener('click', () => openActionResult(directCall, toggle)); + } + section.append(toggle, list); + return section; +} + +function messageElement(entry) { + if (entry.role === 'activity') return activityGroupElement(entry); + const article = document.createElement('article'); + article.className = `message message-${entry.role}`; + if (entry.failed) article.classList.add('is-failed'); + if (entry.role === 'human' || entry.role === 'peer') { + if (entry.role === 'peer') { + const author = document.createElement('div'); + author.className = 'message-author'; + author.textContent = entry.author || 'Collaborator'; + article.append(author); + } + const bubble = document.createElement('div'); + bubble.className = 'message-bubble'; + renderMarkdown(bubble, entry.message); + article.append(bubble, messageActionsElement(entry)); + return article; + } + if (entry.model) { + const model = document.createElement('div'); + model.className = 'message-author'; + model.textContent = modelLabel(entry.model, state.modelChoices); + article.append(model); + } + const text = document.createElement('div'); + text.className = 'message-text'; + renderMarkdown(text, entry.message); + article.append(text, messageActionsElement(entry)); + return article; +} + +function beginActivityGroup(id, status = 'Preparing…') { + const history = state.histories.get(id) || []; + const entry = { + role: 'activity', + calls: [], + expanded: true, + running: true, + status + }; + history.push(entry); + state.histories.set(id, history); + state.pendingActivityGroups.set(id, entry); + return entry; +} + +function finishActivityGroup(id) { + const entry = state.pendingActivityGroups.get(id); + if (!entry) return; + const history = state.histories.get(id) || []; + if (entry.calls.length === 0) { + const index = history.indexOf(entry); + if (index >= 0) history.splice(index, 1); + } else { + entry.running = false; + entry.expanded = false; + } + state.pendingActivityGroups.delete(id); +} + +function renderTranscriptLoading() { + elements.transcript.replaceChildren(); + const loading = document.createElement('div'); + loading.className = 'startup-loading'; + loading.setAttribute('role', 'status'); + const spinner = document.createElement('span'); + spinner.className = 'loading-spinner'; + spinner.setAttribute('aria-hidden', 'true'); + const label = document.createElement('span'); + label.textContent = 'Loading conversation…'; + loading.append(spinner, label); + elements.transcript.append(loading); +} + +function renderTranscript({ scrollToBottom = false } = {}) { + const history = state.histories.get(state.selectedId) || []; + elements.transcript.replaceChildren(); + if (history.length === 0) { + const empty = document.createElement('div'); + empty.className = 'empty-chat'; + empty.textContent = 'Start a task in this repository.'; + elements.transcript.append(empty); + } else { + for (const entry of history) elements.transcript.append(messageElement(entry)); + } + if (scrollToBottom) { + scrollTranscriptToBottom(); + } +} + +function updateInspectorLayout() { + const changesOpen = state.changesOpen; + const actionOpen = Boolean(state.selectedAction); + const inspectorOpen = changesOpen || actionOpen; + elements.inspector.hidden = !inspectorOpen; + elements.taskWorkspace.classList.toggle('is-changes-view', changesOpen); + elements.changesPane.hidden = !changesOpen; + elements.actionPane.hidden = !actionOpen; + elements.inspector.classList.toggle('has-stacked-panes', changesOpen && actionOpen); + elements.changesToggle.classList.toggle('is-open', changesOpen); + elements.changesToggle.setAttribute('aria-expanded', String(changesOpen)); + if (!inspectorOpen) { + setSidebarWidth(state.sidebarWidth); + return; + } + setInspectorWidth(state.inspectorWidth); + setSidebarWidth(state.sidebarWidth); + if (changesOpen) loadDiff(state.selectedId); + if (actionOpen) renderActionResult(); +} + +function renderActionResult() { + const selection = state.selectedAction; + if (!selection) return; + if (selection.kind === 'tools') { + elements.actionPaneTitle.textContent = 'Available tools'; + elements.actionPaneTitle.removeAttribute('title'); + elements.actionResult.replaceChildren(); + if (selection.loading) { + const loading = document.createElement('div'); + loading.className = 'panel-empty'; + loading.textContent = 'Loading project tools…'; + elements.actionResult.append(loading); + return; + } + if (selection.error) { + const error = document.createElement('div'); + error.className = 'panel-empty is-error'; + error.textContent = selection.error; + elements.actionResult.append(error); + return; + } + const builtinsHeading = document.createElement('h3'); + builtinsHeading.className = 'tool-set-heading'; + builtinsHeading.textContent = 'Always available'; + const builtins = document.createElement('div'); + builtins.className = 'tool-set-list'; + for (const [names, docs] of [ + ['read, ls, write, edit', 'Inline workspace operations'], + ['bash', 'Commands in the workspace sandbox'], + ['grep', 'Cached regular-expression search'] + ]) { + const item = document.createElement('article'); + item.className = 'tool-set-item'; + const name = document.createElement('code'); + name.textContent = names; + const description = document.createElement('p'); + description.textContent = docs; + item.append(name, description); + builtins.append(item); + } + const projectHeading = document.createElement('h3'); + projectHeading.className = 'tool-set-heading'; + projectHeading.textContent = 'Project tools'; + const source = document.createElement('div'); + source.className = 'tool-set-source'; + source.textContent = `Source: ${selection.tools.source}`; + elements.actionResult.append(builtinsHeading, builtins, projectHeading, source); + if (selection.tools.tools.length === 0) { + const empty = document.createElement('div'); + empty.className = 'panel-empty'; + empty.textContent = 'This conversation has no project-defined tools.'; + elements.actionResult.append(empty); + return; + } + const list = document.createElement('div'); + list.className = 'tool-set-list'; + for (const tool of selection.tools.tools) { + const item = document.createElement('article'); + item.className = 'tool-set-item'; + const heading = document.createElement('div'); + heading.className = 'tool-set-item-heading'; + const name = document.createElement('code'); + name.textContent = tool.name; + const image = document.createElement('small'); + image.textContent = /^[0-9a-f]{40,}$/iu.test(tool.image) + ? tool.image.slice(0, 7) + : tool.image; + const docs = document.createElement('p'); + docs.textContent = tool.docs || 'No description.'; + heading.append(name, image); + item.append(heading, docs); + list.append(item); + } + elements.actionResult.append(list); + return; + } + const { call } = selection; + const title = toolDescription(call); + elements.actionPaneTitle.textContent = title; + elements.actionPaneTitle.title = title; + elements.actionResult.replaceChildren(); + if (!call.result) { + const pending = document.createElement('div'); + pending.className = 'panel-empty'; + pending.textContent = 'Waiting for this action to finish…'; + elements.actionResult.append(pending); + return; + } + const output = document.createElement('pre'); + output.className = 'action-result-output'; + if (call.result.isError) output.classList.add('is-error'); + const code = document.createElement('code'); + code.textContent = String(call.result.content || '').trimEnd() || 'No output.'; + output.append(code); + elements.actionResult.append(output); +} + +function clearActionHighlights() { + for (const selected of elements.transcript.querySelectorAll( + '.inline-activity-item.is-selected, .inline-activity-toggle.is-result-selected' + )) { + selected.classList.remove('is-selected', 'is-result-selected'); + } +} + +function openActionResult(call, source) { + state.selectedAction = { conversationId: state.selectedId, call }; + clearActionHighlights(); + source.classList.add(source.classList.contains('inline-activity-item') + ? 'is-selected' + : 'is-result-selected'); + updateInspectorLayout(); +} + +function closeInspectorPane(pane) { + if (pane === 'action') { + state.selectedAction = null; + clearActionHighlights(); + } else if (pane === 'changes') { + state.changesOpen = false; + } + updateInspectorLayout(); +} + +function toggleChangesPane() { + if (elements.changesToggle.hidden) return; + const opening = !state.changesOpen; + state.changesOpen = opening; + if (opening) { + state.selectedAction = null; + clearActionHighlights(); + } + updateInspectorLayout(); +} + +function resetInspector() { + state.changesOpen = false; + state.selectedAction = null; + clearActionHighlights(); + updateInspectorLayout(); +} + +function closeInspectorPanes() { + resetInspector(); + elements.prompt.focus({ preventScroll: true }); +} + +async function selectConversation(id, focusPrompt = true) { + if (id === state.selectedId) { + if (focusPrompt) elements.prompt.focus({ preventScroll: true }); + return; + } + saveSelectedDraft(); + state.selectedId = id; + setModelMenu(false); + renderSidebar(); + renderHeader(); + renderModelControl(); + restoreSelectedDraft(); + setStatus(''); + resetInspector(); + elements.changesToggle.hidden = true; + renderChangeCount(null); + if (!state.histories.has(id)) { + renderTranscriptLoading(); + await loadConversation(id); + } + if (state.selectedId !== id) return; + renderTranscript({ scrollToBottom: true }); + loadDiff(id); + elements.sendButton.disabled = false; + if (focusPrompt) elements.prompt.focus({ preventScroll: true }); +} + +function applyConversationLoad(id, load) { + if (!load) return; + const conversation = state.conversations.find((item) => item.id === id); + if (conversation) { + conversation.head = load.head; + conversation.shortHead = load.shortHead; + conversation.status = load.status; + conversation.request = load.request; + conversation.interrupted = load.interrupted; + } + if (load.status === 'queued' || load.status === 'running') { + state.running.add(id); + } else { + state.running.delete(id); + state.interrupting.delete(id); + } + const durableHistory = mergeReplayedHistory(load.history.turns, load.history.turnEvents); + const durableCommits = new Set(load.history.turns.map((turn) => turn.commit)); + const pending = (state.histories.get(id) || []).filter( + (entry) => entry.pending && (!entry.commit || !durableCommits.has(entry.commit)) + ); + state.histories.set(id, [...durableHistory, ...pending]); + state.diffs.set(id, load.patch); + if (!state.conversationModels.has(id)) { + const lastModel = [...load.history.turns] + .reverse() + .find((turn) => turn.role === 'agent' && turn.model)?.model; + if (lastModel) state.conversationModels.set(id, lastModel); + } +} + +async function loadConversation(id) { + if (!id) return; + try { + const load = await tauri.invoke('get_conversation', { conversation: id }); + applyConversationLoad(id, load); + } catch (error) { + setStatus(String(error)); + } +} + +async function reloadSelectedConversation() { + const id = state.selectedId; + if (!id) return; + setStatus('Reloading…'); + await loadConversation(id); + if (state.selectedId !== id) return; + renderTranscript(); + loadDiff(id); + renderHeader(); + renderSidebar(); + if (state.selectedId === id) setStatus('Reloaded'); +} + +async function renameSelectedConversation(requestedTitle) { + const conversation = selectedConversation(); + if (!conversation || state.running.has(conversation.id)) return; + setStatus('Renaming…'); + try { + const title = await tauri.invoke('rename_conversation', { + conversation: conversation.id, + title: requestedTitle + }); + conversation.title = title; + renderSidebar(); + renderHeader(); + setStatus(`Renamed to “${title}”`); + } catch (error) { + setStatus(String(error)); + } finally { + elements.prompt.focus({ preventScroll: true }); + } +} + +async function inviteSelectedConversation(username) { + const conversation = selectedConversation(); + if (!conversation || conversation.draft) { + setStatus('Send a first message before inviting another user'); + return; + } + setStatus(`Inviting ${username}…`); + try { + const message = await tauri.invoke('invite_conversation', { + conversation: conversation.id, + username + }); + setStatus(message); + } catch (error) { + setStatus(String(error)); + } +} + +async function copySelectedReference() { + const conversation = selectedConversation(); + if (!conversation || conversation.draft) { + setStatus('This conversation has no durable reference yet'); + return; + } + try { + const reference = await tauri.invoke('get_conversation_reference', { + conversation: conversation.id + }); + if (!reference.head) { + setStatus('This conversation has no durable reference yet'); + return; + } + await copyText(`${reference.refname}\n${reference.head}`); + setStatus(`Copied ${reference.refname} at ${reference.head}`); + } catch (error) { + setStatus(String(error)); + } +} + +async function interruptSelectedConversation() { + const conversation = selectedConversation(); + if (!conversation || !state.running.has(conversation.id) + || state.interrupting.has(conversation.id)) return; + state.interrupting.add(conversation.id); + setStatus('Stopping agent…'); + try { + await tauri.invoke('interrupt_conversation', { conversation: conversation.id }); + await pollRemote(); + } catch (error) { + state.interrupting.delete(conversation.id); + setStatus(String(error)); + } +} + +async function checkoutSelectedConversation() { + const conversation = selectedConversation(); + if (!conversation) return; + if (state.running.has(conversation.id)) { + setStatus("Finish this conversation's operation before checking it out"); + return; + } + if (conversation.draft) { + setStatus('This conversation has no commit to check out'); + return; + } + setStatus('Checking out conversation…'); + try { + const head = await tauri.invoke('checkout_conversation', { conversation: conversation.id }); + setStatus(`Checked out ${head} in detached HEAD`); + } catch (error) { + setStatus(String(error)); + } finally { + elements.prompt.focus({ preventScroll: true }); + } +} + +function setPublishDialog(open) { + state.publishDialogOpen = open; + elements.publishDialog.hidden = !open; + if (!open) { + elements.publishConfirm.disabled = false; + elements.prompt.focus({ preventScroll: true }); + } +} + +async function openPublishDialog() { + const conversation = selectedConversation(); + if (!conversation) return; + if (state.running.has(conversation.id)) { + setStatus("Finish this conversation's operation before publishing it"); + return; + } + if (conversation.draft) { + setStatus('There are no conversation changes to publish'); + return; + } + setCommandPalette(false); + setPublishDialog(true); + elements.publishBase.value = ''; + elements.publishBase.placeholder = 'Loading default branch…'; + elements.publishConfirm.disabled = true; + try { + const branch = await tauri.invoke('default_publish_branch'); + if (!state.publishDialogOpen) return; + elements.publishBase.value = branch; + elements.publishBase.placeholder = branch; + elements.publishConfirm.disabled = false; + elements.publishBase.focus(); + elements.publishBase.select(); + } catch (error) { + setPublishDialog(false); + setStatus(String(error)); + } +} + +async function confirmPublish() { + const conversation = selectedConversation(); + if (!conversation || elements.publishConfirm.disabled) return; + elements.publishConfirm.disabled = true; + const base = elements.publishBase.value.trim(); + setStatus('Preparing publication in an ordinary merge turn…'); + state.running.add(conversation.id); + renderSidebar(); + const onEvent = new tauri.Channel(); + onEvent.onmessage = (event) => handleTurnEvent(conversation.id, event); + try { + const url = await tauri.invoke('publish_conversation', { + conversation: conversation.id, + base: base || null, + model: selectedModel(), + onEvent + }); + await loadConversation(conversation.id); + setPublishDialog(false); + setStatus(`Published ${url}`); + renderTranscript({ scrollToBottom: true }); + renderDiff(state.diffs.get(conversation.id) || ''); + } catch (error) { + setStatus(String(error)); + elements.publishConfirm.disabled = false; + elements.publishBase.focus(); + await loadConversation(conversation.id); + } finally { + if (!requestIsActiveConversation(conversation.id)) state.running.delete(conversation.id); + renderSidebar(); + } +} + +async function archiveSelectedConversation() { + const conversation = selectedConversation(); + if (!conversation) return; + if (state.running.has(conversation.id)) { + setStatus("Finish this conversation's operation before archiving it"); + return; + } + setCommandPalette(false); + setStatus('Archiving conversation…'); + try { + await tauri.invoke('archive_conversation', { conversation: conversation.id }); + const index = state.conversations.indexOf(conversation); + state.conversations.splice(index, 1); + state.histories.delete(conversation.id); + state.diffs.delete(conversation.id); + state.composerDrafts.delete(conversation.id); + state.conversationModels.delete(conversation.id); + state.selectedId = null; + if (state.conversations.length === 0) { + await createConversation(); + } else { + await selectConversation(state.conversations[Math.min(index, state.conversations.length - 1)].id); + } + renderSidebar(); + setStatus('Conversation archived'); + } catch (error) { + setStatus(String(error)); + } +} + +function setArchiveDialog(open) { + state.archiveDialogOpen = open; + elements.archiveDialog.hidden = !open; + if (!open) elements.prompt.focus({ preventScroll: true }); +} + +async function openArchiveDialog() { + setCommandPalette(false); + setArchiveDialog(true); + elements.archiveList.replaceChildren(); + const loading = document.createElement('div'); + loading.className = 'panel-empty'; + loading.textContent = 'Loading archived conversations…'; + elements.archiveList.append(loading); + try { + const conversations = await tauri.invoke('get_archived_conversations'); + if (!state.archiveDialogOpen) return; + elements.archiveList.replaceChildren(); + if (conversations.length === 0) { + const empty = document.createElement('div'); + empty.className = 'panel-empty'; + empty.textContent = 'No archived conversations.'; + elements.archiveList.append(empty); + return; + } + for (const conversation of conversations) { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'archive-item'; + const title = document.createElement('span'); + title.textContent = conversation.title; + const meta = document.createElement('code'); + meta.textContent = conversation.shortHead; + button.append(title, meta); + button.addEventListener('click', () => restoreArchivedConversation(conversation.id, button)); + elements.archiveList.append(button); + } + elements.archiveList.querySelector('button')?.focus(); + } catch (error) { + elements.archiveList.textContent = String(error); + } +} + +async function restoreArchivedConversation(id, button) { + button.disabled = true; + try { + const conversation = await tauri.invoke('restore_conversation', { conversation: id }); + state.conversations.unshift(conversation); + setArchiveDialog(false); + state.selectedId = null; + await selectConversation(conversation.id); + renderSidebar(); + setStatus('Conversation restored'); + } catch (error) { + setStatus(String(error)); + button.disabled = false; + } +} + +async function toggleToolsPane() { + const conversation = selectedConversation(); + if (!conversation) return; + if (state.selectedAction?.kind === 'tools' + && state.selectedAction.conversationId === conversation.id) { + closeInspectorPane('action'); + return; + } + state.changesOpen = false; + state.selectedAction = { kind: 'tools', conversationId: conversation.id, loading: true }; + updateInspectorLayout(); + try { + const tools = await tauri.invoke('get_tools', { conversation: conversation.id }); + if (state.selectedAction?.kind !== 'tools' + || state.selectedAction.conversationId !== conversation.id) return; + state.selectedAction = { kind: 'tools', conversationId: conversation.id, tools }; + } catch (error) { + if (state.selectedAction?.kind !== 'tools' + || state.selectedAction.conversationId !== conversation.id) return; + state.selectedAction = { kind: 'tools', conversationId: conversation.id, error: String(error) }; + } + renderActionResult(); +} + +function selectRelativeConversation(amount) { + if (state.conversations.length < 2) return; + const selected = state.conversations.findIndex((item) => item.id === state.selectedId); + const next = (selected + amount + state.conversations.length) % state.conversations.length; + selectConversation(state.conversations[next].id); +} + +function changeStatsElement(stats, className = '') { + const container = document.createElement('span'); + container.className = `change-stats ${className}`.trim(); + const additions = document.createElement('span'); + additions.className = 'change-stat is-add'; + additions.textContent = `+${stats.additions}`; + const deletions = document.createElement('span'); + deletions.className = 'change-stat is-delete'; + deletions.textContent = `-${stats.deletions}`; + container.setAttribute( + 'aria-label', + `${stats.additions} lines added, ${stats.deletions} lines deleted` + ); + container.append(additions, deletions); + return container; +} + +function renderChangeCount(stats) { + for (const container of [elements.changeCount, elements.changesSummary]) { + container.replaceChildren(); + container.removeAttribute('aria-label'); + if (!stats) continue; + const rendered = changeStatsElement(stats); + container.setAttribute('aria-label', rendered.getAttribute('aria-label')); + container.append(...rendered.childNodes); + } +} + +function fileBadgeElement(file) { + const badge = document.createElement('span'); + badge.className = 'file-badge'; + badge.dataset.extension = file.presentation.extension || 'file'; + badge.textContent = file.presentation.badge; + return badge; +} + +function renderDiffFileHeader(file) { + elements.diffFileHeader.replaceChildren(); + elements.diffFileHeader.hidden = !file; + if (!file) return; + const identity = document.createElement('div'); + identity.className = 'diff-file-identity'; + const path = document.createElement('span'); + path.className = 'diff-file-path'; + path.textContent = file.path; + identity.append(fileBadgeElement(file), path); + const details = document.createElement('div'); + details.className = 'diff-file-details'; + const status = document.createElement('span'); + status.className = `file-status-label is-${file.status}`; + status.textContent = file.status; + details.append(status, changeStatsElement(file.stats, 'is-compact')); + elements.diffFileHeader.append(identity, details); +} + +function diffLineElement(line) { + const row = document.createElement('div'); + row.className = `diff-row is-${line.kind}`; + const oldNumber = document.createElement('span'); + oldNumber.className = 'diff-line-number'; + oldNumber.textContent = line.oldLine ?? ''; + const newNumber = document.createElement('span'); + newNumber.className = 'diff-line-number'; + newNumber.textContent = line.newLine ?? ''; + const marker = document.createElement('span'); + marker.className = 'diff-marker'; + marker.textContent = line.kind === 'add' ? '+' : line.kind === 'delete' ? '−' : ''; + const code = document.createElement('code'); + code.className = 'diff-code'; + if (line.kind === 'notice') { + code.textContent = line.text; + } else { + appendTokens(code, line.tokens); + } + row.append(oldNumber, newNumber, marker, code); + return row; +} + +function collapsedDiffRegion(lines) { + const row = document.createElement('div'); + row.className = 'diff-collapse'; + const icon = iconElement([ + ['path', { d: 'm8 9 4-4 4 4' }], + ['path', { d: 'm16 15-4 4-4-4' }] + ]); + const label = document.createElement('span'); + label.textContent = `${lines} unmodified ${lines === 1 ? 'line' : 'lines'}`; + row.append(icon, label); + return row; +} + +function renderPatch(file) { + elements.diff.replaceChildren(); + renderDiffFileHeader(file); + if (!file) return; + if (file.hunks.length === 0) { + const empty = document.createElement('div'); + empty.className = 'panel-empty'; + empty.textContent = 'File metadata or binary contents changed.'; + elements.diff.append(empty); + return; + } + let previousHunk = null; + for (const hunk of file.hunks) { + const hiddenLines = unchangedLinesBefore(hunk, previousHunk); + if (hiddenLines > 0) { + elements.diff.append(collapsedDiffRegion(hiddenLines)); + } + for (const line of highlightedHunkLines(hunk, file.path)) { + elements.diff.append(diffLineElement(line)); + } + previousHunk = hunk; + } + elements.diff.scrollTop = 0; + elements.diff.scrollLeft = 0; +} + +function renderDiffFileList(files, selectedFile, conversationId) { + elements.fileList.replaceChildren(); + const query = (state.diffFileQueries.get(conversationId) || '').trim().toLowerCase(); + const visibleFiles = files.filter((file) => file.path.toLowerCase().includes(query)); + if (visibleFiles.length === 0) { + const empty = document.createElement('div'); + empty.className = 'file-list-empty'; + empty.textContent = 'No matching files'; + elements.fileList.append(empty); + return; + } + const groups = new Map(); + for (const file of visibleFiles) { + if (!groups.has(file.presentation.directory)) groups.set(file.presentation.directory, []); + groups.get(file.presentation.directory).push(file); + } + for (const [directory, groupFiles] of groups) { + const group = document.createElement('section'); + group.className = 'file-group'; + const heading = document.createElement('div'); + heading.className = 'file-group-heading'; + const chevron = iconElement([['path', { d: 'm8 10 4 4 4-4' }]]); + const directoryLabel = document.createElement('span'); + directoryLabel.textContent = directory; + heading.append(chevron, directoryLabel); + group.append(heading); + for (const file of groupFiles) { + const button = document.createElement('button'); + button.type = 'button'; + button.className = 'file-button'; + const selected = file.path === selectedFile.path; + button.classList.toggle('is-active', selected); + button.setAttribute('aria-pressed', String(selected)); + button.title = file.path; + const identity = document.createElement('span'); + identity.className = 'file-button-identity'; + const name = document.createElement('span'); + name.className = 'file-button-name'; + name.textContent = file.presentation.name; + identity.append(fileBadgeElement(file), name); + const meta = document.createElement('span'); + meta.className = 'file-button-meta'; + const stats = changeStatsElement(file.stats, 'is-compact'); + const status = document.createElement('span'); + status.className = `file-status is-${file.status}`; + status.setAttribute('aria-label', file.status); + meta.append(stats, status); + button.append(identity, meta); + button.addEventListener('click', () => { + if (state.selectedId !== conversationId) return; + state.selectedDiffFiles.set(conversationId, file.path); + renderDiffFileList(files, file, conversationId); + renderPatch(file); + }); + group.append(button); + } + elements.fileList.append(group); + } +} + +function renderDiff(value) { + const patch = String(value || ''); + const hasChanges = patch.trim().length > 0; + elements.changesToggle.hidden = !hasChanges; + if (!hasChanges && state.changesOpen) { + state.changesOpen = false; + updateInspectorLayout(); + } + elements.changesPane.classList.toggle('is-empty', !hasChanges); + elements.fileList.replaceChildren(); + elements.diff.replaceChildren(); + renderDiffFileHeader(null); + const files = filePatchesFromPatch(patch); + renderChangeCount(lineCounts(files)); + if (!hasChanges || files.length === 0) { + const empty = document.createElement('div'); + empty.className = 'panel-empty'; + empty.textContent = 'No workspace changes.'; + elements.diff.append(empty); + return; + } + const conversationId = state.selectedId; + const requestedPath = state.selectedDiffFiles.get(conversationId); + const selectedFile = files.find((file) => file.path === requestedPath) || files[0]; + state.selectedDiffFiles.set(conversationId, selectedFile.path); + elements.fileFilter.value = state.diffFileQueries.get(conversationId) || ''; + renderDiffFileList(files, selectedFile, conversationId); + renderPatch(selectedFile); +} + +async function loadDiff(id) { + if (!id) return; + if (state.diffs.has(id)) { + if (state.selectedId === id) renderDiff(state.diffs.get(id)); + return; + } + if (state.selectedId === id) { + elements.changesPane.classList.add('is-empty'); + renderChangeCount(null); + renderDiffFileHeader(null); + elements.fileList.replaceChildren(); + elements.diff.textContent = 'Loading changes…'; + } + await loadConversation(id); + if (state.selectedId === id) { + renderDiff(state.diffs.get(id) || ''); + } +} + +function handleTurnEvent(id, event, pendingEntry = null) { + let transcriptChanged = false; + if (event.kind === 'submitted' && pendingEntry) { + pendingEntry.commit = event.commit; + pendingEntry.shortCommit = String(event.commit || '').slice(0, 7); + transcriptChanged = true; + } else if (event.kind === 'phaseStarted') { + const group = state.pendingActivityGroups.get(id); + if (group && group.calls.length === 0) { + group.status = event.phase === 'model' ? 'Thinking…' : 'Preparing…'; + transcriptChanged = true; + } + } else if (event.kind === 'status') { + const group = state.pendingActivityGroups.get(id); + if (group && group.calls.length === 0) { + group.status = event.text || 'Working…'; + transcriptChanged = true; + } + } else if (event.kind === 'toolCall') { + let group = state.pendingActivityGroups.get(id); + if (activityGroupComplete(group)) { + finishActivityGroup(id); + group = null; + } + group ||= beginActivityGroup(id, 'Working…'); + group.calls.push(event); + group.running = true; + group.expanded = true; + transcriptChanged = true; + } else if (event.kind === 'toolResult') { + const history = state.histories.get(id) || []; + for (const entry of history) { + if (entry.role !== 'activity') continue; + const call = entry.calls.find((item) => sameToolCall(item, event)); + if (call) { + call.result = event; + if (state.selectedAction?.conversationId === id + && sameToolCall(state.selectedAction.call, call)) { + state.selectedAction.call = call; + renderActionResult(); + } + if (entry === state.pendingActivityGroups.get(id) && activityGroupComplete(entry)) { + entry.running = false; + } + transcriptChanged = true; + break; + } + } + } else if (event.kind === 'assistantText' && event.text) { + const history = state.histories.get(id) || []; + finishActivityGroup(id); + history.push({ + role: 'agent', + message: event.text, + shortCommit: '' + }); + state.histories.set(id, history); + transcriptChanged = true; + } else if (event.kind === 'completed') { + state.running.delete(id); + state.interrupting.delete(id); + } + if (state.selectedId === id) { + if (transcriptChanged) renderTranscript({ scrollToBottom: true }); + } +} + +async function pollRemote() { + if (state.polling) return; + state.polling = true; + try { + const observed = state.conversations + .filter((conversation) => !conversation.draft) + .map((conversation) => ({ + id: conversation.id, + head: conversation.head || '', + status: conversation.status || null, + request: conversation.request || null + })); + const observedHeads = new Map(observed.map((conversation) => [ + conversation.id, + conversation.head + ])); + const payload = await tauri.invoke('poll_conversations', { observed }); + const persistedIds = new Set(payload.conversations.map((conversation) => conversation.id)); + const previous = new Map(state.conversations.map((conversation) => [conversation.id, conversation])); + const staleIds = new Set(); + const persisted = payload.conversations.map((conversation) => { + const current = previous.get(conversation.id); + if (current && observedHeads.has(conversation.id) + && (current.head || '') !== observedHeads.get(conversation.id)) { + staleIds.add(conversation.id); + return current; + } + return { ...current, ...conversation }; + }); + const drafts = state.conversations.filter( + (conversation) => conversation.draft && !persistedIds.has(conversation.id) + ); + state.conversations = [...persisted, ...drafts]; + const changedIds = new Set(Object.keys(payload.loads || {})); + for (const [id, load] of Object.entries(payload.loads || {})) { + if (!staleIds.has(id)) applyConversationLoad(id, load); + } + renderSidebar(); + if (state.selectedId && !state.conversations.some((item) => item.id === state.selectedId)) { + const next = state.conversations[0]; + state.selectedId = null; + if (next) await selectConversation(next.id, false); + return; + } + if (state.selectedId) { + renderHeader(); + renderModelControl(); + if (changedIds.has(state.selectedId)) { + renderTranscript(); + renderDiff(state.diffs.get(state.selectedId) || ''); + } + if (state.running.has(state.selectedId)) { + setStatus(state.interrupting.has(state.selectedId) + ? 'Stopping agent…' + : 'Agent running · press Esc to stop'); + } else if (selectedConversation()?.interrupted) { + setStatus('Turn interrupted'); + } else if (selectedConversation()?.status === 'failed') { + setStatus('Turn failed'); + } + } + } catch (_) { + // Remote polling is best effort; explicit actions surface their own errors. + } finally { + state.polling = false; + } +} + +async function refreshConversations() { + await pollRemote(); +} + +async function sendCurrentMessage() { + let message = elements.prompt.value.trim(); + let updateTree = false; + const command = parseComposerCommand(message); + if (command) { + if (command.kind === 'commands') { + clearComposer(); + setCommandPalette(true); + return; + } + if (command.kind === 'help') { + clearComposer(); + setShortcutHelp(true); + return; + } + if (command.kind === 'rename') { + clearComposer(); + if (!command.argument) { + setStatus('Usage: /rename <new title>'); + elements.prompt.focus({ preventScroll: true }); + return; + } + await renameSelectedConversation(command.argument); + return; + } + if (command.kind === 'from') { + clearComposer(); + if (!command.argument) { + setStatus('Usage: /from <commit>'); + elements.prompt.focus({ preventScroll: true }); + return; + } + await createConversation(command.argument); + return; + } + if (command.kind === 'invite') { + clearComposer(); + if (!command.argument) { + setStatus('Usage: /invite <username>'); + elements.prompt.focus({ preventScroll: true }); + return; + } + await inviteSelectedConversation(command.argument); + return; + } + if (command.kind === 'model') { + clearComposer(); + if (!command.argument || command.argument.split(/\s+/u).length !== 1) { + setStatus('Usage: /model <name|default>'); + elements.prompt.focus({ preventScroll: true }); + return; + } + const model = command.argument === 'default' ? state.defaultModel : command.argument; + state.modelChoices = modelChoices(model); + for (const item of state.conversations) state.conversationModels.set(item.id, model); + renderModelControl(); + setStatus(`Model for future turns: ${model}`); + return; + } + if (command.kind === 'ref') { + clearComposer(); + if (command.argument) { + setStatus('Usage: /ref'); + elements.prompt.focus({ preventScroll: true }); + return; + } + await copySelectedReference(); + return; + } + if (command.kind === 'update-tree') { + if (!command.argument) { + setStatus('Usage: /update-tree <message>'); + return; + } + message = command.argument; + updateTree = true; + } + } + const conversation = selectedConversation(); + if (!conversation || !message) return; + const id = conversation.id; + const interjecting = state.running.has(id); + if (conversation.draft && !conversation.started) { + conversation.started = true; + if (conversation.title === 'New conversation') { + conversation.title = automaticConversationTitle(message); + } + renderHeader(); + } + const history = state.histories.get(id) || []; + const pendingEntry = { + role: 'human', + author: state.user, + message, + shortCommit: '', + pending: true + }; + history.push(pendingEntry); + state.histories.set(id, history); + if (!interjecting) beginActivityGroup(id); + clearComposer(); + state.running.add(id); + setStatus(''); + renderSidebar(); + renderTranscript({ scrollToBottom: true }); + + const onEvent = new tauri.Channel(); + onEvent.onmessage = (event) => handleTurnEvent(id, event, pendingEntry); + try { + const completion = await tauri.invoke('send_message', { + conversation: id, + message, + title: conversation.title, + model: selectedModel() || null, + updateTree, + onEvent + }); + conversation.title = completion.title; + if (!completion.interjected) finishActivityGroup(id); + await loadConversation(id); + if (!completion.interjected) { + conversation.draft = false; + conversation.started = true; + } + await refreshConversations(); + if (state.selectedId === id) { + renderHeader(); + renderTranscript({ scrollToBottom: true }); + renderDiff(state.diffs.get(id) || ''); + if (completion.interjected) { + setStatus('Message added to the active turn'); + } else if (completion.interrupted) { + setStatus('Turn interrupted'); + } else { + setStatus(''); + } + } + } catch (error) { + if (!interjecting) finishActivityGroup(id); + await loadConversation(id); + const currentHistory = state.histories.get(id) || []; + if (currentHistory.includes(pendingEntry)) { + pendingEntry.pending = false; + pendingEntry.failed = true; + currentHistory.push({ role: 'agent', message: String(error), failed: true }); + } + if (state.selectedId === id) { + renderTranscript({ scrollToBottom: true }); + setStatus(String(error)); + } + } finally { + if (!interjecting) state.pendingActivityGroups.delete(id); + if (!requestIsActiveConversation(id)) state.running.delete(id); + renderSidebar(); + } +} + +async function createConversation(base = null) { + const existingDraft = !base + ? state.conversations.find((item) => item.draft && !item.started) + : null; + if (existingDraft) { + await selectConversation(existingDraft.id); + return; + } + if (state.creatingConversation) return; + state.creatingConversation = true; + elements.newTask.disabled = true; + const inheritedModel = selectedModel(); + try { + saveSelectedDraft(); + const conversation = await tauri.invoke('new_conversation', { base }); + state.conversations.unshift(conversation); + if (conversation.draft) state.histories.set(conversation.id, []); + state.conversationModels.set(conversation.id, inheritedModel); + await selectConversation(conversation.id); + elements.prompt.focus(); + } catch (error) { + setStatus(String(error)); + } finally { + state.creatingConversation = false; + elements.newTask.disabled = false; + } +} + +async function initialize() { + if (!tauri) { + showFatal('The Tauri bridge is unavailable. Run this interface through the CAOS desktop binary.'); + return; + } + try { + const [payload] = await Promise.all([ + tauri.invoke('bootstrap'), + initializeHighlighting() + ]); + state.repo = payload; + state.user = payload.user; + state.defaultModel = payload.defaultModel; + state.initialModel = payload.initialModel; + state.modelChoices = modelChoices(state.initialModel); + state.conversations = payload.conversations; + elements.sidebarRepo.textContent = payload.repoName; + elements.sidebarUser.textContent = payload.user; + clearStartupLoading(); + if (state.conversations.length === 0) { + await createConversation(); + } else { + await selectConversation(state.conversations[0].id); + } + window.setInterval(pollRemote, 500); + } catch (error) { + showFatal(error); + } +} + +elements.newTask.addEventListener('click', () => createConversation()); +elements.composer.addEventListener('submit', (event) => { + event.preventDefault(); + sendCurrentMessage(); +}); +elements.prompt.addEventListener('input', () => { + state.composerDrafts.set(state.selectedId, elements.prompt.value); + state.slashCommandSelection = 0; + state.slashCommandDismissed = false; + resizePrompt(); + renderSlashCommandMenu(); +}); + +function commitPromptEdit() { + elements.prompt.dispatchEvent(new Event('input')); +} + +function deletePreviousWord() { + const start = elements.prompt.selectionStart; + const end = elements.prompt.selectionEnd; + if (start !== end) { + elements.prompt.setRangeText('', start, end, 'end'); + commitPromptEdit(); + return; + } + const before = elements.prompt.value.slice(0, start); + const whitespaceLength = before.match(/\s+$/u)?.[0].length || 0; + const beforeWord = before.slice(0, before.length - whitespaceLength); + const wordLength = beforeWord.match(/\S+$/u)?.[0].length || 0; + elements.prompt.setRangeText('', start - whitespaceLength - wordLength, end, 'end'); + commitPromptEdit(); +} + +function deleteToEndOfLine() { + const start = elements.prompt.selectionStart; + const selectionEnd = elements.prompt.selectionEnd; + if (start !== selectionEnd) { + elements.prompt.setRangeText('', start, selectionEnd, 'end'); + commitPromptEdit(); + return; + } + const newline = elements.prompt.value.indexOf('\n', start); + const end = newline === start + ? start + 1 + : newline === -1 ? elements.prompt.value.length : newline; + elements.prompt.setRangeText('', start, end, 'end'); + commitPromptEdit(); +} + +elements.prompt.addEventListener('keydown', (event) => { + const key = event.key.toLowerCase(); + if (!elements.slashCommandMenu.hidden && !event.ctrlKey && !event.metaKey) { + const matches = slashCommandMatches(elements.prompt.value); + if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { + event.preventDefault(); + const amount = event.key === 'ArrowUp' ? -1 : 1; + state.slashCommandSelection = + (state.slashCommandSelection + amount + matches.length) % matches.length; + renderSlashCommandMenu(); + return; + } + if (event.key === 'Tab' || event.key === 'Enter') { + event.preventDefault(); + completeSlashCommand(); + return; + } + if (event.key === 'Escape') { + event.preventDefault(); + event.stopPropagation(); + state.slashCommandDismissed = true; + renderSlashCommandMenu(); + return; + } + } + if (event.ctrlKey && !event.shiftKey && event.key === 'Enter' && !event.isComposing) { + event.preventDefault(); + sendCurrentMessage(); + return; + } + if (event.ctrlKey && key === 'j' && !event.isComposing) { + event.preventDefault(); + elements.prompt.setRangeText('\n', elements.prompt.selectionStart, elements.prompt.selectionEnd, 'end'); + elements.prompt.dispatchEvent(new Event('input')); + return; + } + if (event.ctrlKey && key === 'a') { + event.preventDefault(); + const start = elements.prompt.value.lastIndexOf('\n', elements.prompt.selectionStart - 1) + 1; + elements.prompt.setSelectionRange(start, start); + return; + } + if (event.ctrlKey && key === 'e') { + event.preventDefault(); + const newline = elements.prompt.value.indexOf('\n', elements.prompt.selectionEnd); + const end = newline === -1 ? elements.prompt.value.length : newline; + elements.prompt.setSelectionRange(end, end); + return; + } + if (event.ctrlKey && key === 'w') { + event.preventDefault(); + deletePreviousWord(); + return; + } + if (event.ctrlKey && key === 'k') { + event.preventDefault(); + deleteToEndOfLine(); + return; + } + if (event.ctrlKey && key === 'c' && elements.prompt.value) { + event.preventDefault(); + elements.prompt.value = ''; + elements.prompt.dispatchEvent(new Event('input')); + } +}); + +document.addEventListener('keydown', (event) => { + if (event.ctrlKey) document.body.classList.add('is-control-held'); + const key = event.key.toLowerCase(); + if (event.metaKey && ['-', '_', '=', '+', '0'].includes(key)) { + event.preventDefault(); + if (key === '0') { + applyUiZoom(1, true); + } else { + applyUiZoom(state.uiZoom + (key === '-' || key === '_' ? -UI_ZOOM_STEP : UI_ZOOM_STEP), true); + } + return; + } + if (state.publishDialogOpen) { + if (event.ctrlKey && !event.shiftKey && key === 'p') { + event.preventDefault(); + confirmPublish(); + } else if (event.key === 'Escape') { + event.preventDefault(); + setPublishDialog(false); + } + return; + } + if (state.archiveDialogOpen) { + if (event.key === 'Escape') { + event.preventDefault(); + setArchiveDialog(false); + } + return; + } + if (state.modelMenuOpen && event.key === 'Escape') { + event.preventDefault(); + setModelMenu(false); + return; + } + if (event.ctrlKey && event.shiftKey && key === 'p') { + event.preventDefault(); + setCommandPalette(!state.commandPaletteOpen); + return; + } + if (state.commandPaletteOpen) { + if (event.key === 'Escape') { + event.preventDefault(); + setCommandPalette(false); + } + return; + } + if (event.ctrlKey && key === 'h') { + event.preventDefault(); + setShortcutHelp(!state.shortcutHelpOpen); + return; + } + if (state.shortcutHelpOpen) { + if (event.key === 'Escape') { + event.preventDefault(); + setShortcutHelp(false); + } + return; + } + if (event.key === 'Escape' && state.selectedId && state.running.has(state.selectedId)) { + event.preventDefault(); + interruptSelectedConversation(); + return; + } + if (event.ctrlKey && !event.shiftKey && /^[1-9]$/u.test(event.key)) { + event.preventDefault(); + const conversation = state.conversations[Number(event.key) - 1]; + if (conversation) selectConversation(conversation.id); + } else if (event.ctrlKey && key === 'n') { + event.preventDefault(); + createConversation(); + } else if (event.ctrlKey && event.key === 'ArrowUp') { + event.preventDefault(); + selectRelativeConversation(-1); + } else if (event.ctrlKey && event.key === 'ArrowDown') { + event.preventDefault(); + selectRelativeConversation(1); + } else if (event.ctrlKey && !event.shiftKey && key === 'l') { + event.preventDefault(); + checkoutSelectedConversation(); + } else if (event.ctrlKey && !event.shiftKey && key === 'p') { + event.preventDefault(); + openPublishDialog(); + } else if (event.ctrlKey && !event.shiftKey && key === 'e' + && event.target !== elements.prompt) { + event.preventDefault(); + archiveSelectedConversation(); + } else if (event.ctrlKey && event.shiftKey && key === 't') { + event.preventDefault(); + toggleToolsPane(); + } else if (event.ctrlKey && key === 'q') { + event.preventDefault(); + toggleChangesPane(); + } else if (event.ctrlKey && key === 'r') { + event.preventDefault(); + reloadSelectedConversation(); + } else if (event.key === 'Escape' && (state.changesOpen || state.selectedAction)) { + event.preventDefault(); + closeInspectorPanes(); + } else if (event.key === 'PageUp' || event.key === 'PageDown') { + event.preventDefault(); + const amount = Math.max(160, Math.round(elements.transcriptScroll.clientHeight * .65)); + elements.transcriptScroll.scrollBy({ + top: event.key === 'PageUp' ? -amount : amount, + behavior: 'smooth' + }); + } +}); + +document.addEventListener('keyup', (event) => { + if (event.key === 'Control' || !event.ctrlKey) document.body.classList.remove('is-control-held'); +}); + +window.addEventListener('blur', () => document.body.classList.remove('is-control-held')); + +elements.shortcutHelp.addEventListener('click', (event) => { + if (event.target.closest('[data-close-shortcuts]')) setShortcutHelp(false); +}); + +elements.modelButton.addEventListener('click', (event) => { + event.stopPropagation(); + setModelMenu(!state.modelMenuOpen); +}); + +document.addEventListener('click', (event) => { + if (state.modelMenuOpen && !event.target.closest('.model-control')) setModelMenu(false); +}); + +elements.publishDialog.addEventListener('click', (event) => { + if (event.target.closest('[data-close-publish]')) setPublishDialog(false); +}); +elements.publishConfirm.addEventListener('click', confirmPublish); +elements.publishBase.addEventListener('keydown', (event) => { + if (event.key === 'Enter') { + event.preventDefault(); + confirmPublish(); + } +}); + +elements.archiveDialog.addEventListener('click', (event) => { + if (event.target.closest('[data-close-archives]')) setArchiveDialog(false); +}); + +elements.commandPaletteButton.addEventListener('click', () => { + setCommandPalette(!state.commandPaletteOpen); +}); + +elements.commandPalette.addEventListener('click', (event) => { + if (event.target.closest('[data-close-command-palette]')) setCommandPalette(false); +}); + +elements.commandPaletteQuery.addEventListener('input', () => { + state.commandPaletteSelection = 0; + renderCommandPalette(); +}); + +elements.commandPaletteQuery.addEventListener('keydown', (event) => { + const commands = matchingPaletteCommands(); + if (['ArrowUp', 'ArrowDown', 'Enter', 'Escape'].includes(event.key)) event.stopPropagation(); + if (event.key === 'ArrowUp') { + event.preventDefault(); + selectPaletteIndex(state.commandPaletteSelection - 1); + } else if (event.key === 'ArrowDown') { + event.preventDefault(); + selectPaletteIndex(state.commandPaletteSelection + 1); + } else if (event.key === 'Enter' && commands.length > 0) { + event.preventDefault(); + executePaletteCommand(); + } else if (event.key === 'Escape') { + event.preventDefault(); + setCommandPalette(false); + } +}); + +elements.changesToggle.addEventListener('click', toggleChangesPane); + +elements.fileFilter.addEventListener('input', () => { + const conversationId = state.selectedId; + if (!conversationId) return; + state.diffFileQueries.set(conversationId, elements.fileFilter.value); + const files = filePatchesFromPatch(state.diffs.get(conversationId) || ''); + if (files.length === 0) return; + const requestedPath = state.selectedDiffFiles.get(conversationId); + const selectedFile = files.find((file) => file.path === requestedPath) || files[0]; + renderDiffFileList(files, selectedFile, conversationId); +}); + +for (const button of document.querySelectorAll('[data-close-pane]')) { + button.addEventListener('click', () => closeInspectorPane(button.dataset.closePane)); +} + +function installWidthResizer({ + handle, + bodyClass, + defaultWidth, + currentWidth, + pointerWidth, + keyboardDirection, + setWidth +}) { + let active = false; + handle.addEventListener('pointerdown', (event) => { + if (event.button !== 0) return; + event.preventDefault(); + active = true; + document.body.classList.add(bodyClass); + handle.setPointerCapture(event.pointerId); + setWidth(pointerWidth(event)); + }); + window.addEventListener('pointermove', (event) => { + if (active) setWidth(pointerWidth(event)); + }); + const finish = (event) => { + if (!active) return; + active = false; + document.body.classList.remove(bodyClass); + if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId); + setWidth(currentWidth(), true); + }; + window.addEventListener('pointerup', finish); + window.addEventListener('pointercancel', finish); + handle.addEventListener('dblclick', () => setWidth(defaultWidth, true)); + handle.addEventListener('keydown', (event) => { + if (!['ArrowLeft', 'ArrowRight'].includes(event.key)) return; + event.preventDefault(); + const direction = event.key === 'ArrowLeft' ? -1 : 1; + const step = event.shiftKey ? 32 : 12; + setWidth(currentWidth() + direction * keyboardDirection * step, true); + }); +} + +installWidthResizer({ + handle: elements.sidebarResizer, + bodyClass: 'is-resizing-sidebar', + defaultWidth: DEFAULT_SIDEBAR_WIDTH, + currentWidth: () => state.sidebarWidth, + pointerWidth: (event) => event.clientX, + keyboardDirection: 1, + setWidth: setSidebarWidth +}); + +installWidthResizer({ + handle: elements.inspectorResizer, + bodyClass: 'is-resizing-inspector', + defaultWidth: DEFAULT_INSPECTOR_WIDTH, + currentWidth: () => state.inspectorWidth, + pointerWidth: (event) => window.innerWidth - event.clientX, + keyboardDirection: -1, + setWidth: setInspectorWidth +}); + +window.addEventListener('resize', () => { + setInspectorWidth(state.inspectorWidth); + setSidebarWidth(state.sidebarWidth); +}); + +restoreUiZoom(); +restoreSidebarWidth(); +restoreInspectorWidth(); +initialize(); diff --git a/desktop/ui/changes.js b/desktop/ui/changes.js new file mode 100644 index 00000000..fdba40fb --- /dev/null +++ b/desktop/ui/changes.js @@ -0,0 +1,118 @@ +import parseDiff from 'parse-diff'; + +import { codeTokens } from './highlight.js'; + +const FILE_BADGES = new Map([ + ['css', 'CSS'], ['go', 'GO'], ['html', 'HTML'], ['js', 'JS'], ['jsx', 'JS'], + ['json', 'JSON'], ['md', 'MD'], ['nix', 'NIX'], ['py', 'PY'], ['rs', 'RS'], + ['sh', 'SH'], ['toml', 'TOML'], ['ts', 'TS'], ['tsx', 'TS'], ['yaml', 'YML'], + ['yml', 'YML'] +]); + +function filePresentation(path) { + const normalized = String(path || ''); + const slash = normalized.lastIndexOf('/'); + const name = slash >= 0 ? normalized.slice(slash + 1) : normalized; + const directory = slash >= 0 ? normalized.slice(0, slash) : '.'; + const extension = name.includes('.') ? name.split('.').at(-1).toLowerCase() : ''; + return { + badge: FILE_BADGES.get(extension) || (extension ? extension.slice(0, 4).toUpperCase() : 'FILE'), + directory, + extension, + name + }; +} + +function normalizedLine(change) { + if (change.content === '\\ No newline at end of file') { + return { kind: 'notice', oldLine: null, newLine: null, text: 'No newline at end of file' }; + } + if (change.type === 'add') { + return { kind: 'add', oldLine: null, newLine: change.ln, text: change.content.slice(1) }; + } + if (change.type === 'del') { + return { kind: 'delete', oldLine: change.ln, newLine: null, text: change.content.slice(1) }; + } + return { + kind: 'context', + oldLine: change.ln1, + newLine: change.ln2, + text: change.content.slice(1) + }; +} + +function filePatchesFromPatch(patch) { + return parseDiff(String(patch || '')).map((file) => { + const from = file.from && file.from !== '/dev/null' ? file.from : null; + const to = file.to && file.to !== '/dev/null' ? file.to : null; + const path = to || from || 'unknown'; + const status = file.new + ? 'added' + : file.deleted + ? 'deleted' + : from && to && from !== to + ? 'renamed' + : 'modified'; + return { + hunks: file.chunks.map((chunk) => ({ + oldStart: chunk.oldStart, + oldCount: chunk.oldLines, + newStart: chunk.newStart, + newCount: chunk.newLines, + context: chunk.content.replace(/^@@[^@]*@@\s?/u, ''), + lines: chunk.changes.map(normalizedLine) + })), + path, + presentation: filePresentation(path), + stats: { additions: file.additions, deletions: file.deletions }, + status + }; + }); +} + +function lineCounts(files) { + return files.reduce( + (total, file) => ({ + additions: total.additions + file.stats.additions, + deletions: total.deletions + file.stats.deletions + }), + { additions: 0, deletions: 0 } + ); +} + +function unchangedLinesBefore(hunk, previousHunk = null) { + if (!previousHunk) return Math.max(0, Math.max(hunk.oldStart, hunk.newStart) - 1); + const previousOldEnd = previousHunk.oldStart + previousHunk.oldCount; + const previousNewEnd = previousHunk.newStart + previousHunk.newCount; + return Math.max(0, hunk.oldStart - previousOldEnd, hunk.newStart - previousNewEnd); +} + +function highlightedHunkLines(hunk, path) { + const oldSource = []; + const newSource = []; + for (const line of hunk.lines) { + if (line.kind === 'context' || line.kind === 'delete') oldSource.push(line.text); + if (line.kind === 'context' || line.kind === 'add') newSource.push(line.text); + } + const oldTokens = codeTokens(oldSource.join('\n'), path); + const newTokens = codeTokens(newSource.join('\n'), path); + let oldIndex = 0; + let newIndex = 0; + return hunk.lines.map((line) => { + if (line.kind === 'delete') return { ...line, tokens: oldTokens[oldIndex++] }; + if (line.kind === 'add') return { ...line, tokens: newTokens[newIndex++] }; + if (line.kind === 'context') { + oldIndex += 1; + return { ...line, tokens: newTokens[newIndex++] }; + } + return { ...line, tokens: [{ content: line.text }] }; + }); +} + +export { + filePatchesFromPatch, + filePresentation, + highlightedHunkLines, + lineCounts, + unchangedLinesBefore +}; diff --git a/desktop/ui/clipboard.js b/desktop/ui/clipboard.js new file mode 100644 index 00000000..d46a0918 --- /dev/null +++ b/desktop/ui/clipboard.js @@ -0,0 +1,25 @@ +function fallbackCopy(text) { + const field = document.createElement('textarea'); + field.value = text; + field.style.position = 'fixed'; + field.style.opacity = '0'; + document.body.append(field); + field.select(); + const copied = document.execCommand('copy'); + field.remove(); + if (!copied) throw new Error('copy command was rejected'); +} + +async function copyText(text) { + if (navigator.clipboard?.writeText) { + try { + await navigator.clipboard.writeText(text); + return; + } catch (_) { + // The WebView can deny Clipboard API access; its legacy command still works. + } + } + fallbackCopy(text); +} + +export { copyText }; diff --git a/desktop/ui/commands.js b/desktop/ui/commands.js new file mode 100644 index 00000000..94bca650 --- /dev/null +++ b/desktop/ui/commands.js @@ -0,0 +1,55 @@ +const SLASH_COMMANDS = [ + { name: '/from', usage: '/from <commit>', description: 'Start a conversation from a completed turn' }, + { name: '/help', usage: '/help', description: 'Show keyboard shortcuts and slash commands' }, + { name: '/invite', usage: '/invite <username>', description: "Add this conversation to a user's sidebar" }, + { name: '/model', usage: '/model <name|default>', description: 'Select the model for future turns' }, + { name: '/ref', usage: '/ref', description: 'Copy the durable conversation reference' }, + { name: '/title', usage: '/title <new title>', description: 'Rename the selected conversation' }, + { name: '/rename', usage: '/rename <new title>', description: 'Rename the selected conversation' }, + { name: '/update-tree', usage: '/update-tree <message>', description: 'Fold working-tree edits into the turn' }, + { name: '/commands', usage: '/commands', description: 'Open the searchable command palette' } +]; + +const BASE_MODELS = [ + { value: 'claude-opus-5', label: 'Opus 5', detail: 'Latest Opus' }, + { value: 'claude-sonnet-5', label: 'Sonnet 5', detail: 'Latest Sonnet' }, + { value: 'claude-fable-5', label: 'Fable 5', detail: 'Fastest' }, + { value: 'claude-opus-4-8', label: 'Opus 4.8', detail: 'Most capable' }, + { value: 'claude-opus-4-7', label: 'Opus 4.7', detail: 'Previous Opus' }, + { value: 'claude-sonnet-4-6', label: 'Sonnet 4.6', detail: 'Previous Sonnet' }, + { value: 'claude-opus-4-6', label: 'Opus 4.6', detail: 'Legacy Opus' } +]; + +function parseComposerCommand(text) { + const match = String(text || '').match(/^\/(commands|help|invite|model|ref|rename|title|from|update-tree)(?:\s+([\s\S]*))?$/u); + if (!match) return null; + const kind = match[1] === 'title' ? 'rename' : match[1]; + return { kind, argument: (match[2] || '').trim() }; +} + +function slashCommandMatches(text) { + const value = String(text || ''); + if (!value.startsWith('/') || /\s/u.test(value)) return []; + const query = value.toLowerCase(); + return SLASH_COMMANDS.filter((command) => command.name.startsWith(query)); +} + +function modelChoices(initialModel) { + const initial = String(initialModel || '').trim(); + if (!initial || BASE_MODELS.some((model) => model.value === initial)) return [...BASE_MODELS]; + return [...BASE_MODELS, { value: initial, label: initial, detail: 'From --model' }]; +} + +function modelLabel(value, choices = BASE_MODELS) { + const model = choices.find((choice) => choice.value === String(value || '')); + return model?.label || String(value || '') || 'Default'; +} + +export { + BASE_MODELS, + SLASH_COMMANDS, + modelChoices, + modelLabel, + parseComposerCommand, + slashCommandMatches +}; diff --git a/desktop/ui/highlight.js b/desktop/ui/highlight.js new file mode 100644 index 00000000..3d82d171 --- /dev/null +++ b/desktop/ui/highlight.js @@ -0,0 +1,87 @@ +import { createHighlighterCore } from '@shikijs/core'; +import { createJavaScriptRegexEngine } from '@shikijs/engine-javascript'; +import css from '@shikijs/langs/css'; +import go from '@shikijs/langs/go'; +import html from '@shikijs/langs/html'; +import javascript from '@shikijs/langs/javascript'; +import jsx from '@shikijs/langs/jsx'; +import json from '@shikijs/langs/json'; +import markdown from '@shikijs/langs/markdown'; +import nix from '@shikijs/langs/nix'; +import python from '@shikijs/langs/python'; +import rust from '@shikijs/langs/rust'; +import shellscript from '@shikijs/langs/shellscript'; +import toml from '@shikijs/langs/toml'; +import tsx from '@shikijs/langs/tsx'; +import typescript from '@shikijs/langs/typescript'; +import yaml from '@shikijs/langs/yaml'; +import githubDarkDefault from '@shikijs/themes/github-dark-default'; + +const THEME = 'github-dark-default'; +const LANGUAGE_BY_EXTENSION = new Map([ + ['css', 'css'], ['go', 'go'], ['htm', 'html'], ['html', 'html'], ['js', 'javascript'], + ['jsx', 'jsx'], ['json', 'json'], ['md', 'markdown'], ['nix', 'nix'], ['py', 'python'], + ['rs', 'rust'], ['sh', 'shellscript'], ['toml', 'toml'], ['ts', 'typescript'], + ['tsx', 'tsx'], ['yaml', 'yaml'], ['yml', 'yaml'] +]); +const LANGUAGE_ALIASES = new Map([ + ['bash', 'shellscript'], ['js', 'javascript'], ['md', 'markdown'], ['py', 'python'], + ['rs', 'rust'], ['sh', 'shellscript'], ['shell', 'shellscript'], ['ts', 'typescript'], + ['yml', 'yaml'] +]); + +let highlighter = null; + +async function initializeHighlighting() { + highlighter ||= await createHighlighterCore({ + engine: createJavaScriptRegexEngine(), + langs: [ + css, go, html, javascript, jsx, json, markdown, nix, python, rust, shellscript, + toml, tsx, typescript, yaml + ], + themes: [githubDarkDefault] + }); +} + +function languageFor(value) { + const normalized = String(value || '').toLowerCase(); + const hint = normalized.includes('.') ? normalized.split('.').at(-1) : normalized; + return LANGUAGE_BY_EXTENSION.get(hint) || LANGUAGE_ALIASES.get(hint) || hint || 'text'; +} + +function codeTokens(source, languageOrPath) { + const text = String(source || ''); + const language = languageFor(languageOrPath); + if (!highlighter || !highlighter.getLoadedLanguages().includes(language)) { + return text.split('\n').map((line) => [{ content: line }]); + } + return highlighter.codeToTokensBase(text, { lang: language, theme: THEME }); +} + +function appendTokens(container, tokens) { + for (const token of tokens) { + const span = document.createElement('span'); + span.textContent = token.content; + if (token.htmlStyle) { + for (const [property, value] of Object.entries(token.htmlStyle)) { + span.style.setProperty(property, value); + } + } else { + if (token.color) span.style.color = token.color; + if (token.bgColor) span.style.backgroundColor = token.bgColor; + if (token.fontStyle & 1) span.style.fontStyle = 'italic'; + if (token.fontStyle & 2) span.style.fontWeight = 'bold'; + if (token.fontStyle & 4) span.style.textDecoration = 'underline'; + } + container.append(span); + } +} + +function appendHighlightedCode(container, source, languageOrPath) { + codeTokens(source, languageOrPath).forEach((tokens, lineIndex) => { + if (lineIndex > 0) container.append(document.createTextNode('\n')); + appendTokens(container, tokens); + }); +} + +export { appendHighlightedCode, appendTokens, codeTokens, initializeHighlighting, languageFor }; diff --git a/desktop/ui/index.html b/desktop/ui/index.html new file mode 100644 index 00000000..8d4648c3 --- /dev/null +++ b/desktop/ui/index.html @@ -0,0 +1,228 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>CAOS + + + + +
+ + + + +
+
+
+
+

+
+
+
+
+
+ +
+ +
+
+ +
+
+
+
+
+ + Loading conversations… +
+
+
+
+
+
+ + + + +
+
+
+ + +
+ + +
+
+ + + + + + + + + + diff --git a/desktop/ui/markdown.js b/desktop/ui/markdown.js new file mode 100644 index 00000000..fc44ae2f --- /dev/null +++ b/desktop/ui/markdown.js @@ -0,0 +1,101 @@ +import createDOMPurify from 'dompurify'; +import { marked } from 'marked'; + +import { copyText } from './clipboard.js'; +import { appendHighlightedCode } from './highlight.js'; + +const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; +let purifier = null; + +function codeCopyIcon(copied = false) { + const svg = document.createElementNS(SVG_NAMESPACE, 'svg'); + svg.setAttribute('aria-hidden', 'true'); + svg.setAttribute('viewBox', '0 0 24 24'); + const paths = copied + ? [['path', { d: 'm5 12 4 4L19 6' }]] + : [ + ['rect', { x: '9', y: '9', width: '10', height: '10', rx: '2' }], + ['path', { d: 'M15 6V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h1' }] + ]; + for (const [name, attributes] of paths) { + const child = document.createElementNS(SVG_NAMESPACE, name); + for (const [attribute, value] of Object.entries(attributes)) { + child.setAttribute(attribute, value); + } + svg.append(child); + } + return svg; +} + +async function copyCode(text, button) { + try { + await copyText(text); + button.replaceChildren(codeCopyIcon(true)); + button.setAttribute('aria-label', 'Copied code'); + button.title = 'Copied'; + window.setTimeout(() => { + button.replaceChildren(codeCopyIcon()); + button.setAttribute('aria-label', 'Copy code'); + button.title = 'Copy code'; + }, 1200); + } catch (_) { + button.title = 'Could not copy code'; + } +} + +function enhanceCodeBlocks(container) { + for (const code of container.querySelectorAll('pre > code')) { + const text = code.textContent.replace(/\n$/u, ''); + const language = [...code.classList] + .find((name) => name.startsWith('language-')) + ?.slice('language-'.length); + code.replaceChildren(); + appendHighlightedCode(code, text, language); + const pre = code.parentElement; + pre.className = 'markdown-code-block'; + const wrapper = document.createElement('div'); + wrapper.className = 'markdown-code-block-wrap'; + pre.replaceWith(wrapper); + const copy = document.createElement('button'); + copy.type = 'button'; + copy.className = 'markdown-code-copy'; + copy.setAttribute('aria-label', 'Copy code'); + copy.title = 'Copy code'; + copy.append(codeCopyIcon()); + copy.addEventListener('click', () => copyCode(text, copy)); + wrapper.append(pre, copy); + } +} + +function enhanceMarkdown(container) { + for (const link of container.querySelectorAll('a')) { + link.rel = 'noreferrer'; + link.target = '_blank'; + } + for (const checkbox of container.querySelectorAll('li > input[type="checkbox"]')) { + checkbox.closest('li').classList.add('markdown-task-item'); + } + for (const table of container.querySelectorAll('table')) { + table.classList.add('markdown-table'); + const wrapper = document.createElement('div'); + wrapper.className = 'markdown-table-wrap'; + table.replaceWith(wrapper); + wrapper.append(table); + } + enhanceCodeBlocks(container); +} + +function markdownHtml(source) { + return marked.parse(String(source || ''), { gfm: true }); +} + +function renderMarkdown(container, source) { + purifier ||= createDOMPurify(window); + container.innerHTML = purifier.sanitize(markdownHtml(source), { + FORBID_ATTR: ['style'], + FORBID_TAGS: ['style'] + }); + enhanceMarkdown(container); +} + +export { markdownHtml, renderMarkdown }; diff --git a/flake.nix b/flake.nix index cf3498c8..f8cf86c3 100644 --- a/flake.nix +++ b/flake.nix @@ -86,13 +86,15 @@ rustToolchain = mkRustToolchain pkgs; craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; - # The cargo source, WITHOUT ./tests. cleanCargoSource sweeps in every - # Cargo.toml in the tree, and crane's mkDummySrc keeps them, so the - # suite's cargo fixtures — tests/cargo-check/{broken,mini} and - # tests/cargo-crates/ws — landed in the DEPENDENCY cache key. They - # contribute nothing to it: ws declares its own [workspace], the other - # two have no dependencies at all, and none is a member here. Yet - # editing one rebuilt all ~176 deps. + # The core cargo source, WITHOUT ./tests or ./desktop. cleanCargoSource + # sweeps in every Cargo.toml in the tree, and crane's mkDummySrc keeps + # them, so unrelated Cargo workspaces otherwise land in this workspace's + # dependency cache key. The suite's cargo fixtures — + # tests/cargo-check/{broken,mini} and tests/cargo-crates/ws — contribute + # nothing to it: ws declares its own [workspace], the other two have no + # dependencies at all, and none is a member here. Yet editing one rebuilt + # all ~176 deps. The desktop is likewise its own workspace and has a + # separate native build below; its edits must not rebuild worker binaries. # # They are runtime DATA, not source: the suite hands those directories # to the cargo worker as trees to check, delivered over caos by @@ -128,6 +130,7 @@ isCrateScript = pkgs.lib.hasPrefix "crates/" rel && pkgs.lib.hasSuffix ".sh" rel; in (rel != "tests" && !(pkgs.lib.hasPrefix "tests/" rel)) + && (rel != "desktop" && !(pkgs.lib.hasPrefix "desktop/" rel)) && (craneLib.filterCargoSources path type || isCrateScript); }; @@ -643,6 +646,79 @@ ''; }; + # The Tauri client is a host-native application, not part of the + # static-musl workspace above. Keep its source and platform libraries + # separate so adding a desktop dependency cannot change worker images + # or the root Cargo.lock. + desktopManifest = builtins.fromTOML (builtins.readFile ./desktop/src-tauri/Cargo.toml); + desktopNodeModules = pkgs.importNpmLock.buildNodeModules { + npmRoot = ./desktop; + inherit (pkgs) nodejs; + }; + desktopSrc = pkgs.lib.fileset.toSource { + root = ./.; + fileset = pkgs.lib.fileset.unions [ + (craneLib.fileset.commonCargoSources ./desktop/src-tauri) + (craneLib.fileset.commonCargoSources ./crates/caos) + (craneLib.fileset.commonCargoSources ./crates/caos-world) + ./desktop/src-tauri/capabilities + ./desktop/src-tauri/icons + ./desktop/src-tauri/tauri.conf.json + ./desktop/build.mjs + ./desktop/package.json + ./desktop/package-lock.json + ./desktop/tests + ./desktop/ui + ]; + }; + desktopArgs = { + src = desktopSrc; + cargoLock = ./desktop/src-tauri/Cargo.lock; + cargoToml = ./desktop/src-tauri/Cargo.toml; + cargoExtraArgs = "--locked"; + pname = desktopManifest.package.name; + version = desktopManifest.package.version; + strictDeps = true; + + # Crane's Cargo.lock replacement hook writes in the build directory, + # so enter the nested workspace before any later phase runs. The + # sibling UI and ../../crates path dependencies remain in the source + # tree and keep their ordinary Cargo-relative locations. + postUnpack = '' + cd "$sourceRoot/desktop/src-tauri" + sourceRoot=. + ''; + + preBuild = '' + ln -s ${desktopNodeModules}/node_modules ../node_modules + (cd .. && node build.mjs) + ''; + + nativeBuildInputs = [ pkgs.esbuild pkgs.nodejs ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ + pkgs.pkg-config + pkgs.wrapGAppsHook3 + ]; + buildInputs = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ + pkgs.glib-networking + pkgs.webkitgtk_4_1 + ]; + }; + caos-desktop = craneLib.buildPackage ( + desktopArgs + // { + # Tauri embeds its build-time OUT_DIR in generated permission + # metadata, so artifacts cannot move safely between derivations. + cargoArtifacts = null; + postCheck = '' + (cd .. && npm test) + ''; + meta = { + description = desktopManifest.package.description; + mainProgram = "caos-desktop"; + platforms = pkgs.lib.platforms.linux ++ pkgs.lib.platforms.darwin; + }; + } + ); # The worker images that make up `std`, keyed by the same builtin name # build-builtins.sh maps them back to (via the baked into each @@ -1030,7 +1106,15 @@ # (another `nix build`) is the only thing that moves it. The workspace # binaries stay available as `.#caos`. default = caos-tools; - inherit caos server runnerd caos-cli caosd caos-tools; + inherit + caos + server + runnerd + caos-cli + caosd + caos-tools + caos-desktop + ; # Agent-harness worker binaries (run as curry(runner, bin)). inherit worker-deep-deps; # The staged /worker binaries (std/runner, std/cargo) and the rustc @@ -1066,26 +1150,34 @@ program = "${caosd}/bin/caosd"; }; + caos-desktop = { + type = "app"; + program = "${caos-desktop}/bin/caos-desktop"; + }; }; - # No `checks` output at all. test, clippy, doc and fmt all run in + # The root workspace's test, clippy, doc and fmt gates still run in # tests/unit-{test,clippy,doc,fmt}, through the cargo worker, and - # `caos-cli run-tool test` is the only runner anyone invokes — - # there is no CI here, and - # CLAUDE.md's pre-commit step is nix build + caosd up + run-tool test. + # `caos-cli run-tool test` remains their one runner. The desktop cannot + # run there without putting a native WebView stack in the worker image, + # so its package is also its flake check; building it runs both the Rust + # and browser-independent JavaScript tests. # - # Every one of them had a reason to move, and the tests had the + # The root checks had a reason to move, and the tests had the # sharpest: git_transport_tests and chat::tests spawn git, which the # worker's PATH carries (bake.env's gitMinimal) and a nix builder's # does not, so that check had been silently red — on origin/main and # before a56df5a. `doc` was red too, on two rustdoc links. A check # nobody runs is a check that goes quietly red; one runner, and it is # the one with the environment the work needs. + checks.caos-desktop = caos-desktop; devShells.default = craneLib.devShell { # Brings the pinned toolchain (rustc, cargo, clippy, rustfmt) onto PATH. packages = [ pkgs.cargo-watch + pkgs.esbuild + pkgs.nodejs pkgs.rust-analyzer # rust-src is IDE-only (stdlib source for navigation), so it rides # here rather than in the build toolchain — where it would land in