@nex-ai/nex 0.1.25 → 0.1.26
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/README.md +8 -13
- package/dist/cli.d.ts +2 -1
- package/dist/commands/dispatch.js +18 -2
- package/dist/commands/dispatch.js.map +1 -1
- package/dist/commands/graph.d.ts +1 -0
- package/dist/commands/graph.js +7 -12
- package/dist/commands/graph.js.map +1 -1
- package/dist/index.d.ts +6 -23
- package/dist/index.js +41 -57
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts +1 -0
- package/dist/lib/client.js +33 -0
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.js +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/file-scanner.js +45 -37
- package/dist/lib/file-scanner.js.map +1 -1
- package/dist/plugin/config.js +20 -4
- package/dist/plugin/config.js.map +1 -1
- package/dist/plugin/shared.js +2 -2
- package/dist/tui/app.d.ts +1 -2
- package/dist/tui/app.js +4 -26
- package/dist/tui/app.js.map +1 -1
- package/dist/tui/components/agent-card.js +2 -27
- package/dist/tui/components/agent-card.js.map +1 -1
- package/dist/tui/components/banner.js +6 -15
- package/dist/tui/components/banner.js.map +1 -1
- package/dist/tui/components/channel-message.js +11 -61
- package/dist/tui/components/channel-message.js.map +1 -1
- package/dist/tui/components/chat-input.js +3 -7
- package/dist/tui/components/chat-input.js.map +1 -1
- package/dist/tui/components/data-table.js +15 -37
- package/dist/tui/components/data-table.js.map +1 -1
- package/dist/tui/components/error-box.js +2 -21
- package/dist/tui/components/error-box.js.map +1 -1
- package/dist/tui/components/help-screen.js +2 -31
- package/dist/tui/components/help-screen.js.map +1 -1
- package/dist/tui/components/inline-confirm.js +2 -21
- package/dist/tui/components/inline-confirm.js.map +1 -1
- package/dist/tui/components/inline-select.js +2 -22
- package/dist/tui/components/inline-select.js.map +1 -1
- package/dist/tui/components/markdown.js +21 -59
- package/dist/tui/components/markdown.js.map +1 -1
- package/dist/tui/components/mention-autocomplete.js +14 -22
- package/dist/tui/components/mention-autocomplete.js.map +1 -1
- package/dist/tui/components/message-list.js +6 -19
- package/dist/tui/components/message-list.js.map +1 -1
- package/dist/tui/components/picker.js +9 -23
- package/dist/tui/components/picker.js.map +1 -1
- package/dist/tui/components/progress-steps.js +5 -12
- package/dist/tui/components/progress-steps.js.map +1 -1
- package/dist/tui/components/slack/compose.js +10 -34
- package/dist/tui/components/slack/compose.js.map +1 -1
- package/dist/tui/components/slack/layout.js +3 -37
- package/dist/tui/components/slack/layout.js.map +1 -1
- package/dist/tui/components/slack/messages.js +20 -73
- package/dist/tui/components/slack/messages.js.map +1 -1
- package/dist/tui/components/slack/quick-switcher.js +5 -42
- package/dist/tui/components/slack/quick-switcher.js.map +1 -1
- package/dist/tui/components/slack/sidebar.js +12 -57
- package/dist/tui/components/slack/sidebar.js.map +1 -1
- package/dist/tui/components/slack/thread-panel.js +7 -76
- package/dist/tui/components/slack/thread-panel.js.map +1 -1
- package/dist/tui/components/slash-autocomplete.js +13 -22
- package/dist/tui/components/slash-autocomplete.js.map +1 -1
- package/dist/tui/components/spinner.js +4 -6
- package/dist/tui/components/spinner.js.map +1 -1
- package/dist/tui/components/status-bar.js +4 -66
- package/dist/tui/components/status-bar.js.map +1 -1
- package/dist/tui/components/success-box.js +2 -13
- package/dist/tui/components/success-box.js.map +1 -1
- package/dist/tui/components/tool-indicator.js +4 -14
- package/dist/tui/components/tool-indicator.js.map +1 -1
- package/dist/tui/components/viewport.js +3 -11
- package/dist/tui/components/viewport.js.map +1 -1
- package/dist/tui/generative/renderer.js +25 -71
- package/dist/tui/generative/renderer.js.map +1 -1
- package/dist/tui/index.js +2 -5
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/register-views.js +12 -11
- package/dist/tui/register-views.js.map +1 -1
- package/dist/tui/router.d.ts +1 -1
- package/dist/tui/router.js +10 -31
- package/dist/tui/router.js.map +1 -1
- package/dist/tui/theme.d.ts +1 -2
- package/dist/tui/theme.js +3 -4
- package/dist/tui/theme.js.map +1 -1
- package/dist/tui/views/agent-list.js +2 -21
- package/dist/tui/views/agent-list.js.map +1 -1
- package/dist/tui/views/ask-chat.js +3 -30
- package/dist/tui/views/ask-chat.js.map +1 -1
- package/dist/tui/views/calendar.js +5 -49
- package/dist/tui/views/calendar.js.map +1 -1
- package/dist/tui/views/chat.js +7 -45
- package/dist/tui/views/chat.js.map +1 -1
- package/dist/tui/views/generative.js +5 -49
- package/dist/tui/views/generative.js.map +1 -1
- package/dist/tui/views/help.js +2 -12
- package/dist/tui/views/help.js.map +1 -1
- package/dist/tui/views/home-screen.js +25 -140
- package/dist/tui/views/home-screen.js.map +1 -1
- package/dist/tui/views/home.js +8 -56
- package/dist/tui/views/home.js.map +1 -1
- package/dist/tui/views/insights.js +7 -49
- package/dist/tui/views/insights.js.map +1 -1
- package/dist/tui/views/orchestration.js +7 -63
- package/dist/tui/views/orchestration.js.map +1 -1
- package/dist/tui/views/record-detail.js +3 -28
- package/dist/tui/views/record-detail.js.map +1 -1
- package/dist/tui/views/record-list.js +3 -26
- package/dist/tui/views/record-list.js.map +1 -1
- package/dist/tui/views/slack-channel-header.js +4 -23
- package/dist/tui/views/slack-channel-header.js.map +1 -1
- package/dist/tui/views/slack-home.js +3 -14
- package/dist/tui/views/slack-home.js.map +1 -1
- package/dist/tui/views/task-board.js +5 -46
- package/dist/tui/views/task-board.js.map +1 -1
- package/dist/tui/views/timeline.js +9 -52
- package/dist/tui/views/timeline.js.map +1 -1
- package/package.json +14 -10
package/dist/tui/views/home.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
* Conversation-first home view.
|
|
3
4
|
*
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
* When a picker or confirm prompt is active, the TextInput is hidden
|
|
8
9
|
* and the interactive widget is shown instead.
|
|
9
10
|
*/
|
|
10
|
-
import
|
|
11
|
+
import { useState } from "react";
|
|
11
12
|
import { Box, Text, useStdout } from "ink";
|
|
12
13
|
import { TextInput } from "@inkjs/ui";
|
|
13
14
|
import { InlineSelect } from "../components/inline-select.js";
|
|
@@ -17,35 +18,15 @@ function MessageBubble({ msg }) {
|
|
|
17
18
|
const streamingCursor = msg.isStreaming ? "▌" : "";
|
|
18
19
|
switch (msg.role) {
|
|
19
20
|
case "user":
|
|
20
|
-
return (
|
|
21
|
-
<Text bold color="white">
|
|
22
|
-
{"> "}
|
|
23
|
-
</Text>
|
|
24
|
-
<Text>{msg.content}</Text>
|
|
25
|
-
</Box>);
|
|
21
|
+
return (_jsxs(Box, { paddingX: 2, children: [_jsx(Text, { bold: true, color: "white", children: "> " }), _jsx(Text, { children: msg.content })] }));
|
|
26
22
|
case "assistant":
|
|
27
|
-
return (
|
|
28
|
-
<Text color={msg.isError ? "red" : "cyan"}>
|
|
29
|
-
{msg.content}{streamingCursor}
|
|
30
|
-
</Text>
|
|
31
|
-
</Box>);
|
|
23
|
+
return (_jsx(Box, { paddingX: 2, flexDirection: "column", children: _jsxs(Text, { color: msg.isError ? "red" : "cyan", children: [msg.content, streamingCursor] }) }));
|
|
32
24
|
case "system":
|
|
33
|
-
return (
|
|
34
|
-
<Text color="yellow" dimColor>
|
|
35
|
-
{msg.content}
|
|
36
|
-
</Text>
|
|
37
|
-
</Box>);
|
|
25
|
+
return (_jsx(Box, { paddingX: 2, justifyContent: "center", children: _jsx(Text, { color: "yellow", dimColor: true, children: msg.content }) }));
|
|
38
26
|
case "tool":
|
|
39
|
-
return (
|
|
40
|
-
{msg.toolName && (<Text dimColor bold>
|
|
41
|
-
{`[${msg.toolName}] `}
|
|
42
|
-
</Text>)}
|
|
43
|
-
<Text dimColor>{msg.content}</Text>
|
|
44
|
-
</Box>);
|
|
27
|
+
return (_jsxs(Box, { paddingX: 4, children: [msg.toolName && (_jsx(Text, { dimColor: true, bold: true, children: `[${msg.toolName}] ` })), _jsx(Text, { dimColor: true, children: msg.content })] }));
|
|
45
28
|
default:
|
|
46
|
-
return (
|
|
47
|
-
<Text>{msg.content}</Text>
|
|
48
|
-
</Box>);
|
|
29
|
+
return (_jsx(Box, { paddingX: 2, children: _jsx(Text, { children: msg.content }) }));
|
|
49
30
|
}
|
|
50
31
|
}
|
|
51
32
|
// ── Conversation view ───────────────────────────────────────────────
|
|
@@ -72,36 +53,7 @@ export function ConversationView({ messages, onSubmit, isLoading = false, loadin
|
|
|
72
53
|
setSubmitKey((k) => k + 1);
|
|
73
54
|
};
|
|
74
55
|
const hasWidget = picker != null || confirm != null;
|
|
75
|
-
return (
|
|
76
|
-
{/* Message history */}
|
|
77
|
-
<Box flexDirection="column" flexGrow={1}>
|
|
78
|
-
{displayMessages.map((msg) => (<Box key={msg.id} marginBottom={0}>
|
|
79
|
-
<MessageBubble msg={msg}/>
|
|
80
|
-
</Box>))}
|
|
81
|
-
|
|
82
|
-
{/* Loading indicator */}
|
|
83
|
-
{isLoading && (<Box paddingX={2}>
|
|
84
|
-
<Text color="cyan" dimColor>
|
|
85
|
-
{` ${loadingHint}`}
|
|
86
|
-
</Text>
|
|
87
|
-
</Box>)}
|
|
88
|
-
</Box>
|
|
89
|
-
|
|
90
|
-
{/* Divider */}
|
|
91
|
-
<Box paddingX={1}>
|
|
92
|
-
<Text dimColor>
|
|
93
|
-
{"─".repeat(Math.min(stdout?.columns ?? 60, 120) - 2)}
|
|
94
|
-
</Text>
|
|
95
|
-
</Box>
|
|
96
|
-
|
|
97
|
-
{/* Interactive widget area: picker, confirm, or text input */}
|
|
98
|
-
{picker != null ? (<InlineSelect title={picker.title} options={picker.options} onSelect={picker.onSelect}/>) : confirm != null ? (<InlineConfirm question={confirm.question} onConfirm={confirm.onConfirm}/>) : (<Box paddingX={1}>
|
|
99
|
-
<Text bold color="cyan">
|
|
100
|
-
{"> "}
|
|
101
|
-
</Text>
|
|
102
|
-
<TextInput key={submitKey} placeholder="Type a message or /help..." onChange={setInputValue} onSubmit={handleSubmit}/>
|
|
103
|
-
</Box>)}
|
|
104
|
-
</Box>);
|
|
56
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", minHeight: visibleRows + 3, children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [displayMessages.map((msg) => (_jsx(Box, { marginBottom: 0, children: _jsx(MessageBubble, { msg: msg }) }, msg.id))), isLoading && (_jsx(Box, { paddingX: 2, children: _jsx(Text, { color: "cyan", dimColor: true, children: ` ${loadingHint}` }) }))] }), _jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, children: "─".repeat(Math.min(stdout?.columns ?? 60, 120) - 2) }) }), picker != null ? (_jsx(InlineSelect, { title: picker.title, options: picker.options, onSelect: picker.onSelect })) : confirm != null ? (_jsx(InlineConfirm, { question: confirm.question, onConfirm: confirm.onConfirm })) : (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "> " }), _jsx(TextInput, { placeholder: "Type a message or /help...", onChange: setInputValue, onSubmit: handleSubmit }, submitKey)] }))] }));
|
|
105
57
|
}
|
|
106
58
|
// Keep the default export for backward compat
|
|
107
59
|
export default ConversationView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/tui/views/home.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/tui/views/home.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AA0B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AA4B,EACxC,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,IAHjB,SAAS,CAId,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAED,8CAA8C;AAC9C,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
* Insights dashboard view.
|
|
3
|
-
* Displays insights from the context graph with priority badges,
|
|
4
|
-
* categories, and linked record IDs.
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
2
|
import { Box, Text } from 'ink';
|
|
8
3
|
// ── Helpers ──
|
|
9
4
|
function priorityBadge(priority) {
|
|
10
5
|
switch (priority) {
|
|
11
6
|
case 'critical':
|
|
12
|
-
return
|
|
7
|
+
return _jsx(Text, { color: "red", bold: true, children: "[CRIT]" });
|
|
13
8
|
case 'high':
|
|
14
|
-
return
|
|
9
|
+
return _jsx(Text, { color: "red", children: "[HIGH]" });
|
|
15
10
|
case 'medium':
|
|
16
|
-
return
|
|
11
|
+
return _jsx(Text, { color: "yellow", children: "[MED]" });
|
|
17
12
|
case 'low':
|
|
18
|
-
return
|
|
13
|
+
return _jsx(Text, { dimColor: true, children: "[LOW]" });
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
function formatTimestamp(ts) {
|
|
@@ -42,47 +37,10 @@ function formatTimestamp(ts) {
|
|
|
42
37
|
}
|
|
43
38
|
// ── Sub-components ──
|
|
44
39
|
function InsightCard({ insight }) {
|
|
45
|
-
return (
|
|
46
|
-
{/* Header line: priority + category + title */}
|
|
47
|
-
<Box gap={1}>
|
|
48
|
-
{priorityBadge(insight.priority)}
|
|
49
|
-
<Text color="magenta">[{insight.category}]</Text>
|
|
50
|
-
<Text bold color="blue">{insight.title}</Text>
|
|
51
|
-
</Box>
|
|
52
|
-
|
|
53
|
-
{/* Body — indented */}
|
|
54
|
-
{insight.body && (<Box paddingLeft={2}>
|
|
55
|
-
<Text>{insight.body}</Text>
|
|
56
|
-
</Box>)}
|
|
57
|
-
|
|
58
|
-
{/* Record IDs — muted */}
|
|
59
|
-
{insight.recordIds && insight.recordIds.length > 0 && (<Box paddingLeft={2}>
|
|
60
|
-
<Text dimColor>Records: {insight.recordIds.join(', ')}</Text>
|
|
61
|
-
</Box>)}
|
|
62
|
-
|
|
63
|
-
{/* Timestamp — muted */}
|
|
64
|
-
<Box paddingLeft={2}>
|
|
65
|
-
<Text dimColor>{formatTimestamp(insight.timestamp)}</Text>
|
|
66
|
-
</Box>
|
|
67
|
-
</Box>);
|
|
40
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { gap: 1, children: [priorityBadge(insight.priority), _jsxs(Text, { color: "magenta", children: ["[", insight.category, "]"] }), _jsx(Text, { bold: true, color: "blue", children: insight.title })] }), insight.body && (_jsx(Box, { paddingLeft: 2, children: _jsx(Text, { children: insight.body }) })), insight.recordIds && insight.recordIds.length > 0 && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["Records: ", insight.recordIds.join(', ')] }) })), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { dimColor: true, children: formatTimestamp(insight.timestamp) }) })] }));
|
|
68
41
|
}
|
|
69
42
|
// ── Main view ──
|
|
70
43
|
export function InsightsView({ insights }) {
|
|
71
|
-
return (
|
|
72
|
-
<Text bold color="cyan">
|
|
73
|
-
Insights
|
|
74
|
-
</Text>
|
|
75
|
-
<Box height={1}/>
|
|
76
|
-
|
|
77
|
-
{insights.length === 0 ? (<Text color="gray"> No insights found. Try expanding the time window.</Text>) : (<Box flexDirection="column">
|
|
78
|
-
<Text dimColor>{insights.length} insight{insights.length !== 1 ? 's' : ''}</Text>
|
|
79
|
-
<Box height={1}/>
|
|
80
|
-
{insights.map((insight, i) => (<InsightCard key={insight.id ?? i} insight={insight}/>))}
|
|
81
|
-
</Box>)}
|
|
82
|
-
|
|
83
|
-
<Text color="gray">
|
|
84
|
-
[Esc=back /insights --last 24h]
|
|
85
|
-
</Text>
|
|
86
|
-
</Box>);
|
|
44
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 0, children: [_jsx(Text, { bold: true, color: "cyan", children: "Insights" }), _jsx(Box, { height: 1 }), insights.length === 0 ? (_jsx(Text, { color: "gray", children: " No insights found. Try expanding the time window." })) : (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: [insights.length, " insight", insights.length !== 1 ? 's' : ''] }), _jsx(Box, { height: 1 }), insights.map((insight, i) => (_jsx(InsightCard, { insight: insight }, insight.id ?? i)))] })), _jsx(Text, { color: "gray", children: "[Esc=back /insights --last 24h]" })] }));
|
|
87
45
|
}
|
|
88
46
|
//# sourceMappingURL=insights.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../../../src/tui/views/insights.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../../../src/tui/views/insights.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAkBhC,gBAAgB;AAEhB,SAAS,aAAa,CAAC,QAA6B;IAClD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,UAAU;YACb,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,6BAAc,CAAC;QAC9C,KAAK,MAAM;YACT,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,uBAAc,CAAC;QACzC,KAAK,QAAQ;YACX,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,sBAAa,CAAC;QAC3C,KAAK,KAAK;YACR,OAAO,KAAC,IAAI,IAAC,QAAQ,4BAAa,CAAC;IACvC,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,IA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EAAE,EAAE,CAAC,CAC5B,KAAC,WAAW,IAAuB,OAAO,EAAE,OAAO,IAAjC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAsB,CACxD,CAAC,IACE,CACP,EAED,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,iDAEX,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Orchestration dashboard view.
|
|
3
|
-
* Shows active goals, task pool, per-agent budgets, and global budget.
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
6
2
|
import { Box, Text } from 'ink';
|
|
7
3
|
// ── Helpers ──
|
|
8
4
|
function statusIcon(status) {
|
|
@@ -50,80 +46,28 @@ function GoalRow({ goal, tasks, }) {
|
|
|
50
46
|
const goalTasks = tasks.filter((t) => t.parentGoalId === goal.id);
|
|
51
47
|
const completed = goalTasks.filter((t) => t.status === 'completed').length;
|
|
52
48
|
const total = goalTasks.length;
|
|
53
|
-
return (
|
|
54
|
-
<Text color="gray">{goal === undefined ? '\u2514' : '\u251C'} </Text>
|
|
55
|
-
<Text>{goal.title} </Text>
|
|
56
|
-
<Text color="gray">[{completed}/{total} tasks] </Text>
|
|
57
|
-
<Text color={statusColor(goal.status)}>
|
|
58
|
-
{statusIcon(goal.status)} {goal.status}
|
|
59
|
-
</Text>
|
|
60
|
-
</Box>);
|
|
49
|
+
return (_jsxs(Box, { children: [_jsxs(Text, { color: "gray", children: [goal === undefined ? '\u2514' : '\u251C', " "] }), _jsxs(Text, { children: [goal.title, " "] }), _jsxs(Text, { color: "gray", children: ["[", completed, "/", total, " tasks] "] }), _jsxs(Text, { color: statusColor(goal.status), children: [statusIcon(goal.status), " ", goal.status] })] }));
|
|
61
50
|
}
|
|
62
51
|
function GoalSection({ goals, tasks, }) {
|
|
63
52
|
if (goals.length === 0) {
|
|
64
|
-
return (
|
|
65
|
-
<Text bold>Goals</Text>
|
|
66
|
-
<Text color="gray"> No goals defined yet.</Text>
|
|
67
|
-
</Box>);
|
|
53
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Goals" }), _jsx(Text, { color: "gray", children: " No goals defined yet." })] }));
|
|
68
54
|
}
|
|
69
55
|
const active = goals.filter((g) => g.status === 'active').length;
|
|
70
|
-
return (
|
|
71
|
-
<Text bold>Goals ({active} active)</Text>
|
|
72
|
-
{goals.map((goal, i) => (<GoalRow key={goal.id ?? i} goal={goal} tasks={tasks}/>))}
|
|
73
|
-
</Box>);
|
|
56
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { bold: true, children: ["Goals (", active, " active)"] }), goals.map((goal, i) => (_jsx(GoalRow, { goal: goal, tasks: tasks }, goal.id ?? i)))] }));
|
|
74
57
|
}
|
|
75
58
|
function TaskPoolSection({ tasks, }) {
|
|
76
59
|
const completed = countByStatus(tasks, 'completed');
|
|
77
60
|
const inProgress = countByStatus(tasks, 'in_progress') + countByStatus(tasks, 'locked');
|
|
78
61
|
const pending = countByStatus(tasks, 'pending');
|
|
79
62
|
const failed = countByStatus(tasks, 'failed');
|
|
80
|
-
return (
|
|
81
|
-
<Text bold>Task Pool</Text>
|
|
82
|
-
<Box gap={2}>
|
|
83
|
-
<Text color="green">{'\u25CF'} {completed} completed</Text>
|
|
84
|
-
<Text color="yellow">{'\u25D0'} {inProgress} in progress</Text>
|
|
85
|
-
<Text color="gray">{'\u25CB'} {pending} pending</Text>
|
|
86
|
-
{failed > 0 && (<Text color="red">{'\u2716'} {failed} failed</Text>)}
|
|
87
|
-
</Box>
|
|
88
|
-
</Box>);
|
|
63
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Task Pool" }), _jsxs(Box, { gap: 2, children: [_jsxs(Text, { color: "green", children: ['\u25CF', " ", completed, " completed"] }), _jsxs(Text, { color: "yellow", children: ['\u25D0', " ", inProgress, " in progress"] }), _jsxs(Text, { color: "gray", children: ['\u25CB', " ", pending, " pending"] }), failed > 0 && (_jsxs(Text, { color: "red", children: ['\u2716', " ", failed, " failed"] }))] })] }));
|
|
89
64
|
}
|
|
90
65
|
function BudgetSection({ budgets, globalBudget, }) {
|
|
91
66
|
const globalPercent = Math.max(globalBudget.percentTokens, globalBudget.percentCost);
|
|
92
|
-
return (
|
|
93
|
-
<Text bold>Budget</Text>
|
|
94
|
-
{budgets.map((b) => (<Box key={b.agentSlug} gap={1}>
|
|
95
|
-
<Text>
|
|
96
|
-
{b.agentSlug.padEnd(14)}
|
|
97
|
-
</Text>
|
|
98
|
-
<Text color={b.warning ? 'red' : b.percentUsed > 50 ? 'yellow' : 'green'}>
|
|
99
|
-
{budgetBar(b.percentUsed)}
|
|
100
|
-
</Text>
|
|
101
|
-
<Text> {Math.round(b.percentUsed)}%</Text>
|
|
102
|
-
<Text color="gray"> ${b.costUsd.toFixed(2)}</Text>
|
|
103
|
-
</Box>))}
|
|
104
|
-
<Box gap={1}>
|
|
105
|
-
<Text>{'Global'.padEnd(14)}</Text>
|
|
106
|
-
<Text color={globalPercent > 80 ? 'red' : globalPercent > 50 ? 'yellow' : 'green'}>
|
|
107
|
-
{budgetBar(globalPercent)}
|
|
108
|
-
</Text>
|
|
109
|
-
<Text> {Math.round(globalPercent)}%</Text>
|
|
110
|
-
<Text color="gray"> ${globalBudget.cost.toFixed(2)}</Text>
|
|
111
|
-
</Box>
|
|
112
|
-
</Box>);
|
|
67
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Budget" }), budgets.map((b) => (_jsxs(Box, { gap: 1, children: [_jsx(Text, { children: b.agentSlug.padEnd(14) }), _jsx(Text, { color: b.warning ? 'red' : b.percentUsed > 50 ? 'yellow' : 'green', children: budgetBar(b.percentUsed) }), _jsxs(Text, { children: [" ", Math.round(b.percentUsed), "%"] }), _jsxs(Text, { color: "gray", children: [" $", b.costUsd.toFixed(2)] })] }, b.agentSlug))), _jsxs(Box, { gap: 1, children: [_jsx(Text, { children: 'Global'.padEnd(14) }), _jsx(Text, { color: globalPercent > 80 ? 'red' : globalPercent > 50 ? 'yellow' : 'green', children: budgetBar(globalPercent) }), _jsxs(Text, { children: [" ", Math.round(globalPercent), "%"] }), _jsxs(Text, { color: "gray", children: [" $", globalBudget.cost.toFixed(2)] })] })] }));
|
|
113
68
|
}
|
|
114
69
|
// ── Main view ──
|
|
115
70
|
export function OrchestrationView({ goals, tasks, budgets, globalBudget, }) {
|
|
116
|
-
return (
|
|
117
|
-
<Text bold color="cyan">
|
|
118
|
-
Orchestration
|
|
119
|
-
</Text>
|
|
120
|
-
<Box height={1}/>
|
|
121
|
-
<GoalSection goals={goals} tasks={tasks}/>
|
|
122
|
-
<TaskPoolSection tasks={tasks}/>
|
|
123
|
-
<BudgetSection budgets={budgets} globalBudget={globalBudget}/>
|
|
124
|
-
<Text color="gray">
|
|
125
|
-
[Esc=back t=tasks g=goals w=workflows]
|
|
126
|
-
</Text>
|
|
127
|
-
</Box>);
|
|
71
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 0, children: [_jsx(Text, { bold: true, color: "cyan", children: "Orchestration" }), _jsx(Box, { height: 1 }), _jsx(GoalSection, { goals: goals, tasks: tasks }), _jsx(TaskPoolSection, { tasks: tasks }), _jsx(BudgetSection, { budgets: budgets, globalBudget: globalBudget }), _jsx(Text, { color: "gray", children: "[Esc=back t=tasks g=goals w=workflows]" })] }));
|
|
128
72
|
}
|
|
129
73
|
//# sourceMappingURL=orchestration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.js","sourceRoot":"","sources":["../../../src/tui/views/orchestration.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestration.js","sourceRoot":"","sources":["../../../src/tui/views/orchestration.tsx"],"names":[],"mappings":";AA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AE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,YAC9E,SAAS,CAAC,aAAa,CAAC,GACpB,EACP,MAAC,IAAI,oBAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAC1C,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,mBAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAQ,IACtD,IACF,CACP,CAAC;AACJ,CAAC;AAED,kBAAkB;AAElB,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,OAAO,EACP,YAAY,GACW;IACvB,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,OAAO,EACnB,WAAW,EAAC,MAAM,EAClB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,aAEX,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,8BAEhB,EACP,KAAC,GAAG,IAAC,MAAM,EAAE,CAAC,GAAI,EAClB,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAI,EAC3C,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,GAAI,EACjC,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,GAAI,EAC/D,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,0DAEX,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { Box, Text } from "ink";
|
|
3
4
|
import { Viewport } from "../components/viewport.js";
|
|
4
5
|
// --- Helpers ---
|
|
@@ -15,33 +16,7 @@ function formatAttributes(attrs) {
|
|
|
15
16
|
export function RecordDetailView({ objectType, recordId, recordLabel, attributes, onBack: _onBack, }) {
|
|
16
17
|
const [scrollOffset, setScrollOffset] = useState(0);
|
|
17
18
|
const content = formatAttributes(attributes);
|
|
18
|
-
return (
|
|
19
|
-
{/* Header */}
|
|
20
|
-
<Box paddingX={2} marginBottom={1} flexDirection="column">
|
|
21
|
-
<Box>
|
|
22
|
-
<Text bold color="cyan">
|
|
23
|
-
{recordLabel}
|
|
24
|
-
</Text>
|
|
25
|
-
</Box>
|
|
26
|
-
<Box>
|
|
27
|
-
<Text dimColor>{`${objectType} \u2502 ${recordId}`}</Text>
|
|
28
|
-
</Box>
|
|
29
|
-
</Box>
|
|
30
|
-
|
|
31
|
-
{/* Attributes */}
|
|
32
|
-
<Box paddingX={1}>
|
|
33
|
-
<Viewport content={content} scrollOffset={scrollOffset} onScroll={setScrollOffset}/>
|
|
34
|
-
</Box>
|
|
35
|
-
|
|
36
|
-
{/* Timeline hint */}
|
|
37
|
-
<Box paddingX={2} marginTop={1}>
|
|
38
|
-
<Text dimColor>
|
|
39
|
-
{"Tip: run "}
|
|
40
|
-
</Text>
|
|
41
|
-
<Text color="cyan">{`nex record timeline ${recordId}`}</Text>
|
|
42
|
-
<Text dimColor>{" to see activity"}</Text>
|
|
43
|
-
</Box>
|
|
44
|
-
</Box>);
|
|
19
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsxs(Box, { paddingX: 2, marginBottom: 1, flexDirection: "column", children: [_jsx(Box, { children: _jsx(Text, { bold: true, color: "cyan", children: recordLabel }) }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: `${objectType} \u2502 ${recordId}` }) })] }), _jsx(Box, { paddingX: 1, children: _jsx(Viewport, { content: content, scrollOffset: scrollOffset, onScroll: setScrollOffset }) }), _jsxs(Box, { paddingX: 2, marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Tip: run " }), _jsx(Text, { color: "cyan", children: `nex record timeline ${recordId}` }), _jsx(Text, { dimColor: true, children: " to see activity" })] })] }));
|
|
45
20
|
}
|
|
46
21
|
export default RecordDetailView;
|
|
47
22
|
//# sourceMappingURL=record-detail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-detail.js","sourceRoot":"","sources":["../../../src/tui/views/record-detail.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"record-detail.js","sourceRoot":"","sources":["../../../src/tui/views/record-detail.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAYrD,kBAAkB;AAElB,SAAS,gBAAgB,CAAC,KAA6B;IACrD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CACxB,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAC1C,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE;QAClB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,KAAK,MAAM,KAAK,GAAG,EAAE,CAAC;IAC/B,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,oBAAoB;AAEpB,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EAAE,OAAO,GACO;IACtB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAE7C,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,aAEtC,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,aACvD,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,YACpB,WAAW,GACP,GACH,EACN,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,QAAQ,kBAAE,GAAG,UAAU,WAAW,QAAQ,EAAE,GAAQ,GACtD,IACF,EAGN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,eAAe,GACzB,GACE,EAGN,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,aAC5B,KAAC,IAAI,IAAC,QAAQ,kBACX,WAAW,GACP,EACP,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,uBAAuB,QAAQ,EAAE,GAAQ,EAC7D,KAAC,IAAI,IAAC,QAAQ,kBAAE,kBAAkB,GAAQ,IACtC,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { Box, Text } from "ink";
|
|
3
4
|
import { Picker } from "../components/picker.js";
|
|
4
5
|
// --- Component ---
|
|
@@ -15,31 +16,7 @@ export function RecordListView({ objectType, records, columns, onSelect, onBack:
|
|
|
15
16
|
if (record)
|
|
16
17
|
onSelect?.(record);
|
|
17
18
|
};
|
|
18
|
-
return (
|
|
19
|
-
{/* Header */}
|
|
20
|
-
<Box paddingX={2} marginBottom={1}>
|
|
21
|
-
<Text bold color="cyan">
|
|
22
|
-
{objectType}
|
|
23
|
-
</Text>
|
|
24
|
-
<Text dimColor>{` (${records.length} records)`}</Text>
|
|
25
|
-
</Box>
|
|
26
|
-
|
|
27
|
-
{/* Column headers */}
|
|
28
|
-
<Box paddingX={3}>
|
|
29
|
-
<Box minWidth={4}>
|
|
30
|
-
<Text bold dimColor>{"#"}</Text>
|
|
31
|
-
</Box>
|
|
32
|
-
<Box minWidth={20}>
|
|
33
|
-
<Text bold>{"Name"}</Text>
|
|
34
|
-
</Box>
|
|
35
|
-
{columns.map((col) => (<Box key={col} minWidth={16}>
|
|
36
|
-
<Text bold dimColor>{col}</Text>
|
|
37
|
-
</Box>))}
|
|
38
|
-
</Box>
|
|
39
|
-
|
|
40
|
-
{/* Records */}
|
|
41
|
-
<Picker items={items} cursor={cursor} onSelect={handleSelect} onCursorChange={setCursor} quickSelect/>
|
|
42
|
-
</Box>);
|
|
19
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsxs(Box, { paddingX: 2, marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: objectType }), _jsx(Text, { dimColor: true, children: ` (${records.length} records)` })] }), _jsxs(Box, { paddingX: 3, children: [_jsx(Box, { minWidth: 4, children: _jsx(Text, { bold: true, dimColor: true, children: "#" }) }), _jsx(Box, { minWidth: 20, children: _jsx(Text, { bold: true, children: "Name" }) }), columns.map((col) => (_jsx(Box, { minWidth: 16, children: _jsx(Text, { bold: true, dimColor: true, children: col }) }, col)))] }), _jsx(Picker, { items: items, cursor: cursor, onSelect: handleSelect, onCursorChange: setCursor, quickSelect: true })] }));
|
|
43
20
|
}
|
|
44
21
|
export default RecordListView;
|
|
45
22
|
//# sourceMappingURL=record-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-list.js","sourceRoot":"","sources":["../../../src/tui/views/record-list.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"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MAAM,YACpB,UAAU,GACN,EACP,KAAC,IAAI,IAAC,QAAQ,kBAAE,KAAK,OAAO,CAAC,MAAM,WAAW,GAAQ,IAClD,EAGN,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,aACd,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,QAAC,QAAQ,kBAAE,GAAG,GAAQ,GAC5B,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,EAAE,YACf,KAAC,IAAI,IAAC,IAAI,kBAAE,MAAM,GAAQ,GACtB,EACL,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,KAAC,GAAG,IAAW,QAAQ,EAAE,EAAE,YACzB,KAAC,IAAI,IAAC,IAAI,QAAC,QAAQ,kBAAE,GAAG,GAAQ,IADxB,GAAG,CAEP,CACP,CAAC,IACE,EAGN,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,EACtB,cAAc,EAAE,SAAS,EACzB,WAAW,SACX,IACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,35 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
* Slack-style channel header bar.
|
|
3
|
-
*
|
|
4
|
-
* Shows channel name (with # prefix for channels, presence dot for DMs),
|
|
5
|
-
* topic line, and action hints. Sits at the top of the main panel.
|
|
6
|
-
*/
|
|
7
|
-
import React from "react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
2
|
import { Box, Text } from "ink";
|
|
9
3
|
export function ChannelHeader({ name, type, online, focused, }) {
|
|
10
4
|
let prefix;
|
|
11
5
|
if (type === "channel") {
|
|
12
|
-
prefix =
|
|
6
|
+
prefix = _jsx(Text, { color: focused ? "cyan" : "gray", children: "# " });
|
|
13
7
|
}
|
|
14
8
|
else {
|
|
15
9
|
const dotColor = online ? "green" : "gray";
|
|
16
10
|
const dot = online ? "●" : "○";
|
|
17
|
-
prefix =
|
|
11
|
+
prefix = _jsxs(Text, { color: dotColor, children: [dot, " "] });
|
|
18
12
|
}
|
|
19
|
-
return (
|
|
20
|
-
<Box gap={1}>
|
|
21
|
-
{focused && <Text color="black" backgroundColor="cyan" bold>{" MESSAGES "}</Text>}
|
|
22
|
-
{prefix}
|
|
23
|
-
<Text bold color={focused ? "cyan" : "white"}>
|
|
24
|
-
{name}
|
|
25
|
-
</Text>
|
|
26
|
-
</Box>
|
|
27
|
-
<Box gap={2}>
|
|
28
|
-
{focused && <Text color="cyan">{"↑↓ scroll"}</Text>}
|
|
29
|
-
<Text color="gray">Ctrl+K search</Text>
|
|
30
|
-
<Text color="gray">Tab focus</Text>
|
|
31
|
-
</Box>
|
|
32
|
-
</Box>);
|
|
13
|
+
return (_jsxs(Box, { paddingX: 1, justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [focused && _jsx(Text, { color: "black", backgroundColor: "cyan", bold: true, children: " MESSAGES " }), prefix, _jsx(Text, { bold: true, color: focused ? "cyan" : "white", children: name })] }), _jsxs(Box, { gap: 2, children: [focused && _jsx(Text, { color: "cyan", children: "↑↓ scroll" }), _jsx(Text, { color: "gray", children: "Ctrl+K search" }), _jsx(Text, { color: "gray", children: "Tab focus" })] })] }));
|
|
33
14
|
}
|
|
34
15
|
export default ChannelHeader;
|
|
35
16
|
//# sourceMappingURL=slack-channel-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack-channel-header.js","sourceRoot":"","sources":["../../../src/tui/views/slack-channel-header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slack-channel-header.js","sourceRoot":"","sources":["../../../src/tui/views/slack-channel-header.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,I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";
|
|
1
2
|
/**
|
|
2
3
|
* SlackHome — the main Slack-style home view.
|
|
3
4
|
*
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
* - Compose area with slash commands and @mentions
|
|
10
11
|
* - Agent routing: DM → steer(), channel → broadcast
|
|
11
12
|
*/
|
|
12
|
-
import
|
|
13
|
+
import { useState, useEffect, useMemo, useCallback } from "react";
|
|
13
14
|
import { useStdout } from "ink";
|
|
14
15
|
import { SlackLayout, computeLayout } from "../components/slack/layout.js";
|
|
15
16
|
import { SlackSidebar } from "../components/slack/sidebar.js";
|
|
@@ -565,19 +566,7 @@ export function SlackHome({ push }) {
|
|
|
565
566
|
// ── Layout metrics ──
|
|
566
567
|
const layout = computeLayout(cols, threadOpen);
|
|
567
568
|
// ── Render ──
|
|
568
|
-
return (
|
|
569
|
-
{/* Channel header */}
|
|
570
|
-
<ChannelHeader name={activeChannelName} type={activeChannelType} online={activeItem?.online} focused={focusSection === "messages"}/>
|
|
571
|
-
|
|
572
|
-
{/* Message list */}
|
|
573
|
-
<SlackMessageList messages={allMessages} onThreadOpen={handleOpenThread} width={layout.mainWidth}/>
|
|
574
|
-
|
|
575
|
-
{/* Loading indicator */}
|
|
576
|
-
{isLoading && <Spinner label={loadingHint || "thinking..."}/>}
|
|
577
|
-
|
|
578
|
-
{/* Inline widgets */}
|
|
579
|
-
{picker != null ? (<InlineSelect title={picker.title} options={picker.options} onSelect={picker.onSelect}/>) : confirm != null ? (<InlineConfirm question={confirm.question} onConfirm={confirm.onConfirm}/>) : (<ComposeArea channelName={activeChannelName} channelType={activeChannelType} recipientName={activeChannelType === "dm" ? activeChannelName : undefined} focused={focusSection === "compose"} onSubmit={handleSend} slashCommands={slashCommandEntries} agents={agentEntries}/>)}
|
|
580
|
-
</>} thread={threadOpen && threadParentMessage ? (<ThreadPanel width={layout.threadWidth} focused={focusSection === "thread"} parentMessage={threadParentMessage} replies={threadReplies} sourceChannelName={activeChannelName} sourceChannelType={activeChannelType} alsoSendToChannel={false} onSendReply={handleThreadReply} onToggleAlsoSend={() => { }} onClose={handleCloseThread} slashCommands={slashCommandEntries} agents={agentEntries}/>) : undefined} overlay={quickSwitcherOpen ? (<QuickSwitcher open={quickSwitcherOpen} items={switcherItems} onSelect={handleQuickSwitcherSelect} onClose={() => setQuickSwitcherOpen(false)}/>) : undefined}/>);
|
|
569
|
+
return (_jsx(SlackLayout, { cols: cols, rows: rows, threadOpen: threadOpen, focusSection: focusSection, sidebar: _jsx(SlackSidebar, { width: layout.sidebarWidth, focused: focusSection === "sidebar", workspaceName: "Nex Workspace", sections: sidebarSections, collapsedSections: collapsedSections, activeChannelId: activeChannelId, cursor: sidebarCursor, onToggleSection: handleToggleSection, onSelectItem: handleSidebarSelect }), main: _jsxs(_Fragment, { children: [_jsx(ChannelHeader, { name: activeChannelName, type: activeChannelType, online: activeItem?.online, focused: focusSection === "messages" }), _jsx(SlackMessageList, { messages: allMessages, onThreadOpen: handleOpenThread, width: layout.mainWidth }), isLoading && _jsx(Spinner, { label: loadingHint || "thinking..." }), picker != null ? (_jsx(InlineSelect, { title: picker.title, options: picker.options, onSelect: picker.onSelect })) : confirm != null ? (_jsx(InlineConfirm, { question: confirm.question, onConfirm: confirm.onConfirm })) : (_jsx(ComposeArea, { channelName: activeChannelName, channelType: activeChannelType, recipientName: activeChannelType === "dm" ? activeChannelName : undefined, focused: focusSection === "compose", onSubmit: handleSend, slashCommands: slashCommandEntries, agents: agentEntries }))] }), thread: threadOpen && threadParentMessage ? (_jsx(ThreadPanel, { width: layout.threadWidth, focused: focusSection === "thread", parentMessage: threadParentMessage, replies: threadReplies, sourceChannelName: activeChannelName, sourceChannelType: activeChannelType, alsoSendToChannel: false, onSendReply: handleThreadReply, onToggleAlsoSend: () => { }, onClose: handleCloseThread, slashCommands: slashCommandEntries, agents: agentEntries })) : undefined, overlay: quickSwitcherOpen ? (_jsx(QuickSwitcher, { open: quickSwitcherOpen, items: switcherItems, onSelect: handleQuickSwitcherSelect, onClose: () => setQuickSwitcherOpen(false) })) : undefined }));
|
|
581
570
|
}
|
|
582
571
|
export default SlackHome;
|
|
583
572
|
//# sourceMappingURL=slack-home.js.map
|