@h-rig/cli 0.0.6-alpha.83 → 0.0.6-alpha.85
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/dist/bin/rig.js +22060 -14620
- package/dist/src/app/board.js +155 -28
- package/dist/src/app-opentui/adapters/doctor.d.ts +0 -2
- package/dist/src/app-opentui/adapters/doctor.js +1 -25
- package/dist/src/app-opentui/adapters/family.d.ts +62 -0
- package/dist/src/app-opentui/adapters/family.js +14305 -0
- package/dist/src/app-opentui/adapters/fleet.d.ts +0 -2
- package/dist/src/app-opentui/adapters/fleet.js +6 -40
- package/dist/src/app-opentui/adapters/inbox.d.ts +12 -2
- package/dist/src/app-opentui/adapters/inbox.js +54 -59
- package/dist/src/app-opentui/adapters/init.d.ts +0 -2
- package/dist/src/app-opentui/adapters/init.js +0 -26
- package/dist/src/app-opentui/adapters/inspect.d.ts +52 -0
- package/dist/src/app-opentui/adapters/inspect.js +1024 -0
- package/dist/src/app-opentui/adapters/pi-attach.d.ts +15 -6
- package/dist/src/app-opentui/adapters/pi-attach.js +348 -93
- package/dist/src/app-opentui/adapters/pi.d.ts +23 -0
- package/dist/src/app-opentui/adapters/pi.js +363 -0
- package/dist/src/app-opentui/adapters/plugin.d.ts +84 -0
- package/dist/src/app-opentui/adapters/plugin.js +544 -0
- package/dist/src/app-opentui/adapters/repo.d.ts +37 -0
- package/dist/src/app-opentui/adapters/repo.js +186 -0
- package/dist/src/app-opentui/adapters/run-detail.d.ts +9 -2
- package/dist/src/app-opentui/adapters/run-detail.js +97 -44
- package/dist/src/app-opentui/adapters/server.d.ts +10 -2
- package/dist/src/app-opentui/adapters/server.js +96 -27
- package/dist/src/app-opentui/adapters/tasks.d.ts +0 -2
- package/dist/src/app-opentui/adapters/tasks.js +437 -105
- package/dist/src/app-opentui/adapters/workspace.d.ts +49 -0
- package/dist/src/app-opentui/adapters/workspace.js +333 -0
- package/dist/src/app-opentui/autocomplete.d.ts +20 -0
- package/dist/src/app-opentui/autocomplete.js +576 -0
- package/dist/src/app-opentui/bootstrap.js +24313 -16963
- package/dist/src/app-opentui/command-palette.d.ts +3 -0
- package/dist/src/app-opentui/command-palette.js +1010 -0
- package/dist/src/app-opentui/drone.js +8 -6
- package/dist/src/app-opentui/fleet-stats.d.ts +32 -0
- package/dist/src/app-opentui/fleet-stats.js +114 -0
- package/dist/src/app-opentui/index.js +3438 -1724
- package/dist/src/app-opentui/intent.js +71 -48
- package/dist/src/app-opentui/keymap.d.ts +6 -5
- package/dist/src/app-opentui/keymap.js +1064 -23
- package/dist/src/app-opentui/layout.d.ts +7 -0
- package/dist/src/app-opentui/layout.js +13 -6
- package/dist/src/app-opentui/list-search.d.ts +24 -0
- package/dist/src/app-opentui/list-search.js +88 -1
- package/dist/src/app-opentui/pi-host-child.js +33 -1
- package/dist/src/app-opentui/pi-pty-host.d.ts +5 -0
- package/dist/src/app-opentui/pi-pty-host.js +21 -3
- package/dist/src/app-opentui/react/App.d.ts +9 -0
- package/dist/src/app-opentui/react/App.js +5099 -0
- package/dist/src/app-opentui/react/Backdrop.d.ts +5 -0
- package/dist/src/app-opentui/react/Backdrop.js +829 -0
- package/dist/src/app-opentui/react/ChromeHost.d.ts +5 -0
- package/dist/src/app-opentui/react/ChromeHost.js +2942 -0
- package/dist/src/app-opentui/react/SceneFrameView.d.ts +7 -0
- package/dist/src/app-opentui/react/SceneFrameView.js +529 -0
- package/dist/src/app-opentui/react/context.d.ts +17 -0
- package/dist/src/app-opentui/react/context.js +37 -0
- package/dist/src/app-opentui/react/launch.d.ts +2 -0
- package/dist/src/app-opentui/react/launch.js +5698 -0
- package/dist/src/app-opentui/react/nav.d.ts +18 -0
- package/dist/src/app-opentui/react/nav.js +54 -0
- package/dist/src/app-opentui/react/scroll.d.ts +12 -0
- package/dist/src/app-opentui/react/scroll.js +21 -0
- package/dist/src/app-opentui/react/syntax.d.ts +2 -0
- package/dist/src/app-opentui/react/syntax.js +64 -0
- package/dist/src/app-opentui/registry.js +19923 -5151
- package/dist/src/app-opentui/render/constants.d.ts +31 -0
- package/dist/src/app-opentui/render/constants.js +66 -0
- package/dist/src/app-opentui/render/graphics.d.ts +2 -1
- package/dist/src/app-opentui/render/graphics.js +106 -39
- package/dist/src/app-opentui/render/image-visual-layer-worker.js +108 -20
- package/dist/src/app-opentui/render/image-visual-layer.d.ts +7 -0
- package/dist/src/app-opentui/render/image-visual-layer.js +109 -20
- package/dist/src/app-opentui/render/native-host.d.ts +37 -0
- package/dist/src/app-opentui/render/native-host.js +179 -0
- package/dist/src/app-opentui/render/panels.js +18 -11
- package/dist/src/app-opentui/render/preloader.js +8 -6
- package/dist/src/app-opentui/render/scene.d.ts +50 -1
- package/dist/src/app-opentui/render/scene.js +183 -6
- package/dist/src/app-opentui/render/text.d.ts +7 -1
- package/dist/src/app-opentui/render/text.js +10 -7
- package/dist/src/app-opentui/render/type-bar.js +69 -30
- package/dist/src/app-opentui/runtime.d.ts +44 -1
- package/dist/src/app-opentui/runtime.js +3231 -1363
- package/dist/src/app-opentui/scenes/command.js +20 -6
- package/dist/src/app-opentui/scenes/doctor.js +176 -11
- package/dist/src/app-opentui/scenes/error.js +20 -10
- package/dist/src/app-opentui/scenes/family-domains/agent.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/agent.js +348 -0
- package/dist/src/app-opentui/scenes/family-domains/browser.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/browser.js +195 -0
- package/dist/src/app-opentui/scenes/family-domains/dist.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/dist.js +243 -0
- package/dist/src/app-opentui/scenes/family-domains/git.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/git.js +195 -0
- package/dist/src/app-opentui/scenes/family-domains/github.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/github.js +274 -0
- package/dist/src/app-opentui/scenes/family-domains/harness.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/harness.js +152 -0
- package/dist/src/app-opentui/scenes/family-domains/index.d.ts +4 -0
- package/dist/src/app-opentui/scenes/family-domains/index.js +1679 -0
- package/dist/src/app-opentui/scenes/family-domains/kit.d.ts +76 -0
- package/dist/src/app-opentui/scenes/family-domains/kit.js +305 -0
- package/dist/src/app-opentui/scenes/family-domains/profile.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/profile.js +212 -0
- package/dist/src/app-opentui/scenes/family-domains/queue.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/queue.js +146 -0
- package/dist/src/app-opentui/scenes/family-domains/remote.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/remote.js +518 -0
- package/dist/src/app-opentui/scenes/family-domains/review.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/review.js +280 -0
- package/dist/src/app-opentui/scenes/family-domains/setup.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/setup.js +267 -0
- package/dist/src/app-opentui/scenes/family-domains/stats.d.ts +2 -0
- package/dist/src/app-opentui/scenes/family-domains/stats.js +370 -0
- package/dist/src/app-opentui/scenes/family.d.ts +3 -0
- package/dist/src/app-opentui/scenes/family.js +2144 -0
- package/dist/src/app-opentui/scenes/fleet.js +521 -31
- package/dist/src/app-opentui/scenes/handoff.js +204 -12
- package/dist/src/app-opentui/scenes/help.js +609 -40
- package/dist/src/app-opentui/scenes/inbox.js +278 -17
- package/dist/src/app-opentui/scenes/init.js +84 -39
- package/dist/src/app-opentui/scenes/inspect.d.ts +3 -0
- package/dist/src/app-opentui/scenes/inspect.js +793 -0
- package/dist/src/app-opentui/scenes/main.js +218 -39
- package/dist/src/app-opentui/scenes/pi.d.ts +3 -0
- package/dist/src/app-opentui/scenes/pi.js +508 -0
- package/dist/src/app-opentui/scenes/plugin.d.ts +3 -0
- package/dist/src/app-opentui/scenes/plugin.js +486 -0
- package/dist/src/app-opentui/scenes/repo.d.ts +3 -0
- package/dist/src/app-opentui/scenes/repo.js +424 -0
- package/dist/src/app-opentui/scenes/run-detail.js +333 -20
- package/dist/src/app-opentui/scenes/server.js +181 -15
- package/dist/src/app-opentui/scenes/tasks.js +486 -31
- package/dist/src/app-opentui/scenes/workspace.d.ts +3 -0
- package/dist/src/app-opentui/scenes/workspace.js +426 -0
- package/dist/src/app-opentui/selectable.d.ts +19 -0
- package/dist/src/app-opentui/selectable.js +79 -0
- package/dist/src/app-opentui/state.js +83 -30
- package/dist/src/app-opentui/surface-catalog.d.ts +20 -0
- package/dist/src/app-opentui/surface-catalog.js +540 -0
- package/dist/src/app-opentui/theme.d.ts +28 -6
- package/dist/src/app-opentui/theme.js +61 -8
- package/dist/src/app-opentui/types.d.ts +121 -4
- package/dist/src/commands/_authority-runs.d.ts +1 -1
- package/dist/src/commands/_authority-runs.js +2 -12
- package/dist/src/commands/_help-catalog.js +95 -15
- package/dist/src/commands/_operator-view.js +34 -2
- package/dist/src/commands/_pi-frontend.d.ts +2 -0
- package/dist/src/commands/_pi-frontend.js +34 -0
- package/dist/src/commands/_server-events.d.ts +26 -0
- package/dist/src/commands/_server-events.js +310 -0
- package/dist/src/commands/agent.js +2 -12
- package/dist/src/commands/run.js +34 -2
- package/dist/src/commands/server.js +2 -12
- package/dist/src/commands/stats.js +95 -15
- package/dist/src/commands/task-run-driver.js +2 -12
- package/dist/src/commands/task.js +131 -29
- package/dist/src/commands.js +192 -31
- package/dist/src/index.js +192 -31
- package/package.json +11 -9
|
@@ -13,6 +13,11 @@ var NAV_SCENES = new Map([
|
|
|
13
13
|
["server", "server"],
|
|
14
14
|
["init", "init"],
|
|
15
15
|
["doctor", "doctor"],
|
|
16
|
+
["pi", "pi"],
|
|
17
|
+
["plugin", "plugin"],
|
|
18
|
+
["repo", "repo"],
|
|
19
|
+
["workspace", "workspace"],
|
|
20
|
+
["inspect", "inspect"],
|
|
16
21
|
["help", "help"]
|
|
17
22
|
]);
|
|
18
23
|
var TASK_VIEW_COMMANDS = new Set([
|
|
@@ -34,6 +39,24 @@ var TASK_VIEW_COMMANDS = new Set([
|
|
|
34
39
|
"search",
|
|
35
40
|
"q"
|
|
36
41
|
]);
|
|
42
|
+
var HOLLOW_FAMILIES = new Set([
|
|
43
|
+
"browser",
|
|
44
|
+
"stats",
|
|
45
|
+
"dist",
|
|
46
|
+
"agent",
|
|
47
|
+
"queue",
|
|
48
|
+
"remote",
|
|
49
|
+
"harness",
|
|
50
|
+
"git",
|
|
51
|
+
"setup",
|
|
52
|
+
"profile",
|
|
53
|
+
"review",
|
|
54
|
+
"inspector",
|
|
55
|
+
"test"
|
|
56
|
+
]);
|
|
57
|
+
function familyIntent(family, argv, raw) {
|
|
58
|
+
return intent("family", argv, "refresh", { family }, `Opening ${family}`, raw);
|
|
59
|
+
}
|
|
37
60
|
function isHelpCommand(command) {
|
|
38
61
|
return command === "help" || command === "--help" || command === "-h";
|
|
39
62
|
}
|
|
@@ -56,9 +79,6 @@ function commandRunIntent(argv, raw, reason) {
|
|
|
56
79
|
const command = argv.join(" ").trim();
|
|
57
80
|
return intent("command", argv, "command-run", { argv: [...argv], ...reason ? { reason } : {} }, command ? `Running rig ${command}` : "Running rig", raw);
|
|
58
81
|
}
|
|
59
|
-
function unsupportedPlainCliIntent(argv, raw, reason) {
|
|
60
|
-
return commandRunIntent(argv, raw, reason);
|
|
61
|
-
}
|
|
62
82
|
function firstValueAfter(args, option) {
|
|
63
83
|
const index = args.indexOf(option);
|
|
64
84
|
return index >= 0 ? args[index + 1] : undefined;
|
|
@@ -105,7 +125,7 @@ function parseSimpleTaskRunArgs(args) {
|
|
|
105
125
|
continue;
|
|
106
126
|
}
|
|
107
127
|
if (arg.startsWith("-")) {
|
|
108
|
-
return { ok: false, reason: `task run option ${arg}
|
|
128
|
+
return { ok: false, reason: `task run option ${arg} uses the command workspace` };
|
|
109
129
|
}
|
|
110
130
|
if (task)
|
|
111
131
|
return { ok: false, reason: "task run received more than one task id" };
|
|
@@ -167,6 +187,28 @@ function taskViewIntent(argv, command = "", rest = [], raw) {
|
|
|
167
187
|
const { payload, label } = taskViewPayload(command, rest);
|
|
168
188
|
return intent("tasks", argv, "refresh", payload, label, raw);
|
|
169
189
|
}
|
|
190
|
+
function routeServer(argv, command, raw, checkingLabel) {
|
|
191
|
+
if (!command || command === "status") {
|
|
192
|
+
return intent("server", argv, "refresh", undefined, command ? checkingLabel : "Loading server", raw);
|
|
193
|
+
}
|
|
194
|
+
return commandRunIntent(argv, raw);
|
|
195
|
+
}
|
|
196
|
+
function routeGithub(argv, command, rest, raw) {
|
|
197
|
+
if (command === "auth" && (rest[0]?.toLowerCase() ?? "status") === "status" && rest.length <= 1) {
|
|
198
|
+
return intent("server", argv, "refresh", undefined, "Checking GitHub auth", raw);
|
|
199
|
+
}
|
|
200
|
+
return commandRunIntent(argv, raw);
|
|
201
|
+
}
|
|
202
|
+
function routeDoctor(argv, command, raw) {
|
|
203
|
+
return command ? commandRunIntent(argv, raw) : intent("doctor", argv, "doctor-run", undefined, "Running doctor", raw);
|
|
204
|
+
}
|
|
205
|
+
function routeInbox(argv, command, rest, raw) {
|
|
206
|
+
if (command === "watch")
|
|
207
|
+
return commandRunIntent(argv, raw);
|
|
208
|
+
if ((command === "approvals" || command === "inputs") && rest.length > 0)
|
|
209
|
+
return commandRunIntent(argv, raw);
|
|
210
|
+
return command && command !== "approvals" && command !== "inputs" ? commandRunIntent(argv, raw) : inboxActionIntent(argv, command, rest, raw);
|
|
211
|
+
}
|
|
170
212
|
function intentFromArgv(argv) {
|
|
171
213
|
const [group = "", command = "", ...rest] = argv;
|
|
172
214
|
const normalizedGroup = group.toLowerCase();
|
|
@@ -174,7 +216,7 @@ function intentFromArgv(argv) {
|
|
|
174
216
|
if (!normalizedGroup)
|
|
175
217
|
return intent("main", argv, "none", undefined, "Project menu");
|
|
176
218
|
if (normalizedGroup === "--help" || normalizedGroup === "-h" || normalizedGroup === "help") {
|
|
177
|
-
return argv.length === 1 ? intent("help", argv, "none", undefined, "Help") :
|
|
219
|
+
return argv.length === 1 ? intent("help", argv, "none", undefined, "Help") : commandRunIntent(argv);
|
|
178
220
|
}
|
|
179
221
|
if (normalizedGroup === "task") {
|
|
180
222
|
if (normalizedCommand === "run" || normalizedCommand === "ready" || normalizedCommand === "status")
|
|
@@ -185,7 +227,7 @@ function intentFromArgv(argv) {
|
|
|
185
227
|
}
|
|
186
228
|
if (normalizedGroup === "tasks") {
|
|
187
229
|
if (!isTaskViewCommand(normalizedCommand))
|
|
188
|
-
return
|
|
230
|
+
return commandRunIntent(argv);
|
|
189
231
|
return taskViewIntent(argv, normalizedCommand, rest);
|
|
190
232
|
}
|
|
191
233
|
if (normalizedGroup === "run") {
|
|
@@ -202,34 +244,26 @@ function intentFromArgv(argv) {
|
|
|
202
244
|
}
|
|
203
245
|
return commandRunIntent(argv);
|
|
204
246
|
}
|
|
205
|
-
if (normalizedGroup === "server")
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return
|
|
209
|
-
}
|
|
210
|
-
if (normalizedGroup === "github") {
|
|
211
|
-
if (normalizedCommand === "auth" && (rest[0]?.toLowerCase() ?? "status") === "status" && rest.length <= 1) {
|
|
212
|
-
return intent("server", argv, "refresh", undefined, "Checking GitHub auth");
|
|
213
|
-
}
|
|
214
|
-
return unsupportedPlainCliIntent(argv, undefined, "github auth mutations are not executed in the shell; exit and run them in plain mode.");
|
|
215
|
-
}
|
|
247
|
+
if (normalizedGroup === "server")
|
|
248
|
+
return routeServer(argv, normalizedCommand, undefined, "Checking server");
|
|
249
|
+
if (normalizedGroup === "github")
|
|
250
|
+
return routeGithub(argv, normalizedCommand, rest);
|
|
216
251
|
if (normalizedGroup === "init")
|
|
217
252
|
return commandRunIntent(argv);
|
|
218
|
-
if (normalizedGroup === "doctor")
|
|
219
|
-
return
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (normalizedCommand === "watch")
|
|
223
|
-
return commandRunIntent(argv);
|
|
224
|
-
if ((normalizedCommand === "approvals" || normalizedCommand === "inputs") && rest.length > 0)
|
|
225
|
-
return commandRunIntent(argv);
|
|
226
|
-
return normalizedCommand && normalizedCommand !== "approvals" && normalizedCommand !== "inputs" ? commandRunIntent(argv) : inboxActionIntent(argv, normalizedCommand, rest);
|
|
227
|
-
}
|
|
253
|
+
if (normalizedGroup === "doctor")
|
|
254
|
+
return routeDoctor(argv, normalizedCommand);
|
|
255
|
+
if (normalizedGroup === "inbox")
|
|
256
|
+
return routeInbox(argv, normalizedCommand, rest);
|
|
228
257
|
if (normalizedGroup === "attach") {
|
|
229
258
|
const attachArgs = [command, ...rest].filter((part) => part.trim());
|
|
230
259
|
const runId = firstNonOption(attachArgs);
|
|
231
260
|
return runId && attachArgs.length === 1 ? intent("handoff", argv, "run-attach", { runId }, `Attaching ${runId}`) : commandRunIntent(argv);
|
|
232
261
|
}
|
|
262
|
+
if (HOLLOW_FAMILIES.has(normalizedGroup)) {
|
|
263
|
+
if (!normalizedCommand || isHelpCommand(normalizedCommand))
|
|
264
|
+
return familyIntent(normalizedGroup, argv);
|
|
265
|
+
return commandRunIntent(argv);
|
|
266
|
+
}
|
|
233
267
|
const nav = NAV_SCENES.get(normalizedGroup);
|
|
234
268
|
if (nav && argv.length === 1)
|
|
235
269
|
return intent(nav, argv, "navigate", undefined, `Opening ${nav}`);
|
|
@@ -261,7 +295,7 @@ function intentFromTypeBar(value) {
|
|
|
261
295
|
if (second === "next" || second === "--next" || second === "--task") {
|
|
262
296
|
const parsed = parseSimpleTaskRunArgs([second, ...rest]);
|
|
263
297
|
if (!parsed.ok)
|
|
264
|
-
return
|
|
298
|
+
return commandRunIntent(parts, value, parsed.reason);
|
|
265
299
|
const payload = parsed.detach ? { detach: true } : undefined;
|
|
266
300
|
if (parsed.next)
|
|
267
301
|
return intent("tasks", parts, "task-run-next", payload, parsed.detach ? "Dispatching next task detached" : "Dispatching next task", value);
|
|
@@ -271,34 +305,23 @@ function intentFromTypeBar(value) {
|
|
|
271
305
|
}
|
|
272
306
|
if (second && !second.startsWith("-")) {
|
|
273
307
|
if (rest.length > 0)
|
|
274
|
-
return
|
|
308
|
+
return commandRunIntent(parts, value);
|
|
275
309
|
return intent("tasks", parts, "task-run-id", { task: second }, `Dispatching ${second}`, value);
|
|
276
310
|
}
|
|
277
311
|
if (second?.startsWith("-"))
|
|
278
|
-
return
|
|
312
|
+
return commandRunIntent(parts, value);
|
|
279
313
|
return intent("tasks", parts, "refresh", undefined, "Select a task, then press Enter; or use run next", value);
|
|
280
314
|
}
|
|
281
315
|
if (first === "init")
|
|
282
316
|
return commandRunIntent(parts, value);
|
|
283
317
|
if (first === "doctor")
|
|
284
|
-
return
|
|
285
|
-
if (first === "server")
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
if (second === "auth" && (rest[0]?.toLowerCase() ?? "status") === "status" && rest.length <= 1)
|
|
292
|
-
return intent("server", parts, "refresh", undefined, "Checking GitHub auth", value);
|
|
293
|
-
return commandRunIntent(parts, value);
|
|
294
|
-
}
|
|
295
|
-
if (first === "inbox") {
|
|
296
|
-
if (second === "watch")
|
|
297
|
-
return commandRunIntent(parts, value);
|
|
298
|
-
if ((second === "approvals" || second === "inputs") && rest.length > 0)
|
|
299
|
-
return commandRunIntent(parts, value);
|
|
300
|
-
return second && second !== "approvals" && second !== "inputs" ? commandRunIntent(parts, value) : inboxActionIntent(parts, second, rest, value);
|
|
301
|
-
}
|
|
318
|
+
return routeDoctor(parts, second, value);
|
|
319
|
+
if (first === "server")
|
|
320
|
+
return routeServer(parts, second, value, "Loading server");
|
|
321
|
+
if (first === "github")
|
|
322
|
+
return routeGithub(parts, second, rest, value);
|
|
323
|
+
if (first === "inbox")
|
|
324
|
+
return routeInbox(parts, second, rest, value);
|
|
302
325
|
if (firstScene && parts.length === 1) {
|
|
303
326
|
return intent(firstScene, parts, "navigate", undefined, `Opening ${firstScene}`, value);
|
|
304
327
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { CliRenderer, KeyEvent } from "@opentui/core";
|
|
2
2
|
import type { TypeBarRenderables } from "./render/type-bar";
|
|
3
|
-
import type { AppIntent, AppRuntime, AppSceneId, AppSelectableItem, AppState } from "./types";
|
|
3
|
+
import type { AppIntent, AppRuntime, AppSceneId, AppSelectableItem, AppState, AppTypeBarState } from "./types";
|
|
4
4
|
export type AppKeymapContext = {
|
|
5
5
|
readonly renderer: () => CliRenderer | null;
|
|
6
6
|
readonly runtime: AppRuntime;
|
|
7
7
|
readonly getState: () => AppState;
|
|
8
8
|
readonly getTypeBar: () => TypeBarRenderables | null;
|
|
9
9
|
readonly getRenderedSelectableItems: () => readonly AppSelectableItem[];
|
|
10
|
-
readonly emitTypeBarPatch: (patch:
|
|
11
|
-
readonly value?: string;
|
|
12
|
-
readonly message?: string | undefined;
|
|
13
|
-
}) => void;
|
|
10
|
+
readonly emitTypeBarPatch: (patch: Partial<AppTypeBarState>) => void;
|
|
14
11
|
readonly runAppAction: (label: string, action: () => Promise<unknown>) => void;
|
|
15
12
|
readonly primaryNavIntent: (scene: AppSceneId) => AppIntent;
|
|
16
13
|
readonly nextPrimaryScene: (scene: AppSceneId, delta: number) => AppSceneId;
|
|
17
14
|
readonly moveSelection: (delta: number, renderedItems?: readonly AppSelectableItem[]) => boolean;
|
|
18
15
|
readonly activateSelection: (renderedItems?: readonly AppSelectableItem[]) => Promise<boolean>;
|
|
16
|
+
/** Scroll the active content body (the visible scroll panel AND the native
|
|
17
|
+
* code/diff/table overlay) by `delta` rows — keyboard scroll for long content
|
|
18
|
+
* (PageUp/Down/Home/End/Ctrl-D/U) that selection nav can't reach. */
|
|
19
|
+
readonly scrollActiveBody: (delta: number) => void;
|
|
19
20
|
};
|
|
20
21
|
export declare function handleAppKeyPress(context: AppKeymapContext, key: KeyEvent): void;
|