Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/serious-keys-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gitbook": patch
---

Fix: Long strings overflow out of message bubble in docs assistant
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function DescriptionForSearchToolCall(props: {
hasResults ? '-my-2 cursor-pointer py-2 hover:bg-primary-hover' : ''
)}
>
<div className="flex flex-col leading-snug">
<div className="flex min-w-0 flex-col break-words leading-snug">
<p>{t(language, 'searched_for', <strong>{toolCall.query}</strong>)}</p>
<p className="mt-0.5 text-tint-subtle text-xs">
{hasResults
Expand Down
1 change: 1 addition & 0 deletions packages/gitbook/src/components/AIChat/AIChatMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down