You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Intelligent reading**: Token-budget aware reading that auto-truncates to fit remaining budget instead of failing
78
+
-**Large file preview**: Returns a 100KB preview for very large files to enable quick inspection
79
+
-**Graceful error recovery**: Recovers from stream errors and guides you to use line_range for targeted reads
77
80
- Automatically truncates large text files when no line range is specified, showing the beginning of the file
78
81
- Provides method summaries with line ranges for truncated large code files
79
82
- Efficiently streams only requested line ranges for better performance
@@ -113,12 +116,13 @@ When the `maxConcurrentFileReads` setting is greater than 1, the `read_file` too
113
116
114
117
## Limitations
115
118
116
-
-May not handle extremely large files efficiently without using line range parameters
119
+
-**Large files**: For extremely large files, the tool provides a preview and guides you to use line_range for targeted reading
117
120
- For binary files (except PDF, DOCX, and supported image formats), may return content that isn't human-readable
118
121
-**Multi-file mode**: Requires `maxConcurrentFileReads` > 1 in settings
119
122
-**Image files**: Returns base64-encoded data URLs which may be large for high-resolution images
120
123
- Default max single image size: 20MB
121
124
- Default max total image size: 20MB
125
+
-**Token budget**: Automatically truncates content to fit remaining token budget to prevent context overruns
122
126
123
127
---
124
128
@@ -148,7 +152,14 @@ The tool uses a clear decision hierarchy to determine how to read a file:
148
152
- The implementation efficiently streams only the requested lines, making it suitable for processing large files
149
153
- This takes precedence over all other options
150
154
151
-
2.**Second Priority: Automatic Truncation for Large Text Files**
155
+
2.**Second Priority: Token Budget Management**
156
+
- The tool respects the remaining token budget to prevent context overruns
157
+
- If a file would exceed the remaining budget, it automatically truncates to fit
158
+
- For very large files (exceeding practical limits), returns a 100KB preview for quick inspection
159
+
- Provides guidance to use `line_range` for targeted reading of specific sections
160
+
- Recovers gracefully from stream errors and suggests alternative approaches
161
+
162
+
3.**Third Priority: Automatic Truncation for Large Text Files**
152
163
- This applies only when **all** of the following conditions are met:
153
164
- Neither `start_line` nor `end_line` is specified.
154
165
- The file is identified as a text-based file (not binary like PDF/DOCX).
@@ -159,7 +170,7 @@ The tool uses a clear decision hierarchy to determine how to read a file:
159
170
- For code files, it may also append a summary of source code definitions found within the truncated portion.
160
171
-**Special Case - Definitions Only Mode**: When `maxReadFileLine` is set to `0`, the tool returns only source code definitions without any file content.
161
172
162
-
3.**Default Behavior: Read Entire File**
173
+
4.**Default Behavior: Read Entire File**
163
174
- If neither an explicit range is given nor automatic truncation applies (e.g., the file is within the line limit, or it's a supported binary type), the tool reads the entire content.
164
175
- For supported formats like PDF and DOCX, it attempts to extract the full text content.
165
176
- For image formats, it returns a base64-encoded data URL that can be displayed in the chat interface.
@@ -291,6 +302,44 @@ If the file is excluded by rules in a `.rooignore` file:
291
302
<read_file>
292
303
<path>.env</path>
293
304
</read_file>
305
+
### Intelligent Reading with Token Budget Management
306
+
307
+
When reading large files, the tool automatically manages token budgets to prevent context overruns:
308
+
309
+
**Scenario:** Reading a very large file without specifying a line range.
310
+
311
+
**Input:**
312
+
```xml
313
+
<read_file>
314
+
<path>logs/massive-debug.log</path>
315
+
</read_file>
316
+
```
317
+
318
+
**Simulated Output (for a file exceeding token budget):**
319
+
```
320
+
[First 100KB of file content shown as preview...]
321
+
322
+
[File exceeds remaining token budget. Showing 100KB preview. Use line_range to read specific sections.]
323
+
```
324
+
325
+
This intelligent behavior ensures that:
326
+
- Small files read completely with zero overhead
327
+
- Large files auto-truncate to fit remaining token budget
328
+
- Very large files provide a quick preview
329
+
- You receive guidance to use `line_range` for targeted reads
Copy file name to clipboardExpand all lines: docs/advanced-usage/available-tools/search-files.md
+42-1Lines changed: 42 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ The tool accepts these parameters:
26
26
-`path` (required): The path of the directory to search in, relative to the current workspace directory. The search is confined to the workspace.
27
27
-`regex` (required): The regular expression pattern to search for (uses Rust regex syntax)
28
28
-`file_pattern` (optional): Glob pattern to filter files (e.g., '*.ts' for TypeScript files)
29
+
-`respect_gitignore` (optional): Whether to respect `.gitignore` patterns (default: `true`). Set to `false` to search all files including those in `.gitignore`.
29
30
30
31
---
31
32
@@ -47,6 +48,7 @@ This tool searches across files in a specified directory using regular expressio
47
48
## Key Features
48
49
49
50
- Searches across multiple files in a single operation using high-performance Ripgrep
51
+
-**Respects .gitignore**: Automatically excludes files and directories listed in `.gitignore` (including nested `.gitignore` files)
50
52
- Shows context around each match (1 line before and after)
51
53
- Filters files by type using glob patterns (e.g., only TypeScript files)
52
54
- Provides line numbers for easy reference
@@ -66,6 +68,7 @@ This tool searches across files in a specified directory using regular expressio
66
68
- Default context size is fixed (1 line before and after)
67
69
- May display varying context sizes when matches are close together due to result grouping
68
70
- For security, searches are strictly limited to the current workspace and cannot access parent directories or other locations on the file system.
71
+
-**Respects .gitignore by default**: Files listed in `.gitignore` are excluded from searches unless explicitly overridden with `respect_gitignore: false`
69
72
70
73
---
71
74
@@ -153,9 +156,47 @@ Finding all usages of a specific function:
153
156
```
154
157
155
158
Searching for a specific import pattern across the entire project:
By default, `search_files` respects `.gitignore` patterns in your workspace, including nested `.gitignore` files. This prevents searches in excluded directories like `node_modules/`, `dist/`, or other ignored paths.
168
+
169
+
### Default Behavior (Respecting .gitignore)
170
+
171
+
**Input:**
172
+
```xml
173
+
<search_files>
174
+
<path>.</path>
175
+
<regex>TODO</regex>
176
+
</search_files>
177
+
```
178
+
179
+
This search will **exclude** files and directories listed in `.gitignore`, ensuring focused results on tracked code.
180
+
181
+
### Overriding .gitignore (Search All Files)
182
+
183
+
To search **all files** including those in `.gitignore`, explicitly set `respect_gitignore` to `false`:
184
+
185
+
**Input:**
186
+
```xml
187
+
<search_files>
188
+
<path>.</path>
189
+
<regex>TODO</regex>
190
+
<respect_gitignore>false</respect_gitignore>
191
+
</search_files>
192
+
```
193
+
194
+
This searches **everything**, including `node_modules/`, build artifacts, and other ignored paths.
195
+
196
+
**When to override:**
197
+
- Debugging issues in dependencies or build output
198
+
- Searching through generated code
199
+
- Comprehensive audits that need to check all files
Copy file name to clipboardExpand all lines: docs/features/checkpoints.mdx
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,10 +53,21 @@ Checkpoints let you:
53
53
Access checkpoint settings in Roo Code settings under the "Checkpoints" section:
54
54
55
55
1. Open Settings by clicking the gear icon <Codiconname="gear" /> → Checkpoints
56
-
2. Check or uncheck the "Enable automatic checkpoints" checkbox
56
+
2. Configure checkpoint behavior:
57
+
- Check or uncheck the "Enable automatic checkpoints" checkbox
58
+
- Adjust the "Checkpoint initialization timeout" (10-60 seconds, default: 30s)
57
59
58
60
<imgsrc="/img/checkpoints/checkpoints.png"alt="Checkpoint settings in Roo Code configuration"width="500" />
59
61
62
+
#### Checkpoint Initialization Timeout
63
+
64
+
Controls how long the system waits for checkpoint initialization to complete before showing a warning. If your project has many files or is on slower storage, increasing this timeout can prevent premature warnings.
65
+
66
+
-**Range**: 10-60 seconds
67
+
-**Default**: 30 seconds
68
+
-**When to increase**: Large projects, slow disk I/O, or network-mounted directories
@@ -107,10 +118,12 @@ To compare your current workspace with a previous checkpoint:
107
118
108
119
### Restoring Checkpoints
109
120
121
+
Restore options are always visible in checkpoint buttons and dialogs, regardless of whether changes are detected. This ensures you can always revert to any checkpoint state.
122
+
110
123
To restore a project to a previous checkpoint state:
111
124
112
-
1. Locate the checkpoint in your chat history
113
-
2. Click the checkpoint's `Restore Checkpoint` button
125
+
1. Locate the checkpoint in your chat history or checkpoint menu
126
+
2. Click the checkpoint's `Restore Checkpoint` button (always visible)
* OpenRouter passes caching requests to underlying models that support it. Check the [OpenRouter Models page](https://openrouter.ai/models) to see which models offer caching.
60
60
* For most models, caching should activate automatically if supported by the model itself (similar to how Requesty works).
61
+
***Models with prompt caching support include:**
62
+
* Anthropic Claude Sonnet 3.5, 3.7
63
+
* Anthropic Claude Haiku 3.5
64
+
***Anthropic Claude Haiku 4.5** (newly added)
65
+
* Google Gemini models (with manual activation - see below)
61
66
***Exception for Gemini Models via OpenRouter:** Due to potential response delays sometimes observed with Google's caching mechanism when accessed via OpenRouter, a manual activation step is required *specifically for Gemini models*.
62
67
* If using a **Gemini model** via OpenRouter, you **must manually check** the "Enable Prompt Caching" box in the provider settings to activate caching for that model. This checkbox serves as a temporary workaround. For non-Gemini models on OpenRouter, this checkbox is not necessary for caching.
63
68
***Bring Your Own Key (BYOK):** If you use your own key for the underlying service, OpenRouter charges 5% of what it normally would. Roo Code automatically adjusts the cost calculation to reflect this.
description: Track usage and credits in Roo Code Cloud. View tokens, tasks, estimated cost, and credit consumption over time; learn where to check spend for Cloud Agents.
3
+
keywords:
4
+
- Roo Code Cloud
5
+
- analytics
6
+
- usage
7
+
- tokens
8
+
- credits
9
+
- cost
10
+
image: /img/social-share.jpg
11
+
redirect_from:
12
+
- /roo-code-cloud/dashboard
13
+
- /roo-code-cloud/dashboard/
14
+
- /roo-code-cloud/dashboard#usage-analytics-page
15
+
---
16
+
17
+
# Analytics
18
+
19
+
Analytics lets you track tokens, tasks, inference cost, and Cloud Agent credits usage in aggregate or according to a range of filters, defined by you. It's all free.
20
+
21
+
## Access
22
+
23
+
- Just go to the [Analytics](https://app.roocode.com/usage) tab
24
+
25
+
## What's tracked
26
+
27
+
- For Cloud Agents, all tasks are tracked and considered for analytics
28
+
- For the extension, only tasks you run while logged in get reported for analytics. You can turn off [task sync](/roo-code-cloud/task-sync) so the contents of tasks aren't sent to Cloud, but usage numbers are always reported while you're logged into the extension. That allows you to keep certain tasks away from Cloud while still benefiting from usage analytics.
0 commit comments