@rodrigocoliveira/agno-react 1.3.1 → 2.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/README.md +32 -46
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1738 -87
- package/dist/index.js.map +31 -3
- package/dist/index.mjs +1759 -87
- package/dist/index.mjs.map +31 -3
- package/dist/ui/components/conversation.d.ts +5 -2
- package/dist/ui/components/conversation.d.ts.map +1 -1
- package/dist/ui/composed/AgnoMessageItem.d.ts +12 -24
- package/dist/ui/composed/AgnoMessageItem.d.ts.map +1 -1
- package/dist/ui/composed/agno-chat/agno-chat.d.ts +23 -3
- package/dist/ui/composed/agno-chat/agno-chat.d.ts.map +1 -1
- package/dist/ui/composed/agno-chat/context.d.ts +4 -3
- package/dist/ui/composed/agno-chat/context.d.ts.map +1 -1
- package/dist/ui/composed/agno-chat/messages.d.ts +33 -16
- package/dist/ui/composed/agno-chat/messages.d.ts.map +1 -1
- package/dist/ui/composed/agno-chat/render-tool.d.ts +11 -0
- package/dist/ui/composed/agno-chat/render-tool.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/tool-building-blocks.d.ts +11 -0
- package/dist/ui/composed/agno-chat/tool-building-blocks.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/content.d.ts +2 -0
- package/dist/ui/composed/agno-message/content.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/context.d.ts +21 -0
- package/dist/ui/composed/agno-message/context.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/footer.d.ts +6 -0
- package/dist/ui/composed/agno-message/footer.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/index.d.ts +13 -0
- package/dist/ui/composed/agno-message/index.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/media.d.ts +2 -0
- package/dist/ui/composed/agno-message/media.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/message.d.ts +41 -0
- package/dist/ui/composed/agno-message/message.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/reasoning.d.ts +2 -0
- package/dist/ui/composed/agno-message/reasoning.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/references.d.ts +2 -0
- package/dist/ui/composed/agno-message/references.d.ts.map +1 -0
- package/dist/ui/composed/agno-message/tools.d.ts +7 -0
- package/dist/ui/composed/agno-message/tools.d.ts.map +1 -0
- package/dist/ui/composed/index.d.ts +6 -0
- package/dist/ui/composed/index.d.ts.map +1 -1
- package/dist/ui/index.d.ts +7 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/primitives/badge.d.ts +1 -1
- package/dist/ui/primitives/button.d.ts +1 -1
- package/dist/ui/primitives/command.d.ts +1 -1
- package/dist/ui/types.d.ts +26 -0
- package/dist/ui/types.d.ts.map +1 -1
- package/dist/ui.js +1176 -647
- package/dist/ui.js.map +23 -8
- package/dist/ui.mjs +1170 -650
- package/dist/ui.mjs.map +23 -8
- package/package.json +3 -3
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Button } from '../primitives/button';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import { StickToBottom } from 'use-stick-to-bottom';
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
import type { ScrollBehaviorConfig } from '../types';
|
|
5
|
+
export type ConversationProps = ComponentProps<typeof StickToBottom> & {
|
|
6
|
+
scrollBehavior?: ScrollBehaviorConfig;
|
|
7
|
+
};
|
|
8
|
+
export declare const Conversation: ({ className, scrollBehavior, ...props }: ConversationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
export type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
|
|
7
10
|
export declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export type ConversationEmptyStateProps = ComponentProps<'div'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/ui/components/conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,aAAa,EAA2B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/ui/components/conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,aAAa,EAA2B,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,GAAG;IACrE,cAAc,CAAC,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,yCAAyC,iBAAiB,4CAgBtF,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;AAEpF,eAAO,MAAM,mBAAmB,GAAI,yBAAyB,wBAAwB,4CAEpF,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,6DAOpC,2BAA2B,4CAe7B,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,wBAAwB,GAAI,yBAAyB,6BAA6B,oDAqB9F,CAAC"}
|
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
2
2
|
import type { AgnoMessageClassNames, AgnoMessageAvatars, AgnoMessageActions } from '../types';
|
|
3
|
-
import type {
|
|
4
|
-
import type { ToolResultRenderer } from './agno-chat/context';
|
|
3
|
+
import type { RenderTool } from './agno-chat/render-tool';
|
|
5
4
|
export interface AgnoMessageItemProps {
|
|
6
5
|
message: ChatMessage;
|
|
7
6
|
className?: string;
|
|
8
7
|
classNames?: AgnoMessageClassNames;
|
|
9
|
-
/** Custom render for the entire message content area */
|
|
10
|
-
renderContent?: (message: ChatMessage) => ReactNode;
|
|
11
|
-
/** Custom render for individual tool calls */
|
|
12
|
-
renderToolCall?: (tool: NonNullable<ChatMessage['tool_calls']>[0], index: number) => ReactNode;
|
|
13
|
-
/** Custom render for media sections */
|
|
14
|
-
renderMedia?: (message: ChatMessage) => ReactNode;
|
|
15
|
-
/** Grouped avatar configuration */
|
|
16
8
|
avatars?: AgnoMessageAvatars;
|
|
17
|
-
/** Grouped action buttons configuration with visibility control */
|
|
18
9
|
actions?: AgnoMessageActions;
|
|
19
|
-
/** Whether this is the last assistant message in the conversation (used for visibility logic) */
|
|
20
10
|
isLastAssistantMessage?: boolean;
|
|
21
|
-
/** Show reasoning steps (default: true) */
|
|
11
|
+
/** Show reasoning steps (default: true). Omit `<AgnoMessage.Reasoning />` in custom compositions for finer control. */
|
|
22
12
|
showReasoning?: boolean;
|
|
23
|
-
/** Show references (default: true) */
|
|
13
|
+
/** Show references (default: true). Omit `<AgnoMessage.References />` in custom compositions for finer control. */
|
|
24
14
|
showReferences?: boolean;
|
|
25
|
-
/** Show timestamp (default: true) */
|
|
26
15
|
showTimestamp?: boolean;
|
|
27
|
-
/** Show generative UI renders (default: true) */
|
|
28
|
-
showGenerativeUI?: boolean;
|
|
29
|
-
/** Show tool call details (default: true) */
|
|
30
|
-
showToolCalls?: boolean;
|
|
31
|
-
/** Enable file preview cards with click-to-open modal (default: true) */
|
|
32
16
|
showFilePreview?: boolean;
|
|
33
|
-
/** Enable image lightbox on click (default: true) */
|
|
34
17
|
showImageLightbox?: boolean;
|
|
35
|
-
/** Custom timestamp formatter */
|
|
36
18
|
formatTimestamp?: (date: Date) => string;
|
|
37
|
-
|
|
38
|
-
toolResultRenderers?: Record<string, ToolResultRenderer>;
|
|
19
|
+
renderTool?: RenderTool;
|
|
39
20
|
}
|
|
40
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Default message renderer used by `<AgnoChat.Messages>`. Renders the standard
|
|
23
|
+
* slot order: Reasoning → Media → Tools → Content → References → Footer.
|
|
24
|
+
*
|
|
25
|
+
* For custom orderings or omissions, use `<AgnoMessage>` directly with the
|
|
26
|
+
* sub-components: `<AgnoMessage.Content />`, `<AgnoMessage.Tools />`, etc.
|
|
27
|
+
*/
|
|
28
|
+
export declare function AgnoMessageItem({ message, className, classNames, avatars, actions, isLastAssistantMessage, showReasoning, showReferences, showTimestamp, showFilePreview, showImageLightbox, formatTimestamp, renderTool, }: AgnoMessageItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
29
|
//# sourceMappingURL=AgnoMessageItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgnoMessageItem.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/AgnoMessageItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgnoMessageItem.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/AgnoMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uHAAuH;IACvH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mHAAmH;IACnH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,sBAA8B,EAC9B,aAAoB,EACpB,cAAqB,EACrB,aAAoB,EACpB,eAAsB,EACtB,iBAAwB,EACxB,eAAe,EACf,UAAU,GACX,EAAE,oBAAoB,2CAuBtB"}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import type { ToolHandler } from '@rodrigocoliveira/agno-react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RenderTool } from './render-tool';
|
|
4
4
|
export interface AgnoChatRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
toolHandlers?: Record<string, ToolHandler>;
|
|
7
7
|
autoExecuteTools?: boolean;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Single per-tool render function. Receives the tool plus `{ index, isDebug, defaultRender }`.
|
|
10
|
+
* Return `null` to hide, return `defaultRender()` to fall back to the library default,
|
|
11
|
+
* or return your own JSX. Use the `byToolName` helper for the common dispatch-by-name case.
|
|
12
|
+
*/
|
|
13
|
+
renderTool?: RenderTool;
|
|
14
|
+
/**
|
|
15
|
+
* When true, the default tool rendering includes the debug card. When false, only
|
|
16
|
+
* user-facing content renders (generative UI from `tool.ui_component`, plus whatever
|
|
17
|
+
* a custom `renderTool` returns).
|
|
18
|
+
*
|
|
19
|
+
* Default: auto-detected via `process.env.NODE_ENV !== 'production'`. Set explicitly
|
|
20
|
+
* to investigate bugs in production (`debug={true}`) or preview the prod experience
|
|
21
|
+
* in dev (`debug={false}`).
|
|
22
|
+
*/
|
|
23
|
+
debug?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Tool names whose handlers should NOT be re-invoked on session reload. Useful when
|
|
26
|
+
* a tool produced a `result` you want to render as-is without re-executing side effects.
|
|
27
|
+
*/
|
|
28
|
+
skipHydration?: string[];
|
|
9
29
|
}
|
|
10
|
-
export declare function AgnoChatRoot({ children, toolHandlers, autoExecuteTools,
|
|
30
|
+
export declare function AgnoChatRoot({ children, toolHandlers, autoExecuteTools, renderTool, debug, skipHydration, className, ...divProps }: AgnoChatRootProps): import("react/jsx-runtime").JSX.Element;
|
|
11
31
|
//# sourceMappingURL=agno-chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agno-chat.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/agno-chat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"agno-chat.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/agno-chat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAYhD,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,YAAiB,EACjB,gBAAuB,EACvB,UAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,GAAG,QAAQ,EACZ,EAAE,iBAAiB,2CAmGnB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RefObject
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
import type { ChatMessage, ClientState, ToolCall } from '@rodrigocoliveira/agno-types';
|
|
3
|
-
|
|
3
|
+
import type { RenderTool } from './render-tool';
|
|
4
4
|
export interface AgnoChatContextValue {
|
|
5
5
|
messages: ChatMessage[];
|
|
6
6
|
sendMessage: (message: string | FormData, options?: {
|
|
@@ -28,7 +28,8 @@ export interface AgnoChatContextValue {
|
|
|
28
28
|
handleSend: (message: string | FormData) => Promise<void>;
|
|
29
29
|
inputDisabled: boolean;
|
|
30
30
|
dropZoneContainerRef?: RefObject<HTMLElement | null>;
|
|
31
|
-
|
|
31
|
+
renderTool?: RenderTool;
|
|
32
|
+
isDebug: boolean;
|
|
32
33
|
}
|
|
33
34
|
export declare const AgnoChatContext: import("react").Context<AgnoChatContextValue | null>;
|
|
34
35
|
export declare function useAgnoChatContext(): AgnoChatContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IAEnC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,EAAE,CACX,OAAO,EAAE,MAAM,GAAG,QAAQ,EAC1B,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAC5E,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IAGnB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,mBAAmB,EAAE,CACnB,KAAK,EAAE,QAAQ,EAAE,EACjB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAC5E,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,aAAa,EAAE,OAAO,CAAC;IAGvB,oBAAoB,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAGrD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAEhF,wBAAgB,kBAAkB,IAAI,oBAAoB,CASzD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ChatMessage
|
|
1
|
+
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
import type { AgnoMessageClassNames, AgnoMessageAvatars, AgnoMessageActions, SuggestedPrompt } from '../../types';
|
|
3
|
+
import type { RenderTool } from './render-tool';
|
|
4
|
+
import type { AgnoMessageClassNames, AgnoMessageAvatars, AgnoMessageActions, SuggestedPrompt, ScrollBehaviorConfig } from '../../types';
|
|
5
5
|
export interface AgnoChatMessagesProps {
|
|
6
6
|
className?: string;
|
|
7
7
|
renderMessage?: (message: ChatMessage, index: number) => ReactNode;
|
|
@@ -15,26 +15,20 @@ export interface AgnoChatMessagesProps {
|
|
|
15
15
|
showReferences?: boolean;
|
|
16
16
|
/** Show timestamp (default: true) */
|
|
17
17
|
showTimestamp?: boolean;
|
|
18
|
-
/** Show generative UI renders (default: true) */
|
|
19
|
-
showGenerativeUI?: boolean;
|
|
20
|
-
/** Show tool call details (default: true) */
|
|
21
|
-
showToolCalls?: boolean;
|
|
22
18
|
/** Enable file preview cards with click-to-open modal (default: true) */
|
|
23
19
|
showFilePreview?: boolean;
|
|
24
20
|
/** Enable image lightbox on click (default: true) */
|
|
25
21
|
showImageLightbox?: boolean;
|
|
26
|
-
/** Custom render for individual tool calls */
|
|
27
|
-
renderToolCall?: (tool: ToolCall, index: number) => ReactNode;
|
|
28
|
-
/** Custom render for the entire message content area */
|
|
29
|
-
renderContent?: (message: ChatMessage) => ReactNode;
|
|
30
|
-
/** Custom render for media sections */
|
|
31
|
-
renderMedia?: (message: ChatMessage) => ReactNode;
|
|
32
22
|
/** Custom timestamp formatter */
|
|
33
23
|
formatTimestamp?: (date: Date) => string;
|
|
34
24
|
/** ClassNames override map for message item sections */
|
|
35
25
|
messageClassNames?: AgnoMessageClassNames;
|
|
36
|
-
/**
|
|
37
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Per-tool render function. Overrides the `renderTool` configured on `<AgnoChat>`
|
|
28
|
+
* for this messages list. Use the `byToolName` helper for the common
|
|
29
|
+
* dispatch-by-name case.
|
|
30
|
+
*/
|
|
31
|
+
renderTool?: RenderTool;
|
|
38
32
|
emptyState?: ReactNode;
|
|
39
33
|
suggestedPrompts?: SuggestedPrompt[];
|
|
40
34
|
/** Custom empty state via children — takes priority over emptyState prop */
|
|
@@ -43,6 +37,29 @@ export interface AgnoChatMessagesProps {
|
|
|
43
37
|
showThinkingIndicator?: boolean;
|
|
44
38
|
/** Custom component to render instead of the default thinking indicator */
|
|
45
39
|
renderThinkingIndicator?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Customize the auto-scroll behavior (powered by `use-stick-to-bottom`).
|
|
42
|
+
* Defaults to `{ initial: 'smooth', resize: 'instant' }` — smooth initial
|
|
43
|
+
* scroll, instant snap during streaming to avoid spring oscillation on
|
|
44
|
+
* markdown/code/table reflow.
|
|
45
|
+
*/
|
|
46
|
+
scrollBehavior?: ScrollBehaviorConfig;
|
|
47
|
+
/**
|
|
48
|
+
* Controls the floating "scroll to bottom" button that appears when the
|
|
49
|
+
* user scrolls up during streaming (the default affordance to resume
|
|
50
|
+
* following the stream).
|
|
51
|
+
*
|
|
52
|
+
* - `undefined` (default) → render the built-in button
|
|
53
|
+
* - `false` → hide the button entirely
|
|
54
|
+
* - `true` → render the built-in button (same as default; useful for clarity)
|
|
55
|
+
* - `{ className }` → render the built-in button with custom classes
|
|
56
|
+
* - `ReactNode` → render your own element instead. Your component will be
|
|
57
|
+
* placed inside `<Conversation>`, so it can use `useStickToBottomContext()`
|
|
58
|
+
* to read `isAtBottom` and call `scrollToBottom()`.
|
|
59
|
+
*/
|
|
60
|
+
scrollToBottomButton?: boolean | ReactNode | {
|
|
61
|
+
className?: string;
|
|
62
|
+
};
|
|
46
63
|
}
|
|
47
|
-
export declare function AgnoChatMessages({ className, renderMessage, avatars, actions, showReasoning, showReferences, showTimestamp,
|
|
64
|
+
export declare function AgnoChatMessages({ className, renderMessage, avatars, actions, showReasoning, showReferences, showTimestamp, showFilePreview, showImageLightbox, formatTimestamp, messageClassNames, emptyState, suggestedPrompts, children, showThinkingIndicator, renderThinkingIndicator, renderTool: propRenderTool, scrollBehavior, scrollToBottomButton, }: AgnoChatMessagesProps): import("react/jsx-runtime").JSX.Element;
|
|
48
65
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/messages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/messages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAA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IAGtC;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE;AAsBD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EAEP,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EAEjB,UAAU,EACV,gBAAkC,EAClC,QAAQ,EAER,qBAA4B,EAC5B,uBAAuB,EACvB,UAAU,EAAE,cAAc,EAC1B,cAAc,EACd,oBAAoB,GACrB,EAAE,qBAAqB,2CAmGvB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ToolCall } from '@rodrigocoliveira/agno-types';
|
|
3
|
+
export type ToolRenderArgs = {
|
|
4
|
+
index: number;
|
|
5
|
+
isDebug: boolean;
|
|
6
|
+
defaultRender: () => ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type RenderTool = (tool: ToolCall, args: ToolRenderArgs) => ReactNode | null;
|
|
9
|
+
export type ToolEntry = false | RenderTool;
|
|
10
|
+
export declare function byToolName(map: Record<string, ToolEntry>, fallback?: RenderTool): RenderTool;
|
|
11
|
+
//# sourceMappingURL=render-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-tool.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/render-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,KAAK,SAAS,GAAG,IAAI,CAAC;AAEpF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,CAAC;AAE3C,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAC9B,QAAQ,CAAC,EAAE,UAAU,GACpB,UAAU,CAWZ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolCall } from '@rodrigocoliveira/agno-types';
|
|
2
|
+
export interface ToolDebugCardProps {
|
|
3
|
+
tool: ToolCall;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function ToolDebugCard({ tool, defaultOpen }: ToolDebugCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export interface ToolGenerativeUIProps {
|
|
8
|
+
tool: ToolCall;
|
|
9
|
+
}
|
|
10
|
+
export declare function ToolGenerativeUI({ tool }: ToolGenerativeUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=tool-building-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-building-blocks.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/tool-building-blocks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAM7D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAKD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,kBAAkB,2CAgBtE;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,qBAAqB,kDAU/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/content.tsx"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,mDAQjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
2
|
+
import type { FilePreviewFile } from '../../components/file-preview-card';
|
|
3
|
+
import type { LightboxImage } from '../../components/image-lightbox';
|
|
4
|
+
import type { AgnoMessageClassNames, AgnoMessageActions, AgnoMessageAvatars } from '../../types';
|
|
5
|
+
import type { RenderTool } from '../agno-chat/render-tool';
|
|
6
|
+
export interface AgnoMessageContextValue {
|
|
7
|
+
message: ChatMessage;
|
|
8
|
+
isLastAssistantMessage: boolean;
|
|
9
|
+
classNames?: AgnoMessageClassNames;
|
|
10
|
+
actions?: AgnoMessageActions;
|
|
11
|
+
avatars?: AgnoMessageAvatars;
|
|
12
|
+
formatTimestamp?: (date: Date) => string;
|
|
13
|
+
showFilePreview: boolean;
|
|
14
|
+
showImageLightbox: boolean;
|
|
15
|
+
openImageLightbox: (images: LightboxImage[], index: number) => void;
|
|
16
|
+
openFilePreview: (file: FilePreviewFile) => void;
|
|
17
|
+
renderTool?: RenderTool;
|
|
18
|
+
}
|
|
19
|
+
export declare const AgnoMessageContext: import("react").Context<AgnoMessageContextValue | null>;
|
|
20
|
+
export declare function useAgnoMessageContext(): AgnoMessageContextValue;
|
|
21
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,WAAW,CAAC;IACrB,sBAAsB,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACzC,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,eAAe,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,yDAAsD,CAAC;AAEtF,wBAAgB,qBAAqB,IAAI,uBAAuB,CAS/D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface AgnoMessageFooterProps {
|
|
2
|
+
/** Show timestamp (default: true) */
|
|
3
|
+
showTimestamp?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function AgnoMessageFooter({ showTimestamp }?: AgnoMessageFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/footer.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,sBAAsB;IACrC,qCAAqC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,aAAoB,EAAE,GAAE,sBAA2B,kDA8CtF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { AgnoMessage } from './message';
|
|
2
|
+
export type { AgnoMessageProps } from './message';
|
|
3
|
+
export { AgnoMessageReasoning } from './reasoning';
|
|
4
|
+
export { AgnoMessageMedia } from './media';
|
|
5
|
+
export { AgnoMessageTools } from './tools';
|
|
6
|
+
export type { AgnoMessageToolsProps } from './tools';
|
|
7
|
+
export { AgnoMessageContent } from './content';
|
|
8
|
+
export { AgnoMessageReferences } from './references';
|
|
9
|
+
export { AgnoMessageFooter } from './footer';
|
|
10
|
+
export type { AgnoMessageFooterProps } from './footer';
|
|
11
|
+
export { AgnoMessageContext, useAgnoMessageContext } from './context';
|
|
12
|
+
export type { AgnoMessageContextValue } from './context';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/media.tsx"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,mDAsL/B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
3
|
+
import type { AgnoMessageClassNames, AgnoMessageActions, AgnoMessageAvatars } from '../../types';
|
|
4
|
+
import type { RenderTool } from '../agno-chat/render-tool';
|
|
5
|
+
import { AgnoMessageReasoning } from './reasoning';
|
|
6
|
+
import { AgnoMessageMedia } from './media';
|
|
7
|
+
import { AgnoMessageTools } from './tools';
|
|
8
|
+
import { AgnoMessageContent } from './content';
|
|
9
|
+
import { AgnoMessageReferences } from './references';
|
|
10
|
+
import { AgnoMessageFooter } from './footer';
|
|
11
|
+
export interface AgnoMessageProps {
|
|
12
|
+
message: ChatMessage;
|
|
13
|
+
className?: string;
|
|
14
|
+
classNames?: AgnoMessageClassNames;
|
|
15
|
+
avatars?: AgnoMessageAvatars;
|
|
16
|
+
actions?: AgnoMessageActions;
|
|
17
|
+
isLastAssistantMessage?: boolean;
|
|
18
|
+
showFilePreview?: boolean;
|
|
19
|
+
showImageLightbox?: boolean;
|
|
20
|
+
showTimestamp?: boolean;
|
|
21
|
+
formatTimestamp?: (date: Date) => string;
|
|
22
|
+
renderTool?: RenderTool;
|
|
23
|
+
/**
|
|
24
|
+
* Custom slot composition for assistant messages. If provided, replaces the
|
|
25
|
+
* default ordering. Use `<AgnoMessage.Reasoning />`, `<AgnoMessage.Media />`,
|
|
26
|
+
* `<AgnoMessage.Tools />`, `<AgnoMessage.Content />`, `<AgnoMessage.References />`,
|
|
27
|
+
* `<AgnoMessage.Footer />` in any order. User messages ignore this — their layout
|
|
28
|
+
* is fixed.
|
|
29
|
+
*/
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function AgnoMessage({ message, className, classNames, avatars, actions, isLastAssistantMessage, showFilePreview, showImageLightbox, showTimestamp, formatTimestamp, renderTool, children, }: AgnoMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare namespace AgnoMessage {
|
|
34
|
+
var Reasoning: typeof AgnoMessageReasoning;
|
|
35
|
+
var Media: typeof AgnoMessageMedia;
|
|
36
|
+
var Tools: typeof AgnoMessageTools;
|
|
37
|
+
var Content: typeof AgnoMessageContent;
|
|
38
|
+
var References: typeof AgnoMessageReferences;
|
|
39
|
+
var Footer: typeof AgnoMessageFooter;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/message.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAUhE,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAoBD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,sBAA8B,EAC9B,eAAsB,EACtB,iBAAwB,EACxB,aAAoB,EACpB,eAAe,EACf,UAAU,EACV,QAAQ,GACT,EAAE,gBAAgB,2CAwFlB;yBArGe,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/reasoning.tsx"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,mDA6CnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/references.tsx"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,mDA8BpC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RenderTool } from '../agno-chat/render-tool';
|
|
2
|
+
export interface AgnoMessageToolsProps {
|
|
3
|
+
/** Override the `renderTool` from context for this slot only */
|
|
4
|
+
renderTool?: RenderTool;
|
|
5
|
+
}
|
|
6
|
+
export declare function AgnoMessageTools({ renderTool: renderToolProp }?: AgnoMessageToolsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-message/tools.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG3D,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,GAAE,qBAA0B,kDAwB1F"}
|
|
@@ -4,4 +4,10 @@ export { AgnoChatInput } from './AgnoChatInput';
|
|
|
4
4
|
export type { AgnoChatInputProps } from './AgnoChatInput';
|
|
5
5
|
export { AgnoChat, useAgnoChatContext, AgnoChatRoot, AgnoChatMessages, AgnoChatEmptyState, AgnoChatSuggestedPrompts, AgnoChatErrorBar, AgnoChatInputArea, } from './agno-chat';
|
|
6
6
|
export type { AgnoChatContextValue, AgnoChatRootProps, AgnoChatMessagesProps, AgnoChatEmptyStateProps, AgnoChatSuggestedPromptsProps, AgnoChatErrorBarProps, AgnoChatInputAreaProps, AgnoChatInputRenderProps, } from './agno-chat';
|
|
7
|
+
export { AgnoMessage, AgnoMessageReasoning, AgnoMessageMedia, AgnoMessageTools, AgnoMessageContent, AgnoMessageReferences, AgnoMessageFooter, AgnoMessageContext, useAgnoMessageContext, } from './agno-message';
|
|
8
|
+
export type { AgnoMessageProps, AgnoMessageToolsProps, AgnoMessageFooterProps, AgnoMessageContextValue, } from './agno-message';
|
|
9
|
+
export { byToolName } from './agno-chat/render-tool';
|
|
10
|
+
export type { RenderTool, ToolRenderArgs, ToolEntry, } from './agno-chat/render-tool';
|
|
11
|
+
export { ToolDebugCard, ToolGenerativeUI } from './agno-chat/tool-building-blocks';
|
|
12
|
+
export type { ToolDebugCardProps, ToolGenerativeUIProps, } from './agno-chat/tool-building-blocks';
|
|
7
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EACV,UAAU,EACV,cAAc,EACd,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACnF,YAAY,EACV,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,kCAAkC,CAAC"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { cn } from './lib/cn';
|
|
|
6
6
|
export { formatSmartTimestamp, formatFullTimestamp } from './lib/format-timestamp';
|
|
7
7
|
export { getFilePreviewType, formatFileSize, getFileExtension, isPreviewable } from './lib/file-utils';
|
|
8
8
|
export type { FilePreviewType } from './lib/file-utils';
|
|
9
|
-
export type { ToolState, FileAttachment, ChatStatus, SuggestedPrompt, FileUploadConfig, AudioConfig, AgnoMessageClassNames, AgnoMessageAvatars, AgnoMessageActions, AgnoActionsVisibility, } from './types';
|
|
9
|
+
export type { ToolState, FileAttachment, ChatStatus, SuggestedPrompt, FileUploadConfig, AudioConfig, AgnoMessageClassNames, AgnoMessageAvatars, AgnoMessageActions, AgnoActionsVisibility, ScrollBehaviorConfig, } from './types';
|
|
10
10
|
export { Button, buttonVariants } from './primitives/button';
|
|
11
11
|
export type { ButtonProps } from './primitives/button';
|
|
12
12
|
export { Badge, badgeVariants } from './primitives/badge';
|
|
@@ -52,6 +52,12 @@ export { AgnoMessageItem } from './composed/AgnoMessageItem';
|
|
|
52
52
|
export type { AgnoMessageItemProps } from './composed/AgnoMessageItem';
|
|
53
53
|
export { AgnoChatInput } from './composed/AgnoChatInput';
|
|
54
54
|
export type { AgnoChatInputProps } from './composed/AgnoChatInput';
|
|
55
|
+
export { AgnoMessage, AgnoMessageReasoning, AgnoMessageMedia, AgnoMessageTools, AgnoMessageContent, AgnoMessageReferences, AgnoMessageFooter, AgnoMessageContext, useAgnoMessageContext, } from './composed/agno-message';
|
|
56
|
+
export type { AgnoMessageProps, AgnoMessageToolsProps, AgnoMessageFooterProps, AgnoMessageContextValue, } from './composed/agno-message';
|
|
57
|
+
export { byToolName } from './composed/agno-chat/render-tool';
|
|
58
|
+
export type { RenderTool, ToolRenderArgs, ToolEntry, } from './composed/agno-chat/render-tool';
|
|
59
|
+
export { ToolDebugCard, ToolGenerativeUI } from './composed/agno-chat/tool-building-blocks';
|
|
60
|
+
export type { ToolDebugCardProps, ToolGenerativeUIProps, } from './composed/agno-chat/tool-building-blocks';
|
|
55
61
|
export { AgnoChat, useAgnoChatContext, AgnoChatRoot, AgnoChatMessages, AgnoChatEmptyState, AgnoChatSuggestedPrompts, AgnoChatErrorBar, AgnoChatInputArea, } from './composed/agno-chat';
|
|
56
62
|
export type { AgnoChatContextValue, AgnoChatRootProps, AgnoChatMessagesProps, AgnoChatEmptyStateProps, AgnoChatSuggestedPromptsProps, AgnoChatErrorBarProps, AgnoChatInputAreaProps, AgnoChatInputRenderProps, } from './composed/agno-chat';
|
|
57
63
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,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,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "lg" | "sm" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -64,7 +64,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "
|
|
67
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "onSelect" | "disabled"> & {
|
|
68
68
|
disabled?: boolean;
|
|
69
69
|
onSelect?: (value: string) => void;
|
|
70
70
|
value?: string;
|
package/dist/ui/types.d.ts
CHANGED
|
@@ -74,6 +74,32 @@ export type AgnoMessageActions = {
|
|
|
74
74
|
/** When to show the action buttons (default: 'visible') */
|
|
75
75
|
visibility?: AgnoActionsVisibility;
|
|
76
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Configuration for the chat scroll behavior (powered by `use-stick-to-bottom`).
|
|
79
|
+
*
|
|
80
|
+
* Defaults: `{ initial: 'smooth', resize: 'instant' }`.
|
|
81
|
+
*
|
|
82
|
+
* - `initial` controls the first scroll-to-bottom on mount (e.g., when a session
|
|
83
|
+
* is loaded). Smooth gives a nice arrival animation.
|
|
84
|
+
* - `resize` controls scrolling while content grows (e.g., during streaming).
|
|
85
|
+
* `'instant'` snaps to the bottom on each chunk and avoids the spring-chase
|
|
86
|
+
* oscillation that markdown/table/code reflows can produce.
|
|
87
|
+
*
|
|
88
|
+
* Spring physics knobs (`damping`, `stiffness`, `mass`) only apply when the
|
|
89
|
+
* matching mode is `'smooth'` or a numeric duration.
|
|
90
|
+
*/
|
|
91
|
+
export type ScrollBehaviorConfig = {
|
|
92
|
+
/** How to scroll on first mount. Default: `'smooth'`. */
|
|
93
|
+
initial?: 'smooth' | 'instant' | 'auto';
|
|
94
|
+
/** How to scroll when content resizes (streaming). Default: `'instant'`. */
|
|
95
|
+
resize?: 'smooth' | 'instant' | 'auto';
|
|
96
|
+
/** Spring damping (default `0.7` in the library). */
|
|
97
|
+
damping?: number;
|
|
98
|
+
/** Spring stiffness (default `0.05` in the library). */
|
|
99
|
+
stiffness?: number;
|
|
100
|
+
/** Spring mass (default `1.25` in the library). */
|
|
101
|
+
mass?: number;
|
|
102
|
+
};
|
|
77
103
|
export type AgnoMessageClassNames = {
|
|
78
104
|
root?: string;
|
|
79
105
|
user?: {
|
package/dist/ui/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,M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