Skip to content

Supercode cli - #296

Merged
yashdev9274 merged 2 commits into
mainfrom
supercode-cli
Sep 7, 2026
Merged

Supercode cli#296
yashdev9274 merged 2 commits into
mainfrom
supercode-cli

Conversation

@yashdev9274

Copy link
Copy Markdown
Owner

Description

Please include a summary of the change and which issue is fixed.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • bun test passes
  • bun run typecheck passes
  • bun run lint passes (if applicable)

Checklist:

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

yashdev9274 and others added 2 commits September 6, 2026 22:08
Authenticated Spark users were blocked with plan_limit_exceeded because
signup never created free subscription rows. ensureSparkSubscription now
runs on gate miss, fail-open stays Spark-tier, and desktop sidebar gains
Clear session.

Co-Authored-By: Warp <agent@warp.dev>
- Bumped version to 0.1.100 in package.json.
- Removed deprecated GitHub, Linear, and Slack connection files.
- Introduced a new script for granting Spark Premium subscriptions to users.
- Refactored agent service and related files to streamline agent management and permissions.
- Added new agent definitions and improved prompt handling for better integration.
@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Too many files changed for review (127 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
supercli Ready Ready Preview Sep 7, 2026 12:35pm UTC
supercli-client Ready Ready Preview Sep 7, 2026 12:35pm UTC
supercli-docs Ready Ready Preview Sep 7, 2026 12:35pm UTC
vercel-supercodeai-integration Ready Ready Preview Sep 7, 2026 12:35pm UTC

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 127 files, which is 27 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: c46c1689-c499-4443-a92f-3500d11e130f

📥 Commits

Reviewing files that changed from the base of the PR and between 79aae29 and d27dcb2.

📒 Files selected for processing (127)
  • apps/supercode-cli/server/agent/connections/github.ts
  • apps/supercode-cli/server/agent/connections/linear.ts
  • apps/supercode-cli/server/agent/connections/slack.ts
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/prisma/grant-spark-premium.ts
  • apps/supercode-cli/server/src/agent/agent-service.ts
  • apps/supercode-cli/server/src/agent/agent.ts
  • apps/supercode-cli/server/src/agent/built-in.ts
  • apps/supercode-cli/server/src/agent/index.ts
  • apps/supercode-cli/server/src/agent/prompt-loader.ts
  • apps/supercode-cli/server/src/agent/runner.ts
  • apps/supercode-cli/server/src/agent/singleton.ts
  • apps/supercode-cli/server/src/agent/subagent-permissions.ts
  • apps/supercode-cli/server/src/agents/README.md
  • apps/supercode-cli/server/src/agents/agent.ts
  • apps/supercode-cli/server/src/agents/connectors/registry.ts
  • apps/supercode-cli/server/src/agents/connectors/types.ts
  • apps/supercode-cli/server/src/agents/hooks/index.ts
  • apps/supercode-cli/server/src/agents/index.ts
  • apps/supercode-cli/server/src/agents/instructions.md
  • apps/supercode-cli/server/src/agents/instrumentation.ts
  • apps/supercode-cli/server/src/agents/lib/approval.ts
  • apps/supercode-cli/server/src/agents/lib/define.ts
  • apps/supercode-cli/server/src/agents/lib/discover.ts
  • apps/supercode-cli/server/src/agents/lib/harness.ts
  • apps/supercode-cli/server/src/agents/lib/subagent-permissions.ts
  • apps/supercode-cli/server/src/agents/lib/types.ts
  • apps/supercode-cli/server/src/agents/sandbox/policy.ts
  • apps/supercode-cli/server/src/agents/service.ts
  • apps/supercode-cli/server/src/agents/subagents/compaction/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/compaction/instructions.md
  • apps/supercode-cli/server/src/agents/subagents/explore/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/explore/instructions.md
  • apps/supercode-cli/server/src/agents/subagents/general/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/general/instructions.md
  • apps/supercode-cli/server/src/agents/subagents/plan/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/plan/instructions.md
  • apps/supercode-cli/server/src/agents/subagents/summary/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/summary/instructions.md
  • apps/supercode-cli/server/src/agents/subagents/title/agent.ts
  • apps/supercode-cli/server/src/agents/subagents/title/instructions.md
  • apps/supercode-cli/server/src/agents/tools/code_exec.ts
  • apps/supercode-cli/server/src/agents/tools/crisp_audit.ts
  • apps/supercode-cli/server/src/agents/tools/crisp_debt.ts
  • apps/supercode-cli/server/src/agents/tools/crisp_gain.ts
  • apps/supercode-cli/server/src/agents/tools/crisp_review.ts
  • apps/supercode-cli/server/src/agents/tools/delegate.ts
  • apps/supercode-cli/server/src/agents/tools/edit_file.ts
  • apps/supercode-cli/server/src/agents/tools/exa_fetch.ts
  • apps/supercode-cli/server/src/agents/tools/exa_search.ts
  • apps/supercode-cli/server/src/agents/tools/firecrawl_map.ts
  • apps/supercode-cli/server/src/agents/tools/firecrawl_scrape.ts
  • apps/supercode-cli/server/src/agents/tools/firecrawl_search.ts
  • apps/supercode-cli/server/src/agents/tools/question.ts
  • apps/supercode-cli/server/src/agents/tools/read_file.ts
  • apps/supercode-cli/server/src/agents/tools/read_instructions.ts
  • apps/supercode-cli/server/src/agents/tools/registry.ts
  • apps/supercode-cli/server/src/agents/tools/run_command.ts
  • apps/supercode-cli/server/src/agents/tools/search_files.ts
  • apps/supercode-cli/server/src/agents/tools/skill.ts
  • apps/supercode-cli/server/src/agents/tools/switch_to_agent_mode.ts
  • apps/supercode-cli/server/src/agents/tools/todowrite.ts
  • apps/supercode-cli/server/src/agents/tools/url_fetch.ts
  • apps/supercode-cli/server/src/agents/tools/web_search.ts
  • apps/supercode-cli/server/src/agents/tools/write_file.ts
  • apps/supercode-cli/server/src/cli/ai/chat/chat.ts
  • apps/supercode-cli/server/src/cli/ai/chat/chatAgent.ts
  • apps/supercode-cli/server/src/cli/ai/chat/step-status-row.ts
  • apps/supercode-cli/server/src/cli/ai/chat/thinking.ts
  • apps/supercode-cli/server/src/cli/ai/concentrate-service.ts
  • apps/supercode-cli/server/src/cli/ai/openrouter-service.ts
  • apps/supercode-cli/server/src/cli/ai/server-proxy-service.ts
  • apps/supercode-cli/server/src/cli/ai/tools-util.ts
  • apps/supercode-cli/server/src/cli/commands/login.ts
  • apps/supercode-cli/server/src/evals/harness.test.ts
  • apps/supercode-cli/server/src/index.ts
  • apps/supercode-cli/server/src/lib/__tests__/embedded-tool-calls.test.ts
  • apps/supercode-cli/server/src/lib/__tests__/subscription-check.test.ts
  • apps/supercode-cli/server/src/lib/api-client.ts
  • apps/supercode-cli/server/src/lib/embedded-tool-calls.ts
  • apps/supercode-cli/server/src/lib/load-env.ts
  • apps/supercode-cli/server/src/lib/openai-compatible-stream.ts
  • apps/supercode-cli/server/src/lib/plan-gate.ts
  • apps/supercode-cli/server/src/lib/subscription-check.ts
  • apps/supercode-cli/server/src/mcp/mcp-manager.ts
  • apps/supercode-cli/server/src/tools/__tests__/permission-prompt.test.ts
  • apps/supercode-cli/server/src/tools/definitions/code-exec.ts
  • apps/supercode-cli/server/src/tools/definitions/crisp-audit.ts
  • apps/supercode-cli/server/src/tools/definitions/crisp-debt.ts
  • apps/supercode-cli/server/src/tools/definitions/crisp-gain.ts
  • apps/supercode-cli/server/src/tools/definitions/crisp-review.ts
  • apps/supercode-cli/server/src/tools/definitions/delegate.ts
  • apps/supercode-cli/server/src/tools/definitions/edit-file.ts
  • apps/supercode-cli/server/src/tools/definitions/exa-fetch.ts
  • apps/supercode-cli/server/src/tools/definitions/exa-search.ts
  • apps/supercode-cli/server/src/tools/definitions/firecrawl-map.ts
  • apps/supercode-cli/server/src/tools/definitions/firecrawl-scrape.ts
  • apps/supercode-cli/server/src/tools/definitions/firecrawl-search.ts
  • apps/supercode-cli/server/src/tools/definitions/question.ts
  • apps/supercode-cli/server/src/tools/definitions/read-file.ts
  • apps/supercode-cli/server/src/tools/definitions/read-instructions.ts
  • apps/supercode-cli/server/src/tools/definitions/run-command.ts
  • apps/supercode-cli/server/src/tools/definitions/search-files.ts
  • apps/supercode-cli/server/src/tools/definitions/skill.ts
  • apps/supercode-cli/server/src/tools/definitions/switch-to-agent-mode.ts
  • apps/supercode-cli/server/src/tools/definitions/todowrite.ts
  • apps/supercode-cli/server/src/tools/definitions/url-fetch.ts
  • apps/supercode-cli/server/src/tools/definitions/web-search.ts
  • apps/supercode-cli/server/src/tools/definitions/write-file.ts
  • apps/supercode-cli/server/src/tools/permission-manager.ts
  • apps/supercode-cli/server/src/tools/registry.ts
  • apps/supercode-desktop/README.md
  • apps/supercode-desktop/SupercodeDesktop.xcodeproj/project.pbxproj
  • apps/supercode-desktop/SupercodeDesktop/App/SupercodeApp.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/ComposerCommands.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/LocalToolRuntime.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/ServerConfig.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/SupercodeAPIClient.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/SyntaxHighlighter.swift
  • apps/supercode-desktop/SupercodeDesktop/Services/ToolCatalog.swift
  • apps/supercode-desktop/SupercodeDesktop/Stores/Stores.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/Chat/ChatViews.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/Chat/FileViewerPane.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/Inspector/FileBrowserView.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/RootView.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/Shared/AlertCard.swift
  • apps/supercode-desktop/SupercodeDesktop/Views/Sidebar/SidebarView.swift

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

}
const reader = response.body?.getReader()
if (!reader) { res.status(500).json({ error: "No response body" }); return }
endChatStreamError(res, "No response body"); return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing if (!reader) guard makes five chat provider branches unconditionally return "No response body", so they never stream model output and the streaming code below is unreachable.

