Skip to content

chore: bump version to 0.1.28 and enhance tool functionality#140

Merged
yashdev9274 merged 1 commit into
mainfrom
supercode-cli
Jun 30, 2026
Merged

chore: bump version to 0.1.28 and enhance tool functionality#140
yashdev9274 merged 1 commit into
mainfrom
supercode-cli

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Jun 30, 2026

Copy link
Copy Markdown
Owner
  • Updated package version to 0.1.28.
  • Introduced edit_file tool for targeted file edits, allowing users to replace specific substrings in existing files.
  • Enhanced tool result handling to include output instead of result for better clarity in AI service responses.
  • Added rendering of file change snapshots in the chat interface for improved user feedback during tool execution.
  • Updated CLI welcome message to include version information and available commands.
  • Implemented voice capture functionality with error handling for better user experience.

Summary by CodeRabbit

  • New Features

    • Added voice capture in the CLI, with shortcuts and transcription inserted into the chat input.
    • Added a new file-editing command for targeted replacements.
    • Expanded slash commands with /voice and /verbose.
  • Bug Fixes

    • Improved tool-result handling and display during chat sessions.
    • Added clearer warnings when responses describe actions without actually using tools.
    • Enhanced command selection, welcome screen, and status bar behavior.

- Updated package version to 0.1.28.
- Introduced `edit_file` tool for targeted file edits, allowing users to replace specific substrings in existing files.
- Enhanced tool result handling to include output instead of result for better clarity in AI service responses.
- Added rendering of file change snapshots in the chat interface for improved user feedback during tool execution.
- Updated CLI welcome message to include version information and available commands.
- Implemented voice capture functionality with error handling for better user experience.

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

@vercel

vercel Bot commented Jun 30, 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 30, 2026 5:41am
supercli-client Ready Ready Preview, Comment Jun 30, 2026 5:41am
supercli-docs Ready Ready Preview, Comment Jun 30, 2026 5:41am

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3069817d-a862-4fb7-8fe4-13cc75f9652f

📥 Commits

Reviewing files that changed from the base of the PR and between b8749a0 and e8bfd31.

📒 Files selected for processing (20)
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/src/agent/runner.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/thinking.ts
  • apps/supercode-cli/server/src/cli/ai/concentrate-service.ts
  • apps/supercode-cli/server/src/cli/ai/google-service.ts
  • apps/supercode-cli/server/src/cli/ai/nvidia-service.ts
  • apps/supercode-cli/server/src/cli/commands/ai/init.ts
  • apps/supercode-cli/server/src/cli/commands/slashCommands/index.ts
  • apps/supercode-cli/server/src/cli/main.ts
  • apps/supercode-cli/server/src/cli/utils/tool-snapshot.ts
  • apps/supercode-cli/server/src/cli/utils/tui.ts
  • apps/supercode-cli/server/src/cli/utils/welcome.ts
  • apps/supercode-cli/server/src/config/gateway.config.ts
  • apps/supercode-cli/server/src/tools/definitions/edit-file.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-cli/server/src/voice/speech.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

Adds an edit_file tool with workspace-safe text replacement, a voice capture pipeline (ffmpeg + Groq transcription) wired into the chat TUI via F2/Ctrl+Shift+V, per-tool terminal snapshots after streaming, a post-stream hallucination guard, filtered slash-command navigation, a renderWelcome helper, and fixes AI service tool-result serialization from result to output.

Changes

Supercode CLI Feature Release

Layer / File(s) Summary
edit_file tool: schema, execution, permission, and registry
src/tools/definitions/edit-file.ts, src/tools/definitions/write-file.ts, src/tools/permission-manager.ts, src/tools/registry.ts, src/agent/runner.ts
New editFileTool validates workspace path, counts/replaces oldText occurrences, returns JSON result; registered with withPermission("edit_file"), added to DEFAULT_RULES as ask, and included in DESTRUCTIVE_TOOLS.
Tool-result serialization fix across AI services
src/cli/ai/concentrate-service.ts, src/cli/ai/google-service.ts, src/cli/ai/nvidia-service.ts
onStepFinish handlers in all three services switch from reading toolResults[*].result to toolResults[*].output, with unified normalization (string / empty-string for nullish / JSON.stringify otherwise).
Tool snapshot rendering utilities
src/cli/utils/tool-snapshot.ts
New module adds diffLines (LCS DP), renderWriteSnapshot, renderEditSnapshot, renderCommandSnapshot, countDiff, and formatBytes for rendering per-tool visual output panels in the chat TUI.
toolLabel chip rendering
src/cli/ai/chat/thinking.ts
Replaces arrow-based toolLabel formatting with a chipFor()-driven chip+verb+color scheme; adds truncateStr; missing-args branch now emits a red error chip instead of green/red arrows.
PersistentStatusBar.setStatusMessage
src/cli/utils/tui.ts
Adds statusMessage state and setStatusMessage(msg) method; renderLine() gains an early-return path that displays the message with horizontal fill instead of the normal chip row.
Voice capture module
src/voice/speech.ts
New module with ffmpeg-based captureAudio, Groq transcribeAudio, and voiceCaptureFlow orchestration; exports abortCapture, isFfmpegAvailable, canVoiceCapture.
/voice and /verbose slash commands
src/cli/commands/slashCommands/index.ts
SlashCommandResult type union gains voice and verbose variants; COMMANDS list and handlers dispatch table extended accordingly.
chat.ts: voice, filtered slash list, snapshots, hallucination guard
src/cli/ai/chat/chat.ts
Wires F2/Ctrl+Shift+V voice capture hotkeys, startVoiceCapture, voiceJustCaptured state; replaces static slash-command indexing with filterSlashCommands substring filtering; calls renderToolSnapshot after each tool result; adds post-stream hallucination guard when zero tool calls are made but the response text claims actions.
Welcome screen refactor and agent confirmation removal
src/cli/utils/welcome.ts, src/cli/main.ts, src/cli/commands/ai/init.ts, src/cli/ai/chat/chatAgent.ts, src/config/gateway.config.ts, package.json
Extracts terminal welcome rendering into renderWelcome(version); removes pre-execution confirm() gate from startAgentChat; adds aiGatewayApiKey config; version bumped to 0.1.28.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • yashdev9274/supercli#89: Modifies the same CLI chat loop and slash-command routing in chat.ts and slashCommands/index.ts, which this PR extends with /voice, /verbose, and filtered navigation.
  • yashdev9274/supercli#137: Introduced onStepFinish/typed toolResults tracking in the AI services that this PR modifies by switching from result to output in concentrate, google, and nvidia services.
  • yashdev9274/supercli#127: Modifies thinking.ts toolLabel rendering logic, the same function this PR rewrites with the chip+verb+color scheme.

Poem

🐇 Hop hop, the rabbit taps F2,
A microphone wakes and records something new.
Files now edit with oldText in place,
Snapshots appear at a terminal's face.
Hallucinations warned with a red little sign—
The warren of tools is working just fine! ✨

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

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