reevesagents 1.3.0 → 1.3.1

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.
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  translate,
7
7
  translatePhrase
8
- } from "./chunk-4LWTEYRI.js";
8
+ } from "./chunk-YMUISYYB.js";
9
9
  import {
10
10
  modelDisplayName,
11
11
  modelValuesForProvider
@@ -70,7 +70,7 @@ import {
70
70
  import "./chunk-D24DQQ6V.js";
71
71
  import {
72
72
  startWebFromTui
73
- } from "./chunk-5DOCQLT7.js";
73
+ } from "./chunk-2LC6V55H.js";
74
74
 
75
75
  // src/tui/router.tsx
76
76
  import { createContext as createContext6, useContext as useContext6, useState as useState36, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
@@ -306,6 +306,16 @@ var glyphs = {
306
306
  }
307
307
  };
308
308
 
309
+ // src/utils/width.ts
310
+ import stringWidth from "string-width";
311
+ function displayWidth(text) {
312
+ return stringWidth(text);
313
+ }
314
+ function padEndDisplay(text, targetWidth) {
315
+ const gap = targetWidth - stringWidth(text);
316
+ return gap > 0 ? text + " ".repeat(gap) : text;
317
+ }
318
+
309
319
  // src/tui/components/Header.tsx
310
320
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
311
321
  function Header({ breadcrumb, meta, tmuxSession, columns }) {
@@ -316,7 +326,7 @@ function Header({ breadcrumb, meta, tmuxSession, columns }) {
316
326
  metaList = [...metaList, { label: "tmux", value: tmuxSession }];
317
327
  }
318
328
  const metaText = metaList.map(({ label, value }) => `${label} ${value}`).join(sep.dot);
319
- const metaWidth = Math.min(metaText.length, Math.max(0, Math.floor(width * 0.42)));
329
+ const metaWidth = Math.min(displayWidth(metaText), Math.max(0, Math.floor(width * 0.42)));
320
330
  const leftWidth = Math.max(1, width - metaWidth);
321
331
  if (isNarrow) {
322
332
  const current = breadcrumb[breadcrumb.length - 1] || "";
@@ -573,8 +583,8 @@ function Row({
573
583
  const displayPrimary = translatePhrase(language, primary);
574
584
  const displayHint = hint ? translatePhrase(language, hint) : hint;
575
585
  const displayTrailing = trailing ? translatePhrase(language, trailing) : trailing;
576
- const buttonPrimaryWidth = buttonLike ? Math.max(primaryWidth ?? 0, displayPrimary.length, 12) : primaryWidth;
577
- const primaryText = buttonPrimaryWidth ? displayPrimary.padEnd(buttonPrimaryWidth) : displayPrimary;
586
+ const buttonPrimaryWidth = buttonLike ? Math.max(primaryWidth ?? 0, displayWidth(displayPrimary), 12) : primaryWidth;
587
+ const primaryText = buttonPrimaryWidth ? padEndDisplay(displayPrimary, buttonPrimaryWidth) : displayPrimary;
578
588
  const railColor = selected ? colors.accent.deep : colors.surface.border;
579
589
  const availableWidth = Math.max(1, width - 6);
580
590
  const canFitTrailing = availableWidth >= 24;
@@ -598,7 +608,7 @@ function Row({
598
608
  glyph && /* @__PURE__ */ jsx12(Text7, { color: glyph.color, children: glyph.char }),
599
609
  glyph && /* @__PURE__ */ jsx12(Text7, { children: " " }),
600
610
  inlineBadges.map((item, idx) => {
601
- const label = truncateBadgeLabel(item.label, compact);
611
+ const label = truncateBadgeLabel(translatePhrase(language, item.label), compact);
602
612
  const displayLabel = item.width && !compact ? label.padEnd(item.width) : label;
603
613
  return /* @__PURE__ */ jsxs7(React8.Fragment, { children: [
604
614
  /* @__PURE__ */ jsx12(Text7, { color: badgeBracketColor, children: "[" }),
@@ -653,7 +663,7 @@ function Section({ label }) {
653
663
  const { language } = useLanguage();
654
664
  const columns = useLayoutColumns();
655
665
  const displayLabel = translatePhrase(language, label);
656
- const labelTextWidth = displayLabel ? displayLabel.length + 2 : 0;
666
+ const labelTextWidth = displayLabel ? displayWidth(displayLabel) + 2 : 0;
657
667
  const width = Math.max(labelTextWidth + 7, panelWidth(columns));
658
668
  const suffix = "\u2500".repeat(Math.max(2, width - labelTextWidth - 5));
659
669
  return /* @__PURE__ */ jsx13(Box8, { children: /* @__PURE__ */ jsxs8(Text8, { color: colors.surface.border, wrap: "truncate-end", children: [
@@ -746,7 +756,7 @@ function LanguageSelect() {
746
756
  Row,
747
757
  {
748
758
  selected: false,
749
- primary: `${firstVisible + 1}-${firstVisible + visibleOptions.length} of ${LANGUAGE_OPTIONS.length}`,
759
+ primary: t("runtime.pageRange", { from: firstVisible + 1, to: firstVisible + visibleOptions.length, total: LANGUAGE_OPTIONS.length }),
750
760
  trailing: "scroll with arrows",
751
761
  disabled: true
752
762
  }
@@ -1071,6 +1081,11 @@ function Legend({ items }) {
1071
1081
  }) });
1072
1082
  }
1073
1083
 
1084
+ // src/utils/agentLabel.ts
1085
+ function agentCountLabel(t, count) {
1086
+ return count === 1 ? t("runtime.agentsOne", { count }) : t("runtime.agentsMany", { count });
1087
+ }
1088
+
1074
1089
  // src/tui/screens/Runs.tsx
1075
1090
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1076
1091
  var ACTIONS = ["NewRun", "History", "Main Menu", "Quit"];
@@ -1104,6 +1119,7 @@ function moveSelectedIndex(idx, delta, runCount) {
1104
1119
  }
1105
1120
  function Runs() {
1106
1121
  const { exit } = useApp2();
1122
+ const { t, language } = useLanguage();
1107
1123
  const { push, resetStack, setSelectedRunId } = useRouter();
1108
1124
  const { rows: termRows } = useWindowSize4();
1109
1125
  const bodyRows = frameBodyRows(termRows, true, true);
@@ -1219,7 +1235,7 @@ function Runs() {
1219
1235
  let statusContext = "";
1220
1236
  if (selectedRun) {
1221
1237
  const agents = listAgents(selectedRun.id);
1222
- statusContext = `${selectedRun.name} \xB7 ${runStatus(selectedRun)} \xB7 ${agents.length} agents \xB7 ${selectedRun.working_dir}`;
1238
+ statusContext = `${selectedRun.name} \xB7 ${translatePhrase(language, runStatus(selectedRun))} \xB7 ${agentCountLabel(t, agents.length)} \xB7 ${selectedRun.working_dir}`;
1223
1239
  } else if (selected?.type === "action" && selected.action) {
1224
1240
  statusContext = ACTION_COPY[selected.action]?.hint ?? selected.action;
1225
1241
  }
@@ -1270,7 +1286,7 @@ function Runs() {
1270
1286
  primaryWidth: runNameWidth,
1271
1287
  glyph: statusGlyph(runStatus(run)),
1272
1288
  badges,
1273
- hint: `${agents.length} agents`
1289
+ hint: agentCountLabel(t, agents.length)
1274
1290
  },
1275
1291
  run.id
1276
1292
  );
@@ -1279,7 +1295,7 @@ function Runs() {
1279
1295
  Row,
1280
1296
  {
1281
1297
  selected: false,
1282
- primary: `${compactFirstEntry + 1}-${compactFirstEntry + compactEntries.length} of ${selectableEntries.length}`,
1298
+ primary: t("runtime.pageRange", { from: compactFirstEntry + 1, to: compactFirstEntry + compactEntries.length, total: selectableEntries.length }),
1283
1299
  trailing: "scroll with arrows",
1284
1300
  disabled: true
1285
1301
  }
@@ -1314,7 +1330,7 @@ function Runs() {
1314
1330
  primaryWidth: runNameWidth,
1315
1331
  glyph: statusGlyph(runStatus(run)),
1316
1332
  badges,
1317
- hint: `${agents.length} agents`
1333
+ hint: agentCountLabel(t, agents.length)
1318
1334
  },
1319
1335
  run.id
1320
1336
  );
@@ -1323,7 +1339,7 @@ function Runs() {
1323
1339
  Row,
1324
1340
  {
1325
1341
  selected: false,
1326
- primary: `${runScroll + 1}-${runScroll + visibleRuns.length} of ${runs.length}`,
1342
+ primary: t("runtime.pageRange", { from: runScroll + 1, to: runScroll + visibleRuns.length, total: runs.length }),
1327
1343
  trailing: "scroll with arrows",
1328
1344
  disabled: true
1329
1345
  }
@@ -1372,8 +1388,13 @@ function Dialog({
1372
1388
  onConfirm,
1373
1389
  onCancel
1374
1390
  }) {
1391
+ const { language } = useLanguage();
1375
1392
  const [focusedButton, setFocusedButton] = useState9("cancel");
1376
1393
  const borderColor = intent === "danger" ? colors.status.warn : colors.accent.primary;
1394
+ const displayTitle = translatePhrase(language, title);
1395
+ const displayBody = translatePhrase(language, body);
1396
+ const displayConfirm = translatePhrase(language, confirmLabel);
1397
+ const displayCancel = translatePhrase(language, cancelLabel);
1377
1398
  useInput4((input, key) => {
1378
1399
  if (key.leftArrow) {
1379
1400
  setFocusedButton("cancel");
@@ -1401,11 +1422,11 @@ function Dialog({
1401
1422
  ] }, name);
1402
1423
  };
1403
1424
  return /* @__PURE__ */ jsxs14(Box15, { flexDirection: "column", borderStyle: "round", borderColor, paddingX: 2, paddingY: 1, marginY: 1, children: [
1404
- /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: borderColor, bold: true, children: title }) }),
1405
- /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: colors.text.primary, children: body }) }),
1425
+ /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: borderColor, bold: true, children: displayTitle }) }),
1426
+ /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: colors.text.primary, children: displayBody }) }),
1406
1427
  /* @__PURE__ */ jsxs14(Box15, { marginTop: 1, flexDirection: "row", gap: 1, children: [
1407
- renderButton(cancelLabel, "cancel"),
1408
- renderButton(confirmLabel, "confirm")
1428
+ renderButton(displayCancel, "cancel"),
1429
+ renderButton(displayConfirm, "confirm")
1409
1430
  ] })
1410
1431
  ] });
1411
1432
  }
@@ -1989,6 +2010,7 @@ function statusGlyph3(status) {
1989
2010
  }
1990
2011
  function RunAgents() {
1991
2012
  const { selectedRunId, setSelectedAgentId, push, pop } = useRouter();
2013
+ const { language, t } = useLanguage();
1992
2014
  const { rows: termRows } = useWindowSize7();
1993
2015
  const bodyRows = frameBodyRows(termRows, true, true);
1994
2016
  const compactBody = bodyRows <= 9;
@@ -2109,7 +2131,7 @@ function RunAgents() {
2109
2131
  });
2110
2132
  if (!run) {
2111
2133
  return /* @__PURE__ */ jsx24(Frame, { breadcrumb: ["ReevesAgents", "Runs"], statusContext: "Run not found", children: /* @__PURE__ */ jsxs18(Box19, { flexDirection: "column", children: [
2112
- /* @__PURE__ */ jsx24(Text17, { color: colors.text.dim, children: "Run not found." }),
2134
+ /* @__PURE__ */ jsx24(Text17, { color: colors.text.dim, children: translatePhrase(language, "Run not found.") }),
2113
2135
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Row, { selected: true, primary: "Back", hint: "return to all runs" }) })
2114
2136
  ] }) });
