Skip to content

Commit 2e6e28e

Browse files
authored
Fix: Long strings overflow out of message bubble in docs assistant (#3588)
1 parent 854c448 commit 2e6e28e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/serious-keys-explain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Fix: Long strings overflow out of message bubble in docs assistant

packages/gitbook/src/components/AI/server-actions/AIToolCallsSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async function DescriptionForSearchToolCall(props: {
167167
hasResults ? '-my-2 cursor-pointer py-2 hover:bg-primary-hover' : ''
168168
)}
169169
>
170-
<div className="flex flex-col leading-snug">
170+
<div className="flex min-w-0 flex-col break-words leading-snug">
171171
<p>{t(language, 'searched_for', <strong>{toolCall.query}</strong>)}</p>
172172
<p className="mt-0.5 text-tint-subtle text-xs">
173173
{hasResults

packages/gitbook/src/components/AIChat/AIChatMessages.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function AIChatMessages(props: {
3232
'scroll-mt-36',
3333
'lg:scroll-mt-0',
3434
'flex flex-col gap-6',
35+
'break-words',
3536
'group/message',
3637
message.role === AIMessageRole.User
3738
? 'max-w-[80%] self-end circular-corners:rounded-2xl rounded-corners:rounded-md bg-tint px-4 py-2'

0 commit comments

Comments
 (0)