Skip to content

feat: update supercode-cli version and enhance tool handlin#201

Merged
yashdev9274 merged 1 commit into
mainfrom
supercode-cli
Jul 14, 2026
Merged

feat: update supercode-cli version and enhance tool handlin#201
yashdev9274 merged 1 commit into
mainfrom
supercode-cli

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Description

  • Bumped version to 0.1.63 in package.json.
  • Improved tool parameter handling in toolParams function to return a default object structure when necessary.
  • Enhanced nonStreamingRequest to accept tools as an optional parameter and include them in the request body.
  • Updated ConcentrateService to track tool events during streaming responses.
  • Simplified chat initialization logic in wakeUpAction for better clarity and efficiency.
  • Added a new model entry for "Opus 4.8" in the model list.

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

Summary by CodeRabbit

  • New Features

    • Added Opus 4.8 as a selectable AI model option.
    • Improved support for AI tool and function calls, including tool-only responses.
  • Bug Fixes

    • Prevented unnecessary retries when streamed responses contain only tool activity.
    • Improved handling of missing or empty tool parameter schemas.
    • Standardized interactive chat startup behavior.
  • Chores

    • Updated the server package version to 0.1.63.

- Bumped version to 0.1.63 in package.json.
- Improved tool parameter handling in toolParams function to return a default object structure when necessary.
- Enhanced nonStreamingRequest to accept tools as an optional parameter and include them in the request body.
- Updated ConcentrateService to track tool events during streaming responses.
- Simplified chat initialization logic in wakeUpAction for better clarity and efficiency.
- Added a new model entry for "Opus 4.8" in the model list.
@vercel

vercel Bot commented Jul 14, 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 Jul 14, 2026 6:31am
supercli-client Ready Ready Preview, Comment Jul 14, 2026 6:31am
supercli-docs Ready Ready Preview, Comment Jul 14, 2026 6:31am

@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 trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The update improves ConcentrateAI tool-call handling, normalizes missing tool schemas, changes CLI session startup routing, adds a ConcentrateAI Opus 4.8 model option, and increments the server package version.

Changes

AI and CLI updates

Layer / File(s) Summary
Tool payload and streaming fallback flow
apps/supercode-cli/server/src/index.ts, apps/supercode-cli/server/src/cli/ai/concentrate-service.ts
Tool schemas are normalized and passed to non-streaming requests; tool events and tool_calls finish reasons now suppress unnecessary fallback retries.
Interactive session startup routing
apps/supercode-cli/server/src/cli/commands/ai/init.ts
Stored sessions start agent mode only with an agent configuration and resume ID; other paths start chat mode.
Model catalog and package release metadata
apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts, apps/supercode-cli/server/package.json
ConcentrateAI Opus 4.8 is added to the model picker and the server version changes to 0.1.63.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI session
  participant sendMessage
  participant Stream as ConcentrateAI stream
  participant Fallback as nonStreamingRequest
  CLI->>sendMessage: send tool-enabled request
  sendMessage->>Stream: consume streamed events
  Stream-->>sendMessage: content or tool-call/tool-result events
  alt tool events or tool_calls finish reason
    sendMessage-->>CLI: preserve streamed tool response
  else empty stream without tool events
    sendMessage->>Fallback: retry with tools payload
    Fallback-->>CLI: return response
  end
Loading

Possibly related PRs

Poem

A rabbit hops where tool calls flow,
No empty retry steals the show.
Opus joins the model choir,
Chat wakes up as sparks aspire.
Version crumbs mark progress bright—
Hoppy code review tonight! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: a version bump and improved tool handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch supercode-cli

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@yashdev9274 yashdev9274 merged commit 8972b12 into main Jul 14, 2026
4 of 8 checks passed

@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: 1

