pi-readseek 0.9.5 → 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 +815 -2227
- package/package.json +2 -2
- package/prompts/edit.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/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/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.
|