Skip to content

Develop - #2

Merged
Premchand006 merged 2 commits into
mainfrom
develop
Jul 2, 2026
Merged

Develop#2
Premchand006 merged 2 commits into
mainfrom
develop

Conversation

@Premchand006

Copy link
Copy Markdown
Owner

No description provided.

Prem Chand 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.
Copilot AI review requested due to automatic review settings July 2, 2026 05:33
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for modelvisio ready!

Name Link
🔨 Latest commit 9e63126
🔍 Latest deploy log https://app.netlify.com/projects/modelvisio/deploys/6a45f814c12a8600077df3c8
😎 Deploy Preview https://deploy-preview-2--modelvisio.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/chat through 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 thread apps/web/src/tauri.ts
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);
@Premchand006
Premchand006 merged commit f5b9bde into main Jul 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants