Changes to add tool_type as dimension (#6538)

Co-authored-by: Ravikant Agarwal <ravikantag@google.com>
This commit is contained in:
agarwalravikant
2025-08-19 10:55:47 +05:30
committed by GitHub
parent e290a61a52
commit 58c2925624
9 changed files with 46 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import {
isWithinRoot,
getErrorStatus,
MCPServerConfig,
DiscoveredMCPTool,
} from '@google/gemini-cli-core';
import * as acp from './acp.js';
import { AcpFileSystemService } from './fileSystemService.js';
@@ -344,6 +345,10 @@ class Session {
duration_ms: durationMs,
success: false,
error: error.message,
tool_type:
typeof tool !== 'undefined' && tool instanceof DiscoveredMCPTool
? 'mcp'
: 'native',
});
return [
@@ -457,6 +462,10 @@ class Session {
duration_ms: durationMs,
success: true,
prompt_id: promptId,
tool_type:
typeof tool !== 'undefined' && tool instanceof DiscoveredMCPTool
? 'mcp'
: 'native',
});
return convertToFunctionResponse(fc.name, callId, toolResult.llmContent);