Skip to content

Conversation

@zerob13
Copy link
Collaborator

@zerob13 zerob13 commented Aug 11, 2025

  • bum 1.2.20
  • uv 0.8.8
  • @google/genai 1.13.0
  • @modelcontextprotocol/sdk 1.17.2
  • vitest 3.2.4
  • vue 3.5.18
  • vue-i18n 11.1.11
  • zod-to-json-schema 3.24.6
  • Electron 36.7.4

Summary by CodeRabbit

  • Chores
    • Pinned runtime versions for consistent installs across platforms.
    • Added a commit message validation hook.
    • Updated dependencies/devDependencies for stability and security (genAI, model protocol SDK, OpenAI, Electron, Vite, Vitest, Vue, i18n, tooling).
    • Removed pnpm overrides.
    • Added scripts for i18n types generation and runtime cleanup.
    • Excluded a native DB library from bundling to streamline builds.
    • Removed two Tailwind content entries to refine style scanning.
  • Documentation
    • Removed a Rolldown-Vite credit entry from multiple READMEs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

Walkthrough

Pin uv and bun runtime versions in package.json install scripts, add a commit-msg git hook, bump multiple dependencies and devDependencies, remove the pnpm overrides block, add '@duckdb/node-api' to electron.vite.config.ts externals, and remove Rolldown-Vite credits from README files.

Changes

Cohort / File(s) Change Summary
Runtime install scripts
package.json
Added --runtime-version flags to tiny-runtime-injector calls: uv pinned to 0.8.8, bun pinned to v1.2.20 in installRuntime and platform-specific installRuntime:* scripts.
Git hooks
package.json
Added commit-msg hook to simple-git-hooks: "commit-msg": "node scripts/verify-commit.js" alongside existing pre-commit.
Dependencies
package.json
Updated dependencies: @google/genai ^1.5.1 → ^1.13.0, @modelcontextprotocol/sdk ^1.13.1 → ^1.17.2, jsonrepair ^3.12.0 → ^3.13.0, openai ^5.3.0 → ^5.12.2.
DevDependencies
package.json
Updated devDeps: electron ^35.5.1 → ^36.7.4; vite "npm:rolldown-vite@7.0.12"7.1.1; vitest ^3.2.3 → ^3.2.4; vue ^3.5.14 → ^3.5.18; vue-i18n ^11.1.3 → ^11.1.11; zod-to-json-schema ^3.24.5 → ^3.24.6; plus small bumps for autoprefixer, dompurify, lint-staged.
PNPM overrides
package.json / pnpm config
Removed the overrides block entirely (previous vite override removed).
New scripts
package.json
Added i18n:types: node scripts/generate-i18n-types.js and cleanRuntime: rm -rf runtime/uv runtime/bun runtime/node.
Electron build config
electron.vite.config.ts
Added '@duckdb/node-api' to rollupOptions.external alongside existing 'sharp'.
Tailwind config
tailwind.config.js
Removed two content entries referencing vue-renderer-markdown (./node_modules/vue-renderer-markdown/dist/tailwind.ts, ./node_modules/vue-renderer-markdown/dist/index.css).
Docs
README.md, README.jp.md, README.zh.md
Removed the Rolldown-Vite / rolldown-vite credit/entry from README files (documentation-only).

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant CLI as npm/pnpm script
  participant TRI_UV as tiny-runtime-injector (uv 0.8.8)
  participant TRI_BUN as tiny-runtime-injector (bun v1.2.20)

  Dev->>CLI: run installRuntime[:platform]
  CLI->>TRI_UV: inject uv --dir ./runtime/uv --runtime-version 0.8.8
  TRI_UV-->>CLI: uv runtime prepared
  CLI->>TRI_BUN: inject bun --dir ./runtime/bun --runtime-version v1.2.20
  TRI_BUN-->>CLI: bun runtime prepared
  CLI-->>Dev: installation complete
Loading
sequenceDiagram
  participant Dev as Developer
  participant Git as Git
  participant Hook as commit-msg hook
  participant Node as node scripts/verify-commit.js

  Dev->>Git: git commit
  Git->>Hook: trigger commit-msg
  Hook->>Node: run scripts/verify-commit.js
  Node-->>Hook: verification result
  Hook-->>Git: allow or block commit
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Possibly related PRs

Poem

I hop and pin the runtimes tight,
uv and bun sleep through the night.
A tiny hook inspects each name,
deps refreshed — the build’s the same.
Carrot cheers for tidy bytes. 🥕🐇

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bump-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

