pi-readseek 0.9.4 → 0.9.6
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/README.md +0 -1
- package/dist/index.ts +1750 -2486
- package/package.json +2 -2
- package/prompts/def.md +1 -1
- package/prompts/edit.md +1 -1
- package/prompts/refs.md +4 -4
- package/prompts/search.md +1 -1
- package/prompts/read.md +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-readseek",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Pi extension for LINE:HASH-anchored file operations and structural code navigation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"node": ">=20.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@jarkkojs/readseek": "^0.9.
|
|
43
|
+
"@jarkkojs/readseek": "^0.9.6",
|
|
44
44
|
"diff": "^9.0.0",
|
|
45
45
|
"xxhash-wasm": "^1.1.0"
|
|
46
46
|
},
|
package/prompts/def.md
CHANGED
|
@@ -4,7 +4,7 @@ Go to a symbol definition or declaration by name. Accepts qualified or unqualifi
|
|
|
4
4
|
|
|
5
5
|
- `name` — qualified or unqualified symbol name.
|
|
6
6
|
- `path` — file or directory; defaults to the current directory.
|
|
7
|
-
- `
|
|
7
|
+
- `language` — language override when detection is ambiguous.
|
|
8
8
|
- `cached`, `others`, `ignored` — Git file selection; `ignored` requires
|
|
9
9
|
`others`.
|
|
10
10
|
|
package/prompts/edit.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Edit existing text files with fresh `LINE:HASH` anchors. Read or search the file first when no fresh anchors are available. Each `edits[]` item must use exactly one nested object: `{"set_line":{"anchor":"LINE:HASH","new_text":"..."}}`, `{"replace_lines":{"start_anchor":"LINE:HASH","end_anchor":"LINE:HASH","new_text":"..."}}`, `{"insert_after":{"anchor":"LINE:HASH","new_text":"..."}}`, `{"replace_symbol":{"symbol":"name","new_body":"..."}}`, or `{"replace":{"old_text":"...","new_text":"..."}}`.
|
|
2
2
|
|
|
3
|
-
Anchors come from `
|
|
3
|
+
Anchors come from `readSeek_digest`, `readSeek_grep`, `readSeek_search`,
|
|
4
4
|
`readSeek_refs`, `readSeek_def`, or `readSeek_write`.
|
|
5
5
|
|
|
6
6
|
## Variants
|
package/prompts/refs.md
CHANGED
|
@@ -2,14 +2,14 @@ Find references or usages of an identifier by name or cursor binding. Results in
|
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
|
5
|
-
- `name` — identifier to find
|
|
5
|
+
- `name` — identifier to find; required unless `scope` is set with `line`.
|
|
6
6
|
- `path` — file or directory; defaults to the current directory.
|
|
7
|
-
- `
|
|
7
|
+
- `language` — language override for ambiguous, extensionless, or generated source.
|
|
8
8
|
- `scope` — restrict results to the binding at `line` / `column` in one file;
|
|
9
|
-
requires `line`.
|
|
9
|
+
requires `line`. `name` is optional when scoped.
|
|
10
10
|
- `line` — one-based cursor line used with `scope`.
|
|
11
11
|
- `column` — optional one-based cursor byte column for disambiguation; used with
|
|
12
|
-
`scope`.
|
|
12
|
+
`scope`. Cursor fields require `scope`.
|
|
13
13
|
- `cached` — search tracked/indexed files in a Git repository.
|
|
14
14
|
- `others` — search untracked files in a Git repository.
|
|
15
15
|
- `ignored` — include ignored untracked files; requires `others`.
|
package/prompts/search.md
CHANGED
|
@@ -4,7 +4,7 @@ Search code by AST structure using ast-grep-style patterns. Results include line
|
|
|
4
4
|
|
|
5
5
|
- `pattern` — AST pattern to match.
|
|
6
6
|
- `path` — file or directory; defaults to the current directory.
|
|
7
|
-
- `
|
|
7
|
+
- `language` — language override for ambiguous, extensionless, generated, or
|
|
8
8
|
JSX-like source.
|
|
9
9
|
- `cached` — search tracked/indexed files in a Git repository.
|
|
10
10
|
- `others` — search untracked files in a Git repository.
|
package/prompts/read.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
Read anchored text by range or symbol. Standalone images require an explicit mode. Use `readSeek_view` for documents (PDF first). Use `readSeek_digest` with `select: "map"` for a structural outline.
|
|
2
|
-
|
|
3
|
-
## Choose a read
|
|
4
|
-
|
|
5
|
-
- Default: read a small file or an `offset` / `limit` range.
|
|
6
|
-
- `symbol: "Name"`: read one mapped symbol.
|
|
7
|
-
- `bundle: "local"`: include directly related symbols from the same file.
|
|
8
|
-
|
|
9
|
-
## Parameters
|
|
10
|
-
|
|
11
|
-
- `path` — file path.
|
|
12
|
-
- `offset` / `limit` — positive line numbers; `offset` is one-based.
|
|
13
|
-
- `symbol` — `Name`, `Class.method`, or `Name@<line>`; incompatible with
|
|
14
|
-
`offset` and `limit`.
|
|
15
|
-
- `bundle` — only `"local"`; requires `symbol`.
|
|
16
|
-
- `image` — standalone-image mode; unavailable when `imageMode` is `"off"`.
|
|
17
|
-
|
|
18
|
-
Text output is capped at {{DEFAULT_MAX_LINES}} lines or {{DEFAULT_MAX_BYTES}}.
|
|
19
|
-
A truncated full-file read appends a map when available; use its ranges for
|
|
20
|
-
follow-up reads.
|
|
21
|
-
|
|
22
|
-
Standalone images require `image`. In `"auto"`, `image: "none"` returns a
|
|
23
|
-
prepared standalone image without local analysis. Documents (PDF first) are not
|
|
24
|
-
readable through this tool — use `readSeek_view` for structure, content, and
|
|
25
|
-
optional asset vision.
|
|
26
|
-
|
|
27
|
-
## Symbol lookup
|
|
28
|
-
|
|
29
|
-
| Query | Result |
|
|
30
|
-
| --------------------------------------------- | ----------------------------------------------- |
|
|
31
|
-
| `{"symbol":"processEvent"}` | Function or other unqualified symbol |
|
|
32
|
-
| `{"symbol":"EventEmitter"}` | Class, interface, type, enum, or similar symbol |
|
|
33
|
-
| `{"symbol":"EventEmitter.emit"}` | Qualified child method or member |
|
|
34
|
-
| `{"symbol":"Foo.bar@42"}` | Definition or overload near line 42 |
|
|
35
|
-
| `{"symbol":"handleRequest","bundle":"local"}` | Symbol plus direct same-file support |
|
|
36
|
-
|
|
37
|
-
`@<line>` is a trailing disambiguator; `foo@bar` remains an ordinary name.
|
|
38
|
-
Resolution prefers a containing range, then the nearest symbol at or after the
|
|
39
|
-
line, then one above it.
|
|
40
|
-
|
|
41
|
-
A successful lookup returns the symbol range. Ambiguous results include
|
|
42
|
-
`name@<startLine>` retry hints. Verify fuzzy matches before editing. A missing or
|
|
43
|
-
unmappable symbol falls back to a normal read with a warning.
|
|
44
|
-
|
|
45
|
-
Anchors from text, symbol, and bundled reads remain valid for `readSeek_edit`
|
|
46
|
-
until the file changes.
|