feat(search): support wildcard patterns across search fields (#1571)

* feat(search): add wildcard matching to search fields

* fix(search): harden wildcard matching and file globs

* fix(search): align file matching with shared wildcard semantics

* fix(search): bound file wildcard search in runner

* fix(search): normalize outline queries through shared matcher

* fix(web): remove duplicate markdown test context field
This commit is contained in:
Ananovo
2026-08-16 22:41:24 +08:00
committed by GitHub
parent 8dc4a50fee
commit 7909c46fff
14 changed files with 377 additions and 19 deletions
+5 -2
View File
@@ -1,13 +1,14 @@
import { logger } from '@/ui/logger'
import { RPC_METHODS } from '@hapi/protocol/rpcMethods'
import type { RpcHandlerManager } from '@/api/rpc/RpcHandlerManager'
import { run as runRipgrep } from '@/modules/ripgrep/index'
import { run as runRipgrep, runFileSearch, type FileSearchOptions } from '@/modules/ripgrep/index'
import { validatePath } from '../pathSecurity'
import { getErrorMessage, rpcError } from '../rpcResponses'
interface RipgrepRequest {
args: string[]
cwd?: string
fileSearch?: FileSearchOptions
}
interface RipgrepResponse {
@@ -30,7 +31,9 @@ export function registerRipgrepHandlers(rpcHandlerManager: RpcHandlerManager, wo
}
try {
const result = await runRipgrep(data.args, { cwd: data.cwd })
const result = data.fileSearch
? await runFileSearch(data.args, { ...data.fileSearch, cwd: data.cwd })
: await runRipgrep(data.args, { cwd: data.cwd })
return {
success: true,
exitCode: result.exitCode,