@robota-sdk/agent-cli 3.0.0-beta.29 → 3.0.0-beta.30

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.
@@ -179,16 +179,42 @@ var PrintTerminal = class {
179
179
  };
180
180
 
181
181
  // src/ui/render.tsx
182
- var import_ink11 = require("ink");
182
+ var import_ink12 = require("ink");
183
183
 
184
184
  // src/ui/App.tsx
185
185
  var import_react13 = require("react");
186
- var import_ink10 = require("ink");
186
+ var import_ink11 = require("ink");
187
187
  var import_agent_core3 = require("@robota-sdk/agent-core");
188
188
 
189
189
  // src/ui/hooks/useSession.ts
190
190
  var import_react = require("react");
191
191
  var import_agent_sdk = require("@robota-sdk/agent-sdk");
192
+
193
+ // src/utils/edit-diff.ts
194
+ function generateDiffLines(oldStr, newStr) {
195
+ if (oldStr === newStr) return [];
196
+ const lines = [];
197
+ for (const line of oldStr.split("\n")) {
198
+ lines.push({ type: "remove", text: line });
199
+ }
200
+ for (const line of newStr.split("\n")) {
201
+ lines.push({ type: "add", text: line });
202
+ }
203
+ return lines;
204
+ }
205
+ function extractEditDiff(toolName, toolArgs) {
206
+ if (toolName !== "Edit" || !toolArgs) return null;
207
+ const filePath = toolArgs.file_path ?? toolArgs.filePath;
208
+ const oldStr = toolArgs.old_string ?? toolArgs.oldString;
209
+ const newStr = toolArgs.new_string ?? toolArgs.newString;
210
+ if (typeof filePath !== "string") return null;
211
+ if (typeof oldStr !== "string" || typeof newStr !== "string") return null;
212
+ const lines = generateDiffLines(oldStr, newStr);
213
+ if (lines.length === 0) return null;
214
+ return { file: filePath, lines };
215
+ }
216
+
217
+ // src/ui/hooks/useSession.ts
192
218
  var TOOL_ARG_DISPLAY_MAX = 80;
193
219
  var TAIL_KEEP = 30;
194
220
  var MAX_COMPLETED_TOOLS = 50;
@@ -254,14 +280,26 @@ function useSession(props) {
254
280
  }
255
281
  setActiveTools((prev) => [
256
282
  ...prev,
257
- { toolName: event.toolName, firstArg, isRunning: true }
283
+ { toolName: event.toolName, firstArg, isRunning: true, _toolArgs: event.toolArgs }
258
284
  ]);
