@clubmed/usg-chat-ui 1.2.7 → 1.3.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 +36 -0
- package/assets/style.css +1 -1
- package/chunks/react.esm.js +2012 -1997
- package/chunks/react.esm.js.map +1 -1
- package/chunks/vi.2VT5v0um.js +1 -0
- package/config/chatLabels.d.ts +43 -0
- package/config/chatLabels.js +2 -0
- package/config/chatLabels.js.map +1 -0
- package/contexts/ChatLabelsContext.d.ts +13 -0
- package/contexts/ChatLabelsContext.js +24 -0
- package/contexts/ChatLabelsContext.js.map +1 -0
- package/contexts/ChatLabelsContext.test.d.ts +1 -0
- package/contexts/ChatLabelsContext.test.js +23 -0
- package/contexts/ChatLabelsContext.test.js.map +1 -0
- package/molecules/AiElements/Branch.js +45 -44
- package/molecules/AiElements/Branch.js.map +1 -1
- package/molecules/AiElements/PromptInput.js +60 -58
- package/molecules/AiElements/PromptInput.js.map +1 -1
- package/molecules/RichText/useCollaboration.test.js +1 -1
- package/organisms/canvas/CanvasLayout.d.ts +2 -1
- package/organisms/canvas/CanvasLayout.js +1249 -1248
- package/organisms/canvas/CanvasLayout.js.map +1 -1
- package/organisms/chat/Chat.d.ts +7 -1
- package/organisms/chat/Chat.js +67 -67
- package/organisms/chat/Chat.js.map +1 -1
- package/organisms/chat/ChatHeader.d.ts +4 -4
- package/organisms/chat/ChatHeader.js +41 -39
- package/organisms/chat/ChatHeader.js.map +1 -1
- package/organisms/chat/ChatHeader.test.d.ts +1 -0
- package/organisms/chat/ChatHeader.test.js +18 -0
- package/organisms/chat/ChatHeader.test.js.map +1 -0
- package/organisms/chat/ChatMessageList.d.ts +1 -2
- package/organisms/chat/ChatMessageList.js +73 -58
- package/organisms/chat/ChatMessageList.js.map +1 -1
- package/organisms/chat/ChatMessageList.test.d.ts +1 -0
- package/organisms/chat/ChatMessageList.test.js +67 -0
- package/organisms/chat/ChatMessageList.test.js.map +1 -0
- package/organisms/chat/ChatSettingsButton.d.ts +2 -0
- package/organisms/chat/ChatSettingsButton.js +24 -0
- package/organisms/chat/ChatSettingsButton.js.map +1 -0
- package/organisms/chat/ChatSettingsButton.test.d.ts +1 -0
- package/organisms/chat/ChatSettingsButton.test.js +16 -0
- package/organisms/chat/ChatSettingsButton.test.js.map +1 -0
- package/organisms/chat/ConversationSidebar.js +44 -43
- package/organisms/chat/ConversationSidebar.js.map +1 -1
- package/organisms/chat/MessageActions.js +104 -103
- package/organisms/chat/MessageActions.js.map +1 -1
- package/organisms/chat/MessageRenderers.js +1 -1
- package/organisms/chat/SidebarToggleButton.js +9 -7
- package/organisms/chat/SidebarToggleButton.js.map +1 -1
- package/organisms/chat/hooks/useChat.d.ts +1 -1
- package/organisms/chat/hooks/useChat.js +83 -83
- package/organisms/chat/hooks/useChat.js.map +1 -1
- package/package.json +1 -1
- package/utils/interpolate.d.ts +5 -0
- package/utils/interpolate.js +13 -0
- package/utils/interpolate.js.map +1 -0
- package/utils/interpolate.test.d.ts +1 -0
- package/utils/interpolate.test.js +21 -0
- package/utils/interpolate.test.js.map +1 -0
package/organisms/chat/Chat.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ChatHeaderProps } from './ChatHeader';
|
|
3
|
+
import { ChatLabelOverrides } from '../../config/chatLabels';
|
|
2
4
|
export interface ChatProps {
|
|
5
|
+
title?: string;
|
|
3
6
|
className?: string;
|
|
4
7
|
headerActions?: ReactNode;
|
|
8
|
+
variant?: ChatHeaderProps["variant"];
|
|
9
|
+
labels?: ChatLabelOverrides;
|
|
5
10
|
}
|
|
6
|
-
export declare function Chat({ headerActions, className, }: ChatProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Chat({ title, headerActions, variant, className, labels, }: ChatProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Chat;
|
package/organisms/chat/Chat.js
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { cn as
|
|
4
|
-
import { ChatHeader as
|
|
5
|
-
import { SidebarToggleButton as
|
|
6
|
-
import { ConversationSidebar as
|
|
7
|
-
import { ChatMessageList as
|
|
8
|
-
import { PromptComposer as
|
|
9
|
-
import { CanvasLayout as
|
|
10
|
-
import { StoryCanvas as
|
|
11
|
-
import { ApiDocsCanvas as
|
|
12
|
-
import { ReleaseNoteCanvas as
|
|
13
|
-
import { SettingsModal as
|
|
14
|
-
import { useChat as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import { ChatHeader as R } from "./ChatHeader.js";
|
|
5
|
+
import { SidebarToggleButton as I } from "./SidebarToggleButton.js";
|
|
6
|
+
import { ConversationSidebar as T } from "./ConversationSidebar.js";
|
|
7
|
+
import { ChatMessageList as j } from "./ChatMessageList.js";
|
|
8
|
+
import { PromptComposer as k } from "./PromptComposer.js";
|
|
9
|
+
import { CanvasLayout as A } from "../canvas/CanvasLayout.js";
|
|
10
|
+
import { StoryCanvas as F } from "../canvas/StoryCanvas.js";
|
|
11
|
+
import { ApiDocsCanvas as z } from "../canvas/ApiDocsCanvas.js";
|
|
12
|
+
import { ReleaseNoteCanvas as B } from "../canvas/ReleaseNoteCanvas.js";
|
|
13
|
+
import { SettingsModal as P } from "../settings/SettingsModal.js";
|
|
14
|
+
import { useChat as W } from "./hooks/useChat.js";
|
|
15
|
+
import { ChatSettingsButton as _ } from "./ChatSettingsButton.js";
|
|
16
|
+
import { ChatLabelsProvider as $ } from "../../contexts/ChatLabelsContext.js";
|
|
17
|
+
function te({
|
|
18
|
+
title: h = "ClubMed USG AI Assistant",
|
|
19
|
+
headerActions: f,
|
|
20
|
+
variant: u = "full",
|
|
21
|
+
className: g,
|
|
22
|
+
labels: C
|
|
18
23
|
}) {
|
|
19
24
|
const {
|
|
20
|
-
chatMessages:
|
|
21
|
-
settingsOpen:
|
|
22
|
-
setSettingsOpen:
|
|
25
|
+
chatMessages: n,
|
|
26
|
+
settingsOpen: v,
|
|
27
|
+
setSettingsOpen: r,
|
|
23
28
|
sidebarOpen: i,
|
|
24
|
-
setSidebarOpen:
|
|
25
|
-
sidebarRefreshTrigger:
|
|
26
|
-
currentConversationId:
|
|
27
|
-
loadConversation:
|
|
28
|
-
handleNewConversation:
|
|
29
|
+
setSidebarOpen: a,
|
|
30
|
+
sidebarRefreshTrigger: x,
|
|
31
|
+
currentConversationId: S,
|
|
32
|
+
loadConversation: w,
|
|
33
|
+
handleNewConversation: b,
|
|
29
34
|
isLoadingMessage: s,
|
|
30
|
-
canvasType:
|
|
35
|
+
canvasType: t,
|
|
31
36
|
isFullscreen: l,
|
|
32
37
|
canvasWidth: m,
|
|
33
38
|
isResizing: c,
|
|
34
|
-
resizeWidth:
|
|
35
|
-
handleFollowupClick:
|
|
36
|
-
handleSubmit:
|
|
37
|
-
handleRegenerate:
|
|
38
|
-
localInput:
|
|
39
|
-
setLocalInput:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
conversationCount: t.length,
|
|
47
|
-
onOpenSettings: () => a(!0),
|
|
48
|
-
actions: h
|
|
49
|
-
}
|
|
50
|
-
),
|
|
39
|
+
resizeWidth: d,
|
|
40
|
+
handleFollowupClick: y,
|
|
41
|
+
handleSubmit: N,
|
|
42
|
+
handleRegenerate: L,
|
|
43
|
+
localInput: O,
|
|
44
|
+
setLocalInput: M
|
|
45
|
+
} = W();
|
|
46
|
+
return /* @__PURE__ */ e($, { labels: C, children: /* @__PURE__ */ o("div", { className: p("usg-chat-ui", g), "data-testid": "chat", children: [
|
|
47
|
+
/* @__PURE__ */ o(R, { title: h, conversationCount: n.length, variant: u, children: [
|
|
48
|
+
f,
|
|
49
|
+
/* @__PURE__ */ e(_, { onClick: () => r(!0) })
|
|
50
|
+
] }),
|
|
51
51
|
/* @__PURE__ */ o("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
52
|
-
!i && /* @__PURE__ */ e(
|
|
52
|
+
!i && /* @__PURE__ */ e(I, { onOpen: () => a(!0) }),
|
|
53
53
|
i && /* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
T,
|
|
55
55
|
{
|
|
56
|
-
currentConversationId:
|
|
57
|
-
onSelectConversation:
|
|
58
|
-
onNewConversation:
|
|
59
|
-
refreshTrigger:
|
|
60
|
-
onClose: () =>
|
|
56
|
+
currentConversationId: S,
|
|
57
|
+
onSelectConversation: w,
|
|
58
|
+
onNewConversation: b,
|
|
59
|
+
refreshTrigger: x,
|
|
60
|
+
onClose: () => a(!1)
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ e(
|
|
64
64
|
"main",
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
66
|
+
className: p(
|
|
67
67
|
"flex-1 flex items-stretch justify-center overflow-hidden min-h-0",
|
|
68
68
|
l && "lg:w-0 lg:opacity-0 lg:pointer-events-none",
|
|
69
69
|
!c && "transition-all duration-300"
|
|
70
70
|
),
|
|
71
71
|
style: {
|
|
72
|
-
width: l ? "0" : c &&
|
|
72
|
+
width: l ? "0" : c && d !== null ? `calc(100% - ${d}px)` : m !== null ? `calc(100% - ${m}px)` : "50%"
|
|
73
73
|
},
|
|
74
74
|
children: /* @__PURE__ */ o("div", { className: "w-full max-w-3xl flex flex-col h-full", children: [
|
|
75
75
|
/* @__PURE__ */ e(
|
|
76
|
-
|
|
76
|
+
j,
|
|
77
77
|
{
|
|
78
|
-
chatMessages:
|
|
78
|
+
chatMessages: n,
|
|
79
79
|
isLoadingMessage: s,
|
|
80
|
-
onFollowupClick:
|
|
81
|
-
onRegenerate:
|
|
82
|
-
emptyStateGreeting: O
|
|
80
|
+
onFollowupClick: y,
|
|
81
|
+
onRegenerate: L
|
|
83
82
|
}
|
|
84
83
|
),
|
|
85
84
|
/* @__PURE__ */ e(
|
|
86
|
-
|
|
85
|
+
k,
|
|
87
86
|
{
|
|
88
|
-
value:
|
|
87
|
+
value: O,
|
|
89
88
|
isLoading: s,
|
|
90
|
-
onChange:
|
|
91
|
-
onSubmit:
|
|
89
|
+
onChange: M,
|
|
90
|
+
onSubmit: N
|
|
92
91
|
}
|
|
93
92
|
)
|
|
94
93
|
] })
|
|
95
94
|
}
|
|
96
95
|
),
|
|
97
|
-
/* @__PURE__ */ o(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
/* @__PURE__ */ o(A, { children: [
|
|
97
|
+
t === "story" && /* @__PURE__ */ e(F, {}),
|
|
98
|
+
t === "api_docs" && /* @__PURE__ */ e(z, {}),
|
|
99
|
+
t === "release_note" && /* @__PURE__ */ e(B, {})
|
|
101
100
|
] })
|
|
102
101
|
] }),
|
|
103
|
-
/* @__PURE__ */ e(
|
|
104
|
-
] });
|
|
102
|
+
/* @__PURE__ */ e(P, { open: v, onOpenChange: r })
|
|
103
|
+
] }) });
|
|
105
104
|
}
|
|
106
105
|
export {
|
|
107
|
-
|
|
106
|
+
te as Chat,
|
|
107
|
+
te as default
|
|
108
108
|
};
|
|
109
109
|
//# sourceMappingURL=Chat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.js","sources":["../../../lib/organisms/chat/Chat.tsx"],"sourcesContent":["\"use client\";\n\nimport type {ReactNode} from \"react\";\n\nimport {cn} from \"../../utils/cn\";\nimport {ChatHeader} from \"./ChatHeader\";\nimport {SidebarToggleButton} from \"./SidebarToggleButton\";\nimport {ConversationSidebar} from \"./ConversationSidebar\";\nimport {ChatMessageList} from \"./ChatMessageList\";\nimport {PromptComposer} from \"./PromptComposer\";\nimport {CanvasLayout} from \"../canvas/CanvasLayout\";\nimport {StoryCanvas} from \"../canvas/StoryCanvas\";\nimport {ApiDocsCanvas} from \"../canvas/ApiDocsCanvas\";\nimport {ReleaseNoteCanvas} from \"../canvas/ReleaseNoteCanvas\";\nimport {SettingsModal} from \"../settings/SettingsModal\";\nimport {useChat} from \"./hooks/useChat\";\n\nexport interface ChatProps {\n className?: string;\n headerActions?: ReactNode;\n}\n\nexport function Chat({\n headerActions,\n className,\n }: ChatProps) {\n const {\n chatMessages,\n settingsOpen,\n setSettingsOpen,\n sidebarOpen,\n setSidebarOpen,\n sidebarRefreshTrigger,\n currentConversationId,\n loadConversation,\n handleNewConversation,\n isLoadingMessage,\n canvasType,\n isFullscreen,\n canvasWidth,\n isResizing,\n resizeWidth,\n handleFollowupClick,\n handleSubmit,\n handleRegenerate,\n localInput,\n setLocalInput,\n
|
|
1
|
+
{"version":3,"file":"Chat.js","sources":["../../../lib/organisms/chat/Chat.tsx"],"sourcesContent":["\"use client\";\n\nimport type {ReactNode} from \"react\";\n\nimport {cn} from \"../../utils/cn\";\nimport {ChatHeader, type ChatHeaderProps} from \"./ChatHeader\";\nimport {SidebarToggleButton} from \"./SidebarToggleButton\";\nimport {ConversationSidebar} from \"./ConversationSidebar\";\nimport {ChatMessageList} from \"./ChatMessageList\";\nimport {PromptComposer} from \"./PromptComposer\";\nimport {CanvasLayout} from \"../canvas/CanvasLayout\";\nimport {StoryCanvas} from \"../canvas/StoryCanvas\";\nimport {ApiDocsCanvas} from \"../canvas/ApiDocsCanvas\";\nimport {ReleaseNoteCanvas} from \"../canvas/ReleaseNoteCanvas\";\nimport {SettingsModal} from \"../settings/SettingsModal\";\nimport {useChat} from \"./hooks/useChat\";\nimport type {ChatLabelOverrides} from \"../../config/chatLabels\";\nimport {ChatSettingsButton} from \"@clubmed/usg-chat-ui/organisms/chat/ChatSettingsButton\";\nimport {ChatLabelsProvider} from \"../../contexts/ChatLabelsContext\";\n\nexport interface ChatProps {\n title?: string;\n className?: string;\n headerActions?: ReactNode;\n variant?: ChatHeaderProps[\"variant\"];\n labels?: ChatLabelOverrides;\n}\n\nexport function Chat({\n title = \"ClubMed USG AI Assistant\",\n headerActions,\n variant = \"full\",\n className,\n labels,\n }: ChatProps) {\n const {\n chatMessages,\n settingsOpen,\n setSettingsOpen,\n sidebarOpen,\n setSidebarOpen,\n sidebarRefreshTrigger,\n currentConversationId,\n loadConversation,\n handleNewConversation,\n isLoadingMessage,\n canvasType,\n isFullscreen,\n canvasWidth,\n isResizing,\n resizeWidth,\n handleFollowupClick,\n handleSubmit,\n handleRegenerate,\n localInput,\n setLocalInput,\n } = useChat();\n\n return (\n <ChatLabelsProvider labels={labels}>\n <div className={cn(\"usg-chat-ui\", className)} data-testid=\"chat\">\n <ChatHeader title={title} conversationCount={chatMessages.length} variant={variant}>\n {headerActions}\n <ChatSettingsButton onClick={() => setSettingsOpen(true)}/>\n </ChatHeader>\n\n <div className=\"flex-1 flex overflow-hidden relative\">\n {!sidebarOpen && <SidebarToggleButton onOpen={() => setSidebarOpen(true)}/>}\n\n {sidebarOpen && (\n <ConversationSidebar\n currentConversationId={currentConversationId}\n onSelectConversation={loadConversation}\n onNewConversation={handleNewConversation}\n refreshTrigger={sidebarRefreshTrigger}\n onClose={() => setSidebarOpen(false)}\n />\n )}\n\n <main\n className={cn(\n \"flex-1 flex items-stretch justify-center overflow-hidden min-h-0\",\n isFullscreen && \"lg:w-0 lg:opacity-0 lg:pointer-events-none\",\n !isResizing && \"transition-all duration-300\"\n )}\n style={{\n width: isFullscreen\n ? \"0\"\n : isResizing && resizeWidth !== null\n ? `calc(100% - ${resizeWidth}px)`\n : canvasWidth !== null\n ? `calc(100% - ${canvasWidth}px)`\n : \"50%\",\n }}\n >\n <div className=\"w-full max-w-3xl flex flex-col h-full\">\n <ChatMessageList\n chatMessages={chatMessages}\n isLoadingMessage={isLoadingMessage}\n onFollowupClick={handleFollowupClick}\n onRegenerate={handleRegenerate}\n />\n\n <PromptComposer\n value={localInput}\n isLoading={isLoadingMessage}\n onChange={setLocalInput}\n onSubmit={handleSubmit}\n />\n </div>\n </main>\n\n <CanvasLayout>\n {canvasType === \"story\" && <StoryCanvas/>}\n {canvasType === \"api_docs\" && <ApiDocsCanvas/>}\n {canvasType === \"release_note\" && <ReleaseNoteCanvas/>}\n </CanvasLayout>\n </div>\n\n <SettingsModal open={settingsOpen} onOpenChange={setSettingsOpen}/>\n </div>\n </ChatLabelsProvider>\n );\n}\n\nexport default Chat;\n"],"names":["Chat","title","headerActions","variant","className","labels","chatMessages","settingsOpen","setSettingsOpen","sidebarOpen","setSidebarOpen","sidebarRefreshTrigger","currentConversationId","loadConversation","handleNewConversation","isLoadingMessage","canvasType","isFullscreen","canvasWidth","isResizing","resizeWidth","handleFollowupClick","handleSubmit","handleRegenerate","localInput","setLocalInput","useChat","jsx","ChatLabelsProvider","jsxs","cn","ChatHeader","ChatSettingsButton","SidebarToggleButton","ConversationSidebar","ChatMessageList","PromptComposer","CanvasLayout","StoryCanvas","ApiDocsCanvas","ReleaseNoteCanvas","SettingsModal"],"mappings":";;;;;;;;;;;;;;;;AA4BO,SAASA,GAAK;AAAA,EACE,OAAAC,IAAQ;AAAA,EACR,eAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,QAAAC;AACF,GAAc;AACjC,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,EAAA,IACEC,EAAA;AAEJ,SACE,gBAAAC,EAACC,GAAA,EAAmB,QAAAvB,GAClB,UAAA,gBAAAwB,EAAC,OAAA,EAAI,WAAWC,EAAG,eAAe1B,CAAS,GAAG,eAAY,QACxD,UAAA;AAAA,IAAA,gBAAAyB,EAACE,GAAA,EAAW,OAAA9B,GAAc,mBAAmBK,EAAa,QAAQ,SAAAH,GAC/D,UAAA;AAAA,MAAAD;AAAA,wBACA8B,GAAA,EAAmB,SAAS,MAAMxB,EAAgB,EAAI,EAAA,CAAE;AAAA,IAAA,GAC3D;AAAA,IAEA,gBAAAqB,EAAC,OAAA,EAAI,WAAU,wCACZ,UAAA;AAAA,MAAA,CAACpB,KAAe,gBAAAkB,EAACM,GAAA,EAAoB,QAAQ,MAAMvB,EAAe,EAAI,GAAE;AAAA,MAExED,KACC,gBAAAkB;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,uBAAAtB;AAAA,UACA,sBAAsBC;AAAA,UACtB,mBAAmBC;AAAA,UACnB,gBAAgBH;AAAA,UAChB,SAAS,MAAMD,EAAe,EAAK;AAAA,QAAA;AAAA,MAAA;AAAA,MAIvC,gBAAAiB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWG;AAAA,YACT;AAAA,YACAb,KAAgB;AAAA,YAChB,CAACE,KAAc;AAAA,UAAA;AAAA,UAEjB,OAAO;AAAA,YACL,OAAOF,IACH,MACAE,KAAcC,MAAgB,OAC5B,eAAeA,CAAW,QAC1BF,MAAgB,OACd,eAAeA,CAAW,QAC1B;AAAA,UAAA;AAAA,UAGV,UAAA,gBAAAW,EAAC,OAAA,EAAI,WAAU,yCACb,UAAA;AAAA,YAAA,gBAAAF;AAAA,cAACQ;AAAA,cAAA;AAAA,gBACC,cAAA7B;AAAA,gBACA,kBAAAS;AAAA,gBACA,iBAAiBM;AAAA,gBACjB,cAAcE;AAAA,cAAA;AAAA,YAAA;AAAA,YAGhB,gBAAAI;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,OAAOZ;AAAA,gBACP,WAAWT;AAAA,gBACX,UAAUU;AAAA,gBACV,UAAUH;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,wBAGDe,GAAA,EACE,UAAA;AAAA,QAAArB,MAAe,6BAAYsB,GAAA,CAAA,CAAW;AAAA,QACtCtB,MAAe,cAAc,gBAAAW,EAACY,GAAA,CAAA,CAAa;AAAA,QAC3CvB,MAAe,kBAAkB,gBAAAW,EAACa,GAAA,CAAA,CAAiB;AAAA,MAAA,EAAA,CACtD;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAb,EAACc,GAAA,EAAc,MAAMlC,GAAc,cAAcC,EAAA,CAAgB;AAAA,EAAA,EAAA,CACnE,EAAA,CACF;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
export interface ChatHeaderProps {
|
|
3
|
+
title: string;
|
|
3
4
|
conversationCount: number;
|
|
4
|
-
|
|
5
|
-
actions?: ReactNode;
|
|
5
|
+
variant?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function ChatHeader({ conversationCount,
|
|
7
|
+
export declare function ChatHeader({ title, conversationCount, variant, children }: PropsWithChildren<ChatHeaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */ r(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: /* @__PURE__ */ e(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
|
+
import { W as d } from "../../chunks/wand-sparkles.js";
|
|
5
|
+
function c({ title: a, conversationCount: t, variant: s = "", children: i }) {
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: o("h-16 flex items-center justify-between px-4 sm:px-6 border-b border-border bg-card/95 backdrop-blur-xl transition-colors", {
|
|
10
|
+
"shadow-sm": !(s != null && s.includes("no-shadow"))
|
|
11
|
+
}),
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3 sm:gap-4", children: [
|
|
14
|
+
/* @__PURE__ */ r("div", { className: "relative group", children: [
|
|
15
|
+
/* @__PURE__ */ e(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: "absolute inset-0 bg-foreground/10 blur-xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: "relative flex h-10 w-10 sm:h-11 sm:w-11 items-center justify-center rounded-xl shadow-lg ring-1 ring-border/40 transition-transform group-hover:scale-105 duration-300 overflow-hidden",
|
|
25
|
+
style: {
|
|
26
|
+
background: "linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%)",
|
|
27
|
+
boxShadow: "inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.3)"
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none" }),
|
|
31
|
+
/* @__PURE__ */ e(d, { className: "h-4 w-4 sm:h-5 sm:w-5 text-white relative z-10", strokeWidth: 2 })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col", children: /* @__PURE__ */ e("h1", { className: "text-sm sm:text-base font-semibold text-foreground tracking-tight", children: a }) }),
|
|
37
|
+
t > 0 && /* @__PURE__ */ e("div", { className: "sm:hidden ml-2 px-2 py-1 rounded-full bg-muted text-xs font-medium text-foreground", children: t })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 sm:gap-3", children: i })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
41
43
|
}
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
c as ChatHeader
|
|
44
46
|
};
|
|
45
47
|
//# sourceMappingURL=ChatHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatHeader.js","sources":["../../../lib/organisms/chat/ChatHeader.tsx"],"sourcesContent":["\"use client\";\n\nimport type {
|
|
1
|
+
{"version":3,"file":"ChatHeader.js","sources":["../../../lib/organisms/chat/ChatHeader.tsx"],"sourcesContent":["\"use client\";\n\nimport type {PropsWithChildren} from \"react\";\nimport {Wand2} from \"lucide-react\";\nimport {cn} from \"@clubmed/usg-chat-ui/utils/cn\";\n\nexport interface ChatHeaderProps {\n title: string;\n conversationCount: number;\n variant?: string;\n}\n\nexport function ChatHeader({title, conversationCount, variant = \"\", children}: PropsWithChildren<ChatHeaderProps>) {\n return (\n <div\n className={cn(\"h-16 flex items-center justify-between px-4 sm:px-6 border-b border-border bg-card/95 backdrop-blur-xl transition-colors\", {\n \"shadow-sm\": !variant?.includes(\"no-shadow\"),\n })}>\n <div className=\"flex items-center gap-3 sm:gap-4\">\n <div className=\"relative group\">\n <div\n className=\"absolute inset-0 bg-foreground/10 blur-xl opacity-0 group-hover:opacity-100 transition-opacity duration-500\"/>\n <div\n className=\"relative flex h-10 w-10 sm:h-11 sm:w-11 items-center justify-center rounded-xl shadow-lg ring-1 ring-border/40 transition-transform group-hover:scale-105 duration-300 overflow-hidden\"\n style={{\n background: \"linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%)\",\n boxShadow: \"inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.3)\",\n }}\n >\n <div className=\"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none\"/>\n <Wand2 className=\"h-4 w-4 sm:h-5 sm:w-5 text-white relative z-10\" strokeWidth={2}/>\n </div>\n </div>\n\n <div className=\"flex flex-col\">\n <h1 className=\"text-sm sm:text-base font-semibold text-foreground tracking-tight\">\n {title}\n </h1>\n </div>\n\n {conversationCount > 0 && (\n <div className=\"sm:hidden ml-2 px-2 py-1 rounded-full bg-muted text-xs font-medium text-foreground\">\n {conversationCount}\n </div>\n )}\n </div>\n\n <div className=\"flex items-center gap-2 sm:gap-3\">\n {children}\n </div>\n </div>\n );\n}\n"],"names":["ChatHeader","title","conversationCount","variant","children","jsxs","cn","jsx","Wand2"],"mappings":";;;;AAYO,SAASA,EAAW,EAAC,OAAAC,GAAO,mBAAAC,GAAmB,SAAAC,IAAU,IAAI,UAAAC,KAA+C;AACjH,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAG,4HAA4H;AAAA,QACxI,aAAa,EAACH,KAAA,QAAAA,EAAS,SAAS;AAAA,MAAW,CAC5C;AAAA,MACD,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,UAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,kBACb,UAAA;AAAA,YAAA,gBAAAE;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,YACZ,gBAAAF;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,OAAO;AAAA,kBACL,YAAY;AAAA,kBACZ,WAAW;AAAA,gBAAA;AAAA,gBAGb,UAAA;AAAA,kBAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,sFAAA,CAAqF;AAAA,kBACpG,gBAAAA,EAACC,GAAA,EAAM,WAAU,kDAAiD,aAAa,EAAA,CAAE;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACnF,GACF;AAAA,UAEA,gBAAAD,EAAC,SAAI,WAAU,iBACb,4BAAC,MAAA,EAAG,WAAU,qEACX,UAAAN,EAAA,CACH,EAAA,CACF;AAAA,UAECC,IAAoB,KACnB,gBAAAK,EAAC,OAAA,EAAI,WAAU,sFACZ,UAAAL,EAAA,CACH;AAAA,QAAA,GAEJ;AAAA,QAEA,gBAAAK,EAAC,OAAA,EAAI,WAAU,oCACZ,UAAAH,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { a as n, s as o } from "../../chunks/react.esm.js";
|
|
3
|
+
import { ChatHeader as a } from "./ChatHeader.js";
|
|
4
|
+
import { ChatLabelsProvider as r } from "../../contexts/ChatLabelsContext.js";
|
|
5
|
+
import { d as c, i as s, g as t } from "../../chunks/vi.2VT5v0um.js";
|
|
6
|
+
c("<ChatHeader />", () => {
|
|
7
|
+
s("renders title, actions, and conversation counter", () => {
|
|
8
|
+
n(
|
|
9
|
+
/* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(a, { title: "Assistant", conversationCount: 3, children: /* @__PURE__ */ e("span", { children: "Action" }) }) })
|
|
10
|
+
), t(o.getByText("Assistant")).toBeInTheDocument(), t(o.getByText("Action")).toBeInTheDocument(), t(o.getByText("3")).toBeInTheDocument();
|
|
11
|
+
}), s("toggles shadow based on variant and hides badge when zero conversations", () => {
|
|
12
|
+
const { container: i, queryByText: d } = n(
|
|
13
|
+
/* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(a, { title: "No Shadow", conversationCount: 0, variant: "no-shadow" }) })
|
|
14
|
+
);
|
|
15
|
+
t(i.firstChild).not.toHaveClass("shadow-sm"), t(d("0")).toBeNull();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=ChatHeader.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.test.js","sources":["../../../lib/organisms/chat/ChatHeader.test.tsx"],"sourcesContent":["import {render, screen} from \"@testing-library/react\";\nimport {describe, expect, it} from \"vitest\";\nimport {ChatHeader} from \"./ChatHeader\";\nimport {ChatLabelsProvider} from \"../../contexts/ChatLabelsContext\";\n\ndescribe(\"<ChatHeader />\", () => {\n it(\"renders title, actions, and conversation counter\", () => {\n render(\n <ChatLabelsProvider>\n <ChatHeader title=\"Assistant\" conversationCount={3}>\n <span>Action</span>\n </ChatHeader>\n </ChatLabelsProvider>\n );\n\n expect(screen.getByText(\"Assistant\")).toBeInTheDocument();\n expect(screen.getByText(\"Action\")).toBeInTheDocument();\n expect(screen.getByText(\"3\")).toBeInTheDocument();\n });\n\n it(\"toggles shadow based on variant and hides badge when zero conversations\", () => {\n const {container, queryByText} = render(\n <ChatLabelsProvider>\n <ChatHeader title=\"No Shadow\" conversationCount={0} variant=\"no-shadow\" />\n </ChatLabelsProvider>\n );\n\n expect(container.firstChild).not.toHaveClass(\"shadow-sm\");\n expect(queryByText(\"0\")).toBeNull();\n });\n});\n"],"names":["describe","it","render","jsx","ChatLabelsProvider","ChatHeader","expect","screen","container","queryByText"],"mappings":";;;;;AAKAA,EAAS,kBAAkB,MAAM;AAC/B,EAAAC,EAAG,oDAAoD,MAAM;AAC3D,IAAAC;AAAA,MACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACE,GAAA,EAAW,OAAM,aAAY,mBAAmB,GAC/C,UAAA,gBAAAF,EAAC,QAAA,EAAK,UAAA,SAAA,CAAM,EAAA,CACd,EAAA,CACF;AAAA,IAAA,GAGFG,EAAOC,EAAO,UAAU,WAAW,CAAC,EAAE,kBAAA,GACtCD,EAAOC,EAAO,UAAU,QAAQ,CAAC,EAAE,kBAAA,GACnCD,EAAOC,EAAO,UAAU,GAAG,CAAC,EAAE,kBAAA;AAAA,EAChC,CAAC,GAEDN,EAAG,2EAA2E,MAAM;AAClF,UAAM,EAAC,WAAAO,GAAW,aAAAC,EAAA,IAAeP;AAAA,MAC/B,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACE,GAAA,EAAW,OAAM,aAAY,mBAAmB,GAAG,SAAQ,YAAA,CAAY,EAAA,CAC1E;AAAA,IAAA;AAGFC,IAAAA,EAAOE,EAAU,UAAU,EAAE,IAAI,YAAY,WAAW,GACxDF,EAAOG,EAAY,GAAG,CAAC,EAAE,SAAA;AAAA,EAC3B,CAAC;AACH,CAAC;"}
|
|
@@ -4,7 +4,6 @@ interface ChatMessageListProps {
|
|
|
4
4
|
isLoadingMessage: boolean;
|
|
5
5
|
onFollowupClick: (question: string) => void;
|
|
6
6
|
onRegenerate: (messageKey: string) => void;
|
|
7
|
-
emptyStateGreeting?: string;
|
|
8
7
|
}
|
|
9
|
-
export declare function ChatMessageList({ chatMessages, isLoadingMessage, onFollowupClick, onRegenerate,
|
|
8
|
+
export declare function ChatMessageList({ chatMessages, isLoadingMessage, onFollowupClick, onRegenerate, }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,73 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Branch as
|
|
4
|
-
import { Conversation as
|
|
5
|
-
import { Message as
|
|
6
|
-
import { Reasoning as
|
|
7
|
-
import { Response as
|
|
8
|
-
import { Sources as
|
|
9
|
-
import { MessageRenderer as
|
|
10
|
-
import { MessageActions as
|
|
11
|
-
import {
|
|
12
|
-
|
|
2
|
+
import { jsxs as r, jsx as e, Fragment as d } from "react/jsx-runtime";
|
|
3
|
+
import { Branch as v, BranchMessages as C, BranchSelector as w, BranchPrevious as y, BranchPage as B, BranchNext as N } from "../../molecules/AiElements/Branch.js";
|
|
4
|
+
import { Conversation as S, ConversationContent as T, ConversationEmptyState as k, ConversationScrollButton as R } from "../../molecules/AiElements/Conversation.js";
|
|
5
|
+
import { Message as m, MessageContent as h } from "../../molecules/AiElements/Message.js";
|
|
6
|
+
import { Reasoning as D, ReasoningTrigger as M, ReasoningContent as j } from "../../molecules/AiElements/Reasoning.js";
|
|
7
|
+
import { Response as I } from "../../molecules/AiElements/Response.js";
|
|
8
|
+
import { Sources as P, SourcesTrigger as Q, SourcesContent as W, Source as q } from "../../molecules/AiElements/Sources.js";
|
|
9
|
+
import { MessageRenderer as z } from "./MessageRenderers.js";
|
|
10
|
+
import { MessageActions as A } from "./MessageActions.js";
|
|
11
|
+
import { useChatConfig as J } from "../../contexts/ChatContext.js";
|
|
12
|
+
import { useChatLabels as L } from "../../contexts/ChatLabelsContext.js";
|
|
13
|
+
import { W as $ } from "../../chunks/wand-sparkles.js";
|
|
14
|
+
function ee({
|
|
13
15
|
chatMessages: a,
|
|
14
|
-
isLoadingMessage:
|
|
15
|
-
onFollowupClick:
|
|
16
|
-
onRegenerate:
|
|
17
|
-
emptyStateGreeting: u
|
|
16
|
+
isLoadingMessage: u,
|
|
17
|
+
onFollowupClick: f,
|
|
18
|
+
onRegenerate: p
|
|
18
19
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ e(
|
|
20
|
+
var l;
|
|
21
|
+
const { get: i, p: g } = L(), { user: s } = J(), x = () => a.map(({ versions: c, ...t }, b) => /* @__PURE__ */ r(v, { defaultBranch: c.length - 1, children: [
|
|
22
|
+
/* @__PURE__ */ e(C, { children: c.map((n) => /* @__PURE__ */ e(m, { from: t.from, children: /* @__PURE__ */ r(h, { children: [
|
|
23
|
+
t.sources && t.sources.length > 0 && /* @__PURE__ */ r(P, { children: [
|
|
24
|
+
/* @__PURE__ */ e(Q, { count: t.sources.length }),
|
|
25
|
+
/* @__PURE__ */ e(W, { children: t.sources.map((o) => /* @__PURE__ */ e(q, { href: o.href, title: o.title }, o.href)) })
|
|
24
26
|
] }),
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
/* @__PURE__ */ e(
|
|
27
|
+
t.reasoning && /* @__PURE__ */ r(D, { duration: t.reasoning.duration, children: [
|
|
28
|
+
/* @__PURE__ */ e(M, {}),
|
|
29
|
+
/* @__PURE__ */ e(j, { children: t.reasoning.content })
|
|
28
30
|
] }),
|
|
29
|
-
|
|
31
|
+
t.from === "assistant" ? /* @__PURE__ */ r(d, { children: [
|
|
30
32
|
/* @__PURE__ */ e(
|
|
31
|
-
|
|
33
|
+
z,
|
|
32
34
|
{
|
|
33
|
-
responseType:
|
|
34
|
-
content:
|
|
35
|
-
canvasData:
|
|
36
|
-
followupQuestions:
|
|
37
|
-
onQuestionClick:
|
|
35
|
+
responseType: n.responseType || "message",
|
|
36
|
+
content: n.content,
|
|
37
|
+
canvasData: n.canvasData,
|
|
38
|
+
followupQuestions: n.followupQuestions,
|
|
39
|
+
onQuestionClick: f
|
|
38
40
|
}
|
|
39
41
|
),
|
|
40
42
|
/* @__PURE__ */ e(
|
|
41
|
-
|
|
43
|
+
A,
|
|
42
44
|
{
|
|
43
|
-
content:
|
|
44
|
-
messageId:
|
|
45
|
-
responseType:
|
|
46
|
-
canvasData:
|
|
45
|
+
content: n.content,
|
|
46
|
+
messageId: n.id,
|
|
47
|
+
responseType: n.responseType,
|
|
48
|
+
canvasData: n.canvasData,
|
|
47
49
|
onRegenerate: () => {
|
|
48
|
-
const o = a[
|
|
49
|
-
(o == null ? void 0 : o.from) === "user" &&
|
|
50
|
+
const o = a[b - 1];
|
|
51
|
+
(o == null ? void 0 : o.from) === "user" && p(t.key);
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
)
|
|
53
|
-
] }) : /* @__PURE__ */ e(
|
|
54
|
-
] }) }, `${
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ e(
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
/* @__PURE__ */ e(
|
|
55
|
+
] }) : /* @__PURE__ */ e(I, { children: n.content })
|
|
56
|
+
] }) }, `${t.key}-${n.id}`)) }),
|
|
57
|
+
c.length > 1 && /* @__PURE__ */ r(w, { from: t.from, children: [
|
|
58
|
+
/* @__PURE__ */ e(y, {}),
|
|
59
|
+
/* @__PURE__ */ e(B, {}),
|
|
60
|
+
/* @__PURE__ */ e(N, {})
|
|
59
61
|
] })
|
|
60
|
-
] },
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
|
|
62
|
+
] }, t.key));
|
|
63
|
+
return /* @__PURE__ */ r(S, { className: "flex-1", children: [
|
|
64
|
+
/* @__PURE__ */ e(T, { children: a.length === 0 ? /* @__PURE__ */ e(
|
|
65
|
+
k,
|
|
64
66
|
{
|
|
65
|
-
greeting:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
greeting: g(
|
|
68
|
+
"greetingTemplate",
|
|
69
|
+
"Bonjour {{firstName}} 👋",
|
|
70
|
+
{ firstName: (l = s == null ? void 0 : s.userName) == null ? void 0 : l.split(" ")[0] }
|
|
71
|
+
),
|
|
72
|
+
title: i(
|
|
73
|
+
"emptyStateTitle",
|
|
74
|
+
"Bienvenue dans votre assistant de product management"
|
|
75
|
+
),
|
|
76
|
+
description: i(
|
|
77
|
+
"emptyStateDescription",
|
|
78
|
+
"Je vous aide à créer des user stories Jira de qualité, générer des release notes, répondre à vos questions sur l'API ClubMed, structurer vos besoins fonctionnels. Décrivez votre besoin et commençons !"
|
|
79
|
+
),
|
|
80
|
+
icon: /* @__PURE__ */ r("div", { className: "relative mx-auto w-fit", children: [
|
|
69
81
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-foreground/10 blur-3xl" }),
|
|
70
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ r(
|
|
71
83
|
"div",
|
|
72
84
|
{
|
|
73
85
|
className: "relative flex h-16 w-16 sm:h-20 sm:w-20 items-center justify-center rounded-2xl shadow-2xl ring-1 ring-border/40 transition-transform hover:scale-110 duration-500 overflow-hidden",
|
|
@@ -77,20 +89,23 @@ function O({
|
|
|
77
89
|
},
|
|
78
90
|
children: [
|
|
79
91
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none" }),
|
|
80
|
-
/* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e($, { className: "h-8 w-8 sm:h-10 sm:w-10 text-white relative z-10", strokeWidth: 1.5 })
|
|
81
93
|
]
|
|
82
94
|
}
|
|
83
95
|
)
|
|
84
96
|
] })
|
|
85
97
|
}
|
|
86
|
-
) : /* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
) : /* @__PURE__ */ r(d, { children: [
|
|
99
|
+
x(),
|
|
100
|
+
u && /* @__PURE__ */ e(m, { from: "assistant", children: /* @__PURE__ */ e(h, { variant: "flat", children: /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground animate-pulse", children: i(
|
|
101
|
+
"assistantThinkingIndicator",
|
|
102
|
+
"Réflexion en cours..."
|
|
103
|
+
) }) }) })
|
|
89
104
|
] }) }),
|
|
90
|
-
/* @__PURE__ */ e(
|
|
105
|
+
/* @__PURE__ */ e(R, {})
|
|
91
106
|
] });
|
|
92
107
|
}
|
|
93
108
|
export {
|
|
94
|
-
|
|
109
|
+
ee as ChatMessageList
|
|
95
110
|
};
|
|
96
111
|
//# sourceMappingURL=ChatMessageList.js.map
|