@botconnector/bccli 0.4.4 → 0.4.5

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.
Files changed (46) hide show
  1. package/dist/{acp-SWBX4TT6.js → acp-M22V2CHD.js} +2 -2
  2. package/dist/{args-UCLW7NID.js → args-TFKRCKTY.js} +4 -4
  3. package/dist/{chunk-HQW4BROS.js → chunk-27REMLDV.js} +1 -1
  4. package/dist/{chunk-TGGKACSE.js → chunk-3JQZ2IKV.js} +3 -3
  5. package/dist/{chunk-3I5BW3ZT.js → chunk-6EGQI6HJ.js} +1 -1
  6. package/dist/{chunk-RX4UQX43.js → chunk-AK6TWKET.js} +1 -1
  7. package/dist/{chunk-MSDK4IIJ.js → chunk-BR63GX6T.js} +4 -4
  8. package/dist/{chunk-5BVC3Y6B.js → chunk-D2C6EOOS.js} +7 -7
  9. package/dist/{chunk-YCHCHOMK.js → chunk-D7GAZKXT.js} +3 -3
  10. package/dist/{chunk-CGBSE55G.js → chunk-DZPBWYTD.js} +1 -1
  11. package/dist/{chunk-3WHI4LN3.js → chunk-EOOWV6C6.js} +2 -0
  12. package/dist/{chunk-FI7RUJRX.js → chunk-FW6W5MN7.js} +11 -11
  13. package/dist/{chunk-OZ5GHMTN.js → chunk-JVQZWTPV.js} +4 -4
  14. package/dist/{chunk-RZF6A43N.js → chunk-LHLNK7HP.js} +4 -4
  15. package/dist/{chunk-HBQ6OLQT.js → chunk-NSARPM5C.js} +1 -1
  16. package/dist/{chunk-JXM6REER.js → chunk-O5ATYRUP.js} +1 -1
  17. package/dist/{chunk-6M55UPES.js → chunk-WTCWBY2D.js} +2 -2
  18. package/dist/{chunk-NQOGVP3I.js → chunk-XQVEAF3F.js} +2 -2
  19. package/dist/{chunk-QQJ2VVIW.js → chunk-XSUFHD67.js} +1 -1
  20. package/dist/{chunk-SMTBYDNO.js → chunk-YNI4GHBI.js} +1 -1
  21. package/dist/cli.js +38 -38
  22. package/dist/{completion-D2BSBTQO.js → completion-JCBMQKNQ.js} +1 -1
  23. package/dist/{config-LAINORU5.js → config-2MR6V7U7.js} +2 -2
  24. package/dist/{config-ENDRMOTP.js → config-JCI7NAVY.js} +3 -3
  25. package/dist/{ghBotCli-ZVWU7EMG.js → ghBotCli-T7AWXAZ2.js} +14 -14
  26. package/dist/{integrationCli-HXCSEWH2.js → integrationCli-KOCF73GG.js} +2 -2
  27. package/dist/{login-QPUWIC76.js → login-OIYX4D3X.js} +4 -4
  28. package/dist/{mcpCli-SETTCL3K.js → mcpCli-IBC3WCHG.js} +6 -6
  29. package/dist/{modelsCli-SZK4E2BY.js → modelsCli-XZLHNWKL.js} +6 -6
  30. package/dist/{oauthLogin-XWY7OHCG.js → oauthLogin-TUXZLIQN.js} +1 -1
  31. package/dist/{pluginsCli-ZQNKWZHJ.js → pluginsCli-X7NZRU7X.js} +2 -2
  32. package/dist/{prCli-6PUWTMTP.js → prCli-GPDLWYWC.js} +1 -1
  33. package/dist/providerCli-WCFA36S4.js +15 -0
  34. package/dist/sdk.js +4 -2
  35. package/dist/{serve-K5AH4MGO.js → serve-A764QS5U.js} +3 -3
  36. package/dist/{serve-L3SAIAAI.js → serve-TJCT3TLE.js} +15 -15
  37. package/dist/session-ML2DPI7P.js +12 -0
  38. package/dist/setup-QYCA7ATT.js +24 -0
  39. package/dist/{statsCli-XR6BEZQQ.js → statsCli-FKGON32O.js} +1 -1
  40. package/dist/{transferCli-HKGAWZ3Q.js → transferCli-HA5IKJKF.js} +4 -4
  41. package/dist/{ui-NPA52YJH.js → ui-SMY7QSFF.js} +56 -33
  42. package/dist/{update-AFIM34US.js → update-BUFIPEKY.js} +2 -2
  43. package/package.json +1 -1
  44. package/dist/providerCli-PKI7B2SC.js +0 -15
  45. package/dist/session-ASXO6GXR.js +0 -12
  46. package/dist/setup-F7FZ66OS.js +0 -24
