Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit ed47d6c

Browse files
committed
chore: merge main to resolve conflicts
The getKeepMessagesWithToolBlocks function and related code were removed in main, making the ROO-520 fix obsolete. Accepting main changes. Also fixed type error in useMcpToolTool.spec.ts where invalid properties were passed to ToolCallbacks.
2 parents 04fc2a0 + f9a3a17 commit ed47d6c

568 files changed

Lines changed: 21219 additions & 25771 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/website-preview.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,20 @@ jobs:
7070
comment.body.includes(commentIdentifier)
7171
);
7272
73-
if (existingComment) {
74-
return;
75-
}
76-
7773
const comment = commentIdentifier + '\n🚀 **Preview deployed!**\n\nYour changes have been deployed to Vercel:\n\n**Preview URL:** ' + deploymentUrl + '\n\nThis preview will be updated automatically when you push new commits to this PR.';
7874
79-
await github.rest.issues.createComment({
80-
owner: context.repo.owner,
81-
repo: context.repo.repo,
82-
issue_number: context.issue.number,
83-
body: comment
84-
});
75+
if (existingComment) {
76+
await github.rest.issues.updateComment({
77+
owner: context.repo.owner,
78+
repo: context.repo.repo,
79+
comment_id: existingComment.id,
80+
body: comment
81+
});
82+
} else {
83+
await github.rest.issues.createComment({
84+
owner: context.repo.owner,
85+
repo: context.repo.repo,
86+
issue_number: context.issue.number,
87+
body: comment
88+
});
89+
}

.roo/commands/cli-release.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,58 @@ mode: code
4848
- Include links to relevant source files where helpful
4949
- Describe changes from the user's perspective
5050

51-
5. Commit the version bump and changelog update:
51+
5. Create a release branch and commit the changes:
5252

5353
```bash
54+
# Ensure you're on main and up to date
55+
git checkout main
56+
git pull origin main
57+
58+
# Create a new branch for the release
59+
git checkout -b cli-release-v<version>
60+
61+
# Commit the version bump and changelog update
5462
git add apps/cli/package.json apps/cli/CHANGELOG.md
5563
git commit -m "chore(cli): prepare release v<version>"
64+
65+
# Push the branch to origin
66+
git push -u origin cli-release-v<version>
5667
```
5768

58-
6. Run the release script from the monorepo root:
69+
6. Create a pull request for the release:
5970

6071
```bash
72+
gh pr create --title "chore(cli): prepare release v<version>" \
73+
--body "## CLI Release v<version>
74+
75+
This PR prepares the CLI release v<version>.
76+
77+
### Changes
78+
- Version bump in package.json
79+
- Changelog update
80+
81+
### Checklist
82+
- [ ] Version number is correct
83+
- [ ] Changelog entry is complete and accurate
84+
- [ ] All CI checks pass" \
85+
--base main
86+
```
87+
88+
7. Wait for PR approval and merge:
89+
90+
- Request review if required by your workflow
91+
- Ensure CI checks pass
92+
- Merge the PR using: `gh pr merge --squash --delete-branch`
93+
- Or merge via the GitHub UI
94+
95+
8. Run the release script from the monorepo root:
96+
97+
```bash
98+
# Ensure you're on the updated main branch after the PR merge
99+
git checkout main
100+
git pull origin main
101+
102+
# Run the release script
61103
./apps/cli/scripts/release.sh
62104
```
63105

@@ -69,7 +111,7 @@ mode: code
69111
- Extract changelog content and include it in the GitHub release notes
70112
- Create the GitHub release with the tarball attached
71113

72-
7. After a successful release, verify:
114+
9. After a successful release, verify:
73115
- Check the release page: https://github.com/RooCodeInc/Roo-Code/releases
74116
- Verify the "What's New" section contains the changelog content
75117
- Test installation: `curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/install.sh | sh`

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to agents when working with code in this repository.
4+
5+
- Settings View Pattern: When working on `SettingsView`, inputs must bind to the local `cachedState`, NOT the live `useExtensionState()`. The `cachedState` acts as a buffer for user edits, isolating them from the `ContextProxy` source-of-truth until the user explicitly clicks "Save". Wiring inputs directly to the live state causes race conditions.

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,81 @@
11
# Roo Code Changelog
22

