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
1 change: 1 addition & 0 deletions frontend/src/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@
.markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--color-border-default);
white-space: nowrap;
}

.markdown-body table tr {
Expand Down
14 changes: 10 additions & 4 deletions frontend/src/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,16 @@ function ResponsiveTable({ children, className, ...rest }: JSX.IntrinsicElements
const { node, inline, ...safeRest } = rest as Record<string, unknown>;

return (
<div className="overflow-x-auto max-w-full w-0 min-w-full rounded-md border border-border/50">
<table className={className} {...(safeRest as object)}>
{children}
</table>
<div className="my-4 w-full max-w-full overflow-hidden">
<div className="overflow-x-auto overflow-y-hidden rounded-md border border-border/50 shadow-sm">
<table
className={className || ""}
style={{ width: "max-content" }}
{...(safeRest as object)}
>
{children}
</table>
</div>
</div>
);
}
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/routes/_auth.chat.$chatId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ function UserMessage({ message, chatId }: { message: ChatMessage; chatId: string
<div>
<UserIcon />
</div>
<div className="flex flex-col gap-2">{renderContent(message.content, chatId)}</div>
<div className="flex flex-col gap-2 min-w-0 flex-1 overflow-hidden">
{renderContent(message.content, chatId)}
</div>
</div>
</div>
);
Expand Down Expand Up @@ -295,7 +297,7 @@ function SystemMessage({
<div>
<AsteriskIcon />
</div>
<div className="flex flex-col gap-2">
<div className="flex flex-col gap-2 min-w-0 flex-1 overflow-hidden">
<Markdown content={text} loading={loading} chatId={chatId} />
<div className="flex gap-2 items-center">
<Button
Expand Down Expand Up @@ -790,7 +792,7 @@ END OF INSTRUCTIONS`;
)}
<div
ref={chatContainerRef}
className="flex-1 min-h-0 overflow-y-auto flex flex-col relative"
className="flex-1 min-h-0 overflow-y-auto overflow-x-hidden flex flex-col relative"
>
<div className="mt-4 md:mt-8 w-full h-10 flex items-center justify-center relative">
{/* Mobile new chat button */}
Expand Down
Loading