@vaporsoft/orc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +6 -0
- package/README.md +178 -0
- package/dist/bin/orc.d.ts +3 -0
- package/dist/bin/orc.d.ts.map +1 -0
- package/dist/bin/orc.js +4 -0
- package/dist/bin/orc.js.map +1 -0
- package/dist/src/cli.d.ts +6 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +28 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/init.d.ts +6 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +58 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/start.d.ts +17 -0
- package/dist/src/commands/start.d.ts.map +1 -0
- package/dist/src/commands/start.js +146 -0
- package/dist/src/commands/start.js.map +1 -0
- package/dist/src/constants.d.ts +18 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +42 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/core/comment-categorizer.d.ts +20 -0
- package/dist/src/core/comment-categorizer.d.ts.map +1 -0
- package/dist/src/core/comment-categorizer.js +208 -0
- package/dist/src/core/comment-categorizer.js.map +1 -0
- package/dist/src/core/comment-fetcher.d.ts +37 -0
- package/dist/src/core/comment-fetcher.d.ts.map +1 -0
- package/dist/src/core/comment-fetcher.js +138 -0
- package/dist/src/core/comment-fetcher.js.map +1 -0
- package/dist/src/core/daemon.d.ts +92 -0
- package/dist/src/core/daemon.d.ts.map +1 -0
- package/dist/src/core/daemon.js +896 -0
- package/dist/src/core/daemon.js.map +1 -0
- package/dist/src/core/fix-executor.d.ts +50 -0
- package/dist/src/core/fix-executor.d.ts.map +1 -0
- package/dist/src/core/fix-executor.js +374 -0
- package/dist/src/core/fix-executor.js.map +1 -0
- package/dist/src/core/git-manager.d.ts +44 -0
- package/dist/src/core/git-manager.d.ts.map +1 -0
- package/dist/src/core/git-manager.js +230 -0
- package/dist/src/core/git-manager.js.map +1 -0
- package/dist/src/core/pilot-config.d.ts +18 -0
- package/dist/src/core/pilot-config.d.ts.map +1 -0
- package/dist/src/core/pilot-config.js +76 -0
- package/dist/src/core/pilot-config.js.map +1 -0
- package/dist/src/core/progress-store.d.ts +32 -0
- package/dist/src/core/progress-store.d.ts.map +1 -0
- package/dist/src/core/progress-store.js +106 -0
- package/dist/src/core/progress-store.js.map +1 -0
- package/dist/src/core/repo-config.d.ts +11 -0
- package/dist/src/core/repo-config.d.ts.map +1 -0
- package/dist/src/core/repo-config.js +168 -0
- package/dist/src/core/repo-config.js.map +1 -0
- package/dist/src/core/session-controller.d.ts +61 -0
- package/dist/src/core/session-controller.d.ts.map +1 -0
- package/dist/src/core/session-controller.js +926 -0
- package/dist/src/core/session-controller.js.map +1 -0
- package/dist/src/core/thread-responder.d.ts +28 -0
- package/dist/src/core/thread-responder.d.ts.map +1 -0
- package/dist/src/core/thread-responder.js +193 -0
- package/dist/src/core/thread-responder.js.map +1 -0
- package/dist/src/core/worktree-manager.d.ts +26 -0
- package/dist/src/core/worktree-manager.d.ts.map +1 -0
- package/dist/src/core/worktree-manager.js +189 -0
- package/dist/src/core/worktree-manager.js.map +1 -0
- package/dist/src/github/gh-client.d.ts +57 -0
- package/dist/src/github/gh-client.d.ts.map +1 -0
- package/dist/src/github/gh-client.js +236 -0
- package/dist/src/github/gh-client.js.map +1 -0
- package/dist/src/github/queries.d.ts +9 -0
- package/dist/src/github/queries.d.ts.map +1 -0
- package/dist/src/github/queries.js +152 -0
- package/dist/src/github/queries.js.map +1 -0
- package/dist/src/github/types.d.ts +114 -0
- package/dist/src/github/types.d.ts.map +1 -0
- package/dist/src/github/types.js +3 -0
- package/dist/src/github/types.js.map +1 -0
- package/dist/src/tui/App.d.ts +8 -0
- package/dist/src/tui/App.d.ts.map +1 -0
- package/dist/src/tui/App.js +407 -0
- package/dist/src/tui/App.js.map +1 -0
- package/dist/src/tui/components/ActivityPane.d.ts +7 -0
- package/dist/src/tui/components/ActivityPane.d.ts.map +1 -0
- package/dist/src/tui/components/ActivityPane.js +10 -0
- package/dist/src/tui/components/ActivityPane.js.map +1 -0
- package/dist/src/tui/components/DetailPanel.d.ts +15 -0
- package/dist/src/tui/components/DetailPanel.d.ts.map +1 -0
- package/dist/src/tui/components/DetailPanel.js +137 -0
- package/dist/src/tui/components/DetailPanel.js.map +1 -0
- package/dist/src/tui/components/DrillInOverlay.d.ts +13 -0
- package/dist/src/tui/components/DrillInOverlay.d.ts.map +1 -0
- package/dist/src/tui/components/DrillInOverlay.js +85 -0
- package/dist/src/tui/components/DrillInOverlay.js.map +1 -0
- package/dist/src/tui/components/ExpandedContent.d.ts +10 -0
- package/dist/src/tui/components/ExpandedContent.d.ts.map +1 -0
- package/dist/src/tui/components/ExpandedContent.js +99 -0
- package/dist/src/tui/components/ExpandedContent.js.map +1 -0
- package/dist/src/tui/components/Header.d.ts +12 -0
- package/dist/src/tui/components/Header.d.ts.map +1 -0
- package/dist/src/tui/components/Header.js +35 -0
- package/dist/src/tui/components/Header.js.map +1 -0
- package/dist/src/tui/components/HelpBar.d.ts +2 -0
- package/dist/src/tui/components/HelpBar.d.ts.map +1 -0
- package/dist/src/tui/components/HelpBar.js +11 -0
- package/dist/src/tui/components/HelpBar.js.map +1 -0
- package/dist/src/tui/components/KeybindLegend.d.ts +7 -0
- package/dist/src/tui/components/KeybindLegend.d.ts.map +1 -0
- package/dist/src/tui/components/KeybindLegend.js +53 -0
- package/dist/src/tui/components/KeybindLegend.js.map +1 -0
- package/dist/src/tui/components/LogPane.d.ts +11 -0
- package/dist/src/tui/components/LogPane.d.ts.map +1 -0
- package/dist/src/tui/components/LogPane.js +31 -0
- package/dist/src/tui/components/LogPane.js.map +1 -0
- package/dist/src/tui/components/SessionList.d.ts +14 -0
- package/dist/src/tui/components/SessionList.d.ts.map +1 -0
- package/dist/src/tui/components/SessionList.js +31 -0
- package/dist/src/tui/components/SessionList.js.map +1 -0
- package/dist/src/tui/components/SessionRow.d.ts +10 -0
- package/dist/src/tui/components/SessionRow.d.ts.map +1 -0
- package/dist/src/tui/components/SessionRow.js +52 -0
- package/dist/src/tui/components/SessionRow.js.map +1 -0
- package/dist/src/tui/components/SettingsPanel.d.ts +8 -0
- package/dist/src/tui/components/SettingsPanel.d.ts.map +1 -0
- package/dist/src/tui/components/SettingsPanel.js +191 -0
- package/dist/src/tui/components/SettingsPanel.js.map +1 -0
- package/dist/src/tui/components/StatusBadge.d.ts +9 -0
- package/dist/src/tui/components/StatusBadge.d.ts.map +1 -0
- package/dist/src/tui/components/StatusBadge.js +52 -0
- package/dist/src/tui/components/StatusBadge.js.map +1 -0
- package/dist/src/tui/components/Toolbar.d.ts +5 -0
- package/dist/src/tui/components/Toolbar.d.ts.map +1 -0
- package/dist/src/tui/components/Toolbar.js +2 -0
- package/dist/src/tui/components/Toolbar.js.map +1 -0
- package/dist/src/tui/components/comment-constants.d.ts +4 -0
- package/dist/src/tui/components/comment-constants.d.ts.map +1 -0
- package/dist/src/tui/components/comment-constants.js +15 -0
- package/dist/src/tui/components/comment-constants.js.map +1 -0
- package/dist/src/tui/hooks/logFlushUtils.d.ts +15 -0
- package/dist/src/tui/hooks/logFlushUtils.d.ts.map +1 -0
- package/dist/src/tui/hooks/logFlushUtils.js +33 -0
- package/dist/src/tui/hooks/logFlushUtils.js.map +1 -0
- package/dist/src/tui/hooks/useBranchLogs.d.ts +7 -0
- package/dist/src/tui/hooks/useBranchLogs.d.ts.map +1 -0
- package/dist/src/tui/hooks/useBranchLogs.js +58 -0
- package/dist/src/tui/hooks/useBranchLogs.js.map +1 -0
- package/dist/src/tui/hooks/useDaemonState.d.ts +19 -0
- package/dist/src/tui/hooks/useDaemonState.d.ts.map +1 -0
- package/dist/src/tui/hooks/useDaemonState.js +152 -0
- package/dist/src/tui/hooks/useDaemonState.js.map +1 -0
- package/dist/src/tui/hooks/useInitialDiscovery.d.ts +8 -0
- package/dist/src/tui/hooks/useInitialDiscovery.d.ts.map +1 -0
- package/dist/src/tui/hooks/useInitialDiscovery.js +31 -0
- package/dist/src/tui/hooks/useInitialDiscovery.js.map +1 -0
- package/dist/src/tui/hooks/useLogBuffer.d.ts +7 -0
- package/dist/src/tui/hooks/useLogBuffer.d.ts.map +1 -0
- package/dist/src/tui/hooks/useLogBuffer.js +52 -0
- package/dist/src/tui/hooks/useLogBuffer.js.map +1 -0
- package/dist/src/tui/hooks/useNextCheckCountdown.d.ts +7 -0
- package/dist/src/tui/hooks/useNextCheckCountdown.d.ts.map +1 -0
- package/dist/src/tui/hooks/useNextCheckCountdown.js +42 -0
- package/dist/src/tui/hooks/useNextCheckCountdown.js.map +1 -0
- package/dist/src/tui/hooks/useTerminalFocus.d.ts +9 -0
- package/dist/src/tui/hooks/useTerminalFocus.d.ts.map +1 -0
- package/dist/src/tui/hooks/useTerminalFocus.js +43 -0
- package/dist/src/tui/hooks/useTerminalFocus.js.map +1 -0
- package/dist/src/tui/theme.d.ts +32 -0
- package/dist/src/tui/theme.d.ts.map +1 -0
- package/dist/src/tui/theme.js +61 -0
- package/dist/src/tui/theme.js.map +1 -0
- package/dist/src/types/config.d.ts +35 -0
- package/dist/src/types/config.d.ts.map +1 -0
- package/dist/src/types/config.js +14 -0
- package/dist/src/types/config.js.map +1 -0
- package/dist/src/types/index.d.ts +107 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +3 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/utils/concurrency.d.ts +7 -0
- package/dist/src/utils/concurrency.d.ts.map +1 -0
- package/dist/src/utils/concurrency.js +26 -0
- package/dist/src/utils/concurrency.js.map +1 -0
- package/dist/src/utils/format.d.ts +2 -0
- package/dist/src/utils/format.d.ts.map +1 -0
- package/dist/src/utils/format.js +8 -0
- package/dist/src/utils/format.js.map +1 -0
- package/dist/src/utils/logger.d.ts +39 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +120 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/dist/src/utils/notify.d.ts +6 -0
- package/dist/src/utils/notify.d.ts.map +1 -0
- package/dist/src/utils/notify.js +15 -0
- package/dist/src/utils/notify.js.map +1 -0
- package/dist/src/utils/open-terminal.d.ts +12 -0
- package/dist/src/utils/open-terminal.d.ts.map +1 -0
- package/dist/src/utils/open-terminal.js +93 -0
- package/dist/src/utils/open-terminal.js.map +1 -0
- package/dist/src/utils/process.d.ts +14 -0
- package/dist/src/utils/process.d.ts.map +1 -0
- package/dist/src/utils/process.js +36 -0
- package/dist/src/utils/process.js.map +1 -0
- package/dist/src/utils/project-detector.d.ts +12 -0
- package/dist/src/utils/project-detector.d.ts.map +1 -0
- package/dist/src/utils/project-detector.js +123 -0
- package/dist/src/utils/project-detector.js.map +1 -0
- package/dist/src/utils/quoting.d.ts +15 -0
- package/dist/src/utils/quoting.d.ts.map +1 -0
- package/dist/src/utils/quoting.js +39 -0
- package/dist/src/utils/quoting.js.map +1 -0
- package/dist/src/utils/retry.d.ts +14 -0
- package/dist/src/utils/retry.d.ts.map +1 -0
- package/dist/src/utils/retry.js +41 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/utils/settings.d.ts +14 -0
- package/dist/src/utils/settings.d.ts.map +1 -0
- package/dist/src/utils/settings.js +21 -0
- package/dist/src/utils/settings.js.map +1 -0
- package/dist/src/utils/time.d.ts +2 -0
- package/dist/src/utils/time.d.ts.map +1 -0
- package/dist/src/utils/time.js +5 -0
- package/dist/src/utils/time.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
import { formatTime } from "../../utils/time.js";
|
|
5
|
+
import { formatTokens } from "../../utils/format.js";
|
|
6
|
+
/** Returns the ordered list of visible sections for the given entry. */
|
|
7
|
+
export function getVisibleSections(entry) {
|
|
8
|
+
if (!entry)
|
|
9
|
+
return [];
|
|
10
|
+
const sections = [];
|
|
11
|
+
if (entry.state && entry.state.cycleHistory.length > 0) {
|
|
12
|
+
sections.push("cycles");
|
|
13
|
+
}
|
|
14
|
+
sections.push("conflicts", "ci", "comments", "claude");
|
|
15
|
+
return sections;
|
|
16
|
+
}
|
|
17
|
+
const CATEGORY_COLORS = {
|
|
18
|
+
must_fix: "red",
|
|
19
|
+
should_fix: "yellow",
|
|
20
|
+
nice_to_have: "cyan",
|
|
21
|
+
false_positive: "gray",
|
|
22
|
+
verify_and_fix: "magenta",
|
|
23
|
+
needs_clarification: "blue",
|
|
24
|
+
};
|
|
25
|
+
const CATEGORY_LABELS = {
|
|
26
|
+
must_fix: "MUST FIX",
|
|
27
|
+
should_fix: "SHOULD FIX",
|
|
28
|
+
nice_to_have: "NICE",
|
|
29
|
+
false_positive: "FALSE POS",
|
|
30
|
+
verify_and_fix: "VERIFY",
|
|
31
|
+
needs_clarification: "CLARIFY",
|
|
32
|
+
};
|
|
33
|
+
const MAX_CYCLES = 8;
|
|
34
|
+
const MAX_CONFLICTS = 10;
|
|
35
|
+
const MAX_CI_CHECKS = 10;
|
|
36
|
+
const MAX_COMMENTS = 8;
|
|
37
|
+
const MAX_ACTIVITY = 6;
|
|
38
|
+
function SectionHeader({ label, color, focused, collapsed }) {
|
|
39
|
+
const chevron = collapsed ? "▸" : "▾";
|
|
40
|
+
const rule = "─".repeat(Math.max(0, 42 - label.length));
|
|
41
|
+
return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: color, dimColor: !focused, bold: focused, children: focused ? "▐ " : " " }), _jsxs(Text, { color: color, dimColor: !focused, children: [chevron, " "] }), _jsx(Text, { color: color, bold: true, children: label }), _jsx(Text, { color: color, dimColor: true, children: " " + rule })] }));
|
|
42
|
+
}
|
|
43
|
+
function MoreIndicator({ hidden, label }) {
|
|
44
|
+
if (hidden <= 0)
|
|
45
|
+
return null;
|
|
46
|
+
return (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [" ... ", hidden, " more ", label ?? "items"] }) }));
|
|
47
|
+
}
|
|
48
|
+
function ErrorAction({ error, errorColor }) {
|
|
49
|
+
const lower = error.toLowerCase();
|
|
50
|
+
const hints = [];
|
|
51
|
+
if (lower.includes("checked out")) {
|
|
52
|
+
hints.push("run: git checkout main");
|
|
53
|
+
}
|
|
54
|
+
else if (lower.includes("rebase") || lower.includes("conflict")) {
|
|
55
|
+
hints.push("e to open worktree and resolve conflicts");
|
|
56
|
+
}
|
|
57
|
+
else if (lower.includes("ci") || lower.includes("check")) {
|
|
58
|
+
hints.push("CI is failing — orc will auto-fix on next cycle");
|
|
59
|
+
}
|
|
60
|
+
else if (lower.includes("push")) {
|
|
61
|
+
hints.push("check remote branch state");
|
|
62
|
+
}
|
|
63
|
+
else if (lower.includes("no open pr")) {
|
|
64
|
+
hints.push("open a PR for this branch first");
|
|
65
|
+
}
|
|
66
|
+
else if (lower.includes("auth")) {
|
|
67
|
+
hints.push("check gh auth status");
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
hints.push("l to check logs for details");
|
|
71
|
+
hints.push("c to resume Claude session");
|
|
72
|
+
}
|
|
73
|
+
hints.push("r to rebase · f to fix with Claude · s to start full review · w to watch");
|
|
74
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: errorColor, bold: true, children: "✗ ERROR " }), _jsx(Text, { color: errorColor, children: error })] }), hints.map((hint, i) => (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["\u2192 ", hint] }) }, i)))] }));
|
|
75
|
+
}
|
|
76
|
+
function CycleHistory({ cycles, resolved, total, accentColor, collapsed }) {
|
|
77
|
+
if (collapsed)
|
|
78
|
+
return null;
|
|
79
|
+
const totalCost = cycles.reduce((sum, c) => sum + c.costUsd, 0);
|
|
80
|
+
const totalTokens = cycles.reduce((sum, c) => sum + (c.inputTokens ?? 0) + (c.outputTokens ?? 0), 0);
|
|
81
|
+
const visibleCycles = cycles.length > MAX_CYCLES ? cycles.slice(cycles.length - MAX_CYCLES) : cycles;
|
|
82
|
+
const hiddenCount = cycles.length - visibleCycles.length;
|
|
83
|
+
// Compute the starting index offset for hidden cycles
|
|
84
|
+
const startIndex = hiddenCount;
|
|
85
|
+
return (_jsxs(_Fragment, { children: [hiddenCount > 0 && _jsx(MoreIndicator, { hidden: hiddenCount, label: "cycles" }), visibleCycles.map((cycle, i) => {
|
|
86
|
+
const globalIndex = startIndex + i;
|
|
87
|
+
const isLatest = globalIndex === cycles.length - 1;
|
|
88
|
+
const time = formatTime(cycle.startedAt);
|
|
89
|
+
const cycleTok = (cycle.inputTokens ?? 0) + (cycle.outputTokens ?? 0);
|
|
90
|
+
return (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { dimColor: true, children: "r" + String(globalIndex + 1).padEnd(4) }), _jsxs(Text, { color: cycle.commentsSeen > 0 ? accentColor : "gray", children: [String(cycle.commentsSeen).padStart(2), " found"] }), _jsx(Text, { dimColor: true, children: " $" + cycle.costUsd.toFixed(3).padStart(6) }), _jsx(Text, { dimColor: true, children: " " + formatTokens(cycleTok).padStart(6) + " tok" }), _jsx(Text, { dimColor: true, children: " " + time }), isLatest && !cycle.completedAt && (_jsx(Text, { color: accentColor, children: " ← now" }))] }, globalIndex));
|
|
91
|
+
}), _jsx(Box, { marginLeft: 2, marginTop: 0, children: _jsx(Text, { dimColor: true, children: "──────────────────────────────────────────" }) }), _jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { dimColor: true, children: "tot " }), _jsxs(Text, { color: accentColor, bold: true, children: [String(resolved).padStart(2), "/", total] }), _jsx(Text, { dimColor: true, children: " $" + totalCost.toFixed(3).padStart(6) }), _jsx(Text, { dimColor: true, children: " " + formatTokens(totalTokens).padStart(6) + " tok" })] })] }));
|
|
92
|
+
}
|
|
93
|
+
export function DetailPanel({ entries, selectedBranch, showDetail, activityLines = [], focusedSection = null, collapsedSections = new Set(), }) {
|
|
94
|
+
const theme = useTheme();
|
|
95
|
+
const branch = selectedBranch;
|
|
96
|
+
const entry = branch ? entries.get(branch) : undefined;
|
|
97
|
+
if (!entry) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const { pr, state, commentCount, commentThreads, threadCounts, ciStatus, failedChecks, conflicted } = entry;
|
|
101
|
+
const summary = state?.commentSummary ?? null;
|
|
102
|
+
const activeStatuses = ["fixing", "triaging", "verifying", "pushing", "replying"];
|
|
103
|
+
const isActive = state ? activeStatuses.includes(state.status) : false;
|
|
104
|
+
const visibleSections = getVisibleSections(entry);
|
|
105
|
+
// When focusedSection is null or not in visibleSections, default to first visible section
|
|
106
|
+
const effectiveFocusedSection = (focusedSection && visibleSections.includes(focusedSection))
|
|
107
|
+
? focusedSection
|
|
108
|
+
: visibleSections[0] ?? null;
|
|
109
|
+
const isFocused = (section) => {
|
|
110
|
+
return effectiveFocusedSection === section;
|
|
111
|
+
};
|
|
112
|
+
const isCollapsed = (section) => collapsedSections.has(section);
|
|
113
|
+
// Collapsed view
|
|
114
|
+
if (!showDetail) {
|
|
115
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: state?.error ? theme.error : theme.border, borderTop: false, borderBottom: false, paddingX: 1, paddingTop: 1, flexDirection: "column", children: [_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: theme.accent, children: "r" }), " rebase \u00B7 ", _jsx(Text, { color: theme.accent, children: "f" }), " fix \u00B7 ", _jsx(Text, { color: theme.accent, children: "s" }), " start \u00B7 ", _jsx(Text, { color: theme.accent, children: "w" }), " watch \u00B7 ", _jsx(Text, { color: theme.accent, children: "enter" }), " details", commentCount > 0 && _jsxs(Text, { color: theme.warning, children: [" \u00B7 ", commentCount, " unresolved"] })] }) }), state?.error && _jsx(ErrorAction, { error: state.error, errorColor: theme.error }), isActive && activityLines.length > 0 && (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: theme.accent, dimColor: true, children: "Claude: " }), _jsx(Text, { dimColor: true, children: activityLines[activityLines.length - 1] })] }))] }));
|
|
116
|
+
}
|
|
117
|
+
// Count helpers for section headers
|
|
118
|
+
const ciLabel = ciStatus === "failing" && failedChecks.length > 0
|
|
119
|
+
? `CI (${failedChecks.length} failing)`
|
|
120
|
+
: "CI";
|
|
121
|
+
const conflictLabel = conflicted.length > 0
|
|
122
|
+
? `Conflicts (${conflicted.length} files)`
|
|
123
|
+
: "Conflicts";
|
|
124
|
+
// Expanded view
|
|
125
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: state?.error ? theme.error : theme.border, borderTop: false, borderBottom: false, paddingX: 1, paddingTop: 1, flexDirection: "column", children: [_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: theme.accent, children: "r" }), " rebase \u00B7 ", _jsx(Text, { color: theme.accent, children: "f" }), " fix \u00B7 ", _jsx(Text, { color: theme.accent, children: "s" }), " start \u00B7 ", _jsx(Text, { color: theme.accent, children: "w" }), " watch \u00B7 ", _jsx(Text, { color: theme.accent, children: "enter" }), " collapse", effectiveFocusedSection && _jsxs(Text, { children: [" \u00B7 ", _jsx(Text, { color: theme.accent, children: "space" }), " toggle section"] }), commentCount > 0 && _jsxs(Text, { color: theme.warning, children: [" \u00B7 ", commentCount, " unresolved"] })] }) }), _jsx(Box, { marginLeft: 3, marginTop: 1, children: _jsxs(Text, { backgroundColor: theme.secondaryBg, color: theme.text, bold: true, children: [" ", "#", pr.number, " ", pr.title.length > 60 ? pr.title.slice(0, 59) + "…" : pr.title, " "] }) }), _jsxs(Box, { marginLeft: 3, borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: theme.accent, paddingLeft: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { dimColor: true, children: ["base: ", pr.baseRefName] }), state && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: " \u00B7 " }), threadCounts && threadCounts.total > 0 ? (_jsxs(Text, { color: theme.accentBright, children: [threadCounts.resolved, "/", threadCounts.total, " resolved"] })) : state.commentsAddressed > 0 ? (_jsxs(Text, { color: theme.accentBright, children: [state.commentsAddressed, " fixed"] })) : null, _jsxs(Text, { dimColor: true, children: [" \u00B7 $", state.totalCostUsd.toFixed(3), " \u00B7 ", formatTokens(state.totalInputTokens + state.totalOutputTokens), " tok"] }), state.lastPushAt && _jsxs(Text, { dimColor: true, children: [" \u00B7 pushed ", formatTime(state.lastPushAt)] })] })), !state && commentCount > 0 && (_jsxs(Text, { dimColor: true, children: [" \u00B7 ", _jsxs(Text, { color: theme.warning, children: [commentCount, " unresolved"] })] }))] }), state?.error && _jsx(ErrorAction, { error: state.error, errorColor: theme.error }), state?.hasFixupCommits && (_jsxs(Box, { marginTop: 1, marginLeft: 2, children: [_jsx(Text, { color: theme.warning, bold: true, children: "! " }), _jsx(Text, { color: theme.warning, children: "Unsquashed fixup commits \u2014 rebase before merging" })] })), state && state.cycleHistory.length > 0 && (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: `Review Progress (${threadCounts?.resolved ?? 0}/${threadCounts?.total ?? 0} resolved)`, color: theme.accentBright, focused: isFocused("cycles"), collapsed: isCollapsed("cycles") }), _jsx(CycleHistory, { cycles: state.cycleHistory, resolved: threadCounts?.resolved ?? 0, total: threadCounts?.total ?? 0, accentColor: theme.accentBright, collapsed: isCollapsed("cycles") })] })), state?.status === "conflict_prompt" && conflicted.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: conflictLabel, color: theme.warning, focused: isFocused("conflicts"), collapsed: isCollapsed("conflicts") }), !isCollapsed("conflicts") && (_jsxs(_Fragment, { children: [conflicted.slice(0, MAX_CONFLICTS).map((file, i) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: "yellow", children: "· " }), _jsx(Text, { children: file })] }, i))), _jsx(MoreIndicator, { hidden: conflicted.length - MAX_CONFLICTS, label: "files" }), _jsxs(Box, { marginTop: 1, marginLeft: 2, children: [_jsx(Text, { color: "green", bold: true, children: "[R]" }), _jsx(Text, { children: " Resolve with Claude " }), _jsx(Text, { color: "cyan", bold: true, children: "[A]" }), _jsx(Text, { children: " Always resolve with Claude " }), _jsx(Text, { dimColor: true, bold: true, children: "[Esc]" }), _jsx(Text, { dimColor: true, children: " Dismiss" })] })] }))] })) : conflicted.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: conflictLabel, color: theme.error, focused: isFocused("conflicts"), collapsed: isCollapsed("conflicts") }), !isCollapsed("conflicts") && (_jsxs(_Fragment, { children: [conflicted.slice(0, MAX_CONFLICTS).map((file, i) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: "red", children: "· " }), _jsx(Text, { children: file })] }, i))), _jsx(MoreIndicator, { hidden: conflicted.length - MAX_CONFLICTS, label: "files" }), !state && (_jsxs(_Fragment, { children: [_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: theme.accent, children: "r" }), " to rebase"] }) }), _jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: theme.accent, children: "f" }), " to fix with Claude"] }) })] }))] }))] })) : (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: "Conflicts", color: theme.accent, focused: isFocused("conflicts"), collapsed: isCollapsed("conflicts") }), !isCollapsed("conflicts") && (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "None" }) }))] })), ciStatus === "failing" && failedChecks.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: ciLabel, color: theme.error, focused: isFocused("ci"), collapsed: isCollapsed("ci") }), !isCollapsed("ci") && (_jsxs(_Fragment, { children: [failedChecks.slice(0, MAX_CI_CHECKS).map((check) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: "red", children: "✗ " }), _jsx(Text, { color: "white", children: check.name }), check.logSnippet && (_jsxs(Text, { dimColor: true, children: [" ", check.logSnippet.slice(0, 60), "\u2026"] }))] }, check.id))), _jsx(MoreIndicator, { hidden: failedChecks.length - MAX_CI_CHECKS, label: "checks" }), state && state.ciFixAttempts > 0 && (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["fix attempts: ", state.ciFixAttempts] }) }))] }))] })) : (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: "CI", color: theme.accent, focused: isFocused("ci"), collapsed: isCollapsed("ci") }), !isCollapsed("ci") && (_jsxs(Box, { marginLeft: 2, children: [ciStatus === "passing" && (_jsxs(Text, { color: "green", children: ["✓ ", _jsx(Text, { dimColor: true, children: "All checks passing" })] })), ciStatus === "pending" && (_jsxs(Text, { color: "yellow", children: ["● ", _jsx(Text, { dimColor: true, children: "Checks running..." })] })), ciStatus === "unknown" && (_jsx(Text, { dimColor: true, children: "No data" }))] }))] })), summary && summary.comments.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: `Comments (${summary.comments.length})`, color: theme.accent, focused: isFocused("comments"), collapsed: isCollapsed("comments") }), !isCollapsed("comments") && (_jsxs(_Fragment, { children: [summary.comments.slice(0, MAX_COMMENTS).map((c) => {
|
|
126
|
+
const loc = c.line ? `${c.path}:${c.line}` : c.path;
|
|
127
|
+
const body = c.body.replace(/\n/g, " ");
|
|
128
|
+
const truncated = body.length > 90 ? body.slice(0, 89) + "…" : body;
|
|
129
|
+
return (_jsxs(Box, { marginLeft: 2, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: CATEGORY_COLORS[c.category], bold: true, children: CATEGORY_LABELS[c.category].padEnd(11) }), _jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", c.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", truncated] })] }, c.threadId));
|
|
130
|
+
}), _jsx(MoreIndicator, { hidden: summary.comments.length - MAX_COMMENTS, label: "comments" })] }))] })) : commentThreads.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: `Comments (${commentThreads.length})`, color: theme.accent, focused: isFocused("comments"), collapsed: isCollapsed("comments") }), !isCollapsed("comments") && (_jsxs(_Fragment, { children: [commentThreads.slice(0, MAX_COMMENTS).map((t) => {
|
|
131
|
+
const loc = t.line ? `${t.path}:${t.line}` : t.path;
|
|
132
|
+
const body = t.body.replace(/\n/g, " ");
|
|
133
|
+
const truncated = body.length > 90 ? body.slice(0, 89) + "…" : body;
|
|
134
|
+
return (_jsxs(Box, { marginLeft: 2, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", t.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", truncated] })] }, t.threadId));
|
|
135
|
+
}), _jsx(MoreIndicator, { hidden: commentThreads.length - MAX_COMMENTS, label: "comments" })] }))] })) : (_jsxs(_Fragment, { children: [_jsx(SectionHeader, { label: "Comments", color: theme.accent, focused: isFocused("comments"), collapsed: isCollapsed("comments") }), !isCollapsed("comments") && (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "None" }) }))] })), _jsx(SectionHeader, { label: "Claude", color: theme.accent, focused: isFocused("claude"), collapsed: isCollapsed("claude") }), !isCollapsed("claude") && (isActive && activityLines.length > 0 ? (_jsxs(_Fragment, { children: [activityLines.length > MAX_ACTIVITY && (_jsx(MoreIndicator, { hidden: activityLines.length - MAX_ACTIVITY, label: "lines" })), activityLines.slice(Math.max(0, activityLines.length - MAX_ACTIVITY)).map((line, i, arr) => (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: i < arr.length - 1, color: i === arr.length - 1 ? theme.text : undefined, children: line }) }, i)))] })) : (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: state ? (isActive ? "Working..." : "Idle") : "Not started" }) })))] })] }));
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=DetailPanel.js.map
|
|
@@ -0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G,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3F,KAAC,GAAG,IAAS,UAAU,EAAE,CAAC,YACxB,KAAC,IAAI,IAAC,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,YACrF,IAAI,GACA,IAHC,CAAC,CAIL,CACP,CAAC,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YAChB,KAAC,IAAI,IAAC,QAAQ,kBAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,GAAQ,GAC9E,CACP,CACF,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PREntry } from "../hooks/useDaemonState.js";
|
|
2
|
+
import type { LogEntry } from "../../utils/logger.js";
|
|
3
|
+
type DrillSection = "comments" | "activity" | "logs";
|
|
4
|
+
interface DrillInOverlayProps {
|
|
5
|
+
entry: PREntry;
|
|
6
|
+
branchLogs: LogEntry[];
|
|
7
|
+
section: DrillSection;
|
|
8
|
+
scrollOffset: number;
|
|
9
|
+
visibleLines: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function DrillInOverlay({ entry, branchLogs, section, scrollOffset, visibleLines, }: DrillInOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=DrillInOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrillInOverlay.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/DrillInOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,KAAK,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAErD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,OAAO,EAAE,YAAY,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AA+GD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,YAAY,GACb,EAAE,mBAAmB,2CA8CrB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
import { CATEGORY_COLORS, CATEGORY_LABELS } from "./comment-constants.js";
|
|
5
|
+
function renderCommentLines(entry, theme) {
|
|
6
|
+
const { state, commentThreads } = entry;
|
|
7
|
+
const summary = state?.commentSummary ?? null;
|
|
8
|
+
const lines = [];
|
|
9
|
+
if (summary && summary.comments.length > 0) {
|
|
10
|
+
for (const c of summary.comments) {
|
|
11
|
+
const loc = c.line ? `${c.path}:${c.line}` : c.path;
|
|
12
|
+
const body = c.body.replace(/\n/g, " ");
|
|
13
|
+
lines.push(_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: CATEGORY_COLORS[c.category], bold: true, children: CATEGORY_LABELS[c.category].padEnd(11) }), _jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", c.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", body] }), _jsx(Text, { children: " " })] }, c.threadId));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else if (commentThreads.length > 0) {
|
|
17
|
+
for (const t of commentThreads) {
|
|
18
|
+
const loc = t.line ? `${t.path}:${t.line}` : t.path;
|
|
19
|
+
const body = t.body.replace(/\n/g, " ");
|
|
20
|
+
lines.push(_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", t.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", body] }), _jsx(Text, { children: " " })] }, t.threadId));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
lines.push(_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "No comments" }) }, "none"));
|
|
25
|
+
}
|
|
26
|
+
return lines;
|
|
27
|
+
}
|
|
28
|
+
function renderActivityLines(entry, theme) {
|
|
29
|
+
const activityLines = entry.state?.claudeActivity ?? [];
|
|
30
|
+
if (activityLines.length === 0) {
|
|
31
|
+
return [
|
|
32
|
+
_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "No activity" }) }, "none"),
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
return activityLines.map((line, i) => (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: theme.text, children: line }) }, i)));
|
|
36
|
+
}
|
|
37
|
+
function renderLogLines(logs, theme) {
|
|
38
|
+
const LEVEL_SYMBOLS = {
|
|
39
|
+
debug: "·",
|
|
40
|
+
info: "│",
|
|
41
|
+
warn: "▪",
|
|
42
|
+
error: "✗",
|
|
43
|
+
};
|
|
44
|
+
if (logs.length === 0) {
|
|
45
|
+
return [
|
|
46
|
+
_jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "No log entries" }) }, "none"),
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
return logs.map((entry, i) => {
|
|
50
|
+
const time = entry.timestamp.split("T")[1]?.slice(0, 8) ?? "";
|
|
51
|
+
const sym = LEVEL_SYMBOLS[entry.level] ?? "│";
|
|
52
|
+
return (_jsxs(Box, { marginLeft: 2, children: [_jsxs(Text, { dimColor: true, children: [time, " "] }), _jsxs(Text, { color: entry.level === "error"
|
|
53
|
+
? theme.error
|
|
54
|
+
: entry.level === "warn"
|
|
55
|
+
? theme.warning
|
|
56
|
+
: theme.text, children: [sym, " ", entry.message] })] }, i));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const SECTION_TITLES = {
|
|
60
|
+
comments: "Comments",
|
|
61
|
+
activity: "Claude Activity",
|
|
62
|
+
logs: "Logs",
|
|
63
|
+
};
|
|
64
|
+
export function DrillInOverlay({ entry, branchLogs, section, scrollOffset, visibleLines, }) {
|
|
65
|
+
const theme = useTheme();
|
|
66
|
+
let allLines;
|
|
67
|
+
switch (section) {
|
|
68
|
+
case "comments":
|
|
69
|
+
allLines = renderCommentLines(entry, theme);
|
|
70
|
+
break;
|
|
71
|
+
case "activity":
|
|
72
|
+
allLines = renderActivityLines(entry, theme);
|
|
73
|
+
break;
|
|
74
|
+
case "logs":
|
|
75
|
+
allLines = renderLogLines(branchLogs, theme);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
const maxOffset = Math.max(0, allLines.length - visibleLines);
|
|
79
|
+
const offset = Math.min(scrollOffset, maxOffset);
|
|
80
|
+
const visible = allLines.slice(offset, offset + visibleLines);
|
|
81
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, height: visibleLines + 4, children: [_jsxs(Box, { paddingX: 1, justifyContent: "space-between", children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.accent, bold: true, children: SECTION_TITLES[section] }), _jsxs(Text, { dimColor: true, children: [" \u2014 ", entry.branch, " #", entry.pr.number] })] }), _jsxs(Text, { dimColor: true, children: [allLines.length > 0
|
|
82
|
+
? `${offset + 1}–${Math.min(offset + visibleLines, allLines.length)} of ${allLines.length}`
|
|
83
|
+
: "empty", " · esc to close"] })] }), _jsx(Box, { flexDirection: "column", paddingX: 1, children: visible })] }));
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=DrillInOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrillInOverlay.js","sourceRoot":"","sources":["../../../../src/tui/components/DrillInOverlay.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAY1E,SAAS,kBAAkB,CAAC,KAAc,EAAE,KAAkC;IAC5E,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,OAAO,GAAG,KAAK,EAAE,cAAc,IAAI,IAAI,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAE,CAAC;IAEpC,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3C,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACjC,MAAM,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACpD,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CACR,MAAC,GAAG,IAAkB,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAE,CAAC,aACxD,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,kBAC3C,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CA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AM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC;IAE9D,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,KAAK,CAAC,MAAM,EACzB,MAAM,EAAE,YAAY,GAAG,CAAC,aAExB,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe,aAC9C,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,kBAC5B,cAAc,CAAC,OAAO,CAAC,GACnB,EACP,MAAC,IAAI,IAAC,QAAQ,+BAAK,KAAK,CAAC,MAAM,QAAI,KAAK,CAAC,EAAE,CAAC,MAAM,IAAQ,IACrD,EACP,MAAC,IAAI,IAAC,QAAQ,mBACX,QAAQ,CAAC,MAAM,GAAG,CAAC;gCAClB,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,QAAQ,CAAC,MAAM,EAAE;gCAC3F,CAAC,CAAC,OAAO,EACV,iBAAiB,IACb,IACH,EACN,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,YACpC,OAAO,GACJ,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PREntry } from "../hooks/useDaemonState.js";
|
|
2
|
+
import type { LogEntry } from "../../utils/logger.js";
|
|
3
|
+
interface ExpandedContentProps {
|
|
4
|
+
entry: PREntry;
|
|
5
|
+
branchLogs: LogEntry[];
|
|
6
|
+
focusedSection: number | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function ExpandedContent({ entry, branchLogs, focusedSection, }: ExpandedContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ExpandedContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandedContent.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/ExpandedContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AA8MD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,UAAU,EACV,cAAc,GACf,EAAE,oBAAoB,2CA8CtB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
import { CATEGORY_COLORS, CATEGORY_LABELS } from "./comment-constants.js";
|
|
5
|
+
function SectionHeader({ label, focused, accentColor, borderColor, }) {
|
|
6
|
+
const rule = "─".repeat(Math.max(0, 44 - label.length));
|
|
7
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: focused ? accentColor : borderColor, children: focused ? "▸ " : " " }), _jsx(Text, { color: focused ? accentColor : borderColor, dimColor: !focused, children: "━━ " }), _jsx(Text, { color: focused ? accentColor : borderColor, bold: true, children: label }), _jsx(Text, { color: focused ? accentColor : borderColor, dimColor: !focused, children: " " + rule })] }));
|
|
8
|
+
}
|
|
9
|
+
function CommentsSection({ entry }) {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const { state, commentThreads } = entry;
|
|
12
|
+
const summary = state?.commentSummary ?? null;
|
|
13
|
+
if (summary && summary.comments.length > 0) {
|
|
14
|
+
return (_jsx(_Fragment, { children: summary.comments.map((c) => {
|
|
15
|
+
const loc = c.line ? `${c.path}:${c.line}` : c.path;
|
|
16
|
+
const body = c.body.replace(/\n/g, " ");
|
|
17
|
+
const truncated = body.length > 90 ? body.slice(0, 89) + "…" : body;
|
|
18
|
+
return (_jsxs(Box, { marginLeft: 4, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: CATEGORY_COLORS[c.category], bold: true, children: CATEGORY_LABELS[c.category].padEnd(11) }), _jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", c.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", truncated] })] }, c.threadId));
|
|
19
|
+
}) }));
|
|
20
|
+
}
|
|
21
|
+
if (commentThreads.length > 0) {
|
|
22
|
+
return (_jsx(_Fragment, { children: commentThreads.map((t) => {
|
|
23
|
+
const loc = t.line ? `${t.path}:${t.line}` : t.path;
|
|
24
|
+
const body = t.body.replace(/\n/g, " ");
|
|
25
|
+
const truncated = body.length > 90 ? body.slice(0, 89) + "…" : body;
|
|
26
|
+
return (_jsxs(Box, { marginLeft: 4, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.text, children: loc }), _jsxs(Text, { dimColor: true, children: [" @", t.author] })] }), _jsxs(Text, { dimColor: true, children: [" ", truncated] })] }, t.threadId));
|
|
27
|
+
}) }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsx(Box, { marginLeft: 4, children: _jsx(Text, { dimColor: true, children: "No comments" }) }));
|
|
30
|
+
}
|
|
31
|
+
function ActivitySection({ entry }) {
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
const lines = entry.state?.claudeActivity ?? [];
|
|
34
|
+
if (lines.length === 0) {
|
|
35
|
+
return (_jsx(Box, { marginLeft: 4, children: _jsx(Text, { dimColor: true, children: "No activity" }) }));
|
|
36
|
+
}
|
|
37
|
+
return (_jsx(_Fragment, { children: lines.map((line, i) => (_jsx(Box, { marginLeft: 4, children: _jsx(Text, { dimColor: i < lines.length - 1, color: i === lines.length - 1 ? theme.text : undefined, children: line }) }, i))) }));
|
|
38
|
+
}
|
|
39
|
+
function LogsSection({ logs }) {
|
|
40
|
+
const theme = useTheme();
|
|
41
|
+
if (logs.length === 0) {
|
|
42
|
+
return (_jsx(Box, { marginLeft: 4, children: _jsx(Text, { dimColor: true, children: "No log entries" }) }));
|
|
43
|
+
}
|
|
44
|
+
const LEVEL_SYMBOLS = {
|
|
45
|
+
debug: "·",
|
|
46
|
+
info: "│",
|
|
47
|
+
warn: "▪",
|
|
48
|
+
error: "✗",
|
|
49
|
+
};
|
|
50
|
+
// Show last 10 entries inline (drill-in shows all)
|
|
51
|
+
const visible = logs.slice(-10);
|
|
52
|
+
return (_jsxs(_Fragment, { children: [visible.map((entry, i) => {
|
|
53
|
+
const time = entry.timestamp.split("T")[1]?.slice(0, 8) ?? "";
|
|
54
|
+
const sym = LEVEL_SYMBOLS[entry.level] ?? "│";
|
|
55
|
+
return (_jsxs(Box, { marginLeft: 4, children: [_jsxs(Text, { dimColor: true, children: [time, " "] }), _jsxs(Text, { color: entry.level === "error"
|
|
56
|
+
? theme.error
|
|
57
|
+
: entry.level === "warn"
|
|
58
|
+
? theme.warning
|
|
59
|
+
: theme.text, children: [sym, " ", entry.message] })] }, i));
|
|
60
|
+
}), logs.length > 10 && (_jsx(Box, { marginLeft: 4, children: _jsxs(Text, { dimColor: true, children: [" \u2026 ", logs.length - 10, " more (enter to view all)"] }) }))] }));
|
|
61
|
+
}
|
|
62
|
+
function ErrorAction({ error, errorColor }) {
|
|
63
|
+
const lower = error.toLowerCase();
|
|
64
|
+
const hints = [];
|
|
65
|
+
if (lower.includes("checked out")) {
|
|
66
|
+
hints.push("run: git checkout main");
|
|
67
|
+
}
|
|
68
|
+
else if (lower.includes("rebase") || lower.includes("conflict")) {
|
|
69
|
+
hints.push("e to open worktree and resolve conflicts");
|
|
70
|
+
}
|
|
71
|
+
else if (lower.includes("push")) {
|
|
72
|
+
hints.push("check remote branch state");
|
|
73
|
+
}
|
|
74
|
+
else if (lower.includes("no open pr")) {
|
|
75
|
+
hints.push("open a PR for this branch first");
|
|
76
|
+
}
|
|
77
|
+
else if (lower.includes("auth")) {
|
|
78
|
+
hints.push("check gh auth status");
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
hints.push("→ to drill into logs for details");
|
|
82
|
+
hints.push("c to resume Claude session");
|
|
83
|
+
}
|
|
84
|
+
hints.push("r to retry when ready");
|
|
85
|
+
return (_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { children: [_jsx(Text, { color: errorColor, bold: true, children: "✗ ERROR " }), _jsx(Text, { color: errorColor, children: error })] }), hints.map((hint, i) => (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["\u2192 ", hint] }) }, i)))] }));
|
|
86
|
+
}
|
|
87
|
+
export function ExpandedContent({ entry, branchLogs, focusedSection, }) {
|
|
88
|
+
const theme = useTheme();
|
|
89
|
+
const { state, commentCount, commentThreads } = entry;
|
|
90
|
+
const summary = state?.commentSummary ?? null;
|
|
91
|
+
const commentTotal = summary
|
|
92
|
+
? summary.comments.length
|
|
93
|
+
: commentThreads.length > 0
|
|
94
|
+
? commentThreads.length
|
|
95
|
+
: commentCount;
|
|
96
|
+
const activityLines = state?.claudeActivity ?? [];
|
|
97
|
+
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [state?.error && (_jsx(ErrorAction, { error: state.error, errorColor: theme.error })), _jsx(SectionHeader, { label: `Comments (${commentTotal})`, focused: focusedSection === 0, accentColor: theme.accent, borderColor: theme.border }), _jsx(CommentsSection, { entry: entry }), _jsx(SectionHeader, { label: `Claude (${activityLines.length})`, focused: focusedSection === 1, accentColor: theme.accent, borderColor: theme.border }), _jsx(ActivitySection, { entry: entry }), _jsx(SectionHeader, { label: `Logs (${branchLogs.length})`, focused: focusedSection === 2, accentColor: theme.accent, borderColor: theme.border }), _jsx(LogsSection, { logs: branchLogs })] }));
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=ExpandedContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandedContent.js","sourceRoot":"","sources":["../../../../src/tui/components/ExpandedContent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ1E,SAAS,aAAa,CAAC,EACrB,KAAK,EACL,OAAO,EACP,WAAW,EACX,WAAW,GAMZ;IACC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,YAC7C,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GACjB,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,OAAO,YACjE,KAAK,GACD,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,kBACnD,KAAK,GACD,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,OAAO,YACjE,GAAG,GAAG,IAAI,GACN,IACH,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,KAAK,EAAsB;IACpD,MAAM,K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|
+
import type { PREntry } from "../hooks/useDaemonState.js";
|
|
2
|
+
import type { ToolbarButton } from "./Toolbar.js";
|
|
3
|
+
interface HeaderProps {
|
|
4
|
+
entries: Map<string, PREntry>;
|
|
5
|
+
startTime: number;
|
|
6
|
+
nextCheckIn: number | null;
|
|
7
|
+
buttons: ToolbarButton[];
|
|
8
|
+
selectedButton: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function Header({ entries, startTime, nextCheckIn, buttons, selectedButton }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,UAAU,WAAW;IACnB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAmBD,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,WAAW,2CA+C/F"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
import { formatTokens } from "../../utils/format.js";
|
|
5
|
+
function formatUptime(ms) {
|
|
6
|
+
const totalSec = Math.floor(ms / 1000);
|
|
7
|
+
const minutes = Math.floor(totalSec / 60);
|
|
8
|
+
const hours = Math.floor(minutes / 60);
|
|
9
|
+
if (hours > 0)
|
|
10
|
+
return `${hours}h${minutes % 60}m`;
|
|
11
|
+
return `${minutes}m`;
|
|
12
|
+
}
|
|
13
|
+
function formatCountdown(seconds) {
|
|
14
|
+
if (seconds >= 60) {
|
|
15
|
+
const m = Math.floor(seconds / 60);
|
|
16
|
+
const s = seconds % 60;
|
|
17
|
+
return `${m}m${s.toString().padStart(2, "0")}s`;
|
|
18
|
+
}
|
|
19
|
+
return `${seconds}s`;
|
|
20
|
+
}
|
|
21
|
+
export function Header({ entries, startTime, nextCheckIn, buttons, selectedButton }) {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const activeEntries = [...entries.values()].filter((e) => !e.mergedAt);
|
|
24
|
+
const total = activeEntries.length;
|
|
25
|
+
const running = activeEntries.filter((e) => e.state !== null).length;
|
|
26
|
+
let totalCost = 0;
|
|
27
|
+
let totalTokens = 0;
|
|
28
|
+
for (const entry of activeEntries) {
|
|
29
|
+
totalCost += entry.state?.totalCostUsd ?? 0;
|
|
30
|
+
totalTokens += (entry.state?.totalInputTokens ?? 0) + (entry.state?.totalOutputTokens ?? 0);
|
|
31
|
+
}
|
|
32
|
+
const uptime = formatUptime(Date.now() - startTime);
|
|
33
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: theme.border, borderBottom: false, paddingX: 1, justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [_jsxs(Text, { backgroundColor: theme.accentBg, color: theme.textOnAccent, bold: true, children: [" ", "orc", " "] }), buttons.map((btn, i) => (_jsx(Text, { backgroundColor: i === selectedButton ? theme.accentBg : undefined, color: i === selectedButton ? theme.textOnAccent : undefined, dimColor: i !== selectedButton, bold: i === selectedButton, children: i === selectedButton ? ` ${btn.label} ` : ` ${btn.label} ` }, btn.label)))] }), _jsxs(Text, { children: [_jsx(Text, { color: running > 0 ? theme.accent : theme.muted, children: running }), _jsxs(Text, { dimColor: true, children: ["/", total, " active"] }), _jsx(Text, { color: theme.accent, children: " \u00B7 " }), _jsxs(Text, { dimColor: true, children: ["$", totalCost.toFixed(2), " \u00B7 ", formatTokens(totalTokens), " tok"] }), _jsx(Text, { color: theme.accent, children: " \u00B7 " }), _jsx(Text, { dimColor: true, children: uptime }), _jsx(Text, { color: theme.accent, children: " \u00B7 " }), _jsx(Text, { dimColor: true, children: nextCheckIn !== null ? `next ${formatCountdown(nextCheckIn)}` : "—" })] })] }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/tui/components/Header.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAUrD,SAAS,YAAY,CAAC,EAAU;IAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACvC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,GAAG,KAAK,IAAI,OAAO,GAAG,EAAE,GAAG,CAAC;IAClD,OAAO,GAAG,OAAO,GAAG,CAAC;AACvB,CAAC;AAED,SAAS,eAAe,CAAC,OAAe;IACtC,IAAI,OAAO,IAAI,EAAE,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,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C,IAAI,IAAC,QAAQ,kBAAE,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAQ,IACtF,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpBar.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/HelpBar.tsx"],"names":[],"mappings":"AAaA,wBAAgB,OAAO,4CAmBtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
function Key({ k, label, accentColor }) {
|
|
5
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: accentColor, bold: true, children: k }), _jsxs(Text, { dimColor: true, children: [" ", label] })] }));
|
|
6
|
+
}
|
|
7
|
+
export function HelpBar() {
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: theme.border, borderTop: false, paddingX: 1, justifyContent: "center", gap: 1, children: [_jsx(Key, { k: ",", label: "settings", accentColor: theme.accent }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Key, { k: "h", label: "help", accentColor: theme.accent }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Key, { k: "q", label: "quit", accentColor: theme.accent })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=HelpBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpBar.js","sourceRoot":"","sources":["../../../../src/tui/components/HelpBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,SAAS,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAqD;IACvF,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,WAAW,EAAE,IAAI,kBAAE,CAAC,GAAQ,EACzC,MAAC,IAAI,IAAC,QAAQ,wBAAG,KAAK,IAAQ,IACzB,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,KAAK,CAAC,MAAM,EACzB,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,CAAC,EACX,cAAc,EAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,aAEN,KAAC,GAAG,IAAC,CAAC,EAAC,GAAG,EAAC,KAAK,EAAC,UAAU,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,GAAI,EACzD,KAAC,IAAI,IAAC,QAAQ,6BAAS,EACvB,KAAC,GAAG,IAAC,CAAC,EAAC,GAAG,EAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,GAAI,EACrD,KAAC,IAAI,IAAC,QAAQ,6BAAS,EACvB,KAAC,GAAG,IAAC,CAAC,EAAC,GAAG,EAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,GAAI,IACjD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface KeybindLegendProps {
|
|
2
|
+
showingLogs: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function KeybindLegend({ showingLogs, onClose }: KeybindLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=KeybindLegend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeybindLegend.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/KeybindLegend.tsx"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA4CD,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,kBAAkB,2CAsDzE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useInput } from "ink";
|
|
3
|
+
import { useTheme } from "../theme.js";
|
|
4
|
+
function getGroups(showingLogs) {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
title: "Navigation",
|
|
8
|
+
binds: [
|
|
9
|
+
{ key: "j/k", label: "Select PR" },
|
|
10
|
+
{ key: "↑/↓", label: "Scroll / navigate" },
|
|
11
|
+
{ key: "enter", label: "Toggle details" },
|
|
12
|
+
{ key: "↑/↓", label: "Navigate sections (in detail)" },
|
|
13
|
+
{ key: "space", label: "Collapse/expand section" },
|
|
14
|
+
{ key: "l", label: "Branch logs" },
|
|
15
|
+
{ key: "tab", label: showingLogs ? "Hide all logs" : "All logs" },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: "Actions",
|
|
20
|
+
binds: [
|
|
21
|
+
{ key: "s", label: "Start / stop" },
|
|
22
|
+
{ key: "w", label: "Watch" },
|
|
23
|
+
{ key: "a", label: "Start all" },
|
|
24
|
+
{ key: "x", label: "Stop all" },
|
|
25
|
+
{ key: "r", label: "Rebase" },
|
|
26
|
+
{ key: "d", label: "Clear merged" },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "Tools",
|
|
31
|
+
binds: [
|
|
32
|
+
{ key: "c", label: "Resume Claude" },
|
|
33
|
+
{ key: "e", label: "Open shell" },
|
|
34
|
+
{ key: "t", label: "Toggle theme" },
|
|
35
|
+
{ key: ",", label: "Settings" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
export function KeybindLegend({ showingLogs, onClose }) {
|
|
41
|
+
const theme = useTheme();
|
|
42
|
+
const groups = getGroups(showingLogs);
|
|
43
|
+
useInput((input, key) => {
|
|
44
|
+
if (key.escape || input === "h" || input === "q") {
|
|
45
|
+
onClose();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
// Find the longest key string for alignment
|
|
50
|
+
const maxKeyLen = Math.max(...groups.flatMap((g) => g.binds.map((b) => b.key.length)));
|
|
51
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 2, paddingY: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsx(Text, { color: theme.accent, bold: true, children: "━━ Keybindings ━━" }) }), groups.map((group, gi) => (_jsxs(Box, { flexDirection: "column", marginBottom: gi < groups.length - 1 ? 1 : 0, children: [_jsx(Text, { color: theme.text, bold: true, dimColor: true, children: group.title }), group.binds.map((bind, i) => (_jsxs(Box, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: theme.accent, bold: true, children: bind.key.padEnd(maxKeyLen + 1) }), _jsx(Text, { color: theme.muted, children: bind.label })] }, `${bind.key}-${i}`)))] }, group.title))), _jsx(Box, { marginTop: 1, justifyContent: "center", children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: theme.accent, children: "h" }), " close ", _jsx(Text, { color: theme.accent, children: "esc" }), " close"] }) })] }));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=KeybindLegend.js.map
|