oh-my-claude-sisyphus 1.0.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/LICENSE +21 -0
- package/README.md +416 -0
- package/dist/agents/definitions.d.ts +48 -0
- package/dist/agents/definitions.d.ts.map +1 -0
- package/dist/agents/definitions.js +271 -0
- package/dist/agents/definitions.js.map +1 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +5 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/index.d.ts +13 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +280 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +5 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +49 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +329 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/features/continuation-enforcement.d.ts +34 -0
- package/dist/features/continuation-enforcement.d.ts.map +1 -0
- package/dist/features/continuation-enforcement.js +142 -0
- package/dist/features/continuation-enforcement.js.map +1 -0
- package/dist/features/index.d.ts +6 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/index.js +6 -0
- package/dist/features/index.js.map +1 -0
- package/dist/features/magic-keywords.d.ts +22 -0
- package/dist/features/magic-keywords.d.ts.map +1 -0
- package/dist/features/magic-keywords.js +189 -0
- package/dist/features/magic-keywords.js.map +1 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +146 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/servers.d.ts +77 -0
- package/dist/mcp/servers.d.ts.map +1 -0
- package/dist/mcp/servers.js +122 -0
- package/dist/mcp/servers.js.map +1 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/types.d.ts +133 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +5 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/tools/ast-tools.d.ts +63 -0
- package/dist/tools/ast-tools.d.ts.map +1 -0
- package/dist/tools/ast-tools.js +349 -0
- package/dist/tools/ast-tools.js.map +1 -0
- package/dist/tools/index.d.ts +52 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +120 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/lsp/client.d.ts +201 -0
- package/dist/tools/lsp/client.d.ts.map +1 -0
- package/dist/tools/lsp/client.js +454 -0
- package/dist/tools/lsp/client.js.map +1 -0
- package/dist/tools/lsp/index.d.ts +9 -0
- package/dist/tools/lsp/index.d.ts.map +1 -0
- package/dist/tools/lsp/index.js +7 -0
- package/dist/tools/lsp/index.js.map +1 -0
- package/dist/tools/lsp/servers.d.ts +37 -0
- package/dist/tools/lsp/servers.d.ts.map +1 -0
- package/dist/tools/lsp/servers.js +148 -0
- package/dist/tools/lsp/servers.js.map +1 -0
- package/dist/tools/lsp/utils.d.ts +58 -0
- package/dist/tools/lsp/utils.d.ts.map +1 -0
- package/dist/tools/lsp/utils.js +236 -0
- package/dist/tools/lsp/utils.js.map +1 -0
- package/dist/tools/lsp-tools.d.ts +151 -0
- package/dist/tools/lsp-tools.d.ts.map +1 -0
- package/dist/tools/lsp-tools.js +358 -0
- package/dist/tools/lsp-tools.js.map +1 -0
- package/package.json +75 -0
- package/scripts/install.sh +765 -0
- package/scripts/uninstall.sh +47 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Module Exports
|
|
3
|
+
*/
|
|
4
|
+
export { LspClient, lspClientManager } from './client.js';
|
|
5
|
+
export type { Position, Range, Location, Hover, Diagnostic, DocumentSymbol, SymbolInformation, WorkspaceEdit, CodeAction } from './client.js';
|
|
6
|
+
export { LSP_SERVERS, getServerForFile, getServerForLanguage, getAllServers, commandExists } from './servers.js';
|
|
7
|
+
export type { LspServerConfig } from './servers.js';
|
|
8
|
+
export { uriToPath, formatPosition, formatRange, formatLocation, formatHover, formatLocations, formatDocumentSymbols, formatWorkspaceSymbols, formatDiagnostics, formatCodeActions, formatWorkspaceEdit, countEdits } from './utils.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/lsp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACX,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Module Exports
|
|
3
|
+
*/
|
|
4
|
+
export { LspClient, lspClientManager } from './client.js';
|
|
5
|
+
export { LSP_SERVERS, getServerForFile, getServerForLanguage, getAllServers, commandExists } from './servers.js';
|
|
6
|
+
export { uriToPath, formatPosition, formatRange, formatLocation, formatHover, formatLocations, formatDocumentSymbols, formatWorkspaceSymbols, formatDiagnostics, formatCodeActions, formatWorkspaceEdit, countEdits } from './utils.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/lsp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAa1D,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,aAAa,EACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACX,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Server Configurations
|
|
3
|
+
*
|
|
4
|
+
* Defines known language servers and their configurations.
|
|
5
|
+
* Supports auto-detection and installation hints.
|
|
6
|
+
*/
|
|
7
|
+
export interface LspServerConfig {
|
|
8
|
+
name: string;
|
|
9
|
+
command: string;
|
|
10
|
+
args: string[];
|
|
11
|
+
extensions: string[];
|
|
12
|
+
installHint: string;
|
|
13
|
+
initializationOptions?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Known LSP servers and their configurations
|
|
17
|
+
*/
|
|
18
|
+
export declare const LSP_SERVERS: Record<string, LspServerConfig>;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a command exists in PATH
|
|
21
|
+
*/
|
|
22
|
+
export declare function commandExists(command: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get the LSP server config for a file based on its extension
|
|
25
|
+
*/
|
|
26
|
+
export declare function getServerForFile(filePath: string): LspServerConfig | null;
|
|
27
|
+
/**
|
|
28
|
+
* Get all available servers (installed and not installed)
|
|
29
|
+
*/
|
|
30
|
+
export declare function getAllServers(): Array<LspServerConfig & {
|
|
31
|
+
installed: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Get the appropriate server for a language
|
|
35
|
+
*/
|
|
36
|
+
export declare function getServerForLanguage(language: string): LspServerConfig | null;
|
|
37
|
+
//# sourceMappingURL=servers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../../../src/tools/lsp/servers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAuEvD,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAUzE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,KAAK,CAAC,eAAe,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAK/E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CA6B7E"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Server Configurations
|
|
3
|
+
*
|
|
4
|
+
* Defines known language servers and their configurations.
|
|
5
|
+
* Supports auto-detection and installation hints.
|
|
6
|
+
*/
|
|
7
|
+
import { execSync } from 'child_process';
|
|
8
|
+
import { extname } from 'path';
|
|
9
|
+
/**
|
|
10
|
+
* Known LSP servers and their configurations
|
|
11
|
+
*/
|
|
12
|
+
export const LSP_SERVERS = {
|
|
13
|
+
typescript: {
|
|
14
|
+
name: 'TypeScript Language Server',
|
|
15
|
+
command: 'typescript-language-server',
|
|
16
|
+
args: ['--stdio'],
|
|
17
|
+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mts', '.cts', '.mjs', '.cjs'],
|
|
18
|
+
installHint: 'npm install -g typescript-language-server typescript'
|
|
19
|
+
},
|
|
20
|
+
python: {
|
|
21
|
+
name: 'Python Language Server (pylsp)',
|
|
22
|
+
command: 'pylsp',
|
|
23
|
+
args: [],
|
|
24
|
+
extensions: ['.py', '.pyw'],
|
|
25
|
+
installHint: 'pip install python-lsp-server'
|
|
26
|
+
},
|
|
27
|
+
rust: {
|
|
28
|
+
name: 'Rust Analyzer',
|
|
29
|
+
command: 'rust-analyzer',
|
|
30
|
+
args: [],
|
|
31
|
+
extensions: ['.rs'],
|
|
32
|
+
installHint: 'rustup component add rust-analyzer'
|
|
33
|
+
},
|
|
34
|
+
go: {
|
|
35
|
+
name: 'gopls',
|
|
36
|
+
command: 'gopls',
|
|
37
|
+
args: ['serve'],
|
|
38
|
+
extensions: ['.go'],
|
|
39
|
+
installHint: 'go install golang.org/x/tools/gopls@latest'
|
|
40
|
+
},
|
|
41
|
+
c: {
|
|
42
|
+
name: 'clangd',
|
|
43
|
+
command: 'clangd',
|
|
44
|
+
args: [],
|
|
45
|
+
extensions: ['.c', '.h', '.cpp', '.cc', '.cxx', '.hpp', '.hxx'],
|
|
46
|
+
installHint: 'Install clangd from your package manager or LLVM'
|
|
47
|
+
},
|
|
48
|
+
java: {
|
|
49
|
+
name: 'Eclipse JDT Language Server',
|
|
50
|
+
command: 'jdtls',
|
|
51
|
+
args: [],
|
|
52
|
+
extensions: ['.java'],
|
|
53
|
+
installHint: 'Install from https://github.com/eclipse/eclipse.jdt.ls'
|
|
54
|
+
},
|
|
55
|
+
json: {
|
|
56
|
+
name: 'JSON Language Server',
|
|
57
|
+
command: 'vscode-json-language-server',
|
|
58
|
+
args: ['--stdio'],
|
|
59
|
+
extensions: ['.json', '.jsonc'],
|
|
60
|
+
installHint: 'npm install -g vscode-langservers-extracted'
|
|
61
|
+
},
|
|
62
|
+
html: {
|
|
63
|
+
name: 'HTML Language Server',
|
|
64
|
+
command: 'vscode-html-language-server',
|
|
65
|
+
args: ['--stdio'],
|
|
66
|
+
extensions: ['.html', '.htm'],
|
|
67
|
+
installHint: 'npm install -g vscode-langservers-extracted'
|
|
68
|
+
},
|
|
69
|
+
css: {
|
|
70
|
+
name: 'CSS Language Server',
|
|
71
|
+
command: 'vscode-css-language-server',
|
|
72
|
+
args: ['--stdio'],
|
|
73
|
+
extensions: ['.css', '.scss', '.less'],
|
|
74
|
+
installHint: 'npm install -g vscode-langservers-extracted'
|
|
75
|
+
},
|
|
76
|
+
yaml: {
|
|
77
|
+
name: 'YAML Language Server',
|
|
78
|
+
command: 'yaml-language-server',
|
|
79
|
+
args: ['--stdio'],
|
|
80
|
+
extensions: ['.yaml', '.yml'],
|
|
81
|
+
installHint: 'npm install -g yaml-language-server'
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Check if a command exists in PATH
|
|
86
|
+
*/
|
|
87
|
+
export function commandExists(command) {
|
|
88
|
+
try {
|
|
89
|
+
execSync(`which ${command}`, { stdio: 'ignore' });
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get the LSP server config for a file based on its extension
|
|
98
|
+
*/
|
|
99
|
+
export function getServerForFile(filePath) {
|
|
100
|
+
const ext = extname(filePath).toLowerCase();
|
|
101
|
+
for (const [_, config] of Object.entries(LSP_SERVERS)) {
|
|
102
|
+
if (config.extensions.includes(ext)) {
|
|
103
|
+
return config;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Get all available servers (installed and not installed)
|
|
110
|
+
*/
|
|
111
|
+
export function getAllServers() {
|
|
112
|
+
return Object.values(LSP_SERVERS).map(config => ({
|
|
113
|
+
...config,
|
|
114
|
+
installed: commandExists(config.command)
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get the appropriate server for a language
|
|
119
|
+
*/
|
|
120
|
+
export function getServerForLanguage(language) {
|
|
121
|
+
// Map common language names to server keys
|
|
122
|
+
const langMap = {
|
|
123
|
+
'javascript': 'typescript',
|
|
124
|
+
'typescript': 'typescript',
|
|
125
|
+
'tsx': 'typescript',
|
|
126
|
+
'jsx': 'typescript',
|
|
127
|
+
'python': 'python',
|
|
128
|
+
'rust': 'rust',
|
|
129
|
+
'go': 'go',
|
|
130
|
+
'golang': 'go',
|
|
131
|
+
'c': 'c',
|
|
132
|
+
'cpp': 'c',
|
|
133
|
+
'c++': 'c',
|
|
134
|
+
'java': 'java',
|
|
135
|
+
'json': 'json',
|
|
136
|
+
'html': 'html',
|
|
137
|
+
'css': 'css',
|
|
138
|
+
'scss': 'css',
|
|
139
|
+
'less': 'css',
|
|
140
|
+
'yaml': 'yaml'
|
|
141
|
+
};
|
|
142
|
+
const serverKey = langMap[language.toLowerCase()];
|
|
143
|
+
if (serverKey && LSP_SERVERS[serverKey]) {
|
|
144
|
+
return LSP_SERVERS[serverKey];
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=servers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"servers.js","sourceRoot":"","sources":["../../../src/tools/lsp/servers.ts"],"names":[],"mappings":"AAAA;;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AACd,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for formatting LSP results and converting between formats.
|
|
5
|
+
*/
|
|
6
|
+
import type { Hover, Location, DocumentSymbol, SymbolInformation, Diagnostic, CodeAction, WorkspaceEdit, Range } from './client.js';
|
|
7
|
+
/**
|
|
8
|
+
* Convert URI to file path
|
|
9
|
+
*/
|
|
10
|
+
export declare function uriToPath(uri: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Format a position for display
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatPosition(line: number, character: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* Format a range for display
|
|
17
|
+
*/
|
|
18
|
+
export declare function formatRange(range: Range): string;
|
|
19
|
+
/**
|
|
20
|
+
* Format a location for display
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatLocation(location: Location): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format hover content
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatHover(hover: Hover | null): string;
|
|
27
|
+
/**
|
|
28
|
+
* Format locations array
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatLocations(locations: Location | Location[] | null): string;
|
|
31
|
+
/**
|
|
32
|
+
* Format document symbols (hierarchical)
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatDocumentSymbols(symbols: DocumentSymbol[] | SymbolInformation[] | null, indent?: number): string;
|
|
35
|
+
/**
|
|
36
|
+
* Format workspace symbols
|
|
37
|
+
*/
|
|
38
|
+
export declare function formatWorkspaceSymbols(symbols: SymbolInformation[] | null): string;
|
|
39
|
+
/**
|
|
40
|
+
* Format diagnostics
|
|
41
|
+
*/
|
|
42
|
+
export declare function formatDiagnostics(diagnostics: Diagnostic[], filePath?: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Format code actions
|
|
45
|
+
*/
|
|
46
|
+
export declare function formatCodeActions(actions: CodeAction[] | null): string;
|
|
47
|
+
/**
|
|
48
|
+
* Format workspace edit
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatWorkspaceEdit(edit: WorkspaceEdit | null): string;
|
|
51
|
+
/**
|
|
52
|
+
* Count edits in a workspace edit
|
|
53
|
+
*/
|
|
54
|
+
export declare function countEdits(edit: WorkspaceEdit | null): {
|
|
55
|
+
files: number;
|
|
56
|
+
edits: number;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/lsp/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA4CpI;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIhD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAIzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,CAqBvD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,EAAE,GAAG,IAAI,GAAG,MAAM,CAQ/E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,GAAG,IAAI,EAAE,MAAM,SAAI,GAAG,MAAM,CA0BhH;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,IAAI,GAAG,MAAM,CAWlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CActF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,GAAG,MAAM,CAUtE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,CAkCtE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAiBvF"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for formatting LSP results and converting between formats.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Symbol kind names (LSP spec)
|
|
8
|
+
*/
|
|
9
|
+
const SYMBOL_KINDS = {
|
|
10
|
+
1: 'File',
|
|
11
|
+
2: 'Module',
|
|
12
|
+
3: 'Namespace',
|
|
13
|
+
4: 'Package',
|
|
14
|
+
5: 'Class',
|
|
15
|
+
6: 'Method',
|
|
16
|
+
7: 'Property',
|
|
17
|
+
8: 'Field',
|
|
18
|
+
9: 'Constructor',
|
|
19
|
+
10: 'Enum',
|
|
20
|
+
11: 'Interface',
|
|
21
|
+
12: 'Function',
|
|
22
|
+
13: 'Variable',
|
|
23
|
+
14: 'Constant',
|
|
24
|
+
15: 'String',
|
|
25
|
+
16: 'Number',
|
|
26
|
+
17: 'Boolean',
|
|
27
|
+
18: 'Array',
|
|
28
|
+
19: 'Object',
|
|
29
|
+
20: 'Key',
|
|
30
|
+
21: 'Null',
|
|
31
|
+
22: 'EnumMember',
|
|
32
|
+
23: 'Struct',
|
|
33
|
+
24: 'Event',
|
|
34
|
+
25: 'Operator',
|
|
35
|
+
26: 'TypeParameter'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Diagnostic severity names
|
|
39
|
+
*/
|
|
40
|
+
const SEVERITY_NAMES = {
|
|
41
|
+
1: 'Error',
|
|
42
|
+
2: 'Warning',
|
|
43
|
+
3: 'Information',
|
|
44
|
+
4: 'Hint'
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Convert URI to file path
|
|
48
|
+
*/
|
|
49
|
+
export function uriToPath(uri) {
|
|
50
|
+
if (uri.startsWith('file://')) {
|
|
51
|
+
return decodeURIComponent(uri.slice(7));
|
|
52
|
+
}
|
|
53
|
+
return uri;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Format a position for display
|
|
57
|
+
*/
|
|
58
|
+
export function formatPosition(line, character) {
|
|
59
|
+
return `${line + 1}:${character + 1}`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Format a range for display
|
|
63
|
+
*/
|
|
64
|
+
export function formatRange(range) {
|
|
65
|
+
const start = formatPosition(range.start.line, range.start.character);
|
|
66
|
+
const end = formatPosition(range.end.line, range.end.character);
|
|
67
|
+
return start === end ? start : `${start}-${end}`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Format a location for display
|
|
71
|
+
*/
|
|
72
|
+
export function formatLocation(location) {
|
|
73
|
+
const path = uriToPath(location.uri);
|
|
74
|
+
const range = formatRange(location.range);
|
|
75
|
+
return `${path}:${range}`;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Format hover content
|
|
79
|
+
*/
|
|
80
|
+
export function formatHover(hover) {
|
|
81
|
+
if (!hover)
|
|
82
|
+
return 'No hover information available';
|
|
83
|
+
let text = '';
|
|
84
|
+
if (typeof hover.contents === 'string') {
|
|
85
|
+
text = hover.contents;
|
|
86
|
+
}
|
|
87
|
+
else if (Array.isArray(hover.contents)) {
|
|
88
|
+
text = hover.contents.map(c => {
|
|
89
|
+
if (typeof c === 'string')
|
|
90
|
+
return c;
|
|
91
|
+
return c.value;
|
|
92
|
+
}).join('\n\n');
|
|
93
|
+
}
|
|
94
|
+
else if ('value' in hover.contents) {
|
|
95
|
+
text = hover.contents.value;
|
|
96
|
+
}
|
|
97
|
+
if (hover.range) {
|
|
98
|
+
text += `\n\nRange: ${formatRange(hover.range)}`;
|
|
99
|
+
}
|
|
100
|
+
return text || 'No hover information available';
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Format locations array
|
|
104
|
+
*/
|
|
105
|
+
export function formatLocations(locations) {
|
|
106
|
+
if (!locations)
|
|
107
|
+
return 'No locations found';
|
|
108
|
+
const locs = Array.isArray(locations) ? locations : [locations];
|
|
109
|
+
if (locs.length === 0)
|
|
110
|
+
return 'No locations found';
|
|
111
|
+
return locs.map(loc => formatLocation(loc)).join('\n');
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Format document symbols (hierarchical)
|
|
115
|
+
*/
|
|
116
|
+
export function formatDocumentSymbols(symbols, indent = 0) {
|
|
117
|
+
if (!symbols || symbols.length === 0)
|
|
118
|
+
return 'No symbols found';
|
|
119
|
+
const lines = [];
|
|
120
|
+
const prefix = ' '.repeat(indent);
|
|
121
|
+
for (const symbol of symbols) {
|
|
122
|
+
const kind = SYMBOL_KINDS[symbol.kind] || 'Unknown';
|
|
123
|
+
if ('range' in symbol) {
|
|
124
|
+
// DocumentSymbol
|
|
125
|
+
const range = formatRange(symbol.range);
|
|
126
|
+
lines.push(`${prefix}${kind}: ${symbol.name} [${range}]`);
|
|
127
|
+
if (symbol.children && symbol.children.length > 0) {
|
|
128
|
+
lines.push(formatDocumentSymbols(symbol.children, indent + 1));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
// SymbolInformation
|
|
133
|
+
const loc = formatLocation(symbol.location);
|
|
134
|
+
const container = symbol.containerName ? ` (in ${symbol.containerName})` : '';
|
|
135
|
+
lines.push(`${prefix}${kind}: ${symbol.name}${container} [${loc}]`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return lines.join('\n');
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Format workspace symbols
|
|
142
|
+
*/
|
|
143
|
+
export function formatWorkspaceSymbols(symbols) {
|
|
144
|
+
if (!symbols || symbols.length === 0)
|
|
145
|
+
return 'No symbols found';
|
|
146
|
+
const lines = symbols.map(symbol => {
|
|
147
|
+
const kind = SYMBOL_KINDS[symbol.kind] || 'Unknown';
|
|
148
|
+
const loc = formatLocation(symbol.location);
|
|
149
|
+
const container = symbol.containerName ? ` (in ${symbol.containerName})` : '';
|
|
150
|
+
return `${kind}: ${symbol.name}${container}\n ${loc}`;
|
|
151
|
+
});
|
|
152
|
+
return lines.join('\n\n');
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Format diagnostics
|
|
156
|
+
*/
|
|
157
|
+
export function formatDiagnostics(diagnostics, filePath) {
|
|
158
|
+
if (diagnostics.length === 0)
|
|
159
|
+
return 'No diagnostics';
|
|
160
|
+
const lines = diagnostics.map(diag => {
|
|
161
|
+
const severity = SEVERITY_NAMES[diag.severity || 1] || 'Unknown';
|
|
162
|
+
const range = formatRange(diag.range);
|
|
163
|
+
const source = diag.source ? `[${diag.source}]` : '';
|
|
164
|
+
const code = diag.code ? ` (${diag.code})` : '';
|
|
165
|
+
const location = filePath ? `${filePath}:${range}` : range;
|
|
166
|
+
return `${severity}${code}${source}: ${diag.message}\n at ${location}`;
|
|
167
|
+
});
|
|
168
|
+
return lines.join('\n\n');
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Format code actions
|
|
172
|
+
*/
|
|
173
|
+
export function formatCodeActions(actions) {
|
|
174
|
+
if (!actions || actions.length === 0)
|
|
175
|
+
return 'No code actions available';
|
|
176
|
+
const lines = actions.map((action, index) => {
|
|
177
|
+
const preferred = action.isPreferred ? ' (preferred)' : '';
|
|
178
|
+
const kind = action.kind ? ` [${action.kind}]` : '';
|
|
179
|
+
return `${index + 1}. ${action.title}${kind}${preferred}`;
|
|
180
|
+
});
|
|
181
|
+
return lines.join('\n');
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Format workspace edit
|
|
185
|
+
*/
|
|
186
|
+
export function formatWorkspaceEdit(edit) {
|
|
187
|
+
if (!edit)
|
|
188
|
+
return 'No edits';
|
|
189
|
+
const lines = [];
|
|
190
|
+
if (edit.changes) {
|
|
191
|
+
for (const [uri, changes] of Object.entries(edit.changes)) {
|
|
192
|
+
const path = uriToPath(uri);
|
|
193
|
+
lines.push(`File: ${path}`);
|
|
194
|
+
for (const change of changes) {
|
|
195
|
+
const range = formatRange(change.range);
|
|
196
|
+
const preview = change.newText.length > 50
|
|
197
|
+
? change.newText.slice(0, 50) + '...'
|
|
198
|
+
: change.newText;
|
|
199
|
+
lines.push(` ${range}: "${preview}"`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (edit.documentChanges) {
|
|
204
|
+
for (const docChange of edit.documentChanges) {
|
|
205
|
+
const path = uriToPath(docChange.textDocument.uri);
|
|
206
|
+
lines.push(`File: ${path}`);
|
|
207
|
+
for (const change of docChange.edits) {
|
|
208
|
+
const range = formatRange(change.range);
|
|
209
|
+
const preview = change.newText.length > 50
|
|
210
|
+
? change.newText.slice(0, 50) + '...'
|
|
211
|
+
: change.newText;
|
|
212
|
+
lines.push(` ${range}: "${preview}"`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return lines.length > 0 ? lines.join('\n') : 'No edits';
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Count edits in a workspace edit
|
|
220
|
+
*/
|
|
221
|
+
export function countEdits(edit) {
|
|
222
|
+
if (!edit)
|
|
223
|
+
return { files: 0, edits: 0 };
|
|
224
|
+
let files = 0;
|
|
225
|
+
let edits = 0;
|
|
226
|
+
if (edit.changes) {
|
|
227
|
+
files += Object.keys(edit.changes).length;
|
|
228
|
+
edits += Object.values(edit.changes).reduce((sum, changes) => sum + changes.length, 0);
|
|
229
|
+
}
|
|
230
|
+
if (edit.documentChanges) {
|
|
231
|
+
files += edit.documentChanges.length;
|
|
232
|
+
edits += edit.documentChanges.reduce((sum, doc) => sum + doc.edits.length, 0);
|
|
233
|
+
}
|
|
234
|
+
return { files, edits };
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/tools/lsp/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,YAAY,GAA2B;IAC3C,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,aAAa;IAChB,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,eAAe;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,cAAc,GAA2B;IAC7C,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,SAAS;IACZ,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