Update version to 0.1.3 in package.json, enhance error messages in AI… - #85
Conversation
… services to provide clearer configuration instructions, and refactor provider logic to include environment variable hints for Google, MiniMax, OpenRouter, and NVIDIA services.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Warning Review limit reached
More reviews will be available in 45 minutes and 24 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughCLI package version 0.1.3 refactors dependencies by moving Prisma packages to dev dependencies, adds provider configuration validation before service instantiation, and enhances provider error messages with environment variable names and setup documentation links. ChangesProvider Configuration Validation and Package Infrastructure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/supercode-cli/server/package.json`:
- Line 14: The build:cli npm script uses a BSD-only sed invocation ("sed -i ''")
which breaks on GNU sed; update the "build:cli" script (the build:cli entry that
targets dist/main.js) to perform a portable shebang rewrite — e.g., run sed with
an explicit backup suffix (sed -i.bak -e 's|#!/usr/bin/env bun|#!/usr/bin/env
node|') and then remove the .bak file, or replace the sed step with a small
Node/Python one-liner that rewrites the shebang in dist/main.js; ensure you
update the build:cli script so it works on both Linux and macOS CI environments.
- Around line 69-70: Update the prisma dependency so it matches the
`@prisma/client` and `@prisma/adapter-pg` release line (e.g., change "prisma" from
^7.4.2 and ^7.2.0 to ^7.8.0) in the package.json manifests where they diverge
(ensure the "prisma" entry aligns with the existing "`@prisma/client`" and
"`@prisma/adapter-pg`" versions), then reinstall/update lockfiles (npm install or
yarn) so the lockfile reflects the aligned Prisma versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 948555e5-fa81-4615-929b-067996c983eb
📒 Files selected for processing (7)
apps/supercode-cli/server/package.jsonapps/supercode-cli/server/src/cli/ai/google-service.tsapps/supercode-cli/server/src/cli/ai/minimax-service.tsapps/supercode-cli/server/src/cli/ai/nvidia-service.tsapps/supercode-cli/server/src/cli/ai/openrouter-service.tsapps/supercode-cli/server/src/cli/ai/provider.tspackage.json
💤 Files with no reviewable changes (1)
- package.json
| "start": "bun src/index.ts", | ||
| "build": "bun run build:cli", | ||
| "build:cli": "bun build --target node --outdir dist --entry ./src/cli/main.ts && sed -i '' 's|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/main.js", | ||
| "build:cli": "bun build --target node --packages bundle --outdir dist --entry ./src/cli/main.ts && sed -i '' 's|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/main.js", |
There was a problem hiding this comment.
Make the shebang rewrite step portable across Linux/macOS.
Line [14] uses sed -i '', which is BSD-specific and fails on GNU sed (common CI/release runners). This can break build:cli outside macOS.
Suggested portable script update
- "build:cli": "bun build --target node --packages bundle --outdir dist --entry ./src/cli/main.ts && sed -i '' 's|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/main.js",
+ "build:cli": "bun build --target node --packages bundle --outdir dist --entry ./src/cli/main.ts && { printf '%s\n' '#!/usr/bin/env node'; tail -n +2 dist/main.js; } > dist/main.tmp && mv dist/main.tmp dist/main.js && chmod +x dist/main.js",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "build:cli": "bun build --target node --packages bundle --outdir dist --entry ./src/cli/main.ts && sed -i '' 's|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/main.js", | |
| "build:cli": "bun build --target node --packages bundle --outdir dist --entry ./src/cli/main.ts && { printf '%s\n' '#!/usr/bin/env node'; tail -n +2 dist/main.js; } > dist/main.tmp && mv dist/main.tmp dist/main.js && chmod +x dist/main.js", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/supercode-cli/server/package.json` at line 14, The build:cli npm script
uses a BSD-only sed invocation ("sed -i ''") which breaks on GNU sed; update the
"build:cli" script (the build:cli entry that targets dist/main.js) to perform a
portable shebang rewrite — e.g., run sed with an explicit backup suffix (sed
-i.bak -e 's|#!/usr/bin/env bun|#!/usr/bin/env node|') and then remove the .bak
file, or replace the sed step with a small Node/Python one-liner that rewrites
the shebang in dist/main.js; ensure you update the build:cli script so it works
on both Linux and macOS CI environments.
| "prisma": "^7.4.2", | ||
| "typescript": "^5.7.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Prisma-related declarations =="
rg -n '"(`@prisma/client`|`@prisma/adapter-pg`|prisma)"\s*:' --iglob '**/package.json'
echo
echo "== Parsed versions by package.json =="
python - <<'PY'
import json
from pathlib import Path
keys = {"prisma", "`@prisma/client`", "`@prisma/adapter-pg`"}
for p in Path(".").rglob("package.json"):
try:
data = json.loads(p.read_text())
except Exception:
continue
found = {}
for sec in ("dependencies", "devDependencies", "peerDependencies", "optionalDependencies"):
for k, v in data.get(sec, {}).items():
if k in keys:
found[k] = f"{v} ({sec})"
if found:
print(f"{p}: {found}")
PYRepository: yashdev9274/supercli
Length of output: 1544
Align Prisma package versions to the same release line.
apps/supercode-cli/server/package.json:prismais^7.4.2while@prisma/clientand@prisma/adapter-pgare^7.8.0(v/skew within the same manifest).apps/web/package.json:prismais^7.2.0while@prisma/clientand@prisma/adapter-pgare^7.8.0.
Update prisma to the same Prisma release line as @prisma/client/@prisma/adapter-pg (likely ^7.8.0) in the affected package.json files.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/supercode-cli/server/package.json` around lines 69 - 70, Update the
prisma dependency so it matches the `@prisma/client` and `@prisma/adapter-pg`
release line (e.g., change "prisma" from ^7.4.2 and ^7.2.0 to ^7.8.0) in the
package.json manifests where they diverge (ensure the "prisma" entry aligns with
the existing "`@prisma/client`" and "`@prisma/adapter-pg`" versions), then
reinstall/update lockfiles (npm install or yarn) so the lockfile reflects the
aligned Prisma versions.
… in main.ts to reflect package version.
… services to provide clearer configuration instructions, and refactor provider logic to include environment variable hints for Google, MiniMax, OpenRouter, and NVIDIA services.
Summary by CodeRabbit
New Features
Bug Fixes
Chores