🤖 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/src/index.ts`:
- Around line 17-21: Update toolParams() in
apps/supercode-cli/server/src/index.ts (lines 17-21) to convert Zod schemas to
JSON Schema with the repository’s zod-to-json-schema dependency instead of
returning an empty object; preserve existing handling for absent or
already-serializable schemas. In
apps/supercode-cli/server/src/cli/ai/concentrate-service.ts (lines 40-45),
normalize the tool schema by selecting fn.inputSchema ?? fn.parameters and
applying the same Zod-to-JSON-Schema conversion before forwarding it.
🪄 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: ab620038-4ebe-4439-9acf-793c0132dbff

📥 Commits

Reviewing files that changed from the base of the PR and between 523baae and c496ce4.

📒 Files selected for processing (5)
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/src/cli/ai/concentrate-service.ts
  • apps/supercode-cli/server/src/cli/commands/ai/init.ts
  • apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts
  • apps/supercode-cli/server/src/index.ts

Comment on lines +17 to +21
const raw = fn.inputSchema ?? fn.parameters
if (!raw || (typeof raw === "object" && "_def" in raw)) {
return { type: "object", properties: {} }
}
return raw

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for zod-to-json-schema package to use for converting Zod schemas
rg "zod-to-json-schema" package.json apps/supercode-cli/server/package.json

Repository: yashdev9274/supercli

Length of output: 233


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== outline: apps/supercode-cli/server/src/index.ts ==\n'
ast-grep outline apps/supercode-cli/server/src/index.ts --view expanded || true

printf '\n== outline: apps/supercode-cli/server/src/cli/ai/concentrate-service.ts ==\n'
ast-grep outline apps/supercode-cli/server/src/cli/ai/concentrate-service.ts --view expanded || true

printf '\n== relevant ranges ==\n'
sed -n '1,120p' apps/supercode-cli/server/src/index.ts
printf '\n---\n'
sed -n '1,140p' apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

Repository: yashdev9274/supercli

Length of output: 11564


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== toolParams references ==\n'
rg -n "toolParams\\(" apps/supercode-cli/server/src/index.ts apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

printf '\n== parameters / inputSchema references in server src ==\n'
rg -n "inputSchema|\\.parameters\\b|zod-to-json-schema|toJsonSchema|json schema|tool schema" apps/supercode-cli/server/src -g '!**/node_modules/**'

printf '\n== surrounding block in index.ts around tool usage ==\n'
sed -n '140,260p' apps/supercode-cli/server/src/index.ts

printf '\n== surrounding block in concentrate-service.ts around nonStreamingRequest ==\n'
sed -n '1,110p' apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

Repository: yashdev9274/supercli

Length of output: 11035


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== toolParams references ==\n'
rg -n "toolParams\\(" apps/supercode-cli/server/src/index.ts apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

printf '\n== nonStreamingRequest references ==\n'
rg -n "nonStreamingRequest\\(" apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

printf '\n== parameters / inputSchema references in server src ==\n'
rg -n "inputSchema|\\.parameters\\b|zod-to-json-schema|toJsonSchema|json schema|tool schema" apps/supercode-cli/server/src -g '!**/node_modules/**'

printf '\n== surrounding block in index.ts around tool usage ==\n'
sed -n '140,260p' apps/supercode-cli/server/src/index.ts

printf '\n== surrounding block in concentrate-service.ts around nonStreamingRequest ==\n'
sed -n '1,110p' apps/supercode-cli/server/src/cli/ai/concentrate-service.ts

Repository: yashdev9274/supercli

Length of output: 11691


Convert tool schemas before serializing.

  • apps/supercode-cli/server/src/index.ts#L16-L21: toolParams() returns { type: "object", properties: {} } for any Zod schema, so tool arguments are stripped.
  • apps/supercode-cli/server/src/cli/ai/concentrate-service.ts#L40-L45: this path still forwards fn.parameters directly and never normalizes fn.inputSchema. Pull fn.inputSchema ?? fn.parameters and convert Zod inputs to JSON Schema (the repo already includes zod-to-json-schema).
📍 Affects 2 files
  • apps/supercode-cli/server/src/index.ts#L17-L21 (this comment)
  • apps/supercode-cli/server/src/cli/ai/concentrate-service.ts#L40-L45
🤖 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/src/index.ts` around lines 17 - 21, Update
toolParams() in apps/supercode-cli/server/src/index.ts (lines 17-21) to convert
Zod schemas to JSON Schema with the repository’s zod-to-json-schema dependency
instead of returning an empty object; preserve existing handling for absent or
already-serializable schemas. In
apps/supercode-cli/server/src/cli/ai/concentrate-service.ts (lines 40-45),
normalize the tool schema by selecting fn.inputSchema ?? fn.parameters and
applying the same Zod-to-JSON-Schema conversion before forwarding it.

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