gearbox-code 0.1.26 → 0.1.28
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 +39 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -146004,9 +146004,29 @@ function App2({ selector: initialSelector, runner, fullscreen = false, resumeId
|
|
|
146004
146004
|
const activeAccount = getAccount(cli.id);
|
|
146005
146005
|
const activeName = activeAccount ? accountName(activeAccount).match(/\((.*)\)/)?.[1] : undefined;
|
|
146006
146006
|
const reloginCommand = cli.binary.includes("codex") ? `/account add codex${activeName ? ` ${activeName}` : ""}` : `/account add claude${activeName ? ` ${activeName}` : ""}`;
|
|
146007
|
+
let cliPrompt = prompt;
|
|
146008
|
+
if (!cliSessionRef.current) {
|
|
146009
|
+
try {
|
|
146010
|
+
const cwd2 = process.cwd();
|
|
146011
|
+
const allFiles = listProjectFiles(cwd2).slice(0, 300);
|
|
146012
|
+
const map4 = repoMap(cwd2, 3000);
|
|
146013
|
+
const fileList = allFiles.join(`
|
|
146014
|
+
`);
|
|
146015
|
+
cliPrompt = `<project-context cwd="${cwd2}">
|
|
146016
|
+
` + `<files>
|
|
146017
|
+
${fileList}
|
|
146018
|
+
</files>
|
|
146019
|
+
` + (map4 ? `<signatures>
|
|
146020
|
+
${map4}
|
|
146021
|
+
</signatures>
|
|
146022
|
+
` : "") + `</project-context>
|
|
146023
|
+
|
|
146024
|
+
` + prompt;
|
|
146025
|
+
} catch {}
|
|
146026
|
+
}
|
|
146007
146027
|
const r3 = await runCliTask({
|
|
146008
146028
|
binary: cli.binary,
|
|
146009
|
-
prompt,
|
|
146029
|
+
prompt: cliPrompt,
|
|
146010
146030
|
messages,
|
|
146011
146031
|
onEvent,
|
|
146012
146032
|
signal,
|
|
@@ -146701,6 +146721,23 @@ ${fetched.join(`
|
|
|
146701
146721
|
{
|
|
146702
146722
|
const cli = activeCliRef.current;
|
|
146703
146723
|
if (cli) {
|
|
146724
|
+
const looksVersioned = /\d/.test(arg);
|
|
146725
|
+
if (looksVersioned) {
|
|
146726
|
+
const r3 = resolveModelSwitch(arg);
|
|
146727
|
+
if (r3.ok && r3.modelId) {
|
|
146728
|
+
const left = leaveSubscription();
|
|
146729
|
+
setSelector(new FixedSelector(r3.modelId));
|
|
146730
|
+
setLastPick(null);
|
|
146731
|
+
routedRef.current = null;
|
|
146732
|
+
updatePrefs({ pinnedModel: r3.modelId });
|
|
146733
|
+
const newSpec2 = findModel(r3.modelId);
|
|
146734
|
+
const effortSuffix2 = applyEffortClamp(newSpec2 ? effortLevels(newSpec2) : []);
|
|
146735
|
+
notice(`${r3.message} — pinned (left subscription).${left}${effortSuffix2}`);
|
|
146736
|
+
const kind = classify(lastPromptRef.current ?? "").replace("code", "code");
|
|
146737
|
+
push({ kind: "preference", id: idRef.current++, text: `Remember ${r3.modelId} for ${kind} tasks?`, acceptCommand: `/prefer ${kind} ${r3.modelId}` });
|
|
146738
|
+
return;
|
|
146739
|
+
}
|
|
146740
|
+
}
|
|
146704
146741
|
const cr = resolveCliModel(cli.binary, arg);
|
|
146705
146742
|
if (!cr.ok) {
|
|
146706
146743
|
const r3 = resolveModelSwitch(arg);
|
|
@@ -147867,7 +147904,7 @@ init_permission();
|
|
|
147867
147904
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
147868
147905
|
process.env.LANG = process.env.LANG || "en_US.UTF-8";
|
|
147869
147906
|
process.env.LC_ALL = process.env.LC_ALL || "en_US.UTF-8";
|
|
147870
|
-
var VERSION16 = "0.1.
|
|
147907
|
+
var VERSION16 = "0.1.28";
|
|
147871
147908
|
var args = process.argv.slice(2);
|
|
147872
147909
|
var supportsAnsi = process.env.FORCE_COLOR === "1" || process.env.TERM !== "dumb" && process.env.NO_COLOR !== "1" && process.stdout.isTTY;
|
|
147873
147910
|
var ansi = (code) => supportsAnsi ? `\x1B[${code}m` : "";
|
package/package.json
CHANGED