@alxxsck/ai-assistant 2.15.0 → 2.17.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 +14 -0
- package/dist/{Avatar-CIVyo3Wu.js → Avatar-BfX6RMhc.js} +1 -1
- package/dist/ChatWidgetContent-tEMLaGRt.js +6190 -0
- package/dist/api/messages.api.d.ts +11 -1
- package/dist/api/messages.api.types.d.ts +9 -6
- package/dist/bridge-ai-chat-widget.es.js +1 -1
- package/dist/domain/message/cable/widget-frame.d.ts +1 -1
- package/dist/domain/message/cable/widget-message.d.ts +17 -2
- package/dist/domain/message/message.store.d.ts +30 -1
- package/dist/domain/scenario/scenario-choice.d.ts +45 -1
- package/dist/domain/support-presentation/PresentationAvatarResolver.d.ts +55 -0
- package/dist/domain/support-presentation/SupportPresentationContext.d.ts +12 -0
- package/dist/domain/support-presentation/presentation-initials.d.ts +1 -0
- package/dist/domain/support-presentation/support-presentation-avatar.api.d.ts +13 -0
- package/dist/domain/support-presentation/support-presentation-context.d.ts +9 -0
- package/dist/domain/support-presentation/support-presentation-observability.d.ts +8 -0
- package/dist/domain/support-presentation/support-presentation.types.d.ts +54 -0
- package/dist/i18n/messages.d.ts +10 -0
- package/dist/index-C9sJVi7P.js +15951 -0
- package/dist/lib/retrieveContent.d.ts +1 -0
- package/dist/ui/chat-routes.d.ts +1 -1
- package/dist/ui/components/ChatResponderIdentity.d.ts +7 -0
- package/dist/ui/components/ChatTopControls.d.ts +8 -0
- package/dist/ui/components/PresentationAvatar.d.ts +15 -0
- package/package.json +3 -1
- package/dist/ChatWidgetContent-RqPUcL16.js +0 -9193
- package/dist/index-KqyvPfgi.js +0 -11598
|
@@ -5,4 +5,5 @@ import { type MessageData } from "@/api/messages.api.types";
|
|
|
5
5
|
export declare function htmlToPlainPreview(html: string, maxLength?: number): string;
|
|
6
6
|
export declare function messageToPlainPreview(message: MessageData, maxLength?: number): string;
|
|
7
7
|
export declare function getRenderableMessageContent(message: MessageData): MessageData["content"] | null;
|
|
8
|
+
export declare function messageToPlainText(message: MessageData): string;
|
|
8
9
|
export declare function retrieveContent(message: MessageData): string;
|
package/dist/ui/chat-routes.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export declare function getChatModeFromPathname(pathname: string): ChatMode;
|
|
|
16
16
|
export declare function isChatListPath(pathname: string): boolean;
|
|
17
17
|
export declare function getChatPageTransitionDirection(fromPathname: string, toPathname: string): ChatPageTransitionDirection | null;
|
|
18
18
|
export declare function isVoiceChatPath(pathname: string): boolean;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function shouldOpenConversationNavigationInTextMode(pathname: string): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SafeResponderPresentation } from "@/domain/support-presentation/support-presentation.types";
|
|
2
|
+
type ChatResponderIdentityProps = {
|
|
3
|
+
conversationId: string;
|
|
4
|
+
presentation: SafeResponderPresentation;
|
|
5
|
+
};
|
|
6
|
+
export declare function ChatResponderIdentity({ conversationId, presentation, }: ChatResponderIdentityProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
type ChatTopControlsLayoutProps = {
|
|
2
|
+
left: React.ReactNode;
|
|
3
|
+
center: React.ReactNode;
|
|
4
|
+
right: React.ReactNode;
|
|
5
|
+
isMobile: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function ChatTopControlsLayout({ left, center, right, isMobile, }: ChatTopControlsLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
1
8
|
export declare function ChatTopControls({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PresentationAvatarAsset } from "@/domain/support-presentation/support-presentation.types";
|
|
2
|
+
export type PresentationFallbackKind = "LOLA" | "HUMAN" | "SUPPORT" | "SYSTEM";
|
|
3
|
+
type PresentationAvatarProps = {
|
|
4
|
+
conversationId: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
fallbackKind: PresentationFallbackKind;
|
|
7
|
+
presentation: {
|
|
8
|
+
avatarAsset: PresentationAvatarAsset | null;
|
|
9
|
+
legacyAvatarUrl?: string | null;
|
|
10
|
+
} | null;
|
|
11
|
+
size: "message" | "header";
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function PresentationAvatar({ conversationId, presentation, ...props }: PresentationAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alxxsck/ai-assistant",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.17.0",
|
|
5
5
|
"description": "Embeddable Lola AI assistant library",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/bridge-ai-chat-widget.es.js",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"format:check": "prettier --check .",
|
|
35
35
|
"test": "vitest run",
|
|
36
36
|
"test:browser": "playwright test",
|
|
37
|
+
"test:support-presentations:real-backend": "node scripts/run-support-presentations-real-backend.mjs",
|
|
37
38
|
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
38
39
|
"build-lib": "vite build --config vite.config.lib.ts && tsc -p tsconfig.build.json",
|
|
39
40
|
"prepublishOnly": "npm run build-lib",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"zustand": "^5.0.10"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
64
|
+
"@axe-core/playwright": "^4.11.1",
|
|
63
65
|
"@eslint/js": "^9.39.1",
|
|
64
66
|
"@playwright/test": "^1.62.0",
|
|
65
67
|
"@tailwindcss/postcss": "^4.1.18",
|