@spences10/pi-lsp 0.0.49 → 0.0.51
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 +5 -2
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
<!-- package-readme:header:end -->
|
|
13
13
|
|
|
14
|
+
Prompt guidance uses Pi's named system-prompt sections. It coexists
|
|
15
|
+
with user `SYSTEM.md` and `APPEND_SYSTEM.md` files and other
|
|
16
|
+
extensions without replacing the complete prompt.
|
|
17
|
+
|
|
14
18
|
Give agents precise code intelligence instead of guesswork. `pi-lsp`
|
|
15
19
|
exposes language-server diagnostics, hovers, definitions, references,
|
|
16
20
|
and symbols as Pi tools so models can validate edits and navigate
|
|
@@ -214,8 +218,7 @@ The package also exports `CreateLspExtensionOptions`,
|
|
|
214
218
|
`should_inject_lsp_prompt`, and `LspClientLike` for custom harnesses
|
|
215
219
|
and tests that need to share the same prompt-gating or client seam.
|
|
216
220
|
|
|
217
|
-
`my-pi`
|
|
218
|
-
LSP extension.
|
|
221
|
+
`my-pi` includes this package.
|
|
219
222
|
|
|
220
223
|
## Development
|
|
221
224
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { register_lsp_command } from './commands.js';
|
|
2
|
-
import {
|
|
2
|
+
import { LSP_SYSTEM_PROMPT, should_inject_lsp_prompt, } from './prompt.js';
|
|
3
3
|
import { LspServerManager, } from './server-manager.js';
|
|
4
4
|
import { register_lsp_tools } from './tools.js';
|
|
5
5
|
export { should_inject_lsp_prompt } from './prompt.js';
|
|
@@ -8,11 +8,13 @@ export function create_lsp_extension(options = {}) {
|
|
|
8
8
|
const manager = new LspServerManager(options);
|
|
9
9
|
register_lsp_tools(pi, manager);
|
|
10
10
|
pi.on('before_agent_start', async (event) => {
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
if (should_inject_lsp_prompt(event)) {
|
|
12
|
+
event.systemPromptOptions.sections.lsp =
|
|
13
|
+
LSP_SYSTEM_PROMPT.trim();
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
delete event.systemPromptOptions.sections.lsp;
|
|
17
|
+
}
|
|
16
18
|
});
|
|
17
19
|
register_lsp_command(pi, manager);
|
|
18
20
|
pi.on('session_shutdown', async () => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACN,iBAAiB,EACjB,wBAAwB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,gBAAgB,GAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAKvD,MAAM,UAAU,oBAAoB,CACnC,OAAO,GAA8B,EAAE;IAEvC,OAAO,KAAK,UAAU,GAAG,CAAC,EAAgB;QACzC,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAE9C,kBAAkB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAEhC,EAAE,CAAC,EAAE,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC3C,IAAI,wBAAwB,CAAC,KAAK,CAAC,EAAE,CAAC;gBACrC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG;oBACrC,iBAAiB,CAAC,IAAI,EAAE,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACP,OAAO,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC/C,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,oBAAoB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAElC,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YACpC,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACtC,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAED,eAAe,oBAAoB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spences10/pi-lsp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"description": "Language Server Protocol tools for Pi agents to inspect diagnostics, hovers, definitions, references, and symbols",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"language-server",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@spences10/pi-child-env": "0.
|
|
37
|
-
"@spences10/pi-project-trust": "0.0
|
|
36
|
+
"@spences10/pi-child-env": "0.2.0",
|
|
37
|
+
"@spences10/pi-project-trust": "0.1.0",
|
|
38
38
|
"@spences10/pi-tui-modal": "0.0.24"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
42
|
-
"@types/node": "^
|
|
41
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
42
|
+
"@types/node": "^26.0.0",
|
|
43
43
|
"typescript": "^7.0.0",
|
|
44
|
-
"vite-plus": "1.
|
|
44
|
+
"vite-plus": "1.4.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@earendil-works/pi-coding-agent": "*",
|