agy-powerline 1.1.0 → 1.2.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/CHANGELOG.md +25 -0
- package/README.ja.md +148 -0
- package/README.md +6 -3
- package/README.zh-CN.md +148 -0
- package/package.json +11 -3
- package/src/cli/bundle.js +82 -0
- package/src/cli/configure.js +896 -65
- package/src/cli/init.js +24 -9
- package/src/cli/tui-style.js +154 -31
- package/src/lib/catalog.js +73 -4
- package/src/lib/config.js +6 -1
- package/src/lib/fit.js +2 -0
- package/src/lib/git.js +70 -2
- package/src/lib/layouts/lines.js +6 -0
- package/src/lib/layouts/pills.js +42 -0
- package/src/lib/log.js +24 -1
- package/src/lib/mock-data.js +6 -1
- package/src/lib/paths.js +6 -2
- package/src/lib/session.js +44 -8
- package/src/lib/widget-style.js +2 -0
package/src/cli/init.js
CHANGED
|
@@ -18,9 +18,8 @@ const {
|
|
|
18
18
|
cmdBreakingMessage,
|
|
19
19
|
} = require("../lib/paths");
|
|
20
20
|
const { createRl, confirm } = require("../lib/prompt");
|
|
21
|
+
const { buildRuntimeBundle } = require("./bundle");
|
|
21
22
|
|
|
22
|
-
const RUNTIME_DIR = path.join(__dirname, "..", "runtime");
|
|
23
|
-
const LIB_DIR = path.join(__dirname, "..", "lib");
|
|
24
23
|
const DIM = "\x1b[2m";
|
|
25
24
|
const BOLD = "\x1b[1m";
|
|
26
25
|
const CYAN = "\x1b[36m";
|
|
@@ -29,6 +28,27 @@ const YELLOW = "\x1b[33m";
|
|
|
29
28
|
const RED = "\x1b[31m";
|
|
30
29
|
const RESET = "\x1b[0m";
|
|
31
30
|
|
|
31
|
+
// Up to 1.1.0 the runtime was installed as separate files next to
|
|
32
|
+
// statusline.js. They are part of the one-file statusline.js now; delete the
|
|
33
|
+
// old copies by name (regular files only), then the emptied layouts folder.
|
|
34
|
+
function removeSeparateRuntimeFiles(installDir) {
|
|
35
|
+
for (const rel of RUNTIME_FILES) {
|
|
36
|
+
const file = path.join(installDir, rel);
|
|
37
|
+
try {
|
|
38
|
+
if (fs.lstatSync(file).isFile()) {
|
|
39
|
+
fs.unlinkSync(file);
|
|
40
|
+
}
|
|
41
|
+
} catch {
|
|
42
|
+
// Not there: nothing to remove.
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
fs.rmdirSync(path.join(installDir, "layouts"));
|
|
47
|
+
} catch {
|
|
48
|
+
// Missing, or holds something that isn't ours: leave it.
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
function assertUnixNode() {
|
|
33
53
|
if (!isWindowsNodeOnWsl()) {
|
|
34
54
|
return;
|
|
@@ -104,13 +124,8 @@ async function initCommand(options = {}) {
|
|
|
104
124
|
}
|
|
105
125
|
|
|
106
126
|
if (writeScripts) {
|
|
107
|
-
fs.
|
|
108
|
-
|
|
109
|
-
const src = path.join(LIB_DIR, rel);
|
|
110
|
-
const dest = path.join(installDir, rel);
|
|
111
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
112
|
-
fs.copyFileSync(src, dest);
|
|
113
|
-
}
|
|
127
|
+
fs.writeFileSync(destStatusline, buildRuntimeBundle(), "utf8");
|
|
128
|
+
removeSeparateRuntimeFiles(installDir);
|
|
114
129
|
|
|
115
130
|
if (process.platform !== "win32") {
|
|
116
131
|
try {
|
package/src/cli/tui-style.js
CHANGED
|
@@ -13,7 +13,8 @@ const BOX = {
|
|
|
13
13
|
|
|
14
14
|
const GLYPHS = {
|
|
15
15
|
fancy: {
|
|
16
|
-
|
|
16
|
+
// A Powerline arrow: one column wide in every Nerd Font, like the pill ends.
|
|
17
|
+
pointer: "\ue0b1",
|
|
17
18
|
on: "●",
|
|
18
19
|
off: "○",
|
|
19
20
|
ok: "✓",
|
|
@@ -43,12 +44,15 @@ const GLYPHS = {
|
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
const REVERSE = "\x1b[7m";
|
|
47
|
+
// Rounded pill ends, the same glyphs as the bar's default style.
|
|
48
|
+
const CAP_LEFT = "\ue0b6";
|
|
49
|
+
const CAP_RIGHT = "\ue0b4";
|
|
46
50
|
const strip = (text) =>
|
|
47
51
|
String(text)
|
|
48
52
|
.replace(/\x1b\[[0-9;]*m/g, "")
|
|
49
53
|
.replace(/\x1b\]8;;[^\x07]*\x07/g, "");
|
|
50
54
|
|
|
51
|
-
// width: the outer width of the panels, so
|
|
55
|
+
// width: the outer width of the panels, so the tabs know when to drop their keys.
|
|
52
56
|
function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
53
57
|
const plain = getActiveDepth() === "none";
|
|
54
58
|
const box = ascii ? BOX.ascii : BOX.round;
|
|
@@ -60,7 +64,6 @@ function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
|
60
64
|
// which many dark terminals draw almost invisible.
|
|
61
65
|
const mutedColor = colors.meta;
|
|
62
66
|
const borderColor = mix(colors.track, colors.meta, 0.4);
|
|
63
|
-
const inner = Math.max(10, width - 4);
|
|
64
67
|
|
|
65
68
|
function muted(text) {
|
|
66
69
|
return plain ? `${DIM}${text}${RESET}` : `${fg(mutedColor)}${text}${RESET}`;
|
|
@@ -77,8 +80,48 @@ function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
|
77
80
|
);
|
|
78
81
|
}
|
|
79
82
|
|
|
83
|
+
// Text on a filled, round-ended pill; ASCII mode keeps the fill and drops
|
|
84
|
+
// the round ends (spaces instead), and no-color mode uses reverse video.
|
|
85
|
+
function pill(text, fill = accent, ink = colors.text) {
|
|
86
|
+
if (plain) {
|
|
87
|
+
return `${REVERSE}${BOLD} ${text} ${RESET}`;
|
|
88
|
+
}
|
|
89
|
+
if (ascii) {
|
|
90
|
+
return `${bg(fill)}${fg(ink)}${BOLD} ${text} ${RESET}`;
|
|
91
|
+
}
|
|
92
|
+
return `${fg(fill)}${CAP_LEFT}${bg(fill)}${fg(ink)}${BOLD}${text}${RESET}${fg(fill)}${CAP_RIGHT}${RESET}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// A quiet label, like a keycap: preset names, the version.
|
|
96
|
+
function tag(text) {
|
|
97
|
+
return quiet(text);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// A pill in the theme's track gray with muted text, for tags and keycaps.
|
|
101
|
+
function quiet(text, weight = "") {
|
|
102
|
+
if (plain) {
|
|
103
|
+
return `[${text}]`;
|
|
104
|
+
}
|
|
105
|
+
const body = `${bg(colors.track)}${fg(mutedColor)}${weight}`;
|
|
106
|
+
if (ascii) {
|
|
107
|
+
return `${body} ${text} ${RESET}`;
|
|
108
|
+
}
|
|
109
|
+
return `${fg(colors.track)}${CAP_LEFT}${body}${text}${RESET}${fg(colors.track)}${CAP_RIGHT}${RESET}`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function accentText(text) {
|
|
113
|
+
return plain ? `${BOLD}${text}${RESET}` : `${fg(accent)}${BOLD}${text}${RESET}`;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// A small heading inside a panel.
|
|
117
|
+
function heading(text) {
|
|
118
|
+
return plain
|
|
119
|
+
? `${BOLD}${text.toUpperCase()}${RESET}`
|
|
120
|
+
: `${fg(mutedColor)}${BOLD}${text.toUpperCase()}${RESET}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
80
123
|
function keycap(key) {
|
|
81
|
-
return
|
|
124
|
+
return quiet(key, BOLD);
|
|
82
125
|
}
|
|
83
126
|
|
|
84
127
|
// Key hints as keycaps, wrapped to the width without splitting a hint.
|
|
@@ -101,24 +144,36 @@ function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
|
101
144
|
return lines.map((text) => ` ${text}`);
|
|
102
145
|
}
|
|
103
146
|
|
|
104
|
-
//
|
|
105
|
-
//
|
|
147
|
+
// left, then right ending at the panels' inner edge; null when they don't
|
|
148
|
+
// both fit with room between them.
|
|
149
|
+
function spread(left, right) {
|
|
150
|
+
const free = width - visibleWidth(left) - visibleWidth(right) - 1;
|
|
151
|
+
return free >= 3 ? left + " ".repeat(free) + right : null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// A thin line across the panels' width, in the border color.
|
|
155
|
+
function rule() {
|
|
156
|
+
const line = box.h.repeat(Math.max(0, width - 2));
|
|
157
|
+
return ` ${plain ? line : fg(borderColor) + line + RESET}`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Tabs for the main screens; the current one is a filled pill, and the
|
|
161
|
+
// navigation keys sit at the right end. On a narrow terminal the navigation
|
|
162
|
+
// keys go first, then the tabs' key letters.
|
|
106
163
|
function tabs(items, current) {
|
|
107
164
|
const draw = (withKeys) =>
|
|
108
165
|
" " +
|
|
109
166
|
items
|
|
110
167
|
.map(({ id, label, key }) => {
|
|
111
168
|
if (id === current) {
|
|
112
|
-
return
|
|
113
|
-
? `${REVERSE}${BOLD} ${label} ${RESET}`
|
|
114
|
-
: `${bg(accent)}${fg(colors.text)}${BOLD} ${label} ${RESET}`;
|
|
169
|
+
return pill(label);
|
|
115
170
|
}
|
|
116
|
-
return ` ${
|
|
171
|
+
return ` ${label}${withKeys && key ? ` ${muted(key)}` : ""} `;
|
|
117
172
|
})
|
|
118
|
-
.join(" ")
|
|
119
|
-
|
|
173
|
+
.join(" ");
|
|
174
|
+
const nav = muted(`${glyph.leftRight} navigate q quit`);
|
|
120
175
|
const full = draw(true);
|
|
121
|
-
return visibleWidth(full) <= width - 1 ? full : draw(false);
|
|
176
|
+
return spread(full, nav) ?? (visibleWidth(full) <= width - 1 ? full : draw(false));
|
|
122
177
|
}
|
|
123
178
|
|
|
124
179
|
// An on/off toggle; key, when given, follows the label like a tab's letter.
|
|
@@ -129,40 +184,71 @@ function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
|
129
184
|
}
|
|
130
185
|
|
|
131
186
|
// A rounded panel with its title in the top border. Content wider than the
|
|
132
|
-
// panel is cut with an ellipsis instead of wrapping.
|
|
133
|
-
|
|
187
|
+
// panel is cut with an ellipsis instead of wrapping. above and below sit at
|
|
188
|
+
// the right end of the top and bottom borders (a scrolled list's counts),
|
|
189
|
+
// so they cost no rows.
|
|
190
|
+
function panel(title, body, panelWidth = width, { above = "", below = "" } = {}) {
|
|
134
191
|
const space = Math.max(10, panelWidth - 4);
|
|
135
192
|
const border = (text) => (plain ? text : fg(borderColor) + text + RESET);
|
|
136
|
-
const
|
|
193
|
+
const edge = (text) => (text ? ` ${muted(text)} ${border(box.h)}` : "");
|
|
194
|
+
// A title too long for the border is cut, like the rows.
|
|
195
|
+
const room = Math.max(1, panelWidth - 5 - visibleWidth(edge(above)));
|
|
196
|
+
const label = title ? ` ${truncateLines(title, room, ascii)} ` : "";
|
|
197
|
+
const ink = plain ? "" : fg(accent);
|
|
137
198
|
const top =
|
|
138
199
|
border(box.tl + box.h) +
|
|
139
200
|
BOLD +
|
|
201
|
+
ink +
|
|
140
202
|
label +
|
|
141
203
|
RESET +
|
|
142
|
-
border(
|
|
204
|
+
border(
|
|
205
|
+
box.h.repeat(Math.max(0, panelWidth - 3 - visibleWidth(label) - visibleWidth(edge(above))))
|
|
206
|
+
) +
|
|
207
|
+
edge(above) +
|
|
208
|
+
border(box.tr);
|
|
143
209
|
const rows = body.map((line) => {
|
|
144
210
|
const clipped = truncateLines(line, space, ascii);
|
|
145
211
|
const pad = " ".repeat(Math.max(0, space - visibleWidth(clipped)));
|
|
146
212
|
return border(box.v) + " " + clipped + RESET + pad + " " + border(box.v);
|
|
147
213
|
});
|
|
148
|
-
const bottom =
|
|
214
|
+
const bottom =
|
|
215
|
+
border(box.bl + box.h.repeat(Math.max(0, panelWidth - 2 - visibleWidth(edge(below))))) +
|
|
216
|
+
edge(below) +
|
|
217
|
+
border(box.br);
|
|
149
218
|
return [top, ...rows, bottom];
|
|
150
219
|
}
|
|
151
220
|
|
|
152
|
-
// One list row
|
|
153
|
-
//
|
|
154
|
-
|
|
221
|
+
// One list row: pointer, number, lead (an icon or swatch), the label and
|
|
222
|
+
// its extra. The selected row's label is an accent pill and its pointer and
|
|
223
|
+
// number light up; other labels sit where the pill's ends would be, so the
|
|
224
|
+
// columns stay put. pad lines up the extras of a list in one column.
|
|
225
|
+
// badge (e.g. "current") follows the label outside the pill, so it keeps
|
|
226
|
+
// its own color.
|
|
227
|
+
function row(selected, text, extra = "", number = null, { pad = 0, lead = "", badge = "" } = {}) {
|
|
155
228
|
const index = number === null ? "" : `${String(number).padStart(2)} `;
|
|
229
|
+
const front = lead ? `${lead} ` : "";
|
|
230
|
+
const after = badge ? ` ${badge}` : "";
|
|
231
|
+
const width = visibleWidth(text) + visibleWidth(after);
|
|
232
|
+
const gap = extra ? " ".repeat(Math.max(3, pad - width + 3)) : "";
|
|
156
233
|
if (selected) {
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
return
|
|
161
|
-
? `${REVERSE}${BOLD}${padded}${RESET}`
|
|
162
|
-
: `${bg(accent)}${fg(colors.text)}${BOLD}${padded}${RESET}`;
|
|
234
|
+
const point = plain ? glyph.pointer : `${fg(accent)}${BOLD}${glyph.pointer}${RESET}`;
|
|
235
|
+
const lit = plain ? index : `${fg(accent)}${BOLD}${index}${RESET}`;
|
|
236
|
+
const note = extra ? `${gap}${BOLD}${extra}${RESET}` : "";
|
|
237
|
+
return `${point} ${lit}${front}${pill(strip(text))}${after}${note}`;
|
|
163
238
|
}
|
|
164
|
-
const note = extra ?
|
|
165
|
-
return ` ${index ? muted(index) : ""}${text}${note}`;
|
|
239
|
+
const note = extra ? `${gap}${muted(extra)}` : "";
|
|
240
|
+
return ` ${index ? muted(index) : ""}${front} ${text} ${after}${note}`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Two panels next to each other, one space apart; the shorter one is
|
|
244
|
+
// padded with blank lines of its width.
|
|
245
|
+
function beside(left, right) {
|
|
246
|
+
const height = Math.max(left.length, right.length);
|
|
247
|
+
const blank = (lines) => " ".repeat(lines.length ? visibleWidth(lines[0]) : 0);
|
|
248
|
+
return Array.from(
|
|
249
|
+
{ length: height },
|
|
250
|
+
(_, i) => `${left[i] ?? blank(left)} ${right[i] ?? blank(right)}`
|
|
251
|
+
);
|
|
166
252
|
}
|
|
167
253
|
|
|
168
254
|
// Messages starting with ⚠ are warnings; everything else is a success.
|
|
@@ -177,7 +263,44 @@ function makeUi(colors, { ascii = false, width = 100 } = {}) {
|
|
|
177
263
|
return plain ? `${BOLD}${mark} ${text}${RESET}` : `${fg(color)}${BOLD}${mark} ${text}${RESET}`;
|
|
178
264
|
}
|
|
179
265
|
|
|
180
|
-
return {
|
|
266
|
+
return {
|
|
267
|
+
glyph,
|
|
268
|
+
muted,
|
|
269
|
+
wordmark,
|
|
270
|
+
pill,
|
|
271
|
+
tag,
|
|
272
|
+
heading,
|
|
273
|
+
accentText,
|
|
274
|
+
spread,
|
|
275
|
+
rule,
|
|
276
|
+
keycap,
|
|
277
|
+
hints,
|
|
278
|
+
tabs,
|
|
279
|
+
chip,
|
|
280
|
+
panel,
|
|
281
|
+
row,
|
|
282
|
+
beside,
|
|
283
|
+
toast,
|
|
284
|
+
accent,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Word wrap for plain text; a word longer than the width gets a line of its
|
|
289
|
+
// own and the panel cuts it.
|
|
290
|
+
function wrapText(text, lineWidth) {
|
|
291
|
+
const lines = [];
|
|
292
|
+
let line = "";
|
|
293
|
+
for (const word of String(text).split(" ")) {
|
|
294
|
+
const next = line ? `${line} ${word}` : word;
|
|
295
|
+
if (line && visibleWidth(next) > lineWidth) {
|
|
296
|
+
lines.push(line);
|
|
297
|
+
line = word;
|
|
298
|
+
} else {
|
|
299
|
+
line = next;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
lines.push(line);
|
|
303
|
+
return lines;
|
|
181
304
|
}
|
|
182
305
|
|
|
183
|
-
module.exports = { makeUi };
|
|
306
|
+
module.exports = { makeUi, wrapText };
|
package/src/lib/catalog.js
CHANGED
|
@@ -1,183 +1,252 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
// description: one sentence, shown in the configure details panel.
|
|
4
|
+
// summary: six words at most, shown next to the label in configure's lists.
|
|
3
5
|
const WIDGET_CATALOG = [
|
|
4
|
-
{
|
|
6
|
+
{
|
|
7
|
+
id: "model",
|
|
8
|
+
label: "Model",
|
|
9
|
+
unique: true,
|
|
10
|
+
description: "the model in use",
|
|
11
|
+
summary: "the model in use",
|
|
12
|
+
},
|
|
5
13
|
{
|
|
6
14
|
id: "quota",
|
|
7
15
|
label: "Tightest Quota",
|
|
8
16
|
unique: true,
|
|
9
17
|
description: "the quota bucket closest to running out, with its reset",
|
|
18
|
+
summary: "quota closest to running out",
|
|
10
19
|
},
|
|
11
20
|
{
|
|
12
21
|
id: "fiveHourBar",
|
|
13
22
|
label: "5h Remaining Bar",
|
|
14
23
|
unique: true,
|
|
15
24
|
description: "5-hour quota left, as a meter",
|
|
25
|
+
summary: "5-hour quota left, as a meter",
|
|
16
26
|
},
|
|
17
27
|
{
|
|
18
28
|
id: "fiveHourPct",
|
|
19
29
|
label: "5h Remaining %",
|
|
20
30
|
unique: true,
|
|
21
31
|
description: "5-hour quota left, as a percentage",
|
|
32
|
+
summary: "5-hour quota left, in percent",
|
|
22
33
|
},
|
|
23
34
|
{
|
|
24
35
|
id: "fiveHourReset",
|
|
25
36
|
label: "5h Reset Timer",
|
|
26
37
|
unique: true,
|
|
27
38
|
description: "time until the 5-hour quota resets",
|
|
39
|
+
summary: "when the 5-hour quota resets",
|
|
28
40
|
},
|
|
29
41
|
{
|
|
30
42
|
id: "weeklyBar",
|
|
31
43
|
label: "7d Remaining Bar",
|
|
32
44
|
unique: true,
|
|
33
45
|
description: "7-day quota left, as a meter",
|
|
46
|
+
summary: "7-day quota left, as a meter",
|
|
34
47
|
},
|
|
35
48
|
{
|
|
36
49
|
id: "weeklyPct",
|
|
37
50
|
label: "7d Remaining %",
|
|
38
51
|
unique: true,
|
|
39
52
|
description: "7-day quota left, as a percentage",
|
|
53
|
+
summary: "7-day quota left, in percent",
|
|
40
54
|
},
|
|
41
55
|
{
|
|
42
56
|
id: "weeklyReset",
|
|
43
57
|
label: "7d Reset Timer",
|
|
44
58
|
unique: true,
|
|
45
59
|
description: "time until the 7-day quota resets",
|
|
60
|
+
summary: "when the 7-day quota resets",
|
|
46
61
|
},
|
|
47
62
|
{
|
|
48
63
|
id: "thirdPartyFiveHour",
|
|
49
64
|
label: "3P 5h Remaining",
|
|
50
65
|
unique: true,
|
|
51
66
|
description: "third-party 5-hour quota left, hidden when off",
|
|
67
|
+
summary: "third-party 5-hour quota left",
|
|
52
68
|
},
|
|
53
69
|
{
|
|
54
70
|
id: "thirdPartyWeekly",
|
|
55
71
|
label: "3P 7d Remaining",
|
|
56
72
|
unique: true,
|
|
57
73
|
description: "third-party 7-day quota left",
|
|
74
|
+
summary: "third-party 7-day quota left",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "argonWeekly",
|
|
78
|
+
label: "Argon 7d Remaining",
|
|
79
|
+
unique: true,
|
|
80
|
+
description: "Gemini 4 Argon's own 7-day quota left (Google AI Pro), hidden when not sent",
|
|
81
|
+
summary: "Argon 7-day quota left",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "argonReset",
|
|
85
|
+
label: "Argon Reset Timer",
|
|
86
|
+
unique: true,
|
|
87
|
+
description: "time until Gemini 4 Argon's 7-day quota resets, hidden when not sent",
|
|
88
|
+
summary: "when the Argon quota resets",
|
|
58
89
|
},
|
|
59
90
|
{
|
|
60
91
|
id: "context",
|
|
61
92
|
label: "Context Bar",
|
|
62
93
|
unique: true,
|
|
63
94
|
description: "context window used, as a meter with tokens and %",
|
|
95
|
+
summary: "context window used, as a meter",
|
|
64
96
|
},
|
|
65
97
|
{
|
|
66
98
|
id: "contextPct",
|
|
67
99
|
label: "Context %",
|
|
68
100
|
unique: true,
|
|
69
101
|
description: "context window used, as a percentage",
|
|
102
|
+
summary: "context window used, in percent",
|
|
70
103
|
},
|
|
71
104
|
{
|
|
72
105
|
id: "contextTokens",
|
|
73
106
|
label: "Context Tokens",
|
|
74
107
|
unique: true,
|
|
75
108
|
description: "context tokens used out of the window size",
|
|
109
|
+
summary: "context tokens out of window size",
|
|
76
110
|
},
|
|
77
111
|
{
|
|
78
112
|
id: "cwd",
|
|
79
113
|
label: "Working Directory",
|
|
80
114
|
unique: true,
|
|
81
115
|
description: "current folder, with ~ for home",
|
|
116
|
+
summary: "current working folder",
|
|
82
117
|
},
|
|
83
118
|
{
|
|
84
119
|
id: "project",
|
|
85
120
|
label: "Project Directory",
|
|
86
121
|
unique: true,
|
|
87
122
|
description: "name of the project folder",
|
|
123
|
+
summary: "project folder name",
|
|
88
124
|
},
|
|
89
125
|
{
|
|
90
126
|
id: "git",
|
|
91
127
|
label: "VCS Branch",
|
|
92
128
|
unique: true,
|
|
93
129
|
description: "current branch, marked when there are uncommitted changes",
|
|
130
|
+
summary: "branch and uncommitted changes",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "plan",
|
|
134
|
+
label: "Plan Tier",
|
|
135
|
+
unique: true,
|
|
136
|
+
description: "your Antigravity plan",
|
|
137
|
+
summary: "your Antigravity plan",
|
|
94
138
|
},
|
|
95
|
-
{ id: "plan", label: "Plan Tier", unique: true, description: "your Antigravity plan" },
|
|
96
139
|
{
|
|
97
140
|
id: "agentState",
|
|
98
141
|
label: "Agent State",
|
|
99
142
|
unique: true,
|
|
100
143
|
description: "what the agent is doing, such as idle or thinking",
|
|
144
|
+
summary: "what the agent is doing",
|
|
101
145
|
},
|
|
102
146
|
{
|
|
103
147
|
id: "artifacts",
|
|
104
148
|
label: "Artifacts",
|
|
105
149
|
unique: true,
|
|
106
150
|
description: "number of artifacts",
|
|
151
|
+
summary: "number of artifacts",
|
|
107
152
|
},
|
|
108
153
|
{
|
|
109
154
|
id: "tasks",
|
|
110
155
|
label: "Subagents & Tasks",
|
|
111
156
|
unique: true,
|
|
112
157
|
description: "running subagents and background tasks, shown only when there are some",
|
|
158
|
+
summary: "running subagents and background tasks",
|
|
113
159
|
},
|
|
114
160
|
{
|
|
115
161
|
id: "mode",
|
|
116
162
|
label: "Mode",
|
|
117
163
|
unique: true,
|
|
118
164
|
description: "approval mode (e.g. accept-edits) and Vim mode, shown only when one is on",
|
|
165
|
+
summary: "approval mode and Vim mode",
|
|
119
166
|
},
|
|
120
167
|
{
|
|
121
168
|
id: "title",
|
|
122
169
|
label: "Conversation Title",
|
|
123
170
|
unique: true,
|
|
124
171
|
description: "name of the current conversation, shown once it has one",
|
|
172
|
+
summary: "current conversation title",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "ram",
|
|
176
|
+
label: "RAM Usage",
|
|
177
|
+
unique: true,
|
|
178
|
+
description: "memory used on this machine",
|
|
179
|
+
summary: "memory used on this machine",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: "version",
|
|
183
|
+
label: "CLI Version",
|
|
184
|
+
unique: true,
|
|
185
|
+
description: "Antigravity CLI version",
|
|
186
|
+
summary: "Antigravity CLI version",
|
|
125
187
|
},
|
|
126
|
-
{ id: "ram", label: "RAM Usage", unique: true, description: "memory used on this machine" },
|
|
127
|
-
{ id: "version", label: "CLI Version", unique: true, description: "Antigravity CLI version" },
|
|
128
188
|
{
|
|
129
189
|
id: "sandbox",
|
|
130
190
|
label: "Sandbox",
|
|
131
191
|
unique: true,
|
|
132
192
|
description: "sandbox and network access, shown only when on",
|
|
193
|
+
summary: "sandbox and network access",
|
|
133
194
|
},
|
|
134
195
|
{
|
|
135
196
|
id: "cacheRead",
|
|
136
197
|
label: "Cache Read",
|
|
137
198
|
unique: true,
|
|
138
199
|
description: "input tokens read from the cache",
|
|
200
|
+
summary: "input tokens read from cache",
|
|
139
201
|
},
|
|
140
202
|
{
|
|
141
203
|
id: "cacheCreate",
|
|
142
204
|
label: "Cache Create",
|
|
143
205
|
unique: true,
|
|
144
206
|
description: "input tokens written to the cache",
|
|
207
|
+
summary: "input tokens written to cache",
|
|
145
208
|
},
|
|
146
209
|
{
|
|
147
210
|
id: "cacheHit",
|
|
148
211
|
label: "Cache Hit %",
|
|
149
212
|
unique: true,
|
|
150
213
|
description: "share of input tokens served from the cache",
|
|
214
|
+
summary: "share of input from cache",
|
|
151
215
|
},
|
|
152
216
|
{
|
|
153
217
|
id: "totalTokens",
|
|
154
218
|
label: "Total Tokens",
|
|
155
219
|
unique: true,
|
|
156
220
|
description: "session tokens, as a total or split into input and output",
|
|
221
|
+
summary: "session tokens, total or split",
|
|
157
222
|
},
|
|
158
223
|
{
|
|
159
224
|
id: "exec",
|
|
160
225
|
label: "Shell Command",
|
|
161
226
|
unique: false,
|
|
162
227
|
description: "runs a shell command on every refresh (global config only)",
|
|
228
|
+
summary: "output of a shell command",
|
|
163
229
|
},
|
|
164
230
|
{
|
|
165
231
|
id: "customText",
|
|
166
232
|
label: "Custom Badge",
|
|
167
233
|
unique: false,
|
|
168
234
|
description: "a fixed text of your choice",
|
|
235
|
+
summary: "a fixed text of your choice",
|
|
169
236
|
},
|
|
170
237
|
{
|
|
171
238
|
id: "separator",
|
|
172
239
|
label: "Flex Separator",
|
|
173
240
|
unique: false,
|
|
174
241
|
description: "expands to fill available terminal width",
|
|
242
|
+
summary: "pushes later widgets to the right",
|
|
175
243
|
},
|
|
176
244
|
{
|
|
177
245
|
id: "lineBreak",
|
|
178
246
|
label: "New Line",
|
|
179
247
|
unique: false,
|
|
180
248
|
description: "starts the next widgets on a new row",
|
|
249
|
+
summary: "starts a new row",
|
|
181
250
|
},
|
|
182
251
|
];
|
|
183
252
|
|
package/src/lib/config.js
CHANGED
|
@@ -31,6 +31,8 @@ const VALID_WIDGET_IDS = new Set([
|
|
|
31
31
|
"weeklyBar",
|
|
32
32
|
"thirdPartyFiveHour",
|
|
33
33
|
"thirdPartyWeekly",
|
|
34
|
+
"argonWeekly",
|
|
35
|
+
"argonReset",
|
|
34
36
|
"context",
|
|
35
37
|
"contextPct",
|
|
36
38
|
"contextTokens",
|
|
@@ -280,7 +282,7 @@ const PRESETS = {
|
|
|
280
282
|
limits: {
|
|
281
283
|
id: "limits",
|
|
282
284
|
name: "Heavy usage",
|
|
283
|
-
description: "5h, 7d
|
|
285
|
+
description: "5h, 7d, third-party and Argon quotas with resets, one quota per row",
|
|
284
286
|
widgets: [
|
|
285
287
|
{ id: "fiveHourBar" },
|
|
286
288
|
{ id: "fiveHourReset" },
|
|
@@ -290,6 +292,9 @@ const PRESETS = {
|
|
|
290
292
|
{ id: "lineBreak" },
|
|
291
293
|
{ id: "thirdPartyFiveHour" },
|
|
292
294
|
{ id: "thirdPartyWeekly" },
|
|
295
|
+
{ id: "lineBreak" },
|
|
296
|
+
{ id: "argonWeekly" },
|
|
297
|
+
{ id: "argonReset" },
|
|
293
298
|
],
|
|
294
299
|
},
|
|
295
300
|
full: {
|