orquesta-cli 0.2.81 → 0.2.82
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/ui/TodoPanel.js
CHANGED
|
@@ -54,6 +54,18 @@ export const TodoPanel = React.memo(({ todos, currentTodoId, isProcessing = fals
|
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
const completedCount = todos.filter(t => t.status === 'completed').length;
|
|
57
|
+
const MAX_VISIBLE_TODOS = 6;
|
|
58
|
+
let visibleTodos = todos;
|
|
59
|
+
let collapsedAbove = 0;
|
|
60
|
+
let hiddenBelow = 0;
|
|
61
|
+
if (todos.length > MAX_VISIBLE_TODOS) {
|
|
62
|
+
const firstActiveIdx = todos.findIndex(t => t.status !== 'completed');
|
|
63
|
+
const anchor = firstActiveIdx === -1 ? todos.length - MAX_VISIBLE_TODOS : firstActiveIdx;
|
|
64
|
+
const start = Math.max(0, Math.min(anchor, todos.length - MAX_VISIBLE_TODOS));
|
|
65
|
+
collapsedAbove = start;
|
|
66
|
+
visibleTodos = todos.slice(start, start + MAX_VISIBLE_TODOS);
|
|
67
|
+
hiddenBelow = todos.length - start - visibleTodos.length;
|
|
68
|
+
}
|
|
57
69
|
const formatElapsedTime = (seconds) => {
|
|
58
70
|
const hrs = Math.floor(seconds / 3600);
|
|
59
71
|
const mins = Math.floor((seconds % 3600) / 60);
|
|
@@ -64,21 +76,33 @@ export const TodoPanel = React.memo(({ todos, currentTodoId, isProcessing = fals
|
|
|
64
76
|
return `${mins}:${secs.toString().padStart(2, '0')}`;
|
|
65
77
|
};
|
|
66
78
|
return (React.createElement(Box, { flexDirection: "column", paddingX: 1 },
|
|
67
|
-
React.createElement(Box, { flexDirection: "column" },
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
React.createElement(Box, { flexDirection: "column" },
|
|
80
|
+
collapsedAbove > 0 && (React.createElement(Text, { color: "gray", dimColor: true },
|
|
81
|
+
"\u2611 ",
|
|
82
|
+
collapsedAbove,
|
|
83
|
+
" earlier task",
|
|
84
|
+
collapsedAbove === 1 ? '' : 's',
|
|
85
|
+
" completed")),
|
|
86
|
+
visibleTodos.map((todo) => {
|
|
87
|
+
const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
|
|
88
|
+
const isInProgress = todo.status === 'in_progress';
|
|
89
|
+
const isCompleted = todo.status === 'completed';
|
|
90
|
+
return (React.createElement(Box, { key: todo.id, flexDirection: "column" },
|
|
91
|
+
React.createElement(Box, null,
|
|
92
|
+
React.createElement(Box, { width: 2 }, isInProgress && isProcessing ? (React.createElement(Text, { color: "blueBright" },
|
|
93
|
+
React.createElement(Spinner, { type: "dots2" }))) : (React.createElement(Text, { color: config.color }, config.icon))),
|
|
94
|
+
React.createElement(Text, { color: isCompleted ? 'gray' : isInProgress ? 'white' : 'gray', bold: isInProgress, dimColor: isCompleted, strikethrough: isCompleted }, todo.title),
|
|
95
|
+
isInProgress && isProcessing && (React.createElement(Text, { color: "blueBright" }, " \u2190"))),
|
|
96
|
+
todo.error && (React.createElement(Box, { marginLeft: 2 },
|
|
97
|
+
React.createElement(Text, { color: "red", dimColor: true },
|
|
98
|
+
"\u26A0 ",
|
|
99
|
+
todo.error)))));
|
|
100
|
+
}),
|
|
101
|
+
hiddenBelow > 0 && (React.createElement(Text, { color: "gray", dimColor: true },
|
|
102
|
+
"\u2026 ",
|
|
103
|
+
hiddenBelow,
|
|
104
|
+
" more task",
|
|
105
|
+
hiddenBelow === 1 ? '' : 's'))),
|
|
82
106
|
React.createElement(Box, { marginTop: 1, justifyContent: "space-between" },
|
|
83
107
|
React.createElement(ProgressBar, { completed: completedCount, total: todos.length, width: 20 }),
|
|
84
108
|
isProcessing && (React.createElement(Text, { color: "yellow" }, formatElapsedTime(elapsedTime))))));
|
|
@@ -4,6 +4,6 @@ export const StreamingOutput = ({ text }) => {
|
|
|
4
4
|
if (!text)
|
|
5
5
|
return null;
|
|
6
6
|
return (React.createElement(Box, { marginTop: 1, paddingX: 1 },
|
|
7
|
-
React.createElement(Text, { wrap: "wrap" }, text.split('\n').slice(-
|
|
7
|
+
React.createElement(Text, { wrap: "wrap" }, text.split('\n').slice(-8).join('\n'))));
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=StreamingOutput.js.map
|