mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 21:57:06 +00:00
A cross-platform (macOS/Windows/Linux) menubar/tray app with a global hotkey (Cmd/Ctrl+Shift+Space) that pops a Hanzo assistant over any app. Ask, summarize the clipboard, rewrite, explain, translate, fix grammar — streamed over api.hanzo.ai via the published @hanzo/ai. Built on Tauri v2 (Rust shell + web frontend), not Electron. Reuses the raycast/office design one-to-one: pure host-agnostic action catalog (actions.ts — prompts, clipboard-context assembly/truncation, message shaping, reply parsing), a thin @hanzo/ai wrapper (hanzo.ts — run/stream/list), a local settings store (store.ts — hk- key + model, parse/merge/serialize), and the only Tauri-touching module (clipboard.ts). app.ts is glue with one run path serving the panel, the tray quick actions, and the hotkey. Rust shell (src-tauri): tray + menu, global-shortcut toggle, spotlight window (small, always-on-top, hidden-on-blur), and hide_window/paste commands (enigo synthesizes Cmd/Ctrl+V so rewrite/translate/fix land over the frontmost app). The hk- key lives only in the webview's local store and is validated before use; CSP allows connecting only to api.hanzo.ai. Frontend builds with esbuild + tsc clean; 66 vitest tests green. Native installers (.dmg/.msi/.AppImage) are a per-OS CI job (tauri build) — never built locally. Registers packages/desktop in pnpm-workspace.yaml.
21 lines
565 B
JSON
21 lines
565 B
JSON
{
|
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"types": ["node"],
|
|
"strict": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"resolveJsonModule": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"verbatimModuleSyntax": true
|
|
},
|
|
"include": ["src/**/*.ts", "test/**/*.ts", "build.js"],
|
|
"exclude": ["dist", "src-tauri"]
|
|
}
|