@@ -5,10 +5,10 @@ import {
5
5
  loadConfig,
6
6
  readCredentials,
7
7
  resolveModel
8
- } from "./chunk-RX4UQX43.js";
8
+ } from "./chunk-AK6TWKET.js";
9
9
  import {
10
10
  t
11
- } from "./chunk-3WHI4LN3.js";
11
+ } from "./chunk-EOOWV6C6.js";
12
12
 
13
13
  // src/integrationCli.ts
14
14
  import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -4,10 +4,10 @@ import {
4
4
  readLine,
5
5
  readSecret,
6
6
  runLogin
7
- } from "./chunk-5BVC3Y6B.js";
8
- import "./chunk-3I5BW3ZT.js";
9
- import "./chunk-RX4UQX43.js";
10
- import "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-D2C6EOOS.js";
8
+ import "./chunk-6EGQI6HJ.js";
9
+ import "./chunk-AK6TWKET.js";
10
+ import "./chunk-EOOWV6C6.js";
11
11
  export {
12
12
  defaultLoginDeps,
13
13
  readLine,
@@ -2,30 +2,30 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-NQOGVP3I.js";
5
+ } from "./chunk-XQVEAF3F.js";
6
6
  import {
7
7
  authorizeMcpServer,
8
8
  clearTokens
9
- } from "./chunk-3I5BW3ZT.js";
9
+ } from "./chunk-6EGQI6HJ.js";
10
10
  import {
11
11
  addGlobalServer,
12
12
  globalMcpPath,
13
13
  readMcpFile,
14
14
  removeGlobalServer
15
- } from "./chunk-6M55UPES.js";
15
+ } from "./chunk-WTCWBY2D.js";
16
16
  import {
17
17
  bccliHome
18
- } from "./chunk-RX4UQX43.js";
18
+ } from "./chunk-AK6TWKET.js";
19
19
  import {
20
20
  t
21
- } from "./chunk-3WHI4LN3.js";
21
+ } from "./chunk-EOOWV6C6.js";
22
22
 
23
23
  // src/mcpCli.ts
24
24
  async function runMcpCommand(args, deps) {
25
25
  const home = bccliHome(deps.env);
26
26
  const [action = "list", name] = args.subArgs;
27
27
  if (action === "serve") {
28
- const { runMcpServe } = await import("./serve-K5AH4MGO.js");
28
+ const { runMcpServe } = await import("./serve-A764QS5U.js");
29
29
  return runMcpServe(args, deps);
30
30
  }
31
31
  const installed = readMcpFile(globalMcpPath(home));
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  listAllModels
4
- } from "./chunk-OZ5GHMTN.js";
5
- import "./chunk-HQW4BROS.js";
6
- import "./chunk-MSDK4IIJ.js";
7
- import "./chunk-QQJ2VVIW.js";
4
+ } from "./chunk-JVQZWTPV.js";
5
+ import "./chunk-27REMLDV.js";
6
+ import "./chunk-BR63GX6T.js";
7
+ import "./chunk-XSUFHD67.js";
8
8
  import {
9
9
  loadConfig,
10
10
  resolveModel
11
- } from "./chunk-RX4UQX43.js";
11
+ } from "./chunk-AK6TWKET.js";
12
12
  import {
13
13
  t
14
- } from "./chunk-3WHI4LN3.js";
14
+ } from "./chunk-EOOWV6C6.js";
15
15
 
16
16
  // src/modelsCli.ts
17
17
  async function runModelsCommand(args, deps) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-3WHI4LN3.js";
4
+ } from "./chunk-EOOWV6C6.js";
5
5
 
6
6
  // src/oauthLogin.ts
7
7
  import { createHash, randomBytes } from "crypto";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  bccliHome,
4
4
  globalConfigPath
5
- } from "./chunk-RX4UQX43.js";
5
+ } from "./chunk-AK6TWKET.js";
6
6
  import {
7
7
  t
8
- } from "./chunk-3WHI4LN3.js";
8
+ } from "./chunk-EOOWV6C6.js";
9
9
 
10
10
  // src/pluginsCli.ts
11
11
  import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-3WHI4LN3.js";
4
+ } from "./chunk-EOOWV6C6.js";
5
5
 
6
6
  // src/prCli.ts