2115
2137
  }
@@ -2121,8 +2143,8 @@ function RunAgents() {
2121
2143
  "Add Agent".length,
2122
2144
  "Back".length
2123
2145
  );
2124
- let statusContext = `${run.name} \xB7 ${agents.length} agents`;
2125
- if (selected?.type === "pagination") statusContext = `page ${page} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
2146
+ let statusContext = `${run.name} \xB7 ${agentCountLabel(t, agents.length)}`;
2147
+ if (selected?.type === "pagination") statusContext = t("runtime.pageNav", { page, total: totalPages });
2126
2148
  if (selected?.type === "action" && selected.action === "AddWorker") statusContext = isRunEnded ? "run is ended" : "add an agent to this run";
2127
2149
  if (selected?.type === "action" && selected.action === "Back") statusContext = "return to run hub";
2128
2150
  return /* @__PURE__ */ jsx24(
@@ -2291,6 +2313,7 @@ function peekAgents(agents) {
2291
2313
  }
2292
2314
  function RunOutput() {
2293
2315
  const { selectedRunId, pop, push, setSelectedAgentId } = useRouter();
2316
+ const { language, t } = useLanguage();
2294
2317
  const { rows: termRows } = useWindowSize8();
2295
2318
  const bodyRows = frameBodyRows(termRows, true, true);
2296
2319
  const compactBody = bodyRows <= 12;
@@ -2443,17 +2466,17 @@ function RunOutput() {
2443
2466
  breadcrumb: ["ReevesAgents", "Runs"],
2444
2467
  statusContext: "Run not found",
2445
2468
  children: /* @__PURE__ */ jsxs19(Box20, { flexDirection: "column", children: [
2446
- /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "Run not found." }),
2469
+ /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "Run not found.") }),
2447
2470
  /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Row, { selected: true, primary: "Back", hint: "return to run" }) })
2448
2471
  ] })
2449
2472
  }
2450
2473
  );
2451
2474
  }
2452
2475
  const secondsAgo = Math.floor((Date.now() - lastPeekAt) / 1e3);
2453
- const lastPeekLabel = secondsAgo === 0 ? "just now" : `${secondsAgo}s ago`;
2454
- let statusContext = agents.length > 0 ? `${agents.length} agent${agents.length === 1 ? "" : "s"}` : "no agents";
2455
- if (selected?.type === "agent" && selected.agent) statusContext = `${selected.agent.nickname} \xB7 enter opens output`;
2456
- if (selected?.type === "pagination") statusContext = `page ${activePage} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
2476
+ const lastPeekLabel = secondsAgo === 0 ? t("runtime.justNow") : t("runtime.secondsAgo", { seconds: secondsAgo });
2477
+ let statusContext = agents.length > 0 ? agentCountLabel(t, agents.length) : "no agents";
2478
+ if (selected?.type === "agent" && selected.agent) statusContext = `${selected.agent.nickname} \xB7 ${t("runtime.enterOpensOutput")}`;
2479
+ if (selected?.type === "pagination") statusContext = t("runtime.pageNav", { page: activePage, total: totalPages });
2457
2480
  return /* @__PURE__ */ jsx25(
2458
2481
  Frame,
2459
2482
  {
@@ -2512,14 +2535,14 @@ function RunOutput() {
2512
2535
  { label: providerLabel, color: providerColor(agent.provider) },
2513
2536
  { label: modelBadgeLabel(agent.model), color: modelColor(agent.model, agent.provider) }
2514
2537
  ],
2515
- hint: "enter opens output"
2538
+ hint: t("runtime.enterOpensOutput")
2516
2539
  },
2517
2540
  agent.id
2518
2541
  );
