@botconnector/bccli 0.4.0-beta.16 → 0.4.0-beta.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/cli.js
CHANGED
|
@@ -1232,7 +1232,7 @@ var McpManager = class {
|
|
|
1232
1232
|
this.opts.onChange?.();
|
|
1233
1233
|
}
|
|
1234
1234
|
tools() {
|
|
1235
|
-
return [...this.servers.values()].flatMap((s) => s.tools);
|
|
1235
|
+
return [...this.servers.values()].flatMap((s) => s.tools).sort((a, b) => a.name.localeCompare(b.name));
|
|
1236
1236
|
}
|
|
1237
1237
|
states() {
|
|
1238
1238
|
return [...this.servers.values()].map((s) => s.state);
|
|
@@ -1604,7 +1604,7 @@ function createRuntime(opts) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
1606
|
// src/version.ts
|
|
1607
|
-
var VERSION = true ? "0.4.0-beta.
|
|
1607
|
+
var VERSION = true ? "0.4.0-beta.18" : "0.0.0-dev";
|
|
1608
1608
|
|
|
1609
1609
|
// src/cli.ts
|
|
1610
1610
|
function chooseLanguage(argv) {
|
|
@@ -1675,7 +1675,7 @@ async function main() {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
if (!process.stdin.isTTY) throw new ConfigError(t('Interactive mode needs a terminal. For scripts/CI use: bccli -p "task"'));
|
|
1678
|
-
const { startInteractive } = await import("./ui-
|
|
1678
|
+
const { startInteractive } = await import("./ui-RNP272MP.js");
|
|
1679
1679
|
return startInteractive(rt, { initialPrompt: args.prompt, resume: args.resume, version: VERSION });
|
|
1680
1680
|
}
|
|
1681
1681
|
main().then(
|
|
@@ -551,6 +551,7 @@ var QUOTE = /^\s{0,3}((?:>\s?)+)(.*)$/;
|
|
|
551
551
|
var BULLET = /^(\s*)[-*+]\s+(.*)$/;
|
|
552
552
|
var NUMBERED = /^(\s*)(\d{1,9})[.)]\s+(.*)$/;
|
|
553
553
|
var BULLETS = ["\u2022", "\u25E6", "\u25AA"];
|
|
554
|
+
var bulletFor = (spaces) => BULLETS[spaces === 0 ? 0 : spaces <= 4 ? 1 : 2];
|
|
554
555
|
function hanging(key, marker, body, width, padding = 0) {
|
|
555
556
|
const textWidth = Math.max(10, width - padding - displayWidth(marker) - 1);
|
|
556
557
|
return /* @__PURE__ */ jsxs(Box, { paddingLeft: padding, children: [
|
|
@@ -564,12 +565,6 @@ function Markdown({ text, indent = 2 }) {
|
|
|
564
565
|
const lines = text.split("\n");
|
|
565
566
|
const rows = [];
|
|
566
567
|
let inCode = false;
|
|
567
|
-
let indents = [];
|
|
568
|
-
const depth = (spaces) => {
|
|
569
|
-
while (indents.length && spaces < indents.at(-1)) indents.pop();
|
|
570
|
-
if (!indents.length || spaces > indents.at(-1)) indents.push(spaces);
|
|
571
|
-
return indents.length - 1;
|
|
572
|
-
};
|
|
573
568
|
for (let i = 0; i < lines.length; i++) {
|
|
574
569
|
const line = lines[i];
|
|
575
570
|
if (line.trimStart().startsWith("```")) {
|
|
@@ -606,28 +601,25 @@ function Markdown({ text, indent = 2 }) {
|
|
|
606
601
|
}
|
|
607
602
|
const quote = QUOTE.exec(line);
|
|
608
603
|
if (quote) {
|
|
609
|
-
const
|
|
610
|
-
rows.push(hanging(i, "\u258E".repeat(
|
|
604
|
+
const depth = quote[1].replace(/\s/g, "").length;
|
|
605
|
+
rows.push(hanging(i, "\u258E".repeat(depth), /* @__PURE__ */ jsx(Text, { italic: true, children: inline(quote[2]) }), width));
|
|
611
606
|
continue;
|
|
612
607
|
}
|
|
613
608
|
const bullet = BULLET.exec(line);
|
|
614
609
|
if (bullet) {
|
|
615
610
|
const padding = Math.min(bullet[1].replace(/\t/g, " ").length, 16);
|
|
616
|
-
const level = depth(padding);
|
|
617
611
|
const task = /^\[([ xX])\]\s+(.*)$/.exec(bullet[2]);
|
|
618
612
|
rows.push(
|
|
619
|
-
task ? hanging(i, task[1] === " " ? "\u2610" : "\u2611", inline(task[2]), width, padding) : hanging(i,
|
|
613
|
+
task ? hanging(i, task[1] === " " ? "\u2610" : "\u2611", inline(task[2]), width, padding) : hanging(i, bulletFor(padding), inline(bullet[2]), width, padding)
|
|
620
614
|
);
|
|
621
615
|
continue;
|
|
622
616
|
}
|
|
623
617
|
const numbered = NUMBERED.exec(line);
|
|
624
618
|
if (numbered) {
|
|
625
619
|
const padding = Math.min(numbered[1].replace(/\t/g, " ").length, 16);
|
|
626
|
-
depth(padding);
|
|
627
620
|
rows.push(hanging(i, `${numbered[2]}.`, inline(numbered[3]), width, padding));
|
|
628
621
|
continue;
|
|
629
622
|
}
|
|
630
|
-
if (line.trim()) indents = [];
|
|
631
623
|
rows.push(/* @__PURE__ */ jsx(Text, { children: line ? inline(line) : " " }, i));
|
|
632
624
|
}
|
|
633
625
|
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: rows });
|