7
7
  import { spawn } from "child_process";
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ addProviderKey,
4
+ runProviderCommand
5
+ } from "./chunk-LHLNK7HP.js";
6
+ import "./chunk-JVQZWTPV.js";
7
+ import "./chunk-27REMLDV.js";
8
+ import "./chunk-BR63GX6T.js";
9
+ import "./chunk-XSUFHD67.js";
10
+ import "./chunk-AK6TWKET.js";
11
+ import "./chunk-EOOWV6C6.js";
12
+ export {
13
+ addProviderKey,
14
+ runProviderCommand
15
+ };
package/dist/sdk.js CHANGED
@@ -69,6 +69,7 @@ var ID = {
69
69
  "shift+tab switch mode": "shift+tab ganti mode",
70
70
  "{n} tokens": "{n} token",
71
71
  "\u273B Thinking": "\u273B Berpikir",
72
+ "\u273B Thinking \xB7 {n} lines": "\u273B Berpikir \xB7 {n} baris",
72
73
  "click to toggle": "klik untuk buka/tutup",
73
74
  "Model: {model} \xB7 reasoning: {level}": "Model: {model} \xB7 penalaran: {level}",
74
75
  "No reasoning summary received yet; tool activity remains visible above.": "Belum ada ringkasan penalaran dari model; aktivitas tool tetap terlihat di atas.",
@@ -78,6 +79,7 @@ var ID = {
78
79
  "\u2717 failed": "\u2717 gagal",
79
80
  "\u2713 done": "\u2713 selesai",
80
81
  "\u2026 {n} more lines ({bind})": "\u2026 {n} baris lagi ({bind})",
82
+ "\u2026 ({bind} to collapse)": "\u2026 ({bind} untuk menutup)",
81
83
  "No sessions in this folder yet; starting a new one.": "Belum ada sesi di folder ini; memulai sesi baru.",
82
84
  "Session number (enter = new): ": "Nomor sesi (enter = baru): ",
83
85
  'This repo wants to run the MCP server "{name}" ({what}). Allow? [y/N] ': 'Repo ini ingin menjalankan server MCP "{name}" ({what}). Izinkan? [y/N] ',
@@ -1839,7 +1841,7 @@ function createProvider(options) {
1839
1841
  const isBotConnectorCloud = /^https:\/\/api\.botconnector\.id\/v1\/?$/.test(baseURL) && apiKey?.startsWith("bc_live_");
1840
1842
  if (isBotConnectorCloud) {
1841
1843
  headers["x-botconnector-client"] = "bccli";
1842
- headers["x-botconnector-client-version"] = "0.4.4";
1844
+ headers["x-botconnector-client-version"] = "0.4.5";
1843
1845
  }
1844
1846
  const useNativeResponses = isBotConnectorCloud && providerId === "bc-cloud" && model === "gpt-6-luna";
1845
1847
  const useResponsesWebSocket = useNativeResponses && Boolean(apiKey) && (fetchOverride === void 0 || responsesWebSocketFactory !== void 0);
@@ -1870,7 +1872,7 @@ function createProvider(options) {
1870
1872
  baseURL: baseURL.replace(/\/+$/, ""),
1871
1873
  defaultHeaders: {
1872
1874
  "x-botconnector-client": "bccli",
1873
- "x-botconnector-client-version": "0.4.4"
1875
+ "x-botconnector-client-version": "0.4.5"
1874
1876
  }
1875
1877
  });
1876
1878
  lunaWs = responsesWebSocketFactory ? responsesWebSocketFactory(client) : new ResponsesWS(client, { reconnect: null });
@@ -3,15 +3,15 @@ import {
3
3
  createFetchTool,
4
4
  createWebSearchTool,
5
5
  isPrivateHost
6
- } from "./chunk-JXM6REER.js";
6
+ } from "./chunk-O5ATYRUP.js";
7
7
  import "./chunk-PSO7R5AD.js";
8
8
  import {
9
9
  loadConfig,
10
10
  readCredentials
11
- } from "./chunk-RX4UQX43.js";
11
+ } from "./chunk-AK6TWKET.js";
12
12
  import {
13
13
  t
14
- } from "./chunk-3WHI4LN3.js";
14
+ } from "./chunk-EOOWV6C6.js";
15
15
 
16
16
  // src/mcpServer/serve.ts
17
17
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createRuntime
4
- } from "./chunk-FI7RUJRX.js";
4
+ } from "./chunk-FW6W5MN7.js";
5
5
  import "./chunk-OK2USAXX.js";
