@agentick/tui 0.5.0 → 0.7.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/README.md +164 -21
- package/dist/commands-context.d.ts +10 -0
- package/dist/commands-context.d.ts.map +1 -0
- package/dist/commands-context.js +10 -0
- package/dist/commands-context.js.map +1 -0
- package/dist/commands.d.ts +30 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +165 -0
- package/dist/commands.js.map +1 -0
- package/dist/components/CompletionPicker.d.ts +12 -0
- package/dist/components/CompletionPicker.d.ts.map +1 -0
- package/dist/components/CompletionPicker.js +41 -0
- package/dist/components/CompletionPicker.js.map +1 -0
- package/dist/components/DiffView.d.ts +21 -0
- package/dist/components/DiffView.d.ts.map +1 -0
- package/dist/components/DiffView.js +94 -0
- package/dist/components/DiffView.js.map +1 -0
- package/dist/components/ErrorDisplay.d.ts +6 -6
- package/dist/components/ErrorDisplay.d.ts.map +1 -1
- package/dist/components/ErrorDisplay.js +6 -8
- package/dist/components/ErrorDisplay.js.map +1 -1
- package/dist/components/InputBar.d.ts +8 -17
- package/dist/components/InputBar.d.ts.map +1 -1
- package/dist/components/InputBar.js +7 -22
- package/dist/components/InputBar.js.map +1 -1
- package/dist/components/MessageList.d.ts +11 -6
- package/dist/components/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList.js +37 -54
- package/dist/components/MessageList.js.map +1 -1
- package/dist/components/RichTextInput.d.ts +14 -0
- package/dist/components/RichTextInput.d.ts.map +1 -0
- package/dist/components/RichTextInput.js +24 -0
- package/dist/components/RichTextInput.js.map +1 -0
- package/dist/components/ToolCallIndicator.d.ts.map +1 -1
- package/dist/components/ToolCallIndicator.js +12 -5
- package/dist/components/ToolCallIndicator.js.map +1 -1
- package/dist/components/ToolConfirmationPrompt.d.ts +9 -6
- package/dist/components/ToolConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/ToolConfirmationPrompt.js +18 -19
- package/dist/components/ToolConfirmationPrompt.js.map +1 -1
- package/dist/components/status-bar/DefaultStatusBar.d.ts +20 -0
- package/dist/components/status-bar/DefaultStatusBar.d.ts.map +1 -0
- package/dist/components/status-bar/DefaultStatusBar.js +11 -0
- package/dist/components/status-bar/DefaultStatusBar.js.map +1 -0
- package/dist/components/status-bar/StatusBar.d.ts +22 -0
- package/dist/components/status-bar/StatusBar.d.ts.map +1 -0
- package/dist/components/status-bar/StatusBar.js +16 -0
- package/dist/components/status-bar/StatusBar.js.map +1 -0
- package/dist/components/status-bar/StatusBarRight.d.ts +12 -0
- package/dist/components/status-bar/StatusBarRight.d.ts.map +1 -0
- package/dist/components/status-bar/StatusBarRight.js +29 -0
- package/dist/components/status-bar/StatusBarRight.js.map +1 -0
- package/dist/components/status-bar/context.d.ts +27 -0
- package/dist/components/status-bar/context.d.ts.map +1 -0
- package/dist/components/status-bar/context.js +18 -0
- package/dist/components/status-bar/context.js.map +1 -0
- package/dist/components/status-bar/index.d.ts +5 -0
- package/dist/components/status-bar/index.d.ts.map +1 -0
- package/dist/components/status-bar/index.js +5 -0
- package/dist/components/status-bar/index.js.map +1 -0
- package/dist/components/status-bar/widgets/BrandLabel.d.ts +8 -0
- package/dist/components/status-bar/widgets/BrandLabel.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/BrandLabel.js +6 -0
- package/dist/components/status-bar/widgets/BrandLabel.js.map +1 -0
- package/dist/components/status-bar/widgets/ContextUtilization.d.ts +11 -0
- package/dist/components/status-bar/widgets/ContextUtilization.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/ContextUtilization.js +12 -0
- package/dist/components/status-bar/widgets/ContextUtilization.js.map +1 -0
- package/dist/components/status-bar/widgets/KeyboardHints.d.ts +16 -0
- package/dist/components/status-bar/widgets/KeyboardHints.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/KeyboardHints.js +25 -0
- package/dist/components/status-bar/widgets/KeyboardHints.js.map +1 -0
- package/dist/components/status-bar/widgets/ModelInfo.d.ts +7 -0
- package/dist/components/status-bar/widgets/ModelInfo.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/ModelInfo.js +10 -0
- package/dist/components/status-bar/widgets/ModelInfo.js.map +1 -0
- package/dist/components/status-bar/widgets/Separator.d.ts +7 -0
- package/dist/components/status-bar/widgets/Separator.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/Separator.js +6 -0
- package/dist/components/status-bar/widgets/Separator.js.map +1 -0
- package/dist/components/status-bar/widgets/StateIndicator.d.ts +12 -0
- package/dist/components/status-bar/widgets/StateIndicator.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/StateIndicator.js +21 -0
- package/dist/components/status-bar/widgets/StateIndicator.js.map +1 -0
- package/dist/components/status-bar/widgets/TickCount.d.ts +9 -0
- package/dist/components/status-bar/widgets/TickCount.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/TickCount.js +11 -0
- package/dist/components/status-bar/widgets/TickCount.js.map +1 -0
- package/dist/components/status-bar/widgets/TokenCount.d.ts +12 -0
- package/dist/components/status-bar/widgets/TokenCount.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/TokenCount.js +28 -0
- package/dist/components/status-bar/widgets/TokenCount.js.map +1 -0
- package/dist/components/status-bar/widgets/index.d.ts +9 -0
- package/dist/components/status-bar/widgets/index.d.ts.map +1 -0
- package/dist/components/status-bar/widgets/index.js +9 -0
- package/dist/components/status-bar/widgets/index.js.map +1 -0
- package/dist/create-tui.d.ts +5 -0
- package/dist/create-tui.d.ts.map +1 -1
- package/dist/create-tui.js +15 -12
- package/dist/create-tui.js.map +1 -1
- package/dist/hooks/use-double-ctrl-c.d.ts +5 -0
- package/dist/hooks/use-double-ctrl-c.d.ts.map +1 -0
- package/dist/hooks/use-double-ctrl-c.js +32 -0
- package/dist/hooks/use-double-ctrl-c.js.map +1 -0
- package/dist/hooks/use-line-editor.d.ts +26 -0
- package/dist/hooks/use-line-editor.d.ts.map +1 -0
- package/dist/hooks/use-line-editor.js +63 -0
- package/dist/hooks/use-line-editor.js.map +1 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/input-utils.d.ts +15 -0
- package/dist/input-utils.d.ts.map +1 -0
- package/dist/input-utils.js +29 -0
- package/dist/input-utils.js.map +1 -0
- package/dist/rendering/content-block.d.ts +12 -0
- package/dist/rendering/content-block.d.ts.map +1 -0
- package/dist/rendering/content-block.js +82 -0
- package/dist/rendering/content-block.js.map +1 -0
- package/dist/rendering/index.d.ts +5 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/rendering/index.js +5 -0
- package/dist/rendering/index.js.map +1 -0
- package/dist/rendering/markdown.d.ts +14 -0
- package/dist/rendering/markdown.d.ts.map +1 -0
- package/dist/rendering/markdown.js +61 -0
- package/dist/rendering/markdown.js.map +1 -0
- package/dist/rendering/message.d.ts +25 -0
- package/dist/rendering/message.d.ts.map +1 -0
- package/dist/rendering/message.js +54 -0
- package/dist/rendering/message.js.map +1 -0
- package/dist/rendering/theme.d.ts +37 -0
- package/dist/rendering/theme.d.ts.map +1 -0
- package/dist/rendering/theme.js +49 -0
- package/dist/rendering/theme.js.map +1 -0
- package/dist/ui/chat.d.ts +26 -4
- package/dist/ui/chat.d.ts.map +1 -1
- package/dist/ui/chat.js +91 -68
- package/dist/ui/chat.js.map +1 -1
- package/package.json +11 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ErrorDisplay —
|
|
2
|
+
* ErrorDisplay — visual-only error display for the TUI.
|
|
3
3
|
*
|
|
4
|
-
* Red bordered box with error message.
|
|
4
|
+
* Red bordered box with error message. No internal useInput —
|
|
5
|
+
* the parent orchestrator handles dismissal keystrokes.
|
|
5
6
|
*/
|
|
6
|
-
interface ErrorDisplayProps {
|
|
7
|
+
export interface ErrorDisplayProps {
|
|
7
8
|
error: Error | string | null;
|
|
8
|
-
|
|
9
|
+
showDismissHint?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function ErrorDisplay({ error,
|
|
11
|
-
export {};
|
|
11
|
+
export declare function ErrorDisplay({ error, showDismissHint }: ErrorDisplayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
//# sourceMappingURL=ErrorDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,eAAuB,EAAE,EAAE,iBAAiB,kDAoBjF"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* ErrorDisplay —
|
|
3
|
+
* ErrorDisplay — visual-only error display for the TUI.
|
|
4
4
|
*
|
|
5
|
-
* Red bordered box with error message.
|
|
5
|
+
* Red bordered box with error message. No internal useInput —
|
|
6
|
+
* the parent orchestrator handles dismissal keystrokes.
|
|
6
7
|
*/
|
|
7
|
-
import { Box, Text
|
|
8
|
-
export function ErrorDisplay({ error,
|
|
9
|
-
useInput(() => {
|
|
10
|
-
onDismiss?.();
|
|
11
|
-
}, { isActive: !!onDismiss && !!error });
|
|
8
|
+
import { Box, Text } from "ink";
|
|
9
|
+
export function ErrorDisplay({ error, showDismissHint = false }) {
|
|
12
10
|
if (!error)
|
|
13
11
|
return null;
|
|
14
12
|
const message = error instanceof Error ? error.message : error;
|
|
15
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 1, marginTop: 1, children: [_jsx(Text, { color: "red", bold: true, children: "Error" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: message }) }),
|
|
13
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 1, marginTop: 1, children: [_jsx(Text, { color: "red", bold: true, children: "Error" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: message }) }), showDismissHint && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Press any key to dismiss" }) }))] }));
|
|
16
14
|
}
|
|
17
15
|
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,eAAe,GAAG,KAAK,EAAqB;IAChF,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAE/D,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,aACzF,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,4BAEf,EACP,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,cAAE,OAAO,GAAQ,GAClB,EACL,eAAe,IAAI,CAClB,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yCAAgC,GAC9C,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* InputBar — user text input for the TUI.
|
|
2
|
+
* InputBar — visual-only user text input for the TUI.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Renders value/cursor state passed from the parent. No internal useInput
|
|
5
|
+
* or useLineEditor — the parent orchestrator owns all input routing.
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
8
|
-
onSubmit: (text: string) => void;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
}
|
|
12
|
-
interface ControlledInputBarProps extends InputBarPropsBase {
|
|
7
|
+
export interface InputBarProps {
|
|
13
8
|
value: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
value?: undefined;
|
|
18
|
-
onChange?: undefined;
|
|
9
|
+
cursor: number;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
19
12
|
}
|
|
20
|
-
|
|
21
|
-
export declare function InputBar({ onSubmit, isDisabled, placeholder, value, onChange, }: InputBarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|
|
13
|
+
export declare function InputBar({ value, cursor, isActive, placeholder }: InputBarProps): import("react/jsx-runtime").JSX.Element;
|
|
23
14
|
//# sourceMappingURL=InputBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBar.d.ts","sourceRoot":"","sources":["../../src/components/InputBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"InputBar.d.ts","sourceRoot":"","sources":["../../src/components/InputBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAe,EAAE,WAAW,EAAE,EAAE,aAAa,2CAwBtF"}
|
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* InputBar — user text input for the TUI.
|
|
3
|
+
* InputBar — visual-only user text input for the TUI.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Renders value/cursor state passed from the parent. No internal useInput
|
|
6
|
+
* or useLineEditor — the parent orchestrator owns all input routing.
|
|
7
7
|
*/
|
|
8
|
-
import { useState, useCallback } from "react";
|
|
9
8
|
import { Box, Text } from "ink";
|
|
10
|
-
import
|
|
11
|
-
export function InputBar({
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const currentValue = isControlled ? value : internalValue;
|
|
15
|
-
const handleChange = isControlled ? onChange : setInternalValue;
|
|
16
|
-
const handleSubmit = useCallback((text) => {
|
|
17
|
-
if (!text.trim() || isDisabled)
|
|
18
|
-
return;
|
|
19
|
-
onSubmit(text.trim());
|
|
20
|
-
if (isControlled) {
|
|
21
|
-
onChange("");
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
setInternalValue("");
|
|
25
|
-
}
|
|
26
|
-
}, [onSubmit, isDisabled, isControlled, onChange]);
|
|
27
|
-
return (_jsxs(Box, { flexDirection: "row", borderStyle: "single", borderLeft: false, borderRight: false, borderColor: isDisabled ? "gray" : "cyan", paddingLeft: 1, children: [_jsx(Text, { color: isDisabled ? "gray" : "green", bold: true, children: "› " }), _jsx(TextInput, { value: currentValue, onChange: handleChange, onSubmit: handleSubmit, focus: !isDisabled, placeholder: placeholder ?? (isDisabled ? "Waiting for response..." : "Type a message...") })] }));
|
|
9
|
+
import { RichTextInput } from "./RichTextInput.js";
|
|
10
|
+
export function InputBar({ value, cursor, isActive = true, placeholder }) {
|
|
11
|
+
const resolvedPlaceholder = placeholder ?? (isActive ? "Type a message..." : "Waiting for response...");
|
|
12
|
+
return (_jsxs(Box, { flexDirection: "row", borderStyle: "single", borderLeft: false, borderRight: false, borderColor: isActive ? "#34d399" : "gray", paddingLeft: 1, children: [_jsx(Text, { color: isActive ? "#34d399" : "gray", bold: true, children: "› " }), _jsx(RichTextInput, { value: value, cursor: cursor, placeholder: resolvedPlaceholder, isActive: isActive })] }));
|
|
28
13
|
}
|
|
29
14
|
//# sourceMappingURL=InputBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../src/components/InputBar.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../src/components/InputBar.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASnD,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,WAAW,EAAiB;IACrF,MAAM,mBAAmB,GACvB,WAAW,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC;IAE9E,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,KAAK,EACnB,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,KAAK,EAClB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAC1C,WAAW,EAAE,CAAC,aAEd,KAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,kBAC7C,IAAI,GACA,EACP,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,QAAQ,GAClB,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MessageList — displays
|
|
2
|
+
* MessageList — displays conversation messages.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Accepts messages from useChat and splits them into:
|
|
5
|
+
* - Committed messages → Ink's <Static> (rendered once, never updated)
|
|
6
|
+
* - In-progress message → regular render (updates as blocks complete)
|
|
7
|
+
*
|
|
8
|
+
* When not executing, all messages are committed.
|
|
9
|
+
* When executing, the last message may still be receiving blocks.
|
|
7
10
|
*/
|
|
11
|
+
import type { ChatMessage } from "@agentick/client";
|
|
8
12
|
interface MessageListProps {
|
|
9
|
-
|
|
13
|
+
messages: readonly ChatMessage[];
|
|
14
|
+
isExecuting: boolean;
|
|
10
15
|
}
|
|
11
|
-
export declare function MessageList({
|
|
16
|
+
export declare function MessageList({ messages, isExecuting }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
12
17
|
export {};
|
|
13
18
|
//# sourceMappingURL=MessageList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqDpD,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,gBAAgB,2CAkCtE"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* MessageList — displays
|
|
3
|
+
* MessageList — displays conversation messages.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Accepts messages from useChat and splits them into:
|
|
6
|
+
* - Committed messages → Ink's <Static> (rendered once, never updated)
|
|
7
|
+
* - In-progress message → regular render (updates as blocks complete)
|
|
8
|
+
*
|
|
9
|
+
* When not executing, all messages are committed.
|
|
10
|
+
* When executing, the last message may still be receiving blocks.
|
|
8
11
|
*/
|
|
9
|
-
import {
|
|
12
|
+
import { useCallback, useRef } from "react";
|
|
10
13
|
import { Static, Box, Text } from "ink";
|
|
11
|
-
import { useEvents } from "@agentick/react";
|
|
12
14
|
function renderContent(content) {
|
|
13
15
|
if (typeof content === "string")
|
|
14
16
|
return content;
|
|
@@ -16,6 +18,8 @@ function renderContent(content) {
|
|
|
16
18
|
.map((block) => {
|
|
17
19
|
if (block.type === "text")
|
|
18
20
|
return block.text;
|
|
21
|
+
if (block.type === "reasoning")
|
|
22
|
+
return `[thinking: ${block.text.slice(0, 80)}${block.text.length > 80 ? "..." : ""}]`;
|
|
19
23
|
if (block.type === "tool_use")
|
|
20
24
|
return `[tool: ${block.name}]`;
|
|
21
25
|
if (block.type === "tool_result") {
|
|
@@ -24,7 +28,7 @@ function renderContent(content) {
|
|
|
24
28
|
.map((c) => (c.type === "text" ? c.text : `[${c.type}]`))
|
|
25
29
|
.join("")
|
|
26
30
|
: String(block.content ?? "");
|
|
27
|
-
return `[result: ${resultContent.slice(0, 100)}${resultContent.length > 100 ? "
|
|
31
|
+
return `[result: ${resultContent.slice(0, 100)}${resultContent.length > 100 ? "..." : ""}]`;
|
|
28
32
|
}
|
|
29
33
|
return `[${block.type}]`;
|
|
30
34
|
})
|
|
@@ -38,56 +42,35 @@ function roleColor(role) {
|
|
|
38
42
|
return "magenta";
|
|
39
43
|
case "system":
|
|
40
44
|
return "gray";
|
|
41
|
-
case "tool_result":
|
|
42
|
-
return "yellow";
|
|
43
45
|
default:
|
|
44
46
|
return "white";
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.map((entry, i) => {
|
|
51
|
-
const msg = entry.message;
|
|
52
|
-
return {
|
|
53
|
-
id: msg.id ?? `msg-${i}-${Date.now()}`,
|
|
54
|
-
role: msg.role,
|
|
55
|
-
text: renderContent(msg.content),
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export function MessageList({ sessionId }) {
|
|
60
|
-
const [messages, setMessages] = useState([]);
|
|
61
|
-
const { event } = useEvents({
|
|
62
|
-
sessionId,
|
|
63
|
-
filter: ["execution_end"],
|
|
64
|
-
});
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
if (!event || event.type !== "execution_end")
|
|
67
|
-
return;
|
|
68
|
-
const execEnd = event;
|
|
69
|
-
// Prefer delta (append) over full timeline (replace)
|
|
70
|
-
if (execEnd.newTimelineEntries && execEnd.newTimelineEntries.length > 0) {
|
|
71
|
-
const newMessages = timelineToMessages(execEnd.newTimelineEntries);
|
|
72
|
-
if (newMessages.length > 0) {
|
|
73
|
-
setMessages((prev) => [...prev, ...newMessages]);
|
|
74
|
-
}
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// Fallback: full timeline replace
|
|
78
|
-
const timeline = execEnd.output?.timeline;
|
|
79
|
-
if (Array.isArray(timeline)) {
|
|
80
|
-
setMessages(timelineToMessages(timeline));
|
|
81
|
-
}
|
|
82
|
-
}, [event]);
|
|
83
|
-
const renderMessage = useCallback((msg) => {
|
|
84
|
-
// Skip tool_result entries in the message list for cleaner output
|
|
85
|
-
if (msg.role === "tool_result")
|
|
86
|
-
return null;
|
|
87
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: roleColor(msg.role), bold: true, children: [msg.role, ":"] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { wrap: "wrap", children: msg.text }) })] }, msg.id));
|
|
88
|
-
}, []);
|
|
89
|
-
if (messages.length === 0)
|
|
49
|
+
function MessageItem({ message }) {
|
|
50
|
+
const text = renderContent(message.content);
|
|
51
|
+
if (!text)
|
|
90
52
|
return null;
|
|
91
|
-
return _jsx(
|
|
53
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: roleColor(message.role), bold: true, children: [message.role, ":"] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { wrap: "wrap", children: text }) })] }));
|
|
54
|
+
}
|
|
55
|
+
export function MessageList({ messages, isExecuting }) {
|
|
56
|
+
// Track which message IDs have been committed to Static.
|
|
57
|
+
// Once committed, a message never leaves Static.
|
|
58
|
+
const committedIdsRef = useRef(new Set());
|
|
59
|
+
// Committed: all messages except the last one when executing
|
|
60
|
+
// (the last message may still be receiving blocks)
|
|
61
|
+
const splitIndex = isExecuting && messages.length > 0 ? messages.length - 1 : messages.length;
|
|
62
|
+
// Mark messages as committed
|
|
63
|
+
for (let i = 0; i < splitIndex; i++) {
|
|
64
|
+
committedIdsRef.current.add(messages[i].id);
|
|
65
|
+
}
|
|
66
|
+
// Build stable committed array (only messages we've committed)
|
|
67
|
+
const committed = messages.filter((m) => committedIdsRef.current.has(m.id));
|
|
68
|
+
const inProgress = isExecuting &&
|
|
69
|
+
messages.length > 0 &&
|
|
70
|
+
!committedIdsRef.current.has(messages[messages.length - 1].id)
|
|
71
|
+
? messages[messages.length - 1]
|
|
72
|
+
: null;
|
|
73
|
+
const renderMessage = useCallback((msg) => _jsx(MessageItem, { message: msg }, msg.id), []);
|
|
74
|
+
return (_jsxs(_Fragment, { children: [committed.length > 0 && _jsx(Static, { items: committed, children: renderMessage }), inProgress && _jsx(MessageItem, { message: inProgress })] }));
|
|
92
75
|
}
|
|
93
76
|
//# sourceMappingURL=MessageList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.js","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"MessageList.js","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAIxC,SAAS,aAAa,CAAC,OAAgC;IACrD,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAChD,OAAO,OAAO;SACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC;QAC7C,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;YAC5B,OAAO,cAAc,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;QACxF,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;YAAE,OAAO,UAAU,KAAK,CAAC,IAAI,GAAG,CAAC;QAC9D,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YACjC,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC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B,GAAG,CAAC,EAAE,CAAkB,EAChE,EAAE,CACH,CAAC;IAEF,OAAO,CACL,8BACG,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,MAAM,IAAC,KAAK,EAAE,SAAS,YAAG,aAAa,GAAU,EAC1E,UAAU,IAAI,KAAC,WAAW,IAAC,OAAO,EAAE,UAAU,GAAI,IAClD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RichTextInput — renders line editor state with a visible cursor.
|
|
3
|
+
*
|
|
4
|
+
* Pure rendering component. All editing logic lives in useLineEditor.
|
|
5
|
+
*/
|
|
6
|
+
interface RichTextInputProps {
|
|
7
|
+
value: string;
|
|
8
|
+
cursor: number;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function RichTextInput({ value, cursor, placeholder, isActive }: RichTextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=RichTextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextInput.d.ts","sourceRoot":"","sources":["../../src/components/RichTextInput.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,QAAe,EAAE,EAAE,kBAAkB,2CA6BhG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* RichTextInput — renders line editor state with a visible cursor.
|
|
4
|
+
*
|
|
5
|
+
* Pure rendering component. All editing logic lives in useLineEditor.
|
|
6
|
+
*/
|
|
7
|
+
import { Text } from "ink";
|
|
8
|
+
export function RichTextInput({ value, cursor, placeholder, isActive = true }) {
|
|
9
|
+
if (!isActive) {
|
|
10
|
+
return _jsx(Text, { dimColor: true, children: placeholder ?? "" });
|
|
11
|
+
}
|
|
12
|
+
if (value.length === 0) {
|
|
13
|
+
if (placeholder) {
|
|
14
|
+
// Show cursor on first char of placeholder, rest dimmed
|
|
15
|
+
return (_jsxs(Text, { children: [_jsx(Text, { inverse: true, children: placeholder[0] }), _jsx(Text, { dimColor: true, children: placeholder.slice(1) })] }));
|
|
16
|
+
}
|
|
17
|
+
return _jsx(Text, { inverse: true, children: " " });
|
|
18
|
+
}
|
|
19
|
+
const before = value.slice(0, cursor);
|
|
20
|
+
const cursorChar = cursor < value.length ? value[cursor] : " ";
|
|
21
|
+
const after = cursor < value.length ? value.slice(cursor + 1) : "";
|
|
22
|
+
return (_jsxs(Text, { children: [before, _jsx(Text, { inverse: true, children: cursorChar }), after] }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=RichTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextInput.js","sourceRoot":"","sources":["../../src/components/RichTextInput.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAS3B,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAG,IAAI,EAAsB;IAC/F,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAC,IAAI,IAAC,QAAQ,kBAAE,WAAW,IAAI,EAAE,GAAQ,CAAC;IACnD,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,IAAI,WAAW,EAAE,CAAC;YAChB,wDAAwD;YACxD,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,OAAO,kBAAE,WAAW,CAAC,CAAC,CAAC,GAAQ,EACrC,KAAC,IAAI,IAAC,QAAQ,kBAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,GAAQ,IACvC,CACR,CAAC;QACJ,CAAC;QACD,OAAO,KAAC,IAAI,IAAC,OAAO,wBAAS,CAAC;IAChC,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC/D,MAAM,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEnE,OAAO,CACL,MAAC,IAAI,eACF,MAAM,EACP,KAAC,IAAI,IAAC,OAAO,kBAAE,UAAU,GAAQ,EAChC,KAAK,IACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ToolCallIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"ToolCallIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ToolCallIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE,sBAAsB,kDAkEtE"}
|
|
@@ -19,18 +19,25 @@ export function ToolCallIndicator({ sessionId }) {
|
|
|
19
19
|
if (!event)
|
|
20
20
|
return;
|
|
21
21
|
if (event.type === "tool_call_start" || event.type === "tool_call") {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
let e;
|
|
23
|
+
if (event.type === "tool_call_start") {
|
|
24
|
+
e = event;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
e = event;
|
|
28
|
+
}
|
|
29
|
+
const id = e.callId ?? "unknown";
|
|
24
30
|
const name = e.name ?? "tool";
|
|
31
|
+
const summary = event.type === "tool_call" ? e.summary : undefined;
|
|
25
32
|
setTools((prev) => {
|
|
26
33
|
if (prev.some((t) => t.id === id))
|
|
27
34
|
return prev;
|
|
28
|
-
return [...prev, { id, name, status: "running" }];
|
|
35
|
+
return [...prev, { id, name, summary, status: "running" }];
|
|
29
36
|
});
|
|
30
37
|
}
|
|
31
38
|
if (event.type === "tool_result") {
|
|
32
39
|
const e = event;
|
|
33
|
-
const id = e.
|
|
40
|
+
const id = e.callId ?? "unknown";
|
|
34
41
|
setTools((prev) => prev.map((t) => (t.id === id ? { ...t, status: "done" } : t)));
|
|
35
42
|
}
|
|
36
43
|
}, [event]);
|
|
@@ -44,6 +51,6 @@ export function ToolCallIndicator({ sessionId }) {
|
|
|
44
51
|
}, [tools]);
|
|
45
52
|
if (tools.length === 0)
|
|
46
53
|
return null;
|
|
47
|
-
return (_jsx(Box, { flexDirection: "column", marginLeft: 2, children: tools.map((tool) => (_jsxs(Box, { gap: 1, children: [tool.status === "running" ? (_jsx(Text, { color: "yellow", children: _jsx(Spinner, { type: "dots" }) })) : (_jsx(Text, { color: "green", children: "\u2713" })), _jsx(Text, { color: tool.status === "running" ? "yellow" : "gray", dimColor: tool.status === "done", children: tool.name })] }, tool.id))) }));
|
|
54
|
+
return (_jsx(Box, { flexDirection: "column", marginLeft: 2, children: tools.map((tool) => (_jsxs(Box, { gap: 1, flexDirection: "row", children: [tool.status === "running" ? (_jsx(Text, { color: "yellow", children: _jsx(Spinner, { type: "dots" }) })) : (_jsx(Text, { color: "green", children: "\u2713" })), _jsx(Text, { color: tool.status === "running" ? "yellow" : "gray", dimColor: tool.status === "done", children: tool.name }), tool.summary && _jsx(Text, { dimColor: true, children: tool.summary })] }, tool.id))) }));
|
|
48
55
|
}
|
|
49
56
|
//# sourceMappingURL=ToolCallIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallIndicator.js","sourceRoot":"","sources":["../../src/components/ToolCallIndicator.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolCallIndicator.js","sourceRoot":"","sources":["../../src/components/ToolCallIndicator.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAc5C,MAAM,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAA0B;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,EAAE,CAAC,CAAC;IACrD,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;QAC1B,SAAS;QACT,MAAM,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,aAAa,CAAC;KACxD,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACnE,IAAI,CAAq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CAeX,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ToolConfirmationPrompt —
|
|
2
|
+
* ToolConfirmationPrompt — visual-only confirmation UI for tools that require approval.
|
|
3
3
|
*
|
|
4
|
-
* Shows tool name, arguments, and Y/N/A key
|
|
5
|
-
*
|
|
4
|
+
* Shows tool name, arguments, and Y/N/A key hints.
|
|
5
|
+
* No internal useInput — the parent orchestrator handles keystrokes
|
|
6
|
+
* and calls respond() directly.
|
|
7
|
+
*
|
|
8
|
+
* When metadata with type "diff" is present, renders a colored diff view
|
|
9
|
+
* instead of raw JSON arguments.
|
|
6
10
|
*/
|
|
7
|
-
import type { ToolConfirmationRequest
|
|
11
|
+
import type { ToolConfirmationRequest } from "@agentick/client";
|
|
8
12
|
interface ToolConfirmationPromptProps {
|
|
9
13
|
request: ToolConfirmationRequest;
|
|
10
|
-
onRespond: (response: ToolConfirmationResponse) => void;
|
|
11
14
|
}
|
|
12
|
-
export declare function ToolConfirmationPrompt({ request
|
|
15
|
+
export declare function ToolConfirmationPrompt({ request }: ToolConfirmationPromptProps): import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export {};
|
|
14
17
|
//# sourceMappingURL=ToolConfirmationPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../src/components/ToolConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ToolConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../src/components/ToolConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIhE,UAAU,2BAA2B;IACnC,OAAO,EAAE,uBAAuB,CAAC;CAClC;AAiBD,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,EAAE,2BAA2B,2CA0C9E"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* ToolConfirmationPrompt —
|
|
3
|
+
* ToolConfirmationPrompt — visual-only confirmation UI for tools that require approval.
|
|
4
4
|
*
|
|
5
|
-
* Shows tool name, arguments, and Y/N/A key
|
|
6
|
-
*
|
|
5
|
+
* Shows tool name, arguments, and Y/N/A key hints.
|
|
6
|
+
* No internal useInput — the parent orchestrator handles keystrokes
|
|
7
|
+
* and calls respond() directly.
|
|
8
|
+
*
|
|
9
|
+
* When metadata with type "diff" is present, renders a colored diff view
|
|
10
|
+
* instead of raw JSON arguments.
|
|
7
11
|
*/
|
|
8
|
-
import { Box, Text
|
|
12
|
+
import { Box, Text } from "ink";
|
|
13
|
+
import { DiffView } from "./DiffView.js";
|
|
14
|
+
function isDiffPreview(meta) {
|
|
15
|
+
if (!meta || typeof meta !== "object")
|
|
16
|
+
return false;
|
|
17
|
+
const m = meta;
|
|
18
|
+
return m.type === "diff" && typeof m.filePath === "string" && typeof m.patch === "string";
|
|
19
|
+
}
|
|
9
20
|
function formatArguments(args) {
|
|
10
21
|
const json = JSON.stringify(args, null, 2);
|
|
11
22
|
const lines = json.split("\n");
|
|
@@ -14,20 +25,8 @@ function formatArguments(args) {
|
|
|
14
25
|
}
|
|
15
26
|
return json;
|
|
16
27
|
}
|
|
17
|
-
export function ToolConfirmationPrompt({ request
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (key === "y") {
|
|
21
|
-
onRespond({ approved: true });
|
|
22
|
-
}
|
|
23
|
-
else if (key === "n") {
|
|
24
|
-
onRespond({ approved: false, reason: "rejected by user" });
|
|
25
|
-
}
|
|
26
|
-
else if (key === "a") {
|
|
27
|
-
// "Always allow" — for now just approves (no persistence, YAGNI)
|
|
28
|
-
onRespond({ approved: true });
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, marginTop: 1, children: [_jsx(Text, { color: "yellow", bold: true, children: "Tool Confirmation" }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: request.name }), " wants to run:"] }) }), request.message && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: request.message }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: formatArguments(request.arguments) }) }), _jsxs(Box, { marginTop: 1, gap: 2, children: [_jsx(Text, { color: "green", bold: true, children: "[Y] Approve" }), _jsx(Text, { color: "red", bold: true, children: "[N] Reject" }), _jsx(Text, { color: "cyan", bold: true, children: "[A] Always Allow" })] })] }));
|
|
28
|
+
export function ToolConfirmationPrompt({ request }) {
|
|
29
|
+
const diffMeta = isDiffPreview(request.metadata) ? request.metadata : null;
|
|
30
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, marginTop: 1, children: [_jsx(Text, { color: "yellow", bold: true, children: "Tool Confirmation" }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: request.name }), " wants to run:"] }) }), request.message && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: request.message }) })), _jsx(Box, { marginTop: 1, children: diffMeta ? (_jsx(DiffView, { patch: diffMeta.patch, filePath: diffMeta.filePath })) : (_jsx(Text, { color: "gray", children: formatArguments(request.arguments) })) }), _jsxs(Box, { marginTop: 1, flexDirection: "row", gap: 2, children: [_jsx(Text, { color: "green", bold: true, children: "[Y] Approve" }), _jsx(Text, { color: "red", bold: true, children: "[N] Reject" }), _jsx(Text, { color: "cyan", bold: true, children: "[A] Always Allow" })] })] }));
|
|
32
31
|
}
|
|
33
32
|
//# sourceMappingURL=ToolConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolConfirmationPrompt.js","sourceRoot":"","sources":["../../src/components/ToolConfirmationPrompt.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"ToolConfirmationPrompt.js","sourceRoot":"","sources":["../../src/components/ToolConfirmationPrompt.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMzC,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACpD,MAAM,CAAC,GAAG,IAA+B,CAAC;IAC1C,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC;AAC5F,CAAC;AAED,SAAS,eAAe,CAAC,IAA6B;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IACnD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EAAE,OAAO,EAA+B;IAC7E,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3E,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EA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ator
|
|
6
|
+
*
|
|
7
|
+
* Responsive: hides verbose segments in narrow terminals.
|
|
8
|
+
* - Wide (80+): all segments
|
|
9
|
+
* - Medium (60+): model + state (no tokens/utilization)
|
|
10
|
+
* - Narrow (<60): state only
|
|
11
|
+
*/
|
|
12
|
+
import type { ChatMode } from "@agentick/client";
|
|
13
|
+
interface DefaultStatusBarProps {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
mode?: ChatMode;
|
|
16
|
+
isExecuting?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function DefaultStatusBar({ sessionId, mode, isExecuting }: DefaultStatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=DefaultStatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultStatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/status-bar/DefaultStatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMjD,UAAU,qBAAqB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,IAAa,EAAE,WAAW,EAAE,EAAE,qBAAqB,2CAahG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useStdout } from "ink";
|
|
3
|
+
import { StatusBar } from "./StatusBar.js";
|
|
4
|
+
import { KeyboardHints } from "./widgets/KeyboardHints.js";
|
|
5
|
+
import { StatusBarRight } from "./StatusBarRight.js";
|
|
6
|
+
export function DefaultStatusBar({ sessionId, mode = "idle", isExecuting }) {
|
|
7
|
+
const { stdout } = useStdout();
|
|
8
|
+
const width = stdout.columns ?? 80;
|
|
9
|
+
return (_jsx(StatusBar, { sessionId: sessionId, mode: mode, isExecuting: isExecuting, left: _jsx(KeyboardHints, {}), right: _jsx(StatusBarRight, { width: width }) }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=DefaultStatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultStatusBar.js","sourceRoot":"","sources":["../../../src/components/status-bar/DefaultStatusBar.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD,MAAM,UAAU,gBAAgB,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,MAAM,EAAE,WAAW,EAAyB;IAC/F,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IAEnC,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,KAAC,aAAa,KAAG,EACvB,KAAK,EAAE,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,GACvC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusBar — container that calls hooks once and provides context to widgets.
|
|
3
|
+
*
|
|
4
|
+
* Renders a flexbox row with `left` (grows) and `right` (shrinks) regions.
|
|
5
|
+
* No border — place below an InputBar or other bordered element for visual separation.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactNode } from "react";
|
|
8
|
+
import type { ChatMode } from "@agentick/client";
|
|
9
|
+
export interface StatusBarProps {
|
|
10
|
+
/** Session ID for context info subscription */
|
|
11
|
+
sessionId: string;
|
|
12
|
+
/** Current chat mode */
|
|
13
|
+
mode?: ChatMode;
|
|
14
|
+
/** Whether an execution is running (defaults to streaming text state) */
|
|
15
|
+
isExecuting?: boolean;
|
|
16
|
+
/** Left-aligned content (grows to fill) */
|
|
17
|
+
left?: ReactNode;
|
|
18
|
+
/** Right-aligned content (shrinks to fit) */
|
|
19
|
+
right?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function StatusBar({ sessionId, mode, isExecuting: explicitExecuting, left, right, }: StatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=StatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/status-bar/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,IAAa,EACb,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EACJ,KAAK,GACN,EAAE,cAAc,2CAqBhB"}
|