akemon 0.1.15 → 0.1.16
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/list.js +0 -10
- package/package.json +1 -1
package/dist/list.js
CHANGED
|
@@ -16,12 +16,6 @@ function spdStars(avgMs) {
|
|
|
16
16
|
return "★★☆☆☆";
|
|
17
17
|
return "★☆☆☆☆";
|
|
18
18
|
}
|
|
19
|
-
function ppDisplay(totalTasks, maxTasks) {
|
|
20
|
-
if (!maxTasks || maxTasks <= 0)
|
|
21
|
-
return "∞";
|
|
22
|
-
const remaining = Math.max(0, maxTasks - totalTasks);
|
|
23
|
-
return `${remaining}/${maxTasks}`;
|
|
24
|
-
}
|
|
25
19
|
export async function listAgents(relayUrl, search) {
|
|
26
20
|
const url = `${relayUrl}/v1/agents`;
|
|
27
21
|
try {
|
|
@@ -49,7 +43,6 @@ export async function listAgents(relayUrl, search) {
|
|
|
49
43
|
lvl: String(a.level),
|
|
50
44
|
spd: spdStars(a.avg_response_ms),
|
|
51
45
|
rel: stars(a.success_rate),
|
|
52
|
-
pp: ppDisplay(a.total_tasks, a.max_tasks),
|
|
53
46
|
desc: (a.description || "-") + (a.public ? "" : " 🔒"),
|
|
54
47
|
}));
|
|
55
48
|
// Dynamic column widths based on actual data
|
|
@@ -59,14 +52,12 @@ export async function listAgents(relayUrl, search) {
|
|
|
59
52
|
const lvlW = Math.max(3, ...rows.map((r) => r.lvl.length)) + 2;
|
|
60
53
|
const spdW = 7;
|
|
61
54
|
const relW = 7;
|
|
62
|
-
const ppW = Math.max(2, ...rows.map((r) => r.pp.length)) + 2;
|
|
63
55
|
console.log(pad("", avatarW) +
|
|
64
56
|
pad("NAME", nameW) +
|
|
65
57
|
pad("ENGINE", engineW) +
|
|
66
58
|
pad("LVL", lvlW) +
|
|
67
59
|
pad("SPD", spdW) +
|
|
68
60
|
pad("REL", relW) +
|
|
69
|
-
pad("PP", ppW) +
|
|
70
61
|
"DESCRIPTION");
|
|
71
62
|
for (const r of rows) {
|
|
72
63
|
console.log(pad(r.avatar, avatarW) +
|
|
@@ -75,7 +66,6 @@ export async function listAgents(relayUrl, search) {
|
|
|
75
66
|
pad(r.lvl, lvlW) +
|
|
76
67
|
pad(r.spd, spdW) +
|
|
77
68
|
pad(r.rel, relW) +
|
|
78
|
-
pad(r.pp, ppW) +
|
|
79
69
|
r.desc);
|
|
80
70
|
}
|
|
81
71
|
}
|