reevesagents 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +14 -5
- package/CHANGELOG.md +28 -0
- package/README.md +114 -45
- package/dist/{chunk-VTLLF2Z4.js → chunk-6RPG22BH.js} +2 -148
- package/dist/{chunk-KVMBCWLI.js → chunk-BWJKK6LM.js} +252 -2
- package/dist/{chunk-GUM4JMVF.js → chunk-HL5MTR5M.js} +2 -2
- package/dist/{chunk-36SYE7IU.js → chunk-LKJSQLX2.js} +256 -10
- package/dist/{chunk-TO32PH23.js → chunk-LZMMFJYG.js} +2 -2
- package/dist/chunk-OHEIERAD.js +61 -0
- package/dist/cli.js +150 -36
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/{router-AOJOUKAY.js → router-7MRY24Y5.js} +325 -211
- package/dist/{server-Y4HMP3OI.js → server-BNCUJ4YU.js} +20 -15
- package/dist/{server-I2ROVLSH.js → server-TUKVM6PW.js} +74 -28
- package/dist/{tui-launch-SJNFGH42.js → tui-launch-Y5YXPUHS.js} +2 -2
- package/dist/web/app.js +42 -1
- package/dist/web/index.html +24 -0
- package/package.json +1 -1
- package/dist/chunk-5Q5XP5QI.js +0 -29
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
buildOnboardingState,
|
|
3
4
|
readTuiOpenToken
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OHEIERAD.js";
|
|
5
6
|
import {
|
|
6
7
|
translate,
|
|
7
8
|
translatePhrase
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BWJKK6LM.js";
|
|
9
10
|
import {
|
|
10
11
|
modelDisplayName,
|
|
11
12
|
modelValuesForProvider
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LZMMFJYG.js";
|
|
13
14
|
import {
|
|
14
15
|
REEVESAGENTS_VERSION,
|
|
15
|
-
attach,
|
|
16
|
-
attachAll,
|
|
17
|
-
detach,
|
|
18
|
-
hostStatus,
|
|
19
16
|
listRunApprovals,
|
|
20
17
|
resolveRunApproval
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6RPG22BH.js";
|
|
22
19
|
import {
|
|
23
20
|
CONFIG_FIELDS,
|
|
24
21
|
DEFAULT_LANGUAGE,
|
|
25
22
|
LANGUAGE_OPTIONS,
|
|
26
23
|
PROVIDERS,
|
|
27
24
|
archiveAndRemoveRun,
|
|
25
|
+
attach,
|
|
26
|
+
attachAll,
|
|
28
27
|
autoCleanupRuns,
|
|
28
|
+
coerceExtraArgs,
|
|
29
29
|
colors,
|
|
30
30
|
computeRunStatus,
|
|
31
31
|
configExists,
|
|
@@ -33,8 +33,10 @@ import {
|
|
|
33
33
|
deleteAgent,
|
|
34
34
|
deletePreset,
|
|
35
35
|
deleteRunHistory,
|
|
36
|
+
detach,
|
|
36
37
|
detectAvailable,
|
|
37
38
|
findAgent,
|
|
39
|
+
hostStatus,
|
|
38
40
|
killAgent,
|
|
39
41
|
languageOption,
|
|
40
42
|
listAgents,
|
|
@@ -68,14 +70,14 @@ import {
|
|
|
68
70
|
startRunFromPreset,
|
|
69
71
|
stateRoot,
|
|
70
72
|
stopRun
|
|
71
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-LKJSQLX2.js";
|
|
72
74
|
import "./chunk-D24DQQ6V.js";
|
|
73
75
|
import {
|
|
74
76
|
startWebFromTui
|
|
75
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-HL5MTR5M.js";
|
|
76
78
|
|
|
77
79
|
// src/tui/router.tsx
|
|
78
|
-
import { createContext as createContext6, useContext as useContext6, useState as
|
|
80
|
+
import { createContext as createContext6, useContext as useContext6, useState as useState37, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
|
|
79
81
|
import { useApp as useApp3 } from "ink";
|
|
80
82
|
|
|
81
83
|
// src/tui/contexts/ToastContext.tsx
|
|
@@ -125,7 +127,8 @@ var INITIAL_WORKER = {
|
|
|
125
127
|
workingDir: "",
|
|
126
128
|
permissions: "ask",
|
|
127
129
|
authMode: "default",
|
|
128
|
-
effort: "default"
|
|
130
|
+
effort: "default",
|
|
131
|
+
extraArgs: ""
|
|
129
132
|
};
|
|
130
133
|
var INITIAL_STATE = {
|
|
131
134
|
presetName: null,
|
|
@@ -198,7 +201,8 @@ var INITIAL_DRAFT = {
|
|
|
198
201
|
workingDir: process.cwd(),
|
|
199
202
|
permissions: "ask",
|
|
200
203
|
authMode: "default",
|
|
201
|
-
effort: "default"
|
|
204
|
+
effort: "default",
|
|
205
|
+
extraArgs: ""
|
|
202
206
|
};
|
|
203
207
|
function useWorkerDraft() {
|
|
204
208
|
const ctx = useContext3(WorkerDraftContext);
|
|
@@ -711,8 +715,9 @@ function LanguageSelect() {
|
|
|
711
715
|
const visibleOptions = LANGUAGE_OPTIONS.slice(firstVisible, firstVisible + visibleLanguageCount);
|
|
712
716
|
function choose() {
|
|
713
717
|
const option = LANGUAGE_OPTIONS[selectedIdx] ?? LANGUAGE_OPTIONS[0];
|
|
718
|
+
const firstRun = !configExists();
|
|
714
719
|
setLanguage(option.code);
|
|
715
|
-
replace("Welcome");
|
|
720
|
+
replace(firstRun ? "Setup" : "Welcome");
|
|
716
721
|
}
|
|
717
722
|
useInput((_input, key) => {
|
|
718
723
|
if (key.upArrow) {
|
|
@@ -3625,8 +3630,9 @@ function NewRunRoot() {
|
|
|
3625
3630
|
if (providerSupportsEffort(state.root.provider)) {
|
|
3626
3631
|
list.push({ kind: "picker", id: "effort", label: "Effort", current: state.root.effort, values: EFFORT_VALUES });
|
|
3627
3632
|
}
|
|
3633
|
+
list.push({ kind: "text", id: "extraArgs", label: "Extra Args", value: state.root.extraArgs, helpText: "optional launch flags, e.g. --remote-control", required: false });
|
|
3628
3634
|
return list;
|
|
3629
|
-
}, [state.root.provider, state.root.model, state.root.prompt, state.root.permissions, state.root.authMode, state.root.effort]);
|
|
3635
|
+
}, [state.root.provider, state.root.model, state.root.prompt, state.root.permissions, state.root.authMode, state.root.effort, state.root.extraArgs]);
|
|
3630
3636
|
const actions = [
|
|
3631
3637
|
{ id: "continue", label: "Continue", hint: "to additional agents" },
|
|
3632
3638
|
{ id: "back", label: "Back", hint: "return to basics" },
|
|
@@ -3672,6 +3678,7 @@ function NewRunRoot() {
|
|
|
3672
3678
|
}
|
|
3673
3679
|
function commitText(id, value) {
|
|
3674
3680
|
if (id === "prompt") updateRoot({ prompt: value });
|
|
3681
|
+
else if (id === "extraArgs") updateRoot({ extraArgs: value });
|
|
3675
3682
|
}
|
|
3676
3683
|
function cyclePicker(id, dir) {
|
|
3677
3684
|
if (id === "provider") {
|
|
@@ -4062,6 +4069,7 @@ function NewRunWorker() {
|
|
|
4062
4069
|
if (providerSupportsEffort(worker.provider)) {
|
|
4063
4070
|
list.push({ kind: "picker", id: "effort", label: "Effort", current: worker.effort, values: EFFORT_VALUES2 });
|
|
4064
4071
|
}
|
|
4072
|
+
list.push({ kind: "text", id: "extraArgs", label: "Extra Args", value: worker.extraArgs, helpText: "optional launch flags, e.g. --remote-control", required: false });
|
|
4065
4073
|
return list;
|
|
4066
4074
|
}, [worker]);
|
|
4067
4075
|
const actions = [
|
|
@@ -4115,6 +4123,7 @@ function NewRunWorker() {
|
|
|
4115
4123
|
if (id === "nickname") updateWorker(idx, { nickname: value });
|
|
4116
4124
|
else if (id === "prompt") updateWorker(idx, { prompt: value });
|
|
4117
4125
|
else if (id === "workingDir") updateWorker(idx, { workingDir: value });
|
|
4126
|
+
else if (id === "extraArgs") updateWorker(idx, { extraArgs: value });
|
|
4118
4127
|
}
|
|
4119
4128
|
function cyclePicker(id, dir) {
|
|
4120
4129
|
if (!worker || idx < 0) return;
|
|
@@ -4361,6 +4370,7 @@ function NewRunReview() {
|
|
|
4361
4370
|
/* @__PURE__ */ jsx38(Row, { selected: false, primary: "Model", badge: { label: modelBadgeLabel(state.root.model), color: modelColor(state.root.model, state.root.provider) } }),
|
|
4362
4371
|
/* @__PURE__ */ jsx38(Row, { selected: false, primary: "Prompt", trailing: promptPreview || "(none)" }),
|
|
4363
4372
|
/* @__PURE__ */ jsx38(Row, { selected: false, primary: showEffort ? "Permissions / Effort" : "Permissions", trailing: permissionsSummary }),
|
|
4373
|
+
state.root.extraArgs.trim().length > 0 ? /* @__PURE__ */ jsx38(Row, { selected: false, primary: "Extra Args", trailing: state.root.extraArgs.trim() }) : null,
|
|
4364
4374
|
/* @__PURE__ */ jsx38(SectionEnd, {}),
|
|
4365
4375
|
state.workers.length > 0 && /* @__PURE__ */ jsxs31(Fragment9, { children: [
|
|
4366
4376
|
/* @__PURE__ */ jsx38(Section, { label: t("runtime.additionalAgentsCount", { count: state.workers.length }) }),
|
|
@@ -4455,7 +4465,8 @@ function NewRunStarting() {
|
|
|
4455
4465
|
auth_mode: state.root.authMode,
|
|
4456
4466
|
effort: state.root.effort,
|
|
4457
4467
|
task: state.root.prompt,
|
|
4458
|
-
permissions: state.root.permissions
|
|
4468
|
+
permissions: state.root.permissions,
|
|
4469
|
+
extra_args: coerceExtraArgs(state.root.extraArgs)
|
|
4459
4470
|
},
|
|
4460
4471
|
workers: state.workers.map((w) => ({
|
|
4461
4472
|
nickname: w.nickname,
|
|
@@ -4465,7 +4476,8 @@ function NewRunStarting() {
|
|
|
4465
4476
|
effort: w.effort,
|
|
4466
4477
|
task: w.prompt,
|
|
4467
4478
|
working_dir: w.workingDir,
|
|
4468
|
-
permissions: w.permissions
|
|
4479
|
+
permissions: w.permissions,
|
|
4480
|
+
extra_args: coerceExtraArgs(w.extraArgs)
|
|
4469
4481
|
})),
|
|
4470
4482
|
preset_name: state.presetName
|
|
4471
4483
|
};
|
|
@@ -4618,6 +4630,7 @@ function AddWorker() {
|
|
|
4618
4630
|
if (providerSupportsEffort(draft.provider)) {
|
|
4619
4631
|
list.push({ kind: "picker", id: "effort", label: "Effort", current: draft.effort, values: EFFORT_VALUES3 });
|
|
4620
4632
|
}
|
|
4633
|
+
list.push({ kind: "text", id: "extraArgs", label: "Extra Args", value: draft.extraArgs, helpText: "optional launch flags, e.g. --remote-control", required: false });
|
|
4621
4634
|
return list;
|
|
4622
4635
|
}, [draft]);
|
|
4623
4636
|
const actions = [
|
|
@@ -4663,6 +4676,7 @@ function AddWorker() {
|
|
|
4663
4676
|
if (id === "nickname") update({ nickname: value });
|
|
4664
4677
|
else if (id === "prompt") update({ prompt: value });
|
|
4665
4678
|
else if (id === "workingDir") update({ workingDir: value });
|
|
4679
|
+
else if (id === "extraArgs") update({ extraArgs: value });
|
|
4666
4680
|
}
|
|
4667
4681
|
function cyclePicker(id, dir) {
|
|
4668
4682
|
if (id === "provider") update({ provider: cycle3(PROVIDERS, draft.provider, dir), model: "" });
|
|
@@ -4690,7 +4704,8 @@ function AddWorker() {
|
|
|
4690
4704
|
working_dir: draft.workingDir || void 0,
|
|
4691
4705
|
permissions: draft.permissions,
|
|
4692
4706
|
auth_mode: draft.authMode,
|
|
4693
|
-
effort: draft.effort
|
|
4707
|
+
effort: draft.effort,
|
|
4708
|
+
extra_args: coerceExtraArgs(draft.extraArgs)
|
|
4694
4709
|
});
|
|
4695
4710
|
reset();
|
|
4696
4711
|
pop();
|
|
@@ -4961,19 +4976,20 @@ function Settings() {
|
|
|
4961
4976
|
const { language, setLanguage, t } = useLanguage();
|
|
4962
4977
|
const { rows: termRows } = useWindowSize17();
|
|
4963
4978
|
const bodyRows = frameBodyRows(termRows, true, true);
|
|
4964
|
-
const nonCompactRows = PROVIDERS.length + LANGUAGE_OPTIONS.length + 3 +
|
|
4979
|
+
const nonCompactRows = PROVIDERS.length + LANGUAGE_OPTIONS.length + 3 + 5 + 8;
|
|
4965
4980
|
const compactBody = bodyRows < nonCompactRows;
|
|
4966
4981
|
const showCompactStatePaths = compactBody && bodyRows >= 10;
|
|
4967
4982
|
const [selectedIdx, setSelectedIdx] = useState27(0);
|
|
4968
4983
|
const [refreshKey, setRefreshKey] = useState27(0);
|
|
4969
4984
|
const available = useMemo8(() => detectAvailable(), [refreshKey]);
|
|
4970
|
-
const actionLabelWidth = Math.max(t("settings.recheck").length, t("settings.showConfig").length, t("settings.editConfig").length, t("common.back").length);
|
|
4985
|
+
const actionLabelWidth = Math.max(t("welcome.setup").length, t("settings.recheck").length, t("settings.showConfig").length, t("settings.editConfig").length, t("common.back").length);
|
|
4971
4986
|
const rows = [
|
|
4972
4987
|
...PROVIDERS.map((p) => ({ type: "provider", id: p, provider: p, selectable: true })),
|
|
4973
4988
|
...LANGUAGE_OPTIONS.map((option) => ({ type: "language", id: `language-${option.code}`, language: option.code, selectable: true })),
|
|
4974
4989
|
{ type: "statePath", id: "state", selectable: false },
|
|
4975
4990
|
{ type: "statePath", id: "runs", selectable: false },
|
|
4976
4991
|
{ type: "statePath", id: "presets", selectable: false },
|
|
4992
|
+
{ type: "action", id: "setup", selectable: true },
|
|
4977
4993
|
{ type: "action", id: "recheck", selectable: true },
|
|
4978
4994
|
{ type: "action", id: "showConfig", selectable: true },
|
|
4979
4995
|
{ type: "action", id: "editConfig", selectable: true },
|
|
@@ -4996,6 +5012,10 @@ function Settings() {
|
|
|
4996
5012
|
async function activate() {
|
|
4997
5013
|
const row = selectableRows[currentIdx];
|
|
4998
5014
|
if (!row) return;
|
|
5015
|
+
if (row.id === "setup") {
|
|
5016
|
+
push("Setup");
|
|
5017
|
+
return;
|
|
5018
|
+
}
|
|
4999
5019
|
if (row.id === "recheck") {
|
|
5000
5020
|
setRefreshKey((k) => k + 1);
|
|
5001
5021
|
return;
|
|
@@ -5089,6 +5109,7 @@ function Settings() {
|
|
|
5089
5109
|
);
|
|
5090
5110
|
}
|
|
5091
5111
|
const actionLabels = {
|
|
5112
|
+
setup: { primary: t("welcome.setup"), hint: t("welcome.setupHint") },
|
|
5092
5113
|
recheck: { primary: t("settings.recheck"), hint: t("settings.recheckHint") },
|
|
5093
5114
|
showConfig: { primary: t("settings.showConfig"), hint: t("settings.showConfigHint") },
|
|
5094
5115
|
editConfig: { primary: t("settings.editConfig"), hint: t("settings.editConfigHint") },
|
|
@@ -5188,6 +5209,15 @@ function Settings() {
|
|
|
5188
5209
|
),
|
|
5189
5210
|
/* @__PURE__ */ jsx43(SectionEnd, {}),
|
|
5190
5211
|
/* @__PURE__ */ jsx43(Section, { label: t("common.actions") }),
|
|
5212
|
+
/* @__PURE__ */ jsx43(
|
|
5213
|
+
Row,
|
|
5214
|
+
{
|
|
5215
|
+
selected: selectedIdx === rows.findIndex((r) => r.id === "setup"),
|
|
5216
|
+
primary: t("welcome.setup"),
|
|
5217
|
+
primaryWidth: actionLabelWidth,
|
|
5218
|
+
hint: t("welcome.setupHint")
|
|
5219
|
+
}
|
|
5220
|
+
),
|
|
5191
5221
|
/* @__PURE__ */ jsx43(
|
|
5192
5222
|
Row,
|
|
5193
5223
|
{
|
|
@@ -5417,10 +5447,92 @@ function AgentControl() {
|
|
|
5417
5447
|
);
|
|
5418
5448
|
}
|
|
5419
5449
|
|
|
5450
|
+
// src/tui/screens/Setup.tsx
|
|
5451
|
+
import { useMemo as useMemo10, useState as useState29 } from "react";
|
|
5452
|
+
import { Box as Box32, Text as Text28, useInput as useInput24 } from "ink";
|
|
5453
|
+
import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5454
|
+
function Setup() {
|
|
5455
|
+
const { push, replace, pop, canBack } = useRouter();
|
|
5456
|
+
const { t } = useLanguage();
|
|
5457
|
+
const [refreshKey, setRefreshKey] = useState29(0);
|
|
5458
|
+
const [selectedIdx, setSelectedIdx] = useState29(0);
|
|
5459
|
+
const [toast, setToast] = useState29(null);
|
|
5460
|
+
const state = useMemo10(() => buildOnboardingState(), [refreshKey]);
|
|
5461
|
+
function leave() {
|
|
5462
|
+
if (canBack) pop();
|
|
5463
|
+
else replace("Welcome");
|
|
5464
|
+
}
|
|
5465
|
+
const actions = [];
|
|
5466
|
+
if (state.attachable.length > 0) {
|
|
5467
|
+
actions.push({
|
|
5468
|
+
key: "connect",
|
|
5469
|
+
label: t("setup.connectAll"),
|
|
5470
|
+
hint: t("setup.connectAllHint"),
|
|
5471
|
+
run: () => {
|
|
5472
|
+
const results = attachAll();
|
|
5473
|
+
const ok = results.filter((result) => result.ok).length;
|
|
5474
|
+
setToast(t("setup.connectedToast", { ok, total: results.length }));
|
|
5475
|
+
setRefreshKey((key) => key + 1);
|
|
5476
|
+
}
|
|
5477
|
+
});
|
|
5478
|
+
}
|
|
5479
|
+
actions.push({ key: "hosts", label: t("setup.manageHosts"), hint: t("setup.manageHostsHint"), run: () => push("AgentControl") });
|
|
5480
|
+
actions.push({ key: "run", label: t("setup.startRun"), hint: t("setup.startRunHint"), run: () => push("NewRun") });
|
|
5481
|
+
actions.push({ key: "done", label: t("setup.done"), hint: t("setup.doneHint"), run: leave });
|
|
5482
|
+
const maxIdx = actions.length - 1;
|
|
5483
|
+
useInput24((_input, key) => {
|
|
5484
|
+
if (key.upArrow) {
|
|
5485
|
+
setSelectedIdx((idx) => Math.max(0, idx - 1));
|
|
5486
|
+
return;
|
|
5487
|
+
}
|
|
5488
|
+
if (key.downArrow) {
|
|
5489
|
+
setSelectedIdx((idx) => Math.min(maxIdx, idx + 1));
|
|
5490
|
+
return;
|
|
5491
|
+
}
|
|
5492
|
+
if (key.return) {
|
|
5493
|
+
actions[Math.min(selectedIdx, maxIdx)]?.run();
|
|
5494
|
+
return;
|
|
5495
|
+
}
|
|
5496
|
+
if (key.escape) {
|
|
5497
|
+
leave();
|
|
5498
|
+
return;
|
|
5499
|
+
}
|
|
5500
|
+
});
|
|
5501
|
+
const providersText = state.installedProviders.length > 0 ? state.installedProviders.map(providerDisplayName).join(", ") : t("setup.noProviders");
|
|
5502
|
+
return /* @__PURE__ */ jsx46(
|
|
5503
|
+
Frame,
|
|
5504
|
+
{
|
|
5505
|
+
breadcrumb: ["ReevesAgents", t("setup.title")],
|
|
5506
|
+
tagline: t("setup.subtitle"),
|
|
5507
|
+
statusKeys: t("setup.status"),
|
|
5508
|
+
children: /* @__PURE__ */ jsxs37(Box32, { flexDirection: "column", children: [
|
|
5509
|
+
/* @__PURE__ */ jsx46(Text28, { color: colors.text.dim, wrap: "truncate-end", children: t("setup.intro") }),
|
|
5510
|
+
/* @__PURE__ */ jsx46(Section, { label: t("setup.environment") }),
|
|
5511
|
+
/* @__PURE__ */ jsx46(Row, { selected: false, disabled: true, primary: "tmux", primaryWidth: 12, hint: state.tmuxOk ? t("setup.ok") : t("setup.tmuxMissing") }),
|
|
5512
|
+
/* @__PURE__ */ jsx46(Row, { selected: false, disabled: true, primary: "node", primaryWidth: 12, hint: state.nodeOk ? t("setup.ok") : t("setup.nodeOld") }),
|
|
5513
|
+
/* @__PURE__ */ jsx46(Row, { selected: false, disabled: true, primary: t("setup.providersLabel"), primaryWidth: 12, hint: providersText }),
|
|
5514
|
+
/* @__PURE__ */ jsx46(Section, { label: t("setup.actions") }),
|
|
5515
|
+
actions.map((action, idx) => /* @__PURE__ */ jsx46(
|
|
5516
|
+
Row,
|
|
5517
|
+
{
|
|
5518
|
+
selected: selectedIdx === idx,
|
|
5519
|
+
primary: action.label,
|
|
5520
|
+
primaryWidth: 26,
|
|
5521
|
+
hint: action.hint
|
|
5522
|
+
},
|
|
5523
|
+
action.key
|
|
5524
|
+
)),
|
|
5525
|
+
toast && /* @__PURE__ */ jsx46(Text28, { color: colors.status.ok, wrap: "truncate-end", children: toast }),
|
|
5526
|
+
/* @__PURE__ */ jsx46(SectionEnd, {})
|
|
5527
|
+
] })
|
|
5528
|
+
}
|
|
5529
|
+
);
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5420
5532
|
// src/tui/screens/Reference.tsx
|
|
5421
|
-
import { useState as
|
|
5422
|
-
import { useInput as
|
|
5423
|
-
import { Fragment as Fragment12, jsx as
|
|
5533
|
+
import { useState as useState30 } from "react";
|
|
5534
|
+
import { useInput as useInput25, useWindowSize as useWindowSize19 } from "ink";
|
|
5535
|
+
import { Fragment as Fragment12, jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5424
5536
|
var CONTENT = [
|
|
5425
5537
|
{ type: "section", label: "TUI Pages" },
|
|
5426
5538
|
{ type: "row", primary: "Welcome", trailing: "main menu, current run, reference, credits" },
|
|
@@ -5449,8 +5561,8 @@ function Reference() {
|
|
|
5449
5561
|
const compactBody = bodyRows <= 10;
|
|
5450
5562
|
const visibleCount = Math.max(1, compactBody ? bodyRows - 3 : bodyRows - 5);
|
|
5451
5563
|
const maxScroll = Math.max(0, CONTENT.length - visibleCount);
|
|
5452
|
-
const [scroll, setScroll] =
|
|
5453
|
-
|
|
5564
|
+
const [scroll, setScroll] = useState30(0);
|
|
5565
|
+
useInput25((_input, key) => {
|
|
5454
5566
|
if (key.upArrow) {
|
|
5455
5567
|
setScroll((value) => Math.max(0, value - 1));
|
|
5456
5568
|
return;
|
|
@@ -5467,25 +5579,25 @@ function Reference() {
|
|
|
5467
5579
|
let openSection = false;
|
|
5468
5580
|
visible.forEach((item, idx) => {
|
|
5469
5581
|
if (item.type === "section") {
|
|
5470
|
-
if (openSection) contentRows.push(/* @__PURE__ */
|
|
5471
|
-
contentRows.push(/* @__PURE__ */
|
|
5582
|
+
if (openSection) contentRows.push(/* @__PURE__ */ jsx47(SectionEnd, {}, `end-${idx}`));
|
|
5583
|
+
contentRows.push(/* @__PURE__ */ jsx47(Section, { label: item.label }, `${item.label}-${idx}`));
|
|
5472
5584
|
openSection = true;
|
|
5473
5585
|
return;
|
|
5474
5586
|
}
|
|
5475
|
-
contentRows.push(/* @__PURE__ */
|
|
5587
|
+
contentRows.push(/* @__PURE__ */ jsx47(Row, { selected: false, primary: item.primary, trailing: item.trailing }, `${item.primary}-${idx}`));
|
|
5476
5588
|
});
|
|
5477
|
-
if (openSection) contentRows.push(/* @__PURE__ */
|
|
5478
|
-
return /* @__PURE__ */
|
|
5589
|
+
if (openSection) contentRows.push(/* @__PURE__ */ jsx47(SectionEnd, {}, "end-visible"));
|
|
5590
|
+
return /* @__PURE__ */ jsx47(
|
|
5479
5591
|
Frame,
|
|
5480
5592
|
{
|
|
5481
5593
|
breadcrumb: ["ReevesAgents", "Reference"],
|
|
5482
5594
|
tagline: "Quick map of run mode, command line, tmux workflow, and roles.",
|
|
5483
5595
|
statusContext,
|
|
5484
5596
|
statusKeys: maxScroll > 0 ? "\u2191\u2193 scroll \xB7 enter back \xB7 esc back" : "enter back \xB7 esc back",
|
|
5485
|
-
children: compactBody ? /* @__PURE__ */
|
|
5486
|
-
/* @__PURE__ */
|
|
5487
|
-
visible.map((item, idx) => item.type === "section" ? /* @__PURE__ */
|
|
5488
|
-
maxScroll > 0 && /* @__PURE__ */
|
|
5597
|
+
children: compactBody ? /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
5598
|
+
/* @__PURE__ */ jsx47(Section, { label: "Reference" }),
|
|
5599
|
+
visible.map((item, idx) => item.type === "section" ? /* @__PURE__ */ jsx47(Row, { selected: false, primary: item.label, disabled: true }, `${item.label}-${idx}`) : /* @__PURE__ */ jsx47(Row, { selected: false, primary: item.primary, trailing: item.trailing }, `${item.primary}-${idx}`)),
|
|
5600
|
+
maxScroll > 0 && /* @__PURE__ */ jsx47(
|
|
5489
5601
|
Row,
|
|
5490
5602
|
{
|
|
5491
5603
|
selected: false,
|
|
@@ -5494,21 +5606,21 @@ function Reference() {
|
|
|
5494
5606
|
disabled: true
|
|
5495
5607
|
}
|
|
5496
5608
|
),
|
|
5497
|
-
/* @__PURE__ */
|
|
5498
|
-
] }) : /* @__PURE__ */
|
|
5609
|
+
/* @__PURE__ */ jsx47(SectionEnd, {})
|
|
5610
|
+
] }) : /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
5499
5611
|
contentRows,
|
|
5500
|
-
/* @__PURE__ */
|
|
5501
|
-
/* @__PURE__ */
|
|
5502
|
-
/* @__PURE__ */
|
|
5612
|
+
/* @__PURE__ */ jsx47(Section, { label: "Actions" }),
|
|
5613
|
+
/* @__PURE__ */ jsx47(Row, { selected: true, primary: "Back", hint: "return to previous page" }),
|
|
5614
|
+
/* @__PURE__ */ jsx47(SectionEnd, {})
|
|
5503
5615
|
] })
|
|
5504
5616
|
}
|
|
5505
5617
|
);
|
|
5506
5618
|
}
|
|
5507
5619
|
|
|
5508
5620
|
// src/tui/screens/Credits.tsx
|
|
5509
|
-
import { useState as
|
|
5510
|
-
import { Box as
|
|
5511
|
-
import { Fragment as Fragment13, jsx as
|
|
5621
|
+
import { useState as useState31 } from "react";
|
|
5622
|
+
import { Box as Box33, useInput as useInput26, useWindowSize as useWindowSize20 } from "ink";
|
|
5623
|
+
import { Fragment as Fragment13, jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5512
5624
|
function Credits() {
|
|
5513
5625
|
const { pop } = useRouter();
|
|
5514
5626
|
const { t } = useLanguage();
|
|
@@ -5526,10 +5638,10 @@ function Credits() {
|
|
|
5526
5638
|
{ primary: "Repository", trailing: "See package metadata" }
|
|
5527
5639
|
];
|
|
5528
5640
|
const visibleCount = Math.max(1, bodyRows - (compactBody ? 3 : 6));
|
|
5529
|
-
const [scroll, setScroll] =
|
|
5641
|
+
const [scroll, setScroll] = useState31(0);
|
|
5530
5642
|
const maxScroll = Math.max(0, content.length - visibleCount);
|
|
5531
5643
|
const visible = content.slice(scroll, scroll + visibleCount);
|
|
5532
|
-
|
|
5644
|
+
useInput26((_input, key) => {
|
|
5533
5645
|
if (key.upArrow) {
|
|
5534
5646
|
setScroll((value) => Math.max(0, value - 1));
|
|
5535
5647
|
return;
|
|
@@ -5540,17 +5652,17 @@ function Credits() {
|
|
|
5540
5652
|
}
|
|
5541
5653
|
if (key.return || key.escape || key.backspace) pop();
|
|
5542
5654
|
});
|
|
5543
|
-
return /* @__PURE__ */
|
|
5655
|
+
return /* @__PURE__ */ jsx48(
|
|
5544
5656
|
Frame,
|
|
5545
5657
|
{
|
|
5546
5658
|
breadcrumb: ["ReevesAgents", "Credits"],
|
|
5547
5659
|
tagline: "About this local tmux-first workspace manager.",
|
|
5548
5660
|
statusContext: `ReevesAgents ${REEVESAGENTS_VERSION}`,
|
|
5549
5661
|
statusKeys: "enter back \xB7 esc back",
|
|
5550
|
-
children: /* @__PURE__ */
|
|
5551
|
-
/* @__PURE__ */
|
|
5552
|
-
visible.map((item) => /* @__PURE__ */
|
|
5553
|
-
maxScroll > 0 && /* @__PURE__ */
|
|
5662
|
+
children: /* @__PURE__ */ jsxs39(Box33, { flexDirection: "column", children: [
|
|
5663
|
+
/* @__PURE__ */ jsx48(Section, { label: "Credits" }),
|
|
5664
|
+
visible.map((item) => /* @__PURE__ */ jsx48(Row, { selected: false, primary: item.primary, trailing: item.trailing }, item.primary)),
|
|
5665
|
+
maxScroll > 0 && /* @__PURE__ */ jsx48(
|
|
5554
5666
|
Row,
|
|
5555
5667
|
{
|
|
5556
5668
|
selected: false,
|
|
@@ -5559,11 +5671,11 @@ function Credits() {
|
|
|
5559
5671
|
disabled: true
|
|
5560
5672
|
}
|
|
5561
5673
|
),
|
|
5562
|
-
/* @__PURE__ */
|
|
5563
|
-
!compactBody && /* @__PURE__ */
|
|
5564
|
-
/* @__PURE__ */
|
|
5565
|
-
/* @__PURE__ */
|
|
5566
|
-
/* @__PURE__ */
|
|
5674
|
+
/* @__PURE__ */ jsx48(SectionEnd, {}),
|
|
5675
|
+
!compactBody && /* @__PURE__ */ jsxs39(Fragment13, { children: [
|
|
5676
|
+
/* @__PURE__ */ jsx48(Section, { label: "Actions" }),
|
|
5677
|
+
/* @__PURE__ */ jsx48(Row, { selected: true, primary: "Back", hint: "return to main menu" }),
|
|
5678
|
+
/* @__PURE__ */ jsx48(SectionEnd, {})
|
|
5567
5679
|
] })
|
|
5568
5680
|
] })
|
|
5569
5681
|
}
|
|
@@ -5571,9 +5683,9 @@ function Credits() {
|
|
|
5571
5683
|
}
|
|
5572
5684
|
|
|
5573
5685
|
// src/tui/screens/Doctor.tsx
|
|
5574
|
-
import { useEffect as useEffect13, useMemo as
|
|
5575
|
-
import { Box as
|
|
5576
|
-
import { Fragment as Fragment14, jsx as
|
|
5686
|
+
import { useEffect as useEffect13, useMemo as useMemo11, useState as useState32 } from "react";
|
|
5687
|
+
import { Box as Box34, useInput as useInput27, useWindowSize as useWindowSize21 } from "ink";
|
|
5688
|
+
import { Fragment as Fragment14, jsx as jsx49, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5577
5689
|
var CHROME_ROWS5 = 17;
|
|
5578
5690
|
function statusGlyph4(status) {
|
|
5579
5691
|
if (status === "ok") return { char: glyphs.status.ok, color: colors.status.ok };
|
|
@@ -5587,11 +5699,11 @@ function Doctor() {
|
|
|
5587
5699
|
const bodyRows = frameBodyRows(termRows, true, true);
|
|
5588
5700
|
const compactBody = bodyRows <= 10;
|
|
5589
5701
|
const pageSize = Math.max(1, compactBody ? bodyRows - 3 : Math.min(termRows - CHROME_ROWS5, bodyRows - 7));
|
|
5590
|
-
const [selectedIdx, setSelectedIdx] =
|
|
5591
|
-
const [refreshKey, setRefreshKey] =
|
|
5592
|
-
const [isSpinning, setIsSpinning] =
|
|
5593
|
-
const [page, setPage] =
|
|
5594
|
-
const result =
|
|
5702
|
+
const [selectedIdx, setSelectedIdx] = useState32(0);
|
|
5703
|
+
const [refreshKey, setRefreshKey] = useState32(0);
|
|
5704
|
+
const [isSpinning, setIsSpinning] = useState32(false);
|
|
5705
|
+
const [page, setPage] = useState32(1);
|
|
5706
|
+
const result = useMemo11(() => runDoctor(), [refreshKey]);
|
|
5595
5707
|
const checks = result.checks;
|
|
5596
5708
|
const counts = {
|
|
5597
5709
|
ok: checks.filter((c) => c.status === "ok").length,
|
|
@@ -5628,7 +5740,7 @@ function Doctor() {
|
|
|
5628
5740
|
setIsSpinning(false);
|
|
5629
5741
|
}, 200);
|
|
5630
5742
|
};
|
|
5631
|
-
|
|
5743
|
+
useInput27((_input, key) => {
|
|
5632
5744
|
if (key.escape || key.backspace) {
|
|
5633
5745
|
pop();
|
|
5634
5746
|
return;
|
|
@@ -5658,7 +5770,7 @@ function Doctor() {
|
|
|
5658
5770
|
}
|
|
5659
5771
|
}
|
|
5660
5772
|
});
|
|
5661
|
-
return /* @__PURE__ */
|
|
5773
|
+
return /* @__PURE__ */ jsx49(
|
|
5662
5774
|
Frame,
|
|
5663
5775
|
{
|
|
5664
5776
|
breadcrumb: ["ReevesAgents", "Doctor"],
|
|
@@ -5669,12 +5781,12 @@ function Doctor() {
|
|
|
5669
5781
|
],
|
|
5670
5782
|
tagline: "Setup and environment health for TUI, CLI, Web UI, and tmux.",
|
|
5671
5783
|
statusContext: selectedCheck ? `${selectedCheck.name}: ${selectedCheck.detail}` : "",
|
|
5672
|
-
children: compactBody ? /* @__PURE__ */
|
|
5673
|
-
/* @__PURE__ */
|
|
5674
|
-
isSpinning ? /* @__PURE__ */
|
|
5784
|
+
children: compactBody ? /* @__PURE__ */ jsxs40(Primary, { children: [
|
|
5785
|
+
/* @__PURE__ */ jsx49(Section, { label: selectedIdx < pagedChecks.length ? "Checks" : "Actions" }),
|
|
5786
|
+
isSpinning ? /* @__PURE__ */ jsx49(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }) : compactEntryIndexes.map((idx) => {
|
|
5675
5787
|
if (idx < pagedChecks.length) {
|
|
5676
5788
|
const check = pagedChecks[idx];
|
|
5677
|
-
return /* @__PURE__ */
|
|
5789
|
+
return /* @__PURE__ */ jsx49(
|
|
5678
5790
|
Row,
|
|
5679
5791
|
{
|
|
5680
5792
|
selected: idx === selectedIdx,
|
|
@@ -5687,7 +5799,7 @@ function Doctor() {
|
|
|
5687
5799
|
);
|
|
5688
5800
|
}
|
|
5689
5801
|
if (totalPages > 1 && idx === pagedChecks.length) {
|
|
5690
|
-
return /* @__PURE__ */
|
|
5802
|
+
return /* @__PURE__ */ jsx49(
|
|
5691
5803
|
Pagination,
|
|
5692
5804
|
{
|
|
5693
5805
|
page,
|
|
@@ -5700,14 +5812,14 @@ function Doctor() {
|
|
|
5700
5812
|
);
|
|
5701
5813
|
}
|
|
5702
5814
|
if (idx === actionOffset) {
|
|
5703
|
-
return /* @__PURE__ */
|
|
5815
|
+
return /* @__PURE__ */ jsx49(Row, { selected: selectedIdx === actionOffset, primary: "Recheck", primaryWidth: checkLabelWidth, hint: "run doctor again" }, "recheck");
|
|
5704
5816
|
}
|
|
5705
|
-
return /* @__PURE__ */
|
|
5817
|
+
return /* @__PURE__ */ jsx49(Row, { selected: selectedIdx === actionOffset + 1, primary: "Back", primaryWidth: checkLabelWidth, hint: "return to previous page" }, "back");
|
|
5706
5818
|
}),
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
] }) : /* @__PURE__ */
|
|
5709
|
-
isSpinning && /* @__PURE__ */
|
|
5710
|
-
!isSpinning && pagedChecks.map((check, idx) => /* @__PURE__ */
|
|
5819
|
+
/* @__PURE__ */ jsx49(SectionEnd, {})
|
|
5820
|
+
] }) : /* @__PURE__ */ jsxs40(Primary, { children: [
|
|
5821
|
+
isSpinning && /* @__PURE__ */ jsx49(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }),
|
|
5822
|
+
!isSpinning && pagedChecks.map((check, idx) => /* @__PURE__ */ jsx49(
|
|
5711
5823
|
Row,
|
|
5712
5824
|
{
|
|
5713
5825
|
selected: idx === selectedIdx,
|
|
@@ -5718,7 +5830,7 @@ function Doctor() {
|
|
|
5718
5830
|
},
|
|
5719
5831
|
check.name
|
|
5720
5832
|
)),
|
|
5721
|
-
!isSpinning && totalPages > 1 && /* @__PURE__ */
|
|
5833
|
+
!isSpinning && totalPages > 1 && /* @__PURE__ */ jsx49(
|
|
5722
5834
|
Pagination,
|
|
5723
5835
|
{
|
|
5724
5836
|
page,
|
|
@@ -5728,9 +5840,9 @@ function Doctor() {
|
|
|
5728
5840
|
onNext: () => setPage((p) => Math.min(totalPages, p + 1))
|
|
5729
5841
|
}
|
|
5730
5842
|
),
|
|
5731
|
-
!isSpinning && /* @__PURE__ */
|
|
5732
|
-
/* @__PURE__ */
|
|
5733
|
-
/* @__PURE__ */
|
|
5843
|
+
!isSpinning && /* @__PURE__ */ jsxs40(Fragment14, { children: [
|
|
5844
|
+
/* @__PURE__ */ jsx49(Box34, { marginTop: 1 }),
|
|
5845
|
+
/* @__PURE__ */ jsx49(
|
|
5734
5846
|
Legend,
|
|
5735
5847
|
{
|
|
5736
5848
|
items: [
|
|
@@ -5741,20 +5853,20 @@ function Doctor() {
|
|
|
5741
5853
|
}
|
|
5742
5854
|
)
|
|
5743
5855
|
] }),
|
|
5744
|
-
/* @__PURE__ */
|
|
5745
|
-
/* @__PURE__ */
|
|
5746
|
-
/* @__PURE__ */
|
|
5747
|
-
/* @__PURE__ */
|
|
5748
|
-
/* @__PURE__ */
|
|
5856
|
+
/* @__PURE__ */ jsx49(Box34, { marginTop: 1 }),
|
|
5857
|
+
/* @__PURE__ */ jsx49(Section, { label: "Actions" }),
|
|
5858
|
+
/* @__PURE__ */ jsx49(Row, { selected: selectedIdx === actionOffset, primary: "Recheck", primaryWidth: checkLabelWidth, hint: "run doctor again" }),
|
|
5859
|
+
/* @__PURE__ */ jsx49(Row, { selected: selectedIdx === actionOffset + 1, primary: "Back", primaryWidth: checkLabelWidth, hint: "return to previous page" }),
|
|
5860
|
+
/* @__PURE__ */ jsx49(SectionEnd, {})
|
|
5749
5861
|
] })
|
|
5750
5862
|
}
|
|
5751
5863
|
);
|
|
5752
5864
|
}
|
|
5753
5865
|
|
|
5754
5866
|
// src/tui/screens/DoctorCheck.tsx
|
|
5755
|
-
import { useEffect as useEffect14, useMemo as
|
|
5756
|
-
import { Box as
|
|
5757
|
-
import { Fragment as Fragment15, jsx as
|
|
5867
|
+
import { useEffect as useEffect14, useMemo as useMemo12, useState as useState33 } from "react";
|
|
5868
|
+
import { Box as Box35, Text as Text29, useInput as useInput28 } from "ink";
|
|
5869
|
+
import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5758
5870
|
function statusGlyph5(status) {
|
|
5759
5871
|
if (status === "ok") return { char: glyphs.status.ok, color: colors.status.ok };
|
|
5760
5872
|
if (status === "warn") return { char: glyphs.status.warn, color: colors.status.warn };
|
|
@@ -5769,14 +5881,14 @@ function findFixHint(check) {
|
|
|
5769
5881
|
function DoctorCheck() {
|
|
5770
5882
|
const { pop, selectedCheckName } = useRouter();
|
|
5771
5883
|
const { language } = useLanguage();
|
|
5772
|
-
const [selectedIdx, setSelectedIdx] =
|
|
5773
|
-
const result =
|
|
5884
|
+
const [selectedIdx, setSelectedIdx] = useState33(0);
|
|
5885
|
+
const result = useMemo12(() => runDoctor(), []);
|
|
5774
5886
|
const check = result.checks.find((c) => c.name === selectedCheckName);
|
|
5775
5887
|
const backIdx = check ? 1 : 0;
|
|
5776
5888
|
useEffect14(() => {
|
|
5777
5889
|
setSelectedIdx(backIdx);
|
|
5778
5890
|
}, [backIdx]);
|
|
5779
|
-
|
|
5891
|
+
useInput28((_input, key) => {
|
|
5780
5892
|
if (key.escape || key.backspace) {
|
|
5781
5893
|
pop();
|
|
5782
5894
|
return;
|
|
@@ -5790,56 +5902,56 @@ function DoctorCheck() {
|
|
|
5790
5902
|
}
|
|
5791
5903
|
});
|
|
5792
5904
|
if (!check) {
|
|
5793
|
-
return /* @__PURE__ */
|
|
5905
|
+
return /* @__PURE__ */ jsx50(
|
|
5794
5906
|
Frame,
|
|
5795
5907
|
{
|
|
5796
5908
|
breadcrumb: ["ReevesAgents", "Doctor", "Check"],
|
|
5797
5909
|
tagline: "Check not found.",
|
|
5798
|
-
children: /* @__PURE__ */
|
|
5910
|
+
children: /* @__PURE__ */ jsx50(Primary, { children: /* @__PURE__ */ jsx50(Row, { selected: selectedIdx === backIdx, primary: "Back" }) })
|
|
5799
5911
|
}
|
|
5800
5912
|
);
|
|
5801
5913
|
}
|
|
5802
5914
|
const fixHint = findFixHint(check);
|
|
5803
|
-
return /* @__PURE__ */
|
|
5915
|
+
return /* @__PURE__ */ jsx50(
|
|
5804
5916
|
Frame,
|
|
5805
5917
|
{
|
|
5806
5918
|
breadcrumb: ["ReevesAgents", "Doctor", check.name],
|
|
5807
5919
|
meta: [{ label: "status", value: check.status }],
|
|
5808
5920
|
tagline: "Check details and suggested fix.",
|
|
5809
|
-
children: /* @__PURE__ */
|
|
5810
|
-
/* @__PURE__ */
|
|
5811
|
-
/* @__PURE__ */
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5921
|
+
children: /* @__PURE__ */ jsxs41(Primary, { children: [
|
|
5922
|
+
/* @__PURE__ */ jsxs41(Box35, { flexDirection: "column", children: [
|
|
5923
|
+
/* @__PURE__ */ jsx50(Row, { selected: false, primary: "Name", trailing: check.name }),
|
|
5924
|
+
/* @__PURE__ */ jsx50(Row, { selected: false, primary: "Status", trailing: check.status, glyph: statusGlyph5(check.status) }),
|
|
5925
|
+
/* @__PURE__ */ jsx50(Row, { selected: false, primary: "Detail", trailing: check.detail })
|
|
5814
5926
|
] }),
|
|
5815
|
-
fixHint && /* @__PURE__ */
|
|
5816
|
-
/* @__PURE__ */
|
|
5817
|
-
/* @__PURE__ */
|
|
5818
|
-
/* @__PURE__ */
|
|
5819
|
-
/* @__PURE__ */
|
|
5820
|
-
/* @__PURE__ */
|
|
5927
|
+
fixHint && /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
5928
|
+
/* @__PURE__ */ jsx50(Box35, { marginY: 1 }),
|
|
5929
|
+
/* @__PURE__ */ jsx50(Section, { label: "Fix" }),
|
|
5930
|
+
/* @__PURE__ */ jsxs41(Box35, { marginY: 1, marginLeft: 2, flexDirection: "column", children: [
|
|
5931
|
+
/* @__PURE__ */ jsx50(Text29, { color: colors.text.dim, children: translatePhrase(language, "Suggested fix:") }),
|
|
5932
|
+
/* @__PURE__ */ jsx50(Text29, { color: colors.accent.primary, children: translatePhrase(language, fixHint) })
|
|
5821
5933
|
] }),
|
|
5822
|
-
/* @__PURE__ */
|
|
5934
|
+
/* @__PURE__ */ jsx50(SectionEnd, {})
|
|
5823
5935
|
] }),
|
|
5824
|
-
!fixHint && /* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
5826
|
-
/* @__PURE__ */
|
|
5827
|
-
/* @__PURE__ */
|
|
5828
|
-
/* @__PURE__ */
|
|
5936
|
+
!fixHint && /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
5937
|
+
/* @__PURE__ */ jsx50(Box35, { marginY: 1 }),
|
|
5938
|
+
/* @__PURE__ */ jsx50(Section, { label: "Fix" }),
|
|
5939
|
+
/* @__PURE__ */ jsx50(Box35, { marginY: 1, marginLeft: 2, children: /* @__PURE__ */ jsx50(Text29, { color: colors.text.dim, children: translatePhrase(language, "No suggested fix. Check the source code or open an issue.") }) }),
|
|
5940
|
+
/* @__PURE__ */ jsx50(SectionEnd, {})
|
|
5829
5941
|
] }),
|
|
5830
|
-
/* @__PURE__ */
|
|
5831
|
-
/* @__PURE__ */
|
|
5832
|
-
/* @__PURE__ */
|
|
5833
|
-
/* @__PURE__ */
|
|
5942
|
+
/* @__PURE__ */ jsx50(Box35, { marginY: 1 }),
|
|
5943
|
+
/* @__PURE__ */ jsx50(Section, { label: "Actions" }),
|
|
5944
|
+
/* @__PURE__ */ jsx50(Row, { selected: selectedIdx === backIdx, primary: "Back" }),
|
|
5945
|
+
/* @__PURE__ */ jsx50(SectionEnd, {})
|
|
5834
5946
|
] })
|
|
5835
5947
|
}
|
|
5836
5948
|
);
|
|
5837
5949
|
}
|
|
5838
5950
|
|
|
5839
5951
|
// src/tui/screens/Approvals.tsx
|
|
5840
|
-
import { useEffect as useEffect15, useState as
|
|
5841
|
-
import { Box as
|
|
5842
|
-
import { jsx as
|
|
5952
|
+
import { useEffect as useEffect15, useState as useState34 } from "react";
|
|
5953
|
+
import { Box as Box36, useInput as useInput29 } from "ink";
|
|
5954
|
+
import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5843
5955
|
var ACTIONS3 = ["Approve", "Deny", "Back", "Main Menu"];
|
|
5844
5956
|
var ACTION_COPY3 = {
|
|
5845
5957
|
Approve: { label: "Approve", hint: "approve the selected request" },
|
|
@@ -5857,10 +5969,10 @@ function Approvals() {
|
|
|
5857
5969
|
const { pop, resetStack } = useRouter();
|
|
5858
5970
|
const { toast } = useToast();
|
|
5859
5971
|
const { t } = useLanguage();
|
|
5860
|
-
const [approvals, setApprovals] =
|
|
5861
|
-
const [selectedIdx, setSelectedIdx] =
|
|
5862
|
-
const [selectedApprovalId, setSelectedApprovalId] =
|
|
5863
|
-
const [pending, setPending] =
|
|
5972
|
+
const [approvals, setApprovals] = useState34(() => listRunApprovals(void 0, "pending"));
|
|
5973
|
+
const [selectedIdx, setSelectedIdx] = useState34(0);
|
|
5974
|
+
const [selectedApprovalId, setSelectedApprovalId] = useState34(() => approvals[0]?.id ?? null);
|
|
5975
|
+
const [pending, setPending] = useState34(null);
|
|
5864
5976
|
useEffect15(() => {
|
|
5865
5977
|
const timer = setInterval(() => setApprovals(listRunApprovals(void 0, "pending")), 5e3);
|
|
5866
5978
|
return () => clearInterval(timer);
|
|
@@ -5905,7 +6017,7 @@ function Approvals() {
|
|
|
5905
6017
|
break;
|
|
5906
6018
|
}
|
|
5907
6019
|
}
|
|
5908
|
-
|
|
6020
|
+
useInput29((_input, key) => {
|
|
5909
6021
|
if (pending) return;
|
|
5910
6022
|
if (key.upArrow) {
|
|
5911
6023
|
setSelectedIdx((idx) => Math.max(0, Math.min(idx, itemCount - 1) - 1));
|
|
@@ -5925,7 +6037,7 @@ function Approvals() {
|
|
|
5925
6037
|
}
|
|
5926
6038
|
});
|
|
5927
6039
|
if (pending) {
|
|
5928
|
-
return /* @__PURE__ */
|
|
6040
|
+
return /* @__PURE__ */ jsx51(Frame, { breadcrumb: ["ReevesAgents", "Approvals"], statusKeys: "\u2190\u2192 switch \xB7 enter select \xB7 esc cancel", children: /* @__PURE__ */ jsx51(
|
|
5929
6041
|
Dialog,
|
|
5930
6042
|
{
|
|
5931
6043
|
title: pending.decision === "approved" ? "Approve this request?" : "Deny this request?",
|
|
@@ -5944,7 +6056,7 @@ function Approvals() {
|
|
|
5944
6056
|
} else if (selectedAction) {
|
|
5945
6057
|
statusContext = (selectedAction === "Approve" || selectedAction === "Deny") && actionTarget ? `${ACTION_COPY3[selectedAction].hint} \xB7 ${actionTarget.action}` : ACTION_COPY3[selectedAction].hint;
|
|
5946
6058
|
}
|
|
5947
|
-
return /* @__PURE__ */
|
|
6059
|
+
return /* @__PURE__ */ jsx51(
|
|
5948
6060
|
Frame,
|
|
5949
6061
|
{
|
|
5950
6062
|
breadcrumb: ["ReevesAgents", "Approvals"],
|
|
@@ -5952,9 +6064,9 @@ function Approvals() {
|
|
|
5952
6064
|
tagline: "Pending approval requests raised by agents. Approve or deny them here.",
|
|
5953
6065
|
statusContext,
|
|
5954
6066
|
statusKeys: "enter action \xB7 \u2191\u2193 move \xB7 esc back",
|
|
5955
|
-
children: /* @__PURE__ */
|
|
5956
|
-
/* @__PURE__ */
|
|
5957
|
-
approvals.length === 0 ? /* @__PURE__ */
|
|
6067
|
+
children: /* @__PURE__ */ jsxs42(Box36, { flexDirection: "column", children: [
|
|
6068
|
+
/* @__PURE__ */ jsx51(Section, { label: "Pending" }),
|
|
6069
|
+
approvals.length === 0 ? /* @__PURE__ */ jsx51(Row, { selected: false, primary: "No pending approvals", trailing: "requests appear here", disabled: true }) : approvals.map((approval, idx) => /* @__PURE__ */ jsx51(
|
|
5958
6070
|
Row,
|
|
5959
6071
|
{
|
|
5960
6072
|
selected: clampedIdx === idx,
|
|
@@ -5966,9 +6078,9 @@ function Approvals() {
|
|
|
5966
6078
|
},
|
|
5967
6079
|
approval.id
|
|
5968
6080
|
)),
|
|
5969
|
-
/* @__PURE__ */
|
|
5970
|
-
/* @__PURE__ */
|
|
5971
|
-
ACTIONS3.map((action, idx) => /* @__PURE__ */
|
|
6081
|
+
/* @__PURE__ */ jsx51(SectionEnd, {}),
|
|
6082
|
+
/* @__PURE__ */ jsx51(Section, { label: "Actions" }),
|
|
6083
|
+
ACTIONS3.map((action, idx) => /* @__PURE__ */ jsx51(
|
|
5972
6084
|
Row,
|
|
5973
6085
|
{
|
|
5974
6086
|
selected: clampedIdx === approvals.length + idx,
|
|
@@ -5980,16 +6092,16 @@ function Approvals() {
|
|
|
5980
6092
|
},
|
|
5981
6093
|
action
|
|
5982
6094
|
)),
|
|
5983
|
-
/* @__PURE__ */
|
|
6095
|
+
/* @__PURE__ */ jsx51(SectionEnd, {})
|
|
5984
6096
|
] })
|
|
5985
6097
|
}
|
|
5986
6098
|
);
|
|
5987
6099
|
}
|
|
5988
6100
|
|
|
5989
6101
|
// src/tui/screens/Config.tsx
|
|
5990
|
-
import { useState as
|
|
5991
|
-
import { Box as
|
|
5992
|
-
import { jsx as
|
|
6102
|
+
import { useState as useState35 } from "react";
|
|
6103
|
+
import { Box as Box37, useInput as useInput30 } from "ink";
|
|
6104
|
+
import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5993
6105
|
var EDITABLE_FIELDS = CONFIG_FIELDS.filter((field) => field.kind !== "language");
|
|
5994
6106
|
function isNumeric(field) {
|
|
5995
6107
|
return field.kind === "posint" || field.kind === "nonneg-int";
|
|
@@ -5998,10 +6110,10 @@ function Config() {
|
|
|
5998
6110
|
const { pop } = useRouter();
|
|
5999
6111
|
const { toast } = useToast();
|
|
6000
6112
|
const { language } = useLanguage();
|
|
6001
|
-
const [global, setGlobal] =
|
|
6002
|
-
const [selectedIdx, setSelectedIdx] =
|
|
6003
|
-
const [editingKey, setEditingKey] =
|
|
6004
|
-
const [draft, setDraft] =
|
|
6113
|
+
const [global, setGlobal] = useState35(() => loadConfig().global);
|
|
6114
|
+
const [selectedIdx, setSelectedIdx] = useState35(0);
|
|
6115
|
+
const [editingKey, setEditingKey] = useState35(null);
|
|
6116
|
+
const [draft, setDraft] = useState35("");
|
|
6005
6117
|
const totalRows = EDITABLE_FIELDS.length + 1;
|
|
6006
6118
|
function applyValue(key, value) {
|
|
6007
6119
|
try {
|
|
@@ -6018,7 +6130,7 @@ function Config() {
|
|
|
6018
6130
|
toast(err instanceof Error ? err.message : String(err), "error");
|
|
6019
6131
|
}
|
|
6020
6132
|
}
|
|
6021
|
-
|
|
6133
|
+
useInput30((_input, key) => {
|
|
6022
6134
|
if (editingKey) return;
|
|
6023
6135
|
if (key.escape || key.backspace) {
|
|
6024
6136
|
pop();
|
|
@@ -6048,18 +6160,18 @@ function Config() {
|
|
|
6048
6160
|
setEditingKey(field.key);
|
|
6049
6161
|
}
|
|
6050
6162
|
});
|
|
6051
|
-
return /* @__PURE__ */
|
|
6163
|
+
return /* @__PURE__ */ jsx52(
|
|
6052
6164
|
Frame,
|
|
6053
6165
|
{
|
|
6054
6166
|
breadcrumb: ["ReevesAgents", "Settings", "Config"],
|
|
6055
6167
|
tagline: "Edit global settings. Numbers edit inline; permissions cycle.",
|
|
6056
6168
|
statusKeys: "enter edit/cycle \xB7 \u2190\u2192 cycle \xB7 esc back",
|
|
6057
|
-
children: /* @__PURE__ */
|
|
6058
|
-
/* @__PURE__ */
|
|
6169
|
+
children: /* @__PURE__ */ jsxs43(Box37, { flexDirection: "column", children: [
|
|
6170
|
+
/* @__PURE__ */ jsx52(Section, { label: "Config" }),
|
|
6059
6171
|
EDITABLE_FIELDS.map((field, idx) => {
|
|
6060
6172
|
const value = global[field.key];
|
|
6061
6173
|
if (isNumeric(field)) {
|
|
6062
|
-
return /* @__PURE__ */
|
|
6174
|
+
return /* @__PURE__ */ jsx52(
|
|
6063
6175
|
TextField,
|
|
6064
6176
|
{
|
|
6065
6177
|
label: field.label,
|
|
@@ -6075,7 +6187,7 @@ function Config() {
|
|
|
6075
6187
|
field.key
|
|
6076
6188
|
);
|
|
6077
6189
|
}
|
|
6078
|
-
return /* @__PURE__ */
|
|
6190
|
+
return /* @__PURE__ */ jsx52(
|
|
6079
6191
|
Row,
|
|
6080
6192
|
{
|
|
6081
6193
|
selected: selectedIdx === idx,
|
|
@@ -6086,19 +6198,19 @@ function Config() {
|
|
|
6086
6198
|
field.key
|
|
6087
6199
|
);
|
|
6088
6200
|
}),
|
|
6089
|
-
/* @__PURE__ */
|
|
6090
|
-
/* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6092
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ jsx52(SectionEnd, {}),
|
|
6202
|
+
/* @__PURE__ */ jsx52(Section, { label: "Actions" }),
|
|
6203
|
+
/* @__PURE__ */ jsx52(Row, { selected: selectedIdx === EDITABLE_FIELDS.length, primary: "Back", hint: "return to settings" }),
|
|
6204
|
+
/* @__PURE__ */ jsx52(SectionEnd, {})
|
|
6093
6205
|
] })
|
|
6094
6206
|
}
|
|
6095
6207
|
);
|
|
6096
6208
|
}
|
|
6097
6209
|
|
|
6098
6210
|
// src/tui/screens/Presets.tsx
|
|
6099
|
-
import { useEffect as useEffect16, useState as
|
|
6100
|
-
import { Box as
|
|
6101
|
-
import { jsx as
|
|
6211
|
+
import { useEffect as useEffect16, useState as useState36 } from "react";
|
|
6212
|
+
import { Box as Box38, useInput as useInput31 } from "ink";
|
|
6213
|
+
import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6102
6214
|
var ACTIONS4 = ["Start", "SaveCurrentRun", "Delete", "Back", "Main Menu"];
|
|
6103
6215
|
var ACTION_COPY4 = {
|
|
6104
6216
|
Start: { label: "Start", hint: "launch a run from the selected preset" },
|
|
@@ -6112,12 +6224,12 @@ function Presets() {
|
|
|
6112
6224
|
const { pop, resetStack, selectedRunId, setSelectedRunId } = useRouter();
|
|
6113
6225
|
const { toast } = useToast();
|
|
6114
6226
|
const { t } = useLanguage();
|
|
6115
|
-
const [presets, setPresets] =
|
|
6116
|
-
const [selectedIdx, setSelectedIdx] =
|
|
6117
|
-
const [actOnName, setActOnName] =
|
|
6118
|
-
const [pendingDelete, setPendingDelete] =
|
|
6119
|
-
const [saving, setSaving] =
|
|
6120
|
-
const [draftName, setDraftName] =
|
|
6227
|
+
const [presets, setPresets] = useState36(() => listPresets());
|
|
6228
|
+
const [selectedIdx, setSelectedIdx] = useState36(0);
|
|
6229
|
+
const [actOnName, setActOnName] = useState36(() => presets[0]?.name ?? null);
|
|
6230
|
+
const [pendingDelete, setPendingDelete] = useState36(null);
|
|
6231
|
+
const [saving, setSaving] = useState36(false);
|
|
6232
|
+
const [draftName, setDraftName] = useState36("");
|
|
6121
6233
|
const total = presets.length + ACTIONS4.length;
|
|
6122
6234
|
const clampedIdx = Math.min(selectedIdx, Math.max(0, total - 1));
|
|
6123
6235
|
const onPreset = clampedIdx < presets.length;
|
|
@@ -6183,7 +6295,7 @@ function Presets() {
|
|
|
6183
6295
|
setSaving(true);
|
|
6184
6296
|
}
|
|
6185
6297
|
}
|
|
6186
|
-
|
|
6298
|
+
useInput31((_input, key) => {
|
|
6187
6299
|
if (saving) return;
|
|
6188
6300
|
if (key.upArrow) {
|
|
6189
6301
|
setSelectedIdx(() => Math.max(0, clampedIdx - 1));
|
|
@@ -6203,15 +6315,15 @@ function Presets() {
|
|
|
6203
6315
|
}
|
|
6204
6316
|
});
|
|
6205
6317
|
if (saving) {
|
|
6206
|
-
return /* @__PURE__ */
|
|
6318
|
+
return /* @__PURE__ */ jsx53(
|
|
6207
6319
|
Frame,
|
|
6208
6320
|
{
|
|
6209
6321
|
breadcrumb: ["ReevesAgents", "Presets", "Save"],
|
|
6210
6322
|
tagline: "Name the preset captured from the current run.",
|
|
6211
6323
|
statusKeys: "enter save \xB7 esc cancel",
|
|
6212
|
-
children: /* @__PURE__ */
|
|
6213
|
-
/* @__PURE__ */
|
|
6214
|
-
/* @__PURE__ */
|
|
6324
|
+
children: /* @__PURE__ */ jsxs44(Box38, { flexDirection: "column", children: [
|
|
6325
|
+
/* @__PURE__ */ jsx53(Section, { label: "Save Current Run as Preset" }),
|
|
6326
|
+
/* @__PURE__ */ jsx53(
|
|
6215
6327
|
TextField,
|
|
6216
6328
|
{
|
|
6217
6329
|
label: "Preset name",
|
|
@@ -6225,13 +6337,13 @@ function Presets() {
|
|
|
6225
6337
|
onCancel: () => setSaving(false)
|
|
6226
6338
|
}
|
|
6227
6339
|
),
|
|
6228
|
-
/* @__PURE__ */
|
|
6340
|
+
/* @__PURE__ */ jsx53(SectionEnd, {})
|
|
6229
6341
|
] })
|
|
6230
6342
|
}
|
|
6231
6343
|
);
|
|
6232
6344
|
}
|
|
6233
6345
|
if (pendingDelete) {
|
|
6234
|
-
return /* @__PURE__ */
|
|
6346
|
+
return /* @__PURE__ */ jsx53(Frame, { breadcrumb: ["ReevesAgents", "Presets"], statusKeys: "enter select \xB7 esc cancel", children: /* @__PURE__ */ jsx53(
|
|
6235
6347
|
Dialog,
|
|
6236
6348
|
{
|
|
6237
6349
|
title: t("presets.deleteTitle", { name: pendingDelete.name }),
|
|
@@ -6244,16 +6356,16 @@ function Presets() {
|
|
|
6244
6356
|
}
|
|
6245
6357
|
) });
|
|
6246
6358
|
}
|
|
6247
|
-
return /* @__PURE__ */
|
|
6359
|
+
return /* @__PURE__ */ jsx53(
|
|
6248
6360
|
Frame,
|
|
6249
6361
|
{
|
|
6250
6362
|
breadcrumb: ["ReevesAgents", "Presets"],
|
|
6251
6363
|
meta: [{ label: "presets", value: String(presets.length) }],
|
|
6252
6364
|
tagline: "Saved agent-team templates. Start one, save the current run, or delete.",
|
|
6253
6365
|
statusKeys: "enter start/select \xB7 \u2191\u2193 move \xB7 esc back",
|
|
6254
|
-
children: /* @__PURE__ */
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
presets.length === 0 ? /* @__PURE__ */
|
|
6366
|
+
children: /* @__PURE__ */ jsxs44(Box38, { flexDirection: "column", children: [
|
|
6367
|
+
/* @__PURE__ */ jsx53(Section, { label: "Presets" }),
|
|
6368
|
+
presets.length === 0 ? /* @__PURE__ */ jsx53(Row, { selected: false, primary: "No presets yet", trailing: "save a run to create one", disabled: true }) : presets.map((preset, idx) => /* @__PURE__ */ jsx53(
|
|
6257
6369
|
Row,
|
|
6258
6370
|
{
|
|
6259
6371
|
selected: clampedIdx === idx,
|
|
@@ -6263,9 +6375,9 @@ function Presets() {
|
|
|
6263
6375
|
},
|
|
6264
6376
|
preset.name
|
|
6265
6377
|
)),
|
|
6266
|
-
/* @__PURE__ */
|
|
6267
|
-
/* @__PURE__ */
|
|
6268
|
-
ACTIONS4.map((action, idx) => /* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ jsx53(SectionEnd, {}),
|
|
6379
|
+
/* @__PURE__ */ jsx53(Section, { label: "Actions" }),
|
|
6380
|
+
ACTIONS4.map((action, idx) => /* @__PURE__ */ jsx53(
|
|
6269
6381
|
Row,
|
|
6270
6382
|
{
|
|
6271
6383
|
selected: clampedIdx === presets.length + idx,
|
|
@@ -6277,14 +6389,14 @@ function Presets() {
|
|
|
6277
6389
|
},
|
|
6278
6390
|
action
|
|
6279
6391
|
)),
|
|
6280
|
-
/* @__PURE__ */
|
|
6392
|
+
/* @__PURE__ */ jsx53(SectionEnd, {})
|
|
6281
6393
|
] })
|
|
6282
6394
|
}
|
|
6283
6395
|
);
|
|
6284
6396
|
}
|
|
6285
6397
|
|
|
6286
6398
|
// src/tui/router.tsx
|
|
6287
|
-
import { jsx as
|
|
6399
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
6288
6400
|
var RouterContext = createContext6(null);
|
|
6289
6401
|
function useRouter() {
|
|
6290
6402
|
const ctx = useContext6(RouterContext);
|
|
@@ -6297,65 +6409,67 @@ function normalizeScreen(screen) {
|
|
|
6297
6409
|
function renderScreen(screen) {
|
|
6298
6410
|
switch (normalizeScreen(screen)) {
|
|
6299
6411
|
case "LanguageSelect":
|
|
6300
|
-
return /* @__PURE__ */
|
|
6412
|
+
return /* @__PURE__ */ jsx54(LanguageSelect, {});
|
|
6301
6413
|
case "Welcome":
|
|
6302
|
-
return /* @__PURE__ */
|
|
6414
|
+
return /* @__PURE__ */ jsx54(Welcome, {});
|
|
6303
6415
|
case "Runs":
|
|
6304
|
-
return /* @__PURE__ */
|
|
6416
|
+
return /* @__PURE__ */ jsx54(Runs, {});
|
|
6305
6417
|
case "RunHistory":
|
|
6306
|
-
return /* @__PURE__ */
|
|
6418
|
+
return /* @__PURE__ */ jsx54(RunHistory, {});
|
|
6307
6419
|
case "Run":
|
|
6308
|
-
return /* @__PURE__ */
|
|
6420
|
+
return /* @__PURE__ */ jsx54(Run, {});
|
|
6309
6421
|
case "RunAgents":
|
|
6310
|
-
return /* @__PURE__ */
|
|
6422
|
+
return /* @__PURE__ */ jsx54(RunAgents, {});
|
|
6311
6423
|
case "RunOutput":
|
|
6312
|
-
return /* @__PURE__ */
|
|
6424
|
+
return /* @__PURE__ */ jsx54(RunOutput, {});
|
|
6313
6425
|
case "RunStop":
|
|
6314
|
-
return /* @__PURE__ */
|
|
6426
|
+
return /* @__PURE__ */ jsx54(RunStop, {});
|
|
6315
6427
|
case "AgentDetail":
|
|
6316
|
-
return /* @__PURE__ */
|
|
6428
|
+
return /* @__PURE__ */ jsx54(AgentDetail, {});
|
|
6317
6429
|
case "AgentOutput":
|
|
6318
|
-
return /* @__PURE__ */
|
|
6430
|
+
return /* @__PURE__ */ jsx54(AgentOutput, {});
|
|
6319
6431
|
case "AgentTask":
|
|
6320
|
-
return /* @__PURE__ */
|
|
6432
|
+
return /* @__PURE__ */ jsx54(AgentTask, {});
|
|
6321
6433
|
case "AgentKill":
|
|
6322
|
-
return /* @__PURE__ */
|
|
6434
|
+
return /* @__PURE__ */ jsx54(AgentKill, {});
|
|
6323
6435
|
case "NewRun":
|
|
6324
|
-
return /* @__PURE__ */
|
|
6436
|
+
return /* @__PURE__ */ jsx54(NewRun, {});
|
|
6325
6437
|
case "NewRunBasics":
|
|
6326
|
-
return /* @__PURE__ */
|
|
6438
|
+
return /* @__PURE__ */ jsx54(NewRunBasics, {});
|
|
6327
6439
|
case "NewRunRoot":
|
|
6328
|
-
return /* @__PURE__ */
|
|
6440
|
+
return /* @__PURE__ */ jsx54(NewRunRoot, {});
|
|
6329
6441
|
case "NewRunWorkers":
|
|
6330
|
-
return /* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsx54(NewRunWorkers, {});
|
|
6331
6443
|
case "NewRunWorker":
|
|
6332
|
-
return /* @__PURE__ */
|
|
6444
|
+
return /* @__PURE__ */ jsx54(NewRunWorker, {});
|
|
6333
6445
|
case "NewRunReview":
|
|
6334
|
-
return /* @__PURE__ */
|
|
6446
|
+
return /* @__PURE__ */ jsx54(NewRunReview, {});
|
|
6335
6447
|
case "NewRunStarting":
|
|
6336
|
-
return /* @__PURE__ */
|
|
6448
|
+
return /* @__PURE__ */ jsx54(NewRunStarting, {});
|
|
6337
6449
|
case "AddWorker":
|
|
6338
|
-
return /* @__PURE__ */
|
|
6450
|
+
return /* @__PURE__ */ jsx54(AddWorker, {});
|
|
6339
6451
|
case "Settings":
|
|
6340
|
-
return /* @__PURE__ */
|
|
6452
|
+
return /* @__PURE__ */ jsx54(Settings, {});
|
|
6453
|
+
case "Setup":
|
|
6454
|
+
return /* @__PURE__ */ jsx54(Setup, {});
|
|
6341
6455
|
case "AgentControl":
|
|
6342
|
-
return /* @__PURE__ */
|
|
6456
|
+
return /* @__PURE__ */ jsx54(AgentControl, {});
|
|
6343
6457
|
case "Reference":
|
|
6344
|
-
return /* @__PURE__ */
|
|
6458
|
+
return /* @__PURE__ */ jsx54(Reference, {});
|
|
6345
6459
|
case "Credits":
|
|
6346
|
-
return /* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx54(Credits, {});
|
|
6347
6461
|
case "Doctor":
|
|
6348
|
-
return /* @__PURE__ */
|
|
6462
|
+
return /* @__PURE__ */ jsx54(Doctor, {});
|
|
6349
6463
|
case "DoctorCheck":
|
|
6350
|
-
return /* @__PURE__ */
|
|
6464
|
+
return /* @__PURE__ */ jsx54(DoctorCheck, {});
|
|
6351
6465
|
case "Approvals":
|
|
6352
|
-
return /* @__PURE__ */
|
|
6466
|
+
return /* @__PURE__ */ jsx54(Approvals, {});
|
|
6353
6467
|
case "Config":
|
|
6354
|
-
return /* @__PURE__ */
|
|
6468
|
+
return /* @__PURE__ */ jsx54(Config, {});
|
|
6355
6469
|
case "Presets":
|
|
6356
|
-
return /* @__PURE__ */
|
|
6470
|
+
return /* @__PURE__ */ jsx54(Presets, {});
|
|
6357
6471
|
default:
|
|
6358
|
-
return /* @__PURE__ */
|
|
6472
|
+
return /* @__PURE__ */ jsx54(Runs, {});
|
|
6359
6473
|
}
|
|
6360
6474
|
}
|
|
6361
6475
|
function nextHistoryOnPush(prev, screen) {
|
|
@@ -6378,12 +6492,12 @@ function Router({ initialScreen } = {}) {
|
|
|
6378
6492
|
const { exit } = useApp3();
|
|
6379
6493
|
const envRunId = process.env.REEVES_RUN_ID ?? null;
|
|
6380
6494
|
const openTokenRef = useRef4(readTuiOpenToken());
|
|
6381
|
-
const [selectedRunId, setSelectedRunId] =
|
|
6382
|
-
const [selectedAgentId, setSelectedAgentId] =
|
|
6383
|
-
const [selectedCheckName, setSelectedCheckName] =
|
|
6384
|
-
const [selectedWorkerIdx, setSelectedWorkerIdx] =
|
|
6495
|
+
const [selectedRunId, setSelectedRunId] = useState37(envRunId);
|
|
6496
|
+
const [selectedAgentId, setSelectedAgentId] = useState37(null);
|
|
6497
|
+
const [selectedCheckName, setSelectedCheckName] = useState37(null);
|
|
6498
|
+
const [selectedWorkerIdx, setSelectedWorkerIdx] = useState37(null);
|
|
6385
6499
|
const firstRunNeedsLanguage = !initialScreen && !configExists();
|
|
6386
|
-
const [history, setHistory] =
|
|
6500
|
+
const [history, setHistory] = useState37(() => ({
|
|
6387
6501
|
entries: [initialScreen ? normalizeScreen(initialScreen) : firstRunNeedsLanguage ? "LanguageSelect" : "Welcome"],
|
|
6388
6502
|
index: 0
|
|
6389
6503
|
}));
|
|
@@ -6426,7 +6540,7 @@ function Router({ initialScreen } = {}) {
|
|
|
6426
6540
|
const current = normalizeScreen(history.entries[history.index] ?? "Runs");
|
|
6427
6541
|
const canBack = history.index > 0;
|
|
6428
6542
|
const canForward = history.index < history.entries.length - 1;
|
|
6429
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsx54(RouterContext.Provider, { value: {
|
|
6430
6544
|
screen: current,
|
|
6431
6545
|
push,
|
|
6432
6546
|
pop,
|
|
@@ -6443,7 +6557,7 @@ function Router({ initialScreen } = {}) {
|
|
|
6443
6557
|
setSelectedWorkerIdx,
|
|
6444
6558
|
canBack,
|
|
6445
6559
|
canForward
|
|
6446
|
-
}, children: /* @__PURE__ */
|
|
6560
|
+
}, children: /* @__PURE__ */ jsx54(LanguageProvider, { children: /* @__PURE__ */ jsx54(WizardProvider, { children: /* @__PURE__ */ jsx54(WorkerDraftProvider, { children: /* @__PURE__ */ jsx54(ToastProvider, { children: /* @__PURE__ */ jsx54(ErrorBoundary, { children: renderScreen(current) }) }) }) }) }) });
|
|
6447
6561
|
}
|
|
6448
6562
|
export {
|
|
6449
6563
|
Router,
|
|
@@ -6452,4 +6566,4 @@ export {
|
|
|
6452
6566
|
nextHistoryOnReset,
|
|
6453
6567
|
useRouter
|
|
6454
6568
|
};
|
|
6455
|
-
//# sourceMappingURL=router-
|
|
6569
|
+
//# sourceMappingURL=router-7MRY24Y5.js.map
|