@mrxkun/mcfast-mcp 3.5.9 → 3.5.11
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxkun/mcfast-mcp",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.11",
|
|
4
4
|
"description": "Ultra-fast code editing with WASM acceleration, fuzzy patching, multi-layer caching, and 8 unified tools. Optimized for AI code assistants with 80-98% latency reduction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,13 @@ export const QUERIES = {
|
|
|
9
9
|
(class_declaration name: (type_identifier) @name) @class
|
|
10
10
|
(method_definition key: (property_identifier) @name) @method
|
|
11
11
|
(interface_declaration name: (type_identifier) @name) @interface
|
|
12
|
+
(export_statement
|
|
13
|
+
(function_declaration name: (identifier) @name)) @export_function
|
|
14
|
+
(export_statement
|
|
15
|
+
(class_declaration name: (type_identifier) @name)) @export_class
|
|
16
|
+
(export_statement
|
|
17
|
+
(lexical_declaration
|
|
18
|
+
(variable_declarator name: (identifier) @name))) @export_const
|
|
12
19
|
`,
|
|
13
20
|
references: `
|
|
14
21
|
(identifier) @ref
|
|
@@ -41,6 +48,13 @@ export const QUERIES = {
|
|
|
41
48
|
(class_declaration name: (identifier) @name) @class
|
|
42
49
|
(method_definition key: (property_identifier) @name) @method
|
|
43
50
|
(variable_declarator name: (identifier) @name init: (arrow_function)) @arrow_function
|
|
51
|
+
(export_statement
|
|
52
|
+
(function_declaration name: (identifier) @name)) @export_function
|
|
53
|
+
(export_statement
|
|
54
|
+
(class_declaration name: (identifier) @name)) @export_class
|
|
55
|
+
(export_statement
|
|
56
|
+
(lexical_declaration
|
|
57
|
+
(variable_declarator name: (identifier) @name))) @export_const
|
|
44
58
|
`,
|
|
45
59
|
references: `
|
|
46
60
|
(identifier) @ref
|
|
@@ -99,8 +99,9 @@ export async function findDefinition(code, filePath, symbolName) {
|
|
|
99
99
|
if (!query) return [];
|
|
100
100
|
|
|
101
101
|
const captures = query.captures(tree.rootNode);
|
|
102
|
+
// Filter by capture name 'name' (not 'function', 'class', etc.) and match symbol
|
|
102
103
|
return captures
|
|
103
|
-
.filter(c => c.node.text === symbolName)
|
|
104
|
+
.filter(c => c.name === 'name' && c.node.text === symbolName)
|
|
104
105
|
.map(c => ({
|
|
105
106
|
line: c.node.startPosition.row + 1,
|
|
106
107
|
column: c.node.startPosition.column,
|
|
@@ -125,8 +126,9 @@ export async function findReferences(code, filePath, symbolName) {
|
|
|
125
126
|
if (!query) return [];
|
|
126
127
|
|
|
127
128
|
const captures = query.captures(tree.rootNode);
|
|
129
|
+
// Filter by capture name 'ref' and match symbol
|
|
128
130
|
return captures
|
|
129
|
-
.filter(c => c.node.text === symbolName)
|
|
131
|
+
.filter(c => c.name === 'ref' && c.node.text === symbolName)
|
|
130
132
|
.map(c => ({
|
|
131
133
|
line: c.node.startPosition.row + 1,
|
|
132
134
|
column: c.node.startPosition.column,
|