@aui.io/apollo 0.1.9 → 0.1.10
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/node_modules/@aui.io/apollo-cli/bin/apollo.js +8 -5
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js +3 -10
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/package.json +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +13 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +17 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.d.ts +17 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js +27 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.d.ts +13 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js +47 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.d.ts +28 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js +219 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.d.ts +8 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js +43 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.d.ts +5 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js +26 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.d.ts +67 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js +138 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.d.ts +27 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js +92 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.d.ts +46 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js +87 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.d.ts +15 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js +38 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.d.ts +11 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js +34 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.d.ts +9 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js +31 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.d.ts +23 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js +293 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.d.ts +4 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js +13 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.d.ts +3 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js +36 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.d.ts +85 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js +11 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.d.ts +78 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js +279 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/session.d.ts +64 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js +319 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.d.ts +25 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js +69 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.d.ts +23 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js +60 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/index.d.ts +17 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/index.js +22 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.d.ts +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js +51 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.d.ts +15 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +111 -19
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.d.ts +7 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js +33 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.d.ts +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +49 -7
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.d.ts +16 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js +39 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.d.ts +17 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js +76 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.d.ts +64 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js +105 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.d.ts +18 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js +24 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.d.ts +7 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js +17 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.d.ts +25 -6
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js +108 -17
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.d.ts +3 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js +2 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +1780 -243
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.d.ts +15 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js +22 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.d.ts +8 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js +23 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.d.ts +4 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js +7 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.d.ts +20 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js +29 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.d.ts +15 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js +27 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.d.ts +30 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js +60 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.d.ts +17 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js +61 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.d.ts +107 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js +235 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.d.ts +8 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js +9 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.d.ts +4 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js +15 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.d.ts +5 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js +16 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.d.ts +10 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js +29 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.d.ts +4 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js +22 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.d.ts +0 -10
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js +0 -19
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ThreadSummary } from "./data.js";
|
|
2
|
+
/** Row 0 is always "new thread"; real threads follow, newest first. */
|
|
3
|
+
export declare const NEW_THREAD_ROW = 0;
|
|
4
|
+
export declare function threadsRowCount(threads: ThreadSummary[] | undefined): number;
|
|
5
|
+
/**
|
|
6
|
+
* Threads pane (left). Cursor-driven: ↑↓ move, Enter opens (or starts a new
|
|
7
|
+
* thread). The pane windows itself around the cursor like the pickers do.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ThreadsPane({ threads, loading, cursor, activeId, focused, width, pageSize, }: {
|
|
10
|
+
threads: ThreadSummary[] | undefined;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
cursor: number;
|
|
13
|
+
activeId: string | undefined;
|
|
14
|
+
focused: boolean;
|
|
15
|
+
width: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
}): import("react").ReactNode;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { AMBER, DIM, FAINT, FG, TEAL, TEAL_DIM } from "../theme/tokens.js";
|
|
3
|
+
/** Row 0 is always "new thread"; real threads follow, newest first. */
|
|
4
|
+
export const NEW_THREAD_ROW = 0;
|
|
5
|
+
export function threadsRowCount(threads) {
|
|
6
|
+
return 1 + (threads?.length ?? 0);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Threads pane (left). Cursor-driven: ↑↓ move, Enter opens (or starts a new
|
|
10
|
+
* thread). The pane windows itself around the cursor like the pickers do.
|
|
11
|
+
*/
|
|
12
|
+
export function ThreadsPane({ threads, loading, cursor, activeId, focused, width, pageSize, }) {
|
|
13
|
+
const rows = threads ?? [];
|
|
14
|
+
const total = threadsRowCount(threads);
|
|
15
|
+
const clamped = Math.max(0, Math.min(cursor, total - 1));
|
|
16
|
+
const windowStart = total <= pageSize
|
|
17
|
+
? 0
|
|
18
|
+
: Math.max(0, Math.min(clamped - Math.floor(pageSize / 2), total - pageSize));
|
|
19
|
+
const visible = Array.from({ length: Math.min(pageSize, total - windowStart) }, (_, i) => windowStart + i);
|
|
20
|
+
const label = (index) => {
|
|
21
|
+
if (index === NEW_THREAD_ROW)
|
|
22
|
+
return "+ new thread";
|
|
23
|
+
const t = rows[index - 1];
|
|
24
|
+
const mark = t.id === activeId ? "● " : " ";
|
|
25
|
+
return `${mark}${t.title}`;
|
|
26
|
+
};
|
|
27
|
+
const detail = (index) => {
|
|
28
|
+
if (index === NEW_THREAD_ROW)
|
|
29
|
+
return "";
|
|
30
|
+
// Relative age only — titles need the room more than a turns count does.
|
|
31
|
+
return rows[index - 1].relative;
|
|
32
|
+
};
|
|
33
|
+
return (_jsxs("box", { title: " threads ", style: {
|
|
34
|
+
border: true,
|
|
35
|
+
borderStyle: "rounded",
|
|
36
|
+
borderColor: focused ? TEAL : TEAL_DIM,
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
width,
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
paddingLeft: 1,
|
|
41
|
+
paddingRight: 1,
|
|
42
|
+
overflow: "hidden",
|
|
43
|
+
}, children: [loading ? (_jsx("text", { fg: FAINT, children: "loading\u2026" })) : (visible.map((index) => {
|
|
44
|
+
const selected = focused && index === clamped;
|
|
45
|
+
const active = index > 0 && rows[index - 1].id === activeId;
|
|
46
|
+
const extra = detail(index);
|
|
47
|
+
// One row per thread: title yields to the detail, never wraps.
|
|
48
|
+
const budget = Math.max(8, width - 6);
|
|
49
|
+
const labelMax = extra
|
|
50
|
+
? Math.max(6, budget - extra.length - 1)
|
|
51
|
+
: budget;
|
|
52
|
+
return (_jsxs("text", { children: [_jsx("span", { fg: selected ? TEAL : undefined, children: selected ? "› " : " " }), _jsx("span", { fg: index === NEW_THREAD_ROW
|
|
53
|
+
? AMBER
|
|
54
|
+
: active
|
|
55
|
+
? TEAL
|
|
56
|
+
: selected
|
|
57
|
+
? FG
|
|
58
|
+
: DIM, children: label(index).slice(0, labelMax) }), extra ? _jsxs("span", { fg: FAINT, children: [" ", extra] }) : null] }, index));
|
|
59
|
+
})), !loading && rows.length === 0 ? (_jsx("text", { fg: FAINT, children: "no threads yet" })) : null, total > pageSize ? (_jsxs("text", { fg: FAINT, children: [windowStart + 1, "\u2013", windowStart + visible.length, " of ", total] })) : null] }));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=ThreadsPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreadsPane.js","sourceRoot":"","sources":["../../../src/talk/ThreadsPane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG3E,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,MAAM,UAAU,eAAe,CAAC,OAAoC;IAClE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,GAST;IACC,MAAM,IAAI,GAAG,OAAO,IAAI,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IACzD,MAAM,WAAW,GACf,KAAK,IAAI,QAAQ;QACf,CAAC,CAAC,CAAC;QACH,CAAC,CAA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,CACR,CAAC;YACJ,CAAC,CAAC,CACH,EACA,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAC/B,eAAM,EAAE,EAAE,KAAK,+BAAuB,CACvC,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAClB,gBAAM,EAAE,EAAE,KAAK,aACZ,WAAW,GAAG,CAAC,YAAG,WAAW,GAAG,OAAO,CAAC,MAAM,UAAM,KAAK,IACrD,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { Message, Thread } from "@aui.io/apollo-core/api/runtime-api.js";
|
|
2
|
+
import type { ChatTurn } from "../lib/actions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Talk workbench data layer (TUI_DESIGN §9) — pure helpers for the
|
|
5
|
+
* threads / conversation / inspector panes and the multiline composer.
|
|
6
|
+
* Everything here is renderer-free so it can be unit-tested.
|
|
7
|
+
*/
|
|
8
|
+
/** A conversation turn as Talk renders it. Extends the wire-level ChatTurn. */
|
|
9
|
+
export interface TalkTurn extends ChatTurn {
|
|
10
|
+
/** Local send/receive time (ms since epoch). */
|
|
11
|
+
at?: number;
|
|
12
|
+
/** Placeholder agent turn while the reply is in flight. */
|
|
13
|
+
pending?: boolean;
|
|
14
|
+
/** Round-trip time of the send request, measured client-side. */
|
|
15
|
+
durationMs?: number;
|
|
16
|
+
tokens?: {
|
|
17
|
+
input?: number;
|
|
18
|
+
output?: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Optimistic send: append the user turn plus a pending agent placeholder. */
|
|
22
|
+
export declare function beginSend(chat: TalkTurn[], text: string, at: number): TalkTurn[];
|
|
23
|
+
/** Replace the trailing pending placeholder with the settled turn. */
|
|
24
|
+
export declare function settleSend(chat: TalkTurn[], turn: TalkTurn): TalkTurn[];
|
|
25
|
+
/**
|
|
26
|
+
* Cancel the in-flight send. The messaging API has no server-side cancel, so
|
|
27
|
+
* this is a client-side discard: the placeholder becomes a system note and the
|
|
28
|
+
* reply is dropped when (if) it arrives — the epoch guard in the app does that.
|
|
29
|
+
*/
|
|
30
|
+
export declare function cancelSend(chat: TalkTurn[], at: number): TalkTurn[];
|
|
31
|
+
export declare function lastPendingIndex(chat: TalkTurn[]): number;
|
|
32
|
+
export declare function hasPendingSend(chat: TalkTurn[]): boolean;
|
|
33
|
+
export interface ThreadSummary {
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
turns?: number;
|
|
37
|
+
/** Relative "3m ago" from updated_at; empty when the API omits it. */
|
|
38
|
+
relative: string;
|
|
39
|
+
}
|
|
40
|
+
/** Newest-first summaries for the threads pane. */
|
|
41
|
+
export declare function threadSummaries(threads: Thread[], now?: number): ThreadSummary[];
|
|
42
|
+
/** Map runtime-api messages onto conversation turns (thread resume). */
|
|
43
|
+
export declare function messagesToTurns(messages: Message[]): TalkTurn[];
|
|
44
|
+
export type TalkRowKind = "header" | "body" | "pending" | "spacer";
|
|
45
|
+
export interface TalkRow {
|
|
46
|
+
kind: TalkRowKind;
|
|
47
|
+
/** Owning turn index; spacers belong to the turn above. */
|
|
48
|
+
turn: number;
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
51
|
+
/** Flatten the conversation into renderable rows wrapped at `width`. */
|
|
52
|
+
export declare function talkRows(chat: TalkTurn[], width: number, now?: number): TalkRow[];
|
|
53
|
+
/** First row index of a turn — scroll target when the cursor moves. */
|
|
54
|
+
export declare function turnRowOffset(rows: TalkRow[], turn: number): number;
|
|
55
|
+
/** 1-based position of the turn among agent replies (chatOverlay's index). */
|
|
56
|
+
export declare function agentOrdinal(chat: TalkTurn[], turn: number): number | undefined;
|
|
57
|
+
/** Index of the newest settled agent reply; -1 when there is none. */
|
|
58
|
+
export declare function lastAgentTurnIndex(chat: TalkTurn[]): number;
|
|
59
|
+
/** Trace/debug payload fetched for one specific turn. */
|
|
60
|
+
export interface InspectorFetch {
|
|
61
|
+
turn: number;
|
|
62
|
+
kind: "trace" | "debug";
|
|
63
|
+
lines: string[];
|
|
64
|
+
}
|
|
65
|
+
export declare function inspectorMeta(chat: TalkTurn[], turn: number, opts: {
|
|
66
|
+
localMode: boolean;
|
|
67
|
+
remoteTag: string;
|
|
68
|
+
env: string;
|
|
69
|
+
vars: string[];
|
|
70
|
+
}): string[];
|
|
71
|
+
export interface TalkLayout {
|
|
72
|
+
threads: boolean;
|
|
73
|
+
inspector: boolean;
|
|
74
|
+
threadsWidth: number;
|
|
75
|
+
inspectorWidth: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Wide terminals get the full three panes; medium drops the inspector (t/d
|
|
79
|
+
* fall back to inline overlays in the conversation); narrow is conversation
|
|
80
|
+
* only (threads live behind ^K "thread").
|
|
81
|
+
*/
|
|
82
|
+
export declare function talkLayout(termWidth: number): TalkLayout;
|
|
83
|
+
/** Why sending is impossible right now — shown on the composer border. */
|
|
84
|
+
export declare function composerDisabledReason(scope: {
|
|
85
|
+
loggedIn: boolean;
|
|
86
|
+
agent: string;
|
|
87
|
+
}, localMode: boolean, agentPath?: string): string | undefined;
|
|
88
|
+
/** Composer grows with its draft, from one line up to five. */
|
|
89
|
+
export declare function composerHeight(draft: string): number;
|
|
90
|
+
/**
|
|
91
|
+
* Textarea bindings: Enter sends (chat muscle memory), Shift+Enter inserts a
|
|
92
|
+
* newline on kitty-protocol terminals, Alt/Option+Enter (ESC CR) does the same
|
|
93
|
+
* on legacy ones — both are listed in the footer. The defaults map
|
|
94
|
+
* meta+return to submit and return to newline; these entries override both.
|
|
95
|
+
*/
|
|
96
|
+
export declare const COMPOSER_KEY_BINDINGS: readonly [{
|
|
97
|
+
readonly name: "return";
|
|
98
|
+
readonly action: "submit";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "return";
|
|
101
|
+
readonly shift: true;
|
|
102
|
+
readonly action: "newline";
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "return";
|
|
105
|
+
readonly meta: true;
|
|
106
|
+
readonly action: "newline";
|
|
107
|
+
}];
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { relativeTime } from "../author/data.js";
|
|
2
|
+
import { wrapText } from "../author/session.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Send lifecycle (honest pending: request/response API, no fake streaming)
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
/** Optimistic send: append the user turn plus a pending agent placeholder. */
|
|
7
|
+
export function beginSend(chat, text, at) {
|
|
8
|
+
return [
|
|
9
|
+
...chat,
|
|
10
|
+
{ role: "you", text, at },
|
|
11
|
+
{ role: "agent", text: "", pending: true, at },
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
/** Replace the trailing pending placeholder with the settled turn. */
|
|
15
|
+
export function settleSend(chat, turn) {
|
|
16
|
+
const index = lastPendingIndex(chat);
|
|
17
|
+
if (index < 0)
|
|
18
|
+
return [...chat, turn];
|
|
19
|
+
const next = chat.slice();
|
|
20
|
+
next[index] = turn;
|
|
21
|
+
return next;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Cancel the in-flight send. The messaging API has no server-side cancel, so
|
|
25
|
+
* this is a client-side discard: the placeholder becomes a system note and the
|
|
26
|
+
* reply is dropped when (if) it arrives — the epoch guard in the app does that.
|
|
27
|
+
*/
|
|
28
|
+
export function cancelSend(chat, at) {
|
|
29
|
+
return settleSend(chat, {
|
|
30
|
+
role: "system",
|
|
31
|
+
text: "cancelled — the reply is discarded when it arrives (API has no cancel)",
|
|
32
|
+
at,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function lastPendingIndex(chat) {
|
|
36
|
+
for (let i = chat.length - 1; i >= 0; i--) {
|
|
37
|
+
if (chat[i].pending)
|
|
38
|
+
return i;
|
|
39
|
+
}
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
export function hasPendingSend(chat) {
|
|
43
|
+
return lastPendingIndex(chat) >= 0;
|
|
44
|
+
}
|
|
45
|
+
/** Newest-first summaries for the threads pane. */
|
|
46
|
+
export function threadSummaries(threads, now = Date.now()) {
|
|
47
|
+
const at = (t) => {
|
|
48
|
+
const iso = t.updated_at || t.created_at;
|
|
49
|
+
const ms = iso ? Date.parse(iso) : Number.NaN;
|
|
50
|
+
return Number.isNaN(ms) ? 0 : ms;
|
|
51
|
+
};
|
|
52
|
+
return threads
|
|
53
|
+
.slice()
|
|
54
|
+
.sort((a, b) => at(b) - at(a))
|
|
55
|
+
.map((t) => ({
|
|
56
|
+
id: t.id,
|
|
57
|
+
title: (t.title ?? "").trim() || t.id.slice(0, 12),
|
|
58
|
+
...(typeof t.turns === "number" ? { turns: t.turns } : {}),
|
|
59
|
+
relative: at(t) > 0 ? relativeTime(at(t), now) : "",
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
/** Map runtime-api messages onto conversation turns (thread resume). */
|
|
63
|
+
export function messagesToTurns(messages) {
|
|
64
|
+
return messages.map((m) => {
|
|
65
|
+
const sender = m.sender?.type?.toLowerCase() ?? "";
|
|
66
|
+
const role = sender === "user" || sender === "human" ? "you" : "agent";
|
|
67
|
+
const at = m.created_at ? Date.parse(m.created_at) : Number.NaN;
|
|
68
|
+
const tokens = m.input_tokens !== undefined || m.output_tokens !== undefined
|
|
69
|
+
? {
|
|
70
|
+
...(m.input_tokens !== undefined ? { input: m.input_tokens } : {}),
|
|
71
|
+
...(m.output_tokens !== undefined ? { output: m.output_tokens } : {}),
|
|
72
|
+
}
|
|
73
|
+
: undefined;
|
|
74
|
+
return {
|
|
75
|
+
role,
|
|
76
|
+
text: m.text ?? "(empty)",
|
|
77
|
+
messageId: m.id,
|
|
78
|
+
interactionId: m.id,
|
|
79
|
+
...(m.trace_info ? { trace: m.trace_info } : {}),
|
|
80
|
+
...(Number.isNaN(at) ? {} : { at }),
|
|
81
|
+
...(tokens ? { tokens } : {}),
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function headerMeta(turn, now) {
|
|
86
|
+
const parts = [];
|
|
87
|
+
if (turn.at)
|
|
88
|
+
parts.push(relativeTime(turn.at, now));
|
|
89
|
+
if (turn.durationMs !== undefined) {
|
|
90
|
+
parts.push(`${(turn.durationMs / 1000).toFixed(1)}s`);
|
|
91
|
+
}
|
|
92
|
+
if (turn.tokens) {
|
|
93
|
+
const io = [];
|
|
94
|
+
if (turn.tokens.input !== undefined)
|
|
95
|
+
io.push(`${turn.tokens.input}↑`);
|
|
96
|
+
if (turn.tokens.output !== undefined)
|
|
97
|
+
io.push(`${turn.tokens.output}↓`);
|
|
98
|
+
if (io.length > 0)
|
|
99
|
+
parts.push(io.join(" "));
|
|
100
|
+
}
|
|
101
|
+
return parts.join(" · ");
|
|
102
|
+
}
|
|
103
|
+
/** Flatten the conversation into renderable rows wrapped at `width`. */
|
|
104
|
+
export function talkRows(chat, width, now = Date.now()) {
|
|
105
|
+
const rows = [];
|
|
106
|
+
chat.forEach((turn, index) => {
|
|
107
|
+
if (index > 0)
|
|
108
|
+
rows.push({ kind: "spacer", turn: index - 1, text: "" });
|
|
109
|
+
if (turn.pending) {
|
|
110
|
+
const elapsed = turn.at ? ` ${((now - turn.at) / 1000).toFixed(1)}s` : "";
|
|
111
|
+
rows.push({ kind: "pending", turn: index, text: `agent · waiting${elapsed}` });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const meta = headerMeta(turn, now);
|
|
115
|
+
rows.push({
|
|
116
|
+
kind: "header",
|
|
117
|
+
turn: index,
|
|
118
|
+
text: meta ? `${turn.role} · ${meta}` : turn.role,
|
|
119
|
+
});
|
|
120
|
+
for (const line of turn.text.split("\n")) {
|
|
121
|
+
for (const wrapped of wrapText(line, width)) {
|
|
122
|
+
rows.push({ kind: "body", turn: index, text: wrapped });
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return rows;
|
|
127
|
+
}
|
|
128
|
+
/** First row index of a turn — scroll target when the cursor moves. */
|
|
129
|
+
export function turnRowOffset(rows, turn) {
|
|
130
|
+
const index = rows.findIndex((r) => r.turn === turn && r.kind !== "spacer");
|
|
131
|
+
return index < 0 ? 0 : index;
|
|
132
|
+
}
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
// Inspector pane (diagnostics attached to the selected turn)
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
/** 1-based position of the turn among agent replies (chatOverlay's index). */
|
|
137
|
+
export function agentOrdinal(chat, turn) {
|
|
138
|
+
if (chat[turn]?.role !== "agent" || chat[turn]?.pending)
|
|
139
|
+
return undefined;
|
|
140
|
+
let ordinal = 0;
|
|
141
|
+
for (let i = 0; i <= turn; i++) {
|
|
142
|
+
if (chat[i].role === "agent" && !chat[i].pending)
|
|
143
|
+
ordinal++;
|
|
144
|
+
}
|
|
145
|
+
return ordinal;
|
|
146
|
+
}
|
|
147
|
+
/** Index of the newest settled agent reply; -1 when there is none. */
|
|
148
|
+
export function lastAgentTurnIndex(chat) {
|
|
149
|
+
for (let i = chat.length - 1; i >= 0; i--) {
|
|
150
|
+
if (chat[i].role === "agent" && !chat[i].pending)
|
|
151
|
+
return i;
|
|
152
|
+
}
|
|
153
|
+
return -1;
|
|
154
|
+
}
|
|
155
|
+
export function inspectorMeta(chat, turn, opts) {
|
|
156
|
+
const selected = chat[turn];
|
|
157
|
+
if (!selected)
|
|
158
|
+
return ["no turn selected", "", "↑↓ selects a turn"];
|
|
159
|
+
const lines = [];
|
|
160
|
+
if (selected.pending) {
|
|
161
|
+
lines.push("status waiting for reply…");
|
|
162
|
+
lines.push("", "Esc cancels (client-side)");
|
|
163
|
+
return lines;
|
|
164
|
+
}
|
|
165
|
+
if (selected.role !== "agent") {
|
|
166
|
+
lines.push(`turn ${selected.role}`);
|
|
167
|
+
if (selected.at)
|
|
168
|
+
lines.push(`sent ${relativeTime(selected.at)}`);
|
|
169
|
+
lines.push("", "select an agent reply for diagnostics");
|
|
170
|
+
return lines;
|
|
171
|
+
}
|
|
172
|
+
lines.push(`turn #${agentOrdinal(chat, turn) ?? "?"} (agent)`);
|
|
173
|
+
if (selected.at)
|
|
174
|
+
lines.push(`at ${relativeTime(selected.at)}`);
|
|
175
|
+
if (selected.durationMs !== undefined) {
|
|
176
|
+
lines.push(`duration ${(selected.durationMs / 1000).toFixed(1)}s`);
|
|
177
|
+
}
|
|
178
|
+
if (selected.tokens?.input !== undefined || selected.tokens?.output !== undefined) {
|
|
179
|
+
lines.push(`tokens ${selected.tokens.input ?? "?"} in · ${selected.tokens.output ?? "?"} out`);
|
|
180
|
+
}
|
|
181
|
+
lines.push(`runtime ${opts.localMode ? "LOCAL BUNDLE (this checkout)" : `${opts.env} · ${opts.remoteTag}`}`);
|
|
182
|
+
if (opts.vars.length > 0)
|
|
183
|
+
lines.push(`vars ${opts.vars.join(", ")}`);
|
|
184
|
+
if (selected.messageId)
|
|
185
|
+
lines.push(`message ${selected.messageId}`);
|
|
186
|
+
lines.push(`trace ${selected.trace ? "attached — ^T to view" : "^T fetches"}`);
|
|
187
|
+
lines.push(`debug ^D fetches`);
|
|
188
|
+
return lines;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Wide terminals get the full three panes; medium drops the inspector (t/d
|
|
192
|
+
* fall back to inline overlays in the conversation); narrow is conversation
|
|
193
|
+
* only (threads live behind ^K "thread").
|
|
194
|
+
*/
|
|
195
|
+
export function talkLayout(termWidth) {
|
|
196
|
+
const threads = termWidth >= 100;
|
|
197
|
+
const inspector = termWidth >= 132;
|
|
198
|
+
return {
|
|
199
|
+
threads,
|
|
200
|
+
inspector,
|
|
201
|
+
threadsWidth: Math.max(22, Math.min(28, Math.floor(termWidth / 5))),
|
|
202
|
+
inspectorWidth: Math.max(32, Math.min(42, Math.floor(termWidth * 0.28))),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
// Composer
|
|
207
|
+
// ---------------------------------------------------------------------------
|
|
208
|
+
/** Why sending is impossible right now — shown on the composer border. */
|
|
209
|
+
export function composerDisabledReason(scope, localMode, agentPath) {
|
|
210
|
+
if (!scope.loggedIn)
|
|
211
|
+
return "log in first — ^K “login”";
|
|
212
|
+
if (localMode && !agentPath)
|
|
213
|
+
return "local mode needs an agent checkout";
|
|
214
|
+
if (scope.agent === "—" && !(localMode && agentPath)) {
|
|
215
|
+
return "select an agent — ^G or ^K “agent”";
|
|
216
|
+
}
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
/** Composer grows with its draft, from one line up to five. */
|
|
220
|
+
export function composerHeight(draft) {
|
|
221
|
+
const lines = draft.length === 0 ? 1 : draft.split("\n").length;
|
|
222
|
+
return Math.max(1, Math.min(5, lines));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Textarea bindings: Enter sends (chat muscle memory), Shift+Enter inserts a
|
|
226
|
+
* newline on kitty-protocol terminals, Alt/Option+Enter (ESC CR) does the same
|
|
227
|
+
* on legacy ones — both are listed in the footer. The defaults map
|
|
228
|
+
* meta+return to submit and return to newline; these entries override both.
|
|
229
|
+
*/
|
|
230
|
+
export const COMPOSER_KEY_BINDINGS = [
|
|
231
|
+
{ name: "return", action: "submit" },
|
|
232
|
+
{ name: "return", shift: true, action: "newline" },
|
|
233
|
+
{ name: "return", meta: true, action: "newline" },
|
|
234
|
+
];
|
|
235
|
+
//# sourceMappingURL=data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../src/talk/data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAoBhD,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAE9E,8EAA8E;AAC9E,MAAM,UAAU,SAAS,CAAC,IA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ome. */
|
|
2
|
+
export declare const TEAL = "#4FB8B0";
|
|
3
|
+
export declare const TEAL_DIM = "#2E6B66";
|
|
4
|
+
export declare const AMBER = "#E6A23C";
|
|
5
|
+
export declare const RED = "#D46A6A";
|
|
6
|
+
export declare const DIM = "#8A8A8A";
|
|
7
|
+
export declare const FAINT = "#5C5C5C";
|
|
8
|
+
export declare const FG = "#D8D8D8";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Apollo TUI theme tokens — single source for colors used across chrome. */
|
|
2
|
+
export const TEAL = "#4FB8B0";
|
|
3
|
+
export const TEAL_DIM = "#2E6B66";
|
|
4
|
+
export const AMBER = "#E6A23C";
|
|
5
|
+
export const RED = "#D46A6A";
|
|
6
|
+
export const DIM = "#8A8A8A";
|
|
7
|
+
export const FAINT = "#5C5C5C";
|
|
8
|
+
export const FG = "#D8D8D8";
|
|
9
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAClC,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAC/B,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { AMBER, RED } from "../theme/tokens.js";
|
|
3
|
+
export function ConfirmPane({ confirm }) {
|
|
4
|
+
return (_jsxs("box", { title: ` confirm ${confirm.title} `, style: {
|
|
5
|
+
border: true,
|
|
6
|
+
borderStyle: "rounded",
|
|
7
|
+
borderColor: AMBER,
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
width: "100%",
|
|
11
|
+
paddingLeft: 1,
|
|
12
|
+
paddingRight: 1,
|
|
13
|
+
}, children: [_jsxs("text", { fg: AMBER, children: ["Type ", _jsx("b", { children: confirm.phrase }), " to confirm"] }), confirm.error && _jsxs("text", { fg: RED, children: ["! ", confirm.error] })] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ConfirmPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmPane.js","sourceRoot":"","sources":["../../../src/ui/ConfirmPane.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAA6B;IAChE,OAAO,CACL,eACE,KAAK,EAAE,YAAY,OAAO,CAAC,KAAK,GAAG,EACnC,KAAK,EAAE;YACL,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,aAED,gBAAM,EAAE,EAAE,KAAK,sBACR,sBAAI,OAAO,CAAC,MAAM,GAAK,mBACvB,EACN,OAAO,CAAC,KAAK,IAAI,gBAAM,EAAE,EAAE,GAAG,mBAAK,OAAO,CAAC,KAAK,IAAQ,IACrD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { FAINT, TEAL } from "../theme/tokens.js";
|
|
3
|
+
/** Scrollable result region (operation output, help, mockdb dumps, …). */
|
|
4
|
+
export function OutputPane({ paneTitle, paneLines, }) {
|
|
5
|
+
if (paneLines.length === 0)
|
|
6
|
+
return null;
|
|
7
|
+
return (_jsxs("scrollbox", { style: {
|
|
8
|
+
flexGrow: 1,
|
|
9
|
+
flexShrink: 1,
|
|
10
|
+
flexBasis: 0,
|
|
11
|
+
minHeight: 2,
|
|
12
|
+
width: "100%",
|
|
13
|
+
marginTop: 1,
|
|
14
|
+
}, children: [paneTitle && _jsxs("text", { fg: TEAL, children: ["\u2014 ", paneTitle, " \u2014"] }), paneLines.map((line, i) => (_jsx("text", { fg: FAINT, children: line }, i)))] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=OutputPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputPane.js","sourceRoot":"","sources":["../../../src/ui/OutputPane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEjD,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CAAC,EACzB,SAAS,EACT,SAAS,GAIV;IACC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,CACL,qBACE,KAAK,EAAE;YACL,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,CAAC;SACb,aAEA,SAAS,IAAI,gBAAM,EAAE,EAAE,IAAI,wBAAK,SAAS,eAAU,EACnD,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,eAAc,EAAE,EAAE,KAAK,YACpB,IAAI,IADI,CAAC,CAEL,CACR,CAAC,IACQ,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PickerItem } from "../lib/picker.js";
|
|
2
|
+
export declare function PickerPane({ items, cursor, windowStart, total, title, filter, dismissHint, }: {
|
|
3
|
+
items: PickerItem[];
|
|
4
|
+
cursor: number;
|
|
5
|
+
windowStart: number;
|
|
6
|
+
total: number;
|
|
7
|
+
title: string;
|
|
8
|
+
filter?: string | undefined;
|
|
9
|
+
dismissHint?: string | undefined;
|
|
10
|
+
}): import("react").ReactNode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { pickerColumnWidths, truncatePickerText, } from "../lib/picker.js";
|
|
3
|
+
import { AMBER, FAINT, FG, TEAL, TEAL_DIM } from "../theme/tokens.js";
|
|
4
|
+
export function PickerPane({ items, cursor, windowStart, total, title, filter, dismissHint, }) {
|
|
5
|
+
const { nameWidth, idWidth } = pickerColumnWidths();
|
|
6
|
+
return (_jsxs("box", { title: ` pick ${title}${filter ? ` · “${filter}”` : ""} `, style: {
|
|
7
|
+
border: true,
|
|
8
|
+
borderStyle: "rounded",
|
|
9
|
+
borderColor: TEAL_DIM,
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
flexGrow: 1,
|
|
12
|
+
width: "100%",
|
|
13
|
+
paddingLeft: 1,
|
|
14
|
+
paddingRight: 1,
|
|
15
|
+
}, children: [items.length === 0 ? (_jsx("text", { fg: AMBER, children: " No matches" })) : (items.map((item, offset) => {
|
|
16
|
+
const index = windowStart + offset;
|
|
17
|
+
const active = index === cursor;
|
|
18
|
+
const marker = active ? "›" : " ";
|
|
19
|
+
const number = String(index + 1).padStart(2);
|
|
20
|
+
const name = truncatePickerText(item.label, nameWidth).padEnd(nameWidth);
|
|
21
|
+
const secondary = item.detail && item.detail !== item.label
|
|
22
|
+
? truncatePickerText(item.detail, idWidth)
|
|
23
|
+
: "";
|
|
24
|
+
return (_jsxs("text", { fg: active ? TEAL : FG, children: [`${marker} ${number} ${name}`, secondary ? (_jsx("span", { fg: FAINT, children: ` ${secondary}` })) : null] }, `${item.id}-${index}`));
|
|
25
|
+
})), _jsxs("text", { fg: FAINT, children: [total > items.length
|
|
26
|
+
? ` ${cursor + 1}/${total} · ↑↓ move · type to filter · Enter`
|
|
27
|
+
: ` ↑↓ move · type to filter · Enter select`, dismissHint ? ` · ${dismissHint}` : ""] })] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=PickerPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerPane.js","sourceRoot":"","sources":["../../../src/ui/PickerPane.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,WAAW,EACX,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,GASZ;IACC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,kBAAkB,EAAE,CAAC;IACpD,OAAO,CACL,eACE,KAAK,EAAE,SAAS,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EACzD,KAAK,EAAE;YACL,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,QAAQ;YACrB,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,aAEA,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACpB,eAAM,EAAE,EAAE,KAAK,4BAAoB,CACpC,CAAC,CAAC,CAAC,CACF,KAAK,CAAC,GAAG,CAAC,CAAC,IA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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { visibleFields } from "../lib/sheet.js";
|
|
3
|
+
import { AMBER, DIM, FAINT, FG, RED, TEAL_DIM } from "../theme/tokens.js";
|
|
4
|
+
export function SheetPane({ sheet }) {
|
|
5
|
+
const fields = visibleFields(sheet);
|
|
6
|
+
return (_jsxs("box", { title: ` ${sheet.title} `, style: {
|
|
7
|
+
border: true,
|
|
8
|
+
borderStyle: "rounded",
|
|
9
|
+
borderColor: TEAL_DIM,
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
flexGrow: 1,
|
|
12
|
+
width: "100%",
|
|
13
|
+
paddingLeft: 1,
|
|
14
|
+
paddingRight: 1,
|
|
15
|
+
}, children: [sheet.info?.map((line, i) => line.startsWith("!") ? (_jsx("text", { fg: AMBER, children: line }, `info-${i}`)) : (_jsx("text", { fg: DIM, children: line }, `info-${i}`))), sheet.info && sheet.info.length > 0 ? _jsx("text", { children: " " }) : null, fields.map((field, i) => {
|
|
16
|
+
const raw = sheet.values[field.name];
|
|
17
|
+
const display = field.control === "toggle" ? (raw ? "[x]" : "[ ]") : String(raw ?? "");
|
|
18
|
+
const active = i === sheet.focused;
|
|
19
|
+
return (_jsxs("text", { fg: active ? FG : DIM, children: [active ? "› " : " ", field.label.padEnd(18), " ", display, field.control === "picker" ? _jsx("span", { fg: FAINT, children: " (picker)" }) : null, field.required && !display ? _jsx("span", { fg: FAINT, children: " (required)" }) : null] }, field.name));
|
|
20
|
+
}), sheet.fields.some((f) => f.advanced) && (_jsxs("text", { fg: FAINT, children: [" ", sheet.advancedOpen ? "▾" : "▸", " advanced (+ to toggle)"] })), sheet.error && _jsxs("text", { fg: RED, children: ["! ", sheet.error] }), _jsx("text", { fg: FAINT, children: "type value + Enter \u00B7 Enter skip \u00B7 Tab move \u00B7 Esc cancel" })] }));
|
|
21
|
+
}
|
|
22
|
+
//# source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|
|
2
2
|
"name": "@aui.io/apollo-tui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Interactive Apollo operator TUI built on OpenTUI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"start": "node ./bin/apollo-tui.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@aui.io/apollo-core": "0.1.
|
|
37
|
+
"@aui.io/apollo-core": "0.1.10",
|
|
38
38
|
"@opentui/core": "^0.1.63",
|
|
39
39
|
"@opentui/react": "^0.1.63",
|
|
40
40
|
"picocolors": "^1.1.1",
|