File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,6 +211,32 @@ function SuspenseShikiCodeBlock({
211211 ) ;
212212 }
213213
214+ return (
215+ < UncachedShikiCodeBlock
216+ code = { code }
217+ language = { language }
218+ themeName = { themeName }
219+ cacheKey = { cacheKey }
220+ isStreaming = { isStreaming }
221+ />
222+ ) ;
223+ }
224+
225+ interface UncachedShikiCodeBlockProps {
226+ code : string ;
227+ language : string ;
228+ themeName : DiffThemeName ;
229+ cacheKey : string ;
230+ isStreaming : boolean ;
231+ }
232+
233+ function UncachedShikiCodeBlock ( {
234+ code,
235+ language,
236+ themeName,
237+ cacheKey,
238+ isStreaming,
239+ } : UncachedShikiCodeBlockProps ) {
214240 const highlighter = use ( getHighlighterPromise ( language ) ) ;
215241 const highlightedHtml = useMemo ( ( ) => {
216242 try {
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ interface TimelineRowSharedState {
8787}
8888
8989const TimelineRowCtx = createContext < TimelineRowSharedState > ( null ! ) ;
90+ const TIMELINE_LIST_HEADER = < div className = "h-3 sm:h-4" /> ;
91+ const TIMELINE_LIST_FOOTER = < div className = "h-3 sm:h-4" /> ;
9092
9193// ---------------------------------------------------------------------------
9294// Props (public API)
@@ -261,8 +263,8 @@ export const MessagesTimeline = memo(function MessagesTimeline({
261263 maintainVisibleContentPosition
262264 onScroll = { handleScroll }
263265 className = "h-full overflow-x-hidden overscroll-y-contain px-3 sm:px-5"
264- ListHeaderComponent = { < div className = "h-3 sm:h-4" /> }
265- ListFooterComponent = { < div className = "h-3 sm:h-4" /> }
266+ ListHeaderComponent = { TIMELINE_LIST_HEADER }
267+ ListFooterComponent = { TIMELINE_LIST_FOOTER }
266268 />
267269 </ TimelineRowCtx . Provider >
268270 ) ;
You can’t perform that action at this time.
0 commit comments