45-51: Pinning versions is good; consider centralizing and ensuring platform parity.

  • You’ve pinned uv (0.8.8) and bun (v1.2.20) — good for reproducibility. Windows still injects node (no version pin) while other platforms inject bun. If the app expects bun features, Windows may diverge.
  • To avoid drift across 6 nearly-identical scripts, consider a single driver script.

Option A: Keep current approach but verify this is intentional:

  • Confirm Windows must use node instead of bun.
  • If tiny-runtime-injector supports pinning node, consider adding a node version for reproducibility.

Option B: Centralize via a Node script (reduces duplication):

-    "installRuntime": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 && npx -y tiny-runtime-injector --type bun --dir ./runtime/bun --runtime-version v1.2.20",
-    "installRuntime:win:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a x64 -p win32",
-    "installRuntime:win:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a arm64 -p win32",
-    "installRuntime:mac:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p darwin",
-    "installRuntime:mac:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p darwin",
-    "installRuntime:linux:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p linux",
-    "installRuntime:linux:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p linux",
+    "installRuntime": "node scripts/install-runtime.js",
+    "installRuntime:win:x64": "node scripts/install-runtime.js -p win32 -a x64",
+    "installRuntime:win:arm64": "node scripts/install-runtime.js -p win32 -a arm64",
+    "installRuntime:mac:arm64": "node scripts/install-runtime.js -p darwin -a arm64",
+    "installRuntime:mac:x64": "node scripts/install-runtime.js -p darwin -a x64",
+    "installRuntime:linux:x64": "node scripts/install-runtime.js -p linux -a x64",
+    "installRuntime:linux:arm64": "node scripts/install-runtime.js -p linux -a arm64",

Then have scripts/install-runtime.js read desired versions from one place and invoke tiny-runtime-injector consistently (example available on request).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba53ab and 2d99eec.

📒 Files selected for processing (1)
  • package.json (3 hunks)
🔇 Additional comments (7)
package.json (7)

46-47: Windows uses node without a pinned version; confirm or pin for reproducibility.

If tiny-runtime-injector supports --runtime-version for --type node, pin it to the intended Node version for Windows to avoid accidental upgrades. Otherwise, please confirm that leaving it unpinned is intentional.


48-51: Double-check tiny-runtime-injector flags and version strings.

  • bun uses a v prefix (v1.2.20) while uv does not (0.8.8). This looks intentional, but please verify against tiny-runtime-injector’s CLI to avoid fetch failures.
  • Flag order differs across lines (before/after --dir). If the CLI is strict, consider a consistent order.

Would you like me to run a quick doc check via web search for the exact CLI syntax to confirm support for --runtime-version across all types?


165-165: zod-to-json-schema ^3.24.6: LGTM.

Patch bump; low risk. No action needed.


168-170: Commit-msg hook script exists and is cross-platform

  • Found scripts/verify-commit.js in the repo root
  • Implements validation in Node (uses fs, path, and picocolors), with no shell‐specific logic

66-66: Verify MCP SDK upgrade to ^1.17.2: audit transports & behavior

The SDK is now imported in your client, transport, server, and test modules—please run the full test suite and manually confirm that none of the following areas break due to changes in stream handling, tool registration APIs, or protocol schemas:

• package.json (dependency bumped to “@modelcontextprotocol/sdk”: “^1.17.2”)
• src/main/presenter/mcpPresenter/mcpClient.ts (Client + transport imports)
• test/main/presenter/mcpClient.test.ts (all mocked SDK transports)
• All files under src/main/presenter/mcpPresenter/inMemoryServers (Server, types, transport usage)

Ensure types haven’t changed in shared/transport.js, types.js, client/index.js, client/stdio.js, client/sse.js, client/streamableHttp.js, and inMemory.js. Run full integration flows against any in-memory or HTTP/SSE endpoints to catch behavioral regressions.


155-157: Approve devDeps bumps (vitest, vue, vue-i18n)
Minor patch bumps appear safe, configs are intact, and no breaking vue-i18n API changes were detected.

• tsconfig.node.json & tsconfig.web.json extend expected Electron presets without conflicts
• Vitest configs found in vitest.config.ts (Node) and vitest.config.renderer.ts (jsdom)
• vue-i18n usages and mocks in test/setup.renderer.ts remain compatible

Please ensure CI still runs:

  • vitest (node & renderer)
  • vue-tsc type checks
  • All unit/integration tests under test/

No further changes required.


64-64: Verify @google/genai ^1.13.0 upgrade – confirm exports and run type‐check

