MCPcopy Create free account
hub / github.com/ZToolsCenter/ZTools / searchInCommands

Function searchInCommands

src/renderer/src/stores/commandDataStore.ts:1439–1447  ·  view source on GitHub ↗
(commandList: SearchResult[], query: string)

Source from the content-addressed store, hash-verified

1437 // 在指定的指令列表中搜索(用于粘贴内容后的二次搜索)
1438 // 统一使用 search 函数,只是传入不同的指令列表
1439 function searchInCommands(commandList: SearchResult[], query: string): SearchResult[] {
1440 if (!query || commandList.length === 0) {
1441 return commandList
1442 }
1443
1444 // 使用统一的 search 函数
1445 const result = search(query, commandList)
1446 return result.bestMatches
1447 }
1448
1449 // ==================== 历史记录相关 ====================
1450

Callers 1

useSearchResultsFunction · 0.85

Calls 1

searchFunction · 0.85

Tested by

no test coverage detected