@rodrigocoliveira/agno-react 1.0.2 → 1.0.3
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 +2 -2
- package/dist/components/GenerativeUIRenderer.d.ts +21 -0
- package/dist/components/GenerativeUIRenderer.d.ts.map +1 -0
- package/dist/context/AgnoContext.d.ts +16 -0
- package/dist/context/AgnoContext.d.ts.map +1 -0
- package/dist/context/ToolHandlerContext.d.ts +44 -0
- package/dist/context/ToolHandlerContext.d.ts.map +1 -0
- package/dist/hooks/useAgnoActions.d.ts +25 -0
- package/dist/hooks/useAgnoActions.d.ts.map +1 -0
- package/dist/hooks/useAgnoChat.d.ts +22 -0
- package/dist/hooks/useAgnoChat.d.ts.map +1 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts +38 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts.map +1 -0
- package/dist/hooks/useAgnoEvals.d.ts +39 -0
- package/dist/hooks/useAgnoEvals.d.ts.map +1 -0
- package/dist/hooks/useAgnoKnowledge.d.ts +56 -0
- package/dist/hooks/useAgnoKnowledge.d.ts.map +1 -0
- package/dist/hooks/useAgnoMemory.d.ts +42 -0
- package/dist/hooks/useAgnoMemory.d.ts.map +1 -0
- package/dist/hooks/useAgnoMetrics.d.ts +51 -0
- package/dist/hooks/useAgnoMetrics.d.ts.map +1 -0
- package/dist/hooks/useAgnoSession.d.ts +38 -0
- package/dist/hooks/useAgnoSession.d.ts.map +1 -0
- package/dist/hooks/useAgnoToolExecution.d.ts +70 -0
- package/dist/hooks/useAgnoToolExecution.d.ts.map +1 -0
- package/dist/hooks/useAgnoTraces.d.ts +51 -0
- package/dist/hooks/useAgnoTraces.d.ts.map +1 -0
- package/dist/index.d.ts +27 -723
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +932 -1052
- package/dist/index.js.map +24 -0
- package/dist/index.mjs +816 -909
- package/dist/index.mjs.map +24 -0
- package/dist/ui/components/artifact.d.ts +24 -0
- package/dist/ui/components/artifact.d.ts.map +1 -0
- package/dist/ui/components/audio-recorder.d.ts +32 -0
- package/dist/ui/components/audio-recorder.d.ts.map +1 -0
- package/dist/ui/components/code-block.d.ts +15 -0
- package/dist/ui/components/code-block.d.ts.map +1 -0
- package/dist/ui/components/conversation.d.ts +17 -0
- package/dist/ui/components/conversation.d.ts.map +1 -0
- package/dist/ui/components/file-preview-card.d.ts +13 -0
- package/dist/ui/components/file-preview-card.d.ts.map +1 -0
- package/dist/ui/components/file-preview-modal.d.ts +8 -0
- package/dist/ui/components/file-preview-modal.d.ts.map +1 -0
- package/dist/ui/components/image-lightbox.d.ts +12 -0
- package/dist/ui/components/image-lightbox.d.ts.map +1 -0
- package/dist/ui/components/message.d.ts +19 -0
- package/dist/ui/components/message.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/attachments.d.ts +21 -0
- package/dist/ui/components/prompt-input/attachments.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/buttons.d.ts +19 -0
- package/dist/ui/components/prompt-input/buttons.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/command.d.ts +17 -0
- package/dist/ui/components/prompt-input/command.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/context.d.ts +36 -0
- package/dist/ui/components/prompt-input/context.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts +7 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/footer.d.ts +11 -0
- package/dist/ui/components/prompt-input/footer.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/index.d.ts +25 -0
- package/dist/ui/components/prompt-input/index.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/model-select.d.ts +13 -0
- package/dist/ui/components/prompt-input/model-select.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts +22 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/provider.d.ts +6 -0
- package/dist/ui/components/prompt-input/provider.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/speech.d.ts +51 -0
- package/dist/ui/components/prompt-input/speech.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/tabs.d.ts +12 -0
- package/dist/ui/components/prompt-input/tabs.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/textarea.d.ts +5 -0
- package/dist/ui/components/prompt-input/textarea.d.ts.map +1 -0
- package/dist/ui/components/response.d.ts +5 -0
- package/dist/ui/components/response.d.ts.map +1 -0
- package/dist/ui/components/smart-timestamp.d.ts +8 -0
- package/dist/ui/components/smart-timestamp.d.ts.map +1 -0
- package/dist/ui/components/streaming-indicator.d.ts +8 -0
- package/dist/ui/components/streaming-indicator.d.ts.map +1 -0
- package/dist/ui/components/tool.d.ts +24 -0
- package/dist/ui/components/tool.d.ts.map +1 -0
- package/dist/ui/composed/AgnoChatInput.d.ts +44 -0
- package/dist/ui/composed/AgnoChatInput.d.ts.map +1 -0
- package/dist/ui/composed/AgnoChatInterface.d.ts +49 -0
- package/dist/ui/composed/AgnoChatInterface.d.ts.map +1 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts +38 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts +9 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/context.d.ts +33 -0
- package/dist/ui/composed/agno-chat/context.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts +6 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts +5 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/index.d.ts +33 -0
- package/dist/ui/composed/agno-chat/index.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/input.d.ts +39 -0
- package/dist/ui/composed/agno-chat/input.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/messages.d.ts +21 -0
- package/dist/ui/composed/agno-chat/messages.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts +7 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts +5 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts.map +1 -0
- package/dist/ui/composed/index.d.ts +9 -0
- package/dist/ui/composed/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +59 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/lib/cn.d.ts +3 -0
- package/dist/ui/lib/cn.d.ts.map +1 -0
- package/dist/ui/lib/file-utils.d.ts +20 -0
- package/dist/ui/lib/file-utils.d.ts.map +1 -0
- package/dist/ui/lib/format-timestamp.d.ts +16 -0
- package/dist/ui/lib/format-timestamp.d.ts.map +1 -0
- package/dist/ui/primitives/accordion.d.ts +8 -0
- package/dist/ui/primitives/accordion.d.ts.map +1 -0
- package/dist/ui/primitives/avatar.d.ts +7 -0
- package/dist/ui/primitives/avatar.d.ts.map +1 -0
- package/dist/ui/primitives/badge.d.ts +10 -0
- package/dist/ui/primitives/badge.d.ts.map +1 -0
- package/dist/ui/primitives/button.d.ts +12 -0
- package/dist/ui/primitives/button.d.ts.map +1 -0
- package/dist/ui/primitives/collapsible.d.ts +6 -0
- package/dist/ui/primitives/collapsible.d.ts.map +1 -0
- package/dist/ui/primitives/command.d.ts +79 -0
- package/dist/ui/primitives/command.d.ts.map +1 -0
- package/dist/ui/primitives/dialog.d.ts +26 -0
- package/dist/ui/primitives/dialog.d.ts.map +1 -0
- package/dist/ui/primitives/dropdown-menu.d.ts +28 -0
- package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/primitives/hover-card.d.ts +7 -0
- package/dist/ui/primitives/hover-card.d.ts.map +1 -0
- package/dist/ui/primitives/index.d.ts +16 -0
- package/dist/ui/primitives/index.d.ts.map +1 -0
- package/dist/ui/primitives/input-group.d.ts +17 -0
- package/dist/ui/primitives/input-group.d.ts.map +1 -0
- package/dist/ui/primitives/select.d.ts +14 -0
- package/dist/ui/primitives/select.d.ts.map +1 -0
- package/dist/ui/primitives/tooltip.d.ts +8 -0
- package/dist/ui/primitives/tooltip.d.ts.map +1 -0
- package/dist/ui/types.d.ts +56 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui.d.ts +2 -891
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +2757 -2323
- package/dist/ui.js.map +60 -0
- package/dist/ui.mjs +2644 -2055
- package/dist/ui.mjs.map +60 -0
- package/dist/utils/component-registry.d.ts +63 -0
- package/dist/utils/component-registry.d.ts.map +1 -0
- package/dist/utils/ui-helpers.d.ts +165 -0
- package/dist/utils/ui-helpers.d.ts.map +1 -0
- package/package.json +9 -10
- package/LICENSE +0 -21
- package/dist/index.d.mts +0 -724
- package/dist/ui.d.mts +0 -891
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { FileAttachment } from '../../types';
|
|
3
|
+
export type AttachmentsContext = {
|
|
4
|
+
files: (FileAttachment & {
|
|
5
|
+
id: string;
|
|
6
|
+
})[];
|
|
7
|
+
add: (files: File[] | FileList) => void;
|
|
8
|
+
remove: (id: string) => void;
|
|
9
|
+
clear: () => void;
|
|
10
|
+
openFileDialog: () => void;
|
|
11
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
12
|
+
};
|
|
13
|
+
export type TextInputContext = {
|
|
14
|
+
value: string;
|
|
15
|
+
setInput: (v: string) => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type PromptInputControllerProps = {
|
|
19
|
+
textInput: TextInputContext;
|
|
20
|
+
attachments: AttachmentsContext;
|
|
21
|
+
__registerFileInput: (ref: RefObject<HTMLInputElement | null>, open: () => void) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const PromptInputController: import("react").Context<PromptInputControllerProps | null>;
|
|
24
|
+
export declare const ProviderAttachmentsContext: import("react").Context<AttachmentsContext | null>;
|
|
25
|
+
export declare const LocalAttachmentsContext: import("react").Context<AttachmentsContext | null>;
|
|
26
|
+
export declare const usePromptInputController: () => PromptInputControllerProps;
|
|
27
|
+
export declare const useOptionalPromptInputController: () => PromptInputControllerProps | null;
|
|
28
|
+
export declare const useProviderAttachments: () => AttachmentsContext;
|
|
29
|
+
export declare const useOptionalProviderAttachments: () => AttachmentsContext | null;
|
|
30
|
+
export declare const usePromptInputAttachments: () => AttachmentsContext;
|
|
31
|
+
export type DropZoneContextValue = {
|
|
32
|
+
isDraggingOver: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare const DropZoneContext: import("react").Context<DropZoneContextValue>;
|
|
35
|
+
export declare const usePromptInputDropZone: () => DropZoneContextValue;
|
|
36
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,CAAC,cAAc,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3C,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,mBAAmB,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CAC1F,CAAC;AAEF,eAAO,MAAM,qBAAqB,4DAAyD,CAAC;AAC5F,eAAO,MAAM,0BAA0B,oDAAiD,CAAC;AACzF,eAAO,MAAM,uBAAuB,oDAAiD,CAAC;AAEtF,eAAO,MAAM,wBAAwB,kCAMpC,CAAC;AAEF,eAAO,MAAM,gCAAgC,yCAA0C,CAAC;AAExF,eAAO,MAAM,sBAAsB,0BAMlC,CAAC;AAEF,eAAO,MAAM,8BAA8B,iCAA+C,CAAC;AAE3F,eAAO,MAAM,yBAAyB,0BAQrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,eAAe,+CAAiE,CAAC;AAE9F,eAAO,MAAM,sBAAsB,4BAAoC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes, RefObject } from 'react';
|
|
2
|
+
export type PromptInputDropZoneProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
label?: string;
|
|
4
|
+
container?: RefObject<HTMLElement | null>;
|
|
5
|
+
};
|
|
6
|
+
export declare const PromptInputDropZone: ({ label, className, container, ...props }: PromptInputDropZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=drop-zone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-zone.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/drop-zone.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,2CAKjC,wBAAwB,4CA2B1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputGroupAddon } from '../../primitives/input-group';
|
|
2
|
+
import type { ComponentProps, HTMLAttributes } from 'react';
|
|
3
|
+
export type PromptInputBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
export declare const PromptInputBody: ({ className, ...props }: PromptInputBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type PromptInputHeaderProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
|
|
6
|
+
export declare const PromptInputHeader: ({ className, ...props }: PromptInputHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
|
|
8
|
+
export declare const PromptInputFooter: ({ className, ...props }: PromptInputFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
export declare const PromptInputTools: ({ className, ...props }: PromptInputToolsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/footer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,yBAAyB,oBAAoB,4CAE5E,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAE3F,eAAO,MAAM,iBAAiB,GAAI,yBAAyB,sBAAsB,4CAEhF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAE3F,eAAO,MAAM,iBAAiB,GAAI,yBAAyB,sBAAsB,4CAEhF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEnE,eAAO,MAAM,gBAAgB,GAAI,yBAAyB,qBAAqB,4CAE9E,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { usePromptInputController, usePromptInputAttachments, useProviderAttachments, usePromptInputDropZone, } from './context';
|
|
2
|
+
export type { AttachmentsContext, TextInputContext, PromptInputControllerProps, DropZoneContextValue } from './context';
|
|
3
|
+
export { PromptInputProvider } from './provider';
|
|
4
|
+
export type { PromptInputProviderProps } from './provider';
|
|
5
|
+
export { PromptInput } from './prompt-input';
|
|
6
|
+
export type { PromptInputProps, PromptInputMessage } from './prompt-input';
|
|
7
|
+
export { PromptInputTextarea } from './textarea';
|
|
8
|
+
export type { PromptInputTextareaProps } from './textarea';
|
|
9
|
+
export { PromptInputAttachment, PromptInputAttachments, PromptInputActionAddAttachments } from './attachments';
|
|
10
|
+
export type { PromptInputAttachmentProps, PromptInputAttachmentsProps, PromptInputActionAddAttachmentsProps, } from './attachments';
|
|
11
|
+
export { PromptInputBody, PromptInputHeader, PromptInputFooter, PromptInputTools } from './footer';
|
|
12
|
+
export type { PromptInputBodyProps, PromptInputHeaderProps, PromptInputFooterProps, PromptInputToolsProps, } from './footer';
|
|
13
|
+
export { PromptInputButton, PromptInputSubmit, PromptInputActionMenu, PromptInputActionMenuTrigger, PromptInputActionMenuContent, PromptInputActionMenuItem, } from './buttons';
|
|
14
|
+
export type { PromptInputButtonProps, PromptInputSubmitProps, PromptInputActionMenuProps, PromptInputActionMenuTriggerProps, PromptInputActionMenuContentProps, PromptInputActionMenuItemProps, } from './buttons';
|
|
15
|
+
export { PromptInputDropZone } from './drop-zone';
|
|
16
|
+
export type { PromptInputDropZoneProps } from './drop-zone';
|
|
17
|
+
export { PromptInputSpeechButton } from './speech';
|
|
18
|
+
export type { PromptInputSpeechButtonProps } from './speech';
|
|
19
|
+
export { PromptInputModelSelect, PromptInputModelSelectTrigger, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectValue, } from './model-select';
|
|
20
|
+
export type { PromptInputModelSelectProps, PromptInputModelSelectTriggerProps, PromptInputModelSelectContentProps, PromptInputModelSelectItemProps, PromptInputModelSelectValueProps, } from './model-select';
|
|
21
|
+
export { PromptInputTabsList, PromptInputTab, PromptInputTabLabel, PromptInputTabBody, PromptInputTabItem, } from './tabs';
|
|
22
|
+
export type { PromptInputTabsListProps, PromptInputTabProps, PromptInputTabLabelProps, PromptInputTabBodyProps, PromptInputTabItemProps, } from './tabs';
|
|
23
|
+
export { PromptInputCommand, PromptInputCommandInput, PromptInputCommandList, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandItem, PromptInputCommandSeparator, } from './command';
|
|
24
|
+
export type { PromptInputCommandProps, PromptInputCommandInputProps, PromptInputCommandListProps, PromptInputCommandEmptyProps, PromptInputCommandGroupProps, PromptInputCommandItemProps, PromptInputCommandSeparatorProps, } from './command';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"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,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../primitives/select';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type PromptInputModelSelectProps = ComponentProps<typeof Select>;
|
|
4
|
+
export declare const PromptInputModelSelect: (props: PromptInputModelSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type PromptInputModelSelectTriggerProps = ComponentProps<typeof SelectTrigger>;
|
|
6
|
+
export declare const PromptInputModelSelectTrigger: ({ className, ...props }: PromptInputModelSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type PromptInputModelSelectContentProps = ComponentProps<typeof SelectContent>;
|
|
8
|
+
export declare const PromptInputModelSelectContent: ({ className, ...props }: PromptInputModelSelectContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type PromptInputModelSelectItemProps = ComponentProps<typeof SelectItem>;
|
|
10
|
+
export declare const PromptInputModelSelectItem: ({ className, ...props }: PromptInputModelSelectItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type PromptInputModelSelectValueProps = ComponentProps<typeof SelectValue>;
|
|
12
|
+
export declare const PromptInputModelSelectValue: ({ className, ...props }: PromptInputModelSelectValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=model-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-select.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/model-select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACxG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AACxE,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,4CAA0B,CAAC;AAEpG,MAAM,MAAM,kCAAkC,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AAEtF,eAAO,MAAM,6BAA6B,GAAI,yBAG3C,kCAAkC,4CASpC,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AACtF,eAAO,MAAM,6BAA6B,GAAI,yBAAyB,kCAAkC,4CAExG,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAChF,eAAO,MAAM,0BAA0B,GAAI,yBAAyB,+BAA+B,4CAElG,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAClF,eAAO,MAAM,2BAA2B,GAAI,yBAAyB,gCAAgC,4CAEpG,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FileAttachment } from '../../types';
|
|
2
|
+
import type { FormEvent, HTMLAttributes, RefObject } from 'react';
|
|
3
|
+
export type PromptInputMessage = {
|
|
4
|
+
text?: string;
|
|
5
|
+
files?: FileAttachment[];
|
|
6
|
+
};
|
|
7
|
+
export type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> & {
|
|
8
|
+
accept?: string;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
globalDrop?: boolean;
|
|
11
|
+
syncHiddenInput?: boolean;
|
|
12
|
+
maxFiles?: number;
|
|
13
|
+
maxFileSize?: number;
|
|
14
|
+
dragListenerTarget?: RefObject<HTMLElement | null>;
|
|
15
|
+
onError?: (err: {
|
|
16
|
+
code: 'max_files' | 'max_file_size' | 'accept';
|
|
17
|
+
message: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
onSubmit: (message: PromptInputMessage, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export declare const PromptInput: ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, dragListenerTarget, onError, onSubmit, children, ...props }: PromptInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=prompt-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-input.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/prompt-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAsB,SAAS,EAAoB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYxG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,WAAW,GAAG,eAAe,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7F,QAAQ,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpG,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,gJAazB,gBAAgB,4CA4RlB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
export type PromptInputProviderProps = PropsWithChildren<{
|
|
3
|
+
initialInput?: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function PromptInputProvider({ initialInput: initialTextInput, children }: PromptInputProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAa1D,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH,wBAAgB,mBAAmB,CAAC,EAAE,YAAY,EAAE,gBAAqB,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CA8E9G"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { PromptInputButton } from './buttons';
|
|
3
|
+
interface SpeechRecognition extends EventTarget {
|
|
4
|
+
continuous: boolean;
|
|
5
|
+
interimResults: boolean;
|
|
6
|
+
lang: string;
|
|
7
|
+
start(): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
10
|
+
onend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
11
|
+
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
|
|
12
|
+
onerror: ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any) | null;
|
|
13
|
+
}
|
|
14
|
+
interface SpeechRecognitionEvent extends Event {
|
|
15
|
+
results: SpeechRecognitionResultList;
|
|
16
|
+
}
|
|
17
|
+
type SpeechRecognitionResultList = {
|
|
18
|
+
readonly length: number;
|
|
19
|
+
item(index: number): SpeechRecognitionResult;
|
|
20
|
+
[index: number]: SpeechRecognitionResult;
|
|
21
|
+
};
|
|
22
|
+
type SpeechRecognitionResult = {
|
|
23
|
+
readonly length: number;
|
|
24
|
+
item(index: number): SpeechRecognitionAlternative;
|
|
25
|
+
[index: number]: SpeechRecognitionAlternative;
|
|
26
|
+
isFinal: boolean;
|
|
27
|
+
};
|
|
28
|
+
type SpeechRecognitionAlternative = {
|
|
29
|
+
transcript: string;
|
|
30
|
+
confidence: number;
|
|
31
|
+
};
|
|
32
|
+
interface SpeechRecognitionErrorEvent extends Event {
|
|
33
|
+
error: string;
|
|
34
|
+
}
|
|
35
|
+
declare global {
|
|
36
|
+
interface Window {
|
|
37
|
+
SpeechRecognition: {
|
|
38
|
+
new (): SpeechRecognition;
|
|
39
|
+
};
|
|
40
|
+
webkitSpeechRecognition: {
|
|
41
|
+
new (): SpeechRecognition;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export type PromptInputSpeechButtonProps = ComponentProps<typeof PromptInputButton> & {
|
|
46
|
+
onTranscriptionChange?: (text: string) => void;
|
|
47
|
+
lang?: string;
|
|
48
|
+
};
|
|
49
|
+
export declare const PromptInputSpeechButton: ({ className, onTranscriptionChange, lang, ...props }: PromptInputSpeechButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=speech.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/speech.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IAC9D,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IAC5D,QAAQ,EAAE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F,eAAO,MAAM,uBAAuB,GAAI,sDAKrC,4BAA4B,4CAsE9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type PromptInputTabsListProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const PromptInputTabsList: ({ className, ...props }: PromptInputTabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type PromptInputTabProps = HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
export declare const PromptInputTab: ({ className, ...props }: PromptInputTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type PromptInputTabLabelProps = HTMLAttributes<HTMLHeadingElement>;
|
|
7
|
+
export declare const PromptInputTabLabel: ({ className, ...props }: PromptInputTabLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type PromptInputTabBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
export declare const PromptInputTabBody: ({ className, ...props }: PromptInputTabBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export type PromptInputTabItemProps = HTMLAttributes<HTMLDivElement>;
|
|
11
|
+
export declare const PromptInputTabItem: ({ className, ...props }: PromptInputTabItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AACtE,eAAO,MAAM,mBAAmB,GAAI,yBAAyB,wBAAwB,4CAEpF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AACjE,eAAO,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,4CAE1E,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAC1E,eAAO,MAAM,mBAAmB,GAAI,yBAAyB,wBAAwB,4CAEpF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AACrE,eAAO,MAAM,kBAAkB,GAAI,yBAAyB,uBAAuB,4CAElF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AACrE,eAAO,MAAM,kBAAkB,GAAI,yBAAyB,uBAAuB,4CAElF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InputGroupTextarea } from '../../primitives/input-group';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type PromptInputTextareaProps = ComponentProps<typeof InputGroupTextarea>;
|
|
4
|
+
export declare const PromptInputTextarea: ({ onChange, className, placeholder, ...props }: PromptInputTextareaProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/prompt-input/textarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAe,cAAc,EAA+C,MAAM,OAAO,CAAC;AAItG,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjF,eAAO,MAAM,mBAAmB,GAAI,gDAKjC,wBAAwB,4CA8D1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { Streamdown } from 'streamdown';
|
|
3
|
+
export type ResponseProps = ComponentProps<typeof Streamdown>;
|
|
4
|
+
export declare const Response: import("react").MemoExoticComponent<({ className, ...props }: ResponseProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/ui/components/response.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9D,eAAO,MAAM,QAAQ,gEACO,aAAa,6CAOxC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface SmartTimestampProps {
|
|
2
|
+
date: Date;
|
|
3
|
+
/** Override the short display text (e.g. custom formatTimestamp prop) */
|
|
4
|
+
formatShort?: (date: Date) => string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function SmartTimestamp({ date, formatShort, className }: SmartTimestampProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=smart-timestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-timestamp.d.ts","sourceRoot":"","sources":["../../../src/ui/components/smart-timestamp.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,yEAAyE;IACzE,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAgBnF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type StreamingIndicatorProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
/** Full avatar element — overrides the default avatar container and icon */
|
|
5
|
+
avatar?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function StreamingIndicator({ className, icon, avatar, ...props }: StreamingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=streaming-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-indicator.d.ts","sourceRoot":"","sources":["../../../src/ui/components/streaming-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,2CAehG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent } from '../primitives/collapsible';
|
|
2
|
+
import type { ToolState } from '../types';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
|
+
export type ToolProps = ComponentProps<typeof Collapsible>;
|
|
5
|
+
export declare const Tool: ({ className, ...props }: ToolProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type ToolHeaderProps = {
|
|
7
|
+
title?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
state: ToolState;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const ToolHeader: ({ className, title, type, state, ...props }: ToolHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
14
|
+
export declare const ToolContent: ({ className, ...props }: ToolContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export type ToolInputProps = ComponentProps<'div'> & {
|
|
16
|
+
input: unknown;
|
|
17
|
+
};
|
|
18
|
+
export declare const ToolInput: ({ className, input, ...props }: ToolInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export type ToolOutputProps = ComponentProps<'div'> & {
|
|
20
|
+
output: unknown;
|
|
21
|
+
errorText?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const ToolOutput: ({ className, output, errorText, ...props }: ToolOutputProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/ui/components/tool.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAsB,MAAM,2BAA2B,CAAC;AAEhG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAS1C,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAIvD,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,IAAI,GAAI,yBAAyB,SAAS,4CAEtD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+BF,eAAO,MAAM,UAAU,GAAI,6CAA6C,eAAe,4CAStF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzE,eAAO,MAAM,WAAW,GAAI,yBAAyB,gBAAgB,4CAQpE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,gCAAgC,cAAc,4CAOvE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,4CAA4C,eAAe,mDA6BrF,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PromptInputDropZoneProps } from '../components/prompt-input/drop-zone';
|
|
2
|
+
import type { AudioRecorderLabels } from '../components/audio-recorder';
|
|
3
|
+
import type { ChatStatus, FileUploadConfig } from '../types';
|
|
4
|
+
import type { ReactNode, RefObject } from 'react';
|
|
5
|
+
export interface AgnoChatInputProps {
|
|
6
|
+
onSend: (message: string | FormData) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
/** File upload configuration */
|
|
11
|
+
fileUpload?: FileUploadConfig;
|
|
12
|
+
/** Show audio recorder button (default: false) */
|
|
13
|
+
showAudioRecorder?: boolean;
|
|
14
|
+
/** Show attachments button (default: true) */
|
|
15
|
+
showAttachments?: boolean;
|
|
16
|
+
/** Override chat status for submit button icon */
|
|
17
|
+
status?: ChatStatus;
|
|
18
|
+
/** Whether a run is currently streaming */
|
|
19
|
+
isStreaming?: boolean;
|
|
20
|
+
/** Called when the user clicks stop during streaming */
|
|
21
|
+
onCancel?: () => void;
|
|
22
|
+
/** Show a stop button that cancels the run while streaming (default: false) */
|
|
23
|
+
allowCancelRun?: boolean;
|
|
24
|
+
/** Extra tools to add to the toolbar */
|
|
25
|
+
extraTools?: ReactNode;
|
|
26
|
+
/** Audio mode: 'send' sends blob immediately, 'transcribe' transcribes and adds text to input */
|
|
27
|
+
audioMode?: 'send' | 'transcribe';
|
|
28
|
+
/** Transcription endpoint URL (required when audioMode='transcribe') */
|
|
29
|
+
transcriptionEndpoint?: string;
|
|
30
|
+
/** Extra headers for transcription request */
|
|
31
|
+
transcriptionHeaders?: Record<string, string>;
|
|
32
|
+
/** Custom parser for the transcription response — receives the parsed JSON and returns the text */
|
|
33
|
+
parseTranscriptionResponse?: (data: unknown) => string;
|
|
34
|
+
/** Async callback to request microphone permission before recording (e.g., for WebView bridges) */
|
|
35
|
+
onRequestPermission?: () => Promise<boolean>;
|
|
36
|
+
/** Custom labels for the audio recorder button (useful for i18n) */
|
|
37
|
+
audioRecorderLabels?: AudioRecorderLabels;
|
|
38
|
+
/** Ref to a container element for rendering the drop zone overlay via portal */
|
|
39
|
+
dropZoneContainerRef?: RefObject<HTMLElement | null>;
|
|
40
|
+
/** Props forwarded to PromptInputDropZone (className, label) */
|
|
41
|
+
dropZoneProps?: Partial<Pick<PromptInputDropZoneProps, 'label' | 'className'>>;
|
|
42
|
+
}
|
|
43
|
+
export declare function AgnoChatInput({ onSend, disabled, placeholder, className, fileUpload, showAudioRecorder, showAttachments, status, isStreaming, onCancel, allowCancelRun, extraTools, audioMode, transcriptionEndpoint, transcriptionHeaders, parseTranscriptionResponse, onRequestPermission, audioRecorderLabels, dropZoneContainerRef, dropZoneProps, }: AgnoChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
//# sourceMappingURL=AgnoChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgnoChatInput.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/AgnoChatInput.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,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,GAAG,WAAW,CAAC,CAAC,CAAC;CAChF;AAoFD,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAyB,EACzB,eAAsB,EACtB,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAsB,EACtB,UAAU,EACV,SAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,GACd,EAAE,kBAAkB,2CA0FpB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
3
|
+
import type { ToolHandler } from '@rodrigocoliveira/agno-react';
|
|
4
|
+
import type { AgnoChatInterfaceClassNames, FileUploadConfig, SuggestedPrompt } from '../types';
|
|
5
|
+
import type { AgnoMessageItemProps } from './AgnoMessageItem';
|
|
6
|
+
import type { AgnoChatInputProps } from './AgnoChatInput';
|
|
7
|
+
export interface AgnoChatInterfaceProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
classNames?: AgnoChatInterfaceClassNames;
|
|
10
|
+
/** Custom render for individual messages */
|
|
11
|
+
renderMessage?: (message: ChatMessage, index: number) => ReactNode;
|
|
12
|
+
/** Custom render for the input area */
|
|
13
|
+
renderInput?: (props: {
|
|
14
|
+
onSend: (msg: string | FormData) => void;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}) => ReactNode;
|
|
17
|
+
/** Custom empty state content */
|
|
18
|
+
emptyState?: ReactNode;
|
|
19
|
+
/** Slot: content above the messages area */
|
|
20
|
+
headerSlot?: ReactNode;
|
|
21
|
+
/** Slot: extra buttons in the input toolbar */
|
|
22
|
+
inputToolbarSlot?: ReactNode;
|
|
23
|
+
/** Suggested prompts for empty state */
|
|
24
|
+
suggestedPrompts?: SuggestedPrompt[];
|
|
25
|
+
/** Tool handlers for HITL execution */
|
|
26
|
+
toolHandlers?: Record<string, ToolHandler>;
|
|
27
|
+
/** Auto-execute tools (default: true) */
|
|
28
|
+
autoExecuteTools?: boolean;
|
|
29
|
+
/** Input placeholder */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/** Custom user avatar */
|
|
32
|
+
userAvatar?: ReactNode;
|
|
33
|
+
/** Custom assistant avatar */
|
|
34
|
+
assistantAvatar?: ReactNode;
|
|
35
|
+
/** File upload config */
|
|
36
|
+
fileUpload?: FileUploadConfig;
|
|
37
|
+
/** Show audio recorder (default: true) */
|
|
38
|
+
showAudioRecorder?: boolean;
|
|
39
|
+
/** Show attachments button and drop zone (default: true) */
|
|
40
|
+
showAttachments?: boolean;
|
|
41
|
+
/** Props forwarded to AgnoMessageItem */
|
|
42
|
+
messageItemProps?: Partial<Omit<AgnoMessageItemProps, 'message'>>;
|
|
43
|
+
/** Props forwarded to AgnoChatInput */
|
|
44
|
+
chatInputProps?: Partial<Omit<AgnoChatInputProps, 'onSend'>>;
|
|
45
|
+
/** Custom label for the drop zone overlay */
|
|
46
|
+
dropZoneLabel?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function AgnoChatInterface({ className, classNames, renderMessage, renderInput, emptyState, headerSlot, inputToolbarSlot, suggestedPrompts, toolHandlers, autoExecuteTools, placeholder, userAvatar, assistantAvatar, fileUpload, showAudioRecorder, showAttachments, messageItemProps, chatInputProps, dropZoneLabel, }: AgnoChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
//# sourceMappingURL=AgnoChatInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgnoChatInterface.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/AgnoChatInterface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,W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AAO,CAAC;IAC5B,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC;IAClE,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC7D,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAOD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAkC,EAClC,YAAiB,EACjB,gBAAuB,EACvB,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,iBAAwB,EACxB,eAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,EAAE,sBAAsB,2CAsCxB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ChatMessage } from '@rodrigocoliveira/agno-types';
|
|
2
|
+
import type { AgnoMessageItemClassNames } from '../types';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
export interface AgnoMessageItemProps {
|
|
5
|
+
message: ChatMessage;
|
|
6
|
+
className?: string;
|
|
7
|
+
classNames?: AgnoMessageItemClassNames;
|
|
8
|
+
/** Custom render for the entire message content area */
|
|
9
|
+
renderContent?: (message: ChatMessage) => ReactNode;
|
|
10
|
+
/** Custom render for individual tool calls */
|
|
11
|
+
renderToolCall?: (tool: NonNullable<ChatMessage['tool_calls']>[0], index: number) => ReactNode;
|
|
12
|
+
/** Custom render for media sections */
|
|
13
|
+
renderMedia?: (message: ChatMessage) => ReactNode;
|
|
14
|
+
/** Render action buttons below assistant messages (e.g., copy, like, dislike) */
|
|
15
|
+
renderActions?: (message: ChatMessage) => ReactNode;
|
|
16
|
+
/** Custom user avatar */
|
|
17
|
+
userAvatar?: ReactNode;
|
|
18
|
+
/** Custom assistant avatar */
|
|
19
|
+
assistantAvatar?: ReactNode;
|
|
20
|
+
/** Show reasoning steps (default: true) */
|
|
21
|
+
showReasoning?: boolean;
|
|
22
|
+
/** Show references (default: true) */
|
|
23
|
+
showReferences?: boolean;
|
|
24
|
+
/** Show timestamp (default: true) */
|
|
25
|
+
showTimestamp?: boolean;
|
|
26
|
+
/** Show generative UI renders (default: true) */
|
|
27
|
+
showGenerativeUI?: boolean;
|
|
28
|
+
/** Show tool call details (default: true) */
|
|
29
|
+
showToolCalls?: boolean;
|
|
30
|
+
/** Enable file preview cards with click-to-open modal (default: true) */
|
|
31
|
+
showFilePreview?: boolean;
|
|
32
|
+
/** Enable image lightbox on click (default: true) */
|
|
33
|
+
showImageLightbox?: boolean;
|
|
34
|
+
/** Custom timestamp formatter */
|
|
35
|
+
formatTimestamp?: (date: Date) => string;
|
|
36
|
+
}
|
|
37
|
+
export declare function AgnoMessageItem({ message, className, classNames, renderContent, renderToolCall, renderMedia, renderActions, userAvatar, assistantAvatar, showReasoning, showReferences, showTimestamp, showGenerativeUI, showToolCalls, showFilePreview, showImageLightbox, formatTimestamp, }: AgnoMessageItemProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=AgnoMessageItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgnoMessageItem.d.ts","sourceRoot":"","sources":["../../../src/ui/composed/AgnoMessageItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,8BAA8B,CAAC;AAe1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAA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odtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { ToolHandler } from '@rodrigocoliveira/agno-react';
|
|
3
|
+
export interface AgnoChatRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
toolHandlers?: Record<string, ToolHandler>;
|
|
6
|
+
autoExecuteTools?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function AgnoChatRoot({ children, toolHandlers, autoExecuteTools, className, ...divProps }: AgnoChatRootProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=agno-chat.d.ts.map
|
|
@@ -0,0 +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;AAKhE,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;CAC5B;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,YAAiB,EACjB,gBAAuB,EACvB,SAAS,EACT,GAAG,QAAQ,EACZ,EAAE,iBAAiB,2CAqGnB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { ChatMessage, ClientState, ToolCall } from '@rodrigocoliveira/agno-types';
|
|
3
|
+
export interface AgnoChatContextValue {
|
|
4
|
+
messages: ChatMessage[];
|
|
5
|
+
sendMessage: (message: string | FormData, options?: {
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
params?: Record<string, string>;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
clearMessages: () => void;
|
|
10
|
+
cancelRun: () => Promise<void>;
|
|
11
|
+
isStreaming: boolean;
|
|
12
|
+
isRefreshing: boolean;
|
|
13
|
+
isCancelling: boolean;
|
|
14
|
+
currentRunId?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
state: ClientState;
|
|
17
|
+
isPaused: boolean;
|
|
18
|
+
isExecuting: boolean;
|
|
19
|
+
pendingTools: ToolCall[];
|
|
20
|
+
executeAndContinue: () => Promise<void>;
|
|
21
|
+
executeTools: (tools: ToolCall[]) => Promise<ToolCall[]>;
|
|
22
|
+
continueWithResults: (tools: ToolCall[], options?: {
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
params?: Record<string, string>;
|
|
25
|
+
}) => Promise<void>;
|
|
26
|
+
executionError?: string;
|
|
27
|
+
handleSend: (message: string | FormData) => Promise<void>;
|
|
28
|
+
inputDisabled: boolean;
|
|
29
|
+
dropZoneContainerRef?: RefObject<HTMLElement | null>;
|
|
30
|
+
}
|
|
31
|
+
export declare const AgnoChatContext: import("react").Context<AgnoChatContextValue | null>;
|
|
32
|
+
export declare function useAgnoChatContext(): AgnoChatContextValue;
|
|
33
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +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,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEvF,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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kBAAkB,IAAI,oBAAoB,CASzD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AgnoChatEmptyStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function AgnoChatEmptyState({ children, className, ...props }: AgnoChatEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC7E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,2CAM5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-bar.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/error-bar.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE,qBAAqB,kDAWpE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AgnoChatRoot } from './agno-chat';
|
|
2
|
+
import { AgnoChatMessages } from './messages';
|
|
3
|
+
import { AgnoChatEmptyState } from './empty-state';
|
|
4
|
+
import { AgnoChatSuggestedPrompts } from './suggested-prompts';
|
|
5
|
+
import { AgnoChatToolStatus } from './tool-status';
|
|
6
|
+
import { AgnoChatErrorBar } from './error-bar';
|
|
7
|
+
import { AgnoChatInputArea } from './input';
|
|
8
|
+
export { useAgnoChatContext } from './context';
|
|
9
|
+
export type { AgnoChatContextValue } from './context';
|
|
10
|
+
export { AgnoChatRoot } from './agno-chat';
|
|
11
|
+
export type { AgnoChatRootProps } from './agno-chat';
|
|
12
|
+
export { AgnoChatMessages } from './messages';
|
|
13
|
+
export type { AgnoChatMessagesProps } from './messages';
|
|
14
|
+
export { AgnoChatEmptyState } from './empty-state';
|
|
15
|
+
export type { AgnoChatEmptyStateProps } from './empty-state';
|
|
16
|
+
export { AgnoChatSuggestedPrompts } from './suggested-prompts';
|
|
17
|
+
export type { AgnoChatSuggestedPromptsProps } from './suggested-prompts';
|
|
18
|
+
export { AgnoChatToolStatus } from './tool-status';
|
|
19
|
+
export type { AgnoChatToolStatusProps } from './tool-status';
|
|
20
|
+
export { AgnoChatErrorBar } from './error-bar';
|
|
21
|
+
export type { AgnoChatErrorBarProps } from './error-bar';
|
|
22
|
+
export { AgnoChatInputArea } from './input';
|
|
23
|
+
export type { AgnoChatInputAreaProps, AgnoChatInputRenderProps } from './input';
|
|
24
|
+
declare const AgnoChat: typeof AgnoChatRoot & {
|
|
25
|
+
Messages: typeof AgnoChatMessages;
|
|
26
|
+
EmptyState: typeof AgnoChatEmptyState;
|
|
27
|
+
SuggestedPrompts: typeof AgnoChatSuggestedPrompts;
|
|
28
|
+
ToolStatus: typeof AgnoChatToolStatus;
|
|
29
|
+
ErrorBar: typeof AgnoChatErrorBar;
|
|
30
|
+
Input: typeof AgnoChatInputArea;
|
|
31
|
+
};
|
|
32
|
+
export { AgnoChat };
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/composed/agno-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,Y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