@tacuchi/agent-workflow-cli 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/main.js +0 -0
- package/dist/cli/tui/app.d.ts.map +1 -1
- package/dist/cli/tui/app.js +119 -61
- package/dist/cli/tui/app.js.map +1 -1
- package/dist/cli/tui/components/activity-feed.d.ts +16 -0
- package/dist/cli/tui/components/activity-feed.d.ts.map +1 -0
- package/dist/cli/tui/components/activity-feed.js +35 -0
- package/dist/cli/tui/components/activity-feed.js.map +1 -0
- package/dist/cli/tui/components/command-palette.d.ts +0 -1
- package/dist/cli/tui/components/command-palette.d.ts.map +1 -1
- package/dist/cli/tui/components/command-palette.js +5 -5
- package/dist/cli/tui/components/command-palette.js.map +1 -1
- package/dist/cli/tui/components/confirm-banner.d.ts +10 -0
- package/dist/cli/tui/components/confirm-banner.d.ts.map +1 -0
- package/dist/cli/tui/components/confirm-banner.js +11 -0
- package/dist/cli/tui/components/confirm-banner.js.map +1 -0
- package/dist/cli/tui/components/detail-panel.d.ts +34 -0
- package/dist/cli/tui/components/detail-panel.d.ts.map +1 -0
- package/dist/cli/tui/components/detail-panel.js +83 -0
- package/dist/cli/tui/components/detail-panel.js.map +1 -0
- package/dist/cli/tui/components/family-card.d.ts +5 -1
- package/dist/cli/tui/components/family-card.d.ts.map +1 -1
- package/dist/cli/tui/components/family-card.js +34 -4
- package/dist/cli/tui/components/family-card.js.map +1 -1
- package/dist/cli/tui/components/inline-wizard.d.ts +19 -0
- package/dist/cli/tui/components/inline-wizard.d.ts.map +1 -0
- package/dist/cli/tui/components/inline-wizard.js +16 -0
- package/dist/cli/tui/components/inline-wizard.js.map +1 -0
- package/dist/cli/tui/components/list-row.d.ts +11 -3
- package/dist/cli/tui/components/list-row.d.ts.map +1 -1
- package/dist/cli/tui/components/list-row.js +71 -13
- package/dist/cli/tui/components/list-row.js.map +1 -1
- package/dist/cli/tui/components/page-head.d.ts +8 -16
- package/dist/cli/tui/components/page-head.d.ts.map +1 -1
- package/dist/cli/tui/components/page-head.js +21 -14
- package/dist/cli/tui/components/page-head.js.map +1 -1
- package/dist/cli/tui/components/phase-card.d.ts +2 -1
- package/dist/cli/tui/components/phase-card.d.ts.map +1 -1
- package/dist/cli/tui/components/phase-card.js +9 -4
- package/dist/cli/tui/components/phase-card.js.map +1 -1
- package/dist/cli/tui/components/quick-actions.d.ts +9 -0
- package/dist/cli/tui/components/quick-actions.d.ts.map +1 -0
- package/dist/cli/tui/components/quick-actions.js +9 -0
- package/dist/cli/tui/components/quick-actions.js.map +1 -0
- package/dist/cli/tui/components/section-head.d.ts +10 -0
- package/dist/cli/tui/components/section-head.d.ts.map +1 -0
- package/dist/cli/tui/components/section-head.js +8 -0
- package/dist/cli/tui/components/section-head.js.map +1 -0
- package/dist/cli/tui/components/sidebar.d.ts +27 -0
- package/dist/cli/tui/components/sidebar.d.ts.map +1 -0
- package/dist/cli/tui/components/sidebar.js +37 -0
- package/dist/cli/tui/components/sidebar.js.map +1 -0
- package/dist/cli/tui/components/stat-tile.d.ts +4 -2
- package/dist/cli/tui/components/stat-tile.d.ts.map +1 -1
- package/dist/cli/tui/components/stat-tile.js +9 -8
- package/dist/cli/tui/components/stat-tile.js.map +1 -1
- package/dist/cli/tui/components/toast-stack.d.ts +3 -3
- package/dist/cli/tui/components/toast-stack.js +3 -3
- package/dist/cli/tui/data/activity.d.ts +21 -0
- package/dist/cli/tui/data/activity.d.ts.map +1 -0
- package/dist/cli/tui/data/activity.js +83 -0
- package/dist/cli/tui/data/activity.js.map +1 -0
- package/dist/cli/tui/tabs/mcp-tab.d.ts +3 -11
- package/dist/cli/tui/tabs/mcp-tab.d.ts.map +1 -1
- package/dist/cli/tui/tabs/mcp-tab.js +113 -85
- package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
- package/dist/cli/tui/tabs/project-tab.d.ts +0 -11
- package/dist/cli/tui/tabs/project-tab.d.ts.map +1 -1
- package/dist/cli/tui/tabs/project-tab.js +38 -78
- package/dist/cli/tui/tabs/project-tab.js.map +1 -1
- package/dist/cli/tui/tabs/skills-tab.d.ts +1 -21
- package/dist/cli/tui/tabs/skills-tab.d.ts.map +1 -1
- package/dist/cli/tui/tabs/skills-tab.js +65 -85
- package/dist/cli/tui/tabs/skills-tab.js.map +1 -1
- package/dist/cli/tui/tabs/status-tab.d.ts +4 -1
- package/dist/cli/tui/tabs/status-tab.d.ts.map +1 -1
- package/dist/cli/tui/tabs/status-tab.js +50 -11
- package/dist/cli/tui/tabs/status-tab.js.map +1 -1
- package/dist/cli/tui/tabs/workflow-tab.d.ts +3 -1
- package/dist/cli/tui/tabs/workflow-tab.d.ts.map +1 -1
- package/dist/cli/tui/tabs/workflow-tab.js +31 -15
- package/dist/cli/tui/tabs/workflow-tab.js.map +1 -1
- package/dist/cli/tui/theme.d.ts +75 -55
- package/dist/cli/tui/theme.d.ts.map +1 -1
- package/dist/cli/tui/theme.js +75 -50
- package/dist/cli/tui/theme.js.map +1 -1
- package/package.json +1 -1
- package/dist/cli/commands/orchestration.d.ts +0 -5
- package/dist/cli/commands/orchestration.d.ts.map +0 -1
- package/dist/cli/commands/orchestration.js +0 -84
- package/dist/cli/commands/orchestration.js.map +0 -1
- package/dist/cli/commands/wave2-extras.d.ts +0 -7
- package/dist/cli/commands/wave2-extras.d.ts.map +0 -1
- package/dist/cli/commands/wave2-extras.js +0 -87
- package/dist/cli/commands/wave2-extras.js.map +0 -1
- package/dist/cli/commands/wave2-final.d.ts +0 -8
- package/dist/cli/commands/wave2-final.d.ts.map +0 -1
- package/dist/cli/commands/wave2-final.js +0 -134
- package/dist/cli/commands/wave2-final.js.map +0 -1
- package/dist/cli/commands/wave4d-simple.d.ts +0 -6
- package/dist/cli/commands/wave4d-simple.d.ts.map +0 -1
- package/dist/cli/commands/wave4d-simple.js +0 -138
- package/dist/cli/commands/wave4d-simple.js.map +0 -1
- package/dist/cli/tui/components/action-modal.d.ts +0 -33
- package/dist/cli/tui/components/action-modal.d.ts.map +0 -1
- package/dist/cli/tui/components/action-modal.js +0 -41
- package/dist/cli/tui/components/action-modal.js.map +0 -1
- package/dist/cli/tui/components/confirm-modal.d.ts +0 -12
- package/dist/cli/tui/components/confirm-modal.d.ts.map +0 -1
- package/dist/cli/tui/components/confirm-modal.js +0 -18
- package/dist/cli/tui/components/confirm-modal.js.map +0 -1
- package/dist/cli/tui/components/connections-grid.d.ts +0 -8
- package/dist/cli/tui/components/connections-grid.d.ts.map +0 -1
- package/dist/cli/tui/components/connections-grid.js +0 -55
- package/dist/cli/tui/components/connections-grid.js.map +0 -1
- package/dist/cli/tui/components/connections-table.d.ts +0 -5
- package/dist/cli/tui/components/connections-table.d.ts.map +0 -1
- package/dist/cli/tui/components/connections-table.js +0 -11
- package/dist/cli/tui/components/connections-table.js.map +0 -1
- package/dist/cli/tui/components/footer.d.ts +0 -4
- package/dist/cli/tui/components/footer.d.ts.map +0 -1
- package/dist/cli/tui/components/footer.js +0 -6
- package/dist/cli/tui/components/footer.js.map +0 -1
- package/dist/cli/tui/components/frame-box.d.ts +0 -10
- package/dist/cli/tui/components/frame-box.d.ts.map +0 -1
- package/dist/cli/tui/components/frame-box.js +0 -9
- package/dist/cli/tui/components/frame-box.js.map +0 -1
- package/dist/cli/tui/components/header.d.ts +0 -14
- package/dist/cli/tui/components/header.d.ts.map +0 -1
- package/dist/cli/tui/components/header.js +0 -21
- package/dist/cli/tui/components/header.js.map +0 -1
- package/dist/cli/tui/components/host-chip.d.ts +0 -28
- package/dist/cli/tui/components/host-chip.d.ts.map +0 -1
- package/dist/cli/tui/components/host-chip.js +0 -35
- package/dist/cli/tui/components/host-chip.js.map +0 -1
- package/dist/cli/tui/components/keymap-bar.d.ts +0 -17
- package/dist/cli/tui/components/keymap-bar.d.ts.map +0 -1
- package/dist/cli/tui/components/keymap-bar.js +0 -13
- package/dist/cli/tui/components/keymap-bar.js.map +0 -1
- package/dist/cli/tui/components/pill.d.ts +0 -16
- package/dist/cli/tui/components/pill.d.ts.map +0 -1
- package/dist/cli/tui/components/pill.js +0 -24
- package/dist/cli/tui/components/pill.js.map +0 -1
- package/dist/cli/tui/components/sectioned-menu.d.ts +0 -24
- package/dist/cli/tui/components/sectioned-menu.d.ts.map +0 -1
- package/dist/cli/tui/components/sectioned-menu.js +0 -72
- package/dist/cli/tui/components/sectioned-menu.js.map +0 -1
- package/dist/cli/tui/components/tab-bar.d.ts +0 -23
- package/dist/cli/tui/components/tab-bar.d.ts.map +0 -1
- package/dist/cli/tui/components/tab-bar.js +0 -17
- package/dist/cli/tui/components/tab-bar.js.map +0 -1
- package/dist/cli/tui/screens/main-menu.d.ts +0 -8
- package/dist/cli/tui/screens/main-menu.d.ts.map +0 -1
- package/dist/cli/tui/screens/main-menu.js +0 -24
- package/dist/cli/tui/screens/main-menu.js.map +0 -1
- package/dist/cli/tui/screens/mcp-done.d.ts +0 -10
- package/dist/cli/tui/screens/mcp-done.d.ts.map +0 -1
- package/dist/cli/tui/screens/mcp-done.js +0 -24
- package/dist/cli/tui/screens/mcp-done.js.map +0 -1
- package/dist/cli/tui/screens/mcp-wizard.d.ts +0 -10
- package/dist/cli/tui/screens/mcp-wizard.d.ts.map +0 -1
- package/dist/cli/tui/screens/mcp-wizard.js +0 -97
- package/dist/cli/tui/screens/mcp-wizard.js.map +0 -1
|
@@ -5,6 +5,10 @@ export interface FamilyCardData {
|
|
|
5
5
|
}
|
|
6
6
|
export interface FamilyCardProps {
|
|
7
7
|
family: FamilyCardData;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
/** Ancho fijado por el parent (columna derecha del workflow tab). */
|
|
11
|
+
widthHint?: number;
|
|
8
12
|
}
|
|
9
|
-
export declare function FamilyCard({ family }: FamilyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function FamilyCard({ family, expanded, active, widthHint, }: FamilyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
//# sourceMappingURL=family-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-card.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/family-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"family-card.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/family-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,QAAgB,EAChB,MAAc,EACd,SAAS,GACV,EAAE,eAAe,2CA+DjB"}
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { colors } from "../theme.js";
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { Box, Text, useStdout } from "ink";
|
|
3
|
+
import { colors, icons } from "../theme.js";
|
|
4
|
+
const COLLAPSED_GLYPH = "▶";
|
|
5
|
+
const EXPANDED_GLYPH = "▼";
|
|
6
|
+
const INNER_PAD = 1;
|
|
7
|
+
export function FamilyCard({ family, expanded = false, active = false, widthHint, }) {
|
|
8
|
+
const { stdout } = useStdout();
|
|
9
|
+
const bg = active ? colors.bgHighlight : undefined;
|
|
10
|
+
const bgProp = bg ? { backgroundColor: bg } : {};
|
|
11
|
+
const innerPad = " ".repeat(INNER_PAD);
|
|
12
|
+
// Layout: bar + gap + pad + expand_glyph + space + title + space + count + pad.
|
|
13
|
+
// Bar va AFUERA del bg.
|
|
14
|
+
const FOCUS_OUTER = 2;
|
|
15
|
+
const titleLen = [...family.title].length;
|
|
16
|
+
const countStr = String(family.items.length);
|
|
17
|
+
const countLen = countStr.length;
|
|
18
|
+
const used = FOCUS_OUTER + INNER_PAD * 2 + 1 + 1 + titleLen + 1 + countLen;
|
|
19
|
+
const termCols = stdout?.columns ?? 100;
|
|
20
|
+
// Overhead aproximado: ScreenFrame (6) + Sidebar (24) + Main paddingX (2) +
|
|
21
|
+
// right column paddingLeft (1) = 33. Restamos solo 33 (en vez de 35) para
|
|
22
|
+
// que el spacer sea generoso; truncate-end recorta si pasa el borde real.
|
|
23
|
+
const fallbackColWidth = Math.max(20, Math.floor((termCols - 33) / 2));
|
|
24
|
+
const colWidth = widthHint ?? fallbackColWidth;
|
|
25
|
+
const spacerLen = Math.max(1, colWidth - used);
|
|
26
|
+
const spacer = " ".repeat(spacerLen);
|
|
27
|
+
const expandGlyph = expanded ? EXPANDED_GLYPH : COLLAPSED_GLYPH;
|
|
28
|
+
// Una sola Text con bg uniforme (incluso el focus bar tiene bg) — evita
|
|
29
|
+
// los problemas de mixing bg/no-bg Texts en una row que provocan blank lines
|
|
30
|
+
// entre rows.
|
|
31
|
+
const headerRow = (_jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { ...bgProp, color: active ? colors.accent : colors.faint, children: active ? icons.focusBar : " " }), _jsxs(Text, { ...bgProp, children: [innerPad, _jsx(Text, { color: colors.accent, bold: true, children: expandGlyph }), " ", _jsx(Text, { color: colors.bright, bold: true, children: family.title }), " ", _jsx(Text, { color: colors.accent, children: countStr }), spacer, innerPad] })] }));
|
|
32
|
+
if (expanded) {
|
|
33
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [headerRow, _jsx(Box, { marginLeft: 5, flexDirection: "column", children: family.items.map((cmd) => (_jsxs(Text, { color: colors.dim, children: ["\u00B7 ", cmd] }, cmd))) })] }));
|
|
34
|
+
}
|
|
35
|
+
return headerRow;
|
|
6
36
|
}
|
|
7
37
|
//# sourceMappingURL=family-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-card.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/family-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"family-card.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/family-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAgB5C,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,KAAK,EACd,SAAS,GACO;IAChB,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IACnD,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEvC,gFAAgF;IAChF,wBAAwB;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,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QAAQ,EACT,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,kBAC7B,WAAW,GACP,EAAC,GAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,kBAC7B,MAAM,CAAC,KAAK,GACR,EAAC,GAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,YAAG,QAAQ,GAAQ,EAC5C,MAAM,EACN,QAAQ,IACJ,IACF,CACR,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aACxC,SAAS,EACV,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YACvC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACzB,MAAC,IAAI,IAAW,KAAK,EAAE,MAAM,CAAC,GAAG,wBAC5B,GAAG,KADG,GAAG,CAEP,CACR,CAAC,GACE,IACF,CACP,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface InlineWizardField {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
/** When true, the field shows a blinking caret at the end (visual only — Ink doesn't animate). */
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface InlineWizardProps {
|
|
8
|
+
step: number;
|
|
9
|
+
totalSteps: number;
|
|
10
|
+
stepLabel: string;
|
|
11
|
+
fields: InlineWizardField[];
|
|
12
|
+
/** Live preview block (e.g. JSON). Multi-line string with \n separators. */
|
|
13
|
+
preview?: string;
|
|
14
|
+
/** Override default footer. */
|
|
15
|
+
footer?: string;
|
|
16
|
+
width?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function InlineWizard({ step, totalSteps, stepLabel, fields, preview, footer, width, }: InlineWizardProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=inline-wizard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-wizard.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/inline-wizard.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAuB,EACvB,KAAU,GACX,EAAE,iBAAiB,2CA4BnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { colors, icons } from "../theme.js";
|
|
4
|
+
const DEFAULT_FOOTER = "⏎ register · tab back to step 1 · esc cancel";
|
|
5
|
+
export function InlineWizard({ step, totalSteps, stepLabel, fields, preview, footer = DEFAULT_FOOTER, width = 56, }) {
|
|
6
|
+
return (_jsxs(Box, { flexDirection: "row", marginTop: 1, children: [_jsx(Box, { children: _jsx(Text, { color: colors.accent, children: icons.focusBar }) }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, flexGrow: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.accent, children: ["Step ", step, " of ", totalSteps, " \u00B7", " "] }), _jsx(Text, { color: colors.accent, bold: true, children: stepLabel.toUpperCase() })] }), fields.map((f) => (_jsx(WizardFieldRow, { field: f, width: width }, f.label))), preview ? _jsx(PreviewBlock, { content: preview }) : null, _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.dim, children: footer }) })] })] }));
|
|
7
|
+
}
|
|
8
|
+
function WizardFieldRow({ field, width, }) {
|
|
9
|
+
const labelText = `${field.label}: `;
|
|
10
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.mute, children: field.label.toUpperCase() }), _jsxs(Box, { children: [_jsx(Text, { color: colors.dim, children: "┌" }), _jsx(Text, { color: colors.dim, children: "─".repeat(Math.max(0, width - 4)) }), _jsx(Text, { color: colors.dim, children: "┐" })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.dim, children: "│ " }), _jsx(Text, { color: colors.bright, children: field.value }), field.active ? _jsx(Text, { color: colors.accent, children: icons.caret }) : null, _jsx(Box, { flexGrow: 1 }), _jsx(Text, { color: colors.dim, children: " │" })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.dim, children: "└" }), _jsx(Text, { color: colors.dim, children: "─".repeat(Math.max(0, width - 4)) }), _jsx(Text, { color: colors.dim, children: "┘" })] }), _jsx(Text, { color: colors.faint, children: labelText })] }));
|
|
11
|
+
}
|
|
12
|
+
function PreviewBlock({ content }) {
|
|
13
|
+
const lines = content.split("\n");
|
|
14
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.mute, children: "PREVIEW \u00B7 profile.json" }), lines.map((line, idx) => (_jsx(Text, { color: colors.dim, children: line }, `prev-${idx}-${line.slice(0, 8)}`)))] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=inline-wizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,YAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,GAAQ,EACpE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,YAAG,GAAG,GAAQ,IACjC,EACN,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YAAG,SAAS,GAAQ,IACzC,CACP,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,OAAO,EAAuB;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aACtC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,4CAA+B,EACtD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CACxB,KAAC,IAAI,IAAyC,KAAK,EAAE,MAAM,CAAC,GAAG,YAC5D,IAAI,IADI,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAErC,CACR,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type MetaTone = "ok" | "warn" | "accent" | "dim" | "err";
|
|
1
|
+
export type MetaTone = "ok" | "warn" | "accent" | "dim" | "err" | "purple" | "info";
|
|
2
2
|
export interface MetaChip {
|
|
3
3
|
label: string;
|
|
4
4
|
tone?: MetaTone;
|
|
@@ -8,6 +8,7 @@ export interface StatePill {
|
|
|
8
8
|
tone?: MetaTone;
|
|
9
9
|
}
|
|
10
10
|
export interface ListRowProps {
|
|
11
|
+
/** Glyph at left after focus bar; e.g. ▤ (db) for MCP, ◆ (host) for Skills. */
|
|
11
12
|
icon?: string;
|
|
12
13
|
iconActive?: boolean;
|
|
13
14
|
title: string;
|
|
@@ -16,7 +17,14 @@ export interface ListRowProps {
|
|
|
16
17
|
state?: StatePill;
|
|
17
18
|
chevron?: boolean;
|
|
18
19
|
active?: boolean;
|
|
19
|
-
|
|
20
|
+
/** When true, the row is rendered dimmed (e.g. inline wizard backdrop). */
|
|
21
|
+
dimmed?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Ancho disponible del row (en cells). Si se pasa, se usa exactamente.
|
|
24
|
+
* Pasalo desde el parent (que sabe si el detail panel está abierto).
|
|
25
|
+
* Fallback: termCols - 36.
|
|
26
|
+
*/
|
|
27
|
+
widthHint?: number;
|
|
20
28
|
}
|
|
21
|
-
export declare function ListRow({ icon, iconActive, title, subtitle, meta, state, chevron, active, }: ListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function ListRow({ icon, iconActive, title, subtitle, meta, state, chevron, active, dimmed, widthHint, }: ListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
//# sourceMappingURL=list-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-row.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/list-row.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"list-row.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/list-row.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpF,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6BD,wBAAgB,OAAO,CAAC,EACtB,IAAmB,EACnB,UAAkB,EAClB,KAAK,EACL,QAAQ,EACR,IAAS,EACT,KAAK,EACL,OAAe,EACf,MAAc,EACd,MAAc,EACd,SAAS,GACV,EAAE,YAAY,2CAwHd"}
|
|
@@ -1,27 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Box, Text } from "ink";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useStdout } from "ink";
|
|
3
3
|
import { colors, icons } from "../theme.js";
|
|
4
|
+
// Padding interno (en cells) que se aplica DENTRO del marker bg, a cada lado
|
|
5
|
+
// del contenido. Hace que el bg no se vea pegado a las letras.
|
|
6
|
+
const INNER_PAD = 1;
|
|
4
7
|
function toneColor(tone) {
|
|
5
8
|
switch (tone) {
|
|
6
9
|
case "ok":
|
|
7
|
-
return colors.
|
|
10
|
+
return colors.ok;
|
|
8
11
|
case "warn":
|
|
9
|
-
return colors.
|
|
12
|
+
return colors.warn;
|
|
10
13
|
case "accent":
|
|
11
14
|
return colors.accent;
|
|
12
15
|
case "err":
|
|
13
|
-
return colors.
|
|
16
|
+
return colors.err;
|
|
17
|
+
case "purple":
|
|
18
|
+
return colors.purple;
|
|
19
|
+
case "info":
|
|
20
|
+
return colors.info;
|
|
14
21
|
default:
|
|
15
|
-
return colors.
|
|
22
|
+
return colors.dim;
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
25
|
+
function approxWidth(s) {
|
|
26
|
+
return [...s].length;
|
|
20
27
|
}
|
|
21
|
-
export function ListRow({ icon = icons.
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
28
|
+
export function ListRow({ icon = icons.bullet, iconActive = false, title, subtitle, meta = [], state, chevron = false, active = false, dimmed = false, widthHint, }) {
|
|
29
|
+
const { stdout } = useStdout();
|
|
30
|
+
const focused = active && !dimmed;
|
|
31
|
+
const bg = focused ? colors.bgHighlight : undefined;
|
|
32
|
+
const bgProp = bg ? { backgroundColor: bg } : {};
|
|
33
|
+
const focusBarColor = focused ? colors.accent : colors.faint;
|
|
34
|
+
const iconColor = dimmed
|
|
35
|
+
? colors.faint
|
|
36
|
+
: focused
|
|
37
|
+
? colors.accent
|
|
38
|
+
: iconActive
|
|
39
|
+
? colors.accent
|
|
40
|
+
: colors.dim;
|
|
41
|
+
const titleColor = dimmed ? colors.faint : colors.bright;
|
|
42
|
+
const subColor = dimmed ? colors.faint : focused ? colors.accentSoft : colors.dim;
|
|
43
|
+
const metaBaseColor = focused ? colors.accentSoft : undefined;
|
|
44
|
+
const stateColor = dimmed ? colors.faint : focused ? colors.bright : toneColor(state?.tone);
|
|
45
|
+
const chevronColor = dimmed ? colors.faint : focused ? colors.accent : colors.dim;
|
|
46
|
+
// Available: widthHint del parent o fallback (termCols - overhead).
|
|
47
|
+
const fallbackOverhead = 36;
|
|
48
|
+
const available = widthHint !== undefined ? widthHint : Math.max(8, (stdout?.columns ?? 100) - fallbackOverhead);
|
|
49
|
+
// RightLen — content alineado a la derecha. Siempre full (no truncar).
|
|
50
|
+
const rightLen = meta.reduce((a, m) => a + approxWidth(m.label) + 1, 0) +
|
|
51
|
+
(state ? approxWidth(state.label) + 1 : 0) +
|
|
52
|
+
(chevron ? 2 : 0) +
|
|
53
|
+
INNER_PAD;
|
|
54
|
+
// Pre-truncar subtitle si excede el ancho disponible. Title se preserva.
|
|
55
|
+
// fixedLeft incluye el focus-bar (1) + gap (1) afuera del bg, + INNER_PAD
|
|
56
|
+
// (1) dentro del bg + icon (1) + space (1) + title.
|
|
57
|
+
const FOCUS_OUTER = 2; // bar + gap
|
|
58
|
+
const fixedLeft = FOCUS_OUTER + INNER_PAD + 2 + approxWidth(title);
|
|
59
|
+
const subtitleSpaceBefore = subtitle ? 1 : 0;
|
|
60
|
+
const availableForSubtitle = Math.max(0, available - fixedLeft - subtitleSpaceBefore - rightLen - 1);
|
|
61
|
+
let displaySubtitle = subtitle ?? "";
|
|
62
|
+
if (subtitle && approxWidth(subtitle) > availableForSubtitle) {
|
|
63
|
+
if (availableForSubtitle <= 1) {
|
|
64
|
+
displaySubtitle = "";
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
displaySubtitle = `${subtitle.slice(0, availableForSubtitle - 1)}…`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// LeftLen recalculado con el subtitle ya truncado.
|
|
71
|
+
// Incluye focus bar (1) + gap (1) afuera del bg + inner_pad + 2 (icon+space)
|
|
72
|
+
// + title + (space + subtitle)? para fines de spacer.
|
|
73
|
+
const leftLen = FOCUS_OUTER +
|
|
74
|
+
INNER_PAD +
|
|
75
|
+
2 +
|
|
76
|
+
approxWidth(title) +
|
|
77
|
+
(displaySubtitle ? approxWidth(displaySubtitle) + 1 : 0);
|
|
78
|
+
const spacerLen = Math.max(1, available - leftLen - rightLen);
|
|
79
|
+
const spacer = " ".repeat(spacerLen);
|
|
80
|
+
const innerPad = " ".repeat(INNER_PAD);
|
|
81
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsxs(Box, { flexDirection: "row", paddingX: 0, children: [_jsx(Text, { color: focusBarColor, bold: focused, children: focused ? icons.focusBar : " " }), _jsx(Text, { children: " " }), _jsx(Text, { ...bgProp, children: innerPad }), _jsx(Text, { ...bgProp, color: iconColor, bold: focused, children: icon }), _jsx(Text, { ...bgProp, children: " " }), _jsx(Text, { ...bgProp, color: titleColor, bold: focused, children: title }), displaySubtitle ? (_jsxs(_Fragment, { children: [_jsx(Text, { ...bgProp, children: " " }), _jsx(Text, { ...bgProp, color: subColor, bold: focused, wrap: "truncate-end", children: displaySubtitle })] })) : null, _jsx(Text, { ...bgProp, wrap: "truncate-end", children: spacer }), meta.length > 0
|
|
82
|
+
? meta.map((m, i) => (_jsxs(Box, { children: [_jsx(Text, { ...bgProp, color: metaBaseColor ?? toneColor(m.tone), bold: focused, children: m.label }), _jsx(Text, { ...bgProp, children: " " })] }, `${m.label}-${i}`)))
|
|
83
|
+
: null, state ? (_jsx(Text, { ...bgProp, color: stateColor, bold: focused || !dimmed, children: state.label })) : null, chevron ? (_jsxs(_Fragment, { children: [_jsx(Text, { ...bgProp, children: " " }), _jsx(Text, { ...bgProp, color: chevronColor, bold: focused, children: icons.chevron })] })) : null, _jsx(Text, { ...bgProp, children: innerPad })] }) }));
|
|
26
84
|
}
|
|
27
85
|
//# sourceMappingURL=list-row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-row.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/list-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"list-row.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/list-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAkC5C,6EAA6E;AAC7E,+DAA+D;AA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CAAC,MAAM,GAAG,CAAC;oBACd,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACjB,MAAC,GAAG,eACF,KAAC,IAAI,OAAK,MAAM,EAAE,KAAK,EAAE,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,YACvE,CAAC,CAAC,KAAK,GACH,EACP,KAAC,IAAI,OAAK,MAAM,kBAAU,KAJlB,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAKrB,CACP,CAAC;oBACJ,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,OAAK,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,IAAI,CAAC,MAAM,YAC1D,KAAK,CAAC,KAAK,GACP,CACR,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACT,8BACE,KAAC,IAAI,OAAK,MAAM,kBAAU,EAC1B,KAAC,IAAI,OAAK,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,YACjD,KAAK,CAAC,OAAO,GACT,IACN,CACJ,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,IAAI,OAAK,MAAM,YAAG,QAAQ,GAAQ,IAC/B,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
export type PageHeadTone = "accent" | "ok" | "warn" | "err" | "dim" | "mute";
|
|
3
3
|
export interface PageHeadProps {
|
|
4
4
|
/** Título principal */
|
|
5
5
|
title: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Counter / status inline next to title — texto coloreado sin brackets. */
|
|
7
7
|
count?: {
|
|
8
8
|
label: string;
|
|
9
|
-
tone?:
|
|
9
|
+
tone?: PageHeadTone;
|
|
10
10
|
};
|
|
11
|
-
/** Subtítulo descriptivo inline · color
|
|
11
|
+
/** Subtítulo descriptivo inline · color dim. */
|
|
12
12
|
desc?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Right-side meta o acción primaria. */
|
|
14
14
|
action?: ReactNode;
|
|
15
|
+
/** Compact: sin margin bottom (consumido por sub-headers internos). */
|
|
16
|
+
compact?: boolean;
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
* PageHead — header unificado de cada tab.
|
|
18
|
-
*
|
|
19
|
-
* Layout:
|
|
20
|
-
* `<title bold> [count pill] <desc dim> <action>`
|
|
21
|
-
*
|
|
22
|
-
* Match con `TabPage` del handoff (variant-palette.jsx ~líneas 286-314): título +
|
|
23
|
-
* count + desc en una línea con la acción primaria pegada a la derecha. Mantiene
|
|
24
|
-
* proporciones del prototipo respetando límites de Ink (flex, sin gap CSS).
|
|
25
|
-
*/
|
|
26
|
-
export declare function PageHead({ title, count, desc, action }: PageHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function PageHead({ title, count, desc, action, compact }: PageHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
27
19
|
//# sourceMappingURL=page-head.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-head.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/page-head.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"page-head.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/page-head.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IAC/C,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAqBD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAe,EAAE,EAAE,aAAa,2CAwBtF"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { colors } from "../theme.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
function toneColor(tone) {
|
|
5
|
+
switch (tone) {
|
|
6
|
+
case "accent":
|
|
7
|
+
return colors.accent;
|
|
8
|
+
case "ok":
|
|
9
|
+
return colors.ok;
|
|
10
|
+
case "warn":
|
|
11
|
+
return colors.warn;
|
|
12
|
+
case "err":
|
|
13
|
+
return colors.err;
|
|
14
|
+
case "dim":
|
|
15
|
+
return colors.dim;
|
|
16
|
+
case "mute":
|
|
17
|
+
return colors.mute;
|
|
18
|
+
default:
|
|
19
|
+
return colors.accent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function PageHead({ title, count, desc, action, compact = false }) {
|
|
23
|
+
return (_jsxs(Box, { marginBottom: compact ? 0 : 1, flexDirection: "row", children: [_jsx(Text, { color: colors.bright, bold: true, children: title }), count ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: toneColor(count.tone), bold: true, children: count.label })] })) : null, desc ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.dim, children: desc })] })) : null, _jsx(Box, { flexGrow: 1 }), action ? _jsx(Box, { children: action }) : null] }));
|
|
17
24
|
}
|
|
18
25
|
//# sourceMappingURL=page-head.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-head.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/page-head.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"page-head.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/page-head.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiBrC,SAAS,SAAS,CAAC,IAAmB;IACpC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,MAAM,CAAC;QACvB,KAAK,IAAI;YACP,OAAO,MAAM,CAAC,EAAE,CAAC;QACnB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,KAAK,KAAK;YACR,OAAO,MAAM,CAAC,GAAG,CAAC;QACpB,KAAK,KAAK;YACR,OAAO,MAAM,CAAC,GAAG,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB;YACE,OAAO,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,KAAK,EAAiB;IACrF,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAC,KAAK,aACrD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,kBAC7B,KAAK,GACD,EACN,KAAK,CAAC,CAAC,CAAC,CACP,8BACE,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,kBACrC,KAAK,CAAC,KAAK,GACP,IACN,CACJ,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,CAAC,CAAC,CACN,8BACE,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,YAAG,IAAI,GAAQ,IACrC,CACJ,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI,EACnB,MAAM,CAAC,CAAC,CAAC,KAAC,GAAG,cAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IAChC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -9,6 +9,7 @@ export interface PhaseCardData {
|
|
|
9
9
|
}
|
|
10
10
|
export interface PhaseCardProps {
|
|
11
11
|
phase: PhaseCardData;
|
|
12
|
+
active?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare function PhaseCard({ phase }: PhaseCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function PhaseCard({ phase, active }: PhaseCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=phase-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase-card.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/phase-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"phase-card.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/phase-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAc,EAAE,EAAE,cAAc,2CAyDlE"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { colors, icons } from "../theme.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
4
|
+
const CIRCLED = ["①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "⑩"];
|
|
5
|
+
function circled(n) {
|
|
6
|
+
return CIRCLED[n - 1] ?? String(n);
|
|
7
|
+
}
|
|
8
|
+
export function PhaseCard({ phase, active = false }) {
|
|
9
|
+
const cmds = phase.commands.slice(0, 3);
|
|
10
|
+
const cmdsText = cmds.join(" · ") + (phase.commands.length > 3 ? " …" : "");
|
|
11
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: active ? colors.accent : colors.faint, children: active ? icons.focusBar : " " }), _jsx(Text, { children: " " }), _jsx(Text, { color: active ? colors.accent : colors.mute, bold: active, children: circled(phase.n) }), _jsx(Text, { children: " " }), _jsx(Text, { color: colors.bright, bold: true, children: phase.title }), active ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.accent, children: "\u25CF" }), _jsx(Text, { children: " " }), _jsx(Text, { color: colors.accent, bold: true, children: "ACTIVE" })] })) : null] }), _jsx(Box, { marginLeft: 3, children: _jsx(Text, { color: colors.dim, wrap: "wrap", children: phase.desc }) }), cmds.length > 0 ? (_jsx(Box, { marginLeft: 3, children: _jsx(Text, { color: colors.dim, children: cmdsText }) })) : null, (phase.slash && phase.slash !== "—") || (phase.hook && phase.hook !== "—") ? (_jsx(Box, { marginLeft: 3, children: _jsxs(Text, { wrap: "truncate-end", children: [phase.slash && phase.slash !== "—" ? (_jsx(Text, { color: colors.accent, children: phase.slash })) : null, phase.slash && phase.slash !== "—" && phase.hook && phase.hook !== "—" ? (_jsx(Text, { color: colors.dim, children: " \u00B7 " })) : null, phase.hook && phase.hook !== "—" ? (_jsxs(Text, { color: colors.ok, children: ["\u21AA ", phase.hook] })) : null] }) })) : null] }));
|
|
7
12
|
}
|
|
8
13
|
//# sourceMappingURL=phase-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase-card.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/phase-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"phase-card.js","sourceR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AAC,CAAC,IAAI,EACP,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CACxE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,yBAAY,CACpC,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAClC,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,EAAE,wBAAK,KAAK,CAAC,IAAI,IAAQ,CAC9C,CAAC,CAAC,CAAC,IAAI,IACH,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface QuickAction {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface QuickActionsProps {
|
|
6
|
+
actions: QuickAction[];
|
|
7
|
+
}
|
|
8
|
+
export declare function QuickActions({ actions }: QuickActionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=quick-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-actions.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/quick-actions.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,kDAmB1D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { colors } from "../theme.js";
|
|
4
|
+
export function QuickActions({ actions }) {
|
|
5
|
+
if (!actions.length)
|
|
6
|
+
return null;
|
|
7
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.borderFaint, children: "─".repeat(60) }), _jsx(Box, { marginTop: 0, children: actions.map((action, idx) => (_jsxs(Box, { children: [idx > 0 ? _jsx(Text, { color: colors.faint, children: " \u00B7 " }) : null, _jsx(Text, { color: colors.accent, bold: true, children: action.key }), _jsx(Text, { children: " " }), _jsx(Text, { color: colors.text, children: action.label })] }, `${action.key}-${action.label}`))) })] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=quick-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-actions.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/quick-actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWrC,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,EAAqB;IACzD,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,YAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAQ,EACxD,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACd,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5B,MAAC,GAAG,eACD,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,yBAAY,CAAC,CAAC,CAAC,IAAI,EACvD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,kBAC7B,MAAM,CAAC,GAAG,GACN,EACP,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,MAAM,CAAC,KAAK,GAAQ,KANvC,GAAG,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,CAOnC,CACP,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface SectionHeadProps {
|
|
2
|
+
label: string;
|
|
3
|
+
dotColor?: string;
|
|
4
|
+
count?: number | string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
rightAction?: string;
|
|
7
|
+
marginTop?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function SectionHead({ label, dotColor, count, hint, rightAction, marginTop, }: SectionHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=section-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-head.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/section-head.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAa,GACd,EAAE,gBAAgB,2CAyBlB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { colors } from "../theme.js";
|
|
4
|
+
export function SectionHead({ label, dotColor, count, hint, rightAction, marginTop = 0, }) {
|
|
5
|
+
const dot = dotColor ?? colors.accent;
|
|
6
|
+
return (_jsxs(Box, { marginTop: marginTop, children: [_jsx(Text, { color: dot, children: "\u00B7" }), _jsx(Text, { children: " " }), _jsx(Text, { color: colors.mute, children: label.toUpperCase() }), count !== undefined && count !== "" ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.accent, bold: true, children: String(count) })] })) : null, hint ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.dim, children: hint })] })) : null, _jsx(Box, { flexGrow: 1 }), rightAction ? _jsx(Text, { color: colors.mute, children: rightAction }) : null] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=section-head.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-head.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/section-head.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWrC,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,GAAG,CAAC,GACI;IACjB,MAAM,GAAG,GAAG,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC;IACtC,OAAO,CACL,MAAC,GAAG,IAAC,SAAS,EAAE,SAAS,aACvB,KAAC,IAAI,IAAC,KAAK,EAAE,GAAG,uBAAU,EAC1B,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,KAAK,CAAC,WAAW,EAAE,GAAQ,EACrD,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CACrC,8BACE,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,kBAC7B,MAAM,CAAC,KAAK,CAAC,GACT,IACN,CACJ,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,CAAC,CAAC,CACN,8BACE,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,YAAG,IAAI,GAAQ,IACrC,CACJ,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI,EACnB,WAAW,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,IAChE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type SidebarTabId = "status" | "workflow" | "project" | "mcp" | "skills";
|
|
2
|
+
export interface SidebarTab {
|
|
3
|
+
id: SidebarTabId;
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
alert?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkspaceContext {
|
|
10
|
+
modeLabel: string;
|
|
11
|
+
branchLabel: string;
|
|
12
|
+
sessionsLabel: string;
|
|
13
|
+
}
|
|
14
|
+
export interface KeymapEntry {
|
|
15
|
+
key: string;
|
|
16
|
+
action: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SidebarProps {
|
|
19
|
+
activeTab: SidebarTabId;
|
|
20
|
+
tabs: SidebarTab[];
|
|
21
|
+
workspaceContext: WorkspaceContext;
|
|
22
|
+
cliVersion: string;
|
|
23
|
+
globalKeys: KeymapEntry[];
|
|
24
|
+
width?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function Sidebar({ activeTab, tabs, workspaceContext, cliVersion, globalKeys, width, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/sidebar.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,YAAY,CAAC;IACxB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,KAAqB,GACtB,EAAE,YAAY,2CAiEd"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { colors, icons } from "../theme.js";
|
|
4
|
+
const DEFAULT_WIDTH = 24;
|
|
5
|
+
// Reservado para alinear los `entry.action` en la columna de keymap. 3 cells es
|
|
6
|
+
// suficiente para los keys más anchos (`↑↓`, `^K`).
|
|
7
|
+
const KEY_COL_WIDTH = 4;
|
|
8
|
+
export function Sidebar({ activeTab, tabs, workspaceContext, cliVersion, globalKeys, width = DEFAULT_WIDTH, }) {
|
|
9
|
+
return (_jsxs(Box, { flexDirection: "column", width: width, flexShrink: 0, paddingX: 1, paddingY: 1, children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: colors.accent, bold: true, children: icons.brand }), _jsxs(Text, { color: colors.bright, bold: true, children: [" ", "agent-workflow"] })] }), _jsxs(Text, { color: colors.faint, wrap: "truncate-end", children: ["v", cliVersion, " \u00B7 @tacuchi"] })] }), _jsx(Box, { marginTop: 1, children: _jsx(Divider, {}) }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: tabs.map((tab) => (_jsx(SidebarTabRow, { tab: tab, active: tab.id === activeTab }, tab.id))) }), _jsx(Box, { marginTop: 1, children: _jsx(Divider, {}) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: colors.mute, children: "WORKSPACE" }), _jsx(Text, { color: colors.text, wrap: "truncate-end", children: workspaceContext.modeLabel }), _jsx(Text, { color: colors.dim, wrap: "truncate-end", children: workspaceContext.branchLabel }), _jsx(Text, { color: colors.dim, wrap: "truncate-end", children: workspaceContext.sessionsLabel })] }), _jsx(Box, { marginTop: 1, children: _jsx(Divider, {}) }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: globalKeys.map((entry) => (_jsxs(Box, { children: [_jsx(Box, { width: KEY_COL_WIDTH, children: _jsx(Text, { color: colors.accent, children: entry.key }) }), _jsx(Text, { color: colors.dim, children: entry.action })] }, `${entry.key}-${entry.action}`))) })] }));
|
|
10
|
+
}
|
|
11
|
+
// Width interior del sidebar: width - paddingX*2 = 22, menos 2 cells de safety
|
|
12
|
+
// margin para variabilidad de ancho visual de glyphs + inner padding.
|
|
13
|
+
const SIDEBAR_INNER_WIDTH = DEFAULT_WIDTH - 4;
|
|
14
|
+
const SIDEBAR_INNER_PAD = 1;
|
|
15
|
+
function SidebarTabRow({ tab, active }) {
|
|
16
|
+
const focusGlyph = active ? icons.focusBar : " ";
|
|
17
|
+
const bg = active ? colors.bgHighlight : undefined;
|
|
18
|
+
const bgProp = bg ? { backgroundColor: bg } : {};
|
|
19
|
+
const innerPad = " ".repeat(SIDEBAR_INNER_PAD);
|
|
20
|
+
// Layout: bar + gap + inner_pad + key + space + label + ... + inner_pad.
|
|
21
|
+
// Bar va AFUERA del bg; el bg empieza en inner_pad.
|
|
22
|
+
const FOCUS_OUTER = 2;
|
|
23
|
+
const used = FOCUS_OUTER +
|
|
24
|
+
SIDEBAR_INNER_PAD * 2 +
|
|
25
|
+
[...tab.key].length +
|
|
26
|
+
1 +
|
|
27
|
+
[...tab.label].length +
|
|
28
|
+
(tab.badge ? [...tab.badge].length + 1 : 0) +
|
|
29
|
+
(tab.alert ? 2 : 0);
|
|
30
|
+
const spacerLen = Math.max(1, SIDEBAR_INNER_WIDTH - used);
|
|
31
|
+
const spacer = " ".repeat(spacerLen);
|
|
32
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: colors.accent, bold: active, children: focusGlyph }), _jsx(Text, { children: " " }), _jsx(Text, { ...bgProp, children: innerPad }), _jsx(Text, { ...bgProp, color: active ? colors.accent : colors.dim, bold: active, children: tab.key }), _jsx(Text, { ...bgProp, children: " " }), _jsx(Text, { ...bgProp, color: active ? colors.bright : colors.text, bold: active, children: tab.label }), _jsx(Text, { ...bgProp, wrap: "truncate-end", children: spacer }), tab.badge ? (_jsx(Text, { ...bgProp, color: active ? colors.accentSoft : colors.mute, children: tab.badge })) : null, tab.alert ? (_jsxs(_Fragment, { children: [_jsx(Text, { ...bgProp, children: " " }), _jsx(Text, { ...bgProp, color: colors.err, children: "\u25CF" })] })) : null, _jsx(Text, { ...bgProp, children: innerPad })] }));
|
|
33
|
+
}
|
|
34
|
+
function Divider() {
|
|
35
|
+
return _jsx(Text, { color: colors.borderFaint, children: "─".repeat(DEFAULT_WIDTH - 2) });
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=sidebar.js.map
|