@awebai/oats 0.66.0 → 0.68.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/bin/oats.mjs +166 -17
- package/docs/capabilities.md +58 -9
- package/docs/capability-manifest.schema.json +5 -1
- package/docs/design/2026-10-22-module-upgrade.md +192 -0
- package/docs/design/README.md +4 -0
- package/docs/desktop-cli-api.md +463 -13
- package/docs/desktop.md +363 -67
- package/docs/first-team.md +5 -3
- package/docs/implementation.md +46 -6
- package/docs/integrations.md +16 -4
- package/docs/knowledge.md +44 -27
- package/docs/layers.md +2 -2
- package/docs/official-catalog.md +5 -5
- package/docs/packages.md +14 -14
- package/docs/release-lane.md +16 -0
- package/docs/release-notes/v0.67.0.md +366 -0
- package/docs/release-notes/v0.67.1.md +64 -0
- package/docs/release-notes/v0.68.0.md +504 -0
- package/docs/servers.md +8 -2
- package/docs/souls-and-instances.md +58 -6
- package/docs/tui.md +1033 -237
- package/docs/upgrading.md +164 -26
- package/docs/workspaces.md +2 -2
- package/lib/capability-contract.mjs +8 -7
- package/lib/core.mjs +331 -75
- package/lib/instance-color.mjs +58 -0
- package/lib/instance-events.mjs +1 -1
- package/lib/instance-inspect.mjs +107 -23
- package/lib/instance-lifecycle.mjs +21 -1
- package/lib/instance-naming.mjs +187 -0
- package/lib/instance-resolution.mjs +10 -6
- package/lib/instance-upgrade.mjs +1445 -0
- package/lib/materialize.mjs +287 -89
- package/lib/servers.mjs +24 -11
- package/lib/soul-composition.mjs +7 -3
- package/lib/upgrade-state.mjs +101 -0
- package/lib/workspace.mjs +4 -1
- package/lib/worktree.mjs +103 -12
- package/package-catalog.json +5 -4
- package/package.json +1 -1
- package/packages/client/cli-adapter.mjs +52 -6
- package/packages/client/cli-locator.mjs +2 -2
- package/packages/client/composed-gate.mjs +10 -2
- package/packages/client/deployment-data.mjs +5 -0
- package/packages/client/deployment-identity.mjs +40 -0
- package/packages/client/deployment-panel.mjs +9 -3
- package/packages/client/inspect-boundary.mjs +11 -7
- package/packages/client/inspect-cache.mjs +2 -2
- package/packages/client/instance-name.mjs +28 -0
- package/packages/client/instance-presentation.mjs +11 -0
- package/packages/client/keymap.mjs +133 -28
- package/packages/client/keys-file.mjs +126 -0
- package/packages/client/own-codes.mjs +4 -2
- package/packages/client/panel-views.mjs +78 -12
- package/packages/client/spawn-naming.mjs +32 -0
- package/packages/client/spawn-preview-cli.mjs +58 -7
- package/packages/client/spawn-preview-contract.mjs +59 -0
- package/packages/client/spawn-preview-facts.mjs +8 -4
- package/packages/client/spawn-preview.mjs +81 -3
- package/packages/client/team-members.mjs +4 -1
- package/packages/client/workspace-step.mjs +25 -0
- package/packages/tui/README.md +7 -7
- package/packages/tui/lib/actions.mjs +92 -25
- package/packages/tui/lib/client.mjs +9 -4
- package/packages/tui/lib/config.mjs +50 -9
- package/packages/tui/lib/main.mjs +65 -24
- package/packages/tui/lib/model.mjs +292 -75
- package/packages/tui/lib/read.mjs +53 -1
- package/packages/tui/lib/store.mjs +469 -100
- package/packages/tui/lib/term/keys.mjs +22 -6
- package/packages/tui/lib/term/kitty.mjs +54 -11
- package/packages/tui/lib/term/screen.mjs +15 -6
- package/packages/tui/lib/term/through.mjs +66 -28
- package/packages/tui/lib/views/frame.mjs +223 -165
- package/packages/tui/lib/views/help.mjs +134 -29
- package/packages/tui/lib/views/instances.mjs +63 -22
- package/packages/tui/lib/views/palette.mjs +14 -4
- package/packages/tui/lib/views/souls.mjs +2 -2
- package/packages/tui/lib/views/switcher.mjs +6 -1
- package/packages/tui/lib/views/workspaces.mjs +55 -0
- package/skills/oats-getting-started/SKILL.md +96 -42
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// text. Pure: no IO, no clock, no escape byte. The keys are generated from the table the reducer
|
|
3
3
|
// acts on, so the help names every key that does something and no key that does not; the marks
|
|
4
4
|
// are the ones the list and the switcher draw (views/instances.mjs, views/switcher.mjs).
|
|
5
|
-
import { LEADER, backKeyLabel, keyLabel } from "../actions.mjs";
|
|
5
|
+
import { LEADER, backKeyLabel, doesLabel, keyLabel, keysTogether } from "../actions.mjs";
|
|
6
6
|
import { lit, ownEllipsis } from "../term/text.mjs";
|
|
7
7
|
import { style } from "../term/style.mjs";
|
|
8
|
-
import { cutNote, marksOf, measured } from "./instances.mjs";
|
|
8
|
+
import { NEEDS_INPUT, belowText, cutNote, marksOf, measured } from "./instances.mjs";
|
|
9
9
|
import { windowOf } from "./scroll.mjs";
|
|
10
10
|
import { SOUL_MARK } from "./souls.mjs";
|
|
11
11
|
import { OPEN_MARK } from "./switcher.mjs";
|
|
12
|
+
import { WAITING_DOT } from "./workspaces.mjs";
|
|
12
13
|
|
|
13
14
|
const TITLE = style({ bold: true });
|
|
14
15
|
const KEYS = style({ bold: true });
|
|
@@ -131,7 +132,7 @@ function openRows(detachKey, room, chorded = false) {
|
|
|
131
132
|
];
|
|
132
133
|
}
|
|
133
134
|
/** Under OPEN_RULES, while the chords are listed: they too are the TUI's in a terminal. */
|
|
134
|
-
export const CHORD_OPEN_RULE = "The chords
|
|
135
|
+
export const CHORD_OPEN_RULE = "The chords are taken there too: they never reach the agent.";
|
|
135
136
|
/** The TUI's own sentences under the line of the last act: how a confirmation is worked, and that
|
|
136
137
|
* what it sent is never ended by the TUI. */
|
|
137
138
|
export const ACT_RULES = Object.freeze([
|
|
@@ -148,23 +149,104 @@ const sentences = (list, cols) => list.flatMap((sentence) => {
|
|
|
148
149
|
});
|
|
149
150
|
|
|
150
151
|
/** What the leader pressed again does, the last line of the leader's table. */
|
|
151
|
-
export const LEADER_AGAIN = "the leader again: types it into the terminal that has the focus; with the list focused,
|
|
152
|
+
export const LEADER_AGAIN = "the leader again: types it into the terminal that has the focus; with the list focused, cancels the leader";
|
|
152
153
|
|
|
153
|
-
/** THE CHORDS (docs/tui.md, "Chords"):
|
|
154
|
-
*
|
|
155
|
-
*
|
|
154
|
+
/** THE CHORDS (docs/tui.md, "Chords"): the chords read now, the extras of the leader, which is the
|
|
155
|
+
* key that always works. While every chord bound is read (under the kitty keyboard protocol, or
|
|
156
|
+
* in the Alt family, whose keys need none) they lead the help, first of all; else only those with
|
|
157
|
+
* bytes of their own are read (the arrows of the other two families), listed after the leader's
|
|
158
|
+
* section. What a terminal may take first, how a program in a terminal still gets an Alt key the
|
|
159
|
+
* TUI takes, and where the tables are, as sentences the help flows. */
|
|
156
160
|
export const CHORD_RULES = Object.freeze([
|
|
157
|
-
"Your terminal may take some
|
|
161
|
+
"Your terminal may take some first: GNOME Terminal and Konsole take Alt+1 to Alt+9 for their own tabs while they have two or more, and Ghostty when the tab changes; Windows Terminal takes the Alt and Alt+Shift arrows while its panes are split, and Ctrl+Alt+1 to Ctrl+Alt+9 for its own tabs.",
|
|
162
|
+
"A program in a terminal still gets an Alt key the TUI takes as Esc, then the key, where it reads Esc as Meta, as the shell does.",
|
|
163
|
+
"The Ctrl+Alt and Ctrl+Shift chords need the kitty keyboard protocol: terminals without it (GNOME Terminal and the other VTE terminals, Konsole before 26.08, WezTerm unless enable_kitty_keyboard is set) send only their arrows.",
|
|
164
|
+
"A key that types a character with AltGr types it.",
|
|
165
|
+
"The leader works in every terminal.",
|
|
166
|
+
"docs/tui.md, \"Chords\", has the tables of terminals and of what the Alt family takes.",
|
|
158
167
|
]);
|
|
159
|
-
/**
|
|
160
|
-
|
|
161
|
-
|
|
168
|
+
/** THE CHORDS ON MACOS (docs/tui.md, "Chords on macOS"): Alt (Option) with an arrow alone, read
|
|
169
|
+
* where the terminal sends it as one (`CSI 1;3` and `CSI 1;4`), said Alt as the keys' labels are. What leads the chords' section
|
|
170
|
+
* there, and what follows its rows in place of CHORD_RULES. */
|
|
171
|
+
export const MAC_CHORD_LINE = "Shortcuts on macOS: Alt (Option) with an arrow, where your terminal sends it as one. Alt with a letter or a digit types a character, so none is a chord.";
|
|
172
|
+
export const MAC_CHORD_RULES = Object.freeze([
|
|
173
|
+
"Terminal.app, Ghostty and VS Code's terminal send Alt+Left and Alt+Right as the shell's word moves, Esc then b or f: there those chords do not come, and the shell moves by word.",
|
|
174
|
+
"Where the chord comes, the TUI takes it from the agent.",
|
|
175
|
+
"The leader works in every terminal.",
|
|
176
|
+
"docs/tui.md, \"Chords on macOS\", has the terminals and their settings.",
|
|
177
|
+
]);
|
|
178
|
+
/** THE FAMILY (docs/tui.md, "Switch family"): the sentences that lead the chords' section, for
|
|
179
|
+
* `keys`, the model's `{ family, label, note }` (keys.json as lib/config.mjs loadKeys read it, and
|
|
180
|
+
* the shared chordFamilyNote's line, or null), while the terminal confirms the kitty keyboard
|
|
181
|
+
* protocol (`confirmed`) or not. Which family is bound: Alt, the default, with how to switch;
|
|
182
|
+
* Ctrl+Alt or Ctrl+Shift, from keys.json, and, without the protocol, that this terminal cannot
|
|
183
|
+
* send it, so the leader is the way (their arrows still come). Then the note, when the file was
|
|
184
|
+
* there and not taken. No `keys` (a view drawn without a run): none. macOS (`keys.mac`) has no
|
|
185
|
+
* family: MAC_CHORD_LINE. */
|
|
186
|
+
export function chordFamilyLines(keys, confirmed) {
|
|
187
|
+
if (!keys) return [];
|
|
188
|
+
if (keys.mac === true) return [MAC_CHORD_LINE];
|
|
189
|
+
const chosen = keys.family === "ctrl+alt" || keys.family === "ctrl+shift" ? keys.family : null;
|
|
190
|
+
const label = chosen === "ctrl+alt" ? "Ctrl+Alt" : chosen === "ctrl+shift" ? "Ctrl+Shift" : keys.label;
|
|
191
|
+
const said = chosen === null
|
|
192
|
+
? `Shortcuts: ${label}. To leave Alt to the programs in your terminals, set "chords": "ctrl+alt" in keys.json (or "ctrl+shift", for foot and Alacritty) and restart.`
|
|
193
|
+
: confirmed ? `Shortcuts: ${label}, from keys.json.`
|
|
194
|
+
: `Shortcuts: ${label}, from keys.json, but this terminal does not confirm the kitty keyboard protocol: use the leader.`;
|
|
195
|
+
return typeof keys.note === "string" ? [said, keys.note] : [said];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** The chords listed on one row of their own, both keys first, their modifiers said once
|
|
199
|
+
* (`Alt+Shift+Up/Down`, actions.mjs keysTogether, as the cheat sheet says them): the instances,
|
|
200
|
+
* the workspaces (the leader's Up and Down), the tabs (its Left and Right) and the groups (its
|
|
201
|
+
* Shift+Tab and Tab). The table's left column stays narrow enough for the help beside the sidebar
|
|
202
|
+
* at 80 columns. */
|
|
203
|
+
const CHORD_PAIRS = Object.freeze([["previous", "next"], ["workspace-previous", "workspace-next"], ["tab-previous", "tab-next"], ["group-previous", "group-next"]].map((pair) => Object.freeze(pair)));
|
|
204
|
+
/** The chords' own (actions.mjs CHORD_OWN), the Nth tab: one row for the nine, as the TUI's words. */
|
|
205
|
+
const TAB_N = /^tab-([1-9])$/;
|
|
206
|
+
const TABS_SAID = "the focused group's first to eighth tab, 9 its last";
|
|
207
|
+
/** Whether keysTogether says the keys' modifiers once (`Alt+Shift+Up/Down`), not each key whole. */
|
|
208
|
+
const sharesModifiers = (keys) => keysTogether(keys) !== keys.map(keyLabel).join("/");
|
|
209
|
+
/** Two labels of the leader's table as one: `previous instance` and `next instance` are
|
|
210
|
+
* `previous and next instance`. */
|
|
211
|
+
function bothSaid(a, b) {
|
|
212
|
+
const [x, y] = [words(a), words(b)];
|
|
213
|
+
return x.length > 1 && x.at(-1) === y.at(-1) ? `${x.slice(0, -1).join(" ")} and ${y.join(" ")}` : `${a} and ${b}`;
|
|
214
|
+
}
|
|
215
|
+
/** The chords' rows: `chords` are `[key id, does]` in the table's order, each said by its label
|
|
216
|
+
* (the shared doesLabel: the leader's table's, else the chord's own), then, for one the leader's
|
|
217
|
+
* table has a key for, `or <the leader> then <its key>` (`detachKey`'s label, when one is given); a pair of CHORD_PAIRS on one row
|
|
218
|
+
* where its keys share their modifiers (`Alt+Shift+Up/Down`; Ctrl+Alt+Shift+A and Ctrl+Alt+A, which do not, a row each, so the
|
|
219
|
+
* keys' column stays narrow enough for the meanings beside it at 80 columns), and the nine tab-N on one, `Ctrl+Alt+1 … Ctrl+Alt+9`
|
|
220
|
+
* (`...` in ASCII), which no leader's key does. The family's lines lead them (chordFamilyLines:
|
|
221
|
+
* `keys`, under the protocol or not, `confirmed`). */
|
|
222
|
+
function chordRows(chords, cols, detachKey, ascii, keys = null, confirmed = false) {
|
|
223
|
+
const by = (does) => LEADER.find((entry) => entry.does === does);
|
|
224
|
+
const leader = typeof detachKey === "string" ? backKeyLabel(detachKey) : null;
|
|
225
|
+
const then = (list) => (leader === null || list.some((does) => !by(does)) ? "" : `, or ${leader} then ${list.map((does) => keyLabel(by(does).keys[0])).join(" and ")}`);
|
|
226
|
+
const keyOf = new Map(chords.map(([key, does]) => [does, key]));
|
|
227
|
+
const tabs = chords.filter(([, does]) => TAB_N.test(does));
|
|
228
|
+
const done = new Set(), rows = [];
|
|
229
|
+
for (const [key, does] of chords) {
|
|
230
|
+
if (done.has(does)) continue;
|
|
231
|
+
const pair = CHORD_PAIRS.find((each) => each.includes(does) && each.every((one) => keyOf.has(one)) && sharesModifiers(each.map((one) => keyOf.get(one))));
|
|
232
|
+
if (pair) {
|
|
233
|
+
pair.forEach((one) => done.add(one));
|
|
234
|
+
rows.push([keysTogether(pair.map((one) => keyOf.get(one))), `${bothSaid(doesLabel(pair[0]), doesLabel(pair[1]))}${then(pair)}`]);
|
|
235
|
+
} else if (TAB_N.test(does) && tabs.length === 9) {
|
|
236
|
+
tabs.forEach(([, one]) => done.add(one));
|
|
237
|
+
rows.push([ownEllipsis(`${keyLabel(tabs[0][0])} \u2026 ${keyLabel(tabs[8][0])}`, ascii), TABS_SAID]);
|
|
238
|
+
} else {
|
|
239
|
+
const n = TAB_N.exec(does)?.[1];
|
|
240
|
+
rows.push([keyLabel(key), n === undefined ? `${doesLabel(does) ?? does}${then([does])}` : n === "9" ? "the focused group's last tab" : `the focused group's tab ${n}`]);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
162
243
|
return [
|
|
163
244
|
heading("Chords"),
|
|
164
245
|
[],
|
|
165
|
-
...sentences(
|
|
166
|
-
...
|
|
167
|
-
...
|
|
246
|
+
...sentences(chordFamilyLines(keys, confirmed), cols),
|
|
247
|
+
...sentences(["One keypress each, from every focus, a terminal's too: none reaches the agent."], cols),
|
|
248
|
+
...table(rows.map(([keys, said]) => [keyText(keys), words(said)]), cols, KEYS),
|
|
249
|
+
...sentences(keys?.mac === true ? MAC_CHORD_RULES : CHORD_RULES, cols),
|
|
168
250
|
];
|
|
169
251
|
}
|
|
170
252
|
|
|
@@ -175,7 +257,24 @@ export const PALETTE_KEYS = Object.freeze([
|
|
|
175
257
|
Object.freeze(["Enter", "run the selected row"]),
|
|
176
258
|
Object.freeze(["Esc", "close the palette"]),
|
|
177
259
|
]);
|
|
178
|
-
|
|
260
|
+
/** What the palette's own keys do (actions.mjs paletteKeys), said on a row of their own after its
|
|
261
|
+
* Up and Down, where the TUI has them (not on macOS). */
|
|
262
|
+
export const PALETTE_GROUP_WORDS = "the first row of the group before, or of the next; past either end it wraps";
|
|
263
|
+
/** The key ids of the palette's own keys (`paletteKeys`, `[key id, does]`, the model's), the
|
|
264
|
+
* group before's then the next's, as Up then Down; null unless it has both (none on macOS). The
|
|
265
|
+
* help and the cheat sheet (views/frame.mjs) name them so. */
|
|
266
|
+
export function paletteGroupKeys(paletteKeys) {
|
|
267
|
+
const keyOf = new Map((paletteKeys ?? []).map(([key, does]) => [does, key]));
|
|
268
|
+
const pair = ["palette-previous-group", "palette-next-group"].map((does) => keyOf.get(does));
|
|
269
|
+
return pair.every((key) => key !== undefined) ? pair : null;
|
|
270
|
+
}
|
|
271
|
+
/** The palette's section: PALETTE_KEYS, and after its Up and Down the row of its own keys
|
|
272
|
+
* (paletteGroupKeys), where it has them. */
|
|
273
|
+
function paletteRows(cols, paletteKeys) {
|
|
274
|
+
const pair = paletteGroupKeys(paletteKeys), rows = PALETTE_KEYS.map(([keys, said]) => [keys, words(said)]);
|
|
275
|
+
if (pair !== null) rows.splice(1, 0, [pair.map(keyLabel).join(", "), words(PALETTE_GROUP_WORDS)]);
|
|
276
|
+
return [heading("The palette"), [], ...table(rows, cols, KEYS)];
|
|
277
|
+
}
|
|
179
278
|
|
|
180
279
|
/** The leader's rows (docs/tui.md, "The leader"): its key, then the table of what each key after
|
|
181
280
|
* it does (actions.mjs LEADER), from every focus. */
|
|
@@ -192,7 +291,7 @@ function leaderRows(detachKey, cols) {
|
|
|
192
291
|
...table([...LEADER.map((entry) => [entry.keys.map(keyLabel).join(", "),
|
|
193
292
|
words(entry.terminal ? `${entry.label}, while a terminal is open` : entry.label)]),
|
|
194
293
|
// The leader again is the user's key, so it is not in the table: it types the leader into the
|
|
195
|
-
// terminal that has the focus, and with the list focused only
|
|
294
|
+
// terminal that has the focus, and with the list focused only cancels the leader.
|
|
196
295
|
[key, words(LEADER_AGAIN)]], cols, KEYS),
|
|
197
296
|
];
|
|
198
297
|
}
|
|
@@ -216,26 +315,30 @@ const spawnRows = (cols) => [heading("The spawn prompt"), [], ...table(SPAWN_KEY
|
|
|
216
315
|
* listed as such: the table can be changed by the user's tui.json, and the help says what is so
|
|
217
316
|
* now. An action that does one thing in each view has a line per view, its key on each; under
|
|
218
317
|
* the line of opening an agent stand the back key (`detachKey`, tui.json's `open.detachKey`) and
|
|
219
|
-
* the rules of OPEN_RULES; under the line of the last act, ACT_RULES.
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
|
|
224
|
-
|
|
318
|
+
* the rules of OPEN_RULES; under the line of the last act, ACT_RULES. The chords read now
|
|
319
|
+
* (`chords`, `[key id, does]`; none, or null, lists none) lead the whole help while the terminal
|
|
320
|
+
* confirms the kitty keyboard protocol (`chordsLead`), before this table; without it they come
|
|
321
|
+
* after the leader's table. Then the palette's keys (PALETTE_KEYS, and its own keys `paletteKeys`,
|
|
322
|
+
* `[key id, does]`, where there are any: paletteRows) and the spawn prompt's (SPAWN_KEYS,
|
|
323
|
+
* SPAWN_RULES). `keys` is the family the chords are bound in, `{ family, note }` (chordFamilyLines),
|
|
324
|
+
* said at the top of the chords' section; null says none. */
|
|
325
|
+
export function helpRows(actions, ascii, cols = 100, detachKey = null, chords = null, chordsLead = false, paletteKeys = null, keys = null) {
|
|
326
|
+
const marks = marksOf(ascii), chorded = chords !== null && chords.length > 0;
|
|
225
327
|
const closing = keyText(["close", "help"].map((id) => actions.find((action) => action.id === id)).filter((action) => action?.keys.length).map((action) => keyLabel(action.keys[0])).join(" or "));
|
|
226
328
|
return [
|
|
329
|
+
...(chorded && chordsLead ? [...chordRows(chords, cols, detachKey, ascii, keys, true), []] : []),
|
|
227
330
|
heading("Keys"),
|
|
228
331
|
[],
|
|
229
332
|
...table(actions.flatMap((action) => {
|
|
230
333
|
const left = action.keys.length ? keyText(keysLabel(action)) : "(no key)";
|
|
231
334
|
if (!action.views) return [[left, words(action.label)]];
|
|
232
|
-
return action.views.map(([view, said]) => [left, words(said), action.id === "open" && view === "instances" && detachKey !== null ? (room) => openRows(detachKey, room,
|
|
335
|
+
return action.views.map(([view, said]) => [left, words(said), action.id === "open" && view === "instances" && detachKey !== null ? (room) => openRows(detachKey, room, chorded)
|
|
233
336
|
: action.id === "restart" ? actRows : undefined]);
|
|
234
337
|
}), cols, KEYS),
|
|
235
338
|
...(detachKey !== null ? [[], ...leaderRows(detachKey, cols)] : []),
|
|
236
|
-
...(
|
|
339
|
+
...(chorded && !chordsLead ? [[], ...chordRows(chords, cols, detachKey, ascii, keys, false)] : []),
|
|
237
340
|
[],
|
|
238
|
-
...paletteRows(cols),
|
|
341
|
+
...paletteRows(cols, paletteKeys),
|
|
239
342
|
[],
|
|
240
343
|
...spawnRows(cols),
|
|
241
344
|
[],
|
|
@@ -248,10 +351,12 @@ export function helpRows(actions, ascii, cols = 100, detachKey = null, chords =
|
|
|
248
351
|
[marks.unknown, "state unknown"],
|
|
249
352
|
[marks.held, ownEllipsis("held by a spawn or a retire: under way (Retiring\u2026), failed or not finished", ascii)],
|
|
250
353
|
["+N", "N instances folded away below it"],
|
|
251
|
-
[marks.waiting,
|
|
252
|
-
[
|
|
354
|
+
[marks.waiting, `needs input, in reverse video: ${NEEDS_INPUT} where the whole name fits`],
|
|
355
|
+
["N", `N instances folded away below it need input: ${belowText("N")} where the whole name fits`],
|
|
253
356
|
[marks.selected, "the selected row, and the pane the movement keys act on"],
|
|
254
357
|
[OPEN_MARK, "among the workspaces: the one that is open"],
|
|
358
|
+
[ascii ? WAITING_DOT.ascii : WAITING_DOT.utf8, ascii ? "among the workspaces: an instance there needs input" : `among the workspaces, in yellow: an instance there needs input (${WAITING_DOT.ascii} without colour)`],
|
|
359
|
+
[`+N ${ascii ? WAITING_DOT.ascii : WAITING_DOT.utf8}`, "among the workspaces: N not shown, and an instance in one of them needs input"],
|
|
255
360
|
[ascii ? SOUL_MARK.ascii : SOUL_MARK.utf8, "among the souls: a soul, in its colour"],
|
|
256
361
|
["!", "among the souls: a spawn of it here would be refused"],
|
|
257
362
|
].map(([mark, meaning]) => [mark, words(meaning)]), cols),
|
|
@@ -273,8 +378,8 @@ export function helpRows(actions, ascii, cols = 100, detachKey = null, chords =
|
|
|
273
378
|
|
|
274
379
|
/** `{ rows, extent }`: `size.rows` rows for an area `size.cols` wide, scrolled to `top`, and how
|
|
275
380
|
* many rows the whole help has. The movement keys scroll it. */
|
|
276
|
-
export function help(actions, size, { top = 0, ascii = false, detachKey = null, chords = null } = {}) {
|
|
277
|
-
const all = helpRows(actions, ascii, size.cols, detachKey, chords);
|
|
381
|
+
export function help(actions, size, { top = 0, ascii = false, detachKey = null, chords = null, chordsLead = false, paletteKeys = null, keys = null } = {}) {
|
|
382
|
+
const all = helpRows(actions, ascii, size.cols, detachKey, chords, chordsLead, paletteKeys, keys);
|
|
278
383
|
const rows = Array.from({ length: size.rows }, () => []);
|
|
279
384
|
const win = windowOf({ top, count: all.length, height: size.rows });
|
|
280
385
|
all.slice(win.top, win.top + win.size).forEach((spans, i) => { rows[i] = spans; });
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// The list of instances: (model, pane) -> rows of spans. Pure: no IO, no clock, no escape byte.
|
|
2
2
|
// Every name, word and reason in it is text the TUI did not write and goes through shown(); the
|
|
3
3
|
// marks and the few words around them are the TUI's own. Nothing is told by colour alone: each
|
|
4
|
-
// state has a mark of its own shape, the selected row carries `>` as well as reverse video
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// of
|
|
4
|
+
// state has a mark of its own shape, the selected row carries `>` as well as reverse video (the `>`
|
|
5
|
+
// only while the list has the focus, not the list of workspaces: the model's `cursor`), and a
|
|
6
|
+
// waiting row carries a tag in words, `Needs input`, in reverse video. A row is quiet: its mark
|
|
7
|
+
// and its name, and a word only where the mark can't say it. Children stand under their parent by
|
|
8
|
+
// indentation alone; a folded row says how many it folds away, `+n`, and how many of those wait,
|
|
9
|
+
// `N below`. In a view of two or more deployments the list also holds a heading per deployment
|
|
10
|
+
// and the sentences the model sets under one: a heading says in words what it is of.
|
|
10
11
|
import { keyLabel } from "../actions.mjs";
|
|
11
12
|
import { lit, shown, shownEnd, textOf } from "../term/text.mjs";
|
|
12
13
|
import { style } from "../term/style.mjs";
|
|
@@ -23,8 +24,10 @@ export const marksOf = (ascii) => (ascii ? MARKS.ascii : MARKS.utf8);
|
|
|
23
24
|
|
|
24
25
|
/** Two cells of indent per level, and no deeper than this many levels: a deeper row sits at the last. */
|
|
25
26
|
const INDENT = 2, LEVELS = 6;
|
|
26
|
-
/** The cells
|
|
27
|
-
|
|
27
|
+
/** The cells every row keeps at its right edge, so the word column stands in one place whether a
|
|
28
|
+
* row waits or not: they hold a needs-input tag in its short form, ` ! ` to ` 99+ `, whose
|
|
29
|
+
* padding is its gap. A tag in words takes more, and one cell of gap before it. */
|
|
30
|
+
const EDGE = 5;
|
|
28
31
|
/** A row's cells before its name: the selection mark, a gap, the state mark, a gap. */
|
|
29
32
|
const LEAD = 4;
|
|
30
33
|
/** The column of the state mark, before a row's indent. */
|
|
@@ -51,8 +54,28 @@ const DIM = style({ dim: true });
|
|
|
51
54
|
const SELECTED = style({ reverse: true });
|
|
52
55
|
/** The look of each state mark: the Souls view draws an instance's mark in its detail as the list does. */
|
|
53
56
|
export const LOOK = Object.freeze({ running: style({ fg: "green" }), stopped: DIM, shell: DIM, unknown: style({ fg: "yellow" }), held: style({ fg: "magenta" }) });
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
/** The marks an instance's colour (feature instance-color) draws: running in it, stopped and at its shell in
|
|
58
|
+
* it and dim. The shape still says the state; `unknown` and `held` keep their own look whatever the colour. */
|
|
59
|
+
const COLOURED = Object.freeze({ running: false, stopped: true, shell: true });
|
|
60
|
+
/** A state mark's look for a row of colour `colour` (a terminal colour name, or null for none). */
|
|
61
|
+
export function markLook(mark, colour) {
|
|
62
|
+
if (colour && Object.hasOwn(COLOURED, mark)) return style({ fg: colour, dim: COLOURED[mark] });
|
|
63
|
+
return LOOK[mark] ?? LOOK.unknown;
|
|
64
|
+
}
|
|
65
|
+
/** The needs-input tag: reverse video in the waiting colour, so the reverse video alone carries it
|
|
66
|
+
* under NO_COLOR. On the selected row, which is in reverse already, it is the other way round:
|
|
67
|
+
* not reversed, a gap in the selection's bar. */
|
|
68
|
+
const WAITS = style({ fg: "yellow", bold: true, reverse: true });
|
|
69
|
+
const WAITS_SELECTED = style({ fg: "yellow", bold: true });
|
|
70
|
+
|
|
71
|
+
/** The needs-input tag's words, the Desktop's (packages/desktop/renderer/shell.mjs, needsInputMark;
|
|
72
|
+
* a test pins them equal): `Needs input` on a waiting row, `N below` on a row that folds away N
|
|
73
|
+
* waiting rows, `99+ below` past 99. A row that is both says `Needs input`, as the Desktop's does:
|
|
74
|
+
* its own claim wins, and the detail's `below` line names the rest. */
|
|
75
|
+
export const NEEDS_INPUT = "Needs input";
|
|
76
|
+
/** A count of waiting rows as the tag says it, or the help's letter for one (`N`) as it is. */
|
|
77
|
+
const count = (n) => (typeof n === "number" && n > 99 ? "99+" : String(n));
|
|
78
|
+
export const belowText = (n) => `${count(n)} below`;
|
|
56
79
|
|
|
57
80
|
export const EMPTY_TEXT = Object.freeze({
|
|
58
81
|
reading: "Reading the deployment.",
|
|
@@ -70,30 +93,45 @@ export function measured(value) {
|
|
|
70
93
|
return { text, width: textWidth(textOf(text)) };
|
|
71
94
|
}
|
|
72
95
|
|
|
73
|
-
|
|
96
|
+
/** A row's needs-input tag, in words and in its short form (`!`, or the count alone), or null when
|
|
97
|
+
* the row neither waits nor folds a waiting row away. Drawn with a cell of padding either side. */
|
|
98
|
+
function tagOf(row, marks) {
|
|
99
|
+
if (row.waiting) return { full: NEEDS_INPUT, short: marks.waiting };
|
|
100
|
+
return row.below > 0 ? { full: belowText(row.below), short: count(row.below) } : null;
|
|
101
|
+
}
|
|
74
102
|
|
|
75
103
|
/** One instance's row in a pane `cols` wide: the state mark, the name cut to what is left, on a
|
|
76
104
|
* folded row `+n` after the name, the row's word (when it has one) in the word column, and the
|
|
77
|
-
*
|
|
105
|
+
* needs-input tag at the edge. A row with no word gives its name the word column's cells too. The
|
|
78
106
|
* name wins over the word: it keeps NAME_LEAST cells (all of it when it is shorter), and when the
|
|
79
107
|
* word column would leave it fewer, the word is cut to what the name leaves, after it, or given
|
|
80
108
|
* up under WORD_LEAST cells; the mark and the detail still say it. The name is cut before `+n`
|
|
81
|
-
* is: the count stays whole beside what is left of the name.
|
|
82
|
-
*
|
|
109
|
+
* is: the count stays whole beside what is left of the name. The tag is the first to give way:
|
|
110
|
+
* it is in words only where the whole name, its count and the word column all fit beside it
|
|
111
|
+
* (the word column then stands left of the tag), and else in its short form, inside the EDGE
|
|
112
|
+
* cells every row keeps, so it never takes a cell from the name, the word or the mark. Every
|
|
113
|
+
* span has its width, so no text can pass its column whatever the terminal thinks a character
|
|
114
|
+
* takes. */
|
|
83
115
|
function instanceRow(row, cols, wordWidth, marks) {
|
|
84
116
|
const look = (own) => (row.selected ? SELECTED : own);
|
|
85
117
|
const at = Math.min(row.depth, LEVELS - 1) * INDENT;
|
|
86
118
|
const fold = row.folded > 0 ? `+${row.folded}` : null;
|
|
87
|
-
const nameCol = LEAD + at
|
|
119
|
+
const nameCol = LEAD + at;
|
|
88
120
|
const name = measured(row.name), claim = Math.min(name.width + (fold ? fold.length + 1 : 0), NAME_LEAST);
|
|
121
|
+
// The tag, and where the name and the word end: before the tag in words and a gap, or the EDGE.
|
|
122
|
+
const hasWord = wordWidth > 0 && row.word !== null && row.word !== undefined;
|
|
123
|
+
const whole = name.width + (fold ? fold.length + 1 : 0) + (hasWord ? 2 + wordWidth : 0);
|
|
124
|
+
const tag = tagOf(row, marks), wide = tag !== null && cols - tag.full.length - 3 - nameCol >= whole;
|
|
125
|
+
const waits = tag && (wide ? tag.full : tag.short), end = wide ? cols - tag.full.length - 3 : cols - EDGE, room = end - nameCol;
|
|
89
126
|
// The word's cells: its column's, or what the name's claim leaves of the row, or none.
|
|
90
127
|
const left = room - claim - 2;
|
|
91
|
-
const wordCells =
|
|
92
|
-
const wordCol = left >= wordWidth ?
|
|
93
|
-
const nameEnd = wordCells ? wordCol - 2 :
|
|
128
|
+
const wordCells = hasWord ? (left >= wordWidth ? wordWidth : left >= WORD_LEAST ? left : 0) : 0;
|
|
129
|
+
const wordCol = left >= wordWidth ? end - wordWidth : nameCol + claim + 2;
|
|
130
|
+
const nameEnd = wordCells ? wordCol - 2 : end;
|
|
94
131
|
const spans = [];
|
|
95
|
-
if (row.selected) spans.push({ col: 0, width: cols, style: SELECTED }
|
|
96
|
-
spans.push({ col:
|
|
132
|
+
if (row.selected) spans.push({ col: 0, width: cols, style: SELECTED });
|
|
133
|
+
if (row.selected && row.cursor !== false) spans.push({ col: 0, text: lit(marks.selected), style: SELECTED, width: 1 });
|
|
134
|
+
spans.push({ col: MARK + at, text: lit(marks[row.mark] ?? marks.unknown), style: look(markLook(row.mark, row.color)), width: 1 });
|
|
97
135
|
if (nameEnd > nameCol) {
|
|
98
136
|
// The count and the gap before it, when there is room for them and for a cell of the name.
|
|
99
137
|
const after = fold && nameEnd - nameCol > fold.length + 1 ? fold.length + 1 : 0;
|
|
@@ -102,8 +140,11 @@ function instanceRow(row, cols, wordWidth, marks) {
|
|
|
102
140
|
if (after) spans.push({ col: nameCol + nameWidth + 1, text: lit(fold), style: look(DIM), width: fold.length });
|
|
103
141
|
}
|
|
104
142
|
if (wordCells) spans.push({ col: wordCol, text: shown(row.word), style: look(DIM), width: wordCells });
|
|
105
|
-
|
|
106
|
-
|
|
143
|
+
// The tag: its padding a blank span in its style, the words over it.
|
|
144
|
+
const tagCol = waits ? cols - waits.length - 2 : 0, tagLook = row.selected ? WAITS_SELECTED : WAITS;
|
|
145
|
+
if (waits && tagCol > MARK + at) {
|
|
146
|
+
spans.push({ col: tagCol, width: waits.length + 2, style: tagLook }, { col: tagCol + 1, text: lit(waits), style: tagLook, width: waits.length });
|
|
147
|
+
}
|
|
107
148
|
return spans;
|
|
108
149
|
}
|
|
109
150
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// The palette (docs/tui.md, "The palette"): (model, area) -> rows of spans, over the whole body.
|
|
2
2
|
// Pure: no IO, no clock, no escape byte. One input over a list: the query on the first row, then
|
|
3
3
|
// the window of the rows lib/model.mjs paletteItems lists, the selected one in reverse with `>`.
|
|
4
|
-
// An instance's, a soul's or a capability's name, a machine, an instance's siblings,
|
|
5
|
-
// capability comes from and the query are text the
|
|
6
|
-
// labels of the views, the acts and the commands are
|
|
7
|
-
// alone: each row says in a word what kind it is
|
|
4
|
+
// An instance's, a soul's or a capability's name, a machine, an instance's siblings, a group's
|
|
5
|
+
// label (a cluster's name, a machine's), where a capability comes from and the query are text the
|
|
6
|
+
// TUI did not write and go through shown(); the labels of the views, the acts and the commands are
|
|
7
|
+
// the TUI's own. Nothing is told by colour alone: each row says in a word what kind it is, and a
|
|
8
|
+
// group's label row, dim, which is never selected, stands where no row's mark stands, before the
|
|
9
|
+
// rows it names.
|
|
8
10
|
import { lit, shown } from "../term/text.mjs";
|
|
9
11
|
import { style } from "../term/style.mjs";
|
|
10
12
|
import { cutNote, marksOf, measured } from "./instances.mjs";
|
|
@@ -23,8 +25,16 @@ const DIM = style({ dim: true });
|
|
|
23
25
|
const SELECTED = style({ reverse: true });
|
|
24
26
|
const PLAIN = style();
|
|
25
27
|
|
|
28
|
+
/** A group's label row in `cols` cells: its label, text from outside, dim at the rows' text
|
|
29
|
+
* column, with no kind word and no mark. */
|
|
30
|
+
function groupRow(item, cols) {
|
|
31
|
+
const label = measured(item.label), width = Math.min(label.width, Math.max(0, cols - LEAD));
|
|
32
|
+
return width > 0 ? [{ col: LEAD, text: label.text, style: DIM, width }] : [];
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
/** One row of the palette in `cols` cells. */
|
|
27
36
|
function itemRow(item, cols, marks) {
|
|
37
|
+
if (item.kind === "group") return groupRow(item, cols);
|
|
28
38
|
const look = (own) => (item.selected ? SELECTED : own);
|
|
29
39
|
const kind = KINDS[item.kind], kindCol = Math.max(LEAD, cols - kind.length);
|
|
30
40
|
const spans = [];
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { keyLabel } from "../actions.mjs";
|
|
10
10
|
import { lit, shown, shownLines } from "../term/text.mjs";
|
|
11
11
|
import { COLORS, style } from "../term/style.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { cutNote, headingRow, markLook, marksOf, measured } from "./instances.mjs";
|
|
13
13
|
import { windowOf } from "./scroll.mjs";
|
|
14
14
|
|
|
15
15
|
/** The TUI's own lines in the Souls view. `retry` and `toInstances` stand after the key that does
|
|
@@ -245,7 +245,7 @@ export function soulDetailRows(m, cols) {
|
|
|
245
245
|
rows.push([label("instances here")]);
|
|
246
246
|
const marks = marksOf(ascii);
|
|
247
247
|
const units = [
|
|
248
|
-
...here.shown.map((each) => [{ text: lit(marks[each.mark] ?? marks.unknown), width: 1, style:
|
|
248
|
+
...here.shown.map((each) => [{ text: lit(marks[each.mark] ?? marks.unknown), width: 1, style: markLook(each.mark, each.color) }, measured(each.name)]),
|
|
249
249
|
...(here.more > 0 ? [[{ text: lit(`+${here.more}`), width: `+${here.more}`.length, style: DIM }]] : []),
|
|
250
250
|
];
|
|
251
251
|
flowed(units, inner, 2).forEach((spans) => rows.push(spans.map((span) => ({ ...span, col: span.col + INNER }))));
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// deployment's name and path and what the kernel said; the marks, the headings of its own and its
|
|
5
5
|
// few sentences are the TUI's.
|
|
6
6
|
// Nothing is told by colour alone: the selected row carries `>` as well as reverse video, and
|
|
7
|
-
// the workspace that is open carries `*`.
|
|
7
|
+
// the workspace that is open carries `*`. Under a workspace, one dim line per deployment of it says
|
|
8
|
+
// where it is and, when it is not live, its state in words (lib/model.mjs switcher): never a colour.
|
|
8
9
|
import { lit, shown, shownLines } from "../term/text.mjs";
|
|
9
10
|
import { style } from "../term/style.mjs";
|
|
10
11
|
import { cutNote, measured } from "./instances.mjs";
|
|
@@ -33,6 +34,8 @@ export const SWITCHER_TEXT = Object.freeze({
|
|
|
33
34
|
/** The columns of a choice: the selection mark in the first cell, the open mark, then the label.
|
|
34
35
|
* A heading and every line that is not a choice start two cells before the labels. */
|
|
35
36
|
const OPEN = 2, LABEL = 4, ASIDE = LABEL - 2;
|
|
37
|
+
/** The column of a workspace's indicator lines: two cells in from its label. */
|
|
38
|
+
const INDICATOR = LABEL + 2;
|
|
36
39
|
/** One cell of margin at the right edge, as the sidebar keeps. */
|
|
37
40
|
const MARGIN = 1;
|
|
38
41
|
/** The cells between two columns. */
|
|
@@ -134,6 +137,8 @@ export function switcher(m, size) {
|
|
|
134
137
|
const at = lead.length + i;
|
|
135
138
|
if (at >= size.rows) return;
|
|
136
139
|
if (item.heading !== undefined) rows[at] = [{ col: ASIDE, text: item.shared ? shown(item.heading) : lit(item.heading), style: DIM, width: aside }];
|
|
140
|
+
// A deployment of the workspace above: the shared machine label and state word, cut at the edge.
|
|
141
|
+
else if (item.indicator !== undefined) rows[at] = cols - MARGIN > INDICATOR ? [{ col: INDICATOR, text: shown(item.indicator), style: DIM, width: cols - MARGIN - INDICATOR }] : [];
|
|
137
142
|
else rows[at] = choiceRow(item, cols);
|
|
138
143
|
});
|
|
139
144
|
if (note) rows[size.rows - 1] = [{ col: ASIDE, text: lit(note), style: DIM, width: aside }];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// The list of workspaces at the top of the sidebar (docs/tui.md, "The list of workspaces"): (the
|
|
2
|
+
// model's `workspaces`, a width) -> rows of spans. Pure: no IO, no clock, no escape byte.
|
|
3
|
+
// A row is one line, a workspace's name, which is the shared home's and goes through shown(); `>`,
|
|
4
|
+
// the dot and `+N` are the TUI's. The open workspace's row is in reverse video; while the list has
|
|
5
|
+
// the focus the cursor's row is, with `>`, and the open workspace's name is underlined. A workspace
|
|
6
|
+
// where an instance needs input has a dot after its name, `●` in yellow, `!` without colour or in
|
|
7
|
+
// ASCII, and `+N` has it when one of the workspaces it counts does.
|
|
8
|
+
import { lit, shown } from "../term/text.mjs";
|
|
9
|
+
import { style } from "../term/style.mjs";
|
|
10
|
+
import { measured } from "./instances.mjs";
|
|
11
|
+
|
|
12
|
+
/** The dot of a workspace where an instance needs input: in yellow, or, with no colour to say it
|
|
13
|
+
* (NO_COLOR) or in ASCII, the needs-input mark of the rows. */
|
|
14
|
+
export const WAITING_DOT = Object.freeze({ utf8: "●", ascii: "!" });
|
|
15
|
+
const CURSOR = 0, NAME = 2, MARGIN = 1;
|
|
16
|
+
const PLAIN = style(), BOLD = style({ bold: true }), BAR = style({ bold: true, reverse: true });
|
|
17
|
+
const OPEN = style({ bold: true, underline: true });
|
|
18
|
+
const YELLOW = style({ fg: "yellow", bold: true });
|
|
19
|
+
|
|
20
|
+
/** One row of the list, `cols` wide: `>` under the cursor, the name, cut with an ellipsis where it
|
|
21
|
+
* does not fit, and one cell after the name as drawn the dot (the screen draws it `after` the
|
|
22
|
+
* name: a name cut, or drawn in `?` without UTF-8, leaves no gap before it). The open workspace's
|
|
23
|
+
* row is in reverse video across the row while the list does not have the focus, the cursor's
|
|
24
|
+
* while it has, and then the open workspace's name is underlined, so it stays told apart until
|
|
25
|
+
* Enter opens the cursor's row. The dot's cell is a gap in the reverse video, on the normal
|
|
26
|
+
* background (a yellow cell with a dark dot in it would read as something else). */
|
|
27
|
+
function row(line, cols, { focused, cursor, ascii, colour }) {
|
|
28
|
+
const under = focused && line.key === cursor, barred = under || (!focused && line.current);
|
|
29
|
+
const spans = barred ? [{ col: 0, width: cols, style: BAR }] : [];
|
|
30
|
+
if (under) spans.push({ col: CURSOR, text: lit(">"), style: BAR, width: 1 });
|
|
31
|
+
// The name keeps the row less the margin, and less the dot and the cell before it when there is one.
|
|
32
|
+
const room = Math.max(0, cols - MARGIN - NAME - (line.waiting ? 2 : 0));
|
|
33
|
+
const width = Math.min(room, measured(line.label).width);
|
|
34
|
+
const look = barred ? BAR : focused && line.current ? OPEN : PLAIN;
|
|
35
|
+
if (width > 0) spans.push({ col: NAME, text: shown(line.label), style: look, width });
|
|
36
|
+
if (line.waiting) spans.push(dot(NAME + width + 1, width > 0, { ascii, colour }));
|
|
37
|
+
return spans;
|
|
38
|
+
}
|
|
39
|
+
/** The dot at `col`, drawn `after` what stands before it when `after`. */
|
|
40
|
+
function dot(col, after, { ascii, colour }) {
|
|
41
|
+
const yellow = colour && !ascii;
|
|
42
|
+
return { col, text: lit(yellow ? WAITING_DOT.utf8 : WAITING_DOT.ascii), style: yellow ? YELLOW : BOLD, width: 1, after };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The list's rows: `w` the model's `workspaces` (`lines` windowed, `more`, `moreWaiting`, `focused`,
|
|
46
|
+
* `cursor`), in `cols`; `+N` last when N workspaces are not shown, the dot one cell after it when
|
|
47
|
+
* an instance of one of them needs input. */
|
|
48
|
+
export function workspaceRows(w, cols, { ascii = false, colour = true } = {}) {
|
|
49
|
+
const rows = w.lines.map((line) => row(line, cols, { focused: w.focused, cursor: w.cursor, ascii, colour }));
|
|
50
|
+
if (w.more > 0) {
|
|
51
|
+
const width = String(w.more).length + 1;
|
|
52
|
+
rows.push([{ col: NAME, text: lit(`+${w.more}`), style: style({ dim: true }), width }, ...(w.moreWaiting ? [dot(NAME + width + 1, false, { ascii, colour })] : [])]);
|
|
53
|
+
}
|
|
54
|
+
return rows;
|
|
55
|
+
}
|