mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 15:10:59 -07:00
fix(core): use constant for tool_output_truncated event name (#10372)
This commit is contained in:
@@ -30,6 +30,7 @@ export const EVENT_CONTENT_RETRY = 'gemini_cli.chat.content_retry';
|
||||
export const EVENT_CONTENT_RETRY_FAILURE =
|
||||
'gemini_cli.chat.content_retry_failure';
|
||||
export const EVENT_FILE_OPERATION = 'gemini_cli.file_operation';
|
||||
export const EVENT_TOOL_OUTPUT_TRUNCATED = 'gemini_cli.tool_output_truncated';
|
||||
export const EVENT_MODEL_SLASH_COMMAND = 'gemini_cli.slash_command.model';
|
||||
export const EVENT_SMART_EDIT_STRATEGY = 'gemini_cli.smart_edit.strategy';
|
||||
export const EVENT_MODEL_ROUTING = 'gemini_cli.model_routing';
|
||||
|
||||
@@ -37,6 +37,7 @@ import {
|
||||
EVENT_EXTENSION_DISABLE,
|
||||
EVENT_EXTENSION_INSTALL,
|
||||
EVENT_EXTENSION_UNINSTALL,
|
||||
EVENT_TOOL_OUTPUT_TRUNCATED,
|
||||
} from './constants.js';
|
||||
import {
|
||||
logApiRequest,
|
||||
@@ -1173,7 +1174,7 @@ describe('loggers', () => {
|
||||
attributes: {
|
||||
'session.id': 'test-session-id',
|
||||
'user.email': 'test-user@example.com',
|
||||
'event.name': 'tool_output_truncated',
|
||||
'event.name': EVENT_TOOL_OUTPUT_TRUNCATED,
|
||||
'event.timestamp': '2025-01-01T00:00:00.000Z',
|
||||
eventName: 'tool_output_truncated',
|
||||
prompt_id: 'prompt-id-1',
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
EVENT_CONTENT_RETRY,
|
||||
EVENT_CONTENT_RETRY_FAILURE,
|
||||
EVENT_FILE_OPERATION,
|
||||
EVENT_TOOL_OUTPUT_TRUNCATED,
|
||||
EVENT_RIPGREP_FALLBACK,
|
||||
EVENT_MODEL_ROUTING,
|
||||
EVENT_EXTENSION_INSTALL,
|
||||
@@ -214,7 +215,7 @@ export function logToolOutputTruncated(
|
||||
const attributes: LogAttributes = {
|
||||
...getCommonAttributes(config),
|
||||
...event,
|
||||
'event.name': 'tool_output_truncated',
|
||||
'event.name': EVENT_TOOL_OUTPUT_TRUNCATED,
|
||||
'event.timestamp': new Date().toISOString(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user