tree-sitter-analyzer 1.3.6__py3-none-any.whl → 1.3.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tree-sitter-analyzer might be problematic. Click here for more details.
- tree_sitter_analyzer/__init__.py +1 -1
- tree_sitter_analyzer/mcp/tools/search_content_tool.py +15 -1
- {tree_sitter_analyzer-1.3.6.dist-info → tree_sitter_analyzer-1.3.7.dist-info}/METADATA +1 -1
- {tree_sitter_analyzer-1.3.6.dist-info → tree_sitter_analyzer-1.3.7.dist-info}/RECORD +6 -6
- {tree_sitter_analyzer-1.3.6.dist-info → tree_sitter_analyzer-1.3.7.dist-info}/WHEEL +0 -0
- {tree_sitter_analyzer-1.3.6.dist-info → tree_sitter_analyzer-1.3.7.dist-info}/entry_points.txt +0 -0
tree_sitter_analyzer/__init__.py
CHANGED
|
@@ -322,16 +322,30 @@ class SearchContentTool(BaseMCPTool):
|
|
|
322
322
|
|
|
323
323
|
# Note: --files-from is not supported in this ripgrep version
|
|
324
324
|
# For files mode, we'll search in the parent directories of the files
|
|
325
|
+
# and use glob patterns to restrict search to specific files
|
|
325
326
|
if files:
|
|
326
327
|
# Extract unique parent directories from file paths
|
|
327
328
|
parent_dirs = set()
|
|
329
|
+
file_globs = []
|
|
328
330
|
for file_path in files:
|
|
329
331
|
resolved = self.path_resolver.resolve(file_path)
|
|
330
|
-
|
|
332
|
+
parent_dir = str(Path(resolved).parent)
|
|
333
|
+
parent_dirs.add(parent_dir)
|
|
334
|
+
|
|
335
|
+
# Create glob pattern for this specific file
|
|
336
|
+
file_name = Path(resolved).name
|
|
337
|
+
# Escape special characters in filename for glob pattern
|
|
338
|
+
escaped_name = file_name.replace("[", "[[]").replace("]", "[]]")
|
|
339
|
+
file_globs.append(escaped_name)
|
|
331
340
|
|
|
332
341
|
# Use parent directories as roots for compatibility
|
|
333
342
|
roots = list(parent_dirs)
|
|
334
343
|
|
|
344
|
+
# Add file-specific glob patterns to include_globs
|
|
345
|
+
if not arguments.get("include_globs"):
|
|
346
|
+
arguments["include_globs"] = []
|
|
347
|
+
arguments["include_globs"].extend(file_globs)
|
|
348
|
+
|
|
335
349
|
# Check for count-only mode (total_only also requires count mode)
|
|
336
350
|
total_only = bool(arguments.get("total_only", False))
|
|
337
351
|
count_only_matches = (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tree-sitter-analyzer
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
|
|
5
5
|
Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
|
|
6
6
|
Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
tree_sitter_analyzer/__init__.py,sha256=
|
|
1
|
+
tree_sitter_analyzer/__init__.py,sha256=B3KaNXWAIT-0pCGLln-Z3eD4Va2FCW8z776cOqgu_u4,3067
|
|
2
2
|
tree_sitter_analyzer/__main__.py,sha256=Zl79tpe4UaMu-7yeztc06tgP0CVMRnvGgas4ZQP5SCs,228
|
|
3
3
|
tree_sitter_analyzer/api.py,sha256=N_bcf1pLwzXS3elPn30OySLR6ehsHdWpchXMycjl0PY,17399
|
|
4
4
|
tree_sitter_analyzer/cli_main.py,sha256=jWjVJ5AgNmtf6Z7CgeK3IF-zi7yIiu9zn4Oyvzl-iNQ,10349
|
|
@@ -62,7 +62,7 @@ tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py,sha256=D7eNjPZzV1YRo7VktvUq
|
|
|
62
62
|
tree_sitter_analyzer/mcp/tools/list_files_tool.py,sha256=TA1BRQtb-D5x1pD-IcRJYnP0WnnFfl9q7skI25MOdHk,12873
|
|
63
63
|
tree_sitter_analyzer/mcp/tools/query_tool.py,sha256=1xY1ONNY2sIFJxoILlnNzBnwGVgzEF7vVJ2ccqR9auA,10879
|
|
64
64
|
tree_sitter_analyzer/mcp/tools/read_partial_tool.py,sha256=BMAJF205hTIrYTQJG6N1-vVuKSby2CSm9nWzSMMWceI,11339
|
|
65
|
-
tree_sitter_analyzer/mcp/tools/search_content_tool.py,sha256=
|
|
65
|
+
tree_sitter_analyzer/mcp/tools/search_content_tool.py,sha256=PDYY_O7T0y4bnC6JNjtL1_TyZcib0EpxnPA6PfKueoQ,22489
|
|
66
66
|
tree_sitter_analyzer/mcp/tools/table_format_tool.py,sha256=NDIiCtmZSbCmaQOp7ED83jGE5DuJhx4mcUketVHrkjs,16024
|
|
67
67
|
tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py,sha256=-zZnqN9WcoyRTKM_16ADH859LSebzi34BGYwQL2zCOs,25084
|
|
68
68
|
tree_sitter_analyzer/mcp/utils/__init__.py,sha256=TgTTKsRJAqF95g1fAp5SR_zQVDkImpc_5R0Dw529UUw,3126
|
|
@@ -82,7 +82,7 @@ tree_sitter_analyzer/security/__init__.py,sha256=ZTqTt24hsljCpTXAZpJC57L7MU5lJLT
|
|
|
82
82
|
tree_sitter_analyzer/security/boundary_manager.py,sha256=3eeENRKWtz2pyZHzd8DiVaq8fdeC6s1eVOuBylSmQPg,9347
|
|
83
83
|
tree_sitter_analyzer/security/regex_checker.py,sha256=jWK6H8PTPgzbwRPfK_RZ8bBTS6rtEbgjY5vr3YWjQ_U,9616
|
|
84
84
|
tree_sitter_analyzer/security/validator.py,sha256=yR4qTWEcXpR--bSFwtWvSgY0AzqujOFAqlc1Z7dlTdk,9809
|
|
85
|
-
tree_sitter_analyzer-1.3.
|
|
86
|
-
tree_sitter_analyzer-1.3.
|
|
87
|
-
tree_sitter_analyzer-1.3.
|
|
88
|
-
tree_sitter_analyzer-1.3.
|
|
85
|
+
tree_sitter_analyzer-1.3.7.dist-info/METADATA,sha256=d9vAzUGUdFBeoxUKiHPCMduEMDk-EI2Y3Qmw8UBsi1k,39700
|
|
86
|
+
tree_sitter_analyzer-1.3.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
87
|
+
tree_sitter_analyzer-1.3.7.dist-info/entry_points.txt,sha256=U4tfLGXgCWubKm2PyEb3zxhQ2pm7zVotMyfyS0CodD8,486
|
|
88
|
+
tree_sitter_analyzer-1.3.7.dist-info/RECORD,,
|
|
File without changes
|
{tree_sitter_analyzer-1.3.6.dist-info → tree_sitter_analyzer-1.3.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|