@proxysoul/soulforge 2.18.3 → 2.18.5
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 +270 -67
- package/dist/workers/intelligence.worker.js +649 -607
- package/package.json +1 -1
- package/scripts/launcher.mjs +31 -0
|
@@ -28394,181 +28394,567 @@ var init_protocol = __esm(() => {
|
|
|
28394
28394
|
FILE_URI_SAFE_RE = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]/g;
|
|
28395
28395
|
});
|
|
28396
28396
|
|
|
28397
|
-
//
|
|
28398
|
-
|
|
28399
|
-
|
|
28400
|
-
|
|
28401
|
-
|
|
28402
|
-
|
|
28403
|
-
|
|
28404
|
-
|
|
28405
|
-
|
|
28406
|
-
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
}
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
|
|
28418
|
-
|
|
28419
|
-
|
|
28397
|
+
// src/config/index.ts
|
|
28398
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
28399
|
+
import { join as join9 } from "path";
|
|
28400
|
+
function getConfigDir() {
|
|
28401
|
+
return configDir();
|
|
28402
|
+
}
|
|
28403
|
+
function getConfigFile() {
|
|
28404
|
+
return join9(getConfigDir(), "config.json");
|
|
28405
|
+
}
|
|
28406
|
+
function loadConfig() {
|
|
28407
|
+
const configDir2 = getConfigDir();
|
|
28408
|
+
const configFile = getConfigFile();
|
|
28409
|
+
if (!existsSync7(configDir2)) {
|
|
28410
|
+
mkdirSync2(configDir2, {
|
|
28411
|
+
recursive: true,
|
|
28412
|
+
mode: 448
|
|
28413
|
+
});
|
|
28414
|
+
}
|
|
28415
|
+
let userConfig = {};
|
|
28416
|
+
let fileExists = existsSync7(configFile);
|
|
28417
|
+
if (!fileExists) {
|
|
28418
|
+
writeFileSync3(configFile, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
28419
|
+
fileExists = true;
|
|
28420
|
+
} else {
|
|
28421
|
+
try {
|
|
28422
|
+
userConfig = JSON.parse(readFileSync4(configFile, "utf-8"));
|
|
28423
|
+
} catch (err2) {
|
|
28424
|
+
const msg = err2 instanceof Error ? err2.message : String(err2);
|
|
28425
|
+
process.stderr.write(`
|
|
28426
|
+
Error: invalid config.json \u2014 ${msg}
|
|
28420
28427
|
|
|
28421
|
-
|
|
28422
|
-
|
|
28423
|
-
|
|
28424
|
-
|
|
28425
|
-
|
|
28426
|
-
|
|
28427
|
-
|
|
28428
|
-
}
|
|
28429
|
-
});
|
|
28430
|
-
}
|
|
28431
|
-
function getIteratorFn(maybeIterable) {
|
|
28432
|
-
if (maybeIterable === null || typeof maybeIterable !== "object")
|
|
28433
|
-
return null;
|
|
28434
|
-
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
28435
|
-
return typeof maybeIterable === "function" ? maybeIterable : null;
|
|
28436
|
-
}
|
|
28437
|
-
function warnNoop(publicInstance, callerName) {
|
|
28438
|
-
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
28439
|
-
var warningKey = publicInstance + "." + callerName;
|
|
28440
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
28441
|
-
}
|
|
28442
|
-
function Component(props, context, updater) {
|
|
28443
|
-
this.props = props;
|
|
28444
|
-
this.context = context;
|
|
28445
|
-
this.refs = emptyObject;
|
|
28446
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
28447
|
-
}
|
|
28448
|
-
function ComponentDummy() {}
|
|
28449
|
-
function PureComponent(props, context, updater) {
|
|
28450
|
-
this.props = props;
|
|
28451
|
-
this.context = context;
|
|
28452
|
-
this.refs = emptyObject;
|
|
28453
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
28454
|
-
}
|
|
28455
|
-
function noop() {}
|
|
28456
|
-
function testStringCoercion(value) {
|
|
28457
|
-
return "" + value;
|
|
28458
|
-
}
|
|
28459
|
-
function checkKeyStringCoercion(value) {
|
|
28460
|
-
try {
|
|
28461
|
-
testStringCoercion(value);
|
|
28462
|
-
var JSCompiler_inline_result = false;
|
|
28463
|
-
} catch (e) {
|
|
28464
|
-
JSCompiler_inline_result = true;
|
|
28465
|
-
}
|
|
28466
|
-
if (JSCompiler_inline_result) {
|
|
28467
|
-
JSCompiler_inline_result = console;
|
|
28468
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
28469
|
-
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
28470
|
-
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
28471
|
-
return testStringCoercion(value);
|
|
28472
|
-
}
|
|
28428
|
+
` + ` Path: ${configFile}
|
|
28429
|
+
|
|
28430
|
+
` + ` Fix the JSON syntax error and try again.
|
|
28431
|
+
` + ` (Your config was NOT overwritten.)
|
|
28432
|
+
|
|
28433
|
+
`);
|
|
28434
|
+
process.exit(1);
|
|
28473
28435
|
}
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28477
|
-
|
|
28478
|
-
|
|
28479
|
-
|
|
28480
|
-
|
|
28481
|
-
|
|
28482
|
-
|
|
28483
|
-
|
|
28484
|
-
|
|
28485
|
-
|
|
28486
|
-
|
|
28487
|
-
|
|
28488
|
-
|
|
28489
|
-
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
|
|
28495
|
-
|
|
28496
|
-
|
|
28497
|
-
|
|
28498
|
-
|
|
28499
|
-
|
|
28500
|
-
|
|
28501
|
-
|
|
28502
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
28503
|
-
case REACT_FORWARD_REF_TYPE:
|
|
28504
|
-
var innerType = type.render;
|
|
28505
|
-
type = type.displayName;
|
|
28506
|
-
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
28507
|
-
return type;
|
|
28508
|
-
case REACT_MEMO_TYPE:
|
|
28509
|
-
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
28510
|
-
case REACT_LAZY_TYPE:
|
|
28511
|
-
innerType = type._payload;
|
|
28512
|
-
type = type._init;
|
|
28513
|
-
try {
|
|
28514
|
-
return getComponentNameFromType(type(innerType));
|
|
28515
|
-
} catch (x3) {}
|
|
28436
|
+
}
|
|
28437
|
+
let merged = {
|
|
28438
|
+
...DEFAULT_CONFIG
|
|
28439
|
+
};
|
|
28440
|
+
if (_presetOverlay)
|
|
28441
|
+
merged = applyConfigPatch(merged, _presetOverlay);
|
|
28442
|
+
const userPatch = diffAgainstDefaults(userConfig);
|
|
28443
|
+
if (Object.keys(userPatch).length > 0) {
|
|
28444
|
+
merged = applyConfigPatch(merged, userPatch);
|
|
28445
|
+
}
|
|
28446
|
+
return merged;
|
|
28447
|
+
}
|
|
28448
|
+
function diffAgainstDefaults(userConfig) {
|
|
28449
|
+
const out2 = {};
|
|
28450
|
+
const defaults = DEFAULT_CONFIG;
|
|
28451
|
+
const nested = new Set(NESTED_KEYS);
|
|
28452
|
+
for (const [key2, value] of Object.entries(userConfig)) {
|
|
28453
|
+
if (value === undefined)
|
|
28454
|
+
continue;
|
|
28455
|
+
const def = defaults[key2];
|
|
28456
|
+
if (nested.has(key2) && value && typeof value === "object" && !Array.isArray(value) && def && typeof def === "object" && !Array.isArray(def)) {
|
|
28457
|
+
const subPatch = {};
|
|
28458
|
+
const defRec = def;
|
|
28459
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
28460
|
+
if (subValue === undefined)
|
|
28461
|
+
continue;
|
|
28462
|
+
if (JSON.stringify(subValue) !== JSON.stringify(defRec[subKey])) {
|
|
28463
|
+
subPatch[subKey] = subValue;
|
|
28516
28464
|
}
|
|
28517
|
-
return null;
|
|
28518
|
-
}
|
|
28519
|
-
function getTaskName(type) {
|
|
28520
|
-
if (type === REACT_FRAGMENT_TYPE)
|
|
28521
|
-
return "<>";
|
|
28522
|
-
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
28523
|
-
return "<...>";
|
|
28524
|
-
try {
|
|
28525
|
-
var name2 = getComponentNameFromType(type);
|
|
28526
|
-
return name2 ? "<" + name2 + ">" : "<...>";
|
|
28527
|
-
} catch (x3) {
|
|
28528
|
-
return "<...>";
|
|
28529
28465
|
}
|
|
28466
|
+
if (Object.keys(subPatch).length > 0)
|
|
28467
|
+
out2[key2] = subPatch;
|
|
28468
|
+
continue;
|
|
28530
28469
|
}
|
|
28531
|
-
|
|
28532
|
-
|
|
28533
|
-
return dispatcher === null ? null : dispatcher.getOwner();
|
|
28470
|
+
if (JSON.stringify(value) !== JSON.stringify(def)) {
|
|
28471
|
+
out2[key2] = value;
|
|
28534
28472
|
}
|
|
28535
|
-
|
|
28536
|
-
|
|
28473
|
+
}
|
|
28474
|
+
return out2;
|
|
28475
|
+
}
|
|
28476
|
+
function loadProjectConfig(cwd) {
|
|
28477
|
+
const projectFile = join9(cwd, ".soulforge", "config.json");
|
|
28478
|
+
if (!existsSync7(projectFile))
|
|
28479
|
+
return null;
|
|
28480
|
+
try {
|
|
28481
|
+
const raw2 = readFileSync4(projectFile, "utf-8");
|
|
28482
|
+
return JSON.parse(raw2);
|
|
28483
|
+
} catch (err2) {
|
|
28484
|
+
const msg = err2 instanceof Error ? err2.message : String(err2);
|
|
28485
|
+
process.stderr.write(`
|
|
28486
|
+
Warning: invalid project config.json \u2014 ${msg}
|
|
28487
|
+
` + ` Path: ${projectFile}
|
|
28488
|
+
` + ` Fix the JSON syntax error. Ignoring project config for now.
|
|
28489
|
+
|
|
28490
|
+
`);
|
|
28491
|
+
return null;
|
|
28492
|
+
}
|
|
28493
|
+
}
|
|
28494
|
+
function applyConfigPatch(base, patch) {
|
|
28495
|
+
const result = {
|
|
28496
|
+
...base,
|
|
28497
|
+
...patch
|
|
28498
|
+
};
|
|
28499
|
+
for (const key2 of NESTED_KEYS) {
|
|
28500
|
+
const b3 = base[key2];
|
|
28501
|
+
const p2 = patch[key2];
|
|
28502
|
+
if (p2 && b3 && typeof b3 === "object" && typeof p2 === "object") {
|
|
28503
|
+
result[key2] = {
|
|
28504
|
+
...b3,
|
|
28505
|
+
...p2
|
|
28506
|
+
};
|
|
28537
28507
|
}
|
|
28538
|
-
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28542
|
-
|
|
28543
|
-
|
|
28544
|
-
|
|
28508
|
+
}
|
|
28509
|
+
return result;
|
|
28510
|
+
}
|
|
28511
|
+
var DEFAULT_CONFIG, _presetOverlay = null, NESTED_KEYS;
|
|
28512
|
+
var init_config = __esm(() => {
|
|
28513
|
+
init_platform();
|
|
28514
|
+
init_ensure_soulforge_dir();
|
|
28515
|
+
DEFAULT_CONFIG = {
|
|
28516
|
+
defaultModel: "none",
|
|
28517
|
+
routerRules: [],
|
|
28518
|
+
editor: {
|
|
28519
|
+
command: "nvim",
|
|
28520
|
+
args: []
|
|
28521
|
+
},
|
|
28522
|
+
theme: {
|
|
28523
|
+
name: "proxysoul-main",
|
|
28524
|
+
transparent: true
|
|
28525
|
+
},
|
|
28526
|
+
nvimConfig: "default",
|
|
28527
|
+
editorIntegration: {
|
|
28528
|
+
diagnostics: true,
|
|
28529
|
+
symbols: true,
|
|
28530
|
+
hover: true,
|
|
28531
|
+
references: true,
|
|
28532
|
+
definition: true,
|
|
28533
|
+
codeActions: true,
|
|
28534
|
+
editorContext: true,
|
|
28535
|
+
rename: true,
|
|
28536
|
+
lspStatus: true,
|
|
28537
|
+
format: true,
|
|
28538
|
+
syncEditorOnEdit: false
|
|
28539
|
+
},
|
|
28540
|
+
codeExecution: true,
|
|
28541
|
+
webSearch: true,
|
|
28542
|
+
compaction: {
|
|
28543
|
+
strategy: "v2",
|
|
28544
|
+
triggerThreshold: 0.7,
|
|
28545
|
+
resetThreshold: 0.4,
|
|
28546
|
+
keepRecent: 4,
|
|
28547
|
+
maxToolResults: 30,
|
|
28548
|
+
llmExtraction: true
|
|
28545
28549
|
}
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
|
|
28550
|
-
|
|
28551
|
-
|
|
28552
|
-
|
|
28553
|
-
|
|
28550
|
+
};
|
|
28551
|
+
NESTED_KEYS = ["editor", "theme", "editorIntegration", "codeIntelligence", "thinking", "performance", "contextManagement", "agentFeatures", "compaction", "retry", "addons"];
|
|
28552
|
+
});
|
|
28553
|
+
|
|
28554
|
+
// src/core/intelligence/backends/lsp/server-registry.ts
|
|
28555
|
+
import { existsSync as existsSync8 } from "fs";
|
|
28556
|
+
import { join as join10 } from "path";
|
|
28557
|
+
function firstExisting(dir, cmd) {
|
|
28558
|
+
for (const sfx of BIN_SUFFIXES) {
|
|
28559
|
+
const p2 = join10(dir, cmd + sfx);
|
|
28560
|
+
if (existsSync8(p2))
|
|
28561
|
+
return p2;
|
|
28562
|
+
}
|
|
28563
|
+
return null;
|
|
28564
|
+
}
|
|
28565
|
+
function commandExistsInMason(cmd) {
|
|
28566
|
+
return firstExisting(MASON_BIN_DIR, cmd);
|
|
28567
|
+
}
|
|
28568
|
+
function findInSoulforge(cmd) {
|
|
28569
|
+
const npmBin = firstExisting(join10(SOULFORGE_BIN_DIR, "node_modules", ".bin"), cmd);
|
|
28570
|
+
if (npmBin)
|
|
28571
|
+
return npmBin;
|
|
28572
|
+
const directBin = firstExisting(join10(SOULFORGE_BIN_DIR, "bin"), cmd);
|
|
28573
|
+
if (directBin)
|
|
28574
|
+
return directBin;
|
|
28575
|
+
return null;
|
|
28576
|
+
}
|
|
28577
|
+
function resolveCommand(cmd) {
|
|
28578
|
+
const cached = probeCache.get(cmd);
|
|
28579
|
+
if (cached !== undefined)
|
|
28580
|
+
return cached;
|
|
28581
|
+
if (commandExists(cmd)) {
|
|
28582
|
+
probeCache.set(cmd, cmd);
|
|
28583
|
+
return cmd;
|
|
28584
|
+
}
|
|
28585
|
+
const sfPath = findInSoulforge(cmd);
|
|
28586
|
+
if (sfPath) {
|
|
28587
|
+
probeCache.set(cmd, sfPath);
|
|
28588
|
+
return sfPath;
|
|
28589
|
+
}
|
|
28590
|
+
const masonPath = commandExistsInMason(cmd);
|
|
28591
|
+
if (masonPath) {
|
|
28592
|
+
probeCache.set(cmd, masonPath);
|
|
28593
|
+
return masonPath;
|
|
28594
|
+
}
|
|
28595
|
+
probeCache.set(cmd, null);
|
|
28596
|
+
return null;
|
|
28597
|
+
}
|
|
28598
|
+
function isServerDisabled(cmd) {
|
|
28599
|
+
const cwd = process.cwd();
|
|
28600
|
+
const global2 = loadConfig();
|
|
28601
|
+
const project = loadProjectConfig(cwd);
|
|
28602
|
+
const disabled = project?.disabledLspServers ?? global2.disabledLspServers ?? [];
|
|
28603
|
+
return disabled.includes(cmd);
|
|
28604
|
+
}
|
|
28605
|
+
function findServersForLanguage(language) {
|
|
28606
|
+
const candidates = SERVER_CANDIDATES[language];
|
|
28607
|
+
if (!candidates)
|
|
28608
|
+
return [];
|
|
28609
|
+
const results = [];
|
|
28610
|
+
for (const candidate of candidates) {
|
|
28611
|
+
if (isServerDisabled(candidate.command))
|
|
28612
|
+
continue;
|
|
28613
|
+
const resolved = resolveCommand(candidate.command);
|
|
28614
|
+
if (resolved) {
|
|
28615
|
+
results.push({
|
|
28616
|
+
command: resolved,
|
|
28617
|
+
args: candidate.args,
|
|
28618
|
+
language
|
|
28554
28619
|
});
|
|
28555
28620
|
}
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28560
|
-
|
|
28621
|
+
}
|
|
28622
|
+
return results;
|
|
28623
|
+
}
|
|
28624
|
+
var SERVER_CANDIDATES, MASON_BIN_DIR, SOULFORGE_BIN_DIR, BIN_SUFFIXES, probeCache;
|
|
28625
|
+
var init_server_registry = __esm(() => {
|
|
28626
|
+
init_config();
|
|
28627
|
+
init_platform();
|
|
28628
|
+
SERVER_CANDIDATES = {
|
|
28629
|
+
typescript: [{
|
|
28630
|
+
command: "typescript-language-server",
|
|
28631
|
+
args: ["--stdio"]
|
|
28632
|
+
}, {
|
|
28633
|
+
command: "biome",
|
|
28634
|
+
args: ["lsp-proxy"]
|
|
28635
|
+
}, {
|
|
28636
|
+
command: "deno",
|
|
28637
|
+
args: ["lsp"]
|
|
28638
|
+
}, {
|
|
28639
|
+
command: "vscode-eslint-language-server",
|
|
28640
|
+
args: ["--stdio"]
|
|
28641
|
+
}],
|
|
28642
|
+
javascript: [{
|
|
28643
|
+
command: "typescript-language-server",
|
|
28644
|
+
args: ["--stdio"]
|
|
28645
|
+
}, {
|
|
28646
|
+
command: "biome",
|
|
28647
|
+
args: ["lsp-proxy"]
|
|
28648
|
+
}, {
|
|
28649
|
+
command: "deno",
|
|
28650
|
+
args: ["lsp"]
|
|
28651
|
+
}, {
|
|
28652
|
+
command: "vscode-eslint-language-server",
|
|
28653
|
+
args: ["--stdio"]
|
|
28654
|
+
}],
|
|
28655
|
+
python: [{
|
|
28656
|
+
command: "pyright-langserver",
|
|
28657
|
+
args: ["--stdio"]
|
|
28658
|
+
}, {
|
|
28659
|
+
command: "pylsp",
|
|
28660
|
+
args: []
|
|
28661
|
+
}],
|
|
28662
|
+
go: [{
|
|
28663
|
+
command: "gopls",
|
|
28664
|
+
args: ["serve"]
|
|
28665
|
+
}],
|
|
28666
|
+
rust: [{
|
|
28667
|
+
command: "rust-analyzer",
|
|
28668
|
+
args: []
|
|
28669
|
+
}],
|
|
28670
|
+
lua: [{
|
|
28671
|
+
command: "lua-language-server",
|
|
28672
|
+
args: []
|
|
28673
|
+
}],
|
|
28674
|
+
c: [{
|
|
28675
|
+
command: "clangd",
|
|
28676
|
+
args: []
|
|
28677
|
+
}],
|
|
28678
|
+
cpp: [{
|
|
28679
|
+
command: "clangd",
|
|
28680
|
+
args: []
|
|
28681
|
+
}],
|
|
28682
|
+
ruby: [{
|
|
28683
|
+
command: "solargraph",
|
|
28684
|
+
args: ["stdio"]
|
|
28685
|
+
}],
|
|
28686
|
+
php: [{
|
|
28687
|
+
command: "intelephense",
|
|
28688
|
+
args: ["--stdio"]
|
|
28689
|
+
}],
|
|
28690
|
+
zig: [{
|
|
28691
|
+
command: "zls",
|
|
28692
|
+
args: []
|
|
28693
|
+
}],
|
|
28694
|
+
bash: [{
|
|
28695
|
+
command: "bash-language-server",
|
|
28696
|
+
args: ["start"]
|
|
28697
|
+
}],
|
|
28698
|
+
css: [{
|
|
28699
|
+
command: "vscode-css-language-server",
|
|
28700
|
+
args: ["--stdio"]
|
|
28701
|
+
}, {
|
|
28702
|
+
command: "biome",
|
|
28703
|
+
args: ["lsp-proxy"]
|
|
28704
|
+
}, {
|
|
28705
|
+
command: "tailwindcss-language-server",
|
|
28706
|
+
args: ["--stdio"]
|
|
28707
|
+
}],
|
|
28708
|
+
html: [{
|
|
28709
|
+
command: "vscode-html-language-server",
|
|
28710
|
+
args: ["--stdio"]
|
|
28711
|
+
}, {
|
|
28712
|
+
command: "emmet-language-server",
|
|
28713
|
+
args: ["--stdio"]
|
|
28714
|
+
}],
|
|
28715
|
+
json: [{
|
|
28716
|
+
command: "vscode-json-language-server",
|
|
28717
|
+
args: ["--stdio"]
|
|
28718
|
+
}, {
|
|
28719
|
+
command: "biome",
|
|
28720
|
+
args: ["lsp-proxy"]
|
|
28721
|
+
}],
|
|
28722
|
+
yaml: [{
|
|
28723
|
+
command: "yaml-language-server",
|
|
28724
|
+
args: ["--stdio"]
|
|
28725
|
+
}],
|
|
28726
|
+
toml: [{
|
|
28727
|
+
command: "taplo",
|
|
28728
|
+
args: ["lsp", "stdio"]
|
|
28729
|
+
}],
|
|
28730
|
+
dockerfile: [{
|
|
28731
|
+
command: "docker-langserver",
|
|
28732
|
+
args: ["--stdio"]
|
|
28733
|
+
}],
|
|
28734
|
+
java: [{
|
|
28735
|
+
command: "jdtls",
|
|
28736
|
+
args: []
|
|
28737
|
+
}],
|
|
28738
|
+
kotlin: [{
|
|
28739
|
+
command: "kotlin-language-server",
|
|
28740
|
+
args: []
|
|
28741
|
+
}],
|
|
28742
|
+
scala: [{
|
|
28743
|
+
command: "metals",
|
|
28744
|
+
args: []
|
|
28745
|
+
}],
|
|
28746
|
+
csharp: [{
|
|
28747
|
+
command: "csharp-ls",
|
|
28748
|
+
args: []
|
|
28749
|
+
}, {
|
|
28750
|
+
command: "OmniSharp",
|
|
28751
|
+
args: ["--languageserver"]
|
|
28752
|
+
}],
|
|
28753
|
+
swift: [{
|
|
28754
|
+
command: "sourcekit-lsp",
|
|
28755
|
+
args: []
|
|
28756
|
+
}],
|
|
28757
|
+
dart: [{
|
|
28758
|
+
command: "dart",
|
|
28759
|
+
args: ["language-server", "--protocol=lsp"]
|
|
28760
|
+
}],
|
|
28761
|
+
elixir: [{
|
|
28762
|
+
command: "elixir-ls",
|
|
28763
|
+
args: []
|
|
28764
|
+
}, {
|
|
28765
|
+
command: "expert",
|
|
28766
|
+
args: []
|
|
28767
|
+
}],
|
|
28768
|
+
ocaml: [{
|
|
28769
|
+
command: "ocamllsp",
|
|
28770
|
+
args: []
|
|
28771
|
+
}],
|
|
28772
|
+
vue: [{
|
|
28773
|
+
command: "vue-language-server",
|
|
28774
|
+
args: ["--stdio"]
|
|
28775
|
+
}]
|
|
28776
|
+
};
|
|
28777
|
+
MASON_BIN_DIR = join10(userDataDir(), "mason", "bin");
|
|
28778
|
+
SOULFORGE_BIN_DIR = join10(configDir(), "lsp-servers");
|
|
28779
|
+
BIN_SUFFIXES = IS_WIN ? [".exe", ".cmd", ""] : [""];
|
|
28780
|
+
probeCache = new Map;
|
|
28781
|
+
});
|
|
28782
|
+
|
|
28783
|
+
// node_modules/zustand/esm/vanilla.mjs
|
|
28784
|
+
var createStoreImpl = (createState) => {
|
|
28785
|
+
let state;
|
|
28786
|
+
const listeners = /* @__PURE__ */ new Set;
|
|
28787
|
+
const setState = (partial, replace) => {
|
|
28788
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
28789
|
+
if (!Object.is(nextState, state)) {
|
|
28790
|
+
const previousState = state;
|
|
28791
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
28792
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
28561
28793
|
}
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28567
|
-
|
|
28568
|
-
|
|
28569
|
-
|
|
28570
|
-
|
|
28571
|
-
|
|
28794
|
+
};
|
|
28795
|
+
const getState = () => state;
|
|
28796
|
+
const getInitialState = () => initialState;
|
|
28797
|
+
const subscribe = (listener) => {
|
|
28798
|
+
listeners.add(listener);
|
|
28799
|
+
return () => listeners.delete(listener);
|
|
28800
|
+
};
|
|
28801
|
+
const api = { setState, getState, getInitialState, subscribe };
|
|
28802
|
+
const initialState = state = createState(setState, getState, api);
|
|
28803
|
+
return api;
|
|
28804
|
+
}, createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
28805
|
+
var init_vanilla = () => {};
|
|
28806
|
+
|
|
28807
|
+
// node_modules/react/cjs/react.development.js
|
|
28808
|
+
var require_react_development = __commonJS((exports, module2) => {
|
|
28809
|
+
(function() {
|
|
28810
|
+
function defineDeprecationWarning(methodName, info2) {
|
|
28811
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
28812
|
+
get: function() {
|
|
28813
|
+
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info2[0], info2[1]);
|
|
28814
|
+
}
|
|
28815
|
+
});
|
|
28816
|
+
}
|
|
28817
|
+
function getIteratorFn(maybeIterable) {
|
|
28818
|
+
if (maybeIterable === null || typeof maybeIterable !== "object")
|
|
28819
|
+
return null;
|
|
28820
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
28821
|
+
return typeof maybeIterable === "function" ? maybeIterable : null;
|
|
28822
|
+
}
|
|
28823
|
+
function warnNoop(publicInstance, callerName) {
|
|
28824
|
+
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
28825
|
+
var warningKey = publicInstance + "." + callerName;
|
|
28826
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
28827
|
+
}
|
|
28828
|
+
function Component(props, context, updater) {
|
|
28829
|
+
this.props = props;
|
|
28830
|
+
this.context = context;
|
|
28831
|
+
this.refs = emptyObject;
|
|
28832
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
28833
|
+
}
|
|
28834
|
+
function ComponentDummy() {}
|
|
28835
|
+
function PureComponent(props, context, updater) {
|
|
28836
|
+
this.props = props;
|
|
28837
|
+
this.context = context;
|
|
28838
|
+
this.refs = emptyObject;
|
|
28839
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
28840
|
+
}
|
|
28841
|
+
function noop() {}
|
|
28842
|
+
function testStringCoercion(value) {
|
|
28843
|
+
return "" + value;
|
|
28844
|
+
}
|
|
28845
|
+
function checkKeyStringCoercion(value) {
|
|
28846
|
+
try {
|
|
28847
|
+
testStringCoercion(value);
|
|
28848
|
+
var JSCompiler_inline_result = false;
|
|
28849
|
+
} catch (e) {
|
|
28850
|
+
JSCompiler_inline_result = true;
|
|
28851
|
+
}
|
|
28852
|
+
if (JSCompiler_inline_result) {
|
|
28853
|
+
JSCompiler_inline_result = console;
|
|
28854
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
28855
|
+
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
28856
|
+
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
28857
|
+
return testStringCoercion(value);
|
|
28858
|
+
}
|
|
28859
|
+
}
|
|
28860
|
+
function getComponentNameFromType(type) {
|
|
28861
|
+
if (type == null)
|
|
28862
|
+
return null;
|
|
28863
|
+
if (typeof type === "function")
|
|
28864
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
28865
|
+
if (typeof type === "string")
|
|
28866
|
+
return type;
|
|
28867
|
+
switch (type) {
|
|
28868
|
+
case REACT_FRAGMENT_TYPE:
|
|
28869
|
+
return "Fragment";
|
|
28870
|
+
case REACT_PROFILER_TYPE:
|
|
28871
|
+
return "Profiler";
|
|
28872
|
+
case REACT_STRICT_MODE_TYPE:
|
|
28873
|
+
return "StrictMode";
|
|
28874
|
+
case REACT_SUSPENSE_TYPE:
|
|
28875
|
+
return "Suspense";
|
|
28876
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
28877
|
+
return "SuspenseList";
|
|
28878
|
+
case REACT_ACTIVITY_TYPE:
|
|
28879
|
+
return "Activity";
|
|
28880
|
+
}
|
|
28881
|
+
if (typeof type === "object")
|
|
28882
|
+
switch (typeof type.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
28883
|
+
case REACT_PORTAL_TYPE:
|
|
28884
|
+
return "Portal";
|
|
28885
|
+
case REACT_CONTEXT_TYPE:
|
|
28886
|
+
return type.displayName || "Context";
|
|
28887
|
+
case REACT_CONSUMER_TYPE:
|
|
28888
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
28889
|
+
case REACT_FORWARD_REF_TYPE:
|
|
28890
|
+
var innerType = type.render;
|
|
28891
|
+
type = type.displayName;
|
|
28892
|
+
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
28893
|
+
return type;
|
|
28894
|
+
case REACT_MEMO_TYPE:
|
|
28895
|
+
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
28896
|
+
case REACT_LAZY_TYPE:
|
|
28897
|
+
innerType = type._payload;
|
|
28898
|
+
type = type._init;
|
|
28899
|
+
try {
|
|
28900
|
+
return getComponentNameFromType(type(innerType));
|
|
28901
|
+
} catch (x3) {}
|
|
28902
|
+
}
|
|
28903
|
+
return null;
|
|
28904
|
+
}
|
|
28905
|
+
function getTaskName(type) {
|
|
28906
|
+
if (type === REACT_FRAGMENT_TYPE)
|
|
28907
|
+
return "<>";
|
|
28908
|
+
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
28909
|
+
return "<...>";
|
|
28910
|
+
try {
|
|
28911
|
+
var name2 = getComponentNameFromType(type);
|
|
28912
|
+
return name2 ? "<" + name2 + ">" : "<...>";
|
|
28913
|
+
} catch (x3) {
|
|
28914
|
+
return "<...>";
|
|
28915
|
+
}
|
|
28916
|
+
}
|
|
28917
|
+
function getOwner() {
|
|
28918
|
+
var dispatcher = ReactSharedInternals.A;
|
|
28919
|
+
return dispatcher === null ? null : dispatcher.getOwner();
|
|
28920
|
+
}
|
|
28921
|
+
function UnknownOwner() {
|
|
28922
|
+
return Error("react-stack-top-frame");
|
|
28923
|
+
}
|
|
28924
|
+
function hasValidKey(config) {
|
|
28925
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
28926
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
28927
|
+
if (getter && getter.isReactWarning)
|
|
28928
|
+
return false;
|
|
28929
|
+
}
|
|
28930
|
+
return config.key !== undefined;
|
|
28931
|
+
}
|
|
28932
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
28933
|
+
function warnAboutAccessingKey() {
|
|
28934
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
28935
|
+
}
|
|
28936
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
28937
|
+
Object.defineProperty(props, "key", {
|
|
28938
|
+
get: warnAboutAccessingKey,
|
|
28939
|
+
configurable: true
|
|
28940
|
+
});
|
|
28941
|
+
}
|
|
28942
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
28943
|
+
var componentName = getComponentNameFromType(this.type);
|
|
28944
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
28945
|
+
componentName = this.props.ref;
|
|
28946
|
+
return componentName !== undefined ? componentName : null;
|
|
28947
|
+
}
|
|
28948
|
+
function ReactElement(type, key2, props, owner, debugStack, debugTask) {
|
|
28949
|
+
var refProp = props.ref;
|
|
28950
|
+
type = {
|
|
28951
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
28952
|
+
type,
|
|
28953
|
+
key: key2,
|
|
28954
|
+
props,
|
|
28955
|
+
_owner: owner
|
|
28956
|
+
};
|
|
28957
|
+
(refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type, "ref", {
|
|
28572
28958
|
enumerable: false,
|
|
28573
28959
|
get: elementRefGetterWithDeprecationWarning
|
|
28574
28960
|
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
@@ -29224,452 +29610,108 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
29224
29610
|
exports.useReducer = function(reducer, initialArg, init2) {
|
|
29225
29611
|
return resolveDispatcher().useReducer(reducer, initialArg, init2);
|
|
29226
29612
|
};
|
|
29227
|
-
exports.useRef = function(initialValue) {
|
|
29228
|
-
return resolveDispatcher().useRef(initialValue);
|
|
29229
|
-
};
|
|
29230
|
-
exports.useState = function(initialState) {
|
|
29231
|
-
return resolveDispatcher().useState(initialState);
|
|
29232
|
-
};
|
|
29233
|
-
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
29234
|
-
return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
29235
|
-
};
|
|
29236
|
-
exports.useTransition = function() {
|
|
29237
|
-
return resolveDispatcher().useTransition();
|
|
29238
|
-
};
|
|
29239
|
-
exports.version = "19.2.6";
|
|
29240
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
29241
|
-
})();
|
|
29242
|
-
});
|
|
29243
|
-
|
|
29244
|
-
// node_modules/react/index.js
|
|
29245
|
-
var require_react = __commonJS((exports, module2) => {
|
|
29246
|
-
var react_development = __toESM(require_react_development());
|
|
29247
|
-
if (false) {} else {
|
|
29248
|
-
module2.exports = react_development;
|
|
29249
|
-
}
|
|
29250
|
-
});
|
|
29251
|
-
|
|
29252
|
-
// node_modules/zustand/esm/react.mjs
|
|
29253
|
-
function useStore(api, selector = identity) {
|
|
29254
|
-
const slice = import_react.default.useSyncExternalStore(api.subscribe, import_react.default.useCallback(() => selector(api.getState()), [api, selector]), import_react.default.useCallback(() => selector(api.getInitialState()), [api, selector]));
|
|
29255
|
-
import_react.default.useDebugValue(slice);
|
|
29256
|
-
return slice;
|
|
29257
|
-
}
|
|
29258
|
-
var import_react, identity = (arg) => arg, createImpl = (createState) => {
|
|
29259
|
-
const api = createStore(createState);
|
|
29260
|
-
const useBoundStore = (selector) => useStore(api, selector);
|
|
29261
|
-
Object.assign(useBoundStore, api);
|
|
29262
|
-
return useBoundStore;
|
|
29263
|
-
}, create2 = (createState) => createState ? createImpl(createState) : createImpl;
|
|
29264
|
-
var init_react = __esm(() => {
|
|
29265
|
-
init_vanilla();
|
|
29266
|
-
import_react = __toESM(require_react(), 1);
|
|
29267
|
-
});
|
|
29268
|
-
|
|
29269
|
-
// node_modules/zustand/esm/index.mjs
|
|
29270
|
-
var init_esm2 = __esm(() => {
|
|
29271
|
-
init_vanilla();
|
|
29272
|
-
init_react();
|
|
29273
|
-
});
|
|
29274
|
-
|
|
29275
|
-
// node_modules/zustand/esm/middleware.mjs
|
|
29276
|
-
var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
29277
|
-
const origSubscribe = api.subscribe;
|
|
29278
|
-
api.subscribe = (selector, optListener, options) => {
|
|
29279
|
-
let listener = selector;
|
|
29280
|
-
if (optListener) {
|
|
29281
|
-
const equalityFn = (options == null ? undefined : options.equalityFn) || Object.is;
|
|
29282
|
-
let currentSlice = selector(api.getState());
|
|
29283
|
-
listener = (state) => {
|
|
29284
|
-
const nextSlice = selector(state);
|
|
29285
|
-
if (!equalityFn(currentSlice, nextSlice)) {
|
|
29286
|
-
const previousSlice = currentSlice;
|
|
29287
|
-
optListener(currentSlice = nextSlice, previousSlice);
|
|
29288
|
-
}
|
|
29289
|
-
};
|
|
29290
|
-
if (options == null ? undefined : options.fireImmediately) {
|
|
29291
|
-
optListener(currentSlice, currentSlice);
|
|
29292
|
-
}
|
|
29293
|
-
}
|
|
29294
|
-
return origSubscribe(listener);
|
|
29295
|
-
};
|
|
29296
|
-
const initialState = fn(set, get, api);
|
|
29297
|
-
return initialState;
|
|
29298
|
-
}, subscribeWithSelector;
|
|
29299
|
-
var init_middleware = __esm(() => {
|
|
29300
|
-
subscribeWithSelector = subscribeWithSelectorImpl;
|
|
29301
|
-
});
|
|
29302
|
-
|
|
29303
|
-
// src/stores/errors.ts
|
|
29304
|
-
function logBackgroundError(source, message) {
|
|
29305
|
-
useErrorStore.getState().push(source, message);
|
|
29306
|
-
}
|
|
29307
|
-
var MAX_ERRORS = 500, useErrorStore;
|
|
29308
|
-
var init_errors = __esm(() => {
|
|
29309
|
-
init_esm2();
|
|
29310
|
-
init_middleware();
|
|
29311
|
-
useErrorStore = create2()(subscribeWithSelector((set) => ({
|
|
29312
|
-
errors: [],
|
|
29313
|
-
push: (source, message) => set((s2) => {
|
|
29314
|
-
const entry = {
|
|
29315
|
-
id: crypto.randomUUID(),
|
|
29316
|
-
source,
|
|
29317
|
-
message,
|
|
29318
|
-
timestamp: Date.now()
|
|
29319
|
-
};
|
|
29320
|
-
const errors = s2.errors.length >= MAX_ERRORS ? [...s2.errors.slice(-(MAX_ERRORS - 1)), entry] : [...s2.errors, entry];
|
|
29321
|
-
return {
|
|
29322
|
-
errors
|
|
29323
|
-
};
|
|
29324
|
-
}),
|
|
29325
|
-
clear: () => set({
|
|
29326
|
-
errors: []
|
|
29327
|
-
})
|
|
29328
|
-
})));
|
|
29329
|
-
});
|
|
29330
|
-
|
|
29331
|
-
// src/config/index.ts
|
|
29332
|
-
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
29333
|
-
import { join as join9 } from "path";
|
|
29334
|
-
function getConfigDir() {
|
|
29335
|
-
return configDir();
|
|
29336
|
-
}
|
|
29337
|
-
function getConfigFile() {
|
|
29338
|
-
return join9(getConfigDir(), "config.json");
|
|
29339
|
-
}
|
|
29340
|
-
function loadConfig() {
|
|
29341
|
-
const configDir2 = getConfigDir();
|
|
29342
|
-
const configFile = getConfigFile();
|
|
29343
|
-
if (!existsSync7(configDir2)) {
|
|
29344
|
-
mkdirSync2(configDir2, {
|
|
29345
|
-
recursive: true,
|
|
29346
|
-
mode: 448
|
|
29347
|
-
});
|
|
29348
|
-
}
|
|
29349
|
-
if (!existsSync7(configFile)) {
|
|
29350
|
-
writeFileSync3(configFile, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
29351
|
-
if (!_presetOverlay)
|
|
29352
|
-
return DEFAULT_CONFIG;
|
|
29353
|
-
}
|
|
29354
|
-
let userConfig = {};
|
|
29355
|
-
try {
|
|
29356
|
-
userConfig = JSON.parse(readFileSync4(configFile, "utf-8"));
|
|
29357
|
-
} catch (err2) {
|
|
29358
|
-
logBackgroundError("config", `Failed to parse ${configFile}: ${err2 instanceof Error ? err2.message : String(err2)} \u2014 using defaults`);
|
|
29359
|
-
if (!_presetOverlay)
|
|
29360
|
-
return DEFAULT_CONFIG;
|
|
29361
|
-
}
|
|
29362
|
-
let merged = {
|
|
29363
|
-
...DEFAULT_CONFIG
|
|
29364
|
-
};
|
|
29365
|
-
if (_presetOverlay)
|
|
29366
|
-
merged = applyConfigPatch(merged, _presetOverlay);
|
|
29367
|
-
merged = {
|
|
29368
|
-
...merged,
|
|
29369
|
-
...userConfig
|
|
29370
|
-
};
|
|
29371
|
-
return merged;
|
|
29372
|
-
}
|
|
29373
|
-
function loadProjectConfig(cwd) {
|
|
29374
|
-
const projectFile = join9(cwd, ".soulforge", "config.json");
|
|
29375
|
-
if (!existsSync7(projectFile))
|
|
29376
|
-
return null;
|
|
29377
|
-
try {
|
|
29378
|
-
const raw2 = readFileSync4(projectFile, "utf-8");
|
|
29379
|
-
return JSON.parse(raw2);
|
|
29380
|
-
} catch (err2) {
|
|
29381
|
-
logBackgroundError("config", `Failed to parse ${projectFile}: ${err2 instanceof Error ? err2.message : String(err2)} \u2014 ignoring project config`);
|
|
29382
|
-
return null;
|
|
29383
|
-
}
|
|
29384
|
-
}
|
|
29385
|
-
function applyConfigPatch(base, patch) {
|
|
29386
|
-
const result = {
|
|
29387
|
-
...base,
|
|
29388
|
-
...patch
|
|
29389
|
-
};
|
|
29390
|
-
for (const key2 of NESTED_KEYS) {
|
|
29391
|
-
const b3 = base[key2];
|
|
29392
|
-
const p2 = patch[key2];
|
|
29393
|
-
if (p2 && b3 && typeof b3 === "object" && typeof p2 === "object") {
|
|
29394
|
-
result[key2] = {
|
|
29395
|
-
...b3,
|
|
29396
|
-
...p2
|
|
29397
|
-
};
|
|
29398
|
-
}
|
|
29399
|
-
}
|
|
29400
|
-
return result;
|
|
29401
|
-
}
|
|
29402
|
-
var DEFAULT_CONFIG, _presetOverlay = null, NESTED_KEYS;
|
|
29403
|
-
var init_config = __esm(() => {
|
|
29404
|
-
init_platform();
|
|
29405
|
-
init_ensure_soulforge_dir();
|
|
29406
|
-
init_errors();
|
|
29407
|
-
DEFAULT_CONFIG = {
|
|
29408
|
-
defaultModel: "none",
|
|
29409
|
-
routerRules: [],
|
|
29410
|
-
editor: {
|
|
29411
|
-
command: "nvim",
|
|
29412
|
-
args: []
|
|
29413
|
-
},
|
|
29414
|
-
theme: {
|
|
29415
|
-
name: "proxysoul-main",
|
|
29416
|
-
transparent: true
|
|
29417
|
-
},
|
|
29418
|
-
nvimConfig: "default",
|
|
29419
|
-
editorIntegration: {
|
|
29420
|
-
diagnostics: true,
|
|
29421
|
-
symbols: true,
|
|
29422
|
-
hover: true,
|
|
29423
|
-
references: true,
|
|
29424
|
-
definition: true,
|
|
29425
|
-
codeActions: true,
|
|
29426
|
-
editorContext: true,
|
|
29427
|
-
rename: true,
|
|
29428
|
-
lspStatus: true,
|
|
29429
|
-
format: true,
|
|
29430
|
-
syncEditorOnEdit: false
|
|
29431
|
-
},
|
|
29432
|
-
codeExecution: true,
|
|
29433
|
-
webSearch: true,
|
|
29434
|
-
compaction: {
|
|
29435
|
-
strategy: "v2",
|
|
29436
|
-
triggerThreshold: 0.7,
|
|
29437
|
-
resetThreshold: 0.4,
|
|
29438
|
-
keepRecent: 4,
|
|
29439
|
-
maxToolResults: 30,
|
|
29440
|
-
llmExtraction: true
|
|
29441
|
-
}
|
|
29442
|
-
};
|
|
29443
|
-
NESTED_KEYS = ["editor", "theme", "editorIntegration", "codeIntelligence", "thinking", "performance", "contextManagement", "agentFeatures", "compaction", "retry", "addons"];
|
|
29444
|
-
});
|
|
29445
|
-
|
|
29446
|
-
// src/core/intelligence/backends/lsp/server-registry.ts
|
|
29447
|
-
import { existsSync as existsSync8 } from "fs";
|
|
29448
|
-
import { join as join10 } from "path";
|
|
29449
|
-
function firstExisting(dir, cmd) {
|
|
29450
|
-
for (const sfx of BIN_SUFFIXES) {
|
|
29451
|
-
const p2 = join10(dir, cmd + sfx);
|
|
29452
|
-
if (existsSync8(p2))
|
|
29453
|
-
return p2;
|
|
29454
|
-
}
|
|
29455
|
-
return null;
|
|
29456
|
-
}
|
|
29457
|
-
function commandExistsInMason(cmd) {
|
|
29458
|
-
return firstExisting(MASON_BIN_DIR, cmd);
|
|
29459
|
-
}
|
|
29460
|
-
function findInSoulforge(cmd) {
|
|
29461
|
-
const npmBin = firstExisting(join10(SOULFORGE_BIN_DIR, "node_modules", ".bin"), cmd);
|
|
29462
|
-
if (npmBin)
|
|
29463
|
-
return npmBin;
|
|
29464
|
-
const directBin = firstExisting(join10(SOULFORGE_BIN_DIR, "bin"), cmd);
|
|
29465
|
-
if (directBin)
|
|
29466
|
-
return directBin;
|
|
29467
|
-
return null;
|
|
29468
|
-
}
|
|
29469
|
-
function resolveCommand(cmd) {
|
|
29470
|
-
const cached = probeCache.get(cmd);
|
|
29471
|
-
if (cached !== undefined)
|
|
29472
|
-
return cached;
|
|
29473
|
-
if (commandExists(cmd)) {
|
|
29474
|
-
probeCache.set(cmd, cmd);
|
|
29475
|
-
return cmd;
|
|
29476
|
-
}
|
|
29477
|
-
const sfPath = findInSoulforge(cmd);
|
|
29478
|
-
if (sfPath) {
|
|
29479
|
-
probeCache.set(cmd, sfPath);
|
|
29480
|
-
return sfPath;
|
|
29481
|
-
}
|
|
29482
|
-
const masonPath = commandExistsInMason(cmd);
|
|
29483
|
-
if (masonPath) {
|
|
29484
|
-
probeCache.set(cmd, masonPath);
|
|
29485
|
-
return masonPath;
|
|
29486
|
-
}
|
|
29487
|
-
probeCache.set(cmd, null);
|
|
29488
|
-
return null;
|
|
29489
|
-
}
|
|
29490
|
-
function isServerDisabled(cmd) {
|
|
29491
|
-
const cwd = process.cwd();
|
|
29492
|
-
const global2 = loadConfig();
|
|
29493
|
-
const project = loadProjectConfig(cwd);
|
|
29494
|
-
const disabled = project?.disabledLspServers ?? global2.disabledLspServers ?? [];
|
|
29495
|
-
return disabled.includes(cmd);
|
|
29496
|
-
}
|
|
29497
|
-
function findServersForLanguage(language) {
|
|
29498
|
-
const candidates = SERVER_CANDIDATES[language];
|
|
29499
|
-
if (!candidates)
|
|
29500
|
-
return [];
|
|
29501
|
-
const results = [];
|
|
29502
|
-
for (const candidate of candidates) {
|
|
29503
|
-
if (isServerDisabled(candidate.command))
|
|
29504
|
-
continue;
|
|
29505
|
-
const resolved = resolveCommand(candidate.command);
|
|
29506
|
-
if (resolved) {
|
|
29507
|
-
results.push({
|
|
29508
|
-
command: resolved,
|
|
29509
|
-
args: candidate.args,
|
|
29510
|
-
language
|
|
29511
|
-
});
|
|
29512
|
-
}
|
|
29613
|
+
exports.useRef = function(initialValue) {
|
|
29614
|
+
return resolveDispatcher().useRef(initialValue);
|
|
29615
|
+
};
|
|
29616
|
+
exports.useState = function(initialState) {
|
|
29617
|
+
return resolveDispatcher().useState(initialState);
|
|
29618
|
+
};
|
|
29619
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
29620
|
+
return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
29621
|
+
};
|
|
29622
|
+
exports.useTransition = function() {
|
|
29623
|
+
return resolveDispatcher().useTransition();
|
|
29624
|
+
};
|
|
29625
|
+
exports.version = "19.2.6";
|
|
29626
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
29627
|
+
})();
|
|
29628
|
+
});
|
|
29629
|
+
|
|
29630
|
+
// node_modules/react/index.js
|
|
29631
|
+
var require_react = __commonJS((exports, module2) => {
|
|
29632
|
+
var react_development = __toESM(require_react_development());
|
|
29633
|
+
if (false) {} else {
|
|
29634
|
+
module2.exports = react_development;
|
|
29513
29635
|
}
|
|
29514
|
-
|
|
29636
|
+
});
|
|
29637
|
+
|
|
29638
|
+
// node_modules/zustand/esm/react.mjs
|
|
29639
|
+
function useStore(api, selector = identity) {
|
|
29640
|
+
const slice = import_react.default.useSyncExternalStore(api.subscribe, import_react.default.useCallback(() => selector(api.getState()), [api, selector]), import_react.default.useCallback(() => selector(api.getInitialState()), [api, selector]));
|
|
29641
|
+
import_react.default.useDebugValue(slice);
|
|
29642
|
+
return slice;
|
|
29515
29643
|
}
|
|
29516
|
-
var
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29527
|
-
|
|
29528
|
-
|
|
29529
|
-
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
|
|
29539
|
-
|
|
29540
|
-
|
|
29541
|
-
|
|
29542
|
-
|
|
29543
|
-
|
|
29544
|
-
|
|
29545
|
-
|
|
29546
|
-
|
|
29547
|
-
|
|
29548
|
-
|
|
29549
|
-
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
}],
|
|
29554
|
-
go: [{
|
|
29555
|
-
command: "gopls",
|
|
29556
|
-
args: ["serve"]
|
|
29557
|
-
}],
|
|
29558
|
-
rust: [{
|
|
29559
|
-
command: "rust-analyzer",
|
|
29560
|
-
args: []
|
|
29561
|
-
}],
|
|
29562
|
-
lua: [{
|
|
29563
|
-
command: "lua-language-server",
|
|
29564
|
-
args: []
|
|
29565
|
-
}],
|
|
29566
|
-
c: [{
|
|
29567
|
-
command: "clangd",
|
|
29568
|
-
args: []
|
|
29569
|
-
}],
|
|
29570
|
-
cpp: [{
|
|
29571
|
-
command: "clangd",
|
|
29572
|
-
args: []
|
|
29573
|
-
}],
|
|
29574
|
-
ruby: [{
|
|
29575
|
-
command: "solargraph",
|
|
29576
|
-
args: ["stdio"]
|
|
29577
|
-
}],
|
|
29578
|
-
php: [{
|
|
29579
|
-
command: "intelephense",
|
|
29580
|
-
args: ["--stdio"]
|
|
29581
|
-
}],
|
|
29582
|
-
zig: [{
|
|
29583
|
-
command: "zls",
|
|
29584
|
-
args: []
|
|
29585
|
-
}],
|
|
29586
|
-
bash: [{
|
|
29587
|
-
command: "bash-language-server",
|
|
29588
|
-
args: ["start"]
|
|
29589
|
-
}],
|
|
29590
|
-
css: [{
|
|
29591
|
-
command: "vscode-css-language-server",
|
|
29592
|
-
args: ["--stdio"]
|
|
29593
|
-
}, {
|
|
29594
|
-
command: "biome",
|
|
29595
|
-
args: ["lsp-proxy"]
|
|
29596
|
-
}, {
|
|
29597
|
-
command: "tailwindcss-language-server",
|
|
29598
|
-
args: ["--stdio"]
|
|
29599
|
-
}],
|
|
29600
|
-
html: [{
|
|
29601
|
-
command: "vscode-html-language-server",
|
|
29602
|
-
args: ["--stdio"]
|
|
29603
|
-
}, {
|
|
29604
|
-
command: "emmet-language-server",
|
|
29605
|
-
args: ["--stdio"]
|
|
29606
|
-
}],
|
|
29607
|
-
json: [{
|
|
29608
|
-
command: "vscode-json-language-server",
|
|
29609
|
-
args: ["--stdio"]
|
|
29610
|
-
}, {
|
|
29611
|
-
command: "biome",
|
|
29612
|
-
args: ["lsp-proxy"]
|
|
29613
|
-
}],
|
|
29614
|
-
yaml: [{
|
|
29615
|
-
command: "yaml-language-server",
|
|
29616
|
-
args: ["--stdio"]
|
|
29617
|
-
}],
|
|
29618
|
-
toml: [{
|
|
29619
|
-
command: "taplo",
|
|
29620
|
-
args: ["lsp", "stdio"]
|
|
29621
|
-
}],
|
|
29622
|
-
dockerfile: [{
|
|
29623
|
-
command: "docker-langserver",
|
|
29624
|
-
args: ["--stdio"]
|
|
29625
|
-
}],
|
|
29626
|
-
java: [{
|
|
29627
|
-
command: "jdtls",
|
|
29628
|
-
args: []
|
|
29629
|
-
}],
|
|
29630
|
-
kotlin: [{
|
|
29631
|
-
command: "kotlin-language-server",
|
|
29632
|
-
args: []
|
|
29633
|
-
}],
|
|
29634
|
-
scala: [{
|
|
29635
|
-
command: "metals",
|
|
29636
|
-
args: []
|
|
29637
|
-
}],
|
|
29638
|
-
csharp: [{
|
|
29639
|
-
command: "csharp-ls",
|
|
29640
|
-
args: []
|
|
29641
|
-
}, {
|
|
29642
|
-
command: "OmniSharp",
|
|
29643
|
-
args: ["--languageserver"]
|
|
29644
|
-
}],
|
|
29645
|
-
swift: [{
|
|
29646
|
-
command: "sourcekit-lsp",
|
|
29647
|
-
args: []
|
|
29648
|
-
}],
|
|
29649
|
-
dart: [{
|
|
29650
|
-
command: "dart",
|
|
29651
|
-
args: ["language-server", "--protocol=lsp"]
|
|
29652
|
-
}],
|
|
29653
|
-
elixir: [{
|
|
29654
|
-
command: "elixir-ls",
|
|
29655
|
-
args: []
|
|
29656
|
-
}, {
|
|
29657
|
-
command: "expert",
|
|
29658
|
-
args: []
|
|
29659
|
-
}],
|
|
29660
|
-
ocaml: [{
|
|
29661
|
-
command: "ocamllsp",
|
|
29662
|
-
args: []
|
|
29663
|
-
}],
|
|
29664
|
-
vue: [{
|
|
29665
|
-
command: "vue-language-server",
|
|
29666
|
-
args: ["--stdio"]
|
|
29667
|
-
}]
|
|
29644
|
+
var import_react, identity = (arg) => arg, createImpl = (createState) => {
|
|
29645
|
+
const api = createStore(createState);
|
|
29646
|
+
const useBoundStore = (selector) => useStore(api, selector);
|
|
29647
|
+
Object.assign(useBoundStore, api);
|
|
29648
|
+
return useBoundStore;
|
|
29649
|
+
}, create2 = (createState) => createState ? createImpl(createState) : createImpl;
|
|
29650
|
+
var init_react = __esm(() => {
|
|
29651
|
+
init_vanilla();
|
|
29652
|
+
import_react = __toESM(require_react(), 1);
|
|
29653
|
+
});
|
|
29654
|
+
|
|
29655
|
+
// node_modules/zustand/esm/index.mjs
|
|
29656
|
+
var init_esm2 = __esm(() => {
|
|
29657
|
+
init_vanilla();
|
|
29658
|
+
init_react();
|
|
29659
|
+
});
|
|
29660
|
+
|
|
29661
|
+
// node_modules/zustand/esm/middleware.mjs
|
|
29662
|
+
var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
29663
|
+
const origSubscribe = api.subscribe;
|
|
29664
|
+
api.subscribe = (selector, optListener, options) => {
|
|
29665
|
+
let listener = selector;
|
|
29666
|
+
if (optListener) {
|
|
29667
|
+
const equalityFn = (options == null ? undefined : options.equalityFn) || Object.is;
|
|
29668
|
+
let currentSlice = selector(api.getState());
|
|
29669
|
+
listener = (state) => {
|
|
29670
|
+
const nextSlice = selector(state);
|
|
29671
|
+
if (!equalityFn(currentSlice, nextSlice)) {
|
|
29672
|
+
const previousSlice = currentSlice;
|
|
29673
|
+
optListener(currentSlice = nextSlice, previousSlice);
|
|
29674
|
+
}
|
|
29675
|
+
};
|
|
29676
|
+
if (options == null ? undefined : options.fireImmediately) {
|
|
29677
|
+
optListener(currentSlice, currentSlice);
|
|
29678
|
+
}
|
|
29679
|
+
}
|
|
29680
|
+
return origSubscribe(listener);
|
|
29668
29681
|
};
|
|
29669
|
-
|
|
29670
|
-
|
|
29671
|
-
|
|
29672
|
-
|
|
29682
|
+
const initialState = fn(set, get, api);
|
|
29683
|
+
return initialState;
|
|
29684
|
+
}, subscribeWithSelector;
|
|
29685
|
+
var init_middleware = __esm(() => {
|
|
29686
|
+
subscribeWithSelector = subscribeWithSelectorImpl;
|
|
29687
|
+
});
|
|
29688
|
+
|
|
29689
|
+
// src/stores/errors.ts
|
|
29690
|
+
function logBackgroundError(source, message) {
|
|
29691
|
+
useErrorStore.getState().push(source, message);
|
|
29692
|
+
}
|
|
29693
|
+
var MAX_ERRORS = 500, useErrorStore;
|
|
29694
|
+
var init_errors = __esm(() => {
|
|
29695
|
+
init_esm2();
|
|
29696
|
+
init_middleware();
|
|
29697
|
+
useErrorStore = create2()(subscribeWithSelector((set) => ({
|
|
29698
|
+
errors: [],
|
|
29699
|
+
push: (source, message) => set((s2) => {
|
|
29700
|
+
const entry = {
|
|
29701
|
+
id: crypto.randomUUID(),
|
|
29702
|
+
source,
|
|
29703
|
+
message,
|
|
29704
|
+
timestamp: Date.now()
|
|
29705
|
+
};
|
|
29706
|
+
const errors = s2.errors.length >= MAX_ERRORS ? [...s2.errors.slice(-(MAX_ERRORS - 1)), entry] : [...s2.errors, entry];
|
|
29707
|
+
return {
|
|
29708
|
+
errors
|
|
29709
|
+
};
|
|
29710
|
+
}),
|
|
29711
|
+
clear: () => set({
|
|
29712
|
+
errors: []
|
|
29713
|
+
})
|
|
29714
|
+
})));
|
|
29673
29715
|
});
|
|
29674
29716
|
|
|
29675
29717
|
// src/core/process-tracker.ts
|