6
- import "./chunk-HBQ6OLQT.js";
7
- import "./chunk-JXM6REER.js";
6
+ import "./chunk-NSARPM5C.js";
7
+ import "./chunk-O5ATYRUP.js";
8
8
  import "./chunk-PSO7R5AD.js";
9
9
  import {
10
10
  VERSION
11
- } from "./chunk-CGBSE55G.js";
11
+ } from "./chunk-DZPBWYTD.js";
12
12
  import {
13
13
  LOOPBACK_BIND,
14
14
  MAX_FRAME_BYTES,
@@ -17,25 +17,25 @@ import {
17
17
  parseClientFrame,
18
18
  randomToken,
19
19
  trustFence
20
- } from "./chunk-TGGKACSE.js";
20
+ } from "./chunk-3JQZ2IKV.js";
21
21
  import "./chunk-WFZKJY3R.js";
22
- import "./chunk-RZF6A43N.js";
22
+ import "./chunk-LHLNK7HP.js";
23
23
  import {
24
24
  listAllModels
25
- } from "./chunk-OZ5GHMTN.js";
26
- import "./chunk-HQW4BROS.js";
27
- import "./chunk-3I5BW3ZT.js";
25
+ } from "./chunk-JVQZWTPV.js";
26
+ import "./chunk-27REMLDV.js";
27
+ import "./chunk-6EGQI6HJ.js";
28
28
  import {
29
29
  Session
30
- } from "./chunk-SMTBYDNO.js";
31
- import "./chunk-MSDK4IIJ.js";
32
- import "./chunk-QQJ2VVIW.js";
33
- import "./chunk-6M55UPES.js";
30
+ } from "./chunk-YNI4GHBI.js";
31
+ import "./chunk-BR63GX6T.js";
32
+ import "./chunk-XSUFHD67.js";
33
+ import "./chunk-WTCWBY2D.js";
34
34
  import {
35
35
  bccliHome,
36
36
  loadConfig
37
- } from "./chunk-RX4UQX43.js";
38
- import "./chunk-3WHI4LN3.js";
37
+ } from "./chunk-AK6TWKET.js";
38
+ import "./chunk-EOOWV6C6.js";
39
39
 
40
40
  // src/serve.ts
41
41
  import { randomBytes } from "crypto";
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ Session,
4
+ pruneSessions
5
+ } from "./chunk-YNI4GHBI.js";
6
+ import "./chunk-BR63GX6T.js";
7
+ import "./chunk-XSUFHD67.js";
8
+ import "./chunk-EOOWV6C6.js";
9
+ export {
10
+ Session,
11
+ pruneSessions
12
+ };
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ createRuntime,
4
+ lunaPtcAutoEnabled
5
+ } from "./chunk-FW6W5MN7.js";
6
+ import "./chunk-OK2USAXX.js";
7
+ import "./chunk-NSARPM5C.js";
8
+ import "./chunk-O5ATYRUP.js";
9
+ import "./chunk-PSO7R5AD.js";
10
+ import "./chunk-WFZKJY3R.js";
11
+ import "./chunk-LHLNK7HP.js";
12
+ import "./chunk-JVQZWTPV.js";
13
+ import "./chunk-27REMLDV.js";
14
+ import "./chunk-6EGQI6HJ.js";
15
+ import "./chunk-YNI4GHBI.js";
16
+ import "./chunk-BR63GX6T.js";
17
+ import "./chunk-XSUFHD67.js";
18
+ import "./chunk-WTCWBY2D.js";
19
+ import "./chunk-AK6TWKET.js";
20
+ import "./chunk-EOOWV6C6.js";
21
+ export {
22
+ createRuntime,
23
+ lunaPtcAutoEnabled
24
+ };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-OK2USAXX.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/statsCli.ts
10
10
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Session
4
- } from "./chunk-SMTBYDNO.js";
5
- import "./chunk-MSDK4IIJ.js";
6
- import "./chunk-QQJ2VVIW.js";
4
+ } from "./chunk-YNI4GHBI.js";
5
+ import "./chunk-BR63GX6T.js";
6
+ import "./chunk-XSUFHD67.js";
7
7
  import {
8
8
  t
9
- } from "./chunk-3WHI4LN3.js";
9
+ } from "./chunk-EOOWV6C6.js";
10
10
 
11
11
  // src/transferCli.ts
12
12
  import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-NQOGVP3I.js";
