diff --git a/.changeset/serious-keys-explain.md b/.changeset/serious-keys-explain.md new file mode 100644 index 0000000000..07eca3a458 --- /dev/null +++ b/.changeset/serious-keys-explain.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Fix: Long strings overflow out of message bubble in docs assistant diff --git a/packages/gitbook/src/components/AI/server-actions/AIToolCallsSummary.tsx b/packages/gitbook/src/components/AI/server-actions/AIToolCallsSummary.tsx index 27863fd80c..6432ee2d05 100644 --- a/packages/gitbook/src/components/AI/server-actions/AIToolCallsSummary.tsx +++ b/packages/gitbook/src/components/AI/server-actions/AIToolCallsSummary.tsx @@ -167,7 +167,7 @@ async function DescriptionForSearchToolCall(props: { hasResults ? '-my-2 cursor-pointer py-2 hover:bg-primary-hover' : '' )} > -
{t(language, 'searched_for', {toolCall.query})}
{hasResults diff --git a/packages/gitbook/src/components/AIChat/AIChatMessages.tsx b/packages/gitbook/src/components/AIChat/AIChatMessages.tsx index a5accb571b..52b1bfda15 100644 --- a/packages/gitbook/src/components/AIChat/AIChatMessages.tsx +++ b/packages/gitbook/src/components/AIChat/AIChatMessages.tsx @@ -32,6 +32,7 @@ export function AIChatMessages(props: { 'scroll-mt-36', 'lg:scroll-mt-0', 'flex flex-col gap-6', + 'break-words', 'group/message', message.role === AIMessageRole.User ? 'max-w-[80%] self-end circular-corners:rounded-2xl rounded-corners:rounded-md bg-tint px-4 py-2'