mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-09 16:38:19 +00:00
Refactor: Rename file search functions for clarity
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
* @param query The query to search for.
|
||||
* @returns A promise that resolves to a formatted string of search results.
|
||||
*/
|
||||
export async function searchFilesWithCorePlugin(
|
||||
export async function matchSearchUsingCorePlugin(
|
||||
query: string,
|
||||
app: App,
|
||||
): Promise<string> {
|
||||
|
||||
@@ -47,7 +47,7 @@ function isOmnisearchAvailable(): boolean {
|
||||
* @param app The Obsidian App instance.
|
||||
* @returns A formatted string of search results.
|
||||
*/
|
||||
export async function searchFilesWithOmnisearch(
|
||||
export async function matchSearchUsingOmnisearch(
|
||||
query: string,
|
||||
app: App,
|
||||
): Promise<string> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { App } from "obsidian";
|
||||
import { searchFilesWithCorePlugin } from '../match/coreplugin-match'
|
||||
import { matchSearchUsingCorePlugin } from '../match/coreplugin-match'
|
||||
|
||||
/**
|
||||
* Performs a regular expression search using Obsidian's core search plugin.
|
||||
@@ -8,10 +8,10 @@ import { searchFilesWithCorePlugin } from '../match/coreplugin-match'
|
||||
* @param regex The regular expression to search for.
|
||||
* @returns A promise that resolves to a formatted string of search results.
|
||||
*/
|
||||
export async function regexSearchFilesWithCorePlugin(
|
||||
export async function regexSearchUsingCorePlugin(
|
||||
regex: string,
|
||||
app: App,
|
||||
): Promise<string> {
|
||||
const regexQuery = `/${regex}/`;
|
||||
return searchFilesWithCorePlugin(regexQuery, app);
|
||||
return matchSearchUsingCorePlugin(regexQuery, app);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ async function execRipgrep(bin: string, args: string[]): Promise<string> {
|
||||
})
|
||||
}
|
||||
|
||||
export async function regexSearchFilesWithRipgrep(
|
||||
export async function regexSearchUsingRipgrep(
|
||||
directoryPath: string,
|
||||
regex: string,
|
||||
ripgrepPath: string,
|
||||
|
||||
Reference in New Issue
Block a user