-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReferenceRequest.json
More file actions
153 lines (153 loc) · 4.35 KB
/
ReferenceRequest.json
File metadata and controls
153 lines (153 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"$defs": {
"LineScope": {
"description": "Scope by line range",
"properties": {
"start_line": {
"description": "Start line number (1-based, inclusive)",
"minimum": 1,
"title": "Start Line",
"type": "integer"
},
"end_line": {
"description": "End line number (1-based, exclusive). When set to 0, means till EOF.",
"title": "End Line",
"type": "integer"
}
},
"required": [
"start_line",
"end_line"
],
"title": "LineScope",
"type": "object"
},
"Locate": {
"anyOf": [
{
"required": [
"file_path",
"scope"
]
},
{
"required": [
"file_path",
"find"
]
}
],
"description": "Two-stage location: scope \u2192 find.\n\nResolution rules:\n 1. SymbolScope without find: symbol declaration position (for references, rename)\n 2. With find containing marker: marker position\n 3. With find only: start of matched text\n 4. No scope + find: search entire file\n\nMarker Detection:\n The marker is automatically detected using nested bracket notation:\n - <|> (single level)\n - <<|>> (double level) if <|> appears more than once\n ... and so on\n\n The marker with the deepest nesting level that appears exactly once\n is chosen as the position marker.\n\nExamples:\n # Symbol declaration\n Locate(file_path=\"foo.py\", scope=SymbolScope(symbol_path=[\"MyClass\"]))\n\n # Completion trigger point - basic marker\n Locate(file_path=\"foo.py\", find=\"self.<|>\")\n\n # When <|> exists in source, use deeper nesting\n Locate(file_path=\"foo.py\", find=\"x = <|> + y <<|>> z\")\n # Will use <<|>> as the position marker\n\n # Specific location in function\n Locate(\n file_path=\"foo.py\",\n scope=SymbolScope(symbol_path=[\"process\"]),\n find=\"return <|>result\"\n )",
"properties": {
"file_path": {
"format": "path",
"title": "File Path",
"type": "string"
},
"scope": {
"anyOf": [
{
"$ref": "#/$defs/LineScope"
},
{
"$ref": "#/$defs/SymbolScope"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"find": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Find"
}
},
"required": [
"file_path"
],
"title": "Locate",
"type": "object"
},
"SymbolScope": {
"description": "Scope by symbol, also serves as declaration locator when find is omitted",
"properties": {
"symbol_path": {
"items": {
"type": "string"
},
"title": "Symbol Path",
"type": "array"
}
},
"required": [
"symbol_path"
],
"title": "SymbolScope",
"type": "object"
}
},
"description": "Finds all references (usages) or concrete implementations of a symbol.\n\nUse this to see where a function, class, or variable is used across the codebase,\nor to find how an interface is implemented in subclasses.",
"properties": {
"locate": {
"$ref": "#/$defs/Locate"
},
"max_items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Items"
},
"start_index": {
"default": 0,
"title": "Start Index",
"type": "integer"
},
"pagination_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pagination Id"
},
"mode": {
"default": "references",
"enum": [
"references",
"implementations"
],
"title": "Mode",
"type": "string"
},
"context_lines": {
"default": 2,
"title": "Context Lines",
"type": "integer"
}
},
"required": [
"locate"
],
"title": "ReferenceRequest",
"type": "object"
}