mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
feat: 更新CodexLens描述,增加操作和参数说明
This commit is contained in:
@@ -1639,26 +1639,54 @@ async function cleanIndexes(params: Params): Promise<ExecuteResult> {
|
|||||||
// Tool schema for MCP
|
// Tool schema for MCP
|
||||||
export const schema: ToolSchema = {
|
export const schema: ToolSchema = {
|
||||||
name: 'codex_lens',
|
name: 'codex_lens',
|
||||||
description: `CodexLens - Code indexing and semantic search.
|
description: `CodexLens - Code indexing and semantic search. Choose an action and provide its required parameters.
|
||||||
|
|
||||||
Usage:
|
**Actions & Required Parameters:**
|
||||||
codex_lens(action="init", path=".") # Index directory (auto-generates embeddings if available)
|
|
||||||
codex_lens(action="search", query="func") # Search code (auto: hybrid if embeddings exist, else exact)
|
|
||||||
codex_lens(action="search", query="func", mode="hybrid") # Force hybrid search
|
|
||||||
codex_lens(action="search_files", query="x") # Search, return paths only
|
|
||||||
|
|
||||||
Graph Enrichment:
|
* **init**: Index directory (auto-generates embeddings if available).
|
||||||
codex_lens(action="search", query="func", enrich=true) # Enrich results with code relationships
|
* *path* (string): Directory to index (default: current).
|
||||||
|
* *languages* (array): Languages to index (e.g., ["javascript", "typescript", "python"]).
|
||||||
|
|
||||||
Search Modes:
|
* **search**: Search code content.
|
||||||
- auto: Auto-detect (hybrid if embeddings exist, exact otherwise) [default]
|
* **query** (string, **REQUIRED**): Search query text.
|
||||||
- exact/text: Exact FTS for code identifiers
|
* *path* (string): Directory to search (default: current).
|
||||||
- hybrid: Exact + Fuzzy + Vector fusion (best results, requires embeddings)
|
* *mode* (string): Search mode (default: "auto").
|
||||||
- fuzzy: Typo-tolerant search
|
- "auto": Auto-detect (hybrid if embeddings exist, exact otherwise).
|
||||||
- vector: Semantic + keyword
|
- "exact"/"text": Exact FTS for code identifiers.
|
||||||
- pure-vector/semantic: Pure semantic search
|
- "hybrid": Exact + Fuzzy + Vector fusion (best results, requires embeddings).
|
||||||
|
- "fuzzy": Typo-tolerant search.
|
||||||
|
- "vector": Semantic + keyword.
|
||||||
|
- "semantic"/"pure-vector": Pure semantic search.
|
||||||
|
* *limit* (number): Max results (default: 20).
|
||||||
|
* *enrich* (boolean): Enrich with code relationships (default: false).
|
||||||
|
* *format* (string): Output format - "json" | "text" | "pretty" (default: "json").
|
||||||
|
|
||||||
Note: For advanced operations (config, status, clean), use CLI directly: codexlens --help`,
|
* **search_files**: Search and return file paths only.
|
||||||
|
* **query** (string, **REQUIRED**): Search query text.
|
||||||
|
* *path* (string): Directory to search (default: current).
|
||||||
|
* *limit* (number): Max results (default: 20).
|
||||||
|
|
||||||
|
* **status**: Check index status.
|
||||||
|
* *path* (string): Directory to check (default: current).
|
||||||
|
|
||||||
|
* **symbol**: Extract symbols from code.
|
||||||
|
* *path* (string): Directory to analyze (default: current).
|
||||||
|
|
||||||
|
* **check**: Check if CodexLens is ready.
|
||||||
|
* *path* (string): Directory to check (default: current).
|
||||||
|
|
||||||
|
* **update**: Incremental index update.
|
||||||
|
* *path* (string): Directory to update (default: current).
|
||||||
|
|
||||||
|
* **bootstrap**: Setup Python virtual environment.
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
codex_lens(action="init", path=".")
|
||||||
|
codex_lens(action="search", query="authentication")
|
||||||
|
codex_lens(action="search", query="func", mode="hybrid", enrich=true)
|
||||||
|
codex_lens(action="search_files", query="MyClass")
|
||||||
|
|
||||||
|
**Note:** For advanced operations (config, clean), use CLI: codexlens --help`,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
Reference in New Issue
Block a user