mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 12:34:38 -07:00
refactor: simplify tool output truncation to single config (#18446)
This commit is contained in:
@@ -1213,10 +1213,6 @@ export class ClearcutLogger {
|
||||
EventMetadataKey.GEMINI_CLI_TOOL_OUTPUT_TRUNCATED_THRESHOLD,
|
||||
value: JSON.stringify(event.threshold),
|
||||
},
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_TOOL_OUTPUT_TRUNCATED_LINES,
|
||||
value: JSON.stringify(event.lines),
|
||||
},
|
||||
];
|
||||
|
||||
const logEvent = this.createLogEvent(
|
||||
|
||||
@@ -1663,7 +1663,6 @@ describe('loggers', () => {
|
||||
originalContentLength: 1000,
|
||||
truncatedContentLength: 100,
|
||||
threshold: 500,
|
||||
lines: 10,
|
||||
});
|
||||
|
||||
logToolOutputTruncated(mockConfig, event);
|
||||
@@ -1683,7 +1682,6 @@ describe('loggers', () => {
|
||||
original_content_length: 1000,
|
||||
truncated_content_length: 100,
|
||||
threshold: 500,
|
||||
lines: 10,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1334,7 +1334,6 @@ export class ToolOutputTruncatedEvent implements BaseTelemetryEvent {
|
||||
original_content_length: number;
|
||||
truncated_content_length: number;
|
||||
threshold: number;
|
||||
lines: number;
|
||||
prompt_id: string;
|
||||
|
||||
constructor(
|
||||
@@ -1344,7 +1343,6 @@ export class ToolOutputTruncatedEvent implements BaseTelemetryEvent {
|
||||
originalContentLength: number;
|
||||
truncatedContentLength: number;
|
||||
threshold: number;
|
||||
lines: number;
|
||||
},
|
||||
) {
|
||||
this['event.name'] = this.eventName;
|
||||
@@ -1353,7 +1351,6 @@ export class ToolOutputTruncatedEvent implements BaseTelemetryEvent {
|
||||
this.original_content_length = details.originalContentLength;
|
||||
this.truncated_content_length = details.truncatedContentLength;
|
||||
this.threshold = details.threshold;
|
||||
this.lines = details.lines;
|
||||
}
|
||||
|
||||
toOpenTelemetryAttributes(config: Config): LogAttributes {
|
||||
@@ -1366,7 +1363,6 @@ export class ToolOutputTruncatedEvent implements BaseTelemetryEvent {
|
||||
original_content_length: this.original_content_length,
|
||||
truncated_content_length: this.truncated_content_length,
|
||||
threshold: this.threshold,
|
||||
lines: this.lines,
|
||||
prompt_id: this.prompt_id,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user