You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LSAP is a formally defined protocol with complete **JSON Schema** specifications for all interaction models. The [`schema/`](schema/) directory contains:
51
+
52
+
-**Request/Response Schemas**: Each capability (e.g., `definition`, `outline`, `rename`, etc.) has dedicated request and response schemas.
53
+
-**Field Definitions**: Precise specifications of input parameters, output fields, and data types.
> You must manually rename the symbol in the excluded files to maintain consistency.
325
-
```
326
-
327
243
## I'm Not Convinced...
328
244
329
245
### "LSAP Just Replicates LSP—What's Special?"
330
246
331
-
While LSP provides **atomic operations**, LSAP offers **composed capabilities**.
247
+
While LSP provides **atomic operations**, LSAP offers **composed capabilities** that brings more powerful functionalities.
332
248
333
249
For instance, the **[Relation API](docs/schemas/draft/relation.md)** (still in draft, but soon will be released) finds call paths between functions in a single request (handling traversal, cycles, and formatting), a task requiring complex orchestration in raw LSP.
Copy file name to clipboardExpand all lines: docs/locate_design.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,14 +189,23 @@ Token boundaries align with programming language semantics. It preserves identif
189
189
### 1. Find All References of a Symbol
190
190
191
191
```python
192
-
# Locate the declaration of class MyClass
192
+
# Option 1: Using SymbolScope
193
193
Locate(
194
194
file_path="models.py",
195
195
scope=SymbolScope(symbol_path=["MyClass"])
196
196
)
197
+
198
+
# Option 2: Using find pattern
199
+
Locate(
200
+
file_path="models.py",
201
+
find="class <|>MyClass"
202
+
)
203
+
204
+
# Or using string syntax:
205
+
parse_locate_string("models.py@class <|>MyClass")
197
206
```
198
207
199
-
The resolver treats `SymbolScope` as the declaration position of the class name `MyClass` in the source code, suitable for `references`, `rename`, etc.
208
+
The resolver treats `SymbolScope` as the declaration position of the class name `MyClass` in the source code. Alternatively, using `find` with a pattern like `"class <|>MyClass"` locates the same position through text matching. Both approaches are suitable for `references`, `rename`, etc.
0 commit comments