@spences10/pi-lsp 0.0.50 → 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 +4 -0
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
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