diff --git a/sdk/widget/src/components/ChatToggleButton.tsx b/sdk/widget/src/components/ChatToggleButton.tsx
index ec163c8..b0ef65d 100644
--- a/sdk/widget/src/components/ChatToggleButton.tsx
+++ b/sdk/widget/src/components/ChatToggleButton.tsx
@@ -53,7 +53,9 @@ export const ChatToggleButton = React.forwardRef<
const [logoLoadFailed, setLogoLoadFailed] = React.useState(false);
const buttonSize = isMobile ? MOBILE_BUTTON_SIZE_PX : BUTTON_SIZE_PX;
const iconSize = isMobile ? MOBILE_ICON_SIZE_PX : ICON_SIZE_PX;
- const closeIconSize = isMobile ? MOBILE_CLOSE_ICON_SIZE_PX : CLOSE_ICON_SIZE_PX;
+ const closeIconSize = isMobile
+ ? MOBILE_CLOSE_ICON_SIZE_PX
+ : CLOSE_ICON_SIZE_PX;
const offset = isMobile ? "12px" : "16px";
const hasUnread = !isOpen && unreadCount > 0;
const unreadLabel = unreadCount > 99 ? "99+" : String(unreadCount);
diff --git a/sdk/widget/src/components/Composer.tsx b/sdk/widget/src/components/Composer.tsx
index 4d1ed36..bad1cc8 100644
--- a/sdk/widget/src/components/Composer.tsx
+++ b/sdk/widget/src/components/Composer.tsx
@@ -96,7 +96,9 @@ export function Composer({
padding: isMobileViewport ? "4px 6px 4px 16px" : "4px 6px 4px 14px",
background: "#ffffff",
minHeight: isMobileViewport ? "52px" : "44px",
- boxShadow: isInputFocused ? "0 0 0 3px rgba(15, 23, 42, 0.06)" : "none",
+ boxShadow: isInputFocused
+ ? "0 0 0 3px rgba(15, 23, 42, 0.06)"
+ : "none",
transition: "box-shadow 120ms ease, border-color 120ms ease",
}}
>
@@ -126,13 +128,19 @@ export function Composer({
type={isGenerating ? "button" : "submit"}
onClick={isGenerating ? onStop : undefined}
disabled={isGenerating ? false : !canSend}
- aria-label={isGenerating ? "Stop generating response" : "Send message"}
+ aria-label={
+ isGenerating ? "Stop generating response" : "Send message"
+ }
style={{
width: isMobileViewport ? "38px" : "36px",
height: isMobileViewport ? "38px" : "36px",
borderRadius: "9999px",
border: "none",
- background: isGenerating ? "#111827" : canSend ? "#111827" : "#d1d5db",
+ background: isGenerating
+ ? "#111827"
+ : canSend
+ ? "#111827"
+ : "#d1d5db",
color: "#ffffff",
display: "inline-flex",
alignItems: "center",
diff --git a/sdk/widget/src/components/MarkdownMessage.tsx b/sdk/widget/src/components/MarkdownMessage.tsx
index 50b03da..353da50 100644
--- a/sdk/widget/src/components/MarkdownMessage.tsx
+++ b/sdk/widget/src/components/MarkdownMessage.tsx
@@ -6,21 +6,48 @@ export function MarkdownMessage({ text }: { text: string }) {
{children}
,
+ p: ({ children }) => (
+ {children}
+ ),
h1: ({ children }) => (
- {children}
+
+ {children}
+
),
h2: ({ children }) => (
- {children}
+
+ {children}
+
),
h3: ({ children }) => (
- {children}
+
+ {children}
+
+ ),
+ ul: ({ children }) => (
+
+ ),
+ ol: ({ children }) => (
+
+ {children}
+
+ ),
+ li: ({ children }) => (
+ {children}
),
- ul: ({ children }) => ,
- ol: ({ children }) => {children}
,
- li: ({ children }) => {children},
a: ({ href, children }) => (
-
+
{children}
),
diff --git a/sdk/widget/src/components/MessageList.tsx b/sdk/widget/src/components/MessageList.tsx
index 2a70390..71066ef 100644
--- a/sdk/widget/src/components/MessageList.tsx
+++ b/sdk/widget/src/components/MessageList.tsx
@@ -96,12 +96,22 @@ export function MessageList({
const isSystem = Boolean(decoration?.isSystem);
const messageTimestampLabel = decoration?.messageTimestampLabel;
const showAssistantAvatar =
- !isUser && !isSystem && Boolean(decoration?.avatarUrl || decoration?.assistantBubble);
+ !isUser &&
+ !isSystem &&
+ Boolean(decoration?.avatarUrl || decoration?.assistantBubble);
const article = (
) : (
- {getAvatarFallback(decoration?.avatarFallbackLabel)}
+
+ {getAvatarFallback(decoration?.avatarFallbackLabel)}
+
)}
{article}
@@ -192,8 +209,13 @@ export function MessageList({
Missing apiKey prop.
: null}
+ {!hasApiKey ? (
+