Old-school test fixes

This commit is contained in:
Andrey Mishchenko
2026-03-28 10:00:42 -10:00
parent b0ca1e16a3
commit 3d4c524ee2
2 changed files with 4 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ fn append_code_mode_sample_uses_global_tools_for_valid_identifiers() {
"{ foo: string }".to_string(),
"unknown".to_string(),
),
"desc\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__ologs__get_profile(args: { foo: string }): Promise<unknown>; };\n```"
"desc\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__ologs__get_profile(args: { foo: string }): Promise<unknown>; };\n```"
);
}
@@ -99,6 +99,6 @@ fn append_code_mode_sample_normalizes_invalid_identifiers() {
"{ foo: string }".to_string(),
"unknown".to_string(),
),
"desc\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__rmcp__echo_tool(args: { foo: string }): Promise<unknown>; };\n```"
"desc\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__rmcp__echo_tool(args: { foo: string }): Promise<unknown>; };\n```"
);
}

View File

@@ -2967,7 +2967,7 @@ fn code_mode_augments_builtin_tool_descriptions_with_typed_sample() {
assert_eq!(
description,
"View a local image from the filesystem (only use if given a full filepath by the user, and the image isn't already attached to the thread context within <image ...> tags).\n\nexec tool declaration:\n```ts\ndeclare const tools: { view_image(args: { path: string; }): Promise<{ detail: string | null; image_url: string; }>; };\n```"
"View a local image from the filesystem (only use if given a full filepath by the user, and the image isn't already attached to the thread context within <image ...> tags).\n\nexec tool declaration:\n```ts\ndeclare const functions: { view_image(args: { path: string; }): Promise<{ detail: string | null; image_url: string; }>; };\n```"
);
}
@@ -3019,7 +3019,7 @@ fn code_mode_augments_mcp_tool_descriptions_with_namespaced_sample() {
assert_eq!(
description,
"Echo text\n\nexec tool declaration:\n```ts\ndeclare const tools: { mcp__sample__echo(args: { message: string; }): Promise<{ _meta?: unknown; content: Array<unknown>; isError?: boolean; structuredContent?: unknown; }>; };\n```"
"Echo text\n\nexec tool declaration:\n```ts\ndeclare const functions: { mcp__sample__echo(args: { message: string; }): Promise<{ _meta?: unknown; content: Array<unknown>; isError?: boolean; structuredContent?: unknown; }>; };\n```"
);
}