@@ -537,33 +537,41 @@ ${msg.error.stack}`,
537
537
model,
538
538
dispatch,
539
539
} ) => {
540
- return d `${ model . messages . map (
541
- ( m , idx ) =>
542
- d `${ messageModel . view ( {
543
- model : m ,
544
- toolManager : model . toolManager ,
545
- dispatch : ( msg ) => {
546
- dispatch ( { type : "message-msg" , msg, idx } ) ;
547
- } ,
548
- } ) } \n`,
549
- ) } ${
550
- model . conversation . state == "message-in-flight"
551
- ? d `Awaiting response ${
552
- MESSAGE_ANIMATION [
553
- Math . floor (
554
- ( new Date ( ) . getTime ( ) - model . conversation . sendDate . getTime ( ) ) /
555
- 333 ,
556
- ) % MESSAGE_ANIMATION . length
557
- ]
558
- } `
559
- : d `Stopped (${ model . conversation . stopReason } ) [input: ${ model . conversation . usage . inputTokens . toString ( ) } , output: ${ model . conversation . usage . outputTokens . toString ( ) } ${
560
- model . conversation . usage . cacheHits !== undefined &&
561
- model . conversation . usage . cacheMisses !== undefined
562
- ? d `, cache hits: ${ model . conversation . usage . cacheHits . toString ( ) } , cache misses: ${ model . conversation . usage . cacheMisses . toString ( ) } `
563
- : ""
564
- } ]`
540
+ return d `${
541
+ model . messages . length
542
+ ? model . messages . map (
543
+ ( m , idx ) =>
544
+ d `${ messageModel . view ( {
545
+ model : m ,
546
+ toolManager : model . toolManager ,
547
+ dispatch : ( msg ) => {
548
+ dispatch ( { type : "message-msg" , msg, idx } ) ;
549
+ } ,
550
+ } ) } \n`,
551
+ )
552
+ : LOGO
553
+ } ${
554
+ model . messages . length
555
+ ? model . conversation . state == "message-in-flight"
556
+ ? d `Awaiting response ${
557
+ MESSAGE_ANIMATION [
558
+ Math . floor (
559
+ ( new Date ( ) . getTime ( ) -
560
+ model . conversation . sendDate . getTime ( ) ) /
561
+ 333 ,
562
+ ) % MESSAGE_ANIMATION . length
563
+ ]
564
+ } `
565
+ : d `Stopped (${ model . conversation . stopReason } ) [input: ${ model . conversation . usage . inputTokens . toString ( ) } , output: ${ model . conversation . usage . outputTokens . toString ( ) } ${
566
+ model . conversation . usage . cacheHits !== undefined &&
567
+ model . conversation . usage . cacheMisses !== undefined
568
+ ? d `, cache hits: ${ model . conversation . usage . cacheHits . toString ( ) } , cache misses: ${ model . conversation . usage . cacheMisses . toString ( ) } `
569
+ : ""
570
+ } ]`
571
+ : ""
565
572
} ${
566
573
model . conversation . state == "stopped" &&
574
+ model . messages . length &&
567
575
! contextManagerModel . isContextEmpty ( model . contextManager )
568
576
? d `\n${ contextManagerModel . view ( {
569
577
model : model . contextManager ,
@@ -641,3 +649,13 @@ ${msg.error.stack}`,
641
649
getMessages,
642
650
} ;
643
651
}
652
+
653
+ const LOGO = d `\
654
+
655
+ ________
656
+ ╱ ╲
657
+ ╱ ╱
658
+ ╱ ╱
659
+ ╲__╱__╱__╱
660
+
661
+ ` ;
0 commit comments