Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a81438d
Add a cli installer
cte Jan 6, 2026
53ad2e1
Add a TUI
cte Jan 6, 2026
c137cf4
Fix the build
cte Jan 6, 2026
ad6ce88
Add file picker
cte Jan 6, 2026
930755e
Change the text input to multiline
cte Jan 6, 2026
b4fe095
Merge main
cte Jan 6, 2026
0a8f1a1
A few more fixes
cte Jan 6, 2026
262aaa5
More progress
cte Jan 6, 2026
a590932
More progress
cte Jan 7, 2026
c9d5234
More progress
cte Jan 7, 2026
246062c
Fix tsc errors
cte Jan 7, 2026
c95706e
Fix tsc errors
cte Jan 7, 2026
b6f571c
More progress
cte Jan 7, 2026
e85362f
New task slash command
cte Jan 7, 2026
8072a90
More progress
cte Jan 7, 2026
58793f4
A few more tweaks
cte Jan 7, 2026
5ec80f9
Fix tsc errors
cte Jan 7, 2026
3d7117b
More progress
cte Jan 7, 2026
303598f
More progress
cte Jan 7, 2026
616472f
Remove debug logging
cte Jan 7, 2026
530b67d
Fix tests
cte Jan 7, 2026
7826828
More progress
cte Jan 7, 2026
5b5d796
Add release helpers
cte Jan 7, 2026
4a41560
Fix history picker bug, fix mode switcher bug
cte Jan 7, 2026
607390b
Task history picker fixes.
cte Jan 8, 2026
511586d
More progress
cte Jan 8, 2026
245008a
Some cleanup
cte Jan 8, 2026
c83e67e
Some cleanup
cte Jan 8, 2026
7fbd2be
Add a release confirmation prompt
cte Jan 8, 2026
40ce8b7
chore(cli): prepare release v0.0.44
cte Jan 8, 2026
c01f10f
Remove .gitignore file
cte Jan 8, 2026
bc1246e
Get rid of this
cte Jan 8, 2026
c3c21c6
Update README
cte Jan 8, 2026
c194257
feat(cli): add # shortcut for task history in help trigger
cte Jan 8, 2026
9fd7112
Add instructions to push
cte Jan 8, 2026
75cade7
refactor(cli): simplify logging and streamline tool display
cte Jan 8, 2026
8d3a6ac
refactor(cli): extract hooks, stores, and utils from TUI App component
cte Jan 8, 2026
86ca7e4
test(cli): update tests to match refactored output format
cte Jan 8, 2026
adc1da1
Fix crash
cte Jan 8, 2026
9ffe49a
refactor(cli): remove renderLogger and add performance optimizations
cte Jan 8, 2026
13e3d69
style(cli): simplify ModeTool layout to horizontal with mode suffix
cte Jan 8, 2026
68a5352
chore(cli): prepare release v0.0.45
cte Jan 8, 2026
08869cd
Fix release script
cte Jan 8, 2026
9a177ca
Merge main
cte Jan 8, 2026
cf14c73
CLI auth (#10565)
cte Jan 9, 2026
1c61e7f
Organize files
cte Jan 9, 2026
8dbb985
Fix integration tests
cte Jan 9, 2026
06000ac
Some fixes
cte Jan 9, 2026
66a5e56
Update changelog for version 3.39.0 release
mrubens Jan 8, 2026
d146e2b
fix: change minItems from 2 to 1 for Anthropic API compatibility (#10…
daniel-lxs Jan 8, 2026
21f6cb8
fix: disable Gemini thought signature persistence to prevent corrupte…
daniel-lxs Jan 8, 2026
625eca0
fix: stabilize file paths during native tool call streaming (#10555)
daniel-lxs Jan 8, 2026
88b365e
Release v3.39.1 (#10557)
mrubens Jan 8, 2026
cc630b6
Changeset version bump (#10558)
github-actions[bot] Jan 8, 2026
411a27d
fix: ensure assistant message content is never undefined for Gemini c…
daniel-lxs Jan 9, 2026
2f4a16e
Update Terms of Service (effective January 9, 2026) (#10568)
mrubens Jan 9, 2026
01f8e1c
fix(vscode-lm): order text parts before tool calls in assistant messa…
daniel-lxs Jan 9, 2026
c00a0c7
fix: merge approval feedback into tool result instead of pushing dupl…
daniel-lxs Jan 9, 2026
0c4ff3d
feat: improve error messaging for stream termination errors from prov…
daniel-lxs Jan 9, 2026
a18e992
fix(openai): remove convertToSimpleMessages to fix tool calling for O…
daniel-lxs Jan 9, 2026
3865db9
Merge main
cte Jan 9, 2026
12f34cf
Merge main
cte Jan 9, 2026
586df1c
Appease knip
cte Jan 9, 2026
23eb534
Merge main
cte Jan 9, 2026
4d697c2
Fix tsc errors
cte Jan 9, 2026
8a98077
Fix tsc errors
cte Jan 9, 2026
442cfd9
Merge branch 'main' into cte/cli-tui
cte Jan 9, 2026
719faf7
PR feedback
cte Jan 9, 2026
0393a23
Revert changes to Task, move docs
cte Jan 9, 2026
9d8744c
fix: pass action property through toSlashCommandResult function
roomote Jan 9, 2026
11222e9
Merge branch 'main' into cte/cli-tui
cte Jan 9, 2026
4d92653
Fix test on windows
cte Jan 9, 2026
eaff277
Fix test
cte Jan 9, 2026
30d568c
More fixes
cte Jan 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .roo/commands/cli-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
description: "Create a new release of the Roo Code CLI"
argument-hint: "[version-description]"
mode: code
---

1. Identify changes since the last CLI release:

- Get the last CLI release tag: `gh release list --limit 10 | grep "cli-v"`
- View changes since last release: `git log cli-v<last-version>..HEAD -- apps/cli --oneline`
- Or for uncommitted changes: `git diff --stat -- apps/cli`

2. Review and summarize the changes to determine an appropriate changelog entry. Group changes by type:

- **Added**: New features
- **Changed**: Changes to existing functionality
- **Fixed**: Bug fixes
- **Removed**: Removed features
- **Tests**: New or updated tests

3. Bump the version in `apps/cli/package.json`:

- Increment the patch version (e.g., 0.0.43 → 0.0.44) for bug fixes and minor changes
- Increment the minor version (e.g., 0.0.43 → 0.1.0) for new features
- Increment the major version (e.g., 0.0.43 → 1.0.0) for breaking changes

4. Update `apps/cli/CHANGELOG.md` with a new entry:

- Add a new section at the top (below the header) following this format:

```markdown
## [X.Y.Z] - YYYY-MM-DD

### Added

- Description of new features

### Changed

- Description of changes

### Fixed

- Description of bug fixes
```

- Use the current date in YYYY-MM-DD format
- Include links to relevant source files where helpful
- Describe changes from the user's perspective

5. Commit the version bump and changelog update:

```bash
git add apps/cli/package.json apps/cli/CHANGELOG.md
git commit -m "chore(cli): prepare release v<version>"
```

6. Run the release script from the monorepo root:

```bash
./apps/cli/scripts/release.sh
```

The release script will automatically:

- Build the extension and CLI
- Create a platform-specific tarball
- Verify the installation works correctly (runs --help, --version, and e2e test)
- Extract changelog content and include it in the GitHub release notes
- Create the GitHub release with the tarball attached

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

**Notes:**

- The release script requires GitHub CLI (`gh`) to be installed and authenticated
- If a release already exists for the tag, the script will prompt to delete and recreate it
- The script creates a tarball for the current platform only (darwin-arm64, darwin-x64, linux-arm64, or linux-x64)
- Multi-platform releases require running the script on each platform and manually uploading additional tarballs
80 changes: 80 additions & 0 deletions .roo/commands/commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
description: "Commit and push changes with a descriptive message"
argument-hint: "[optional-context]"
mode: code
---

1. Analyze the current changes to understand what needs to be committed:

```bash
# Check for staged and unstaged changes
git status --short

# View the diff of all changes (staged and unstaged)
git diff HEAD
```

2. Based on the diff output, formulate a commit message following conventional commit format:

- **feat**: New feature or functionality
- **fix**: Bug fix
- **refactor**: Code restructuring without behavior change
- **docs**: Documentation changes
- **test**: Adding or updating tests
- **chore**: Maintenance tasks, dependencies, configs
- **style**: Formatting, whitespace, no logic changes

Format: `type(scope): brief description`

Examples:

- `feat(api): add user authentication endpoint`
- `fix(ui): resolve button alignment on mobile`
- `refactor(core): simplify error handling logic`
- `docs(readme): update installation instructions`

3. Stage all unstaged changes:

```bash
git add -A
```

4. Commit with the generated message:

```bash
git commit -m "type(scope): brief description"
```

**If pre-commit hooks fail:**

- Review the error output (linter errors, type checking errors, etc.)
- Fix the identified issues in the affected files
- Re-stage the fixes: `git add -A`
- Retry the commit: `git commit -m "type(scope): brief description"`

5. Push to the remote repository:

```bash
git push
```

**If pre-push hooks fail:**

- Review the error output (test failures, linter errors, etc.)
- Fix the identified issues in the affected files
- Stage and commit the fixes using steps 3-4
- Retry the push: `git push`

**Tips for good commit messages:**

- Keep the first line under 72 characters
- Use imperative mood ("add", "fix", "update", not "added", "fixes", "updated")
- Be specific but concise
- If multiple unrelated changes exist, consider splitting into separate commits

**Common hook failures and fixes:**

- **Linter errors**: Run the project's linter (e.g., `npm run lint` or `pnpm lint`) to see all issues, then fix them
- **Type checking errors**: Run type checker (e.g., `npx tsc --noEmit`) to identify type issues
- **Test failures**: Run tests (e.g., `npm test` or `pnpm test`) to identify failing tests and fix them
- **Format issues**: Run formatter (e.g., `npm run format` or `pnpm format`) to auto-fix formatting
67 changes: 67 additions & 0 deletions .roo/rules-debug/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# CLI Debugging with File-Based Logging

When debugging the CLI, `console.log` will break the TUI (Terminal User Interface). Use file-based logging to capture debug output without interfering with the application's display.

## File-Based Logging Strategy

1. **Write logs to a temporary file instead of console**:

- Create a log file at a known location, e.g., `/tmp/roo-cli-debug.log`
- Use `fs.appendFileSync()` to write timestamped log entries
- Example logging utility:

```typescript
import fs from "fs"
const DEBUG_LOG = "/tmp/roo-cli-debug.log"

function debugLog(message: string, data?: unknown) {
const timestamp = new Date().toISOString()
const entry = data
? `[${timestamp}] ${message}: ${JSON.stringify(data, null, 2)}\n`
: `[${timestamp}] ${message}\n`
fs.appendFileSync(DEBUG_LOG, entry)
}
```

2. **Clear the log file before each debugging session**:
- Run `echo "" > /tmp/roo-cli-debug.log` or use `fs.writeFileSync(DEBUG_LOG, "")` at app startup during debugging

## Iterative Debugging Workflow

Follow this feedback loop to systematically narrow down issues:

1. **Add targeted logging** at suspected problem areas based on your hypotheses
2. **Instruct the user** to reproduce the issue using the CLI normally
3. **Read the log file** after the user completes testing:
- Run `cat /tmp/roo-cli-debug.log` to retrieve the captured output
4. **Analyze the log output** to gather clues about:
- Execution flow and timing
- Variable values at key points
- Which code paths were taken
- Error conditions or unexpected states
5. **Refine your logging** based on findings—add more detail where needed, remove noise
6. **Ask the user to test again** with updated logging
7. **Repeat** until the root cause is identified

## Best Practices

- Log entry/exit points of functions under investigation
- Include relevant variable values and state information
- Use descriptive prefixes to categorize logs: `[STATE]`, `[EVENT]`, `[ERROR]`, `[FLOW]`
- Log both the "happy path" and error handling branches
- When dealing with async operations, log before and after `await` statements
- For user interactions, log the received input and the resulting action

## Example Debug Session

```typescript
// Add logging to investigate a picker selection issue
debugLog("[FLOW] PickerSelect onSelect called", { selectedIndex, item })
debugLog("[STATE] Current selection state", { currentValue, isOpen })

// After async operation
const result = await fetchOptions()
debugLog("[FLOW] fetchOptions completed", { resultCount: result.length })
```

Then ask: "Please reproduce the issue by [specific steps]. When you're done, let me know and I'll analyze the debug logs."
116 changes: 116 additions & 0 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Changelog

All notable changes to the `@roo-code/cli` package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.45] - 2026-01-08

### Changed

- **Major Refactor**: Extracted ~1400 lines from [`App.tsx`](src/ui/App.tsx) into reusable hooks and utilities for better maintainability:

- [`useExtensionHost`](src/ui/hooks/useExtensionHost.ts) - Extension host connection and lifecycle management
- [`useMessageHandlers`](src/ui/hooks/useMessageHandlers.ts) - Message processing and state updates
- [`useTaskSubmit`](src/ui/hooks/useTaskSubmit.ts) - Task submission logic
- [`useGlobalInput`](src/ui/hooks/useGlobalInput.ts) - Global keyboard shortcut handling
- [`useFollowupCountdown`](src/ui/hooks/useFollowupCountdown.ts) - Auto-approval countdown logic
- [`useFocusManagement`](src/ui/hooks/useFocusManagement.ts) - Input focus state management
- [`usePickerHandlers`](src/ui/hooks/usePickerHandlers.ts) - Picker component event handling
- [`uiStateStore`](src/ui/stores/uiStateStore.ts) - UI-specific state (showExitHint, countdown, etc.)
- Tool data utilities ([`extractToolData`](src/ui/utils/toolDataUtils.ts), `formatToolOutput`, etc.)
- [`HorizontalLine`](src/ui/components/HorizontalLine.tsx) component

- **Performance Optimizations**:

- Added RAF-style scroll throttling to reduce state updates
- Stabilized `useExtensionHost` hook return values with `useCallback`/`useMemo`
- Added streaming message debouncing to batch rapid partial updates
- Added shallow array equality checks to prevent unnecessary re-renders

- Simplified [`ModeTool`](src/ui/components/tools/ModeTool.tsx) layout to horizontal with mode suffix
- Simplified logging by removing verbose debug output and adding first/last partial message logging pattern
- Updated Nerd Font icon codepoints in [`Icon`](src/ui/components/Icon.tsx) component

### Added

- `#` shortcut in help trigger for quick access to task history autocomplete

### Fixed

- Fixed a crash in message handling
- Added protected file warning in tool approval prompts
- Enabled `alwaysAllowWriteProtected` for non-interactive mode

### Removed

- Removed unused `renderLogger.ts` utility file

### Tests

- Updated extension-host tests to expect `[Tool Request]` format
- Updated Icon tests to expect single-char Nerd Font icons

## [0.0.44] - 2026-01-08

### Added

- **Tool Renderer Components**: Specialized renderers for displaying tool outputs with optimized formatting for each tool type. Each renderer provides a focused view of its data structure.

- [`FileReadTool`](src/ui/components/tools/FileReadTool.tsx) - Display file read operations with syntax highlighting
- [`FileWriteTool`](src/ui/components/tools/FileWriteTool.tsx) - Show file write/edit operations with diff views
- [`SearchTool`](src/ui/components/tools/SearchTool.tsx) - Render search results with context
- [`CommandTool`](src/ui/components/tools/CommandTool.tsx) - Display command execution with output
- [`BrowserTool`](src/ui/components/tools/BrowserTool.tsx) - Show browser automation actions
- [`ModeTool`](src/ui/components/tools/ModeTool.tsx) - Display mode switching operations
- [`CompletionTool`](src/ui/components/tools/CompletionTool.tsx) - Show task completion status
- [`GenericTool`](src/ui/components/tools/GenericTool.tsx) - Fallback renderer for other tools

- **History Trigger**: New `#` trigger for task history autocomplete with fuzzy search support. Type `#` at the start of a line to browse and resume previous tasks.

- [`HistoryTrigger.tsx`](src/ui/components/autocomplete/triggers/HistoryTrigger.tsx) - Trigger implementation with fuzzy filtering
- Shows task status, mode, and relative timestamps
- Supports keyboard navigation for quick task selection

- **Release Confirmation Prompt**: The release script now prompts for confirmation before creating a release.

### Fixed

- Task history picker selection and navigation issues
- Mode switcher keyboard handling bug

### Changed

- Reorganized test files into `__tests__` directories for better project structure
- Refactored utility modules into dedicated `utils/` directory

## [0.0.43] - 2026-01-07

### Added

- **Toast Notification System**: New toast notifications for user feedback with support for info, success, warning, and error types. Toasts auto-dismiss after a configurable duration and are managed via Zustand store.

- New [`ToastDisplay`](src/ui/components/ToastDisplay.tsx) component for rendering toast messages
- New [`useToast`](src/ui/hooks/useToast.ts) hook for managing toast state and displaying notifications

- **Global Input Sequences Registry**: Centralized system for handling keyboard shortcuts at the application level, preventing conflicts with input components.

- New [`globalInputSequences.ts`](src/ui/utils/globalInputSequences.ts) utility module
- Support for Kitty keyboard protocol (CSI u encoding) for better terminal compatibility
- Built-in sequences for `Ctrl+C` (exit) and `Ctrl+M` (mode cycling)

- **Local Tarball Installation**: The install script now supports installing from a local tarball via the `ROO_LOCAL_TARBALL` environment variable, useful for offline installation or testing pre-release builds.

### Changed

- **MultilineTextInput**: Updated to respect global input sequences, preventing the component from consuming shortcuts meant for application-level handling.

### Tests

- Added comprehensive tests for the toast notification system
- Added tests for global input sequence matching

## [0.0.42] - 2025-01-07

The cli is alive!
Loading
Loading