@proxysoul/soulforge 2.20.17 → 2.20.18
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 +91 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72638,7 +72638,7 @@ var package_default;
|
|
|
72638
72638
|
var init_package = __esm(() => {
|
|
72639
72639
|
package_default = {
|
|
72640
72640
|
name: "@proxysoul/soulforge",
|
|
72641
|
-
version: "2.20.
|
|
72641
|
+
version: "2.20.18",
|
|
72642
72642
|
description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
|
|
72643
72643
|
repository: {
|
|
72644
72644
|
type: "git",
|
|
@@ -403971,6 +403971,67 @@ function flushEmergencySession() {
|
|
|
403971
403971
|
}
|
|
403972
403972
|
var _snapshot = null;
|
|
403973
403973
|
|
|
403974
|
+
// src/core/terminal/resize-handler.ts
|
|
403975
|
+
function setupTerminalResize(r) {
|
|
403976
|
+
r.addInputHandler((sequence) => {
|
|
403977
|
+
const m2 = sequence.match(/^\x1b\[48;(\d+);(\d+)(?:;\d+;\d+)?t$/);
|
|
403978
|
+
if (!m2?.[1] || !m2[2])
|
|
403979
|
+
return false;
|
|
403980
|
+
const rows = Number.parseInt(m2[1], 10);
|
|
403981
|
+
const cols = Number.parseInt(m2[2], 10);
|
|
403982
|
+
if (rows > 0 && cols > 0)
|
|
403983
|
+
r.resize(cols, rows);
|
|
403984
|
+
return true;
|
|
403985
|
+
});
|
|
403986
|
+
if (process.stdout.isTTY) {
|
|
403987
|
+
process.stdout.write("\x1B[?2048h");
|
|
403988
|
+
}
|
|
403989
|
+
const onResize = () => {
|
|
403990
|
+
const cols = process.stdout.columns;
|
|
403991
|
+
const rows = process.stdout.rows;
|
|
403992
|
+
if (!cols || !rows)
|
|
403993
|
+
return;
|
|
403994
|
+
if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
|
|
403995
|
+
r.resize(cols, rows);
|
|
403996
|
+
}
|
|
403997
|
+
};
|
|
403998
|
+
process.stdout.on("resize", onResize);
|
|
403999
|
+
const onSigwinch = () => {
|
|
404000
|
+
setTimeout(() => {
|
|
404001
|
+
const cols = process.stdout.columns;
|
|
404002
|
+
const rows = process.stdout.rows;
|
|
404003
|
+
if (!cols || !rows)
|
|
404004
|
+
return;
|
|
404005
|
+
if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
|
|
404006
|
+
r.resize(cols, rows);
|
|
404007
|
+
}
|
|
404008
|
+
}, 50);
|
|
404009
|
+
};
|
|
404010
|
+
process.on("SIGWINCH", onSigwinch);
|
|
404011
|
+
const resizePoll = setInterval(() => {
|
|
404012
|
+
try {
|
|
404013
|
+
const cols = process.stdout.columns;
|
|
404014
|
+
const rows = process.stdout.rows;
|
|
404015
|
+
if (!cols || !rows)
|
|
404016
|
+
return;
|
|
404017
|
+
if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
|
|
404018
|
+
r.resize(cols, rows);
|
|
404019
|
+
}
|
|
404020
|
+
} catch {}
|
|
404021
|
+
}, 1000);
|
|
404022
|
+
resizePoll.unref?.();
|
|
404023
|
+
return () => {
|
|
404024
|
+
process.stdout.removeListener("resize", onResize);
|
|
404025
|
+
process.removeListener("SIGWINCH", onSigwinch);
|
|
404026
|
+
clearInterval(resizePoll);
|
|
404027
|
+
if (process.stdout.isTTY) {
|
|
404028
|
+
try {
|
|
404029
|
+
process.stdout.write("\x1B[?2048l");
|
|
404030
|
+
} catch {}
|
|
404031
|
+
}
|
|
404032
|
+
};
|
|
404033
|
+
}
|
|
404034
|
+
|
|
403974
404035
|
// src/stores/statusbar.ts
|
|
403975
404036
|
import { execFile as execFile2 } from "child_process";
|
|
403976
404037
|
function matchCopilotPricing(model) {
|
|
@@ -405173,29 +405234,7 @@ async function start2(opts) {
|
|
|
405173
405234
|
r.setMaxListeners(30);
|
|
405174
405235
|
r.keyInput.setMaxListeners(30);
|
|
405175
405236
|
if (process.stdout.isTTY) {
|
|
405176
|
-
r
|
|
405177
|
-
const m2 = sequence.match(/^\x1b\[48;(\d+);(\d+)(?:;\d+;\d+)?t$/);
|
|
405178
|
-
if (!m2?.[1] || !m2[2])
|
|
405179
|
-
return false;
|
|
405180
|
-
const rows = Number.parseInt(m2[1], 10);
|
|
405181
|
-
const cols = Number.parseInt(m2[2], 10);
|
|
405182
|
-
if (rows > 0 && cols > 0)
|
|
405183
|
-
r.resize(cols, rows);
|
|
405184
|
-
return true;
|
|
405185
|
-
});
|
|
405186
|
-
process.stdout.write("\x1B[?2048h");
|
|
405187
|
-
const resizePoll = setInterval(() => {
|
|
405188
|
-
try {
|
|
405189
|
-
const cols = process.stdout.columns;
|
|
405190
|
-
const rows = process.stdout.rows;
|
|
405191
|
-
if (!cols || !rows)
|
|
405192
|
-
return;
|
|
405193
|
-
if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
|
|
405194
|
-
r.resize(cols, rows);
|
|
405195
|
-
}
|
|
405196
|
-
} catch {}
|
|
405197
|
-
}, 1000);
|
|
405198
|
-
resizePoll.unref?.();
|
|
405237
|
+
setupTerminalResize(r);
|
|
405199
405238
|
}
|
|
405200
405239
|
{
|
|
405201
405240
|
const { extend: extend3 } = await init_react2().then(() => exports_react);
|
|
@@ -498170,15 +498209,22 @@ function fuzzyMatch3(query2, target) {
|
|
|
498170
498209
|
function ProviderRow({
|
|
498171
498210
|
p: p4,
|
|
498172
498211
|
isSelected,
|
|
498173
|
-
autoAvailable
|
|
498212
|
+
autoAvailable,
|
|
498213
|
+
width
|
|
498174
498214
|
}) {
|
|
498175
498215
|
const t2 = useTheme();
|
|
498176
498216
|
const bg = isSelected ? t2.bgPopupHighlight : t2.bgPopup;
|
|
498177
498217
|
const configured = hasKey(p4.id);
|
|
498178
498218
|
const tag = getStatusTag(p4.id);
|
|
498219
|
+
const tagText = configured ? ` \u2713 ${tag}` : autoAvailable ? " \u2713 auto" : "";
|
|
498220
|
+
const fixed = 6 + p4.label.length + 3 + tagText.length;
|
|
498221
|
+
const descBudget = width - 4 - fixed;
|
|
498222
|
+
const showDesc = descBudget > 1;
|
|
498223
|
+
const desc = showDesc && descBudget < p4.desc.length ? `${p4.desc.slice(0, Math.max(0, descBudget - 1))}\u2026` : p4.desc;
|
|
498179
498224
|
return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
|
|
498180
498225
|
flexDirection: "row",
|
|
498181
498226
|
paddingX: 2,
|
|
498227
|
+
height: 1,
|
|
498182
498228
|
backgroundColor: bg,
|
|
498183
498229
|
children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
|
|
498184
498230
|
bg,
|
|
@@ -498196,13 +498242,13 @@ function ProviderRow({
|
|
|
498196
498242
|
attributes: BOLD15,
|
|
498197
498243
|
children: p4.label
|
|
498198
498244
|
}, undefined, false, undefined, this),
|
|
498199
|
-
/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
|
|
498245
|
+
showDesc ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
|
|
498200
498246
|
fg: t2.textFaint,
|
|
498201
498247
|
children: [
|
|
498202
498248
|
" \u2014 ",
|
|
498203
|
-
|
|
498249
|
+
desc
|
|
498204
498250
|
]
|
|
498205
|
-
}, undefined, true, undefined, this),
|
|
498251
|
+
}, undefined, true, undefined, this) : null,
|
|
498206
498252
|
configured ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
|
|
498207
498253
|
fg: t2.success,
|
|
498208
498254
|
children: [
|
|
@@ -498258,6 +498304,7 @@ function SetupStep({
|
|
|
498258
498304
|
{
|
|
498259
498305
|
const t2 = useTheme();
|
|
498260
498306
|
const renderer2 = useRenderer();
|
|
498307
|
+
const { height: termRows } = useTerminalDimensions();
|
|
498261
498308
|
const [phase, setPhase] = import_react114.useState("provider");
|
|
498262
498309
|
const [cursor3, setCursor] = import_react114.useState(0);
|
|
498263
498310
|
const [selectedProvider, setSelectedProvider] = import_react114.useState(null);
|
|
@@ -498272,6 +498319,8 @@ function SetupStep({
|
|
|
498272
498319
|
const [autoAvailMap, setAutoAvailMap] = import_react114.useState({});
|
|
498273
498320
|
const spinnerRef = import_react114.useRef(null);
|
|
498274
498321
|
const inputWidth = Math.min(Math.floor(iw * 0.8), 60);
|
|
498322
|
+
const maxH = Math.max(24, Math.floor(termRows * 0.7));
|
|
498323
|
+
const maxVisibleProviders = Math.max(4, maxH - PROVIDER_CHROME_ROWS);
|
|
498275
498324
|
const refresh = () => setTick((n2) => n2 + 1);
|
|
498276
498325
|
const anyKeySet = PROVIDERS.some((p4) => hasKey(p4.id)) || Object.values(autoAvailMap).some(Boolean);
|
|
498277
498326
|
import_react114.useEffect(() => {
|
|
@@ -498674,11 +498723,19 @@ function SetupStep({
|
|
|
498674
498723
|
children: " Select a provider and press \u23CE to set up."
|
|
498675
498724
|
}, undefined, false, undefined, this),
|
|
498676
498725
|
/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VSpacer, {}, undefined, false, undefined, this),
|
|
498677
|
-
|
|
498678
|
-
|
|
498679
|
-
|
|
498680
|
-
|
|
498681
|
-
|
|
498726
|
+
/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VirtualList, {
|
|
498727
|
+
items: PROVIDERS,
|
|
498728
|
+
selectedIndex: cursor3,
|
|
498729
|
+
width: iw,
|
|
498730
|
+
maxRows: maxVisibleProviders,
|
|
498731
|
+
keyExtractor: (p4) => p4.id,
|
|
498732
|
+
renderItem: (p4, { selected }) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(ProviderRow, {
|
|
498733
|
+
p: p4,
|
|
498734
|
+
isSelected: selected,
|
|
498735
|
+
autoAvailable: p4.autoDetect ? autoAvailMap[p4.id] : undefined,
|
|
498736
|
+
width: iw
|
|
498737
|
+
}, undefined, false, undefined, this)
|
|
498738
|
+
}, undefined, false, undefined, this),
|
|
498682
498739
|
PROVIDERS[cursor3]?.providerId === "copilot" ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(import_jsx_dev_runtime2.Fragment, {
|
|
498683
498740
|
children: [
|
|
498684
498741
|
/* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VSpacer, {}, undefined, false, undefined, this),
|
|
@@ -498760,7 +498817,7 @@ function SetupStep({
|
|
|
498760
498817
|
}, undefined, true, undefined, this);
|
|
498761
498818
|
}
|
|
498762
498819
|
}
|
|
498763
|
-
var import_react114, GATEWAY_REF = "https://llmgateway.io/dashboard?ref=6tjJR2H3X4E9RmVQiQwK", URL_OVERRIDES, PROVIDERS, SPINNER_FRAMES2;
|
|
498820
|
+
var import_react114, GATEWAY_REF = "https://llmgateway.io/dashboard?ref=6tjJR2H3X4E9RmVQiQwK", URL_OVERRIDES, PROVIDERS, SPINNER_FRAMES2, PROVIDER_CHROME_ROWS = 13;
|
|
498764
498821
|
var init_SetupStep = __esm(async () => {
|
|
498765
498822
|
init_models();
|
|
498766
498823
|
init_providers();
|