259
285
  } else {
260
286
  const toolResult = event.denied ? "denied" : event.success === false ? "error" : "success";
261
287
  setActiveTools((prev) => {
262
- const updated = prev.map(
263
- (t) => t.toolName === event.toolName && t.isRunning ? { ...t, isRunning: false, result: toolResult } : t
264
- );
288
+ const updated = prev.map((t) => {
289
+ if (!(t.toolName === event.toolName && t.isRunning)) return t;
290
+ const editDiff = extractEditDiff(event.toolName, t._toolArgs);
291
+ const finished = {
292
+ ...t,
293
+ isRunning: false,
294
+ result: toolResult
295
+ };
296
+ if (editDiff) {
297
+ finished.diffLines = editDiff.lines;
298
+ finished.diffFile = editDiff.file;
299
+ }
300
+ delete finished._toolArgs;
301
+ return finished;
302
+ });
265
303
  const completed = updated.filter((t) => !t.isRunning);
266
304
  if (completed.length > MAX_COMPLETED_TOOLS) {
267
305
  const excess = completed.length - MAX_COMPLETED_TOOLS;
@@ -642,19 +680,33 @@ var import_react4 = require("react");
642
680
  // src/utils/tool-call-extractor.ts
643
681
  var TOOL_ARG_MAX_LENGTH = 80;
644
682
  var TAIL_KEEP2 = 30;
645
- function extractToolCalls(history, startIndex) {
646
- const lines = [];
683
+ function extractToolCallsWithDiff(history, startIndex) {
684
+ const summaries = [];
647
685
  for (let i = startIndex; i < history.length; i++) {
648
686
  const msg = history[i];
649
687
  if (msg.role === "assistant" && msg.toolCalls) {
650
688
  for (const tc of msg.toolCalls) {
651
689
  const value = parseFirstArgValue(tc.function.arguments);
652
690
  const truncated = value.length > TOOL_ARG_MAX_LENGTH ? value.slice(0, TOOL_ARG_MAX_LENGTH - TAIL_KEEP2 - 3) + "..." + value.slice(-TAIL_KEEP2) : value;
653
- lines.push(`${tc.function.name}(${truncated})`);
691
+ const summary = {
692
+ line: `${tc.function.name}(${truncated})`
693
+ };
694
+ if (tc.function.name === "Edit") {
695
+ try {
696
+ const args = JSON.parse(tc.function.arguments);
697
+ const diff = extractEditDiff("Edit", args);
698
+ if (diff) {
699
+ summary.diffLines = diff.lines;
700
+ summary.diffFile = diff.file;
701
+ }
702
+ } catch {
703
+ }
704
+ }
705
+ summaries.push(summary);
654
706
  }
655
707
  }
656
708
  }
657
- return lines;
709
+ return summaries;
658
710
  }
659
711
  function parseFirstArgValue(argsJson) {
660
712
  try {
@@ -741,15 +793,15 @@ async function runSessionPrompt(prompt, session, addMessage, clearStreamingText,
741
793
  const response = await session.run(prompt, rawInput);
742
794
  clearStreamingText();
743
795
  const history = session.getHistory();
744
- const toolLines = extractToolCalls(
796
+ const toolSummaries = extractToolCallsWithDiff(
745
797
  history,
746
798
  historyBefore
747
799
  );
748
- if (toolLines.length > 0) {
800
+ if (toolSummaries.length > 0) {
749
801
  addMessage({
750
802
  role: "tool",
751
- content: toolLines.join("\n"),
752
- toolName: `${toolLines.length} tools`
803
+ content: JSON.stringify(toolSummaries),
804
+ toolName: `${toolSummaries.length} tools`
753
805
  });
754
806
  }
755
807
  addMessage({ role: "assistant", content: response || "(empty response)" });
@@ -1243,7 +1295,7 @@ function usePluginCallbacks(cwd) {
1243
1295
 
1244
1296
  // src/ui/MessageList.tsx
1245
1297
  var import_react7 = __toESM(require("react"), 1);
1246
- var import_ink = require("ink");
1298
+ var import_ink2 = require("ink");
1247
1299
 
1248
1300
  // src/ui/render-markdown.ts
1249
1301
  var import_marked = require("marked");
@@ -1256,48 +1308,103 @@ function renderMarkdown(md) {
1256
1308
  return typeof result === "string" ? result.trimEnd() : md;
1257
1309
  }
1258
1310
 
1259
- // src/ui/MessageList.tsx
1311
+ // src/ui/DiffBlock.tsx
1312
+ var import_ink = require("ink");
1260
1313
  var import_jsx_runtime = require("react/jsx-runtime");
1314
+ var MAX_DIFF_LINES = 10;
1315
+ var TRUNCATED_SHOW = 8;
1316
+ function DiffBlock({ file, lines }) {
1317
+ const truncated = lines.length > MAX_DIFF_LINES;
1318
+ const visible = truncated ? lines.slice(0, TRUNCATED_SHOW) : lines;
1319
+ const remaining = lines.length - TRUNCATED_SHOW;
1320
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginLeft: 4, children: [
1321
+ file && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "white", dimColor: true, children: [
1322
+ "\u2502 ",
1323
+ file
1324
+ ] }),
1325
+ visible.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: line.type === "remove" ? "red" : "greenBright", children: [
1326
+ "\u2502 ",
1327
+ line.type === "remove" ? "-" : "+",
1328
+ " ",
1329
+ line.text
1330
+ ] }, i)),
1331
+ truncated && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "white", dimColor: true, children: [
1332
+ "\u2502 ... and ",
1333
+ remaining,
1334
+ " more lines"
1335
+ ] })
1336
+ ] });
1337
+ }
1338
+
1339
+ // src/ui/MessageList.tsx
1340
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1261
1341
  function RoleLabel({ role }) {
1262
1342
  switch (role) {
1263
1343
  case "user":
1264
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "green", bold: true, children: [
1344
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "green", bold: true, children: [
1265
1345
  "You:",
1266
1346
  " "
1267
1347
  ] });
1268
1348
  case "assistant":
1269
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "cyan", bold: true, children: [
1349
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "cyan", bold: true, children: [
1270
1350
  "Robota:",
1271
1351
  " "
1272
1352
  ] });
1273
1353
  case "system":
1274
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "yellow", bold: true, children: [
1354
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "yellow", bold: true, children: [
1275
1355
  "System:",
1276
1356
  " "
1277
1357
  ] });
1278
1358
  case "tool":
1279
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "white", bold: true, children: [
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "white", bold: true, children: [
1280
1360
  "Tool:",
1281
1361
  " "
1282
1362
  ] });
