@ranker/raxflow 2.0.5 → 2.1.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/dist/hub/components/ChatInput.d.ts +14 -0
- package/dist/hub/components/ChatInput.d.ts.map +1 -0
- package/dist/hub/components/ChatInput.js +14 -0
- package/dist/hub/components/ChatInput.js.map +1 -0
- package/dist/hub/components/ChatMessage.d.ts +14 -0
- package/dist/hub/components/ChatMessage.d.ts.map +1 -0
- package/dist/hub/components/ChatMessage.js +23 -0
- package/dist/hub/components/ChatMessage.js.map +1 -0
- package/dist/hub/components/HubHeader.d.ts +12 -0
- package/dist/hub/components/HubHeader.d.ts.map +1 -0
- package/dist/hub/components/HubHeader.js +12 -0
- package/dist/hub/components/HubHeader.js.map +1 -0
- package/dist/hub/components/index.d.ts +7 -0
- package/dist/hub/components/index.d.ts.map +1 -0
- package/dist/hub/components/index.js +7 -0
- package/dist/hub/components/index.js.map +1 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +5 -5
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/ChatPanel.d.ts +1 -1
- package/dist/tui/components/ChatPanel.d.ts.map +1 -1
- package/dist/tui/components/ChatPanel.js +37 -26
- package/dist/tui/components/ChatPanel.js.map +1 -1
- package/dist/tui/components/DAGPanel.d.ts +3 -4
- package/dist/tui/components/DAGPanel.d.ts.map +1 -1
- package/dist/tui/components/DAGPanel.js +44 -36
- package/dist/tui/components/DAGPanel.js.map +1 -1
- package/dist/tui/components/Header.d.ts.map +1 -1
- package/dist/tui/components/Header.js +54 -36
- package/dist/tui/components/Header.js.map +1 -1
- package/dist/tui/components/HelpOverlay.d.ts.map +1 -1
- package/dist/tui/components/HelpOverlay.js +7 -5
- package/dist/tui/components/HelpOverlay.js.map +1 -1
- package/dist/tui/components/InputBar.d.ts.map +1 -1
- package/dist/tui/components/InputBar.js +25 -13
- package/dist/tui/components/InputBar.js.map +1 -1
- package/dist/tui/components/LogsPanel.d.ts.map +1 -1
- package/dist/tui/components/LogsPanel.js +23 -17
- package/dist/tui/components/LogsPanel.js.map +1 -1
- package/dist/tui/components/MemoryPanel.d.ts +1 -1
- package/dist/tui/components/MemoryPanel.d.ts.map +1 -1
- package/dist/tui/components/MemoryPanel.js +24 -31
- package/dist/tui/components/MemoryPanel.js.map +1 -1
- package/dist/tui/components/MetricsPanel.d.ts +1 -1
- package/dist/tui/components/MetricsPanel.d.ts.map +1 -1
- package/dist/tui/components/MetricsPanel.js +10 -13
- package/dist/tui/components/MetricsPanel.js.map +1 -1
- package/dist/tui/components/SelectMenu.d.ts +20 -0
- package/dist/tui/components/SelectMenu.d.ts.map +1 -0
- package/dist/tui/components/SelectMenu.js +19 -0
- package/dist/tui/components/SelectMenu.js.map +1 -0
- package/dist/tui/components/StatusPanel.d.ts +1 -1
- package/dist/tui/components/StatusPanel.d.ts.map +1 -1
- package/dist/tui/components/StatusPanel.js +26 -18
- package/dist/tui/components/StatusPanel.js.map +1 -1
- package/dist/tui/components/animations/ProgressBar.d.ts +8 -1
- package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -1
- package/dist/tui/components/animations/ProgressBar.js +52 -26
- package/dist/tui/components/animations/ProgressBar.js.map +1 -1
- package/dist/tui/components/animations/Pulse.d.ts +11 -3
- package/dist/tui/components/animations/Pulse.d.ts.map +1 -1
- package/dist/tui/components/animations/Pulse.js +23 -14
- package/dist/tui/components/animations/Pulse.js.map +1 -1
- package/dist/tui/components/animations/Spinner.d.ts +2 -1
- package/dist/tui/components/animations/Spinner.d.ts.map +1 -1
- package/dist/tui/components/animations/Spinner.js +31 -16
- package/dist/tui/components/animations/Spinner.js.map +1 -1
- package/dist/tui/components/animations/StatusAnimator.d.ts +3 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -1
- package/dist/tui/components/animations/StatusAnimator.js +43 -28
- package/dist/tui/components/animations/StatusAnimator.js.map +1 -1
- package/dist/tui/components/animations/TypingEffect.d.ts +1 -0
- package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -1
- package/dist/tui/components/animations/TypingEffect.js +13 -7
- package/dist/tui/components/animations/TypingEffect.js.map +1 -1
- package/dist/tui/components/animations/index.d.ts +3 -2
- package/dist/tui/components/animations/index.d.ts.map +1 -1
- package/dist/tui/components/animations/index.js +2 -2
- package/dist/tui/components/animations/index.js.map +1 -1
- package/dist/tui/components/composed/Button.d.ts +18 -0
- package/dist/tui/components/composed/Button.d.ts.map +1 -0
- package/dist/tui/components/composed/Button.js +22 -0
- package/dist/tui/components/composed/Button.js.map +1 -0
- package/dist/tui/components/composed/Divider.d.ts +13 -0
- package/dist/tui/components/composed/Divider.d.ts.map +1 -0
- package/dist/tui/components/composed/Divider.js +18 -0
- package/dist/tui/components/composed/Divider.js.map +1 -0
- package/dist/tui/components/composed/StatusBadge.d.ts +14 -0
- package/dist/tui/components/composed/StatusBadge.d.ts.map +1 -0
- package/dist/tui/components/composed/StatusBadge.js +28 -0
- package/dist/tui/components/composed/StatusBadge.js.map +1 -0
- package/dist/tui/components/composed/index.d.ts +7 -0
- package/dist/tui/components/composed/index.d.ts.map +1 -0
- package/dist/tui/components/composed/index.js +7 -0
- package/dist/tui/components/composed/index.js.map +1 -0
- package/dist/tui/components/layouts/Container.d.ts +14 -0
- package/dist/tui/components/layouts/Container.d.ts.map +1 -0
- package/dist/tui/components/layouts/Container.js +10 -0
- package/dist/tui/components/layouts/Container.js.map +1 -0
- package/dist/tui/components/layouts/Grid.d.ts +14 -0
- package/dist/tui/components/layouts/Grid.d.ts.map +1 -0
- package/dist/tui/components/layouts/Grid.js +13 -0
- package/dist/tui/components/layouts/Grid.js.map +1 -0
- package/dist/tui/components/layouts/Stack.d.ts +32 -0
- package/dist/tui/components/layouts/Stack.d.ts.map +1 -0
- package/dist/tui/components/layouts/Stack.js +17 -0
- package/dist/tui/components/layouts/Stack.js.map +1 -0
- package/dist/tui/components/layouts/index.d.ts +7 -0
- package/dist/tui/components/layouts/index.d.ts.map +1 -0
- package/dist/tui/components/layouts/index.js +7 -0
- package/dist/tui/components/layouts/index.js.map +1 -0
- package/dist/tui/components/primitives/Box.d.ts +28 -0
- package/dist/tui/components/primitives/Box.d.ts.map +1 -0
- package/dist/tui/components/primitives/Box.js +38 -0
- package/dist/tui/components/primitives/Box.js.map +1 -0
- package/dist/tui/components/primitives/Panel.d.ts +17 -0
- package/dist/tui/components/primitives/Panel.d.ts.map +1 -0
- package/dist/tui/components/primitives/Panel.js +12 -0
- package/dist/tui/components/primitives/Panel.js.map +1 -0
- package/dist/tui/components/primitives/Text.d.ts +18 -0
- package/dist/tui/components/primitives/Text.d.ts.map +1 -0
- package/dist/tui/components/primitives/Text.js +21 -0
- package/dist/tui/components/primitives/Text.js.map +1 -0
- package/dist/tui/components/primitives/index.d.ts +7 -0
- package/dist/tui/components/primitives/index.d.ts.map +1 -0
- package/dist/tui/components/primitives/index.js +7 -0
- package/dist/tui/components/primitives/index.js.map +1 -0
- package/dist/tui/hooks/useTerminalSize.d.ts +3 -0
- package/dist/tui/hooks/useTerminalSize.d.ts.map +1 -1
- package/dist/tui/hooks/useTerminalSize.js +36 -10
- package/dist/tui/hooks/useTerminalSize.js.map +1 -1
- package/dist/tui/styles/colors.d.ts +4 -0
- package/dist/tui/styles/colors.d.ts.map +1 -1
- package/dist/tui/styles/colors.js +54 -14
- package/dist/tui/styles/colors.js.map +1 -1
- package/dist/tui/styles/design-system.d.ts +107 -0
- package/dist/tui/styles/design-system.d.ts.map +1 -0
- package/dist/tui/styles/design-system.js +140 -0
- package/dist/tui/styles/design-system.js.map +1 -0
- package/dist/tui/styles/index.d.ts +4 -2
- package/dist/tui/styles/index.d.ts.map +1 -1
- package/dist/tui/styles/index.js +3 -2
- package/dist/tui/styles/index.js.map +1 -1
- package/dist/tui/styles/themes.d.ts +10 -0
- package/dist/tui/styles/themes.d.ts.map +1 -1
- package/dist/tui/styles/themes.js +137 -47
- package/dist/tui/styles/themes.js.map +1 -1
- package/dist/tui/styles/tokens.d.ts +262 -0
- package/dist/tui/styles/tokens.d.ts.map +1 -0
- package/dist/tui/styles/tokens.js +230 -0
- package/dist/tui/styles/tokens.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/tui/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/tui/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAY,MAAM,qBAAqB,CAAC;AAG1D,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,SAAS,CAAC;CAClB;AAeD,eAAO,MAAM,MAAM,yCA8IjB,CAAC"}
|
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import { getStatusIndicator, getProviderTag } from "../styles/index.js";
|
|
5
4
|
import { StatusPulse } from "./animations/index.js";
|
|
6
5
|
import { getTheme } from "../styles/colors.js";
|
|
7
|
-
const
|
|
8
|
-
chat: "CHAT",
|
|
9
|
-
dag: "DAG",
|
|
10
|
-
status: "STATUS",
|
|
11
|
-
logs: "LOGS",
|
|
12
|
-
metrics: "METRICS",
|
|
13
|
-
memory: "MEMORY",
|
|
6
|
+
const PANEL_CONFIG = {
|
|
7
|
+
chat: { label: "CHAT", key: "1" },
|
|
8
|
+
dag: { label: "DAG", key: "2" },
|
|
9
|
+
status: { label: "STATUS", key: "3" },
|
|
10
|
+
logs: { label: "LOGS", key: "4" },
|
|
11
|
+
metrics: { label: "METRICS", key: "5" },
|
|
12
|
+
memory: { label: "MEMORY", key: "6" },
|
|
14
13
|
};
|
|
15
|
-
const
|
|
14
|
+
const FULL_PANELS = ["chat", "dag", "logs", "metrics", "memory"];
|
|
16
15
|
const COMPACT_PANELS = ["chat", "dag", "status"];
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
const MINIMAL_PANELS = ["chat", "dag"];
|
|
17
|
+
export const Header = memo(function Header({ projectName, agentCount, provider, model, status, tick, activePanel, layoutMode, theme: themeName, }) {
|
|
18
|
+
const theme = getTheme(themeName);
|
|
19
|
+
const statusConfig = useMemo(() => {
|
|
20
|
+
switch (status) {
|
|
21
|
+
case "ready":
|
|
22
|
+
return { label: "READY", color: theme.colors.success, pulse: "online" };
|
|
23
|
+
case "running":
|
|
24
|
+
return { label: "RUNNING", color: theme.colors.warning, pulse: "running" };
|
|
25
|
+
case "error":
|
|
26
|
+
return { label: "ERROR", color: theme.colors.error, pulse: "error" };
|
|
27
|
+
default:
|
|
28
|
+
return { label: "IDLE", color: theme.colors.textTertiary, pulse: "offline" };
|
|
29
|
+
}
|
|
30
|
+
}, [status, theme]);
|
|
31
|
+
const panels = useMemo(() => {
|
|
32
|
+
switch (layoutMode) {
|
|
33
|
+
case "full":
|
|
34
|
+
return FULL_PANELS;
|
|
35
|
+
case "compact":
|
|
36
|
+
return COMPACT_PANELS;
|
|
37
|
+
case "minimal":
|
|
38
|
+
return MINIMAL_PANELS;
|
|
39
|
+
default:
|
|
40
|
+
return COMPACT_PANELS;
|
|
41
|
+
}
|
|
42
|
+
}, [layoutMode]);
|
|
43
|
+
const modelDisplay = useMemo(() => {
|
|
44
|
+
const maxLength = layoutMode === "minimal" ? 8 : 14;
|
|
45
|
+
return model.length > maxLength ? model.slice(0, maxLength) + "…" : model;
|
|
46
|
+
}, [model, layoutMode]);
|
|
47
|
+
const projectDisplay = useMemo(() => {
|
|
48
|
+
const maxLength = layoutMode === "minimal" ? 8 : 16;
|
|
49
|
+
return projectName.length > maxLength ? projectName.slice(0, maxLength) + "…" : projectName;
|
|
50
|
+
}, [projectName, layoutMode]);
|
|
41
51
|
if (layoutMode === "minimal") {
|
|
42
|
-
return (_jsxs(Box, { flexDirection: "row", width: "100%", justifyContent: "space-between", paddingX: 1, children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(Text, { color:
|
|
52
|
+
return (_jsxs(Box, { flexDirection: "row", width: "100%", justifyContent: "space-between", paddingX: 1, borderStyle: "single", borderColor: theme.colors.border, children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 1, children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: "\u25C6" }), _jsx(Text, { color: theme.colors.textPrimary, bold: true, children: "RAX" }), _jsx(Text, { color: theme.colors.textTertiary, children: "\u2502" }), _jsx(StatusPulse, { status: statusConfig.pulse, tick: tick }), _jsx(Text, { color: statusConfig.color, children: statusConfig.label })] }), _jsx(Box, { flexDirection: "row", alignItems: "center", gap: 1, children: panels.map((panel) => {
|
|
53
|
+
const config = PANEL_CONFIG[panel];
|
|
54
|
+
const isActive = activePanel === panel;
|
|
55
|
+
return (_jsx(Text, { color: isActive ? theme.colors.primary : theme.colors.textTertiary, bold: isActive, children: isActive ? `[${config.label}]` : config.label }, panel));
|
|
56
|
+
}) })] }));
|
|
43
57
|
}
|
|
44
|
-
return (_jsxs(Box, { flexDirection: "column", width: "100%", flexShrink: 0, children: [_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", paddingX: 1, borderStyle: "single", borderColor:
|
|
58
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", flexShrink: 0, children: [_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", paddingX: 1, borderStyle: "single", borderColor: theme.colors.border, children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 1, children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: "\u25C6" }), _jsx(Text, { color: theme.colors.textPrimary, bold: true, children: "RAXFLOW" }), _jsx(Text, { color: theme.colors.textTertiary, children: "\u2502" }), _jsx(Text, { color: theme.colors.textSecondary, children: projectDisplay })] }), _jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 1, children: [_jsx(Text, { color: theme.colors.textTertiary, children: "model:" }), _jsx(Text, { color: theme.colors.primary, children: modelDisplay }), _jsx(Text, { color: theme.colors.textQuaternary, children: "\u2502" }), _jsx(StatusPulse, { status: statusConfig.pulse, tick: tick }), _jsx(Text, { color: statusConfig.color, bold: true, children: statusConfig.label })] })] }), _jsxs(Box, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", paddingX: 1, children: [_jsx(Box, { flexDirection: "row", alignItems: "center", gap: 2, children: panels.map((panel) => {
|
|
59
|
+
const config = PANEL_CONFIG[panel];
|
|
60
|
+
const isActive = activePanel === panel;
|
|
61
|
+
return (_jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: isActive ? theme.colors.primary : theme.colors.textTertiary, bold: isActive, children: isActive ? `[${config.label}]` : ` ${config.label} ` }) }, panel));
|
|
62
|
+
}) }), _jsx(Box, { flexDirection: "row", alignItems: "center", children: _jsx(Text, { color: theme.colors.textQuaternary, children: "Tab\u2192Switch \u2502 ?:Help \u2502 Ctrl+C:Quit" }) })] })] }));
|
|
45
63
|
});
|
|
46
64
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/tui/components/Header.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/tui/components/Header.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAa,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAe1D,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE;IACjC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE;IAC/B,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE;IACrC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE;IACjC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE;IACvC,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE;CAC7B,CAAC;AAEX,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAC1E,MAAM,cAAc,GAAG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E;4BACpB,MAAM,MAAM,GAAG,YAAY,CAAC,KAAkC,CAAC,CAAC;4BAChE,MAAM,QAAQ,GAAG,WAAW,KAAK,KAAK,CAAC;4BACvC,OAAO,CACL,KAAC,GAAG,IAAa,aAAa,EAAC,KAAK,YAClC,KAAC,IAAI,IACH,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAClE,IAAI,EAAE,QAAQ,YAEb,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,GAAG,GAChD,IANC,KAAK,CAOT,CACP,CAAC;wBACJ,CAAC,CAAC,GACE,EAEN,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,YAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,iEAEjC,GACH,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpOverlay.d.ts","sourceRoot":"","sources":["../../../src/tui/components/HelpOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HelpOverlay.d.ts","sourceRoot":"","sources":["../../../src/tui/components/HelpOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAK7C,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAsDD,eAAO,MAAM,WAAW,8CAqFtB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentTheme } from "../styles/colors.js";
|
|
5
|
+
import { indicators } from "../styles/tokens.js";
|
|
5
6
|
const COMMAND_SECTIONS = [
|
|
6
7
|
{
|
|
7
8
|
title: "EXECUTION",
|
|
@@ -52,9 +53,10 @@ const FUNCTION_KEYS = [
|
|
|
52
53
|
{ key: "F8", label: "Dashboard" },
|
|
53
54
|
];
|
|
54
55
|
export const HelpOverlay = memo(function HelpOverlay({ onDismiss }) {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
56
|
+
const theme = getCurrentTheme();
|
|
57
|
+
const functionKeyElements = useMemo(() => FUNCTION_KEYS.map((fn) => (_jsxs(Box, { marginRight: 2, children: [_jsxs(Text, { color: theme.colors.primary, bold: true, children: ["[", fn.key, "]"] }), _jsxs(Text, { color: theme.colors.textSecondary, children: [" ", fn.label] })] }, fn.key))), [theme]);
|
|
58
|
+
const sectionElements = useMemo(() => COMMAND_SECTIONS.map((section) => (_jsxs(Box, { flexDirection: "column", width: 26, marginRight: 2, children: [_jsxs(Text, { color: theme.colors.primary, bold: true, children: [indicators.square, " ", section.title] }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: section.items.map(([cmd, desc]) => (_jsxs(Box, { flexDirection: "row", marginBottom: 0, children: [_jsx(Text, { color: theme.colors.textPrimary, children: cmd.padEnd(14) }), _jsx(Text, { color: theme.colors.textTertiary, children: desc })] }, cmd))) })] }, section.title))), [theme]);
|
|
59
|
+
const shortcutElements = useMemo(() => KEYBOARD_SHORTCUTS.map(([key, action]) => (_jsxs(Box, { marginRight: 3, children: [_jsxs(Text, { color: theme.colors.textPrimary, children: ["[", key.padEnd(6), "]"] }), _jsxs(Text, { color: theme.colors.textTertiary, children: [" ", action] })] }, key))), [theme]);
|
|
60
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, borderStyle: "single", borderColor: theme.colors.borderActive, paddingX: 2, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: indicators.square }), _jsx(Text, { color: theme.colors.textPrimary, bold: true, children: " RAXFLOW HELP" }), _jsx(Text, { color: theme.colors.textTertiary, children: " \u2500\u2500 Press [Esc] to close" })] }), _jsx(Box, { borderStyle: "single", borderColor: theme.colors.border, marginBottom: 1, children: _jsx(Text, { color: theme.colors.textTertiary, children: "Multi-Agent Orchestration Framework" }) }), _jsx(Box, { flexDirection: "row", marginBottom: 1, children: functionKeyElements }), _jsx(Box, { flexDirection: "row", flexGrow: 1, children: sectionElements }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: theme.colors.primary, bold: true, children: [indicators.square, " KEYBOARD"] }) }), _jsx(Box, { flexDirection: "row", children: shortcutElements }), _jsx(Box, { borderStyle: "single", borderColor: theme.colors.border, marginTop: 1, children: _jsx(Text, { color: theme.colors.textTertiary, children: "Type your prompt to execute a workflow, or use /command for specific actions" }) })] }));
|
|
59
61
|
});
|
|
60
62
|
//# sourceMappingURL=HelpOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpOverlay.js","sourceRoot":"","sources":["../../../src/tui/components/HelpOverlay.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"HelpOverlay.js","sourceRoot":"","sources":["../../../src/tui/components/HelpOverlay.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,MAAM,gBAAgB,G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AAE,IAAI,kBAAE,UAAU,CAAC,MAAM,GAAQ,EAClE,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,oCAAqB,EAChE,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,mDAAiC,IACnE,EAEN,KAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,YACzE,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,oDAE/B,GACH,EAEN,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,YAAY,EAAE,CAAC,YACrC,mBAAmB,GAChB,EAEN,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,QAAQ,EAAE,CAAC,YACjC,eAAe,GACZ,EAEN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,mBAAE,UAAU,CAAC,MAAM,iBAAiB,GACvE,EACN,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,YAAE,gBAAgB,GAAO,EAEjD,KAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,YACtE,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,6FAE/B,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBar.d.ts","sourceRoot":"","sources":["../../../src/tui/components/InputBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputBar.d.ts","sourceRoot":"","sources":["../../../src/tui/components/InputBar.tsx"],"names":[],"mappings":"AAMA,UAAU,aAAa;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,qDAkInB,CAAC"}
|
|
@@ -3,11 +3,13 @@ import { useState, memo, useMemo, useCallback } from "react";
|
|
|
3
3
|
import { Box, Text, useInput } from "ink";
|
|
4
4
|
import TextInput from "ink-text-input";
|
|
5
5
|
import { getCurrentTheme } from "../styles/colors.js";
|
|
6
|
-
|
|
6
|
+
import { indicators } from "../styles/tokens.js";
|
|
7
|
+
export const InputBar = memo(function InputBar({ onSubmit, suggestions, isProcessing, projectName, width = 100, model, }) {
|
|
7
8
|
const [input, setInput] = useState("");
|
|
8
9
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
9
10
|
const theme = getCurrentTheme();
|
|
10
|
-
const
|
|
11
|
+
const isCompact = width < 80;
|
|
12
|
+
const isMinimal = width < 60;
|
|
11
13
|
const handleSubmit = useCallback((value) => {
|
|
12
14
|
if (value.trim()) {
|
|
13
15
|
onSubmit(value);
|
|
@@ -19,21 +21,24 @@ export const InputBar = memo(function InputBar({ onSubmit, suggestions, isProces
|
|
|
19
21
|
setInput(value);
|
|
20
22
|
setSelectedIndex(0);
|
|
21
23
|
}, []);
|
|
22
|
-
const compact = width < 60;
|
|
23
24
|
const isCommandMode = input.startsWith("/");
|
|
24
25
|
const commandInput = isCommandMode ? input.slice(1) : "";
|
|
25
|
-
const showSuggestions = isCommandMode &&
|
|
26
|
+
const showSuggestions = isCommandMode && !isMinimal;
|
|
26
27
|
const filteredSuggestions = useMemo(() => {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
if (!showSuggestions)
|
|
29
|
+
return [];
|
|
30
|
+
return suggestions
|
|
31
|
+
.filter((s) => s.toLowerCase().startsWith(commandInput.toLowerCase()))
|
|
32
|
+
.slice(0, isCompact ? 4 : 6);
|
|
33
|
+
}, [suggestions, commandInput, showSuggestions, isCompact]);
|
|
29
34
|
useInput((_input, key) => {
|
|
30
35
|
if (!showSuggestions || filteredSuggestions.length === 0)
|
|
31
36
|
return;
|
|
32
37
|
if (key.upArrow) {
|
|
33
|
-
setSelectedIndex((prev) =>
|
|
38
|
+
setSelectedIndex((prev) => prev > 0 ? prev - 1 : filteredSuggestions.length - 1);
|
|
34
39
|
}
|
|
35
40
|
else if (key.downArrow) {
|
|
36
|
-
setSelectedIndex((prev) =>
|
|
41
|
+
setSelectedIndex((prev) => prev < filteredSuggestions.length - 1 ? prev + 1 : 0);
|
|
37
42
|
}
|
|
38
43
|
else if (key.tab) {
|
|
39
44
|
const selected = filteredSuggestions[selectedIndex];
|
|
@@ -50,10 +55,17 @@ export const InputBar = memo(function InputBar({ onSubmit, suggestions, isProces
|
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
});
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
const promptSymbol = isMinimal ? ">" : indicators.arrow;
|
|
59
|
+
const promptLabel = isMinimal
|
|
60
|
+
? "cmd"
|
|
61
|
+
: isCompact
|
|
62
|
+
? projectName.slice(0, 10)
|
|
63
|
+
: `rax://${projectName}`;
|
|
64
|
+
const placeholderText = isMinimal
|
|
65
|
+
? "prompt..."
|
|
66
|
+
: isCompact
|
|
67
|
+
? "/command or prompt..."
|
|
68
|
+
: "enter prompt or /command...";
|
|
69
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: theme.colors.border, paddingX: 1, flexShrink: 0, children: [showSuggestions && filteredSuggestions.length > 0 && (_jsx(Box, { flexDirection: "row", marginBottom: 0, flexWrap: "wrap", children: filteredSuggestions.map((s, idx) => (_jsx(Box, { marginRight: 2, children: _jsxs(Text, { color: idx === selectedIndex ? theme.colors.primary : theme.colors.textTertiary, bold: idx === selectedIndex, children: [idx === selectedIndex ? `${indicators.selected} ` : " ", s] }) }, s))) })), _jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: promptSymbol }), _jsxs(Text, { color: theme.colors.textSecondary, children: [" ", promptLabel] }), !isMinimal && model && (_jsxs(Text, { color: theme.colors.textQuaternary, children: [" [", model.slice(0, 10), "]"] })), _jsx(Text, { color: theme.colors.textPrimary, children: " " }), _jsx(Box, { flexGrow: 1, children: _jsx(TextInput, { value: input, onChange: handleChange, onSubmit: handleSubmit, placeholder: placeholderText, showCursor: true }) }), isProcessing && (_jsxs(Text, { color: theme.colors.warning, children: [" ", indicators.running] }))] }), showSuggestions && filteredSuggestions.length > 0 && (_jsx(Text, { color: theme.colors.textTertiary, italic: true, dimColor: true, children: "\u2191\u2193 navigate \u2502 Tab complete \u2502 Enter execute" }))] }));
|
|
58
70
|
});
|
|
59
71
|
//# sourceMappingURL=InputBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../../src/tui/components/InputBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../../src/tui/components/InputBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,IAAI,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KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,QAAC,QAAQ,qFAEhD,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/LogsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAM1E,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"LogsPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/LogsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAM1E,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0ED,eAAO,MAAM,SAAS,4CAsFpB,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, memo, useRef, useMemo } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import { logStatusTags } from "../styles/index.js";
|
|
5
4
|
import { Spinner } from "./animations/index.js";
|
|
6
5
|
import { getCurrentTheme } from "../styles/colors.js";
|
|
7
|
-
|
|
6
|
+
import { indicators } from "../styles/tokens.js";
|
|
7
|
+
const HIGHLIGHT_DURATION = 1500;
|
|
8
|
+
const LOG_LEVEL_COLORS = {
|
|
9
|
+
INFO: "#3b82f6",
|
|
10
|
+
WARN: "#f59e0b",
|
|
11
|
+
ERROR: "#ef4444",
|
|
12
|
+
DEBUG: "#6b7280",
|
|
13
|
+
TRACE: "#9ca3af",
|
|
14
|
+
SYSTEM: "#8b5cf6",
|
|
15
|
+
};
|
|
8
16
|
function parseLogLine(log) {
|
|
9
17
|
const timeMatch = log.match(/\[(\d{2}:\d{2}:\d{2}(?:\.\d+)?)\]/);
|
|
10
18
|
const tagMatch = log.match(/\[(\w+)\]/g);
|
|
@@ -13,29 +21,28 @@ function parseLogLine(log) {
|
|
|
13
21
|
}
|
|
14
22
|
const time = timeMatch[1];
|
|
15
23
|
const tag = tagMatch[1].replace(/[\[\]]/g, "").toUpperCase();
|
|
16
|
-
const
|
|
17
|
-
const color = tagConfig?.color || "#606060";
|
|
24
|
+
const color = LOG_LEVEL_COLORS[tag] || "#6b7280";
|
|
18
25
|
const messageStart = log.indexOf(tagMatch[1]) + tagMatch[1].length;
|
|
19
26
|
const message = log.slice(messageStart).trim();
|
|
20
27
|
return { time, tag, message, color };
|
|
21
28
|
}
|
|
22
29
|
const LogLine = memo(function LogLine({ log, isNew, compact }) {
|
|
23
30
|
const theme = getCurrentTheme();
|
|
24
|
-
const isDark = theme.name === "default";
|
|
25
31
|
const parsed = useMemo(() => parseLogLine(log), [log]);
|
|
26
32
|
if (!parsed) {
|
|
27
|
-
return _jsx(Text, { color:
|
|
33
|
+
return (_jsx(Text, { color: theme.colors.textPrimary, children: log.slice(0, compact ? 25 : 60) }));
|
|
28
34
|
}
|
|
29
|
-
const paddedTag =
|
|
30
|
-
const truncatedMessage = compact
|
|
31
|
-
|
|
35
|
+
const paddedTag = parsed.tag.slice(0, compact ? 4 : 6).padEnd(compact ? 4 : 6);
|
|
36
|
+
const truncatedMessage = compact
|
|
37
|
+
? parsed.message.slice(0, 18)
|
|
38
|
+
: parsed.message.slice(0, 50);
|
|
39
|
+
return (_jsxs(Box, { flexDirection: "row", children: [!compact && (_jsxs(Text, { color: theme.colors.textQuaternary, children: ["[", parsed.time, "]"] })), _jsxs(Text, { color: parsed.color, bold: true, children: [" [", paddedTag, "]"] }), _jsxs(Text, { color: isNew ? theme.colors.textPrimary : theme.colors.textSecondary, children: [" ", truncatedMessage] })] }));
|
|
32
40
|
});
|
|
33
|
-
export const LogsPanel = memo(function LogsPanel({ logs, isActive, isStreaming = false, maxHeight = 20, width = 40 }) {
|
|
41
|
+
export const LogsPanel = memo(function LogsPanel({ logs, isActive, isStreaming = false, maxHeight = 20, width = 40, }) {
|
|
34
42
|
const theme = getCurrentTheme();
|
|
35
|
-
const isDark = theme.name === "default";
|
|
36
43
|
const borderColor = isActive
|
|
37
|
-
?
|
|
38
|
-
:
|
|
44
|
+
? theme.colors.borderActive
|
|
45
|
+
: theme.colors.border;
|
|
39
46
|
const [highlightedIndex, setHighlightedIndex] = useState(null);
|
|
40
47
|
const timeoutRef = useRef(null);
|
|
41
48
|
const compact = width < 35 || maxHeight < 12;
|
|
@@ -58,10 +65,9 @@ export const LogsPanel = memo(function LogsPanel({ logs, isActive, isStreaming =
|
|
|
58
65
|
const logElements = useMemo(() => displayLogs.map((log, index) => {
|
|
59
66
|
const logIndex = logs.length - maxLogs + index;
|
|
60
67
|
const isNew = logIndex === highlightedIndex;
|
|
61
|
-
return _jsx(LogLine, { log: log, isNew: isNew, compact: compact }, `${logIndex}-${index}`);
|
|
68
|
+
return (_jsx(LogLine, { log: log, isNew: isNew, compact: compact }, `${logIndex}-${index}`));
|
|
62
69
|
}), [displayLogs, logs.length, highlightedIndex, compact]);
|
|
63
|
-
const title = compact ? "
|
|
64
|
-
|
|
65
|
-
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, width: width, height: maxHeight, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, flexShrink: 0, children: [_jsx(Text, { color: primaryColor, bold: true, children: "\u250C\u2500" }), _jsx(Text, { color: primaryColor, bold: true, children: title }), _jsx(Text, { color: isDark ? "#606060" : "#94a3b8", children: "─".repeat(Math.max(5, width - (compact ? 10 : 16))) }), isStreaming && !compact && (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: isDark ? "#f59e0b" : "#f59e0b", children: " " }), _jsx(Spinner, { type: "dots", color: isDark ? "#f59e0b" : "#f59e0b" })] }))] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children: [logElements, logs.length === 0 && (_jsx(Text, { color: isDark ? "#606060" : "#94a3b8", children: compact ? "No logs" : "No logs. Start a workflow." }))] })] }));
|
|
70
|
+
const title = compact ? "LOGS" : "LOGS";
|
|
71
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, width: width, height: maxHeight, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, flexShrink: 0, children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: indicators.square }), _jsxs(Text, { color: theme.colors.textPrimary, bold: true, children: [" ", title] }), isStreaming && !compact && (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: theme.colors.warning, children: " " }), _jsx(Spinner, { type: "dots", color: theme.colors.warning })] }))] }), _jsx(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children: logs.length === 0 ? (_jsx(Text, { color: theme.colors.textTertiary, children: compact ? "No logs" : "No logs. Start a workflow…" })) : (logElements) })] }));
|
|
66
72
|
});
|
|
67
73
|
//# sourceMappingURL=LogsPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsPanel.js","sourceRoot":"","sources":["../../../src/tui/components/LogsPanel.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":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b,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"MemoryPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/MemoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAM7C,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA6CD,eAAO,MAAM,WAAW,8CA4HtB,CAAC;AAEH,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import { treeChars } from "../styles/index.js";
|
|
5
4
|
import { Pulse } from "./animations/index.js";
|
|
6
5
|
import { getCurrentTheme } from "../styles/colors.js";
|
|
6
|
+
import { indicators } from "../styles/tokens.js";
|
|
7
7
|
const DEFAULT_NODES = [
|
|
8
8
|
{ id: "1", type: "action", label: "code_gen" },
|
|
9
9
|
{ id: "2", type: "file", label: "auth.ts" },
|
|
@@ -18,53 +18,46 @@ const DEFAULT_EDGES = [
|
|
|
18
18
|
{ from: "4", to: "5" },
|
|
19
19
|
{ from: "2", to: "5" },
|
|
20
20
|
];
|
|
21
|
-
const
|
|
22
|
-
action: "
|
|
23
|
-
file: "
|
|
24
|
-
task: "
|
|
25
|
-
test: "
|
|
26
|
-
fix: "
|
|
21
|
+
const NODE_TYPE_COLORS = {
|
|
22
|
+
action: "primary",
|
|
23
|
+
file: "success",
|
|
24
|
+
task: "warning",
|
|
25
|
+
test: "textTertiary",
|
|
26
|
+
fix: "error",
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
test: "#475569",
|
|
33
|
-
fix: "#ef4444",
|
|
34
|
-
};
|
|
35
|
-
const NodeTypeBadge = memo(function NodeTypeBadge({ type, isActive, compact, isDark }) {
|
|
36
|
-
const colors = isDark ? NODE_TYPE_COLORS_DARK : NODE_TYPE_COLORS_LIGHT;
|
|
37
|
-
const color = colors[type] || (isDark ? "#606060" : "#94a3b8");
|
|
28
|
+
const NodeTypeBadge = memo(function NodeTypeBadge({ type, isActive, compact }) {
|
|
29
|
+
const theme = getCurrentTheme();
|
|
30
|
+
const colorKey = NODE_TYPE_COLORS[type] || "textTertiary";
|
|
31
|
+
const color = theme.colors[colorKey] || theme.colors.textTertiary;
|
|
38
32
|
return (_jsxs(Box, { flexDirection: "row", children: [isActive && !compact && _jsx(Pulse, { interval: 400, color: color, type: "pulse" }), _jsxs(Text, { color: color, children: ["[", compact ? type.slice(0, 4) : type, "]"] })] }));
|
|
39
33
|
});
|
|
40
|
-
export const MemoryPanel = memo(function MemoryPanel({ nodes, edges, nodeCount = 0, cacheHitRate = 0, isActive = false, tick = 0, maxHeight = 15, width = 30 }) {
|
|
34
|
+
export const MemoryPanel = memo(function MemoryPanel({ nodes, edges, nodeCount = 0, cacheHitRate = 0, isActive = false, tick = 0, maxHeight = 15, width = 30, }) {
|
|
41
35
|
const theme = getCurrentTheme();
|
|
42
|
-
const isDark = theme.name === "default";
|
|
43
36
|
const borderColor = isActive
|
|
44
|
-
? theme.colors.
|
|
37
|
+
? theme.colors.borderActive
|
|
45
38
|
: theme.colors.border;
|
|
46
39
|
const compact = width < 25 || maxHeight < 12;
|
|
47
|
-
const displayNodes =
|
|
48
|
-
const displayEdges =
|
|
40
|
+
const displayNodes = nodes && nodes.length > 0 ? nodes : DEFAULT_NODES;
|
|
41
|
+
const displayEdges = edges && edges.length > 0 ? edges : DEFAULT_EDGES;
|
|
49
42
|
const displayNodeCount = nodeCount > 0 ? nodeCount : 247;
|
|
50
43
|
const displayCacheHitRate = cacheHitRate > 0 ? cacheHitRate : 94;
|
|
51
44
|
const activeNodeIndex = isActive ? tick % 4 : -1;
|
|
52
45
|
const maxVisibleNodes = compact ? 3 : 4;
|
|
53
46
|
const maxVisibleEdges = compact ? 2 : 3;
|
|
54
47
|
const nodeElements = useMemo(() => displayNodes.slice(0, maxVisibleNodes).map((node, idx) => {
|
|
55
|
-
const isLast = idx === Math.min(maxVisibleNodes - 1, displayNodes.length - 1);
|
|
56
48
|
const isNodeActive = idx === activeNodeIndex;
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
const label = compact ? node.label.slice(0, 8) : node.label;
|
|
50
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: theme.colors.textQuaternary, children: [compact ? " " : "│", " "] }), _jsx(NodeTypeBadge, { type: node.type, isActive: isNodeActive, compact: compact }), _jsxs(Text, { color: theme.colors.textPrimary, children: [" ", label] })] }, node.id));
|
|
51
|
+
}), [displayNodes, activeNodeIndex, compact, maxVisibleNodes, theme]);
|
|
59
52
|
const edgeElements = useMemo(() => displayEdges.slice(0, maxVisibleEdges).map((edge, i) => {
|
|
60
53
|
const fromNode = displayNodes.find((n) => n.id === edge.from);
|
|
61
54
|
const toNode = displayNodes.find((n) => n.id === edge.to);
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
const fromLabel = compact ? (fromNode?.label || "?").slice(0, 6) : fromNode?.label || "?";
|
|
56
|
+
const toLabel = compact ? (toNode?.label || "?").slice(0, 6) : toNode?.label || "?";
|
|
57
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: theme.colors.textQuaternary, children: "\u251C\u2500" }), _jsxs(Text, { color: theme.colors.textPrimary, children: [" ", fromLabel] }), _jsxs(Text, { color: theme.colors.primary, children: [" ", indicators.arrow, " "] }), _jsx(Text, { color: theme.colors.textPrimary, children: toLabel })] }, i));
|
|
58
|
+
}), [displayEdges, displayNodes, compact, maxVisibleEdges, theme]);
|
|
64
59
|
const mutationCount = useMemo(() => Math.floor(Math.random() * 4) + 1, [tick]);
|
|
65
|
-
const title = "
|
|
66
|
-
|
|
67
|
-
const successColor = isDark ? "#22c55e" : "#10b981";
|
|
68
|
-
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, width: width, height: maxHeight, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, flexShrink: 0, children: [_jsx(Text, { color: primaryColor, bold: true, children: "\u250C\u2500" }), _jsx(Text, { color: primaryColor, bold: true, children: title }), _jsxs(Text, { color: isDark ? "#606060" : "#94a3b8", children: [" n:", displayNodeCount, " "] }), isActive && !compact && _jsx(Pulse, { interval: 500, color: primaryColor, type: "pulse" })] }), !compact && (_jsx(Box, { flexDirection: "column", flexShrink: 0, children: _jsx(Text, { color: isDark ? "#606060" : "#94a3b8", bold: true, children: "QUANTUM_GRAPH" }) })), _jsxs(Box, { flexDirection: "column", marginTop: compact ? 0 : 1, overflow: "hidden", children: [_jsx(Text, { color: isDark ? "#606060" : "#94a3b8", bold: true, children: compact ? "GRAPH" : "VISUALIZATION" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: nodeElements })] }), !compact && maxHeight > 12 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, overflow: "hidden", children: [_jsx(Text, { color: isDark ? "#606060" : "#94a3b8", bold: true, children: "LINKS" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: edgeElements })] })), _jsx(Box, { marginTop: 1, flexShrink: 0, children: _jsx(Text, { color: isDark ? "#606060" : "#94a3b8", children: "\u251C\u2500" }) }), _jsxs(Box, { flexDirection: "row", flexShrink: 0, children: [_jsx(Text, { color: isDark ? "#a0a0a0" : "#475569", children: "Cache:" }), _jsx(Text, { color: successColor, children: " " }), !compact && _jsx(Pulse, { interval: 800, color: successColor, type: "breath" }), _jsxs(Text, { color: successColor, children: [" ", displayCacheHitRate, "%"] }), !compact && _jsxs(Text, { color: isDark ? "#606060" : "#94a3b8", children: [" \u2502 +", mutationCount] })] })] }));
|
|
60
|
+
const title = compact ? "QSGM" : "QSGM";
|
|
61
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, width: width, height: maxHeight, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, flexShrink: 0, children: [_jsx(Text, { color: theme.colors.primary, bold: true, children: indicators.square }), _jsxs(Text, { color: theme.colors.textPrimary, bold: true, children: [" ", title] }), _jsxs(Text, { color: theme.colors.textQuaternary, children: [" n:", displayNodeCount] }), isActive && !compact && (_jsx(Pulse, { interval: 500, color: theme.colors.primary, type: "pulse" }))] }), !compact && (_jsx(Box, { flexDirection: "column", flexShrink: 0, children: _jsx(Text, { color: theme.colors.textQuaternary, bold: true, children: "QUANTUM_GRAPH" }) })), _jsxs(Box, { flexDirection: "column", marginTop: compact ? 0 : 1, overflow: "hidden", children: [_jsx(Text, { color: theme.colors.textQuaternary, bold: true, children: compact ? "GRAPH" : "VISUALIZATION" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: nodeElements })] }), !compact && maxHeight > 12 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, overflow: "hidden", children: [_jsx(Text, { color: theme.colors.textQuaternary, bold: true, children: "LINKS" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: edgeElements })] })), _jsx(Box, { marginTop: 1, flexShrink: 0, children: _jsx(Text, { color: theme.colors.textQuaternary, children: "\u251C\u2500" }) }), _jsxs(Box, { flexDirection: "row", flexShrink: 0, children: [_jsx(Text, { color: theme.colors.textSecondary, children: "Cache:" }), _jsx(Text, { color: theme.colors.success, children: " " }), !compact && _jsx(Pulse, { interval: 800, color: theme.colors.success, type: "breath" }), _jsxs(Text, { color: theme.colors.success, children: [" ", displayCacheHitRate, "%"] }), !compact && (_jsxs(Text, { color: theme.colors.textQuaternary, children: [" \u2502 +", mutationCount] }))] })] }));
|
|
69
62
|
});
|
|
70
63
|
//# sourceMappingURL=MemoryPanel.js.map
|