rax-flow 0.1.9 → 0.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/dist/bin.js +8 -6
- package/dist/bin.js.map +1 -1
- package/dist/hub/commands/index.d.ts.map +1 -1
- package/dist/hub/commands/index.js +7 -4
- package/dist/hub/commands/index.js.map +1 -1
- package/dist/hub/event-listener.d.ts +6 -0
- package/dist/hub/event-listener.d.ts.map +1 -1
- package/dist/hub/event-listener.js +10 -6
- package/dist/hub/event-listener.js.map +1 -1
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/index.js +12 -0
- package/dist/hub/index.js.map +1 -1
- package/dist/setup/components/ApiKeyInput.d.ts +25 -0
- package/dist/setup/components/ApiKeyInput.d.ts.map +1 -0
- package/dist/setup/components/ApiKeyInput.js +54 -0
- package/dist/setup/components/ApiKeyInput.js.map +1 -0
- package/dist/setup/components/AsciiBanner.d.ts +22 -0
- package/dist/setup/components/AsciiBanner.d.ts.map +1 -0
- package/dist/setup/components/AsciiBanner.js +55 -0
- package/dist/setup/components/AsciiBanner.js.map +1 -0
- package/dist/setup/components/CliDetector.d.ts +17 -0
- package/dist/setup/components/CliDetector.d.ts.map +1 -0
- package/dist/setup/components/CliDetector.js +79 -0
- package/dist/setup/components/CliDetector.js.map +1 -0
- package/dist/setup/components/ModeSelector.d.ts +8 -0
- package/dist/setup/components/ModeSelector.d.ts.map +1 -0
- package/dist/setup/components/ModeSelector.js +76 -0
- package/dist/setup/components/ModeSelector.js.map +1 -0
- package/dist/setup/components/ProviderSelector.d.ts +18 -0
- package/dist/setup/components/ProviderSelector.d.ts.map +1 -0
- package/dist/setup/components/ProviderSelector.js +97 -0
- package/dist/setup/components/ProviderSelector.js.map +1 -0
- package/dist/setup/components/SetupWizard.d.ts +2 -0
- package/dist/setup/components/SetupWizard.d.ts.map +1 -0
- package/dist/setup/components/SetupWizard.js +212 -0
- package/dist/setup/components/SetupWizard.js.map +1 -0
- package/dist/setup/components/StepIndicator.d.ts +13 -0
- package/dist/setup/components/StepIndicator.d.ts.map +1 -0
- package/dist/setup/components/StepIndicator.js +18 -0
- package/dist/setup/components/StepIndicator.js.map +1 -0
- package/dist/setup/components/SuccessScreen.d.ts +18 -0
- package/dist/setup/components/SuccessScreen.d.ts.map +1 -0
- package/dist/setup/components/SuccessScreen.js +38 -0
- package/dist/setup/components/SuccessScreen.js.map +1 -0
- package/dist/setup/index.d.ts +12 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/dist/setup/index.js +29 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/utils/cli-detection.d.ts +12 -0
- package/dist/setup/utils/cli-detection.d.ts.map +1 -0
- package/dist/setup/utils/cli-detection.js +83 -0
- package/dist/setup/utils/cli-detection.js.map +1 -0
- package/dist/setup/utils/config-writer.d.ts +43 -0
- package/dist/setup/utils/config-writer.d.ts.map +1 -0
- package/dist/setup/utils/config-writer.js +180 -0
- package/dist/setup/utils/config-writer.js.map +1 -0
- package/dist/tui/App.d.ts +2 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +78 -18
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/AgentStateIcon.d.ts +18 -0
- package/dist/tui/components/AgentStateIcon.d.ts.map +1 -0
- package/dist/tui/components/AgentStateIcon.js +57 -0
- package/dist/tui/components/AgentStateIcon.js.map +1 -0
- package/dist/tui/components/AnimatedBranch.d.ts +39 -0
- package/dist/tui/components/AnimatedBranch.d.ts.map +1 -0
- package/dist/tui/components/AnimatedBranch.js +64 -0
- package/dist/tui/components/AnimatedBranch.js.map +1 -0
- package/dist/tui/components/ChatPanel.d.ts +2 -1
- package/dist/tui/components/ChatPanel.d.ts.map +1 -1
- package/dist/tui/components/ChatPanel.js +47 -28
- package/dist/tui/components/ChatPanel.js.map +1 -1
- package/dist/tui/components/DAGPanel.d.ts +14 -2
- package/dist/tui/components/DAGPanel.d.ts.map +1 -1
- package/dist/tui/components/DAGPanel.js +48 -27
- package/dist/tui/components/DAGPanel.js.map +1 -1
- package/dist/tui/components/ExecutionTimeline.d.ts +34 -0
- package/dist/tui/components/ExecutionTimeline.d.ts.map +1 -0
- package/dist/tui/components/ExecutionTimeline.js +67 -0
- package/dist/tui/components/ExecutionTimeline.js.map +1 -0
- package/dist/tui/components/Header.d.ts +2 -1
- package/dist/tui/components/Header.d.ts.map +1 -1
- package/dist/tui/components/Header.js +23 -20
- package/dist/tui/components/Header.js.map +1 -1
- package/dist/tui/components/HelpOverlay.d.ts +2 -1
- package/dist/tui/components/HelpOverlay.d.ts.map +1 -1
- package/dist/tui/components/HelpOverlay.js +59 -41
- package/dist/tui/components/HelpOverlay.js.map +1 -1
- package/dist/tui/components/InputBar.d.ts +3 -1
- package/dist/tui/components/InputBar.d.ts.map +1 -1
- package/dist/tui/components/InputBar.js +12 -7
- package/dist/tui/components/InputBar.js.map +1 -1
- package/dist/tui/components/LogsPanel.d.ts +3 -1
- package/dist/tui/components/LogsPanel.d.ts.map +1 -1
- package/dist/tui/components/LogsPanel.js +52 -3
- package/dist/tui/components/LogsPanel.js.map +1 -1
- package/dist/tui/components/MemoryPanel.d.ts +8 -6
- package/dist/tui/components/MemoryPanel.d.ts.map +1 -1
- package/dist/tui/components/MemoryPanel.js +37 -10
- package/dist/tui/components/MemoryPanel.js.map +1 -1
- package/dist/tui/components/MetricsPanel.d.ts +12 -7
- package/dist/tui/components/MetricsPanel.d.ts.map +1 -1
- package/dist/tui/components/MetricsPanel.js +24 -11
- package/dist/tui/components/MetricsPanel.js.map +1 -1
- package/dist/tui/components/StatusPanel.d.ts +3 -1
- package/dist/tui/components/StatusPanel.d.ts.map +1 -1
- package/dist/tui/components/StatusPanel.js +20 -18
- package/dist/tui/components/StatusPanel.js.map +1 -1
- package/dist/tui/components/TaskTree.d.ts +28 -0
- package/dist/tui/components/TaskTree.d.ts.map +1 -0
- package/dist/tui/components/TaskTree.js +29 -0
- package/dist/tui/components/TaskTree.js.map +1 -0
- package/dist/tui/components/animations/ProgressBar.d.ts +39 -0
- package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -0
- package/dist/tui/components/animations/ProgressBar.js +39 -0
- package/dist/tui/components/animations/ProgressBar.js.map +1 -0
- package/dist/tui/components/animations/Pulse.d.ts +17 -0
- package/dist/tui/components/animations/Pulse.d.ts.map +1 -0
- package/dist/tui/components/animations/Pulse.js +47 -0
- package/dist/tui/components/animations/Pulse.js.map +1 -0
- package/dist/tui/components/animations/Spinner.d.ts +13 -0
- package/dist/tui/components/animations/Spinner.d.ts.map +1 -0
- package/dist/tui/components/animations/Spinner.js +36 -0
- package/dist/tui/components/animations/Spinner.js.map +1 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts +27 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -0
- package/dist/tui/components/animations/StatusAnimator.js +85 -0
- package/dist/tui/components/animations/StatusAnimator.js.map +1 -0
- package/dist/tui/components/animations/TypingEffect.d.ts +26 -0
- package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -0
- package/dist/tui/components/animations/TypingEffect.js +59 -0
- package/dist/tui/components/animations/TypingEffect.js.map +1 -0
- package/dist/tui/components/animations/index.d.ts +8 -0
- package/dist/tui/components/animations/index.d.ts.map +1 -0
- package/dist/tui/components/animations/index.js +6 -0
- package/dist/tui/components/animations/index.js.map +1 -0
- package/dist/tui/hooks/useAnimation.d.ts +42 -0
- package/dist/tui/hooks/useAnimation.d.ts.map +1 -0
- package/dist/tui/hooks/useAnimation.js +212 -0
- package/dist/tui/hooks/useAnimation.js.map +1 -0
- package/dist/tui/hooks/useAppState.d.ts +9 -6
- package/dist/tui/hooks/useAppState.d.ts.map +1 -1
- package/dist/tui/hooks/useAppState.js +84 -69
- package/dist/tui/hooks/useAppState.js.map +1 -1
- package/dist/tui/services/orchestrator.d.ts.map +1 -1
- package/dist/tui/services/orchestrator.js +47 -3
- package/dist/tui/services/orchestrator.js.map +1 -1
- package/dist/tui/styles/borders.d.ts +31 -0
- package/dist/tui/styles/borders.d.ts.map +1 -0
- package/dist/tui/styles/borders.js +47 -0
- package/dist/tui/styles/borders.js.map +1 -0
- package/dist/tui/styles/colors.d.ts +18 -0
- package/dist/tui/styles/colors.d.ts.map +1 -0
- package/dist/tui/styles/colors.js +18 -0
- package/dist/tui/styles/colors.js.map +1 -0
- package/dist/tui/styles/index.d.ts +6 -0
- package/dist/tui/styles/index.d.ts.map +1 -0
- package/dist/tui/styles/index.js +6 -0
- package/dist/tui/styles/index.js.map +1 -0
- package/dist/tui/styles/indicators.d.ts +67 -0
- package/dist/tui/styles/indicators.d.ts.map +1 -0
- package/dist/tui/styles/indicators.js +42 -0
- package/dist/tui/styles/indicators.js.map +1 -0
- package/dist/tui/styles/layout.d.ts +21 -0
- package/dist/tui/styles/layout.d.ts.map +1 -0
- package/dist/tui/styles/layout.js +42 -0
- package/dist/tui/styles/layout.js.map +1 -0
- package/dist/tui/styles/providers.d.ts +77 -0
- package/dist/tui/styles/providers.d.ts.map +1 -0
- package/dist/tui/styles/providers.js +31 -0
- package/dist/tui/styles/providers.js.map +1 -0
- package/dist/tui/utils/animation.d.ts +44 -0
- package/dist/tui/utils/animation.d.ts.map +1 -0
- package/dist/tui/utils/animation.js +107 -0
- package/dist/tui/utils/animation.js.map +1 -0
- package/package.json +8 -8
- package/src/bin.ts +8 -5
- package/src/hub/commands/index.ts +7 -4
- package/src/hub/event-listener.ts +14 -10
- package/src/hub/index.ts +14 -2
- package/src/setup/components/ApiKeyInput.tsx +158 -0
- package/src/setup/components/AsciiBanner.tsx +125 -0
- package/src/setup/components/CliDetector.tsx +230 -0
- package/src/setup/components/ModeSelector.tsx +137 -0
- package/src/setup/components/ProviderSelector.tsx +174 -0
- package/src/setup/components/SetupWizard.tsx +368 -0
- package/src/setup/components/StepIndicator.tsx +74 -0
- package/src/setup/components/SuccessScreen.tsx +229 -0
- package/src/setup/index.ts +34 -0
- package/src/setup/utils/cli-detection.ts +99 -0
- package/src/setup/utils/config-writer.ts +249 -0
- package/src/tui/App.tsx +95 -64
- package/src/tui/components/AgentStateIcon.tsx +84 -0
- package/src/tui/components/AnimatedBranch.tsx +134 -0
- package/src/tui/components/ChatPanel.tsx +85 -43
- package/src/tui/components/DAGPanel.tsx +150 -58
- package/src/tui/components/ExecutionTimeline.tsx +225 -0
- package/src/tui/components/Header.tsx +67 -43
- package/src/tui/components/HelpOverlay.tsx +118 -61
- package/src/tui/components/InputBar.tsx +33 -19
- package/src/tui/components/LogsPanel.tsx +106 -14
- package/src/tui/components/MemoryPanel.tsx +106 -42
- package/src/tui/components/MetricsPanel.tsx +102 -61
- package/src/tui/components/StatusPanel.tsx +84 -37
- package/src/tui/components/TaskTree.tsx +159 -0
- package/src/tui/components/animations/ProgressBar.tsx +160 -0
- package/src/tui/components/animations/Pulse.tsx +73 -0
- package/src/tui/components/animations/Spinner.tsx +54 -0
- package/src/tui/components/animations/StatusAnimator.tsx +153 -0
- package/src/tui/components/animations/TypingEffect.tsx +119 -0
- package/src/tui/components/animations/index.ts +16 -0
- package/src/tui/hooks/useAnimation.ts +290 -0
- package/src/tui/hooks/useAppState.ts +52 -32
- package/src/tui/services/orchestrator.ts +57 -4
- package/src/tui/styles/borders.ts +51 -0
- package/src/tui/styles/colors.ts +19 -0
- package/src/tui/styles/index.ts +20 -0
- package/src/tui/styles/indicators.ts +54 -0
- package/src/tui/styles/layout.ts +44 -0
- package/src/tui/styles/providers.ts +32 -0
- package/src/tui/utils/animation.ts +124 -0
- package/LICENSE +0 -21
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { Text } from "ink";
|
|
4
|
+
import { tuiColors } from "../styles/index.js";
|
|
5
|
+
const THINKING_FRAMES = ["◠", "◡", "◠", "◡"];
|
|
6
|
+
const PROCESSING_FRAMES = ["▶", "▷", "▶", "▷"];
|
|
7
|
+
const RUNNING_FRAMES = ["●", "◉", "●", "○"];
|
|
8
|
+
const WAITING_FRAMES = ["◐", "◓", "◐", "◓"];
|
|
9
|
+
const STATE_CONFIG = {
|
|
10
|
+
idle: { icon: "○", color: tuiColors.textTertiary, animated: false },
|
|
11
|
+
thinking: { icon: "◠", color: tuiColors.warning, animated: true, frames: THINKING_FRAMES },
|
|
12
|
+
processing: { icon: "▶", color: tuiColors.primary, animated: true, frames: PROCESSING_FRAMES },
|
|
13
|
+
running: { icon: "●", color: tuiColors.success, animated: true, frames: RUNNING_FRAMES },
|
|
14
|
+
success: { icon: "✓", color: tuiColors.success, animated: false },
|
|
15
|
+
error: { icon: "✗", color: tuiColors.error, animated: false },
|
|
16
|
+
waiting: { icon: "◐", color: tuiColors.warning, animated: true, frames: WAITING_FRAMES },
|
|
17
|
+
};
|
|
18
|
+
export const AgentStateIcon = memo(function AgentStateIcon({ state, animated = true, tick = 0 }) {
|
|
19
|
+
const config = STATE_CONFIG[state];
|
|
20
|
+
const showAnimation = animated && config.animated && config.frames;
|
|
21
|
+
const icon = useMemo(() => {
|
|
22
|
+
if (showAnimation && config.frames) {
|
|
23
|
+
return config.frames[tick % config.frames.length];
|
|
24
|
+
}
|
|
25
|
+
return config.icon;
|
|
26
|
+
}, [showAnimation, config.frames, config.icon, tick]);
|
|
27
|
+
return _jsx(Text, { color: config.color, children: icon });
|
|
28
|
+
});
|
|
29
|
+
export function useAgentStateFrame(state, tick) {
|
|
30
|
+
const config = STATE_CONFIG[state];
|
|
31
|
+
if (config.frames) {
|
|
32
|
+
return config.frames[tick % config.frames.length];
|
|
33
|
+
}
|
|
34
|
+
return config.icon;
|
|
35
|
+
}
|
|
36
|
+
const STATE_LABELS = {
|
|
37
|
+
idle: "pending",
|
|
38
|
+
thinking: "thinking...",
|
|
39
|
+
processing: "processing",
|
|
40
|
+
running: "running",
|
|
41
|
+
success: "done",
|
|
42
|
+
error: "error",
|
|
43
|
+
waiting: "waiting",
|
|
44
|
+
};
|
|
45
|
+
export const AgentStateWithLabel = memo(function AgentStateWithLabel({ state, label, tick }) {
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsx(AgentStateIcon, { state: state, tick: tick }), _jsxs(Text, { color: tuiColors.textSecondary, children: [" ", label] }), _jsxs(Text, { color: tuiColors.textTertiary, children: [" ", STATE_LABELS[state]] })] }));
|
|
47
|
+
});
|
|
48
|
+
export const agentStateColors = {
|
|
49
|
+
idle: tuiColors.textTertiary,
|
|
50
|
+
thinking: tuiColors.warning,
|
|
51
|
+
processing: tuiColors.primary,
|
|
52
|
+
running: tuiColors.success,
|
|
53
|
+
success: tuiColors.success,
|
|
54
|
+
error: tuiColors.error,
|
|
55
|
+
waiting: tuiColors.warning,
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=AgentStateIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentStateIcon.js","sourceRoot":"","sources":["../../../src/tui/components/AgentStateIcon.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC7C,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/C,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAU5C,MAAM,YAAY,GAA8F;IAC9G,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,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,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAA+B;IAC1D,IAAI,EAAE,SAAS,CAAC,YAAY;IAC5B,QAAQ,EAAE,SAAS,CAAC,OAAO;IAC3B,UAAU,EAAE,SAAS,CAAC,OAAO;IAC7B,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,KAAK,EAAE,SAAS,CAAC,KAAK;IACtB,OAAO,EAAE,SAAS,CAAC,OAAO;CAC3B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type BranchType = 'vertical' | 'horizontal' | 'corner-left' | 'corner-right' | 'branch' | 'last-branch' | 'flow';
|
|
3
|
+
interface AnimatedBranchProps {
|
|
4
|
+
type: BranchType;
|
|
5
|
+
tick?: number;
|
|
6
|
+
animated?: boolean;
|
|
7
|
+
length?: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const AnimatedBranch: React.NamedExoticComponent<AnimatedBranchProps>;
|
|
11
|
+
interface BranchLineProps {
|
|
12
|
+
tick: number;
|
|
13
|
+
animated?: boolean;
|
|
14
|
+
length?: number;
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const VerticalBranch: React.NamedExoticComponent<BranchLineProps>;
|
|
18
|
+
export declare const HorizontalBranch: React.NamedExoticComponent<BranchLineProps>;
|
|
19
|
+
export declare const BranchConnector: React.NamedExoticComponent<BranchLineProps>;
|
|
20
|
+
export declare const LastBranchConnector: React.NamedExoticComponent<BranchLineProps>;
|
|
21
|
+
export declare const FlowIndicator: React.NamedExoticComponent<BranchLineProps>;
|
|
22
|
+
interface TaskBranchProps {
|
|
23
|
+
tick: number;
|
|
24
|
+
depth: number;
|
|
25
|
+
isLast: boolean;
|
|
26
|
+
hasChildren?: boolean;
|
|
27
|
+
isExpanded?: boolean;
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const TaskBranch: React.NamedExoticComponent<TaskBranchProps>;
|
|
31
|
+
interface AnimatedConnectorProps {
|
|
32
|
+
tick: number;
|
|
33
|
+
fromLevel: number;
|
|
34
|
+
toLevel: number;
|
|
35
|
+
isActive: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const AnimatedConnector: React.NamedExoticComponent<AnimatedConnectorProps>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=AnimatedBranch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedBranch.d.ts","sourceRoot":"","sources":["../../../src/tui/components/AnimatedBranch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAQ7C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAExH,UAAU,mBAAmB;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,iDAmCzB,CAAC;AAEH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,6CAEzB,CAAC;AAEH,eAAO,MAAM,gBAAgB,6CAE3B,CAAC;AAEH,eAAO,MAAM,eAAe,6CAE1B,CAAC;AAEH,eAAO,MAAM,mBAAmB,6CAE9B,CAAC;AAEH,eAAO,MAAM,aAAa,6CAExB,CAAC;AAEH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,6CAerB,CAAC;AAEH,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,oDAkB5B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
import { tuiColors } from "../styles/index.js";
|
|
5
|
+
const VERTICAL_PULSE_FRAMES = ["│", "┃", "│", "┃"];
|
|
6
|
+
const HORIZONTAL_PULSE_FRAMES = ["─", "━", "─", "━"];
|
|
7
|
+
const FLOW_FRAMES = ["◀═══▶", "═◀═══▶", "══◀══▶", "═══◀═▶", "════◀▶", "═▶═══◀", "══▶══◀", "═══▶═◀"];
|
|
8
|
+
export const AnimatedBranch = memo(function AnimatedBranch({ type, tick = 0, animated = true, length = 1, color }) {
|
|
9
|
+
const branchColor = color || tuiColors.textTertiary;
|
|
10
|
+
const getFrame = (frames) => {
|
|
11
|
+
return frames[tick % frames.length];
|
|
12
|
+
};
|
|
13
|
+
const renderBranch = () => {
|
|
14
|
+
switch (type) {
|
|
15
|
+
case 'vertical':
|
|
16
|
+
return animated ? getFrame(VERTICAL_PULSE_FRAMES) : "│";
|
|
17
|
+
case 'horizontal':
|
|
18
|
+
return animated ? getFrame(HORIZONTAL_PULSE_FRAMES).repeat(length) : "─".repeat(length);
|
|
19
|
+
case 'corner-left':
|
|
20
|
+
return "┌";
|
|
21
|
+
case 'corner-right':
|
|
22
|
+
return "┐";
|
|
23
|
+
case 'branch':
|
|
24
|
+
return "├─";
|
|
25
|
+
case 'last-branch':
|
|
26
|
+
return "└─";
|
|
27
|
+
case 'flow':
|
|
28
|
+
return animated ? getFrame(FLOW_FRAMES) : "◀═══▶";
|
|
29
|
+
default:
|
|
30
|
+
return "│";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return _jsx(Text, { color: branchColor, children: renderBranch() });
|
|
34
|
+
});
|
|
35
|
+
export const VerticalBranch = memo(function VerticalBranch({ tick, animated = true, length = 1, color }) {
|
|
36
|
+
return _jsx(AnimatedBranch, { type: "vertical", tick: tick, animated: animated, color: color });
|
|
37
|
+
});
|
|
38
|
+
export const HorizontalBranch = memo(function HorizontalBranch({ tick, animated = true, length = 1, color }) {
|
|
39
|
+
return _jsx(AnimatedBranch, { type: "horizontal", tick: tick, animated: animated, length: length, color: color });
|
|
40
|
+
});
|
|
41
|
+
export const BranchConnector = memo(function BranchConnector({ tick, animated = true, color }) {
|
|
42
|
+
return _jsx(AnimatedBranch, { type: "branch", tick: tick, animated: animated, color: color });
|
|
43
|
+
});
|
|
44
|
+
export const LastBranchConnector = memo(function LastBranchConnector({ tick, animated = true, color }) {
|
|
45
|
+
return _jsx(AnimatedBranch, { type: "last-branch", tick: tick, animated: animated, color: color });
|
|
46
|
+
});
|
|
47
|
+
export const FlowIndicator = memo(function FlowIndicator({ tick, animated = true, color }) {
|
|
48
|
+
return _jsx(AnimatedBranch, { type: "flow", tick: tick, animated: animated, color: color });
|
|
49
|
+
});
|
|
50
|
+
export const TaskBranch = memo(function TaskBranch({ tick, depth, isLast, hasChildren = false, isExpanded = true, color }) {
|
|
51
|
+
const branchColor = color || tuiColors.textTertiary;
|
|
52
|
+
if (depth === 0) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const indent = " ".repeat(depth - 1);
|
|
56
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: branchColor, children: indent }), _jsx(AnimatedBranch, { type: isLast ? "last-branch" : "branch", tick: tick, color: branchColor })] }));
|
|
57
|
+
});
|
|
58
|
+
export const AnimatedConnector = memo(function AnimatedConnector({ tick, fromLevel, toLevel, isActive }) {
|
|
59
|
+
const color = isActive ? tuiColors.primary : tuiColors.textTertiary;
|
|
60
|
+
const rows = toLevel - fromLevel;
|
|
61
|
+
const connectorElements = useMemo(() => Array.from({ length: rows }).map((_, idx) => (_jsx(Box, { paddingLeft: 2, children: _jsx(AnimatedBranch, { type: "vertical", tick: tick, animated: isActive, color: color }) }, idx))), [rows, tick, isActive, color]);
|
|
62
|
+
return (_jsx(Box, { flexDirection: "column", children: connectorElements }));
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=AnimatedBranch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedBranch.js","sourceRoot":"","sources":["../../../src/tui/components/AnimatedBranch.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,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACnD,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACrD,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAYpG,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,cAAc,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,CAAC,EACR,QAAQ,GAAG,IAAI,EACf,MAAM,GAAG,CAAC,EAC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YAC3B,KAAC,cAAc,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAI,IADxE,GAAG,CAEP,CACP,CAAC,EACF,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAC9B,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACxB,iBAAiB,GACd,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface Message {
|
|
2
3
|
id: string;
|
|
3
4
|
type: "user" | "system" | "agent" | "error" | "success";
|
|
@@ -10,6 +11,6 @@ interface ChatPanelProps {
|
|
|
10
11
|
isProcessing: boolean;
|
|
11
12
|
isActive: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare
|
|
14
|
+
export declare const ChatPanel: React.NamedExoticComponent<ChatPanelProps>;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=ChatPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ChatPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ChatPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAK/E,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAgDD,eAAO,MAAM,SAAS,4CA2DpB,CAAC"}
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useEffect, useMemo, memo } from "react";
|
|
2
3
|
import { Box, Text } from "ink";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
import { tuiColors, formatTimestamp, getProviderTag } from "../styles/index.js";
|
|
5
|
+
import { TypingEffect, ProcessingIndicator } from "./animations/index.js";
|
|
6
|
+
const MESSAGE_CONFIG = {
|
|
7
|
+
user: { tag: "[YOU]", color: tuiColors.textPrimary },
|
|
8
|
+
system: { tag: "[SYS]", color: tuiColors.textTertiary },
|
|
9
|
+
agent: { tag: "[AGENT]", color: tuiColors.primary },
|
|
10
|
+
error: { tag: "[ERROR]", color: tuiColors.error },
|
|
11
|
+
success: { tag: "[SUCCESS]", color: tuiColors.success },
|
|
12
|
+
};
|
|
13
|
+
const MAX_DISPLAYED_MESSAGES = 12;
|
|
14
|
+
const TYPING_SPEED_PER_CHAR = 15;
|
|
15
|
+
const TYPING_BUFFER_MS = 500;
|
|
16
|
+
const MessageItem = memo(function MessageItem({ message, animate = false }) {
|
|
17
|
+
const config = MESSAGE_CONFIG[message.type];
|
|
18
|
+
const providerInfo = useMemo(() => message.agent ? getProviderTag(message.agent) : null, [message.agent]);
|
|
19
|
+
const tag = message.type === "agent" && message.agent
|
|
20
|
+
? `[${message.agent.toUpperCase().slice(0, 8)}]`
|
|
21
|
+
: config.tag;
|
|
22
|
+
const formattedTime = useMemo(() => formatTimestamp(message.timestamp), [message.timestamp]);
|
|
23
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: tuiColors.textTertiary, children: ["[", formattedTime, "]"] }), _jsx(Text, { color: config.color, bold: true, children: tag.padEnd(12) }), providerInfo && (_jsx(Text, { color: tuiColors.textTertiary, children: providerInfo.code }))] }), animate ? (_jsx(TypingEffect, { text: message.content, speed: TYPING_SPEED_PER_CHAR, showCursor: false })) : (_jsxs(Text, { color: tuiColors.textPrimary, children: [" ", message.content] }))] }));
|
|
24
|
+
});
|
|
25
|
+
export const ChatPanel = memo(function ChatPanel({ messages, isProcessing, isActive }) {
|
|
26
|
+
const borderColor = isActive ? tuiColors.primary : tuiColors.border;
|
|
27
|
+
const [animatingMessageId, setAnimatingMessageId] = useState(null);
|
|
28
|
+
const timeoutRef = React.useRef(null);
|
|
29
|
+
const displayMessages = useMemo(() => messages.slice(-MAX_DISPLAYED_MESSAGES), [messages]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (messages.length === 0)
|
|
32
|
+
return;
|
|
33
|
+
const lastMessage = messages[messages.length - 1];
|
|
34
|
+
if (lastMessage.type !== "agent" && lastMessage.type !== "system")
|
|
35
|
+
return;
|
|
36
|
+
if (timeoutRef.current)
|
|
37
|
+
clearTimeout(timeoutRef.current);
|
|
38
|
+
setAnimatingMessageId(lastMessage.id);
|
|
39
|
+
timeoutRef.current = setTimeout(() => {
|
|
40
|
+
setAnimatingMessageId(null);
|
|
41
|
+
}, lastMessage.content.length * TYPING_SPEED_PER_CHAR + TYPING_BUFFER_MS);
|
|
42
|
+
return () => {
|
|
43
|
+
if (timeoutRef.current)
|
|
44
|
+
clearTimeout(timeoutRef.current);
|
|
45
|
+
};
|
|
46
|
+
}, [messages]);
|
|
47
|
+
const messageElements = useMemo(() => displayMessages.map((msg) => (_jsx(MessageItem, { message: msg, animate: msg.id === animatingMessageId }, msg.id))), [displayMessages, animatingMessageId]);
|
|
48
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 2, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: tuiColors.primary, bold: true, children: "\u250C\u2500" }), _jsx(Text, { color: tuiColors.primary, bold: true, children: " CHAT " }), _jsx(Text, { color: tuiColors.textTertiary, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" })] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", children: [messageElements, isProcessing && _jsx(ProcessingIndicator, { text: "Processing" })] })] }));
|
|
49
|
+
});
|
|
31
50
|
//# sourceMappingURL=ChatPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPanel.js","sourceRoot":"","sources":["../../../src/tui/components/ChatPanel.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChatPanel.js","sourceRoot":"","sources":["../../../src/tui/components/ChatPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAe,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAgB1E,MAAM,cAAc,GAAmD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AC,aAEX,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,aAClB,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,IAAI,mCAAU,EAC9C,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,IAAI,6BAAc,EAClD,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,YAAY,+OAA8C,IAC7E,EAEN,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAC,QAAQ,aACvD,eAAe,EACf,YAAY,IAAI,KAAC,mBAAmB,IAAC,IAAI,EAAC,YAAY,GAAG,IACtD,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AgentState } from "./AgentStateIcon.js";
|
|
3
|
+
interface DAGSubtask {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
state: AgentState;
|
|
7
|
+
}
|
|
1
8
|
interface DAGNode {
|
|
2
9
|
id: string;
|
|
3
10
|
name: string;
|
|
4
11
|
status: "pending" | "running" | "done" | "error";
|
|
5
12
|
agent?: string;
|
|
13
|
+
state?: AgentState;
|
|
14
|
+
executionTime?: number;
|
|
15
|
+
detail?: string;
|
|
16
|
+
subtasks?: DAGSubtask[];
|
|
6
17
|
}
|
|
7
18
|
interface DAGLevel {
|
|
8
19
|
name: string;
|
|
9
20
|
progress: number;
|
|
10
21
|
nodes: DAGNode[];
|
|
22
|
+
status?: 'done' | 'running' | 'pending';
|
|
11
23
|
}
|
|
12
24
|
interface WorkflowState {
|
|
13
25
|
levels: DAGLevel[];
|
|
@@ -19,6 +31,6 @@ interface DAGPanelProps {
|
|
|
19
31
|
tick: number;
|
|
20
32
|
isActive: boolean;
|
|
21
33
|
}
|
|
22
|
-
export declare
|
|
23
|
-
export {};
|
|
34
|
+
export declare const DAGPanel: React.NamedExoticComponent<DAGPanelProps>;
|
|
35
|
+
export type { DAGNode, DAGLevel, WorkflowState, DAGSubtask };
|
|
24
36
|
//# sourceMappingURL=DAGPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DAGPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/DAGPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DAGPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/DAGPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAkB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACzC;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAgHD,UAAU,aAAa;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,2CAqDnB,CAAC;AAEH,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,30 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, memo } from "react";
|
|
2
3
|
import { Box, Text } from "ink";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { tuiColors, getStatusIndicator, getSpinnerFrame, treeChars } from "../styles/index.js";
|
|
5
|
+
import { AnimatedProgressBar } from "./animations/index.js";
|
|
6
|
+
import { AgentStateIcon } from "./AgentStateIcon.js";
|
|
7
|
+
const STATE_LABELS = {
|
|
8
|
+
idle: "pending",
|
|
9
|
+
thinking: "thinking...",
|
|
10
|
+
processing: "processing",
|
|
11
|
+
running: "running",
|
|
12
|
+
success: "done",
|
|
13
|
+
error: "error",
|
|
14
|
+
waiting: "waiting",
|
|
8
15
|
};
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
16
|
+
const DAGNodeItem = memo(function DAGNodeItem({ node, tick, isLast }) {
|
|
17
|
+
const statusInfo = useMemo(() => getStatusIndicator(node.status), [node.status]);
|
|
18
|
+
const agentState = useMemo(() => {
|
|
19
|
+
if (node.state)
|
|
20
|
+
return node.state;
|
|
21
|
+
if (node.status === 'running')
|
|
22
|
+
return 'running';
|
|
23
|
+
if (node.status === 'done')
|
|
24
|
+
return 'success';
|
|
25
|
+
if (node.status === 'error')
|
|
26
|
+
return 'error';
|
|
27
|
+
return 'idle';
|
|
28
|
+
}, [node.state, node.status]);
|
|
29
|
+
const icon = node.status === "running"
|
|
30
|
+
? getSpinnerFrame(tick, "dots")
|
|
31
|
+
: statusInfo.icon;
|
|
32
|
+
const prefix = isLast ? treeChars.lastBranch : treeChars.branch;
|
|
33
|
+
const timeStr = node.executionTime ? `${node.executionTime.toFixed(1)}s` : "";
|
|
34
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: tuiColors.textTertiary, children: [prefix, " "] }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: tuiColors.textSecondary, children: "[" }), _jsx(AgentStateIcon, { state: agentState, tick: tick }), _jsx(Text, { color: tuiColors.textSecondary, children: "]" })] }), _jsxs(Text, { color: tuiColors.textPrimary, children: [" ", node.name.padEnd(18)] }), timeStr && (_jsxs(Text, { color: tuiColors.textTertiary, children: [" \u25CF ", timeStr] }))] }), node.detail && (_jsx(Box, { flexDirection: "row", children: _jsxs(Text, { color: tuiColors.textTertiary, children: [" \u2514\u2500\u2500 ", node.detail] }) })), node.subtasks && node.subtasks.length > 0 && (_jsx(Box, { flexDirection: "column", children: node.subtasks.map((subtask, idx) => (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: tuiColors.textTertiary, children: [" ", idx === node.subtasks.length - 1 ? '└──' : '├──', " "] }), _jsx(AgentStateIcon, { state: subtask.state, tick: tick }), _jsxs(Text, { color: tuiColors.textTertiary, children: [" ", subtask.name] })] }, subtask.id))) }))] }));
|
|
35
|
+
});
|
|
36
|
+
const DAGLevelView = memo(function DAGLevelView({ level, tick, isActive }) {
|
|
37
|
+
const levelColor = isActive ? tuiColors.primary : tuiColors.textSecondary;
|
|
38
|
+
const statusColor = level.status === 'done'
|
|
39
|
+
? tuiColors.success
|
|
40
|
+
: level.status === 'running'
|
|
41
|
+
? tuiColors.warning
|
|
42
|
+
: tuiColors.textTertiary;
|
|
43
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: levelColor, bold: true, children: level.name.padEnd(12) }), _jsx(AnimatedProgressBar, { progress: level.progress, width: 16, tick: tick, animated: isActive, showMarker: isActive, glowEffect: isActive })] }), _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: isActive ? tuiColors.primary : tuiColors.textTertiary, children: isActive ? "┃" : "│" }) }), level.nodes.map((node, idx) => (_jsx(DAGNodeItem, { node: node, tick: tick, isLast: idx === level.nodes.length - 1 }, node.id)))] }));
|
|
44
|
+
});
|
|
45
|
+
export const DAGPanel = memo(function DAGPanel({ workflowState, tick, isActive }) {
|
|
46
|
+
const borderColor = isActive ? tuiColors.primary : tuiColors.border;
|
|
47
|
+
const levelViews = useMemo(() => workflowState.levels.map((level, index) => (_jsx(DAGLevelView, { level: level, tick: tick, isActive: index === workflowState.currentLevel }, level.name))), [workflowState.levels, workflowState.currentLevel, tick]);
|
|
48
|
+
const isAnimating = useMemo(() => workflowState.totalProgress > 0 && workflowState.totalProgress < 100, [workflowState.totalProgress]);
|
|
49
|
+
return (_jsxs(Box, { flexDirection: "column", width: 46, borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: tuiColors.primary, bold: true, children: "\u250C\u2500" }), _jsx(Text, { color: tuiColors.primary, bold: true, children: " DAG_EXECUTION " }), _jsx(Text, { color: tuiColors.textTertiary, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" })] }), _jsx(Box, { flexDirection: "column", flexGrow: 1, children: levelViews }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: tuiColors.textTertiary, children: "\u251C\u2500 TOTAL \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }) }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: tuiColors.textSecondary, children: "Progress: " }), _jsx(AnimatedProgressBar, { progress: workflowState.totalProgress, width: 16, tick: tick, animated: isAnimating, showMarker: true })] })] }));
|
|
50
|
+
});
|
|
30
51
|
//# sourceMappingURL=DAGPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DAGPanel.js","sourceRoot":"","sources":["../../../src/tui/components/DAGPanel.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DAGPanel.js","sourceRoot":"","sources":["../../../src/tui/components/DAGPanel.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAsCjE,MAAM,YAAY,GAA+B;IAC/C,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAoB;IACpF,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,C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N,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,YACpC,UAAU,GACP,EAEN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,YAAY,0LAA2C,GAC1E,EACN,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,aAAa,2BAAmB,EACvD,KAAC,mBAAmB,IAClB,QAAQ,EAAE,aAAa,CAAC,aAAa,EACrC,KAAK,EAAE,EAAE,EACT,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,WAAW,EACrB,UAAU,SACV,IACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TimelineAgent {
|
|
3
|
+
name: string;
|
|
4
|
+
startTime: number;
|
|
5
|
+
endTime?: number;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
interface TimelineLevel {
|
|
10
|
+
name: string;
|
|
11
|
+
startTime: number;
|
|
12
|
+
endTime?: number;
|
|
13
|
+
progress: number;
|
|
14
|
+
status: 'done' | 'running' | 'pending';
|
|
15
|
+
}
|
|
16
|
+
export interface ExecutionTimelineProps {
|
|
17
|
+
tick: number;
|
|
18
|
+
totalDuration: number;
|
|
19
|
+
currentTime: number;
|
|
20
|
+
levels: TimelineLevel[];
|
|
21
|
+
agents: TimelineAgent[];
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
width?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const ExecutionTimeline: React.NamedExoticComponent<ExecutionTimelineProps>;
|
|
26
|
+
interface MiniTimelineProps {
|
|
27
|
+
progress: number;
|
|
28
|
+
tick: number;
|
|
29
|
+
isActive: boolean;
|
|
30
|
+
width?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare const MiniTimeline: React.NamedExoticComponent<MiniTimelineProps>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=ExecutionTimeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionTimeline.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ExecutionTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAK7C,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkFD,eAAO,MAAM,iBAAiB,oDAwF5B,CAAC;AAEH,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,+CAgBvB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
import { tuiColors } from "../styles/index.js";
|
|
5
|
+
import { AnimatedBranch } from "./AnimatedBranch.js";
|
|
6
|
+
const ACTIVE_MARKER_FRAMES = ["┃", "║", "┃", "║"];
|
|
7
|
+
const BAR_COLORS = {
|
|
8
|
+
done: tuiColors.success,
|
|
9
|
+
running: tuiColors.warning,
|
|
10
|
+
pending: tuiColors.textTertiary,
|
|
11
|
+
};
|
|
12
|
+
const STATUS_TEXT = {
|
|
13
|
+
done: (endTime) => `done at ${endTime?.toFixed(1)}s`,
|
|
14
|
+
running: () => "running...",
|
|
15
|
+
pending: () => "pending",
|
|
16
|
+
};
|
|
17
|
+
function formatTime(s) {
|
|
18
|
+
return `${s}s`;
|
|
19
|
+
}
|
|
20
|
+
const TimelineBar = memo(function TimelineBar({ level, timeScale, width, currentTime }) {
|
|
21
|
+
const startCol = Math.floor(level.startTime * timeScale);
|
|
22
|
+
const endCol = level.endTime
|
|
23
|
+
? Math.floor(level.endTime * timeScale)
|
|
24
|
+
: Math.floor(currentTime * timeScale);
|
|
25
|
+
const barWidth = Math.max(0, endCol - startCol);
|
|
26
|
+
const beforeBar = "░".repeat(startCol);
|
|
27
|
+
const barChar = level.status === 'done' ? "█" : level.status === 'running' ? "▓" : "░";
|
|
28
|
+
const afterBar = "░".repeat(Math.max(0, width - endCol));
|
|
29
|
+
const statusText = STATUS_TEXT[level.status](level.endTime);
|
|
30
|
+
const paddedName = useMemo(() => level.name.padEnd(4), [level.name]);
|
|
31
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: tuiColors.textTertiary, children: [paddedName, " "] }), _jsxs(Text, { color: BAR_COLORS[level.status], children: [beforeBar, barChar.repeat(barWidth)] }), _jsx(Text, { color: tuiColors.textTertiary, children: afterBar }), _jsxs(Text, { color: tuiColors.textTertiary, children: [" ", statusText] })] }));
|
|
32
|
+
});
|
|
33
|
+
const AgentTimeline = memo(function AgentTimeline({ agent, timeScale, width, currentTime }) {
|
|
34
|
+
const startCol = Math.floor(agent.startTime * timeScale);
|
|
35
|
+
const endCol = agent.endTime
|
|
36
|
+
? Math.floor(agent.endTime * timeScale)
|
|
37
|
+
: Math.floor(currentTime * timeScale);
|
|
38
|
+
const barWidth = Math.max(0, endCol - startCol);
|
|
39
|
+
const indent = " ".repeat(startCol);
|
|
40
|
+
const bar = agent.isActive ? "─".repeat(barWidth) + "▶" : "─".repeat(barWidth) + "┘";
|
|
41
|
+
const afterBar = " ".repeat(Math.max(0, width - endCol - 1));
|
|
42
|
+
const agentColor = agent.color || (agent.isActive ? tuiColors.primary : tuiColors.textSecondary);
|
|
43
|
+
const prefix = agent.isActive ? "▶" : "●";
|
|
44
|
+
const paddedName = useMemo(() => agent.name.padEnd(10), [agent.name]);
|
|
45
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: agentColor, children: [prefix, " ", paddedName, " "] }), _jsx(Text, { color: tuiColors.textTertiary, children: indent }), _jsx(Text, { color: agentColor, children: bar }), _jsx(Text, { color: tuiColors.textTertiary, children: afterBar })] }));
|
|
46
|
+
});
|
|
47
|
+
export const ExecutionTimeline = memo(function ExecutionTimeline({ tick, totalDuration, currentTime, levels, agents, isActive = false, width = 50, }) {
|
|
48
|
+
const borderColor = isActive ? tuiColors.primary : tuiColors.border;
|
|
49
|
+
const timeScale = width / totalDuration;
|
|
50
|
+
const markerPositions = [0, 5, 10, 15, 20];
|
|
51
|
+
const activeMarker = isActive ? ACTIVE_MARKER_FRAMES[tick % ACTIVE_MARKER_FRAMES.length] : "│";
|
|
52
|
+
const markerElements = useMemo(() => markerPositions.map((pos, idx) => (_jsx(Box, { width: 10, children: _jsx(Text, { color: tuiColors.textTertiary, children: formatTime(pos).padStart(6) }) }, idx))), []);
|
|
53
|
+
const separatorElements = useMemo(() => Array.from({ length: 5 }).map((_, idx) => (_jsx(Box, { width: 10, children: _jsx(Text, { color: tuiColors.textTertiary, children: idx === 0 ? "│" : " │" }) }, idx))), []);
|
|
54
|
+
const levelElements = useMemo(() => levels.map((level, idx) => (_jsx(Box, { marginBottom: 1, children: _jsx(TimelineBar, { level: level, timeScale: timeScale, width: width, currentTime: currentTime }) }, idx))), [levels, timeScale, width, currentTime]);
|
|
55
|
+
const agentElements = useMemo(() => agents.map((agent, idx) => (_jsx(Box, { children: _jsx(AgentTimeline, { agent: agent, timeScale: timeScale, width: width, currentTime: currentTime }) }, idx))), [agents, timeScale, width, currentTime]);
|
|
56
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: borderColor, paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: tuiColors.primary, bold: true, children: "\u250C\u2500" }), _jsx(Text, { color: tuiColors.primary, bold: true, children: " EXECUTION_TIMELINE " }), _jsx(Text, { color: tuiColors.textTertiary, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" })] }), _jsx(Box, { flexDirection: "row", marginBottom: 1, children: markerElements }), _jsx(Box, { flexDirection: "row", marginBottom: 1, children: separatorElements }), _jsx(Box, { flexDirection: "row", marginBottom: 1, children: _jsx(Text, { color: tuiColors.textTertiary, children: "├" + "─".repeat(width - 2) + "┤" }) }), _jsx(Box, { flexDirection: "column", children: levelElements }), _jsx(Box, { flexDirection: "row", marginTop: 1, marginBottom: 1, children: _jsx(AnimatedBranch, { type: "vertical", tick: tick, animated: isActive }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: tuiColors.textSecondary, children: "Agents:" }) }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: agentElements })] }));
|
|
57
|
+
});
|
|
58
|
+
export const MiniTimeline = memo(function MiniTimeline({ progress, tick, isActive, width = 30 }) {
|
|
59
|
+
const filled = Math.floor((progress / 100) * width);
|
|
60
|
+
const empty = width - filled;
|
|
61
|
+
const currentPos = Math.min(filled, width - 1);
|
|
62
|
+
const before = "─".repeat(currentPos);
|
|
63
|
+
const marker = isActive ? "●" : "○";
|
|
64
|
+
const after = "─".repeat(empty);
|
|
65
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: tuiColors.textTertiary, children: ["\u251C", before] }), _jsx(Text, { color: isActive ? tuiColors.primary : tuiColors.textSecondary, children: marker }), _jsxs(Text, { color: tuiColors.textTertiary, children: [after, "\u2524"] })] }));
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=ExecutionTimeline.js.map
|