3+
## [3.43.0] - 2026-01-23
4+
5+
![3.43.0 Release - Intelligent Context Condensation](/releases/3.43.0-release.png)
6+
7+
- Intelligent Context Condensation v2: New context condensation system that intelligently summarizes conversation history when approaching context limits, preserving important information while reducing token usage (PR #10873 by @hannesrudolph)
8+
- Improved context condensation with environment details, accurate token counts, and lazy evaluation for better performance (PR #10920 by @hannesrudolph)
9+
- Move condense prompt editor to Context Management tab for better discoverability and organization (PR #10909 by @hannesrudolph)
10+
- Update Z.AI models with new variants and pricing (#10859 by @ErdemGKSL, PR #10860 by @ErdemGKSL)
11+
- Add pnpm install:vsix:nightly command for easier nightly build installation (PR #10912 by @hannesrudolph)
12+
- Fix: Convert orphaned tool_results to text blocks after condensing to prevent API errors (PR #10927 by @daniel-lxs)
13+
- Fix: Auto-migrate v1 condensing prompt and handle invalid providers on import (PR #10931 by @hannesrudolph)
14+
- Fix: Use json-stream-stringify for pretty-printing MCP config files to prevent memory issues with large configs (#9862 by @Michaelzag, PR #9864 by @Michaelzag)
15+
- Fix: Correct Gemini 3 pricing for Flash and Pro models (#10432 by @rossdonald, PR #10487 by @roomote)
16+
- Fix: Skip thoughtSignature blocks during markdown export for cleaner output (#10199 by @rossdonald, PR #10932 by @rossdonald)
17+
- Fix: Duplicate model display for OpenAI Codex provider (PR #10930 by @roomote)
18+
- Remove diffEnabled and fuzzyMatchThreshold settings as they are no longer needed (#10648 by @hannesrudolph, PR #10298 by @hannesrudolph)
19+
- Remove MULTI_FILE_APPLY_DIFF experiment (PR #10925 by @hannesrudolph)
20+
- Remove POWER_STEERING experimental feature (PR #10926 by @hannesrudolph)
21+
- Remove legacy XML tool calling code (getToolDescription) for cleaner codebase (PR #10929 by @hannesrudolph)
22+
23+
## [3.42.0] - 2026-01-22
24+
25+
![3.42.0 Release - ChatGPT Usage Tracking](/releases/3.42.0-release.png)
26+
27+
- Added UI to track your ChatGPT usage limits in the OpenAI Codex provider (PR #10813 by @hannesrudolph)
28+
- Removed deprecated Claude Code provider (PR #10883 by @daniel-lxs)
29+
- Streamlined codebase by removing legacy XML tool calling functionality (#10848 by @hannesrudolph, PR #10841 by @hannesrudolph)
30+
- Standardize model selectors across all providers: Improved consistency of model selection UI (#10650 by @hannesrudolph, PR #10294 by @hannesrudolph)
31+
- Enable prompt caching for Cerebras zai-glm-4.7 model (#10601 by @jahanson, PR #10670 by @app/roomote)
32+
- Add Kimi K2 thinking model to VertexAI provider (#9268 by @diwakar-s-maurya, PR #9269 by @app/roomote)
33+
- Warn users when too many MCP tools are enabled (PR #10772 by @app/roomote)
34+
- Migrate context condensing prompt to customSupportPrompts (PR #10881 by @hannesrudolph)
35+
- Unify export path logic and default to Downloads folder (PR #10882 by @hannesrudolph)
36+
- Performance improvements for webview state synchronization (PR #10842 by @hannesrudolph)
37+
- Fix: Handle mode selector empty state on workspace switch (#10660 by @hannesrudolph, PR #9674 by @app/roomote)
38+
- Fix: Resolve race condition in context condensing prompt input (PR #10876 by @hannesrudolph)
39+
- Fix: Prevent double emission of text/reasoning in OpenAI native and codex handlers (PR #10888 by @hannesrudolph)
40+
- Fix: Prevent task abortion when resuming via IPC/bridge (PR #10892 by @cte)
41+
- Fix: Enforce file restrictions for all editing tools (PR #10896 by @app/roomote)
42+
- Fix: Remove custom condensing model option (PR #10901 by @hannesrudolph)
43+
- Unify user content tags to <user_message> for consistent prompt formatting (#10658 by @hannesrudolph, PR #10723 by @app/roomote)
44+
- Clarify linked SKILL.md file handling in prompts (PR #10907 by @hannesrudolph)
45+
- Fix: Padding on Roo Code Cloud teaser (PR #10889 by @app/roomote)
46+
47+
## [3.41.3] - 2026-01-18
48+
49+
- Fix: Thinking block word-breaking to prevent horizontal scroll in the chat UI (PR #10806 by @roomote)
50+
- Add Claude-like CLI flags and authentication fixes for the Roo Code CLI (PR #10797 by @cte)
51+
- Improve CLI authentication by using a redirect instead of a fetch (PR #10799 by @cte)
52+
- Fix: Roo Code Router fixes for the CLI (PR #10789 by @cte)
53+
- Release CLI v0.0.48 with latest improvements (PR #10800 by @cte)
54+
- Release CLI v0.0.47 (PR #10798 by @cte)
55+
- Revert E2E tests enablement to address stability issues (PR #10794 by @cte)
56+
57+
## [3.41.2] - 2026-01-16
58+
59+
- Add button to open markdown in VSCode preview for easier reading of formatted content (PR #10773 by @brunobergher)
60+
- Fix: Reset invalid model selection when using OpenAI Codex provider (PR #10777 by @hannesrudolph)
61+
- Fix: Add openai-codex to providers that don't require an API key (PR #10786 by @roomote)
62+
- Fix: Detect Gemini models with space-separated names for proper thought signature injection in LiteLLM (PR #10787 by @daniel-lxs)
63+
64+
## [3.41.1] - 2026-01-16
65+
66+
![3.41.1 Release - Aggregated Subtask Costs](/releases/3.41.1-release.png)
67+
68+
- Feat: Aggregate subtask costs in parent task (#5376 by @hannesrudolph, PR #10757 by @taltas)
69+
- Fix: Prevent duplicate tool_use IDs causing API 400 errors (PR #10760 by @daniel-lxs)
70+
- Fix: Handle missing tool identity in OpenAI Native streams (PR #10719 by @hannesrudolph)
71+
- Fix: Truncate call_id to 64 chars for OpenAI Responses API (PR #10763 by @daniel-lxs)
72+
- Fix: Gemini thought signature validation errors (PR #10694 by @daniel-lxs)
73+
- Fix: Filter out empty text blocks from user messages for Gemini compatibility (PR #10728 by @daniel-lxs)
74+
- Fix: Flatten top-level anyOf/oneOf/allOf in MCP tool schemas (PR #10726 by @daniel-lxs)
75+
- Fix: Filter Ollama models without native tool support (PR #10735 by @daniel-lxs)
76+
- Feat: Add settings tab titles to search index (PR #10761 by @roomote)
77+
- Feat: Clarify Slack and Linear are Cloud Team only features (PR #10748 by @roomote)
78+
379
## [3.41.0] - 2026-01-15
480

581
![3.41.0 Release - OpenAI - ChatGPT Plus/Pro Provider](/releases/3.41.0-release.png)

apps/cli/CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ All notable changes to the `@roo-code/cli` package will be documented in this fi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.0.49] - 2026-01-18
9+
10+
### Added
11+
12+
- **Output Format Options**: New `--output-format` flag to control CLI output format for scripting and automation:
13+
- `text` (default) - Human-readable interactive output
14+
- `json` - Single JSON object with all events and final result at task completion
15+
- `stream-json` - NDJSON (newline-delimited JSON) for real-time streaming of events
16+
- See [`json-events.ts`](src/types/json-events.ts) for the complete event schema
17+
- New [`JsonEventEmitter`](src/agent/json-event-emitter.ts) for structured output generation
18+
19+
## [0.0.48] - 2026-01-17
20+
21+
### Changed
22+
23+
- Simplified authentication callback flow by using HTTP redirects instead of POST requests with CORS headers for improved browser compatibility
24+
25+
## [0.0.47] - 2026-01-17
26+
27+
### Added
28+
29+
- **Workspace flag**: New `-w, --workspace <path>` option to specify a custom workspace directory instead of using the current working directory
30+
- **Oneshot mode**: New `--oneshot` flag to exit upon task completion, useful for scripting and automation (can also be saved in settings via [`CliSettings.oneshot`](src/types/types.ts))
31+
32+
### Changed
33+
34+
- Skip onboarding flow when a provider is explicitly specified via `--provider` flag or saved in settings
35+
- Unified permission flags: Combined `-y`, `--yes`, and `--dangerously-skip-permissions` into a single option for Claude Code-like CLI compatibility
36+
- Improved Roo Code Router authentication flow and error messaging
37+
38+
### Fixed
39+
40+
- Removed unnecessary timeout that could cause issues with long-running tasks
41+
- Fixed authentication token validation for Roo Code Router provider
42+
843
## [0.0.45] - 2026-01-08
944

1045
### Changed

apps/cli/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ By default, the CLI prompts for approval before executing actions:
7171
```bash
7272
export OPENROUTER_API_KEY=sk-or-v1-...
7373

74-
roo ~/Documents/my-project -P "What is this project?"
74+
roo "What is this project?" -w ~/Documents/my-project
7575
```
7676

7777
You can also run without a prompt and enter it interactively in TUI mode:
@@ -92,7 +92,7 @@ In interactive mode:
9292
For automation and scripts, use `-y` to auto-approve all actions:
9393

9494
```bash
95-
roo ~/Documents/my-project -y -P "Refactor the utils.ts file"
95+
roo "Refactor the utils.ts file" -y -w ~/Documents/my-project
9696
```
9797

9898
In non-interactive mode:
@@ -149,8 +149,8 @@ Tokens are valid for 90 days. The CLI will prompt you to re-authenticate when yo
149149

150150
| Option | Description | Default |
151151
| --------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------- |
152-
| `[workspace]` | Workspace path to operate in (positional argument) | Current directory |
153-
| `-P, --prompt <prompt>` | The prompt/task to execute (optional in TUI mode) | None |
152+
| `[prompt]` | Your prompt (positional argument, optional) | None |
153+
| `-w, --workspace <path>` | Workspace path to operate in | Current directory |
154154
| `-e, --extension <path>` | Path to the extension bundle directory | Auto-detected |
155155
| `-d, --debug` | Enable debug output (includes detailed debug information, prompts, paths, etc) | `false` |
156156
| `-x, --exit-on-complete` | Exit the process when task completes (useful for testing) | `false` |
@@ -249,7 +249,7 @@ pnpm lint
249249
To create a new release, execute the /cli-release slash command:
250250

251251
```bash
252-
roo ~/Documents/Roo-Code -P "/cli-release" -y
252+
roo "/cli-release" -w ~/Documents/Roo-Code -y
253253
```
254254

255255
The workflow will:

apps/cli/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/cli",
3-
"version": "0.0.45",
3+
"version": "0.0.49",
44
"description": "Roo Code CLI - Run the Roo Code agent from the command line",
55
"private": true,
66
"type": "module",
@@ -14,8 +14,10 @@
1414
"check-types": "tsc --noEmit",
1515
"test": "vitest run",
1616
"build": "tsup",
17+
"build:extension": "pnpm --filter roo-cline bundle",
18+
"build:all": "pnpm --filter roo-cline bundle && tsup",
1719
"dev": "tsup --watch",
18-
"start": "ROO_SDK_BASE_URL=http://localhost:3001 ROO_AUTH_BASE_URL=http://localhost:3000 node dist/index.js",
20+
"start": "ROO_AUTH_BASE_URL=http://localhost:3000 ROO_SDK_BASE_URL=http://localhost:3001 ROO_CODE_PROVIDER_URL=http://localhost:8080/proxy node dist/index.js",
1921
"start:production": "node dist/index.js",
2022
"release": "scripts/release.sh",
2123
"clean": "rimraf dist .turbo"
@@ -28,6 +30,8 @@
2830
"@trpc/client": "^11.8.1",
2931
"@vscode/ripgrep": "^1.15.9",
3032
"commander": "^12.1.0",
33+
"cross-spawn": "^7.0.6",
34+
"execa": "^9.5.2",
3135
"fuzzysort": "^3.1.0",
3236
"ink": "^6.6.0",
3337
"p-wait-for": "^5.0.2",

apps/cli/scripts/release.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ create_tarball() {
274274
'commander': pkg.dependencies.commander,
275275
'fuzzysort': pkg.dependencies.fuzzysort,
276276
'ink': pkg.dependencies.ink,
277+
'p-wait-for': pkg.dependencies['p-wait-for'],
277278
'react': pkg.dependencies.react,
278279
'superjson': pkg.dependencies.superjson,
279280
'zustand': pkg.dependencies.zustand
@@ -420,8 +421,7 @@ verify_local_install() {
420421
mkdir -p "$VERIFY_WORKSPACE"
421422

422423
# Run the CLI with a simple prompt
423-
# Use timeout to prevent hanging if something goes wrong
424-
if timeout 60 "$VERIFY_BIN_DIR/roo" --yes --exit-on-complete --prompt "1+1=?" "$VERIFY_WORKSPACE" > "$VERIFY_DIR/test-output.log" 2>&1; then
424+
if timeout 60 "$VERIFY_BIN_DIR/roo" --yes --oneshot -w "$VERIFY_WORKSPACE" "1+1=?" > "$VERIFY_DIR/test-output.log" 2>&1; then
425425
info "End-to-end test passed"
426426
else
427427
EXIT_CODE=$?
@@ -536,11 +536,8 @@ ROO_VERSION=$VERSION curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo
536536
## Usage
537537
538538
\`\`\`bash
539-
# Set your API key
540-
export OPENROUTER_API_KEY=sk-or-v1-...
541-
542539
# Run a task
543-
roo "What is this project?" ~/my-project
540+
roo "What is this project?"
544541
545542
# See all options
546543
roo --help

apps/cli/src/agent/__tests__/extension-host.test.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ function createTestHost({
3636
model,
3737
workspacePath: "/test/workspace",
3838
extensionPath: "/test/extension",
39+
ephemeral: false,
40+
debug: false,
41+
exitOnComplete: false,
3942
...options,
4043
})
4144
}
@@ -94,16 +97,20 @@ describe("ExtensionHost", () => {
9497
apiKey: "test-key",
9598
provider: "openrouter",
9699
model: "test-model",
100+
ephemeral: false,
101+
debug: false,
102+
exitOnComplete: false,
103+
integrationTest: true, // Set explicitly for testing
97104
}
98105

99106
const host = new ExtensionHost(options)
100107

101-
// Options are stored but integrationTest is set to true
108+
// Options are stored as-is
102109
const storedOptions = getPrivate<ExtensionHostOptions>(host, "options")
103110
expect(storedOptions.mode).toBe(options.mode)
104111
expect(storedOptions.workspacePath).toBe(options.workspacePath)
105112
expect(storedOptions.extensionPath).toBe(options.extensionPath)
106-
expect(storedOptions.integrationTest).toBe(true) // Always set to true in constructor
113+
expect(storedOptions.integrationTest).toBe(true)
107114
})
108115

109116
it("should be an EventEmitter instance", () => {
@@ -292,16 +299,19 @@ describe("ExtensionHost", () => {
292299
})
293300

294301
it("should suppress console when integrationTest is false", () => {
295-
const host = createTestHost()
302+
// Capture the real console.log before any host is created
296303
const originalLog = console.log
297304

298-
// Override integrationTest to false
305+
// Create host with integrationTest: true to prevent constructor from suppressing
306+
const host = createTestHost({ integrationTest: true })
307+
308+
// Override integrationTest to false to test suppression
299309
const options = getPrivate<ExtensionHostOptions>(host, "options")
300310
options.integrationTest = false
301311

302312
callPrivate(host, "setupQuietMode")
303313

304-
// Console should be modified
314+
// Console should be modified (suppressed)
305315
expect(console.log).not.toBe(originalLog)
306316

307317
// Restore for other tests
@@ -326,9 +336,12 @@ describe("ExtensionHost", () => {
326336

327337
describe("restoreConsole", () => {
328338
it("should restore original console methods when suppressed", () => {
329-
const host = createTestHost()
339+
// Capture the real console.log before any host is created
330340
const originalLog = console.log
331341

342+
// Create host with integrationTest: true to prevent constructor from suppressing
343+
const host = createTestHost({ integrationTest: true })
344+
332345
// Override integrationTest to false to actually suppress
333346
const options = getPrivate<ExtensionHostOptions>(host, "options")
334347
options.integrationTest = false

0 commit comments

Comments
 (0)