Fix on Vercel

@yashdev9274
yashdev9274 merged commit 745967b into main Sep 7, 2026
7 of 10 checks passed
}
const reader = response.body?.getReader()
if (!reader) { res.status(500).json({ error: "No response body" }); return }
endChatStreamError(res, "No response body"); return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This lost the if (!reader) guard — the stream now unconditionally ends with "No response body" right after a successful upstream response, so streamOpenAICompatibleChat below is unreachable and every OpenRouter chat fails. Same issue in the nvidia, mergedev, and orcarouter branches.

Suggested change
endChatStreamError(res, "No response body"); return
if (!reader) { endChatStreamError(res, "No response body"); return }

}
const reader = response.body?.getReader()
if (!reader) { res.status(500).json({ error: "No response body" }); return }
endChatStreamError(res, "No response body"); return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same as the OpenRouter branch — needs the if (!reader) guard back.

Suggested change
endChatStreamError(res, "No response body"); return
if (!reader) { endChatStreamError(res, "No response body"); return }

}
const reader = response.body?.getReader()
if (!reader) { res.status(500).json({ error: "No response body" }); return }
endChatStreamError(res, "No response body"); return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same — needs the if (!reader) guard back.

Suggested change
endChatStreamError(res, "No response body"); return
if (!reader) { endChatStreamError(res, "No response body"); return }

}
const reader = response.body?.getReader()
if (!reader) { res.status(500).json({ error: "No response body" }); return }
endChatStreamError(res, "No response body"); return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same — needs the if (!reader) guard back.

