diff options
| author | Dax Raad <[email protected]> | 2025-05-26 22:08:50 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 22:08:50 -0400 |
| commit | 2e938d9da1589e1e00b9739c5e6c8dc72dda872a (patch) | |
| tree | 40b58ba37c7566311a67cf1fb6daa103eef9545a /js/src/tool/grep.ts | |
| parent | b840a4075956f00d0c46c82b19da24d984dddd07 (diff) | |
| download | opencode-2e938d9da1589e1e00b9739c5e6c8dc72dda872a.tar.gz opencode-2e938d9da1589e1e00b9739c5e6c8dc72dda872a.zip | |
Standardize API parameters to camelCase and improve LSP client reliability
- 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 <[email protected]>
Diffstat (limited to 'js/src/tool/grep.ts')
| -rw-r--r-- | js/src/tool/grep.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
