@foris/ai-agent 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-agent.es.js +7943 -7802
- package/dist/ai-agent.umd.js +67 -67
- package/dist/components/chat-panel/{ChatPanel.d.ts → chat-panel/ChatPanel.d.ts} +4 -3
- package/dist/components/chat-panel/chat-panel/ChatPanel.test.d.ts +0 -0
- package/dist/components/chat-panel/{chatPanel.types.d.ts → chat-panel/chatPanel.types.d.ts} +1 -1
- package/dist/components/chat-panel/chat-panel/index.d.ts +2 -0
- package/dist/components/chat-panel/{ChatPanelClearDialog.d.ts → clear-dialog/ClearDialog.d.ts} +3 -3
- package/dist/components/chat-panel/clear-dialog/index.d.ts +1 -0
- package/dist/components/chat-panel/{ChatPanelFooter.d.ts → footer/Footer.d.ts} +3 -3
- package/dist/components/chat-panel/footer/index.d.ts +1 -0
- package/dist/components/chat-panel/{ChatPanelHeader.d.ts → header/Header.d.ts} +5 -6
- package/dist/components/chat-panel/header/Header.test.d.ts +0 -0
- package/dist/components/chat-panel/header/index.d.ts +1 -0
- package/dist/components/chat-panel/index.d.ts +1 -1
- package/dist/components/chat-panel/locale/en.json.d.ts +4 -2
- package/dist/components/chat-panel/locale/es.json.d.ts +4 -2
- package/dist/components/chat-panel/message-item/MessageItem.d.ts +7 -0
- package/dist/components/chat-panel/message-item/index.d.ts +1 -0
- package/dist/components/chat-panel/suggestions/Suggestions.d.ts +7 -0
- package/dist/components/chat-panel/suggestions/index.d.ts +1 -0
- package/dist/components/chat-panel/typing/Typing.d.ts +3 -0
- package/dist/components/chat-panel/typing/index.d.ts +1 -0
- package/dist/components/chat-panel/welcome/Welcome.d.ts +10 -0
- package/dist/components/chat-panel/welcome/Welcome.test.d.ts +0 -0
- package/dist/components/chat-panel/welcome/index.d.ts +1 -0
- package/dist/components/ui/icon-menu/IconMenu.d.ts +20 -0
- package/dist/components/ui/icon-menu/IconMenu.test.d.ts +0 -0
- package/dist/components/ui/icon-menu/index.d.ts +2 -0
- package/dist/hooks/useClickOutside.d.ts +8 -0
- package/dist/hooks/useMessageProcessor.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/components/chat-panel/ChatMessageItem.d.ts +0 -7
- package/dist/components/chat-panel/ChatPanelWelcome.d.ts +0 -12
- package/dist/components/chat-panel/ChatSuggestionMessage.d.ts +0 -7
- package/dist/components/chat-panel/ChatTypingIndicator.d.ts +0 -3
- /package/dist/components/{ai-agent-icon → ui/ai-agent-icon}/AiAgentIcon.d.ts +0 -0
- /package/dist/components/{ai-agent-icon → ui/ai-agent-icon}/index.d.ts +0 -0
- /package/dist/components/{ai-chat-logo → ui/ai-chat-logo}/AiChatLogo.d.ts +0 -0
- /package/dist/components/{ai-chat-logo → ui/ai-chat-logo}/index.d.ts +0 -0
- /package/dist/{ai-chat-panel-menu → components/ui/ai-chat-panel-menu}/ChatPanelMenu.d.ts +0 -0
- /package/dist/{ai-chat-panel-menu → components/ui/ai-chat-panel-menu}/index.d.ts +0 -0
- /package/dist/{ai-sparkles-icon → components/ui/ai-sparkles-icon}/AiSparklesIcon.d.ts +0 -0
- /package/dist/{ai-sparkles-icon → components/ui/ai-sparkles-icon}/index.d.ts +0 -0
- /package/dist/components/{skeleton-bar → ui/skeleton-bar}/SkeletonBar.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import { type AiAgentTheme, type ResolveSyntaxAppearanceFn } from '@/context/AiAgentThemeContext';
|
|
3
|
-
import type { SuggestionType } from '
|
|
4
|
-
import type { DataSource } from '
|
|
3
|
+
import type { SuggestionType } from '../../../types/chat';
|
|
4
|
+
import type { DataSource } from '../../../types/dataSource';
|
|
5
5
|
export interface ChatPanelTranslations {
|
|
6
6
|
title?: string;
|
|
7
7
|
welcomeTitle?: string;
|
|
@@ -15,12 +15,13 @@ export interface ChatPanelTranslations {
|
|
|
15
15
|
clearChatCancel?: string;
|
|
16
16
|
clearChatTooltipTitle?: string;
|
|
17
17
|
clearChatTooltipDescription?: string;
|
|
18
|
+
suggestionsTooltipTitle?: string;
|
|
19
|
+
suggestionsTooltipDescription?: string;
|
|
18
20
|
}
|
|
19
21
|
interface ChatPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20
22
|
dataSource: DataSource;
|
|
21
23
|
className?: string;
|
|
22
24
|
onClose?: () => void;
|
|
23
|
-
onMenuClick?: () => void;
|
|
24
25
|
locale?: 'en' | 'es';
|
|
25
26
|
translations?: ChatPanelTranslations;
|
|
26
27
|
initialSuggestions?: SuggestionType[];
|
|
File without changes
|
package/dist/components/chat-panel/{ChatPanelClearDialog.d.ts → clear-dialog/ClearDialog.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface ClearDialogProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onOpenChange: (open: boolean) => void;
|
|
5
5
|
container: HTMLElement | null;
|
|
@@ -9,5 +9,5 @@ interface ChatPanelClearDialogProps {
|
|
|
9
9
|
cancelLabel: string;
|
|
10
10
|
onConfirm: () => void;
|
|
11
11
|
}
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
12
|
+
declare const ClearDialog: FC<ClearDialogProps>;
|
|
13
|
+
export default ClearDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ClearDialog } from './ClearDialog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface FooterProps {
|
|
3
3
|
input: string;
|
|
4
4
|
onInputChange: (value: string) => void;
|
|
5
5
|
onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
@@ -7,5 +7,5 @@ interface ChatPanelFooterProps {
|
|
|
7
7
|
placeholder: string;
|
|
8
8
|
disclaimer: string;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const Footer: FC<FooterProps>;
|
|
11
|
+
export default Footer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Footer } from './Footer';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
interface
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
interface HeaderProps {
|
|
3
3
|
title: string;
|
|
4
4
|
isExpanded: boolean;
|
|
5
5
|
onToggleExpand: () => void;
|
|
6
6
|
onClose?: () => void;
|
|
7
|
-
onMenuClick?: () => void;
|
|
8
7
|
onClearChat?: () => void;
|
|
9
8
|
clearChatTooltipTitle?: string;
|
|
10
9
|
clearChatTooltipDescription?: string;
|
|
11
|
-
|
|
10
|
+
headerActionsSlot?: ReactNode;
|
|
12
11
|
}
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
12
|
+
declare const Header: FC<HeaderProps>;
|
|
13
|
+
export default Header;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Header } from './Header';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ChatPanel, type ChatPanelTranslations } from './
|
|
1
|
+
export { ChatPanel, type ChatPanelTranslations } from './chat-panel';
|
|
2
2
|
export type { SuggestionType } from '../../types/chat';
|
|
3
3
|
export type { AiAgentTheme, SyntaxAppearance, ResolveSyntaxAppearanceFn, } from '../../context/AiAgentThemeContext';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
"title": "Foris
|
|
2
|
+
"title": "Foris AI",
|
|
3
3
|
"welcomeTitle": "How can I help you?",
|
|
4
4
|
"welcomeDescription": "Choose a suggestion or ask me a question.",
|
|
5
5
|
"suggestionsTitle": "Suggestions",
|
|
@@ -10,7 +10,9 @@ declare const _default: {
|
|
|
10
10
|
"clearChatConfirm": "Clear conversation",
|
|
11
11
|
"clearChatCancel": "Cancel",
|
|
12
12
|
"clearChatTooltipTitle": "Clear current conversation",
|
|
13
|
-
"clearChatTooltipDescription": "The current conversation context will be lost."
|
|
13
|
+
"clearChatTooltipDescription": "The current conversation context will be lost.",
|
|
14
|
+
"suggestionsTooltipTitle": "Suggestions",
|
|
15
|
+
"suggestionsTooltipDescription": "Select an option"
|
|
14
16
|
}
|
|
15
17
|
;
|
|
16
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
"title": "Foris
|
|
2
|
+
"title": "Foris AI",
|
|
3
3
|
"welcomeTitle": "¿Cómo puedo ayudarte?",
|
|
4
4
|
"welcomeDescription": "Puedes elegir una sugerencia o hacerme una pregunta.",
|
|
5
5
|
"suggestionsTitle": "Sugerencias",
|
|
@@ -10,7 +10,9 @@ declare const _default: {
|
|
|
10
10
|
"clearChatConfirm": "Limpiar conversación",
|
|
11
11
|
"clearChatCancel": "Cancelar",
|
|
12
12
|
"clearChatTooltipTitle": "Limpiar conversación actual",
|
|
13
|
-
"clearChatTooltipDescription": "Se perderá el contexto actual de la conversación."
|
|
13
|
+
"clearChatTooltipDescription": "Se perderá el contexto actual de la conversación.",
|
|
14
|
+
"suggestionsTooltipTitle": "Sugerencias",
|
|
15
|
+
"suggestionsTooltipDescription": "Selecciona una opción"
|
|
14
16
|
}
|
|
15
17
|
;
|
|
16
18
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MessageItem } from './MessageItem';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SuggestionType } from '../../../types/chat';
|
|
2
|
+
interface SuggestionsProps {
|
|
3
|
+
suggestion: SuggestionType;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const Suggestions: ({ suggestion, onClick, }: SuggestionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Suggestions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Suggestions } from './Suggestions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Typing } from './Typing';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { SuggestionType } from '../../../types/chat';
|
|
3
|
+
interface WelcomeProps {
|
|
4
|
+
welcomeTitle: string;
|
|
5
|
+
welcomeDescription: string;
|
|
6
|
+
suggestions: SuggestionType[];
|
|
7
|
+
onSuggestionClick: (suggestion: SuggestionType) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const Welcome: FC<WelcomeProps>;
|
|
10
|
+
export default Welcome;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Welcome } from './Welcome';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IconTypes } from '@foris/avocado-icons';
|
|
3
|
+
export interface IconMenuItem {
|
|
4
|
+
key: string;
|
|
5
|
+
icon?: IconTypes;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface IconMenuProps {
|
|
11
|
+
items: IconMenuItem[];
|
|
12
|
+
triggerIcon: IconTypes;
|
|
13
|
+
triggerAriaLabel: string;
|
|
14
|
+
header?: string;
|
|
15
|
+
listOrigin?: 'left' | 'right';
|
|
16
|
+
triggerTooltipTitle?: string;
|
|
17
|
+
triggerTooltipDescription?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const IconMenu: FC<IconMenuProps>;
|
|
20
|
+
export default IconMenu;
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UseClickOutsideProps {
|
|
3
|
+
ref?: React.RefObject<HTMLElement | null>;
|
|
4
|
+
shouldIgnore?: boolean;
|
|
5
|
+
onClickOutside?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useClickOutside: ({ ref, shouldIgnore, onClickOutside, }: UseClickOutsideProps) => void;
|
|
8
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatMessage } from '../types/chat';
|
|
2
|
-
import type { MessageType } from '../components/chat-panel/chatPanel.types';
|
|
2
|
+
import type { MessageType } from '../components/chat-panel/chat-panel/chatPanel.types';
|
|
3
3
|
interface UseMessageProcessorOptions {
|
|
4
4
|
messages: ChatMessage[];
|
|
5
5
|
isAtBottom: () => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ChatPanel, type ChatPanelTranslations, type SuggestionType, type AiAgentTheme, type SyntaxAppearance, type ResolveSyntaxAppearanceFn, } from './components/chat-panel';
|
|
2
2
|
export { ChatSessionProvider, useChatSession, useChatSessionOptional, type ChatSessionContextValue, type ChatSessionProviderProps, } from './context/ChatSessionContext';
|
|
3
|
-
export { ChatPanelMenu } from './ai-chat-panel-menu';
|
|
3
|
+
export { ChatPanelMenu } from './components/ui/ai-chat-panel-menu';
|
|
4
4
|
export { SummaryCard, type SummaryCardProps, type SummaryCardTranslations, type SupportedLocale, } from './components/summary-card';
|
|
5
5
|
export { PromptCodeEditor } from './ai-prompt-code-editor';
|