5
+ } from "./chunk-XQVEAF3F.js";
6
6
  import {
7
7
  MAX_VERIFY_ROUNDS,
8
8
  runVerify,
9
9
  toolLabel,
10
10
  verifyFollowup,
11
11
  worktreeListText
12
- } from "./chunk-YCHCHOMK.js";
12
+ } from "./chunk-D7GAZKXT.js";
13
13
  import {
14
14
  BUILTIN_AGENTS,
15
15
  appendMemory,
@@ -24,7 +24,7 @@ import {
24
24
  runCommand,
25
25
  runHooks,
26
26
  validateGlobPattern
27
- } from "./chunk-HBQ6OLQT.js";
27
+ } from "./chunk-NSARPM5C.js";
28
28
  import "./chunk-PSO7R5AD.js";
29
29
  import {
30
30
  nextMode,
@@ -34,39 +34,39 @@ import {
34
34
  hasKey,
35
35
  providerName,
36
36
  writeGlobalConfig
37
- } from "./chunk-HQW4BROS.js";
37
+ } from "./chunk-27REMLDV.js";
38
38
  import {
39
39
  Session
40
- } from "./chunk-SMTBYDNO.js";
40
+ } from "./chunk-YNI4GHBI.js";
41
41
  import {
42
42
  contentText
43
- } from "./chunk-MSDK4IIJ.js";
43
+ } from "./chunk-BR63GX6T.js";
44
44
  import {
45
45
  REASONING_LEVELS,
46
46
  assertReasoningSupported,
47
47
  parseReasoningLevel,
48
48
  supportedReasoningLevels
49
- } from "./chunk-QQJ2VVIW.js";
49
+ } from "./chunk-XSUFHD67.js";
50
50
  import {
51
51
  addGlobalServer,
52
52
  globalMcpPath,
53
53
  readMcpFile,
54
54
  removeGlobalServer
55
- } from "./chunk-6M55UPES.js";
55
+ } from "./chunk-WTCWBY2D.js";
56
56
  import {
57
57
  ACCENT,
58
58
  PRESETS,
59
59
  color,
60
60
  matchKeybind,
61
61
  removeCredential
62
- } from "./chunk-RX4UQX43.js";
62
+ } from "./chunk-AK6TWKET.js";
63
63
  import {
64
64
  getLanguage,
65
65
  locale,
66
66
  parseLang,
67
67
  setLanguage,
68
68
  t
69
- } from "./chunk-3WHI4LN3.js";
69
+ } from "./chunk-EOOWV6C6.js";
70
70
 
71
71
  // src/ui/index.tsx
72
72
  import { render } from "ink";
@@ -1421,9 +1421,9 @@ function ToolBlock({ tool, target, output, display, isError, done, expanded, sub
1421
1421
  sub.length > 6 ? /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: t("\u2026 {n} earlier steps", { n: sub.length - 6 }) }) : null
1422
1422
  ] }) : null,
1423
1423
  isTask && done ? /* @__PURE__ */ jsx15(Box12, { marginLeft: 3, children: /* @__PURE__ */ jsx15(Text15, { color: isError ? color("red") : color("green"), children: `${isError ? t("\u2717 failed") : t("\u2713 done")}${display ? ` \xB7 ${display}` : ""}` }) }) : null,
1424
- isDiff ? /* @__PURE__ */ jsx15(Box12, { marginLeft: 3, children: /* @__PURE__ */ jsx15(DiffView, { diff: display }) }) : output && (isError || tool === "bash") && !(isTask && !isError) ? /* @__PURE__ */ jsxs11(Box12, { flexDirection: "column", marginLeft: 3, children: [
1424
+ isDiff ? /* @__PURE__ */ jsx15(Box12, { marginLeft: 3, children: /* @__PURE__ */ jsx15(DiffView, { diff: display }) }) : output && (isError || tool === "bash" || expanded) && !(isTask && !isError) ? /* @__PURE__ */ jsxs11(Box12, { flexDirection: "column", marginLeft: 3, children: [
1425
1425
  shown.map((line, i) => /* @__PURE__ */ jsx15(Text15, { dimColor: !isError, color: isError ? color("red") : void 0, children: line }, i)),
1426
- lines.length > shown.length ? /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: t("\u2026 {n} more lines ({bind})", { n: lines.length - shown.length, bind: moreBind }) }) : null
1426
+ lines.length > shown.length ? /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: t("\u2026 {n} more lines ({bind})", { n: lines.length - shown.length, bind: moreBind }) }) : expanded && lines.length > PREVIEW_LINES ? /* @__PURE__ */ jsx15(Text15, { dimColor: true, children: t("\u2026 ({bind} to collapse)", { bind: moreBind }) }) : null
1427
1427
  ] }) : null
