@townco/ui 0.1.0 → 0.1.6
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/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.js +64 -55
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.js +121 -114
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.js +78 -80
- package/dist/core/hooks/use-media-query.d.ts +5 -5
- package/dist/core/hooks/use-media-query.js +38 -38
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/schemas/chat.d.ts +83 -56
- package/dist/core/schemas/chat.js +27 -25
- package/dist/core/store/chat-store.d.ts +28 -22
- package/dist/core/store/chat-store.js +59 -50
- package/dist/gui/components/Button.d.ts +23 -7
- package/dist/gui/components/Button.js +40 -27
- package/dist/gui/components/Card.d.ts +26 -7
- package/dist/gui/components/Card.js +54 -8
- package/dist/gui/components/ChatHeader.d.ts +58 -31
- package/dist/gui/components/ChatHeader.js +171 -66
- package/dist/gui/components/ChatInput.d.ts +58 -36
- package/dist/gui/components/ChatInput.js +191 -121
- package/dist/gui/components/ChatInterface.d.ts +9 -6
- package/dist/gui/components/ChatInterface.js +162 -90
- package/dist/gui/components/ChatLayout.d.ts +71 -41
- package/dist/gui/components/ChatLayout.js +214 -87
- package/dist/gui/components/ChatPanelTabContent.d.ts +18 -9
- package/dist/gui/components/ChatPanelTabContent.js +88 -10
- package/dist/gui/components/ChatPreview.d.ts +9 -6
- package/dist/gui/components/ChatPreview.js +212 -162
- package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
- package/dist/gui/components/ChatSecondaryPanel.js +115 -38
- package/dist/gui/components/ChatSidebar.d.ts +26 -13
- package/dist/gui/components/ChatSidebar.js +48 -14
- package/dist/gui/components/ChatStatus.d.ts +4 -2
- package/dist/gui/components/ChatStatus.js +45 -34
- package/dist/gui/components/ChatView.d.ts +5 -3
- package/dist/gui/components/ChatView.js +38 -9
- package/dist/gui/components/ConfigPanel.d.ts +16 -12
- package/dist/gui/components/ConfigPanel.js +218 -41
- package/dist/gui/components/Conversation.d.ts +17 -14
- package/dist/gui/components/Conversation.js +143 -83
- package/dist/gui/components/Dialog.d.ts +57 -11
- package/dist/gui/components/Dialog.js +84 -8
- package/dist/gui/components/DropdownMenu.d.ts +101 -20
- package/dist/gui/components/DropdownMenu.js +161 -14
- package/dist/gui/components/HeightTransition.d.ts +12 -7
- package/dist/gui/components/HeightTransition.js +88 -77
- package/dist/gui/components/Input.d.ts +13 -6
- package/dist/gui/components/Input.js +27 -16
- package/dist/gui/components/InputBox.d.ts +19 -12
- package/dist/gui/components/InputBox.js +86 -14
- package/dist/gui/components/Label.d.ts +7 -1
- package/dist/gui/components/Label.js +12 -2
- package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
- package/dist/gui/components/MarkdownRenderer.js +178 -81
- package/dist/gui/components/Message.d.ts +25 -18
- package/dist/gui/components/Message.js +44 -23
- package/dist/gui/components/MessageContent.d.ts +29 -22
- package/dist/gui/components/MessageContent.js +157 -85
- package/dist/gui/components/PlaygroundLayout.d.ts +9 -5
- package/dist/gui/components/PlaygroundLayout.js +43 -12
- package/dist/gui/components/Reasoning.d.ts +30 -24
- package/dist/gui/components/Reasoning.js +187 -60
- package/dist/gui/components/Response.d.ts +11 -9
- package/dist/gui/components/Response.js +229 -90
- package/dist/gui/components/Select.d.ts +69 -10
- package/dist/gui/components/Select.js +118 -12
- package/dist/gui/components/Sonner.d.ts +3 -1
- package/dist/gui/components/Sonner.js +29 -18
- package/dist/gui/components/StatusBar.d.ts +9 -5
- package/dist/gui/components/StatusBar.js +56 -9
- package/dist/gui/components/Tabs.d.ts +24 -4
- package/dist/gui/components/Tabs.js +32 -4
- package/dist/gui/components/Task.d.ts +28 -24
- package/dist/gui/components/Task.js +164 -31
- package/dist/gui/components/Textarea.d.ts +15 -7
- package/dist/gui/components/Textarea.js +63 -46
- package/dist/gui/components/ThinkingBlock.d.ts +20 -10
- package/dist/gui/components/ThinkingBlock.js +134 -35
- package/dist/gui/components/TodoList.d.ts +12 -10
- package/dist/gui/components/TodoList.js +22 -7
- package/dist/gui/components/TodoListItem.d.ts +9 -6
- package/dist/gui/components/TodoListItem.js +18 -4
- package/dist/gui/components/index.d.ts +59 -8
- package/dist/gui/components/index.js +42 -8
- package/dist/gui/lib/utils.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.test.js +0 -1
- package/dist/sdk/client/acp-client.d.ts +88 -76
- package/dist/sdk/client/acp-client.js +215 -217
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/schemas/agent.d.ts +111 -64
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/message.d.ts +245 -147
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/session.d.ts +219 -135
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.js +472 -469
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.js +289 -286
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.js +52 -46
- package/dist/tui/components/ChatView.d.ts +4 -2
- package/dist/tui/components/ChatView.js +51 -18
- package/dist/tui/components/GameOfLife.js +64 -35
- package/dist/tui/components/InputBox.d.ts +18 -11
- package/dist/tui/components/InputBox.js +70 -10
- package/dist/tui/components/MessageList.d.ts +4 -2
- package/dist/tui/components/MessageList.js +37 -10
- package/dist/tui/components/MultiSelect.d.ts +15 -9
- package/dist/tui/components/MultiSelect.js +116 -69
- package/dist/tui/components/ReadlineInput.d.ts +12 -6
- package/dist/tui/components/ReadlineInput.js +252 -237
- package/dist/tui/components/SingleSelect.d.ts +15 -9
- package/dist/tui/components/SingleSelect.js +84 -43
- package/dist/tui/components/StatusBar.d.ts +11 -6
- package/dist/tui/components/StatusBar.js +102 -67
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +2 -3
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { Loader2Icon } from "lucide-react";
|
|
4
3
|
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
Fragment as _Fragment,
|
|
6
|
+
jsx as _jsx,
|
|
7
|
+
jsxs as _jsxs,
|
|
8
|
+
} from "react/jsx-runtime";
|
|
5
9
|
import { useChatStore } from "../../core/store/chat-store.js";
|
|
6
10
|
import { cn } from "../lib/utils.js";
|
|
7
11
|
import { Reasoning } from "./Reasoning.js";
|
|
8
12
|
import { Response } from "./Response.js";
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* MessageContent component inspired by shadcn.io/ai
|
|
11
16
|
* Provides the content container with role-based styling
|
|
@@ -13,92 +18,159 @@ import { Response } from "./Response.js";
|
|
|
13
18
|
*/
|
|
14
19
|
// Synonyms of "thinking" in multiple languages
|
|
15
20
|
const THINKING_WORDS = [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
"Thinking",
|
|
22
|
+
"Pensando",
|
|
23
|
+
"Pensant",
|
|
24
|
+
"Denkend",
|
|
25
|
+
"Pensando",
|
|
26
|
+
"考えている",
|
|
27
|
+
"생각 중",
|
|
28
|
+
"思考中",
|
|
29
|
+
"Размышляя",
|
|
30
|
+
"Düşünüyor",
|
|
31
|
+
"Myślący",
|
|
32
|
+
"Tänkande",
|
|
33
|
+
"Pensando",
|
|
34
|
+
"Ajatellen",
|
|
35
|
+
"Σκεπτόμενος",
|
|
36
|
+
"חושב",
|
|
37
|
+
"सोच रहा है",
|
|
38
|
+
"Berpikir",
|
|
34
39
|
];
|
|
35
40
|
const DOT_ANIMATIONS = ["...", "·..", ".·.", "..·", ".·.", "·.."];
|
|
36
41
|
function WaitingElapsedTime({ startTime }) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
const [elapsed, setElapsed] = React.useState(0);
|
|
43
|
+
const [thinkingWord, setThinkingWord] = React.useState(
|
|
44
|
+
() => THINKING_WORDS[Math.floor(Math.random() * THINKING_WORDS.length)],
|
|
45
|
+
);
|
|
46
|
+
const [dotIndex, setDotIndex] = React.useState(0);
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
const interval = setInterval(() => {
|
|
49
|
+
const now = Date.now();
|
|
50
|
+
const elapsedMs = now - startTime;
|
|
51
|
+
setElapsed(elapsedMs);
|
|
52
|
+
}, 100);
|
|
53
|
+
return () => clearInterval(interval);
|
|
54
|
+
}, [startTime]);
|
|
55
|
+
React.useEffect(() => {
|
|
56
|
+
const wordInterval = setInterval(() => {
|
|
57
|
+
const randomIndex = Math.floor(Math.random() * THINKING_WORDS.length);
|
|
58
|
+
setThinkingWord(THINKING_WORDS[randomIndex]);
|
|
59
|
+
}, 1500);
|
|
60
|
+
return () => clearInterval(wordInterval);
|
|
61
|
+
}, []);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
const dotInterval = setInterval(() => {
|
|
64
|
+
setDotIndex((prev) => (prev + 1) % DOT_ANIMATIONS.length);
|
|
65
|
+
}, 100);
|
|
66
|
+
return () => clearInterval(dotInterval);
|
|
67
|
+
}, []);
|
|
68
|
+
const seconds = (elapsed / 1000).toFixed(1);
|
|
69
|
+
const animatedDots = DOT_ANIMATIONS[dotIndex];
|
|
70
|
+
return _jsxs("span", {
|
|
71
|
+
className: "text-muted-foreground text-sm",
|
|
72
|
+
children: [thinkingWord, animatedDots, " ", seconds, "s"],
|
|
73
|
+
});
|
|
64
74
|
}
|
|
65
|
-
const messageContentVariants = cva(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
const messageContentVariants = cva(
|
|
76
|
+
"w-full px-4 py-3 rounded-xl text-[var(--font-size)] font-[var(--font-family)] leading-relaxed break-words transition-colors",
|
|
77
|
+
{
|
|
78
|
+
variants: {
|
|
79
|
+
role: {
|
|
80
|
+
user: "bg-primary text-primary-foreground shadow-sm",
|
|
81
|
+
assistant: "bg-muted text-foreground",
|
|
82
|
+
system:
|
|
83
|
+
"bg-card border border-border text-foreground opacity-80 text-sm",
|
|
84
|
+
},
|
|
85
|
+
variant: {
|
|
86
|
+
default: "",
|
|
87
|
+
outline: "border border-border",
|
|
88
|
+
ghost: "bg-transparent",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: {
|
|
92
|
+
role: "assistant",
|
|
93
|
+
variant: "default",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
);
|
|
97
|
+
export const MessageContent = React.forwardRef(
|
|
98
|
+
(
|
|
99
|
+
{
|
|
100
|
+
role: roleProp,
|
|
101
|
+
variant,
|
|
102
|
+
isStreaming: isStreamingProp,
|
|
103
|
+
message,
|
|
104
|
+
thinkingDisplayStyle = "collapsible",
|
|
105
|
+
className,
|
|
106
|
+
children,
|
|
107
|
+
...props
|
|
108
|
+
},
|
|
109
|
+
ref,
|
|
110
|
+
) => {
|
|
111
|
+
// Get streaming start time from store (when using smart rendering)
|
|
112
|
+
const streamingStartTime = useChatStore(
|
|
113
|
+
(state) => state.streamingStartTime,
|
|
114
|
+
);
|
|
115
|
+
// Use smart rendering if message is provided and no custom children
|
|
116
|
+
const useSmartRendering = message && !children;
|
|
117
|
+
// Derive props from message if using smart rendering
|
|
118
|
+
const role = useSmartRendering ? message.role : roleProp || "assistant";
|
|
119
|
+
const isStreaming = useSmartRendering
|
|
120
|
+
? message.isStreaming
|
|
121
|
+
: isStreamingProp;
|
|
122
|
+
let content = children;
|
|
123
|
+
if (useSmartRendering) {
|
|
124
|
+
// Extract thinking from metadata
|
|
125
|
+
const thinking = message.metadata?.thinking;
|
|
126
|
+
const hasThinking = !!thinking;
|
|
127
|
+
// Check if waiting (streaming but no content yet)
|
|
128
|
+
const isWaiting =
|
|
129
|
+
message.isStreaming && !message.content && message.role === "assistant";
|
|
130
|
+
content = _jsxs(_Fragment, {
|
|
131
|
+
children: [
|
|
132
|
+
message.role === "assistant" &&
|
|
133
|
+
hasThinking &&
|
|
134
|
+
_jsx(Reasoning, {
|
|
135
|
+
content: thinking,
|
|
136
|
+
isStreaming: message.isStreaming,
|
|
137
|
+
mode: thinkingDisplayStyle,
|
|
138
|
+
autoCollapse: true,
|
|
139
|
+
}),
|
|
140
|
+
isWaiting &&
|
|
141
|
+
streamingStartTime &&
|
|
142
|
+
_jsxs("div", {
|
|
143
|
+
className: "flex items-center gap-2 opacity-50",
|
|
144
|
+
children: [
|
|
145
|
+
_jsx(Loader2Icon, {
|
|
146
|
+
className: "size-4 animate-spin text-muted-foreground",
|
|
147
|
+
}),
|
|
148
|
+
_jsx(WaitingElapsedTime, { startTime: streamingStartTime }),
|
|
149
|
+
],
|
|
150
|
+
}),
|
|
151
|
+
message.role === "user"
|
|
152
|
+
? _jsx("div", {
|
|
153
|
+
className: "whitespace-pre-wrap",
|
|
154
|
+
children: message.content,
|
|
155
|
+
})
|
|
156
|
+
: _jsx(Response, {
|
|
157
|
+
content: message.content,
|
|
158
|
+
isStreaming: message.isStreaming,
|
|
159
|
+
showEmpty: false,
|
|
160
|
+
}),
|
|
161
|
+
],
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return _jsx("div", {
|
|
165
|
+
ref: ref,
|
|
166
|
+
className: cn(
|
|
167
|
+
messageContentVariants({ role, variant }),
|
|
168
|
+
isStreaming && "animate-pulse-subtle",
|
|
169
|
+
className,
|
|
170
|
+
),
|
|
171
|
+
...props,
|
|
172
|
+
children: content,
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
);
|
|
104
176
|
MessageContent.displayName = "MessageContent";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { type ThemeConfig } from "./ConfigPanel.js";
|
|
2
2
|
declare const DEFAULT_CONFIG: ThemeConfig;
|
|
3
3
|
interface PlaygroundLayoutProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
initialConfig?: ThemeConfig;
|
|
5
|
+
initialStatus?: string;
|
|
6
|
+
iframeSrc?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function PlaygroundLayout({
|
|
8
|
+
export declare function PlaygroundLayout({
|
|
9
|
+
initialConfig,
|
|
10
|
+
initialStatus,
|
|
11
|
+
iframeSrc,
|
|
12
|
+
}: PlaygroundLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export { DEFAULT_CONFIG };
|
|
10
|
-
//# sourceMappingURL=PlaygroundLayout.d.ts.map
|
|
14
|
+
//# sourceMappingURL=PlaygroundLayout.d.ts.map
|
|
@@ -1,18 +1,49 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { useState } from "react";
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { ChatPreview } from "./ChatPreview.js";
|
|
4
|
+
import { ConfigPanel } from "./ConfigPanel.js";
|
|
5
|
+
|
|
5
6
|
const DEFAULT_CONFIG = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
colorScheme: "light",
|
|
8
|
+
accentColor: "#646cff",
|
|
9
|
+
typography: "Inter",
|
|
10
|
+
fontSize: 16,
|
|
11
|
+
thinkingDisplayStyle: "collapsible",
|
|
11
12
|
};
|
|
12
|
-
export function PlaygroundLayout({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export function PlaygroundLayout({
|
|
14
|
+
initialConfig = DEFAULT_CONFIG,
|
|
15
|
+
initialStatus = "v0.1.0",
|
|
16
|
+
iframeSrc,
|
|
17
|
+
}) {
|
|
18
|
+
const [config, setConfig] = useState(initialConfig);
|
|
19
|
+
const [status, setStatus] = useState(initialStatus);
|
|
20
|
+
return _jsx("div", {
|
|
21
|
+
className: "w-full h-screen overflow-hidden",
|
|
22
|
+
"data-theme": config.colorScheme,
|
|
23
|
+
children: _jsxs("div", {
|
|
24
|
+
className: "flex h-full w-full",
|
|
25
|
+
children: [
|
|
26
|
+
_jsx("div", {
|
|
27
|
+
className: "w-[400px] flex-shrink-0 h-full overflow-hidden",
|
|
28
|
+
children: _jsx(ConfigPanel, {
|
|
29
|
+
config: config,
|
|
30
|
+
status: status,
|
|
31
|
+
onConfigChange: setConfig,
|
|
32
|
+
onStatusChange: setStatus,
|
|
33
|
+
}),
|
|
34
|
+
}),
|
|
35
|
+
_jsx("div", {
|
|
36
|
+
className:
|
|
37
|
+
"flex-1 h-full overflow-hidden [background-image:radial-gradient(var(--color-border)_1px,var(--color-bg)_1px)] [background-size:20px_20px] flex items-center justify-center p-5",
|
|
38
|
+
children: _jsx(ChatPreview, {
|
|
39
|
+
config: config,
|
|
40
|
+
status: status,
|
|
41
|
+
iframeSrc: iframeSrc,
|
|
42
|
+
}),
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
16
47
|
}
|
|
17
48
|
export { DEFAULT_CONFIG };
|
|
18
|
-
//# sourceMappingURL=PlaygroundLayout.js.map
|
|
49
|
+
//# sourceMappingURL=PlaygroundLayout.js.map
|
|
@@ -4,28 +4,34 @@ import * as React from "react";
|
|
|
4
4
|
* Reasoning component inspired by shadcn.io/ai
|
|
5
5
|
* Displays AI thinking/reasoning process with auto-collapse support
|
|
6
6
|
*/
|
|
7
|
-
declare const reasoningContainerVariants: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
declare const reasoningContainerVariants: (
|
|
8
|
+
props?:
|
|
9
|
+
| ({
|
|
10
|
+
variant?: "default" | "subtle" | "prominent" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp)
|
|
12
|
+
| undefined,
|
|
13
|
+
) => string;
|
|
14
|
+
export interface ReasoningProps
|
|
15
|
+
extends VariantProps<typeof reasoningContainerVariants> {
|
|
16
|
+
/** The reasoning/thinking content */
|
|
17
|
+
content?: string;
|
|
18
|
+
/** Whether the content is currently streaming */
|
|
19
|
+
isStreaming?: boolean;
|
|
20
|
+
/** Display mode - collapsible or always visible */
|
|
21
|
+
mode?: "collapsible" | "inline";
|
|
22
|
+
/** Default expanded state (default: false - collapsed by default) */
|
|
23
|
+
defaultExpanded?: boolean;
|
|
24
|
+
/** Auto-expand when streaming starts (default: false) */
|
|
25
|
+
autoExpand?: boolean;
|
|
26
|
+
/** Auto-collapse after streaming completes */
|
|
27
|
+
autoCollapse?: boolean;
|
|
28
|
+
/** Delay before auto-collapsing (ms) */
|
|
29
|
+
autoCollapseDelay?: number;
|
|
30
|
+
/** Custom label */
|
|
31
|
+
label?: string;
|
|
32
|
+
/** Additional CSS class */
|
|
33
|
+
className?: string;
|
|
29
34
|
}
|
|
30
|
-
export declare const Reasoning: React.ForwardRefExoticComponent<
|
|
31
|
-
|
|
35
|
+
export declare const Reasoning: React.ForwardRefExoticComponent<
|
|
36
|
+
ReasoningProps & React.RefAttributes<HTMLDivElement>
|
|
37
|
+
>;
|