2519
2542
  }),
2520
2543
  /* @__PURE__ */ jsx25(SectionEnd, {})
2521
2544
  ] }) : /* @__PURE__ */ jsxs19(Box20, { flexDirection: "column", children: [
2522
- agents.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "No agents in this run." }) : pagedAgents.map((agent) => {
2545
+ agents.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "No agents in this run.") }) : pagedAgents.map((agent) => {
2523
2546
  const peek = peeks[agent.id] || "";
2524
2547
  const lines = peek ? peek.split("\n").slice(-PREVIEW_LINES) : [];
2525
2548
  const isSelected = selected?.type === "agent" && selected.agent?.id === agent.id;
@@ -2536,7 +2559,7 @@ function RunOutput() {
2536
2559
  /* @__PURE__ */ jsx25(Text18, { color: modelHue, children: modelBadgeLabel(agent.model) }),
2537
2560
  /* @__PURE__ */ jsx25(Text18, { color: colors.surface.border, children: "]" })
2538
2561
  ] }),
2539
- /* @__PURE__ */ jsx25(Box20, { marginTop: space.sm, children: lines.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "(no output yet)" }) : /* @__PURE__ */ jsx25(Box20, { flexDirection: "column", children: lines.map((line, lineIdx) => /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: line }, lineIdx)) }) })
2562
+ /* @__PURE__ */ jsx25(Box20, { marginTop: space.sm, children: lines.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "(no output yet)") }) : /* @__PURE__ */ jsx25(Box20, { flexDirection: "column", children: lines.map((line, lineIdx) => /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: line }, lineIdx)) }) })
2540
2563
  ] }) }) }, agent.id);
