diff --git a/src/modules/blocks/AutoBlocksRenderer.tsx b/src/modules/blocks/AutoBlocksRenderer.tsx index c303c3010..8bf5fa38b 100644 --- a/src/modules/blocks/AutoBlocksRenderer.tsx +++ b/src/modules/blocks/AutoBlocksRenderer.tsx @@ -1,6 +1,8 @@ import * as React from 'react'; import type { Diff as TextDiff } from '@sanity/diff-match-patch'; -import { Button, Typography } from '@mui/joy'; + +import type { SxProps } from '@mui/joy/styles/types'; +import { Button, ColorPaletteProp } from '@mui/joy'; import ExpandLessIcon from '@mui/icons-material/ExpandLess'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; @@ -8,7 +10,7 @@ import type { DMessageRole } from '~/common/stores/chat/chat.message'; import { ContentScaling } from '~/common/app.theme'; import type { Block, CodeBlock, HtmlBlock, ImageBlock, TextBlock } from './blocks.types'; -import { BlocksContainer } from './BlocksContainer'; +import { BlocksContainer } from './BlocksContainers'; import { RenderMarkdown, RenderMarkdownMemo } from './markdown/RenderMarkdown'; import { RenderPlainChatText } from './plaintext/RenderPlainChatText'; import { RenderTextDiff } from './textdiff/RenderTextDiff'; @@ -149,6 +151,29 @@ type BlocksRendererProps = { }; +function ToggleExpansionButton(props: { + color?: ColorPaletteProp; + isCollapsed: boolean; + onToggle: () => void; + sx: SxProps; +}) { + return ( +