Skip to content

Commit 8d96290

Browse files
committed
chore: fix ci errors
1 parent f3a0dac commit 8d96290

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

src/lib/tools/BetaToolRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ async function generateToolResponse(
412412

413413
const toolResults = await Promise.all(
414414
toolUseBlocks.map(async (toolUse) => {
415-
const tool = params.tools.find((t) => t.name === toolUse.name);
415+
const tool = params.tools.find((t) => ('name' in t ? t.name : t.mcp_server_name) === toolUse.name);
416416
if (!tool || !('run' in tool)) {
417417
return {
418418
type: 'tool_result' as const,

src/lib/tools/ToolRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ async function generateToolResponse(
319319

320320
const toolResults = await Promise.all(
321321
toolUseBlocks.map(async (toolUse) => {
322-
const tool = params.tools.find((t) => t.name === toolUse.name);
322+
const tool = params.tools.find((t) => ('name' in t ? t.name : t.mcp_server_name) === toolUse.name);
323323
if (!tool || !('run' in tool)) {
324324
return {
325325
type: 'tool_result' as const,

src/resources/beta/beta.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ import {
194194
MessageCreateParamsNonStreaming,
195195
MessageCreateParamsStreaming,
196196
Messages,
197+
BetaMCPToolConfig,
198+
BetaMCPToolDefaultConfig,
197199
} from './messages/messages';
198200
import * as SkillsAPI from './skills/skills';
199201
import {

src/resources/beta/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export {
9191
type BetaJSONOutputFormat,
9292
type BetaInputTokensClearAtLeast,
9393
type BetaInputTokensTrigger,
94-
type BetaJSONOutputFormat,
9594
type BetaMCPToolConfig,
9695
type BetaMCPToolDefaultConfig,
9796
type BetaMCPToolResultBlock,
@@ -215,6 +214,7 @@ export {
215214
type MessageCreateParamsNonStreaming,
216215
type MessageCreateParamsStreaming,
217216
type MessageCountTokensParams,
217+
type BetaToolResultContentBlockParam,
218218
} from './messages/index';
219219
export {
220220
Models,

src/resources/beta/messages/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,5 +198,16 @@ export {
198198
type MessageCreateParamsStreaming,
199199
type MessageCountTokensParams,
200200
type BetaMessageStreamParams,
201+
type BetaToolSearchToolBm25_20251119,
202+
type BetaToolSearchToolRegex20251119,
203+
type BetaToolSearchToolResultBlock,
204+
type BetaToolSearchToolResultBlockParam,
205+
type BetaToolSearchToolResultError,
206+
type BetaToolSearchToolResultErrorParam,
207+
type BetaToolSearchToolSearchResultBlock,
208+
type BetaToolSearchToolSearchResultBlockParam,
209+
type BetaMCPToolConfig,
210+
type BetaMCPToolDefaultConfig,
211+
type BetaToolResultContentBlockParam,
201212
} from './messages';
202213
export { BetaToolRunner, type BetaToolRunnerParams } from './messages';

0 commit comments

Comments
 (0)