Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix: compact AI sidebar tables

tianma-ifc91271c8bcc2
diff --git a/apps/web/src/components/ai-sidebar/AiSidebarMessage.tsx b/apps/web/src/components/ai-sidebar/AiSidebarMessage.tsx
index 53f649c3..78f3d887 100644
--- a/apps/web/src/components/ai-sidebar/AiSidebarMessage.tsx
+++ b/apps/web/src/components/ai-sidebar/AiSidebarMessage.tsx
@@ -14,10 +14,11 @@ export const AiSidebarMessage = memo(
({ className, children, isAnimating }: { children: string; className?: string; isAnimating?: boolean }) => (
<Streamdown
allowedTags={sidebarNoteLinkAllowedTags}
- className={cn("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", className)}
+ className={cn("ai-sidebar-message size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", className)}
components={sidebarNoteLinkComponents}
isAnimating={isAnimating}
plugins={sidebarStreamdownPlugins}
+ tableMaxHeight={240}
>
{rewriteSidebarNoteLinks(children)}
</Streamdown>
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index 80bb420a..d18bf5c7 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -169,6 +169,19 @@
overflow-x: auto;
}
+.ai-sidebar-message [data-streamdown="table-wrapper"] {
+ margin-block: 0.65rem;
+ gap: 0.25rem;
+ padding: 0.375rem;
+}
+
+.ai-sidebar-message [data-streamdown="table"] :is(th, td) {
+ padding: 0.3rem 0.5rem;
+ font-size: 0.75rem;
+ line-height: 1.45;
+ white-space: normal;
+}
+
@keyframes edgeever-token-created {
0% {
opacity: 0;