I’ve located all imports from the upgraded package; please ensure none of these symbols were renamed or had their signatures changed, then run tsc to catch any breakages:

• src/main/presenter/mcpPresenter/index.ts
– ToolListUnion, Type, FunctionDeclaration
• src/main/presenter/llmProviderPresenter/providers/geminiProvider.ts
– SafetySetting, ChatMessage, etc.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d99eec and 0277e8f.

📒 Files selected for processing (2)
  • electron.vite.config.ts (1 hunks)
  • package.json (4 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Use English for logs and comments

Files:

  • electron.vite.config.ts
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Strict type checking enabled for TypeScript

**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别

Files:

  • electron.vite.config.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development-setup.mdc)

**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写

Files:

  • electron.vite.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-check (x64)
🔇 Additional comments (7)
electron.vite.config.ts (2)

26-26: Good call externalizing a native addon

Adding '@duckdb/node-api' to rollup externals for the main process avoids bundling a native module. This aligns with how 'sharp' is handled and prevents runtime load issues.


26-26: DuckDB import specifiers are consistent

All import and dynamic import() statements use the base package @duckdb/node-api; no occurrences of duckdb or subpath imports were found. The external entry in electron.vite.config.ts correctly matches this specifier—no changes needed.

package.json (5)

165-165: zod-to-json-schema bump looks safe

Patch-level bump; no action needed.


64-64: Approve bump to @google/genai@^1.13.0
I’ve searched for all imports from @google/genai (found in src/main/presenter/mcpPresenter/index.ts and src/main/presenter/llmProviderPresenter/providers/geminiProvider.ts) and didn’t spot any immediately deprecated or removed APIs.

• Double-check the v1.13.0 changelog for any breaking changes to ToolListUnion, Type, FunctionDeclaration, Part, or SafetySetting.
• Run your full test suite (and any integration tests) to ensure nothing breaks at runtime.


181-181: pnpm override matches devDependency

Both the devDependency and the pnpm override reference npm:rolldown-vite@7.1.0, ensuring all Vite trees – top­-level and transitive – use the same version. No duplicates detected; no further action needed.

• package.json devDependencies.vite → npm:rolldown-vite@7.1.0
• package.json pnpm.overrides.vite → npm:rolldown-vite@7.1.0


151-151: Verify Vite Ecosystem Plugin Compatibility

I see the following Vite-related entries in package.json:

• electron-vite ^4.0.0
• vite → npm:rolldown-vite@7.1.0 (in both dependencies and overrides)
• vite-plugin-monaco-editor-esm ^2.0.2
• vite-plugin-vue-devtools ^8.0.0
• vite-svg-loader ^5.1.0
• vitest ^3.2.4

Please confirm that each of these plugins officially supports Vite 7.1/rolldown-vite. If any require a different peer range or have known incompatibilities, update or replace them accordingly.


67-67: Approve bump to @modelcontextprotocol/sdk@^1.17.2

1.17.2 is a patch release that only fixes an auth discovery CORS retry issue—no breaking changes or modifications to experimental features were introduced across the 1.17.x series. No further verification needed.

Comment on lines +45 to +51
"installRuntime": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 && npx -y tiny-runtime-injector --type bun --dir ./runtime/bun --runtime-version v1.2.20",
"installRuntime:win:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a x64 -p win32",
"installRuntime:win:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a arm64 -p win32",
"installRuntime:mac:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p darwin",
"installRuntime:mac:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p darwin",
"installRuntime:linux:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p linux",
"installRuntime:linux:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p linux",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Runtime pinning: consider pinning Node on Windows and confirm bun omission

  • Windows scripts inject Node without a --runtime-version. For reproducibility, consider pinning this as well (ideally matching the Node version embedded in your Electron target).
  • Windows variants skip bun while macOS/Linux install bun. If intentional, document the rationale; otherwise consider symmetry.

🏁 Script executed:

#!/bin/bash
# 1) Confirm if any code uses ./runtime/node or bun on Windows-only paths.
rg -n --no-heading -A1 -B1 'runtime/(node|bun)'

# 2) Derive Electron's Node version used at runtime (from package.json) to guide pinning.
rg -n '"electron"\\s*:\\s*".*"' -A0 -B3

# 3) Check tiny-runtime-injector usage docs in repo for Node pinning convention (if any).
rg -n 'tiny-runtime-injector' -A2 -B2

Length of output: 5791


