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

Commit 33bff28

Browse files
committed
fix(parser): add read_command_output to NativeToolCallParser
chore: remove terminalCompressProgressBar setting - Fix: Add missing read_command_output case to parser (was causing 'Invalid arguments' errors) - Remove: Delete compress progress bar setting from all components (redundant with preview size control) - Clean up: Remove from global-settings, OutputInterceptor, BaseTerminal, ExecuteCommandTool, SettingsView, TerminalSettings, ExtensionStateContext - Clean up: Remove from all i18n locale files
1 parent e61dc7c commit 33bff28

33 files changed

Lines changed: 14 additions & 223 deletions

packages/types/src/cloud.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ export const organizationDefaultSettingsSchema = globalSettingsSchema
9999
maxWorkspaceFiles: true,
100100
showRooIgnoredFiles: true,
101101
terminalCommandDelay: true,
102-
terminalCompressProgressBar: true,
103102
terminalOutputLineLimit: true,
104103
terminalShellIntegrationDisabled: true,
105104
terminalShellIntegrationTimeout: true,

packages/types/src/global-settings.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ export const globalSettingsSchema = z.object({
194194
terminalZshOhMy: z.boolean().optional(),
195195
terminalZshP10k: z.boolean().optional(),
196196
terminalZdotdir: z.boolean().optional(),
197-
terminalCompressProgressBar: z.boolean().optional(),
198197

199198
diagnosticsEnabled: z.boolean().optional(),
200199

@@ -384,7 +383,6 @@ export const EVALS_SETTINGS: RooCodeSettings = {
384383
terminalZshClearEolMark: true,
385384
terminalZshP10k: false,
386385
terminalZdotdir: true,
387-
terminalCompressProgressBar: true,
388386
terminalShellIntegrationDisabled: true,
389387

390388
diagnosticsEnabled: true,

packages/types/src/vscode-extension-host.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ export type ExtensionState = Pick<
313313
| "terminalZshOhMy"
314314
| "terminalZshP10k"
315315
| "terminalZdotdir"
316-
| "terminalCompressProgressBar"
317316
| "diagnosticsEnabled"
318317
| "language"
319318
| "modeApiConfigs"

src/core/assistant-message/NativeToolCallParser.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,17 @@ export class NativeToolCallParser {
790790
}
791791
break
792792

793+
case "read_command_output":
794+
if (args.artifact_id !== undefined) {
795+
nativeArgs = {
796+
artifact_id: args.artifact_id,
797+
search: args.search,
798+
offset: args.offset,
799+
limit: args.limit,
800+
} as NativeArgsFor<TName>
801+
}
802+
break
803+
793804
case "write_to_file":
794805
if (args.path !== undefined && args.content !== undefined) {
795806
nativeArgs = {

src/core/tools/ExecuteCommandTool.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,13 @@ export async function executeCommandInTerminal(
211211
const providerState = await provider?.getState()
212212
const terminalOutputPreviewSize =
213213
providerState?.terminalOutputPreviewSize ?? DEFAULT_TERMINAL_OUTPUT_PREVIEW_SIZE
214-
const terminalCompressProgressBar = providerState?.terminalCompressProgressBar ?? true
215214

216215
interceptor = new OutputInterceptor({
217216
executionId,
218217
taskId: task.taskId,
219218
command,
220219
storageDir,
221220
previewSize: terminalOutputPreviewSize,
222-
compressProgressBar: terminalCompressProgressBar,
223221
})
224222
}
225223

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,6 @@ export class ClineProvider
20482048
maxReadFileLine,
20492049
maxImageFileSize,
20502050
maxTotalImageSize,
2051-
terminalCompressProgressBar,
20522051
historyPreviewCollapsed,
20532052
reasoningBlockCollapsed,
20542053
enterBehavior,
@@ -2196,7 +2195,6 @@ export class ClineProvider
21962195
maxTotalImageSize: maxTotalImageSize ?? 20,
21972196
maxConcurrentFileReads: maxConcurrentFileReads ?? 5,
21982197
settingsImportedAt: this.settingsImportedAt,
2199-
terminalCompressProgressBar: terminalCompressProgressBar ?? true,
22002198
hasSystemPromptOverride,
22012199
historyPreviewCollapsed: historyPreviewCollapsed ?? false,
22022200
reasoningBlockCollapsed: reasoningBlockCollapsed ?? true,
@@ -2415,7 +2413,6 @@ export class ClineProvider
24152413
terminalZshOhMy: stateValues.terminalZshOhMy ?? false,
24162414
terminalZshP10k: stateValues.terminalZshP10k ?? false,
24172415
terminalZdotdir: stateValues.terminalZdotdir ?? false,
2418-
terminalCompressProgressBar: stateValues.terminalCompressProgressBar ?? true,
24192416
mode: stateValues.mode ?? defaultModeSlug,
24202417
language: stateValues.language ?? formatLanguage(vscode.env.language),
24212418
mcpEnabled: stateValues.mcpEnabled ?? true,

src/core/webview/webviewMessageHandler.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,6 @@ export const webviewMessageHandler = async (
631631
if (value !== undefined) {
632632
Terminal.setTerminalZdotdir(value as boolean)
633633
}
634-
} else if (key === "terminalCompressProgressBar") {
635-
if (value !== undefined) {
636-
Terminal.setCompressProgressBar(value as boolean)
637-
}
638634
} else if (key === "mcpEnabled") {
639635
newValue = value ?? true
640636
const mcpHub = provider.getMcpHub()

src/integrations/terminal/BaseTerminal.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { truncateOutput, applyRunLengthEncoding, processBackspaces, processCarriageReturns } from "../misc/extract-text"
1+
import { truncateOutput, applyRunLengthEncoding } from "../misc/extract-text"
22
import { DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT } from "@roo-code/types"
33

44
import type {
@@ -162,7 +162,6 @@ export abstract class BaseTerminal implements RooTerminal {
162162
private static terminalZshOhMy: boolean = false
163163
private static terminalZshP10k: boolean = false
164164
private static terminalZdotdir: boolean = false
165-
private static compressProgressBar: boolean = true
166165

167166
/**
168167
* Compresses terminal output by applying run-length encoding and truncating to line limit
@@ -273,17 +272,10 @@ export abstract class BaseTerminal implements RooTerminal {
273272
* @returns The compressed terminal output
274273
*/
275274
public static compressTerminalOutput(input: string, lineLimit: number, characterLimit?: number): string {
276-
let processedInput = input
277-
278-
if (BaseTerminal.compressProgressBar) {
279-
processedInput = processCarriageReturns(processedInput)
280-
processedInput = processBackspaces(processedInput)
281-
}
282-
283275
// Default character limit to prevent context window explosion
284276
const effectiveCharLimit = characterLimit ?? DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT
285277

286-
return truncateOutput(applyRunLengthEncoding(processedInput), lineLimit, effectiveCharLimit)
278+
return truncateOutput(applyRunLengthEncoding(input), lineLimit, effectiveCharLimit)
287279
}
288280

289281
/**
@@ -301,20 +293,4 @@ export abstract class BaseTerminal implements RooTerminal {
301293
public static getTerminalZdotdir(): boolean {
302294
return BaseTerminal.terminalZdotdir
303295
}
304-
305-
/**
306-
* Sets whether to compress progress bar output by processing carriage returns
307-
* @param enabled Whether to enable progress bar compression
308-
*/
309-
public static setCompressProgressBar(enabled: boolean): void {
310-
BaseTerminal.compressProgressBar = enabled
311-
}
312-
313-
/**
314-
* Gets whether progress bar compression is enabled
315-
* @returns Whether progress bar compression is enabled
316-
*/
317-
public static getCompressProgressBar(): boolean {
318-
return BaseTerminal.compressProgressBar
319-
}
320296
}

src/integrations/terminal/OutputInterceptor.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as path from "path"
33

44
import { TerminalOutputPreviewSize, TERMINAL_PREVIEW_BYTES, PersistedCommandOutput } from "@roo-code/types"
55

6-
import { processCarriageReturns, processBackspaces } from "../misc/extract-text"
7-
86
/**
97
* Configuration options for creating an OutputInterceptor instance.
108
*/
@@ -19,8 +17,6 @@ export interface OutputInterceptorOptions {
1917
storageDir: string
2018
/** Size category for the preview buffer (small/medium/large) */
2119
previewSize: TerminalOutputPreviewSize
22-
/** Whether to compress progress bar output using carriage return processing */
23-
compressProgressBar: boolean
2420
}
2521

2622
/**
@@ -46,7 +42,6 @@ export interface OutputInterceptorOptions {
4642
* command: 'npm test',
4743
* storageDir: '/path/to/task/command-output',
4844
* previewSize: 'medium',
49-
* compressProgressBar: true
5045
* });
5146
*
5247
* // Write output chunks as they arrive
@@ -66,7 +61,6 @@ export class OutputInterceptor {
6661
private totalBytes: number = 0
6762
private spilledToDisk: boolean = false
6863
private readonly previewBytes: number
69-
private readonly compressProgressBar: boolean
7064

7165
/**
7266
* Creates a new OutputInterceptor instance.
@@ -75,7 +69,6 @@ export class OutputInterceptor {
7569
*/
7670
constructor(private readonly options: OutputInterceptorOptions) {
7771
this.previewBytes = TERMINAL_PREVIEW_BYTES[options.previewSize]
78-
this.compressProgressBar = options.compressProgressBar
7972
this.artifactPath = path.join(options.storageDir, `cmd-${options.executionId}.txt`)
8073
}
8174

@@ -143,9 +136,6 @@ export class OutputInterceptor {
143136
* - The path to the full output file (if truncated)
144137
* - A flag indicating whether the output was truncated
145138
*
146-
* If `compressProgressBar` was enabled, the preview will have carriage returns
147-
* and backspaces processed to show only final line states.
148-
*
149139
* @returns The persisted command output summary
150140
*
151141
* @example
@@ -165,13 +155,7 @@ export class OutputInterceptor {
165155
}
166156

167157
// Prepare preview
168-
let preview = this.buffer.slice(0, this.previewBytes)
169-
170-
// Apply compression to preview only (for readability)
171-
if (this.compressProgressBar) {
172-
preview = processCarriageReturns(preview)
173-
preview = processBackspaces(preview)
174-
}
158+
const preview = this.buffer.slice(0, this.previewBytes)
175159

176160
return {
177161
preview,

0 commit comments

Comments
 (0)