@@ -225,20 +225,63 @@ export default function SharedPaperView() {
225
225
) }
226
226
</ div >
227
227
) : (
228
- < div
229
- className = { `flex flex-row h-full relative pr-[60px]` }
230
- >
231
- < PaperMetadata
232
- paperData = { paperData }
233
- hasMessages = { false }
234
- readonly = { true }
235
- />
236
- < AnnotationsView
237
- highlights = { highlights }
238
- annotations = { annotations }
239
- onHighlightClick = { handleHighlightClick }
240
- activeHighlight = { activeHighlight }
241
- readonly = { true }
228
+ < div className = "w-full h-full flex flex-row relative pr-[60px]" >
229
+ < div className = "flex-grow overflow-y-auto" >
230
+ { rightSideFunction === 'Annotations' && (
231
+ < >
232
+ < PaperMetadata
233
+ paperData = { paperData }
234
+ hasMessages = { false }
235
+ readonly = { true }
236
+ />
237
+ < AnnotationsView
238
+ highlights = { highlights }
239
+ annotations = { annotations }
240
+ onHighlightClick = { handleHighlightClick }
241
+ activeHighlight = { activeHighlight }
242
+ readonly = { true }
243
+ />
244
+ </ >
245
+ ) }
246
+ { rightSideFunction === 'Overview' && (
247
+ < div className = { 'flex flex-col md:px-2 m-2 relative animate-fade-in' } >
248
+ { paperData . summary && (
249
+ < div className = "prose dark:prose-invert !max-w-full text-sm mt-4" >
250
+ { memoizedOverviewContent }
251
+ { paperData . summary_citations && paperData . summary_citations . length > 0 && (
252
+ < div className = "mt-0 pt-0 border-t border-gray-300 dark:border-gray-700" id = "references-section" >
253
+ < h4 className = "text-sm font-semibold mb-2" > References</ h4 >
254
+ < ul className = "list-none p-0" >
255
+ { paperData . summary_citations . map ( ( citation , index ) => (
256
+ < div
257
+ key = { index }
258
+ className = { `flex flex-row gap-2 ${ matchesCurrentCitation ( `${ citation . index } ` , 0 ) ? 'bg-blue-100 dark:bg-blue-900 rounded p-1 transition-colors duration-300' : '' } ` }
259
+ id = { `citation-${ citation . index } -${ index } ` }
260
+ onClick = { ( ) => handleCitationClickFromSummary ( `${ citation . index } ` , 0 ) }
261
+ >
262
+ < div className = { 'text-xs text-secondary-foreground' } >
263
+ < span > { citation . index } </ span >
264
+ </ div >
265
+ < div
266
+ id = { `citation-ref-${ citation . index } -${ index } ` }
267
+ className = { 'text-xs text-secondary-foreground' }
268
+ >
269
+ { citation . text }
270
+ </ div >
271
+ </ div >
272
+ ) ) }
273
+ </ ul >
274
+ </ div >
275
+ ) }
276
+ </ div >
277
+ ) }
278
+ </ div >
279
+ ) }
280
+ </ div >
281
+ < PaperSidebar
282
+ rightSideFunction = { rightSideFunction }
283
+ setRightSideFunction = { setRightSideFunction }
284
+ PaperToolset = { SharedPaperToolset }
242
285
/>
243
286
</ div >
244
287
) }
@@ -301,13 +344,20 @@ export default function SharedPaperView() {
301
344
< div className = "w-2/5 h-full flex flex-row relative pr-[60px]" >
302
345
< div className = "flex-grow" >
303
346
{ rightSideFunction === 'Annotations' && (
304
- < AnnotationsView
305
- highlights = { highlights }
306
- annotations = { annotations }
307
- onHighlightClick = { handleHighlightClick }
308
- activeHighlight = { activeHighlight }
309
- readonly = { true }
310
- />
347
+ < >
348
+ < PaperMetadata
349
+ paperData = { paperData }
350
+ hasMessages = { false }
351
+ readonly = { true }
352
+ />
353
+ < AnnotationsView
354
+ highlights = { highlights }
355
+ annotations = { annotations }
356
+ onHighlightClick = { handleHighlightClick }
357
+ activeHighlight = { activeHighlight }
358
+ readonly = { true }
359
+ />
360
+ </ >
311
361
) }
312
362
{ rightSideFunction === 'Overview' && paperData . summary && (
313
363
< div className = { `flex flex-col ${ heightClass } md:px-2 overflow-y-auto m-2 relative animate-fade-in` } >
0 commit comments