gearbox-code 0.1.37 → 0.1.38
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/cli.mjs +18 -4
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -146390,7 +146390,10 @@ function App2({ selector: initialSelector, runner, fullscreen = false, resumeId
|
|
|
146390
146390
|
setTimeout(pumpPerm, 0);
|
|
146391
146391
|
};
|
|
146392
146392
|
import_react26.useEffect(() => {
|
|
146393
|
-
|
|
146393
|
+
let acctId = loadPrefs().activeAccount;
|
|
146394
|
+
if (!acctId && buildPanelModelRows().length === 0) {
|
|
146395
|
+
acctId = listAccounts().find((a2) => a2.enabled && a2.exec === "cli")?.id;
|
|
146396
|
+
}
|
|
146394
146397
|
if (!acctId)
|
|
146395
146398
|
return;
|
|
146396
146399
|
const a = getAccount(acctId);
|
|
@@ -146400,6 +146403,7 @@ function App2({ selector: initialSelector, runner, fullscreen = false, resumeId
|
|
|
146400
146403
|
if (activeCliModelRef.current && !cliSupportsModel(bin, activeCliModelRef.current))
|
|
146401
146404
|
setActiveCliModelId(undefined);
|
|
146402
146405
|
setActiveCli({ id: a.id, label: bin });
|
|
146406
|
+
updatePrefs({ activeAccount: a.id });
|
|
146403
146407
|
}
|
|
146404
146408
|
}, []);
|
|
146405
146409
|
const discoveryRanRef = import_react26.useRef(false);
|
|
@@ -146671,8 +146675,18 @@ function App2({ selector: initialSelector, runner, fullscreen = false, resumeId
|
|
|
146671
146675
|
}
|
|
146672
146676
|
}
|
|
146673
146677
|
}
|
|
146674
|
-
if (delta)
|
|
146675
|
-
|
|
146678
|
+
if (delta) {
|
|
146679
|
+
const p = panelRef.current;
|
|
146680
|
+
if (p) {
|
|
146681
|
+
if (p.kind === "static")
|
|
146682
|
+
setPanel({ ...p, scroll: clampScroll(p.scroll + delta, panelMaxScrollRef.current) });
|
|
146683
|
+
else if (p.kind === "accounts")
|
|
146684
|
+
setPanel({ ...p, index: clampIndex(p.index + delta, panelAccountNumbersRef.current.length) });
|
|
146685
|
+
else
|
|
146686
|
+
setPanel({ ...p, index: clampIndex(p.index + delta, filterModelRows(buildPanelModelRows(), p.filter).length) });
|
|
146687
|
+
} else
|
|
146688
|
+
scrollBy(delta);
|
|
146689
|
+
}
|
|
146676
146690
|
};
|
|
146677
146691
|
stdin.on("data", onData);
|
|
146678
146692
|
return () => {
|
|
@@ -147755,7 +147769,7 @@ ${fetched.join(`
|
|
|
147755
147769
|
return;
|
|
147756
147770
|
}
|
|
147757
147771
|
case "model":
|
|
147758
|
-
if ((!arg || arg.toLowerCase() === "all") && !activeCliRef.current && fullscreen) {
|
|
147772
|
+
if ((!arg || arg.toLowerCase() === "all") && !activeCliRef.current && fullscreen && buildPanelModelRows().length > 0) {
|
|
147759
147773
|
setPanel({ kind: "models", title: "models · ⏎ to pin", index: 0, filter: "" });
|
|
147760
147774
|
return;
|
|
147761
147775
|
}
|
package/package.json
CHANGED