Pin Node on Windows and clarify Bun omission

  • In package.json scripts installRuntime:win:x64 and installRuntime:win:arm64, the Node injector calls lack --runtime-version. For reproducible builds, add --runtime-version <node-version> (e.g. matching your Electron–embedded Node).
  • The Windows install scripts omit Bun while macOS/Linux include it. If Bun isn’t supported on Win32, add a comment explaining the omission; otherwise mirror the Bun injection flags for symmetry.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
package.json (2)

45-51: Pin Node runtime on Windows and clarify Bun omission (repeat from prior feedback)

Windows injectors still lack --runtime-version for Node, and Bun is omitted on Win while present on macOS/Linux. Pin Node for reproducibility (ideally match Electron’s bundled Node) and either add Bun on Win or document why it’s intentionally omitted.

Proposed updates:

-    "installRuntime:win:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a x64 -p win32",
-    "installRuntime:win:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a arm64 -p win32",
+    "installRuntime:win:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node --runtime-version <ELECTRON_NODE_VERSION> -a x64 -p win32 && npx -y tiny-runtime-injector --type bun --dir ./runtime/bun --runtime-version v1.2.20 -a x64 -p win32",
+    "installRuntime:win:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node --runtime-version <ELECTRON_NODE_VERSION> -a arm64 -p win32 && npx -y tiny-runtime-injector --type bun --dir ./runtime/bun --runtime-version v1.2.20 -a arm64 -p win32",

If Bun is intentionally unsupported on Windows, add a short comment in README or a script echo explaining the omission and leave it out.

To determine <ELECTRON_NODE_VERSION>, align with Electron 36.7.4’s embedded Node (use Electron release notes or process.versions.node from a trivial Electron bootstrap).


155-157: Keep @vitest/ui in lockstep with vitest 3.2.4

vitest is ^3.2.4 but @vitest/ui remains ^3.2.3. Align to avoid UI/runtime skew.

-    "@vitest/ui": "^3.2.3",
+    "@vitest/ui": "^3.2.4",
🧹 Nitpick comments (1)
package.json (1)

45-51: Reduce duplication: move runtime injection to a single cross-platform script

Seven near-duplicate npm scripts are hard to maintain. Consider a small Node script to resolve platform/arch and inject uv/bun/node with pinned versions.

Example change in package.json:

-    "installRuntime": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 && npx -y tiny-runtime-injector --type bun --dir ./runtime/bun --runtime-version v1.2.20",
-    "installRuntime:win:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a x64 -p win32",
-    "installRuntime:win:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p win32 && npx -y tiny-runtime-injector --type node --dir ./runtime/node -a arm64 -p win32",
-    "installRuntime:mac:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p darwin",
-    "installRuntime:mac:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p darwin && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p darwin",
-    "installRuntime:linux:x64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a x64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a x64 -p linux",
-    "installRuntime:linux:arm64": "npx -y tiny-runtime-injector --type uv --dir ./runtime/uv --runtime-version 0.8.8 -a arm64 -p linux && npx -y tiny-runtime-injector --type bun --runtime-version v1.2.20 --dir ./runtime/bun -a arm64 -p linux",
+    "installRuntime": "node scripts/install-runtime.js"

Then implement scripts/install-runtime.js to compute platform/arch and run the injector(s) consistently with the pinned versions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c12034 and d04b469.

