@ian-pascoe/pi-lsp 0.2.0 → 0.3.0
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/package.json +2 -2
- package/src/lsp-tool.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ian-pascoe/pi-lsp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Configured language-server tools and post-edit diagnostics for Pi",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"cross-spawn": "^7.0.6",
|
|
36
|
-
"vscode-languageserver-protocol": "^3.
|
|
36
|
+
"vscode-languageserver-protocol": "^3.18.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/cross-spawn": "^6.0.6"
|
package/src/lsp-tool.ts
CHANGED
|
@@ -71,6 +71,7 @@ import {
|
|
|
71
71
|
import type { LspSessionFiles } from "./lsp-session-files.js";
|
|
72
72
|
import {
|
|
73
73
|
LspToolParametersSchema,
|
|
74
|
+
LspToolResultDetailsSchema,
|
|
74
75
|
LspWorkspaceEditPreviewRecordSchema,
|
|
75
76
|
MutationManifestSchema,
|
|
76
77
|
type LspToolParameters,
|
|
@@ -185,6 +186,10 @@ export interface LspToolDependencies {
|
|
|
185
186
|
readonly sessionFiles: LspSessionFiles;
|
|
186
187
|
}
|
|
187
188
|
|
|
189
|
+
type LspToolDefinition = ToolDefinition<typeof LspToolParametersSchema, LspToolResultDetails> & {
|
|
190
|
+
readonly outputSchema: typeof LspToolResultDetailsSchema;
|
|
191
|
+
};
|
|
192
|
+
|
|
188
193
|
interface LspReadValue {
|
|
189
194
|
readonly root_path: string;
|
|
190
195
|
readonly server_id: string;
|
|
@@ -1051,9 +1056,7 @@ async function executeApplyPreview(
|
|
|
1051
1056
|
}
|
|
1052
1057
|
|
|
1053
1058
|
/** Create the single strict Pi LSP ToolDefinition bound to one session's runtime owners. */
|
|
1054
|
-
export function createLspToolDefinition(
|
|
1055
|
-
dependencies: LspToolDependencies,
|
|
1056
|
-
): ToolDefinition<typeof LspToolParametersSchema, LspToolResultDetails> {
|
|
1059
|
+
export function createLspToolDefinition(dependencies: LspToolDependencies): LspToolDefinition {
|
|
1057
1060
|
return {
|
|
1058
1061
|
name: "lsp",
|
|
1059
1062
|
label: "LSP",
|
|
@@ -1064,6 +1067,7 @@ export function createLspToolDefinition(
|
|
|
1064
1067
|
"Use lsp read operations for semantic source navigation and diagnostics; use preview-producing lsp operations followed by lsp apply for language-server mutations.",
|
|
1065
1068
|
],
|
|
1066
1069
|
parameters: LspToolParametersSchema,
|
|
1070
|
+
outputSchema: LspToolResultDetailsSchema,
|
|
1067
1071
|
renderCall: (argumentsValue, theme, context) =>
|
|
1068
1072
|
renderLspToolCall(argumentsValue, theme, context.expanded, context.cwd),
|
|
1069
1073
|
renderResult: (result, options, theme, context) =>
|