feat(desktop): v1.0.0 installer, bring-your-own-key AI, website download - #1
Closed
Premchand006 wants to merge 1 commit into
Closed
feat(desktop): v1.0.0 installer, bring-your-own-key AI, website download#1Premchand006 wants to merge 1 commit into
Premchand006 wants to merge 1 commit into
Conversation
- 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
✅ 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 prepares the ModelVisio desktop app for a v1.0.0 Windows installer release, switches the desktop AI copilot to a bring-your-own-key (Gemini) flow, and updates the website download behavior to point at a stable “latest release asset” URL.
Changes:
- Add shared BYOK key helpers in core and expose a desktop-only key entry UI in the Chat component.
- Route desktop
/api/chatthrough Tauri with the user-supplied key passed to the Rustchatcommand (with env fallback for dev). - Update distribution links and the desktop release workflow to upload a fixed-name Windows installer asset for
/releases/latest/download/....
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Expands contributing/PR guidance and updates license attribution. |
| packages/core/src/utils/apiKey.ts | Introduces desktop BYOK key storage helpers and desktop environment detection. |
| packages/core/src/index.ts | Re-exports BYOK helpers from core’s public API. |
| packages/core/src/data/links.ts | Updates the default desktop download URL to a stable “latest release download” asset link. |
| packages/core/src/components/Chat.tsx | Adds desktop-only key management UI and blocks chat send when no key is set. |
| packages/core/src/App.tsx | Hides download buttons inside the desktop shell and links desktop download to the stable asset URL. |
| apps/web/src/tauri.ts | Passes the locally-stored BYOK key into the Rust chat command and drops non-chat beacons. |
| apps/desktop/src-tauri/tauri.conf.json | Bumps Tauri app version to 1.0.0. |
| apps/desktop/src-tauri/src/lib.rs | Updates the Tauri chat command to accept a per-request key (with env 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 workspace. |
| .github/workflows/desktop-release.yml | Uploads a stable-named Windows installer asset for “latest release” downloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18
to
+32
| /** The user's stored Gemini key, or "" if none set. Never throws. */ | ||
| export function getUserApiKey(): string { | ||
| try { | ||
| return (typeof localStorage !== "undefined" && localStorage.getItem(GEMINI_KEY_STORAGE)) || ""; | ||
| } catch { | ||
| return ""; | ||
| } | ||
| } | ||
|
|
||
| /** Persist the user's Gemini key, or clear it when blank. Never throws. */ | ||
| 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); |
| <div style={{ padding: "6px 10px", borderBottom: `1px solid ${t.bdr}`, fontSize: 11, fontWeight: 600, color: t.t0, display: "flex", alignItems: "center", gap: 5 }}> | ||
| <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
33
to
37
| /// AI copilot proxy for the desktop app. Holds GEMINI_API_KEY on the Rust side | ||
| /// (read from the environment that launched the app) so it never reaches the | ||
| /// WebView, and calls the Gemini API — the desktop mirror of the web /api/chat | ||
| /// serverless function. The frontend (apps/web/src/tauri.ts) routes its | ||
| /// /api/chat POST here via `invoke("chat", ...)`. |
Comment on lines
+125
to
+130
| # Attach a STABLE, version-independent filename for the Windows installer so | ||
| # the website's Download button can link to a URL that never changes: | ||
| # /releases/latest/download/ModelVisio-Windows-x64-setup.exe | ||
| # (always resolves to the newest PUBLISHED release). tauri-action names the | ||
| # asset with the version (ModelVisio_1.2.3_x64-setup.exe); this uploads a | ||
| # fixed-name copy alongside it on the same draft release. |
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.
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