📒 Files selected for processing (1)
  • package.json (4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-21T01:45:33.790Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T01:45:33.790Z
Learning: Applies to test/**/*.{ts,tsx,js,jsx} : Use Vitest for unit and integration tests

Applied to files:

  • package.json
🔇 Additional comments (4)
package.json (4)

64-67: Confirm no breaking changes in bumped dependencies

We’ve located direct imports of both libraries across the codebase:

  • @google/genai (^1.13.0)
    • src/main/presenter/llmProviderPresenter/providers/geminiProvider.ts
    • src/main/presenter/mcpPresenter/index.ts

  • @modelcontextprotocol/sdk (^1.17.2)
    • src/main/presenter/mcpPresenter/mcpClient.ts
    • src/main/presenter/mcpPresenter/inMemoryServers/* (all server implementations)
    • test/main/presenter/mcpClient.test.ts

Please review the changelogs for these releases and confirm:

  • For @google/genai: no auth/init API changes or response-shape updates that affect existing adapters.
  • For @modelcontextprotocol/sdk: no breaking RPC/schema changes or transport-layer adjustments (client/server/stdio/sse/streamableHttp/inMemory) that require code updates.

165-165: Confirm zodToJsonSchema default options after bump

All zodToJsonSchema(...) calls currently rely on built-in defaults (no options object passed). After upgrading to ^3.24.6, please:

  • Verify that the new default $schema value and target draft/version still meet your requirements.
  • If the defaults have shifted, explicitly pass an options object to each invocation (e.g. { target: 'draft2020-12', $refStrategy: 'none', schemaPath: '/schemas' }).

Key locations to review (search for zodToJsonSchema():
• src/main/presenter/mcpPresenter/inMemoryServers/**/*.ts


151-151: Vite 7.1.1 plugin compatibility validated

Both @vitejs/plugin-vue (^6.0.1) and electron-vite (^4.0.0) declare Vite ^7 support in their peerDependencies. Your existing rollupOptions in electron.vite.config.ts and the default HMR/SSR behavior in vitest.config.renderer.ts remain intentional and compatible—no changes needed.


156-157: i18n type generation and composition API usage validated

  • pnpm i18n:types ran successfully and generated src/types/i18n.d.ts without errors.
  • rg shows createI18n is used only in the renderer entrypoints (shell/main.ts and src/main.ts).
  • All components and stores consume i18n via useI18n; no legacy $t or options-API patterns detected.

@zerob13 zerob13 merged commit d7a5953 into dev Aug 11, 2025
1 check passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
package.json (1)

169-169: New commit-msg hook: verify presence, cross-platform exec, and non-TTY safety

  • ✔️ Confirmed scripts/verify-commit.js exists and is invoked via node, so there’s no need for an executable bit—this works on CI and Windows shells.
  • ⚠️ The script uses picocolors unconditionally, which will emit ANSI codes even in non-TTY environments (e.g. CI). Please guard your color output behind a TTY check or respect standard env vars (NO_COLOR/FORCE_COLOR), for example:
    import pico from 'picocolors'
  • const isTTY = process.stdout.isTTY
  • const c = isTTY
  • ? pico
  • : { red: (s) => s, white: (s) => s, bgRed: (s) => s, green: (s) => s }

if (!commitRE.test(msg)) {
console.error(

  • `  ${pico.white(pico.bgRed(' ERROR '))} ${pico.red(`invalid commit message format.`)}\n\n` +
    
  • `  ${c.white(c.bgRed(' ERROR '))} ${c.red(`invalid commit message format.`)}\n\n` +
    /* … */
    
    )
    process.exit(1)
    }
- 🔄 For greater robustness (worktrees, custom GIT_DIR), consider reading the commit message from the hook’s first argument (`process.argv[2]`) rather than hard-coding `.git/COMMIT_EDITMSG`.

Happy to help add a minimal conventional-commits validator with clear error messages!

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (2)</summary><blockquote>

<details>
<summary>package.json (2)</summary><blockquote>

`45-51`: **Pin Node runtime on Windows and clarify Bun parity on Win32**

Windows `installRuntime:*:win:*` still inject Node without `--runtime-version`, and Bun is omitted on Windows while present on macOS/Linux. This can cause non-reproducible installs and asymmetric behavior across OSes.


- Add `--runtime-version <node-version>` to the Node injector on Windows (ideally matching Electron’s embedded Node for v36). 
- If Bun is intentionally omitted on Windows, add a short comment/rationale in scripts or README. If not, mirror the Bun injector for Win32.

Optionally, pin tiny-runtime-injector itself for reproducibility: use `npx -y tiny-runtime-injector@<pinned>`.

Run this quick audit to see all injector usages and confirm parity:
```shell
#!/bin/bash
rg -n --no-heading -A1 -B1 'tiny-runtime-injector'

131-131: Missing electron-builder setup for Electron 36 and native module rebuilds

Electron 36.7.4 updates the Node/Chromium ABI, but I didn’t find any reference to electron-builder or a postinstall hook in your package.json. To ensure packaging works and native modules (sharp, better-sqlite3-multiple-ciphers) rebuild cleanly:

• package.json – add electron-builder (ideally v26.x released after Electron 36) under devDependencies
• package.json/scripts – add:

"postinstall": "electron-builder install-app-deps"

• Confirm that install-app-deps rebuilds your native modules on all target platforms

Example diff:

--- package.json
+++ package.json
@@
   "scripts": {
+    "postinstall": "electron-builder install-app-deps",
     …
   },
   "devDependencies": {
+    "electron-builder": "^26.5.0",
     …
   },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c261ad7 and 954a264.

📒 Files selected for processing (2)
  • package.json (5 hunks)
  • tailwind.config.js (0 hunks)
💤 Files with no reviewable changes (1)
  • tailwind.config.js
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-21T01:45:33.790Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T01:45:33.790Z
Learning: Applies to test/**/*.{ts,tsx,js,jsx} : Use Vitest for unit and integration tests

Applied to files:

  • package.json
🔇 Additional comments (2)
package.json (2)

124-124: Keep vitest and @vitest/ui in lockstep: good alignment

vitest and @vitest/ui are both at ^3.2.4 now. This avoids UI/runtime skew.

Also applies to: 156-156


64-66: Action Required: Verify SDK & Dependency Upgrades Before Merge

Please scan your codebase for any breaking changes introduced by these bumps and run your test suite to confirm compatibility:

– Dependencies bumped in package.json:
• @google/genai → ^1.13.0
• @modelcontextprotocol/sdk → ^1.17.2
• jsonrepair → ^3.13.0
• openai → ^5.12.2

Run this shell snippet from your repo root to locate any import/require sites and dynamic imports:

#!/usr/bin/env bash
set -e

for pkg in "@google/genai" "@modelcontextprotocol/sdk" "jsonrepair" "openai"; do
  echo "🔍 Checking imports/requires of $pkg"
  rg -n -C2 "from ['\"]$pkg" src test || true
  rg -n -C2 "require\(['\"]$pkg" src test || true
done

echo "🔍 Checking for dynamic import(...) calls"
rg -n -C1 "import\(" src || true

echo "✅ Now run: pnpm test"

– If you spot renamed exports or moved methods, update the call sites accordingly.
– Once the scan shows no issues and all tests pass, this can be merged safely.

"tippy.js": "^6.3.7",
"typescript": "^5.8.3",
"vite": "npm:rolldown-vite@7.0.12",
"vite": "7.1.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Vite 7.1.1: confirm compatibility with electron-vite and plugins

You bumped to Vite 7.1.1. electron-vite (^4) and @vitejs/plugin-vue (^6) should be compatible, but please validate dev/build flows.

  • Local verification steps:

    • pnpm install
    • pnpm dev (hot reload, HMR)
    • pnpm build (ensure no plugin errors)
  • Optional web check:


🌐 Web query:

Does electron-vite v4 support Vite 7? Are there known compatibility caveats?

💡 Result:

Short answer: No — there’s no public electron-vite “v4” release that advertises Vite 7 support, and the current electron-vite line (3.x / the docs) targets Vite 5. There are open requests for Vite 6+ support, so you should expect incompatibilities if you try to jump to Vite 7 today. (npmjs.com, electron-vite.org, github.com)

Details & practical caveats

  • State of releases

    • Vite 7 was released on June 24, 2025. (vite.dev)
    • electron-vite’s published package and docs currently target Vite 5 (the electron-vite package on npm is in the 3.x series as of the latest metadata). There is no official electron-vite v4 release that advertises Vite 7 compatibility. (npmjs.com, electron-vite.org)
  • Known compatibility / migration issues you will hit

    • Peer-dependency conflicts: older electron-vite releases declare peer constraints for older Vite majors (historically ^4/^5), so installing Vite 6/7 can produce npm/yarn resolution errors unless the package’s peerDeps are updated or you force/override resolution. (There are open issues requesting Vite 6 support.) (github.com)
    • ESM / CJS changes: electron-vite moved toward ESM (and Vite’s Node API has been migrating to ESM-only in recent majors). That means config files, package.json "type", output formats, and how main/preload bundles are produced may require changes (rename config to .mjs or add "type":"module", adjust build.lib.formats, etc.). Expect to change your Electron entry/main packaging if you upgrade Vite without an electron-vite release that explicitly supports the Vite major. (electron-vite.org, github.com)
    • Electron preload / nodeIntegration limits: electron-vite already documents caveats around preload sandboxing and not supporting nodeIntegration for renderer (because Vite HMR expects ESM). Upgrading the Vite major can change plugin behavior (resolve/prebundle, externalization, rollup options) that affects how native modules, node: imports, and electron imports are treated. Test carefully. (electron-vite.org)
  • Practical recommendations

    • If you need stability: pin Vite to the highest supported minor for your electron-vite release (e.g., Vite 5.x for electron-vite 3.x) until an official electron-vite release (or plugin update) explicitly states Vite 7 support. (npmjs.com, electron-vite.org)
    • If you want to experiment: try a small blank project, upgrade Vite and run the dev/build flows to surface peer-dep and runtime errors early. Be prepared to adjust config to ESM, change build.lib formats (CJS vs ESM), and update any plugins that have their own Vite peer deps.
    • Watch the electron-vite / vite-plugin-electron repos (changelog/ISSUES) for an announced compatibility release — those are the authoritative signals that a new Vite major is supported. (github.com)

If you want, I can:

  • check the electron-vite GitHub/NPM right now for any newly-published v4 tag or a release note that explicitly adds Vite 7 support, or
  • run through a short upgrade checklist for a sample project (what to change in package.json, electron.vite.config, build.lib.formats, and what tests to run). Which would you prefer?

Citations:


Stop Vite 7 upgrade until electron-vite adds official support

electron-vite’s current stable line (3.x) targets Vite 5 and does not support Vite 7. Bumping to "vite": "7.1.1" will lead to peer-dependency resolution errors and require breaking ESM/CJS config changes in your Electron build.

Action required:

  • Revert or pin Vite to the highest 5.x minor (e.g. "vite": "5.10.x") until an electron-vite release declares Vite 7 compatibility.
  • Watch the electron-vite (and vite-plugin-electron) repos for a “v4” release or changelog entry explicitly adding Vite 7 support.
  • Once an official compatibility release is available, you can:
    • Upgrade Vite and resolve any peerDeps.
    • Rename config files (.mjs / "type":"module"), adjust build.lib.formats, and validate dev/build flows (HMR, ESM preload, plugin behavior).

References:

  • electron-vite on npm: targets Vite 5 (no v4 yet)¹
  • Open issue requesting Vite 6+ support³
  • Vite 7 announced June 2025⁴
🤖 Prompt for AI Agents
In package.json around line 151, Vite was bumped to "7.1.1" but electron-vite
(stable 3.x) targets Vite 5 and does not support Vite 7; revert or pin the vite
dependency to the latest 5.x series (for example "vite": "5.10.x") to avoid
peer-dependency and ESM/CJS breakage, update package.json accordingly and run
install to verify no peer conflicts, add a short comment or task in the repo to
watch electron-vite and vite-plugin-electron for an official v4/Vite‑7
compatibility release and only upgrade to Vite 7 after that release while
following the upgrade checklist (resolve peerDeps, convert configs to ESM if
needed, adjust build.lib.formats and validate HMR/preload behavior).

zerob13 added a commit that referenced this pull request Aug 13, 2025
* fix: add AlertDialogDescription to resolve accessibility warning (#706)

* fix: resolve focus flicker when creating new windows with Ctrl+Shift+N (#707)

* feat: enhance window management by implementing main window ID handling (#709)

* docs: update zhipu developer doc website link (#715)

Co-authored-by: gongchao <chao.gong@aminer.cn>

* refactor: better translate (#716)

* chore: en-us i18n

* chore(i18n): polish ja-JP translations across UI; keep chat.input.placeholder unchanged

* chore(i18n): polish fr-FR translations; keep chat.input.placeholder unchanged

* chore(i18n): refine fr-FR MCP & Settings copy; idiomatic, concise, brand-consistent

* chore(i18n): polish ru-RU translations across UI; keep chat.input.placeholder unchanged

* chore(i18n): polish fa-IR translations across UI; keep chat.input.placeholder unchanged

* chore: fix format

* chore: fix i18n

* chore: lock rolldown-vite version

* feat: add GPT-5 series model support (#717)

* ci(vite): Bundle the main file into a single file to speed up loading. (#718)

* fix(math): parser by upgrade vue-renderer-markdown (#722)

* chore: bump deps (#721)

* chore: bump deps

* fix: rolldown-vite 7.1.0 and duckdb bundle issue

* chore: back to vite

* chore: update electron

* chore: update versions

* fix(math): parser by upgrade vue-renderer-markdown (#722)

* chore: bump deps

---------

Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>

* fix: add scrollable support to PopoverContent to prevent overflow (#720)

* feat: implement floating chat window system with performance optimization (#724)

* feat: add mcp sync and modelscope provider #615 (#723)

* wip: add modelscope provider

* feat: add mcp sync to modelscope

* fix: add scrollable support to PopoverContent to prevent overflow (#720)

* feat: implement floating chat window system with performance optimization (#724)

* chore: i18n and format

* feat: better style

* fix: mcp tool display

---------

Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>

* fix: move_files newPath parse issue (#725)

* fix: move_files newPath 参数计算规则

* fix: move_files 移动前需要判断dest是目录还是文件

* feat: add Claude Opus 4.1 to anthropic default model list (#726)

* feat: Add mcprouter's MCP marketplace api support (#727)

* wip: add mcp market

* feat: mcp market install

* wip: mcp install status sync

* feat: mcp server config mask

* chore: remove working doc

* chore: add translate

* feat: add ESC key to close floating chat window (#728)

* feat: add floating button position persistence with boundary validation (#729)

* feat: add floating button position persistence with boundary validation

* feat: refactor floating button to use electron-window-state

* chore: bump to 0.3.0

* feat: add reasoning_effort parameter support for gpt-oss models (#731)

* feat: add reasoning_effort parameter support for gpt-oss models

- add reasoning effort UI support across all components

* fix: preserve user reasoning effort settings and improve display logic

* fix: artifacts code not streaming (#732)

* fix: artifact react load failed

* chore: remove log

* fix: artifacts code not stream

* fix: format

---------

Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>
Co-authored-by: hllshiro <40970081+hllshiro@users.noreply.github.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: gongchao <chao.gong@aminer.cn>
Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
Co-authored-by: wanna <wanna.w@binarywalk.com>
zerob13 added a commit that referenced this pull request Aug 13, 2025
* fix: add AlertDialogDescription to resolve accessibility warning (#706)

* fix: resolve focus flicker when creating new windows with Ctrl+Shift+N (#707)

* feat: enhance window management by implementing main window ID handling (#709)

* docs: update zhipu developer doc website link (#715)

Co-authored-by: gongchao <chao.gong@aminer.cn>

* refactor: better translate (#716)

* chore: en-us i18n

* chore(i18n): polish ja-JP translations across UI; keep chat.input.placeholder unchanged

* chore(i18n): polish fr-FR translations; keep chat.input.placeholder unchanged

* chore(i18n): refine fr-FR MCP & Settings copy; idiomatic, concise, brand-consistent

* chore(i18n): polish ru-RU translations across UI; keep chat.input.placeholder unchanged

* chore(i18n): polish fa-IR translations across UI; keep chat.input.placeholder unchanged

* chore: fix format

* chore: fix i18n

* chore: lock rolldown-vite version

* feat: add GPT-5 series model support (#717)

* ci(vite): Bundle the main file into a single file to speed up loading. (#718)

* fix(math): parser by upgrade vue-renderer-markdown (#722)

* chore: bump deps (#721)

* chore: bump deps

* fix: rolldown-vite 7.1.0 and duckdb bundle issue

* chore: back to vite

* chore: update electron

* chore: update versions

* fix(math): parser by upgrade vue-renderer-markdown (#722)

* chore: bump deps

---------

Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>

* fix: add scrollable support to PopoverContent to prevent overflow (#720)

* feat: implement floating chat window system with performance optimization (#724)

* feat: add mcp sync and modelscope provider #615 (#723)

* wip: add modelscope provider

* feat: add mcp sync to modelscope

* fix: add scrollable support to PopoverContent to prevent overflow (#720)

* feat: implement floating chat window system with performance optimization (#724)

* chore: i18n and format

* feat: better style

* fix: mcp tool display

---------

Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>

* fix: move_files newPath parse issue (#725)

* fix: move_files newPath 参数计算规则

* fix: move_files 移动前需要判断dest是目录还是文件

* feat: add Claude Opus 4.1 to anthropic default model list (#726)

* feat: Add mcprouter's MCP marketplace api support (#727)

* wip: add mcp market

* feat: mcp market install

* wip: mcp install status sync

* feat: mcp server config mask

* chore: remove working doc

* chore: add translate

* feat: add ESC key to close floating chat window (#728)

* feat: add floating button position persistence with boundary validation (#729)

* feat: add floating button position persistence with boundary validation

* feat: refactor floating button to use electron-window-state

* chore: bump to 0.3.0

* feat: add reasoning_effort parameter support for gpt-oss models (#731)

* feat: add reasoning_effort parameter support for gpt-oss models

- add reasoning effort UI support across all components

* fix: preserve user reasoning effort settings and improve display logic

* fix: artifacts code not streaming (#732)

* fix: artifact react load failed

* chore: remove log

* fix: artifacts code not stream

* fix: format

* feat: disable automatic model enabling for better UX (#734)

* feat: sync provider sorting from settings to model selection (#736)

* feat: sync provider sorting from settings to model selection

* feat: refactor ModelSelect to use computed providers for better reactivity

---------

Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>
Co-authored-by: hllshiro <40970081+hllshiro@users.noreply.github.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: gongchao <chao.gong@aminer.cn>
Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
Co-authored-by: wanna <wanna.w@binarywalk.com>
@coderabbitai coderabbitai bot mentioned this pull request Sep 3, 2025
@zerob13 zerob13 deleted the chore/bump-deps branch September 21, 2025 15:15
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.

3 participants