File tree Expand file tree Collapse file tree 1 file changed +24
-12
lines changed
apps/dashboard/src/app/nebula-app/(app)/components/Reasoning Expand file tree Collapse file tree 1 file changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ export function Reasoning(props: {
1111} ) {
1212 const [ _isOpen , setIsOpen ] = useState ( false ) ;
1313 const isOpen = props . isPending ? true : _isOpen ;
14+ const showAll = ! props . isPending ;
15+ const lastText = props . texts [ props . texts . length - 1 ] ;
1416
1517 return (
1618 < DynamicHeight >
@@ -23,7 +25,7 @@ export function Reasoning(props: {
2325 { props . isPending ? (
2426 < TextShimmer text = "Reasoning..." />
2527 ) : (
26- < span > Reasoning</ span >
28+ < span className = "text-foreground" > Reasoning</ span >
2729 ) }
2830
2931 { ! props . isPending && (
@@ -36,17 +38,27 @@ export function Reasoning(props: {
3638 ) }
3739 </ Button >
3840
39- { isOpen && props . texts . length > 0 && (
40- < ul className = "list-none space-y-1.5" >
41- { props . texts . map ( ( text ) => (
42- < li
43- key = { text }
44- className = "fade-in-0 animate-in text-muted-foreground text-sm leading-relaxed duration-300"
45- >
46- { text . trim ( ) }
47- </ li >
48- ) ) }
49- </ ul >
41+ { isOpen && (
42+ < >
43+ { showAll && props . texts . length > 0 && (
44+ < ul className = "list-none space-y-1.5" >
45+ { props . texts . map ( ( text ) => (
46+ < li
47+ key = { text }
48+ className = "fade-in-0 animate-in text-muted-foreground text-sm leading-relaxed duration-300"
49+ >
50+ { text . trim ( ) }
51+ </ li >
52+ ) ) }
53+ </ ul >
54+ ) }
55+
56+ { ! showAll && lastText && (
57+ < div className = "text-muted-foreground text-sm leading-relaxed" >
58+ { lastText . trim ( ) }
59+ </ div >
60+ ) }
61+ </ >
5062 ) }
5163 </ DynamicHeight >
5264 ) ;
You can’t perform that action at this time.
0 commit comments