@miiflow/assistant-ui 0.9.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WelcomeScreen-CVxniqqK.d.ts → WelcomeScreen-EGO8Qt2y.d.ts} +22 -15
- package/dist/{avatar-DnLePg72.d.ts → avatar-CD685KQV.d.ts} +2 -2
- package/dist/chunk-HYFMOOLH.js +133 -0
- package/dist/chunk-HYFMOOLH.js.map +1 -0
- package/dist/chunk-ZP4FGAAH.js +2 -0
- package/dist/chunk-ZP4FGAAH.js.map +1 -0
- package/dist/client/index.d.ts +40 -3
- package/dist/client/index.js +6 -6
- package/dist/client/index.js.map +1 -1
- package/dist/composer/index.d.ts +11 -4
- package/dist/composer/index.js +1 -1
- package/dist/context/index.d.ts +3 -4
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{message-D2ElX5k7.d.ts → message-D0oMw3tR.d.ts} +2 -2
- package/dist/primitives/index.d.ts +3 -3
- package/dist/{streaming-B_u_jno6.d.ts → streaming-CmQo_OOA.d.ts} +51 -3
- package/dist/styled/index.d.ts +64 -41
- package/dist/styled/index.js +1 -1
- package/dist/styles-no-preflight.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-DeHbndy0.d.ts → types-Du00UBst.d.ts} +1 -1
- package/package.json +4 -3
- package/dist/chunk-ERJKVQQT.js +0 -132
- package/dist/chunk-ERJKVQQT.js.map +0 -1
- package/dist/chunk-IUCKTDTZ.js +0 -2
- package/dist/chunk-IUCKTDTZ.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { A as Attachment, M as MessageData,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { A as Attachment, M as MessageData, P as ParticipantRole, d as SuggestedAction, S as SourceReference } from './message-D0oMw3tR.js';
|
|
4
|
+
import { h as AvatarProps$1 } from './avatar-CD685KQV.js';
|
|
5
|
+
import { S as StreamingChunk, V as VisualizationChunkData, M as MediaChunkData, A as ArtifactChunkData, C as ClarificationData, T as ToolApprovalData } from './streaming-CmQo_OOA.js';
|
|
6
|
+
import { C as CommandProvider } from './types-Du00UBst.js';
|
|
8
7
|
|
|
9
8
|
interface AttachmentPreviewProps {
|
|
10
9
|
/** The attachment to preview */
|
|
@@ -54,7 +53,7 @@ interface MarkdownContentProps {
|
|
|
54
53
|
* Styled markdown renderer with syntax highlighting, copy-to-clipboard,
|
|
55
54
|
* and heading anchor links.
|
|
56
55
|
*/
|
|
57
|
-
declare function MarkdownContent({ children, className, baselineFontSize, darkCodeTheme, }: MarkdownContentProps):
|
|
56
|
+
declare function MarkdownContent({ children, className, baselineFontSize, darkCodeTheme, }: MarkdownContentProps): react.JSX.Element;
|
|
58
57
|
|
|
59
58
|
interface MessageProps {
|
|
60
59
|
/** The message data */
|
|
@@ -114,6 +113,10 @@ interface MessageProps {
|
|
|
114
113
|
onReportIncorrect?: (reason?: string) => void;
|
|
115
114
|
/** Confirm this assistant response was correct/helpful */
|
|
116
115
|
onConfirmCorrect?: () => void;
|
|
116
|
+
/** Edit-and-resubmit for the viewer's own messages (ChatGPT-style). When
|
|
117
|
+
* provided, a pencil appears in the hover action bar; submitting replaces
|
|
118
|
+
* this message and everything after it with a fresh agent turn. */
|
|
119
|
+
onEditSubmit?: (newText: string) => void;
|
|
117
120
|
}
|
|
118
121
|
/**
|
|
119
122
|
* Styled Message component with grid layout matching the main app.
|
|
@@ -166,17 +169,21 @@ declare const MessageComposer: react.ForwardRefExoticComponent<MessageComposerPr
|
|
|
166
169
|
interface MessageListProps {
|
|
167
170
|
/** Messages to render */
|
|
168
171
|
children: ReactNode;
|
|
169
|
-
/** Whether to auto-scroll to bottom */
|
|
172
|
+
/** Whether to auto-scroll to bottom while streaming (follows only when at the live edge) */
|
|
170
173
|
autoScroll?: boolean;
|
|
171
174
|
/** Whether to show the scroll-to-bottom button */
|
|
172
175
|
showScrollToBottom?: boolean;
|
|
173
|
-
/** Additional CSS classes */
|
|
176
|
+
/** Additional CSS classes applied to the transcript container (e.g. horizontal padding) */
|
|
174
177
|
className?: string;
|
|
175
178
|
}
|
|
176
179
|
/**
|
|
177
|
-
* Styled MessageList
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
+
* Styled MessageList — scroll container for a chat transcript.
|
|
181
|
+
*
|
|
182
|
+
* Scroll behavior is provided by shadcn's `@shadcn/react` message-scroller
|
|
183
|
+
* engine (auto-follow while at the live edge, position preservation, scroll
|
|
184
|
+
* anchoring) rather than the legacy `useAutoScroll` hook. The public API is
|
|
185
|
+
* unchanged: pass message rows as `children`; each direct child is wrapped in a
|
|
186
|
+
* `MessageScroller.Item` for measurement and anchoring.
|
|
180
187
|
*/
|
|
181
188
|
declare const MessageList: react.ForwardRefExoticComponent<MessageListProps & react.RefAttributes<HTMLDivElement>>;
|
|
182
189
|
|
|
@@ -248,7 +255,7 @@ interface MessageActionBarProps {
|
|
|
248
255
|
* Action bar that appears on hover below assistant message bubbles.
|
|
249
256
|
* Currently implements Copy; onRegenerate and onEdit are reserved for future use.
|
|
250
257
|
*/
|
|
251
|
-
declare function MessageActionBar({ textContent, onRegenerate, onEdit, onReportIncorrect, onConfirmCorrect, className, }: MessageActionBarProps):
|
|
258
|
+
declare function MessageActionBar({ textContent, onRegenerate, onEdit, onReportIncorrect, onConfirmCorrect, className, }: MessageActionBarProps): react.JSX.Element;
|
|
252
259
|
|
|
253
260
|
interface ScrollToBottomButtonProps {
|
|
254
261
|
/** Whether the viewport is at the bottom (hides button when true) */
|
|
@@ -263,7 +270,7 @@ interface ScrollToBottomButtonProps {
|
|
|
263
270
|
* allowing them to quickly jump back to the latest messages.
|
|
264
271
|
* Fades in/out based on scroll position.
|
|
265
272
|
*/
|
|
266
|
-
declare function ScrollToBottomButton({ isAtBottom, onScrollToBottom, className, }: ScrollToBottomButtonProps):
|
|
273
|
+
declare function ScrollToBottomButton({ isAtBottom, onScrollToBottom, className, }: ScrollToBottomButtonProps): react.JSX.Element;
|
|
267
274
|
|
|
268
275
|
type ToolStatus = "running" | "complete" | "failed" | "pending";
|
|
269
276
|
interface ToolStatusIndicatorProps {
|
|
@@ -281,7 +288,7 @@ interface ToolStatusIndicatorProps {
|
|
|
281
288
|
* Shows tool name + status icon (spinner/check/X/clock).
|
|
282
289
|
* Running state includes a subtle shimmer animation.
|
|
283
290
|
*/
|
|
284
|
-
declare function ToolStatusIndicator({ toolName, status, description, className, }: ToolStatusIndicatorProps):
|
|
291
|
+
declare function ToolStatusIndicator({ toolName, status, description, className, }: ToolStatusIndicatorProps): react.JSX.Element;
|
|
285
292
|
|
|
286
293
|
interface ChatLayoutProps {
|
|
287
294
|
/** Whether the chat is in empty state (no messages) */
|
|
@@ -344,4 +351,4 @@ interface WelcomeScreenProps {
|
|
|
344
351
|
*/
|
|
345
352
|
declare const WelcomeScreen: react.ForwardRefExoticComponent<WelcomeScreenProps & react.RefAttributes<HTMLDivElement>>;
|
|
346
353
|
|
|
347
|
-
export { AttachmentPreview as A, ChatContainer as C, MarkdownContent as M, ScrollToBottomButton as S,
|
|
354
|
+
export { AttachmentPreview as A, ChatContainer as C, MarkdownContent as M, ScrollToBottomButton as S, ToolStatusIndicator as T, WelcomeScreen as W, Avatar as a, ChatLayout as b, Message as c, MessageActionBar as d, MessageComposer as e, MessageList as f, StreamingText as g, SuggestedActions as h, TypingIndicator as i, type AttachmentPreviewProps as j, type AvatarProps as k, type ChatContainerProps as l, type ChatLayoutProps as m, type MarkdownContentProps as n, type MessageActionBarProps as o, type MessageComposerProps as p, type MessageListProps as q, type MessageProps as r, type ScrollToBottomButtonProps as s, type StreamingTextProps as t, type SuggestedActionsProps as u, type ToolStatus as v, type ToolStatusIndicatorProps as w, type TypingIndicatorProps as x, type WelcomeScreenProps as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, TextareaHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { M as MessageData,
|
|
3
|
+
import { M as MessageData, P as ParticipantRole } from './message-D0oMw3tR.js';
|
|
4
4
|
|
|
5
5
|
interface MessageContextValue {
|
|
6
6
|
message: MessageData;
|
|
@@ -106,4 +106,4 @@ interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
106
106
|
*/
|
|
107
107
|
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLDivElement>>;
|
|
108
108
|
|
|
109
|
-
export { Avatar as A, ComposerContext as C,
|
|
109
|
+
export { Avatar as A, ComposerContext as C, MessageComposer as M, ComposerInput as a, ComposerSubmit as b, MessageContent as c, MessageContext as d, Message as e, MessageTimestamp as f, useMessage as g, type AvatarProps as h, type ComposerInputProps as i, type ComposerSubmitProps as j, type MessageComposerProps as k, type MessageContentProps as l, type MessageProps as m, type MessageTimestampProps as n, useComposer as u };
|