feat: Enhance file search with core plugin and Omnisearch integration

- Introduces a new match_search_files tool for fuzzy/keyword search, integrating with Obsidian's core search plugin and updating Omnisearch integration for improved file search capabilities.
- Adds settings for selecting search backends (core plugin, Omnisearch, ripgrep) for both regex and match searches.
- Updates language files, prompts, and types to support the new functionality.
- Restructures search-related files for better organization.
This commit is contained in:
travertexg
2025-06-09 15:15:16 +00:00
parent 350a49cef9
commit 9984527e85
18 changed files with 326 additions and 36 deletions

View File

@@ -20,6 +20,14 @@ export type ListFilesToolArgs = {
recursive?: boolean;
}
export type MatchSearchFilesToolArgs = {
type: 'match_search_files';
filepath?: string;
query?: string;
file_pattern?: string;
finish?: boolean;
}
export type RegexSearchFilesToolArgs = {
type: 'regex_search_files';
filepath?: string;
@@ -97,4 +105,4 @@ export type UseMcpToolArgs = {
parameters: Record<string, unknown>;
}
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs | UseMcpToolArgs;
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | MatchSearchFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs | UseMcpToolArgs;

View File

@@ -260,8 +260,9 @@ export const InfioSettingsSchema = z.object({
jinaApiKey: z.string().catch(''),
// Files Search
filesSearchMethod: z.enum(['regex', 'semantic', 'auto']).catch('auto'),
regexSearchBackend: z.enum(['omnisearch', 'ripgrep']).catch('ripgrep'),
filesSearchMethod: z.enum(['match', 'regex', 'semantic', 'auto']).catch('auto'),
regexSearchBackend: z.enum(['coreplugin', 'ripgrep']).catch('ripgrep'),
matchSearchBackend: z.enum(['omnisearch', 'coreplugin']).catch('coreplugin'),
ripgrepPath: z.string().catch(''),
/// [compatible]