@useconvoy/cli 0.163.0 → 0.173.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/LICENSE +201 -89
- package/NOTICE +2 -0
- package/README.md +13 -1
- package/dist/src/agent/app/runner.js +5 -4
- package/dist/src/agent/app/runner.js.map +1 -1
- package/dist/src/agent/app/worktree-op-processor.js +20 -1
- package/dist/src/agent/app/worktree-op-processor.js.map +1 -1
- package/dist/src/commands/connect/workflow.js +7 -3
- package/dist/src/commands/connect/workflow.js.map +1 -1
- package/dist/src/commands/devcontainer/command.js +1 -1
- package/dist/src/commands/devcontainer/command.js.map +1 -1
- package/dist/src/commands/devcontainer/install.d.ts +2 -2
- package/dist/src/commands/devcontainer/install.js +3 -3
- package/dist/src/commands/devcontainer/install.js.map +1 -1
- package/dist/src/commands/init/mcp-service.js +2 -2
- package/dist/src/commands/init/mcp-service.js.map +1 -1
- package/dist/src/commands/keys/workflow.d.ts +2 -0
- package/dist/src/commands/project/workflow.js +2 -3
- package/dist/src/commands/project/workflow.js.map +1 -1
- package/dist/src/commands/projects/archive.d.ts +3 -0
- package/dist/src/commands/projects/archive.js +44 -0
- package/dist/src/commands/projects/archive.js.map +1 -0
- package/dist/src/commands/projects/index.js +4 -1
- package/dist/src/commands/projects/index.js.map +1 -1
- package/dist/src/commands/projects/list.js +6 -5
- package/dist/src/commands/projects/list.js.map +1 -1
- package/dist/src/commands/service/formatters.d.ts +13 -1
- package/dist/src/commands/service/formatters.js +33 -0
- package/dist/src/commands/service/formatters.js.map +1 -1
- package/dist/src/commands/service/validators.d.ts +24 -0
- package/dist/src/commands/service/validators.js +9 -0
- package/dist/src/commands/service/validators.js.map +1 -1
- package/dist/src/commands/service/workflow.js +6 -1
- package/dist/src/commands/service/workflow.js.map +1 -1
- package/dist/src/commands/threads/create.js +19 -1
- package/dist/src/commands/threads/create.js.map +1 -1
- package/dist/src/commands/threads/get.js +2 -0
- package/dist/src/commands/threads/get.js.map +1 -1
- package/dist/src/commands/tui/actions/app.d.ts +2 -1
- package/dist/src/commands/tui/actions/app.js +34 -27
- package/dist/src/commands/tui/actions/app.js.map +1 -1
- package/dist/src/commands/tui/actions/formatters.js +4 -2
- package/dist/src/commands/tui/actions/formatters.js.map +1 -1
- package/dist/src/commands/tui/actions/validators.d.ts +5 -0
- package/dist/src/commands/tui/actions/validators.js +2 -0
- package/dist/src/commands/tui/actions/validators.js.map +1 -1
- package/dist/src/commands/tui/actions/workflow.js +36 -10
- package/dist/src/commands/tui/actions/workflow.js.map +1 -1
- package/dist/src/commands/tui/app.js +158 -66
- package/dist/src/commands/tui/app.js.map +1 -1
- package/dist/src/commands/tui/credentials/app.d.ts +4 -1
- package/dist/src/commands/tui/credentials/app.js +139 -80
- package/dist/src/commands/tui/credentials/app.js.map +1 -1
- package/dist/src/commands/tui/details/app.d.ts +15 -0
- package/dist/src/commands/tui/details/app.js +92 -0
- package/dist/src/commands/tui/details/app.js.map +1 -0
- package/dist/src/commands/tui/details/index.d.ts +1 -0
- package/dist/src/commands/tui/details/index.js +2 -0
- package/dist/src/commands/tui/details/index.js.map +1 -0
- package/dist/src/commands/tui/details/workflow.d.ts +14 -0
- package/dist/src/commands/tui/details/workflow.js +38 -0
- package/dist/src/commands/tui/details/workflow.js.map +1 -0
- package/dist/src/commands/tui/dialog/app.d.ts +18 -1
- package/dist/src/commands/tui/dialog/app.js +49 -10
- package/dist/src/commands/tui/dialog/app.js.map +1 -1
- package/dist/src/commands/tui/dialog/index.d.ts +1 -1
- package/dist/src/commands/tui/dialog/index.js +1 -1
- package/dist/src/commands/tui/dialog/index.js.map +1 -1
- package/dist/src/commands/tui/environments/app.d.ts +3 -1
- package/dist/src/commands/tui/environments/app.js +38 -27
- package/dist/src/commands/tui/environments/app.js.map +1 -1
- package/dist/src/commands/tui/formatters.d.ts +38 -9
- package/dist/src/commands/tui/formatters.js +135 -35
- package/dist/src/commands/tui/formatters.js.map +1 -1
- package/dist/src/commands/tui/logs/app.d.ts +3 -1
- package/dist/src/commands/tui/logs/app.js +22 -9
- package/dist/src/commands/tui/logs/app.js.map +1 -1
- package/dist/src/commands/tui/logs/formatters.js +2 -2
- package/dist/src/commands/tui/logs/formatters.js.map +1 -1
- package/dist/src/commands/tui/mouse.d.ts +26 -0
- package/dist/src/commands/tui/mouse.js +107 -0
- package/dist/src/commands/tui/mouse.js.map +1 -0
- package/dist/src/commands/tui/onboarding/app.d.ts +3 -1
- package/dist/src/commands/tui/onboarding/app.js +97 -85
- package/dist/src/commands/tui/onboarding/app.js.map +1 -1
- package/dist/src/commands/tui/onboarding/runtime-access.js +2 -1
- package/dist/src/commands/tui/onboarding/runtime-access.js.map +1 -1
- package/dist/src/commands/tui/render.js +5 -3
- package/dist/src/commands/tui/render.js.map +1 -1
- package/dist/src/commands/tui/runtimes/app.d.ts +2 -1
- package/dist/src/commands/tui/runtimes/app.js +9 -9
- package/dist/src/commands/tui/runtimes/app.js.map +1 -1
- package/dist/src/commands/tui/workflow.d.ts +12 -2
- package/dist/src/commands/tui/workflow.js +6 -3
- package/dist/src/commands/tui/workflow.js.map +1 -1
- package/dist/src/convex/_generated/api.d.ts +0 -2
- package/dist/src/convex/_generated/server.d.ts +3 -3
- package/dist/src/lib/browser-login.js +2 -2
- package/dist/src/lib/browser-login.js.map +1 -1
- package/dist/src/lib/connect-events.d.ts +2 -0
- package/dist/src/lib/connect-events.js.map +1 -1
- package/dist/src/lib/git/checkpoint.d.ts +2 -0
- package/dist/src/lib/git/checkpoint.js +5 -4
- package/dist/src/lib/git/checkpoint.js.map +1 -1
- package/dist/src/lib/git/exec.d.ts +4 -0
- package/dist/src/lib/git/exec.js +9 -3
- package/dist/src/lib/git/exec.js.map +1 -1
- package/dist/src/lib/git/history.d.ts +33 -0
- package/dist/src/lib/git/history.js +108 -0
- package/dist/src/lib/git/history.js.map +1 -0
- package/dist/src/lib/git/index.d.ts +1 -0
- package/dist/src/lib/git/index.js +1 -0
- package/dist/src/lib/git/index.js.map +1 -1
- package/dist/src/lib/git/worktrees.js +3 -1
- package/dist/src/lib/git/worktrees.js.map +1 -1
- package/dist/src/lib/url.d.ts +5 -5
- package/dist/src/lib/url.js +19 -6
- package/dist/src/lib/url.js.map +1 -1
- package/dist/templates/project-isolation/devcontainer.json +1 -1
- package/package.json +4 -3
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { LogEntry } from "../../service/validators.js";
|
|
2
2
|
import type { Row } from "../validators.js";
|
|
3
|
+
import type { LoginRuntime } from "../../project/validators.js";
|
|
3
4
|
export type Action = "cancel" | "stop" | "start" | "status" | "logs" | "pause" | "reload" | "shell" | "login-codex" | "login-claude-code" | "login-antigravity" | "check" | "remove";
|
|
4
5
|
/** Login actions run only that runtime's login in the private shell, then reload. */
|
|
5
6
|
export declare const loginRuntime: (kind: Action) => "cursor" | "codex" | "claude-code" | "antigravity" | "opencode" | undefined;
|
|
7
|
+
/** The TUI login action of a runtime; Cursor and OpenCode have none. */
|
|
8
|
+
export declare const loginAction: (runtime: LoginRuntime) => Action | undefined;
|
|
6
9
|
export interface ActionState {
|
|
7
10
|
kind: Action;
|
|
8
11
|
profile?: string;
|
|
9
12
|
identity?: string;
|
|
13
|
+
/** A shared environment's Sign in: `profile` only carries the terminal, and every project reloads after it. */
|
|
14
|
+
environment?: boolean;
|
|
10
15
|
pauseBeforeShell?: boolean;
|
|
11
16
|
pending?: boolean;
|
|
12
17
|
busy?: boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const LOGIN_ACTIONS = { "login-codex": "codex", "login-claude-code": "claude-code", "login-antigravity": "antigravity" };
|
|
2
2
|
/** Login actions run only that runtime's login in the private shell, then reload. */
|
|
3
3
|
export const loginRuntime = (kind) => LOGIN_ACTIONS[kind];
|
|
4
|
+
/** The TUI login action of a runtime; Cursor and OpenCode have none. */
|
|
5
|
+
export const loginAction = (runtime) => Object.keys(LOGIN_ACTIONS).find(kind => LOGIN_ACTIONS[kind] === runtime);
|
|
4
6
|
//# sourceMappingURL=validators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/commands/tui/actions/validators.ts"],"names":[],"mappings":"AAKA,MAAM,aAAa,GAA0C,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC;AAChK,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/commands/tui/actions/validators.ts"],"names":[],"mappings":"AAKA,MAAM,aAAa,GAA0C,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC;AAChK,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAClE,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAqB,EAAE,EAAE,CAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC"}
|
|
@@ -29,6 +29,21 @@ export class ActionWorkflow {
|
|
|
29
29
|
}
|
|
30
30
|
if (!live)
|
|
31
31
|
return "Service disconnected. Reconnect before using this control.";
|
|
32
|
+
const login = loginRuntime(kind), observed = state.observations[state.scope.connection].profiles;
|
|
33
|
+
// A shared environment's login is its own: Details runs it once, then reloads every project. Spec: docs/specs/cli-tui.md#runtimes-in-details-cli-01690-os-2502
|
|
34
|
+
if (login && target.mode === "shared") {
|
|
35
|
+
if (!state.scope.details)
|
|
36
|
+
return "Sign in from environment Details. A login on a shared environment applies to every project.";
|
|
37
|
+
if (!observed.length)
|
|
38
|
+
return "Add a project first. Sign in runs through this environment's service.";
|
|
39
|
+
if (!client?.hello?.capabilities?.includes("host-cli-v1"))
|
|
40
|
+
return "Update the service for project maintenance.";
|
|
41
|
+
if (!target.shell)
|
|
42
|
+
return "Sign in needs a shared environment this TUI can open a terminal in.";
|
|
43
|
+
if (observed.some(p => p.runtimes) && !observed.some(p => p.runtimes?.includes(login)))
|
|
44
|
+
return `${loginRuntimeLabels[login]} was not detected in this environment. Install it for this account, then reload the projects.`;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
32
47
|
if (PROJECT.includes(kind)) {
|
|
33
48
|
if (state.scope.details || !state.scope.profile)
|
|
34
49
|
return "Select one registered project first.";
|
|
@@ -39,7 +54,6 @@ export class ActionWorkflow {
|
|
|
39
54
|
return "Update the service for project maintenance.";
|
|
40
55
|
if ((kind === "shell" || loginRuntime(kind)) && !target.shell)
|
|
41
56
|
return "Private shell requires a configured Linux project environment or managed Docker target.";
|
|
42
|
-
const login = loginRuntime(kind);
|
|
43
57
|
if (login && project.runtimes && !project.runtimes.includes(login)) {
|
|
44
58
|
return `${loginRuntimeLabels[login]} was not detected on this target when ${project.profile} last started. Install it ${target.mode === "shared" ? "for this account" : "root-owned, for example under /usr/local/bin"}, then [u] Reload project.`;
|
|
45
59
|
}
|
|
@@ -63,12 +77,13 @@ export class ActionWorkflow {
|
|
|
63
77
|
}
|
|
64
78
|
this.actionClient = this.host.client();
|
|
65
79
|
const state = this.host.state();
|
|
66
|
-
|
|
67
|
-
const project = state.observations[state.scope.connection].profiles.find(p => p.profile === profile);
|
|
68
|
-
// A shared shell or login interrupts nothing, so it needs no pause or confirmation. Spec: docs/specs/cli-shared-environments.md#runtimes-and-logins
|
|
80
|
+
// A shared shell interrupts nothing, so it needs no pause or confirmation. Spec: docs/specs/cli-shared-environments.md#runtimes-and-logins
|
|
69
81
|
const terminal = kind === "shell" || Boolean(loginRuntime(kind)), shared = terminal && this.host.targets[state.scope.connection].mode === "shared";
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
// A shared Sign in runs its terminal through any registered project, then reloads them all, so it confirms.
|
|
83
|
+
const environment = shared && Boolean(loginRuntime(kind)), profiles = state.observations[state.scope.connection].profiles;
|
|
84
|
+
const project = environment ? profiles[0] : profiles.find(p => p.profile === state.scope.profile);
|
|
85
|
+
this.host.set({ action: { kind, row, profile: environment ? project?.profile : state.scope.profile, identity: project?.identity, environment: environment || undefined,
|
|
86
|
+
pauseBeforeShell: terminal && !shared && !project?.paused, pending: environment || (!shared && !["status", "logs", "check"].includes(kind)) } });
|
|
72
87
|
if (!this.host.state().action?.pending)
|
|
73
88
|
void this.executeAction();
|
|
74
89
|
}
|
|
@@ -138,10 +153,21 @@ export class ActionWorkflow {
|
|
|
138
153
|
sent = false;
|
|
139
154
|
shellStarted = true;
|
|
140
155
|
await this.host.shell(signal => target.shell(action.profile, action.identity, signal, login));
|
|
141
|
-
if (shared)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
if (shared && login) {
|
|
157
|
+
sent = true;
|
|
158
|
+
// The login can take minutes; reload only the registrations that were confirmed and still stand.
|
|
159
|
+
const after = await client.request({ op: "status" });
|
|
160
|
+
this.host.event(after);
|
|
161
|
+
const confirmed = status.profiles ?? [];
|
|
162
|
+
const projects = confirmed.filter(p => after.profiles?.some(now => now.profile === p.profile && now.identity === p.identity));
|
|
163
|
+
for (const { profile } of projects)
|
|
164
|
+
await client.request({ op: "reconcile", profile, interrupt: true });
|
|
165
|
+
const changed = confirmed.filter(p => !projects.includes(p)).map(p => p.profile);
|
|
166
|
+
message = `Signed in to ${loginRuntimeLabels[login]}. Reloaded ${projects.length} project${projects.length === 1 ? "" : "s"} in ${target.name}; each reconnects with the new login.`
|
|
167
|
+
+ (changed.length ? ` Not reloaded, registration changed during sign in: ${changed.join(", ")}. Reload it from its Actions.` : "");
|
|
168
|
+
}
|
|
169
|
+
else if (shared)
|
|
170
|
+
message = "Shell exited. Logins made there apply to every project in this environment.";
|
|
145
171
|
else if (login) {
|
|
146
172
|
sent = true;
|
|
147
173
|
await client.request({ op: "reconcile", profile: action.profile, interrupt: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../../../src/commands/tui/actions/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAK/D,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAqB,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC;AAgBhH,4GAA4G;AAC5G,MAAM,OAAO,cAAc;IAEL;IADZ,YAAY,CAAiB;IACrC,YAAoB,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;IAAG,CAAC;IAClC,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACrG,OAAO,KAAK,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC;IAC5C,WAAW,CAAC,IAAY,EAAE,GAAS;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,I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Q,EAAE;YAAE,OAAO,KAAK,CAAC;QACrE,IAAI,CAAC;YAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QAC7E,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QAAC,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, Spinner } from "./dialog/index.js";
|
|
2
|
+
import { Clickable, Dialog, Spinner } from "./dialog/index.js";
|
|
3
3
|
import { Environments } from "./environments/index.js";
|
|
4
|
-
import { useEffect, useState, useSyncExternalStore } from "react";
|
|
4
|
+
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
5
5
|
import { Box, Text, useApp, useInput, useWindowSize } from "ink";
|
|
6
|
+
import { useMouseTracking, useWheel } from "./mouse.js";
|
|
6
7
|
import { getCliVersion } from "../../lib/version.js";
|
|
7
|
-
import { detailLines, environmentTone, healthTones, palette, plain, rowCells, rowId, warningLines, warningGroups, wrapLines } from "./formatters.js";
|
|
8
|
+
import { alignColumns, detailLines, DOT_GLYPHS, environmentTone, fitHints, healthTones, palette, plain, rowCells, rowId, scrollWindow, warningLines, warningGroups, wrapLines } from "./formatters.js";
|
|
8
9
|
import { Actions, ActionDialog } from "./actions/index.js";
|
|
9
10
|
import { LogDetail } from "./logs/index.js";
|
|
10
11
|
import { Onboarding } from "./onboarding/index.js";
|
|
11
12
|
import { Credentials } from "./credentials/index.js";
|
|
12
13
|
import { Runtimes } from "./runtimes/index.js";
|
|
14
|
+
import { Details } from "./details/index.js";
|
|
13
15
|
const clientVersion = getCliVersion();
|
|
14
16
|
function scopeId(scope) { return `${scope.connection}:${scope.addProject ? "add" : scope.details ? "details" : scope.profile === undefined ? "all" : `profile:${scope.profile}`}`; }
|
|
15
|
-
const tab = (label, selected) => [label, selected];
|
|
17
|
+
const tab = (label, selected, activate) => [label, selected, activate];
|
|
16
18
|
const statusTones = { connecting: "warning", online: "success", retrying: "warning", blocked: "danger", failed: "danger", stopped: "muted" };
|
|
19
|
+
// The ? list: the focused view's keys, then the global ones. Spec: docs/specs/cli-tui.md#tui-ux-review-cli-01700-os-2547
|
|
20
|
+
const VIEW_KEYS = {
|
|
21
|
+
Sidebar: [["↑/↓ j/k", "select a row; its view opens"], ["→ / ←", "expand / collapse an environment"], ["Enter / Space", "expand an environment or focus its view"], ["E", "add environment"], ["+", "add project"]],
|
|
22
|
+
Details: [["↑/↓ j/k", "select a runtime row"], ["PgUp / PgDn", "scroll"], ["[key] on a row", "that row's action"], ["s", "inspect status"], ["+", "add project"]],
|
|
23
|
+
Actions: [["↑/↓ j/k", "select an action"], ["Enter", "run the selected action"], ["[key] on a row", "run that action"], ["Esc", "back"]],
|
|
24
|
+
Credentials: [["↑/↓ j/k", "select"], ["Enter", "open"], ["Esc", "back"]],
|
|
25
|
+
"Agent runtimes": [["↑/↓ j/k", "select"], ["Space", "check a runtime"], ["Esc", "back"]],
|
|
26
|
+
Runs: [["↑/↓ j/k", "select a thread"], ["Enter", "open its execution history"], ["n / PgDn", "next page"], ["p / PgUp", "previous page"], ["Home", "first page"]],
|
|
27
|
+
"Execution history": [["↑/↓ j/k", "select a run"], ["Enter", "open its logs"], ["c", "cancel the selected active run"], ["n / p", "next / previous page"], ["Esc", "back to threads"]],
|
|
28
|
+
};
|
|
29
|
+
const GLOBAL_KEYS = [["←/→ Tab", "switch panes"], ["d a c", "environment Details, Actions, Credentials"], ["r a", "project Runs, Actions"],
|
|
30
|
+
["w", "all project notices"], ["f", "retry connection"], ["m", "mouse on or off, to select text"], ["?", "this list"], ["q Ctrl+C", "detach; the service keeps running"]];
|
|
17
31
|
export function App({ browser, onboardingLoad }) {
|
|
18
32
|
const state = useSyncExternalStore(browser.subscribe, browser.getSnapshot);
|
|
19
33
|
const { exit } = useApp();
|
|
@@ -24,9 +38,13 @@ export function App({ browser, onboardingLoad }) {
|
|
|
24
38
|
const [addEnvironmentSelected, setAddEnvironmentSelected] = useState(false);
|
|
25
39
|
const [actionSelection, setActionSelection] = useState();
|
|
26
40
|
const [selectedId, setSelectedId] = useState();
|
|
27
|
-
const [detailOffset, setDetailOffset] = useState(0);
|
|
28
41
|
const [warningsOpen, setWarningsOpen] = useState(false);
|
|
29
|
-
|
|
42
|
+
const [keysOpen, setKeysOpen] = useState(false);
|
|
43
|
+
const reading = warningsOpen || keysOpen;
|
|
44
|
+
const [mouse, setMouse] = useState(true);
|
|
45
|
+
// Set by an open form or editor: a sidebar click leaves it, asking first on a draft. Spec: docs/specs/cli-tui.md#leaving-editors-and-panel-spacing-cli-01681
|
|
46
|
+
const leave = useRef(undefined);
|
|
47
|
+
useEffect(() => { setWarningsOpen(false); setKeysOpen(false); }, [state.scope.connection, state.scope.profile, state.scope.details, state.actions, state.credentials, state.runtimes]);
|
|
30
48
|
useEffect(() => {
|
|
31
49
|
setAddEnvironmentSelected(false);
|
|
32
50
|
if (state.environment === "create")
|
|
@@ -39,9 +57,9 @@ export function App({ browser, onboardingLoad }) {
|
|
|
39
57
|
const rows = [{ scope: { connection: index, details: true },
|
|
40
58
|
text: `${expanded.has(index) ? "▾" : "▸"} ${connection.name}`, transport: connection.transport, health }];
|
|
41
59
|
if (expanded.has(index)) {
|
|
42
|
-
rows.push({ scope: { connection: index, details: true }, view: "actions", text: " Actions", transport: "", health });
|
|
43
|
-
rows.push({ scope: { connection: index, details: true }, view: "credentials", text: " Credentials", transport: "", health });
|
|
44
|
-
rows.push({ scope: { connection: index, details: true, addProject: true }, text: " + Add project", transport: "", health });
|
|
60
|
+
rows.push({ scope: { connection: index, details: true }, view: "actions", text: " Actions", transport: "", health, shortcut: "a" });
|
|
61
|
+
rows.push({ scope: { connection: index, details: true }, view: "credentials", text: " Credentials", transport: "", health, shortcut: "c" });
|
|
62
|
+
rows.push({ scope: { connection: index, details: true, addProject: true }, text: " + Add project", transport: "", health, shortcut: "+" });
|
|
45
63
|
rows.push(...state.observations[index].profiles.map(profile => ({
|
|
46
64
|
scope: { connection: index, profile: profile.profile, details: false }, text: ` ${profile.displayName?.trim() && profile.displayName.trim() !== profile.profile ? `${profile.displayName.trim()} (${profile.profile})` : profile.profile}`, transport: "", health,
|
|
47
65
|
// Pushed with each service snapshot; other environments' counts would be stale.
|
|
@@ -63,9 +81,12 @@ export function App({ browser, onboardingLoad }) {
|
|
|
63
81
|
const selectedSidebarLine = Math.max(0, sidebarLines.findIndex(row => row && isSelected(row)));
|
|
64
82
|
const selectedRow = Math.max(0, state.rows.findIndex(row => rowId(row) === selectedId));
|
|
65
83
|
const lines = detailLines(state, target.endpoint, clientVersion, target.mode);
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
const
|
|
84
|
+
// The endpoint line shows only while the connection fails; Details lists it otherwise.
|
|
85
|
+
const failing = observation.health === "reconnecting" || observation.health === "incompatible";
|
|
86
|
+
const header = failing ? 2 : 1;
|
|
87
|
+
const capacity = Math.max(1, size.height - 6 - header);
|
|
88
|
+
const sidebarWindow = scrollWindow(sidebarLines.length, capacity, 0, selectedSidebarLine);
|
|
89
|
+
const choose = (scope) => { setAddEnvironmentSelected(false); browser.select(scope); setSelectedId(undefined); };
|
|
69
90
|
// Sidebar rows pick the view too: Actions and Credentials rows open those panels, every other row its default.
|
|
70
91
|
const chooseView = (scope, view) => {
|
|
71
92
|
choose(scope);
|
|
@@ -80,32 +101,95 @@ export function App({ browser, onboardingLoad }) {
|
|
|
80
101
|
const narrow = size.width < 76;
|
|
81
102
|
const workflow = Boolean(state.environment || state.onboarding);
|
|
82
103
|
const editing = state.credentials === "editing" || state.runtimes === "editing";
|
|
83
|
-
|
|
104
|
+
// Below 100 columns the sidebar narrows so the panel keeps its values; names truncate.
|
|
105
|
+
const sidebarWidth = narrow && (workflow || pane === "content") ? 0 : narrow ? size.width : size.width < 100 ? 22 : 30;
|
|
84
106
|
const actionWidth = Math.max(1, size.width - sidebarWidth - 2);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
...(state.
|
|
91
|
-
|
|
107
|
+
// A line with a key hint runs that key on click, where the key works too.
|
|
108
|
+
const inspect = state.scope.details && !state.credentials && !state.runtimes ? () => void browser.inspectEnvironment() : undefined;
|
|
109
|
+
const retry = !state.credentials && !state.runtimes ? () => browser.retryNow() : undefined;
|
|
110
|
+
// A hint names its key only where the key and click work.
|
|
111
|
+
const contextLines = reading ? [] : [
|
|
112
|
+
...(state.error ? wrapLines(plain(state.error), actionWidth).slice(0, 2).map(text => ({ text, warn: true })) : []),
|
|
113
|
+
...(observation.environmentError ? wrapLines(`${plain(observation.environmentError)}${inspect ? " · [s] Retry check" : ""}`, actionWidth).slice(0, 2).map(text => ({ text, warn: true, run: inspect })) : []),
|
|
114
|
+
...(observation.checkingEnvironment ? [{ text: "Checking status…" }] : []),
|
|
115
|
+
...(state.stale && observation.snapshot ? [{ text: `Last observation is stale.${retry ? " [f] Retry connection" : ""}`, run: retry }] : []),
|
|
116
|
+
...(state.scope.details && !state.credentials && !target.maintenance ? [{ text: "Host lifecycle is not managed here. Service controls are in Actions." }] : []),
|
|
117
|
+
].slice(0, Math.max(1, size.height - 9 - header));
|
|
92
118
|
const warnings = state.scope.addProject || editing ? [] : warningGroups(observation.profiles, state.scope.profile);
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const contentHeight = Math.max(1, size.height - 8 - contextLines.length - warningHeight - (toolbar ? 2 : 0));
|
|
119
|
+
const warningHeight = warnings.length && !reading ? 2 : 0;
|
|
120
|
+
const toolbar = !reading && state.scope.details && !state.actions && !state.credentials && !state.runtimes && !state.scope.addProject;
|
|
121
|
+
const contentHeight = Math.max(1, size.height - 6 - header - (contextLines.length && contextLines.length + 1) - warningHeight - (toolbar ? 2 : 0));
|
|
97
122
|
const compact = contentHeight < 10;
|
|
98
123
|
const tableLines = contentHeight - 1 - (compact ? 0 : 2) - (state.rows[selectedRow]?.run ? 1 : 0);
|
|
99
|
-
const visibleRows = Math.max(1, Math.floor(
|
|
124
|
+
const visibleRows = Math.max(1, Math.floor(tableLines / 2));
|
|
100
125
|
const rowStart = Math.max(0, selectedRow - visibleRows + 1);
|
|
101
|
-
const
|
|
126
|
+
const toggleExpanded = (connection) => setExpanded(old => {
|
|
127
|
+
const next = new Set(old);
|
|
128
|
+
if (next.has(connection))
|
|
129
|
+
next.delete(connection);
|
|
130
|
+
else
|
|
131
|
+
next.add(connection);
|
|
132
|
+
return next;
|
|
133
|
+
});
|
|
134
|
+
// Moves the run selection, by ↑/↓ or the wheel; Details scrolls itself.
|
|
135
|
+
// An updater, so several wheel reports in one stdin chunk each move a step.
|
|
136
|
+
const scroll = (delta) => setSelectedId(old => {
|
|
137
|
+
const row = state.rows[Math.max(0, Math.min(state.rows.length - 1, Math.max(0, state.rows.findIndex(row => rowId(row) === old)) + delta))];
|
|
138
|
+
return row ? rowId(row) : old;
|
|
139
|
+
});
|
|
140
|
+
// The states where useInput below stops before navigation keys; clicks and the wheel stop there too.
|
|
141
|
+
const locked = Boolean(reading || workflow || state.detail || state.action?.busy || editing || state.action?.pending || (state.action?.message && !state.action.entries));
|
|
142
|
+
const unlocked = (action) => () => { if (!locked)
|
|
143
|
+
action(); };
|
|
144
|
+
// Details owns ↑/↓, its row keys and c while its panel has focus.
|
|
145
|
+
const detailsShown = state.scope.details && !reading && !state.scope.addProject && !state.runtimes && !state.credentials && !state.actions && !(state.action && !state.action.pending);
|
|
146
|
+
const sidebarClick = (action) => () => { if (leave.current)
|
|
147
|
+
leave.current(action);
|
|
148
|
+
else if (!locked)
|
|
149
|
+
action(); };
|
|
150
|
+
// Enter on a run row: a thread opens its history, a run its logs.
|
|
151
|
+
const openRow = (row) => {
|
|
152
|
+
if (!state.history) {
|
|
153
|
+
browser.history(row);
|
|
154
|
+
setSelectedId(undefined);
|
|
155
|
+
}
|
|
156
|
+
else if (row.run)
|
|
157
|
+
browser.logs(row);
|
|
158
|
+
};
|
|
159
|
+
// The first click selects a run row and focuses the table; a click on the selected row opens it.
|
|
160
|
+
const clickRun = (row, selected) => {
|
|
161
|
+
if (selected && pane === "content") {
|
|
162
|
+
openRow(row);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
setSelectedId(rowId(row));
|
|
166
|
+
setPane("content");
|
|
167
|
+
};
|
|
168
|
+
const clickRow = (row) => {
|
|
169
|
+
if (row.loading)
|
|
170
|
+
return;
|
|
171
|
+
chooseView(row.scope, row.view);
|
|
172
|
+
if (row.scope.addProject) {
|
|
173
|
+
browser.openOnboarding();
|
|
174
|
+
setPane("content");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
setPane("sidebar");
|
|
178
|
+
if (row.scope.details && !row.view)
|
|
179
|
+
toggleExpanded(row.scope.connection);
|
|
180
|
+
};
|
|
102
181
|
useInput((input, key) => {
|
|
103
182
|
if ((input === "q" && !state.detail && !state.onboarding && !state.environment && !editing) || (key.ctrl && input === "c")) {
|
|
104
183
|
browser.dispose();
|
|
105
184
|
exit();
|
|
106
185
|
return;
|
|
107
186
|
}
|
|
108
|
-
|
|
187
|
+
// The read-only warnings list keeps the toggle so its text can be copied.
|
|
188
|
+
if (input === "m" && !key.ctrl && !key.meta && (!locked || reading)) {
|
|
189
|
+
setMouse(on => !on);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (reading || state.environment || state.onboarding || state.detail || state.action?.busy || editing)
|
|
109
193
|
return;
|
|
110
194
|
if (state.action?.pending) {
|
|
111
195
|
if (small && (key.escape || input === "n" || key.return))
|
|
@@ -116,6 +200,10 @@ export function App({ browser, onboardingLoad }) {
|
|
|
116
200
|
setWarningsOpen(true);
|
|
117
201
|
return;
|
|
118
202
|
}
|
|
203
|
+
if (input === "?" && !key.ctrl && !key.meta) {
|
|
204
|
+
setKeysOpen(true);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
119
207
|
if (state.action?.message && !state.action.entries) {
|
|
120
208
|
if (key.escape)
|
|
121
209
|
browser.dismissAction();
|
|
@@ -192,7 +280,7 @@ export function App({ browser, onboardingLoad }) {
|
|
|
192
280
|
setPane("content");
|
|
193
281
|
return;
|
|
194
282
|
}
|
|
195
|
-
if ((input === "a" || input === "c") && state.scope.details) {
|
|
283
|
+
if ((input === "a" || (input === "c" && !(detailsShown && pane === "content"))) && state.scope.details) {
|
|
196
284
|
chooseView({ connection: state.scope.connection, details: true }, input === "a" ? "actions" : "credentials");
|
|
197
285
|
setPane("content");
|
|
198
286
|
return;
|
|
@@ -228,14 +316,7 @@ export function App({ browser, onboardingLoad }) {
|
|
|
228
316
|
setPane("content");
|
|
229
317
|
return;
|
|
230
318
|
}
|
|
231
|
-
|
|
232
|
-
const next = new Set(old);
|
|
233
|
-
if (next.has(state.scope.connection))
|
|
234
|
-
next.delete(state.scope.connection);
|
|
235
|
-
else
|
|
236
|
-
next.add(state.scope.connection);
|
|
237
|
-
return next;
|
|
238
|
-
});
|
|
319
|
+
toggleExpanded(state.scope.connection);
|
|
239
320
|
return;
|
|
240
321
|
}
|
|
241
322
|
if (pane === "sidebar" && key.return && !state.scope.details) {
|
|
@@ -264,13 +345,8 @@ export function App({ browser, onboardingLoad }) {
|
|
|
264
345
|
setSelectedId(undefined);
|
|
265
346
|
return;
|
|
266
347
|
}
|
|
267
|
-
if (key.return && state.
|
|
268
|
-
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (key.return && !state.history && state.rows[selectedRow]) {
|
|
272
|
-
browser.history(state.rows[selectedRow]);
|
|
273
|
-
setSelectedId(undefined);
|
|
348
|
+
if (key.return && state.rows[selectedRow]) {
|
|
349
|
+
openRow(state.rows[selectedRow]);
|
|
274
350
|
return;
|
|
275
351
|
}
|
|
276
352
|
}
|
|
@@ -287,40 +363,56 @@ export function App({ browser, onboardingLoad }) {
|
|
|
287
363
|
chooseView(row.scope, row.view);
|
|
288
364
|
}
|
|
289
365
|
}
|
|
290
|
-
else if (state.scope.details)
|
|
291
|
-
|
|
292
|
-
else {
|
|
293
|
-
const row = state.rows[Math.max(0, Math.min(state.rows.length - 1, selectedRow + delta))];
|
|
294
|
-
if (row)
|
|
295
|
-
setSelectedId(rowId(row));
|
|
296
|
-
}
|
|
366
|
+
else if (!state.scope.details)
|
|
367
|
+
scroll(delta);
|
|
297
368
|
});
|
|
369
|
+
useMouseTracking(mouse);
|
|
370
|
+
useWheel(locked || state.scope.details || state.actions || state.credentials || state.runtimes ? undefined : scroll);
|
|
298
371
|
if (small && !state.detail && !state.onboarding && !state.environment && !editing)
|
|
299
372
|
return _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Resize to 45\u00D710 to browse." }), _jsx(Text, { children: "q / Ctrl+C detach" })] });
|
|
300
373
|
const fill = (selected, active) => selected ? { backgroundColor: active ? palette.selected : palette.idle, color: active ? palette.selectedText : palette.idleText } : {};
|
|
301
374
|
const keys = (hints) => _jsx(Text, { wrap: "truncate", color: palette.muted, children: hints.map(([key, label], i) => _jsxs(Text, { children: [i ? " " : "", _jsx(Text, { color: palette.accent, children: key }), " ", label] }, i)) });
|
|
302
|
-
const
|
|
375
|
+
const viewName = pane === "sidebar" ? "Sidebar" : state.runtimes ? "Agent runtimes" : state.actions ? "Actions" : state.credentials ? "Credentials" : state.scope.details ? "Details" : state.history ? "Execution history" : "Runs";
|
|
376
|
+
// The focused view's keys first; the tail always fits. Spec: docs/specs/cli-tui.md#tui-ux-review-cli-01700-os-2547
|
|
377
|
+
const environmentRow = state.scope.details && !state.scope.addProject && !view;
|
|
378
|
+
const viewHints = {
|
|
379
|
+
Sidebar: [["[Enter]", "open"], ...environmentRow ? [["[←/→]", "expand"]] : [], ["[E]", "add environment"], ["[f]", "retry"], ["[↑/↓]", "select"]],
|
|
380
|
+
Details: [["[↑/↓]", "rows"], ["[s]", "inspect"], ["[f]", "retry"], ["[Esc]", "sidebar"]],
|
|
381
|
+
Actions: [["[Enter]", "choose"], ["[Esc]", "back"], ["[↑/↓]", "select"]],
|
|
382
|
+
Credentials: [["[Enter]", "open"], ["[Esc]", "back"], ["[↑/↓]", "select"]],
|
|
383
|
+
"Agent runtimes": [["[Esc]", "back"], ["[↑/↓]", "select"]],
|
|
384
|
+
Runs: [["[Enter]", "open"], ["[n/p]", "page"], ["[Esc]", "sidebar"], ["[↑/↓]", "select"]],
|
|
385
|
+
"Execution history": [["[Enter]", "logs"], ...state.rows[selectedRow]?.run?.status === "streaming" ? [["[c]", "cancel"]] : [], ["[Esc]", "back"], ["[n/p]", "page"], ["[↑/↓]", "select"]],
|
|
386
|
+
};
|
|
387
|
+
const mouseHint = ["[m]", mouse ? "select text" : "mouse"];
|
|
388
|
+
const footerHints = reading ? fitHints([["[↑/↓ PgUp/PgDn]", "scroll"], ["[Esc]", "back"]], [mouseHint, ["[q]", "detach"]], actionWidth)
|
|
389
|
+
: fitHints(viewHints[viewName], [mouseHint, ["[?]", "keys"], ["[q]", "detach"]], actionWidth);
|
|
390
|
+
const tabs = state.scope.details ? [] : [tab("[r] Runs", !state.actions, () => browser.showActions(false)), tab("[a] Actions", Boolean(state.actions), () => { browser.showActions(true); setPane("content"); })];
|
|
303
391
|
const title = state.runtimes ? "Agent runtimes" : view === "actions" ? "Actions" : view === "credentials" ? "Credentials" : state.scope.addProject ? "Add project" : "Details";
|
|
304
|
-
const wide = actionWidth >=
|
|
392
|
+
const wide = actionWidth >= 60;
|
|
305
393
|
const runs = state.rows.slice(rowStart, rowStart + visibleRows).map((row, index) => ({ row, cells: rowCells(row), selected: rowStart + index === selectedRow }));
|
|
306
|
-
return _jsxs(Box, { flexDirection: "column", width: size.width, height: size.height - 1, backgroundColor: palette.base, children: [!state.detail && _jsxs(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, backgroundColor: palette.surface, children: [_jsxs(Box, { height: 1, gap: 2, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, color: palette.accent, children: "convoy" }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "truncate", color: palette.text, children: [plain(target.name), " / ", plain(target.transport)] }) }), _jsx(Box, { flexShrink: narrow ? 1 : 0, children: _jsxs(Text, { wrap: "truncate", color: palette.muted, children: ["client ", clientVersion, " \u00B7 service ", plain(observation.version)] }) })] }),
|
|
394
|
+
return _jsxs(Box, { flexDirection: "column", width: size.width, height: size.height - 1, backgroundColor: palette.base, children: [!state.detail && _jsxs(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, backgroundColor: palette.surface, children: [_jsxs(Box, { height: 1, gap: 2, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, color: palette.accent, children: "convoy" }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "truncate", color: palette.text, children: [plain(target.name), " / ", plain(target.transport)] }) }), _jsx(Box, { flexShrink: narrow ? 1 : 0, children: _jsxs(Text, { wrap: "truncate", color: palette.muted, children: ["client ", clientVersion, " \u00B7 service ", plain(observation.version)] }) })] }), failing && _jsx(Text, { wrap: "truncate", color: palette.muted, children: plain(target.endpoint) })] }), _jsxs(Box, { height: Math.max(1, size.height - (state.detail ? 1 : 2 + header)), children: [_jsxs(Box, { display: small || sidebarWidth === 0 ? "none" : "flex", width: sidebarWidth, flexShrink: 0, flexDirection: "column", paddingRight: 1, paddingTop: 1, backgroundColor: palette.surface, children: [_jsx(Text, { color: palette.muted, children: " ENVIRONMENTS" }), _jsx(Clickable, { onClick: sidebarClick(() => browser.openEnvironment("create")), backgroundColor: fill(addEnvironmentSelected, pane === "sidebar").backgroundColor, children: _jsxs(Text, { wrap: "truncate", color: fill(addEnvironmentSelected, pane === "sidebar").color ?? palette.muted, children: [addEnvironmentSelected ? "›" : " ", " + Add environment"] }) }), _jsx(Text, { children: " " }), sidebarWindow.above > 0 && _jsxs(Text, { color: palette.muted, children: [" \u2191 ", sidebarWindow.above, " more"] }), sidebarLines.slice(sidebarWindow.start, sidebarWindow.end).map((row, index) => {
|
|
307
395
|
if (!row)
|
|
308
|
-
return _jsx(Text, { children: " " }, `gap:${
|
|
396
|
+
return _jsx(Text, { children: " " }, `gap:${sidebarWindow.start + index}`);
|
|
309
397
|
const selected = !addEnvironmentSelected && isSelected(row);
|
|
310
398
|
const { color, ...rowFill } = fill(selected, pane === "sidebar");
|
|
311
399
|
const environment = row.scope.details && !row.scope.addProject && !row.view && !row.loading;
|
|
312
400
|
const key = `${scopeId(row.scope)}:${row.view ?? ""}${row.loading ? ":loading" : ""}`;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
401
|
+
const onClick = sidebarClick(() => clickRow(row));
|
|
402
|
+
// The marker shows the selection without color.
|
|
403
|
+
const marker = _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: color ?? palette.accent, children: [selected ? "›" : " ", " "] }) });
|
|
404
|
+
if (environment) {
|
|
405
|
+
const tone = environmentTone(state.observations[row.scope.connection]);
|
|
406
|
+
return _jsxs(Clickable, { onClick: onClick, ...rowFill, children: [marker, _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsx(Text, { wrap: "truncate", bold: true, color: color ?? palette.text, children: plain(row.text) }) }), _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: color ?? palette.muted, children: [" ", plain(row.transport), _jsxs(Text, { color: palette[tone], children: [" ", DOT_GLYPHS[tone], " "] })] }) })] }, key);
|
|
407
|
+
}
|
|
408
|
+
return _jsxs(Clickable, { onClick: onClick, ...rowFill, children: [marker, _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsx(Text, { wrap: "truncate", color: color ?? (row.scope.addProject || row.loading ? palette.muted : palette.text), children: row.busy ? _jsxs(_Fragment, { children: [_jsx(Spinner, { color: color ?? palette.accent }), " ", plain(row.text.slice(2))] }) : plain(row.text) }) }), row.dot ? _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: palette[row.dot], children: [" ", DOT_GLYPHS[row.dot], " "] }) })
|
|
409
|
+
: row.shortcut && _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: color ?? palette.muted, children: [" ", row.shortcut, " "] }) })] }, key);
|
|
410
|
+
}), sidebarWindow.below > 0 && _jsxs(Text, { color: palette.muted, children: [" \u2193 ", sidebarWindow.below, " more"] })] }), _jsxs(Box, { display: narrow && sidebarWidth > 0 && !workflow ? "none" : "flex", flexGrow: 1, flexDirection: "column", paddingX: 1, paddingTop: 1, children: [_jsxs(Box, { flexGrow: 1, flexDirection: "column", overflow: "hidden", children: [state.onboarding && _jsx(Onboarding, { browser: browser, leave: leave, load: onboardingLoad, width: actionWidth, height: Math.max(1, size.height - 7) }), state.environment && _jsx(Environments, { browser: browser, leave: leave, width: actionWidth, height: Math.max(1, size.height - 7) }), !workflow && (state.detail ? _jsx(LogDetail, { browser: browser, row: state.detail, width: Math.max(1, size.width - (small ? 0 : sidebarWidth) - 2), height: Math.max(1, size.height - 3), small: small, mouse: mouse, toggleMouse: () => setMouse(on => !on) }, `${state.scope.connection}:${state.detail.run?.messageId}`) : _jsxs(_Fragment, { children: [_jsxs(Box, { gap: 2, marginBottom: 1, children: [tabs.length ? tabs.map(([label, selected, activate]) => _jsx(Clickable, { flexShrink: 0, onClick: unlocked(activate), children: _jsx(Text, { ...(selected ? fill(true, true) : { color: palette.accent }), children: ` ${label} ` }) }, label)) : _jsx(Text, { bold: true, color: palette.text, children: title }), _jsx(Box, { flexShrink: 1, children: _jsxs(Text, { wrap: "truncate", color: palette.muted, children: [plain(target.name), state.scope.profile ? ` / ${plain(state.scope.profile)}` : "", state.history ? " / execution history" : ""] }) })] }), !reading && warnings.length > 0 && _jsxs(Clickable, { marginBottom: 1, gap: 1, onClick: unlocked(() => setWarningsOpen(true)), children: [_jsx(Box, { flexShrink: 1, children: _jsxs(Text, { wrap: "truncate-end", color: palette.warning, children: ["! ", warnings[0].profile, ": ", warnings[0].summary] }) }), _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: palette.muted, children: [warnings.length > 1 ? `· +${warnings.length - 1} more ` : "", "\u00B7 ", _jsx(Text, { color: palette.accent, children: "[w]" }), " all notices"] }) })] }), contextLines.length > 0 && _jsx(Box, { flexDirection: "column", marginBottom: 1, children: contextLines.map(({ text, warn, run }, index) => _jsx(Clickable, { onClick: unlocked(() => run?.()), children: _jsx(Text, { color: warn ? palette.warning : palette.muted, wrap: "truncate", children: text }) }, index)) }), toolbar && _jsx(Box, { marginBottom: 1, gap: 2, children: [["[s]", "Inspect status", () => void browser.inspectEnvironment()], ["[f]", "Retry connection", () => browser.retryNow()], ["[+]", "Add project", () => { browser.openOnboarding(); setPane("content"); }]]
|
|
411
|
+
.map(([hint, label, run]) => _jsx(Clickable, { flexShrink: 0, onClick: unlocked(run), children: keys([[hint, label]]) }, hint)) }), keysOpen ? _jsx(Dialog, { inline: true, scrollable: true, width: actionWidth, height: contentHeight, lines: [`Keys · ${viewName}`, "↑/↓ PgUp/PgDn scroll · Esc back", "", ...alignColumns(VIEW_KEYS[viewName]), "", "Everywhere", ...alignColumns(GLOBAL_KEYS)], buttons: [{ label: "Back", activate: () => setKeysOpen(false) }], onCancel: () => setKeysOpen(false) })
|
|
412
|
+
: warningsOpen ? _jsx(Dialog, { inline: true, scrollable: true, width: actionWidth, height: contentHeight, lines: [`Warning details · ${plain(target.name)}`, "↑/↓ PgUp/PgDn scroll · Esc back", ...(warnings.length ? warnings.flatMap(warning => ["", `${warning.profile} · ${warning.status}`, ...warning.details]) : ["No current project notices."])], buttons: [{ label: "Back", activate: () => setWarningsOpen(false) }], onCancel: () => setWarningsOpen(false) })
|
|
413
|
+
: state.action && !state.actions && !state.action.pending ? _jsx(ActionDialog, { inline: true, state: state, browser: browser, width: actionWidth, height: contentHeight }) : state.runtimes ? _jsx(Runtimes, { browser: browser, state: state, active: pane === "content", onSidebar: () => setPane("sidebar"), onContent: () => setPane("content"), width: actionWidth, height: contentHeight }, scopeId(state.scope)) : state.credentials ? _jsx(Credentials, { browser: browser, state: state, leave: leave, active: pane === "content", onContent: () => setPane("content"), width: actionWidth, height: contentHeight }, scopeId(state.scope)) : state.actions ? _jsx(Actions, { onContent: () => setPane("content"), selectedKey: actionSelection?.scope === scopeId(state.scope) ? actionSelection.key : undefined, onSelect: key => setActionSelection({ scope: scopeId(state.scope), key }), browser: browser, state: state, row: state.rows[selectedRow], active: pane === "content" && !state.environment, width: actionWidth, height: contentHeight }) : state.scope.addProject ? _jsx(Text, { color: palette.text, children: "Press + to add or link a project. Enter or Space opens the selected sidebar row." }) : state.scope.details ? _jsx(Details, { browser: browser, state: state, lines: lines, focused: pane === "content", locked: locked, width: actionWidth, height: contentHeight, onContent: () => setPane("content"), onCredentials: () => { chooseView({ connection: state.scope.connection, details: true }, "credentials"); setPane("content"); } }, scopeId(state.scope)) : _jsxs(_Fragment, { children: [_jsxs(Box, { gap: 2, marginBottom: compact ? 0 : 1, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, color: palette.text, children: state.history ? "Execution history" : "Runs" }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "truncate", color: palette.muted, children: [plain(state.history ? [rowCells(state.history).task, state.history.thread.title].filter(Boolean).join(" · ") : state.rows[0]?.profile ?? state.scope.profile ?? "Projects in registration order"), " \u00B7 page ", state.pageNumber, state.loading ? " · loading" : "", state.next ? " · n next" : ""] }) }), _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: palette.muted, children: [state.rows.length, " ", state.history ? "runs" : "threads", " on page"] }) })] }), state.rows[selectedRow]?.run && _jsx(Clickable, { onClick: unlocked(() => browser.beginAction("cancel", state.rows[selectedRow])), children: _jsx(Text, { wrap: "truncate", color: palette.muted, children: state.rows[selectedRow].run?.status === "streaming" ? "[c] Cancel selected run · Enter logs" : "Cancel unavailable: run is not active · Enter logs" }) }), state.rows.length === 0 ? _jsx(Text, { color: palette.text, children: state.loading ? "Loading…" : state.error ? "Page unavailable" : "No runs on this page." }) : _jsxs(_Fragment, { children: [!compact && _jsxs(Box, { paddingX: 1, gap: 2, children: [_jsx(Box, { flexGrow: 1, children: _jsx(Text, { color: palette.muted, children: state.history ? "RUN · NEWEST FIRST" : "THREAD / TASK" }) }), _jsx(Box, { width: 15, flexShrink: 0, children: _jsx(Text, { color: palette.muted, children: "STATE" }) }), wide && _jsx(Box, { width: 11, flexShrink: 0, children: _jsx(Text, { color: palette.muted, children: state.history ? "ELAPSED" : "UPDATED" }) })] }), runs.map(({ row, cells, selected }) => {
|
|
414
|
+
const { color, ...rowFill } = fill(selected, pane === "content");
|
|
415
|
+
return _jsxs(Clickable, { onClick: unlocked(() => clickRun(row, selected)), flexShrink: 0, paddingX: 1, gap: 2, ...rowFill, children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, flexShrink: 1, children: [_jsxs(Box, { children: [_jsx(Box, { flexShrink: 1, children: _jsxs(Text, { wrap: "truncate", color: color ?? palette.text, children: [selected ? "›" : " ", " ", cells.title] }) }), cells.runtime && _jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: color ?? palette.muted, children: [" \u00B7 ", cells.runtime] }) })] }), _jsxs(Text, { wrap: "truncate", color: color ?? palette.muted, children: [" ", cells.meta] })] }), _jsx(Box, { width: 15, flexShrink: 0, children: _jsxs(Text, { wrap: "truncate", color: cells.color, children: [cells.symbol, " ", cells.label] }) }), wide && _jsx(Box, { width: 11, flexShrink: 0, children: _jsx(Text, { wrap: "truncate", color: color ?? palette.muted, children: cells.time }) })] }, rowId(row));
|
|
416
|
+
})] })] })] }))] }), !state.detail && _jsx(Box, { flexShrink: 0, children: workflow || editing ? keys([["[Tab]", "focus"], ["[Enter]", "activate"], ["[Esc]", "back"], ["[Ctrl+C]", "detach · inputs retained through repair"]]) : keys(footerHints) })] })] }), !state.detail && _jsxs(Box, { flexShrink: 0, height: 1, paddingX: 1, gap: 3, backgroundColor: palette.footer, children: [_jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: palette[healthTones[observation.health]], children: [observation.health === "connected" ? "●" : "○", " ", _jsxs(Text, { color: palette.muted, children: [observation.health, state.stale ? " · stale" : ""] })] }) }), _jsx(Box, { flexShrink: 1, children: _jsx(Text, { wrap: "truncate", color: state.stale || state.error ? palette.warning : palette.muted, children: `${plain(target.name)} · ${plain(target.transport)}${observation.snapshot && observation.profiles.every(p => p.activeRuns !== undefined) ? ` ${observation.profiles.reduce((sum, p) => sum + (p.activeRuns ?? 0), 0)} observed active` : ""}${state.updatedAt ? ` page updated ${new Date(state.updatedAt).toLocaleTimeString()}` : ""}` }) })] }), state.action && _jsx(ActionDialog, { state: state, browser: browser, width: size.width, height: size.height - 1 })] });
|
|
325
417
|
}
|
|
326
418
|
//# sourceMappingURL=app.js.map
|