A Tauri 2 + SvelteKit desktop GUI for JuCode-CLI.
The app launches the CLI as a sidecar (jucode serve) and talks to it over the
newline-delimited JSON protocol (documented in the CLI repo under
docs/desktop-gui-design.md).
WebView (Svelte) ──invoke('send_op', …)──▶ src-tauri (Rust) ──stdin──▶ jucode serve
▲ │ │
└────────── 'agent-event' event ─────────────┴────────── stdout (NDJSON)┘
src-tauri/src/lib.rs— spawns ajucode servechild per session, pumps its stdout to the webview asagent-eventevents, and exposessend_op(writes a JSON command to stdin). Also hosts IDE-side commands that operate directly on the project directory — file walk, git, a real PTY terminal, config/auth read-write, environment checks, and temp-image writes.src/lib/protocol.ts— command types and theinvokewrappers.src/lib/chat.svelte.ts— reactiveChatStateprojected from theAgentEventstream.src/routes/+page.svelte— the shell: sidebar, chat view, right dock, modals.- Pure logic lives in framework-free modules so it's unit-tested:
mention.ts(@-completion),tree.ts(branch tree),approval.ts(auto-approve policy).
- Chat — streaming replies with incremental markdown + syntax highlighting, per-round reasoning blocks, tool-execution cards (diffs, command output, images), smooth adaptive reveal, phase indicator, interrupt, steer/queue.
- Multi-project / multi-session — projects (by directory) each with their own conversation tabs; layout + open tabs persist across launches; engine crash auto-restart (resumes the conversation).
- Command palette (
⌘K) — searchable quick actions plus the engine's slash commands. - Approval modes — client-side
谨慎 / auto-edit / full-auto; richer approval card; background sessions flag when they need a decision. - @-mention — completes files and folders, fuzzy-ranked, drills into folders
on a trailing
/. Filesystem-based (no git dependency); heavy dirs pruned. - Edit & rewind — rewind the conversation (and files) to an earlier turn.
- In-conversation find (
⌘F) and filterable history/branch pickers. - Right dock — Plan, Goal, Files, Git (stage / commit / discard / diff), Terminal.
- Setup wizard — first-run environment check (git + engine), guided/auto install, JuCode OAuth login or API-key path; logout per provider in settings.
- Branch tree (
/tree), resume (/resume), model picker (/model), context/cost ring, skills marketplace. - Theming — system / light / dark; image paste & drag-drop; desktop notifications.
Keyboard: ⌘K palette · ⌘F find · ⌘N new session · ⌘B toggle panel · ⌘, settings.
- The
jucodebinary. Check out JuCode-CLI as a sibling of this repo and runcargo buildin it. The app then auto-resolves../JuCode-CLI/target/{debug,release}/jucode. Otherwise setJUCODE_BINto the binary path, or havejucodeonPATH. (The packaged app bundles it as a sidecar.) - Node + pnpm, Rust toolchain, and the platform Tauri prerequisites (https://v2.tauri.app/start/prerequisites/).
pnpm install
pnpm tauri devpnpm check # svelte-check (types)
pnpm test # vitest (pure-logic unit tests)
pnpm build # production frontend build
pnpm tauri build # packaged app (bundles the engine sidecar)JUCODE_BIN— path to thejucodebinary (overrides auto-resolution).JUCODE_CWD— working directory the agent operates in (defaults to the launch dir).