@proxysoul/soulforge 1.3.4 → 1.3.6
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.js +18 -70
- package/dist/workers/intelligence.worker.js +4 -0
- package/package.json +1 -1
- package/dist/parser.worker.js +0 -4129
- package/dist/tree-sitter-3jzf13jk.wasm +0 -0
- package/dist/tree-sitter.wasm +0 -0
package/dist/index.js
CHANGED
|
@@ -309984,6 +309984,10 @@ class CodeIntelligenceRouter {
|
|
|
309984
309984
|
op: "readSymbol",
|
|
309985
309985
|
label: `readSymbol(${probeSymbolName})`,
|
|
309986
309986
|
fn: (b, f) => b.readSymbol?.(f, probeSymbolName) ?? Promise.resolve(null)
|
|
309987
|
+
}, {
|
|
309988
|
+
op: "findImplementation",
|
|
309989
|
+
label: `findImplementation(${probeSymbolName})`,
|
|
309990
|
+
fn: (b, f) => b.findImplementation?.(f, probeSymbolName) ?? Promise.resolve(null)
|
|
309987
309991
|
}];
|
|
309988
309992
|
const probeOp = async (fn, label, probes) => {
|
|
309989
309993
|
const start2 = performance.now();
|
|
@@ -317582,7 +317586,7 @@ async function switchToFile(nvim, file2) {
|
|
|
317582
317586
|
await nvim.api.executeLua("vim.cmd.edit(vim.fn.fnameescape(...))", [targetPath]);
|
|
317583
317587
|
}
|
|
317584
317588
|
}
|
|
317585
|
-
var NO_EDITOR, editorTool, NO_LSP = "__NO_LSP__", editorReadTool, editorEditTool, editorNavigateTool, editorDiagnosticsTool, editorSymbolsTool, editorReferencesTool, editorDefinitionTool, editorActionsTool, editorRenameTool,
|
|
317589
|
+
var NO_EDITOR, editorTool, NO_LSP = "__NO_LSP__", editorReadTool, editorEditTool, editorNavigateTool, editorDiagnosticsTool, editorSymbolsTool, editorReferencesTool, editorDefinitionTool, editorActionsTool, editorRenameTool, editorFormatTool, editorHoverTool, editorSelectTool, editorGotoCursorTool, editorYankTool, HIGHLIGHT_NS = "soulforge_highlight", editorHighlightTool, editorCursorContextTool, editorBuffersTool, editorQuickfixTool, editorTerminalOutputTool;
|
|
317586
317590
|
var init_editor = __esm(() => {
|
|
317587
317591
|
init_instance();
|
|
317588
317592
|
init_forbidden();
|
|
@@ -317663,8 +317667,6 @@ var init_editor = __esm(() => {
|
|
|
317663
317667
|
line: args2.line,
|
|
317664
317668
|
col: args2.col
|
|
317665
317669
|
});
|
|
317666
|
-
case "lsp_status":
|
|
317667
|
-
return editorLspStatusTool.execute();
|
|
317668
317670
|
case "format":
|
|
317669
317671
|
return editorFormatTool.execute({
|
|
317670
317672
|
startLine: args2.startLine,
|
|
@@ -318129,63 +318131,6 @@ ${lines.join(`
|
|
|
318129
318131
|
};
|
|
318130
318132
|
})
|
|
318131
318133
|
};
|
|
318132
|
-
editorLspStatusTool = {
|
|
318133
|
-
name: "editor_lsp_status",
|
|
318134
|
-
description: "Get the status of LSP servers attached to the current buffer, including their names, root directories, and capabilities.",
|
|
318135
|
-
execute: async () => withNvim(undefined, async (nvim) => {
|
|
318136
|
-
const lua = `
|
|
318137
|
-
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
|
318138
|
-
if #clients == 0 then return '${NO_LSP}' end
|
|
318139
|
-
local result = {}
|
|
318140
|
-
for _, c in ipairs(clients) do
|
|
318141
|
-
local caps = {}
|
|
318142
|
-
local sc = c.server_capabilities or {}
|
|
318143
|
-
if sc.completionProvider then table.insert(caps, 'completion') end
|
|
318144
|
-
if sc.hoverProvider then table.insert(caps, 'hover') end
|
|
318145
|
-
if sc.definitionProvider then table.insert(caps, 'definition') end
|
|
318146
|
-
if sc.referencesProvider then table.insert(caps, 'references') end
|
|
318147
|
-
if sc.renameProvider then table.insert(caps, 'rename') end
|
|
318148
|
-
if sc.documentFormattingProvider then table.insert(caps, 'formatting') end
|
|
318149
|
-
if sc.documentSymbolProvider then table.insert(caps, 'symbols') end
|
|
318150
|
-
if sc.codeActionProvider then table.insert(caps, 'codeActions') end
|
|
318151
|
-
if sc.diagnosticProvider then table.insert(caps, 'diagnostics') end
|
|
318152
|
-
table.insert(result, {
|
|
318153
|
-
name = c.name,
|
|
318154
|
-
id = c.id,
|
|
318155
|
-
root_dir = c.config and c.config.root_dir or '',
|
|
318156
|
-
capabilities = caps,
|
|
318157
|
-
})
|
|
318158
|
-
end
|
|
318159
|
-
return vim.json.encode(result)
|
|
318160
|
-
`;
|
|
318161
|
-
const result = await nvim.api.executeLua(lua, []);
|
|
318162
|
-
if (result === NO_LSP) {
|
|
318163
|
-
return {
|
|
318164
|
-
success: true,
|
|
318165
|
-
output: "No LSP servers attached to current buffer"
|
|
318166
|
-
};
|
|
318167
|
-
}
|
|
318168
|
-
const parsed = safeJsonParse(result, []);
|
|
318169
|
-
if (parsed.length === 0) {
|
|
318170
|
-
return {
|
|
318171
|
-
success: true,
|
|
318172
|
-
output: "No LSP servers attached"
|
|
318173
|
-
};
|
|
318174
|
-
}
|
|
318175
|
-
const lines = parsed.map((s) => {
|
|
318176
|
-
const srv = s;
|
|
318177
|
-
const caps = srv.capabilities.length > 0 ? srv.capabilities.join(", ") : "none";
|
|
318178
|
-
return `${srv.name} (id ${String(srv.id)})${srv.root_dir ? ` root: ${srv.root_dir}` : ""}
|
|
318179
|
-
capabilities: ${caps}`;
|
|
318180
|
-
});
|
|
318181
|
-
return {
|
|
318182
|
-
success: true,
|
|
318183
|
-
output: lines.join(`
|
|
318184
|
-
|
|
318185
|
-
`)
|
|
318186
|
-
};
|
|
318187
|
-
})
|
|
318188
|
-
};
|
|
318189
318134
|
editorFormatTool = {
|
|
318190
318135
|
name: "editor_format",
|
|
318191
318136
|
description: "Format the current buffer (or a line range) using the LSP formatter. Requires a language server with formatting capability.",
|
|
@@ -334886,17 +334831,10 @@ Outgoing calls (${String(ch.outgoing.length)}):`);
|
|
|
334886
334831
|
};
|
|
334887
334832
|
}
|
|
334888
334833
|
const tracked = client ? await client.routerFindImplementation(resolvedFile, symbol26) : await fallbackTracked2(resolvedFile, "findImplementation", (b) => b.findImplementation ? b.findImplementation(resolvedFile, symbol26) : Promise.resolve(null));
|
|
334889
|
-
if (!tracked) {
|
|
334890
|
-
return {
|
|
334891
|
-
success: false,
|
|
334892
|
-
output: `No implementation backend available \u2014 try grep instead`,
|
|
334893
|
-
error: "unsupported"
|
|
334894
|
-
};
|
|
334895
|
-
}
|
|
334896
|
-
if (tracked.value.length === 0) {
|
|
334834
|
+
if (!tracked || tracked.value.length === 0) {
|
|
334897
334835
|
return {
|
|
334898
334836
|
success: false,
|
|
334899
|
-
output: `No implementations found for '${symbol26}'
|
|
334837
|
+
output: `No implementations found for '${symbol26}' \u2014 for interfaces/abstract classes, ensure the editor is open. For concrete symbols, use definition instead.`,
|
|
334900
334838
|
error: "not found"
|
|
334901
334839
|
};
|
|
334902
334840
|
}
|
|
@@ -341527,7 +341465,7 @@ ${crossTabWarning}` : `Shell: ${desc}
|
|
|
341527
341465
|
...TEXT_OUTPUT,
|
|
341528
341466
|
description: editorTool.description,
|
|
341529
341467
|
inputSchema: exports_external.object({
|
|
341530
|
-
action: exports_external.enum(["read", "edit", "navigate", "diagnostics", "symbols", "hover", "references", "definition", "actions", "rename", "
|
|
341468
|
+
action: exports_external.enum(["read", "edit", "navigate", "diagnostics", "symbols", "hover", "references", "definition", "actions", "rename", "format", "select", "goto_cursor", "yank", "highlight", "cursor_context", "buffers", "quickfix", "terminal_output"]).describe("read=buffer content, edit=replace lines, navigate=open file/jump, " + "diagnostics/symbols/hover/references/definition=buffer-level (use navigate tool for LSP), " + "actions=code actions, rename=buffer rename, format=format, buffers=list open, terminal_output=read terminal"),
|
|
341531
341469
|
startLine: exports_external.number().nullable().optional().transform(nullToUndef).describe("For read/edit/format/select/highlight: start line (1-indexed)"),
|
|
341532
341470
|
endLine: exports_external.number().nullable().optional().transform(nullToUndef).describe("For read/edit/format/select/highlight: end line (1-indexed)"),
|
|
341533
341471
|
replacement: exports_external.string().nullable().optional().transform(nullToUndef).describe("For edit: new content"),
|
|
@@ -440129,6 +440067,16 @@ var init_syntax = __esm(async () => {
|
|
|
440129
440067
|
}]
|
|
440130
440068
|
};
|
|
440131
440069
|
addDefaultParsers(discoverParsers());
|
|
440070
|
+
if (IS_COMPILED3) {
|
|
440071
|
+
process.env.OTUI_TREE_SITTER_WORKER_PATH = join41(homedir20(), ".soulforge", "opentui-assets", "parser.worker.js");
|
|
440072
|
+
} else if (IS_DIST3) {
|
|
440073
|
+
try {
|
|
440074
|
+
const coreWorker = resolve33(dirname16(__require.resolve("@opentui/core")), "parser.worker.js");
|
|
440075
|
+
if (existsSync31(coreWorker)) {
|
|
440076
|
+
process.env.OTUI_TREE_SITTER_WORKER_PATH = coreWorker;
|
|
440077
|
+
}
|
|
440078
|
+
} catch {}
|
|
440079
|
+
}
|
|
440132
440080
|
theme = [{
|
|
440133
440081
|
scope: ["default"],
|
|
440134
440082
|
style: {
|
|
@@ -27550,6 +27550,10 @@ class CodeIntelligenceRouter {
|
|
|
27550
27550
|
op: "readSymbol",
|
|
27551
27551
|
label: `readSymbol(${probeSymbolName})`,
|
|
27552
27552
|
fn: (b3, f3) => b3.readSymbol?.(f3, probeSymbolName) ?? Promise.resolve(null)
|
|
27553
|
+
}, {
|
|
27554
|
+
op: "findImplementation",
|
|
27555
|
+
label: `findImplementation(${probeSymbolName})`,
|
|
27556
|
+
fn: (b3, f3) => b3.findImplementation?.(f3, probeSymbolName) ?? Promise.resolve(null)
|
|
27553
27557
|
}];
|
|
27554
27558
|
const probeOp = async (fn, label, probes) => {
|
|
27555
27559
|
const start2 = performance.now();
|