@elyun/bylane 1.19.0 → 1.20.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/package.json
CHANGED
|
@@ -18,6 +18,21 @@ const STATUS_ICON = {
|
|
|
18
18
|
escalated: '[!]'
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
const STATUS_COLOR = {
|
|
22
|
+
idle: '',
|
|
23
|
+
in_progress: '{yellow-fg}',
|
|
24
|
+
running: '{green-fg}',
|
|
25
|
+
completed: '{green-fg}',
|
|
26
|
+
stopped: '{grey-fg}',
|
|
27
|
+
failed: '{red-fg}',
|
|
28
|
+
escalated: '{red-fg}'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function colorize(text, status) {
|
|
32
|
+
const c = STATUS_COLOR[status] ?? ''
|
|
33
|
+
return c ? `${c}${text}{/}` : text
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
export function createPipelinePanel(screen) {
|
|
22
37
|
const box = blessed.box({
|
|
23
38
|
top: 3,
|
|
@@ -35,7 +50,7 @@ export function createPipelinePanel(screen) {
|
|
|
35
50
|
update(states, subagents = { active: [], recent: [] }) {
|
|
36
51
|
const lines = AGENTS.map(name => {
|
|
37
52
|
const s = states[name]
|
|
38
|
-
if (!s) return ` ${STATUS_ICON.idle} ${name.padEnd(16)}
|
|
53
|
+
if (!s) return ` {grey-fg}${STATUS_ICON.idle} ${name.padEnd(16)} 대기{/}`
|
|
39
54
|
const icon = STATUS_ICON[s.status] ?? STATUS_ICON.idle
|
|
40
55
|
const elapsed = s.startedAt
|
|
41
56
|
? `${Math.floor((Date.now() - new Date(s.startedAt)) / 1000)}s`
|
|
@@ -43,7 +58,7 @@ export function createPipelinePanel(screen) {
|
|
|
43
58
|
const bar = s.progress > 0
|
|
44
59
|
? `${'#'.repeat(Math.floor(s.progress / 10))}${'-'.repeat(10 - Math.floor(s.progress / 10))} ${s.progress}%`
|
|
45
60
|
: ''
|
|
46
|
-
return ` ${icon} ${name.padEnd(16)} ${elapsed.padEnd(6)} ${bar}`
|
|
61
|
+
return ` ${colorize(`${icon} ${name.padEnd(16)}`, s.status)} ${elapsed.padEnd(6)} ${bar}`
|
|
47
62
|
})
|
|
48
63
|
|
|
49
64
|
const retries = states['orchestrator']?.retries ?? 0
|
|
@@ -57,13 +72,13 @@ export function createPipelinePanel(screen) {
|
|
|
57
72
|
for (const name of allLoops) {
|
|
58
73
|
const s = states[name]
|
|
59
74
|
if (!s) {
|
|
60
|
-
lines.push(` [-] ${name.padEnd(16)}
|
|
75
|
+
lines.push(` {grey-fg}[-] ${name.padEnd(16)} 미실행{/}`)
|
|
61
76
|
} else {
|
|
62
77
|
const icon = STATUS_ICON[s.status] ?? '[-]'
|
|
63
78
|
const elapsed = s.startedAt
|
|
64
79
|
? `${Math.floor((Date.now() - new Date(s.startedAt)) / 1000)}s`
|
|
65
80
|
: ''
|
|
66
|
-
lines.push(` ${icon} ${name.padEnd(16)} ${elapsed}`)
|
|
81
|
+
lines.push(` ${colorize(`${icon} ${name.padEnd(16)}`, s.status)} ${elapsed}`)
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
84
|
|