Loading...
Loading...
Compare original and translation side by side
Need CONCEPTUAL/SEMANTIC search?
(how does X work, find patterns, understand architecture)
→ Use LEANN (/leann-search) - embedding-based semantic search
→ PreToolUse hook auto-redirects semantic Grep queries
Need to understand code STRUCTURE?
(find function calls, class usages, refactor patterns)
→ Use AST-grep (/ast-grep-find)
Need to find TEXT in code?
→ Use Morph (/morph-search) - 20x faster
→ If no Morph API key: fall back to Grep tool
Simple one-off search?
→ Use built-in Grep tool directly是否需要概念/语义搜索?
(例如:X的工作原理是什么、查找模式、理解架构)
→ 使用LEANN (/leann-search) - 基于嵌入的语义搜索
→ PreToolUse钩子会自动重定向语义Grep查询
是否需要理解代码结构?
(例如:查找函数调用、类的用法、重构模式)
→ 使用AST-grep (/ast-grep-find)
是否需要在代码中查找文本?
→ 使用Morph (/morph-search) - 速度快20倍
→ 若无Morph API密钥:回退到Grep工具
简单的一次性搜索?
→ 直接使用内置Grep工具| Tool | Best For | Requires |
|---|---|---|
| LEANN | Semantic search: "how does caching work", "error handling patterns", conceptual queries | Index built |
| AST-grep | Structural patterns: "find all calls to | MCP server |
| Morph | Fast text search: "find files mentioning error", grep across codebase | API key |
| Grep | Literal patterns, class/function names, regex | Nothing (built-in) |
| 工具 | 适用场景 | 所需条件 |
|---|---|---|
| LEANN | 语义搜索:例如「缓存如何工作」「错误处理模式」「概念类查询」 | 已构建索引 |
| AST-grep | 结构模式:例如「查找所有 | MCP服务器 |
| Morph | 快速文本搜索:例如「查找提及error的文件」「跨代码库grep搜索」 | API密钥 |
| Grep | 字面量模式、类/函数名称、正则表达式 | 无(内置工具) |
class ProviderAdapterdef __init__class ProviderAdapterdef __init__undefinedundefinedundefinedundefined