Skip to content

Update version to 0.1.3 in package.json, enhance error messages in AI… - #85

Merged
yashdev9274 merged 2 commits into
mainfrom
supercode-web
Jun 8, 2026
Merged

Update version to 0.1.3 in package.json, enhance error messages in AI…#85
yashdev9274 merged 2 commits into
mainfrom
supercode-web

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

… 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

    • Added validation for AI provider configuration that returns detailed setup instructions when API keys are missing.
  • Bug Fixes

    • Improved error messages for Google, Nvidia, Minimax, and OpenRouter API key configuration issues with environment variable names and setup links.
  • Chores

    • Bumped CLI package version to 0.1.3.

… services to provide clearer configuration instructions, and refactor provider logic to include environment variable hints for Google, MiniMax, OpenRouter, and NVIDIA services.
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
supercli Ready Ready Preview, Comment Jun 8, 2026 7:14am
supercli-client Ready Ready Preview, Comment Jun 8, 2026 7:14am
supercli-docs Ready Ready Preview, Comment Jun 8, 2026 7:14am

@greptile-apps greptile-apps Bot 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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yashdev9274, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: db34ee6a-f32a-4034-bd9d-0c3f1f9faf91

📥 Commits

Reviewing files that changed from the base of the PR and between 2b3ebf6 and eb05648.

📒 Files selected for processing (2)
  • apps/supercode-cli/server/src/cli/main.ts
  • package.json

Walkthrough

CLI 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.

Changes

Provider Configuration Validation and Package Infrastructure

Layer / File(s) Summary
Package version, build configuration, and dependency refactoring
apps/supercode-cli/server/package.json, package.json
CLI package version bumped to 0.1.3; build script adjusted; dependencies restructured by moving @prisma/client, @prisma/adapter-pg, and related packages from dependencies to devDependencies; prisma and typescript added as dev tools. Root package.json removes a stray "-" dependency.
Provider configuration validation and fallback mechanism
apps/supercode-cli/server/src/cli/ai/provider.ts
createProvider now imports provider config modules and checks whether the selected provider's API key is configured before instantiation. If unconfigured, returns a fallback AIProvider that throws a detailed error message with environment variable name and setup links.
Enhanced provider service error messages
apps/supercode-cli/server/src/cli/ai/google-service.ts, apps/supercode-cli/server/src/cli/ai/minimax-service.ts, apps/supercode-cli/server/src/cli/ai/nvidia-service.ts, apps/supercode-cli/server/src/cli/ai/openrouter-service.ts
Provider service constructors now throw detailed error messages that name the required environment variable and include setup instructions or documentation links instead of generic messages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 With config gates so firm and true,
The CLI speaks in voices new—
"Set your keys," it kindly cries,
With helpful links before your eyes.
From devDeps to cleaner build,
The rabbit's work with care is filled.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: version bump to 0.1.3 and enhanced error messages in AI services with environment variable hints.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch supercode-web

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0542916 and 2b3ebf6.

📒 Files selected for processing (7)
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/src/cli/ai/google-service.ts
  • apps/supercode-cli/server/src/cli/ai/minimax-service.ts
  • apps/supercode-cli/server/src/cli/ai/nvidia-service.ts
  • apps/supercode-cli/server/src/cli/ai/openrouter-service.ts
  • apps/supercode-cli/server/src/cli/ai/provider.ts
  • package.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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

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.

Suggested change
"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.

Comment on lines +69 to +70
"prisma": "^7.4.2",
"typescript": "^5.7.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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}")
PY

Repository: yashdev9274/supercli

Length of output: 1544


Align Prisma package versions to the same release line.

  • apps/supercode-cli/server/package.json: prisma is ^7.4.2 while @prisma/client and @prisma/adapter-pg are ^7.8.0 (v/skew within the same manifest).
  • apps/web/package.json: prisma is ^7.2.0 while @prisma/client and @prisma/adapter-pg are ^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.

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.

1 participant