agentk8 2.1.0 → 2.1.1
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.
|
@@ -12,6 +12,6 @@ const theme = {
|
|
|
12
12
|
export const Banner = ({ version }) => {
|
|
13
13
|
const termWidth = process.stdout.columns || 80;
|
|
14
14
|
const w = termWidth;
|
|
15
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: _jsx(Text, { color: theme.glow, children: '▁'.repeat(w) }) }), _jsxs(Box, { children: [_jsx(Text, { color: theme.border, children: ' ' }), _jsx(Text, { color: theme.dim, children: '◇' }), _jsx(Text, { color: theme.border, children: ' ─── ' }), _jsx(Text, { color: theme.highlight, bold: true, children: "AGENT" }), _jsx(Text, { color: theme.accent, bold: true, children: "-" }), _jsx(Text, { color: theme.highlight, bold: true, children: "K" }), _jsx(Text, { color: theme.border, children: ' ─── ' }), _jsx(Text, { color: theme.dim, children: '◇' }), _jsx(Text, { color: theme.border, children: ' ─ ' }), _jsx(Text, { color: theme.dim, italic: true, children:
|
|
15
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: _jsx(Text, { color: theme.glow, children: '▁'.repeat(w) }) }), _jsxs(Box, { children: [_jsx(Text, { color: theme.border, children: ' ' }), _jsx(Text, { color: theme.dim, children: '◇' }), _jsx(Text, { color: theme.border, children: ' ─── ' }), _jsx(Text, { color: theme.highlight, bold: true, children: "AGENT" }), _jsx(Text, { color: theme.accent, bold: true, children: "-" }), _jsx(Text, { color: theme.highlight, bold: true, children: "K" }), _jsx(Text, { color: theme.border, children: ' ─── ' }), _jsx(Text, { color: theme.dim, children: '◇' }), _jsx(Text, { color: theme.border, children: ' ─ ' }), _jsx(Text, { color: theme.dim, italic: true, children: w >= 80 ? 'Multi-Agent Intelligence System' : 'Multi-Agent System' }), _jsx(Text, { color: theme.border, children: ' ─'.repeat(Math.max(1, Math.floor((w - (w >= 80 ? 58 : 48)) / 2))) }), _jsxs(Text, { color: theme.dim, children: [" v", version] })] }), _jsx(Box, { children: _jsx(Text, { color: theme.border, children: '─'.repeat(w) }) })] }));
|
|
16
16
|
};
|
|
17
17
|
export default Banner;
|
|
@@ -14,6 +14,10 @@ export const StatusBar = ({ mode, tokens, startTime, isProcessing = false, }) =>
|
|
|
14
14
|
const [elapsed, setElapsed] = useState('0s');
|
|
15
15
|
const [spinnerFrame, setSpinnerFrame] = useState(0);
|
|
16
16
|
useEffect(() => {
|
|
17
|
+
if (!isProcessing) {
|
|
18
|
+
setElapsed('');
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
17
21
|
const interval = setInterval(() => {
|
|
18
22
|
const secs = Math.floor((Date.now() - startTime.getTime()) / 1000);
|
|
19
23
|
const mins = Math.floor(secs / 60);
|
|
@@ -21,7 +25,7 @@ export const StatusBar = ({ mode, tokens, startTime, isProcessing = false, }) =>
|
|
|
21
25
|
setElapsed(mins > 0 ? `${mins}m ${remainingSecs}s` : `${secs}s`);
|
|
22
26
|
}, 1000);
|
|
23
27
|
return () => clearInterval(interval);
|
|
24
|
-
}, [startTime]);
|
|
28
|
+
}, [startTime, isProcessing]);
|
|
25
29
|
useEffect(() => {
|
|
26
30
|
if (!isProcessing)
|
|
27
31
|
return;
|
|
@@ -39,6 +43,6 @@ export const StatusBar = ({ mode, tokens, startTime, isProcessing = false, }) =>
|
|
|
39
43
|
};
|
|
40
44
|
const modeLabel = mode === 'dev' ? 'DEV' : 'ML';
|
|
41
45
|
const termWidth = process.stdout.columns || 80;
|
|
42
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: theme.border, children: '─'.repeat(termWidth) }), _jsxs(Box, { justifyContent: "space-between", width: termWidth, children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.dim, children: ' ◇ ' }), _jsx(Text, { color: theme.accent, children: modeLabel }), _jsx(Text, { color: theme.border, children: ' │ ' }), _jsx(Text, { color: theme.dim, children: "/help" }), isProcessing && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: ' │ ' }), _jsx(Text, { color: theme.highlight, children: icons.spinner[spinnerFrame] })] }))] }), _jsxs(Box, { children: [_jsx(Text, { color: theme.dim, children: elapsed }), _jsx(Text, { color: theme.border, children: ' │ ' }), _jsxs(Text, { color: theme.accent, children: ["\u2191 ", formatTokens(tokens)] }), _jsx(Text, { color: theme.dim, children: ' tokens ' })] })] })] }));
|
|
46
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: theme.border, children: '─'.repeat(termWidth) }), _jsxs(Box, { justifyContent: "space-between", width: termWidth, children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.dim, children: ' ◇ ' }), _jsx(Text, { color: theme.accent, children: modeLabel }), _jsx(Text, { color: theme.border, children: ' │ ' }), _jsx(Text, { color: theme.dim, children: "/help" }), isProcessing && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: ' │ ' }), _jsx(Text, { color: theme.highlight, children: icons.spinner[spinnerFrame] })] }))] }), _jsxs(Box, { children: [elapsed && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.dim, children: elapsed }), _jsx(Text, { color: theme.border, children: ' │ ' })] })), _jsxs(Text, { color: theme.accent, children: ["\u2191 ", formatTokens(tokens)] }), _jsx(Text, { color: theme.dim, children: ' tokens ' })] })] })] }));
|
|
43
47
|
};
|
|
44
48
|
export default StatusBar;
|