mirror of
https://github.com/cline/cline.git
synced 2026-09-24 23:20:16 +08:00
* Rename desktop app from Cline Code to Cline Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> * Format touched Rust test assertions Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com> --------- Co-authored-by: Saoud Rizwan <saoudrizwan@users.noreply.github.com>
Preview
Architecture Overview
Any Client (CLI, VS Code, agents)
│
│ ws:// ui.notify / ui.show_window commands
▼
Hub WebSocket Server (@cline/core/hub/server.ts)
│
│ broadcasts ui.notify / ui.show_window events to ALL subscribers
▼
Menu Bar Sidecar (apps/examples/menubar/sidecar/index.ts) ← TypeScript/Bun process
│
│ JSON lines on stdout: hub_state / notification / ready
▼
Rust Tauri App (apps/examples/menubar/src-tauri/src/main.rs)
│
├── Hub Monitor Window (ui/index.html)
│ ● Live hub status, uptime, clients, sessions
│ ● Running session tracker and inspector
│ ● Recent events and background-session launcher
│
│
├── System Tray Icon with dynamic menu
│ ● Hub Connected — 3 clients, 2 sessions
│ ─────────────────
│ 5 notifications
│ ─────────────────
│ Quit Cline Hub
│
└── Logs notifications to stderr (with severity)
Dev Commands
From apps/examples/menubar/:
bun run dev:ui- run only the Hub Monitor UI athttp://127.0.0.1:3466/with preview databun run dev- run the full Tauri app with the real hub sidecarbun run typecheck- TypeScript check
When the menubar starts the shared hub, it also supplies the CLI command used
to restore persisted connectors. Development builds use
apps/cli/src/index.ts when it is present; packaged builds use cline from
PATH, or the executable specified by CLINE_CLI_PATH.
