Skip to content

Commit d47fbed

Browse files
fix: 修复 mcp-server 构建错误
Co-authored-by: aider (vertex_ai/gemini-2.5-pro) <aider@aider.chat>
1 parent f0cdd52 commit d47fbed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/mcp-server/src/bridge/bridge.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
type Tool as GcliTool,
88
type ToolResult,
99
GeminiChat,
10-
getResponseText,
1110
} from '@google/gemini-cli-core';
1211
import {
1312
type CallToolResult,
@@ -165,7 +164,7 @@ export class GcliMcpBridge {
165164
const request = {
166165
message: [{ text: args.query as string }],
167166
config: {
168-
tools: [{ googleSearch: {} }], // For web_search
167+
tools: [{ googleSearch: {} }] as Tool[], // For web_search
169168
},
170169
};
171170

@@ -176,8 +175,9 @@ export class GcliMcpBridge {
176175
}
177176

178177
// Send the request using the one-shot session
179-
const response = await oneShotChat.sendMessage(request);
180-
const resultText = getResponseText(response) || '';
178+
const result = await oneShotChat.sendMessage(request);
179+
const response = result.response;
180+
const resultText = response.text() || '';
181181

182182
// Convert the result to the MCP format
183183
const mcpResult = this.convertGcliResultToMcpResult({

0 commit comments

Comments
 (0)