Suggested change
endChatStreamError(res, "No response body"); return
if (!reader) { endChatStreamError(res, "No response body"); return }

opts.onChunk?.(chunk.text)
}
},
prepareStep: async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Returning messages here replaces the prompt for the step, so a bare system notice throws away the entire conversation — the model is told to "analyze what you already know" with zero context. prepareStep receives the current step messages; append the notice to those instead (all three notice branches below need this).

Suggested change
prepareStep: async () => {
prepareStep: async ({ messages: stepMessages }) => {

Comment on lines +170 to +174
if (isTransientInfraError(error)) {
return SPARK_GRANDFATHERED_FALLBACK
}
// Prefer access over hard lock for authenticated users.
return SPARK_GRANDFATHERED_FALLBACK

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both branches return the same fallback, so the isTransientInfraError check is dead code here.

Suggested change
if (isTransientInfraError(error)) {
return SPARK_GRANDFATHERED_FALLBACK
}
// Prefer access over hard lock for authenticated users.
return SPARK_GRANDFATHERED_FALLBACK
// Prefer access over hard lock for authenticated users.
return SPARK_GRANDFATHERED_FALLBACK

Comment on lines +25 to +28
setTimeout: timers.setTimeout,
clearTimeout: timers.clearTimeout,
setInterval: timers.setInterval,
clearInterval: timers.clearInterval,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Intervals registered here keep firing in the host process after runInContext returns (nothing outside can clear them), so a snippet can leak infinite timers long after the tool result is produced. Related: node:vm isn't a security boundary, so the "sandboxed environment" description oversells this a bit.

Suggested change
setTimeout: timers.setTimeout,
clearTimeout: timers.clearTimeout,
setInterval: timers.setInterval,
clearInterval: timers.clearInterval,
setTimeout: timers.setTimeout,
clearTimeout: timers.clearTimeout,

try {
const headers = await getAuthHeaders()
const res = await fetchWithTimeout(`${BASE_URL}/api/user/me`, { headers })
const res = await fetchWithTimeout(`${baseUrl()}/api/user/me`, { headers })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Indentation got flattened to column 0 here (a few other touched lines in this file and in server-proxy-service.ts, embedded-tool-calls.ts, openai-compatible-stream.ts, and chat.ts too). Worth a quick pass to restore the 2-space indent.

Suggested change
const res = await fetchWithTimeout(`${baseUrl()}/api/user/me`, { headers })
const res = await fetchWithTimeout(`${baseUrl()}/api/user/me`, { headers })


while (i < block.length) {
// Find the next opener (square, xml, bare invoke, bare JSON descriptor, or control token).
while (i < block.length) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same indentation flattening — this loop and a few of its inner statements lost their leading indent.

Suggested change
while (i < block.length) {
while (i < block.length) {

Comment on lines +8 to +9
import "dotenv/config"
import { PrismaPg } from "@prisma/adapter-pg"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bun auto-loads .env per the repo guidelines (see AGENTS.md), so the dotenv import is redundant here.

Suggested change
import "dotenv/config"
import { PrismaPg } from "@prisma/adapter-pg"
import { PrismaPg } from "@prisma/adapter-pg"

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