Merge branch 'main' into feature/arena-agent-collaboration

This commit is contained in:
tanzhenxin 2026-03-17 14:00:47 +08:00
commit edd8388b27
122 changed files with 3731 additions and 2201 deletions

View file

@ -39,7 +39,6 @@ import {
type FileSystemService,
StandardFileSystemService,
type FileEncodingType,
FileEncoding,
} from '../services/fileSystemService.js';
import { GitService } from '../services/gitService.js';
@ -197,10 +196,6 @@ export interface ChatCompressionSettings {
contextPercentageThreshold?: number;
}
export interface SummarizeToolOutputSettings {
tokenBudget?: number;
}
export interface TelemetrySettings {
enabled?: boolean;
target?: TelemetryTarget;
@ -361,7 +356,6 @@ export interface ConfigParameters {
allowedMcpServers?: string[];
excludedMcpServers?: string[];
noBrowser?: boolean;
summarizeToolOutput?: Record<string, SummarizeToolOutputSettings>;
folderTrustFeature?: boolean;
folderTrust?: boolean;
ideMode?: boolean;
@ -397,7 +391,6 @@ export interface ConfigParameters {
skipLoopDetection?: boolean;
truncateToolOutputThreshold?: number;
truncateToolOutputLines?: number;
enableToolOutputTruncation?: boolean;
eventEmitter?: EventEmitter;
output?: OutputSettings;
inputFormat?: InputFormat;
@ -522,9 +515,6 @@ export class Config {
private readonly listExtensions: boolean;
private readonly overrideExtensions?: string[];
private readonly summarizeToolOutput:
| Record<string, SummarizeToolOutputSettings>
| undefined;
private readonly cliVersion?: string;
private readonly experimentalZedIntegration: boolean = false;
private readonly chatRecordingEnabled: boolean;
@ -560,10 +550,9 @@ export class Config {
private readonly fileExclusions: FileExclusions;
private readonly truncateToolOutputThreshold: number;
private readonly truncateToolOutputLines: number;
private readonly enableToolOutputTruncation: boolean;
private readonly eventEmitter?: EventEmitter;
private readonly channel: string | undefined;
private readonly defaultFileEncoding: FileEncodingType;
private readonly defaultFileEncoding: FileEncodingType | undefined;
private readonly enableHooks: boolean;
private readonly hooks?: Record<string, unknown>;
private readonly hooksConfig?: Record<string, unknown>;
@ -644,7 +633,6 @@ export class Config {
this.listExtensions = params.listExtensions ?? false;
this.overrideExtensions = params.overrideExtensions;
this.noBrowser = params.noBrowser ?? false;
this.summarizeToolOutput = params.summarizeToolOutput;
this.folderTrustFeature = params.folderTrustFeature ?? false;
this.folderTrust = params.folderTrust ?? false;
this.ideMode = params.ideMode ?? false;
@ -681,9 +669,8 @@ export class Config {
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD;
this.truncateToolOutputLines =
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
this.channel = params.channel;
this.defaultFileEncoding = params.defaultFileEncoding ?? FileEncoding.UTF8;
this.defaultFileEncoding = params.defaultFileEncoding;
this.storage = new Storage(this.targetDir);
this.inputFormat = params.inputFormat ?? InputFormat.TEXT;
this.fileExclusions = new FileExclusions(this);
@ -1677,12 +1664,6 @@ export class Config {
return this.getNoBrowser() || !shouldAttemptBrowserLaunch();
}
getSummarizeToolOutputConfig():
| Record<string, SummarizeToolOutputSettings>
| undefined {
return this.summarizeToolOutput;
}
// Web search provider configuration
getWebSearchConfig() {
return this.webSearch;
@ -1743,7 +1724,7 @@ export class Config {
* Get the default file encoding for new files.
* @returns FileEncodingType
*/
getDefaultFileEncoding(): FileEncodingType {
getDefaultFileEncoding(): FileEncodingType | undefined {
return this.defaultFileEncoding;
}
@ -1811,15 +1792,8 @@ export class Config {
return this.skipStartupContext;
}
getEnableToolOutputTruncation(): boolean {
return this.enableToolOutputTruncation;
}
getTruncateToolOutputThreshold(): number {
if (
!this.enableToolOutputTruncation ||
this.truncateToolOutputThreshold <= 0
) {
if (this.truncateToolOutputThreshold <= 0) {
return Number.POSITIVE_INFINITY;
}
@ -1827,7 +1801,7 @@ export class Config {
}
getTruncateToolOutputLines(): number {
if (!this.enableToolOutputTruncation || this.truncateToolOutputLines <= 0) {
if (this.truncateToolOutputLines <= 0) {
return Number.POSITIVE_INFINITY;
}