1283
1363
  }
1284
1364
  }
1285
1365
  function ToolMessage({ message }) {
1286
- const lines = message.content.split("\n").filter((l) => l.trim());
1287
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginBottom: 1, children: [
1288
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
1289
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "white", bold: true, children: [
1290
- "Tool:",
1291
- " "
1366
+ let summaries = null;
1367
+ try {
1368
+ const parsed = JSON.parse(message.content);
1369
+ if (Array.isArray(parsed) && parsed.length > 0 && typeof parsed[0].line === "string") {
1370
+ summaries = parsed;
1371
+ }
1372
+ } catch {
1373
+ }
1374
+ if (summaries) {
1375
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { flexDirection: "column", marginBottom: 1, children: [
1376
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { children: [
1377
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { color: "white", bold: true, children: "Tool: " }),
1378
+ message.toolName && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "white", dimColor: true, children: [
1379
+ "[",
1380
+ message.toolName,
1381
+ "]"
1382
+ ] })
1292
1383
  ] }),
1293
- message.toolName && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "white", dimColor: true, children: [
1384
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { children: " " }),
1385
+ summaries.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { flexDirection: "column", children: [
1386
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "green", children: [
1387
+ " ",
1388
+ "\u2713",
1389
+ " ",
1390
+ s.line
1391
+ ] }),
1392
+ s.diffLines && s.diffLines.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DiffBlock, { file: s.diffFile, lines: s.diffLines })
1393
+ ] }, i))
1394
+ ] });
1395
+ }
1396
+ const lines = message.content.split("\n").filter((l) => l.trim());
1397
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { flexDirection: "column", marginBottom: 1, children: [
1398
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { children: [
1399
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { color: "white", bold: true, children: "Tool: " }),
1400
+ message.toolName && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "white", dimColor: true, children: [
1294
1401
  "[",
1295
1402
  message.toolName,
1296
1403
  "]"
1297
1404
  ] })
1298
1405
  ] }),
1299
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: " " }),
1300
- lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "green", children: [
1406
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { children: " " }),
1407
+ lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "green", children: [
1301
1408
  " ",
1302
1409
  "\u2713",
1303
1410
  " ",
@@ -1309,30 +1416,30 @@ var MessageItem = import_react7.default.memo(function MessageItem2({
1309
1416
  message
1310
1417
  }) {
1311
1418
  if (message.role === "tool") {
1312
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolMessage, { message });
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ToolMessage, { message });
1313
1420
  }
1314
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginBottom: 1, children: [
1315
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
1316
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RoleLabel, { role: message.role }),
1317
- message.toolName && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "magenta", dimColor: true, children: [
1421
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { flexDirection: "column", marginBottom: 1, children: [
1422
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Box, { children: [
1423
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RoleLabel, { role: message.role }),
1424
+ message.toolName && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: "magenta", dimColor: true, children: [
1318
1425
  "[",
1319
1426
  message.toolName,
1320
1427
  "]",
1321
1428
  " "
1322
1429
  ] })
1323
1430
  ] }),
1324
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: " " }),
1325
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { wrap: "wrap", children: message.role === "assistant" ? renderMarkdown(message.content) : message.content }) })
1431
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { children: " " }),
1432
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Box, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { wrap: "wrap", children: message.role === "assistant" ? renderMarkdown(message.content) : message.content }) })
1326
1433
  ] });
1327
1434
  });
1328
1435
  function MessageList({ messages }) {
1329
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", children: messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MessageItem, { message: msg }, msg.id)) });
1436
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Box, { flexDirection: "column", children: messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MessageItem, { message: msg }, msg.id)) });
1330
1437
  }
1331
1438
 
1332
1439
  // src/ui/StatusBar.tsx
1333
- var import_ink2 = require("ink");
1440
+ var import_ink3 = require("ink");
1334
1441
  var import_agent_core2 = require("@robota-sdk/agent-core");
