From 2e938d9da1589e1e00b9739c5e6c8dc72dda872a Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Mon, 26 May 2025 22:08:50 -0400 Subject: Standardize API parameters to camelCase and improve LSP client reliability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert tool parameters from snake_case to camelCase for consistency - Add file existence check in LSP client before opening files - Fix version increment timing in LSP textDocument operations - Optimize session token tracking using onStepFinish callback - Add debugging logs for diagnostics troubleshooting 🤖 Generated with opencode Co-Authored-By: opencode --- js/src/tool/grep.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/src/tool/grep.ts') diff --git a/js/src/tool/grep.ts b/js/src/tool/grep.ts index 9c3754ce9..b67a4790e 100644 --- a/js/src/tool/grep.ts +++ b/js/src/tool/grep.ts @@ -274,7 +274,7 @@ export const grep = Tool.define({ 'File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")', ) .optional(), - literal_text: z + literalText: z .boolean() .describe( "If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.", @@ -289,8 +289,8 @@ export const grep = Tool.define({ const app = await App.use(); const searchPath = params.path || app.root; - // If literal_text is true, escape the pattern - const searchPattern = params.literal_text + // If literalText is true, escape the pattern + const searchPattern = params.literalText ? escapeRegexPattern(params.pattern) : params.pattern; -- cgit v1.2.3