pi-readseek 0.8.20 → 0.8.22
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/dist/index.ts +7 -7
- package/package.json +2 -2
- package/prompts/check.md +2 -1
- package/prompts/def.md +2 -2
- package/prompts/edit.md +2 -2
- package/prompts/hover.md +1 -1
- package/prompts/refs.md +1 -1
- package/prompts/rename.md +1 -1
- package/prompts/search.md +1 -1
- package/prompts/view.md +1 -1
package/dist/index.ts
CHANGED
|
@@ -6213,7 +6213,7 @@ function mergeRanges(ranges) {
|
|
|
6213
6213
|
}
|
|
6214
6214
|
var SEARCH_PROMPT_METADATA = defineToolPromptMetadata({
|
|
6215
6215
|
promptUrl: new URL("../prompts/search.md", import.meta.url),
|
|
6216
|
-
promptSnippet: "Search
|
|
6216
|
+
promptSnippet: "Search code by AST structure using ast-grep-style patterns"
|
|
6217
6217
|
});
|
|
6218
6218
|
function linesFromSearchResult(result, ranges) {
|
|
6219
6219
|
const lineMap = new Map;
|
|
@@ -6376,7 +6376,7 @@ function buildRefsOutput(input) {
|
|
|
6376
6376
|
// src/refs.ts
|
|
6377
6377
|
var REFS_PROMPT_METADATA = defineToolPromptMetadata({
|
|
6378
6378
|
promptUrl: new URL("../prompts/refs.md", import.meta.url),
|
|
6379
|
-
promptSnippet: "Find identifier
|
|
6379
|
+
promptSnippet: "Find references by identifier name or cursor binding"
|
|
6380
6380
|
});
|
|
6381
6381
|
function refsLine(reference) {
|
|
6382
6382
|
return {
|
|
@@ -6490,7 +6490,7 @@ import path5 from "node:path";
|
|
|
6490
6490
|
import { Text as Text6 } from "@earendil-works/pi-tui";
|
|
6491
6491
|
var RENAME_PROMPT_METADATA = defineToolPromptMetadata({
|
|
6492
6492
|
promptUrl: new URL("../prompts/rename.md", import.meta.url),
|
|
6493
|
-
promptSnippet: "Rename a
|
|
6493
|
+
promptSnippet: "Rename a symbol at a source location with verified edits"
|
|
6494
6494
|
});
|
|
6495
6495
|
var renameSchema = Type8.Object({
|
|
6496
6496
|
path: filePathParam(),
|
|
@@ -6633,7 +6633,7 @@ import { Type as Type9 } from "@sinclair/typebox";
|
|
|
6633
6633
|
import { Text as Text7 } from "@earendil-works/pi-tui";
|
|
6634
6634
|
var HOVER_PROMPT_METADATA = defineToolPromptMetadata({
|
|
6635
6635
|
promptUrl: new URL("../prompts/hover.md", import.meta.url),
|
|
6636
|
-
promptSnippet: "
|
|
6636
|
+
promptSnippet: "Inspect the symbol at a source location"
|
|
6637
6637
|
});
|
|
6638
6638
|
var hoverSchema = Type9.Object({
|
|
6639
6639
|
path: filePathParam(),
|
|
@@ -7029,7 +7029,7 @@ import { Type as Type11 } from "@sinclair/typebox";
|
|
|
7029
7029
|
import path6 from "node:path";
|
|
7030
7030
|
var DEF_PROMPT_METADATA = defineToolPromptMetadata({
|
|
7031
7031
|
promptUrl: new URL("../prompts/def.md", import.meta.url),
|
|
7032
|
-
promptSnippet: "
|
|
7032
|
+
promptSnippet: "Go to a symbol definition or declaration by name"
|
|
7033
7033
|
});
|
|
7034
7034
|
async function executeDef(opts) {
|
|
7035
7035
|
const { params, signal, cwd, onFileAnchored } = opts;
|
|
@@ -7134,7 +7134,7 @@ import { Text as Text9 } from "@earendil-works/pi-tui";
|
|
|
7134
7134
|
import { Type as Type12 } from "@sinclair/typebox";
|
|
7135
7135
|
var CHECK_PROMPT_METADATA = defineToolPromptMetadata({
|
|
7136
7136
|
promptUrl: new URL("../prompts/check.md", import.meta.url),
|
|
7137
|
-
promptSnippet: "
|
|
7137
|
+
promptSnippet: "Check source syntax for parser errors after edits"
|
|
7138
7138
|
});
|
|
7139
7139
|
async function executeCheck(opts) {
|
|
7140
7140
|
const { params, signal, cwd } = opts;
|
|
@@ -7227,7 +7227,7 @@ var NODE_KINDS = [
|
|
|
7227
7227
|
];
|
|
7228
7228
|
var VIEW_PROMPT_METADATA = defineToolPromptMetadata({
|
|
7229
7229
|
promptUrl: new URL("../prompts/view.md", import.meta.url),
|
|
7230
|
-
promptSnippet: "
|
|
7230
|
+
promptSnippet: "Inspect a PDF's structure or selected content"
|
|
7231
7231
|
});
|
|
7232
7232
|
async function executeView(opts) {
|
|
7233
7233
|
const { params, signal, cwd } = opts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-readseek",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.22",
|
|
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.8.
|
|
43
|
+
"@jarkkojs/readseek": "^0.8.22",
|
|
44
44
|
"diff": "^9.0.0",
|
|
45
45
|
"xxhash-wasm": "^1.1.0"
|
|
46
46
|
},
|
package/prompts/check.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Check a source file for parser errors or missing syntax after edits. Validation requires a supported tree-sitter language; files without a supported parser are not checked. This is not a compiler, type checker, test runner, or linter.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
|
@@ -7,3 +7,4 @@ Run a quick syntax check on a source file. Use after edits to find parser errors
|
|
|
7
7
|
## Output
|
|
8
8
|
|
|
9
9
|
Returns parser error and missing-node counts with affected line ranges.
|
|
10
|
+
Files without a supported parser are not validated.
|
package/prompts/def.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Go to a symbol definition or declaration by name. Accepts qualified or unqualified names; use this instead of text search for functions, methods, classes, types, and other declarations.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
|
@@ -8,4 +8,4 @@ Find symbol declarations by qualified or unqualified name. Use this instead of t
|
|
|
8
8
|
- `cached`, `others`, `ignored` — Git file selection; `ignored` requires
|
|
9
9
|
`others`.
|
|
10
10
|
|
|
11
|
-
After `readSeek_hover`,
|
|
11
|
+
After `readSeek_hover`, use `identifier.text` for the token under the cursor. Use `symbol.qualified_name` only when intentionally navigating to the enclosing declaration.
|
package/prompts/edit.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 `readSeek_read`, `readSeek_grep`, `readSeek_search`,
|
|
4
|
-
`readSeek_write`.
|
|
3
|
+
Anchors come from `readSeek_read`, `readSeek_grep`, `readSeek_search`,
|
|
4
|
+
`readSeek_refs`, `readSeek_def`, or `readSeek_write`.
|
|
5
5
|
|
|
6
6
|
## Variants
|
|
7
7
|
|
package/prompts/hover.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Inspect the symbol at a source location. This identifies the token and enclosing symbol; use it before definition lookup or binding-specific references.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
package/prompts/refs.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Find
|
|
1
|
+
Find references or usages of an identifier by name or cursor binding. Results include enclosing symbols and edit-ready `LINE:HASH` anchors. Without cursor scope, results are identifier-name matches; with scope, they follow one binding and exclude shadows. Use text search for literal occurrences in strings or comments, and use this tool before renaming or deleting a symbol.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
package/prompts/rename.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Rename
|
|
1
|
+
Rename a symbol at a source location. Resolvable same-named bindings are preserved; verified edits apply by default. Set `apply: false` to preview the plan before changing files.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
package/prompts/search.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Search AST
|
|
1
|
+
Search code by AST structure using ast-grep-style patterns. Results include edit-ready `LINE:HASH` anchors. Use `readSeek_grep` for identifiers, strings, comments, configuration, documentation, or other plain text and regex.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|
package/prompts/view.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Inspect a PDF's structure or selected content. Start with the overview, then narrow by page, node, kind, or depth instead of reading the whole document.
|
|
2
2
|
|
|
3
3
|
## Parameters
|
|
4
4
|
|