1428
1428
  ] });
1429
1429
  }
@@ -1645,9 +1645,14 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1645
1645
  const [queued, setQueued] = useState8([]);
1646
1646
  const [showThinking, setShowThinking] = useState8(runtime.config.thinkingVisible === true);
1647
1647
  const showThinkingRef = useRef(showThinking);
1648
+ const [showToolOutput, setShowToolOutput] = useState8(false);
1648
1649
  const [, setConfigRev] = useState8(0);
1649
- const [lastThinking, setLastThinking] = useState8("");
1650
- const hasThinking = !!lastThinking.trim();
1650
+ const lastUserIdx = transcript.done.findLastIndex((e) => e.kind === "user");
1651
+ const staticDone = lastUserIdx > 0 ? transcript.done.slice(0, lastUserIdx) : [];
1652
+ const activeTurnDone = lastUserIdx > 0 ? transcript.done.slice(lastUserIdx) : transcript.done;
1653
+ const activeTurnEntries = [...activeTurnDone, ...transcript.live];
1654
+ const lastThinkingEntryId = activeTurnEntries.findLast((e) => e.kind === "thinking" && !!e.text.trim())?.id;
1655
+ const hasThinking = lastThinkingEntryId !== void 0;
1651
1656
  const { stdin } = useStdin();
1652
1657
  const { stdout } = useStdout2();
1653
1658
  const liveRootRef = useRef(null);
@@ -1671,7 +1676,6 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1671
1676
  if ((event.tool === "edit" || event.tool === "write") && !event.isError) editedInTurn.current = true;
1672
1677
  }
1673
1678
  if (event.type === "usage") setTokens(event.inputTokens + event.outputTokens);
1674
- if (event.type === "thinking" && event.delta) setLastThinking((prev) => prev + event.delta);
1675
1679
  if (event.type === "budgetExceeded") {
1676
1680
  notice(
1677
1681
  t("Budget exceeded ({kind}): {used} of {limit}. Further model calls are blocked; raise usageCap in ~/.bccli/config.json.", {
@@ -1699,7 +1703,7 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1699
1703
  async (text) => {
1700
1704
  setTranscript((t2) => ({ ...t2, done: [...t2.done, entry({ kind: "user", text })] }));
1701
1705
  setBusy(true);
1702
- setLastThinking("");
1706
+ setShowToolOutput(false);
1703
1707
  setStartedAt(Date.now());
1704
1708
  editedInTurn.current = false;
1705
1709
  controller.current = new AbortController();
@@ -1747,7 +1751,8 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1747
1751
  case "clear":
1748
1752
  runtime.agent.clear();
1749
1753
  setTokens(0);
1750
- setLastThinking("");
1754
+ setShowToolOutput(false);
1755
+ setTranscript((t2) => ({ ...t2, done: t2.done.filter((e) => e.kind !== "thinking") }));
1751
1756
  notice(t("Conversation cleared."));
1752
1757
  return;
1753
1758
  case "cost": {
@@ -1842,7 +1847,8 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1842
1847
  case "new":
1843
1848
  runtime.newSession();
1844
1849
  setTokens(0);
1845
- setLastThinking("");
1850
+ setShowToolOutput(false);
1851
+ setTranscript((t2) => ({ ...t2, done: t2.done.filter((e) => e.kind !== "thinking") }));
1846
1852
  notice(t("New session started. The previous session stays saved (/resume)."));
1847
1853
  return;
1848
1854
  case "session":
@@ -1875,7 +1881,7 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1875
1881
  if (!chosen) return;
1876
1882
  runtime.resume(chosen.session);
1877
1883
  setTokens(0);
1878
- setLastThinking("");
1884
+ setShowToolOutput(false);
1879
1885
  setTranscript({ done: [entry({ kind: "header" }), ...replayEntries(chosen.session.loadHistory())], live: [] });
1880
1886
  }
1881
1887
  });
@@ -2312,10 +2318,8 @@ ARGUMENTS: ${slash.args}`);
2312
2318
  })();
2313
2319
  } else if (matchKeybind(runtime.config.keybinds.thinking, input, key)) {
2314
2320
  toggleThinking();
2315
- } else if (matchKeybind(runtime.config.keybinds.toolOutput, input, key) && lastTool.current) {
2316
- const t2 = lastTool.current;
2317
- notice(`\u23BF ${t2.tool} ${t2.target}
2318
- ${t2.output}`);
2321
+ } else if (matchKeybind(runtime.config.keybinds.toolOutput, input, key)) {
2322
+ setShowToolOutput((prev) => !prev);
2319
2323
  }
2320
2324
  });
2321
2325
  const pickMcp = async (name) => {
@@ -2400,10 +2404,28 @@ ${t2.output}`);
2400
2404
  /* @__PURE__ */ jsx16(Text16, { color: color(ACCENT), children: "\u25CF " }),
2401
2405
  /* @__PURE__ */ jsx16(Markdown, { text: e.text.replace(/^\s+/, "") })
2402
2406
  ] }, e.id);