2541
2564
  }),
2542
2565
  totalPages > 1 && /* @__PURE__ */ jsx25(
@@ -2598,7 +2621,7 @@ var ACTION_LABEL_WIDTH5 = Math.max(
2598
2621
  function AgentDetail() {
2599
2622
  const { selectedAgentId, push, pop } = useRouter();
2600
2623
  const { toast } = useToast();
2601
- const { t } = useLanguage();
2624
+ const { t, language } = useLanguage();
2602
2625
  const { rows: termRows } = useWindowSize9();
2603
2626
  const bodyRows = frameBodyRows(termRows, true, true);
2604
2627
  const compactBody = bodyRows <= 8;
@@ -2701,7 +2724,7 @@ function AgentDetail() {
2701
2724
  breadcrumb: ["ReevesAgents", "Runs"],
2702
2725
  statusContext: "Agent not found",
2703
2726
  children: /* @__PURE__ */ jsxs20(Box21, { flexDirection: "column", children: [
2704
- /* @__PURE__ */ jsx26(Text19, { color: colors.text.dim, children: "Agent not found." }),
2727
+ /* @__PURE__ */ jsx26(Text19, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
2705
2728
  /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(
2706
2729
  Row,
2707
2730
  {
@@ -2833,6 +2856,7 @@ var ACTION_LABEL_WIDTH6 = Math.max("Refresh Now".length, "Open Agent".length, "B
2833
2856
  function AgentOutput() {
2834
2857
  const { selectedAgentId, pop } = useRouter();
2835
2858
  const { toast } = useToast();
2859
+ const { language, t } = useLanguage();
2836
2860
  const { rows: termRows } = useWindowSize10();
2837
2861
  const bodyRows = frameBodyRows(termRows, true, true);
2838
2862
  const compactBody = bodyRows <= 9;
@@ -2960,7 +2984,7 @@ function AgentOutput() {
2960
2984
  breadcrumb: ["ReevesAgents", "Runs"],
2961
2985
  statusContext: "Agent not found",
2962
2986
  children: /* @__PURE__ */ jsxs21(Box22, { flexDirection: "column", children: [
2963
- /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: "Agent not found." }),
2987
+ /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
2964
2988
  /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(
2965
2989
  Row,
2966
2990
  {
@@ -2977,9 +3001,9 @@ function AgentOutput() {
2977
3001
  const isAgentEnded = agent.ended_at !== null;
2978
3002
  const canOpenAgent = !isAgentEnded && !isHeadless && !!agent.tmux_window_id;
2979
3003
  const openDisabledHint = isAgentEnded ? "agent has ended" : "no tmux window";
2980
- let statusContext = `${agent.nickname} \xB7 output`;
3004
+ let statusContext = `${agent.nickname} \xB7 ${t("runtime.output")}`;
2981
3005
  if (selected?.type === "pagination") {
2982
- statusContext = `output page ${activePage} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
3006
+ statusContext = t("runtime.outputPageNav", { page: activePage, total: totalPages });
2983
3007
  } else if (selected?.type === "action") {
2984
3008
  const actionLabels = {
2985
3009
  RefreshNow: "fetch output now",
@@ -3027,7 +3051,7 @@ function AgentOutput() {
3027
3051
  overflow: "hidden",
3028
3052
  children: [
3029
3053
  visibleOutputLines.map((line, idx) => /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: line }, idx)),
3030
- visibleOutputLines.length === 0 && /* @__PURE__ */ jsx27(Text20, { color: colors.text.muted, children: "(no output yet)" })
3054
+ visibleOutputLines.length === 0 && /* @__PURE__ */ jsx27(Text20, { color: colors.text.muted, children: translatePhrase(language, "(no output yet)") })
3031
3055
  ]
3032
3056
  }
3033
3057
  )
@@ -3083,6 +3107,7 @@ import { Box as Box23, Text as Text21, useInput as useInput12 } from "ink";
3083
3107
  import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3084
3108
  function AgentTask() {
3085
3109
  const { selectedAgentId, pop } = useRouter();
3110
+ const { language, t } = useLanguage();
3086
3111
  const [agent] = useState16(
3087
3112
  () => selectedAgentId ? (() => {
3088
3113
  try {
@@ -3108,7 +3133,7 @@ function AgentTask() {
3108
3133
  });
3109
3134
  if (!agent || !run) {
3110
3135
  return /* @__PURE__ */ jsx28(Frame, { breadcrumb: ["ReevesAgents", "Runs"], statusContext: "Agent not found", children: /* @__PURE__ */ jsxs22(Box23, { flexDirection: "column", children: [
3111
- /* @__PURE__ */ jsx28(Text21, { color: colors.text.dim, children: "Agent not found." }),
3136
+ /* @__PURE__ */ jsx28(Text21, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
3112
3137
  /* @__PURE__ */ jsx28(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx28(Row, { selected: true, primary: "Back", hint: "return to agent detail" }) })
3113
3138
  ] }) });
3114
3139
  }
@@ -3129,7 +3154,7 @@ function AgentTask() {
3129
3154
  {
3130
3155
  selected: false,
3131
3156
  primary: "Last seen",
3132
- trailing: agent.last_seen ? `${Math.round((Date.now() - agent.last_seen) / 1e3)}s ago` : "never"
3157
+ trailing: agent.last_seen ? t("runtime.secondsAgo", { seconds: Math.round((Date.now() - agent.last_seen) / 1e3) }) : "never"
3133
3158
  }
3134
3159
  ),
3135
3160
  /* @__PURE__ */ jsx28(SectionEnd, {}),
@@ -3196,7 +3221,7 @@ function AgentKill() {
3196
3221
  breadcrumb: ["ReevesAgents", "Runs"],
3197
3222
  statusContext: "Agent not found",
3198
3223
  children: /* @__PURE__ */ jsxs23(Box24, { flexDirection: "column", children: [
3199
- /* @__PURE__ */ jsx29(Text22, { color: colors.text.dim, children: "Agent not found." }),
3224
+ /* @__PURE__ */ jsx29(Text22, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
3200
3225
  /* @__PURE__ */ jsx29(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx29(
3201
3226
  Row,
3202
3227
  {
@@ -3336,7 +3361,7 @@ function TextField({
3336
3361
  const displayHelpText = helpText ? translatePhrase(language, helpText) : helpText;
3337
3362
  const labelText = `${displayLabel}${required ? " *" : ""}`;
3338
3363
  const contentWidth = Math.max(1, width - 6);
3339
- const labelWidth = Math.max(1, Math.min(Math.max(12, labelText.length), Math.floor(contentWidth * 0.35)));
3364
+ const labelWidth = Math.max(1, Math.min(Math.max(12, displayWidth(labelText)), Math.floor(contentWidth * 0.35)));
3340
3365
  const valueWidth = Math.max(1, contentWidth - labelWidth - sep.pipe.length);
3341
3366
  const lines = multiline ? wrapLines(displayValue, valueWidth) : [displayValue];
3342
3367
  return /* @__PURE__ */ jsxs25(Box26, { flexDirection: "column", width, children: [
@@ -4263,6 +4288,7 @@ function permissionDisplay3(value) {
4263
4288
  function NewRunReview() {
4264
4289
  const { push, pop } = useRouter();
4265
4290
  const { state, reset } = useWizard();
4291
+ const { t } = useLanguage();
4266
4292
  const { rows: termRows } = useWindowSize15();
4267
4293
  const bodyRows = frameBodyRows(termRows, true, false);
4268
4294
  const compactBody = bodyRows <= 14;
@@ -4311,7 +4337,7 @@ function NewRunReview() {
4311
4337
  !compactBody && /* @__PURE__ */ jsx38(StepIndicator, { step: 4, total: 4, name: "Review" }),
4312
4338
  compactBody ? /* @__PURE__ */ jsxs31(Fragment9, { children: [
4313
4339
  /* @__PURE__ */ jsx38(Section, { label: "Review" }),
4314
- showCompactSummary && /* @__PURE__ */ jsx38(Row, { selected: false, primary: state.name || "(unset)", trailing: `${state.workers.length + 1} agents`, alwaysShowTrailing: true, disabled: true }),
4340
+ showCompactSummary && /* @__PURE__ */ jsx38(Row, { selected: false, primary: state.name || "(unset)", trailing: agentCountLabel(t, state.workers.length + 1), alwaysShowTrailing: true, disabled: true }),
4315
4341
  actions.map((action, idx) => /* @__PURE__ */ jsx38(
4316
4342
  Row,
4317
4343
  {
@@ -4335,7 +4361,7 @@ function NewRunReview() {
4335
4361
  /* @__PURE__ */ jsx38(Row, { selected: false, primary: showEffort ? "Permissions / Effort" : "Permissions", trailing: permissionsSummary }),
4336
4362
  /* @__PURE__ */ jsx38(SectionEnd, {}),
4337
4363
  state.workers.length > 0 && /* @__PURE__ */ jsxs31(Fragment9, { children: [
4338
- /* @__PURE__ */ jsx38(Section, { label: `Additional Agents (${state.workers.length})` }),
4364
+ /* @__PURE__ */ jsx38(Section, { label: t("runtime.additionalAgentsCount", { count: state.workers.length }) }),
4339
4365
  state.workers.map((worker, idx) => /* @__PURE__ */ jsx38(
4340
4366
  Row,
4341
4367
  {
@@ -4352,12 +4378,12 @@ function NewRunReview() {
4352
4378
  /* @__PURE__ */ jsx38(SectionEnd, {})
4353
4379
  ] }),
4354
4380
  /* @__PURE__ */ jsx38(Section, { label: "Planned Tmux Windows" }),
4355
- /* @__PURE__ */ jsx38(Row, { selected: false, primary: "agent 1", trailing: providerDisplayName(state.root.provider) }),
4381
+ /* @__PURE__ */ jsx38(Row, { selected: false, primary: t("runtime.agentN", { n: 1 }), trailing: providerDisplayName(state.root.provider) }),
4356
4382
  state.workers.map((worker, idx) => /* @__PURE__ */ jsx38(
4357
4383
  Row,
4358
4384
  {
4359
4385
  selected: false,
4360
- primary: `agent ${idx + 2}`,
4386
+ primary: t("runtime.agentN", { n: idx + 2 }),
4361
4387
  trailing: worker.nickname || providerDisplayName(worker.provider)
4362
4388
  },
4363
4389
  `tmux-${idx}`
@@ -4413,6 +4439,7 @@ var ACTION_LABEL_WIDTH12 = Math.max("Retry".length, "Back to Review".length);
4413
4439
  function NewRunStarting() {
4414
4440
  const { pop, resetStack, setSelectedRunId } = useRouter();
4415
4441
  const { state, reset } = useWizard();
4442
+ const { t } = useLanguage();
4416
4443
  const [error, setError] = useState25(null);
4417
4444
  const [actionIdx, setActionIdx] = useState25(0);
4418
4445
  const [retryCount, setRetryCount] = useState25(0);
@@ -4493,7 +4520,7 @@ function NewRunStarting() {
4493
4520
  statusKeys: "enter select \xB7 \u2191\u2193 move \xB7 esc back",
4494
4521
  children: [
4495
4522
  /* @__PURE__ */ jsx40(Box28, { flexDirection: "column", marginY: 1, children: /* @__PURE__ */ jsxs33(Text27, { children: [
4496
- "Error: ",
4523
+ t("runtime.errorPrefix"),
4497
4524
  error
4498
4525
  ] }) }),
4499
4526
  /* @__PURE__ */ jsx40(Section, { label: "Actions" }),
@@ -4520,9 +4547,8 @@ function NewRunStarting() {
4520
4547
  children: /* @__PURE__ */ jsxs33(Box28, { flexDirection: "row", marginY: 1, children: [
4521
4548
  /* @__PURE__ */ jsx40(Spinner, {}),
4522
4549
  /* @__PURE__ */ jsxs33(Text27, { children: [
4523
- " Launching ",
4524
- state.name,
4525
- "..."
4550
+ " ",
4551
+ t("runtime.launching", { name: state.name })
4526
4552
  ] })
4527
4553
  ] })
4528
4554
  }
@@ -4926,7 +4952,8 @@ function Settings() {
4926
4952
  const { language, setLanguage, t } = useLanguage();
4927
4953
  const { rows: termRows } = useWindowSize17();
4928
4954
  const bodyRows = frameBodyRows(termRows, true, true);
4929
- const compactBody = bodyRows <= 13;
4955
+ const nonCompactRows = PROVIDERS.length + LANGUAGE_OPTIONS.length + 3 + 4 + 8;
4956
+ const compactBody = bodyRows < nonCompactRows;
4930
4957
  const showCompactStatePaths = compactBody && bodyRows >= 10;
4931
4958
  const [selectedIdx, setSelectedIdx] = useState27(0);
4932
4959
  const [refreshKey, setRefreshKey] = useState27(0);
@@ -5407,6 +5434,7 @@ var CONTENT = [
5407
5434
  ];
5408
5435
  function Reference() {
5409
5436
  const { pop } = useRouter();
5437
+ const { t } = useLanguage();
5410
5438
  const { rows } = useWindowSize19();
5411
5439
  const bodyRows = frameBodyRows(rows, true, true);
5412
5440
  const compactBody = bodyRows <= 10;
@@ -5425,7 +5453,7 @@ function Reference() {
5425
5453
  if (key.return || key.escape || key.backspace) pop();
5426
5454
  });
5427
5455
  const visible = CONTENT.slice(scroll, scroll + visibleCount);
5428
- const statusContext = maxScroll > 0 ? `Reference ${scroll + 1}-${Math.min(CONTENT.length, scroll + visibleCount)} of ${CONTENT.length}` : "ReevesAgents reference";
5456
+ const statusContext = maxScroll > 0 ? t("runtime.referenceRange", { from: scroll + 1, to: Math.min(CONTENT.length, scroll + visibleCount), total: CONTENT.length }) : "ReevesAgents reference";
5429
5457
  const contentRows = [];
5430
5458
  let openSection = false;
5431
5459
  visible.forEach((item, idx) => {
@@ -5452,7 +5480,7 @@ function Reference() {
5452
5480
  Row,
5453
5481
  {
5454
5482
  selected: false,
5455
- primary: `${scroll + 1}-${Math.min(CONTENT.length, scroll + visibleCount)} of ${CONTENT.length}`,
5483
+ primary: t("runtime.pageRange", { from: scroll + 1, to: Math.min(CONTENT.length, scroll + visibleCount), total: CONTENT.length }),
5456
5484
  trailing: "scroll with arrows",
5457
5485
  disabled: true
5458
5486
  }
@@ -5474,6 +5502,7 @@ import { Box as Box32, useInput as useInput25, useWindowSize as useWindowSize20
5474
5502
  import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
5475
5503
  function Credits() {
5476
5504
  const { pop } = useRouter();
5505
+ const { t } = useLanguage();
5477
5506
  const { rows: termRows } = useWindowSize20();
5478
5507
  const bodyRows = frameBodyRows(termRows, true, true);
5479
5508
  const compactBody = bodyRows <= 8;
@@ -5516,7 +5545,7 @@ function Credits() {
5516
5545
  Row,
5517
5546
  {
5518
5547
  selected: false,
5519
- primary: `${scroll + 1}-${scroll + visible.length} of ${content.length}`,
5548
+ primary: t("runtime.pageRange", { from: scroll + 1, to: scroll + visible.length, total: content.length }),
5520
5549
  trailing: "scroll with arrows",
5521
5550
  disabled: true
5522
5551
  }
@@ -5544,6 +5573,7 @@ function statusGlyph4(status) {
5544
5573
  }
5545
5574
  function Doctor() {
5546
5575
  const { pop, push, setSelectedCheckName } = useRouter();
5576
+ const { language } = useLanguage();
5547
5577
  const { rows: termRows } = useWindowSize21();
5548
5578
  const bodyRows = frameBodyRows(termRows, true, true);
5549
5579
  const compactBody = bodyRows <= 10;
@@ -5632,7 +5662,7 @@ function Doctor() {
5632
5662
  statusContext: selectedCheck ? `${selectedCheck.name}: ${selectedCheck.detail}` : "",
5633
5663
  children: compactBody ? /* @__PURE__ */ jsxs39(Primary, { children: [
5634
5664
  /* @__PURE__ */ jsx48(Section, { label: selectedIdx < pagedChecks.length ? "Checks" : "Actions" }),
5635
- isSpinning ? /* @__PURE__ */ jsx48(Spinner, { label: "checking...", color: colors.accent.bright }) : compactEntryIndexes.map((idx) => {
5665
+ isSpinning ? /* @__PURE__ */ jsx48(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }) : compactEntryIndexes.map((idx) => {
5636
5666
  if (idx < pagedChecks.length) {
5637
5667
  const check = pagedChecks[idx];
5638
5668
  return /* @__PURE__ */ jsx48(
@@ -5667,7 +5697,7 @@ function Doctor() {
5667
5697
  }),
5668
5698
  /* @__PURE__ */ jsx48(SectionEnd, {})
5669
5699
  ] }) : /* @__PURE__ */ jsxs39(Primary, { children: [
5670
- isSpinning && /* @__PURE__ */ jsx48(Spinner, { label: "checking...", color: colors.accent.bright }),
5700
+ isSpinning && /* @__PURE__ */ jsx48(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }),
5671
5701
  !isSpinning && pagedChecks.map((check, idx) => /* @__PURE__ */ jsx48(
5672
5702
  Row,
5673
5703
  {
@@ -5729,6 +5759,7 @@ function findFixHint(check) {
5729
5759
  }
5730
5760
  function DoctorCheck() {
5731
5761
  const { pop, selectedCheckName } = useRouter();
5762
+ const { language } = useLanguage();
5732
5763
  const [selectedIdx, setSelectedIdx] = useState32(0);
5733
5764
  const result = useMemo11(() => runDoctor(), []);
5734
5765
  const check = result.checks.find((c) => c.name === selectedCheckName);
@@ -5776,15 +5807,15 @@ function DoctorCheck() {
5776
5807
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
5777
5808
  /* @__PURE__ */ jsx49(Section, { label: "Fix" }),
5778
5809
  /* @__PURE__ */ jsxs40(Box34, { marginY: 1, marginLeft: 2, flexDirection: "column", children: [
5779
- /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: "Suggested fix:" }),
5780
- /* @__PURE__ */ jsx49(Text28, { color: colors.accent.primary, children: fixHint })
5810
+ /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: translatePhrase(language, "Suggested fix:") }),
5811
+ /* @__PURE__ */ jsx49(Text28, { color: colors.accent.primary, children: translatePhrase(language, fixHint) })
5781
5812
  ] }),
5782
5813
  /* @__PURE__ */ jsx49(SectionEnd, {})
5783
5814
  ] }),
5784
5815
  !fixHint && /* @__PURE__ */ jsxs40(Fragment15, { children: [
5785
5816
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
5786
5817
  /* @__PURE__ */ jsx49(Section, { label: "Fix" }),
5787
- /* @__PURE__ */ jsx49(Box34, { marginY: 1, marginLeft: 2, children: /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: "No suggested fix. Check the source code or open an issue." }) }),
5818
+ /* @__PURE__ */ jsx49(Box34, { marginY: 1, marginLeft: 2, children: /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: translatePhrase(language, "No suggested fix. Check the source code or open an issue.") }) }),
5788
5819
  /* @__PURE__ */ jsx49(SectionEnd, {})
5789
5820
  ] }),
5790
5821
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
@@ -5957,6 +5988,7 @@ function isNumeric(field) {
5957
5988
  function Config() {
5958
5989
  const { pop } = useRouter();
5959
5990
  const { toast } = useToast();
5991
+ const { language } = useLanguage();
5960
5992
  const [global, setGlobal] = useState34(() => loadConfig().global);
5961
5993
  const [selectedIdx, setSelectedIdx] = useState34(0);
5962
5994
  const [editingKey, setEditingKey] = useState34(null);
@@ -6039,7 +6071,7 @@ function Config() {
6039
6071
  {
6040
6072
  selected: selectedIdx === idx,
6041
6073
  primary: field.label,
6042
- trailing: `\u2039 ${String(value)} \u203A`,
6074
+ trailing: `\u2039 ${translatePhrase(language, String(value))} \u203A`,
6043
6075
  hint: selectedIdx === idx ? "\u2190 \u2192 cycle" : void 0
6044
6076
  },
6045
6077
  field.key
@@ -6411,4 +6443,4 @@ export {
6411
6443
  nextHistoryOnReset,
6412
6444
  useRouter
6413
6445
  };
6414
- //# sourceMappingURL=router-I4WDR7CD.js.map
6446
+ //# sourceMappingURL=router-TGRU5BFX.js.map
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- localeCatalog
4
- } from "./chunk-4LWTEYRI.js";
3
+ localeCatalog,
4
+ translatePhrase
5
+ } from "./chunk-YMUISYYB.js";
5
6
  import {
6
7
  modelValuesForProvider
7
8
  } from "./chunk-HS6TOISU.js";
@@ -655,7 +656,11 @@ function attachAllMcpHostsAction() {
655
656
  return { results: attachAll(), hosts: hostStatus() };
656
657
  }
657
658
  function configPayload() {
658
- return { config: loadConfig().global, fields: CONFIG_FIELDS.filter((field) => field.kind !== "language") };
659
+ const config = loadConfig().global;
660
+ return {
661
+ config,
662
+ fields: CONFIG_FIELDS.filter((field) => field.kind !== "language").map((field) => ({ ...field, label: translatePhrase(config.language, field.label) }))
663
+ };
659
664
  }
660
665
  function updateConfigAction(body) {
661
666
  const patch = {};
@@ -1006,4 +1011,4 @@ async function startWebServer(options = {}) {
1006
1011
  export {
1007
1012
  startWebServer
1008
1013
  };
1009
- //# sourceMappingURL=server-ZJKAIRL5.js.map
1014
+ //# sourceMappingURL=server-GYB53IBP.js.map
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  closeTuiWebServer,
4
4
  startWebFromTui
5
- } from "./chunk-5DOCQLT7.js";
5
+ } from "./chunk-2LC6V55H.js";
6
6
  export {
7
7
  closeTuiWebServer,
8
8
  startWebFromTui
9
9
  };
10
- //# sourceMappingURL=tui-launch-VHLX6JOW.js.map
10
+ //# sourceMappingURL=tui-launch-45ERRX5M.js.map