@tangle-network/ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/active-sessions-store-CeOmXgv5.d.ts +85 -0
- package/dist/artifact-pane-DvJyPWV4.d.ts +24 -0
- package/dist/auth.d.ts +74 -0
- package/dist/auth.js +15 -0
- package/dist/button-CMQuQEW_.d.ts +17 -0
- package/dist/chat.d.ts +232 -0
- package/dist/chat.js +30 -0
- package/dist/chunk-2NFQRQOD.js +1009 -0
- package/dist/chunk-2VH6PUXD.js +186 -0
- package/dist/chunk-34A66VBG.js +214 -0
- package/dist/chunk-3OI2QKFD.js +0 -0
- package/dist/chunk-4CLN43XT.js +45 -0
- package/dist/chunk-54SQQMMM.js +156 -0
- package/dist/chunk-5Z5ZYMOJ.js +0 -0
- package/dist/chunk-66BNMOVT.js +167 -0
- package/dist/chunk-6BGQA4BQ.js +0 -0
- package/dist/chunk-7UO2ZMRQ.js +133 -0
- package/dist/chunk-BX6AQMUS.js +183 -0
- package/dist/chunk-CD53GZOM.js +59 -0
- package/dist/chunk-CSAIKY36.js +54 -0
- package/dist/chunk-EEE55AVS.js +1201 -0
- package/dist/chunk-GYPQXTJU.js +230 -0
- package/dist/chunk-HFL6R6IF.js +37 -0
- package/dist/chunk-HJKCSXCH.js +737 -0
- package/dist/chunk-LISXUB4D.js +1222 -0
- package/dist/chunk-LQS34IGP.js +0 -0
- package/dist/chunk-MKTSMWVD.js +109 -0
- package/dist/chunk-NKDZ7GZE.js +192 -0
- package/dist/chunk-OEX7NZE3.js +321 -0
- package/dist/chunk-Q56BYXQF.js +61 -0
- package/dist/chunk-Q7EIIWTC.js +0 -0
- package/dist/chunk-REJESC5U.js +117 -0
- package/dist/chunk-RQGKSCEZ.js +0 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-TMFOPHHN.js +299 -0
- package/dist/chunk-XGKULLYE.js +40 -0
- package/dist/chunk-XIHMJ7ZQ.js +614 -0
- package/dist/chunk-YJ2G3XO5.js +1048 -0
- package/dist/chunk-YNN4O57I.js +754 -0
- package/dist/code-block-DjXf8eOG.d.ts +19 -0
- package/dist/document-editor-pane-A5LT5H4N.js +12 -0
- package/dist/document-editor-pane-DyDEX_Zm.d.ts +124 -0
- package/dist/editor.d.ts +120 -0
- package/dist/editor.js +34 -0
- package/dist/files.d.ts +175 -0
- package/dist/files.js +20 -0
- package/dist/hooks.d.ts +56 -0
- package/dist/hooks.js +41 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +446 -0
- package/dist/markdown.d.ts +15 -0
- package/dist/markdown.js +14 -0
- package/dist/message-BHWbxBtT.d.ts +15 -0
- package/dist/openui.d.ts +115 -0
- package/dist/openui.js +12 -0
- package/dist/parts-dj7AcUg0.d.ts +36 -0
- package/dist/primitives.d.ts +332 -0
- package/dist/primitives.js +191 -0
- package/dist/run-PfLmDAox.d.ts +41 -0
- package/dist/run.d.ts +69 -0
- package/dist/run.js +36 -0
- package/dist/sdk-hooks.d.ts +285 -0
- package/dist/sdk-hooks.js +31 -0
- package/dist/stores.d.ts +17 -0
- package/dist/stores.js +76 -0
- package/dist/tool-call-feed-Bs3MyQMT.d.ts +68 -0
- package/dist/tool-display-z4JcDmMQ.d.ts +32 -0
- package/dist/tool-previews.d.ts +48 -0
- package/dist/tool-previews.js +21 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +45 -0
- package/dist/utils.js +32 -0
- package/package.json +193 -0
- package/src/auth/auth.tsx +228 -0
- package/src/auth/index.ts +13 -0
- package/src/auth/login-layout.tsx +46 -0
- package/src/chat/agent-timeline.stories.tsx +429 -0
- package/src/chat/agent-timeline.tsx +360 -0
- package/src/chat/chat-container.tsx +486 -0
- package/src/chat/chat-input.stories.tsx +142 -0
- package/src/chat/chat-input.tsx +389 -0
- package/src/chat/chat-message.stories.tsx +237 -0
- package/src/chat/chat-message.tsx +129 -0
- package/src/chat/index.ts +18 -0
- package/src/chat/message-list.stories.tsx +336 -0
- package/src/chat/message-list.tsx +79 -0
- package/src/chat/thinking-indicator.stories.tsx +56 -0
- package/src/chat/thinking-indicator.tsx +30 -0
- package/src/chat/user-message.stories.tsx +92 -0
- package/src/chat/user-message.tsx +43 -0
- package/src/editor/document-editor-pane.tsx +351 -0
- package/src/editor/editor-provider.tsx +428 -0
- package/src/editor/editor-toolbar.tsx +130 -0
- package/src/editor/index.ts +31 -0
- package/src/editor/markdown-conversion.ts +21 -0
- package/src/editor/markdown-document-editor.tsx +137 -0
- package/src/editor/tiptap-editor.tsx +331 -0
- package/src/editor/use-editor.ts +221 -0
- package/src/files/file-artifact-pane.tsx +183 -0
- package/src/files/file-preview.tsx +342 -0
- package/src/files/file-tabs.tsx +71 -0
- package/src/files/file-tree.tsx +258 -0
- package/src/files/index.ts +17 -0
- package/src/files/rich-file-tree.stories.tsx +104 -0
- package/src/files/rich-file-tree.test.tsx +42 -0
- package/src/files/rich-file-tree.tsx +232 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/use-auth.ts +153 -0
- package/src/hooks/use-auto-scroll.ts +59 -0
- package/src/hooks/use-dropdown-menu.ts +40 -0
- package/src/hooks/use-live-time.test.tsx +40 -0
- package/src/hooks/use-live-time.ts +27 -0
- package/src/hooks/use-realtime-session.ts +319 -0
- package/src/hooks/use-run-collapse-state.ts +25 -0
- package/src/hooks/use-run-groups.ts +111 -0
- package/src/hooks/use-sdk-session.ts +575 -0
- package/src/hooks/use-sse-stream.ts +475 -0
- package/src/hooks/use-tool-call-stream.ts +96 -0
- package/src/index.ts +14 -0
- package/src/lib/utils.ts +6 -0
- package/src/markdown/code-block.tsx +198 -0
- package/src/markdown/index.ts +2 -0
- package/src/markdown/markdown.stories.tsx +190 -0
- package/src/markdown/markdown.tsx +62 -0
- package/src/openui/index.ts +20 -0
- package/src/openui/openui-artifact-renderer.tsx +542 -0
- package/src/primitives/artifact-pane.tsx +91 -0
- package/src/primitives/avatar.stories.tsx +95 -0
- package/src/primitives/avatar.tsx +47 -0
- package/src/primitives/badge.stories.tsx +57 -0
- package/src/primitives/badge.tsx +97 -0
- package/src/primitives/button.stories.tsx +48 -0
- package/src/primitives/button.tsx +115 -0
- package/src/primitives/card.stories.tsx +53 -0
- package/src/primitives/card.tsx +98 -0
- package/src/primitives/code-block.stories.tsx +115 -0
- package/src/primitives/code-block.tsx +22 -0
- package/src/primitives/design-tokens.stories.tsx +162 -0
- package/src/primitives/dialog.stories.tsx +176 -0
- package/src/primitives/dialog.tsx +137 -0
- package/src/primitives/drop-zone.stories.tsx +123 -0
- package/src/primitives/drop-zone.tsx +131 -0
- package/src/primitives/dropdown-menu.stories.tsx +122 -0
- package/src/primitives/dropdown-menu.tsx +214 -0
- package/src/primitives/empty-state.stories.tsx +81 -0
- package/src/primitives/empty-state.tsx +40 -0
- package/src/primitives/index.ts +118 -0
- package/src/primitives/input.stories.tsx +113 -0
- package/src/primitives/input.tsx +136 -0
- package/src/primitives/label.stories.tsx +84 -0
- package/src/primitives/label.tsx +24 -0
- package/src/primitives/progress.stories.tsx +93 -0
- package/src/primitives/progress.tsx +50 -0
- package/src/primitives/segmented-control.test.tsx +328 -0
- package/src/primitives/segmented-control.tsx +154 -0
- package/src/primitives/select.stories.tsx +164 -0
- package/src/primitives/select.tsx +158 -0
- package/src/primitives/sidebar-drop-zone.stories.tsx +100 -0
- package/src/primitives/sidebar-drop-zone.tsx +149 -0
- package/src/primitives/skeleton.stories.tsx +79 -0
- package/src/primitives/skeleton.tsx +55 -0
- package/src/primitives/stat-card.stories.tsx +137 -0
- package/src/primitives/stat-card.tsx +97 -0
- package/src/primitives/switch.stories.tsx +85 -0
- package/src/primitives/switch.tsx +28 -0
- package/src/primitives/table.stories.tsx +170 -0
- package/src/primitives/table.tsx +116 -0
- package/src/primitives/tabs.stories.tsx +180 -0
- package/src/primitives/tabs.tsx +71 -0
- package/src/primitives/terminal-display.stories.tsx +191 -0
- package/src/primitives/terminal-display.tsx +189 -0
- package/src/primitives/theme-toggle.stories.tsx +32 -0
- package/src/primitives/theme-toggle.tsx +96 -0
- package/src/primitives/toast.stories.tsx +155 -0
- package/src/primitives/toast.tsx +190 -0
- package/src/primitives/upload-progress.stories.tsx +120 -0
- package/src/primitives/upload-progress.tsx +110 -0
- package/src/run/expanded-tool-detail.stories.tsx +182 -0
- package/src/run/expanded-tool-detail.tsx +186 -0
- package/src/run/index.ts +13 -0
- package/src/run/inline-thinking-item.stories.tsx +136 -0
- package/src/run/inline-thinking-item.tsx +120 -0
- package/src/run/inline-tool-item.stories.tsx +222 -0
- package/src/run/inline-tool-item.tsx +190 -0
- package/src/run/run-group.stories.tsx +322 -0
- package/src/run/run-group.tsx +569 -0
- package/src/run/run-item-primitives.tsx +17 -0
- package/src/run/tool-call-feed.stories.tsx +294 -0
- package/src/run/tool-call-feed.tsx +192 -0
- package/src/run/tool-call-step.stories.tsx +198 -0
- package/src/run/tool-call-step.tsx +240 -0
- package/src/sdk-hooks.ts +38 -0
- package/src/stores/active-sessions-store.ts +455 -0
- package/src/stores/chat-store.ts +43 -0
- package/src/stores/index.ts +2 -0
- package/src/tool-previews/command-preview.tsx +116 -0
- package/src/tool-previews/diff-preview.tsx +85 -0
- package/src/tool-previews/glob-results-preview.tsx +98 -0
- package/src/tool-previews/grep-results-preview.tsx +157 -0
- package/src/tool-previews/index.ts +22 -0
- package/src/tool-previews/preview-primitives.tsx +84 -0
- package/src/tool-previews/question-preview.tsx +101 -0
- package/src/tool-previews/web-search-preview.tsx +117 -0
- package/src/tool-previews/write-file-preview.tsx +80 -0
- package/src/types/branding.ts +11 -0
- package/src/types/index.ts +5 -0
- package/src/types/message.ts +13 -0
- package/src/types/parts.ts +51 -0
- package/src/types/run.ts +56 -0
- package/src/types/tool-display.ts +41 -0
- package/src/utils/copy-text.ts +30 -0
- package/src/utils/format.test.ts +43 -0
- package/src/utils/format.ts +56 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/time-ago.ts +9 -0
- package/src/utils/tool-display.ts +238 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthHeader,
|
|
3
|
+
GitHubLoginButton,
|
|
4
|
+
LoginLayout,
|
|
5
|
+
UserMenu
|
|
6
|
+
} from "./chunk-NKDZ7GZE.js";
|
|
7
|
+
import {
|
|
8
|
+
createAuthFetcher,
|
|
9
|
+
useApiKey,
|
|
10
|
+
useAuth,
|
|
11
|
+
useLiveTime
|
|
12
|
+
} from "./chunk-REJESC5U.js";
|
|
13
|
+
import {
|
|
14
|
+
RealtimeSessionRegistry,
|
|
15
|
+
useDropdownMenu,
|
|
16
|
+
useRealtimeSession,
|
|
17
|
+
useSSEStream,
|
|
18
|
+
useSdkSession,
|
|
19
|
+
useToolCallStream
|
|
20
|
+
} from "./chunk-YJ2G3XO5.js";
|
|
21
|
+
import {
|
|
22
|
+
addMessage,
|
|
23
|
+
addParts,
|
|
24
|
+
clearChat,
|
|
25
|
+
isStreamingAtom,
|
|
26
|
+
messagesAtom,
|
|
27
|
+
partMapAtom,
|
|
28
|
+
updatePart
|
|
29
|
+
} from "./chunk-HFL6R6IF.js";
|
|
30
|
+
import {
|
|
31
|
+
activeSessionsAtom,
|
|
32
|
+
bumpActiveSessionActivity,
|
|
33
|
+
getActiveSession,
|
|
34
|
+
getAllActiveSessions,
|
|
35
|
+
getAllProjectActivity,
|
|
36
|
+
getSessionsByActivity,
|
|
37
|
+
getSessionsForNavbar,
|
|
38
|
+
getSessionsForProject,
|
|
39
|
+
getTotalRunningSessionCount,
|
|
40
|
+
hasBackgroundRunningSessions,
|
|
41
|
+
registerActiveSession,
|
|
42
|
+
resetActiveSessions,
|
|
43
|
+
setActiveSessionAttention,
|
|
44
|
+
setActiveSessionConnection,
|
|
45
|
+
setActiveSessionError,
|
|
46
|
+
setActiveSessionRunning,
|
|
47
|
+
setForegroundActiveSession,
|
|
48
|
+
unregisterActiveSession,
|
|
49
|
+
updateActiveSessionMeta,
|
|
50
|
+
useActiveSession,
|
|
51
|
+
useActiveSessions,
|
|
52
|
+
useActiveSessionsState,
|
|
53
|
+
useHasBackgroundRunningSessions,
|
|
54
|
+
useNavbarSessions,
|
|
55
|
+
useProjectActivity,
|
|
56
|
+
useProjectSessions,
|
|
57
|
+
useSessionsByActivity,
|
|
58
|
+
useTotalRunningSessions
|
|
59
|
+
} from "./chunk-OEX7NZE3.js";
|
|
60
|
+
import "./chunk-6BGQA4BQ.js";
|
|
61
|
+
import {
|
|
62
|
+
copyText,
|
|
63
|
+
timeAgo
|
|
64
|
+
} from "./chunk-XGKULLYE.js";
|
|
65
|
+
import "./chunk-3OI2QKFD.js";
|
|
66
|
+
import {
|
|
67
|
+
Dialog,
|
|
68
|
+
DialogClose,
|
|
69
|
+
DialogContent,
|
|
70
|
+
DialogDescription,
|
|
71
|
+
DialogFooter,
|
|
72
|
+
DialogHeader,
|
|
73
|
+
DialogOverlay,
|
|
74
|
+
DialogPortal,
|
|
75
|
+
DialogTitle,
|
|
76
|
+
DialogTrigger,
|
|
77
|
+
DropZone,
|
|
78
|
+
EmptyState,
|
|
79
|
+
Input,
|
|
80
|
+
Label,
|
|
81
|
+
Logo,
|
|
82
|
+
Progress,
|
|
83
|
+
SegmentedControl,
|
|
84
|
+
Select,
|
|
85
|
+
SelectContent,
|
|
86
|
+
SelectGroup,
|
|
87
|
+
SelectItem,
|
|
88
|
+
SelectLabel,
|
|
89
|
+
SelectScrollDownButton,
|
|
90
|
+
SelectScrollUpButton,
|
|
91
|
+
SelectSeparator,
|
|
92
|
+
SelectTrigger,
|
|
93
|
+
SelectValue,
|
|
94
|
+
SidebarDropZone,
|
|
95
|
+
Skeleton,
|
|
96
|
+
SkeletonCard,
|
|
97
|
+
SkeletonTable,
|
|
98
|
+
StatCard,
|
|
99
|
+
Switch,
|
|
100
|
+
TangleKnot,
|
|
101
|
+
TerminalCursor,
|
|
102
|
+
TerminalDisplay,
|
|
103
|
+
TerminalInput,
|
|
104
|
+
TerminalLine,
|
|
105
|
+
Textarea,
|
|
106
|
+
ToastContainer,
|
|
107
|
+
ToastProvider,
|
|
108
|
+
UploadProgress,
|
|
109
|
+
useToast
|
|
110
|
+
} from "./chunk-LISXUB4D.js";
|
|
111
|
+
import {
|
|
112
|
+
Avatar,
|
|
113
|
+
AvatarFallback,
|
|
114
|
+
AvatarImage,
|
|
115
|
+
DropdownMenu,
|
|
116
|
+
DropdownMenuCheckboxItem,
|
|
117
|
+
DropdownMenuContent,
|
|
118
|
+
DropdownMenuGroup,
|
|
119
|
+
DropdownMenuItem,
|
|
120
|
+
DropdownMenuLabel,
|
|
121
|
+
DropdownMenuPortal,
|
|
122
|
+
DropdownMenuRadioGroup,
|
|
123
|
+
DropdownMenuRadioItem,
|
|
124
|
+
DropdownMenuSeparator,
|
|
125
|
+
DropdownMenuShortcut,
|
|
126
|
+
DropdownMenuSub,
|
|
127
|
+
DropdownMenuSubContent,
|
|
128
|
+
DropdownMenuSubTrigger,
|
|
129
|
+
DropdownMenuTrigger
|
|
130
|
+
} from "./chunk-34A66VBG.js";
|
|
131
|
+
import {
|
|
132
|
+
AgentTimeline,
|
|
133
|
+
ChatContainer,
|
|
134
|
+
ChatInput,
|
|
135
|
+
ChatMessage,
|
|
136
|
+
MessageList,
|
|
137
|
+
ThinkingIndicator,
|
|
138
|
+
UserMessage
|
|
139
|
+
} from "./chunk-2NFQRQOD.js";
|
|
140
|
+
import {
|
|
141
|
+
useAutoScroll,
|
|
142
|
+
useRunCollapseState,
|
|
143
|
+
useRunGroups
|
|
144
|
+
} from "./chunk-54SQQMMM.js";
|
|
145
|
+
import "./chunk-LQS34IGP.js";
|
|
146
|
+
import {
|
|
147
|
+
ToolCallFeed,
|
|
148
|
+
parseToolEvent
|
|
149
|
+
} from "./chunk-7UO2ZMRQ.js";
|
|
150
|
+
import {
|
|
151
|
+
ExpandedToolDetail,
|
|
152
|
+
InlineThinkingItem,
|
|
153
|
+
InlineToolItem,
|
|
154
|
+
LiveDuration,
|
|
155
|
+
RunGroup
|
|
156
|
+
} from "./chunk-YNN4O57I.js";
|
|
157
|
+
import {
|
|
158
|
+
ToolCallGroup,
|
|
159
|
+
ToolCallStep
|
|
160
|
+
} from "./chunk-2VH6PUXD.js";
|
|
161
|
+
import {
|
|
162
|
+
formatBytes,
|
|
163
|
+
formatDuration,
|
|
164
|
+
formatUptime,
|
|
165
|
+
truncateText
|
|
166
|
+
} from "./chunk-4CLN43XT.js";
|
|
167
|
+
import {
|
|
168
|
+
TOOL_CATEGORY_ICONS,
|
|
169
|
+
getToolCategory,
|
|
170
|
+
getToolDisplayMetadata,
|
|
171
|
+
getToolErrorText
|
|
172
|
+
} from "./chunk-BX6AQMUS.js";
|
|
173
|
+
import {
|
|
174
|
+
CommandPreview,
|
|
175
|
+
DiffPreview,
|
|
176
|
+
GlobResultsPreview,
|
|
177
|
+
GrepResultsPreview,
|
|
178
|
+
QuestionPreview,
|
|
179
|
+
WebSearchPreview,
|
|
180
|
+
WriteFilePreview
|
|
181
|
+
} from "./chunk-XIHMJ7ZQ.js";
|
|
182
|
+
import "./chunk-RQGKSCEZ.js";
|
|
183
|
+
import {
|
|
184
|
+
OpenUIArtifactRenderer
|
|
185
|
+
} from "./chunk-TMFOPHHN.js";
|
|
186
|
+
import {
|
|
187
|
+
Badge,
|
|
188
|
+
Card,
|
|
189
|
+
CardContent,
|
|
190
|
+
CardDescription,
|
|
191
|
+
CardFooter,
|
|
192
|
+
CardHeader,
|
|
193
|
+
CardTitle,
|
|
194
|
+
InlineCode,
|
|
195
|
+
Table,
|
|
196
|
+
TableBody,
|
|
197
|
+
TableCaption,
|
|
198
|
+
TableCell,
|
|
199
|
+
TableFooter,
|
|
200
|
+
TableHead,
|
|
201
|
+
TableHeader,
|
|
202
|
+
TableRow,
|
|
203
|
+
badgeVariants
|
|
204
|
+
} from "./chunk-GYPQXTJU.js";
|
|
205
|
+
import {
|
|
206
|
+
Button,
|
|
207
|
+
buttonVariants
|
|
208
|
+
} from "./chunk-MKTSMWVD.js";
|
|
209
|
+
import {
|
|
210
|
+
FileArtifactPane,
|
|
211
|
+
FilePreview,
|
|
212
|
+
FileTabs,
|
|
213
|
+
FileTree,
|
|
214
|
+
RichFileTree,
|
|
215
|
+
filterFileTree
|
|
216
|
+
} from "./chunk-HJKCSXCH.js";
|
|
217
|
+
import "./chunk-Q7EIIWTC.js";
|
|
218
|
+
import {
|
|
219
|
+
CollaboratorsList,
|
|
220
|
+
DocumentEditorPane,
|
|
221
|
+
EditorProvider,
|
|
222
|
+
EditorToolbar,
|
|
223
|
+
TiptapEditor,
|
|
224
|
+
useAwareness,
|
|
225
|
+
useCollaboratorPresence,
|
|
226
|
+
useCollaborators,
|
|
227
|
+
useDocumentChanges,
|
|
228
|
+
useEditorConnection,
|
|
229
|
+
useEditorContext,
|
|
230
|
+
useYjsState
|
|
231
|
+
} from "./chunk-EEE55AVS.js";
|
|
232
|
+
import {
|
|
233
|
+
Tabs,
|
|
234
|
+
TabsContent,
|
|
235
|
+
TabsList,
|
|
236
|
+
TabsTrigger
|
|
237
|
+
} from "./chunk-Q56BYXQF.js";
|
|
238
|
+
import {
|
|
239
|
+
ArtifactPane
|
|
240
|
+
} from "./chunk-CSAIKY36.js";
|
|
241
|
+
import "./chunk-5Z5ZYMOJ.js";
|
|
242
|
+
import {
|
|
243
|
+
Markdown
|
|
244
|
+
} from "./chunk-CD53GZOM.js";
|
|
245
|
+
import {
|
|
246
|
+
CodeBlock,
|
|
247
|
+
CopyButton
|
|
248
|
+
} from "./chunk-66BNMOVT.js";
|
|
249
|
+
import {
|
|
250
|
+
cn
|
|
251
|
+
} from "./chunk-RQHJBTEU.js";
|
|
252
|
+
export {
|
|
253
|
+
AgentTimeline,
|
|
254
|
+
ArtifactPane,
|
|
255
|
+
AuthHeader,
|
|
256
|
+
Avatar,
|
|
257
|
+
AvatarFallback,
|
|
258
|
+
AvatarImage,
|
|
259
|
+
Badge,
|
|
260
|
+
Button,
|
|
261
|
+
Card,
|
|
262
|
+
CardContent,
|
|
263
|
+
CardDescription,
|
|
264
|
+
CardFooter,
|
|
265
|
+
CardHeader,
|
|
266
|
+
CardTitle,
|
|
267
|
+
ChatContainer,
|
|
268
|
+
ChatInput,
|
|
269
|
+
ChatMessage,
|
|
270
|
+
CodeBlock,
|
|
271
|
+
CollaboratorsList,
|
|
272
|
+
CommandPreview,
|
|
273
|
+
CopyButton,
|
|
274
|
+
Dialog,
|
|
275
|
+
DialogClose,
|
|
276
|
+
DialogContent,
|
|
277
|
+
DialogDescription,
|
|
278
|
+
DialogFooter,
|
|
279
|
+
DialogHeader,
|
|
280
|
+
DialogOverlay,
|
|
281
|
+
DialogPortal,
|
|
282
|
+
DialogTitle,
|
|
283
|
+
DialogTrigger,
|
|
284
|
+
DiffPreview,
|
|
285
|
+
DocumentEditorPane,
|
|
286
|
+
DropZone,
|
|
287
|
+
DropdownMenu,
|
|
288
|
+
DropdownMenuCheckboxItem,
|
|
289
|
+
DropdownMenuContent,
|
|
290
|
+
DropdownMenuGroup,
|
|
291
|
+
DropdownMenuItem,
|
|
292
|
+
DropdownMenuLabel,
|
|
293
|
+
DropdownMenuPortal,
|
|
294
|
+
DropdownMenuRadioGroup,
|
|
295
|
+
DropdownMenuRadioItem,
|
|
296
|
+
DropdownMenuSeparator,
|
|
297
|
+
DropdownMenuShortcut,
|
|
298
|
+
DropdownMenuSub,
|
|
299
|
+
DropdownMenuSubContent,
|
|
300
|
+
DropdownMenuSubTrigger,
|
|
301
|
+
DropdownMenuTrigger,
|
|
302
|
+
EditorProvider,
|
|
303
|
+
EditorToolbar,
|
|
304
|
+
EmptyState,
|
|
305
|
+
ExpandedToolDetail,
|
|
306
|
+
FileArtifactPane,
|
|
307
|
+
FilePreview,
|
|
308
|
+
FileTabs,
|
|
309
|
+
FileTree,
|
|
310
|
+
GitHubLoginButton,
|
|
311
|
+
GlobResultsPreview,
|
|
312
|
+
GrepResultsPreview,
|
|
313
|
+
InlineCode,
|
|
314
|
+
InlineThinkingItem,
|
|
315
|
+
InlineToolItem,
|
|
316
|
+
Input,
|
|
317
|
+
Label,
|
|
318
|
+
LiveDuration,
|
|
319
|
+
LoginLayout,
|
|
320
|
+
Logo,
|
|
321
|
+
Markdown,
|
|
322
|
+
MessageList,
|
|
323
|
+
OpenUIArtifactRenderer,
|
|
324
|
+
Progress,
|
|
325
|
+
QuestionPreview,
|
|
326
|
+
RealtimeSessionRegistry,
|
|
327
|
+
RichFileTree,
|
|
328
|
+
RunGroup,
|
|
329
|
+
SegmentedControl,
|
|
330
|
+
Select,
|
|
331
|
+
SelectContent,
|
|
332
|
+
SelectGroup,
|
|
333
|
+
SelectItem,
|
|
334
|
+
SelectLabel,
|
|
335
|
+
SelectScrollDownButton,
|
|
336
|
+
SelectScrollUpButton,
|
|
337
|
+
SelectSeparator,
|
|
338
|
+
SelectTrigger,
|
|
339
|
+
SelectValue,
|
|
340
|
+
SidebarDropZone,
|
|
341
|
+
Skeleton,
|
|
342
|
+
SkeletonCard,
|
|
343
|
+
SkeletonTable,
|
|
344
|
+
StatCard,
|
|
345
|
+
Switch,
|
|
346
|
+
TOOL_CATEGORY_ICONS,
|
|
347
|
+
Table,
|
|
348
|
+
TableBody,
|
|
349
|
+
TableCaption,
|
|
350
|
+
TableCell,
|
|
351
|
+
TableFooter,
|
|
352
|
+
TableHead,
|
|
353
|
+
TableHeader,
|
|
354
|
+
TableRow,
|
|
355
|
+
Tabs,
|
|
356
|
+
TabsContent,
|
|
357
|
+
TabsList,
|
|
358
|
+
TabsTrigger,
|
|
359
|
+
TangleKnot,
|
|
360
|
+
TerminalCursor,
|
|
361
|
+
TerminalDisplay,
|
|
362
|
+
TerminalInput,
|
|
363
|
+
TerminalLine,
|
|
364
|
+
Textarea,
|
|
365
|
+
ThinkingIndicator,
|
|
366
|
+
TiptapEditor,
|
|
367
|
+
ToastContainer,
|
|
368
|
+
ToastProvider,
|
|
369
|
+
ToolCallFeed,
|
|
370
|
+
ToolCallGroup,
|
|
371
|
+
ToolCallStep,
|
|
372
|
+
UploadProgress,
|
|
373
|
+
UserMenu,
|
|
374
|
+
UserMessage,
|
|
375
|
+
WebSearchPreview,
|
|
376
|
+
WriteFilePreview,
|
|
377
|
+
activeSessionsAtom,
|
|
378
|
+
addMessage,
|
|
379
|
+
addParts,
|
|
380
|
+
badgeVariants,
|
|
381
|
+
bumpActiveSessionActivity,
|
|
382
|
+
buttonVariants,
|
|
383
|
+
clearChat,
|
|
384
|
+
cn,
|
|
385
|
+
copyText,
|
|
386
|
+
createAuthFetcher,
|
|
387
|
+
filterFileTree,
|
|
388
|
+
formatBytes,
|
|
389
|
+
formatDuration,
|
|
390
|
+
formatUptime,
|
|
391
|
+
getActiveSession,
|
|
392
|
+
getAllActiveSessions,
|
|
393
|
+
getAllProjectActivity,
|
|
394
|
+
getSessionsByActivity,
|
|
395
|
+
getSessionsForNavbar,
|
|
396
|
+
getSessionsForProject,
|
|
397
|
+
getToolCategory,
|
|
398
|
+
getToolDisplayMetadata,
|
|
399
|
+
getToolErrorText,
|
|
400
|
+
getTotalRunningSessionCount,
|
|
401
|
+
hasBackgroundRunningSessions,
|
|
402
|
+
isStreamingAtom,
|
|
403
|
+
messagesAtom,
|
|
404
|
+
parseToolEvent,
|
|
405
|
+
partMapAtom,
|
|
406
|
+
registerActiveSession,
|
|
407
|
+
resetActiveSessions,
|
|
408
|
+
setActiveSessionAttention,
|
|
409
|
+
setActiveSessionConnection,
|
|
410
|
+
setActiveSessionError,
|
|
411
|
+
setActiveSessionRunning,
|
|
412
|
+
setForegroundActiveSession,
|
|
413
|
+
timeAgo,
|
|
414
|
+
truncateText,
|
|
415
|
+
unregisterActiveSession,
|
|
416
|
+
updateActiveSessionMeta,
|
|
417
|
+
updatePart,
|
|
418
|
+
useActiveSession,
|
|
419
|
+
useActiveSessions,
|
|
420
|
+
useActiveSessionsState,
|
|
421
|
+
useApiKey,
|
|
422
|
+
useAuth,
|
|
423
|
+
useAutoScroll,
|
|
424
|
+
useAwareness,
|
|
425
|
+
useCollaboratorPresence,
|
|
426
|
+
useCollaborators,
|
|
427
|
+
useDocumentChanges,
|
|
428
|
+
useDropdownMenu,
|
|
429
|
+
useEditorConnection,
|
|
430
|
+
useEditorContext,
|
|
431
|
+
useHasBackgroundRunningSessions,
|
|
432
|
+
useLiveTime,
|
|
433
|
+
useNavbarSessions,
|
|
434
|
+
useProjectActivity,
|
|
435
|
+
useProjectSessions,
|
|
436
|
+
useRealtimeSession,
|
|
437
|
+
useRunCollapseState,
|
|
438
|
+
useRunGroups,
|
|
439
|
+
useSSEStream,
|
|
440
|
+
useSdkSession,
|
|
441
|
+
useSessionsByActivity,
|
|
442
|
+
useToast,
|
|
443
|
+
useToolCallStream,
|
|
444
|
+
useTotalRunningSessions,
|
|
445
|
+
useYjsState
|
|
446
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
export { C as CodeBlock, a as CodeBlockProps, b as CopyButton } from './code-block-DjXf8eOG.js';
|
|
4
|
+
|
|
5
|
+
interface MarkdownProps {
|
|
6
|
+
children: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders Markdown content with GFM support, XSS sanitisation, and
|
|
11
|
+
* custom code block rendering via our CodeBlock component.
|
|
12
|
+
*/
|
|
13
|
+
declare const Markdown: React.MemoExoticComponent<({ children, className }: MarkdownProps) => react_jsx_runtime.JSX.Element>;
|
|
14
|
+
|
|
15
|
+
export { Markdown, type MarkdownProps };
|
package/dist/markdown.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A single message in a chat session. */
|
|
2
|
+
interface SessionMessage {
|
|
3
|
+
id: string;
|
|
4
|
+
role: 'user' | 'assistant' | 'system';
|
|
5
|
+
sessionID?: string;
|
|
6
|
+
time?: {
|
|
7
|
+
created?: number;
|
|
8
|
+
updated?: number;
|
|
9
|
+
completed?: number;
|
|
10
|
+
};
|
|
11
|
+
/** Monotonically increasing insertion index for stable ordering. */
|
|
12
|
+
_insertionIndex?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type { SessionMessage as S };
|
package/dist/openui.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type OpenUIPrimitive = string | number | boolean | null | undefined;
|
|
5
|
+
interface OpenUIAction {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
tone?: "default" | "secondary" | "outline" | "ghost" | "destructive";
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
}
|
|
12
|
+
interface OpenUIBaseNode {
|
|
13
|
+
id?: string;
|
|
14
|
+
}
|
|
15
|
+
interface OpenUIHeadingNode extends OpenUIBaseNode {
|
|
16
|
+
type: "heading";
|
|
17
|
+
text: string;
|
|
18
|
+
level?: 1 | 2 | 3 | 4;
|
|
19
|
+
kicker?: string;
|
|
20
|
+
meta?: string;
|
|
21
|
+
}
|
|
22
|
+
interface OpenUITextNode extends OpenUIBaseNode {
|
|
23
|
+
type: "text";
|
|
24
|
+
text: string;
|
|
25
|
+
tone?: "default" | "muted" | "success" | "warning" | "error";
|
|
26
|
+
mono?: boolean;
|
|
27
|
+
}
|
|
28
|
+
interface OpenUIBadgeNode extends OpenUIBaseNode {
|
|
29
|
+
type: "badge";
|
|
30
|
+
label: string;
|
|
31
|
+
tone?: "default" | "secondary" | "success" | "warning" | "error" | "info" | "sandbox";
|
|
32
|
+
}
|
|
33
|
+
interface OpenUIStatNode extends OpenUIBaseNode {
|
|
34
|
+
type: "stat";
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
change?: string;
|
|
38
|
+
tone?: "default" | "success" | "warning" | "error" | "info";
|
|
39
|
+
}
|
|
40
|
+
interface OpenUIKeyValueNode extends OpenUIBaseNode {
|
|
41
|
+
type: "key_value";
|
|
42
|
+
items: Array<{
|
|
43
|
+
id?: string;
|
|
44
|
+
label: string;
|
|
45
|
+
value: ReactNode | OpenUIPrimitive;
|
|
46
|
+
tone?: "default" | "muted";
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
interface OpenUICodeNode extends OpenUIBaseNode {
|
|
50
|
+
type: "code";
|
|
51
|
+
code: string;
|
|
52
|
+
language?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
showLineNumbers?: boolean;
|
|
55
|
+
}
|
|
56
|
+
interface OpenUIMarkdownNode extends OpenUIBaseNode {
|
|
57
|
+
type: "markdown";
|
|
58
|
+
content: string;
|
|
59
|
+
}
|
|
60
|
+
interface OpenUITableNode extends OpenUIBaseNode {
|
|
61
|
+
type: "table";
|
|
62
|
+
columns: Array<{
|
|
63
|
+
key: string;
|
|
64
|
+
header: string;
|
|
65
|
+
align?: "left" | "right";
|
|
66
|
+
}>;
|
|
67
|
+
rows: Array<Record<string, ReactNode | OpenUIPrimitive>>;
|
|
68
|
+
caption?: string;
|
|
69
|
+
}
|
|
70
|
+
interface OpenUIActionsNode extends OpenUIBaseNode {
|
|
71
|
+
type: "actions";
|
|
72
|
+
actions: OpenUIAction[];
|
|
73
|
+
}
|
|
74
|
+
interface OpenUISeparatorNode extends OpenUIBaseNode {
|
|
75
|
+
type: "separator";
|
|
76
|
+
label?: string;
|
|
77
|
+
}
|
|
78
|
+
interface OpenUIStackNode extends OpenUIBaseNode {
|
|
79
|
+
type: "stack";
|
|
80
|
+
direction?: "row" | "column";
|
|
81
|
+
gap?: "sm" | "md" | "lg";
|
|
82
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
83
|
+
wrap?: boolean;
|
|
84
|
+
children: OpenUIComponentNode[];
|
|
85
|
+
}
|
|
86
|
+
interface OpenUIGridNode extends OpenUIBaseNode {
|
|
87
|
+
type: "grid";
|
|
88
|
+
columns?: 1 | 2 | 3 | 4;
|
|
89
|
+
gap?: "sm" | "md" | "lg";
|
|
90
|
+
children: OpenUIComponentNode[];
|
|
91
|
+
}
|
|
92
|
+
interface OpenUICardNode extends OpenUIBaseNode {
|
|
93
|
+
type: "card";
|
|
94
|
+
title?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
eyebrow?: string;
|
|
97
|
+
badge?: OpenUIBadgeNode;
|
|
98
|
+
actions?: OpenUIAction[];
|
|
99
|
+
children?: OpenUIComponentNode[];
|
|
100
|
+
}
|
|
101
|
+
type OpenUIComponentNode = OpenUIActionsNode | OpenUIBadgeNode | OpenUICardNode | OpenUICodeNode | OpenUIGridNode | OpenUIHeadingNode | OpenUIKeyValueNode | OpenUIMarkdownNode | OpenUISeparatorNode | OpenUIStackNode | OpenUIStatNode | OpenUITableNode | OpenUITextNode;
|
|
102
|
+
interface OpenUIArtifactRendererProps {
|
|
103
|
+
schema: OpenUIComponentNode | OpenUIComponentNode[];
|
|
104
|
+
onAction?: (action: OpenUIAction) => void;
|
|
105
|
+
className?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* OpenUIArtifactRenderer — contained renderer for OpenUI-like structured
|
|
109
|
+
* artifact payloads using sandbox-ui primitives and theme tokens. This is an
|
|
110
|
+
* extension surface for generated inspectors/results, not a replacement for
|
|
111
|
+
* the sandbox shell.
|
|
112
|
+
*/
|
|
113
|
+
declare function OpenUIArtifactRenderer({ schema, onAction, className, }: OpenUIArtifactRendererProps): react_jsx_runtime.JSX.Element;
|
|
114
|
+
|
|
115
|
+
export { type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode };
|
package/dist/openui.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./chunk-RQGKSCEZ.js";
|
|
2
|
+
import {
|
|
3
|
+
OpenUIArtifactRenderer
|
|
4
|
+
} from "./chunk-TMFOPHHN.js";
|
|
5
|
+
import "./chunk-GYPQXTJU.js";
|
|
6
|
+
import "./chunk-MKTSMWVD.js";
|
|
7
|
+
import "./chunk-CD53GZOM.js";
|
|
8
|
+
import "./chunk-66BNMOVT.js";
|
|
9
|
+
import "./chunk-RQHJBTEU.js";
|
|
10
|
+
export {
|
|
11
|
+
OpenUIArtifactRenderer
|
|
12
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
interface TextPart {
|
|
2
|
+
type: 'text';
|
|
3
|
+
text: string;
|
|
4
|
+
/** If true this text was synthesised client-side (e.g. echo of user input). */
|
|
5
|
+
synthetic?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type ToolStatus = 'pending' | 'running' | 'completed' | 'error';
|
|
8
|
+
interface ToolTime {
|
|
9
|
+
start?: number;
|
|
10
|
+
end?: number;
|
|
11
|
+
}
|
|
12
|
+
interface ToolState {
|
|
13
|
+
status: ToolStatus;
|
|
14
|
+
input?: unknown;
|
|
15
|
+
output?: unknown;
|
|
16
|
+
error?: string;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
time?: ToolTime;
|
|
19
|
+
}
|
|
20
|
+
interface ToolPart {
|
|
21
|
+
type: 'tool';
|
|
22
|
+
/** Unique ID for this tool invocation. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Tool name (e.g. "bash", "read", "write", "grep", "glob"). */
|
|
25
|
+
tool: string;
|
|
26
|
+
state: ToolState;
|
|
27
|
+
callID?: string;
|
|
28
|
+
}
|
|
29
|
+
interface ReasoningPart {
|
|
30
|
+
type: 'reasoning';
|
|
31
|
+
text: string;
|
|
32
|
+
time?: ToolTime;
|
|
33
|
+
}
|
|
34
|
+
type SessionPart = TextPart | ToolPart | ReasoningPart;
|
|
35
|
+
|
|
36
|
+
export type { ReasoningPart as R, SessionPart as S, TextPart as T, ToolPart as a, ToolState as b, ToolStatus as c, ToolTime as d };
|