reasonix 0.29.1 → 0.30.0
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/index.js +32 -17
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -588,7 +588,7 @@ var EN = {
|
|
|
588
588
|
helpNew: " /new start fresh: drop all context + clear scrollback",
|
|
589
589
|
helpClear: " /clear clear displayed scrollback only (context kept \u2014 model still sees it)",
|
|
590
590
|
helpLoop: " /loop <interval> <prompt> auto-resubmit <prompt> every <interval> (5s..6h). /loop stop \xB7 type anything to cancel.",
|
|
591
|
-
helpExit: " /exit quit",
|
|
591
|
+
helpExit: " /exit quit (aliases: /quit, /q)",
|
|
592
592
|
helpShellTitle: "Shell shortcut:",
|
|
593
593
|
helpShell: " !<cmd> run <cmd> in the sandbox root; output goes into",
|
|
594
594
|
helpShellDetail: " the conversation so the model sees it next turn.",
|
|
@@ -1275,7 +1275,7 @@ var zhCN = {
|
|
|
1275
1275
|
helpNew: " /new \u5168\u65B0\u5F00\u59CB\uFF1A\u4E22\u5F03\u6240\u6709\u4E0A\u4E0B\u6587 + \u6E05\u9664\u6EDA\u52A8\u56DE\u653E",
|
|
1276
1276
|
helpClear: " /clear \u4EC5\u6E05\u9664\u663E\u793A\u7684\u6EDA\u52A8\u56DE\u653E\uFF08\u4E0A\u4E0B\u6587\u4FDD\u7559 \u2014 \u6A21\u578B\u4ECD\u80FD\u770B\u5230\uFF09",
|
|
1277
1277
|
helpLoop: " /loop <interval> <prompt> \u6BCF <interval> \u81EA\u52A8\u91CD\u65B0\u63D0\u4EA4 <prompt>\uFF085\u79D2..6\u5C0F\u65F6\uFF09\u3002/loop stop \xB7 \u8F93\u5165\u4EFB\u4F55\u5185\u5BB9\u53D6\u6D88\u3002",
|
|
1278
|
-
helpExit: " /exit \u9000\u51FA",
|
|
1278
|
+
helpExit: " /exit \u9000\u51FA\uFF08\u522B\u540D\uFF1A/quit, /q\uFF09",
|
|
1279
1279
|
helpShellTitle: "Shell \u5FEB\u6377\u65B9\u5F0F\uFF1A",
|
|
1280
1280
|
helpShell: " !<cmd> \u5728\u6C99\u7BB1\u6839\u76EE\u5F55\u8FD0\u884C <cmd>\uFF1B\u8F93\u51FA\u8FDB\u5165\u5BF9\u8BDD",
|
|
1281
1281
|
helpShellDetail: " \u4EE5\u4FBF\u6A21\u578B\u5728\u4E0B\u4E00\u8F6E\u770B\u5230\u3002\u65E0\u5141\u8BB8\u5217\u8868\u9650\u5236\u3002",
|
|
@@ -10879,7 +10879,7 @@ function moveTo(out, cursor, targetX, targetY, viewportWidth) {
|
|
|
10879
10879
|
cursor.y = targetY;
|
|
10880
10880
|
}
|
|
10881
10881
|
if (cursor.x !== targetX) {
|
|
10882
|
-
out.push({ type: "
|
|
10882
|
+
out.push({ type: "cursorTo", col: targetX });
|
|
10883
10883
|
cursor.x = targetX;
|
|
10884
10884
|
}
|
|
10885
10885
|
}
|
|
@@ -16414,7 +16414,7 @@ async function handleSkills(method, rest, body, ctx) {
|
|
|
16414
16414
|
|
|
16415
16415
|
// src/cli/ui/slash/commands.ts
|
|
16416
16416
|
var SLASH_COMMANDS = [
|
|
16417
|
-
{ cmd: "help", summary: "show the full command reference" },
|
|
16417
|
+
{ cmd: "help", summary: "show the full command reference", aliases: ["?"] },
|
|
16418
16418
|
{ cmd: "status", summary: "current model, flags, context, session" },
|
|
16419
16419
|
{
|
|
16420
16420
|
cmd: "preset",
|
|
@@ -16463,7 +16463,8 @@ var SLASH_COMMANDS = [
|
|
|
16463
16463
|
cmd: "language",
|
|
16464
16464
|
argsHint: "<EN|zh-CN>",
|
|
16465
16465
|
summary: "switch the runtime language",
|
|
16466
|
-
argCompleter: ["EN", "zh-CN"]
|
|
16466
|
+
argCompleter: ["EN", "zh-CN"],
|
|
16467
|
+
aliases: ["lang"]
|
|
16467
16468
|
},
|
|
16468
16469
|
{ cmd: "mcp", summary: "list MCP servers + tools attached to this session" },
|
|
16469
16470
|
{
|
|
@@ -16555,13 +16556,17 @@ var SLASH_COMMANDS = [
|
|
|
16555
16556
|
summary: "show semantic_search status \u2014 built? Ollama installed? how to enable"
|
|
16556
16557
|
},
|
|
16557
16558
|
{ cmd: "clear", summary: "clear visible scrollback only (log/context kept)" },
|
|
16558
|
-
{
|
|
16559
|
+
{
|
|
16560
|
+
cmd: "new",
|
|
16561
|
+
summary: "start a fresh conversation (clear context + scrollback)",
|
|
16562
|
+
aliases: ["reset"]
|
|
16563
|
+
},
|
|
16559
16564
|
{
|
|
16560
16565
|
cmd: "loop",
|
|
16561
16566
|
argsHint: "<5s..6h> <prompt> \xB7 stop \xB7 (no args = status)",
|
|
16562
16567
|
summary: "auto-resubmit <prompt> every <interval> until you type something / Esc / /loop stop"
|
|
16563
16568
|
},
|
|
16564
|
-
{ cmd: "exit", summary: "quit the TUI" },
|
|
16569
|
+
{ cmd: "exit", summary: "quit the TUI", aliases: ["quit", "q"] },
|
|
16565
16570
|
// Code-mode only
|
|
16566
16571
|
{
|
|
16567
16572
|
cmd: "init",
|
|
@@ -16655,13 +16660,25 @@ function suggestSlashCommands(prefix, codeMode = false) {
|
|
|
16655
16660
|
const p = prefix.toLowerCase();
|
|
16656
16661
|
return SLASH_COMMANDS.filter((c) => {
|
|
16657
16662
|
if (c.contextual === "code" && !codeMode) return false;
|
|
16658
|
-
|
|
16663
|
+
if (c.cmd.startsWith(p)) return true;
|
|
16664
|
+
return c.aliases?.some((a) => a.startsWith(p)) ?? false;
|
|
16659
16665
|
});
|
|
16660
16666
|
}
|
|
16667
|
+
var ALIAS_TO_CMD = (() => {
|
|
16668
|
+
const m = {};
|
|
16669
|
+
for (const spec of SLASH_COMMANDS) {
|
|
16670
|
+
if (!spec.aliases) continue;
|
|
16671
|
+
for (const a of spec.aliases) m[a] = spec.cmd;
|
|
16672
|
+
}
|
|
16673
|
+
return m;
|
|
16674
|
+
})();
|
|
16675
|
+
function resolveSlashAlias(name) {
|
|
16676
|
+
return ALIAS_TO_CMD[name] ?? name;
|
|
16677
|
+
}
|
|
16661
16678
|
function detectSlashArgContext(input, codeMode = false) {
|
|
16662
16679
|
const m = /^\/(\S+) ([\s\S]*)$/.exec(input);
|
|
16663
16680
|
if (!m) return null;
|
|
16664
|
-
const cmdName = m[1].toLowerCase();
|
|
16681
|
+
const cmdName = resolveSlashAlias(m[1].toLowerCase());
|
|
16665
16682
|
const tail = m[2] ?? "";
|
|
16666
16683
|
const spec = SLASH_COMMANDS.find(
|
|
16667
16684
|
(s) => s.cmd === cmdName && (s.contextual !== "code" || codeMode)
|
|
@@ -16695,7 +16712,8 @@ async function handleSlash(method, _rest, _body, ctx) {
|
|
|
16695
16712
|
cmd: c.cmd,
|
|
16696
16713
|
summary: c.summary,
|
|
16697
16714
|
argsHint: c.argsHint,
|
|
16698
|
-
contextual: c.contextual
|
|
16715
|
+
contextual: c.contextual,
|
|
16716
|
+
aliases: c.aliases
|
|
16699
16717
|
}));
|
|
16700
16718
|
return { status: 200, body: { commands, codeMode } };
|
|
16701
16719
|
}
|
|
@@ -22919,7 +22937,8 @@ function SuggestionRow({ spec, isSelected }) {
|
|
|
22919
22937
|
const key = `slash.${spec.cmd}.description`;
|
|
22920
22938
|
const translated = t(key);
|
|
22921
22939
|
const summary = translated === key ? spec.summary : translated;
|
|
22922
|
-
|
|
22940
|
+
const aliasHint = spec.aliases?.length ? ` \xB7 /${spec.aliases.join(" /")}` : "";
|
|
22941
|
+
return /* @__PURE__ */ React31.createElement(Box2, null, /* @__PURE__ */ React31.createElement(Text2, { color: isSelected ? COLOR.primary : COLOR.info, bold: isSelected }, isSelected ? `${GLYPH.cur} ` : " "), /* @__PURE__ */ React31.createElement(Text2, { color: COLOR.accent, bold: isSelected }, name.padEnd(14)), /* @__PURE__ */ React31.createElement(Text2, { dimColor: true }, argsSuffix.padEnd(14)), /* @__PURE__ */ React31.createElement(Text2, null, " "), /* @__PURE__ */ React31.createElement(Text2, { color: isSelected ? COLOR.user : COLOR.info, dimColor: !isSelected }, summary), aliasHint ? /* @__PURE__ */ React31.createElement(Text2, { dimColor: true }, aliasHint) : null);
|
|
22923
22942
|
}
|
|
22924
22943
|
|
|
22925
22944
|
// src/cli/ui/WelcomeBanner.tsx
|
|
@@ -26901,13 +26920,10 @@ var loop = (args, _loop, ctx) => {
|
|
|
26901
26920
|
};
|
|
26902
26921
|
var handlers2 = {
|
|
26903
26922
|
exit,
|
|
26904
|
-
quit: exit,
|
|
26905
26923
|
clear,
|
|
26906
26924
|
new: resetLog,
|
|
26907
|
-
reset: resetLog,
|
|
26908
26925
|
keys,
|
|
26909
26926
|
help,
|
|
26910
|
-
"?": help,
|
|
26911
26927
|
retry,
|
|
26912
26928
|
loop
|
|
26913
26929
|
};
|
|
@@ -27495,8 +27511,7 @@ var handlers7 = {
|
|
|
27495
27511
|
notifyLanguageChange();
|
|
27496
27512
|
ctx.dispatch?.({ type: "language.change", lang });
|
|
27497
27513
|
return { info: t("slash.language.success") };
|
|
27498
|
-
}
|
|
27499
|
-
lang: (args, loop2, ctx) => handlers7.language(args, loop2, ctx)
|
|
27514
|
+
}
|
|
27500
27515
|
};
|
|
27501
27516
|
|
|
27502
27517
|
// src/cli/ui/slash/handlers/mcp.ts
|
|
@@ -28755,7 +28770,7 @@ var HANDLERS = {
|
|
|
28755
28770
|
...handlers16
|
|
28756
28771
|
};
|
|
28757
28772
|
function handleSlash2(cmd, args, loop2, ctx = {}) {
|
|
28758
|
-
const h = HANDLERS[cmd];
|
|
28773
|
+
const h = HANDLERS[resolveSlashAlias(cmd)];
|
|
28759
28774
|
if (h) return h(args, loop2, ctx);
|
|
28760
28775
|
return { unknown: true, info: `unknown command: /${cmd} (try /help)` };
|
|
28761
28776
|
}
|