1335
- var import_jsx_runtime2 = require("react/jsx-runtime");
1442
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1336
1443
  var CONTEXT_YELLOW_THRESHOLD = 70;
1337
1444
  var CONTEXT_RED_THRESHOLD = 90;
1338
1445
  function getContextColor(percentage) {
@@ -1351,8 +1458,8 @@ function StatusBar({
1351
1458
  contextMaxTokens
1352
1459
  }) {
1353
1460
  const contextColor = getContextColor(contextPercentage);
1354
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1355
- import_ink2.Box,
1461
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1462
+ import_ink3.Box,
1356
1463
  {
1357
1464
  borderStyle: "single",
1358
1465
  borderColor: "gray",
@@ -1360,14 +1467,14 @@ function StatusBar({
1360
1467
  paddingRight: 1,
1361
1468
  justifyContent: "space-between",
1362
1469
  children: [
1363
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { children: [
1364
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { color: "cyan", bold: true, children: "Mode:" }),
1470
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ink3.Text, { children: [
1471
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink3.Text, { color: "cyan", bold: true, children: "Mode:" }),
1365
1472
  " ",
1366
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { children: permissionMode }),
1473
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink3.Text, { children: permissionMode }),
1367
1474
  " | ",
1368
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { dimColor: true, children: modelName }),
1475
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink3.Text, { dimColor: true, children: modelName }),
1369
1476
  " | ",
1370
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { color: contextColor, children: [
1477
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ink3.Text, { color: contextColor, children: [
1371
1478
  "Context: ",
1372
1479
  Math.round(contextPercentage),
1373
1480
  "% (",
@@ -1377,9 +1484,9 @@ function StatusBar({
1377
1484
  ")"
1378
1485
  ] })
1379
1486
  ] }),
1380
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { children: [
1381
- isThinking && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink2.Text, { color: "yellow", children: "Thinking... " }),
1382
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink2.Text, { dimColor: true, children: [
1487
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ink3.Text, { children: [
1488
+ isThinking && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink3.Text, { color: "yellow", children: "Thinking... " }),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ink3.Text, { dimColor: true, children: [
1383
1490
  "msgs: ",
1384
1491
  messageCount
1385
1492
  ] })
@@ -1391,13 +1498,13 @@ function StatusBar({
1391
1498
 
1392
1499
  // src/ui/InputArea.tsx
1393
1500
  var import_react10 = __toESM(require("react"), 1);
1394
- var import_ink6 = require("ink");
1501
+ var import_ink7 = require("ink");
1395
1502
 
1396
1503
  // src/ui/CjkTextInput.tsx
1397
1504
  var import_react8 = require("react");
1398
- var import_ink3 = require("ink");
1505
+ var import_ink4 = require("ink");
1399
1506
  var import_chalk = __toESM(require("chalk"), 1);
1400
- var import_jsx_runtime3 = require("react/jsx-runtime");
1507
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1401
1508
  function filterPrintable(input) {
1402
1509
  if (!input || input.length === 0) return "";
1403
1510
  return input.replace(/[\x00-\x1f\x7f]/g, "");
@@ -1423,7 +1530,7 @@ function CjkTextInput({
1423
1530
  cursorRef.current = value.length;
1424
1531
  }
1425
1532
  }
1426
- (0, import_ink3.useInput)(
1533
+ (0, import_ink4.useInput)(
1427
1534
  (input, key) => {
1428
1535
  try {
1429
1536
  if (key.upArrow || key.downArrow || key.ctrl && input === "c" || key.tab || key.shift && key.tab) {
@@ -1468,7 +1575,7 @@ function CjkTextInput({
1468
1575
  },
1469
1576
  { isActive: focus }
1470
1577
  );
1471
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink3.Text, { children: renderWithCursor(valueRef.current, cursorRef.current, placeholder, showCursor && focus) });
1578
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ink4.Text, { children: renderWithCursor(valueRef.current, cursorRef.current, placeholder, showCursor && focus) });
1472
1579
  }
1473
1580
  function renderWithCursor(value, cursorOffset, placeholder, showCursor) {
1474
1581
  if (!showCursor) {
@@ -1494,8 +1601,8 @@ function renderWithCursor(value, cursorOffset, placeholder, showCursor) {
1494
1601
 
1495
1602
  // src/ui/WaveText.tsx
1496
1603
  var import_react9 = require("react");
1497
- var import_ink4 = require("ink");
1498
- var import_jsx_runtime4 = require("react/jsx-runtime");
1604
+ var import_ink5 = require("ink");
1605
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1499
1606
  var WAVE_COLORS = ["#666666", "#888888", "#aaaaaa", "#888888"];
1500
1607
  var INTERVAL_MS = 400;
1501
1608
  var CHARS_PER_GROUP = 4;
@@ -1508,23 +1615,23 @@ function WaveText({ text }) {
1508
1615
  return () => clearInterval(timer);
1509
1616
  }, []);
1510
1617
  const chars = [...text];
1511
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ink4.Text, { children: chars.map((char, i) => {
1618
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ink5.Text, { children: chars.map((char, i) => {
1512
1619
  const group = Math.floor(i / CHARS_PER_GROUP);
1513
1620
  const colorIndex = (tick + group) % WAVE_COLORS.length;
1514
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ink4.Text, { color: WAVE_COLORS[colorIndex], children: char }, i);
1621
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ink5.Text, { color: WAVE_COLORS[colorIndex], children: char }, i);
1515
1622
  }) });
1516
1623
  }
1517
1624
 
1518
1625
  // src/ui/SlashAutocomplete.tsx
1519
- var import_ink5 = require("ink");
1520
- var import_jsx_runtime5 = require("react/jsx-runtime");
1626
+ var import_ink6 = require("ink");
1627
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1521
1628
  var MAX_VISIBLE = 8;
1522
1629
  function CommandRow(props) {
1523
1630
  const { cmd, isSelected, showSlash } = props;
1524
1631
  const indicator = isSelected ? "\u25B8 " : " ";
1525
1632
  const nameColor = isSelected ? "cyan" : void 0;
1526
1633
  const dimmed = !isSelected;
1527
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ink5.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ink5.Text, { color: nameColor, dimColor: dimmed, children: [
1634
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ink6.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ink6.Text, { color: nameColor, dimColor: dimmed, children: [
1528
1635
  indicator,
1529
1636
  showSlash ? `/${cmd.name} ${cmd.description}` : cmd.description
1530
1637
  ] }) });
@@ -1538,7 +1645,7 @@ function SlashAutocomplete({
1538
1645
  if (!visible || commands.length === 0) return null;
1539
1646
  const scrollOffset = computeScrollOffset(selectedIndex, commands.length);
1540
1647
  const visibleCommands = commands.slice(scrollOffset, scrollOffset + MAX_VISIBLE);
1541
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ink5.Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: visibleCommands.map((cmd, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1648
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ink6.Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: visibleCommands.map((cmd, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1542
1649
  CommandRow,
1543
1650
  {
1544
1651
  cmd,
@@ -1556,7 +1663,7 @@ function computeScrollOffset(selectedIndex, total) {
1556
1663
  }
1557
1664
 
1558
1665
  // src/ui/InputArea.tsx
1559
- var import_jsx_runtime6 = require("react/jsx-runtime");
1666
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1560
1667
  function parseSlashInput(value) {
1561
1668
  if (!value.startsWith("/")) return { isSlash: false, parentCommand: "", filter: "" };
1562
1669
  const afterSlash = value.slice(1);
@@ -1651,7 +1758,7 @@ function InputArea({ onSubmit, isDisabled, registry }) {
1651
1758
  },
1652
1759
  [value, onSubmit, setSelectedIndex]
1653
1760
  );
1654
- (0, import_ink6.useInput)(
1761
+ (0, import_ink7.useInput)(
1655
1762
  (_input, key) => {
1656
1763
  if (!showPopup) return;
1657
1764
  if (key.upArrow) {
@@ -1667,8 +1774,8 @@ function InputArea({ onSubmit, isDisabled, registry }) {
1667
1774
  },
1668
1775
  { isActive: showPopup && !isDisabled }
1669
1776
  );
1670
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ink6.Box, { flexDirection: "column", children: [
1671
- showPopup && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1777
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Box, { flexDirection: "column", children: [
1778
+ showPopup && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1672
1779
  SlashAutocomplete,
1673
1780
  {
1674
1781
  commands: filteredCommands,
@@ -1677,9 +1784,9 @@ function InputArea({ onSubmit, isDisabled, registry }) {
1677
1784
  isSubcommandMode
1678
1785
  }
1679
1786
  ),
1680
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ink6.Box, { borderStyle: "single", borderColor: isDisabled ? "gray" : "green", paddingLeft: 1, children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WaveText, { text: " Waiting for response..." }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ink6.Box, { children: [
1681
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ink6.Text, { color: "green", bold: true, children: "> " }),
1682
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1787
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Box, { borderStyle: "single", borderColor: isDisabled ? "gray" : "green", paddingLeft: 1, children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(WaveText, { text: " Waiting for response..." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Box, { children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "green", bold: true, children: "> " }),
1789
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1683
1790
  CjkTextInput,
1684
1791
  {
1685
1792
  value,
@@ -1694,8 +1801,8 @@ function InputArea({ onSubmit, isDisabled, registry }) {
1694
1801
 
1695
1802
  // src/ui/ConfirmPrompt.tsx
1696
1803
  var import_react11 = require("react");
1697
- var import_ink7 = require("ink");
1698
- var import_jsx_runtime7 = require("react/jsx-runtime");
1804
+ var import_ink8 = require("ink");
1805
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1699
1806
  function ConfirmPrompt({
1700
1807
  message,
1701
1808
  options = ["Yes", "No"],
@@ -1711,7 +1818,7 @@ function ConfirmPrompt({
1711
1818
  },
1712
1819
  [onSelect]
1713
1820
  );
1714
- (0, import_ink7.useInput)((input, key) => {
1821
+ (0, import_ink8.useInput)((input, key) => {
1715
1822
  if (resolvedRef.current) return;
1716
1823
  if (key.leftArrow || key.upArrow) {
1717
1824
  setSelected((prev) => prev > 0 ? prev - 1 : prev);
@@ -1725,20 +1832,20 @@ function ConfirmPrompt({
1725
1832
  doSelect(1);
1726
1833
  }
1727
1834
  });
1728
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
1729
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "yellow", children: message }),
1730
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Box, { marginTop: 1, children: options.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Box, { marginRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Text, { color: i === selected ? "cyan" : void 0, bold: i === selected, children: [
1835
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
1836
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Text, { color: "yellow", children: message }),
1837
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Box, { marginTop: 1, children: options.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Box, { marginRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Text, { color: i === selected ? "cyan" : void 0, bold: i === selected, children: [
1731
1838
  i === selected ? "> " : " ",
1732
1839
  opt
1733
1840
  ] }) }, opt)) }),
1734
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { dimColor: true, children: " arrow keys to select, Enter to confirm" })
1841
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Text, { dimColor: true, children: " arrow keys to select, Enter to confirm" })
1735
1842
  ] });
1736
1843
  }
1737
1844
 
1738
1845
  // src/ui/PermissionPrompt.tsx
1739
1846
  var import_react12 = __toESM(require("react"), 1);
1740
- var import_ink8 = require("ink");
1741
- var import_jsx_runtime8 = require("react/jsx-runtime");
1847
+ var import_ink9 = require("ink");
1848
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1742
1849
  var OPTIONS = ["Allow", "Allow always (this session)", "Deny"];
1743
1850
  function formatArgs(args) {
1744
1851
  const entries = Object.entries(args);
@@ -1764,7 +1871,7 @@ function PermissionPrompt({ request }) {
1764
1871
  },
1765
1872
  [request]
1766
1873
  );
1767
- (0, import_ink8.useInput)((input, key) => {
1874
+ (0, import_ink9.useInput)((input, key) => {
1768
1875
  if (resolvedRef.current) return;
1769
1876
  if (key.upArrow || key.leftArrow) {
1770
1877
  setSelected((prev) => prev > 0 ? prev - 1 : prev);
@@ -1780,28 +1887,28 @@ function PermissionPrompt({ request }) {
1780
1887
  doResolve(2);
1781
1888
  }
1782
1889
  });
1783
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
1784
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Text, { color: "yellow", bold: true, children: "[Permission Required]" }),
1785
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Text, { children: [
1890
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
1891
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { color: "yellow", bold: true, children: "[Permission Required]" }),
1892
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Text, { children: [
1786
1893
  "Tool:",
1787
1894
  " ",
1788
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Text, { color: "cyan", bold: true, children: request.toolName })
1895
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { color: "cyan", bold: true, children: request.toolName })
1789
1896
  ] }),
1790
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Text, { dimColor: true, children: [
1897
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Text, { dimColor: true, children: [
1791
1898
  " ",
1792
1899
  formatArgs(request.toolArgs)
1793
1900
  ] }),
1794
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Box, { marginTop: 1, children: OPTIONS.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Box, { marginRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ink8.Text, { color: i === selected ? "cyan" : void 0, bold: i === selected, children: [
1901
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Box, { marginTop: 1, children: OPTIONS.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Box, { marginRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Text, { color: i === selected ? "cyan" : void 0, bold: i === selected, children: [
1795
1902
  i === selected ? "> " : " ",
1796
1903
  opt
1797
1904
  ] }) }, opt)) }),
1798
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ink8.Text, { dimColor: true, children: " left/right to select, Enter to confirm" })
1905
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { dimColor: true, children: " left/right to select, Enter to confirm" })
1799
1906
  ] });
1800
1907
  }
1801
1908
 
1802
1909
  // src/ui/StreamingIndicator.tsx
1803
- var import_ink9 = require("ink");
1804
- var import_jsx_runtime9 = require("react/jsx-runtime");
1910
+ var import_ink10 = require("ink");
1911
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1805
1912
  function getToolStyle(t) {
1806
1913
  if (t.isRunning) return { color: "yellow", icon: "\u27F3", strikethrough: false };
1807
1914
  if (t.result === "error") return { color: "red", icon: "\u2717", strikethrough: true };
@@ -1812,35 +1919,38 @@ function StreamingIndicator({ text, activeTools }) {
1812
1919
  const hasTools = activeTools.length > 0;
1813
1920
  const hasText = text.length > 0;
1814
1921
  if (!hasTools && !hasText) {
1815
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { color: "yellow", children: "Thinking..." });
1922
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { color: "yellow", children: "Thinking..." });
1816
1923
  }
1817
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Box, { flexDirection: "column", children: [
1818
- hasTools && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Box, { flexDirection: "column", marginBottom: 1, children: [
1819
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { color: "white", bold: true, children: "Tools:" }),
1820
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { children: " " }),
1924
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", children: [
1925
+ hasTools && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", marginBottom: 1, children: [
1926
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { color: "white", bold: true, children: "Tools:" }),
1927
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { children: " " }),
1821
1928
  activeTools.map((t, i) => {
1822
1929
  const { color, icon, strikethrough } = getToolStyle(t);
1823
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Text, { color, strikethrough, children: [
1824
- " ",
1825
- icon,
1826
- " ",
1827
- t.toolName,
1828
- "(",
1829
- t.firstArg,
1830
- ")"
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", children: [
1931
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Text, { color, strikethrough, children: [
1932
+ " ",
1933
+ icon,
1934
+ " ",
1935
+ t.toolName,
1936
+ "(",
1937
+ t.firstArg,
1938
+ ")"
1939
+ ] }),
1940
+ t.diffLines && t.diffLines.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DiffBlock, { file: t.diffFile, lines: t.diffLines })
1831
1941
  ] }, `${t.toolName}-${i}`);
1832
1942
  })
1833
1943
  ] }),
1834
- hasText && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ink9.Box, { flexDirection: "column", marginBottom: 1, children: [
1835
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { color: "cyan", bold: true, children: "Robota:" }),
1836
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { children: " " }),
1837
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Box, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ink9.Text, { wrap: "wrap", children: renderMarkdown(text) }) })
1944
+ hasText && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", marginBottom: 1, children: [
1945
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { color: "cyan", bold: true, children: "Robota:" }),
1946
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { children: " " }),
1947
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Box, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { wrap: "wrap", children: renderMarkdown(text) }) })
1838
1948
  ] })
1839
1949
  ] });
1840
1950
  }
1841
1951
 
1842
1952
  // src/ui/App.tsx
1843
- var import_jsx_runtime10 = require("react/jsx-runtime");
1953
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1844
1954
  var EXIT_DELAY_MS2 = 500;
1845
1955
  function mergeHooksIntoConfig(configHooks, pluginHooks) {
1846
1956
  const pluginKeys = Object.keys(pluginHooks);
@@ -1859,7 +1969,7 @@ function mergeHooksIntoConfig(configHooks, pluginHooks) {
1859
1969
  return merged;
1860
1970
  }
1861
1971
  function App(props) {
1862
- const { exit } = (0, import_ink10.useApp)();
1972
+ const { exit } = (0, import_ink11.useApp)();
1863
1973
  const { registry, pluginHooks } = useCommandRegistry(props.cwd ?? process.cwd());
1864
1974
  const configWithPluginHooks = {
1865
1975
  ...props.config,
@@ -1901,33 +2011,33 @@ function App(props) {
1901
2011
  setContextState,
1902
2012
  registry
1903
2013
  );
1904
- (0, import_ink10.useInput)(
2014
+ (0, import_ink11.useInput)(
1905
2015
  (_input, key) => {
1906
2016
  if (key.ctrl && _input === "c") exit();
1907
2017
  if (key.escape && isThinking) session.abort();
1908
2018
  },
1909
2019
  { isActive: !permissionRequest }
1910
2020
  );
1911
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", children: [
1912
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: [
1913
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { color: "cyan", bold: true, children: `
2021
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ink11.Box, { flexDirection: "column", children: [
2022
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ink11.Box, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: [
2023
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ink11.Text, { color: "cyan", bold: true, children: `
1914
2024
  ____ ___ ____ ___ _____ _
1915
2025
  | _ \\ / _ \\| __ ) / _ \\_ _|/ \\
1916
2026
  | |_) | | | | _ \\| | | || | / _ \\
1917
2027
  | _ <| |_| | |_) | |_| || |/ ___ \\
1918
2028
  |_| \\_\\\\___/|____/ \\___/ |_/_/ \\_\\
1919
2029
  ` }),
1920
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Text, { dimColor: true, children: [
2030
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ink11.Text, { dimColor: true, children: [
1921
2031
  " v",
1922
2032
  props.version ?? "0.0.0"
1923
2033
  ] })
1924
2034
  ] }),
1925
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_ink10.Box, { flexDirection: "column", paddingX: 1, flexGrow: 1, children: [
1926
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MessageList, { messages }),
1927
- isThinking && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StreamingIndicator, { text: streamingText, activeTools }) })
2035
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ink11.Box, { flexDirection: "column", paddingX: 1, flexGrow: 1, children: [
2036
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MessageList, { messages }),
2037
+ isThinking && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ink11.Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StreamingIndicator, { text: streamingText, activeTools }) })
1928
2038
  ] }),
1929
- permissionRequest && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PermissionPrompt, { request: permissionRequest }),
1930
- pendingModelId && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2039
+ permissionRequest && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PermissionPrompt, { request: permissionRequest }),
2040
+ pendingModelId && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1931
2041
  ConfirmPrompt,
1932
2042
  {
1933
2043
  message: `Change model to ${(0, import_agent_core3.getModelName)(pendingModelId)}? This will restart the session.`,
@@ -1955,7 +2065,7 @@ function App(props) {
1955
2065
  }
1956
2066
  }
1957
2067
  ),
1958
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2068
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1959
2069
  StatusBar,
1960
2070
  {
1961
2071
  permissionMode: session.getPermissionMode(),
@@ -1968,7 +2078,7 @@ function App(props) {
1968
2078
  contextMaxTokens: contextState.maxTokens
1969
2079
  }
1970
2080
  ),
1971
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2081
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1972
2082
  InputArea,
1973
2083
  {
1974
2084
  onSubmit: handleSubmit,
@@ -1976,12 +2086,12 @@ function App(props) {
1976
2086
  registry
1977
2087
  }
1978
2088
  ),
1979
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink10.Text, { children: " " })
2089
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ink11.Text, { children: " " })
1980
2090
  ] });
1981
2091
  }
1982
2092
 
1983
2093
  // src/ui/render.tsx
1984
- var import_jsx_runtime11 = require("react/jsx-runtime");
2094
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1985
2095
  function renderApp(options) {
1986
2096
  process.on("unhandledRejection", (reason) => {
1987
2097
  process.stderr.write(`
@@ -1992,7 +2102,7 @@ function renderApp(options) {
1992
2102
  `);
1993
2103
  }
1994
2104
  });
1995
- const instance = (0, import_ink11.render)(/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(App, { ...options }), {
2105
+ const instance = (0, import_ink12.render)(/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(App, { ...options }), {
1996
2106
  exitOnCtrlC: true
1997
2107
  });
1998
2108
  instance.waitUntilExit().catch((err) => {