@@ -79,8 +79,6 @@ const ScoreChunk = (props: ScoreChunkProps) => {
79
79
( import . meta. env . VITE_SEARCH_UI_URL as string | undefined ) ??
80
80
"https://search.trieve.ai" ;
81
81
82
- const linesBeforeShowMore = 12 ;
83
-
84
82
const [ expanded , setExpanded ] = createSignal ( props . initialExpanded ?? false ) ;
85
83
const [ copied , setCopied ] = createSignal ( false ) ;
86
84
const [ expandMetadata , setExpandMetadata ] = createSignal ( false ) ;
@@ -127,7 +125,7 @@ const ScoreChunk = (props: ScoreChunkProps) => {
127
125
128
126
const useExpand = createMemo ( ( ) => {
129
127
if ( ! props . chunk . chunk_html ) return false ;
130
- return props . chunk . chunk_html . split ( " " ) . length > 20 * linesBeforeShowMore ;
128
+ return props . chunk . chunk_html . split ( " " ) . length > 20 * 15 ;
131
129
} ) ;
132
130
133
131
return (
@@ -344,11 +342,7 @@ const ScoreChunk = (props: ScoreChunkProps) => {
344
342
"text-ellipsis max-w-[100%] w-full break-words space-y-5 leading-normal !text-black dark:!text-white" :
345
343
true ,
346
344
} }
347
- style = {
348
- useExpand ( ) && ! expanded ( )
349
- ? { "-webkit-line-clamp" : linesBeforeShowMore }
350
- : { }
351
- }
345
+ style = { useExpand ( ) && ! expanded ( ) ? { "-webkit-line-clamp" : 15 } : { } }
352
346
// eslint-disable-next-line solid/no-innerhtml, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
353
347
innerHTML = { sanitizeHtml (
354
348
props . chunk . chunk_html !== undefined
@@ -361,10 +355,7 @@ const ScoreChunk = (props: ScoreChunkProps) => {
361
355
/>
362
356
< Show when = { useExpand ( ) } >
363
357
< button
364
- classList = { {
365
- "ml-2 font-semibold" : true ,
366
- "text-neutral-300 dark:text-neutral-500" : ! props . showExpand ,
367
- } }
358
+ class = "ml-2 font-semibold !text-black dark:!text-white"
368
359
disabled = { ! props . showExpand }
369
360
onClick = { ( ) => setExpanded ( ( prev ) => ! prev ) }
370
361
>
0 commit comments