2403
- case "thinking":
2404
- return null;
2407
+ case "thinking": {
2408
+ const text = e.text.trim();
2409
+ if (!text) return null;
2410
+ const lines = text.split("\n").length;
2411
+ const isTarget = e.id === lastThinkingEntryId;
2412
+ return /* @__PURE__ */ jsxs12(Box13, { ref: isTarget ? thinkingTargetRef : void 0, marginTop: 1, flexDirection: "column", children: [
2413
+ /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", children: [
2414
+ /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: showThinking ? t("\u273B Thinking") : t("\u273B Thinking \xB7 {n} lines", { n: lines }) }),
2415
+ /* @__PURE__ */ jsxs12(Text16, { dimColor: true, children: [
2416
+ " \xB7 ",
2417
+ runtime.config.keybinds.thinking.spec,
2418
+ runtime.config.thinkingClickCollapse ? ` \xB7 ${t("click to toggle")}` : ""
2419
+ ] })
2420
+ ] }),
2421
+ showThinking ? /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2422
+ /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("Model: {model} \xB7 reasoning: {level}", { model: runtime.modelRef, level: reasoning }) }),
2423
+ /* @__PURE__ */ jsx16(Text16, { dimColor: true, italic: true, children: text })
2424
+ ] }) : null
2425
+ ] }, e.id);
2426
+ }
2405
2427
  case "tool":
2406
- return /* @__PURE__ */ jsx16(ToolBlock, { tool: e.tool, target: e.target, output: e.output, display: e.display, isError: e.isError, done: e.done, sub: e.sub, moreBind: runtime.config.keybinds.toolOutput.spec }, e.id);
2428
+ return /* @__PURE__ */ jsx16(ToolBlock, { tool: e.tool, target: e.target, output: e.output, display: e.display, isError: e.isError, done: e.done, expanded: showToolOutput, sub: e.sub, moreBind: runtime.config.keybinds.toolOutput.spec }, e.id);
2407
2429
  case "notice":
2408
2430
  return /* @__PURE__ */ jsx16(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text16, { color: e.tone === "error" ? color("red") : e.tone === "warn" ? color("yellow") : void 0, dimColor: e.tone === "info", children: e.text }) }, e.id);
2409
2431
  }
@@ -2414,21 +2436,22 @@ ${t2.output}`);
2414
2436
  const activeSpinnerSummary = activeToolEntry ? `${toolLabel(activeToolEntry.tool)}${activeTarget ? ` ${activeTarget.length > 20 ? `${activeTarget.slice(0, 20)}\u2026` : activeTarget}` : ""}` : "";
2415
2437
  const activeToolSummary = activeToolEntry ? `${toolLabel(activeToolEntry.tool)}${activeTarget ? ` ${activeTarget.length > 68 ? `${activeTarget.slice(0, 68)}\u2026` : activeTarget}` : ""}` : "";
2416
2438
  return /* @__PURE__ */ jsxs12(Box13, { ref: liveRootRef, flexDirection: "column", children: [
2417
- /* @__PURE__ */ jsx16(Static, { items: transcript.done, children: renderEntry }),
2439
+ /* @__PURE__ */ jsx16(Static, { items: staticDone, children: renderEntry }),
2440
+ activeTurnDone.map(renderEntry),
2418
2441
  transcript.live.map(renderEntry),
2419
- busy && !pending && !planAsk || !busy && hasThinking ? /* @__PURE__ */ jsxs12(Box13, { ref: thinkingTargetRef, marginTop: 1, flexDirection: "column", children: [
2442
+ busy && !pending && !planAsk ? /* @__PURE__ */ jsxs12(Box13, { ref: lastThinkingEntryId === void 0 ? thinkingTargetRef : void 0, marginTop: 1, flexDirection: "column", children: [
2420
2443
  /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", children: [
2421
- busy ? /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : activeSpinnerSummary ? `${t("Thinking")} \xB7 ${activeSpinnerSummary}` : t("Thinking"), startedAt }) : /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking") }),
2444
+ /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : activeSpinnerSummary ? `${t("Thinking")} \xB7 ${activeSpinnerSummary}` : t("Thinking"), startedAt }),
2422
2445
  /* @__PURE__ */ jsxs12(Text16, { dimColor: true, children: [
2423
2446
  " \xB7 ",
2424
2447
  runtime.config.keybinds.thinking.spec,
2425
2448
  runtime.config.thinkingClickCollapse ? ` \xB7 ${t("click to toggle")}` : ""
2426
2449
  ] })
2427
2450
  ] }),
2428
- showThinking ? /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2451
+ showThinking && lastThinkingEntryId === void 0 ? /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2429
2452
  /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("Model: {model} \xB7 reasoning: {level}", { model: runtime.modelRef, level: reasoning }) }),
2430
2453
  activeToolSummary ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: `\u25B6 ${activeToolSummary}` }) : null,
2431
- lastThinking.trim() ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, italic: true, children: lastThinking.trim() }) : !activeToolSummary ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("No reasoning summary received yet; tool activity remains visible above.") }) : null
2454
+ !activeToolSummary ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("No reasoning summary received yet; tool activity remains visible above.") }) : null
2432
2455
  ] }) : null
2433
2456
  ] }) : null,
2434
2457
  pending ? /* @__PURE__ */ jsx16(PermissionPrompt, { request: pending.request, onAnswer: answer }, pending.id) : null,
@@ -2483,7 +2506,7 @@ ${t2.output}`);
2483
2506
  import { jsx as jsx17 } from "react/jsx-runtime";
