-
Notifications
You must be signed in to change notification settings - Fork 13k
test: add model-specific snapshots for coreTools #18707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
44a09cf
test: add model-specific snapshots for coreTools
aishaneeshah 20dd832
test: reorganize coreTools snapshots into directory structure by model
aishaneeshah 6c78339
test: mock os.platform for deterministic coreTools snapshots
aishaneeshah 88d5f10
test: multi-line required arrays in coreTools snapshots
aishaneeshah c9c71ef
test: update coreTools snapshots with multi-line required arrays
aishaneeshah ce8721b
test: migrate to standard Vitest snapshots for coreTools
aishaneeshah 1aed0c7
Merge branch 'main' into feat/core-tools-model-snapshots
mattKorwel 2d7873b
Merge branch 'main' into feat/core-tools-model-snapshots
aishaneeshah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/glob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "name": "glob", | ||
| "description": "Efficiently finds files matching specific glob patterns (e.g., `src/**/*.ts`, `**/*.md`), returning absolute paths sorted by modification time (newest first). Ideal for quickly locating files based on their name or path structure, especially in large codebases.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "pattern": { | ||
| "description": "The glob pattern to match against (e.g., '**/*.py', 'docs/*.md').", | ||
| "type": "string" | ||
| }, | ||
| "dir_path": { | ||
| "description": "Optional: The absolute path to the directory to search within. If omitted, searches the root directory.", | ||
| "type": "string" | ||
| }, | ||
| "case_sensitive": { | ||
| "description": "Optional: Whether the search should be case-sensitive. Defaults to false.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_git_ignore": { | ||
| "description": "Optional: Whether to respect .gitignore patterns when finding files. Only available in git repositories. Defaults to true.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_gemini_ignore": { | ||
| "description": "Optional: Whether to respect .geminiignore patterns when finding files. Defaults to true.", | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "required": ["pattern"] | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/grep_search.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "grep_search", | ||
| "description": "Searches for a regular expression pattern within file contents. Max 100 matches.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "pattern": { | ||
| "description": "The regular expression (regex) pattern to search for within file contents (e.g., 'function\\s+myFunction', 'import\\s+\\{.*\\}\\s+from\\s+.*').", | ||
| "type": "string" | ||
| }, | ||
| "dir_path": { | ||
| "description": "Optional: The absolute path to the directory to search within. If omitted, searches the current working directory.", | ||
| "type": "string" | ||
| }, | ||
| "include": { | ||
| "description": "Optional: A glob pattern to filter which files are searched (e.g., '*.js', '*.{ts,tsx}', 'src/**'). If omitted, searches all files (respecting potential global ignores).", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["pattern"] | ||
| } | ||
| } | ||
35 changes: 35 additions & 0 deletions
35
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/list_directory.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "list_directory", | ||
| "description": "Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "dir_path": { | ||
| "description": "The path to the directory to list", | ||
| "type": "string" | ||
| }, | ||
| "ignore": { | ||
| "description": "List of glob patterns to ignore", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "type": "array" | ||
| }, | ||
| "file_filtering_options": { | ||
| "description": "Optional: Whether to respect ignore patterns from .gitignore or .geminiignore", | ||
| "type": "object", | ||
| "properties": { | ||
| "respect_git_ignore": { | ||
| "description": "Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_gemini_ignore": { | ||
| "description": "Optional: Whether to respect .geminiignore patterns when listing files. Defaults to true.", | ||
| "type": "boolean" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "required": ["dir_path"] | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/read_file.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "read_file", | ||
| "description": "Reads and returns the content of a specified file. If the file is large, the content will be truncated. The tool's response will clearly indicate if truncation has occurred and will provide details on how to read more of the file using the 'offset' and 'limit' parameters. Handles text, images (PNG, JPG, GIF, WEBP, SVG, BMP), audio files (MP3, WAV, AIFF, AAC, OGG, FLAC), and PDF files. For text files, it can read specific line ranges.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "file_path": { | ||
| "description": "The path to the file to read.", | ||
| "type": "string" | ||
| }, | ||
| "offset": { | ||
| "description": "Optional: For text files, the 0-based line number to start reading from. Requires 'limit' to be set. Use for paginating through large files.", | ||
| "type": "number" | ||
| }, | ||
| "limit": { | ||
| "description": "Optional: For text files, maximum number of lines to read. Use with 'offset' to paginate through large files. If omitted, reads the entire file (if feasible, up to a default limit).", | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "required": ["file_path"] | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/run_shell_command.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "name": "run_shell_command", | ||
| "description": "This tool executes a given shell command as `bash -c <command>`. To run a command in the background, set the `is_background` parameter to true. Do NOT use `&` to background commands. Command is executed as a subprocess that leads its own process group. Command process group can be terminated as `kill -- -PGID` or signaled as `kill -s SIGNAL -- -PGID`.\n\n Efficiency Guidelines:\n - Quiet Flags: Always prefer silent or quiet flags (e.g., `npm install --silent`, `git --no-pager`) to reduce output volume while still capturing necessary information.\n - Pagination: Always disable terminal pagination to ensure commands terminate (e.g., use `git --no-pager`, `systemctl --no-pager`, or set `PAGER=cat`).\n\n The following information is returned:\n\n Output: Combined stdout/stderr. Can be `(empty)` or partial on error and for any unwaited background processes.\n Exit Code: Only included if non-zero (command failed).\n Error: Only included if a process-level error occurred (e.g., spawn failure).\n Signal: Only included if process was terminated by a signal.\n Background PIDs: Only included if background processes were started.\n Process Group PGID: Only included if available.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "command": { | ||
| "type": "string", | ||
| "description": "Exact bash command to execute as `bash -c <command>`" | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Brief description of the command for the user. Be specific and concise. Ideally a single sentence. Can be up to 3 sentences for clarity. No line breaks." | ||
| }, | ||
| "dir_path": { | ||
| "type": "string", | ||
| "description": "(OPTIONAL) The path of the directory to run the command in. If not provided, the project root directory is used. Must be a directory within the workspace and must already exist." | ||
| }, | ||
| "is_background": { | ||
| "type": "boolean", | ||
| "description": "Set to true if this command should be run in the background (e.g. for long-running servers or watchers). The command will be started, allowed to run for a brief moment to check for immediate errors, and then moved to the background." | ||
| } | ||
| }, | ||
| "required": ["command"] | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
packages/core/src/tools/definitions/__snapshots__/gemini-2.5-pro/write_file.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "write_file", | ||
| "description": "Writes content to a specified file in the local filesystem.\n\n The user has the ability to modify `content`. If modified, this will be stated in the response.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "file_path": { | ||
| "description": "The path to the file to write to.", | ||
| "type": "string" | ||
| }, | ||
| "content": { | ||
| "description": "The content to write to the file.", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["file_path", "content"] | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
packages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/glob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "name": "glob", | ||
| "description": "Efficiently finds files matching specific glob patterns (e.g., `src/**/*.ts`, `**/*.md`), returning absolute paths sorted by modification time (newest first). Ideal for quickly locating files based on their name or path structure, especially in large codebases.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "pattern": { | ||
| "description": "The glob pattern to match against (e.g., '**/*.py', 'docs/*.md').", | ||
| "type": "string" | ||
| }, | ||
| "dir_path": { | ||
| "description": "Optional: The absolute path to the directory to search within. If omitted, searches the root directory.", | ||
| "type": "string" | ||
| }, | ||
| "case_sensitive": { | ||
| "description": "Optional: Whether the search should be case-sensitive. Defaults to false.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_git_ignore": { | ||
| "description": "Optional: Whether to respect .gitignore patterns when finding files. Only available in git repositories. Defaults to true.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_gemini_ignore": { | ||
| "description": "Optional: Whether to respect .geminiignore patterns when finding files. Defaults to true.", | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "required": ["pattern"] | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
packages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/grep_search.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "grep_search", | ||
| "description": "Searches for a regular expression pattern within file contents. Max 100 matches.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "pattern": { | ||
| "description": "The regular expression (regex) pattern to search for within file contents (e.g., 'function\\s+myFunction', 'import\\s+\\{.*\\}\\s+from\\s+.*').", | ||
| "type": "string" | ||
| }, | ||
| "dir_path": { | ||
| "description": "Optional: The absolute path to the directory to search within. If omitted, searches the current working directory.", | ||
| "type": "string" | ||
| }, | ||
| "include": { | ||
| "description": "Optional: A glob pattern to filter which files are searched (e.g., '*.js', '*.{ts,tsx}', 'src/**'). If omitted, searches all files (respecting potential global ignores).", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["pattern"] | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
packages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/list_directory.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "list_directory", | ||
| "description": "Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "dir_path": { | ||
| "description": "The path to the directory to list", | ||
| "type": "string" | ||
| }, | ||
| "ignore": { | ||
| "description": "List of glob patterns to ignore", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "type": "array" | ||
| }, | ||
| "file_filtering_options": { | ||
| "description": "Optional: Whether to respect ignore patterns from .gitignore or .geminiignore", | ||
| "type": "object", | ||
| "properties": { | ||
| "respect_git_ignore": { | ||
| "description": "Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.", | ||
| "type": "boolean" | ||
| }, | ||
| "respect_gemini_ignore": { | ||
| "description": "Optional: Whether to respect .geminiignore patterns when listing files. Defaults to true.", | ||
| "type": "boolean" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "required": ["dir_path"] | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
packages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/read_file.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "read_file", | ||
| "description": "Reads and returns the content of a specified file. If the file is large, the content will be truncated. The tool's response will clearly indicate if truncation has occurred and will provide details on how to read more of the file using the 'offset' and 'limit' parameters. Handles text, images (PNG, JPG, GIF, WEBP, SVG, BMP), audio files (MP3, WAV, AIFF, AAC, OGG, FLAC), and PDF files. For text files, it can read specific line ranges.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "file_path": { | ||
| "description": "The path to the file to read.", | ||
| "type": "string" | ||
| }, | ||
| "offset": { | ||
| "description": "Optional: For text files, the 0-based line number to start reading from. Requires 'limit' to be set. Use for paginating through large files.", | ||
| "type": "number" | ||
| }, | ||
| "limit": { | ||
| "description": "Optional: For text files, maximum number of lines to read. Use with 'offset' to paginate through large files. If omitted, reads the entire file (if feasible, up to a default limit).", | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "required": ["file_path"] | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
...ages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/run_shell_command.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "name": "run_shell_command", | ||
| "description": "This tool executes a given shell command as `bash -c <command>`. To run a command in the background, set the `is_background` parameter to true. Do NOT use `&` to background commands. Command is executed as a subprocess that leads its own process group. Command process group can be terminated as `kill -- -PGID` or signaled as `kill -s SIGNAL -- -PGID`.\n\n Efficiency Guidelines:\n - Quiet Flags: Always prefer silent or quiet flags (e.g., `npm install --silent`, `git --no-pager`) to reduce output volume while still capturing necessary information.\n - Pagination: Always disable terminal pagination to ensure commands terminate (e.g., use `git --no-pager`, `systemctl --no-pager`, or set `PAGER=cat`).\n\n The following information is returned:\n\n Output: Combined stdout/stderr. Can be `(empty)` or partial on error and for any unwaited background processes.\n Exit Code: Only included if non-zero (command failed).\n Error: Only included if a process-level error occurred (e.g., spawn failure).\n Signal: Only included if process was terminated by a signal.\n Background PIDs: Only included if background processes were started.\n Process Group PGID: Only included if available.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "command": { | ||
| "type": "string", | ||
| "description": "Exact bash command to execute as `bash -c <command>`" | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Brief description of the command for the user. Be specific and concise. Ideally a single sentence. Can be up to 3 sentences for clarity. No line breaks." | ||
| }, | ||
| "dir_path": { | ||
| "type": "string", | ||
| "description": "(OPTIONAL) The path of the directory to run the command in. If not provided, the project root directory is used. Must be a directory within the workspace and must already exist." | ||
| }, | ||
| "is_background": { | ||
| "type": "boolean", | ||
| "description": "Set to true if this command should be run in the background (e.g. for long-running servers or watchers). The command will be started, allowed to run for a brief moment to check for immediate errors, and then moved to the background." | ||
| } | ||
| }, | ||
| "required": ["command"] | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
packages/core/src/tools/definitions/__snapshots__/gemini-3-pro-preview/write_file.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "write_file", | ||
| "description": "Writes content to a specified file in the local filesystem.\n\n The user has the ability to modify `content`. If modified, this will be stated in the response.", | ||
| "parametersJsonSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "file_path": { | ||
| "description": "The path to the file to write to.", | ||
| "type": "string" | ||
| }, | ||
| "content": { | ||
| "description": "The content to write to the file.", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["file_path", "content"] | ||
| } | ||
| } |
61 changes: 61 additions & 0 deletions
61
packages/core/src/tools/definitions/coreToolsModelSnapshots.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2025 Google LLC | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import { describe, it, expect, vi } from 'vitest'; | ||
| import path from 'node:path'; | ||
| import { resolveToolDeclaration } from './resolver.js'; | ||
|
|
||
| // Mock node:os BEFORE importing coreTools to ensure it uses the mock | ||
| vi.mock('node:os', async (importOriginal) => { | ||
| const actual = await importOriginal<typeof import('node:os')>(); | ||
| return { | ||
| ...actual, | ||
| platform: () => 'linux', | ||
| }; | ||
| }); | ||
|
|
||
| import { | ||
| READ_FILE_DEFINITION, | ||
| WRITE_FILE_DEFINITION, | ||
| GREP_DEFINITION, | ||
| GLOB_DEFINITION, | ||
| LS_DEFINITION, | ||
| getShellDefinition, | ||
| } from './coreTools.js'; | ||
|
|
||
| describe('coreTools snapshots for specific models', () => { | ||
| const modelIds = ['gemini-2.5-pro', 'gemini-3-pro-preview']; | ||
| const tools = [ | ||
| { name: 'read_file', definition: READ_FILE_DEFINITION }, | ||
| { name: 'write_file', definition: WRITE_FILE_DEFINITION }, | ||
| { name: 'grep_search', definition: GREP_DEFINITION }, | ||
| { name: 'glob', definition: GLOB_DEFINITION }, | ||
| { name: 'list_directory', definition: LS_DEFINITION }, | ||
| { | ||
| name: 'run_shell_command', | ||
| definition: getShellDefinition(true, true), | ||
| }, | ||
| ]; | ||
|
|
||
| for (const modelId of modelIds) { | ||
| describe(`Model: ${modelId}`, () => { | ||
| for (const tool of tools) { | ||
| it(`snapshot for tool: ${tool.name}`, async () => { | ||
| const resolved = resolveToolDeclaration(tool.definition, modelId); | ||
| // Create a directory structure: __snapshots__/<modelId>/<toolName>.json | ||
| const snapshotPath = path.join( | ||
| '__snapshots__', | ||
| modelId, | ||
| `${tool.name}.json`, | ||
| ); | ||
| await expect(JSON.stringify(resolved, null, 2)).toMatchFileSnapshot( | ||
| snapshotPath, | ||
| ); | ||
| }); | ||
| } | ||
| }); | ||
| } | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an inconsistency in the escaping of the example regex in this snapshot. The source string in
coreTools.tsfor this description would produce JSON with unescaped curly braces ({}), but the snapshot has them escaped (\{and\}).This makes the snapshot incorrect as it doesn't match what the code would generate. The snapshot should be updated to reflect the actual output.
Note that applying this change will likely cause the test to fail. The root cause is likely in
coreTools.ts, where the string isn't escaped correctly to produce the desired output. That file should be fixed, and then snapshots regenerated.This issue is also present in the
gemini-3-pro-previewsnapshot.