From dde77650fc685770a9a90c446a17ef72d8e6a0b2 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Fri, 28 Nov 2025 09:56:17 -0500 Subject: [PATCH 1/2] test(ai): prompt for grep string in debug script Mocha lets us filter tests using the `--grep` command-line option. This is useful when debugging the AI integration tests, which run against a grid of backend x model. With this grid there may me multiple redundant test runs, and the tests may take >20 minutes. With this new config, we can isolate the test we want to debug. Before running, VSCode will prompt us for a regex to use for grepping tests by name. An example grep string would be `Google AI gemini-2.0-flash generateContent: google search grounding`. Without this, I've been manually editing the input test files to be the file with the test I'm running, then manually editing `integration/constants.ts` to remove the additional backends and model names. --- .vscode/launch.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8f132cbe5c..d34dcf4d3d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -37,7 +37,8 @@ "src/index.node.ts", "--timeout", "5000", - "integration/**/*.test.ts" + "integration/**/*.test.ts", + "--grep", "${input:grepString}", ], "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}" @@ -184,5 +185,13 @@ "cwd": "${workspaceRoot}/packages/firestore", "args": ["start", "--auto-watch", "--integration", "--browsers", "Chrome"] } + ], + "inputs": [ + { + "id": "grepString", + "type": "promptString", + "description": "Enter grep pattern (e.g., 'Google AI gemini-2.0-flash')", + "default": "Google AI gemini-2.0-flash" + } ] } From 4456dbc47b05def8034b1f25f27479839177605e Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Fri, 28 Nov 2025 11:01:52 -0500 Subject: [PATCH 2/2] update default and example --- .vscode/launch.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d34dcf4d3d..97e3c8c0e3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -190,8 +190,8 @@ { "id": "grepString", "type": "promptString", - "description": "Enter grep pattern (e.g., 'Google AI gemini-2.0-flash')", - "default": "Google AI gemini-2.0-flash" + "description": "Enter grep pattern (e.g., 'Google AI gemini-2.0-flash generateContent')", + "default": "" } ] }