2484
2507
  async function startInteractive(rt, opts) {
2485
2508
  if (opts.resume) {
2486
- const { Session: Session2 } = await import("./session-ASXO6GXR.js");
2509
+ const { Session: Session2 } = await import("./session-ML2DPI7P.js");
2487
2510
  const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
2488
2511
  if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
2489
2512
  else {
@@ -2499,7 +2522,7 @@ async function startInteractive(rt, opts) {
2499
2522
  if (chosen) rt.resume(chosen.session);
2500
2523
  }
2501
2524
  }
2502
- const { serversToStart, setProjectTrust } = await import("./config-ENDRMOTP.js");
2525
+ const { serversToStart, setProjectTrust } = await import("./config-JCI7NAVY.js");
2503
2526
  const plan = serversToStart(rt.home, rt.cwd);
2504
2527
  if (plan.needTrust.length) {
2505
2528
  const { createInterface } = await import("readline/promises");
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-CGBSE55G.js";
4
+ } from "./chunk-DZPBWYTD.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/update.ts
10
10
  import { spawnSync } from "child_process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- addProviderKey,
4
- runProviderCommand
5
- } from "./chunk-RZF6A43N.js";
6
- import "./chunk-OZ5GHMTN.js";
7
- import "./chunk-HQW4BROS.js";
8
- import "./chunk-MSDK4IIJ.js";
9
- import "./chunk-QQJ2VVIW.js";
10
- import "./chunk-RX4UQX43.js";
11
- import "./chunk-3WHI4LN3.js";
12
- export {
13
- addProviderKey,
14
- runProviderCommand
15
- };
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- Session,
4
- pruneSessions
5
- } from "./chunk-SMTBYDNO.js";
6
- import "./chunk-MSDK4IIJ.js";
7
- import "./chunk-QQJ2VVIW.js";
8
- import "./chunk-3WHI4LN3.js";
9
- export {
10
- Session,
11
- pruneSessions
12
- };
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- createRuntime,
4
- lunaPtcAutoEnabled
5
- } from "./chunk-FI7RUJRX.js";
6
- import "./chunk-OK2USAXX.js";
7
- import "./chunk-HBQ6OLQT.js";
8
- import "./chunk-JXM6REER.js";
9
- import "./chunk-PSO7R5AD.js";
10
- import "./chunk-WFZKJY3R.js";
11
- import "./chunk-RZF6A43N.js";
12
- import "./chunk-OZ5GHMTN.js";
13
- import "./chunk-HQW4BROS.js";
14
- import "./chunk-3I5BW3ZT.js";
15
- import "./chunk-SMTBYDNO.js";
16
- import "./chunk-MSDK4IIJ.js";
17
- import "./chunk-QQJ2VVIW.js";
18
- import "./chunk-6M55UPES.js";
19
- import "./chunk-RX4UQX43.js";
20
- import "./chunk-3WHI4LN3.js";
21
- export {
22
- createRuntime,
23
- lunaPtcAutoEnabled
24
- };