Develop - #2
Merged
Merged
Conversation
added 2 commits
July 2, 2026 10:40
- Package the Tauri desktop app into a Windows NSIS installer (v1.0.0) - AI copilot uses the user's own Gemini key (entered in-app, stored locally); no key bundled in the binary - Website Download button links to a stable GitHub Release asset; release workflow uploads a fixed-name installer - Hide the desktop/VS Code download buttons inside the desktop app itself - Expand README: contributing, add-ons, issues, and PR guidance
pnpm/action-setup@v4 now errors when both a 'version' input and package.json 'packageManager' are set (ERR_PNPM_BAD_PM_VERSION), failing the build before install. Drop the version pin so it reads pnpm@10.29.3 from packageManager. Bump CI Node 20->22 to match local and clear the runner's Node-20 deprecation.
✅ Deploy Preview for modelvisio ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the desktop (Tauri) AI copilot flow to support bring-your-own Gemini API keys (entered in-app and passed to the Rust command), and improves distribution/docs by adding a stable desktop download URL and release workflow support.
Changes:
- Add desktop-only Gemini API key storage helpers and expose them from
@modelvisio/core. - Add a desktop-only UI panel in the Chat component to set/clear the key, and route
/api/chatthrough the Tauri Rust command with the user-supplied key. - Update desktop release/build workflows and links to support a stable Windows installer download URL; bump desktop version metadata to
1.0.0.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Expands contributing/dev setup guidance and updates license attribution. |
| packages/core/src/utils/apiKey.ts | Adds desktop-only API key storage/detection helpers (localStorage-based). |
| packages/core/src/index.ts | Re-exports the new API key helpers from core. |
| packages/core/src/data/links.ts | Updates default desktop download URL to a stable “latest/download” asset URL. |
| packages/core/src/components/Chat.tsx | Adds desktop-only key entry UI and blocks desktop chat until a key is set. |
| packages/core/src/App.tsx | Replaces “coming soon” desktop download button with an external link; hides it in desktop app. |
| apps/web/src/tauri.ts | Intercepts /api/chat in Tauri, drops telemetry beacons, and forwards chat to Rust with the user key. |
| apps/desktop/src-tauri/tauri.conf.json | Bumps Tauri app version to 1.0.0. |
| apps/desktop/src-tauri/src/lib.rs | Updates chat command to accept an API key argument with env-var fallback. |
| apps/desktop/src-tauri/Cargo.toml | Bumps Rust crate version to 1.0.0. |
| apps/desktop/src-tauri/Cargo.lock | Adds the Cargo lockfile for the desktop Rust project. |
| .github/workflows/desktop-release.yml | Updates Node version and adds a stable-named Windows installer upload step. |
| .github/workflows/desktop-build-check.yml | Updates Node version and aligns pnpm setup behavior with root packageManager pin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+71
to
76
| // Bring-your-own-key: read the user's locally-stored Gemini key and hand it | ||
| // to the Rust command (which never stores or bundles a key of its own). | ||
| let apiKey = ""; | ||
| try { apiKey = localStorage.getItem(GEMINI_KEY_STORAGE) ?? ""; } catch { /* ignore */ } | ||
| return invoke("chat", { apiKey, system: body.system ?? "", messages: body.messages }) | ||
| .then((r) => new Response(JSON.stringify(r as ChatReply), { status: 200, headers: { "content-type": "application/json" } })) |
Comment on lines
89
to
+91
| <span style={{ width: 6, height: 6, borderRadius: "50%", background: t.suc, display: "inline-block" }} />AI Copilot | ||
| <span style={{ marginLeft: "auto", fontSize: 8, color: t.t3, fontWeight: 400 }}>edge-ML expert · cites sources</span> | ||
| {desktop && <button type="button" onClick={openKeyPanel} title={hasKey ? "Gemini API key set — click to change" : "Set your Gemini API key"} style={{ marginLeft: 4, padding: "2px 6px", borderRadius: 5, border: `1px solid ${hasKey ? t.bdr : t.acc}`, background: "transparent", color: hasKey ? t.t2 : t.acc, fontSize: 9, fontWeight: 600, cursor: "pointer" }}>🔑{hasKey ? "" : " Set key"}</button>} |
Comment on lines
+95
to
+97
| <div style={{ display: "flex", gap: 4 }}> | ||
| <input type="password" value={keyInput} onChange={(e) => setKeyInput(e.target.value)} onKeyDown={(e) => e.key === "Enter" && saveKey()} placeholder="AIza…" style={{ flex: 1, padding: "6px 8px", borderRadius: 5, border: `1px solid ${t.bdr}`, background: t.bg, color: t.t0, fontSize: 10, outline: "none" }} /> | ||
| <button type="button" onClick={saveKey} style={{ padding: "6px 12px", borderRadius: 5, border: "none", background: t.acc, color: "#fff", fontSize: 10, fontWeight: 600, cursor: "pointer" }}>Save</button> |
Comment on lines
+28
to
+32
| export function setUserApiKey(key: string): void { | ||
| try { | ||
| const k = key.trim(); | ||
| if (k) localStorage.setItem(GEMINI_KEY_STORAGE, k); | ||
| else localStorage.removeItem(GEMINI_KEY_STORAGE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.