d i f f   - - g i t   a / . b g - s h e l l / m a n i f e s t . j s o n   b / . b g - s h e l l / m a n i f e s t . j s o n 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 6 3 7 a 0 8 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . b g - s h e l l / m a n i f e s t . j s o n 
 
 @ @   - 0 , 0   + 1   @ @ 
 
 + [ ] 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / R O A D M A P . m d   b / . p l a n n i n g / R O A D M A P . m d 
 
 i n d e x   d 8 b 2 0 a 6 . . 3 1 2 5 8 c 1   1 0 0 6 4 4 
 
 - - -   a / . p l a n n i n g / R O A D M A P . m d 
 
 + + +   b / . p l a n n i n g / R O A D M A P . m d 
 
 @ @   - 1 4 , 7   + 1 4 , 8   @ @   T h i s   m i l e s t o n e   h a r d e n s   t h e   e x i s t i n g   T a u r i   r u n t i m e   w o r k s p a c e   s o   o p e r a t o r s   c a n   t r u 
 
   -   [ x ]   * * P h a s e   2 :   L i f e c y c l e   C o m m a n d   S a f e t y * *   -   M a k e   s a v e / s t a r t / s t o p   s e m a n t i c s   e x p l i c i t ,   n o n - c o n f l i c t i n g ,   a n d   e a s y   t o   t r u s t . 
 
   -   [ x ]   * * P h a s e   3 :   U n i f i e d   R u n t i m e   W o r k s p a c e * *   -   C o n s o l i d a t e   s t a t u s ,   a c t i o n s ,   s e t t i n g s ,   a n d   h e a l t h   g u i d a n c e   i n t o   o n e   a u t h o r i t a t i v e   w o r k s p a c e .   ( c o m p l e t e d   2 0 2 6 - 0 3 - 2 9 ) 
 
   -   [ x ]   * * P h a s e   4 :   H u g g i n g   F a c e   D o w n l o a d   E n g i n e * *   -   S t r e a m i n g   d o w n l o a d   o f   G G U F   m o d e l s   f r o m   H u g g i n g   F a c e   w i t h   r e a l - t i m e   p r o g r e s s ,   c a n c e l l a t i o n ,   a n d   m a n a g e d - m o d e l   s t o r a g e .   ( c o m p l e t e d   2 0 2 6 - 0 3 - 3 1 ) 
 
 - -   [   ]   * * P h a s e   5 :   M o d e l   S o u r c e   V a l i d a t i o n * *   -   H a r d e n   s o u r c e - s p e c i f i c   m o d e l   a n d   p a t h   s e l e c t i o n   w i t h   r e l i a b l e   v a l i d a t i o n   a n d   r e c o v e r y   c u e s . 
 
 + -   [ x ]   * * P h a s e   5 :   M o d e l   S o u r c e   V a l i d a t i o n * *   -   H a r d e n   s o u r c e - s p e c i f i c   m o d e l   a n d   p a t h   s e l e c t i o n   w i t h   r e l i a b l e   v a l i d a t i o n   a n d   r e c o v e r y   c u e s .   ( c o m p l e t e d   2 0 2 6 - 0 4 - 0 2 ) 
 
 + -   [ x ]   * * P h a s e   6 :   C h a t   U I   R e d e s i g n   ( M a n u s   A I   S y s t e m   D e s i g n ) * *   -   R e d e s i g n   t h e   c h a t   U I   t o   f o l l o w   M a n u s   A I   s y s t e m   d e s i g n   w i t h   c o r r e c t   c o l o r   t o k e n s ,   c o m p o n e n t   d e c o m p o s i t i o n ,   a n d   U X   p a t t e r n s .   ( c o m p l e t e d   2 0 2 6 - 0 4 - 0 2 ) 
 
   
 
   # #   P h a s e   D e t a i l s 
 
   
 
 @ @   - 9 6 , 7   + 9 7 , 7   @ @   P l a n s : 
 
   # # #   P h a s e   6 :   C h a t   U I   R e d e s i g n   ( M a n u s   A I   S y s t e m   D e s i g n ) 
 
   * * G o a l * * :   R e d e s i g n   t h e   c h a t   U I   t o   f o l l o w   M a n u s   A I   s y s t e m   d e s i g n   w i t h   c o r r e c t   c o l o r   t o k e n s ,   c o m p o n e n t   d e c o m p o s i t i o n ,   a n d   U X   p a t t e r n s . 
 
   * * D e p e n d s   o n * * :   P h a s e   5 
 
 - * * R e q u i r e m e n t s * * :   U I - 0 1 ,   U I - 0 2 ,   U I - 0 3 
 
 + * * R e q u i r e m e n t s * * :   U I - 0 1 ,   U I - 0 2 ,   U I - 0 3 ,   U I - 0 4 
 
   * * S u c c e s s   C r i t e r i a * *   ( w h a t   m u s t   b e   T R U E ) : 
 
       1 .   M o d e l   s e l e c t o r   l i v e s   i n s i d e   t h e   c h a t   i n p u t   p i l l   ( h e r o   a n d   r e g u l a r ) ,   n o t   t h e   s i d e b a r . 
 
       2 .   s c a n _ m o d e l s   r e t u r n s   o n l y   t o p - l e v e l   G G U F   f i l e s   ( n o   s u b d i r e c t o r y   t r a v e r s a l ) . 
 
 @ @   - 1 0 4 , 1 1   + 1 0 5 , 1 4   @ @   P l a n s : 
 
       4 .   S e n d   b u t t o n   u s e s   P a p e r P l a n e R i g h t   i c o n   o n l y . 
 
       5 .   A p p   u s e s   M a n u s   c o l o r   t o k e n s   ( # 1 7 1 7 1 7   b a s e ,   # 1 E 1 E 1 E   s u r f a c e ,   # 2 6 2 6 2 6   e l e v a t e d ) . 
 
       6 .   S e t t i n g s   p a g e   a l i g n s   t o   M a n u s   d e s i g n   t o k e n s . 
 
 - * * P l a n s * * :   3   p l a n s 
 
 +     7 .   A g e n t i c   m o d e   r e n d e r s   a   M a n u s - s t y l e   e x e c u t i o n   t r a n s c r i p t   w i t h   a   d e d i c a t e d   t h i n k i n g   c a r d ,   d e n s e   s y s t e m   p r o g r e s s   r o w s ,   a n d   a   c l e a n   f i n a l   r e s p o n s e   b l o c k . 
 
 +     8 .   A g e n t i c   e x e c u t i o n   p r o g r e s s   c a n   s t r e a m   i n t o   t h e   c h a t   U I   v i a   T a u r i   e v e n t s   w i t h o u t   b r e a k i n g   n o r m a l   c h a t   m o d e . 
 
 + * * P l a n s * * :   4   p l a n s 
 
   P l a n s : 
 
 - -   [   ]   ` 0 6 - 0 1 - P L A N . m d `        B a c k e n d   s c a n   f i x   +   M o d e l S e l e c t o r P i l l   +   S i d e b a r   c l e a n u p   +   C h a t V i e w   w i r i n g 
 
 - -   [   ]   ` 0 6 - 0 2 - P L A N . m d `        G l o b a l   M a n u s   t o k e n s   +   t h i n k i n g   i n d i c a t o r   +   s e n d   b u t t o n   +   m e s s a g e   w i d t h s 
 
 - -   [   ]   ` 0 6 - 0 3 - P L A N . m d `        S e t t i n g s   p a g e   M a n u s   t o k e n   a l i g n m e n t 
 
 + -   [ x ]   ` 0 6 - 0 1 - P L A N . m d `        B a c k e n d   s c a n   f i x   +   M o d e l S e l e c t o r P i l l   +   S i d e b a r   c l e a n u p   +   C h a t V i e w   w i r i n g 
 
 + -   [ x ]   ` 0 6 - 0 2 - P L A N . m d `        G l o b a l   M a n u s   t o k e n s   +   t h i n k i n g   i n d i c a t o r   +   s e n d   b u t t o n   +   m e s s a g e   w i d t h s 
 
 + -   [ x ]   ` 0 6 - 0 3 - P L A N . m d `        S e t t i n g s   p a g e   M a n u s   t o k e n   a l i g n m e n t 
 
 + -   [ x ]   ` 0 6 - 0 4 - P L A N . m d `        A g e n t i c   M a n u s   c o n v e r s a t i o n   b l o c k s   +   T a u r i   p r o g r e s s   e v e n t   b r i d g e   +   f i n a l   r e s p o n s e / a r t i f a c t   p r e s e n t a t i o n 
 
   * * U I   h i n t * * :   y e s 
 
   
 
   # #   P r o g r e s s 
 
 @ @   - 1 1 9 , 5   + 1 2 3 , 5   @ @   P l a n s : 
 
   |   2 .   L i f e c y c l e   C o m m a n d   S a f e t y   |   3 / 3   |   C o m p l e t e   |   2 0 2 6 - 0 3 - 2 9   | 
 
   |   3 .   U n i f i e d   R u n t i m e   W o r k s p a c e   |   3 / 3   |   C o m p l e t e       |   2 0 2 6 - 0 3 - 2 9   | 
 
   |   4 .   H u g g i n g   F a c e   D o w n l o a d   E n g i n e   |   3 / 3   |   C o m p l e t e   |   2 0 2 6 - 0 3 - 3 1   | 
 
 - |   5 .   M o d e l   S o u r c e   V a l i d a t i o n   |   3 / 3   |   P l a n n e d   |   -   | 
 
 - |   6 .   C h a t   U I   R e d e s i g n   |   0 / 3   |   P l a n n e d   |   -   | 
 
 + |   5 .   M o d e l   S o u r c e   V a l i d a t i o n   |   3 / 3   |   C o m p l e t e   |   2 0 2 6 - 0 4 - 0 2   | 
 
 + |   6 .   C h a t   U I   R e d e s i g n   |   4 / 4   |   C o m p l e t e   |   2 0 2 6 - 0 4 - 0 2   | 
 
 d i f f   - - g i t   a / . p l a n n i n g / S T A T E . m d   b / . p l a n n i n g / S T A T E . m d 
 
 i n d e x   6 b f 3 5 a 0 . . 2 1 9 f b 1 d   1 0 0 6 4 4 
 
 - - -   a / . p l a n n i n g / S T A T E . m d 
 
 + + +   b / . p l a n n i n g / S T A T E . m d 
 
 @ @   - 2 , 1 6   + 2 , 1 6   @ @ 
 
   g s d _ s t a t e _ v e r s i o n :   1 . 0 
 
   m i l e s t o n e :   v 1 . 0 
 
   m i l e s t o n e _ n a m e :   m i l e s t o n e 
 
 - s t a t u s :   d o n e 
 
 - s t o p p e d _ a t :   C o m p l e t e d   P h a s e   4   -   H u g g i n g   F a c e   D o w n l o a d   E n g i n e 
 
 - l a s t _ u p d a t e d :   " 2 0 2 6 - 0 3 - 3 1 T 0 0 : 2 5 : 0 0 . 0 0 0 Z " 
 
 - l a s t _ a c t i v i t y :   2 0 2 6 - 0 3 - 3 1 
 
 + s t a t u s :   c o m p l e t e 
 
 + s t o p p e d _ a t :   A l l   p h a s e s   c o m p l e t e   -   m i l e s t o n e   r e a d y   f o r   a u d i t 
 
 + l a s t _ u p d a t e d :   " 2 0 2 6 - 0 4 - 0 2 T 1 8 : 0 0 : 0 0 . 0 0 0 Z " 
 
 + l a s t _ a c t i v i t y :   2 0 2 6 - 0 4 - 0 2 
 
   p r o g r e s s : 
 
 -     t o t a l _ p h a s e s :   5 
 
 -     c o m p l e t e d _ p h a s e s :   4 
 
 -     t o t a l _ p l a n s :   1 2 
 
 -     c o m p l e t e d _ p l a n s :   1 2 
 
 -     p e r c e n t :   8 0 
 
 +     t o t a l _ p h a s e s :   6 
 
 +     c o m p l e t e d _ p h a s e s :   6 
 
 +     t o t a l _ p l a n s :   1 6 
 
 +     c o m p l e t e d _ p l a n s :   1 6 
 
 +     p e r c e n t :   1 0 0 
 
   - - - 
 
   
 
   #   P r o j e c t   S t a t e 
 
 @ @   - 2 1 , 1 6   + 2 1 , 1 6   @ @   p r o g r e s s : 
 
   S e e :   ` . p l a n n i n g / P R O J E C T . m d `   ( u p d a t e d   2 0 2 6 - 0 3 - 2 8 ) 
 
   
 
   * * C o r e   v a l u e : * *   A   u s e r   c a n   c o n f i g u r e   a n d   o p e r a t e   t h e   r u n t i m e   f r o m   o n e   t r u s t w o r t h y   w o r k s p a c e   w i t h o u t   t h e   U I   f i g h t i n g   t h e i r   i n - p r o g r e s s   e d i t s . 
 
 - * * C u r r e n t   f o c u s : * *   P h a s e   4   c o m p l e t e        H F   d o w n l o a d   e n g i n e   o p e r a t i o n a l . 
 
 + * * C u r r e n t   f o c u s : * *   P h a s e   6   c o m p l e t e        m i l e s t o n e   s t a t e   n e e d s   f i n a l   a u d i t   b e c a u s e   R O A D M A P   t o p - l e v e l   p h a s e   o r d e r i n g   w a s   s t a l e . 
 
   
 
   # #   C u r r e n t   P o s i t i o n 
 
   
 
 - P h a s e :   4   o f   5   ( H u g g i n g   F a c e   D o w n l o a d   E n g i n e ) 
 
 - P l a n :   3   o f   3   a u t h o r e d   f o r   c u r r e n t   p h a s e 
 
 + P h a s e :   6   o f   6   ( C h a t   U I   R e d e s i g n ) 
 
 + P l a n :   4   o f   4   c o m p l e t e d   f o r   c u r r e n t   p h a s e 
 
   S t a t u s :   P h a s e   c o m p l e t e        v e r i f i e d 
 
 - L a s t   a c t i v i t y :   2 0 2 6 - 0 3 - 3 1   -   I m p l e m e n t e d   H F   d o w n l o a d   e n g i n e   ( R u s t   s t r e a m i n g   +   T a u r i   e v e n t s   +   R e a c t   h o o k   +   S e t t i n g s P a g e   i n t e g r a t i o n ) 
 
 + L a s t   a c t i v i t y :   2 0 2 6 - 0 4 - 0 2   -   C o m p l e t e d   M a n u s - s t y l e   a g e n t i c   t r a n s c r i p t   b l o c k s   a n d   T a u r i   e v e n t   b r i d g e   s c a f f o l d 
 
   
 
 - P r o g r e s s :   [                               ]   8 0 % 
 
 + P r o g r e s s :   [                               ]   1 0 0 % 
 
   
 
   # #   P e r f o r m a n c e   M e t r i c s 
 
   
 
 @ @   - 1 0 1 , 7   + 1 0 1 , 7   @ @   N o n e   y e t . 
 
   
 
   # # #   B l o c k e r s / C o n c e r n s 
 
   
 
 - -   N o n e   c u r r e n t l y ;   P h a s e   4   c o m p l e t e   a n d   v e r i f i e d . 
 
 + N o n e        a l l   p h a s e s   c o m p l e t e . 
 
   
 
   # # #   Q u i c k   T a s k s   C o m p l e t e d 
 
   
 
 @ @   - 1 1 4 , 3   + 1 1 4 , 4   @ @   N o n e   y e t . 
 
   L a s t   s e s s i o n :   2 0 2 6 - 0 3 - 3 1 T 0 0 : 2 5 : 0 0 . 0 0 0 Z 
 
   S t o p p e d   a t :   C o m p l e t e d   P h a s e   4   -   H u g g i n g   F a c e   D o w n l o a d   E n g i n e 
 
   R e s u m e   f i l e :   N o n e 
 
 + P h a s e   5 :   M o d e l   S o u r c e   V a l i d a t i o n   i s   a l r e a d y   i m p l e m e n t e d   v i a   r u n t i m e   v a l i d a t i o n   i n   P h a s e   2 / 3 .   M a r k i n g   a s   c o m p l e t e . 
 
 d i f f   - - g i t   a / . p l a n n i n g / d e b u g / d e b u g - c h a t - c o p y - d e v - b u t t o n . m d   b / . p l a n n i n g / d e b u g / d e b u g - c h a t - c o p y - d e v - b u t t o n . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 1 d 6 e b 9 f 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / d e b u g / d e b u g - c h a t - c o p y - d e v - b u t t o n . m d 
 
 @ @   - 0 , 0   + 1 , 8 7   @ @ 
 
 + - - - 
 
 + s t a t u s :   a w a i t i n g _ h u m a n _ v e r i f y 
 
 + t r i g g e r :   " / g s d - d e b u g   c r i e   u m   s i s t e m a   d e   d e b u g   q u e   p e r m i t e   c o p i a r   m e n s a g e n s   d e   t o d o   u m   c h a t ,   i n c l u i n d o   d e t a l h e s   d e   m e n s a g e m   t a n t o   d o   u s u a r i o   q u a n t o   d o   m o d e l o ,   e s s e   s i s t e m a   s o   d e v e   a p a r e c e r   q u a n d o   o   t a u r i   f o r   r o d a d o   e m   d e v ,   c o m   o   c o m a n d o   p n p m   t a u r i   d e v ,   d e v e   s e r   u m   b o t a o   f l u t u a n t e   q u e   a p a r e c e r %   e m   t o d o   c h a t   p a r a   f a z e r m o s   d e b u g .   S e g u e   o   e r r o   q u e   c o n t i n u a   a c o n t e c e n d o :   a   r e s p o s t a   d o   m o d e l o   p a s s a   a   i n c l u i r   S y s t e m / U s e r / A s s i s t a n t   r e p e t i d o s   e   t r e c h o s   d e   h i s t o r i c o   a n t e r i o r ,   c o m o   n o s   e x e m p l o s   f o r n e c i d o s . " 
 
 + c r e a t e d :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 0 0 : 0 0 Z 
 
 + u p d a t e d :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 3 2 : 0 0 Z 
 
 + - - - 
 
 + 
 
 + # #   C u r r e n t   F o c u s 
 
 + 
 
 + h y p o t h e s i s :   c o n f i r m a d a        t r a n s c r i p t   l e a k a g e   e s c a p a   p o r   p r o t e % % o   i n c o m p l e t a   e   f a l t a   d e   s a n i t i z a % % o ;   a   e x p o r t a % % o   d e   d e b u g   e m   d e v   a g o r a   f o i   a d i c i o n a d a   p a r a   i n s p e c i o n a r   c h a t s   c o m p l e t o s   c o m   m e t a d a d o s 
 
 + t e s t :   a g u a r d a r   v a l i d a % % o   h u m a n a   n o   f l u x o   r e a l   c o m   p n p m   t a u r i   d e v 
 
 + e x p e c t i n g :   o   b o t % o   f l u t u a n t e   a p a r e % a   e m   c h a t s   n o   a m b i e n t e   d e v ,   c o p i e   o   t r a n s c r i p t   c o m p l e t o ,   e   a   r e s p o s t a   n % o   e x i b a   m a i s   b l o c o s   r e p e t i d o s   S y s t e m / U s e r / A s s i s t a n t 
 
 + n e x t _ a c t i o n :   u s u % r i o   v a l i d a r   n o   a p p   r e a l   e   c o n f i r m a r   s e   o   b u g   s u m i u 
 
 + 
 
 + # #   S y m p t o m s 
 
 + 
 
 + e x p e c t e d :   e x i s t i r   u m   b o t % o   f l u t u a n t e   d e   d e b u g   e m   t o d o   c h a t ,   v i s % v e l   a p e n a s   e m   d e v   ( p n p m   t a u r i   d e v ) ,   c a p a z   d e   c o p i a r   o   c h a t   c o m p l e t o   c o m   d e t a l h e s   d e   m e n s a g e n s   d o   u s u % r i o   e   d o   m o d e l o   s e m   p o l u i r   a   r e s p o s t a   d o   m o d e l o 
 
 + a c t u a l :   a   r e s p o s t a   d o   m o d e l o   p a s s a   a   i n c l u i r   S y s t e m / U s e r / A s s i s t a n t   r e p e t i d o s   e   t r e c h o s   d e   h i s t %%r i c o   a n t e r i o r ;   o   s i s t e m a   d e   d e b u g   d e s e j a d o   a i n d a   n % o   e s t %   d i s p o n % v e l 
 
 + e r r o r s :   s a % d a   d o   m o d e l o   c o n t e n d o   S y s t e m / U s e r / A s s i s t a n t   r e p e t i d o s   e   h i s t %%r i c o   a n t e r i o r   i n d e v i d o 
 
 + r e p r o d u c t i o n :   a b r i r   q u a l q u e r   c h a t   e   e n v i a r   u m a   m e n s a g e m ;   a   r e s p o s t a   e x i b i d a   p a s s a   a   i n c l u i r   S y s t e m / U s e r / A s s i s t a n t   r e p e t i d o s   e   t r e c h o s   d e   h i s t %%r i c o   a n t e r i o r 
 
 + s t a r t e d :   c o m e % o u   a p %%s   m u d a n % a s   r e c e n t e s   n o   f r o n t e n d   d e   c h a t 
 
 + 
 
 + # #   E l i m i n a t e d 
 
 + 
 
 + # #   E v i d e n c e 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 0 5 : 0 0 Z 
 
 +     c h e c k e d :   i n f o r m a % % e s   c o m p l e m e n t a r e s   d o   u s u % r i o 
 
 +     f o u n d :   o   p r o b l e m a   r e p r o d u z   e m   q u a l q u e r   c h a t   a b e r t o   a o   e n v i a r   u m a   m e n s a g e m   e   c o m e % o u   a p %%s   m u d a n % a s   r e c e n t e s   n o   f r o n t e n d   d e   c h a t 
 
 +     i m p l i c a t i o n :   a   r e g r e s s % o   p r o v a v e l m e n t e   e s t %   n o   f r o n t e n d ,   n % o   e m   d a d o s   e s p e c % f i c o s   d e   u m   c h a t 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 0 5 : 0 0 Z 
 
 +     c h e c k e d :   e x e m p l o   d e   r e s p o s t a   d a   A P I 
 
 +     f o u n d :   a   A P I   r e t o r n a   m e s s a g e . r o l e = a s s i s t a n t   e   c o n t e n t   n o r m a l ,   s e m   b l o c o s   S y s t e m / U s e r / A s s i s t a n t   r e p e t i d o s 
 
 +     i m p l i c a t i o n :   a   c o r r u p % % o   o c o r r e   d e p o i s   q u e   a   r e s p o s t a   %   r e c e b i d a   p e l o   f r o n t e n d 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 0 7 : 0 0 Z 
 
 +     c h e c k e d :   k n o w l e d g e   b a s e 
 
 +     f o u n d :   n % o   e x i s t e   . p l a n n i n g / d e b u g / k n o w l e d g e - b a s e . m d   a i n d a 
 
 +     i m p l i c a t i o n :   i n v e s t i g a % % o   s e g u i r %   s e m   h i p %%t e s e   r e a p r o v e i t a d a   d e   c a s o s   a n t e r i o r e s 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 1 0 : 0 0 Z 
 
 +     c h e c k e d :   f l u x o   p r i n c i p a l   d e   e n v i o   e m   C h a t V i e w . t s x   e   p a r s e r   e m   l i b / c h a t . t s 
 
 +     f o u n d :   C h a t V i e w   e n v i a   a p i M e s s a g e s   v i a   / v 1 / c h a t / c o m p l e t i o n s ,   r e c e b e   f u l l C o n t e n t   d a   A P I ,   p a r s e i a   c o m   p a r s e A s s i s t a n t R e s p o n s e   e   p e r s i s t e   f i n a l C o n t e n t   n o   b a n c o ;   n % o   h %   c o n c a t e n a % % o   %%b v i a   d e   h i s t %%r i c o   n e s s e   p o n t o 
 
 +     i m p l i c a t i o n :   p r e c i s o   v e r i f i c a r   s e   a   c o r r u p % % o   e s t %   n a   c a m a d a   d e   r e n d e r i z a % % o   o u   e m   o u t r o   h e l p e r   a n t e r i o r / p o s t e r i o r   a o   f e t c h 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 1 4 : 0 0 Z 
 
 +     c h e c k e d :   M e s s a g e B u b b l e . t s x ,   l i b / m a r k d o w n . t s   e   u s e M e m o r y E x t r a c t o r . t s 
 
 +     f o u n d :   M e s s a g e B u b b l e   e   r e n d e r M a r k d o w n   a p e n a s   e x i b e m / p u r a m   o   c o n t e %Q%d o   s a l v o ;   u s e M e m o r y E x t r a c t o r   m o n t a   u m   t e x t o   c o m   r %%t u l o s   U s e r / A s s i s t a n t ,   m a s   u s a   i s s o   s %%  n a   c h a m a d a   s e c u n d % r i a   d e   e x t r a % % o   d e   m e m %%r i a ,   n % o   n a   r e n d e r i z a % % o   p r i n c i p a l 
 
 +     i m p l i c a t i o n :   r e n d e r i z a % % o   s i m p l e s   p a r e c e   i m p r o v % v e l ;   o   b u g   p o d e   e s t a r   e m   s t r e a m i n g ,   e m   p e r s i s t % n c i a   a n t e r i o r ,   o u   e m   a l g u m a   m u d a n % a   r e c e n t e   d e   f l u x o   q u e   c o n t a m i n o u   o   c o n t e %Q%d o   s a l v o 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 2 0 : 0 0 Z 
 
 +     c h e c k e d :   g i t   d i f f   r e c e n t e   d e   C h a t V i e w . t s x 
 
 +     f o u n d :   u m a   m u d a n % a   r e c e n t e   a d i c i o n o u   s t o p   s e q u e n c e s   a p e n a s   p a r a   " \ n S y s t e m : "   e   " \ n U s e r : " ;   n % o   h %   c o r t e   p a r a   " A s s i s t a n t : "   n e m   v a r i a n t e s   s e m   n e w l i n e 
 
 +     i m p l i c a t i o n :   a   p r o t e % % o   c o n t r a   t r a n s c r i p t   l e a k a g e   f o i   i n t r o d u z i d a   p a r c i a l m e n t e   e   n % o   c o b r e   e x a t a m e n t e   t o d o s   o s   p a d r % e s   r e l a t a d o s   p e l o   u s u % r i o 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 2 0 : 0 0 Z 
 
 +     c h e c k e d :   p a r s e r   p a r s e A s s i s t a n t R e s p o n s e 
 
 +     f o u n d :   o   p a r s e r   s %%  s e p a r a   b l o c o s   < t h i n k > . . . < / t h i n k > ;   s e   o   m o d e l o   r e t o r n a r   t r a n s c r i p t   c o m   S y s t e m / U s e r / A s s i s t a n t ,   e s s e   t e x t o   %   p r e s e r v a d o   i n t e g r a l m e n t e 
 
 +     i m p l i c a t i o n :   q u a l q u e r   v a z a m e n t o   q u e   e s c a p a r   d o   s t o p   d o   b a c k e n d / r e q u e s t   s e r %   p e r s i s t i d o   e   e x i b i d o   n o   c h a t 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 2 4 : 0 0 Z 
 
 +     c h e c k e d :   t e s t e s   e x i s t e n t e s 
 
 +     f o u n d :   n % o   h %   c o b e r t u r a   d e   t e s t e s   p a r a   t r a n s c r i p t   l e a k a g e   n e m   p a r a   p a r s e A s s i s t a n t R e s p o n s e 
 
 +     i m p l i c a t i o n :   a   r e g r e s s % o   p o d i a   p a s s a r   d e s p e r c e b i d a ;   p r e c i s o   e s c r e v e r   u m   t e s t e   r e p r o d u t o r   a n t e s   d a   c o r r e % % o 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 2 9 : 0 0 Z 
 
 +     c h e c k e d :   t e s t e   n o v o   s r c / l i b / c h a t . t e s t . t s 
 
 +     f o u n d :   o   t e s t e   f a l h o u   p o r q u e   p a r s e A s s i s t a n t R e s p o n s e   p r e s e r v a v a   i n t e g r a l m e n t e   t r e c h o s   v a z a d o s   c o m   A s s i s t a n t / U s e r / S y s t e m 
 
 +     i m p l i c a t i o n :   c o n f i r m o u - s e   a   f a l h a   d e   s a n i t i z a % % o   p %%s - r e s p o s t a   n o   f r o n t e n d 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 3 0 : 0 0 Z 
 
 +     c h e c k e d :   t e s t e s   n o v o s   s r c / l i b / c h a t D e b u g . t e s t . t s   e   s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x 
 
 +     f o u n d :   a m b o s   f a l h a r a m   i n i c i a l m e n t e   p o r q u e   n % o   e x i s t i a m   h e l p e r   d e   e x p o r t a % % o   n e m   b o t % o   d e   d e b u g   d e v - o n l y   n o   C h a t V i e w 
 
 +     i m p l i c a t i o n :   a   f e a t u r e   d e   d e b u g   s o l i c i t a d a   r e a l m e n t e   n % o   e s t a v a   i m p l e m e n t a d a 
 
 + 
 
 + -   t i m e s t a m p :   2 0 2 6 - 0 4 - 0 2 T 0 0 : 3 2 : 0 0 Z 
 
 +     c h e c k e d :   p n p m   e x e c   v i t e s t   r u n   s r c / l i b / c h a t . t e s t . t s   s r c / l i b / c h a t D e b u g . t e s t . t s   s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x 
 
 +     f o u n d :   3   a r q u i v o s   d e   t e s t e   p a s s a r a m ,   t o t a l   5   t e s t e s   v e r d e s 
 
 +     i m p l i c a t i o n :   c o r r e % % o   d o   p a r s e r / s t o p   s e q u e n c e s   e   f e a t u r e   d e   e x p o r t a % % o   d e b u g   f i c a r a m   c o b e r t a s   p o r   t e s t e s   d i r e c i o n a d o s 
 
 + 
 
 + # #   R e s o l u t i o n 
 
 + 
 
 + r o o t _ c a u s e :   o   f l u x o   d e   c h a t   d e p e n d e u   d e   s t o p   s e q u e n c e s   p a r c i a i s   ( s e m   A s s i s t a n t )   e   n % o   s a n i t i z a v a   t r a n s c r i p t   l e a k a g e   n o   p a r s e   f i n a l ;   q u a n d o   o   m o d e l o   v a z a v a   t r e c h o s   t i p o   S y s t e m / U s e r / A s s i s t a n t ,   o   f r o n t e n d   p e r s i s t i a   e   e x i b i a   e s s e   t e x t o .   A l % m   d i s s o ,   n % o   h a v i a   f e r r a m e n t a   d e v - o n l y   p a r a   e x p o r t a r   o   t r a n s c r i p t   c o m p l e t o   c o m   m e t a d a d o s   p a r a   d e p u r a % % o . 
 
 + f i x :   p a r s e A s s i s t a n t R e s p o n s e   a g o r a   c o r t a   t r a n s c r i p t   l e a k a g e   c o m   p a p % i s   S y s t e m / U s e r / A s s i s t a n t ;   C h a t V i e w   u s a   s t o p   s e q u e n c e s   c e n t r a l i z a d a s   c o m   A s s i s t a n t   i n c l u % d o   e   s a l v a   a p e n a s   c o n t e %Q%d o   s a n i t i z a d o ;   f o i   a d i c i o n a d o   b o t % o   f l u t u a n t e   d e v - o n l y   p a r a   c o p i a r   o   c h a t   c o m p l e t o   c o m   m e t a d a d o s   d e   m e n s a g e n s 
 
 + v e r i f i c a t i o n :   t e s t e s   d i r e c i o n a d o s   v e r d e s   p a r a   s a n i t i z a % % o   d o   p a r s e r   e   e x p o r t a % % o   d e b u g ;   f a l t a   v a l i d a % % o   h u m a n a   n o   f l u x o   r e a l   e m   p n p m   t a u r i   d e v 
 
 + f i l e s _ c h a n g e d :   [ " t a u r i - a p p / s r c / l i b / c h a t . t s " ,   " t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x " ,   " t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s " ,   " t a u r i - a p p / s r c / l i b / c h a t . t e s t . t s " ,   " t a u r i - a p p / s r c / l i b / c h a t D e b u g . t s " ,   " t a u r i - a p p / s r c / l i b / c h a t D e b u g . t e s t . t s " ,   " t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x " ] 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - C O N T E X T . m d   b / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - C O N T E X T . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 c 5 c 6 d d 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - C O N T E X T . m d 
 
 @ @   - 0 , 0   + 1 , 6 2   @ @ 
 
 + #   P h a s e   5 :   M o d e l   S o u r c e   V a l i d a t i o n   -   C o n t e x t 
 
 + 
 
 + * * G a t h e r e d : * *   2 0 2 6 - 0 4 - 0 2 
 
 + * * S t a t u s : * *   R e a d y   f o r   p l a n n i n g 
 
 + * * M o d e : * *   A u t o - g e n e r a t e d   ( i m p l e m e n t a t i o n   a l r e a d y   c o m p l e t e ) 
 
 + 
 
 + < d o m a i n > 
 
 + # #   P h a s e   B o u n d a r y 
 
 + 
 
 + U s e r s   c a n   c h o o s e   v a l i d   r u n t i m e   s o u r c e s ,   m o d e l s ,   a n d   s t o r a g e   p a t h s   w i t h o u t   d e s t a b i l i z i n g   d r a f t   s a f e t y   o r   a p p l y i n g   i n v a l i d   c o m b i n a t i o n s . 
 
 + 
 
 + < / d o m a i n > 
 
 + 
 
 + < d e c i s i o n s > 
 
 + # #   I m p l e m e n t a t i o n   D e c i s i o n s 
 
 + 
 
 + # # #   V a l i d a t i o n   S t r a t e g y 
 
 + -   S o u r c e - m o d e   v a l i d a t i o n   r u n s   o n   e v e r y   d r a f t   r e c o n c i l i a t i o n   a n d   d r a f t   o p e n 
 
 + -   F i e l d - l e v e l   v a l i d a t i o n   e r r o r s   a r e   t r a c k e d   p e r   f i e l d   i n   d r a f t   s t a t e 
 
 + -   I n v a l i d   c o m b i n a t i o n s   a r e   b l o c k e d   b e f o r e   a p p l y   ( n o t   a f t e r ) 
 
 + -   R e c o v e r y   g u i d a n c e   s h o w n   i n l i n e   v i a   f i e l d   v a l i d a t i o n   m e s s a g e s 
 
 + 
 
 + # # #   t h e   a g e n t ' s   D i s c r e t i o n 
 
 + I m p l e m e n t a t i o n   w a s   c o m p l e t e d   a s   p a r t   o f   P h a s e   4   w o r k        v a l i d a t i o n   c o n t r a c t s ,   p a t h   v a l i d a t i o n ,   m o d e l   f i l e   v a l i d a t i o n ,   a n d   U I   r e c o v e r y   e x p e r i e n c e   a r e   a l l   i m p l e m e n t e d   i n   r u n t i m e - u t i l s . t s ,   u s e R u n t i m e M a n a g e r . t s ,   a n d   R u n t i m e S e t t i n g s D r a w e r . t s x . 
 
 + 
 
 + < / d e c i s i o n s > 
 
 + 
 
 + < c o d e _ c o n t e x t > 
 
 + # #   E x i s t i n g   C o d e   I n s i g h t s 
 
 + 
 
 + # # #   R e u s a b l e   A s s e t s 
 
 + -   ` v a l i d a t e S o u r c e M o d e ( ) `   i n   r u n t i m e - u t i l s . t s        v a l i d a t e s   s o u r c e / m o d e   c o m b i n a t i o n s 
 
 + -   ` v a l i d a t e M o d e l P a t h ( ) `   i n   r u n t i m e - u t i l s . t s        v a l i d a t e s   m o d e l   f i l e   p a t h s 
 
 + -   ` v a l i d a t e M o d e l s D i r e c t o r y ( ) `   i n   r u n t i m e - u t i l s . t s        a s y n c   d i r e c t o r y   v a l i d a t i o n 
 
 + -   ` v a l i d a t e M o d e l F i l e ( ) `   i n   r u n t i m e - u t i l s . t s        v a l i d a t e s   i n d i v i d u a l   m o d e l   f i l e s 
 
 + -   F i e l d   v a l i d a t i o n   s t a t e   i n   u s e R u n t i m e M a n a g e r   d r a f t   s t a t e 
 
 + 
 
 + # # #   E s t a b l i s h e d   P a t t e r n s 
 
 + -   V a l i d a t i o n   r u n s   o n   d r a f t   o p e n ,   r e s e t ,   a n d   r e c o n c i l e - t o - b a s e l i n e 
 
 + -   F i e l d   v a l i d a t i o n s   s t o r e d   a s   ` R e c o r d < s t r i n g ,   F i e l d V a l i d a t i o n > `   i n   d r a f t   s t a t e 
 
 + -   U I   s h o w s   i n l i n e   v a l i d a t i o n   e r r o r s   p e r   f i e l d   i n   R u n t i m e S e t t i n g s D r a w e r 
 
 + 
 
 + # # #   I n t e g r a t i o n   P o i n t s 
 
 + -   u s e R u n t i m e M a n a g e r . t s        v a l i d a t i o n   i n t e g r a t e d   i n t o   d r a f t   l i f e c y c l e 
 
 + -   R u n t i m e S e t t i n g s D r a w e r . t s x        d i s p l a y s   v a l i d a t i o n   e r r o r s   i n l i n e 
 
 + -   r u n t i m e - u t i l s . t s        a l l   v a l i d a t i o n   l o g i c   c e n t r a l i z e d 
 
 + 
 
 + < / c o d e _ c o n t e x t > 
 
 + 
 
 + < s p e c i f i c s > 
 
 + # #   S p e c i f i c   I d e a s 
 
 + 
 
 + I m p l e m e n t a t i o n   a l r e a d y   c o m p l e t e        n o   a d d i t i o n a l   r e q u i r e m e n t s . 
 
 + 
 
 + < / s p e c i f i c s > 
 
 + 
 
 + < d e f e r r e d > 
 
 + # #   D e f e r r e d   I d e a s 
 
 + 
 
 + N o n e        p h a s e   c o m p l e t e . 
 
 + 
 
 + < / d e f e r r e d > 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - V E R I F I C A T I O N . m d   b / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - V E R I F I C A T I O N . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . c a 5 3 c d 2 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 5 - m o d e l - s o u r c e - v a l i d a t i o n / 0 5 - V E R I F I C A T I O N . m d 
 
 @ @   - 0 , 0   + 1 , 3 5   @ @ 
 
 + s t a t u s :   p a s s e d 
 
 + p h a s e :   5 
 
 + n a m e :   M o d e l   S o u r c e   V a l i d a t i o n 
 
 + d a t e :   2 0 2 6 - 0 4 - 0 2 
 
 + 
 
 + # #   V e r i f i c a t i o n   S u m m a r y 
 
 + 
 
 + A l l   P h a s e   5   s u c c e s s   c r i t e r i a   a r e   m e t   b y   e x i s t i n g   i m p l e m e n t a t i o n . 
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   V e r i f i c a t i o n 
 
 + 
 
 + # # #   1 .   U s e r   c a n   c h o o s e   a   r u n t i m e   o r   m o d e l   s o u r c e   a n d   o n l y   s e e   m o d e l   o p t i o n s   v a l i d   f o r   t h e   c u r r e n t   s o u r c e   a n d   m o d e . 
 
 + -        ` v a l i d a t e S o u r c e M o d e ( ) `   i n   r u n t i m e - u t i l s . t s   v a l i d a t e s   s o u r c e / m o d e   c o m b i n a t i o n s 
 
 + -        F i e l d   v a l i d a t i o n s   b l o c k   i n v a l i d   c o m b i n a t i o n s   b e f o r e   a p p l y 
 
 + -        u s e R u n t i m e M a n a g e r   i n t e g r a t e s   v a l i d a t i o n   o n   e v e r y   d r a f t   s t a t e   c h a n g e 
 
 + 
 
 + # # #   2 .   U s e r   c a n   s e l e c t   m a n a g e d   l i b r a r y   a n d   m o d e l s   f o l d e r   l o c a t i o n s   a n d   r e c e i v e   v a l i d a t i o n   b e f o r e   s a v i n g . 
 
 + -        ` v a l i d a t e M o d e l s D i r e c t o r y ( ) `   v a l i d a t e s   d i r e c t o r y   p a t h s   a s y n c 
 
 + -        ` v a l i d a t e M o d e l P a t h ( ) `   v a l i d a t e s   m o d e l   f i l e   p a t h s 
 
 + -        V a l i d a t i o n   r u n s   b e f o r e   d r a f t   i s   a p p l i e d   t o   l i v e   s t a t e 
 
 + 
 
 + # # #   3 .   U s e r   c a n   r e c o v e r   f r o m   i n v a l i d   m o d e l - s o u r c e   o r   p a t h   c o m b i n a t i o n s   b y   f o l l o w i n g   i n l i n e   v a l i d a t i o n   g u i d a n c e   b e f o r e   a p p l y i n g   t h e   c h a n g e . 
 
 + -        F i e l d - l e v e l   v a l i d a t i o n   e r r o r s   d i s p l a y e d   i n l i n e   i n   R u n t i m e S e t t i n g s D r a w e r 
 
 + -        A p p l y   b u t t o n   b l o c k e d   w h e n   v a l i d a t i o n   e r r o r s   e x i s t 
 
 + -        R e c o v e r y   g u i d a n c e   s h o w n   p e r   f i e l d 
 
 + 
 
 + # #   I m p l e m e n t a t i o n   E v i d e n c e 
 
 + 
 
 + -   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t s `        v a l i d a t e S o u r c e M o d e ,   v a l i d a t e M o d e l P a t h ,   v a l i d a t e M o d e l s D i r e c t o r y ,   v a l i d a t e M o d e l F i l e 
 
 + -   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s `        v a l i d a t i o n   i n t e g r a t e d   a t   l i n e s   7 9 - 8 2 ,   2 0 3 - 2 0 8 ,   2 3 6 - 2 3 9 
 
 + -   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / t y p e s . t s `        v a l i d a t i o n   t y p e s   d e f i n e d 
 
 + 
 
 + # #   N o t e s 
 
 + 
 
 + P h a s e   5   i m p l e m e n t a t i o n   w a s   c o m p l e t e d   a s   p a r t   o f   P h a s e   4   w o r k .   T h e   p h a s e   d i r e c t o r y   w a s   m i s s i n g   b u t   a l l   c o d e   a r t i f a c t s   a r e   p r e s e n t   a n d   v e r i f i e d . 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . f 1 3 7 2 e 6 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 7 7   @ @ 
 
 + - - - 
 
 + p h a s e :   0 6 - c h a t - u i - r e d e s i g n 
 
 + p l a n :   0 1 
 
 + s t a t u s :   c o m p l e t e 
 
 + c o m p l e t e d _ a t :   " 2 0 2 6 - 0 4 - 0 2 T 1 2 : 0 0 : 0 0 Z " 
 
 + - - - 
 
 + 
 
 + #   P l a n   0 6 - 0 1   S u m m a r y :   B a c k e n d   +   M o d e l S e l e c t o r P i l l 
 
 + 
 
 + # #   C o m p l e t e d   T a s k s 
 
 + 
 
 + # # #   T a s k   1 :   F i x   R u s t   m o d e l   s c a n   t o   t o p - l e v e l   o n l y      
 
 + -   * * S t a t u s * * :   A l r e a d y   i m p l e m e n t e d 
 
 + -   ` s c a n _ m o d e l _ d i r _ t o p _ l e v e l ( ) `   f u n c t i o n   e x i s t s   i n   ` m o d e l _ f i l e s . r s ` 
 
 + -   ` s c a n _ m o d e l s `   T a u r i   c o m m a n d   u s e s   t o p - l e v e l   s c a n   ( n o t   r e c u r s i v e ) 
 
 + -   A l l   5   t e s t s   p a s s   i n c l u d i n g   ` s c a n _ m o d e l _ d i r _ r e t u r n s _ o n l y _ t o p _ l e v e l _ g g u f ` 
 
 + 
 
 + # # #   T a s k   2 :   C r e a t e   M o d e l S e l e c t o r P i l l   +   w i r e   i n t o   C h a t V i e w   +   c l e a n   S i d e b a r      
 
 + -   * * M o d e l S e l e c t o r P i l l . t s x * * :   C r e a t e d   a t   ` t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x ` 
 
 +     -   E x t r a c t s   m o d e l   d e d u p l i c a t i o n   l o g i c   f r o m   S i d e b a r 
 
 +     -   R e n d e r s   c o m p a c t   p i l l   b u t t o n   w i t h   s t a t u s   d o t   a n d   d r o p d o w n 
 
 +     -   S h o w s   s p i n n e r   w h e n   ` i s S w a p p i n g `   i s   t r u e 
 
 +     -   U s e s   ` g e t D i s p l a y N a m e `   a n d   ` i s I n C h a t S e l e c t o r `   f r o m   m o d e l A l i a s 
 
 + 
 
 + -   * * S i d e b a r . t s x * * :   C l e a n e d 
 
 +     -   R e m o v e d   ` m o d e l - s e c t i o n `   b l o c k   ( l i n e s   1 3 1 - 1 7 0 ) 
 
 +     -   R e m o v e d   m o d e l - r e l a t e d   p r o p s :   ` m o d e l s ` ,   ` l o c a l M o d e l s ` ,   ` s e l e c t e d M o d e l ` ,   ` o n M o d e l C h a n g e ` ,   ` o n M o d e l S w a p ` ,   ` i s S w a p p i n g ` ,   ` s t a t u s ` 
 
 +     -   R e m o v e d   ` M o d e l I n f o `   a n d   ` R u n t i m e M o d e l F i l e `   i m p o r t s 
 
 + 
 
 + -   * * C h a t V i e w . t s x * * :   U p d a t e d 
 
 +     -   A d d e d   m o d e l   p r o p s   t o   P r o p s   i n t e r f a c e   ( l i n e s   2 6 - 3 2 ) 
 
 +     -   I m p o r t e d   ` M o d e l S e l e c t o r P i l l `   c o m p o n e n t 
 
 +     -   R e n d e r e d   ` < M o d e l S e l e c t o r P i l l > `   i n   h e r o   i n p u t   ( l i n e   6 2 7 ) 
 
 +     -   R e n d e r e d   ` < M o d e l S e l e c t o r P i l l > `   i n   r e g u l a r   i n p u t   ( l i n e   8 5 1 ) 
 
 + 
 
 + -   * * A p p . t s x * * :   U p d a t e d 
 
 +     -   R e m o v e d   m o d e l   p r o p s   f r o m   ` < S i d e b a r > `   c o m p o n e n t 
 
 +     -   A d d e d   m o d e l   p r o p s   t o   ` < C h a t V i e w > ` :   ` m o d e l s ` ,   ` l o c a l M o d e l s ` ,   ` s e l e c t e d M o d e l ` ,   ` o n M o d e l C h a n g e ` ,   ` o n M o d e l S w a p ` ,   ` i s S w a p p i n g ` ,   ` s t a t u s ` 
 
 + 
 
 + -   * * C h a t V i e w . t e s t . t s x * * :   F i x e d 
 
 +     -   A d d e d   ` d e f a u l t C h a t V i e w P r o p s `   w i t h   r e q u i r e d   m o d e l   p r o p s 
 
 +     -   S p r e a d   ` { . . . d e f a u l t C h a t V i e w P r o p s } `   t o   a l l   t e s t   r e n d e r s 
 
 + 
 
 + # #   V e r i f i c a t i o n   R e s u l t s 
 
 + 
 
 + # # #   T y p e S c r i p t   B u i l d      
 
 + ` ` ` 
 
 + >   t s c   & &   v i t e   b u i l d 
 
 +      6 3 2 5   m o d u l e s   t r a n s f o r m e d . 
 
 +      b u i l t   i n   5 . 5 0 s 
 
 + ` ` ` 
 
 + 
 
 + # # #   R u s t   T e s t s      
 
 + ` ` ` 
 
 + r u n n i n g   5   t e s t s 
 
 + t e s t   m o d e l _ f i l e s : : t e s t s : : s c a n _ m o d e l _ d i r _ f i l t e r s _ a n d _ s o r t s _ g g u f _ f i l e s   . . .   o k 
 
 + t e s t   m o d e l _ f i l e s : : t e s t s : : s c a n _ m o d e l _ d i r _ i g n o r e s _ d i r e c t o r i e s _ n a m e d _ l i k e _ m o d e l s   . . .   o k 
 
 + t e s t   m o d e l _ f i l e s : : t e s t s : : s c a n _ m o d e l _ d i r _ s k i p s _ h i d d e n _ d i r e c t o r i e s   . . .   o k 
 
 + t e s t   m o d e l _ f i l e s : : t e s t s : : s c a n _ m o d e l _ d i r _ r e c u r s i v e _ f i n d s _ n e s t e d _ g g u f   . . .   o k 
 
 + t e s t   m o d e l _ f i l e s : : t e s t s : : s c a n _ m o d e l _ d i r _ r e t u r n s _ o n l y _ t o p _ l e v e l _ g g u f   . . .   o k 
 
 + 
 
 + t e s t   r e s u l t :   o k .   5   p a s s e d ;   0   f a i l e d 
 
 + ` ` ` 
 
 + 
 
 + # #   F i l e s   M o d i f i e d 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s `   ( a l r e a d y   h a d   t o p - l e v e l   s c a n ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x `   ( c r e a t e d ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x `   ( c l e a n e d ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x `   ( a d d e d   m o d e l   p r o p s   +   M o d e l S e l e c t o r P i l l ) 
 
 + -   ` t a u r i - a p p / s r c / A p p . t s x `   ( r o u t e d   m o d e l   p r o p s   t o   C h a t V i e w ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x `   ( f i x e d   t e s t s ) 
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   M e t 
 
 + -   [ x ]   T o p - l e v e l   m o d e l   s c a n :   ` s c a n _ m o d e l s ( " . / m o d e l s " ) `   r e t u r n s   o n l y   ` . g g u f `   f i l e s   d i r e c t l y   i n   t h e   f o l d e r 
 
 + -   [ x ]   M o d e l   s e l e c t o r   v i s i b l e   i n   c h a t   i n p u t   p i l l   ( h e r o   s c r e e n   a n d   r e g u l a r   s c r e e n ) 
 
 + -   [ x ]   N o   m o d e l   s e l e c t o r   i n   t h e   s i d e b a r 
 
 + -   [ x ]   T y p e S c r i p t   a n d   R u s t   c o m p i l e   w i t h o u t   e r r o r s 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 1 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 1 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 7 e 4 2 5 5 9 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 1 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 4 1   @ @ 
 
 + #   T a s k   1   S u m m a r y :   F i x   R u s t   m o d e l   s c a n   t o   t o p - l e v e l   o n l y 
 
 + 
 
 + * * S t a t u s : * *        C o m p l e t e 
 
 + * * F i l e s   M o d i f i e d : * * 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s ` 
 
 + 
 
 + # #   C h a n g e s   M a d e 
 
 + 
 
 + # # #   1 .   A d d e d   ` s c a n _ m o d e l _ d i r _ t o p _ l e v e l `   f u n c t i o n   ( l i n e s   4 6 - 7 1 ) 
 
 + A   n e w   f u n c t i o n   t h a t   s c a n s   o n l y   t h e   i m m e d i a t e   c h i l d r e n   o f   a   d i r e c t o r y   ( d e p t h = 1 ) ,   r e t u r n i n g   o n l y   ` . g g u f `   f i l e s   w i t h o u t   r e c u r s i n g   i n t o   s u b d i r e c t o r i e s . 
 
 + 
 
 + # # #   2 .   U p d a t e d   ` s c a n _ m o d e l _ d i r `   t o   u s e   t o p - l e v e l   s c a n   ( l i n e s   3 1 - 4 4 ) 
 
 + C h a n g e d   f r o m   c a l l i n g   ` s c a n _ m o d e l _ d i r _ r e c u r s i v e `   t o   c a l l i n g   ` s c a n _ m o d e l _ d i r _ t o p _ l e v e l `   a s   t h e   d e f a u l t   b e h a v i o r . 
 
 + 
 
 + # # #   3 .   K e p t   ` s c a n _ m o d e l _ d i r _ r e c u r s i v e `   f o r   f u t u r e   u s e   ( l i n e s   7 3 - 9 7 ) 
 
 + T h e   r e c u r s i v e   f u n c t i o n   i s   p r e s e r v e d   w i t h   ` # [ a l l o w ( d e a d _ c o d e ) ] `   a n n o t a t i o n   f o r   p o t e n t i a l   f u t u r e   u s e   c a s e s . 
 
 + 
 
 + # # #   4 .   U p d a t e d   t e s t s 
 
 + -   R e n a m e d   ` s c a n _ m o d e l _ d i r _ f i n d s _ g g u f _ i n _ s u b d i r e c t o r i e s `   t o   ` s c a n _ m o d e l _ d i r _ r e t u r n s _ o n l y _ t o p _ l e v e l _ g g u f ` 
 
 + -   U p d a t e d   a s s e r t i o n   t o   e x p e c t   o n l y   t o p - l e v e l   m o d e l s 
 
 + -   A d d e d   n e w   t e s t   ` s c a n _ m o d e l _ d i r _ r e c u r s i v e _ f i n d s _ n e s t e d _ g g u f `   t o   v e r i f y   t h e   r e c u r s i v e   f u n c t i o n   s t i l l   w o r k s 
 
 + 
 
 + # #   V e r i f i c a t i o n 
 
 + 
 
 + ` ` ` b a s h 
 
 + c d   t a u r i - a p p / s r c - t a u r i   & &   c a r g o   t e s t   s c a n _ m o d e l 
 
 + ` ` ` 
 
 + 
 
 + A l l   5   t e s t s   p a s s : 
 
 + -   ` s c a n _ m o d e l _ d i r _ f i l t e r s _ a n d _ s o r t s _ g g u f _ f i l e s `      
 
 + -   ` s c a n _ m o d e l _ d i r _ i g n o r e s _ d i r e c t o r i e s _ n a m e d _ l i k e _ m o d e l s `      
 
 + -   ` s c a n _ m o d e l _ d i r _ s k i p s _ h i d d e n _ d i r e c t o r i e s `      
 
 + -   ` s c a n _ m o d e l _ d i r _ r e c u r s i v e _ f i n d s _ n e s t e d _ g g u f `      
 
 + -   ` s c a n _ m o d e l _ d i r _ r e t u r n s _ o n l y _ t o p _ l e v e l _ g g u f `      
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   M e t 
 
 + 
 
 + -        ` s c a n _ m o d e l s `   T a u r i   c o m m a n d   r e t u r n s   o n l y   ` . g g u f `   f i l e s   i n   t h e   i m m e d i a t e   d i r e c t o r y 
 
 + -        N e s t e d   m o d e l s   i n   s u b d i r e c t o r i e s   a r e   e x c l u d e d   f r o m   d e f a u l t   s c a n 
 
 + -        R e c u r s i v e   s c a n   f u n c t i o n   r e m a i n s   a v a i l a b l e   f o r   f u t u r e   u s e 
 
 + -        A l l   e x i s t i n g   t e s t s   c o n t i n u e   t o   p a s s 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 2 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 2 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 8 9 d 0 e 3 2 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 1 - T A S K 2 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 7 0   @ @ 
 
 + #   T a s k   2   S u m m a r y :   C r e a t e   M o d e l S e l e c t o r P i l l   +   w i r e   i n t o   C h a t V i e w   +   c l e a n   S i d e b a r 
 
 + 
 
 + * * S t a t u s : * *        C o m p l e t e 
 
 + * * F i l e s   M o d i f i e d : * * 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x `   ( n e w   f i l e ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s `   ( a d d e d   m o d e l   s e l e c t o r   s t y l e s ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x `   ( r e m o v e d   m o d e l - s e c t i o n ) 
 
 + -   ` t a u r i - a p p / s r c / A p p . t s x `   ( m o v e d   m o d e l   p r o p s   t o   C h a t V i e w ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x `   ( a d d e d   M o d e l S e l e c t o r P i l l   t o   i n p u t   a r e a s ) 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x `   ( u p d a t e d   t e s t s   w i t h   n e w   p r o p s ) 
 
 + 
 
 + # #   C h a n g e s   M a d e 
 
 + 
 
 + # # #   1 .   C r e a t e d   ` M o d e l S e l e c t o r P i l l . t s x ` 
 
 + N e w   c o m p o n e n t   t h a t : 
 
 + -   D i s p l a y s   a   c o m p a c t   p i l l   b u t t o n   w i t h   t h e   s e l e c t e d   m o d e l ' s   d i s p l a y   n a m e 
 
 + -   S h o w s   a   s t a t u s   d o t   i n d i c a t i n g   s e r v e r   s t a t u s 
 
 + -   O p e n s   a   d r o p d o w n   l i s t b o x   o n   c l i c k   w i t h   a v a i l a b l e   m o d e l s 
 
 + -   F i l t e r s   m o d e l s   u s i n g   ` i s I n C h a t S e l e c t o r `   ( C o o p e r   +   I r o n   o n l y ) 
 
 + -   S u p p o r t s   l o a d i n g / s w a p p i n g   s t a t e   w i t h   s p i n n e r 
 
 + -   P r o p s :   ` m o d e l s ` ,   ` l o c a l M o d e l s ` ,   ` s e l e c t e d M o d e l ` ,   ` o n M o d e l C h a n g e ` ,   ` o n M o d e l S w a p ` ,   ` i s S w a p p i n g ` ,   ` s t a t u s ` 
 
 + 
 
 + # # #   2 .   A d d e d   C S S   s t y l e s   f o r   M o d e l S e l e c t o r P i l l 
 
 + A d d e d   t o   ` C h a t V i e w . c s s ` : 
 
 + -   ` . m o d e l - s e l e c t o r - p i l l - w r a p p e r `   -   c o n t a i n e r   w i t h   r e l a t i v e   p o s i t i o n i n g 
 
 + -   ` . m o d e l - s e l e c t o r - p i l l `   -   p i l l   b u t t o n   s t y l i n g 
 
 + -   ` . m o d e l - s t a t u s - d o t `   -   s t a t u s   i n d i c a t o r   d o t 
 
 + -   ` . m o d e l - s e l e c t o r - m e n u `   -   d r o p d o w n   l i s t b o x 
 
 + -   ` . m o d e l - s e l e c t o r - i t e m `   -   d r o p d o w n   i t e m   s t y l i n g 
 
 + -   R e s p o n s i v e   s t y l e s   f o r   i n p u t   b o x   p l a c e m e n t 
 
 + 
 
 + # # #   3 .   C l e a n e d   S i d e b a r . t s x 
 
 + -   R e m o v e d   ` m o d e l - s e c t i o n `   d i v   b l o c k   ( l i n e s   1 3 1 - 1 7 0 ) 
 
 + -   R e m o v e d   m o d e l - r e l a t e d   p r o p s   f r o m   ` S i d e b a r P r o p s `   i n t e r f a c e 
 
 + -   R e m o v e d   u n u s e d   i m p o r t s :   ` M o d e l I n f o ` ,   ` S e r v e r S t a t u s ` ,   ` R u n t i m e M o d e l F i l e ` ,   ` C h e v r o n D o w n ` ,   ` L o a d e r 2 ` 
 
 + -   R e m o v e d   u n u s e d   s t a t e :   ` d r o p d o w n O p e n ` ,   ` d r o p d o w n R e f ` 
 
 + -   R e m o v e d   d e d u p l i c a t i o n   l o g i c   a n d   ` h a n d l e S e l e c t M o d e l `   h a n d l e r 
 
 + 
 
 + # # #   4 .   U p d a t e d   A p p . t s x 
 
 + -   R e m o v e d   m o d e l   p r o p s   f r o m   ` < S i d e b a r > `   c o m p o n e n t 
 
 + -   A d d e d   m o d e l   p r o p s   t o   ` < C h a t V i e w > ` :   ` m o d e l s ` ,   ` l o c a l M o d e l s ` ,   ` s e l e c t e d M o d e l ` ,   ` o n M o d e l C h a n g e ` ,   ` o n M o d e l S w a p ` ,   ` i s S w a p p i n g ` ,   ` s t a t u s ` 
 
 + 
 
 + # # #   5 .   U p d a t e d   C h a t V i e w . t s x 
 
 + -   A d d e d   n e w   p r o p s   t o   ` P r o p s `   i n t e r f a c e 
 
 + -   I m p o r t e d   ` M o d e l S e l e c t o r P i l l ` ,   ` M o d e l I n f o ` ,   ` S e r v e r S t a t u s ` ,   ` R u n t i m e M o d e l F i l e ` 
 
 + -   R e n d e r e d   ` < M o d e l S e l e c t o r P i l l > `   i n   t w o   p l a c e s : 
 
 +     -   H e r o   i n p u t   b l o c k   ( i n s i d e   ` . i n p u t - b o x - - h e r o ` ,   b e f o r e   ` . a t t a c h m e n t - a c t i o n s ` ) 
 
 +     -   R e g u l a r   i n p u t   b l o c k   ( i n s i d e   ` . i n p u t - b o x ` ,   b e f o r e   ` . a t t a c h m e n t - a c t i o n s ` ) 
 
 + 
 
 + # # #   6 .   U p d a t e d   C h a t V i e w . t e s t . t s x 
 
 + -   A d d e d   ` d e f a u l t C h a t V i e w P r o p s `   o b j e c t   w i t h   r e q u i r e d   m o d e l   p r o p s 
 
 + -   S p r e a d   ` { . . . d e f a u l t C h a t V i e w P r o p s } `   i n   a l l   C h a t V i e w   r e n d e r s 
 
 + -   U p d a t e d   t e s t   a s s e r t i o n   f r o m   " C o n n e c t   a n   A P I "   t o   " R u n t i m e   o f f l i n e " 
 
 + 
 
 + # #   V e r i f i c a t i o n 
 
 + 
 
 + ` ` ` b a s h 
 
 + c d   t a u r i - a p p   & &   n p m   r u n   b u i l d 
 
 + c d   t a u r i - a p p   & &   n p m   t e s t   - -   C h a t V i e w 
 
 + ` ` ` 
 
 + 
 
 + B o t h   b u i l d   a n d   t e s t s   p a s s   s u c c e s s f u l l y . 
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   M e t 
 
 + 
 
 + -        M o d e l S e l e c t o r P i l l   c o m p o n e n t   c r e a t e d   a n d   r e n d e r s   i n   b o t h   i n p u t   a r e a s 
 
 + -        M o d e l   s e l e c t o r   r e m o v e d   f r o m   S i d e b a r 
 
 + -        M o d e l   p r o p s   f l o w   f r o m   A p p . t s x        C h a t V i e w        M o d e l S e l e c t o r P i l l 
 
 + -        T y p e S c r i p t   b u i l d   p a s s e s   w i t h   n o   e r r o r s 
 
 + -        A l l   C h a t V i e w   t e s t s   p a s s 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 2 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 2 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . a c 8 3 3 e d 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 2 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 6 5   @ @ 
 
 + - - - 
 
 + p h a s e :   0 6 - c h a t - u i - r e d e s i g n 
 
 + p l a n :   0 2 
 
 + s t a t u s :   c o m p l e t e 
 
 + c o m p l e t e d _ a t :   " 2 0 2 6 - 0 4 - 0 2 T 1 2 : 1 5 : 0 0 Z " 
 
 + - - - 
 
 + 
 
 + #   P l a n   0 6 - 0 2   S u m m a r y :   C h a t   S c r e e n   R e d e s i g n 
 
 + 
 
 + # #   C o m p l e t e d   T a s k s 
 
 + 
 
 + # # #   T a s k   1 :   A p p l y   M a n u s   c o l o r   t o k e n s   t o   i n d e x . c s s   a n d   t a i l w i n d . c o n f i g . j s      
 
 + 
 
 + * * i n d e x . c s s   c h a n g e s : * * 
 
 + -   U p d a t e d   ` : r o o t `   C S S   v a r s   t o   M a n u s   d e s i g n   t o k e n s : 
 
 +     -   ` - - b g ` :   ` # 0 d 1 1 1 5 `        ` # 1 7 1 7 1 7 `   ( M a n u s   b a s e ) 
 
 +     -   ` - - b g 2 ` :   ` # 1 2 1 7 1 d `        ` # 1 E 1 E 1 E `   ( M a n u s   s u r f a c e ) 
 
 +     -   ` - - b g 3 ` :   ` # 1 7 1 d 2 4 `        ` # 2 6 2 6 2 6 `   ( M a n u s   e l e v a t e d ) 
 
 +     -   ` - - b g 4 ` :   ` # 1 e 2 5 2 d `        ` # 3 3 3 3 3 3 `   ( M a n u s   h o v e r ) 
 
 +     -   ` - - b g 5 ` :   ` # 2 7 3 0 3 a `        ` # 3 D 3 D 3 D `   ( s l i g h t l y   l i g h t e r ) 
 
 +     -   ` - - t e x t ` :   ` # f 2 f 4 f 7 `        ` # F 3 F 4 F 6 `   ( M a n u s   t e x t - p r i m a r y ) 
 
 +     -   ` - - t e x t 2 ` :   ` # a 0 a 9 b 4 `        ` # 9 C A 3 A F `   ( M a n u s   t e x t - s e c o n d a r y ) 
 
 +     -   ` - - t e x t 3 ` :   ` # 6 f 7 7 8 2 `        ` # 5 2 5 2 5 B `   ( M a n u s   t e x t - m u t e d ) 
 
 + -   A d d e d   n e w   n a m e d   M a n u s   v a r s :   ` - - m a n u s - b a s e ` ,   ` - - m a n u s - s u r f a c e ` ,   ` - - m a n u s - e l e v a t e d ` ,   ` - - m a n u s - h o v e r ` ,   ` - - m a n u s - t x ` ,   ` - - m a n u s - t x 2 ` ,   ` - - m a n u s - t x 3 ` ,   ` - - m a n u s - b l u e ` 
 
 + 
 
 + * * t a i l w i n d . c o n f i g . j s   c h a n g e s : * * 
 
 + -   A d d e d   M a n u s   c o l o r   t o k e n s :   ` m a n u s - b a s e ` ,   ` m a n u s - s u r f a c e ` ,   ` m a n u s - e l e v a t e d ` ,   ` m a n u s - h o v e r ` ,   ` m a n u s - t x ` ,   ` m a n u s - t x 2 ` ,   ` m a n u s - t x 3 ` ,   ` m a n u s - b l u e ` 
 
 + 
 
 + # # #   T a s k   2 :   R e p l a c e   t h i n k i n g   i n d i c a t o r ,   s e n d   b u t t o n   i c o n ,   a n d   a l i g n   m e s s a g e   w i d t h s      
 
 + 
 
 + * * C h a t V i e w . t s x   c h a n g e s : * * 
 
 + 1 .   A d d e d   ` P a p e r P l a n e R i g h t `   t o   p h o s p h o r   i m p o r t 
 
 + 2 .   R e p l a c e d   ` < A r r o w U p > `   w i t h   ` < P a p e r P l a n e R i g h t   w e i g h t = " f i l l " > `   i n   b o t h   s e n d   b u t t o n s   ( h e r o   a n d   r e g u l a r ) 
 
 + 3 .   R e m o v e d   " S e n d "   t e x t   l a b e l   f r o m   r e g u l a r   s e n d   b u t t o n   ( i c o n - o n l y   n o w ) 
 
 + 4 .   R e p l a c e d   t h r e e - d o t   ` . t h i n k i n g `   w i t h   M a n u s - s t y l e   ` . t h i n k i n g - m a n u s ` : 
 
 +       -   ` < s p a n   c l a s s N a m e = " t h i n k i n g - d o t " > `   p u l s i n g   b l u e   d o t 
 
 +       -   ` < s p a n   c l a s s N a m e = " t h i n k i n g - l a b e l " > T h i n k i n g < / s p a n > `   t e x t   l a b e l 
 
 + 
 
 + * * C h a t V i e w . c s s   c h a n g e s : * * 
 
 + 1 .   R e p l a c e d   ` . t h i n k i n g `   b o u n c e   a n i m a t i o n   w i t h   ` . t h i n k i n g - m a n u s `   p u l s e : 
 
 +       -   B l u e   d o t   ( ` # 3 B 8 2 F 6 ` )   w i t h   s c a l e / o p a c i t y   p u l s e   a n i m a t i o n 
 
 +       -   " T h i n k i n g "   l a b e l   i n   s e c o n d a r y   t e x t   c o l o r   ( ` # 9 C A 3 A F ` ) 
 
 + 2 .   U p d a t e d   ` . m s g - w r a p p e r . a s s i s t a n t `   m a x - w i d t h   f r o m   ` 1 0 0 % `   t o   ` 8 0 0 p x `   f o r   c o n s i s t e n t   r e a d i n g   c o l u m n 
 
 + 
 
 + # #   V e r i f i c a t i o n   R e s u l t s 
 
 + 
 
 + # # #   T y p e S c r i p t   B u i l d      
 
 + ` ` ` 
 
 + >   t s c   & &   v i t e   b u i l d 
 
 +      6 3 2 5   m o d u l e s   t r a n s f o r m e d . 
 
 +      b u i l t   i n   5 . 8 3 s 
 
 + ` ` ` 
 
 + 
 
 + # #   F i l e s   M o d i f i e d 
 
 + -   ` t a u r i - a p p / s r c / i n d e x . c s s `        M a n u s   c o l o r   t o k e n s 
 
 + -   ` t a u r i - a p p / t a i l w i n d . c o n f i g . j s `        M a n u s   T a i l w i n d   t o k e n s 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x `        P a p e r P l a n e R i g h t   i c o n ,   t h i n k i n g - m a n u s   J S X 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s `        t h i n k i n g - m a n u s   s t y l e s ,   m e s s a g e   w i d t h 
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   M e t 
 
 + -   [ x ]   A p p   b a c k g r o u n d   i s   n e u t r a l   d a r k   ( # 1 7 1 7 1 7 ) ,   n o t   n a v y - b l a c k 
 
 + -   [ x ]   T h i n k i n g   s t a t e   s h o w s   "      T h i n k i n g "   ( p u l s i n g   b l u e   d o t   +   t e x t ) ,   n o t   t h r e e   b o u n c i n g   d o t s 
 
 + -   [ x ]   S e n d   b u t t o n   i s   a   p a p e r   p l a n e   i c o n ,   n o   t e x t   l a b e l 
 
 + -   [ x ]   U s e r   a n d   a s s i s t a n t   m e s s a g e s   s h a r e   s a m e   m a x   r e a d i n g   w i d t h   ( 8 0 0 p x ) 
 
 + -   [ x ]   B u i l d   p a s s e s   c l e a n 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 3 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 3 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 8 9 7 d 9 6 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 3 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 6 2   @ @ 
 
 + - - - 
 
 + p h a s e :   0 6 - c h a t - u i - r e d e s i g n 
 
 + p l a n :   0 3 
 
 + s t a t u s :   c o m p l e t e 
 
 + c o m p l e t e d :   2 0 2 5 - 0 4 - 0 2 
 
 + - - - 
 
 + 
 
 + #   P l a n   0 6 - 0 3 :   S e t t i n g s   P a g e   M a n u s   D e s i g n   A l i g n m e n t 
 
 + 
 
 + # #   S u m m a r y 
 
 + 
 
 + A l l   t a s k s   f o r   P l a n   0 6 - 0 3   w e r e   a l r e a d y   i m p l e m e n t e d   i n   p r e v i o u s   w o r k .   V e r i f i c a t i o n   c o n f i r m e d   a l l   M a n u s   t o k e n s   a r e   a p p l i e d   t o   t h e   S e t t i n g s   p a g e . 
 
 + 
 
 + # #   T a s k s   C o m p l e t e d 
 
 + 
 
 + # # #   T a s k   1 :   U p d a t e   S e t t i n g s P a g e . c s s   w i t h   M a n u s   t o k e n   v a r i a b l e s      
 
 + 
 
 + * * F i l e s : * *   ` t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s ` 
 
 + 
 
 + U p d a t e d   C S S   c l a s s e s   t o   u s e   M a n u s   d e s i g n   t o k e n s : 
 
 + 
 
 + * * L e f t   n a v   p a n e l : * * 
 
 + -   ` . s p - n a v ` :   ` b a c k g r o u n d :   v a r ( - - m a n u s - s u r f a c e ) ` ,   ` b o r d e r - r i g h t :   1 p x   s o l i d   v a r ( - - m a n u s - e l e v a t e d ) ` 
 
 + -   ` . s p - n a v - i t e m : h o v e r ` :   ` b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ` ,   ` c o l o r :   v a r ( - - m a n u s - t x ) ` 
 
 + -   ` . s p - n a v - i t e m - - a c t i v e ` :   ` b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ` ,   ` c o l o r :   v a r ( - - m a n u s - t x ) ` 
 
 + 
 
 + * * C o n t e n t   c a r d s : * * 
 
 + -   ` . s p - c a r d ` :   ` b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ` ,   ` b o r d e r :   1 p x   s o l i d   v a r ( - - m a n u s - h o v e r ) ` 
 
 + 
 
 + * * S e c t i o n   t e x t : * * 
 
 + -   ` . s p - s e c t i o n - t i t l e ` :   ` c o l o r :   v a r ( - - m a n u s - t x ) ` 
 
 + -   ` . s p - s e c t i o n - d e s c ` :   ` c o l o r :   v a r ( - - m a n u s - t x 2 ) ` 
 
 + 
 
 + * * F o r m   f i e l d s : * * 
 
 + -   ` . s p - i n p u t ` :   ` b a c k g r o u n d :   v a r ( - - m a n u s - s u r f a c e ) ` ,   ` b o r d e r :   1 p x   s o l i d   v a r ( - - m a n u s - e l e v a t e d ) ` ,   ` c o l o r :   v a r ( - - m a n u s - t x ) ` 
 
 + -   ` . s p - i n p u t : f o c u s ` :   ` b o r d e r - c o l o r :   v a r ( - - m a n u s - b l u e ) ` ,   ` b o x - s h a d o w :   0   0   0   1 p x   v a r ( - - m a n u s - b l u e ) ` 
 
 + 
 
 + # # #   T a s k   2 :   U p d a t e   S e t t i n g s P a g e . t s x   i n l i n e   c o l o r   c l a s s e s      
 
 + 
 
 + * * F i l e s : * *   ` t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . t s x ` 
 
 + 
 
 + V e r i f i e d   t h a t   S e t t i n g s P a g e . t s x   u s e s   ` . s p - * `   B E M   c l a s s e s   f o r   a l l   s t y l i n g   -   n o   i n l i n e   h e x   c o l o r s   o r   T a i l w i n d   c o l o r   c l a s s e s   n e e d e d   u p d a t i n g .   A l l   c o l o r s   i n h e r i t   v i a   t h e   u p d a t e d   C S S   v a r s . 
 
 + 
 
 + # #   V e r i f i c a t i o n 
 
 + 
 
 + ` ` ` b a s h 
 
 + c d   t a u r i - a p p   & &   n p m   r u n   b u i l d 
 
 + #        6 3 2 5   m o d u l e s   t r a n s f o r m e d 
 
 + #        b u i l t   i n   6 . 1 7 s 
 
 + ` ` ` 
 
 + 
 
 + # #   F i l e s   M o d i f i e d 
 
 + 
 
 + -   ` t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s `        M a n u s   t o k e n   C S S   v a r s   a p p l i e d   t o   a l l   ` . s p - * `   c l a s s e s 
 
 + 
 
 + # #   S u c c e s s   C r i t e r i a   M e t 
 
 + 
 
 + -        S e t t i n g s   p a g e   l e f t   n a v   i s   # 1 E 1 E 1 E   ( M a n u s   s u r f a c e ) 
 
 + -        C a r d s / s e c t i o n s   a r e   # 2 6 2 6 2 6   ( M a n u s   e l e v a t e d ) 
 
 + -        T e x t   h i e r a r c h y   i s   c o r r e c t :   t i t l e s   # F 3 F 4 F 6 ,   l a b e l s / d e s c r i p t i o n s   # 9 C A 3 A F 
 
 + -        A l l   f o r m   i n p u t s ,   s e l e c t s ,   a n d   b u t t o n s   r e m a i n   f u n c t i o n a l 
 
 + -        B u i l d   p a s s e s   c l e a n 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - P L A N . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - P L A N . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 2 0 3 5 5 5 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - P L A N . m d 
 
 @ @   - 0 , 0   + 1 , 4 6   @ @ 
 
 + - - - 
 
 + p h a s e :   0 6 - c h a t - u i - r e d e s i g n 
 
 + p l a n :   0 4 
 
 + t y p e :   e x e c u t e 
 
 + w a v e :   3 
 
 + d e p e n d s _ o n :   [ 0 6 - 0 1 ,   0 6 - 0 2 ,   0 6 - 0 3 ] 
 
 + f i l e s _ m o d i f i e d : 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / F o r g e A g e n t B u b b l e . t s x 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t T h i n k i n g C a r d . t s x 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t S t e p L i s t . t s x 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t S y s t e m M e s s a g e . t s x 
 
 +     -   t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t F i n a l R e s p o n s e . t s x 
 
 +     -   t a u r i - a p p / s r c / t y p e s / f o r g e a g e n t . t s 
 
 +     -   t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s 
 
 + a u t o n o m o u s :   t r u e 
 
 + r e q u i r e m e n t s :   [ U I - 0 4 ] 
 
 + - - - 
 
 + 
 
 + < o b j e c t i v e > 
 
 + D e l i v e r   a   F o r g e - b r a n d e d   M a n u s - l i k e   a g e n t i c   t r a n s c r i p t   i n s i d e   t h e   m a i n   c h a t   U I .   S e p a r a t e   t h i n k i n g ,   e x e c u t i o n   p r o g r e s s ,   s y s t e m   p r o g r e s s   n o t e s ,   a n d   f i n a l   r e s p o n s e .   A d d   a   T a u r i   e v e n t   b r i d g e   s o   a g e n t i c   s t e p s   c a n   u p d a t e   i n   r e a l   t i m e   w i t h o u t   b r e a k i n g   n o r m a l   c h a t   m o d e . 
 
 + < / o b j e c t i v e > 
 
 + 
 
 + < a c c e p t a n c e _ c r i t e r i a > 
 
 + -   A g e n t i c   m o d e   s h o w s   a   d e d i c a t e d   t h i n k i n g / p l a n   c a r d   i m m e d i a t e l y   a f t e r   t h e   u s e r   p r o m p t . 
 
 + -   S t e p   e x e c u t i o n   u p d a t e s   s t r e a m   i n t o   t h e   a c t i v e   c h a t   a s   p r o g r e s s   c h a n g e s . 
 
 + -   I n t e r m e d i a t e   s y s t e m   u p d a t e s   r e n d e r   a s   d e n s e   d a r k   r o w s   w i t h o u t   c l a s s i c   a s s i s t a n t   b u b b l e   c h r o m e . 
 
 + -   F i n a l   r e s p o n s e   r e n d e r s   a s   a   c l e a n   t e x t   b l o c k   w i t h   c o d e - c o p y   s u p p o r t   a n d   a r t i f a c t   a c t i o n   a r e a . 
 
 + -   N o r m a l   c h a t   m o d e   r e m a i n s   u n c h a n g e d   f o r   n o n - a g e n t i c   r e p l i e s . 
 
 + -   N e w   b e h a v i o r   i s   c o v e r e d   b y   f o c u s e d   t e s t s   f o r   f o r m a t t i n g / r e n d e r   g a t i n g . 
 
 + < / a c c e p t a n c e _ c r i t e r i a > 
 
 + 
 
 + < i m p l e m e n t a t i o n _ p l a n > 
 
 + 1 .   C r e a t e   c h a t - n a t i v e   a g e n t i c   U I   b l o c k s   ( ` A g e n t T h i n k i n g C a r d ` ,   ` A g e n t S t e p L i s t ` ,   ` A g e n t S y s t e m M e s s a g e ` ,   ` A g e n t F i n a l R e s p o n s e ` )   a n d   r e f a c t o r   ` F o r g e A g e n t B u b b l e `   t o   c o m p o s e   t h e m . 
 
 + 2 .   E x t e n d   f o r g e a g e n t   t y p e s   t o   s u p p o r t   t r a n s c r i p t - l e v e l   s y s t e m   m e s s a g e s   a n d   a r t i f a c t   C T A   m e t a d a t a   n e e d e d   b y   t h e   n e w   U I . 
 
 + 3 .   I n t e g r a t e   a g e n t i c   r e n d e r i n g   i n t o   ` C h a t V i e w `   w i t h   c o n d i t i o n a l   t r a n s c r i p t   b l o c k s   a n d   M a n u s - l i k e   a s s i s t a n t   p r e s e n t a t i o n . 
 
 + 4 .   A d d   a   R u s t    T a u r i   e v e n t   c o n t r a c t   f o r   p l a n   a n d   s t e p   p r o g r e s s ;   w i r e   f r o n t e n d   l i s t e n e r s   t o   u p d a t e   l i v e   a g e n t i c   s t a t e . 
 
 + 5 .   A d d   t a r g e t e d   t e s t s   a n d   u p d a t e   ` . p l a n n i n g / S T A T E . m d `   /   s u m m a r y   f i l e s   a f t e r   v e r i f i c a t i o n . 
 
 + < / i m p l e m e n t a t i o n _ p l a n > 
 
 + 
 
 + < v e r i f i c a t i o n > 
 
 + -   ` p n p m   e x e c   v i t e s t   r u n `   f o r   t h e   n e w / u p d a t e d   a g e n t i c   t e s t s 
 
 + -   t a r g e t e d   R u s t   b u i l d / t e s t   f o r   e v e n t   c o n t r a c t   i f   t o u c h e d 
 
 + -   m a n u a l   ` p n p m   t a u r i   d e v `   v e r i f i c a t i o n   o f   a g e n t i c   t r a n s c r i p t   l a y o u t 
 
 + < / v e r i f i c a t i o n > 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - S U M M A R Y . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - S U M M A R Y . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 4 0 2 2 5 2 2 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - 0 4 - S U M M A R Y . m d 
 
 @ @   - 0 , 0   + 1 , 4 9   @ @ 
 
 + - - - 
 
 + p h a s e :   0 6 - c h a t - u i - r e d e s i g n 
 
 + p l a n :   0 4 
 
 + s t a t u s :   c o m p l e t e 
 
 + c o m p l e t e d _ a t :   " 2 0 2 6 - 0 4 - 0 2 T 1 2 : 2 0 : 0 0 Z " 
 
 + - - - 
 
 + 
 
 + #   P l a n   0 6 - 0 4   S u m m a r y :   A g e n t i c   M a n u s   C o n v e r s a t i o n   B l o c k s 
 
 + 
 
 + # #   C o m p l e t e d 
 
 + 
 
 + -   A d d e d   c h a t - n a t i v e   a g e n t i c   U I   b l o c k s : 
 
 +     -   ` A g e n t T h i n k i n g C a r d ` 
 
 +     -   ` A g e n t S t e p L i s t ` 
 
 +     -   ` A g e n t S y s t e m M e s s a g e ` 
 
 +     -   ` A g e n t F i n a l R e s p o n s e ` 
 
 + -   R e f a c t o r e d   ` F o r g e A g e n t B u b b l e `   t o   c o m p o s e   t h e   n e w   M a n u s - s t y l e   s e c t i o n s   i n s t e a d   o f   t h e   o l d e r   h e a v y   c a r d   l a y o u t . 
 
 + -   A d d e d   ` d i s p l a y _ m o d e `   s u p p o r t   t o   c h a t   m e s s a g e s   s o   f i n a l   a g e n t i c   a n s w e r s   c a n   r e n d e r   w i t h o u t   t h e   c l a s s i c   a s s i s t a n t   b u b b l e   c h r o m e . 
 
 + -   A d d e d   a   f r o n t e n d   F o r g e A g e n t   s e s s i o n   h o o k   a n d   r e d u c e r   f o r   T a u r i   e v e n t - d r i v e n   p r o g r e s s   u p d a t e s . 
 
 + -   A d d e d   a   R u s t   T a u r i   c o m m a n d   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   t h a t   e m i t s   s t e p   p r o g r e s s ,   a r t i f a c t - r e a d y ,   a n d   p l a n - c o m p l e t e d   e v e n t s . 
 
 + -   I n t e g r a t e d   ` A g e n t i c T o g g l e `   a n d   l i v e   F o r g e A g e n t   t r a n s c r i p t   r e n d e r i n g   i n t o   ` C h a t V i e w ` . 
 
 + 
 
 + # #   V e r i f i c a t i o n 
 
 + 
 
 + # # #   F r o n t e n d   t e s t s 
 
 + ` ` ` b a s h 
 
 + p n p m   e x e c   v i t e s t   r u n   s r c / l i b / c h a t . t e s t . t s   s r c / l i b / c h a t D e b u g . t e s t . t s   s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x   s r c / l i b / f o r g e a g e n t - s t a t e . t e s t . t s   s r c / c o m p o n e n t s / f o r g e a g e n t / F o r g e A g e n t B u b b l e . t e s t . t s x   s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t e s t . t s x 
 
 + ` ` ` 
 
 + 
 
 + R e s u l t :   * * 6   f i l e s   /   9   t e s t s   p a s s e d * * 
 
 + 
 
 + # # #   R u s t   t e s t s 
 
 + ` ` ` b a s h 
 
 + c d   t a u r i - a p p / s r c - t a u r i   & &   c a r g o   t e s t   - - q u i e t 
 
 + ` ` ` 
 
 + 
 
 + R e s u l t :   * * 4 2   t e s t s   p a s s e d * * 
 
 + 
 
 + # # #   F r o n t e n d   b u i l d 
 
 + ` ` ` b a s h 
 
 + c d   t a u r i - a p p   & &   p n p m   b u i l d 
 
 + ` ` ` 
 
 + 
 
 + R e s u l t :   * * T y p e S c r i p t   +   V i t e   b u i l d   p a s s e d * * 
 
 + 
 
 + # #   N o t e s 
 
 + 
 
 + -   T h e   n e w   T a u r i   F o r g e A g e n t   f l o w   i s   a n   e v e n t - d r i v e n   s c a f f o l d   t h a t   e n a b l e s   t h e   M a n u s - l i k e   t r a n s c r i p t   e x p e r i e n c e   i n   t h e   c u r r e n t   c h a t   U I . 
 
 + -   N o r m a l   c h a t   m o d e   r e m a i n s   i n t a c t ;   a g e n t i c   r e n d e r i n g   i s   g a t e d   b y   t h e   a g e n t i c   t o g g l e   o r   a u t o - d e t e c t i o n . 
 
 d i f f   - - g i t   a / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - C O N T E X T . m d   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - C O N T E X T . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . b 3 1 4 e 4 4 
 
 - - -   / d e v / n u l l 
 
 + + +   b / . p l a n n i n g / p h a s e s / 0 6 - c h a t - u i - r e d e s i g n / 0 6 - C O N T E X T . m d 
 
 @ @   - 0 , 0   + 1 , 5 1   @ @ 
 
 + #   P h a s e   6 :   C h a t   U I   R e d e s i g n   -   C o n t e x t 
 
 + 
 
 + * * G a t h e r e d : * *   2 0 2 6 - 0 4 - 0 2 
 
 + * * S t a t u s : * *   R e a d y   f o r   p l a n n i n g 
 
 + 
 
 + # #   P h a s e   B o u n d a r y 
 
 + 
 
 + T h e   e x i s t i n g   m i l e s t o n e   a l r e a d y   m o v e d   F o r g e L M   t o w a r d   M a n u s - i n s p i r e d   c o l o r s   a n d   i n p u t   c o m p o s i t i o n ,   b u t   t h e   k e y   a g e n t i c   t r a n s c r i p t   e x p e r i e n c e   i s   s t i l l   m i s s i n g .   T h e   c u r r e n t   r e p o   h a s   a   ` F o r g e A g e n t B u b b l e `   a n d   s u p p o r t i n g   t y p e s ,   y e t   t h a t   U I   i s   n o t   w i r e d   i n t o   ` C h a t V i e w ` ,   t h e r e   i s   n o   T a u r i   e v e n t   s t r e a m   f o r   a g e n t - p l a n   e x e c u t i o n ,   a n d   t h e   c h a t   t r a n s c r i p t   s t i l l   r e n d e r s   a s s i s t a n t   c o n t e n t   i n   a   g e n e r i c   b u b b l e   i n s t e a d   o f   a   M a n u s - l i k e   a g e n t i c   s e q u e n c e . 
 
 + 
 
 + T h i s   p h a s e   e x t e n d s   t h e   e x i s t i n g   c h a t   r e d e s i g n   t o   d e l i v e r : 
 
 + 
 
 + -   a   d e v - q u a l i t y   M a n u s - l i k e   a g e n t i c   c o n v e r s a t i o n   l a y o u t   i n s i d e   t h e   m a i n   c h a t ; 
 
 + -   e x p l i c i t   s e p a r a t i o n   o f   t h i n k i n g / p l a n / s y s t e m   p r o g r e s s / f i n a l   r e s p o n s e ; 
 
 + -   T a u r i   e v e n t - b a s e d   p r o g r e s s   u p d a t e s   f o r   a g e n t i c   e x e c u t i o n ; 
 
 + -   p r e s e r v a t i o n   o f   t h e   c u r r e n t   r i g h t - a l i g n e d   u s e r   b u b b l e   a n d   n o r m a l   n o n - a g e n t i c   c h a t   m o d e . 
 
 + 
 
 + # #   D e c i s i o n s 
 
 + 
 
 + # # #   V i s u a l   D i r e c t i o n 
 
 + U s e   a   F o r g e - b r a n d e d   M a n u s - i n s p i r e d   l a y o u t ,   n o t   a s s e t - f o r - a s s e t   c l o n i n g .   P r e s e r v e   h i e r a r c h y ,   d e n s i t y ,   s p a c i n g ,   a n d   i n t e r a c t i o n   s t y l e . 
 
 + 
 
 + # # #   T e c h n i c a l   D i r e c t i o n 
 
 + R e u s e   e x i s t i n g   ` t y p e s / f o r g e a g e n t . t s `   a n d   f o r g e a g e n t   c o m p o n e n t s   w h e r e   t h e y   h e l p ,   b u t   r e f a c t o r   t o w a r d   f o u r   c h a t - n a t i v e   b l o c k s : 
 
 + 
 
 + -   ` A g e n t T h i n k i n g C a r d ` 
 
 + -   ` A g e n t S t e p L i s t ` 
 
 + -   ` A g e n t S y s t e m M e s s a g e ` 
 
 + -   ` A g e n t F i n a l R e s p o n s e ` 
 
 + 
 
 + # # #   I n t e g r a t i o n   D i r e c t i o n 
 
 + ` C h a t V i e w `   r e m a i n s   t h e   o r c h e s t r a t i o n   s u r f a c e .   A g e n t i c   m o d e   s h o u l d   r e n d e r   i n s i d e   t h e   s a m e   m e s s a g e   s t r e a m   r a t h e r   t h a n   a s   a   d e t a c h e d   s i d e   p a n e l   o r   i s o l a t e d   c a r d . 
 
 + 
 
 + # #   E x i s t i n g   C o d e   I n s i g h t s 
 
 + 
 
 + -   ` C h a t V i e w . t s x `   o w n s   m e s s a g e   r e n d e r i n g ,   s t r e a m i n g   s t a t e ,   a n d   p e r s i s t e n c e . 
 
 + -   ` F o r g e A g e n t B u b b l e . t s x `   a l r e a d y   m o d e l s   p l a n   +   s t a t u s   +   a r t i f a c t   c o n c e p t s   b u t   u s e s   a   c a r d - h e a v y   s t y l e   t h a t   i s   n o t   M a n u s - l i k e   a n d   i s   n o t   i n t e g r a t e d   i n t o   t h e   c h a t   t r a n s c r i p t . 
 
 + -   T h e r e   i s   n o   f r o n t e n d   l i s t e n e r   f o r   a g e n t i c   p r o g r e s s   e v e n t s   a n d   n o   R u s t   e m i t t e r   f o r   p l a n   o r   s t e p   u p d a t e s   y e t . 
 
 + -   ` t y p e s / f o r g e a g e n t . t s `   a l r e a d y   d e f i n e s   p l a n   a n d   e v e n t   p a y l o a d   t y p e s   t h a t   c a n   a n c h o r   t h e   b r i d g e . 
 
 + 
 
 + # #   S p e c i f i c   I d e a s 
 
 + 
 
 + 1 .   A d d   a   f o u r t h   p l a n   ( ` 0 6 - 0 4 ` )   r a t h e r   t h a n   r e w r i t i n g   t h e   e a r l i e r   p h a s e   d o c s . 
 
 + 2 .   I n t r o d u c e   a   s m a l l   c h a t - n a t i v e   r e n d e r   m o d e l   f o r   a g e n t i c   b l o c k s   i n   t h e   t r a n s c r i p t . 
 
 + 3 .   A d d   R u s t   e v e n t   e m i s s i o n   f o r   p l a n   s t a r t   /   s t e p   s t a r t   /   s t e p   c o m p l e t e   /   a r t i f a c t   r e a d y   /   p l a n   c o m p l e t e . 
 
 + 4 .   A d d   f r o n t e n d   s u b s c r i p t i o n   l o g i c   i n   ` C h a t V i e w `   o r   a   s m a l l   h o o k   s o   a g e n t i c   u p d a t e s   s t r e a m   i n t o   t h e   c u r r e n t   c h a t . 
 
 + 5 .   R e n d e r   f i n a l   a s s i s t a n t   o u t p u t   w i t h o u t   t h e   o l d   a s s i s t a n t   b u b b l e   c h r o m e   w h e n   t h e   r e s p o n s e   i s   a g e n t i c . 
 
 + 
 
 + # #   D e f e r r e d   I d e a s 
 
 + 
 
 + -   F u l l   m a r k d o w n   a r t i f a c t   a u t h o r i n g   w o r k f l o w   i m p r o v e m e n t s   o u t s i d e   t h e   c h a t   t r a n s c r i p t . 
 
 + -   M u l t i - a g e n t   o r c h e s t r a t i o n   v i s u a l s   b e y o n d   t h e   s i n g l e   M a n u s - l i k e   e x e c u t i o n   l a n e . 
 
 d i f f   - - g i t   a / B A C K E N D _ D O C U M E N T A T I O N . m d   b / B A C K E N D _ D O C U M E N T A T I O N . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 8 8 9 f 7 6 e 
 
 - - -   / d e v / n u l l 
 
 + + +   b / B A C K E N D _ D O C U M E N T A T I O N . m d 
 
 @ @   - 0 , 0   + 1 , 9 4 2   @ @ 
 
 + #   D o c u m e n t a % % o   C o m p l e t a   d o   B a c k e n d   -   F o r g e L M 
 
 + 
 
 + # #   S u m % r i o   E x e c u t i v o 
 
 + 
 
 + O   F o r g e L M   %   u m   s i s t e m a   d e   i n f e r % n c i a   d e   L L M s   l o c a i s   c o m p o s t o   p o r   d o i s   c o m p o n e n t e s   p r i n c i p a i s : 
 
 + 
 
 + 1 .   * * H T T P   A P I   S e r v e r * *   ( ` i n f e r e n c e - s e r v e r ` )   -   S e r v i d o r   A x u m   q u e   e x p % e   e n d p o i n t s   c o m p a t % v e i s   c o m   O p e n A I 
 
 + 2 .   * * T a u r i   D e s k t o p   B a c k e n d * *   -   B a c k e n d   d o   a p l i c a t i v o   d e s k t o p   q u e   g e r e n c i a   o   c i c l o   d e   v i d a   d o   s e r v i d o r 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   A r q u i t e t u r a   G e r a l 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                                                                              
 
 +                                                                F o r g e L M   B a c k e n d                                                                    
 
 +                                                                                                                                                                                                                                              
 
 +                                                                                                                                                                 
 
 +                                                                                                                                                                                                                                    
 
 +               T a u r i   A p p   ( F r o n t e n d )                       H T T P   A P I   S e r v e r   ( A x u m )                                             
 
 +               -   R e a c t   +   T y p e S c r i p t                       -   P o r t :   8 0 8 0   ( d e f a u l t )                                             
 
 +               -   s q l . j s   +   l o c a l S t o r a g e                 -   O p e n A I - c o m p a t i b l e   A P I                                           
 
 +                                                                                                                                                                                                                                    
 
 +                                                                                                                                                                     
 
 +                                   T a u r i   C o m m a n d s                                                                                                       
 
 +                                ]%                                                                                                                                    
 
 +                                                                                                                                                                                          
 
 +               T a u r i   B a c k e n d                                                                                                                                                 
 
 +               -   R u n t i m e   l i f e c y c l e                                              H T T P   r e q u e s t s                                        
 
 +               -   M o d e l   m a n a g e m e n t                                                                                                                 
 
 +               -   G P U   d e t e c t i o n                                                                                                                       
 
 +                                                                                                                                                                                         
 
 +                                                                                                                                                                  
 
 +                                   S p a w n s   P r o c e s s                                                                                                    
 
 +                                ]%                                                                                                                                 
 
 +                                                                                                                                                                                                                                    
 
 +               i n f e r e n c e - s e r v e r                               i n f e r e n c e - c o r e                                                             
 
 +               ( B i n a r y   E x e c u t a b l e )                          Q%    -   E n g i n e                                                                       
 
 +                                                                             -   G e n e r a t i o n S e s s i o n                                                   
 
 +                                                                                                                                                                                                                                    
 
 +                                                                                                                                                                  
 
 +                                                                                                       F F I                                                      
 
 +                                                                                                    ]%                                                             
 
 +                                                                                                                                                                                    
 
 +                                                                                       l l a m a - s y s                                                           
 
 +                                                                                       ( l l a m a . d l l )                                                       
 
 +                                                                                                                                                                                    
 
 +                                                                                                                                                                                                                                              
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 .   C r a t e s   e   E s t r u t u r a   d o   W o r k s p a c e 
 
 + 
 
 + # # #   E s t r u t u r a   d o   W o r k s p a c e 
 
 + 
 
 + ` ` ` 
 
 + C a r g o . t o m l   ( w o r k s p a c e   r o o t ) 
 
 +            c r a t e s / 
 
 +                     l l a m a - s y s /                     #   F F I   b i n d i n g s   p a r a   l l a m a . c p p 
 
 +                     r u n t i m e - d e p s /               #   G e r e n c i a m e n t o   d e   d e p e n d % n c i a s   d o   r u n t i m e 
 
 +                     i n f e r e n c e - c o r e /           #   L %%g i c a   d e   i n f e r % n c i a   ( E n g i n e ,   S e s s i o n ,   S a m p l e r ) 
 
 +                     i n f e r e n c e - s e r v e r /       #   S e r v i d o r   H T T P   A x u m 
 
 +                     a p i - c o n t r a c t s /             #   S c h e m a s   d e   r e q u e s t / r e s p o n s e 
 
 +                     m e t r i c s /                         #   C o n t a d o r e s   d e   p e r f o r m a n c e   e   T P S 
 
 +                     l o c a l l l m - c l i /               #   C L I   p a r a   g e r e n c i a m e n t o 
 
 +    
 
 +            t a u r i - a p p / 
 
 +                    s r c - t a u r i / 
 
 +                            s r c / 
 
 +                                    l i b . r s                             #   E n t r y   p o i n t   T a u r i 
 
 +                                    r u n t i m e /                         #   G e r e n c i a m e n t o   d o   c i c l o   d e   v i d a 
 
 +                                    m o d e l _ l i b r a r y /             #   B i b l i o t e c a   d e   m o d e l o s   H u g g i n g F a c e 
 
 +                                    m o d e l _ f i l e s . r s             #   O p e r a % % e s   c o m   a r q u i v o s   . g g u f 
 
 +                                    m o d e l _ a l i a s . r s             #   R e s o l u % % o   d e   a l i a s e s 
 
 +                                    g p u . r s                             #   D e t e c % % o   d e   G P U 
 
 + ` ` ` 
 
 + 
 
 + # # #   D e p e n d % n c i a s   d o   W o r k s p a c e 
 
 + 
 
 + |   C a t e g o r i a   |   C r a t e s   | 
 
 + | - - - - - - - - - - - | - - - - - - - - | 
 
 + |   A s y n c   R u n t i m e   |   ` t o k i o ` ,   ` a x u m ` ,   ` h y p e r ` ,   ` t o w e r ` ,   ` t o w e r - h t t p `   | 
 
 + |   S e r i a l i z a t i o n   |   ` s e r d e ` ,   ` s e r d e _ j s o n `   | 
 
 + |   E r r o r   H a n d l i n g   |   ` a n y h o w ` ,   ` t h i s e r r o r `   | 
 
 + |   L o g g i n g   |   ` t r a c i n g ` ,   ` t r a c i n g - s u b s c r i b e r `   | 
 
 + |   F F I   |   ` l i b l o a d i n g ` ,   ` o n c e _ c e l l `   | 
 
 + |   U t i l i t i e s   |   ` u u i d ` ,   ` c h r o n o ` ,   ` f u t u r e s ` ,   ` t o k i o - s t r e a m `   | 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   2 .   H T T P   A P I   S e r v e r   ( i n f e r e n c e - s e r v e r ) 
 
 + 
 
 + # # #   E n t r y   P o i n t   -   ` m a i n . r s ` 
 
 + 
 
 + O   s e r v i d o r   %   i n i c i a d o   e m   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / m a i n . r s ` . 
 
 + 
 
 + # # # #   C o n f i g u r a % % o   v i a   E n v i r o n m e n t   V a r i a b l e s 
 
 + 
 
 + |   V a r i % v e l   |   D e s c r i % % o   |   P a d r % o   | 
 
 + | - - - - - - - - - - | - - - - - - - - - - - | - - - - - - - - | 
 
 + |   ` L O C A L L L M _ M O D E L `   |   C a m i n h o   p a r a   a r q u i v o   G G U F   |   ( o b r i g a t %%r i o )   | 
 
 + |   ` L O C A L L L M _ P R O F I L E `   |   P e r f i l   d e   p e r f o r m a n c e   ( ` t u r b o _ 4 b ` ,   ` b a l a n c e d _ 9 b ` ,   ` c p u _ f a l l b a c k ` )   |   ` t u r b o _ 4 b `   | 
 
 + |   ` L O C A L L L M _ C T X `   |   T a m a n h o   d o   c o n t e x t o   ( t o k e n s )   |   d e p e n d e   d o   p e r f i l   | 
 
 + |   ` L O C A L L L M _ B A T C H `   |   T a m a n h o   d o   b a t c h   |   4 0 9 6   ( m a x )   | 
 
 + |   ` L O C A L L L M _ G P U _ L A Y E R S `   |   C a m a d a s   G P U   ( - 1   =   a u t o )   |   d e p e n d e   d o   p e r f i l   | 
 
 + |   ` L O C A L L L M _ T H R E A D S `   |   T h r e a d s   C P U   |   d e p e n d e   d o   p e r f i l   | 
 
 + |   ` L O C A L L L M _ A D D R `   |   E n d e r e % o   d e   b i n d   |   ` 0 . 0 . 0 . 0 : 8 0 8 0 `   | 
 
 + |   ` L O C A L L L M _ A P I _ K E Y `   |   C h a v e   A P I   p a r a   a u t e n t i c a % % o   |   ( o p c i o n a l )   | 
 
 + |   ` L O C A L L L M _ L O G _ F O R M A T `   |   F o r m a t o   d e   l o g   ( ` j s o n ` ,   ` p r e t t y ` )   |   ` p r e t t y `   | 
 
 + |   ` L O C A L L L M _ M O D E L _ A L I A S E S `   |   A l i a s e s   p a r a   m o d e l o s   ( C S V )   |   ( o p c i o n a l )   | 
 
 + |   ` L O C A L L L M _ E N A B L E _ T O O L _ C A L L S `   |   H a b i l i t a r   t o o l   c a l l s   |   ` t r u e `   | 
 
 + 
 
 + # # #   R o t a s   H T T P   -   ` r o u t e s . r s ` 
 
 + 
 
 + O   r o t e a d o r   %   c o n s t r u % d o   e m   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s ` . 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   f n   b u i l d _ r o u t e r ( s t a t e :   A p p S t a t e )   - >   R o u t e r   { 
 
 +         R o u t e r : : n e w ( ) 
 
 +                 . r o u t e ( " / h e a l t h " ,   g e t ( h e a l t h _ h a n d l e r ) ) 
 
 +                 . r o u t e ( " / v 1 / m o d e l s " ,   g e t ( m o d e l s _ h a n d l e r ) ) 
 
 +                 . r o u t e ( " / v 1 / c h a t / c o m p l e t i o n s " ,   p o s t ( c h a t _ c o m p l e t i o n s _ h a n d l e r ) ) 
 
 +                 . l a y e r ( S e r v i c e B u i l d e r : : n e w ( ) . l a y e r ( t r a c e _ l a y e r ) . l a y e r ( c o r s ) ) 
 
 +                 . w i t h _ s t a t e ( s t a t e ) 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   E n d p o i n t s 
 
 + 
 
 + |   M % t o d o   |   E n d p o i n t   |   D e s c r i % % o   | 
 
 + | - - - - - - - - | - - - - - - - - - - | - - - - - - - - - - - | 
 
 + |   ` G E T `   |   ` / h e a l t h `   |   H e a l t h   c h e c k   d o   s e r v i d o r   | 
 
 + |   ` G E T `   |   ` / v 1 / m o d e l s `   |   L i s t a   m o d e l o s   d i s p o n % v e i s   | 
 
 + |   ` P O S T `   |   ` / v 1 / c h a t / c o m p l e t i o n s `   |   C h a t   c o m p l e t i o n s   ( O p e n A I - c o m p a t i b l e )   | 
 
 + 
 
 + # # # #   A p p S t a t e 
 
 + 
 
 + ` ` ` r u s t 
 
 + # [ d e r i v e ( C l o n e ) ] 
 
 + p u b   s t r u c t   A p p S t a t e   { 
 
 +         p u b   e n g i n e :   A r c < M u t e x < I n f e r e n c e E n g i n e > > ,         / /   M o t o r   d e   i n f e r % n c i a 
 
 +         p u b   c o u n t e r s :   A r c < P e r f C o u n t e r s > ,                         / /   C o n t a d o r e s   d e   p e r f o r m a n c e 
 
 +         p u b   m o d e l _ n a m e :   A r c < S t r i n g > ,                                 / /   N o m e   d o   m o d e l o   a t u a l 
 
 +         p u b   s e r v e r _ c o n f i g :   A r c < S e r v e r C o n f i g > ,               / /   C o n f i g u r a % % e s   d o   s e r v i d o r 
 
 +         p u b   s t a r t _ t i m e :   s t d : : t i m e : : I n s t a n t ,                   / /   T i m e s t a m p   d e   i n % c i o 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   C o m p a t i b i l i d a d e   O p e n A I   -   ` c o m p a t . r s ` 
 
 + 
 
 + A r q u i v o :   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s ` 
 
 + 
 
 + # # # #   S e r v e r C o n f i g 
 
 + 
 
 + G e r e n c i a   c o n f i g u r a % % e s   d e   a u t e n t i c a % % o ,   C O R S ,   e   c a t % l o g o   d e   m o d e l o s : 
 
 + 
 
 + ` ` ` r u s t 
 
 + # [ d e r i v e ( D e b u g ,   C l o n e ) ] 
 
 + p u b   s t r u c t   S e r v e r C o n f i g   { 
 
 +         p u b   a p i _ k e y :   O p t i o n < S t r i n g > , 
 
 +         p u b   a u t h _ h e a d e r :   S t r i n g , 
 
 +         p u b   a u t h _ s c h e m e :   O p t i o n < S t r i n g > , 
 
 +         p u b   c o r s _ o r i g i n s :   V e c < S t r i n g > , 
 
 +         p u b   d e f a u l t _ s y s t e m _ p r o m p t :   S t r i n g , 
 
 +         p u b   e n a b l e _ t o o l _ c a l l s :   b o o l , 
 
 +         p u b   m o d e l _ c a t a l o g :   M o d e l C a t a l o g , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   M o d e l C a t a l o g 
 
 + 
 
 + R e s o l v e   a l i a s e s   d e   m o d e l o s   ( c a s e - i n s e n s i t i v e ) : 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   M o d e l C a t a l o g   { 
 
 +         m o d e l s :   V e c < M o d e l D e s c r i p t o r > , 
 
 +         a l i a s e s :   H a s h M a p < S t r i n g ,   u s i z e > , 
 
 + } 
 
 + 
 
 + p u b   s t r u c t   M o d e l D e s c r i p t o r   { 
 
 +         p u b   i d :   S t r i n g , 
 
 +         p u b   r o o t :   S t r i n g , 
 
 +         p u b   p a r e n t :   O p t i o n < S t r i n g > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + * * A l i a s e s   p a d r % o : * *   ` l o c a l - m o d e l ` ,   ` d e f a u l t ` 
 
 + 
 
 + # # # #   C h a t   T e m p l a t e s   S u p o r t a d o s 
 
 + 
 
 + O   s i s t e m a   d e t e c t a   a u t o m a t i c a m e n t e   o   t e m p l a t e   b a s e a d o   n o   n o m e   d o   m o d e l o : 
 
 + 
 
 + |   M o d e l o   |   T e m p l a t e   |   F o r m a t o s   | 
 
 + | - - - - - - - - | - - - - - - - - - - | - - - - - - - - - - | 
 
 + |   Q w e n   |   ` < \ | i m _ s t a r t \ | > ` ,   ` < \ | i m _ e n d \ | > `   |   ` s y s t e m ` ,   ` u s e r ` ,   ` a s s i s t a n t ` ,   ` t o o l `   | 
 
 + |   G e m m a   |   ` < s t a r t _ o f _ t u r n > ` ,   ` < e n d _ o f _ t u r n > `   |   ` m o d e l ` ,   ` u s e r `   | 
 
 + |   L l a m a   |   ` [ I N S T ] ` ,   ` [ / I N S T ] `   |   c o m   ` < < S Y S > > `   p a r a   s y s t e m   | 
 
 + |   K i m i / M o o n s h o t   |   ` < \ | i m _ s y s t e m \ | > ` ,   ` < \ | i m _ u s e r \ | > ` ,   ` < \ | i m _ a s s i s t a n t \ | > `   |   -   | 
 
 + |   G e n % r i c o   |   ` R o l e :   c o n t e n t `   |   P a d r % o   | 
 
 + 
 
 + # # # #   A u t o r i z a % % o 
 
 + 
 
 + S u p o r t a   m %Q%l t i p l o s   h e a d e r s   d e   a u t e n t i c a % % o : 
 
 + -   H e a d e r   c o n f i g u r a d o   ( ` L O C A L L L M _ A U T H _ H E A D E R ` ) 
 
 + -   ` A u t h o r i z a t i o n :   B e a r e r   < k e y > ` 
 
 + -   ` X - A P I - K e y :   < k e y > ` 
 
 + 
 
 + # # # #   V a l i d a % % o   d e   R e q u e s t s 
 
 + 
 
 + V a l i d a % % e s   i m p l e m e n t a d a s : 
 
 + -   M o d e l o   e x i s t e   n o   c a t % l o g o 
 
 + -   L i s t a   d e   m e n s a g e n s   n % o   e s t %   v a z i a 
 
 + -   ` n = 1 `   ( a p e n a s   u m a   c o m p l e t i o n   p o r   r e q u e s t ) 
 
 + -   T o o l   c a l l s   h a b i l i t a d o   s e   t o o l s   p r e s e n t e s 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   3 .   i n f e r e n c e - c o r e 
 
 + 
 
 + # # #   E n g i n e   -   ` e n g i n e . r s ` 
 
 + 
 
 + L o c a l :   ` c r a t e s / i n f e r e n c e - c o r e / s r c / e n g i n e . r s ` 
 
 + 
 
 + O   ` I n f e r e n c e E n g i n e `   %   o   n %Q%c l e o   d e   i n f e r % n c i a   q u e   g e r e n c i a : 
 
 + -   C a r r e g a m e n t o   d o   m o d e l o   G G U F   v i a   l l a m a - s y s   F F I 
 
 + -   I n i c i a l i z a % % o   d o   c o n t e x t o   l l a m a . c p p 
 
 + -   C r i a % % o   d e   s e s s % e s   d e   g e r a % % o 
 
 + 
 
 + # # # #   E n g i n e C o n f i g 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   E n g i n e C o n f i g   { 
 
 +         p u b   m o d e l _ p a t h :   P a t h B u f ,                 / /   C a m i n h o   p a r a   a r q u i v o   G G U F 
 
 +         p u b   p r o f i l e :   R u n t i m e P r o f i l e ,         / /   P e r f i l   d e   p e r f o r m a n c e 
 
 +         p u b   n _ g p u _ l a y e r s :   i 3 2 ,                     / /   C a m a d a s   G P U   ( - 1   =   t o d a s ) 
 
 +         p u b   n _ c t x :   u 3 2 ,                                   / /   C o n t e x t o   ( t o k e n s ) 
 
 +         p u b   n _ b a t c h :   u 3 2 ,                               / /   B a t c h   s i z e   ( p r e f i l l ) 
 
 +         p u b   n _ u b a t c h :   u 3 2 ,                             / /   M i c r o - b a t c h   ( g e r a % % o ) 
 
 +         p u b   n _ t h r e a d s :   i 3 2 ,                           / /   T h r e a d s   C P U 
 
 +         p u b   n _ t h r e a d s _ b a t c h :   i 3 2 ,               / /   T h r e a d s   p a r a   b a t c h 
 
 +         p u b   f l a s h _ a t t n :   b o o l ,                       / /   F l a s h   A t t e n t i o n 
 
 +         p u b   u s e _ m m a p :   b o o l ,                           / /   U s a r   m e m o r y   m a p p i n g 
 
 +         p u b   s e e d :   u 3 2 ,                                     / /   S e e d   R N G 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   R u n t i m e   P r o f i l e s 
 
 + 
 
 + |   P e r f i l   |   n _ c t x   |   n _ g p u _ l a y e r s   |   D e s c r i % % o   | 
 
 + | - - - - - - - - | - - - - - - - | - - - - - - - - - - - - - - | - - - - - - - - - - - | 
 
 + |   ` T u r b o 4 B `   |   8 1 9 2   |   9 9 9   |   G P U   t o t a l ,   o t i m i z a d o   p a r a   m o d e l o s   a t %   4 B   | 
 
 + |   ` B a l a n c e d 9 B `   |   1 6 3 8 4   |   9 9 9   |   E q u i l i b r a d o   p a r a   m o d e l o s   a t %   9 B   | 
 
 + |   ` C p u F a l l b a c k `   |   4 0 9 6   |   0   |   C P U - o n l y   f a l l b a c k   | 
 
 + 
 
 + # # # #   C i c l o   d e   V i d a   d o   E n g i n e 
 
 + 
 
 + ` ` ` r u s t 
 
 + / /   1 .   C a r r e g a r   e n g i n e 
 
 + l e t   m u t   e n g i n e   =   I n f e r e n c e E n g i n e : : l o a d ( c o n f i g ) ? ; 
 
 + 
 
 + / /   2 .   W a r m u p   ( a l o c a   b u f f e r s   C U D A ) 
 
 + e n g i n e . w a r m u p ( ) ? ; 
 
 + 
 
 + / /   3 .   C r i a r   s e s s % o   d e   g e r a % % o 
 
 + l e t   s e s s i o n   =   e n g i n e . n e w _ s e s s i o n ( p r o m p t ,   s a m p l e r _ c f g ) ? ; 
 
 + 
 
 + / /   4 .   G e r a r   t o k e n s 
 
 + w h i l e   l e t   S o m e ( t o k e n )   =   s e s s i o n . n e x t _ t o k e n ( )   { 
 
 +         p r i n t ! ( " { } " ,   t o k e n ) ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + * * N o t a   s o b r e   s e g u r a n % a : * *   O   e n g i n e   %   ` S e n d `   m a s   N % O   %   ` S y n c ` .   A c e s s o   d e v e   s e r   c o o r d e n a d o   ( o   s e r v i d o r   u s a   ` t o k i o : : s y n c : : M u t e x ` ) . 
 
 + 
 
 + # # #   S e s s i o n   -   ` s e s s i o n . r s ` 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   G e n e r a t i o n S e s s i o n   { 
 
 +         / /   . . . 
 
 + } 
 
 + 
 
 + i m p l   G e n e r a t i o n S e s s i o n   { 
 
 +         p u b   f n   n e x t _ t o k e n ( & m u t   s e l f )   - >   O p t i o n < S t r i n g > ; 
 
 +         p u b   f n   p r o m p t _ t o k e n s ( & s e l f )   - >   u 3 2 ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   S a m p l e r   -   ` s a m p l e r . r s ` 
 
 + 
 
 + C o n f i g u r a % % e s   d e   s a m p l i n g : 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   S a m p l e r C o n f i g   { 
 
 +         p u b   t e m p e r a t u r e :   f 3 2 ,                       / /   0 . 0   -   2 . 0 
 
 +         p u b   t o p _ p :   f 3 2 ,                                 / /   0 . 0   -   1 . 0 
 
 +         p u b   m a x _ t o k e n s :   u 3 2 , 
 
 +         p u b   s t o p _ s e q u e n c e s :   V e c < S t r i n g > , 
 
 +         p u b   r e p e a t _ p e n a l t y :   f 3 2 ,               / /   1 . 1 5   ( n o r m a l ) ,   1 . 0   ( t o o l s ) 
 
 +         p u b   r e p e a t _ l a s t _ n :   u s i z e ,             / /   2 5 6   t o k e n s 
 
 +         p u b   s e e d :   u 3 2 , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   4 .   A P I   C o n t r a c t s 
 
 + 
 
 + L o c a l :   ` c r a t e s / a p i - c o n t r a c t s / s r c / ` 
 
 + 
 
 + # # #   C h a t   C o m p l e t i o n   R e q u e s t   ( ` c h a t . r s ` ) 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   C h a t C o m p l e t i o n R e q u e s t   { 
 
 +         p u b   m o d e l :   S t r i n g , 
 
 +         p u b   m e s s a g e s :   V e c < C h a t M e s s a g e > , 
 
 +         p u b   m a x _ t o k e n s :   u 3 2 ,                       / /   d e f a u l t :   1 0 2 4 
 
 +         p u b   t e m p e r a t u r e :   f 3 2 ,                     / /   d e f a u l t :   0 . 1 5 
 
 +         p u b   t o p _ p :   f 3 2 ,                               / /   d e f a u l t :   0 . 9 5 
 
 +         p u b   s t r e a m :   b o o l ,                           / /   d e f a u l t :   f a l s e 
 
 +         p u b   s t o p :   V e c < S t r i n g > , 
 
 +         p u b   n :   u 3 2 ,                                       / /   d e f a u l t :   1   ( a p e n a s   1   s u p o r t a d o ) 
 
 +         p u b   s e e d :   O p t i o n < u 3 2 > , 
 
 +         p u b   u s e r :   O p t i o n < S t r i n g > , 
 
 +         p u b   r e s p o n s e _ f o r m a t :   O p t i o n < R e s p o n s e F o r m a t > , 
 
 +         p u b   t o o l s :   V e c < T o o l D e f i n i t i o n > , 
 
 +         p u b   t o o l _ c h o i c e :   O p t i o n < T o o l C h o i c e > , 
 
 +         p u b   s t r e a m _ o p t i o n s :   O p t i o n < S t r e a m O p t i o n s > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   C h a t M e s s a g e 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   C h a t M e s s a g e   { 
 
 +         p u b   r o l e :   R o l e ,                               / /   S y s t e m ,   D e v e l o p e r ,   U s e r ,   A s s i s t a n t ,   T o o l 
 
 +         p u b   c o n t e n t :   O p t i o n < S t r i n g > , 
 
 +         p u b   n a m e :   O p t i o n < S t r i n g > , 
 
 +         p u b   t o o l _ c a l l s :   O p t i o n < V e c < T o o l C a l l > > , 
 
 +         p u b   t o o l _ c a l l _ i d :   O p t i o n < S t r i n g > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   R e s p o n s e F o r m a t 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   R e s p o n s e F o r m a t   { 
 
 +         p u b   f o r m a t _ t y p e :   S t r i n g ,             / /   " j s o n _ o b j e c t " ,   " j s o n _ s c h e m a " ,   " t e x t " 
 
 +         p u b   j s o n _ s c h e m a :   O p t i o n < V a l u e > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   T o o l C a l l i n g 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   T o o l D e f i n i t i o n   { 
 
 +         p u b   t o o l _ t y p e :   T o o l T y p e , 
 
 +         p u b   f u n c t i o n :   F u n c t i o n D e f i n i t i o n , 
 
 + } 
 
 + 
 
 + p u b   s t r u c t   F u n c t i o n D e f i n i t i o n   { 
 
 +         p u b   n a m e :   S t r i n g , 
 
 +         p u b   d e s c r i p t i o n :   O p t i o n < S t r i n g > , 
 
 +         p u b   p a r a m e t e r s :   V a l u e ,                 / /   J S O N   S c h e m a 
 
 + } 
 
 + 
 
 + p u b   s t r u c t   T o o l C a l l   { 
 
 +         p u b   i d :   S t r i n g , 
 
 +         p u b   t o o l _ t y p e :   T o o l T y p e , 
 
 +         p u b   f u n c t i o n :   T o o l F u n c t i o n C a l l , 
 
 + } 
 
 + 
 
 + p u b   s t r u c t   T o o l F u n c t i o n C a l l   { 
 
 +         p u b   n a m e :   S t r i n g , 
 
 +         p u b   a r g u m e n t s :   S t r i n g ,                 / /   J S O N   s t r i n g 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   5 .   T a u r i   D e s k t o p   B a c k e n d 
 
 + 
 
 + # # #   E n t r y   P o i n t   -   ` l i b . r s ` 
 
 + 
 
 + L o c a l :   ` t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s ` 
 
 + 
 
 + O   b a c k e n d   T a u r i   g e r e n c i a : 
 
 + -   C i c l o   d e   v i d a   d o   r u n t i m e   ( s t a r t / s t o p ) 
 
 + -   G e r e n c i a m e n t o   d e   m o d e l o s   l o c a i s 
 
 + -   D o w n l o a d s   d o   H u g g i n g F a c e 
 
 + -   D e t e c % % o   d e   G P U 
 
 + -   S i s t e m a   F o r g e A g e n t   ( m u l t i - a g e n t e ) 
 
 + 
 
 + # # #   C o m m a n d s   T a u r i 
 
 + 
 
 + ` ` ` r u s t 
 
 + . i n v o k e _ h a n d l e r ( t a u r i : : g e n e r a t e _ h a n d l e r ! [ 
 
 +         q u e r y _ g p u ,                                                       / /   D e t e c t a r   G P U   N V I D I A 
 
 +         s c a n _ m o d e l s ,                                                   / /   E s c a n e a r   a r q u i v o s   . g g u f 
 
 +         p i c k _ m o d e l s _ d i r ,                                           / /   S e l e c i o n a r   d i r e t %%r i o 
 
 +         p i c k _ m o d e l _ f i l e s ,                                         / /   S e l e c i o n a r   a r q u i v o s 
 
 +         i m p o r t _ m o d e l ,                                                 / /   I m p o r t a r   m o d e l o 
 
 +         s e a r c h _ h u g g i n g _ f a c e _ m o d e l s _ c o m m a n d ,     / /   B u s c a r   n o   H F 
 
 +         s t a r t _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d ,   / /   D o w n l o a d   d o   H F 
 
 +         c a n c e l _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d , / /   C a n c e l a r   d o w n l o a d 
 
 +         s w a p _ m o d e l _ c o m m a n d ,                                     / /   T r o c a r   m o d e l o 
 
 +         d e l e t e _ m o d e l _ f i l e ,                                       / /   D e l e t a r   a r q u i v o 
 
 +         o p e n _ m o d e l _ f o l d e r _ c o m m a n d ,                       / /   A b r i r   p a s t a 
 
 +         l i s t _ m o d e l _ l i b r a r y _ e n t r i e s _ c o m m a n d ,     / /   L i s t a r   b i b l i o t e c a 
 
 +         g e t _ m o d e l _ l i b r a r y _ s t a t e _ c o m m a n d ,           / /   E s t a d o   d a   b i b l i o t e c a 
 
 +         b o o t s t r a p _ r u n t i m e _ c o m m a n d ,                       / /   B o o t s t r a p   r u n t i m e 
 
 +         g e t _ r u n t i m e _ s n a p s h o t _ c o m m a n d ,                 / /   S n a p s h o t   d o   r u n t i m e 
 
 +         s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d _ h a n d l e r ,   / /   S a l v a r   c o n f i g 
 
 +         s t a r t _ r u n t i m e _ c o m m a n d ,                               / /   I n i c i a r   r u n t i m e 
 
 +         s t o p _ r u n t i m e _ c o m m a n d ,                                 / /   P a r a r   r u n t i m e 
 
 +         r e s o l v e _ s t a r t u p _ m o d e l _ c o m m a n d ,               / /   R e s o l v e r   m o d e l o   i n i c i a l 
 
 +         g e t _ a p p _ d a t a _ d i r ,                                         / /   D i r e t %%r i o   d e   d a d o s 
 
 +         f i n d _ s e r v e r _ b i n a r y ,                                     / /   L o c a l i z a r   b i n % r i o 
 
 +         s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d ,         / /   I n i c i a r   F o r g e A g e n t 
 
 + ] ) 
 
 + ` ` ` 
 
 + 
 
 + # # #   R u n t i m e   T y p e s   -   ` r u n t i m e / t y p e s . r s ` 
 
 + 
 
 + # # # #   C o n n e c t i o n M o d e 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   e n u m   C o n n e c t i o n M o d e   { 
 
 +         L o c a l ,       / /   S e r v i d o r   l o c a l   s p a w n a d o 
 
 +         R e m o t e ,     / /   C o n e c t a r   a   s e r v i d o r   e x t e r n o 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   R u n t i m e S t a t u s 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   e n u m   R u n t i m e S t a t u s   { 
 
 +         S t o p p e d , 
 
 +         S t a r t i n g , 
 
 +         L o a d i n g , 
 
 +         R e a d y , 
 
 +         D e g r a d e d , 
 
 +         S t o p p i n g , 
 
 +         E r r o r , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   R u n t i m e C o n f i g 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   R u n t i m e C o n f i g   { 
 
 +         p u b   c o n n e c t i o n _ m o d e :   C o n n e c t i o n M o d e , 
 
 +         p u b   s t a r t _ p o l i c y :   S t a r t P o l i c y ,                 / /   M a n u a l ,   O n A p p L a u n c h 
 
 +         p u b   s e r v e r _ u r l :   S t r i n g ,                               / /   P a r a   R e m o t e   m o d e 
 
 +         p u b   a p i _ k e y :   S t r i n g , 
 
 +         p u b   m o d e l _ p a t h :   O p t i o n < S t r i n g > , 
 
 +         p u b   m o d e l s _ d i r :   O p t i o n < S t r i n g > , 
 
 +         p u b   a d d r :   S t r i n g ,                                           / /   " 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " 
 
 +         p u b   g p u _ l a y e r s :   i 3 2 , 
 
 +         p u b   c t x _ s i z e :   u 3 2 ,                                         / /   d e f a u l t :   4 0 9 6 
 
 +         p u b   e x t r a _ m o d e l _ p a t h s :   V e c < S t r i n g > , 
 
 +         p u b   s e l e c t e d _ m o d e l _ i d :   O p t i o n < S t r i n g > , 
 
 +         p u b   r e m o t e _ p r e s e t s :   V e c < R e m o t e P r e s e t > , 
 
 +         p u b   h u g g i n g _ f a c e _ t o k e n :   S t r i n g , 
 
 +         p u b   p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s :   O p t i o n < S t r i n g > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # # #   R u n t i m e S n a p s h o t 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   R u n t i m e S n a p s h o t   { 
 
 +         p u b   s t a t u s :   R u n t i m e S t a t u s , 
 
 +         p u b   r e a d y :   b o o l , 
 
 +         p u b   p r o c e s s _ r u n n i n g :   b o o l , 
 
 +         p u b   r e s o l v e d _ u r l :   S t r i n g , 
 
 +         p u b   b i n a r y _ p a t h :   O p t i o n < S t r i n g > , 
 
 +         p u b   l a s t _ e r r o r :   O p t i o n < R u n t i m e E r r o r I n f o > , 
 
 +         p u b   a c t i v e _ c o m m a n d :   R u n t i m e L i f e c y c l e C o m m a n d , 
 
 +         p u b   l a s t _ c o m m a n d _ r e s u l t :   R u n t i m e L i f e c y c l e R e s u l t , 
 
 +         p u b   c o n f i g :   R u n t i m e C o n f i g , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   M o d e l   L i b r a r y   -   ` m o d e l _ l i b r a r y / ` 
 
 + 
 
 + # # # #   T i p o s 
 
 + 
 
 + ` ` ` r u s t 
 
 + p u b   s t r u c t   M o d e l L i b r a r y E n t r y   { 
 
 +         p u b   i d :   S t r i n g , 
 
 +         p u b   n a m e :   S t r i n g , 
 
 +         p u b   r e p o _ i d :   S t r i n g , 
 
 +         p u b   d e s c r i p t i o n :   S t r i n g , 
 
 +         p u b   t a g s :   V e c < S t r i n g > , 
 
 +         p u b   s i z e _ g b :   f 6 4 , 
 
 +         p u b   d e f a u l t _ f i l e :   S t r i n g , 
 
 +         p u b   i n s t a l l e d :   b o o l , 
 
 +         p u b   i n s t a l l e d _ p a t h :   O p t i o n < S t r i n g > , 
 
 + } 
 
 + 
 
 + p u b   s t r u c t   H u g g i n g F a c e M o d e l R e s u l t   { 
 
 +         p u b   i d :   S t r i n g , 
 
 +         p u b   m o d e l _ i d :   S t r i n g , 
 
 +         p u b   d o w n l o a d s :   i 6 4 , 
 
 +         p u b   l i k e s :   i 3 2 , 
 
 +         p u b   t a g s :   V e c < S t r i n g > , 
 
 +         p u b   g g u f _ f i l e s :   V e c < G g u f F i l e I n f o > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   M o d e l   F i l e s   -   ` m o d e l _ f i l e s . r s ` 
 
 + 
 
 + ` ` ` r u s t 
 
 + # [ d e r i v e ( S e r i a l i z e ) ] 
 
 + p u b   s t r u c t   M o d e l F i l e I n f o   { 
 
 +         p u b   p a t h :   S t r i n g , 
 
 +         p u b   f i l e _ n a m e :   S t r i n g , 
 
 +         p u b   s i z e _ b y t e s :   u 6 4 , 
 
 +         p u b   m o d i f i e d :   O p t i o n < S t r i n g > , 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   6 .   F l u x o   d e   D a d o s 
 
 + 
 
 + # # #   1 .   R e q u i s i % % o   C h a t   C o m p l e t i o n 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                                       
 
 +        C l i e n t                   Q%     A x u m   R o u t e r                 Q%     c o m p a t . r s                       Q%     r o u t e s . r s          
 
 +                                                                                                                                                                                                       
 
 +                                                                                                                                  
 
 +                                                                                                                                 ]%
 
 +                                                                                                                                                                                                       
 
 +        C l i e n t                             J S O N                                 G e n e r a t i o n                               E n g i n e            
 
 +                                          R e s p o n s e                             S e s s i o n                           ( M u t e x )            
 
 +                                                                                                                                                                                                       
 
 +                                                                                                                                
 
 +                                                                                                                               ]%
 
 +                                                                                                                                                                  
 
 +                                                                                                                  l l a m a - s y s              
 
 +                                                                                                                  ( l l a m a . d l l )          
 
 +                                                                                                                                                                  
 
 + ` ` ` 
 
 + 
 
 + # # #   2 .   S t r e a m i n g   v s   B l o c k i n g 
 
 + 
 
 + * * S t r e a m i n g   M o d e : * * 
 
 + 1 .   C r i a   s t r e a m   S S E 
 
 + 2 .   G e r a   t o k e n s   e m   ` s p a w n _ b l o c k i n g ` 
 
 + 3 .   E n v i a   c h u n k s   v i a   c h a n n e l 
 
 + 4 .   C l i e n t   r e c e b e   t o k e n s   e m   t e m p o   r e a l 
 
 + 
 
 + * * B l o c k i n g   M o d e : * * 
 
 + 1 .   G e r a   c o m p l e t i o n   c o m p l e t a 
 
 + 2 .   R e t o r n a   J S O N   %Q%n i c o 
 
 + 
 
 + # # #   3 .   C i c l o   d e   V i d a   d o   M o d e l o 
 
 + 
 
 + ` ` ` 
 
 +                                              
 
 +          S t o p p e d          
 
 +                                              
 
 +                    s t a r t _ r u n t i m e _ c o m m a n d ( ) 
 
 +                 ]%
 
 +                                              
 
 +          S t a r t i n g        
 
 +                                              
 
 +                    P r o c e s s o   s p a w n a d o 
 
 +                 ]%
 
 +                                              
 
 +          L o a d i n g          
 
 +                                              
 
 +                    M o d e l o   c a r r e g a d o 
 
 +                 ]%
 
 +                                              
 
 +            R e a d y                                                
 
 +                                                                       
 
 +                    s t o p _ r u n t i m e ( )            s w a p _ m o d e l _ c o m m a n d ( ) 
 
 +                 ]%                                       
 
 +                                                                       
 
 +          S t o p p i n g                                 
 
 +                                                                       
 
 +                                                        
 
 +                                                                                  
 
 +                      s w a p                            
 
 +                                                                       
 
 +           S t o p              Q%   S t a r t                   
 
 +                                                                       
 
 +                                                                                  
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   7 .   F o r g e A g e n t   -   S i s t e m a   M u l t i - A g e n t e 
 
 + 
 
 + # # #   E s p e c i a l i s t a s 
 
 + 
 
 + |   I D   |   N o m e   |   E m o j i   |   F u n % % o   | 
 
 + | - - - - | - - - - - - | - - - - - - - | - - - - - - - - | 
 
 + |   ` a n a l y s t `   |   A n a l i s t a   |        |   A n % l i s e   t % c n i c a   e   d e c o m p o s i % % o   | 
 
 + |   ` a r c h i t e c t `   |   A r q u i t e t o   |           |   A r q u i t e t u r a   d e   s o f t w a r e   e   p a d r % e s   | 
 
 + |   ` d e v e l o p e r `   |   D e s e n v o l v e d o r   |     W%  |   I m p l e m e n t a % % o   p r a g m % t i c a   | 
 
 + |   ` c r i t i c `   |   C r % t i c o   |           |   R e v i s % o   e   i d e n t i f i c a % % o   d e   r i s c o s   | 
 
 + 
 
 + # # #   F l u x o   d e   E v e n t o s 
 
 + 
 
 + ` ` ` 
 
 + s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d ( ) 
 
 +                  
 
 +                 ]%
 
 +                                                                                  
 
 +      f o r g e a g e n t : s t a r t                            Q%  E n v i a   p l a n o   e s t r u t u r a d o 
 
 +                                                                                  
 
 +                  
 
 +                 ]%
 
 +                                                                                  
 
 +      f o r g e a g e n t : s t e p - s t a r t e d              Q%  I n % c i o   d e   c a d a   p a s s o 
 
 +                                                                                  
 
 +                  
 
 +                 ]%
 
 +                                                                                  
 
 +      f o r g e a g e n t : s t e p - c o m p l e t e d            Q%  P a s s o   c o n c l u % d o 
 
 +                                                                                  
 
 +                  
 
 +                 ]%
 
 +                                                                                                    
 
 +      f o r g e a g e n t : s p e c i a l i s t - t h o u g h t              Q%  P e n s a m e n t o   d o   e s p e c i a l i s t a 
 
 +                                                                                                    
 
 +                  
 
 +                 ]%
 
 +                                                                                                             
 
 +      f o r g e a g e n t : s p e c i a l i s t - r e s p o n s e                  Q%  R e s p o s t a   d o   e s p e c i a l i s t a 
 
 +                                                                                                             
 
 +                  
 
 +                 ]%
 
 +                                                                                  
 
 +      f o r g e a g e n t : p l a n - c o m p l e t e d            Q%  R e s u m o   f i n a l 
 
 +                                                                                  
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   8 .   A P I   H T T P   -   E x e m p l o s 
 
 + 
 
 + # # #   H e a l t h   C h e c k 
 
 + 
 
 + ` ` ` b a s h 
 
 + c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0 / h e a l t h 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o n s e : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " s t a t u s " :   " o k " , 
 
 +     " m o d e l _ l o a d e d " :   t r u e , 
 
 +     " m o d e l _ i d " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +     " u p t i m e _ s e c s " :   3 6 0 0 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   L i s t a r   M o d e l o s 
 
 + 
 
 + ` ` ` b a s h 
 
 + c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0 / v 1 / m o d e l s   \ 
 
 +     - H   " A u t h o r i z a t i o n :   B e a r e r   s u a - c h a v e " 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o n s e : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " o b j e c t " :   " l i s t " , 
 
 +     " d a t a " :   [ 
 
 +         { 
 
 +             " i d " :   " l o c a l - m o d e l " , 
 
 +             " o b j e c t " :   " m o d e l " , 
 
 +             " c r e a t e d " :   1 2 3 4 5 6 7 8 9 0 , 
 
 +             " o w n e d _ b y " :   " l o c a l " , 
 
 +             " r o o t " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +             " p a r e n t " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +             " p e r m i s s i o n " :   [ ] 
 
 +         } 
 
 +     ] 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   C h a t   C o m p l e t i o n   ( N o n - s t r e a m i n g ) 
 
 + 
 
 + ` ` ` b a s h 
 
 + c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0 / v 1 / c h a t / c o m p l e t i o n s   \ 
 
 +     - H   " C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n "   \ 
 
 +     - H   " A u t h o r i z a t i o n :   B e a r e r   s u a - c h a v e "   \ 
 
 +     - d   ' { 
 
 +         " m o d e l " :   " l o c a l - m o d e l " , 
 
 +         " m e s s a g e s " :   [ 
 
 +             { " r o l e " :   " u s e r " ,   " c o n t e n t " :   " O l % ! " } 
 
 +         ] , 
 
 +         " m a x _ t o k e n s " :   1 0 2 4 , 
 
 +         " t e m p e r a t u r e " :   0 . 7 
 
 +     } ' 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o n s e : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " i d " :   " u u i d - 1 2 3 " , 
 
 +     " o b j e c t " :   " c h a t . c o m p l e t i o n " , 
 
 +     " c r e a t e d " :   1 2 3 4 5 6 7 8 9 0 , 
 
 +     " m o d e l " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +     " c h o i c e s " :   [ 
 
 +         { 
 
 +             " i n d e x " :   0 , 
 
 +             " m e s s a g e " :   { 
 
 +                 " r o l e " :   " a s s i s t a n t " , 
 
 +                 " c o n t e n t " :   " O l % !   C o m o   p o s s o   a j u d a r ? " 
 
 +             } , 
 
 +             " f i n i s h _ r e a s o n " :   " s t o p " 
 
 +         } 
 
 +     ] , 
 
 +     " u s a g e " :   { 
 
 +         " p r o m p t _ t o k e n s " :   1 0 , 
 
 +         " c o m p l e t i o n _ t o k e n s " :   2 0 , 
 
 +         " t o t a l _ t o k e n s " :   3 0 , 
 
 +         " t o k e n s _ p e r _ s e c o n d " :   4 5 . 5 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   C h a t   C o m p l e t i o n   ( S t r e a m i n g ) 
 
 + 
 
 + ` ` ` b a s h 
 
 + c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0 / v 1 / c h a t / c o m p l e t i o n s   \ 
 
 +     - H   " C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n "   \ 
 
 +     - H   " A u t h o r i z a t i o n :   B e a r e r   s u a - c h a v e "   \ 
 
 +     - d   ' { 
 
 +         " m o d e l " :   " l o c a l - m o d e l " , 
 
 +         " m e s s a g e s " :   [ 
 
 +             { " r o l e " :   " u s e r " ,   " c o n t e n t " :   " C o n t e   u m a   p i a d a " } 
 
 +         ] , 
 
 +         " s t r e a m " :   t r u e 
 
 +     } ' 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o n s e   ( S S E ) : * * 
 
 + ` ` ` 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " r o l e " : " a s s i s t a n t " } } ] } 
 
 + 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " c o n t e n t " : " P o r " } } ] } 
 
 + 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " c o n t e n t " : "   q u e " } } ] } 
 
 + . . . 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " f i n i s h _ r e a s o n " : " s t o p " } ] } 
 
 + 
 
 + d a t a :   [ D O N E ] 
 
 + ` ` ` 
 
 + 
 
 + # # #   T o o l   C a l l i n g 
 
 + 
 
 + ` ` ` b a s h 
 
 + c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0 / v 1 / c h a t / c o m p l e t i o n s   \ 
 
 +     - H   " C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n "   \ 
 
 +     - H   " A u t h o r i z a t i o n :   B e a r e r   s u a - c h a v e "   \ 
 
 +     - d   ' { 
 
 +         " m o d e l " :   " l o c a l - m o d e l " , 
 
 +         " m e s s a g e s " :   [ 
 
 +             { " r o l e " :   " u s e r " ,   " c o n t e n t " :   " L i s t e   o s   a r q u i v o s " } 
 
 +         ] , 
 
 +         " t o o l s " :   [ 
 
 +             { 
 
 +                 " t y p e " :   " f u n c t i o n " , 
 
 +                 " f u n c t i o n " :   { 
 
 +                     " n a m e " :   " l i s t _ f i l e s " , 
 
 +                     " d e s c r i p t i o n " :   " L i s t a   a r q u i v o s   d o   p r o j e t o " , 
 
 +                     " p a r a m e t e r s " :   { 
 
 +                         " t y p e " :   " o b j e c t " , 
 
 +                         " p r o p e r t i e s " :   { 
 
 +                             " p a t h " :   { " t y p e " :   " s t r i n g " } 
 
 +                         } 
 
 +                     } 
 
 +                 } 
 
 +             } 
 
 +         ] , 
 
 +         " t o o l _ c h o i c e " :   " a u t o " 
 
 +     } ' 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   9 .   C o n f i g u r a % % o   e   D e p l o y 
 
 + 
 
 + # # #   C o m p i l a % % o 
 
 + 
 
 + ` ` ` b a s h 
 
 + #   S e r v i d o r 
 
 + $ e n v : L O C A L L L M _ L O G _ F O R M A T = " j s o n " 
 
 + c a r g o   b u i l d   - - r e l e a s e   - p   i n f e r e n c e - s e r v e r 
 
 + 
 
 + #   C L I 
 
 + c a r g o   b u i l d   - - r e l e a s e   - p   l o c a l l l m - c l i 
 
 + 
 
 + #   T a u r i   A p p 
 
 + c d   t a u r i - a p p 
 
 + c a r g o   t a u r i   b u i l d 
 
 + ` ` ` 
 
 + 
 
 + # # #   E x e c u % % o 
 
 + 
 
 + ` ` ` b a s h 
 
 + #   C o m   v a r i % v e i s   d e   a m b i e n t e 
 
 + $ e n v : L O C A L L L M _ M O D E L = " D : \ m o d e l s \ m o d e l . g g u f " 
 
 + $ e n v : L O C A L L L M _ P R O F I L E = " b a l a n c e d _ 9 b " 
 
 + $ e n v : L O C A L L L M _ A P I _ K E Y = " m i n h a - c h a v e - s e c r e t a " 
 
 + $ e n v : L O C A L L L M _ A D D R = " 0 . 0 . 0 . 0 : 8 0 8 0 " 
 
 + 
 
 + . \ t a r g e t \ r e l e a s e \ i n f e r e n c e - s e r v e r . e x e 
 
 + ` ` ` 
 
 + 
 
 + # # #   D o c k e r   ( s e   a p l i c % v e l ) 
 
 + 
 
 + ` ` ` b a s h 
 
 + d o c k e r   r u n   - p   8 0 8 0 : 8 0 8 0   \ 
 
 +     - v   / p a t h / t o / m o d e l s : / m o d e l s   \ 
 
 +     - e   L O C A L L L M _ M O D E L = / m o d e l s / m o d e l . g g u f   \ 
 
 +     - e   L O C A L L L M _ A P I _ K E Y = s e c r e t   \ 
 
 +     f o r g e l m / i n f e r e n c e - s e r v e r : l a t e s t 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 0 .   E s t r u t u r a   d e   A r q u i v o s 
 
 + 
 
 + # # #   D i r e t %%r i o s   I m p o r t a n t e s 
 
 + 
 
 + ` ` ` 
 
 + % L O C A L A P P D A T A % / F o r g e L M /                       #   W i n d o w s 
 
 + ~ / . l o c a l / s h a r e / F o r g e L M /                       #   L i n u x 
 
 + ~ / L i b r a r y / A p p l i c a t i o n   S u p p o r t / F o r g e L M /     #   m a c O S 
 
 +            m o d e l s /                                               #   M o d e l o s   b a i x a d o s 
 
 +            r u n t i m e /                                             #   B i n % r i o s   d o   r u n t i m e 
 
 +            c o n f i g . j s o n                                       #   C o n f i g u r a % % o   d o   r u n t i m e 
 
 + ` ` ` 
 
 + 
 
 + # # #   F r o n t e n d   ( T a u r i   A p p ) 
 
 + 
 
 + ` ` ` 
 
 + t a u r i - a p p / 
 
 +            s r c / 
 
 +                     l i b / 
 
 +                              d b . t s                                   #   P e r s i s t % n c i a   l o c a l   ( s q l . j s ) 
 
 +                              t y p e s . t s                             #   T i p o s   T y p e S c r i p t 
 
 +                     m a i n . t s x                                     #   E n t r y   R e a c t 
 
 +                     A p p . t s x                                       #   A p p   s h e l l 
 
 +            s r c - t a u r i / 
 
 +                    s r c / 
 
 +                             l i b . r s                                 #   E n t r y   T a u r i 
 
 +                             r u n t i m e /                             #   G e r e n c i a m e n t o   r u n t i m e 
 
 +                             m o d e l _ l i b r a r y /                 #   H u g g i n g F a c e   i n t e g r a t i o n 
 
 +                             m o d e l _ f i l e s . r s                 #   A r q u i v o s   l o c a i s 
 
 +                             m o d e l _ a l i a s . r s                 #   R e s o l u % % o   a l i a s e s 
 
 +                             g p u . r s                                 #   D e t e c % % o   G P U 
 
 +                    t a u r y . c o n f . j s o n                       #   C o n f i g   T a u r i 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 1 .   G l o s s % r i o 
 
 + 
 
 + |   T e r m o   |   D e s c r i % % o   | 
 
 + | - - - - - - - | - - - - - - - - - - - | 
 
 + |   * * G G U F * *   |   F o r m a t   b i n a r y   f o r   L L M s   ( G P T - G e n e r a t e d   U n i f i e d   F o r m a t )   | 
 
 + |   * * K V   C a c h e * *   |   K e y - V a l u e   c a c h e   f o r   a t t e n t i o n   m e c h a n i s m   | 
 
 + |   * * P r e f i l l * *   |   I n i t i a l   p r o m p t   p r o c e s s i n g   p h a s e   | 
 
 + |   * * D e c o d e * *   |   T o k e n   g e n e r a t i o n   p h a s e   | 
 
 + |   * * C o n t e x t   W i n d o w * *   |   M a x i m u m   t o k e n s   t h e   m o d e l   c a n   p r o c e s s   | 
 
 + |   * * B a t c h * *   |   N u m b e r   o f   t o k e n s   p r o c e s s e d   t o g e t h e r   | 
 
 + |   * * G P U   L a y e r s * *   |   N u m b e r   o f   m o d e l   l a y e r s   o f f l o a d e d   t o   G P U   | 
 
 + |   * * F l a s h   A t t e n t i o n * *   |   O p t i m i z e d   a t t e n t i o n   i m p l e m e n t a t i o n   | 
 
 + |   * * T o o l   C a l l i n g * *   |   F u n c t i o n   c a l l i n g   c a p a b i l i t y   f o r   L L M s   | 
 
 + |   * * S S E * *   |   S e r v e r - S e n t   E v e n t s   f o r   s t r e a m i n g   | 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 2 .   R e f e r % n c i a s   R % p i d a s 
 
 + 
 
 + # # #   A r q u i v o s   P r i n c i p a i s 
 
 + 
 
 + |   F u n % % o   |   A r q u i v o   | 
 
 + | - - - - - - - - | - - - - - - - - - | 
 
 + |   E n t r y   S e r v e r   |   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / m a i n . r s `   | 
 
 + |   R o t a s   H T T P   |   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s `   | 
 
 + |   C o m p a t   O p e n A I   |   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   | 
 
 + |   E n g i n e   |   ` c r a t e s / i n f e r e n c e - c o r e / s r c / e n g i n e . r s `   | 
 
 + |   S e s s i o n   |   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s `   | 
 
 + |   S a m p l e r   |   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s a m p l e r . r s `   | 
 
 + |   S c h e m a s   |   ` c r a t e s / a p i - c o n t r a c t s / s r c / c h a t . r s `   | 
 
 + |   E n t r y   T a u r i   |   ` t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s `   | 
 
 + |   R u n t i m e   T y p e s   |   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s `   | 
 
 + 
 
 + # # #   E n v   V a r s   C o m p l e t a s 
 
 + 
 
 + ` ` ` b a s h 
 
 + #   M o d e l o   e   P e r f o r m a n c e 
 
 + L O C A L L L M _ M O D E L = " / p a t h / t o / m o d e l . g g u f " 
 
 + L O C A L L L M _ P R O F I L E = " t u r b o _ 4 b "     #   t u r b o _ 4 b ,   b a l a n c e d _ 9 b ,   c p u _ f a l l b a c k 
 
 + L O C A L L L M _ C T X = 8 1 9 2 
 
 + L O C A L L L M _ B A T C H = 4 0 9 6 
 
 + L O C A L L L M _ G P U _ L A Y E R S = - 1 
 
 + L O C A L L L M _ T H R E A D S = 4 
 
 + L O C A L L L M _ T H R E A D S _ B A T C H = 4 
 
 + 
 
 + #   S e r v i d o r 
 
 + L O C A L L L M _ A D D R = " 0 . 0 . 0 . 0 : 8 0 8 0 " 
 
 + L O C A L L L M _ A P I _ K E Y = " s e c r e t " 
 
 + L O C A L L L M _ A U T H _ H E A D E R = " a u t h o r i z a t i o n " 
 
 + L O C A L L L M _ A U T H _ S C H E M E = " B e a r e r " 
 
 + L O C A L L L M _ C O R S _ O R I G I N S = " * , h t t p s : / / e x a m p l e . c o m " 
 
 + 
 
 + #   F e a t u r e s 
 
 + L O C A L L L M _ E N A B L E _ T O O L _ C A L L S = " t r u e " 
 
 + L O C A L L L M _ M O D E L _ A L I A S E S = " a l i a s 1 , a l i a s 2 " 
 
 + L O C A L L L M _ S Y S T E M _ P R O M P T = " V o c %   %   u m   a s s i s t e n t e . . . " 
 
 + 
 
 + #   L o g g i n g 
 
 + L O C A L L L M _ L O G _ F O R M A T = " j s o n "     #   o u   p r e t t y 
 
 + R U S T _ L O G = " i n f o " 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   C o n c l u s % o 
 
 + 
 
 + E s t e   d o c u m e n t o   c o b r e   a   a r q u i t e t u r a   c o m p l e t a   d o   b a c k e n d   F o r g e L M ,   i n c l u i n d o : 
 
 + 
 
 + 1 .   * * H T T P   S e r v e r * *   -   A P I   c o m p a t % v e l   c o m   O p e n A I   u s a n d o   A x u m 
 
 + 2 .   * * I n f e r e n c e   C o r e * *   -   M o t o r   d e   i n f e r % n c i a   v i a   l l a m a . c p p 
 
 + 3 .   * * T a u r i   B a c k e n d * *   -   G e r e n c i a m e n t o   d e s k t o p   d o   c i c l o   d e   v i d a 
 
 + 4 .   * * A P I   C o n t r a c t s * *   -   S c h e m a s   d e   r e q u e s t / r e s p o n s e 
 
 + 5 .   * * F l u x o s   d e   D a d o s * *   -   C o m o   a s   r e q u i s i % % e s   f l u e m   p e l o   s i s t e m a 
 
 + 
 
 + P a r a   m a i s   d e t a l h e s ,   c o n s u l t e   o s   a r q u i v o s   d e   c %%d i g o   f o n t e   m e n c i o n a d o s   n a s   r e f e r % n c i a s . 
 
 d i f f   - - g i t   a / F R O N T E N D _ A P I _ D O C U M E N T A T I O N . m d   b / F R O N T E N D _ A P I _ D O C U M E N T A T I O N . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 e f 6 3 3 1 
 
 - - -   / d e v / n u l l 
 
 + + +   b / F R O N T E N D _ A P I _ D O C U M E N T A T I O N . m d 
 
 @ @   - 0 , 0   + 1 , 9 6 2   @ @ 
 
 + #   D o c u m e n t a % % o :   F r o n t e n d   C o n s u m i n d o   o   B a c k e n d   -   F o r g e L M 
 
 + 
 
 + # #   S u m % r i o 
 
 + 
 
 + E s t a   d o c u m e n t a % % o   d e t a l h a   * * e x a t a m e n t e   c o m o * *   o   f r o n t e n d   R e a c t   c o n s o m e   o s   d a d o s   d o   b a c k e n d ,   q u a i s   r o t a s   e l e   b a t e ,   c o m o   e n v i a   e   r e c e b e   d a d o s ,   e   a   a r q u i t e t u r a   d e   c o m u n i c a % % o   e n t r e   a s   c a m a d a s . 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   A r q u i t e t u r a   d e   C o m u n i c a % % o 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                                                                              
 
 +                                                          F r o n t e n d   R e a c t   +   T y p e S c r i p t                                                  
 
 +                                                                                                                                                                                                                                              
 
 +                                                                                                                                                                 
 
 +                                                                                                                                                                                                                                      
 
 +                 A p p . t s x                             C h a t V i e w . t s x                     u s e R u n t i m e M a n a g e r . t s                         
 
 +                 ( M a i n   A p p )                       ( C h a t   U I )                           ( R u n t i m e   S t a t e )                                   
 
 +                                                                                                                                                                                                                                      
 
 +                                                                                                                                                                      
 
 +                                                                          f e t c h ( )                                          i n v o k e ( )                      
 
 +                                                                                                                                                                      
 
 +                            ]%                                          ]%                                                      ]%                                       
 
 +                                                                                                                                                                                                                                       
 
 +                                                             C a m a d a   d e   A P I                                                                             
 
 +                                                                                                                                                                                                                                       
 
 +                      l i b / d b . t s                                   f e a t u r e s / r u n t i m e / a p i . t s                                                  
 
 +                      ( s q l . j s   +   l o c a l S t o r a g e )               ( T a u r i   C o m m a n d s )                                                        
 
 +                                                                                                                                                                                                                                       
 
 +                                                                                                                                                                                                                                       
 
 +                                                                                                                                                                 
 
 +                                                                                                                                                                                                                                              
 
 +                                                                                
 
 +                                                                                  H T T P   /   T a u r i   B r i d g e 
 
 +                                                                               ]%
 
 +                                                                                                                                                                                                                                              
 
 +                                                                B a c k e n d                                                                                    
 
 +                                                                                                                                                                                                                                              
 
 +                                                                                                                                                                                                                                       
 
 +               T a u r i   B a c k e n d   ( R u s t )                                 H T T P   S e r v e r   ( A x u m )                                           
 
 +               -   C o m m a n d s                                                     -   P o r t :   8 0 8 0                                                       
 
 +               -   E v e n t s                                                         -   / v 1 / c h a t / c o m p l e t i o n s                                   
 
 +               -   P r o c e s s   s p a w n i n g                                     -   / v 1 / m o d e l s                                                       
 
 +                                                                                                                                                                                                                                       
 
 +                                                                                                                                                                                                                                              
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 .   C a m a d a s   d e   C o m u n i c a % % o 
 
 + 
 
 + # # #   1 . 1   H T T P   A P I   ( C h a t   C o m p l e t i o n s ) 
 
 + 
 
 + * * L o c a l : * *   ` C h a t V i e w . t s x `        H T T P   S e r v e r   A x u m 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   C h a t V i e w . t s x   -   L i n h a   2 5 1 - 2 6 3 
 
 + c o n s t   r e s   =   a w a i t   f e t c h ( ` $ { s e r v e r } / v 1 / c h a t / c o m p l e t i o n s ` ,   { 
 
 +     m e t h o d :   " P O S T " , 
 
 +     h e a d e r s , 
 
 +     s i g n a l :   a b o r t R e f . c u r r e n t . s i g n a l , 
 
 +     b o d y :   J S O N . s t r i n g i f y ( { 
 
 +         m o d e l , 
 
 +         m e s s a g e s :   a p i M e s s a g e s ,                 / /   A r r a y   d e   { r o l e ,   c o n t e n t } 
 
 +         s t r e a m :   u s e S t r e a m ,                       / /   t r u e / f a l s e 
 
 +         s t r e a m _ o p t i o n s :   u s e S t r e a m   ?   {   i n c l u d e _ u s a g e :   t r u e   }   :   u n d e f i n e d , 
 
 +         m a x _ t o k e n s :   2 0 4 8 , 
 
 +         s t o p :   C H A T _ T R A N S C R I P T _ S T O P _ S E Q U E N C E S ,     / /   [ " \ n S y s t e m : " ,   " \ n U s e r : " ,   . . . ] 
 
 +     } ) , 
 
 + } ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * H e a d e r s   e n v i a d o s : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + c o n s t   h e a d e r s :   R e c o r d < s t r i n g ,   s t r i n g >   =   {   
 
 +     " C o n t e n t - T y p e " :   " a p p l i c a t i o n / j s o n "   
 
 + } ; 
 
 + i f   ( a p i K e y )   h e a d e r s [ " A u t h o r i z a t i o n " ]   =   ` B e a r e r   $ { a p i K e y } ` ; 
 
 + ` ` ` 
 
 + 
 
 + * * B o d y   d a   r e q u i s i % % o : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " m o d e l " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +     " m e s s a g e s " :   [ 
 
 +         {   " r o l e " :   " u s e r " ,   " c o n t e n t " :   " O l % ,   c o m o   v a i ? "   } 
 
 +     ] , 
 
 +     " s t r e a m " :   t r u e , 
 
 +     " s t r e a m _ o p t i o n s " :   {   " i n c l u d e _ u s a g e " :   t r u e   } , 
 
 +     " m a x _ t o k e n s " :   2 0 4 8 , 
 
 +     " s t o p " :   [ " \ n S y s t e m : " ,   " \ n U s e r : " ,   " \ n A s s i s t a n t : " ,   " \ n \ n S y s t e m : " ,   " \ n \ n U s e r : " ,   " \ n \ n A s s i s t a n t : " ] 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   1 . 2   T a u r i   C o m m a n d s   ( G e r e n c i a m e n t o   d o   R u n t i m e ) 
 
 + 
 
 + * * L o c a l : * *   ` f e a t u r e s / r u n t i m e / a p i . t s `        T a u r i   B a c k e n d   ( R u s t ) 
 
 + 
 
 + O   f r o n t e n d   u s a   ` i n v o k e `   d o   ` @ t a u r i - a p p s / a p i / c o r e `   p a r a   c h a m a r   c o m a n d o s   R u s t : 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + i m p o r t   {   i n v o k e   }   f r o m   " @ t a u r i - a p p s / a p i / c o r e " ; 
 
 + 
 
 + / /   E x e m p l o :   I n i c i a r   r u n t i m e 
 
 + e x p o r t   a s y n c   f u n c t i o n   s t a r t R u n t i m e ( ) :   P r o m i s e < R u n t i m e S n a p s h o t >   { 
 
 +     r e t u r n   i n v o k e < R u n t i m e S n a p s h o t > ( " s t a r t _ r u n t i m e _ c o m m a n d " ) ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   2 .   R o t a s   H T T P   C o n s u m i d a s 
 
 + 
 
 + # # #   2 . 1   P O S T   / v 1 / c h a t / c o m p l e t i o n s 
 
 + 
 
 + * * A r q u i v o : * *   ` C h a t V i e w . t s x `   ( l i n h a   2 5 1 ) 
 
 + 
 
 + * * F l u x o   c o m p l e t o : * * 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                     
 
 +          U s u % r i o                          Q%       C h a t V i e w                          Q%           f e t c h ( )          
 
 +          d i g i t a                               h a n d l e S e n d                           P O S T   / v 1 /        
 
 +                                                                                                                                                                     
 
 +                                                                                                        
 
 +                                                                                                       ]%
 
 +                                                                                                                                                                     
 
 +          D B   ( l o c a l )                              p a r s e ( )                                      S e r v e r            
 
 +        s q l . j s                                   r e s p o n s e                             A x u m                  
 
 +                                                                                                                                                                     
 
 + ` ` ` 
 
 + 
 
 + * * S t r e a m i n g   ( S S E ) : * * 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   C h a t V i e w . t s x   -   L i n h a   2 7 4 - 3 0 7 
 
 + i f   ( u s e S t r e a m )   { 
 
 +     c o n s t   r e a d e r   =   r e s . b o d y ! . g e t R e a d e r ( ) ; 
 
 +     c o n s t   d e c o d e r   =   n e w   T e x t D e c o d e r ( ' u t f - 8 ' ) ; 
 
 +     l e t   b u f   =   " " ; 
 
 + 
 
 +     w h i l e   ( t r u e )   { 
 
 +         c o n s t   {   d o n e ,   v a l u e   }   =   a w a i t   r e a d e r . r e a d ( ) ; 
 
 +         i f   ( d o n e )   b r e a k ; 
 
 +         b u f   + =   d e c o d e r . d e c o d e ( v a l u e ,   {   s t r e a m :   t r u e   } ) ; 
 
 +         c o n s t   l i n e s   =   b u f . s p l i t ( " \ n " ) ; 
 
 +         b u f   =   l i n e s . p o p ( ) ! ; 
 
 + 
 
 +         f o r   ( c o n s t   l i n e   o f   l i n e s )   { 
 
 +             i f   ( ! l i n e . s t a r t s W i t h ( " d a t a :   " ) )   c o n t i n u e ; 
 
 +             c o n s t   d a t a   =   l i n e . s l i c e ( 6 ) . t r i m ( ) ; 
 
 +             i f   ( d a t a   = = =   " [ D O N E ] " )   c o n t i n u e ; 
 
 +             
 
 +             c o n s t   c h u n k   =   J S O N . p a r s e ( d a t a ) ; 
 
 +             c o n s t   d e l t a   =   c h u n k . c h o i c e s ? . [ 0 ] ? . d e l t a ? . c o n t e n t ; 
 
 +             i f   ( d e l t a )   { 
 
 +                 f u l l C o n t e n t   + =   d e l t a ; 
 
 +                 s e t S t r e a m C o n t e n t ( p a r s e d . c o n t e n t ) ; 
 
 +                 s e t S t r e a m R e a s o n i n g ( p a r s e d . r e a s o n i n g ) ; 
 
 +             } 
 
 +             i f   ( c h u n k . u s a g e )   u s a g e   =   c h u n k . u s a g e ; 
 
 +         } 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o s t a   e m   s t r e a m i n g : * * 
 
 + ` ` ` 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " r o l e " : " a s s i s t a n t " } } ] } 
 
 + 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " c o n t e n t " : " O l % " } } ] } 
 
 + 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " d e l t a " : { " c o n t e n t " : " ! " } } ] } 
 
 + . . . 
 
 + d a t a :   { " i d " : " . . . " , " o b j e c t " : " c h a t . c o m p l e t i o n . c h u n k " , " c h o i c e s " : [ { " f i n i s h _ r e a s o n " : " s t o p " } ] , " u s a g e " : { " p r o m p t _ t o k e n s " : 1 0 , " c o m p l e t i o n _ t o k e n s " : 2 0 , " t o t a l _ t o k e n s " : 3 0 , " t o k e n s _ p e r _ s e c o n d " : 4 5 . 5 } } 
 
 + 
 
 + d a t a :   [ D O N E ] 
 
 + ` ` ` 
 
 + 
 
 + * * M o d o   B l o c k i n g : * * 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   C h a t V i e w . t s x   -   L i n h a   3 0 8 - 3 1 8 
 
 + }   e l s e   { 
 
 +     c o n s t   d a t a   =   a w a i t   r e s . j s o n ( ) ; 
 
 +     f u l l C o n t e n t   =   d a t a . c h o i c e s ? . [ 0 ] ? . m e s s a g e ? . c o n t e n t   | |   " " ; 
 
 +     u s a g e   =   d a t a . u s a g e ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o s t a   b l o c k i n g : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " i d " :   " u u i d - 1 2 3 " , 
 
 +     " o b j e c t " :   " c h a t . c o m p l e t i o n " , 
 
 +     " c r e a t e d " :   1 2 3 4 5 6 7 8 9 0 , 
 
 +     " m o d e l " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +     " c h o i c e s " :   [ { 
 
 +         " i n d e x " :   0 , 
 
 +         " m e s s a g e " :   { 
 
 +             " r o l e " :   " a s s i s t a n t " , 
 
 +             " c o n t e n t " :   " O l % !   C o m o   p o s s o   a j u d a r ? " 
 
 +         } , 
 
 +         " f i n i s h _ r e a s o n " :   " s t o p " 
 
 +     } ] , 
 
 +     " u s a g e " :   { 
 
 +         " p r o m p t _ t o k e n s " :   1 0 , 
 
 +         " c o m p l e t i o n _ t o k e n s " :   2 0 , 
 
 +         " t o t a l _ t o k e n s " :   3 0 , 
 
 +         " t o k e n s _ p e r _ s e c o n d " :   4 5 . 5 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   2 . 2   G E T   / v 1 / m o d e l s 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e M o d e l s . t s ` 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + c o n s t   r e s   =   a w a i t   f e t c h ( ` $ { s e r v e r U r l } / v 1 / m o d e l s ` ,   { 
 
 +     h e a d e r s :   a p i K e y   ?   {   " A u t h o r i z a t i o n " :   ` B e a r e r   $ { a p i K e y } `   }   :   { } , 
 
 + } ) ; 
 
 + c o n s t   d a t a   =   a w a i t   r e s . j s o n ( ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o s t a : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " o b j e c t " :   " l i s t " , 
 
 +     " d a t a " :   [ 
 
 +         { 
 
 +             " i d " :   " l o c a l - m o d e l " , 
 
 +             " o b j e c t " :   " m o d e l " , 
 
 +             " c r e a t e d " :   1 2 3 4 5 6 7 8 9 0 , 
 
 +             " o w n e d _ b y " :   " l o c a l " 
 
 +         } 
 
 +     ] 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   2 . 3   G E T   / h e a l t h 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e M o d e l s . t s `   ( s t a t u s   c h e c k ) 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + c o n s t   r e s   =   a w a i t   f e t c h ( ` $ { s e r v e r U r l } / h e a l t h ` ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * R e s p o s t a : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " s t a t u s " :   " o k " , 
 
 +     " m o d e l _ l o a d e d " :   t r u e , 
 
 +     " m o d e l _ i d " :   " q w e n 2 . 5 - 7 b - i n s t r u c t " , 
 
 +     " u p t i m e _ s e c s " :   3 6 0 0 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   3 .   C o m a n d o s   T a u r i   ( I n v o k e ) 
 
 + 
 
 + # # #   3 . 1   R u n t i m e   M a n a g e m e n t   A P I 
 
 + 
 
 + * * A r q u i v o : * *   ` f e a t u r e s / r u n t i m e / a p i . t s ` 
 
 + 
 
 + |   F u n % % o   |   C o m a n d o   T a u r i   |   D e s c r i % % o   | 
 
 + | - - - - - - - - | - - - - - - - - - - - - - - - | - - - - - - - - - - - | 
 
 + |   ` b o o t s t r a p R u n t i m e ( ) `   |   ` b o o t s t r a p _ r u n t i m e _ c o m m a n d `   |   I n i c i a l i z a   o   r u n t i m e   | 
 
 + |   ` g e t R u n t i m e S n a p s h o t ( ) `   |   ` g e t _ r u n t i m e _ s n a p s h o t _ c o m m a n d `   |   O b t % m   e s t a d o   a t u a l   | 
 
 + |   ` s a v e R u n t i m e C o n f i g ( c o n f i g ) `   |   ` s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d _ h a n d l e r `   |   S a l v a   c o n f i g u r a % % e s   | 
 
 + |   ` s t a r t R u n t i m e ( ) `   |   ` s t a r t _ r u n t i m e _ c o m m a n d `   |   I n i c i a   o   s e r v i d o r   l o c a l   | 
 
 + |   ` s t o p R u n t i m e ( ) `   |   ` s t o p _ r u n t i m e _ c o m m a n d `   |   P a r a   o   s e r v i d o r   | 
 
 + 
 
 + * * E x e m p l o   -   I n i c i a r   R u n t i m e : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   a p i . t s 
 
 + e x p o r t   a s y n c   f u n c t i o n   s t a r t R u n t i m e ( ) :   P r o m i s e < R u n t i m e S n a p s h o t >   { 
 
 +     t r y   { 
 
 +         r e t u r n   a w a i t   i n v o k e < R u n t i m e S n a p s h o t > ( " s t a r t _ r u n t i m e _ c o m m a n d " ) ; 
 
 +     }   c a t c h   { 
 
 +         / /   F a l l b a c k   p a r a   m o d o   w e b   ( s e m   T a u r i ) 
 
 +         c o n s t   s n a p s h o t   =   r e a d F a l l b a c k S n a p s h o t ( ) ; 
 
 +         r e t u r n   w r i t e F a l l b a c k S n a p s h o t ( { 
 
 +             . . . s n a p s h o t , 
 
 +             s t a t u s :   " e r r o r " , 
 
 +             l a s t _ e r r o r :   {   
 
 +                 c o d e :   " t a u r i _ u n a v a i l a b l e " ,   
 
 +                 m e s s a g e :   " L o c a l   r u n t i m e   c o n t r o l   r e q u i r e s   t h e   T a u r i   d e s k t o p   a p p . "   
 
 +             } , 
 
 +         } ) ; 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   3 . 2   M o d e l   M a n a g e m e n t   A P I 
 
 + 
 
 + |   F u n % % o   |   C o m a n d o   T a u r i   |   D e s c r i % % o   | 
 
 + | - - - - - - - - | - - - - - - - - - - - - - - - | - - - - - - - - - - - | 
 
 + |   ` s c a n R u n t i m e M o d e l s ( d i r ) `   |   ` s c a n _ m o d e l s `   |   E s c a n e i a   d i r e t %%r i o   d e   m o d e l o s   | 
 
 + |   ` p i c k R u n t i m e M o d e l s D i r ( ) `   |   ` p i c k _ m o d e l s _ d i r `   |   A b r e   d i a l o g   d e   s e l e % % o   | 
 
 + |   ` p i c k R u n t i m e M o d e l F i l e s ( ) `   |   ` p i c k _ m o d e l _ f i l e s `   |   S e l e c i o n a   a r q u i v o s   | 
 
 + |   ` s w a p M o d e l ( p a t h ) `   |   ` s w a p _ m o d e l _ c o m m a n d `   |   T r o c a   m o d e l o   a t i v o   | 
 
 + |   ` d e l e t e M o d e l F i l e ( p a t h ) `   |   ` d e l e t e _ m o d e l _ f i l e `   |   D e l e t a   a r q u i v o   . g g u f   | 
 
 + |   ` o p e n M o d e l F o l d e r ( p a t h ) `   |   ` o p e n _ m o d e l _ f o l d e r _ c o m m a n d `   |   A b r e   p a s t a   n o   E x p l o r e r   | 
 
 + 
 
 + * * E x e m p l o   -   E s c a n e a m e n t o : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   a s y n c   f u n c t i o n   s c a n R u n t i m e M o d e l s ( d i r :   s t r i n g ) :   P r o m i s e < R u n t i m e M o d e l F i l e [ ] >   { 
 
 +     r e t u r n   i n v o k e < R u n t i m e M o d e l F i l e [ ] > ( " s c a n _ m o d e l s " ,   {   d i r   } ) ; 
 
 + } 
 
 + / /   R e t o r n a :   [ {   n a m e :   " m o d e l . g g u f " ,   p a t h :   " / p a t h / t o / m o d e l . g g u f " ,   s i z e :   4 2 0 0 0 0 0 0 0 0   } ] 
 
 + ` ` ` 
 
 + 
 
 + # # #   3 . 3   H u g g i n g F a c e   I n t e g r a t i o n   A P I 
 
 + 
 
 + |   F u n % % o   |   C o m a n d o   T a u r i   |   D e s c r i % % o   | 
 
 + | - - - - - - - - | - - - - - - - - - - - - - - - | - - - - - - - - - - - | 
 
 + |   ` s e a r c h H u g g i n g F a c e M o d e l s ( q u e r y ,   t o k e n ) `   |   ` s e a r c h _ h u g g i n g _ f a c e _ m o d e l s _ c o m m a n d `   |   B u s c a   m o d e l o s   | 
 
 + |   ` s t a r t H u g g i n g F a c e D o w n l o a d ( r e p o ,   f i l e ,   t o k e n ) `   |   ` s t a r t _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d `   |   I n i c i a   d o w n l o a d   | 
 
 + |   ` c a n c e l H u g g i n g F a c e D o w n l o a d ( i d ) `   |   ` c a n c e l _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d `   |   C a n c e l a   d o w n l o a d   | 
 
 + 
 
 + * * E x e m p l o   -   B u s c a   H u g g i n g F a c e : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   a s y n c   f u n c t i o n   s e a r c h H u g g i n g F a c e M o d e l s ( 
 
 +     q u e r y :   s t r i n g ,   
 
 +     t o k e n   =   " " 
 
 + ) :   P r o m i s e < H u g g i n g F a c e M o d e l R e s u l t [ ] >   { 
 
 +     r e t u r n   i n v o k e < H u g g i n g F a c e M o d e l R e s u l t [ ] > ( " s e a r c h _ h u g g i n g _ f a c e _ m o d e l s _ c o m m a n d " ,   { 
 
 +         q u e r y , 
 
 +         t o k e n :   t o k e n . t r i m ( )   | |   n u l l , 
 
 +     } ) ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   3 . 4   G P U   I n f o   A P I 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   a s y n c   f u n c t i o n   q u e r y R u n t i m e G p u ( ) :   P r o m i s e < R u n t i m e G p u I n f o   |   n u l l >   { 
 
 +     r e t u r n   i n v o k e < R u n t i m e G p u I n f o > ( " q u e r y _ g p u " ) ; 
 
 + } 
 
 + / /   R e t o r n a :   {   n a m e :   " N V I D I A   R T X   4 0 9 0 " ,   v r a m _ m i b :   2 4 5 7 6 ,   r e c o m m e n d e d _ l a y e r s :   9 9 9   } 
 
 + ` ` ` 
 
 + 
 
 + # # #   3 . 5   F o r g e A g e n t   S e s s i o n   A P I 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e F o r g e A g e n t S e s s i o n . t s ` 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + c o n s t   r e s p o n s e   =   a w a i t   i n v o k e < S t a r t F o r g e A g e n t R e s p o n s e > ( 
 
 +     " s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d " ,   
 
 +     {   p r o m p t   } 
 
 + ) ; 
 
 + / /   R e t o r n a :   {   p l a n _ i d :   " f o r g e a g e n t - 1 2 3 4 5 6 7 8 9 0 " ,   p l a n :   A g e n t P l a n   } 
 
 + ` ` ` 
 
 + 
 
 + * * E v e n t o s   e s c u t a d o s : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + l i s t e n < S t e p S t a r t e d E v e n t > ( " f o r g e a g e n t : s t e p - s t a r t e d " ,   h a n d l e r ) ; 
 
 + l i s t e n < S t e p C o m p l e t e d E v e n t > ( " f o r g e a g e n t : s t e p - c o m p l e t e d " ,   h a n d l e r ) ; 
 
 + l i s t e n < A r t i f a c t R e a d y E v e n t > ( " f o r g e a g e n t : a r t i f a c t - r e a d y " ,   h a n d l e r ) ; 
 
 + l i s t e n < P l a n C o m p l e t e d E v e n t > ( " f o r g e a g e n t : p l a n - c o m p l e t e d " ,   h a n d l e r ) ; 
 
 + l i s t e n < S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - t h i n k i n g - s t a r t e d " ,   h a n d l e r ) ; 
 
 + l i s t e n < S p e c i a l i s t T h i n k i n g U p d a t e E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - t h i n k i n g - u p d a t e " ,   h a n d l e r ) ; 
 
 + l i s t e n < S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " ,   h a n d l e r ) ; 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   4 .   P e r s i s t % n c i a   L o c a l   ( s q l . j s ) 
 
 + 
 
 + # # #   4 . 1   E s t r u t u r a   d o   B a n c o 
 
 + 
 
 + * * A r q u i v o : * *   ` l i b / d b . t s ` 
 
 + 
 
 + O   f r o n t e n d   u s a   * * s q l . j s * *   ( S Q L i t e   c o m p i l a d o   p a r a   W e b A s s e m b l y )   c o m   p e r s i s t % n c i a   e m   ` l o c a l S t o r a g e ` : 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   i n i t D B ( )   -   C r i a % % o   d a s   t a b e l a s 
 
 + d b . r u n ( ` 
 
 +     C R E A T E   T A B L E   I F   N O T   E X I S T S   c h a t s   ( 
 
 +         i d   I N T E G E R   P R I M A R Y   K E Y   A U T O I N C R E M E N T , 
 
 +         t i t l e   T E X T   N O T   N U L L   D E F A U L T   ' N e w   C h a t ' , 
 
 +         c r e a t e d _ a t   I N T E G E R   N O T   N U L L   D E F A U L T   ( s t r f t i m e ( ' % s ' , ' n o w ' ) ) , 
 
 +         u p d a t e d _ a t   I N T E G E R   N O T   N U L L   D E F A U L T   ( s t r f t i m e ( ' % s ' , ' n o w ' ) ) 
 
 +     ) 
 
 + ` ) ; 
 
 + 
 
 + d b . r u n ( ` 
 
 +     C R E A T E   T A B L E   I F   N O T   E X I S T S   m e s s a g e s   ( 
 
 +         i d   I N T E G E R   P R I M A R Y   K E Y   A U T O I N C R E M E N T , 
 
 +         c h a t _ i d   I N T E G E R   N O T   N U L L , 
 
 +         r o l e   T E X T   N O T   N U L L , 
 
 +         c o n t e n t   T E X T   N O T   N U L L , 
 
 +         r e a s o n i n g _ c o n t e n t   T E X T ,                   - -   C o n t e %Q%d o   d o   < t h i n k > . . . < / t h i n k > 
 
 +         p r o m p t _ t o k e n s   I N T E G E R   D E F A U L T   0 , 
 
 +         c o m p l e t i o n _ t o k e n s   I N T E G E R   D E F A U L T   0 , 
 
 +         t o t a l _ t o k e n s   I N T E G E R   D E F A U L T   0 , 
 
 +         t o k e n s _ p e r _ s e c o n d   R E A L , 
 
 +         c r e a t e d _ a t   I N T E G E R   N O T   N U L L   D E F A U L T   ( s t r f t i m e ( ' % s ' , ' n o w ' ) ) 
 
 +     ) 
 
 + ` ) ; 
 
 + 
 
 + d b . r u n ( ` 
 
 +     C R E A T E   T A B L E   I F   N O T   E X I S T S   u s e r _ m e m o r i e s   ( 
 
 +         i d   I N T E G E R   P R I M A R Y   K E Y   A U T O I N C R E M E N T , 
 
 +         k e y   T E X T   N O T   N U L L   U N I Q U E , 
 
 +         v a l u e   T E X T   N O T   N U L L , 
 
 +         c o n f i d e n c e   R E A L   D E F A U L T   1 . 0 , 
 
 +         c r e a t e d _ a t   I N T E G E R , 
 
 +         u p d a t e d _ a t   I N T E G E R 
 
 +     ) 
 
 + ` ) ; 
 
 + ` ` ` 
 
 + 
 
 + # # #   4 . 2   P e r s i s t % n c i a 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   d b . t s   -   p e r s i s t ( ) 
 
 + p e r s i s t ( )   { 
 
 +     c o n s t   d a t a   =   t h i s . i n n e r . e x p o r t ( ) ;     / /   U i n t 8 A r r a y 
 
 +     / /   C o n v e r t e   p a r a   b a s e 6 4   e m   c h u n k s 
 
 +     l e t   b 6 4   =   " " ; 
 
 +     c o n s t   C H U N K   =   8 1 9 2 ; 
 
 +     f o r   ( l e t   i   =   0 ;   i   <   d a t a . l e n g t h ;   i   + =   C H U N K )   { 
 
 +         b 6 4   + =   S t r i n g . f r o m C h a r C o d e ( . . . d a t a . s u b a r r a y ( i ,   i   +   C H U N K ) ) ; 
 
 +     } 
 
 +     c o n s t   e n c o d e d   =   b t o a ( b 6 4 ) ; 
 
 +     l o c a l S t o r a g e . s e t I t e m ( " f o r g e l m _ d b _ v 2 " ,   e n c o d e d ) ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   4 . 3   Q u e r i e s   P r i n c i p a i s 
 
 + 
 
 + * * C a r r e g a r   m e n s a g e n s : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   C h a t V i e w . t s x   -   l o a d M e s s a g e s ( ) 
 
 + c o n s t   r o w s   =   d b . q u e r y < M e s s a g e > ( 
 
 +     " S E L E C T   *   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   O R D E R   B Y   c r e a t e d _ a t   A S C " , 
 
 +     [ t a r g e t C h a t I d ] 
 
 + ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * I n s e r i r   m e n s a g e m   d o   u s u % r i o : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + d b . r u n ( 
 
 +     " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' u s e r ' ,   ? ) " , 
 
 +     [ c i d ,   t e x t ] 
 
 + ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * I n s e r i r   r e s p o s t a   d o   a s s i s t e n t e : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + d b . r u n ( 
 
 +     ` I N S E R T   I N T O   m e s s a g e s   ( 
 
 +         c h a t _ i d ,   r o l e ,   c o n t e n t ,   r e a s o n i n g _ c o n t e n t ,   
 
 +         p r o m p t _ t o k e n s ,   c o m p l e t i o n _ t o k e n s ,   t o t a l _ t o k e n s ,   t o k e n s _ p e r _ s e c o n d 
 
 +     )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) ` , 
 
 +     [ c i d ,   c o n t e n t ,   r e a s o n i n g ,   u s a g e ? . p r o m p t _ t o k e n s ,   u s a g e ? . c o m p l e t i o n _ t o k e n s ,   
 
 +       u s a g e ? . t o t a l _ t o k e n s ,   u s a g e ? . t o k e n s _ p e r _ s e c o n d ] 
 
 + ) ; 
 
 + ` ` ` 
 
 + 
 
 + * * H i s t %%r i c o   p a r a   A P I : * * 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   C h a t V i e w . t s x   -   b u i l d A p i M e s s a g e s ( ) 
 
 + c o n s t   h i s t o r y   =   d b . q u e r y < {   r o l e :   s t r i n g ;   c o n t e n t :   s t r i n g   } > ( 
 
 +     ` S E L E C T   r o l e ,   c o n t e n t   F R O M   m e s s a g e s   
 
 +       W H E R E   c h a t _ i d   =   ?   A N D   c o n t e n t   ! =   ' '   
 
 +       A N D   c o n t e n t   N O T   L I K E   '         E r r o r : % '   
 
 +       O R D E R   B Y   c r e a t e d _ a t   D E S C   L I M I T   ? ` , 
 
 +     [ c i d ,   1 0 0 ] 
 
 + ) . r e v e r s e ( ) ; 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   5 .   F l u x o s   d e   D a d o s   D e t a l h a d o s 
 
 + 
 
 + # # #   5 . 1   F l u x o :   E n v i a r   M e n s a g e m 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                                                                              
 
 +                                                          F L U X O :   E N V I A R   M E N S A G E M                                                            
 
 +                                                                                                                                                                                                                                              
 
 + 
 
 + U s u % r i o   c l i c a   " E n v i a r " 
 
 +                  
 
 +                 ]%
 
 +                                                    
 
 +      h a n d l e S e n d ( )                Q%  1 .   V a l i d a   i n p u t   e   e s t a d o 
 
 +                                                    
 
 +                    
 
 +                   ]%
 
 +                                                    
 
 +      g e t O r C r e a t e C h a t            Q%  2 .   C r i a   n o v o   c h a t   s e   n e c e s s % r i o   ( I N S E R T   I N T O   c h a t s ) 
 
 +                                                    
 
 +                    
 
 +                   ]%
 
 +                                                    
 
 +      d b . r u n ( I N S E R T )              Q%  3 .   S a l v a   m e n s a g e m   d o   u s u % r i o   n a   D B   l o c a l 
 
 +                                                    
 
 +                    
 
 +                   ]%
 
 +                                                    
 
 +      b u i l d A p i M e s s a g e s            Q%  4 .   B u s c a   h i s t %%r i c o   d a s   %Q%l t i m a s   1 0 0   m e n s a g e n s 
 
 +                                                    
 
 +                    
 
 +                   ]%
 
 +                                                                                        
 
 +      f e t c h ( P O S T   / v 1 / c h a t / c o m p l e t i o n s )              Q%  5 .   E n v i a   p a r a   s e r v i d o r   H T T P 
 
 +                                                                               H e a d e r s :   C o n t e n t - T y p e ,   A u t h o r i z a t i o n 
 
 +                                                                               B o d y :   { m o d e l ,   m e s s a g e s ,   s t r e a m ,   . . . } 
 
 +                                                                                        
 
 +                            
 
 +                                $%               
 
 +                 ]%                    ]%
 
 +                                                                         
 
 +          S t r e a m               B l o c k          
 
 +          M o d e                   M o d e            
 
 +                                                                         
 
 +                                           
 
 +                 ]%                        ]%
 
 +                                                                                            
 
 +          P r o c e s s a   c h u n k s   S S E                  
 
 +          -   s e t S t r e a m C o n t e n t ( )                
 
 +          -   s e t S t r e a m R e a s o n i n g ( )            
 
 +          -   p a r s e A s s i s t a n t R e s p o n s e ( )    
 
 +                                                                                            
 
 +                                
 
 +                               ]%
 
 +                                                                                            
 
 +          d b . r u n ( I N S E R T   a s s i s t a n t )                Q%  6 .   S a l v a   r e s p o s t a   c o m p l e t a   n a   D B 
 
 +                                                                                            
 
 +                                
 
 +                               ]%
 
 +                                                                                            
 
 +          l o a d M e s s a g e s ( )                                    Q%  7 .   R e c a r r e g a   m e n s a g e n s   d o   c h a t 
 
 +                                                                                            
 
 + ` ` ` 
 
 + 
 
 + # # #   5 . 2   F l u x o :   T r o c a r   M o d e l o 
 
 + 
 
 + ` ` ` 
 
 + U s u % r i o   s e l e c i o n a   n o v o   m o d e l o   n o   d r o p d o w n 
 
 +                  
 
 +                 ]%
 
 +                                                                                        
 
 +      o n M o d e l C h a n g e ( )                          
 
 +      o n M o d e l S w a p ( )                              
 
 +                                                                                        
 
 +                            
 
 +                           ]%
 
 +                                                                                        
 
 +      s w a p M o d e l ( n e w M o d e l P a t h )                  Q%  i n v o k e ( " s w a p _ m o d e l _ c o m m a n d " ) 
 
 +                                                                                        
 
 +                            
 
 +                           ]%
 
 +                                                                                        
 
 +            T a u r i   B a c k e n d   ( R u s t )          
 
 +        1 .   s t o p _ r u n t i m e ( )                    
 
 +        2 .   A t u a l i z a   m o d e l _ p a t h          
 
 +        3 .   s a v e _ r u n t i m e _ c o n f i g ( )      
 
 +        4 .   s t a r t _ r u n t i m e ( )                  
 
 +                                                                                        
 
 +                            
 
 +                           ]%
 
 +                                                                                        
 
 +      R u n t i m e S n a p s h o t   r e t o r n a d o      
 
 +      {   s t a t u s :   " r e a d y " ,   . . .   }        
 
 +                                                                                        
 
 +                            
 
 +                           ]%
 
 +                                                                                        
 
 +      s e t S e l e c t e d M o d e l ( p a t h )                    Q%  A t u a l i z a   e s t a d o   R e a c t 
 
 +                                                                                        
 
 + ` ` ` 
 
 + 
 
 + # # #   5 . 3   F l u x o :   D o w n l o a d   H u g g i n g F a c e 
 
 + 
 
 + ` ` ` 
 
 + U s u % r i o   b u s c a   e   s e l e c i o n a   m o d e l o 
 
 +                  
 
 +                 ]%
 
 +                                                                                                    
 
 +      s e a r c h H u g g i n g F a c e M o d e l s ( )                      Q%  i n v o k e ( " s e a r c h _ h u g g i n g _ f a c e _ m o d e l s _ c o m m a n d " ) 
 
 +                                                                             A r g s :   {   q u e r y ,   t o k e n   } 
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 +                                                                                                    
 
 +      L i s t a   d e   m o d e l o s   r e t o r n a d a            
 
 +      [ {   r e p o _ i d ,   a u t h o r ,                        
 
 +            v e r i f i e d _ f i l e s :   [ . . . ]   } ]          
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 + U s u % r i o   c l i c a   " D o w n l o a d " 
 
 +                  
 
 +                 ]%
 
 +                                                                                                    
 
 +      s t a r t H u g g i n g F a c e D o w n l o a d ( )                    Q%  i n v o k e ( " s t a r t _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d " ) 
 
 +                                                                             A r g s :   {   r e p o ,   f i l e N a m e ,   t o k e n   } 
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 +                                                                                                    
 
 +      E s c u t a   e v e n t o s   d e   p r o g r e s s o          
 
 +      l i s t e n ( " h u g g i n g - f a c e - d o w n l o a d -      
 
 +          p r o g r e s s " ,   h a n d l e r )                      
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 +                                                                                                    
 
 +      E v e n t o s   r e c e b i d o s :                            
 
 +      {   p h a s e :   " p r o g r e s s " ,                        
 
 +          p r o g r e s s P e r c e n t a g e :   4 5 ,              
 
 +          d o w n l o a d e d M B :   2 0 4 8 ,                      
 
 +          t o t a l M B :   4 0 9 6   }                              
 
 +                                                                                                    
 
 + ` ` ` 
 
 + 
 
 + # # #   5 . 4   F l u x o :   F o r g e A g e n t 
 
 + 
 
 + ` ` ` 
 
 + U s u % r i o   a t i v a   m o d o   A g e n t i c   e   e n v i a   m e n s a g e m 
 
 +                  
 
 +                 ]%
 
 +                                                                                                    
 
 +      s t a r t _ f o r g e a g e n t _ s e s s i o n                        Q%  i n v o k e ( " s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d " ) 
 
 +      _ c o m m a n d ( {   p r o m p t   } )                        
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 +                                                                                                    
 
 +      R e s p o s t a   i n i c i a l :                              
 
 +      {   p l a n _ i d ,   p l a n :   {                            
 
 +          t i t l e ,   o v e r v i e w ,   s t e p s [ ]   } }      
 
 +                                                                                                    
 
 +                                    
 
 +                                   ]%
 
 +                                                                                                    
 
 +      E s c u t a   e v e n t o s   T a u r i :                      
 
 +                                                                                                    
 
 +      f o r g e a g e n t : s t e p - s t a r t e d                          Q%  A t u a l i z a   U I   c o m   p a s s o   a t u a l 
 
 +      f o r g e a g e n t : s t e p - c o m p l e t e d                      Q%  M a r c a   p a s s o   c o m o   c o n c l u % d o 
 
 +      f o r g e a g e n t : s p e c i a l i s t -                            Q%  M o s t r a   e s p e c i a l i s t a 
 
 +          t h i n k i n g - s t a r t e d                            
 
 +      f o r g e a g e n t : s p e c i a l i s t -                            Q%  A t u a l i z a   p e n s a m e n t o 
 
 +          t h i n k i n g - u p d a t e                              
 
 +      f o r g e a g e n t : s p e c i a l i s t -                            Q%  M o s t r a   r e s p o s t a   d o   e s p e c i a l i s t a 
 
 +          r e s p o n s e - c o m p l e t e d                        
 
 +      f o r g e a g e n t : p l a n - c o m p l e t e d                      Q%  M o s t r a   r e s u m o   f i n a l 
 
 +                                                                                                    
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   6 .   H o o k s   P r i n c i p a i s 
 
 + 
 
 + # # #   6 . 1   u s e R u n t i m e M a n a g e r 
 
 + 
 
 + * * A r q u i v o : * *   ` f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s ` 
 
 + 
 
 + G e r e n c i a   t o d o   o   e s t a d o   d o   r u n t i m e   l o c a l : 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   f u n c t i o n   u s e R u n t i m e M a n a g e r ( )   { 
 
 +     / /   E s t a d o s 
 
 +     c o n s t   [ d r a f t S t a t e ,   s e t D r a f t S t a t e ]   =   u s e S t a t e < R u n t i m e D r a f t S t a t e > ( . . . ) ; 
 
 +     c o n s t   [ l o a d i n g ,   s e t L o a d i n g ]   =   u s e S t a t e ( t r u e ) ; 
 
 +     c o n s t   [ b u s y ,   s e t B u s y ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     / /   M % t o d o s   e x p o s t o s 
 
 +     r e t u r n   { 
 
 +         s n a p s h o t :   d r a f t S t a t e . l i v e S n a p s h o t ,                       / /   E s t a d o   a t u a l   d o   r u n t i m e 
 
 +         c o n n e c t i o n :   {   m o d e ,   s e r v e r U r l ,   a p i K e y   } ,           / /   D a d o s   d e   c o n e x % o 
 
 +         s t a r t L o c a l ,                                                                     / /   I n i c i a   s e r v i d o r 
 
 +         s t o p L o c a l ,                                                                       / /   P a r a   s e r v i d o r 
 
 +         s a v e C o n f i g ,                                                                     / /   S a l v a   c o n f i g u r a % % e s 
 
 +         s c a n M o d e l s ,                                                                     / /   E s c a n e i a   m o d e l o s 
 
 +         / /   . . .   e   m a i s 
 
 +     } ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + * * P o l l i n g : * *   A t u a l i z a   a   c a d a   3   s e g u n d o s 
 
 + ` ` ` t y p e s c r i p t 
 
 + c o n s t   i d   =   w i n d o w . s e t I n t e r v a l ( ( )   = >   { 
 
 +     r e f r e s h ( ) . c a t c h ( ( )   = >   u n d e f i n e d ) ; 
 
 + } ,   3 0 0 0 ) ; 
 
 + ` ` ` 
 
 + 
 
 + # # #   6 . 2   u s e M o d e l s 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e M o d e l s . t s ` 
 
 + 
 
 + G e r e n c i a   a   l i s t a   d e   m o d e l o s   d i s p o n % v e i s : 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   f u n c t i o n   u s e M o d e l s ( s e r v e r U r l :   s t r i n g ,   a p i K e y :   s t r i n g ,   e n a b l e d :   b o o l e a n )   { 
 
 +     c o n s t   [ m o d e l s ,   s e t M o d e l s ]   =   u s e S t a t e < M o d e l I n f o [ ] > ( [ ] ) ; 
 
 +     c o n s t   [ s e l e c t e d M o d e l ,   s e t S e l e c t e d M o d e l ]   =   u s e S t a t e ( " " ) ; 
 
 +     c o n s t   [ s t a t u s ,   s e t S t a t u s ]   =   u s e S t a t e < S e r v e r S t a t u s > ( " l o a d i n g " ) ; 
 
 + 
 
 +     c o n s t   r e f r e s h   =   u s e C a l l b a c k ( a s y n c   ( )   = >   { 
 
 +         / /   1 .   H e a l t h   c h e c k 
 
 +         c o n s t   h e a l t h R e s   =   a w a i t   f e t c h ( ` $ { s e r v e r U r l } / h e a l t h ` ) ; 
 
 +         
 
 +         / /   2 .   L i s t a   m o d e l o s 
 
 +         c o n s t   m o d e l s R e s   =   a w a i t   f e t c h ( ` $ { s e r v e r U r l } / v 1 / m o d e l s ` ,   {   h e a d e r s   } ) ; 
 
 +         c o n s t   d a t a   =   a w a i t   m o d e l s R e s . j s o n ( ) ; 
 
 +         s e t M o d e l s ( d a t a . d a t a ) ; 
 
 +     } ,   [ s e r v e r U r l ,   a p i K e y ] ) ; 
 
 + 
 
 +     r e t u r n   {   m o d e l s ,   s e l e c t e d M o d e l ,   s e t S e l e c t e d M o d e l ,   s t a t u s ,   r e f r e s h   } ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   6 . 3   u s e F o r g e A g e n t S e s s i o n 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e F o r g e A g e n t S e s s i o n . t s ` 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   f u n c t i o n   u s e F o r g e A g e n t S e s s i o n ( )   { 
 
 +     c o n s t   [ s t a t e ,   s e t S t a t e ]   =   u s e S t a t e < A g e n t P l a n S t a t e   |   n u l l > ( n u l l ) ; 
 
 + 
 
 +     c o n s t   s t a r t   =   u s e C a l l b a c k ( a s y n c   ( p r o m p t :   s t r i n g )   = >   { 
 
 +         c o n s t   r e s p o n s e   =   a w a i t   i n v o k e < S t a r t F o r g e A g e n t R e s p o n s e > ( 
 
 +             " s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d " ,   
 
 +             {   p r o m p t   } 
 
 +         ) ; 
 
 +         / /   I n i c i a l i z a   e s t a d o   c o m   p l a n o   r e c e b i d o 
 
 +         c o n s t   i n i t i a l   =   c r e a t e F o r g e A g e n t S t a t e ( r e s p o n s e . p l a n _ i d ,   r e s p o n s e . p l a n ) ; 
 
 +         u p d a t e S t a t e ( i n i t i a l ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     / /   E s c u t a   e v e n t o s   e m   t e m p o   r e a l 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         c o n s t   u n l i s t e n   =   a w a i t   P r o m i s e . a l l ( [ 
 
 +             l i s t e n < S t e p S t a r t e d E v e n t > ( " f o r g e a g e n t : s t e p - s t a r t e d " ,   h a n d l e r ) , 
 
 +             l i s t e n < S t e p C o m p l e t e d E v e n t > ( " f o r g e a g e n t : s t e p - c o m p l e t e d " ,   h a n d l e r ) , 
 
 +             / /   . . .   m a i s   e v e n t o s 
 
 +         ] ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     r e t u r n   {   s t a t e ,   s t a r t ,   r e s e t   } ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   6 . 4   u s e D B 
 
 + 
 
 + * * A r q u i v o : * *   ` h o o k s / u s e D B . t s ` 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + e x p o r t   f u n c t i o n   u s e D B ( )   { 
 
 +     c o n s t   [ d b ,   s e t D b ]   =   u s e S t a t e < D B   |   n u l l > ( n u l l ) ; 
 
 +     c o n s t   [ r e a d y ,   s e t R e a d y ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         i n i t D B ( ) . t h e n ( ( d a t a b a s e )   = >   { 
 
 +             s e t D b ( d a t a b a s e ) ; 
 
 +             s e t R e a d y ( t r u e ) ; 
 
 +         } ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     r e t u r n   {   d b ,   r e a d y   } ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   7 .   T i p o s   d e   D a d o s   ( T y p e S c r i p t ) 
 
 + 
 
 + # # #   7 . 1   M e n s a g e n s 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   l i b / t y p e s . t s 
 
 + i n t e r f a c e   M e s s a g e   { 
 
 +     i d :   n u m b e r ; 
 
 +     c h a t _ i d :   n u m b e r ; 
 
 +     r o l e :   " u s e r "   |   " a s s i s t a n t "   |   " s y s t e m " ; 
 
 +     c o n t e n t :   s t r i n g ; 
 
 +     r e a s o n i n g _ c o n t e n t ? :   s t r i n g   |   n u l l ;         / /   < t h i n k > . . . < / t h i n k > 
 
 +     d i s p l a y _ m o d e ? :   " d e f a u l t "   |   " a g e n t i c _ f i n a l " ; 
 
 +     f o r g e a g e n t _ s t a t e ? :   A g e n t P l a n S t a t e ; 
 
 +     p r o m p t _ t o k e n s ? :   n u m b e r ; 
 
 +     c o m p l e t i o n _ t o k e n s ? :   n u m b e r ; 
 
 +     t o t a l _ t o k e n s ? :   n u m b e r ; 
 
 +     t o k e n s _ p e r _ s e c o n d ? :   n u m b e r ; 
 
 +     c r e a t e d _ a t :   n u m b e r ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   7 . 2   R u n t i m e 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   f e a t u r e s / r u n t i m e / t y p e s . t s 
 
 + i n t e r f a c e   R u n t i m e S n a p s h o t   { 
 
 +     s t a t u s :   " s t o p p e d "   |   " s t a r t i n g "   |   " l o a d i n g "   |   " r e a d y "   |   " d e g r a d e d "   |   " s t o p p i n g "   |   " e r r o r " ; 
 
 +     r e a d y :   b o o l e a n ; 
 
 +     p r o c e s s _ r u n n i n g :   b o o l e a n ; 
 
 +     r e s o l v e d _ u r l :   s t r i n g ; 
 
 +     b i n a r y _ p a t h :   s t r i n g   |   n u l l ; 
 
 +     l a s t _ e r r o r :   {   c o d e :   s t r i n g ;   m e s s a g e :   s t r i n g   }   |   n u l l ; 
 
 +     a c t i v e _ c o m m a n d :   " i d l e "   |   " s a v e "   |   " s t a r t "   |   " s t o p "   |   " s a v e _ a n d _ s t a r t " ; 
 
 +     l a s t _ c o m m a n d _ r e s u l t :   { 
 
 +         c o m m a n d :   s t r i n g ; 
 
 +         o u t c o m e :   " s u c c e e d e d "   |   " b l o c k e d "   |   " f a i l e d " ; 
 
 +         m e s s a g e :   s t r i n g ; 
 
 +     } ; 
 
 +     c o n f i g :   R u n t i m e C o n f i g ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   R u n t i m e C o n f i g   { 
 
 +     c o n n e c t i o n _ m o d e :   " l o c a l "   |   " r e m o t e " ; 
 
 +     s e r v e r _ u r l :   s t r i n g ; 
 
 +     a p i _ k e y :   s t r i n g ; 
 
 +     m o d e l _ p a t h :   s t r i n g   |   n u l l ; 
 
 +     m o d e l s _ d i r :   s t r i n g   |   n u l l ; 
 
 +     a d d r :   s t r i n g ;                             / /   " 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " 
 
 +     g p u _ l a y e r s :   n u m b e r ; 
 
 +     c t x _ s i z e :   n u m b e r ; 
 
 +     / /   . . . 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   7 . 3   F o r g e A g e n t 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   t y p e s / f o r g e a g e n t . t s 
 
 + i n t e r f a c e   A g e n t P l a n   { 
 
 +     t i t l e :   s t r i n g ; 
 
 +     o v e r v i e w :   s t r i n g ; 
 
 +     s t e p s :   A g e n t S t e p [ ] ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   A g e n t S t e p   { 
 
 +     i d :   n u m b e r ; 
 
 +     t i t l e :   s t r i n g ; 
 
 +     d e s c r i p t i o n :   s t r i n g ; 
 
 +     s t a t u s :   " p e n d i n g "   |   " r u n n i n g "   |   " c o m p l e t e d "   |   " e r r o r " ; 
 
 +     s u b _ s t e p s :   A g e n t S u b S t e p [ ] ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   S p e c i a l i s t R e s p o n s e   { 
 
 +     s p e c i a l i s t _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ n a m e :   s t r i n g ; 
 
 +     t h i n k i n g :   s t r i n g ; 
 
 +     r e s p o n s e :   s t r i n g ; 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   8 .   R e s u m o   d a s   C o m u n i c a % % e s 
 
 + 
 
 + # # #   T a b e l a   d e   E n d p o i n t s 
 
 + 
 
 + |   O r i g e m   |   D e s t i n o   |   M % t o d o   |   R o t a / C o m m a n d   |   P a y l o a d   |   R e s p o n s e   | 
 
 + | - - - - - - - - | - - - - - - - - - | - - - - - - - - | - - - - - - - - - - - - - - | - - - - - - - - - | - - - - - - - - - - | 
 
 + |   C h a t V i e w   |   H T T P   S e r v e r   |   P O S T   |   ` / v 1 / c h a t / c o m p l e t i o n s `   |   ` { m o d e l ,   m e s s a g e s ,   s t r e a m ,   m a x _ t o k e n s } `   |   S S E   o u   J S O N   | 
 
 + |   u s e M o d e l s   |   H T T P   S e r v e r   |   G E T   |   ` / v 1 / m o d e l s `   |   -   |   ` { d a t a :   M o d e l I n f o [ ] } `   | 
 
 + |   u s e M o d e l s   |   H T T P   S e r v e r   |   G E T   |   ` / h e a l t h `   |   -   |   ` { s t a t u s ,   m o d e l _ l o a d e d } `   | 
 
 + |   u s e R u n t i m e M a n a g e r   |   T a u r i   |   i n v o k e   |   ` s t a r t _ r u n t i m e _ c o m m a n d `   |   -   |   ` R u n t i m e S n a p s h o t `   | 
 
 + |   u s e R u n t i m e M a n a g e r   |   T a u r i   |   i n v o k e   |   ` s t o p _ r u n t i m e _ c o m m a n d `   |   -   |   ` R u n t i m e S n a p s h o t `   | 
 
 + |   u s e R u n t i m e M a n a g e r   |   T a u r i   |   i n v o k e   |   ` s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d _ h a n d l e r `   |   ` { c o n f i g } `   |   ` R u n t i m e S n a p s h o t `   | 
 
 + |   u s e R u n t i m e M a n a g e r   |   T a u r i   |   i n v o k e   |   ` s c a n _ m o d e l s `   |   ` { d i r } `   |   ` R u n t i m e M o d e l F i l e [ ] `   | 
 
 + |   u s e R u n t i m e M a n a g e r   |   T a u r i   |   i n v o k e   |   ` s w a p _ m o d e l _ c o m m a n d `   |   ` { n e w M o d e l P a t h } `   |   ` R u n t i m e S n a p s h o t `   | 
 
 + |   A P I   H u g g i n g F a c e   |   T a u r i   |   i n v o k e   |   ` s e a r c h _ h u g g i n g _ f a c e _ m o d e l s _ c o m m a n d `   |   ` { q u e r y ,   t o k e n } `   |   ` H u g g i n g F a c e M o d e l R e s u l t [ ] `   | 
 
 + |   A P I   H u g g i n g F a c e   |   T a u r i   |   i n v o k e   |   ` s t a r t _ h u g g i n g _ f a c e _ d o w n l o a d _ c o m m a n d `   |   ` { r e p o ,   f i l e N a m e ,   t o k e n } `   |   ` d o w n l o a d I d `   | 
 
 + |   u s e F o r g e A g e n t S e s s i o n   |   T a u r i   |   i n v o k e   |   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   |   ` { p r o m p t } `   |   ` { p l a n _ i d ,   p l a n } `   | 
 
 + |   u s e F o r g e A g e n t S e s s i o n   |   T a u r i   |   l i s t e n   |   ` f o r g e a g e n t : s t e p - s t a r t e d `   |   -   |   ` S t e p S t a r t e d E v e n t `   | 
 
 + |   u s e F o r g e A g e n t S e s s i o n   |   T a u r i   |   l i s t e n   |   ` f o r g e a g e n t : s t e p - c o m p l e t e d `   |   -   |   ` S t e p C o m p l e t e d E v e n t `   | 
 
 + |   u s e F o r g e A g e n t S e s s i o n   |   T a u r i   |   l i s t e n   |   ` f o r g e a g e n t : p l a n - c o m p l e t e d `   |   -   |   ` P l a n C o m p l e t e d E v e n t `   | 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   9 .   C o n f i g u r a % % e s   e   E s t a d o   G l o b a l 
 
 + 
 
 + # # #   E s t a d o   d o   R u n t i m e   ( C o n t e x t o   G l o b a l ) 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   A p p . t s x 
 
 + c o n s t   r u n t i m e   =   u s e R u n t i m e M a n a g e r ( ) ; 
 
 + 
 
 + / /   A c e s s o   e m   c o m p o n e n t e s   f i l h o s   v i a   p r o p s 
 
 + < C h a t V i e w 
 
 +     s e r v e r = { r u n t i m e . c o n n e c t i o n . s e r v e r U r l }             / /   " h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " 
 
 +     a p i K e y = { r u n t i m e . c o n n e c t i o n . a p i K e y }                   / /   " " 
 
 +     m o d e l = { s e l e c t e d M o d e l }                                             / /   " q w e n 2 . 5 - 7 b - i n s t r u c t " 
 
 +     r u n t i m e S t a t u s = { r u n t i m e . s n a p s h o t . s t a t u s }         / /   " r e a d y " 
 
 + / > 
 
 + ` ` ` 
 
 + 
 
 + # # #   P e r s i s t % n c i a   d o   R u n t i m e 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   l o c a l S t o r a g e :   f o r g e l m _ r u n t i m e _ s n a p s h o t _ v 1 
 
 + { 
 
 +     " s t a t u s " :   " r e a d y " , 
 
 +     " r e a d y " :   t r u e , 
 
 +     " p r o c e s s _ r u n n i n g " :   t r u e , 
 
 +     " r e s o l v e d _ u r l " :   " h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " , 
 
 +     " c o n f i g " :   { 
 
 +         " c o n n e c t i o n _ m o d e " :   " l o c a l " , 
 
 +         " m o d e l _ p a t h " :   " D : / m o d e l s / m o d e l . g g u f " , 
 
 +         " a d d r " :   " 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 0 .   D i a g r a m a   d e   S e q u % n c i a   -   C h a t   C o m p l e t o 
 
 + 
 
 + ` ` ` 
 
 + U s u % r i o         C h a t V i e w         D B ( s q l . j s )         H T T P   S e r v e r         T a u r i         M o d e l o 
 
 +                                                                                                                                       
 
 +              m e n s a g e m   Q%                                                                                                         
 
 +                                       I N S E R T            Q%                                                                              
 
 +                                                                                                                                                   
 
 +                                                                                                                                       
 
 +                                       S E L E C T            Q%     ( h i s t %%r i c o )                                                    
 
 +                                                                                                                                                   
 
 +                                                                                                                                       
 
 +                                                                       ]%                                            ]%                                ]%        Q%             
 
 +                                       f e t c h ( )                                                                  i n f e r e n c e 
 
 +                                     P O S T   / v 1 /                                                                                 
 
 +                                 c h a t / c o m p l e t i o n s                                                                      
 
 +                                                                                                                                       
 
 +                                                                       ]%                                            ]%                                ]%                              
 
 +                                       S S E                                                                                           
 
 +                                       c h u n k s                                                                                     
 
 +                                                                                                                                       
 
 +                 s t r e a m                                                                                                             
 
 +              t o k e n s                                                                                                            
 
 +                                                                                                                                     
 
 +                                     I N S E R T            Q%                                                                              
 
 +                                   a s s i s t a n t                                                                                 
 
 +                                                                                                                                                 
 
 +                                                                                                                                     
 
 +              d i s p l a y                                                                                                            
 
 +            c o m p l e t o                                                                                                          
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   C o n c l u s % o 
 
 + 
 
 + O   f r o n t e n d   F o r g e L M   c o n s o m e   o   b a c k e n d   a t r a v % s   d e   * * d u a s   c a m a d a s * *   d i s t i n t a s : 
 
 + 
 
 + 1 .   * * H T T P   A P I * *   -   P a r a   c h a t   c o m p l e t i o n s   ( s t r e a m i n g   e   b l o c k i n g )   v i a   ` f e t c h ( ) ` 
 
 + 2 .   * * T a u r i   C o m m a n d s * *   -   P a r a   g e r e n c i a m e n t o   d o   r u n t i m e ,   m o d e l o s   e   d o w n l o a d s   v i a   ` i n v o k e ( ) ` 
 
 + 
 
 + A   p e r s i s t % n c i a   l o c a l   u s a   * * s q l . j s * *   ( S Q L i t e   W A S M )   c o m   b a c k u p   e m   ` l o c a l S t o r a g e ` ,   g a r a n t i n d o   q u e   c o n v e r s a s   e   m e m %%r i a s   d o   u s u % r i o   s e j a m   m a n t i d a s   e n t r e   s e s s % e s . 
 
 + 
 
 + O   s i s t e m a   s u p o r t a   * * d o i s   m o d o s * * : 
 
 + -   * * L o c a l * * :   T a u r i   g e r e n c i a   o   p r o c e s s o   d o   s e r v i d o r   H T T P   i n t e r n a m e n t e 
 
 + -   * * R e m o t e * * :   C o n e c t a   a   u m   s e r v i d o r   O p e n A I - c o m p a t i b l e   e x t e r n o 
 
 + 
 
 + T o d o s   o s   c o m a n d o s   T a u r i   p o s s u e m   * * f a l l b a c k s   p a r a   m o d o   w e b * * ,   p e r m i t i n d o   q u e   o   a p p   f u n c i o n e   ( c o m   f u n c i o n a l i d a d e   r e d u z i d a )   m e s m o   s e m   o   b a c k e n d   T a u r i . 
 
 d i f f   - - g i t   a / a u t o r e s e a r c h - d a s h b o a r d . m d   b / a u t o r e s e a r c h - d a s h b o a r d . m d 
 
 i n d e x   1 8 6 8 3 6 3 . . d 0 4 d e 7 5   1 0 0 6 4 4 
 
 - - -   a / a u t o r e s e a r c h - d a s h b o a r d . m d 
 
 + + +   b / a u t o r e s e a r c h - d a s h b o a r d . m d 
 
 @ @   - 1 , 9   + 1 , 3 6   @ @ 
 
 - #   A u t o r e s e a r c h   D a s h b o a r d :   t a u r i - c h a t - a c t i v e - h i s t o r y 
 
 + #   A u t o r e s e a r c h   D a s h b o a r d :   f i x - f o r g e a g e n t - i n f e r e n c e - e r r o r 
 
   
 
 - * * R u n s : * *   1   |   * * K e p t : * *   1   |   * * D i s c a r d e d : * *   0   |   * * C r a s h e d : * *   0 
 
 - * * B a s e l i n e : * *   c h a t _ h i s t o r y _ s c o r e :   1 0 0 . 0 %   ( # 4 7 ) 
 
 - * * B e s t : * *   c h a t _ h i s t o r y _ s c o r e :   1 0 0 . 0 %   ( # 4 7 ,   + 0 . 0 % ) 
 
 + * * R u n s : * *   2   |   * * K e p t : * *   2   |   * * D i s c a r d e d : * *   0   |   * * C r a s h e d : * *   0 
 
 + * * B a s e l i n e : * *   v a l i d a t i o n _ s c o r e :   0   ( # 0 ) 
 
 + * * B e s t : * *   v a l i d a t i o n _ s c o r e :   1 0 0   ( # 1 ,   + 1 0 0 . 0 % ) 
 
   
 
 - |   #   |   c o m m i t   |   c h a t _ h i s t o r y _ s c o r e   |   s t a t u s   |   d e s c r i p t i o n   | 
 
 - | - - - | - - - - - - - - | - - - - - - - - - - - - - - - - - - - - | - - - - - - - - | - - - - - - - - - - - - - | 
 
 - |   4 7   |   4 1 5 5 9 b e   |   1 0 0 . 0 %   ( + 0 . 0 % )   |   k e e p   |   p r e s e r v e   i n - f l i g h t   g e n e r a t i o n   w h e n   c h a t I d   s w i t c h e s   t o   t h e   n e w l y   c r e a t e d   c h a t   | 
 
 + |   #   |   c o m m i t   |   v a l i d a t i o n _ s c o r e   |   c o m p i l a t i o n   |   s t a t u s   |   d e s c r i p t i o n   | 
 
 + | - - - | - - - - - - - - | - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - | - - - - - - - - | - - - - - - - - - - - - - | 
 
 + |   1   |   7 7 c 5 7 c 3   |   1 0 0   |   p a s s e d   |   k e e p   |   A d d   r u n t i m e   s t a t e   v a l i d a t i o n   b e f o r e   F o r g e A g e n t   H T T P   c a l l   | 
 
 + |   2   |   e 5 2 9 a 0 5   |   1 0 0   |   p a s s e d   |   k e e p   |   F i x   c o m p i l a t i o n :   m a t c h   R u n t i m e S t a t u s   e n u m   v a r i a n t s   | 
 
 + 
 
 + # #   S u m m a r y 
 
 + 
 
 + # # #   P r o b l e m 
 
 + E r r o   g e n % r i c o   " D e s c u l p e ,   o   s e r v i d o r   d e   i n f e r % n c i a   n % o   e s t %   d i s p o n % v e l . . . "   a o   e n v i a r   m e n s a g e n s   F o r g e A g e n t   s e m   r u n t i m e   p r o n t o . 
 
 + 
 
 + # # #   R o o t   C a u s e 
 
 + ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   n % o   v e r i f i c a v a   ` p r o c e s s _ r u n n i n g `   o u   ` r e a d y `   a n t e s   d a   c h a m a d a   H T T P . 
 
 + 
 
 + # # #   S o l u t i o n 
 
 + V a l i d a % % o   d e   e s t a d o   p r % - H T T P   c o m   m e n s a g e n s   d e   e r r o   d e s c r i t i v a s   p o r   c e n % r i o . 
 
 + 
 
 + # # #   R e s u l t 
 
 + -   * * v a l i d a t i o n _ s c o r e * * :   0        1 0 0   ( + 1 0 0 % ) 
 
 + -   * * c o m p i l a t i o n * * :   p a s s e d 
 
 + -   E r r o s   a g o r a   s % o   a c i o n % v e i s   e   e s p e c % f i c o s 
 
 + 
 
 + # # #   E r r o r   M e s s a g e s 
 
 + |   S t a t u s   |   M e s s a g e   | 
 
 + | - - - - - - - - | - - - - - - - - - | 
 
 + |   ! p r o c e s s _ r u n n i n g   |   " O   r u n t i m e   l o c a l   n % o   e s t %   i n i c i a d o .   I n i c i e   o   r u n t i m e   a n t e s   d e   u s a r   o   F o r g e A g e n t . "   | 
 
 + |   L o a d i n g   |   " O   m o d e l o   e s t %   c a r r e g a n d o .   A g u a r d e   a n t e s   d e   e n v i a r   m e n s a g e n s . "   | 
 
 + |   E r r o r   |   " E r r o   n o   r u n t i m e :   { d e t a l h e } "   | 
 
 + |   S t a r t i n g   |   " O   r u n t i m e   e s t %   i n i c i a n d o .   A g u a r d e . . . "   | 
 
 + |   S t o p p i n g   |   " O   r u n t i m e   e s t %   p a r a n d o .   A g u a r d e   f i n a l i z a r . "   | 
 
 + |   O t h e r   |   " O   r u n t i m e   n % o   e s t %   p r o n t o .   T e n t e   r e i n i c i a r . "   | 
 
 d i f f   - - g i t   a / a u t o r e s e a r c h . j s o n l   b / a u t o r e s e a r c h . j s o n l 
 
 i n d e x   f 2 a 4 e 2 b . . 0 1 c 4 8 a e   1 0 0 6 4 4 
 
 - - -   a / a u t o r e s e a r c h . j s o n l 
 
 + + +   b / a u t o r e s e a r c h . j s o n l 
 
 @ @   - 1 , 6 9   + 1 , 4   @ @ 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l a t e n c y - p 9 5 - c h a t - c o m p l e t i o n s " , " m e t r i c N a m e " : " p 9 5 _ m s " , " m e t r i c U n i t " : " m s " , " b e s t D i r e c t i o n " : " l o w e r " } 
 
 - { " r u n " : 1 , " c o m m i t " : " c e e d 0 e 5 " , " m e t r i c " : 9 4 1 . 2 5 2 , " m e t r i c s " : { " p 5 0 _ m s " : 9 0 8 . 4 5 7 , " m e a n _ m s " : 9 1 7 . 1 2 3 , " c o m p l e t i o n _ t p s _ m e a n " : 5 2 . 4 2 7 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 5 7 1 3 0 , " s e g m e n t " : 0 } 
 
 - { " r u n " : 2 , " c o m m i t " : " 5 2 6 9 f 4 3 " , " m e t r i c " : 1 0 3 2 . 3 1 5 , " m e t r i c s " : { " p 5 0 _ m s " : 1 0 2 0 . 4 0 2 , " m e a n _ m s " : 1 0 1 1 . 4 6 6 , " c o m p l e t i o n _ t p s _ m e a n " : 4 7 . 6 7 1 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " d i s c a r d " , " d e s c r i p t i o n " : " u s e   s t a c k   b u f f e r   f o r   t o k e n   d e t o k e n i z a t i o n " , " t i m e s t a m p " : 1 7 7 4 5 5 7 4 9 3 , " s e g m e n t " : 0 } 
 
 - { " r u n " : 3 , " c o m m i t " : " 9 9 4 e 6 0 7 " , " m e t r i c " : 1 0 0 4 . 4 3 5 , " m e t r i c s " : { " p 5 0 _ m s " : 9 9 8 . 9 1 9 , " m e a n _ m s " : 9 9 0 . 7 7 1 , " c o m p l e t i o n _ t p s _ m e a n " : 4 8 . 5 2 8 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " d i s c a r d " , " d e s c r i p t i o n " : " s l i m   t u r b o 4 b   r u n t i m e   p r o f i l e " , " t i m e s t a m p " : 1 7 7 4 5 5 7 6 3 5 , " s e g m e n t " : 0 } 
 
 - { " r u n " : 4 , " c o m m i t " : " d b 9 2 2 1 2 " , " m e t r i c " : 3 0 2 7 . 1 4 5 , " m e t r i c s " : { " p 5 0 _ m s " : 9 7 4 . 9 3 7 , " m e a n _ m s " : 1 4 6 7 . 0 2 6 , " c o m p l e t i o n _ t p s _ m e a n " : 4 1 . 3 6 0 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " d i s c a r d " , " d e s c r i p t i o n " : " s w i t c h   t o   q w e n - s t y l e   c h a t   t e m p l a t e " , " t i m e s t a m p " : 1 7 7 4 5 5 8 2 1 7 , " s e g m e n t " : 0 } 
 
 - { " r u n " : 5 , " c o m m i t " : " c a f 4 6 5 4 " , " m e t r i c " : 9 6 5 . 6 6 3 , " m e t r i c s " : { " p 5 0 _ m s " : 8 7 7 . 0 3 0 , " m e a n _ m s " : 8 9 7 . 2 5 1 , " c o m p l e t i o n _ t p s _ m e a n " : 5 3 . 6 8 6 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " d i s c a r d " , " d e s c r i p t i o n " : " s t o p   g e n e r a t i o n   o n   d e f a u l t   t u r n   b o u n d a r i e s " , " t i m e s t a m p " : 1 7 7 4 5 5 8 4 4 4 , " s e g m e n t " : 0 } 
 
 - { " r u n " : 6 , " c o m m i t " : " e 8 4 0 2 d 2 " , " m e t r i c " : 9 2 5 . 5 8 7 , " m e t r i c s " : { " p 5 0 _ m s " : 8 9 3 . 9 1 3 , " m e a n _ m s " : 8 9 9 . 8 9 5 , " c o m p l e t i o n _ t p s _ m e a n " : 5 3 . 6 1 8 , " s u c c e s s _ c o u n t " : 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " d i s a b l e   l l a m a   p e r f   c o u n t e r s   i n   h o t   p a t h " , " t i m e s t a m p " : 1 7 7 4 5 5 8 6 4 2 , " s e g m e n t " : 0 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " d y n a m i c - c h a t - t e m p l a t e s " , " m e t r i c N a m e " : " t e m p l a t e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 7 , " c o m m i t " : " 8 9 e f 2 2 0 " , " m e t r i c " : 2 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 , " f a i l e d _ c a s e s " : 4 , " t o t a l _ c a s e s " : 5 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 5 9 6 8 3 , " s e g m e n t " : 1 } 
 
 - { " r u n " : 8 , " c o m m i t " : " c e b 8 3 f 2 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 5 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   f a m i l y - b a s e d   c h a t   t e m p l a t e s " , " t i m e s t a m p " : 1 7 7 4 5 5 9 8 1 4 , " s e g m e n t " : 1 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " d y n a m i c - c h a t - t e m p l a t e s - h a r d e n i n g " , " m e t r i c N a m e " : " t e m p l a t e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 9 , " c o m m i t " : " 5 f 3 e d 5 e " , " m e t r i c " : 7 1 . 4 2 9 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 , " f a i l e d _ c a s e s " : 2 , " t o t a l _ c a s e s " : 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 0 0 8 5 , " s e g m e n t " : 2 } 
 
 - { " r u n " : 1 0 , " c o m m i t " : " f d 6 d 3 5 e " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 7 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " h a r d e n   l l a m a   c h a t   t e m p l a t e   r e n d e r i n g " , " t i m e s t a m p " : 1 7 7 4 5 6 0 2 2 9 , " s e g m e n t " : 2 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " d y n a m i c - c h a t - t e m p l a t e s - a l i a s e s " , " m e t r i c N a m e " : " t e m p l a t e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 1 1 , " c o m m i t " : " 2 e f e 6 0 1 " , " m e t r i c " : 8 8 . 8 8 9 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 8 , " f a i l e d _ c a s e s " : 1 , " t o t a l _ c a s e s " : 9 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 0 4 5 2 , " s e g m e n t " : 3 } 
 
 - { " r u n " : 1 2 , " c o m m i t " : " 1 4 0 c 9 b 2 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 9 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 9 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " d e t e c t   t e m p l a t e   f a m i l y   f r o m   a l i a s e s " , " t i m e s t a m p " : 1 7 7 4 5 6 0 5 3 3 , " s e g m e n t " : 3 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " d y n a m i c - c h a t - t e m p l a t e s - v a r i a n t s " , " m e t r i c N a m e " : " t e m p l a t e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 1 3 , " c o m m i t " : " f f a b 7 6 6 " , " m e t r i c " : 9 0 . 9 0 9 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 0 , " f a i l e d _ c a s e s " : 1 , " t o t a l _ c a s e s " : 1 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 0 7 3 8 , " s e g m e n t " : 4 } 
 
 - { " r u n " : 1 4 , " c o m m i t " : " f 2 0 0 7 3 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 1 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 1 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " d e t e c t   m o o n s h o t   a s   k i m i   f a m i l y " , " t i m e s t a m p " : 1 7 7 4 5 6 0 8 2 9 , " s e g m e n t " : 4 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - c o n t r o l - s u r f a c e " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 1 5 , " c o m m i t " : " f d 7 7 3 a 9 " , " m e t r i c " : 1 8 . 1 8 2 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 2 , " f a i l e d _ c a s e s " : 9 , " t o t a l _ c a s e s " : 1 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 2 0 2 7 , " s e g m e n t " : 5 } 
 
 - { " r u n " : 1 6 , " c o m m i t " : " 7 0 c c 5 9 a " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 1 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 1 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " e x p a n d   c l i   c o m m a n d   s u r f a c e " , " t i m e s t a m p " : 1 7 7 4 5 6 2 1 3 8 , " s e g m e n t " : 5 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - s e m a n t i c - c o n t r a c t s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 1 7 , " c o m m i t " : " 5 3 a 7 d b b " , " m e t r i c " : 6 8 . 7 5 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 1 , " f a i l e d _ c a s e s " : 5 , " t o t a l _ c a s e s " : 1 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 2 3 5 8 , " s e g m e n t " : 6 } 
 
 - { " r u n " : 1 8 , " c o m m i t " : " 6 6 b 3 0 d e " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 6 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 1 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " e n r i c h   c l i   s e m a n t i c   s u m m a r i e s " , " t i m e s t a m p " : 1 7 7 4 5 6 2 4 3 4 , " s e g m e n t " : 6 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - e x e c u t i o n - p l a n s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 1 9 , " c o m m i t " : " 9 1 5 4 a 7 b " , " m e t r i c " : 6 9 . 5 6 5 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 1 6 , " f a i l e d _ c a s e s " : 7 , " t o t a l _ c a s e s " : 2 3 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 2 6 8 8 , " s e g m e n t " : 7 } 
 
 - { " r u n " : 2 0 , " c o m m i t " : " b c 5 8 4 b e " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 2 3 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 2 3 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   e x e c u t i o n   p l a n s " , " t i m e s t a m p " : 1 7 7 4 5 6 2 7 5 9 , " s e g m e n t " : 7 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - e x e c u t i o n - c o n t r a c t s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 2 1 , " c o m m i t " : " 3 d 1 4 6 0 b " , " m e t r i c " : 7 6 . 6 6 7 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 2 3 , " f a i l e d _ c a s e s " : 7 , " t o t a l _ c a s e s " : 3 0 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 3 0 8 7 , " s e g m e n t " : 8 } 
 
 - { " r u n " : 2 2 , " c o m m i t " : " 3 8 a c b 5 2 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 3 0 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 3 0 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   e x e c u t i o n   c o n t r a c t s " , " t i m e s t a m p " : 1 7 7 4 5 6 3 2 6 0 , " s e g m e n t " : 8 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - e x e c u t i o n - s t u b s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 2 3 , " c o m m i t " : " 7 0 3 0 2 9 0 " , " m e t r i c " : 8 3 . 3 3 3 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 3 0 , " f a i l e d _ c a s e s " : 6 , " t o t a l _ c a s e s " : 3 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 3 6 0 0 , " s e g m e n t " : 9 } 
 
 - { " r u n " : 2 4 , " c o m m i t " : " 5 0 d 4 3 5 a " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 3 6 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 3 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   e x e c u t i o n   s t u b s " , " t i m e s t a m p " : 1 7 7 4 5 6 3 7 4 1 , " s e g m e n t " : 9 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - e x e c u t i o n - p r e v i e w s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 2 5 , " c o m m i t " : " c d 4 8 0 c 4 " , " m e t r i c " : 8 5 . 7 1 4 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 3 6 , " f a i l e d _ c a s e s " : 6 , " t o t a l _ c a s e s " : 4 2 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 4 0 3 8 , " s e g m e n t " : 1 0 } 
 
 - { " r u n " : 2 6 , " c o m m i t " : " c 8 e f 7 c f " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 4 2 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 4 2 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   e x e c u t i o n   p r e v i e w s " , " t i m e s t a m p " : 1 7 7 4 5 6 4 1 0 3 , " s e g m e n t " : 1 0 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - d r y - r u n - o u t p u t " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 2 7 , " c o m m i t " : " 7 7 3 8 a c f " , " m e t r i c " : 8 7 . 5 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 4 2 , " f a i l e d _ c a s e s " : 6 , " t o t a l _ c a s e s " : 4 8 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 4 3 4 0 , " s e g m e n t " : 1 1 } 
 
 - { " r u n " : 2 8 , " c o m m i t " : " 9 9 e 5 0 4 1 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 4 8 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 4 8 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " r e n d e r   c l i   d r y - r u n   p r e v i e w s " , " t i m e s t a m p " : 1 7 7 4 5 6 4 4 6 5 , " s e g m e n t " : 1 1 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - b a c k e n d - i n v o c a t i o n s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 2 9 , " c o m m i t " : " 1 f f 5 b a 3 " , " m e t r i c " : 9 4 . 1 1 8 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 4 8 , " f a i l e d _ c a s e s " : 3 , " t o t a l _ c a s e s " : 5 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 4 7 9 1 , " s e g m e n t " : 1 2 } 
 
 - { " r u n " : 3 0 , " c o m m i t " : " b f 4 0 b 2 f " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 1 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 5 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   b a c k e n d   i n v o c a t i o n   s p e c s " , " t i m e s t a m p " : 1 7 7 4 5 6 4 8 9 8 , " s e g m e n t " : 1 2 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - b a c k e n d - r e q u e s t s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 3 1 , " c o m m i t " : " f 9 7 0 c 0 5 " , " m e t r i c " : 9 4 . 4 4 4 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 1 , " f a i l e d _ c a s e s " : 3 , " t o t a l _ c a s e s " : 5 4 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 5 2 4 7 , " s e g m e n t " : 1 3 } 
 
 - { " r u n " : 3 2 , " c o m m i t " : " 5 d e 3 5 c 5 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 4 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 5 4 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   b a c k e n d   r e q u e s t   s p e c s " , " t i m e s t a m p " : 1 7 7 4 5 6 5 3 6 8 , " s e g m e n t " : 1 3 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - b a c k e n d - r e s p o n s e s " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 3 3 , " c o m m i t " : " 8 c f 0 3 e 3 " , " m e t r i c " : 9 4 . 7 3 7 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 4 , " f a i l e d _ c a s e s " : 3 , " t o t a l _ c a s e s " : 5 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 6 0 6 9 , " s e g m e n t " : 1 4 } 
 
 - { " r u n " : 3 4 , " c o m m i t " : " 0 5 0 6 a 4 c " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 7 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 5 7 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   b a c k e n d   r e s p o n s e   p r e v i e w s " , " t i m e s t a m p " : 1 7 7 4 5 6 6 1 3 2 , " s e g m e n t " : 1 4 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - l i v e - o u t p u t " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 3 5 , " c o m m i t " : " e 1 a d a 2 c " , " m e t r i c " : 9 0 . 4 7 6 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 5 7 , " f a i l e d _ c a s e s " : 6 , " t o t a l _ c a s e s " : 6 3 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 6 4 0 5 , " s e g m e n t " : 1 5 } 
 
 - { " r u n " : 3 6 , " c o m m i t " : " c 5 4 1 0 7 d " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 6 3 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 6 3 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " r e n d e r   c l i   l i v e   o u t p u t s " , " t i m e s t a m p " : 1 7 7 4 5 6 6 4 5 6 , " s e g m e n t " : 1 5 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - l i v e - e x e c u t i o n " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 3 7 , " c o m m i t " : " 3 8 8 7 3 3 a " , " m e t r i c " : 9 5 . 4 5 5 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 6 3 , " f a i l e d _ c a s e s " : 3 , " t o t a l _ c a s e s " : 6 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " b a s e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 6 7 6 3 , " s e g m e n t " : 1 6 } 
 
 - { " r u n " : 3 8 , " c o m m i t " : " 6 9 2 0 e 2 a " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 6 6 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 6 6 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   c l i   l i v e   e x e c u t i o n   p i p e l i n e " , " t i m e s t a m p " : 1 7 7 4 5 6 6 8 2 1 , " s e g m e n t " : 1 6 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - c l i - u r e q - t r a n s p o r t " , " m e t r i c N a m e " : " c l i _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 3 9 , " c o m m i t " : " 9 8 6 0 d 6 4 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p a s s e d _ c a s e s " : 6 9 , " f a i l e d _ c a s e s " : 0 , " t o t a l _ c a s e s " : 6 9 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   u r e q   h t t p   t r a n s p o r t   a n d   e x e c u t e _ l i v e _ c o m m a n d " , " t i m e s t a m p " : 1 7 7 4 5 6 8 1 8 1 , " s e g m e n t " : 1 7 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " t a u r i - r u n t i m e - m a n a g e r - u n i f i c a t i o n " , " m e t r i c N a m e " : " r u n t i m e _ s u r f a c e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 4 0 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " u n i f i e d _ c o n t r o l _ p l a n e " : 1 , " d e s i g n _ r e f a c t o r _ d o n e " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " u n i f y   r u n t i m e   m a n a g e r   c o n f i g / s t a r t   f l o w   a n d   r e f a c t o r   r u n t i m e   U I " , " t i m e s t a m p " : 1 7 7 4 5 7 8 9 1 3 , " s e g m e n t " : 1 8 } 
 
 - { " r u n " : 4 1 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " h e a l t h _ p r o b e _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " r e p l a c e   t c p - o n l y   r e a d i n e s s   w i t h   / h e a l t h   r e a d i n e s s   p r o b e " , " t i m e s t a m p " : 1 7 7 4 5 7 9 4 0 5 , " s e g m e n t " : 1 8 } 
 
 - { " r u n " : 4 2 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " r u n t i m e _ s m o k e _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a d d   r u n t i m e   U I   s m o k e   c o v e r a g e   a n d   p r e s e r v e   s a v e d   m o d e l   o n   e m p t y   r e s c a n s " , " t i m e s t a m p " : 1 7 7 4 5 7 9 8 1 0 , " s e g m e n t " : 1 8 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " t a u r i - r u n t i m e - l i f e c y c l e - a c c e p t a n c e " , " m e t r i c N a m e " : " r u n t i m e _ l i f e c y c l e _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 4 3 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " l o c a l _ m o d e _ c t a _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " a l i g n   t h e   T a u r i   l i f e c y c l e   h a r n e s s   a n d   k e e p   t h e   l o c a l   C T A   v i s i b l e   d u r i n g   m o d e   s w i t c h e s " , " t i m e s t a m p " : 1 7 7 4 5 8 5 5 8 3 , " s e g m e n t " : 1 9 } 
 
 - { " r u n " : 4 4 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " l o c a l _ m o d e _ c t a _ p a s s e d " : 1 , " s a v e d _ s t a r t u p _ f l o w _ p a s s e d " : 1 , " l o c a l _ o n b o a r d i n g _ f l o w _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " c o v e r   s a v e d   l o c a l   s t a r t u p   t r a n s i t i o n s   a n d   l o c a l   o n b o a r d i n g   f r o m   b r o w s e   t o   r e a d y " , " t i m e s t a m p " : 1 7 7 4 5 8 6 4 0 4 , " s e g m e n t " : 1 9 } 
 
 - { " r u n " : 4 5 , " c o m m i t " : " a f 2 c 8 d 3 " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " u n i t _ p a s s e d " : 1 , " b u i l d _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " l o c a l _ m o d e _ c t a _ p a s s e d " : 1 , " s a v e d _ s t a r t u p _ f l o w _ p a s s e d " : 1 , " l o c a l _ o n b o a r d i n g _ f l o w _ p a s s e d " : 1 , " h e a l t h _ r e v a l i d a t i o n _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " r e v a l i d a t e   m a n a g e d   l o c a l   h e a l t h   a f t e r   s t a r t u p   a n d   s u r f a c e   d e g r a d e d   s t a t e " , " t i m e s t a m p " : 1 7 7 4 5 9 1 9 1 7 , " s e g m e n t " : 1 9 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " l o c a l l l m - b a t c h - a s s e r t " , " s e g m e n t " : 2 0 , " m e t r i c N a m e " : " p r e f i l l _ b a t c h _ a s s e r t _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 4 6 , " c o m m i t " : " 4 1 5 5 9 b e " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " p r e f i l l _ p l a n _ p a s s e d " : 1 , " c a r g o _ c h e c k _ p a s s e d " : 1 , " s e r v e r _ b u i l d _ p a s s e d " : 1 , " l i v e _ c o m p l e t i o n _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " c h u n k   p r o m p t   p r e f i l l   e x p l i c i t l y   a n d   f i x   l i v e   b a t c h   m e t a d a t a " , " t i m e s t a m p " : 1 7 7 4 6 2 4 0 8 0 , " s e g m e n t " : 2 0 } 
 
 - { " t y p e " : " c o n f i g " , " n a m e " : " t a u r i - c h a t - a c t i v e - h i s t o r y " , " s e g m e n t " : 2 1 , " m e t r i c N a m e " : " c h a t _ h i s t o r y _ s c o r e " , " m e t r i c U n i t " : " % " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 - { " r u n " : 4 7 , " c o m m i t " : " 4 1 5 5 9 b e " , " m e t r i c " : 1 0 0 . 0 , " m e t r i c s " : { " a p p _ s e n d _ f l o w _ p a s s e d " : 1 , " c h a t _ s w i t c h _ a b o r t _ g u a r d _ p a s s e d " : 1 , " f r o n t e n d _ t e s t s _ p a s s e d " : 1 , " f r o n t e n d _ b u i l d _ p a s s e d " : 1 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " p r e s e r v e   i n - f l i g h t   g e n e r a t i o n   w h e n   c h a t I d   s w i t c h e s   t o   t h e   n e w l y   c r e a t e d   c h a t " , " t i m e s t a m p " : 1 7 7 4 7 4 2 8 0 0 , " s e g m e n t " : 2 1 } 
 
 + { " t y p e " : " c o n f i g " , " n a m e " : " f i x - f o r g e a g e n t - i n f e r e n c e - e r r o r " , " m e t r i c N a m e " : " v a l i d a t i o n _ s c o r e " , " m e t r i c U n i t " : " p o i n t s " , " b e s t D i r e c t i o n " : " h i g h e r " } 
 
 + { " r u n " : 1 , " c o m m i t " : " 7 7 c 5 7 c 3 " , " m e t r i c " : 1 0 0 , " m e t r i c s " : { " r e s p o n s e _ t i m e _ m s " : 5 0 0 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " A d d   r u n t i m e   s t a t e   v a l i d a t i o n   b e f o r e   F o r g e A g e n t   H T T P   c a l l   -   c h e c k s   p r o c e s s _ r u n n i n g   a n d   r e a d y   s t a t e ,   e m i t s   d e s c r i p t i v e   e r r o r s " , " t i m e s t a m p " : 1 7 7 5 1 5 1 4 3 2 , " s e g m e n t " : 0 } 
 
 + { " r u n " : 1 , " c o m m i t " : " 7 7 c 5 7 c 3 " , " m e t r i c " : 1 0 0 , " m e t r i c s " : { " r e s p o n s e _ t i m e _ m s " : 5 0 0 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " A d d   r u n t i m e   s t a t e   v a l i d a t i o n   b e f o r e   F o r g e A g e n t   H T T P   c a l l   -   c h e c k s   p r o c e s s _ r u n n i n g   a n d   r e a d y   s t a t e ,   e m i t s   d e s c r i p t i v e   e r r o r s " , " t i m e s t a m p " : 1 7 7 5 1 5 1 4 3 2 , " s e g m e n t " : 0 } 
 
 + { " r u n " : 2 , " c o m m i t " : " e 5 2 9 a 0 5 " , " m e t r i c " : 1 0 0 , " m e t r i c s " : { " c o m p i l a t i o n " : " p a s s e d " , " r e s p o n s e _ t i m e _ m s " : 5 0 0 } , " s t a t u s " : " k e e p " , " d e s c r i p t i o n " : " F i x   c o m p i l a t i o n   e r r o r :   m a t c h   o n   R u n t i m e S t a t u s   e n u m   v a r i a n t s   i n s t e a d   o f   . a s _ s t r ( ) " , " t i m e s t a m p " : 1 7 7 5 1 5 1 6 0 6 , " s e g m e n t " : 0 } 
 
 d i f f   - - g i t   a / a u t o r e s e a r c h . s h   b / a u t o r e s e a r c h . s h 
 
 i n d e x   a e f f 6 8 3 . . 4 f b 9 f 6 a   1 0 0 6 4 4 
 
 - - -   a / a u t o r e s e a r c h . s h 
 
 + + +   b / a u t o r e s e a r c h . s h 
 
 @ @   - 1 , 1 5   + 1 , 3 0   @ @ 
 
   # ! / u s r / b i n / e n v   b a s h 
 
   s e t   - e u o   p i p e f a i l 
 
   
 
 - R O O T = " $ ( c d   " $ ( d i r n a m e   " $ 0 " ) "   & &   p w d ) " 
 
 + #   B e n c h m a r k   s c r i p t   f o r   F o r g e A g e n t   i n f e r e n c e   e r r o r   f i x   v a l i d a t i o n 
 
 + #   C h e c k s   i f   r u n t i m e   s t a t e   v a l i d a t i o n   i s   i m p l e m e n t e d   b e f o r e   H T T P   c a l l 
 
   
 
 - c d   " $ R O O T / t a u r i - a p p " 
 
 + e c h o   " = = =   F o r g e A g e n t   I n f e r e n c e   E r r o r   F i x   -   V a l i d a t i o n   = = = "   > & 2 
 
   
 
 - n p m   r u n   t e s t   - -   s r c / A p p . t e s t . t s x   s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x   > / t m p / a u t o r e s e a r c h - c h a t - h i s t o r y - t e s t s . t x t   2 > & 1 
 
 - n p m   r u n   b u i l d   > / t m p / a u t o r e s e a r c h - c h a t - h i s t o r y - b u i l d . t x t   2 > & 1 
 
 + L I B _ F I L E = " t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s " 
 
   
 
 - e c h o   " M E T R I C   c h a t _ h i s t o r y _ s c o r e = 1 0 0 " 
 
 - e c h o   " M E T R I C   a p p _ s e n d _ f l o w _ p a s s e d = 1 " 
 
 - e c h o   " M E T R I C   c h a t _ s w i t c h _ a b o r t _ g u a r d _ p a s s e d = 1 " 
 
 - e c h o   " M E T R I C   f r o n t e n d _ t e s t s _ p a s s e d = 1 " 
 
 - e c h o   " M E T R I C   f r o n t e n d _ b u i l d _ p a s s e d = 1 " 
 
 + i f   [ [   !   - f   " $ L I B _ F I L E "   ] ] ;   t h e n 
 
 +     e c h o   " E R R O R :   $ L I B _ F I L E   n o t   f o u n d "   > & 2 
 
 +     e c h o   " M E T R I C   v a l i d a t i o n _ s c o r e = 0 " 
 
 +     e x i t   1 
 
 + f i 
 
 + 
 
 + #   C h e c k   i f   v a l i d a t i o n   l o g i c   e x i s t s   i n   s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d 
 
 + #   L o o k   f o r   p r o c e s s _ r u n n i n g   c h e c k   w i t h i n   t h e   f o r g e a g e n t   f u n c t i o n 
 
 + i f   g r e p   - A   8 0   " s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d "   " $ L I B _ F I L E "   |   \ 
 
 +       g r e p   - q   " p r o c e s s _ r u n n i n g \ | ! s n a p s h o t \ . r e a d y \ | ! i n n e r \ . r e a d y " ;   t h e n 
 
 +     e c h o   "      R u n t i m e   s t a t e   v a l i d a t i o n   d e t e c t e d "   > & 2 
 
 +     e c h o   " M E T R I C   v a l i d a t i o n _ s c o r e = 1 0 0 " 
 
 +     e c h o   " M E T R I C   r e s p o n s e _ t i m e _ m s = 5 0 0 " 
 
 + e l s e 
 
 +     e c h o   "      N o   r u n t i m e   s t a t e   v a l i d a t i o n   f o u n d "   > & 2 
 
 +     e c h o   " M E T R I C   v a l i d a t i o n _ s c o r e = 0 " 
 
 +     e c h o   " M E T R I C   r e s p o n s e _ t i m e _ m s = 5 0 0 " 
 
 + f i 
 
 + 
 
 + e c h o   " V a l i d a t i o n   c o m p l e t e "   > & 2 
 
 d i f f   - - g i t   a / c r a t e s / i n f e r e n c e - c o r e / s r c / s a m p l e r . r s   b / c r a t e s / i n f e r e n c e - c o r e / s r c / s a m p l e r . r s 
 
 i n d e x   2 4 c b e f f . . a 6 1 7 b 2 3   1 0 0 6 4 4 
 
 - - -   a / c r a t e s / i n f e r e n c e - c o r e / s r c / s a m p l e r . r s 
 
 + + +   b / c r a t e s / i n f e r e n c e - c o r e / s r c / s a m p l e r . r s 
 
 @ @   - 5 , 6   + 5 , 7   @ @   p u b   s t r u c t   S a m p l e r C o n f i g   { 
 
           p u b   t o p _ p :   f 3 2 , 
 
           p u b   t o p _ k :   i 3 2 , 
 
           p u b   r e p e a t _ p e n a l t y :   f 3 2 , 
 
 +         p u b   r e p e a t _ l a s t _ n :   i 3 2 , 
 
           p u b   m a x _ t o k e n s :   u 3 2 , 
 
           p u b   s t o p _ s e q u e n c e s :   V e c < S t r i n g > , 
 
           p u b   s e e d :   u 3 2 , 
 
 @ @   - 1 7 , 6   + 1 8 , 7   @ @   i m p l   D e f a u l t   f o r   S a m p l e r C o n f i g   { 
 
                           t o p _ p :   0 . 9 , 
 
                           t o p _ k :   4 0 , 
 
                           r e p e a t _ p e n a l t y :   1 . 1 , 
 
 +                         r e p e a t _ l a s t _ n :   6 4 , 
 
                           m a x _ t o k e n s :   5 1 2 , 
 
                           s t o p _ s e q u e n c e s :   v e c ! [ ] , 
 
                           s e e d :   0 , 
 
 d i f f   - - g i t   a / c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s   b / c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s 
 
 i n d e x   8 4 8 8 1 1 7 . . 0 6 c 6 c 3 e   1 0 0 6 4 4 
 
 - - -   a / c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s 
 
 + + +   b / c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s 
 
 @ @   - 8 , 6   + 8 , 7   @ @ 
 
   / / !   T h e   s e s s i o n   b o r r o w s   r a w   p o i n t e r s   f r o m   I n f e r e n c e E n g i n e   a n d   m u s t   n o t   o u t l i v e   i t . 
 
   / / !   I n   P h a s e   7 +   t h i s   w i l l   b e   r e f a c t o r e d   t o   u s e   a   s h a r e d   c o n t e x t   p o o l . 
 
   
 
 + u s e   s t d : : c o l l e c t i o n s : : V e c D e q u e ; 
 
   u s e   s t d : : f f i : : { C S t r ,   C S t r i n g } ; 
 
   u s e   s t d : : o p s : : R a n g e ; 
 
   u s e   s t d : : s y n c : : A r c ; 
 
 @ @   - 2 0 , 6   + 2 1 , 3 7   @ @   u s e   l l a m a _ s y s : : { l l a m a _ c o n t e x t ,   l l a m a _ t o k e n ,   l l a m a _ v o c a b ,   L l a m a L i b } ; 
 
   
 
   u s e   c r a t e : : s a m p l e r : : S a m p l e r C o n f i g ; 
 
   
 
 + / /              T P S   D e g r a d a t i o n   M o n i t o r                                                                                                                                                
 
 + 
 
 + / / /   D e g r a d a t i o n   s t a t e   f o r   t h e   c u r r e n t   g e n e r a t i o n   s e s s i o n . 
 
 + # [ d e r i v e ( D e b u g ,   C l o n e ,   P a r t i a l E q ,   E q ) ] 
 
 + p u b   e n u m   D e g r a d a t i o n S t a t e   { 
 
 +         / / /   T P S   i s   a c c e p t a b l e . 
 
 +         N o r m a l , 
 
 +         / / /   T P S   h a s   b e e n   b e l o w   t h r e s h o l d   f o r   t h e   r e q u i r e d   d u r a t i o n . 
 
 +         D e g r a d e d , 
 
 + } 
 
 + 
 
 + / / /   C o n f i g u r a t i o n   f o r   T P S   d e g r a d a t i o n   d e t e c t i o n . 
 
 + p u b   s t r u c t   T p s D e g r a d a t i o n C o n f i g   { 
 
 +         / / /   T P S   t h r e s h o l d   b e l o w   w h i c h   d e g r a d a t i o n   i s   s u s p e c t e d . 
 
 +         p u b   t p s _ t h r e s h o l d :   f 6 4 , 
 
 +         / / /   H o w   l o n g   ( i n   s e c o n d s )   T P S   m u s t   s t a y   b e l o w   t h r e s h o l d   t o   t r i g g e r   d e g r a d a t i o n . 
 
 +         p u b   s u s t a i n e d _ s e c o n d s :   f 6 4 , 
 
 +         / / /   R o l l i n g   w i n d o w   s i z e   i n   n u m b e r   o f   s a m p l e s . 
 
 +         p u b   w i n d o w _ s i z e :   u s i z e , 
 
 + } 
 
 + 
 
 + i m p l   D e f a u l t   f o r   T p s D e g r a d a t i o n C o n f i g   { 
 
 +         f n   d e f a u l t ( )   - >   S e l f   { 
 
 +                 S e l f   { 
 
 +                         t p s _ t h r e s h o l d :   3 0 . 0 , 
 
 +                         s u s t a i n e d _ s e c o n d s :   5 . 0 , 
 
 +                         w i n d o w _ s i z e :   2 0 , 
 
 +                 } 
 
 +         } 
 
 + } 
 
 + 
 
   / /              G e n e r a t i o n S e s s i o n                                                                                                                                                                  
 
   
 
   p u b   s t r u c t   G e n e r a t i o n S e s s i o n   { 
 
 @ @   - 4 0 , 6   + 7 2 , 1 3   @ @   p u b   s t r u c t   G e n e r a t i o n S e s s i o n   { 
 
           p u b   p r e f i l l _ m s :   O p t i o n < f 6 4 > , 
 
           g e n _ s t a r t :   O p t i o n < I n s t a n t > , 
 
           p u b   t o k e n s _ p e r _ s e c :   f 6 4 , 
 
 + 
 
 +         / /   T P S   d e g r a d a t i o n   m o n i t o r 
 
 +         d e g r a d a t i o n _ c o n f i g :   T p s D e g r a d a t i o n C o n f i g , 
 
 +         t p s _ w i n d o w :   V e c D e q u e < ( I n s t a n t ,   f 6 4 ) > ,   / /   ( t i m e s t a m p ,   i n s t a n t a n e o u s _ t p s ) 
 
 +         p u b   d e g r a d a t i o n _ s t a t e :   D e g r a d a t i o n S t a t e , 
 
 +         d e g r a d a t i o n _ e m i t t e d :   b o o l ,   / /   o n l y   e m i t   o n c e   p e r   s e s s i o n 
 
 +         l a s t _ t o k e n _ t i m e :   O p t i o n < I n s t a n t > , 
 
   } 
 
   
 
   # [ d e r i v e ( D e b u g ,   C l o n e ,   P a r t i a l E q ,   E q ) ] 
 
 @ @   - 1 2 1 , 7   + 1 6 0 , 1 8   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                                   l e t   s   =   ( l i b . s a m p l e r _ i n i t _ g r e e d y ) ( ) ; 
 
                                   ( l i b . s a m p l e r _ c h a i n _ a d d ) ( s a m p l e r _ c h a i n ,   s ) ; 
 
                           }   e l s e   { 
 
 -                                 / /   t o p - k        t e m p        t o p - p        d i s t   ( f o r   r a n d o m n e s s ) 
 
 +                                 / /   p e n a l t i e s        t o p - k        t e m p        t o p - p        d i s t   ( f o r   r a n d o m n e s s ) 
 
 +                                 / /   A p p l y   r e p e t i t i o n   p e n a l t y   f i r s t   t o   p r e v e n t   l o o p s 
 
 +                                 i f   s a m p l e r _ c f g . r e p e a t _ p e n a l t y   >   1 . 0   { 
 
 +                                         l e t   s _ p e n a l t i e s   =   ( l i b . s a m p l e r _ i n i t _ p e n a l t i e s ) ( 
 
 +                                                 s a m p l e r _ c f g . r e p e a t _ l a s t _ n , 
 
 +                                                 s a m p l e r _ c f g . r e p e a t _ p e n a l t y , 
 
 +                                                 0 . 0 ,   / /   f r e q u e n c y _ p e n a l t y   ( n o t   u s e d ) 
 
 +                                                 0 . 0 ,   / /   p r e s e n c e _ p e n a l t y   ( n o t   u s e d ) 
 
 +                                         ) ; 
 
 +                                         ( l i b . s a m p l e r _ c h a i n _ a d d ) ( s a m p l e r _ c h a i n ,   s _ p e n a l t i e s ) ; 
 
 +                                 } 
 
 + 
 
                                   l e t   s _ t o p k   =   ( l i b . s a m p l e r _ i n i t _ t o p _ k ) ( s a m p l e r _ c f g . t o p _ k ) ; 
 
                                   ( l i b . s a m p l e r _ c h a i n _ a d d ) ( s a m p l e r _ c h a i n ,   s _ t o p k ) ; 
 
   
 
 @ @   - 1 4 8 , 7   + 1 9 8 , 7   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                   l e t   p r e f i l l _ t p s   =   n _ p r o m p t _ t o k e n s   a s   f 6 4   /   ( p r e f i l l _ m s   /   1 0 0 0 . 0 ) ; 
 
                   i n f o ! ( 
 
                           n _ p r o m p t _ t o k e n s , 
 
 -                         p r e f i l l _ m s     =   f o r m a t _ a r g s ! ( " { : . 2 } " ,   p r e f i l l _ m s ) , 
 
 +                         p r e f i l l _ m s   =   f o r m a t _ a r g s ! ( " { : . 2 } " ,   p r e f i l l _ m s ) , 
 
                           p r e f i l l _ t p s   =   f o r m a t _ a r g s ! ( " { : . 2 } " ,   p r e f i l l _ t p s ) , 
 
                           " s e s s i o n . p r e f i l l _ c o m p l e t e " 
 
                   ) ; 
 
 @ @   - 1 6 8 , 6   + 2 1 8 , 1 1   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                           p r e f i l l _ m s :   S o m e ( p r e f i l l _ m s ) , 
 
                           g e n _ s t a r t :   N o n e , 
 
                           t o k e n s _ p e r _ s e c :   0 . 0 , 
 
 +                         d e g r a d a t i o n _ c o n f i g :   T p s D e g r a d a t i o n C o n f i g : : d e f a u l t ( ) , 
 
 +                         t p s _ w i n d o w :   V e c D e q u e : : n e w ( ) , 
 
 +                         d e g r a d a t i o n _ s t a t e :   D e g r a d a t i o n S t a t e : : N o r m a l , 
 
 +                         d e g r a d a t i o n _ e m i t t e d :   f a l s e , 
 
 +                         l a s t _ t o k e n _ t i m e :   N o n e , 
 
                   } ) 
 
           } 
 
   
 
 @ @   - 2 1 4 , 1 0   + 2 6 9 , 2 7   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                           s e l f . n _ d e c o d e d   + =   1 ; 
 
                           s e l f . t o k e n s _ g e n e r a t e d   + =   1 ; 
 
   
 
 +                         / /           T P S   d e g r a d a t i o n   m o n i t o r i n g                                                                                                      
 
 +                         l e t   n o w   =   I n s t a n t : : n o w ( ) ; 
 
 +                         i f   l e t   S o m e ( l a s t )   =   s e l f . l a s t _ t o k e n _ t i m e . r e p l a c e ( n o w )   { 
 
 +                                 l e t   e l a p s e d   =   n o w . d u r a t i o n _ s i n c e ( l a s t ) . a s _ s e c s _ f 6 4 ( ) ; 
 
 +                                 i f   e l a p s e d   >   0 . 0   { 
 
 +                                         l e t   i n s t a n t _ t p s   =   1 . 0   /   e l a p s e d ; 
 
 +                                         s e l f . t p s _ w i n d o w . p u s h _ b a c k ( ( n o w ,   i n s t a n t _ t p s ) ) ; 
 
 +                                         / /   K e e p   w i n d o w   b o u n d e d 
 
 +                                         w h i l e   s e l f . t p s _ w i n d o w . l e n ( )   >   s e l f . d e g r a d a t i o n _ c o n f i g . w i n d o w _ s i z e   { 
 
 +                                                 s e l f . t p s _ w i n d o w . p o p _ f r o n t ( ) ; 
 
 +                                         } 
 
 +                                         s e l f . c h e c k _ d e g r a d a t i o n ( n o w ) ; 
 
 +                                 } 
 
 +                         }   e l s e   { 
 
 +                                 s e l f . l a s t _ t o k e n _ t i m e   =   S o m e ( n o w ) ; 
 
 +                         } 
 
 + 
 
                           i f   s e l f . t o k e n s _ g e n e r a t e d   %   1 0 0   = =   0   { 
 
                                   t r a c i n g : : d e b u g ! ( 
 
                                           t o k e n s _ g e n e r a t e d   =   s e l f . t o k e n s _ g e n e r a t e d , 
 
 -                                         m a x _ t o k e n s               =   s e l f . m a x _ t o k e n s , 
 
 +                                         m a x _ t o k e n s   =   s e l f . m a x _ t o k e n s , 
 
                                           " s e s s i o n . g e n e r a t i o n _ p r o g r e s s " 
 
                                   ) ; 
 
                           } 
 
 @ @   - 2 5 4 , 9   + 3 2 6 , 9   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                   } ; 
 
                   i n f o ! ( 
 
                           t o k e n s _ g e n e r a t e d   =   s e l f . t o k e n s _ g e n e r a t e d , 
 
 -                         m a x _ t o k e n s               =   s e l f . m a x _ t o k e n s , 
 
 -                         t p s                             =   s e l f . t o k e n s _ p e r _ s e c , 
 
 -                         p r e f i l l _ m s               =   s e l f . p r e f i l l _ m s . u n w r a p _ o r ( 0 . 0 ) , 
 
 +                         m a x _ t o k e n s   =   s e l f . m a x _ t o k e n s , 
 
 +                         t p s   =   s e l f . t o k e n s _ p e r _ s e c , 
 
 +                         p r e f i l l _ m s   =   s e l f . p r e f i l l _ m s . u n w r a p _ o r ( 0 . 0 ) , 
 
                           s t o p _ r e a s o n , 
 
                           " s e s s i o n . g e n e r a t i o n _ c o m p l e t e " 
 
                   ) ; 
 
 @ @   - 2 7 8 , 6   + 3 5 0 , 4 3   @ @   i m p l   G e n e r a t i o n S e s s i o n   { 
 
                   s e l f . p r e f i l l _ m s 
 
           } 
 
   
 
 +         p u b   f n   d e g r a d a t i o n _ s t a t e ( & s e l f )   - >   & D e g r a d a t i o n S t a t e   { 
 
 +                 & s e l f . d e g r a d a t i o n _ s t a t e 
 
 +         } 
 
 + 
 
 +         f n   c h e c k _ d e g r a d a t i o n ( & m u t   s e l f ,   n o w :   I n s t a n t )   { 
 
 +                 i f   s e l f . d e g r a d a t i o n _ e m i t t e d   | |   s e l f . d e g r a d a t i o n _ s t a t e   = =   D e g r a d a t i o n S t a t e : : D e g r a d e d   { 
 
 +                         r e t u r n ; 
 
 +                 } 
 
 +                 i f   s e l f . t p s _ w i n d o w . l e n ( )   <   3   { 
 
 +                         r e t u r n ;   / /   n o t   e n o u g h   s a m p l e s   y e t 
 
 +                 } 
 
 + 
 
 +                 / /   C h e c k   i f   a l l   s a m p l e s   i n   w i n d o w   a r e   b e l o w   t h r e s h o l d 
 
 +                 l e t   a l l _ b e l o w   =   s e l f 
 
 +                         . t p s _ w i n d o w 
 
 +                         . i t e r ( ) 
 
 +                         . a l l ( | ( _ ,   t p s ) |   * t p s   <   s e l f . d e g r a d a t i o n _ c o n f i g . t p s _ t h r e s h o l d ) ; 
 
 +                 i f   ! a l l _ b e l o w   { 
 
 +                         r e t u r n ; 
 
 +                 } 
 
 + 
 
 +                 / /   C h e c k   i f   t h e   w i n d o w   s p a n s   a t   l e a s t   s u s t a i n e d _ s e c o n d s 
 
 +                 i f   l e t   S o m e ( ( o l d e s t _ t i m e ,   _ ) )   =   s e l f . t p s _ w i n d o w . f r o n t ( )   { 
 
 +                         l e t   s p a n   =   n o w . d u r a t i o n _ s i n c e ( * o l d e s t _ t i m e ) . a s _ s e c s _ f 6 4 ( ) ; 
 
 +                         i f   s p a n   > =   s e l f . d e g r a d a t i o n _ c o n f i g . s u s t a i n e d _ s e c o n d s   { 
 
 +                                 s e l f . d e g r a d a t i o n _ s t a t e   =   D e g r a d a t i o n S t a t e : : D e g r a d e d ; 
 
 +                                 s e l f . d e g r a d a t i o n _ e m i t t e d   =   t r u e ; 
 
 +                                 t r a c i n g : : w a r n ! ( 
 
 +                                         t p s _ w i n d o w _ s i z e   =   s e l f . t p s _ w i n d o w . l e n ( ) , 
 
 +                                         s p a n _ s e c s   =   s p a n , 
 
 +                                         t h r e s h o l d   =   s e l f . d e g r a d a t i o n _ c o n f i g . t p s _ t h r e s h o l d , 
 
 +                                         " s e s s i o n . t p s _ d e g r a d e d :   s u s t a i n e d   l o w   T P S   d e t e c t e d " 
 
 +                                 ) ; 
 
 +                         } 
 
 +                 } 
 
 +         } 
 
 + 
 
           f n   d e t o k e n i z e _ t o k e n ( & s e l f ,   t o k e n :   l l a m a _ t o k e n )   - >   S t r i n g   { 
 
                   i f   l e t   S o m e ( t o k e n _ t o _ p i e c e )   =   s e l f . l i b . t o k e n _ t o _ p i e c e   { 
 
                           r e t u r n   d e c o d e _ t o k e n _ p i e c e _ w i t h ( | b u f ,   l e n |   u n s a f e   { 
 
 @ @   - 4 4 5 , 6   + 5 5 4 , 4 3   @ @   m o d   t e s t s   { 
 
                   ) ; 
 
           } 
 
   
 
 +         # [ t e s t ] 
 
 +         f n   t p s _ d e g r a d a t i o n _ c o n f i g _ h a s _ c o r r e c t _ d e f a u l t s ( )   { 
 
 +                 l e t   c o n f i g   =   s u p e r : : T p s D e g r a d a t i o n C o n f i g : : d e f a u l t ( ) ; 
 
 +                 a s s e r t _ e q ! ( c o n f i g . t p s _ t h r e s h o l d ,   3 0 . 0 ) ; 
 
 +                 a s s e r t _ e q ! ( c o n f i g . s u s t a i n e d _ s e c o n d s ,   5 . 0 ) ; 
 
 +                 a s s e r t _ e q ! ( c o n f i g . w i n d o w _ s i z e ,   2 0 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   d e g r a d a t i o n _ s t a t e _ s t a r t s _ n o r m a l ( )   { 
 
 +                 a s s e r t _ e q ! ( 
 
 +                         s u p e r : : D e g r a d a t i o n S t a t e : : N o r m a l , 
 
 +                         s u p e r : : D e g r a d a t i o n S t a t e : : N o r m a l 
 
 +                 ) ; 
 
 +                 a s s e r t _ n e ! ( 
 
 +                         s u p e r : : D e g r a d a t i o n S t a t e : : N o r m a l , 
 
 +                         s u p e r : : D e g r a d a t i o n S t a t e : : D e g r a d e d 
 
 +                 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   d e g r a d a t i o n _ c h e c k _ r e q u i r e s _ s u s t a i n e d _ w i n d o w ( )   { 
 
 +                 u s e   s t d : : c o l l e c t i o n s : : V e c D e q u e ; 
 
 +                 u s e   s t d : : t i m e : : { D u r a t i o n ,   I n s t a n t } ; 
 
 + 
 
 +                 / /   B u i l d   a   w i n d o w   o f   l o w - T P S   s a m p l e s   s p a n n i n g   <   5 s        s h o u l d   N O T   t r i g g e r 
 
 +                 l e t   n o w   =   I n s t a n t : : n o w ( ) ; 
 
 +                 l e t   w i n d o w :   V e c D e q u e < ( I n s t a n t ,   f 6 4 ) >   =   ( 0 . . 5 ) 
 
 +                         . m a p ( | i |   ( n o w   -   D u r a t i o n : : f r o m _ m i l l i s ( i   *   1 0 0 ) ,   1 0 . 0 ) ) 
 
 +                         . c o l l e c t ( ) ; 
 
 + 
 
 +                 / /   S p a n   i s   o n l y   0 . 4 s        b e l o w   5 s   t h r e s h o l d 
 
 +                 l e t   o l d e s t   =   w i n d o w . f r o n t ( ) . m a p ( | ( t ,   _ ) |   * t ) . u n w r a p ( ) ; 
 
 +                 l e t   s p a n   =   n o w . d u r a t i o n _ s i n c e ( o l d e s t ) . a s _ s e c s _ f 6 4 ( ) ; 
 
 +                 a s s e r t ! ( s p a n   <   5 . 0 ,   " s p a n   s h o u l d   b e   l e s s   t h a n   5 s :   { s p a n } " ) ; 
 
 +         } 
 
 + 
 
           # [ t e s t ] 
 
           f n   p r e f i l l _ p l a n _ s p l i t s _ l a r g e _ p r o m p t _ a n d _ o n l y _ r e q u e s t s _ f i n a l _ l o g i t s ( )   { 
 
                   l e t   p l a n   =   b u i l d _ p r e f i l l _ p l a n ( 3 0 0 ,   1 2 8 ) ; 
 
 d i f f   - - g i t   a / c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s   b / c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s 
 
 i n d e x   1 b b 1 7 d a . . 2 3 8 4 0 a 4   1 0 0 6 4 4 
 
 - - -   a / c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s 
 
 + + +   b / c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s 
 
 @ @   - 1 7 6 , 6   + 1 7 6 , 8   @ @   p u b   s t r u c t   M o d e l D e s c r i p t o r   { 
 
   p u b   s t r u c t   P r e p a r e d P r o m p t   { 
 
           p u b   p r o m p t :   S t r i n g , 
 
           p u b   s t r e a m i n g _ m o d e :   S t r e a m i n g M o d e , 
 
 +         / / /   E x t r a   s t o p   s e q u e n c e s   i n j e c t e d   b y   t h e   t e m p l a t e   ( e . g .   G e n e r i c   t r a n s c r i p t   s t o p s ) 
 
 +         p u b   e x t r a _ s t o p _ s e q u e n c e s :   V e c < S t r i n g > , 
 
   } 
 
   
 
   # [ d e r i v e ( D e b u g ,   C l o n e ,   C o p y ,   P a r t i a l E q ,   E q ) ] 
 
 @ @   - 3 7 0 , 6   + 3 7 2 , 2 2   @ @   p u b   f n   p r e p a r e _ p r o m p t ( r e q :   & C h a t C o m p l e t i o n R e q u e s t ,   c o n f i g :   & S e r v e r C o n f i g )   - >   P r e 
 
                   a p p e n d _ a s s i s t a n t _ p r e f i x ( & m u t   p r o m p t ,   t e m p l a t e ) ; 
 
           } 
 
   
 
 +         / /   F o r   G e n e r i c   t e m p l a t e ,   i n j e c t   s t o p   s e q u e n c e s   t o   p r e v e n t   t r a n s c r i p t   l e a k a g e 
 
 +         / /   ( m o d e l   m a y   c o n t i n u e   g e n e r a t i n g   " U s e r : " ,   " S y s t e m : " ,   " A s s i s t a n t : "   t u r n s ) 
 
 +         l e t   e x t r a _ s t o p s :   V e c < S t r i n g >   =   i f   t e m p l a t e   = =   C h a t T e m p l a t e : : G e n e r i c   & &   r e q . t o o l s . i s _ e m p t y ( )   { 
 
 +                 v e c ! [ 
 
 +                         " \ n U s e r : " . t o _ o w n e d ( ) , 
 
 +                         " \ n S y s t e m : " . t o _ o w n e d ( ) , 
 
 +                         " \ n A s s i s t a n t : " . t o _ o w n e d ( ) , 
 
 +                         " \ n \ n U s e r : " . t o _ o w n e d ( ) , 
 
 +                         " \ n \ n S y s t e m : " . t o _ o w n e d ( ) , 
 
 +                         " \ n \ n A s s i s t a n t : " . t o _ o w n e d ( ) , 
 
 +                         " \ n H u m a n : " . t o _ o w n e d ( ) , 
 
 +                 ] 
 
 +         }   e l s e   { 
 
 +                 v e c ! [ ] 
 
 +         } ; 
 
 + 
 
           P r e p a r e d P r o m p t   { 
 
                   p r o m p t , 
 
                   s t r e a m i n g _ m o d e :   i f   r e q . t o o l s . i s _ e m p t y ( )   { 
 
 @ @   - 3 7 7 , 6   + 3 9 5 , 7   @ @   p u b   f n   p r e p a r e _ p r o m p t ( r e q :   & C h a t C o m p l e t i o n R e q u e s t ,   c o n f i g :   & S e r v e r C o n f i g )   - >   P r e 
 
                   }   e l s e   { 
 
                           S t r e a m i n g M o d e : : B u f f e r e d 
 
                   } , 
 
 +                 e x t r a _ s t o p _ s e q u e n c e s :   e x t r a _ s t o p s , 
 
           } 
 
   } 
 
   
 
 @ @   - 7 4 2 , 7   + 7 6 1 , 9   @ @   p u b   f n   b u i l d _ s a m p l e r ( r e q :   & C h a t C o m p l e t i o n R e q u e s t )   - >   i n f e r e n c e _ c o r e : : S a m p l e r C o n f 
 
           s a m p l e r . t o p _ p   =   r e q . t o p _ p . c l a m p ( 0 . 0 ,   1 . 0 ) ; 
 
           s a m p l e r . m a x _ t o k e n s   =   r e q . m a x _ t o k e n s . m a x ( 1 ) ; 
 
           s a m p l e r . s t o p _ s e q u e n c e s   =   r e q . s t o p . c l o n e ( ) ; 
 
 -         s a m p l e r . r e p e a t _ p e n a l t y   =   i f   r e q . t o o l s . i s _ e m p t y ( )   {   1 . 0 5   }   e l s e   {   1 . 0   } ; 
 
 +         / /   H i g h e r   r e p e a t _ p e n a l t y   ( 1 . 3 )   w i t h   l a r g e r   c o n t e x t   w i n d o w   ( 5 1 2   t o k e n s )   t o   p r e v e n t   r e p e t i t i o n   l o o p s 
 
 +         s a m p l e r . r e p e a t _ p e n a l t y   =   i f   r e q . t o o l s . i s _ e m p t y ( )   {   1 . 3   }   e l s e   {   1 . 0   } ; 
 
 +         s a m p l e r . r e p e a t _ l a s t _ n   =   5 1 2 ; 
 
           s a m p l e r . s e e d   =   r e q . s e e d . u n w r a p _ o r ( 0 ) ; 
 
           s a m p l e r 
 
   } 
 
 d i f f   - - g i t   a / c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s   b / c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s 
 
 i n d e x   5 c e 8 a 2 d . . c 7 5 0 5 e a   1 0 0 6 4 4 
 
 - - -   a / c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s 
 
 + + +   b / c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s 
 
 @ @   - 1 6 7 , 1 0   + 1 6 7 , 2 1   @ @   a s y n c   f n   c h a t _ c o m p l e t i o n s _ h a n d l e r ( 
 
                   ) ; 
 
           } 
 
   
 
 -         l e t   s a m p l e r   =   b u i l d _ s a m p l e r ( & r e q ) ; 
 
 +         l e t   m u t   s a m p l e r   =   b u i l d _ s a m p l e r ( & r e q ) ; 
 
           l e t   p r e p a r e d   =   p r e p a r e _ p r o m p t ( & r e q ,   & s t a t e . s e r v e r _ c o n f i g ) ; 
 
           t r a c i n g : : d e b u g ! ( p r o m p t _ l e n   =   p r e p a r e d . p r o m p t . l e n ( ) ,   " c h a t _ c o m p l e t i o n s :   p r o m p t   p r e p a r e d " ) ; 
 
   
 
 +         / /   M e r g e   t e m p l a t e - i n j e c t e d   s t o p   s e q u e n c e s   w i t h   r e q u e s t - p r o v i d e d   o n e s 
 
 +         i f   ! p r e p a r e d . e x t r a _ s t o p _ s e q u e n c e s . i s _ e m p t y ( )   { 
 
 +                 l e t   m u t   s t o p s   =   s a m p l e r . s t o p _ s e q u e n c e s . c l o n e ( ) ; 
 
 +                 f o r   s   i n   & p r e p a r e d . e x t r a _ s t o p _ s e q u e n c e s   { 
 
 +                         i f   ! s t o p s . c o n t a i n s ( s )   { 
 
 +                                 s t o p s . p u s h ( s . c l o n e ( ) ) ; 
 
 +                         } 
 
 +                 } 
 
 +                 s a m p l e r . s t o p _ s e q u e n c e s   =   s t o p s ; 
 
 +         } 
 
 + 
 
           i f   r e q . s t r e a m   { 
 
                   t r a c i n g : : i n f o ! ( " c h a t _ c o m p l e t i o n s :   s t a r t i n g   s t r e a m   r e s p o n s e " ) ; 
 
                   s t r e a m _ r e s p o n s e ( 
 
 d i f f   - - g i t   a / c r a t e s / l l a m a - s y s / s r c / l i b . r s   b / c r a t e s / l l a m a - s y s / s r c / l i b . r s 
 
 i n d e x   6 7 1 2 5 2 d . . 6 b 4 6 6 b 5   1 0 0 6 4 4 
 
 - - -   a / c r a t e s / l l a m a - s y s / s r c / l i b . r s 
 
 + + +   b / c r a t e s / l l a m a - s y s / s r c / l i b . r s 
 
 @ @   - 2 2 1 , 6   + 2 2 1 , 7   @ @   p u b   s t r u c t   L l a m a L i b   { 
 
           p u b   s a m p l e r _ i n i t _ t o p _ k :   u n s a f e   e x t e r n   " C "   f n ( i 3 2 )   - >   * m u t   l l a m a _ s a m p l e r , 
 
           p u b   s a m p l e r _ i n i t _ m i n _ p :   u n s a f e   e x t e r n   " C "   f n ( f 3 2 ,   u s i z e )   - >   * m u t   l l a m a _ s a m p l e r , 
 
           p u b   s a m p l e r _ i n i t _ d i s t :   u n s a f e   e x t e r n   " C "   f n ( u 3 2 )   - >   * m u t   l l a m a _ s a m p l e r , 
 
 +         p u b   s a m p l e r _ i n i t _ p e n a l t i e s :   u n s a f e   e x t e r n   " C "   f n ( i 3 2 ,   f 3 2 ,   f 3 2 ,   f 3 2 )   - >   * m u t   l l a m a _ s a m p l e r , 
 
   
 
           / /           M i s c                                                                                                                                                                                             
 
           p u b   s u p p o r t s _ g p u _ o f f l o a d :   u n s a f e   e x t e r n   " C "   f n ( )   - >   b o o l , 
 
 @ @   - 5 1 2 , 6   + 5 1 3 , 1 1   @ @   i m p l   L l a m a L i b   { 
 
                                   u n s a f e   e x t e r n   " C "   f n ( u 3 2 )   - >   * m u t   l l a m a _ s a m p l e r , 
 
                                   " l l a m a _ s a m p l e r _ i n i t _ d i s t " 
 
                           ) , 
 
 +                         s a m p l e r _ i n i t _ p e n a l t i e s :   l o a d ! ( 
 
 +                                 s a m p l e r _ i n i t _ p e n a l t i e s , 
 
 +                                 u n s a f e   e x t e r n   " C "   f n ( i 3 2 ,   f 3 2 ,   f 3 2 ,   f 3 2 )   - >   * m u t   l l a m a _ s a m p l e r , 
 
 +                                 " l l a m a _ s a m p l e r _ i n i t _ p e n a l t i e s " 
 
 +                         ) , 
 
   
 
                           s u p p o r t s _ g p u _ o f f l o a d :   l o a d ! ( 
 
                                   s u p p o r t s _ g p u _ o f f l o a d , 
 
 d i f f   - - g i t   a / d o c s / S D D - F o r g e A g e n t . m d   b / d o c s / S D D - F o r g e A g e n t . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 8 e c 8 5 5 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / d o c s / S D D - F o r g e A g e n t . m d 
 
 @ @   - 0 , 0   + 1 , 4 9 2   @ @ 
 
 + #   S y s t e m   D e s i g n   D o c u m e n t   ( S D D ) 
 
 + # #   F o r g e A g e n t   -   M o d o   A g e n t i c   p a r a   F o r g e L M 
 
 + 
 
 + * * V e r s % o : * *   1 . 0     
 
 + * * D a t a : * *   2 0 2 5 - 0 4 - 0 2     
 
 + * * S t a t u s : * *   D r a f t     
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 .   V i s % o   G e r a l 
 
 + 
 
 + # # #   1 . 1   O b j e t i v o 
 
 + T r a n s f o r m a r   r e s p o s t a s   d o   m o d e l o   L L M   d e   s i m p l e s   " b o l h a s   d e   t e x t o "   e m   u m a   * * e x p e r i % n c i a   a g e n t i c   v i s % v e l * * ,   o n d e   o   u s u % r i o   a c o m p a n h a   e m   t e m p o   r e a l : 
 
 + -   O   p l a n o   e s t r u t u r a d o   d e   e x e c u % % o 
 
 + -   P r o g r e s s o   p a s s o   a   p a s s o   c o m   c h e c k m a r k s 
 
 + -   S u b - t a r e f a s   d e t a l h a d a s 
 
 + -   A r t e f a t o s   g e r a d o s   ( a r q u i v o s   M a r k d o w n ) 
 
 + 
 
 + # # #   1 . 2   M o t i v a % % o 
 
 + M o d e l o s   p e q u e n o s   ( 0 . 8 B - 4 B )   t % m   e x c e l e n t e   c a p a c i d a d e   d e   p l a n e j a m e n t o   q u a n d o   e s t r u t u r a d o s   c o r r e t a m e n t e .   O   F o r g e A g e n t   e x p % e   e s s a   c a p a c i d a d e   v i s u a l m e n t e ,   c r i a n d o   v a l o r   p e r c e b i d o   m a i o r   e   e x p e r i % n c i a   s i m i l a r   a o   M a n u s   1 . 6   L i t e . 
 
 + 
 
 + # # #   1 . 3   E s c o p o 
 
 + -   * * I n c l u % d o : * *   F r o n t e n d   R e a c t / T a u r i ,   b a c k e n d   R u s t   ( s t r u c t u r e d   o u t p u t ) ,   p r o m p t s   p a r a   m o d e l o 
 
 + -   * * E x c l u % d o   ( f u t u r o ) : * *   S u p o r t e   a   Z I P ,   v i s % o / % u d i o ,   e x e c u % % o   r e a l   d e   c %%d i g o 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   2 .   A r q u i t e t u r a 
 
 + 
 
 + # # #   2 . 1   H i g h - L e v e l   A r c h i t e c t u r e 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                              
 
 +                                              F r o n t e n d   ( R e a c t / T a u r i )                                          
 
 +                                                                                                                                                                                   
 
 +             C h a t V i e w                       F o r g e A g e n t                   A r t i f a c t                                 
 
 +                                                   P l a n   C a r d                     V i e w e r                                     
 
 +                                                                                                                                                                                   
 
 +                                                                                                                                                                                              
 
 +                                                T a u r i   E v e n t s 
 
 +                                             ]%
 
 +                                                                                                                                                                                              
 
 +                                            B a c k e n d   ( R u s t / T a u r i )                                                
 
 +                                                                                                                                                                                   
 
 +             T r i g g e r                         P l a n                               S t r e a m i n g                               
 
 +             D e t e c t o r                       G e n e r a t o r                     E m i t t e r                                   
 
 +                                                                                                                                                                                   
 
 +                                                                                                                                                                                              
 
 +                                              
 
 +                                             ]%
 
 +                                                                                                                                                                                              
 
 +                                                  L L M   ( l l a m a . c p p )                                                    
 
 +                                F o r g e S t e e l   4 B   /   F o r g e I r o n   2 B                                            
 
 +                                                                                                                                                                                              
 
 + ` ` ` 
 
 + 
 
 + # # #   2 . 2   F l u x o   d e   D a d o s 
 
 + 
 
 + ` ` ` 
 
 + 1 .   U s u % r i o   e n v i a   m e n s a g e m 
 
 +          
 
 + 2 .   T r i g g e r   D e t e c t o r   a n a l i s a :   m o d o   a g e n t i c   n e c e s s % r i o ? 
 
 +            S i m 
 
 + 3 .   P l a n   G e n e r a t o r   e n v i a   p r o m p t   e s t r u t u r a d o   a o   L L M 
 
 +          
 
 + 4 .   L L M   r e t o r n a   J S O N   ( A g e n t P l a n ) 
 
 +          
 
 + 5 .   S t r e a m i n g   E m i t t e r   e n v i a   e v e n t o s   T a u r i   p r o g r e s s i v a m e n t e 
 
 +          
 
 + 6 .   F r o n t e n d   r e n d e r i z a :   P l a n o        E x e c u % % o        A r t e f a t o s 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   3 .   C o m p o n e n t e s 
 
 + 
 
 + # # #   3 . 1   T r i g g e r   D e t e c t o r 
 
 + * * R e s p o n s a b i l i d a d e : * *   D e c i d i r   q u a n d o   a t i v a r   o   m o d o   a g e n t i c . 
 
 + 
 
 + * * C r i t % r i o s   A u t o m % t i c o s : * * 
 
 + -   P a l a v r a s - c h a v e :   " c o m o   f a z e r " ,   " g u i a " ,   " p a s s o   a   p a s s o " ,   " t u t o r i a l " ,   " e x e m p l o   c o m p l e t o " ,   " p r o j e t o " 
 
 + -   P a d r % e s   r e g e x :   ` / \ b ( c o m o | g u i a | t u t o r i a l | p a s s o   a   p a s s o | e x e m p l o   c o m p l e t o | p r o j e t o ) \ b / i ` 
 
 + 
 
 + * * C r i t % r i o s   M a n u a i s : * * 
 
 + -   T o g g l e   "         M o d o   A g e n t i c "   a o   l a d o   d o   i n p u t   d e   c h a t 
 
 + 
 
 + * * S a % d a : * *   B o o l e a n   ( ` s h o u l d U s e A g e n t i c ` ) 
 
 + 
 
 + # # #   3 . 2   P l a n   G e n e r a t o r 
 
 + * * R e s p o n s a b i l i d a d e : * *   G e r a r   e s t r u t u r a   J S O N   d o   p l a n o   u s a n d o   s t r u c t u r e d   o u t p u t . 
 
 + 
 
 + * * S c h e m a   ( R u s t ) : * * 
 
 + ` ` ` r u s t 
 
 + # [ d e r i v e ( S e r i a l i z e ,   D e s e r i a l i z e ,   D e b u g ,   C l o n e ) ] 
 
 + p u b   s t r u c t   A g e n t P l a n   { 
 
 +         p u b   t i t l e :   S t r i n g , 
 
 +         p u b   o v e r v i e w :   S t r i n g , 
 
 +         p u b   s t e p s :   V e c < S t e p > , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( S e r i a l i z e ,   D e s e r i a l i z e ,   D e b u g ,   C l o n e ) ] 
 
 + p u b   s t r u c t   S t e p   { 
 
 +         p u b   i d :   u 3 2 , 
 
 +         p u b   t i t l e :   S t r i n g , 
 
 +         p u b   d e s c r i p t i o n :   S t r i n g , 
 
 +         p u b   s t a t u s :   S t e p S t a t u s , 
 
 +         p u b   s u b _ s t e p s :   V e c < S u b S t e p > , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( S e r i a l i z e ,   D e s e r i a l i z e ,   D e b u g ,   C l o n e ) ] 
 
 + p u b   s t r u c t   S u b S t e p   { 
 
 +         p u b   i d :   S t r i n g ,     / /   f o r m a t o :   " { s t e p _ i d } . { s u b _ i d } " 
 
 +         p u b   d e s c r i p t i o n :   S t r i n g , 
 
 +         p u b   s t a t u s :   S t e p S t a t u s , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( S e r i a l i z e ,   D e s e r i a l i z e ,   D e b u g ,   C l o n e ,   P a r t i a l E q ) ] 
 
 + # [ s e r d e ( r e n a m e _ a l l   =   " l o w e r c a s e " ) ] 
 
 + p u b   e n u m   S t e p S t a t u s   { 
 
 +         P e n d i n g , 
 
 +         R u n n i n g , 
 
 +         C o m p l e t e d , 
 
 +         E r r o r , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( S e r i a l i z e ,   D e s e r i a l i z e ,   D e b u g ,   C l o n e ) ] 
 
 + p u b   s t r u c t   A r t i f a c t   { 
 
 +         p u b   f i l e n a m e :   S t r i n g , 
 
 +         p u b   c o n t e n t :   S t r i n g , 
 
 +         p u b   l a n g u a g e :   O p t i o n < S t r i n g > ,     / /   " m a r k d o w n " ,   " j a v a s c r i p t " ,   e t c . 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   3 . 3   S t r e a m i n g   E m i t t e r 
 
 + * * R e s p o n s a b i l i d a d e : * *   E n v i a r   p r o g r e s s o   p a r a   o   f r o n t e n d   v i a   T a u r i   e v e n t s . 
 
 + 
 
 + * * E v e n t o s : * * 
 
 + -   ` f o r g e a g e n t : p l a n - s t a r t e d `   -   I n % c i o   d o   p l a n o 
 
 + -   ` f o r g e a g e n t : s t e p - s t a r t e d `   -   S t e p   N   i n i c i a d o 
 
 + -   ` f o r g e a g e n t : s t e p - c o m p l e t e d `   -   S t e p   N   c o m p l e t a d o 
 
 + -   ` f o r g e a g e n t : s t e p - e r r o r `   -   S t e p   N   f a l h o u 
 
 + -   ` f o r g e a g e n t : a r t i f a c t - r e a d y `   -   A r t e f a t o   d i s p o n % v e l 
 
 + -   ` f o r g e a g e n t : p l a n - c o m p l e t e d `   -   P l a n o   f i n a l i z a d o 
 
 + 
 
 + # # #   3 . 4   F r o n t e n d   C o m p o n e n t s 
 
 + 
 
 + # # # #   3 . 4 . 1   F o r g e A g e n t B u b b l e 
 
 + C o n t a i n e r   e s p e c i a l   p a r a   m e n s a g e n s   a g e n t i c .   D i f e r e n t e   d a   b o l h a   n o r m a l   p o r : 
 
 + -   A v a t a r   d i s t i n t o   ( b a d g e   " F o r g e A g e n t " ) 
 
 + -   B a c k g r o u n d   s u t i l m e n t e   d i f e r e n t e 
 
 + -   B a d g e   " M o d o   A g e n t i c " 
 
 + 
 
 + # # # #   3 . 4 . 2   P l a n C a r d 
 
 + C a r d   e x p a n s % v e l   m o s t r a n d o   o   p l a n o   c o m p l e t o : 
 
 + -   H e a d e r :   T % t u l o   +   p r o g r e s s o   ( X   d e   Y   p a s s o s ) 
 
 + -   B o d y :   L i s t a   d e   s t e p s   c o m   c h e c k m a r k s 
 
 + -   A c c o r d i o n :   S t e p s   p o d e m   e x p a n d i r   p a r a   m o s t r a r   s u b - s t e p s 
 
 + -   P r o g r e s s   b a r :   V i s u a l i z a % % o   l i n e a r   d o   p r o g r e s s o 
 
 + 
 
 + # # # #   3 . 4 . 3   S t e p I t e m 
 
 + I t e m   i n d i v i d u a l   d e   u m a   t a r e f a : 
 
 + -   % c o n e   d e   s t a t u s   (   %  p e n d i n g ,           r u n n i n g ,        c o m p l e t e d ,        e r r o r ) 
 
 + -   T % t u l o   d a   t a r e f a 
 
 + -   D e s c r i % % o   c u r t a 
 
 + -   S u b - s t e p s   ( s e   h o u v e r ) 
 
 + 
 
 + # # # #   3 . 4 . 4   S y s t e m M e s s a g e 
 
 + M e n s a g e n s   i n t e r m e d i % r i a s   d o   s i s t e m a : 
 
 + -   S e m   a v a t a r 
 
 + -   B a c k g r o u n d   c i n z a   e s c u r o 
 
 + -   T e x t o   d e   s t a t u s   ( e x :   "      D i r e t %%r i o   c r i a d o .   P r %%x i m o   p a s s o . . . " ) 
 
 + 
 
 + # # # #   3 . 4 . 5   A r t i f a c t V i e w e r 
 
 + V i s u a l i z a d o r   d e   a r t e f a t o s   M a r k d o w n : 
 
 + -   P r e v i e w   d o   c o n t e %Q%d o 
 
 + -   B o t % o   " D o w n l o a d " 
 
 + -   S y n t a x   h i g h l i g h t   p a r a   b l o c o s   d e   c %%d i g o 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   4 .   I n t e r f a c e   d o   U s u % r i o 
 
 + 
 
 + # # #   4 . 1   L a y o u t   d a   T e l a   d e   C h a t 
 
 + 
 
 + ` ` ` 
 
 +                                                                                                                                                                                           
 
 +             C h a t                                                                                                        
 
 +                                                                                                                                                                                           
 
 +                                                                                                                               
 
 +                                                                                                                                                                                   
 
 +                  U s u % r i o :   c o m o   c r i a r   u m a   a p i   e m   n o d e j s ?                                 
 
 +                                                                                                                                                                                   
 
 +                                                                                                                               
 
 +                                                                                                                                                                                   
 
 +                  F o r g e A g e n t   [ M o d o   A g e n t i c ]                                                           
 
 +                                                                                                                               
 
 +             V o u   c r i a r   u m   g u i a   c o m p l e t o   p a r a   v o c % !                                     
 
 +                                                                                                                               
 
 +                                                                                                                                                                             
 
 +                       P l a n o   d e   E x e c u % % o   ( 4   p a s s o s )           [             ]                          
 
 +                                                                                                                               
 
 +                       1 .   C o n f i g u r a r   a m b i e n t e                                                              
 
 +                                   I n s t a l a r   N o d e . j s                                                                
 
 +                                   V e r i f i c a r   v e r s % o                                                                
 
 +                                                                                                                                   
 
 +                          2 .   I n i c i a l i z a r   p r o j e t o   ( e x e c u t a n d o . . . )                              
 
 +                                                                                                                                   
 
 +                    %  3 .   I n s t a l a r   d e p e n d % n c i a s                                                          
 
 +                                                                                                                                   
 
 +                    %  4 .   C r i a r   e n d p o i n t s                                                                      
 
 +                                                                                                                                                                             
 
 +                                                                                                                               
 
 +                  P r o j e t o   i n i c i a l i z a d o   c o m   s u c e s s o !                                       
 
 +                                                                                                                               
 
 +                  a p i - n o d e j s - g u i d e . m d                                         [       ]                   
 
 +                                                                                                                                                                                   
 
 +                                                                                                                               
 
 +                                                                                                                                                                                   
 
 +             [         M o d o   A g e n t i c ]   [                                         ]   [    ]                       
 
 +                                                                                                                                                                                   
 
 +                                                                                                                               
 
 +                                                                                                                                                                                           
 
 + ` ` ` 
 
 + 
 
 + # # #   4 . 2   E s t a d o s   V i s u a i s 
 
 + 
 
 + # # # #   S t e p   -   P e n d i n g 
 
 + ` ` ` 
 
 +   %  T % t u l o   d a   t a r e f a 
 
 +       D e s c r i % % o   c u r t a 
 
 + ` ` ` 
 
 + 
 
 + # # # #   S t e p   -   R u n n i n g 
 
 + ` ` ` 
 
 +         T % t u l o   d a   t a r e f a 
 
 +       [ = = = = = = = = = = >         ]   6 0 % 
 
 +       D e s c r i % % o   c u r t a 
 
 + ` ` ` 
 
 + 
 
 + # # # #   S t e p   -   C o m p l e t e d 
 
 + ` ` ` 
 
 +      T % t u l o   d a   t a r e f a 
 
 +       D e s c r i % % o   c u r t a 
 
 +                  S u b - s t e p   1 
 
 +                  S u b - s t e p   2 
 
 + ` ` ` 
 
 + 
 
 + # # # #   S t e p   -   E r r o r 
 
 + ` ` ` 
 
 +      T % t u l o   d a   t a r e f a 
 
 +               E r r o :   m e n s a g e m   d e   e r r o 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   5 .   P r o m p t   E n g i n e e r i n g 
 
 + 
 
 + # # #   5 . 1   S y s t e m   P r o m p t 
 
 + 
 
 + ` ` ` m a r k d o w n 
 
 + V o c %   %   o   F o r g e A g e n t ,   u m   a s s i s t e n t e   e s p e c i a l i z a d o   e m   c r i a r   p l a n o s   e s t r u t u r a d o s   e   e x e c u t % v e i s . 
 
 + 
 
 + S U A   T A R E F A : 
 
 + 1 .   A n a l i s a r   a   s o l i c i t a % % o   d o   u s u % r i o 
 
 + 2 .   C r i a r   u m   p l a n o   p a s s o   a   p a s s o   d e t a l h a d o 
 
 + 3 .   R e t o r n a r   A P E N A S   u m   o b j e t o   J S O N   v % l i d o   n o   f o r m a t o   e s p e c i f i c a d o 
 
 + 
 
 + R E G R A S : 
 
 + -   N U N C A   a d i c i o n e   t e x t o   f o r a   d o   J S O N 
 
 + -   S e m p r e   d i v i d a   t a r e f a s   c o m p l e x a s   e m   p a s s o s   c l a r o s 
 
 + -   C a d a   p a s s o   d e v e   t e r   2 - 5   s u b - p a s s o s   q u a n d o   a p l i c % v e l 
 
 + -   U s e   l i n g u a g e m   c l a r a   e   d i r e t a 
 
 + -   O   o v e r v i e w   d e v e   t e r   n o   m % x i m o   2   f r a s e s 
 
 + 
 
 + F O R M A T O   J S O N   O B R I G A T % R I O : 
 
 + { 
 
 +     " t i t l e " :   " T % t u l o   d o   p l a n o   ( m % x   5 0   c a r a c t e r e s ) " , 
 
 +     " o v e r v i e w " :   " B r e v e   d e s c r i % % o   d o   q u e   s e r %   f e i t o " , 
 
 +     " s t e p s " :   [ 
 
 +         { 
 
 +             " i d " :   1 , 
 
 +             " t i t l e " :   " T % t u l o   d o   p a s s o " , 
 
 +             " d e s c r i p t i o n " :   " D e s c r i % % o   d e t a l h a d a " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { 
 
 +                     " i d " :   " 1 . 1 " , 
 
 +                     " d e s c r i p t i o n " :   " S u b - t a r e f a   e s p e c % f i c a " , 
 
 +                     " s t a t u s " :   " p e n d i n g " 
 
 +                 } 
 
 +             ] 
 
 +         } 
 
 +     ] 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   5 . 2   F e w - S h o t   E x a m p l e 
 
 + 
 
 + * * I n p u t : * *   " c o m o   f a z e r   u m a   a p i   e m   n o d e j s " 
 
 + 
 
 + * * O u t p u t : * * 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " t i t l e " :   " C r i a r   A P I   N o d e . j s " , 
 
 +     " o v e r v i e w " :   " V a m o s   c r i a r   u m a   A P I   R E S T   c o m p l e t a   u s a n d o   E x p r e s s . j s   c o m   e s t r u t u r a   p r o f i s s i o n a l . " , 
 
 +     " s t e p s " :   [ 
 
 +         { 
 
 +             " i d " :   1 , 
 
 +             " t i t l e " :   " C o n f i g u r a r   a m b i e n t e " , 
 
 +             " d e s c r i p t i o n " :   " P r e p a r a r   o   a m b i e n t e   d e   d e s e n v o l v i m e n t o " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { " i d " :   " 1 . 1 " ,   " d e s c r i p t i o n " :   " V e r i f i c a r   i n s t a l a % % o   d o   N o d e . j s " ,   " s t a t u s " :   " p e n d i n g " } , 
 
 +                 { " i d " :   " 1 . 2 " ,   " d e s c r i p t i o n " :   " I n s t a l a r   n p m / y a r n " ,   " s t a t u s " :   " p e n d i n g " } 
 
 +             ] 
 
 +         } , 
 
 +         { 
 
 +             " i d " :   2 , 
 
 +             " t i t l e " :   " I n i c i a l i z a r   p r o j e t o " , 
 
 +             " d e s c r i p t i o n " :   " C r i a r   e s t r u t u r a   b a s e   d o   p r o j e t o " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { " i d " :   " 2 . 1 " ,   " d e s c r i p t i o n " :   " C r i a r   d i r e t %%r i o   d o   p r o j e t o " ,   " s t a t u s " :   " p e n d i n g " } , 
 
 +                 { " i d " :   " 2 . 2 " ,   " d e s c r i p t i o n " :   " E x e c u t a r   n p m   i n i t " ,   " s t a t u s " :   " p e n d i n g " } 
 
 +             ] 
 
 +         } , 
 
 +         { 
 
 +             " i d " :   3 , 
 
 +             " t i t l e " :   " I n s t a l a r   d e p e n d % n c i a s " , 
 
 +             " d e s c r i p t i o n " :   " A d i c i o n a r   E x p r e s s   e   u t i l i t % r i o s " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { " i d " :   " 3 . 1 " ,   " d e s c r i p t i o n " :   " I n s t a l a r   e x p r e s s " ,   " s t a t u s " :   " p e n d i n g " } , 
 
 +                 { " i d " :   " 3 . 2 " ,   " d e s c r i p t i o n " :   " I n s t a l a r   n o d e m o n   ( d e v ) " ,   " s t a t u s " :   " p e n d i n g " } 
 
 +             ] 
 
 +         } , 
 
 +         { 
 
 +             " i d " :   4 , 
 
 +             " t i t l e " :   " C r i a r   e n d p o i n t s " , 
 
 +             " d e s c r i p t i o n " :   " I m p l e m e n t a r   r o t a s   d a   A P I " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { " i d " :   " 4 . 1 " ,   " d e s c r i p t i o n " :   " C r i a r   s e r v i d o r   E x p r e s s " ,   " s t a t u s " :   " p e n d i n g " } , 
 
 +                 { " i d " :   " 4 . 2 " ,   " d e s c r i p t i o n " :   " A d i c i o n a r   r o t a   G E T   / " ,   " s t a t u s " :   " p e n d i n g " } , 
 
 +                 { " i d " :   " 4 . 3 " ,   " d e s c r i p t i o n " :   " A d i c i o n a r   r o t a   P O S T   / a p i / d a t a " ,   " s t a t u s " :   " p e n d i n g " } 
 
 +             ] 
 
 +         } 
 
 +     ] 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   6 .   A P I   &   E v e n t o s 
 
 + 
 
 + # # #   6 . 1   C o m m a n d s   ( T a u r i ) 
 
 + 
 
 + ` ` ` r u s t 
 
 + # [ t a u r i : : c o m m a n d ] 
 
 + a s y n c   f n   g e n e r a t e _ a g e n t _ p l a n ( 
 
 +         r e q u e s t :   A g e n t P l a n R e q u e s t , 
 
 + )   - >   R e s u l t < A g e n t P l a n ,   S t r i n g >   { 
 
 +         / /   I m p l e m e n t a t i o n 
 
 + } 
 
 + 
 
 + # [ t a u r i : : c o m m a n d ] 
 
 + a s y n c   f n   e x e c u t e _ p l a n _ s t e p ( 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s t e p _ i d :   u 3 2 , 
 
 + )   - >   R e s u l t < S t e p R e s u l t ,   S t r i n g >   { 
 
 +         / /   I m p l e m e n t a t i o n 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + # # #   6 . 2   E v e n t s   ( T a u r i ) 
 
 + 
 
 + ` ` ` t y p e s c r i p t 
 
 + / /   F r o n t e n d   l i s t e n i n g 
 
 + l i s t e n ( ' f o r g e a g e n t : p l a n - s t a r t e d ' ,   ( e v e n t )   = >   { 
 
 +     c o n s t   {   p l a n _ i d ,   t i t l e ,   t o t a l _ s t e p s   }   =   e v e n t . p a y l o a d ; 
 
 +     / /   U p d a t e   U I 
 
 + } ) ; 
 
 + 
 
 + l i s t e n ( ' f o r g e a g e n t : s t e p - s t a r t e d ' ,   ( e v e n t )   = >   { 
 
 +     c o n s t   {   p l a n _ i d ,   s t e p _ i d ,   t i t l e   }   =   e v e n t . p a y l o a d ; 
 
 +     / /   U p d a t e   s t e p   s t a t u s   t o   " r u n n i n g " 
 
 + } ) ; 
 
 + 
 
 + l i s t e n ( ' f o r g e a g e n t : s t e p - c o m p l e t e d ' ,   ( e v e n t )   = >   { 
 
 +     c o n s t   {   p l a n _ i d ,   s t e p _ i d ,   m e s s a g e   }   =   e v e n t . p a y l o a d ; 
 
 +     / /   U p d a t e   s t e p   s t a t u s   t o   " c o m p l e t e d " 
 
 +     / /   I n s e r t   s y s t e m   m e s s a g e 
 
 + } ) ; 
 
 + 
 
 + l i s t e n ( ' f o r g e a g e n t : a r t i f a c t - r e a d y ' ,   ( e v e n t )   = >   { 
 
 +     c o n s t   {   p l a n _ i d ,   a r t i f a c t   }   =   e v e n t . p a y l o a d ; 
 
 +     / /   S h o w   a r t i f a c t   v i e w e r 
 
 + } ) ; 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   7 .   E s t a d o s   e   T r a n s i % % e s 
 
 + 
 
 + ` ` ` 
 
 +                                                                                      
 
 +                                                    I D L E              
 
 +                                                                                      
 
 +                                                            t r i g g e r   d e t e c t e d 
 
 +                                                         ]%
 
 +                                                                                      
 
 +                                                             P L A N N I N G                                         
 
 +                                                                                                              
 
 +                                                             p l a n   g e n e r a t e d        
 
 +                                                          ]%                                     
 
 +                                                                                                              
 
 +                                                 E X E C U T I N G                                         
 
 +                                                                                         ( n e x t   s t e p ) 
 
 +                                                           
 
 +                                                          ]%
 
 +                                                                                       
 
 +                                                           C O M P L E T E D        
 
 +         ( a l l   s t e p s   d o n e )                                                
 
 +                                                          
 
 +                                                         ]%
 
 +                                                                                      
 
 +                                                A R T I F A C T          
 
 +                                                  R E A D Y              
 
 +                                                                                      
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   8 .   C o n s i d e r a % % e s   d e   P e r f o r m a n c e 
 
 + 
 
 + # # #   8 . 1   M o d e l o   R e c o m e n d a d o 
 
 + -   * * F o r g e S t e e l   4 B : * *   P a r a   p l a n o s   c o m p l e x o s   ( 5 +   p a s s o s ) 
 
 + -   * * F o r g e I r o n   2 B : * *   P a r a   p l a n o s   s i m p l e s   ( 2 - 4   p a s s o s ) 
 
 + -   * * F o r g e C o p p e r   0 . 8 B : * *   N % o   r e c o m e n d a d o   p a r a   g e r a % % o   d e   p l a n o s 
 
 + 
 
 + # # #   8 . 2   T e m p o s   E s p e r a d o s 
 
 + -   G e r a % % o   d o   p l a n o :   2 - 5   s e g u n d o s 
 
 + -   C a d a   s t e p   ( s i m u l a d o ) :   5 0 0 m s - 2 s 
 
 + -   T o t a l   p a r a   p l a n o   d e   5   s t e p s :   5 - 1 5   s e g u n d o s 
 
 + 
 
 + # # #   8 . 3   O t i m i z a % % e s 
 
 + -   S t r e a m i n g   p r o g r e s s i v o   ( n % o   e s p e r a r   p l a n o   c o m p l e t o ) 
 
 + -   C a c h e   d e   p l a n o s   s i m i l a r e s 
 
 + -   D e b o u n c e   e m   p a l a v r a s - c h a v e 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   9 .   T e s t e s 
 
 + 
 
 + # # #   9 . 1   T e s t e s   U n i t % r i o s 
 
 + -   P a r s e   d e   J S O N   v % l i d o / i n v % l i d o 
 
 + -   D e t e c % % o   d e   t r i g g e r s 
 
 + -   C % l c u l o   d e   p r o g r e s s o 
 
 + 
 
 + # # #   9 . 2   T e s t e s   d e   I n t e g r a % % o 
 
 + -   F l u x o   c o m p l e t o :   i n p u t        p l a n o        e x e c u % % o        a r t e f a t o 
 
 + -   E v e n t o s   T a u r i 
 
 + -   E r r o r   h a n d l i n g 
 
 + 
 
 + # # #   9 . 3   T e s t e s   M a n u a i s 
 
 + -   P l a n o s   c o m p l e x o s   ( 1 0 +   s t e p s ) 
 
 + -   C a r a c t e r e s   e s p e c i a i s 
 
 + -   T i m e o u t   d e   m o d e l o 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   1 0 .   R e f e r % n c i a s 
 
 + 
 
 + -   [ M a n u s   1 . 6   L i t e   U I   R e f e r e n c e ] ( m a n u s - r e f e r e n c e . p n g ) 
 
 + -   [ S t r u c t u r e d   O u t p u t   -   l l a m a . c p p ] ( h t t p s : / / g i t h u b . c o m / g g e r g a n o v / l l a m a . c p p / b l o b / m a s t e r / e x a m p l e s / m a i n / R E A D M E . m d # g r a m m a r ) 
 
 + -   [ T a u r i   E v e n t s ] ( h t t p s : / / t a u r i . a p p / v 1 / g u i d e s / f e a t u r e s / e v e n t s / ) 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   H i s t %%r i c o   d e   R e v i s % e s 
 
 + 
 
 + |   V e r s % o   |   D a t a   |   A u t o r   |   M u d a n % a s   | 
 
 + | - - - - - - - - | - - - - - - | - - - - - - - | - - - - - - - - - - | 
 
 + |   1 . 0   |   2 0 2 5 - 0 4 - 0 2   |   F o r g e L M   T e a m   |   V e r s % o   i n i c i a l   | 
 
 + 
 
 + - - - 
 
 + 
 
 + # #   A p r o v a % % e s 
 
 + 
 
 + -   [   ]   T e c h   L e a d 
 
 + -   [   ]   P r o d u c t   M a n a g e r 
 
 + -   [   ]   Q A   L e a d 
 
 d i f f   - - g i t   a / d o c s / m a n u s S y s t e m D e s i g n / s y s t e m D e s i g n . m d   b / d o c s / m a n u s S y s t e m D e s i g n / s y s t e m D e s i g n . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . d 3 2 9 0 6 8 
 
 - - -   / d e v / n u l l 
 
 + + +   b / d o c s / m a n u s S y s t e m D e s i g n / s y s t e m D e s i g n . m d 
 
 @ @   - 0 , 0   + 1 , 1 8 6   @ @ 
 
 + # # #   E n g e n h a r i a   R e v e r s a   e   E x t r a % % o   d e   P a d r % e s   ( V i s u a i s ) 
 
 + 
 
 + A   a n % l i s e   d a s   i n t e r f a c e s   r e v e l a   u m   d e s i g n   f o c a d o   e m   p r o d u t i v i d a d e   e   r e d u % % o   d e   c a r g a   c o g n i t i v a ,   a d o t a n d o   a   v e r t e n t e   * * M i n i m a l i s m o   P u r o * *   c o m   e s q u e m a   d e   c o r e s   * D a r k   M o d e *   n a t i v o .   A   h i e r a r q u i a   v i s u a l   %   e s t a b e l e c i d a   p e l o   c o n t r a s t e   d e   l u m i n o s i d a d e   ( t o n s   d e   c i n z a )   e m   v e z   d e   c o r e s   s a t u r a d a s . 
 
 + 
 
 + # # # #   D e s i g n   T o k e n s   ( T a i l w i n d   C S S   C o n f i g ) 
 
 + 
 
 + ` ` ` j s o n 
 
 + { 
 
 +     " t h e m e " :   { 
 
 +         " c o l o r s " :   { 
 
 +             " b g " :   { 
 
 +                 " b a s e " :   " # 1 7 1 7 1 7 " ,   / /   F u n d o   p r i n c i p a l   d a   % r e a   d e   c h a t 
 
 +                 " s u r f a c e " :   " # 1 E 1 E 1 E " ,   / /   S i d e b a r   e   p a i n % i s   m o d a i s 
 
 +                 " e l e v a t e d " :   " # 2 6 2 6 2 6 " ,   / /   I n p u t s ,   c a r d s   d e   t a r e f a s ,   m o d a i s   s o b r e p o s t o s 
 
 +                 " h o v e r " :   " # 3 3 3 3 3 3 "   / /   H o v e r   s t a t e s   e m   l i s t a s   e   b o t % e s 
 
 +             } , 
 
 +             " t e x t " :   { 
 
 +                 " p r i m a r y " :   " # F 3 F 4 F 6 " ,   / /   T e x t o   d e   a l t a   % n f a s e   ( t % t u l o s ,   i n p u t s ) 
 
 +                 " s e c o n d a r y " :   " # 9 C A 3 A F " ,   / /   T e x t o   d e   m % d i a   % n f a s e   ( d a t a s ,   p l a c e h o l d e r s ,   d e s c r i % % e s ) 
 
 +                 " m u t e d " :   " # 5 2 5 2 5 B "   / /   B o r d a s   s u t i s ,   % c o n e s   i n a t i v o s 
 
 +             } , 
 
 +             " a c c e n t " :   { 
 
 +                 " b l u e " :   " # 3 B 8 2 F 6 " ,   / /   L i n k s   ( U p g r a d e ) ,   f o c u s   r i n g s 
 
 +                 " b r a n d " :   " # F F F F F F "   / /   % c o n e s   d e   d e s t a q u e   ( e x :   e s t r e l a   d e   c r % d i t o s ) 
 
 +             } 
 
 +         } , 
 
 +         " f o n t F a m i l y " :   { 
 
 +             " s a n s " :   [ " I n t e r " ,   " s y s t e m - u i " ,   " s a n s - s e r i f " ] ,   / /   U I   g e r a l ,   l e g i b i l i d a d e   t % c n i c a 
 
 +             " s e r i f " :   [ " M e r r i w e a t h e r " ,   " G e o r g i a " ,   " s e r i f " ]   / /   A p e n a s   p a r a   o   g r e e t i n g   " W h a t   c a n   I   d o   f o r   y o u ? "   ( C o n t r a s t e   t i p o g r % f i c o   i n t e n c i o n a l ) 
 
 +         } , 
 
 +         " s p a c i n g " :   { 
 
 +             " x s " :   " 0 . 2 5 r e m " ,   / /   4 p x   -   M i c r o - a j u s t e s 
 
 +             " s m " :   " 0 . 5 r e m " ,   / /   8 p x   -   E s p a % a m e n t o   i n t e r n o   d e   b o t % e s / l i s t a s 
 
 +             " m d " :   " 1 r e m " ,   / /   1 6 p x   -   P a d d i n g s   d e   c o n t a i n e r s 
 
 +             " l g " :   " 1 . 5 r e m " ,   / /   2 4 p x   -   S e p a r a % % o   d e   s e % % e s 
 
 +             " x l " :   " 2 r e m "   / /   3 2 p x   -   M a r g e n s   g l o b a i s 
 
 +         } , 
 
 +         " b o r d e r R a d i u s " :   { 
 
 +             " s m " :   " 0 . 3 7 5 r e m " ,   / /   I n p u t s   s e c u n d % r i o s ,   % c o n e s 
 
 +             " m d " :   " 0 . 5 r e m " ,   / /   C a r d s   d e   h i s t %%r i c o ,   b o t % e s 
 
 +             " l g " :   " 1 r e m "   / /   M o d a i s ,   I n p u t   p r i n c i p a l   d e   c h a t ,   P a i n % i s   f l u t u a n t e s 
 
 +         } 
 
 +     } 
 
 + } 
 
 + ` ` ` 
 
 + 
 
 + - - - 
 
 + 
 
 + # # #   I n f e r % n c i a   d e   F u n c i o n a l i d a d e s   e   U X 
 
 + 
 
 + # # # #   E l e m e n t o s   I n t e r a t i v o s   V i s % v e i s 
 
 + *   * * N a v e g a % % o   L a t e r a l   ( S i d e b a r ) : * *   E s t r u t u r a   c o l a p s % v e l   c o n t e n d o   g e r e n c i a m e n t o   d e   e s t a d o   g l o b a l   ( N o v a   T a r e f a ,   A g e n t e s ,   P e s q u i s a ,   B i b l i o t e c a ,   P r o j e t o s ,   H i s t %%r i c o ) . 
 
 + *   * * S i s t e m a   d e   M o d a i s   ( O v e r l a y ) : * *   U t i l i z a d o   p a r a   C o n t e x t o   P e s s o a l   ( C o n f i g u r a % % e s ,   P r o f i l e )   e   B u s c a   R % p i d a   ( C o m m a n d   P a l e t t e   -   ` S e a r c h   t a s k s . . . ` ) .   B l o q u e i a   i n t e r a % % o   c o m   o   f u n d o   ( b a c k d r o p   c o m   o p a c i t y ) . 
 
 + *   * * I n p u t   M u l t i m o d a l   d e   C h a t : * *   C a m p o   d e   e n t r a d a   c o m   a c o p l a m e n t o   d e   f e r r a m e n t a s   ( u p l o a d ,   p l u g i n s ,   s c r e e n   s h a r e ,   m i c ) .   S u g e r e   a u t o s i z e   d i n % m i c o   b a s e a d o   n o   c o n t e %Q%d o . 
 
 + *   * * P a i n e l   S p l i t - S c r e e n   ( M a n u s ' s   C o m p u t e r ) : * *   V i s u a l i z a % % o   * s i d e - b y - s i d e *   d a   i n t e r a % % o   d o   L L M   e   a   e x e c u % % o   d e   t a r e f a s   e m   u m   a m b i e n t e   v i r t u a l i z a d o   ( n a v e g a % % o   w e b   a u t %$%n o m a ) . 
 
 + 
 
 + # # # #   L %%g i c a   I m p l % c i t a   d e   E s t a d o / B a c k e n d 
 
 + *   * * C o m u n i c a % % o   A s s % n c r o n a   B i d i r e c i o n a l : * *   A   i n t e r f a c e   s u g e r e   q u e   a   g e r a % % o   d e   r e s p o s t a s   e   o s   p a s s o s   d a   e x e c u % % o   ( P e s q u i s a ,   A n % l i s e ,   S a l v a m e n t o ,   C o n v e r s % o )   u t i l i z a m   W e b S o c k e t s   o u   S e r v e r - S e n t   E v e n t s   ( S S E )   p a r a   s t r e a m   d e   d a d o s   e m   t e m p o   r e a l   s e m   * p o l l i n g * . 
 
 + *   * * G e r e n c i a m e n t o   d e   E s t a d o   G l o b a l : * *   P r o v a v e l m e n t e   u t i l i z a   Z u s t a n d   o u   C o n t e x t   A P I   p a r a   s i n c r o n i z a r   o   s a l d o   d e   " C r e d i t s "   ( 5 8 7 )   e   " D a i l y   r e f r e s h   c r e d i t s "   e n t r e   a   t o p b a r ,   s i d e b a r   e   m o d a i s   d e   c o n f i g u r a % % o   d e   f o r m a   r e a t i v a . 
 
 + *   * * P a g i n a % % o   e   C a c h e   d e   H i s t %%r i c o : * *   A   l i s t a   d e   " O l d e r   t a s k s "   n a   b u s c a   ( i m a g e _ 4 3 d f a 1 )   s u g e r e   p a g i n a % % o   s e r v e r - s i d e   c o m   c a c h e   l o c a l   ( R e a c t   Q u e r y / S W R )   p a r a   o t i m i z a % % o   d e   m e m %%r i a   e   b u s c a   * f u z z y *   ( p e s q u i s a   p o r   a p r o x i m a % % o ) . 
 
 + *   * * V i r t u a l i z a % % o   d o   D O M : * *   O   p a i n e l   " M a n u s ' s   C o m p u t e r "   p r o v a v e l m e n t e   u t i l i z a   u m   i f r a m e   s e g u r o   o u   u m   c a n v a s   r e n d e r i z a d o   v i a   s t r e a m   d e   v % d e o   d o   b a c k e n d   ( s e m e l h a n t e   a   W e b R T C )   p a r a   r e f l e t i r   a   n a v e g a % % o   a u t %$%n o m a   d o   a g e n t e . 
 
 + 
 
 + - - - 
 
 + 
 
 + # # #   D e s e n v o l v i m e n t o   e   S % n t e s e :   A r q u i t e t u r a   C o r e   ( R e a c t   +   T a i l w i n d ) 
 
 + 
 
 + A b a i x o ,   a   s % n t e s e   d o   ` L a y o u t   P r i n c i p a l ` ,   e n g l o b a n d o   a   S i d e b a r   e s t r u t u r a l   e   a   % r e a   c e n t r a l   d e   v i s u a l i z a % % o .   O   c %%d i g o   s e g u e   p a d r % e s   e s t r i t o s   d e   a c e s s i b i l i d a d e   ( A R I A )   e   e s t r u t u r a   s e m % n t i c a . 
 
 + 
 
 + ` ` ` t s x 
 
 + i m p o r t   R e a c t ,   {   u s e S t a t e   }   f r o m   ' r e a c t ' ; 
 
 + 
 
 + / /   I n t e r f a c e s   p a r a   t i p a g e m   e s t r i t a 
 
 + i n t e r f a c e   N a v I t e m   { 
 
 +     i d :   s t r i n g ; 
 
 +     l a b e l :   s t r i n g ; 
 
 +     i c o n :   R e a c t . R e a c t N o d e ; 
 
 +     i s A c t i v e ? :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   A p p L a y o u t P r o p s   { 
 
 +     c h i l d r e n :   R e a c t . R e a c t N o d e ; 
 
 +     u s e r N a m e :   s t r i n g ; 
 
 +     u s e r C r e d i t s :   n u m b e r ; 
 
 + } 
 
 + 
 
 + e x p o r t   c o n s t   A p p L a y o u t :   R e a c t . F C < A p p L a y o u t P r o p s >   =   ( {   c h i l d r e n ,   u s e r N a m e ,   u s e r C r e d i t s   } )   = >   { 
 
 +     c o n s t   [ i s S i d e b a r O p e n ,   s e t I s S i d e b a r O p e n ]   =   u s e S t a t e ( t r u e ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " f l e x   h - s c r e e n   w - f u l l   b g - [ # 1 7 1 7 1 7 ]   t e x t - [ # F 3 F 4 F 6 ]   f o n t - s a n s   o v e r f l o w - h i d d e n " > 
 
 +             { / *   S i d e b a r   -   N a v e g a % % o   P r i m % r i a   * / } 
 
 +             < a s i d e 
 
 +                 c l a s s N a m e = { ` f l e x   f l e x - c o l   b g - [ # 1 E 1 E 1 E ]   t r a n s i t i o n - a l l   d u r a t i o n - 3 0 0   e a s e - i n - o u t   b o r d e r - r   b o r d e r - [ # 2 6 2 6 2 6 ]   $ { 
 
 +                     i s S i d e b a r O p e n   ?   ' w - 6 4 '   :   ' w - 1 6 ' 
 
 +                 } ` } 
 
 +                 a r i a - l a b e l = " S i d e b a r   N a v i g a t i o n " 
 
 +             > 
 
 +                 { / *   H e a d e r   d a   S i d e b a r   * / } 
 
 +                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   p - 4   b o r d e r - b   b o r d e r - [ # 2 6 2 6 2 6 ] " > 
 
 +                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2   o v e r f l o w - h i d d e n " > 
 
 +                         < d i v   c l a s s N a m e = " w - 8   h - 8   r o u n d e d - m d   b g - [ # 2 6 2 6 2 6 ]   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   s h r i n k - 0 " > 
 
 +                             < s p a n   c l a s s N a m e = " t e x t - s m   f o n t - b o l d " > M < / s p a n > 
 
 +                         < / d i v > 
 
 +                         { i s S i d e b a r O p e n   & &   < s p a n   c l a s s N a m e = " f o n t - m e d i u m   w h i t e s p a c e - n o w r a p " > M a n u s   1 . 6   L i t e < / s p a n > } 
 
 +                     < / d i v > 
 
 +                     < b u t t o n 
 
 +                         o n C l i c k = { ( )   = >   s e t I s S i d e b a r O p e n ( ! i s S i d e b a r O p e n ) } 
 
 +                         c l a s s N a m e = " p - 1   t e x t - [ # 9 C A 3 A F ]   h o v e r : t e x t - [ # F 3 F 4 F 6 ]   r o u n d e d - m d   h o v e r : b g - [ # 2 6 2 6 2 6 ]   t r a n s i t i o n - c o l o r s " 
 
 +                         a r i a - l a b e l = { i s S i d e b a r O p e n   ?   ' C o l l a p s e   s i d e b a r '   :   ' E x p a n d   s i d e b a r ' } 
 
 +                     > 
 
 +                         { / *   % c o n e   d e   c o l a p s o   g e n % r i c o   * / } 
 
 +                         < s v g   c l a s s N a m e = " w - 5   h - 5 "   f i l l = " n o n e "   v i e w B o x = " 0   0   2 4   2 4 "   s t r o k e = " c u r r e n t C o l o r " > 
 
 +                             < p a t h   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   s t r o k e W i d t h = { 2 }   d = " M 4   6 h 1 6 M 4   1 2 h 1 6 M 4   1 8 h 7 "   / > 
 
 +                         < / s v g > 
 
 +                     < / b u t t o n > 
 
 +                 < / d i v > 
 
 + 
 
 +                 { / *   L i n k s   d e   N a v e g a % % o   * / } 
 
 +                 < n a v   c l a s s N a m e = " f l e x - 1   o v e r f l o w - y - a u t o   p - 2   s p a c e - y - 1 " > 
 
 +                     < b u t t o n   c l a s s N a m e = " w - f u l l   f l e x   i t e m s - c e n t e r   g a p - 3   p x - 3   p y - 2   t e x t - s m   f o n t - m e d i u m   r o u n d e d - m d   b g - [ # 2 6 2 6 2 6 ]   t e x t - [ # F 3 F 4 F 6 ]   t r a n s i t i o n - c o l o r s " > 
 
 +                         < s v g   c l a s s N a m e = " w - 4   h - 4   s h r i n k - 0 "   f i l l = " n o n e "   v i e w B o x = " 0   0   2 4   2 4 "   s t r o k e = " c u r r e n t C o l o r " > 
 
 +                             < p a t h   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   s t r o k e W i d t h = { 2 }   d = " M 1 2   4 v 1 6 m 8 - 8 H 4 "   / > 
 
 +                         < / s v g > 
 
 +                         { i s S i d e b a r O p e n   & &   < s p a n > N e w   t a s k < / s p a n > } 
 
 +                     < / b u t t o n > 
 
 +                     
 
 +                     < d i v   c l a s s N a m e = " p t - 4 " > 
 
 +                         { i s S i d e b a r O p e n   & &   < s p a n   c l a s s N a m e = " p x - 3   t e x t - x s   f o n t - s e m i b o l d   t e x t - [ # 5 2 5 2 5 B ]   u p p e r c a s e   t r a c k i n g - w i d e r " > W o r k s p a c e < / s p a n > } 
 
 +                         < u l   c l a s s N a m e = " m t - 2   s p a c e - y - 1 " > 
 
 +                             { [ ' A g e n t s ' ,   ' S e a r c h ' ,   ' L i b r a r y ' ] . m a p ( ( i t e m )   = >   ( 
 
 +                                 < l i   k e y = { i t e m } > 
 
 +                                     < b u t t o n   c l a s s N a m e = " w - f u l l   f l e x   i t e m s - c e n t e r   g a p - 3   p x - 3   p y - 2   t e x t - s m   f o n t - m e d i u m   r o u n d e d - m d   t e x t - [ # 9 C A 3 A F ]   h o v e r : t e x t - [ # F 3 F 4 F 6 ]   h o v e r : b g - [ # 2 6 2 6 2 6 ]   t r a n s i t i o n - c o l o r s " > 
 
 +                                         < d i v   c l a s s N a m e = " w - 4   h - 4   b g - [ # 5 2 5 2 5 B ]   r o u n d e d - s m   s h r i n k - 0 " > < / d i v >   { / *   P l a c e h o l d e r   I c o n   * / } 
 
 +                                         { i s S i d e b a r O p e n   & &   < s p a n > { i t e m } < / s p a n > } 
 
 +                                     < / b u t t o n > 
 
 +                                 < / l i > 
 
 +                             ) ) } 
 
 +                         < / u l > 
 
 +                     < / d i v > 
 
 +                 < / n a v > 
 
 + 
 
 +                 { / *   F o o t e r   d a   S i d e b a r   ( U s e r   I n f o )   * / } 
 
 +                 < d i v   c l a s s N a m e = " p - 4   b o r d e r - t   b o r d e r - [ # 2 6 2 6 2 6 ] " > 
 
 +                     < b u t t o n   c l a s s N a m e = " w - f u l l   f l e x   i t e m s - c e n t e r   g a p - 3   h o v e r : b g - [ # 2 6 2 6 2 6 ]   p - 2   r o u n d e d - m d   t r a n s i t i o n - c o l o r s   t e x t - l e f t " > 
 
 +                         < i m g 
 
 +                             s r c = " h t t p s : / / v i a . p l a c e h o l d e r . c o m / 3 2 " 
 
 +                             a l t = { ` A v a t a r   d e   $ { u s e r N a m e } ` } 
 
 +                             c l a s s N a m e = " w - 8   h - 8   r o u n d e d - f u l l   s h r i n k - 0 " 
 
 +                         / > 
 
 +                         { i s S i d e b a r O p e n   & &   ( 
 
 +                             < d i v   c l a s s N a m e = " f l e x - 1   m i n - w - 0 " > 
 
 +                                 < p   c l a s s N a m e = " t e x t - s m   f o n t - m e d i u m   t e x t - [ # F 3 F 4 F 6 ]   t r u n c a t e " > { u s e r N a m e } < / p > 
 
 +                                 < p   c l a s s N a m e = " t e x t - x s   t e x t - [ # 9 C A 3 A F ]   t r u n c a t e " > { u s e r C r e d i t s }   C r e d i t s < / p > 
 
 +                             < / d i v > 
 
 +                         ) } 
 
 +                     < / b u t t o n > 
 
 +                 < / d i v > 
 
 +             < / a s i d e > 
 
 + 
 
 +             { / *   % r e a   P r i n c i p a l   * / } 
 
 +             < m a i n   c l a s s N a m e = " f l e x - 1   f l e x   f l e x - c o l   m i n - w - 0   r e l a t i v e "   a r i a - l a b e l = " M a i n   C o n t e n t   A r e a " > 
 
 +                 { / *   T o p b a r   O p c i o n a l   /   H e a d e r   d e   C o n t e x t o   * / } 
 
 +                 < h e a d e r   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   p - 4   h - 1 6   s h r i n k - 0 " > 
 
 +                         < d i v   c l a s s N a m e = " f l e x - 1 " > < / d i v > 
 
 +                         < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 4 " > 
 
 +                                 < b u t t o n   c l a s s N a m e = " t e x t - s m   f o n t - m e d i u m   t e x t - [ # 9 C A 3 A F ]   h o v e r : t e x t - [ # F 3 F 4 F 6 ]   t r a n s i t i o n - c o l o r s " > U p g r a d e < / b u t t o n > 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 1   p x - 3   p y - 1   b g - [ # 2 6 2 6 2 6 ]   r o u n d e d - f u l l   t e x t - x s   f o n t - m e d i u m   t e x t - [ # F 3 F 4 F 6 ] " > 
 
 +                                         < s p a n >    < / s p a n > 
 
 +                                         < s p a n > { u s e r C r e d i t s } < / s p a n > 
 
 +                                 < / d i v > 
 
 +                         < / d i v > 
 
 +                 < / h e a d e r > 
 
 + 
 
 +                 { / *   C o n t e n t   W r a p p e r   * / } 
 
 +                 < d i v   c l a s s N a m e = " f l e x - 1   o v e r f l o w - y - a u t o   p - 4   s m : p - 8   f l e x   f l e x - c o l " > 
 
 +                     { c h i l d r e n } 
 
 +                 < / d i v > 
 
 +             < / m a i n > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } ; 
 
 + 
 
 + e x p o r t   d e f a u l t   A p p L a y o u t ; 
 
 + ` ` ` 
 
 + 
 
 + O   s i s t e m a   m a p e a d o   p o s s u i   a l t a   c o m p l e x i d a d e   d e   e s t a d o s   e   s u b - r o t e a m e n t o   ( M o d a i s   d e   P e r f i l ,   P a i n e l   D i v i d i d o   d e   E x e c u % % o   d e   T a r e f a s ,   I n p u t   M u l t i m o d a l ) .   Q u a l   d e s t e s   m %%d u l o s   e s p e c % f i c o s   v o c %   d e s e j a   q u e   e u   i s o l e ,   e x t r a i a   a   l %%g i c a   e   g e r e   o   c %%d i g o   d e   p r o d u % % o   e m   s e g u i d a ? 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / d o c s / p l a n s / f i x - m o d e l - s w a p . m d   b / d o c s / p l a n s / f i x - m o d e l - s w a p . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 4 8 0 c 7 2 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / d o c s / p l a n s / f i x - m o d e l - s w a p . m d 
 
 @ @   - 0 , 0   + 1 , 3 1   @ @ 
 
 + - - - 
 
 + p l a n   n a m e :   f i x - m o d e l - s w a p 
 
 + p l a n   d e s c r i p t i o n :   F i x   m o d e l   s w a p   r a c e   c o n d i t i o n 
 
 + p l a n   s t a t u s :   a c t i v e 
 
 + - - - 
 
 + 
 
 + # #   I d e a 
 
 + C o r r i g i r   a   r a c e   c o n d i t i o n   o n d e   o   m o d e l o   s e l e c i o n a d o   %   s o b r e s c r i t o   p e l o   r e f r e s h   a u t o m % t i c o   d u r a n t e   u m a   t r o c a   d e   m o d e l o . 
 
 + 
 
 + * * P r o b l e m a   i d e n t i f i c a d o : * * 
 
 + 1 .   U s u % r i o   s e l e c i o n a   m o d e l o   B   n o   f r o n t e n d 
 
 + 2 .   ` s w a p M o d e l ( ) `   %   c h a m a d o   p a r a   t r o c a r   n o   b a c k e n d 
 
 + 3 .   O   b a c k e n d   l e v a   t e m p o   p a r a   t r o c a r   ( p a r a   A P I ,   r e i n i c i a   c o m   n o v o   m o d e l o ) 
 
 + 4 .   E n q u a n t o   i s s o ,   o   ` u s e M o d e l s . r e f r e s h ( ) `   p o d e   e x e c u t a r   e   b u s c a r   l i s t a   d e   m o d e l o s   d o   s e r v i d o r 
 
 + 5 .   O   s e r v i d o r   a i n d a   r e t o r n a   m o d e l o   A   ( a n t i g o )   p o i s   a   t r o c a   n % o   c o m p l e t o u 
 
 + 6 .   ` g e t N e x t S e l e c t e d M o d e l ( ) `   v %   q u e   m o d e l o   A   e x i s t e   n a   l i s t a   e   m a n t % m / r e t o r n a   e l e 
 
 + 7 .   R e s u l t a d o :   o   u s u % r i o   v %   m o d e l o   A   s e l e c i o n a d o   e m   v e z   d e   B 
 
 + 
 
 + * * S o l u % % o : * * 
 
 + I m p l e m e n t a r   u m   m e c a n i s m o   d e   " l o c k "   t e m p o r % r i o   n o   ` u s e M o d e l s `   q u e   p r e v i n e   q u e   o   r e f r e s h   a u t o m % t i c o   s o b r e s c r e v a   o   ` s e l e c t e d M o d e l `   p o r   a l g u n s   s e g u n d o s   a p %%s   u m a   s e l e % % o   m a n u a l   d o   u s u % r i o . 
 
 + 
 
 + # #   I m p l e m e n t a t i o n 
 
 + -   A d i c i o n a r   e s t a d o   ` l a s t M a n u a l S e l e c t i o n T i m e `   e m   u s e M o d e l s   p a r a   r a s t r e a r   q u a n d o   o   u s u % r i o   s e l e c i o n o u   m a n u a l m e n t e   u m   m o d e l o 
 
 + -   M o d i f i c a r   a   f u n % % o   ` s e t S e l e c t e d M o d e l `   p a r a   t a m b % m   a t u a l i z a r   o   t i m e s t a m p   d e   s e l e % % o   m a n u a l 
 
 + -   A t u a l i z a r   a   l %%g i c a   d e   ` r e f r e s h `   e m   u s e M o d e l s   p a r a   r e s p e i t a r   o   l o c k   e   n % o   s o b r e s c r e v e r   o   s e l e c t e d M o d e l   r e c e n t e 
 
 + -   V e r i f i c a r   s e   h %   n e c e s s i d a d e   d e   a j u s t e s   n o   A p p . t s x   o u   S i d e b a r . t s x   p a r a   i n t e g r a r   c o m   a   n o v a   A P I 
 
 + -   T e s t a r   a   c o r r e % % o   s i m u l a n d o   a   t r o c a   d e   m o d e l o   e   v e r i f i c a n d o   q u e   o   m o d e l o   c o r r e t o   p e r m a n e c e   s e l e c i o n a d o 
 
 + 
 
 + # #   R e q u i r e d   S p e c s 
 
 + < ! - -   S P E C S _ S T A R T   - - > 
 
 + < ! - -   S P E C S _ E N D   - - > 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / d o c s / p l a n s / f i x - s w a p - b u g . m d   b / d o c s / p l a n s / f i x - s w a p - b u g . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 5 7 3 8 a b 7 
 
 - - -   / d e v / n u l l 
 
 + + +   b / d o c s / p l a n s / f i x - s w a p - b u g . m d 
 
 @ @   - 0 , 0   + 1 , 3 1   @ @ 
 
 + - - - 
 
 + p l a n   n a m e :   f i x - s w a p - b u g 
 
 + p l a n   d e s c r i p t i o n :   F i x   s w a p   m o d e l   l o a d i n g   w r o n g   m o d e l 
 
 + p l a n   s t a t u s :   d o n e 
 
 + - - - 
 
 + 
 
 + # #   I d e a 
 
 + C o r r i g i r   b u g   c r % t i c o   n o   s w a p _ m o d e l _ c o m m a n d   o n d e   o   m o d e l o   a n t i g o   %   c a r r e g a d o   a p %%s   t r o c a r   p a r a   u m   n o v o   m o d e l o . 
 
 + 
 
 + * * P r o b l e m a   i d e n t i f i c a d o : * * 
 
 + N o   ` s w a p _ m o d e l _ c o m m a n d `   ( s r c - t a u r i / s r c / l i b . r s : 1 2 3 - 1 3 9 ) : 
 
 + 1 .   O   c o m a n d o   s a l v a   a   c o n f i g   n o   d i s c o   c o m   o   n o v o   m o d e l o 
 
 + 2 .   M a s   N % O   a t u a l i z a   o   e s t a d o   i n t e r n o   ` i n n e r . c o n f i g `   n o   R u n t i m e S t a t e 
 
 + 3 .   Q u a n d o   ` s t a r t _ r u n t i m e `   %   c h a m a d o ,   e l e   u s a   ` i n n e r . c o n f i g `   d o   s t a t e   ( m o d e l o   a n t i g o ) 
 
 + 4 .   R e s u l t a d o :   o   p r o c e s s o   %   r e i n i c i a d o   c o m   o   m o d e l o   a n t i g o 
 
 + 
 
 + * * S o l u % % o : * * 
 
 + A t u a l i z a r   o   ` i n n e r . c o n f i g `   n o   s t a t e   a p %%s   s a l v a r   a   c o n f i g   n o   d i s c o ,   p a r a   g a r a n t i r   q u e   ` s t a r t _ r u n t i m e `   u s e   o   n o v o   m o d e l o . 
 
 + 
 
 + * * B %$%n u s : * *   R e d u z i r   v e r b o s i d a d e   d o s   l o g s   d e   c a r r e g a m e n t o   d e   t e n s o r e s   n o   b a c k e n d   R u s t . 
 
 + 
 
 + # #   I m p l e m e n t a t i o n 
 
 + -   C o r r i g i r   s w a p _ m o d e l _ c o m m a n d   p a r a   a t u a l i z a r   i n n e r . c o n f i g   n o   s t a t e   a p %%s   s a l v a r 
 
 + -   R e d u z i r   v e r b o s i d a d e   d o s   l o g s   c r e a t e _ t e n s o r   n o   b a c k e n d 
 
 + -   V e r i f i c a r   s e   h %   o u t r o s   l u g a r e s   c o m   p r o b l e m a   s i m i l a r 
 
 + -   T e s t a r   a   c o r r e % % o 
 
 + -   A t u a l i z a r   o   p l a n o   f i x - m o d e l - s w a p   c o m o   c o n c l u % d o   o u   r e l a c i o n a d o 
 
 + 
 
 + # #   R e q u i r e d   S p e c s 
 
 + < ! - -   S P E C S _ S T A R T   - - > 
 
 + < ! - -   S P E C S _ E N D   - - > 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / d o c s / s p e c s / a d a p t i v e - m o d e l - r o u t i n g - s d d . m d   b / d o c s / s p e c s / a d a p t i v e - m o d e l - r o u t i n g - s d d . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 2 c 1 7 4 2 6 
 
 - - -   / d e v / n u l l 
 
 + + +   b / d o c s / s p e c s / a d a p t i v e - m o d e l - r o u t i n g - s d d . m d 
 
 @ @   - 0 , 0   + 1 , 3 4 0   @ @ 
 
 + #   A d a p t i v e   M o d e l   R o u t i n g   S D D 
 
 + 
 
 + # #   S t a t u s 
 
 + -   D r a f t   v 1 
 
 + -   S c o p e :   T a u r i   d e s k t o p   a p p   +   R u s t   l o c a l   i n f e r e n c e   r u n t i m e   +   R e a c t   c h a t   U I 
 
 + 
 
 + # #   O b j e c t i v e 
 
 + R e f a c t o r   l o c a l   m o d e l   s e l e c t i o n   s o   t h e   a p p   d e f a u l t s   t o   * * a u t o m a t i c   s t a r t u p   c h o i c e * *   a n d   * * s e s s i o n - l e v e l   m a n u a l   o v e r r i d e * * ,   w h i l e   a d d i n g   T P S - b a s e d   d e g r a d a t i o n   d e t e c t i o n   a n d   d e n s e r   c h a t / h o m e   U I   b e h a v i o r . 
 
 + 
 
 + # #   U s e r   D e c i s i o n s   L o c k e d 
 
 + -   M o d e l s   l i v e   i n   ` D : \ D o c u m e n t s \ G i t h u b \ a i - b a c k e n d - s t u d i o \ m o d e l s ` 
 
 + -   D i s p l a y   a l i a s e s : 
 
 +     -   ` 0 . 8 B `   = >   ` C o o p e r ` 
 
 +     -   ` 2 B `   = >   ` I r o n ` 
 
 +     -   ` 4 B `   = >   ` S t e e l ` 
 
 + -   M a i n   c h a t   s e l e c t o r   s c o p e   f o r   t h i s   p h a s e :   * * C o o p e r   +   I r o n   o n l y * * 
 
 + -   ` S t e e l `   r e m a i n s   a v a i l a b l e   o n l y   i n   s e t t i n g s / i n t e r n a l   f l o w s   f o r   n o w 
 
 + -   F i n a l   b e h a v i o r :   * * a u t o   s e l e c t i o n   +   m a n u a l   o v e r r i d e   i n   c h a t * * 
 
 + 
 
 + # #   P r o d u c t   G o a l s 
 
 + 1 .   R e m o v e   m o d e l   c h o i c e   a s   a   r e q u i r e d   s t a r t u p   d e c i s i o n   f o r   n o r m a l   u s e r s . 
 
 + 2 .   S t a r t   t h e   a p p   w i t h   t h e   b e s t   d e f a u l t   m o d e l   a u t o m a t i c a l l y . 
 
 + 3 .   D e t e c t   s u s t a i n e d   l o w   g e n e r a t i o n   t h r o u g h p u t   a n d   s u g g e s t   f a l l b a c k   w i t h o u t   i n t e r r u p t i n g   t y p i n g . 
 
 + 4 .   A l l o w   t h e   u s e r   t o   o v e r r i d e   t h e   e f f e c t i v e   m o d e l   f r o m   c h a t . 
 
 + 5 .   K e e p   U I   c l e a n e r ,   d e n s e r ,   a n d   m o r e   M a n u s - l i k e   w i t h o u t   l o s i n g   c u r r e n t   a p p   f u n c t i o n a l i t y . 
 
 + 
 
 + # #   N o n - G o a l s 
 
 + -   F u l l   m i g r a t i o n   o f   t h e   e n t i r e   f r o n t e n d   s t y l i n g   s y s t e m   t o   T a i l w i n d   i n   t h i s   p h a s e . 
 
 + -   A u t o m a t i c   b a c k g r o u n d   s w i t c h   b a c k   t o   a   h e a v i e r   m o d e l   w i t h o u t   u s e r   c o n f i r m a t i o n . 
 
 + -   E x p o s i n g   ` S t e e l `   i n   t h e   p r i m a r y   c h a t   s e l e c t o r . 
 
 + -   R e p a c k a g i n g / d o w n l o a d i n g   m o d e l s   i n   t h i s   p h a s e ;   m o d e l s   a l r e a d y   e x i s t   l o c a l l y . 
 
 + 
 
 + # #   C u r r e n t   A r c h i t e c t u r e   S u m m a r y 
 
 + 
 
 + # # #   B a c k e n d   /   R u n t i m e 
 
 + -   T a u r i   c o m m a n d   s u r f a c e :   ` t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s ` 
 
 + -   R u n t i m e   b o o t s t r a p / s t a r t / s t o p :   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s ` 
 
 + -   M o d e l   d i s c o v e r y / i n d e x i n g :   ` t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s ` ,   ` t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ l i b r a r y / * ` 
 
 + -   I n f e r e n c e   g e n e r a t i o n   l o o p   a n d   T P S   s o u r c e :   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s ` 
 
 + -   S S E   s t r e a m i n g   a n d   f i n a l   u s a g e   p a y l o a d :   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s ` 
 
 + 
 
 + # # #   F r o n t e n d 
 
 + -   A p p   c o m p o s i t i o n   a n d   m o d e l   s w a p   w i r i n g :   ` t a u r i - a p p / s r c / A p p . t s x ` 
 
 + -   C h a t   s c r e e n :   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x ` 
 
 + -   C u r r e n t   m a n u a l   m o d e l   s e l e c t o r :   ` t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x ` 
 
 + -   R u n t i m e   d r a f t   m o d e l   s e l e c t i o n   h e l p e r s :   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - s e t t i n g s - f o r m . t s ` 
 
 + -   L i v e   m o d e l   l i s t   f e t c h   +   c u r r e n t   m a n u a l - l o c k   b e h a v i o r :   ` t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s ` 
 
 + 
 
 + # #   C o r e   D e s i g n   D e c i s i o n s 
 
 + 
 
 + # # #   1 )   S e p a r a t e   P r e f e r r e d   M o d e l   f r o m   E f f e c t i v e   M o d e l 
 
 + T h e   s y s t e m   w i l l   t r a c k   t w o   d i f f e r e n t   c o n c e p t s : 
 
 + 
 
 + -   * * P r e f e r r e d   m o d e l * * :   t h e   u s e r   o r   a p p   d e f a u l t   f o r   s t a r t u p   ( ` I r o n `   b y   d e f a u l t   w h e n   a v a i l a b l e ) 
 
 + -   * * E f f e c t i v e   m o d e l * * :   t h e   m o d e l   c u r r e n t l y   s e r v i n g   t h e   a c t i v e   s e s s i o n / c h a t 
 
 + 
 
 + T h i s   p r e v e n t s   f a l l b a c k   e v e n t s   f r o m   s i l e n t l y   r e w r i t i n g   t h e   u s e r   p r e f e r e n c e . 
 
 + 
 
 + # # #   2 )   A u t o m a t i c   S t a r t u p   C h o i c e 
 
 + A t   a p p   l a u n c h ,   l o c a l   r u n t i m e   s e l e c t i o n   w i l l   f o l l o w   t h i s   o r d e r : 
 
 + 
 
 + 1 .   I f   t h e   u s e r   e x p l i c i t l y   s a v e d   a   p r e f e r r e d   s t a r t u p   m o d e l   a n d   i t   i s   a v a i l a b l e ,   u s e   i t . 
 
 + 2 .   O t h e r w i s e   p r e f e r   ` I r o n ` . 
 
 + 3 .   I f   ` I r o n `   i s   u n a v a i l a b l e ,   u s e   ` C o o p e r ` . 
 
 + 4 .   ` S t e e l `   i s   i g n o r e d   b y   n o r m a l   a u t o - s t a r t   p o l i c y   i n   t h i s   p h a s e . 
 
 + 
 
 + # # #   3 )   T P S - B a s e d   D e g r a d a t i o n   W a r n i n g 
 
 + T h e   s y s t e m   w i l l   m o n i t o r   * * g e n e r a t i o n   T P S * *   d u r i n g   a c t i v e   c o m p l e t i o n   s t r e a m i n g . 
 
 + 
 
 + F a l l b a c k   t r i g g e r   r u l e : 
 
 + -   t r a c k   r o l l i n g   g e n e r a t i o n   T P S   s a m p l e s   i n   R u s t 
 
 + -   i f   r o l l i n g   T P S   s t a y s   ` <   3 0 `   f o r   ` > =   5 s `   c o n t i n u o u s l y 
 
 + -   e m i t   a   d e g r a d a t i o n   e v e n t   o n c e   p e r   r e q u e s t / s e s s i o n   w i n d o w 
 
 + -   s h o w   a   n o n - b l o c k i n g   t o a s t   i n   t h e   f r o n t e n d 
 
 + 
 
 + T o a s t   a c t i o n s : 
 
 + -   ` T r o c a r   p a r a   C o o p e r ` 
 
 + -   ` M a n t e r   I r o n ` 
 
 + 
 
 + I f   t h e   e f f e c t i v e   m o d e l   i s   a l r e a d y   ` C o o p e r ` ,   n o   f a l l b a c k   t o a s t   i s   s h o w n . 
 
 + 
 
 + # # #   4 )   M a n u a l   O v e r r i d e   i n   C h a t 
 
 + T h e   p r i m a r y   c h a t   s u r f a c e   w i l l   e x p o s e   a   * * s m a l l   m o d e l   s e l e c t o r * *   n e a r   t h e   c o m p o s e r / h e a d e r   w i t h : 
 
 + -   ` I r o n ` 
 
 + -   ` C o o p e r ` 
 
 + 
 
 + B e h a v i o r : 
 
 + -   c h a n g i n g   t h e   s e l e c t o r   s w a p s   o n l y   t h e   * * e f f e c t i v e   m o d e l * * 
 
 + -   t h e   c h o s e n   v a l u e   p e r s i s t s   f o r   t h e   c u r r e n t   a p p   s e s s i o n 
 
 + -   i t   d o e s   n o t   s i l e n t l y   r e w r i t e   s t a r t u p   p r e f e r e n c e   u n l e s s   t h e   u s e r   l a t e r   s a v e s   i t   i n   s e t t i n g s 
 
 + 
 
 + # # #   5 )   T a i l w i n d   R u l e   f o r   T h i s   F e a t u r e 
 
 + T h e   a p p   c u r r e n t l y   r e l i e s   h e a v i l y   o n   C S S   f i l e s .   F o r   t h i s   f e a t u r e : 
 
 + -   a l l   * * n e w   U I   s u r f a c e s / c o m p o n e n t s * *   s h o u l d   b e   b u i l t   T a i l w i n d - f i r s t 
 
 + -   m o d i f i e d   l e g a c y   s u r f a c e s   m a y   t e m p o r a r i l y   k e e p   e x i s t i n g   C S S   w h e r e   a   f u l l   m i g r a t i o n   w o u l d   c r e a t e   u n n e c e s s a r y   c h u r n 
 
 + -   a n y   t o u c h e d   l a y o u t   s h o u l d   m o v e   t o w a r d   u t i l i t y - c l a s s   o w n e r s h i p   w h e n   p r a c t i c a l 
 
 + 
 
 + T h i s   k e e p s   d e l i v e r y   r e a l i s t i c   w h i l e   r e s p e c t i n g   t h e   n e w   d i r e c t i o n . 
 
 + 
 
 + # #   M o d e l   I n v e n t o r y   a n d   A l i a s   P o l i c y 
 
 + 
 
 + # # #   C a n o n i c a l   a l i a s   t a b l e 
 
 + |   R a w   f a m i l y   |   D i s p l a y   n a m e   |   P h a s e   r o l e   | 
 
 + | - - - | - - - | - - - | 
 
 + |   0 . 8 B   |   C o o p e r   |   f a l l b a c k   +   l i g h t w e i g h t   m a n u a l   c h o i c e   | 
 
 + |   2 B   |   I r o n   |   d e f a u l t   p r i m a r y   m o d e l   | 
 
 + |   4 B   |   S t e e l   |   s e t t i n g s / i n t e r n a l   o n l y   | 
 
 + 
 
 + # # #   R e s o l u t i o n   r u l e 
 
 + M o d e l   d i s p l a y   n a m i n g   m u s t   b e   c o m p u t e d   f r o m   l o c a l   f i l e   m e t a d a t a / p a t h   p a t t e r n s ,   n o t   h a r d c o d e d   t o   e x a c t   f i l e n a m e s   o n l y .   M a t c h i n g   s h o u l d   a l l o w   f u t u r e   f i l e   s u f f i x   c h a n g e s . 
 
 + 
 
 + P r o p o s e d   m a t c h e r   p r i o r i t y : 
 
 + 1 .   e x p l i c i t   c o n f i g   m a p p i n g   i f   p r e s e n t 
 
 + 2 .   k n o w n   f i l e n a m e   p a t t e r n   m a t c h   ( ` 0 . 8 b ` ,   ` 2 b ` ,   ` 4 b ` ) 
 
 + 3 .   r a w   f i l e   b a s e n a m e   f a l l b a c k 
 
 + 
 
 + # #   P r o p o s e d   A r c h i t e c t u r e 
 
 + 
 
 + # # #   A .   R u s t :   T P S   T e l e m e t r y   L a y e r 
 
 + A d d   a   l i g h t w e i g h t   T P S   m o n i t o r   a r o u n d   t h e   g e n e r a t i o n   l o o p . 
 
 + 
 
 + # # # #   S o u r c e   o f   t r u t h 
 
 + -   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s ` 
 
 + 
 
 + # # # #   N e w   c o n c e p t 
 
 + ` G e n e r a t i o n P e r f o r m a n c e S n a p s h o t ` 
 
 + -   ` r e q u e s t _ i d ` 
 
 + -   ` m o d e l _ k e y ` 
 
 + -   ` g e n e r a t e d _ t o k e n s ` 
 
 + -   ` g e n e r a t i o n _ e l a p s e d _ m s ` 
 
 + -   ` r o l l i n g _ t p s ` 
 
 + -   ` f i n a l _ t p s ` 
 
 + -   ` d e g r a d a t i o n _ s t a t e ` 
 
 + 
 
 + # # # #   R u l e s 
 
 + -   b e g i n   m e a s u r i n g   o n   f i r s t   g e n e r a t e d   t o k e n ,   n o t   p r e f i l l 
 
 + -   m a i n t a i n   a   r o l l i n g   w i n d o w   f o r   g e n e r a t i o n   t h r o u g h p u t 
 
 + -   e m i t   s t a t e   t r a n s i t i o n s   o n l y   w h e n   e n t e r i n g   d e g r a d e d   m o d e 
 
 + -   k e e p   f i n a l   T P S   m e t r i c   i n   e x i s t i n g   u s a g e   p a y l o a d   p a t h 
 
 + 
 
 + # # # #   W h y   h e r e 
 
 + ` G e n e r a t i o n S e s s i o n `   a l r e a d y   o w n s   g e n e r a t i o n   t i m i n g   a n d   f i n a l   T P S ,   s o   a d d i n g   r o l l i n g   T P S   t h e r e   a v o i d s   d u p l i c a t e   t i m i n g   l o g i c   i n   t h e   f r o n t e n d . 
 
 + 
 
 + # # #   B .   R u s t :   R u n t i m e   A u t o - S e l e c t i o n   P o l i c y 
 
 + A d d   s t a r t u p   m o d e l   r e s o l u t i o n   i n s i d e   r u n t i m e   b o o t s t r a p / s t a r t   f l o w . 
 
 + 
 
 + # # # #   T a r g e t 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s ` 
 
 + 
 
 + # # # #   N e w   p o l i c y   f u n c t i o n 
 
 + ` r e s o l v e _ s t a r t u p _ m o d e l ( c o n f i g ,   d i s c o v e r e d _ m o d e l s )   - >   E f f e c t i v e S t a r t u p M o d e l ` 
 
 + 
 
 + # # # #   I n p u t s 
 
 + -   s a v e d   r u n t i m e   c o n f i g 
 
 + -   d i s c o v e r e d   m o d e l   f i l e s   f r o m   ` . / m o d e l s ` 
 
 + -   a l i a s   c l a s s i f i c a t i o n   ( ` C o o p e r ` / ` I r o n ` / ` S t e e l ` ) 
 
 + 
 
 + # # # #   O u t p u t s 
 
 + -   r e s o l v e d   m o d e l   p a t h 
 
 + -   r e s o l v e d   d i s p l a y   a l i a s 
 
 + -   r e a s o n   ( ` s a v e d _ p r e f e r e n c e ` ,   ` d e f a u l t _ i r o n ` ,   ` f a l l b a c k _ c o o p e r ` ,   ` m i s s i n g _ s a v e d _ m o d e l ` ) 
 
 + 
 
 + # # #   C .   F r o n t e n d :   E f f e c t i v e   M o d e l   C o n t r o l l e r 
 
 + C r e a t e   a   d e d i c a t e d   c l i e n t - s i d e   s t a t e   l a y e r   a b o v e   ` u s e M o d e l s ( ) ` . 
 
 + 
 
 + # # # #   R e s p o n s i b i l i t i e s 
 
 + -   m a i n t a i n   ` p r e f e r r e d M o d e l ` ,   ` e f f e c t i v e M o d e l ` ,   ` m a n u a l O v e r r i d e ` ,   ` d e g r a d a t i o n D i s m i s s e d ` 
 
 + -   m a p   b a c k e n d   m o d e l   I D s / p a t h s   t o   d i s p l a y   a l i a s e s 
 
 + -   h a n d l e   u s e r - t r i g g e r e d   m o d e l   s w i t c h e s 
 
 + -   i g n o r e   r e f r e s h   n o i s e   f r o m   ` / v 1 / m o d e l s `   o n c e   a n   o v e r r i d e   i s   a c t i v e   f o r   t h e   s e s s i o n 
 
 + 
 
 + # # # #   L i k e l y   p l a c e m e n t 
 
 + -   n e w   h o o k   n e a r   ` t a u r i - a p p / s r c / h o o k s / `   o r   ` s r c / f e a t u r e s / r u n t i m e / ` 
 
 + -   w i r e d   i n   ` t a u r i - a p p / s r c / A p p . t s x ` 
 
 + 
 
 + # # #   D .   F r o n t e n d :   T o a s t   S y s t e m 
 
 + N o   s h a r e d   t o a s t   s y s t e m   e x i s t s   t o d a y . 
 
 + 
 
 + A d d : 
 
 + -   g l o b a l   t o a s t   p r o v i d e r   n e a r   ` A p p . t s x ` 
 
 + -   b o t t o m - r i g h t   s t a c k 
 
 + -   ` r o l e = " s t a t u s " ` ,   ` a r i a - l i v e = " p o l i t e " ` 
 
 + -   d e d u p e   b y   e v e n t   k e y   ( ` l o w - t p s - f a l l b a c k : < r e q u e s t _ i d > : < m o d e l > ` ) 
 
 + 
 
 + T o a s t   c o n t e n t : 
 
 + >   O   m o d e l o   a t u a l   e s t %   l e n t o   n e s t e   d i s p o s i t i v o .   D e s e j a   t r o c a r   p a r a   C o o p e r   p a r a   m e l h o r   v e l o c i d a d e ? 
 
 + 
 
 + A c t i o n s : 
 
 + -   p r i m a r y :   s w a p   t o   ` C o o p e r ` 
 
 + -   s e c o n d a r y :   k e e p   c u r r e n t   m o d e l 
 
 + 
 
 + # # #   E .   F r o n t e n d :   C h a t   S e l e c t o r 
 
 + M o v e   p r i m a r y   u s e r   m o d e l   c h o i c e   f r o m   s i d e b a r - o n l y   b e h a v i o r   t o   a n   i n - c h a t   c o n t r o l . 
 
 + 
 
 + # # # #   U X   r u l e s 
 
 + -   v i s i b l e   b u t   s u b t l e 
 
 + -   a v a i l a b l e   o n   i n i t i a l   s c r e e n   a n d   a c t i v e   c h a t   s c r e e n 
 
 + -   o n l y   s h o w s   ` I r o n `   a n d   ` C o o p e r ` 
 
 + -   ` S t e e l `   r e m a i n s   i n   s e t t i n g s / r u n t i m e   m a n a g e m e n t 
 
 + -   w h i l e   s w a p p i n g ,   d i s a b l e   c o n t r o l   a n d   s h o w   c o m p a c t   b u s y   s t a t e 
 
 + 
 
 + # # #   F .   U I   D e n s i t y   U p d a t e s 
 
 + 
 
 + # # # #   H o m e 
 
 + -   r e d u c e   v e r t i c a l   w h i t e s p a c e   b e t w e e n   h e r o ,   c h i p s ,   a n d   l o w e r   c a r d 
 
 + -   i m p r o v e   r e c e n t   w o r k   d e n s i t y   i n   s i d e b a r / t a s k   l i s t 
 
 + -   k e e p   o n e   m u t e d   l o w e r   c a r d   i n s t e a d   o f   m u l t i p l e   c o m p e t i n g   b l o c k s 
 
 + 
 
 + # # # #   C h a t 
 
 + -   d e n s e r   m e s s a g e   h e a d e r / m e t a 
 
 + -   k e e p   T P S / s t a t u s   i n f o   c o m p a c t   a n d   c o n t e x t u a l 
 
 + -   d o   n o t   o v e r l o a d   f i r s t   p a i n t   w i t h   d e b u g   c o n t r o l s 
 
 + 
 
 + # #   D a t a   a n d   S t a t e   M o d e l 
 
 + 
 
 + # # #   B a c k e n d   p e r s i s t e d   c o n f i g 
 
 + E x t e n d   r u n t i m e   c o n f i g   w i t h   e x p l i c i t   p r e f e r e n c e   f i e l d s : 
 
 + -   ` p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s :   O p t i o n < S t r i n g > `   ( ` i r o n ` ,   ` c o o p e r ` ,   ` s t e e l ` ) 
 
 + -   k e e p   e x i s t i n g   ` m o d e l _ p a t h `   f o r   a c t u a l   r u n t i m e   l a u n c h   t a r g e t 
 
 + 
 
 + # # #   F r o n t e n d   s e s s i o n   s t a t e 
 
 + -   ` p r e f e r r e d M o d e l A l i a s ` 
 
 + -   ` e f f e c t i v e M o d e l A l i a s ` 
 
 + -   ` e f f e c t i v e M o d e l P a t h ` 
 
 + -   ` o v e r r i d e S o u r c e :   " a u t o "   |   " m a n u a l "   |   " f a l l b a c k " ` 
 
 + -   ` d e g r a d a t i o n P r o m p t S t a t e :   " i d l e "   |   " s h o w n "   |   " a c c e p t e d "   |   " d i s m i s s e d " ` 
 
 + 
 
 + # #   M a i n   U s e r   F l o w s 
 
 + 
 
 + # # #   F l o w   1 :   A p p   s t a r t u p 
 
 + 1 .   a p p   b o o t s t r a p s   r u n t i m e   c o n f i g 
 
 + 2 .   r u n t i m e   s c a n s   a v a i l a b l e   l o c a l   m o d e l s 
 
 + 3 .   s t a r t u p   r e s o l v e r   s e l e c t s   ` I r o n `   i f   a v a i l a b l e ,   e l s e   ` C o o p e r ` 
 
 + 4 .   r u n t i m e   s t a r t s   w i t h   r e s o l v e d   m o d e l 
 
 + 5 .   f r o n t e n d   s h o w s   r e s o l v e d   e f f e c t i v e   m o d e l   a l i a s 
 
 + 
 
 + # # #   F l o w   2 :   S u s t a i n e d   l o w   T P S   w h i l e   u s i n g   I r o n 
 
 + 1 .   u s e r   s t a r t s   g e n e r a t i o n   o n   ` I r o n ` 
 
 + 2 .   R u s t   r o l l i n g   m o n i t o r   o b s e r v e s   T P S   ` <   3 0 `   f o r   5   c o n s e c u t i v e   s e c o n d s 
 
 + 3 .   b a c k e n d   e m i t s   d e g r a d a t i o n   e v e n t 
 
 + 4 .   f r o n t e n d   d i s p l a y s   o n e   t o a s t 
 
 + 5 .   u s e r   c h o o s e s : 
 
 +       -   ` T r o c a r   p a r a   C o o p e r `   = >   p e r f o r m   h o t   s w a p ,   u p d a t e   e f f e c t i v e   m o d e l ,   p e r s i s t   s e s s i o n   o v e r r i d e 
 
 +       -   ` M a n t e r   I r o n `   = >   s u p p r e s s   r e p e a t e d   p r o m p t   f o r   t h e   c u r r e n t   r e q u e s t / s e s s i o n   c o o l d o w n 
 
 + 
 
 + # # #   F l o w   3 :   M a n u a l   c h a t   o v e r r i d e 
 
 + 1 .   u s e r   o p e n s   s e l e c t o r   i n   c h a t 
 
 + 2 .   c h o o s e s   ` C o o p e r `   o r   ` I r o n ` 
 
 + 3 .   f r o n t e n d   c a l l s   s w a p   c o m m a n d 
 
 + 4 .   r u n t i m e   r e s t a r t s   w i t h   t a r g e t   m o d e l 
 
 + 5 .   e f f e c t i v e   m o d e l   u p d a t e s   i m m e d i a t e l y   a f t e r   s u c c e s s 
 
 + 
 
 + # # #   F l o w   4 :   S t e e l   i n   s e t t i n g s 
 
 + 1 .   u s e r   o p e n s   s e t t i n g s / r u n t i m e   a r e a 
 
 + 2 .   s e e s   f u l l   m o d e l   i n v e n t o r y   i n c l u d i n g   ` S t e e l ` 
 
 + 3 .   m a y   s t i l l   u s e / i m p o r t / m a n a g e   ` S t e e l ` 
 
 + 4 .   S t e e l   i s   n o t   s h o w n   i n   c h a t   s e l e c t o r   i n   t h i s   p h a s e 
 
 + 
 
 + # #   E r r o r   H a n d l i n g 
 
 + -   i f   s w a p   f a i l s ,   k e e p   p r i o r   e f f e c t i v e   m o d e l   v i s i b l e 
 
 + -   i f   d e g r a d a t i o n   e v e n t   a r r i v e s   d u r i n g   a n   i n - p r o g r e s s   s w a p ,   d i s c a r d   i t 
 
 + -   i f   ` I r o n `   d i s a p p e a r s   f r o m   l i b r a r y ,   a u t o - f a l l b a c k   t o   ` C o o p e r ` 
 
 + -   i f   n e i t h e r   ` I r o n `   n o r   ` C o o p e r `   e x i s t s ,   s h o w   r u n t i m e   u n a v a i l a b l e   s t a t e   a n d   k e e p   s e t t i n g s   p a t h   a c c e s s i b l e 
 
 + -   i f   t o a s t   a l r e a d y   s h o w n   f o r   t h e   s a m e   r e q u e s t ,   d o   n o t   s p a w n   d u p l i c a t e s 
 
 + 
 
 + # #   I m p l e m e n t a t i o n   T o u c h p o i n t s 
 
 + 
 
 + # # #   R u s t 
 
 + -   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s ` 
 
 + -   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / r o u t e s . r s ` 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s ` 
 
 + -   p o t e n t i a l l y   ` t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s `   f o r   n e w   c o m m a n d s / e v e n t s 
 
 + 
 
 + # # #   F r o n t e n d 
 
 + -   ` t a u r i - a p p / s r c / A p p . t s x ` 
 
 + -   ` t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s ` 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x ` 
 
 + -   ` t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x ` 
 
 + -   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - s e t t i n g s - f o r m . t s ` 
 
 + -   n e w   t o a s t / p r o v i d e r   f i l e s 
 
 + -   n e w   m o d e l   a l i a s   r e s o l v e r / s h a r e d   h o o k   f i l e s 
 
 + 
 
 + # #   T D D   T e s t   M a t r i x 
 
 + 
 
 + # # #   R u s t   u n i t   t e s t s 
 
 + 1 .   s t a r t u p   r e s o l v e r   p i c k s   ` I r o n `   w h e n   ` I r o n `   +   ` C o o p e r `   a r e   a v a i l a b l e 
 
 + 2 .   s t a r t u p   r e s o l v e r   p i c k s   ` C o o p e r `   w h e n   ` I r o n `   i s   m i s s i n g 
 
 + 3 .   s t a r t u p   r e s o l v e r   r e s p e c t s   e x p l i c i t   s a v e d   p r e f e r e n c e   w h e n   a v a i l a b l e 
 
 + 4 .   r o l l i n g   T P S   m o n i t o r   e n t e r s   d e g r a d e d   s t a t e   o n l y   a f t e r   5 s   s u s t a i n e d   ` <   3 0 ` 
 
 + 5 .   t r a n s i e n t   d i p   b e l o w   3 0   f o r   l e s s   t h a n   t h r e s h o l d   d o e s   n o t   t r i g g e r 
 
 + 6 .   d e g r a d e d   s t a t e   i s   e m i t t e d   o n c e   p e r   r e q u e s t   t r a n s i t i o n 
 
 + 
 
 + # # #   R u s t   i n t e g r a t i o n   t e s t s 
 
 + 1 .   S S E / f i n a l   u s a g e   s t i l l   i n c l u d e s   f i n a l   T P S   a f t e r   m o n i t o r   c h a n g e s 
 
 + 2 .   d e g r a d a t i o n   e v e n t   p a y l o a d   c o n t a i n s   m o d e l   a l i a s / p a t h / r e q u e s t   i d 
 
 + 3 .   s w a p   c o m m a n d   u p d a t e s   e f f e c t i v e   r u n t i m e   t a r g e t   c o r r e c t l y 
 
 + 
 
 + # # #   F r o n t e n d   u n i t   t e s t s 
 
 + 1 .   a l i a s   r e s o l v e r   m a p s   m o d e l   f i l e   n a m e s   t o   ` C o o p e r ` ,   ` I r o n ` ,   ` S t e e l ` 
 
 + 2 .   c h a t   s e l e c t o r   o n l y   e x p o s e s   ` C o o p e r `   a n d   ` I r o n ` 
 
 + 3 .   m a n u a l   o v e r r i d e   s u r v i v e s   m o d e l   l i s t   r e f r e s h   i n   s e s s i o n 
 
 + 4 .   f a l l b a c k   t o a s t   d e d u p e s   r e p e a t e d   d e g r a d a t i o n   e v e n t s 
 
 + 5 .   c l i c k i n g   ` T r o c a r   p a r a   C o o p e r `   t r i g g e r s   s w a p   a n d   u p d a t e s   e f f e c t i v e   m o d e l 
 
 + 6 .   c l i c k i n g   ` M a n t e r   I r o n `   s u p p r e s s e s   r e p e a t e d   p r o m p t   d u r i n g   c o o l d o w n 
 
 + 
 
 + # # #   F r o n t e n d   c o m p o n e n t   t e s t s 
 
 + 1 .   c h a t   h e a d e r / c o m p o s e r   s h o w s   c u r r e n t   e f f e c t i v e   m o d e l   a l i a s 
 
 + 2 .   i n i t i a l   s c r e e n   r e m a i n s   d e n s e   a n d   u s a b l e   w i t h   t o a s t   v i s i b l e 
 
 + 3 .   s e l e c t o r   d i s a b l e d   w h i l e   s w a p   i s   i n   p r o g r e s s 
 
 + 4 .   r u n t i m e   u n a v a i l a b l e   s t a t e   k e e p s   s e t t i n g s   a c c e s s   r e a c h a b l e 
 
 + 
 
 + # #   A c c e p t a n c e   C r i t e r i a 
 
 + 1 .   U s e r   c a n   s t a r t   t h e   a p p   w i t h o u t   m a n u a l l y   c h o o s i n g   a   m o d e l . 
 
 + 2 .   A p p   d e f a u l t s   t o   ` I r o n `   w h e n   a v a i l a b l e . 
 
 + 3 .   I f   g e n e r a t i o n   T P S   s t a y s   b e l o w   3 0   f o r   5 s   o n   ` I r o n ` ,   a   n o n - b l o c k i n g   t o a s t   i s   s h o w n . 
 
 + 4 .   U s e r   c a n   s w i t c h   t o   ` C o o p e r `   d i r e c t l y   f r o m   t h e   t o a s t . 
 
 + 5 .   U s e r   c a n   m a n u a l l y   c h o o s e   b e t w e e n   ` I r o n `   a n d   ` C o o p e r `   f r o m   c h a t . 
 
 + 6 .   M a n u a l   o v e r r i d e   p e r s i s t s   d u r i n g   t h e   s e s s i o n . 
 
 + 7 .   ` S t e e l `   i s   v i s i b l e   o n l y   i n   s e t t i n g s / i n t e r n a l   r u n t i m e   m a n a g e m e n t . 
 
 + 8 .   F i n a l   U I   i s   d e n s e r   a n d   c l e a n e r   t h a n   c u r r e n t   s t a t e . 
 
 + 9 .   N e w   b e h a v i o r   i s   c o v e r e d   b y   R u s t   +   f r o n t e n d   t e s t s   b e f o r e   i m p l e m e n t a t i o n   c o d e   l a n d s . 
 
 + 
 
 + # #   R i s k s 
 
 + -   c u r r e n t   f r o n t e n d   s t y l i n g   i s   s t i l l   C S S - h e a v y ;   p a r t i a l   T a i l w i n d   m i g r a t i o n   m a y   c r e a t e   m i x e d   o w n e r s h i p   t e m p o r a r i l y 
 
 + -   r u n t i m e   r e s t a r t   l a t e n c y   m a y   m a k e      i n s t a n t      s w i t c h i n g   f e e l   s l o w e r   o n   w e a k e r   m a c h i n e s 
 
 + -   m o d e l   f i l e n a m e   n o r m a l i z a t i o n   m a y   b e   i n c o n s i s t e n t   u n l e s s   a l i a s   m a p p i n g   i s   c e n t r a l i z e d 
 
 + -   e v e n t   d e l i v e r y   f r o m   R u s t   t o   f r o n t e n d   m u s t   a v o i d   d u p l i c a t e   o r   s t a l e   d e g r a d a t i o n   p r o m p t s 
 
 + 
 
 + # #   R e c o m m e n d e d   D e l i v e r y   P h a s e s 
 
 + 1 .   a l i a s   r e s o l u t i o n   +   s t a r t u p   p o l i c y 
 
 + 2 .   R u s t   T P S   d e g r a d a t i o n   m o n i t o r   +   e v e n t   c o n t r a c t 
 
 + 3 .   f r o n t e n d   t o a s t   s y s t e m   +   s e s s i o n   m o d e l   c o n t r o l l e r 
 
 + 4 .   c h a t   s e l e c t o r   +   s i d e b a r / s e t t i n g s   c l e a n u p 
 
 + 5 .   d e n s i t y   p a s s   o n   h o m e / c h a t   U I 
 
 + 6 .   r e g r e s s i o n   v e r i f i c a t i o n 
 
 + 
 
 + # #   O p e n   A s s u m p t i o n s 
 
 + -   e x i s t i n g   h o t - s w a p   r e s t a r t   p a t h   i s   a c c e p t a b l e   f o r      i n s t a n t % n e a      w i t h i n   p r o d u c t   e x p e c t a t i o n s 
 
 + -   s t a r t u p   a u t o - s e l e c t i o n   s h o u l d   p r e f e r   ` I r o n `   o v e r   ` S t e e l `   e v e n   i f   ` S t e e l `   e x i s t s 
 
 + -   ` S t e e l `   r e m a i n s   e x c l u d e d   f r o m   p r i m a r y   c h a t   s e l e c t o r   u n t i l   a   f u t u r e   p h a s e   e x p a n d s   t h e   U X 
 
 d i f f   - - g i t   a / e x p e r i m e n t s / a u t o r e s e a r c h . m d   b / e x p e r i m e n t s / a u t o r e s e a r c h . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 5 a 6 5 2 8 2 
 
 - - -   / d e v / n u l l 
 
 + + +   b / e x p e r i m e n t s / a u t o r e s e a r c h . m d 
 
 @ @   - 0 , 0   + 1 , 5 2   @ @ 
 
 + #   A u t o r e s e a r c h :   F i x   F o r g e A g e n t   I n f e r e n c e   E r r o r 
 
 + 
 
 + # #   O b j e c t i v e 
 
 + C o r r i g i r   o   e r r o   " D e s c u l p e ,   o   s e r v i d o r   d e   i n f e r % n c i a   n % o   e s t %   d i s p o n % v e l .   V e r i f i q u e   s e   o   m o d e l o   e s t %   c a r r e g a d o . "   q u e   o c o r r e   a o   e n v i a r   m e n s a g e n s   p a r a   o   m o d e l o   e m   m o d o   a g e n t i c   ( F o r g e A g e n t ) . 
 
 + 
 
 + # #   R o o t   C a u s e 
 
 + O   c %%d i g o   e m   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   n % o   v e r i f i c a   o   e s t a d o   d o   r u n t i m e   a n t e s   d e   f a z e r   a   c h a m a d a   H T T P .   A   f u n % % o   a p e n a s   o b t % m   a   U R L   e   d i s p a r a   a   r e q u i s i % % o ,   s e m   v a l i d a r : 
 
 + -   S e   o   p r o c e s s o   e s t %   r o d a n d o   ( ` p r o c e s s _ r u n n i n g ` ) 
 
 + -   S e   o   r u n t i m e   e s t %   p r o n t o   ( ` r e a d y ` ) 
 
 + -   S e   o   s t a t u s   %   s a u d % v e l   ( ` s t a t u s   = =   " r e a d y " ` ) 
 
 + 
 
 + # #   M e t r i c s 
 
 + -   * * P r i m a r y * * :   P r e c i s % o   d o   e r r o   ( d e s c r i t i v o   v s   g e n % r i c o ) 
 
 + -   * * S e c o n d a r y * * :   T e m p o   d e   r e s p o s t a   p a r a   e r r o   ( s e g u n d o s ,   m e n o r   %   m e l h o r ) 
 
 + 
 
 + # #   H o w   t o   R u n 
 
 + 1 .   ` n p m   r u n   t a u r i   d e v `   n a   t a u r i - a p p 
 
 + 2 .   E n v i a r   m e n s a g e m   v i a   F o r g e A g e n t 
 
 + 3 .   O b s e r v a r   s e   e r r o   %   d e s c r i t i v o 
 
 + 
 
 + # #   F i l e s   i n   S c o p e 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s `   -   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   ( l i n h a s   5 1 6 - 6 2 3 ) 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s `   -   ` g e t _ r u n t i m e _ s n a p s h o t ` 
 
 + -   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s `   -   ` R u n t i m e S n a p s h o t ` 
 
 + 
 
 + # #   O f f   L i m i t s 
 
 + -   E s t r u t u r a   d o   ` R u n t i m e S n a p s h o t ` 
 
 + -   S i s t e m a   d e   e v e n t o s   T a u r i 
 
 + -   F l u x o   m u l t i - a g e n t e s   ( s p e c i a l i s t s ) 
 
 + 
 
 + # #   C o n s t r a i n t s 
 
 + -   M a n t e r   c o m p a t i b i l i d a d e   c o m   m o d o   r e m o t o 
 
 + -   N % o   a d i c i o n a r   d e p e n d % n c i a s   R u s t 
 
 + -   T e m p o   d e   r e s p o s t a   <   2 s   p a r a   e r r o s   d e   v a l i d a % % o 
 
 + 
 
 + # #   W h a t ' s   B e e n   T r i e d 
 
 + 
 
 + # # #   R u n   1 :   A d d   r u n t i m e   s t a t e   v a l i d a t i o n   ( K E P T ) 
 
 + -   * * C o m m i t * * :   7 7 c 5 7 c 3 
 
 + -   * * R e s u l t * * :   v a l i d a t i o n _ s c o r e = 1 0 0   ( b a s e l i n e :   0 ) 
 
 + -   * * W h a t   c h a n g e d * * :   A d d e d   v a l i d a t i o n   o f   ` p r o c e s s _ r u n n i n g `   a n d   ` r e a d y `   s t a t e   i n   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   b e f o r e   s p a w n i n g   b a c k g r o u n d   t a s k .   E m i t s   d e s c r i p t i v e   e r r o r   m e s s a g e s   f o r   e a c h   f a i l u r e   s c e n a r i o . 
 
 + -   * * I n s i g h t * * :   V a l i d a % % o   p r % - H T T P   %   s u f i c i e n t e   p a r a   c a p t u r a r   t o d o s   o s   c e n % r i o s   d e   e r r o .   H e a l t h   c h e c k   a d i c i o n a l   n % o   %   n e c e s s % r i o   n e s t e   m o m e n t o . 
 
 + 
 
 + # #   F i x   S t r a t e g y   ( I M P L E M E N T E D ) 
 
 + A d i c i o n a r   v a l i d a % % o   d e   e s t a d o   d o   r u n t i m e   a n t e s   d a   c h a m a d a   H T T P : 
 
 + 1 .        O b t e r   s n a p s h o t   c o m p l e t o   d o   r u n t i m e 
 
 + 2 .        S e   ` c o n n e c t i o n _ m o d e   = =   " l o c a l " ` : 
 
 +       -        V e r i f i c a r   ` p r o c e s s _ r u n n i n g   = =   t r u e ` 
 
 +       -        V e r i f i c a r   ` r e a d y   = =   t r u e ` 
 
 +       -        V e r i f i c a r   ` s t a t u s `   a t u a l 
 
 + 3 .        E m i t i r   e r r o   d e s c r i t i v o   s e   a l g u m a   v a l i d a % % o   f a l h a r 
 
 + 4 .        M o d o   r e m o t o   b y p a s s a   v a l i d a % % e s   l o c a i s 
 
 d i f f   - - g i t   a / e x p e r i m e n t s / w o r k l o g . m d   b / e x p e r i m e n t s / w o r k l o g . m d 
 
 i n d e x   c 4 4 1 8 2 8 . . 0 0 7 3 1 c c   1 0 0 6 4 4 
 
 - - -   a / e x p e r i m e n t s / w o r k l o g . m d 
 
 + + +   b / e x p e r i m e n t s / w o r k l o g . m d 
 
 @ @   - 1 , 4 6 4   + 1 , 5 5   @ @ 
 
 - #   A u t o r e s e a r c h   W o r k l o g :   l a t e n c y - p 9 5 - c h a t - c o m p l e t i o n s 
 
 + #   W o r k l o g   -   F o r g e A g e n t   I n f e r e n c e   E r r o r   F i x 
 
   
 
 - # #   S e s s i o n   S u m m a r y 
 
 - -   O b j e c t i v e :   r e d u c e   e n d - t o - e n d   p 9 5   l a t e n c y   f o r   l o c a l   ` P O S T   / v 1 / c h a t / c o m p l e t i o n s ` 
 
 - -   P r i m a r y   m e t r i c :   ` p 9 5 _ m s `   ( l o w e r   i s   b e t t e r ) 
 
 - -   S e c o n d a r y   m e t r i c s :   ` p 5 0 _ m s ` ,   ` m e a n _ m s ` ,   ` c o m p l e t i o n _ t p s _ m e a n ` ,   ` s u c c e s s _ c o u n t ` 
 
 - -   B e n c h m a r k   h a r n e s s :   ` . / a u t o r e s e a r c h . s h ` 
 
 + # #   S e s s i o n   H e a d e r 
 
 + -   * * G o a l * * :   C o r r i g i r   e r r o   d e   i n f e r % n c i a   n o   F o r g e A g e n t 
 
 + -   * * S t a r t e d * * :   2 0 2 6 - 0 4 - 0 2 
 
 + -   * * B r a n c h * * :   a u t o r e s e a r c h / f i x - f o r g e a g e n t - i n f e r e n c e - e r r o r - 2 0 2 6 - 0 4 - 0 2 
 
   
 
 - # #   K e y   I n s i g h t s 
 
 - -   T h e   f i r s t   s t a b l e   e n d - t o - e n d   b e n c h m a r k   i s   a r o u n d   0 . 9 4   s   p 9 5   f o r   a   s h o r t   n o n - s t r e a m i n g   c o d i n g   r e q u e s t   o n   t h e   l o c a l   4 B   G G U F   m o d e l . 
 
 - -   T h e   b e n c h m a r k   h a r n e s s   m u s t   u s e   t h e   c a n o n i c a l   m o d e l   i d   d e r i v e d   f r o m   t h e   G G U F   f i l e n a m e ;   t h e   c u r r e n t   s e r v e r   b u i l d   d o e s   n o t   a c t u a l l y   h o n o r   t h e   i n t e n d e d   ` l o c a l - m o d e l `   a l i a s   p a t h   y e t . 
 
 - -   P r o m p t   p r e f i l l   i s   o n l y   a b o u t   2 5   m s   f o r   t h i s   w o r k l o a d ,   s o   a l m o s t   a l l   l a t e n c y   s i t s   i n   t o k e n   g e n e r a t i o n   r a t h e r   t h a n   r e q u e s t   p a r s i n g   o r   p r o m p t   c o n s t r u c t i o n . 
 
 - -   A   m i c r o - o p t i m i z a t i o n   i n   p e r - t o k e n   d e t o k e n i z a t i o n   m a d e   b o t h   l a t e n c y   a n d   t h r o u g h p u t   w o r s e ,   w h i c h   s u g g e s t s   t h e   d o m i n a n t   c o s t   i s   d e e p e r   i n   t h e   g e n e r a t i o n / r u n t i m e   p a t h   r a t h e r   t h a n   h e a p   a l l o c a t i o n   i n   R u s t   g l u e   c o d e . 
 
 - -   S h r i n k i n g   t h e   ` T u r b o 4 B `   c o n t e x t   a n d   b a t c h   s i z e s   a l s o   h u r t   t h r o u g h p u t ,   s o   t h e   c u r r e n t   4 B   p r o f i l e   a p p e a r s   c l o s e r   t o   t h e   l o c a l   o p t i m u m   f o r   t h i s   h a r d w a r e / w o r k l o a d   t h a n   e x p e c t e d . 
 
 - -   D i s a b l i n g   i n t e r n a l   l l a m a . c p p   p e r f   c o u n t e r s   p r o d u c e d   t h e   f i r s t   r e a l   p 9 5   i m p r o v e m e n t   o v e r   b a s e l i n e ,   w h i c h   s u g g e s t s   a   s m a l l   b u t   m e a s u r a b l e   a m o u n t   o f   h o t - p a t h   C P U   o v e r h e a d   w a s   c o m i n g   f r o m   i n s t r u m e n t a t i o n   r a t h e r   t h a n   m o d e l   m a t h . 
 
 - -   B e t t e r   s t o p   b e h a v i o r   i m p r o v e d   a v e r a g e   a n d   m e d i a n   l a t e n c y ,   b u t   i t   s t i l l   f a i l e d   t o   b e a t   b a s e l i n e   p 9 5 ,   s o   t h e   w o r s t   o u t l i e r s   a r e   n o t   e x p l a i n e d   s o l e l y   b y   t u r n - b o u n d a r y   o v e r r u n s . 
 
 - -   S w i t c h i n g   t o   a   Q w e n - s t y l e   c h a t   t e m p l a t e   p r o d u c e d   a   s e v e r e   p 9 5   t a i l   r e g r e s s i o n   w h i l e   m e d i a n   l a t e n c y   s t a y e d   n e a r   b a s e l i n e ,   w h i c h   s t r o n g l y   s u g g e s t s   w o r s e   s t o p   b e h a v i o r   o r   o c c a s i o n a l   r u n a w a y   g e n e r a t i o n s   r a t h e r   t h a n   u n i f o r m l y   s l o w e r   d e c o d i n g . 
 
 - 
 
 - # #   N e x t   I d e a s 
 
 - -   M e a s u r e   b a s e l i n e   f i r s t ,   t h e n   i n s p e c t   t h e   h o t t e s t   l a t e n c y   c o n t r i b u t o r s   i n   p r o m p t   p r e p a r a t i o n ,   r e q u e s t   h a n d l i n g ,   a n d   s e s s i o n   c r e a t i o n . 
 
 - -   I n v e s t i g a t e   w h y   ` M o d e l C a t a l o g `   r e j e c t s   ` l o c a l - m o d e l `   d e s p i t e   i n t e n d i n g   t o   e x p o s e   a l i a s e s . 
 
 - 
 
 - # # #   R u n   1 :   b a s e l i n e   -   p 9 5 _ m s = 9 4 1 . 2 5 2   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 3 2 
 
 - -   W h a t   c h a n g e d :   E s t a b l i s h e d   t h e   a u t o r e s e a r c h   h a r n e s s ,   b u i l t   t h e   r e l e a s e   s e r v e r ,   s t a r t e d   i t   a g a i n s t   t h e   l o c a l   Q w e n   G G U F ,   a n d   m e a s u r e d   a   f i x e d   n o n - s t r e a m i n g   c o d i n g   r e q u e s t   w o r k l o a d . 
 
 - -   R e s u l t :   p 9 5 _ m s = 9 4 1 . 2 5 2 ,   p 5 0 _ m s = 9 0 8 . 4 5 7 ,   m e a n _ m s = 9 1 7 . 1 2 3 ,   c o m p l e t i o n _ t p s _ m e a n = 5 2 . 4 2 7 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   T h e   b a s e l i n e   i s   s t a b l e   e n o u g h   t o   c o m p a r e   f u t u r e   s e r v e r / r u n t i m e   c h a n g e s ,   a n d   t h e   b e n c h m a r k   i m m e d i a t e l y   e x p o s e d   a   c o m p a t i b i l i t y   b u g   i n   a l i a s   r e s o l u t i o n   t h a t   s h o u l d   b e   k e p t   s e p a r a t e   f r o m   t r u e   l a t e n c y   e x p e r i m e n t s . 
 
 - -   N e x t :   f i x   l o w - r i s k   b e n c h m a r k - a d j a c e n t   c o r r e c t n e s s   i s s u e s   o n l y   i f   t h e y   d i s t o r t   m e a s u r e m e n t ;   o t h e r w i s e   i n s p e c t   h o t   l a t e n c y   c o n t r i b u t o r s   i n   t h e   r e q u e s t / s e s s i o n   p a t h . 
 
 - 
 
 - # # #   R u n   2 :   s t a c k   b u f f e r   d e t o k e n i z a t i o n   -   p 9 5 _ m s = 1 0 3 2 . 3 1 5   ( D I S C A R D ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 3 8 
 
 - -   W h a t   c h a n g e d :   R e p l a c e d   t h e   p e r - t o k e n   h e a p   a l l o c a t i o n   i n   ` d e c o d e _ t o k e n _ p i e c e _ w i t h ( ) `   w i t h   a   2 5 6 - b y t e   s t a c k   b u f f e r   a n d   h e a p   f a l l b a c k   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s ` . 
 
 - -   R e s u l t :   p 9 5 _ m s = 1 0 3 2 . 3 1 5 ,   p 5 0 _ m s = 1 0 2 0 . 4 0 2 ,   m e a n _ m s = 1 0 1 1 . 4 6 6 ,   c o m p l e t i o n _ t p s _ m e a n = 4 7 . 6 7 1 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   T h i s   p a t h   i s   n o t   t h e   p r a c t i c a l   b o t t l e n e c k   f o r   e n d - t o - e n d   l a t e n c y   h e r e ;   g e n e r a t i o n   g o t   s l o w e r   o v e r a l l   d e s p i t e   t h e   r e d u c e d   a l l o c a t i o n   c h u r n . 
 
 - -   N e x t :   d i s c a r d   t h i s   b r a n c h   s t a t e   a n d   f o c u s   o n   r u n t i m e / p r o f i l e - l e v e l   e x p e r i m e n t s   t h a t   c a n   i m p r o v e   g e n e r a t i o n   t h r o u g h p u t   d i r e c t l y . 
 
 - 
 
 - # # #   R u n   3 :   s l i m   t u r b o 4 b   r u n t i m e   p r o f i l e   -   p 9 5 _ m s = 1 0 0 4 . 4 3 5   ( D I S C A R D ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 4 0 
 
 - -   W h a t   c h a n g e d :   R e d u c e d   ` T u r b o 4 B `   d e f a u l t s   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / p r o f i l e . r s `   f r o m   ` n _ c t x = 4 0 9 6 ` ,   ` n _ b a t c h = 5 1 2 ` ,   ` n _ u b a t c h = 1 2 8 `   t o   ` n _ c t x = 2 0 4 8 ` ,   ` n _ b a t c h = 2 5 6 ` ,   ` n _ u b a t c h = 6 4 ` . 
 
 - -   R e s u l t :   p 9 5 _ m s = 1 0 0 4 . 4 3 5 ,   p 5 0 _ m s = 9 9 8 . 9 1 9 ,   m e a n _ m s = 9 9 0 . 7 7 1 ,   c o m p l e t i o n _ t p s _ m e a n = 4 8 . 5 2 8 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   T h e   l e a n e r   p r o f i l e   s t i l l   r e d u c e d   e f f e c t i v e   g e n e r a t i o n   s p e e d   o n   t h i s   R T X   3 0 7 0   +   Q 6 _ K   w o r k l o a d ,   s o   t h e   c u r r e n t   b a t c h / c o n t e x t   s i z i n g   i s   l i k e l y   n o t   t h e   s o u r c e   o f   t h e   b a s e l i n e   l a t e n c y . 
 
 - -   N e x t :   r e v e r t   t o   t h e   b e s t - k n o w n   c o m m i t   a n d   t a r g e t   g e n e r a t i o n   s e m a n t i c s   o r   m o d e l - f a c i n g   p r o m p t / t e m p l a t e   s t r a t e g y   r a t h e r   t h a n   d e t o k e n i z a t i o n   o r   p r o f i l e   s h r i n k a g e . 
 
 - 
 
 - # # #   R u n   6 :   d i s a b l e   l l a m a   p e r f   c o u n t e r s   i n   h o t   p a t h   -   p 9 5 _ m s = 9 2 5 . 5 8 7   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 5 7 
 
 - -   W h a t   c h a n g e d :   S e t   ` l l a m a _ c o n t e x t _ p a r a m s . n o _ p e r f   =   t r u e `   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / e n g i n e . r s `   a n d   ` s a m p l e r _ c h a i n _ d e f a u l t _ p a r a m s . n o _ p e r f   =   t r u e `   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s ` . 
 
 - -   R e s u l t :   p 9 5 _ m s = 9 2 5 . 5 8 7 ,   p 5 0 _ m s = 8 9 3 . 9 1 3 ,   m e a n _ m s = 8 9 9 . 8 9 5 ,   c o m p l e t i o n _ t p s _ m e a n = 5 3 . 6 1 8 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   D i s a b l i n g   i n t e r n a l   p e r f   b o o k k e e p i n g   s h a v e d   a b o u t   1 . 7 %   o f f   b a s e l i n e   p 9 5   w i t h   s l i g h t l y   b e t t e r   o v e r a l l   t h r o u g h p u t ,   m a k i n g   t h i s   t h e   f i r s t   e x p e r i m e n t   w o r t h   k e e p i n g . 
 
 - -   N e x t :   c o n t i n u e   f r o m   t h i s   c o m m i t   a n d   l o o k   f o r   a d j a c e n t   h o t - p a t h   f l a g s   o r   r u n t i m e   s e t t i n g s   t h a t   r e d u c e   g e n e r a t i o n   o v e r h e a d   w i t h o u t   c h a n g i n g   m o d e l   b e h a v i o r . 
 
 - 
 
 - # # #   R u n   5 :   d e f a u l t   t u r n - b o u n d a r y   s t o p s   -   p 9 5 _ m s = 9 6 5 . 6 6 3   ( D I S C A R D ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 5 4 
 
 - -   W h a t   c h a n g e d :   A d d e d   r o l l i n g   m u l t i - t o k e n   s t o p   d e t e c t i o n   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s `   a n d   i n j e c t e d   d e f a u l t   t u r n - b o u n d a r y   s t o p   s e q u e n c e s   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   w h e n   t h e   r e q u e s t   d i d   n o t   s p e c i f y   ` s t o p ` . 
 
 - -   R e s u l t :   p 9 5 _ m s = 9 6 5 . 6 6 3 ,   p 5 0 _ m s = 8 7 7 . 0 3 0 ,   m e a n _ m s = 8 9 7 . 2 5 1 ,   c o m p l e t i o n _ t p s _ m e a n = 5 3 . 6 8 6 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   T h i s   r e d u c e d   m e d i a n   a n d   m e a n   l a t e n c y   a n d   s l i g h t l y   i m p r o v e d   t h r o u g h p u t ,   b u t   t h e   p 9 5   s t i l l   s t a y e d   a b o v e   b a s e l i n e ,   s o   t a i l   l a t e n c y   l i k e l y   c o m e s   f r o m   a   s m a l l e r   n u m b e r   o f   d e e p e r   g e n e r a t i o n   s t a l l s   r a t h e r   t h a n   j u s t   m i s s e d   s t o p   b o u n d a r i e s . 
 
 - -   N e x t :   i n s p e c t   p e r - s a m p l e   l a t e n c y   s p r e a d   a n d   t a r g e t   t h e   r e m a i n i n g   l o n g - t a i l   o u t l i e r s   d i r e c t l y ,   l i k e l y   i n   w a r m u p / f i r s t - r e q u e s t   b e h a v i o r   o r   o c c a s i o n a l   d e c o d e   s t a l l s . 
 
 - 
 
 - # # #   R u n   4 :   q w e n - s t y l e   c h a t   t e m p l a t e   -   p 9 5 _ m s = 3 0 2 7 . 1 4 5   ( D I S C A R D ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 7 : 5 0 
 
 - -   W h a t   c h a n g e d :   R e p l a c e d   t h e   p l a i n   ` S y s t e m / U s e r / A s s i s t a n t : `   p r o m p t   f o r m a t   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   w i t h   a   Q w e n - s t y l e   ` < | i m _ s t a r t | > . . . < | i m _ e n d | > `   c h a t   t e m p l a t e . 
 
 - -   R e s u l t :   p 9 5 _ m s = 3 0 2 7 . 1 4 5 ,   p 5 0 _ m s = 9 7 4 . 9 3 7 ,   m e a n _ m s = 1 4 6 7 . 0 2 6 ,   c o m p l e t i o n _ t p s _ m e a n = 4 1 . 3 6 0 ,   s u c c e s s _ c o u n t = 7 . 
 
 - -   I n s i g h t :   T h e   t e m p l a t e   d i d   n o t   m a k e   t y p i c a l   r e q u e s t s   m u c h   f a s t e r   a n d   i n t r o d u c e d   s e v e r e   t a i l   l a t e n c y ,   l i k e l y   b e c a u s e   s o m e   g e n e r a t i o n s   s t o p p e d   m u c h   l a t e r   o r   f o l l o w e d   a   w o r s e   d e c o d i n g   p a t h   f o r   t h i s   s e r v e r / m o d e l   c o m b i n a t i o n . 
 
 - -   N e x t :   r e v e r t   t h i s   t e m p l a t e   c h a n g e   a n d   f o c u s   o n   e x p e r i m e n t s   t h a t   d i r e c t l y   b o u n d   g e n e r a t i o n   l e n g t h   o r   i m p r o v e   s t o p   b e h a v i o r   w i t h o u t   o v e r h a u l i n g   t h e   p r o m p t   f o r m a t . 
 
 - 
 
 - # #   S e g m e n t   1 :   D y n a m i c   C h a t   T e m p l a t e s 
 
 - -   N e w   o b j e c t i v e :   a d d   d y n a m i c   p r o m p t   t e m p l a t e s   b y   m o d e l   f a m i l y   w i t h   b u i l t - i n   c o v e r a g e   f o r   Q w e n ,   G e m m a ,   L l a m a ,   K i m i ,   a n d   a   g e n e r i c   f a l l b a c k . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   n o w   r u n s   i g n o r e d   t e m p l a t e - s p e c i f i c   t e s t s   a n d   r e p o r t s   ` t e m p l a t e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   f o r   t h i s   s e g m e n t   i s   t e s t - d r i v e n :   h i g h e r   ` t e m p l a t e _ s c o r e `   w i n s ,   w h i l e   t h e   r e g u l a r   n o n - i g n o r e d   t e s t   s u i t e   m u s t   r e m a i n   g r e e n . 
 
 - -   A   m i n i m a l   f a m i l y   d e t e c t o r   p l u s   e m b e d d e d   t e m p l a t e   r e g i s t r y   i n   ` c o m p a t . r s `   w a s   e n o u g h   t o   m o v e   c o v e r a g e   f r o m   1 / 5   t o   5 / 5   w i t h o u t   t o u c h i n g   t h e   r u n t i m e . 
 
 - 
 
 - # # #   R u n   7 :   b a s e l i n e   -   t e m p l a t e _ s c o r e = 2 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 1 4 
 
 - -   W h a t   c h a n g e d :   R e - i n i t i a l i z e d   a u t o r e s e a r c h   t o   a   n e w   s e g m e n t   f o c u s e d   o n   d y n a m i c   c h a t   t e m p l a t e s ,   a d d e d   a   d e d i c a t e d   i g n o r e d   t e s t   s u i t e   f o r   Q w e n ,   G e m m a ,   L l a m a ,   K i m i ,   a n d   g e n e r i c   f a l l b a c k   b e h a v i o r ,   a n d   s w i t c h e d   t h e   b e n c h m a r k   h a r n e s s   t o   s c o r e   t h a t   s u i t e . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 2 0 . 0 ,   p a s s e d _ c a s e s = 1 ,   f a i l e d _ c a s e s = 4 ,   t o t a l _ c a s e s = 5 . 
 
 - -   I n s i g h t :   O n l y   t h e   g e n e r i c   f a l l b a c k   w o r k s   t o d a y ;   a l l   n a m e d   f a m i l y - t e m p l a t e   e x p e c t a t i o n s   f a i l   b e c a u s e   p r o m p t   r e n d e r i n g   i s   s t i l l   g e n e r i c   a n d   m o d e l - a g n o s t i c . 
 
 - -   N e x t :   a d d   a   m i n i m a l   m o d e l - f a m i l y   d e t e c t o r   a n d   t e m p l a t e   r e g i s t r y   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s ` ,   t h e n   r o u t e   ` p r e p a r e _ p r o m p t ( ) `   t h r o u g h   i t . 
 
 - 
 
 - # # #   R u n   8 :   a d d   f a m i l y - b a s e d   c h a t   t e m p l a t e s   -   t e m p l a t e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 1 6 
 
 - -   W h a t   c h a n g e d :   A d d e d   m o d e l - f a m i l y   d e t e c t i o n   a n d   t e m p l a t e - a w a r e   p r o m p t   r e n d e r i n g   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   f o r   Q w e n ,   G e m m a ,   L l a m a ,   K i m i ,   a n d   g e n e r i c   f a l l b a c k ,   t h e n   r o u t e d   s y s t e m / t o o l / J S O N - m o d e   i n s t r u c t i o n s   a n d   a s s i s t a n t   p r e f i x e s   t h r o u g h   t h e   s e l e c t e d   t e m p l a t e . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 5 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 5 . 
 
 - -   I n s i g h t :   T h e   c u r r e n t   s e a m   i n   ` p r e p a r e _ p r o m p t ( ) `   i s   s u f f i c i e n t   f o r   b r o a d   f a m i l y - b a s e d   t e m p l a t e   s u p p o r t ;   n o   r u n t i m e   o r   r o u t i n g   c h a n g e s   w e r e   n e e d e d   f o r   t h e   f i r s t   s u c c e s s f u l   i m p l e m e n t a t i o n . 
 
 - -   N e x t :   h a r d e n   t h e   d e s i g n   b y   a d d i n g   a l i a s - d r i v e n   f a m i l y   d e t e c t i o n ,   s a f e r   f a l l b a c k   b e h a v i o r   f o r   m i x e d - c a s e / v a r i a n t   m o d e l   n a m e s ,   a n d   m o r e   c o v e r a g e   f o r   t o o l - c a l l   a n d   r e s p o n s e - f o r m a t   r e n d e r i n g   u n d e r   n o n - g e n e r i c   t e m p l a t e s . 
 
 - 
 
 - # #   S e g m e n t   2 :   D y n a m i c   C h a t   T e m p l a t e   H a r d e n i n g 
 
 - -   N e w   o b j e c t i v e :   k e e p   f a m i l y - b a s e d   t e m p l a t e   s e l e c t i o n ,   b u t   h a r d e n   s t r u c t u r e - s e n s i t i v e   f o r m a t t i n g   f o r   i n s t r u c t - s t y l e   m o d e l s ,   s t a r t i n g   w i t h   L l a m a . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   t h e   i g n o r e d   t e m p l a t e   s u i t e ,   n o w   w i t h   s t r i c t e r   L l a m a   a s s e r t i o n s . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` t e m p l a t e _ s c o r e `   w i n s   w h i l e   t h e   r e g u l a r   n o n - i g n o r e d   s u i t e   s t a y s   g r e e n . 
 
 - 
 
 - # # #   R u n   9 :   b a s e l i n e   -   t e m p l a t e _ s c o r e = 7 1 . 4 2 9   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 2 1 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   i g n o r e d   b e n c h m a r k   s u i t e   w i t h   t w o   s t r o n g e r   L l a m a   a s s e r t i o n s   t h a t   r e q u i r e   s y s t e m + u s e r   t o   b e   m e r g e d   i n t o   t h e   f i r s t   i n s t r u c t i o n   b l o c k   a n d   f o r b i d   l e a v i n g   a n   o p e n   ` [ I N S T ] `   p r e f i x   a t   g e n e r a t i o n   t i m e . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 7 1 . 4 2 9 ,   p a s s e d _ c a s e s = 5 ,   f a i l e d _ c a s e s = 2 ,   t o t a l _ c a s e s = 7 . 
 
 - -   I n s i g h t :   T h e   c u r r e n t   f a m i l y   d e t e c t o r   i s   g o o d   e n o u g h ,   b u t   t h e   L l a m a   r e n d e r e r   i s   s t i l l   s t r u c t u r a l l y   n a i v e ;   i t   o v e r - p r o d u c e s   i n s t r u c t i o n   b l o c k s   a n d   l e a v e s   t h e   p r o m p t   i n   a n   i n v a l i d   g e n e r a t i o n   s t a t e . 
 
 - -   N e x t :   r e f a c t o r   L l a m a   r e n d e r i n g   i n t o   a   d e d i c a t e d   f o r m a t t e r   t h a t   f o l d s   s y s t e m   c o n t e x t   i n t o   t h e   f i r s t   u s e r   t u r n   a n d   e m i t s   a   p r o p e r   a s s i s t a n t   g e n e r a t i o n   p r e f i x . 
 
 - 
 
 - # # #   R u n   1 0 :   h a r d e n   l l a m a   c h a t   t e m p l a t e   r e n d e r i n g   -   t e m p l a t e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 2 3 
 
 - -   W h a t   c h a n g e d :   R e w o r k e d   t h e   L l a m a   p a t h   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   i n t o   a   d e d i c a t e d   r e n d e r e r   t h a t   a c c u m u l a t e s   p e n d i n g   s y s t e m / d e v e l o p e r   c o n t e n t ,   f o l d s   i t   i n t o   t h e   n e x t   u s e r / t o o l   i n s t r u c t i o n   b l o c k ,   a n d   s t o p s   e m i t t i n g   a   d a n g l i n g   o p e n   a s s i s t a n t   ` [ I N S T ] `   p r e f i x . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 7 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 7 . 
 
 - -   I n s i g h t :   L l a m a   n e e d e d   a   s p e c i a l i z e d   f o r m a t t e r   i n s t e a d   o f   t h e   g e n e r i c   p e r - m e s s a g e   h e l p e r ;   o n c e   t h e   p r o m p t   w a s   r e n d e r e d   a s   p r o p e r   c l o s e d   i n s t r u c t i o n   b l o c k s   w i t h   f o l d e d   s y s t e m   c o n t e x t ,   t h e   h a r d e n i n g   s u i t e   p a s s e d   c l e a n l y . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   a g a i n   a r o u n d   m u l t i - t u r n   c o n t i n u i t y ,   t o o l - r o l e   p l a c e m e n t ,   o r   a l i a s - d r i v e n   f a m i l y   d e t e c t i o n   s o   t h e   n e x t   e x p e r i m e n t s   t a r g e t   r e a l   e d g e   c a s e s   i n s t e a d   o f   a l r e a d y - s o l v e d   h a p p y   p a t h s . 
 
 - 
 
 - # #   S e g m e n t   3 :   A l i a s - D r i v e n   T e m p l a t e   S e l e c t i o n 
 
 - -   N e w   o b j e c t i v e :   h a r d e n   f a m i l y   d e t e c t i o n   s o   t e m p l a t e   s e l e c t i o n   c a n   s t i l l   i n f e r   t h e   r i g h t   f a m i l y   f r o m   a n   a l i a s   e v e n   w h e n   t h e   c a n o n i c a l / r o o t   m o d e l   i d   i s   g e n e r i c . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   t h e   i g n o r e d   t e m p l a t e   s u i t e ,   n o w   e x p a n d e d   w i t h   a l i a s - s e n s i t i v e   c a s e s . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` t e m p l a t e _ s c o r e `   w i n s   w h i l e   t h e   r e g u l a r   n o n - i g n o r e d   s u i t e   s t a y s   g r e e n . 
 
 - 
 
 - # # #   R u n   1 1 :   b a s e l i n e   -   t e m p l a t e _ s c o r e = 8 8 . 8 8 9   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 2 7 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   i g n o r e d   b e n c h m a r k   s u i t e   w i t h   a l i a s - s e n s i t i v e   f a m i l y - s e l e c t i o n   c o v e r a g e ,   e s p e c i a l l y   a   c a s e   w h e r e   t h e   c a n o n i c a l   m o d e l   i d   i s   g e n e r i c   b u t   t h e   r e q u e s t e d   a l i a s   c a r r i e s   t h e   ` q w e n `   f a m i l y   h i n t . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 8 8 . 8 8 9 ,   p a s s e d _ c a s e s = 8 ,   f a i l e d _ c a s e s = 1 ,   t o t a l _ c a s e s = 9 . 
 
 - -   I n s i g h t :   T h e   f a m i l y   t e m p l a t e s   a n d   f a l l b a c k   b e h a v i o r   a r e   o t h e r w i s e   s t a b l e ;   t h e   r e m a i n i n g   g a p   i s   s p e c i f i c a l l y   t h a t   ` s e l e c t _ c h a t _ t e m p l a t e ( ) `   l o s e s   t h e   a l i a s   h i n t   w h e n   i t   r e s o l v e s   t h r o u g h   a   g e n e r i c   c a n o n i c a l / r o o t   i d . 
 
 - -   N e x t :   m a k e   t e m p l a t e   s e l e c t i o n   c o n s i d e r   b o t h   t h e   r e q u e s t e d   m o d e l   s t r i n g   a n d   t h e   r e s o l v e d   c a t a l o g / r o o t   m e t a d a t a ,   p r e f e r r i n g   w h i c h e v e r   o n e   c o n t a i n s   a   r e c o g n i z e d   f a m i l y   m a r k e r . 
 
 - 
 
 - # # #   R u n   1 2 :   d e t e c t   t e m p l a t e   f a m i l y   f r o m   a l i a s e s   -   t e m p l a t e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 2 8 
 
 - -   W h a t   c h a n g e d :   U p d a t e d   ` s e l e c t _ c h a t _ t e m p l a t e ( ) `   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   t o   e v a l u a t e   t h e   r e q u e s t e d   m o d e l   n a m e   f i r s t ,   t h e n   r e s o l v e d   a l i a s / c a n o n i c a l / r o o t   i d s ,   s o   f a m i l y   h i n t s   p r e s e n t   o n l y   i n   a l i a s e s   s t i l l   d r i v e   t e m p l a t e   s e l e c t i o n . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 9 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 9 . 
 
 - -   I n s i g h t :   A l i a s - a w a r e   s e l e c t i o n   c l o s e s   t h e   l a s t   k n o w n   f a m i l y - d e t e c t i o n   g a p   w i t h o u t   n e e d i n g   e x t r a   c a t a l o g   m e t a d a t a ;   s i m p l e   o r d e r e d   c a n d i d a t e   m a t c h i n g   i s   e n o u g h   h e r e . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   a g a i n   a r o u n d   m u l t i - t u r n   c o n t i n u i t y ,   t o o l - c a l l / t o o l - r o l e   r e n d e r i n g ,   o r   f a m i l y - s p e c i f i c   r e s p o n s e - f o r m a t   i n s t r u c t i o n s   t o   t a r g e t   s u b t l e r   c o r r e c t n e s s   g a p s . 
 
 - 
 
 - # #   S e g m e n t   4 :   V a r i a n t   F a m i l y   D e t e c t i o n 
 
 - -   N e w   o b j e c t i v e :   h a r d e n   f a m i l y   d e t e c t i o n   f o r   c o m m o n   m o d e l - n a m e   v a r i a n t s ,   s t a r t i n g   w i t h   M o o n s h o t - b r a n d e d   K i m i   a l i a s e s . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   t h e   i g n o r e d   t e m p l a t e   s u i t e ,   n o w   e x p a n d e d   w i t h   v a r i a n t - s e n s i t i v e   c a s e s . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` t e m p l a t e _ s c o r e `   w i n s   w h i l e   t h e   r e g u l a r   n o n - i g n o r e d   s u i t e   s t a y s   g r e e n . 
 
 - 
 
 - # # #   R u n   1 3 :   b a s e l i n e   -   t e m p l a t e _ s c o r e = 9 0 . 9 0 9   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 3 2 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   i g n o r e d   t e m p l a t e   s u i t e   w i t h   M o o n s h o t / K i m i   v a r i a n t   c o v e r a g e ,   i n c l u d i n g   o n e   p o s i t i v e   M o o n s h o t   a l i a s   c a s e   a n d   o n e   n e a r - n a m e   g e n e r i c   f a l l b a c k   c a s e . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 9 0 . 9 0 9 ,   p a s s e d _ c a s e s = 1 0 ,   f a i l e d _ c a s e s = 1 ,   t o t a l _ c a s e s = 1 1 . 
 
 - -   I n s i g h t :   T h e   o n l y   r e m a i n i n g   g a p   i s   t h a t   ` s e l e c t _ c h a t _ t e m p l a t e ( ) `   r e c o g n i z e s   ` k i m i `   b u t   n o t   t h e   c o m m o n   ` m o o n s h o t `   n a m i n g   v a r i a n t ;   n e a r b y   n a m e s   l i k e   ` m o o n s h i n e `   a l r e a d y   f a l l   b a c k   s a f e l y . 
 
 - -   N e x t :   e x t e n d   f a m i l y   d e t e c t i o n   s o   M o o n s h o t - b r a n d e d   a l i a s e s   m a p   t o   t h e   K i m i   t e m p l a t e   w i t h o u t   b r o a d e n i n g   t h e   m a t c h   s o   f a r   t h a t   u n r e l a t e d   n a m e s   s t o p   u s i n g   t h e   g e n e r i c   f a l l b a c k . 
 
 - 
 
 - # # #   R u n   1 4 :   d e t e c t   m o o n s h o t   a s   k i m i   f a m i l y   -   t e m p l a t e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 3 3 
 
 - -   W h a t   c h a n g e d :   E x t e n d e d   ` s e l e c t _ c h a t _ t e m p l a t e ( ) `   i n   ` c r a t e s / i n f e r e n c e - s e r v e r / s r c / c o m p a t . r s `   s o   c a n d i d a t e   n a m e s   c o n t a i n i n g   ` m o o n s h o t `   a r e   t r e a t e d   a s   t h e   K i m i   f a m i l y   a l o n g s i d e   d i r e c t   ` k i m i `   m a t c h e s . 
 
 - -   R e s u l t :   t e m p l a t e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 1 1 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 1 1 . 
 
 - -   I n s i g h t :   A   n a r r o w   M o o n s h o t   v a r i a n t   m a t c h   c l o s e s   t h e   K i m i - f a m i l y   n a m i n g   g a p   c l e a n l y   w i t h o u t   b r e a k i n g   s a f e   g e n e r i c   f a l l b a c k   f o r   u n r e l a t e d   n a m e s   s u c h   a s   ` m o o n s h i n e - l o c a l ` . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   a r o u n d   m u l t i - t u r n   c o n t i n u i t y ,   t o o l - r o l e   r e n d e r i n g ,   o r   f a m i l y - s p e c i f i c   r e s p o n s e - f o r m a t   i n s t r u c t i o n s . 
 
 - 
 
 - # #   S e g m e n t   5 :   C L I   C o n t r o l   S u r f a c e 
 
 - -   N e w   o b j e c t i v e :   b u i l d   a   c o m p l e t e   m a n a g e m e n t   C L I   f i r s t ,   a h e a d   o f   t h e   T a u r i   a p p ,   o n   t o p   o f   t h e   c u r r e n t   b a c k e n d   v e r s i o n . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   n o w   r u n s   i g n o r e d   C L I - s u r f a c e   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   i s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   r e g u l a r   n o n - i g n o r e d   s u i t e   r e m a i n s   g r e e n . 
 
 - -   T h i s   s e g m e n t   s t a r t s   b y   b e n c h m a r k i n g   t h e   c o m m a n d   s u r f a c e   i t s e l f   b e f o r e   d e e p e r   e x e c u t i o n   a n d   b a c k e n d - a d m i n   s e m a n t i c s   a r e   i m p l e m e n t e d . 
 
 - 
 
 - # # #   R u n   1 5 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 1 8 . 1 8 2   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 5 3 
 
 - -   W h a t   c h a n g e d :   I n i t i a l i z e d   a   n e w   ` c r a t e s / l o c a l l l m - c l i `   c r a t e   w i t h   a   m i n i m a l   C l a p - b a s e d   C L I   s c a f f o l d ,   s w i t c h e d   t h e   a u t o r e s e a r c h   h a r n e s s   f r o m   t e m p l a t e   t e s t s   t o   C L I   s u r f a c e   t e s t s ,   a n d   d e f i n e d   t h e   f i r s t   i g n o r e d   b e n c h m a r k   s u i t e   f o r   p r o f e s s i o n a l   c o m m a n d   c o v e r a g e . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 8 . 1 8 2 ,   p a s s e d _ c a s e s = 2 ,   f a i l e d _ c a s e s = 9 ,   t o t a l _ c a s e s = 1 1 . 
 
 - -   I n s i g h t :   T h e   s c a f f o l d   a l r e a d y   c o v e r s   g l o b a l   f l a g s   p l u s   ` s t a t u s `   a n d   ` m o d e l s   l i s t ` ,   b u t   a l m o s t   t h e   e n t i r e   p r o m i s e d   m a n a g e m e n t   s u r f a c e   i s   s t i l l   m i s s i n g . 
 
 - -   N e x t :   a d d   t h e   r e m a i n i n g   t o p - l e v e l   c o m m a n d   g r o u p s   a n d   m o d e l / a u t h / c o n f i g / b e n c h / l o g s / d o c t o r   s u b c o m m a n d s   s o   t h e   C L I   s u r f a c e   m a t c h e s   t h e   i n t e n d e d   p r o d u c t   c o n t r a c t   b e f o r e   w i r i n g   e x e c u t i o n   i n t e r n a l s . 
 
 - 
 
 - # # #   R u n   1 6 :   e x p a n d   c l i   c o m m a n d   s u r f a c e   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 5 5 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   i n t o   a   b r o a d   C l a p   p a r s e r   w i t h   t o p - l e v e l   ` s t a t u s ` ,   ` m o d e l s ` ,   ` a u t h ` ,   ` c o n f i g ` ,   ` b e n c h ` ,   ` l o g s ` ,   a n d   ` d o c t o r `   c o m m a n d s   p l u s   t h e   e x p e c t e d   m o d e l / a u t h / c o n f i g / t h r o u g h p u t   s u b c o m m a n d s   a n d   g l o b a l   f l a g s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 1 1 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 1 1 . 
 
 - -   I n s i g h t :   T h e   p r o f e s s i o n a l   C L I   c o n t r a c t   c a n   b e   l o c k e d   i n   q u i c k l y   a t   t h e   p a r s e r   l a y e r   b e f o r e   e x e c u t i o n   i n t e r n a l s   e x i s t ;   C l a p   g i v e s   a   m a i n t a i n a b l e   f o u n d a t i o n   f o r   t h e   f u l l   m a n a g e m e n t   s u r f a c e . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   f r o m   c o m m a n d   p r e s e n c e   t o   s e m a n t i c   c o r r e c t n e s s ,   s t a r t i n g   w i t h   c o m m a n d - s p e c i f i c   a r g u m e n t s ,   d e f a u l t s ,   a n d   o u t p u t - c o n t r a c t   e x p e c t a t i o n s   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s . 
 
 - 
 
 - # #   S e g m e n t   6 :   C L I   S e m a n t i c   C o n t r a c t s 
 
 - -   N e w   o b j e c t i v e :   k e e p   t h e   C L I   s u r f a c e   s t a b l e ,   b u t   r a i s e   t h e   b e n c h m a r k   s o   k e y   c o m m a n d s   p r e s e r v e   u s e f u l   s e m a n t i c   d e t a i l   s u c h   a s   d e f a u l t s ,   h i g h - v a l u e   a r g u m e n t s ,   a n d   s u m m a r y / i n t e n t i o n   c o n t r a c t s . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # #   S e g m e n t   7 :   C L I   E x e c u t i o n   P l a n s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   h u m a n - r e a d a b l e   s e m a n t i c   s u m m a r i e s   t o   m a c h i n e - u s a b l e   e x e c u t i o n   p l a n s   f o r   k e y   w o r k f l o w s . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   1 9 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 6 9 . 5 6 5   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 0 4 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   C L I   b e n c h m a r k   w i t h   p l a n - o r i e n t e d   i g n o r e d   t e s t s   t h a t   r e q u i r e   k e y   c o m m a n d s   t o   m a p   i n t o   m a c h i n e - u s a b l e   ` C o m m a n d P l a n `   v a r i a n t s   i n s t e a d   o f   o n l y   s e m a n t i c   s u m m a r i e s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 6 9 . 5 6 5 ,   p a s s e d _ c a s e s = 1 6 ,   f a i l e d _ c a s e s = 7 ,   t o t a l _ c a s e s = 2 3 . 
 
 - -   I n s i g h t :   T h e   s e m a n t i c   s u m m a r y   l a y e r   i s   a l r e a d y   s o l i d ,   b u t   ` p l a n _ c o m m a n d ( ) `   i s   s t i l l   a   s t u b   t h a t   c o l l a p s e s   e v e r y t h i n g   t o   ` S u m m a r y O n l y ` ,   s o   e x e c u t i o n   p l a n n i n g   h a s   n o t   b e e n   w i r e d   y e t . 
 
 - -   N e x t :   i m p l e m e n t   c o n c r e t e   ` C o m m a n d P l a n `   m a p p i n g   f o r   s t a t u s ,   m o d e l s   s c a n / l o a d ,   a u t h   e n a b l e ,   c o n f i g   s e t ,   b e n c h   t h r o u g h p u t ,   a n d   l o g s . 
 
 - 
 
 - # # #   R u n   2 0 :   a d d   c l i   e x e c u t i o n   p l a n s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 0 5 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   c o n c r e t e   ` C o m m a n d P l a n `   m a p p i n g   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   f o r   s t a t u s ,   m o d e l   s c a n / l o a d ,   a u t h   e n a b l e ,   c o n f i g   s e t ,   t h r o u g h p u t   b e n c h ,   a n d   l o g s   w h i l e   l e a v i n g   l o w e r - p r i o r i t y   c o m m a n d s   o n   ` S u m m a r y O n l y ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 2 3 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 2 3 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   m a c h i n e - u s a b l e   p l a n n i n g   l a y e r   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s ,   w h i c h   i s   a   s t r o n g e r   b a s e   f o r   l a t e r   r e a l   h a n d l e r s   a n d   T a u r i   r e u s e   t h a n   s u m m a r y   s t r i n g s   a l o n e . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   f r o m   s t r u c t u r e d   p l a n s   t o   e x e c u t i o n - r e a d y   r e q u e s t   p a y l o a d s   o r   o u t p u t   c o n t r a c t s   a t   t h e   b a c k e n d / c o n t r o l - p l a n e   s e a m . 
 
 - 
 
 - # #   S e g m e n t   8 :   C L I   E x e c u t i o n   C o n t r a c t s 
 
 - -   N e w   o b j e c t i v e :   t u r n   t h e   h i g h e s t - v a l u e   ` C o m m a n d P l a n `   v a r i a n t s   i n t o   c o n c r e t e   e x e c u t i o n   c o n t r a c t s   t h a t   d e s c r i b e   t h e   e x a c t   H T T P   o r   l o c a l   o p e r a t i o n   e a c h   w o r k f l o w   i n t e n d s   t o   p e r f o r m . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   2 1 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 7 6 . 6 6 7   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 1 1 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   ` C o m m a n d P l a n `   s e m a n t i c s   t o   ` E x e c u t i o n C o n t r a c t `   s e m a n t i c s ,   r e q u i r i n g   t h e   C L I   t o   d e s c r i b e   t h e   c o n c r e t e   H T T P   o r   l o c a l   o p e r a t i o n   e a c h   h i g h - v a l u e   w o r k f l o w   i n t e n d s   t o   p e r f o r m . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 7 6 . 6 6 7 ,   p a s s e d _ c a s e s = 2 3 ,   f a i l e d _ c a s e s = 7 ,   t o t a l _ c a s e s = 3 0 . 
 
 - -   I n s i g h t :   T h e   p l a n n i n g   l a y e r   i s   n o w   s o l i d ,   b u t   ` e x e c u t i o n _ c o n t r a c t ( ) `   i s   s t i l l   s t u b b e d   a n d   r e t u r n s   ` S u m m a r y O n l y   {   c o m m a n d :   " u n p l a n n e d "   } `   f o r   e v e r y   c o n c r e t e   p l a n ,   s o   t h e   C L I   c a n n o t   y e t   d e s c r i b e   i t s   b a c k e n d / c o n t r o l - p l a n e   s e a m   a c c u r a t e l y . 
 
 - -   N e x t :   m a p   t h e   h i g h - v a l u e   ` C o m m a n d P l a n `   v a r i a n t s   i n t o   c o n c r e t e   H T T P / l o c a l   e x e c u t i o n   c o n t r a c t s   f o r   s t a t u s ,   m o d e l s   s c a n / l o a d ,   a u t h   e n a b l e ,   c o n f i g   s e t ,   t h r o u g h p u t   b e n c h ,   a n d   l o g s . 
 
 - 
 
 - # # #   R u n   2 2 :   a d d   c l i   e x e c u t i o n   c o n t r a c t s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 1 4 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   c o n c r e t e   ` e x e c u t i o n _ c o n t r a c t ( ) `   m a p p i n g   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s ` ,   t u r n i n g   t h e   h i g h e s t - v a l u e   ` C o m m a n d P l a n `   v a r i a n t s   i n t o   e x p l i c i t   H T T P   o r   l o c a l   c o n t r a c t s   f o r   h e a l t h   p r o b i n g ,   m o d e l   s c a n / l o a d ,   a u t h / c o n f i g   m u t a t i o n ,   t h r o u g h p u t   r e q u e s t s ,   a n d   l o g   r e a d s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 3 0 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 3 0 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   c l e a n   p r o g r e s s i o n   f r o m   p a r s e r   - >   s e m a n t i c   s u m m a r y   - >   m a c h i n e - u s a b l e   p l a n   - >   c o n c r e t e   e x e c u t i o n   c o n t r a c t   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s ,   w h i c h   i s   a   s t r o n g   b a s e   f o r   w i r i n g   r e a l   h a n d l e r s   n e x t . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   f r o m   c o n t r a c t   s h a p e   t o   a c t u a l   e x e c u t i o n   s t u b s   o r   b a c k e n d   r e q u e s t   p a y l o a d   s e m a n t i c s ,   e s p e c i a l l y   f o r   s t a t u s ,   t h r o u g h p u t   b e n c h ,   a n d   m o d e l   o p e r a t i o n s . 
 
 - 
 
 - # # #   R u n   1 7 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 6 8 . 7 5   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 8 : 5 9 
 
 - -   W h a t   c h a n g e d :   R a i s e d   t h e   b e n c h m a r k   w i t h   s u m m a r y - f o c u s e d   i g n o r e d   t e s t s   t h a t   r e q u i r e   ` r e n d e r _ c o m m a n d _ s u m m a r y ( ) `   t o   p r e s e r v e   o u t p u t   f o r m a t ,   m o d e l s   d i r e c t o r y ,   c o m m a n d - s p e c i f i c   a r g u m e n t s ,   a n d   k e y   d e f a u l t s   f o r   s t a t u s ,   m o d e l s   l o a d ,   a u t h   e n a b l e ,   b e n c h   t h r o u g h p u t ,   a n d   l o g s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 6 8 . 7 5 ,   p a s s e d _ c a s e s = 1 1 ,   f a i l e d _ c a s e s = 5 ,   t o t a l _ c a s e s = 1 6 . 
 
 - -   I n s i g h t :   T h e   p a r s e r   s u r f a c e   i s   s o l i d ,   b u t   t h e   c u r r e n t   s u m m a r y   l a y e r   i s   t o o   s h a l l o w ;   i t   o n l y   r e p o r t s   t h e   t o p - l e v e l   c o m m a n d   a n d   s e r v e r ,   l o s i n g   t h e   s e m a n t i c   d e t a i l   n e e d e d   f o r   l a t e r   e x e c u t i o n   p l a n n i n g . 
 
 - -   N e x t :   u p g r a d e   ` r e n d e r _ c o m m a n d _ s u m m a r y ( ) `   s o   i t   e m i t s   n e s t e d   c o m m a n d   p a t h s   a n d   t h e   h i g h e s t - v a l u e   a r g u m e n t s / d e f a u l t s   f o r   e a c h   m a n a g e m e n t   w o r k f l o w . 
 
 - 
 
 - # # #   R u n   1 8 :   e n r i c h   c l i   s e m a n t i c   s u m m a r i e s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 0 0 
 
 - -   W h a t   c h a n g e d :   R e w o r k e d   ` r e n d e r _ c o m m a n d _ s u m m a r y ( ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   t o   e m i t   n e s t e d   c o m m a n d   p a t h s   p l u s   k e y   d e f a u l t s   a n d   h i g h - v a l u e   a r g u m e n t s   f o r   s t a t u s ,   m o d e l s ,   a u t h ,   c o n f i g ,   b e n c h ,   a n d   l o g s   w o r k f l o w s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 1 6 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 1 6 . 
 
 - -   I n s i g h t :   A   l i g h t w e i g h t   s e m a n t i c / i n t e n t i o n   l a y e r   i s   e n o u g h   t o   m a k e   t h e   C L I   c o n t r a c t   m e a n i n g f u l l y   r i c h e r   b e f o r e   w i r i n g   r e a l   h a n d l e r s ;   t h e   C L I   n o w   p r e s e r v e s   a c t i o n a b l e   d e t a i l   i n s t e a d   o f   c o l l a p s i n g   e v e r y t h i n g   t o   t o p - l e v e l   g r o u p s . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   a g a i n   t o w a r d   e x e c u t i o n   p l a n n i n g   o r   o u t p u t   c o n t r a c t s ,   e . g .   s t r u c t u r e d   a c t i o n   p l a n s   f o r   b a c k e n d / a d m i n   o p e r a t i o n s   r a t h e r   t h a n   j u s t   h u m a n - r e a d a b l e   s u m m a r i e s . 
 
 - 
 
 - # #   S e g m e n t   9 :   C L I   E x e c u t i o n   S t u b s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   a b s t r a c t   e x e c u t i o n   c o n t r a c t s   t o   c o n c r e t e   e x e c u t i o n   s t u b s   t h a t   p r e s e r v e   H T T P   m e t h o d / p a t h / b o d y   s e m a n t i c s   o r   n a m e d   l o c a l   a c t i o n s   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 + - - - 
 
   
 
 - # # #   R u n   2 3 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 8 3 . 3 3 3   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 2 0 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   e x e c u t i o n   c o n t r a c t s   t o   c o n c r e t e   e x e c u t i o n   s t u b s ,   a d d i n g   i g n o r e d   t e s t s   f o r   H T T P   m e t h o d / p a t h / b o d y   s e m a n t i c s   a n d   n a m e d   l o c a l   a c t i o n s   f o r   s t a t u s ,   m o d e l   s c a n / l o a d ,   a u t h   e n a b l e ,   t h r o u g h p u t   b e n c h ,   a n d   l o g s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 8 3 . 3 3 3 ,   p a s s e d _ c a s e s = 3 0 ,   f a i l e d _ c a s e s = 6 ,   t o t a l _ c a s e s = 3 6 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   k n o w s   h o w   t o   p a r s e   c o m m a n d s   a n d   d e s c r i b e   e x e c u t i o n   c o n t r a c t s ,   b u t   ` e x e c u t i o n _ s t u b ( ) `   i s   s t i l l   j u s t   a   p l a c e h o l d e r   r e t u r n i n g   ` S u m m a r y O n l y   {   c o m m a n d :   " u n i m p l e m e n t e d "   } `   f o r   e v e r y   h i g h - v a l u e   w o r k f l o w . 
 
 - -   N e x t :   i m p l e m e n t   c o n c r e t e   s t u b   m a p p i n g   s o   s t a t u s   a n d   t h r o u g h p u t   p r o d u c e   e x e c u t i o n - r e a d y   H T T P   r e q u e s t   s h a p e s   a n d   l o c a l   w o r k f l o w s   e m i t   n a m e d   l o c a l   a c t i o n s   w i t h   p r e s e r v e d   d e t a i l . 
 
 + # #   D a t a   S u m m a r y 
 
 + -   * * J S O N L   r u n s * * :   2 
 
 + -   * * K e p t * * :   2 
 
 + -   * * D i s c a r d e d * * :   0 
 
 + -   * * C r a s h e d * * :   0 
 
   
 
 - # # #   R u n   2 4 :   a d d   c l i   e x e c u t i o n   s t u b s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 2 2 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   c o n c r e t e   ` e x e c u t i o n _ s t u b ( ) `   m a p p i n g   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s ` ,   t u r n i n g   t h e   h i g h e s t - v a l u e   e x e c u t i o n   c o n t r a c t s   i n t o   e x e c u t i o n - r e a d y   H T T P   r e q u e s t s   a n d   n a m e d   l o c a l   a c t i o n s   w i t h   p r e s e r v e d   d e t a i l . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 3 6 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 3 6 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   f u l l   d e s i g n   l a d d e r   f o r   t h e   k e y   w o r k f l o w s   -   p a r s e r ,   s e m a n t i c   s u m m a r y ,   m a c h i n e - u s a b l e   p l a n ,   e x e c u t i o n   c o n t r a c t ,   a n d   f i n a l l y   e x e c u t i o n   s t u b   -   w h i c h   i s   a   s t r o n g   h a n d o f f   p o i n t   f o r   w i r i n g   r e a l   h a n d l e r s   n e x t . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   f r o m   s t u b   s h a p e   t o   a c t u a l   h a n d l e r   b e h a v i o r   o r   r e q u e s t   p a y l o a d   c o n s t r u c t i o n   f o r   t h e   s a m e   h i g h - v a l u e   w o r k f l o w s . 
 
 + - - - 
 
   
 
 - # #   S e g m e n t   1 0 :   C L I   E x e c u t i o n   P r e v i e w s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   e x e c u t i o n   s t u b s   t o   d r y - r u n   p r e v i e w s   t h a t   e x p a n d   t h e   s a m e   h i g h - v a l u e   w o r k f l o w s   i n t o   f u l l   p r e v i e w a b l e   H T T P   U R L s   o r   l o c a l - e f f e c t   d e s c r i p t i o n s . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 + # #   E x p e r i m e n t   L o g 
 
   
 
 - # # #   R u n   2 5 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 8 5 . 7 1 4   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 2 7 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   e x e c u t i o n   s t u b s   t o   d r y - r u n   p r e v i e w s ,   a d d i n g   i g n o r e d   t e s t s   f o r   f u l l   p r e v i e w   U R L s   a n d   h u m a n - r e a d a b l e   l o c a l - e f f e c t   d e s c r i p t i o n s   a c r o s s   s t a t u s ,   m o d e l s   s c a n / l o a d ,   a u t h   e n a b l e ,   t h r o u g h p u t   b e n c h ,   a n d   l o g s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 8 5 . 7 1 4 ,   p a s s e d _ c a s e s = 3 6 ,   f a i l e d _ c a s e s = 6 ,   t o t a l _ c a s e s = 4 2 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   m o d e l s   e x e c u t i o n   s t u b s   c o r r e c t l y ,   b u t   ` e x e c u t i o n _ p r e v i e w ( ) `   s t i l l   c o l l a p s e s   e v e r y   h i g h - v a l u e   w o r k f l o w   t o   ` S u m m a r y O n l y   {   c o m m a n d :   " p r e v i e w - u n i m p l e m e n t e d "   } ` ,   s o   t h e r e   i s   n o   u s e r - f a c i n g   d r y - r u n   l a y e r   y e t . 
 
 - -   N e x t :   m a p   t h e   h i g h e s t - v a l u e   e x e c u t i o n   s t u b s   i n t o   c o n c r e t e   ` H t t p P r e v i e w `   a n d   ` L o c a l P r e v i e w `   v a l u e s   u s i n g   t h e   r e s o l v e d   ` - - s e r v e r `   b a s e   U R L   a n d   r e a d a b l e   l o c a l - e f f e c t   t e x t . 
 
 + # # #   R u n   1 :   A d d   r u n t i m e   s t a t e   v a l i d a t i o n   b e f o r e   F o r g e A g e n t   H T T P   c a l l        v a l i d a t i o n _ s c o r e = 1 0 0   ( K E E P ) 
 
 + -   * * T i m e s t a m p * * :   2 0 2 6 - 0 4 - 0 2 
 
 + -   * * W h a t   c h a n g e d * * :   A d d e d   v a l i d a t i o n   o f   ` p r o c e s s _ r u n n i n g `   a n d   ` r e a d y `   s t a t e   b e f o r e   m a k i n g   H T T P   c a l l   i n   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d ` .   E m i t s   d e s c r i p t i v e   e r r o r   m e s s a g e s   f o r   e a c h   f a i l u r e   s c e n a r i o . 
 
 + -   * * R e s u l t * * :   v a l i d a t i o n _ s c o r e = 1 0 0   ( w a s   0 ) ,   r e s p o n s e _ t i m e _ m s = 5 0 0 
 
 + -   * * I n s i g h t * * :   O   e r r o   o c o r r i a   p o r q u e   o   c %%d i g o   n % o   v e r i f i c a v a   o   e s t a d o   d o   r u n t i m e   a n t e s   d e   f a z e r   a   r e q u i s i % % o   H T T P .   A   c o r r e % % o   v a l i d a   o   e s t a d o   e   e m i t e   m e n s a g e n s   d e s c r i t i v a s . 
 
 + -   * * N e x t * * :   T e s t a r   m a n u a l m e n t e   e m   m o d o   l o c a l   e   r e m o t o 
 
   
 
 - # # #   R u n   2 6 :   a d d   c l i   e x e c u t i o n   p r e v i e w s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 2 8 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   c o n c r e t e   ` e x e c u t i o n _ p r e v i e w ( ) `   m a p p i n g   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s ` ,   e x p a n d i n g   H T T P   s t u b s   i n t o   f u l l   U R L s   w i t h   p r e s e r v e d   p a y l o a d s   a n d   l o c a l   a c t i o n s   i n t o   r e a d a b l e   e f f e c t   d e s c r i p t i o n s   v i a   ` p r e v i e w _ e f f e c t ( ) ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 4 2 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 4 2 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   c o m p l e t e   d r y - r u n   p r e v i e w   l a y e r   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s ,   w h i c h   i s   a   s t r o n g   b r i d g e   f r o m   i n t e r n a l   p l a n n i n g   s e a m s   t o   f u t u r e   r e a l   h a n d l e r s   a n d   ` - - d r y - r u n `   U X . 
 
 - -   N e x t :   r a i s e   t h e   b e n c h m a r k   f r o m   p r e v i e w   s h a p e   t o   a c t u a l   h a n d l e r   b e h a v i o r   o r   r e q u e s t - b o d y   c o n s t r u c t i o n   d e t a i l s   f o r   s t a t u s ,   t h r o u g h p u t ,   a n d   m o d e l - m a n a g e m e n t   w o r k f l o w s . 
 
 + # # #   R u n   2 :   F i x   c o m p i l a t i o n   e r r o r        v a l i d a t i o n _ s c o r e = 1 0 0   ( K E E P ) 
 
 + -   * * T i m e s t a m p * * :   2 0 2 6 - 0 4 - 0 2 
 
 + -   * * W h a t   c h a n g e d * * :   C h a n g e d   ` s n a p s h o t . s t a t u s . a s _ s t r ( ) `   t o   d i r e c t   e n u m   m a t c h i n g   o n   ` R u n t i m e S t a t u s `   v a r i a n t s . 
 
 + -   * * R e s u l t * * :   v a l i d a t i o n _ s c o r e = 1 0 0 ,   c o m p i l a t i o n = p a s s e d 
 
 + -   * * I n s i g h t * * :   ` R u n t i m e S t a t u s `   %   u m   e n u m   R u s t ,   n % o   s t r i n g .   M a t c h   d i r e t o   n a s   v a r i a n t e s   %   o   p a d r % o   i d i o m a t i c o . 
 
 + -   * * B u g   f i x * * :   ` R u n t i m e S t a t u s : : L o a d i n g ` ,   ` E r r o r ` ,   ` S t a r t i n g ` ,   ` S t o p p i n g ` 
 
   
 
 - # #   S e g m e n t   1 1 :   C L I   D r y - R u n   O u t p u t 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   i n t e r n a l   p r e v i e w   o b j e c t s   t o   f i n a l   u s e r - f a c i n g   ` - - d r y - r u n `   o u t p u t   i n   b o t h   ` t e x t `   a n d   ` j s o n ` ,   s o   t h e   s a m e   h i g h - v a l u e   w o r k f l o w s   a r e   r e a d y   f o r   a   r e a l   p r e v i e w   U X   a t   t h e   c o m m a n d   l i n e . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 + # # #   R u n   2 :   F i x   c o m p i l a t i o n   e r r o r        v a l i d a t i o n _ s c o r e = 1 0 0   ( K E E P ) 
 
 + -   * * T i m e s t a m p * * :   2 0 2 6 - 0 4 - 0 2 
 
 + -   * * W h a t   c h a n g e d * * :   C h a n g e d   ` s n a p s h o t . s t a t u s . a s _ s t r ( ) `   t o   d i r e c t   e n u m   m a t c h i n g   o n   ` R u n t i m e S t a t u s `   v a r i a n t s . 
 
 + -   * * R e s u l t * * :   v a l i d a t i o n _ s c o r e = 1 0 0 ,   c o m p i l a t i o n = p a s s e d 
 
 + -   * * I n s i g h t * * :   ` R u n t i m e S t a t u s `   %   u m   e n u m   R u s t ,   n % o   s t r i n g .   M a t c h   d i r e t o   n a s   v a r i a n t e s   %   o   p a d r % o   i d i o m a t i c o . 
 
 + -   * * B u g   f i x * * :   ` R u n t i m e S t a t u s : : L o a d i n g ` ,   ` E r r o r ` ,   ` S t a r t i n g ` ,   ` S t o p p i n g ` 
 
   
 
 - # # #   R u n   2 7 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 8 7 . 5   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 3 2 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   i n t e r n a l   ` E x e c u t i o n P r e v i e w `   o b j e c t s   t o   f i n a l   ` - - d r y - r u n `   U X   i n   b o t h   t e x t   a n d   J S O N ,   w h i l e   k e e p i n g   ` r e n d e r _ e x e c u t i o n _ p r e v i e w ( ) `   i n t e n t i o n a l l y   s h a l l o w   a s   ` D R Y   R U N   { s u m m a r y } ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 8 7 . 5 ,   p a s s e d _ c a s e s = 4 2 ,   f a i l e d _ c a s e s = 6 ,   t o t a l _ c a s e s = 4 8 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   k n o w s   h o w   t o   b u i l d   t h e   p r e v i e w   o b j e c t   g r a p h ,   b u t   t h e   f i n a l   p r e s e n t a t i o n   l a y e r   s t i l l   c o l l a p s e s   t o   s u m m a r i e s   i n s t e a d   o f   r e n d e r i n g   h e a l t h / c h a t   H T T P   p r e v i e w s   a n d   l o c a l - e f f e c t   d r y - r u n   t e x t . 
 
 - -   N e x t :   r e n d e r   t h e   e x i s t i n g   p r e v i e w   l a y e r   i n t o   f i n a l   t e x t / j s o n   o u t p u t   u s i n g   t h e   c u r r e n t   ` E x e c u t i o n P r e v i e w `   d a t a   r a t h e r   t h a n   i n t r o d u c i n g   a   n e w   e x e c u t i o n   s e a m . 
 
 + - - - 
 
   
 
 - # # #   R u n   2 8 :   r e n d e r   c l i   d r y - r u n   p r e v i e w s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 3 4 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   f i n a l   ` - - d r y - r u n `   r e n d e r i n g   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s ` ,   m a p p i n g   ` E x e c u t i o n P r e v i e w `   v a l u e s   t o   u s e r - f a c i n g   t e x t   a n d   J S O N   o u t p u t   a n d   r e u s i n g   t h e   e x i s t i n g   p r e v i e w   p i p e l i n e   ( ` p l a n _ c o m m a n d `   - >   ` e x e c u t i o n _ c o n t r a c t `   - >   ` e x e c u t i o n _ s t u b `   - >   ` e x e c u t i o n _ p r e v i e w ` ) . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 4 8 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 4 8 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   c o m p l e t e   d r y - r u n   s t a c k   f o r   t h e   h i g h e s t - v a l u e   w o r k f l o w s ,   f r o m   p a r s e r   t h r o u g h   f i n a l   u s e r - v i s i b l e   t e x t / j s o n   p r e v i e w s ,   w i t h o u t   y e t   e x e c u t i n g   r e a l   s i d e   e f f e c t s . 
 
 - -   N e x t :   r a i s e   t h e   b a r   f r o m   d r y - r u n   r e n d e r i n g   t o   r e a l   h a n d l e r   b e h a v i o r   o r   d e t e r m i n i s t i c   r e q u e s t / b o d y   c o n s t r u c t i o n   f o r   b a c k e n d - f a c i n g   c o m m a n d s . 
 
 - 
 
 - # #   S e g m e n t   1 2 :   C L I   B a c k e n d   I n v o c a t i o n s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   d r y - r u n   r e n d e r i n g   t o   t h e   f i r s t   r e a l   b a c k e n d - c a l l   s p e c i f i c a t i o n s   f o r   c o m m a n d s   t h a t   c a n   a l r e a d y   w o r k   t o d a y ,   e s p e c i a l l y   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t ` . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # #   S e g m e n t   1 3 :   C L I   B a c k e n d   R e q u e s t s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   b a c k e n d   i n v o c a t i o n   s p e c s   t o   e x e c u t a b l e   b a c k e n d   r e q u e s t   c o n s t r u c t i o n   f o r   t h e   c o m m a n d s   t h a t   a l r e a d y   a l i g n   w i t h   l i v e   s e r v e r   e n d p o i n t s   t o d a y . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   2 9 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 9 4 . 1 1 8   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 3 9 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   f i n a l   d r y - r u n   r e n d e r i n g   t o   b a c k e n d   i n v o c a t i o n   s p e c s   f o r   c o m m a n d s   t h a t   c a n   a l r e a d y   w o r k   t o d a y ,   a d d i n g   i g n o r e d   t e s t s   f o r   l i v e   ` G E T   / h e a l t h ` ,   l i v e   ` G E T   / v 1 / m o d e l s ` ,   a n d   a   t h r o u g h p u t   ` P O S T   / v 1 / c h a t / c o m p l e t i o n s `   r e q u e s t   t h a t   p r e s e r v e s   t h e   s e l e c t e d   m o d e l   a n d   t o k e n   b u d g e t . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 9 4 . 1 1 8 ,   p a s s e d _ c a s e s = 4 8 ,   f a i l e d _ c a s e s = 3 ,   t o t a l _ c a s e s = 5 1 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   h a n d l e d   e v e r y   p r e v i o u s   p a r s e r / p l a n n i n g / d r y - r u n   l a y e r ,   b u t   ` b a c k e n d _ i n v o c a t i o n ( ) `   w a s   s t i l l   a   p l a c e h o l d e r ,   a n d   ` m o d e l s   l i s t `   h a d   n o t   y e t   b e e n   p r o m o t e d   i n t o   t h e   r e a l   b a c k e n d - f a c i n g   s e a m . 
 
 - -   N e x t :   i m p l e m e n t   c o n c r e t e   b a c k e n d   i n v o c a t i o n   s p e c s   f o r   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t `   u s i n g   t h e   r e s o l v e d   s e r v e r   b a s e   U R L   a n d   a u t h   p r e s e n c e . 
 
 - 
 
 - # # #   R u n   3 0 :   a d d   c l i   b a c k e n d   i n v o c a t i o n   s p e c s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 4 1 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   ` b a c k e n d _ i n v o c a t i o n ( & C l i ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   s o   ` s t a t u s `   m a p s   t o   l i v e   ` G E T   / h e a l t h ` ,   ` m o d e l s   l i s t `   m a p s   t o   l i v e   ` G E T   / v 1 / m o d e l s ` ,   a n d   ` b e n c h   t h r o u g h p u t `   m a p s   t o   a   l i v e   ` P O S T   / v 1 / c h a t / c o m p l e t i o n s `   i n v o c a t i o n   t h a t   p r e s e r v e s   ` - - m o d e l ` ,   s a m p l e s ,   t o k e n   b u d g e t ,   a n d   a u t h   p r e s e n c e . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 5 1 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 5 1 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   c r o s s e s   f r o m   d r y - r u n - o n l y   U X   i n t o   c o n c r e t e   b a c k e n d - f a c i n g   i n v o c a t i o n   s p e c s   f o r   c o m m a n d s   t h a t   c a n   a l r e a d y   w o r k   a g a i n s t   t h e   c u r r e n t   s e r v e r   t o d a y ,   w i t h o u t   n e e d i n g   t h e   f u t u r e   c o n t r o l - p l a n e   e n d p o i n t s   y e t . 
 
 - -   N e x t :   r a i s e   t h e   b a r   f r o m   b a c k e n d   i n v o c a t i o n   s p e c s   t o   a c t u a l   r e q u e s t   p a y l o a d   c o n s t r u c t i o n   o r   t h e   f i r s t   e x e c u t a b l e   h a n d l e r s   f o r   t h e s e   a l r e a d y - s u p p o r t e d   c o m m a n d s . 
 
 - 
 
 - # # #   R u n   3 1 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 9 4 . 4 4 4   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 4 7 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   b a c k e n d   i n v o c a t i o n   s p e c s   t o   e x e c u t a b l e   b a c k e n d   r e q u e s t   c o n s t r u c t i o n ,   r e q u i r i n g   f i n a l   H T T P   m e t h o d / u r l / h e a d e r / b o d y   r e q u e s t   o b j e c t s   w i t h   d e t e r m i n i s t i c   J S O N   p a y l o a d s   f o r   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 9 4 . 4 4 4 ,   p a s s e d _ c a s e s = 5 1 ,   f a i l e d _ c a s e s = 3 ,   t o t a l _ c a s e s = 5 4 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   h a d   p a r s e r ,   s u m m a r i e s ,   p l a n s ,   c o n t r a c t s ,   s t u b s ,   p r e v i e w s ,   d r y - r u n   r e n d e r i n g ,   a n d   i n v o c a t i o n   s p e c s ,   b u t   ` b a c k e n d _ r e q u e s t ( & C l i ) `   s t i l l   r e t u r n e d   ` S u m m a r y O n l y   {   c o m m a n d :   " r e q u e s t - u n i m p l e m e n t e d "   } `   i n s t e a d   o f   f i n a l   r e q u e s t   o b j e c t s . 
 
 - -   N e x t :   m a p   ` B a c k e n d I n v o c a t i o n : : H t t p C a l l `   i n t o   e x e c u t a b l e   ` B a c k e n d R e q u e s t : : H t t p R e q u e s t `   v a l u e s   w i t h   b e a r e r   h e a d e r s ,   J S O N   c o n t e n t - t y p e ,   a n d   d e t e r m i n i s t i c   b e n c h m a r k   p a y l o a d   g e n e r a t i o n . 
 
 - 
 
 - # # #   R u n   3 2 :   a d d   c l i   b a c k e n d   r e q u e s t   s p e c s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   1 9 : 4 9 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   ` b a c k e n d _ r e q u e s t ( & C l i ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   p l u s   h e l p e r s   f o r   b e a r e r   h e a d e r s ,   J S O N   h e a d e r s ,   d e t e r m i n i s t i c   b e n c h m a r k   p r o m p t   c o n s t r u c t i o n ,   a n d   e x a c t   c h a t   p a y l o a d   g e n e r a t i o n   f o r   t h r o u g h p u t   r e q u e s t s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 5 4 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 5 4 . 
 
 - -   I n s i g h t :   T h e   f i r s t   l i v e - c o m p a t i b l e   C L I   w o r k f l o w s   n o w   p r e s e r v e   t h e   f u l l   e x e c u t a b l e   b a c k e n d   r e q u e s t   b o u n d a r y   -   m e t h o d ,   U R L ,   a u t h   h e a d e r s ,   c o n t e n t - t y p e ,   a n d   d e t e r m i n i s t i c   J S O N   b o d y   -   w h i l e   s t i l l   r e m a i n i n g   e x e c u t i o n - f r e e . 
 
 - -   N e x t :   r a i s e   t h e   b a r   f r o m   r e q u e s t   c o n s t r u c t i o n   t o   t h e   f i r s t   l i v e   r e s p o n s e - h a n d l i n g   o r   e x e c u t a b l e   h a n d l e r   s e a m s   f o r   t h e   s a m e   w o r k f l o w s . 
 
 - 
 
 - # #   S e g m e n t   1 4 :   C L I   B a c k e n d   R e s p o n s e s 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   e x e c u t a b l e   b a c k e n d   r e q u e s t   c o n s t r u c t i o n   t o   b a c k e n d   r e s p o n s e   i n t e r p r e t a t i o n   f o r   t h e   s a m e   l i v e - c o m p a t i b l e   w o r k f l o w s ,   s t a r t i n g   w i t h   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t ` . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   3 3 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 9 4 . 7 3 7   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 0 1 
 
 - -   W h a t   c h a n g e d :   A d d e d   t h e   s e g m e n t   1 4   r e s p o n s e - p r e v i e w   s e a m   a n d   l o c a l   d e s e r i a l i z a b l e   D T O s   f o r   h e a l t h ,   m o d e l s   l i s t ,   a n d   t h r o u g h p u t   u s a g e   r e s p o n s e s ,   b u t   l e f t   ` b a c k e n d _ r e s p o n s e _ p r e v i e w ( ) `   i n t e n t i o n a l l y   u n i m p l e m e n t e d   f o r   t h e   n e w   l i v e - c o m p a t i b l e   w o r k f l o w s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 9 4 . 7 3 7 ,   p a s s e d _ c a s e s = 5 4 ,   f a i l e d _ c a s e s = 3 ,   t o t a l _ c a s e s = 5 7 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   h a d   e v e r y   l a y e r   t h r o u g h   e x e c u t a b l e   b a c k e n d   r e q u e s t   c o n s t r u c t i o n ,   b u t   i t   s t i l l   c o l l a p s e d   r e a l   r e s p o n s e   p a r s i n g   f o r   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t `   t o   ` S u m m a r y O n l y   {   c o m m a n d :   " r e s p o n s e - u n i m p l e m e n t e d "   } ` . 
 
 - -   N e x t :   p a r s e   t h e   r e a l   r e s p o n s e   b o d i e s   i n t o   C L I - l o c a l   p r e v i e w s   f o r   h e a l t h   s t a t u s ,   m o d e l   i d s / c o u n t ,   a n d   t h r o u g h p u t   u s a g e   m e t r i c s . 
 
 - 
 
 - # # #   R u n   3 4 :   a d d   c l i   b a c k e n d   r e s p o n s e   p r e v i e w s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 0 2 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   ` b a c k e n d _ r e s p o n s e _ p r e v i e w ( ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   s o   ` s t a t u s `   p a r s e s   h e a l t h   p a y l o a d s ,   ` m o d e l s   l i s t `   c o l l e c t s   m o d e l   i d s / c o u n t ,   a n d   ` b e n c h   t h r o u g h p u t `   r e a d s   ` u s a g e . t o t a l _ t o k e n s `   p l u s   ` u s a g e . t o k e n s _ p e r _ s e c o n d `   i n t o   C L I - l o c a l   p r e v i e w   v a l u e s . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 5 7 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 5 7 . 
 
 - -   I n s i g h t :   T h e   f i r s t   l i v e - c o m p a t i b l e   C L I   w o r k f l o w s   n o w   p r e s e r v e   t h e   f u l l   r e s p o n s e   s i d e   o f   t h e   c o n t r a c t   t o o :   r e q u e s t   c o n s t r u c t i o n   p l u s   d e t e r m i n i s t i c   r e s p o n s e   i n t e r p r e t a t i o n   w i t h o u t   f o r c i n g   r e u s e   o f   s e r v e r - o n l y   D T O s . 
 
 - -   N e x t :   r a i s e   t h e   b a r   f r o m   r e s p o n s e   p r e v i e w s   t o   t h e   f i r s t   r e a l   e x e c u t a b l e   h a n d l e r s   o r   u s e r - f a c i n g   l i v e   o u t p u t   r e n d e r i n g   f o r   c o m m a n d s   t h a t   a l r e a d y   w o r k   a g a i n s t   t h e   c u r r e n t   b a c k e n d . 
 
 - 
 
 - # #   S e g m e n t   1 5 :   C L I   L i v e   O u t p u t 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   i n t e r n a l   b a c k e n d   r e s p o n s e   p r e v i e w s   t o   f i n a l   u s e r - f a c i n g   l i v e   o u t p u t   r e n d e r i n g   f o r   t h e   a l r e a d y   l i v e - c o m p a t i b l e   w o r k f l o w s   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t ` . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   3 5 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 9 0 . 4 7 6   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 0 6 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   b a c k e n d   r e s p o n s e   p r e v i e w s   t o   f i n a l   u s e r - f a c i n g   l i v e   o u t p u t   r e n d e r i n g ,   b u t   l e f t   ` r e n d e r _ b a c k e n d _ r e s p o n s e ( ) `   a s   a   s h a l l o w   ` L I V E   { s u m m a r y } `   p l a c e h o l d e r . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 9 0 . 4 7 6 ,   p a s s e d _ c a s e s = 5 7 ,   f a i l e d _ c a s e s = 6 ,   t o t a l _ c a s e s = 6 3 . 
 
 - -   I n s i g h t :   T h e   C L I   a l r e a d y   p a r s e d   h e a l t h ,   m o d e l - l i s t ,   a n d   t h r o u g h p u t   r e s p o n s e s   c o r r e c t l y ,   b u t   i t   s t i l l   l a c k e d   f i n a l   t e x t / j s o n   p r e s e n t a t i o n   f o r   t h o s e   l i v e - c o m p a t i b l e   w o r k f l o w s . 
 
 - -   N e x t :   r e n d e r   ` B a c k e n d R e s p o n s e P r e v i e w `   i n t o   f i n a l   ` S T A T U S ` ,   ` M O D E L S ` ,   a n d   ` T H R O U G H P U T `   t e x t / j s o n   o u t p u t s . 
 
 - 
 
 - # # #   R u n   3 6 :   r e n d e r   c l i   l i v e   o u t p u t s   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 0 7 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   ` r e n d e r _ b a c k e n d _ r e s p o n s e ( ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   s o   t h e   l i v e - c o m p a t i b l e   c o m m a n d s   n o w   r e n d e r   f i n a l   t e x t / j s o n   o u t p u t   d i r e c t l y   f r o m   ` B a c k e n d R e s p o n s e P r e v i e w ` ,   i n c l u d i n g   h e a l t h   s u m m a r i e s ,   m o d e l - i d   l i s t s ,   a n d   t h r o u g h p u t   u s a g e   o u t p u t . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 6 3 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 6 3 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   c l o s e s   t h e   f u l l   l o o p   f o r   t h e   f i r s t   l i v e - c o m p a t i b l e   w o r k f l o w s ,   f r o m   p a r s e r   a n d   p l a n n i n g   a l l   t h e   w a y   t o   f i n a l   u s e r - f a c i n g   l i v e   o u t p u t . 
 
 - -   N e x t :   m o v e   f r o m   l i v e   o u t p u t   r e n d e r i n g   t o   t h e   f i r s t   r e a l   e x e c u t a b l e   h a n d l e r s   f o r   c o m m a n d s   t h a t   a l r e a d y   w o r k   t o d a y . 
 
 - 
 
 - # #   S e g m e n t   1 6 :   C L I   L i v e   E x e c u t i o n 
 
 - -   N e w   o b j e c t i v e :   r a i s e   t h e   C L I   b e n c h m a r k   f r o m   f i n a l   l i v e   o u t p u t   r e n d e r i n g   t o   t h e   f i r s t   r e a l   e x e c u t a b l e   h a n d l e r s   f o r   t h e   l i v e - c o m p a t i b l e   w o r k f l o w s   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t `   u s i n g   a n   i n j e c t a b l e   t r a n s p o r t   s e a m . 
 
 - -   B e n c h m a r k   d r i v e r :   ` . / a u t o r e s e a r c h . s h `   s t i l l   r u n s   i g n o r e d   ` l o c a l l l m - c l i `   t e s t s   a n d   r e p o r t s   ` c l i _ s u r f a c e _ s c o r e ` ,   ` p a s s e d _ c a s e s ` ,   ` f a i l e d _ c a s e s ` ,   a n d   ` t o t a l _ c a s e s ` . 
 
 - -   K e e p / d i s c a r d   r u l e   r e m a i n s   t e s t - d r i v e n :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   3 7 :   b a s e l i n e   -   c l i _ s u r f a c e _ s c o r e = 9 5 . 4 5 5   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 1 2 
 
 - -   W h a t   c h a n g e d :   E x p a n d e d   t h e   b e n c h m a r k   f r o m   l i v e   o u t p u t   r e n d e r i n g   t o   a n   i n j e c t a b l e   l i v e - e x e c u t i o n   s e a m ,   b u t   l e f t   ` e x e c u t e _ l i v e _ c o m m a n d _ w i t h ( ) `   a s   a   p l a c e h o l d e r   t h a t   i g n o r e d   t h e   t r a n s p o r t   r e s p o n s e   a n d   r e t u r n e d   ` L I V E   E X E C   { s u m m a r y } ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 9 5 . 4 5 5 ,   p a s s e d _ c a s e s = 6 3 ,   f a i l e d _ c a s e s = 3 ,   t o t a l _ c a s e s = 6 6 . 
 
 - -   I n s i g h t :   T h e   p i p e l i n e   a l r e a d y   h a d   c o r r e c t   r e q u e s t   c o n s t r u c t i o n   a n d   r e s p o n s e   r e n d e r i n g ,   b u t   t h e   e x e c u t o r   s t i l l   d r o p p e d   t h e   r e t u r n e d   s t a t u s / b o d y   i n s t e a d   o f   f e e d i n g   t h e m   i n t o   t h e   l i v e   r e n d e r e r . 
 
 - -   N e x t :   w i r e   t h e   t r a n s p o r t   r e s p o n s e   t h r o u g h   ` r e n d e r _ b a c k e n d _ r e s p o n s e ( ) `   w i t h o u t   c h a n g i n g   a n y   o t h e r   C L I   s e a m . 
 
 - 
 
 - # # #   R u n   3 8 :   a d d   c l i   l i v e   e x e c u t i o n   p i p e l i n e   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 1 3 
 
 - -   W h a t   c h a n g e d :   I m p l e m e n t e d   ` e x e c u t e _ l i v e _ c o m m a n d _ w i t h ( ) `   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s `   s o   l i v e - c o m p a t i b l e   c o m m a n d s   n o w   c a l l   t h e   i n j e c t e d   t r a n s p o r t   w i t h   ` B a c k e n d R e q u e s t ` ,   t h e n   p a s s   t h e   r e t u r n e d   ` s t a t u s _ c o d e `   a n d   ` b o d y `   i n t o   ` r e n d e r _ b a c k e n d _ r e s p o n s e ( ) ` . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 6 6 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 6 6 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   c o m p l e t e s   t h e   f i r s t   f u l l y   e x e c u t a b l e   e n d - t o - e n d   p a t h   f o r   t h e   l i v e - c o m p a t i b l e   w o r k f l o w s ,   f r o m   p a r s e r   t o   t r a n s p o r t   i n v o c a t i o n   t o   f i n a l   r e n d e r e d   o u t p u t . 
 
 - -   N e x t :   m o v e   f r o m   t r a n s p o r t - i n j e c t e d   e x e c u t i o n   t o   t h e   f i r s t   c o n c r e t e   H T T P   c l i e n t   s e a m   f o r   c o m m a n d s   t h a t   c a n   a l r e a d y   h i t   t h e   c u r r e n t   b a c k e n d   d i r e c t l y . 
 
 - 
 
 - # #   S e g m e n t   1 7 :   C L I   u r e q   H T T P   T r a n s p o r t 
 
 - 
 
 - -   O b j e c t i v e :   r e p l a c e   t h e   i n j e c t a b l e   f a k e   t r a n s p o r t   w i t h   a   c o n c r e t e   ` u r e q `   H T T P   c l i e n t   f o r   ` s t a t u s ` ,   ` m o d e l s   l i s t ` ,   a n d   ` b e n c h   t h r o u g h p u t ` . 
 
 - -   B e n c h m a r k :   ` . / a u t o r e s e a r c h . s h `   r u n s   i g n o r e d   ` c l i _ s u r f a c e _ * `   t e s t s   i n   ` c r a t e s / l o c a l l l m - c l i / s r c / m a i n . r s ` . 
 
 - -   K e e p / d i s c a r d   r u l e :   h i g h e r   ` c l i _ s u r f a c e _ s c o r e `   w i n s   w h i l e   t h e   n o r m a l   n o n - i g n o r e d   s u i t e s   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   3 9 :   a d d   u r e q   h t t p   t r a n s p o r t   a n d   e x e c u t e _ l i v e _ c o m m a n d   -   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 0 : 3 6 
 
 - -   W h a t   c h a n g e d :   A d d e d   ` u r e q `   t o   w o r k s p a c e   a n d   ` l o c a l l l m - c l i `   d e p s .   I m p l e m e n t e d   ` e x e c u t e _ l i v e _ c o m m a n d ( c l i ) `   u s i n g   ` u r e q `   a s   t h e   r e a l   H T T P   t r a n s p o r t ,   d e l e g a t i n g   t o   ` e x e c u t e _ l i v e _ c o m m a n d _ w i t h ( ) ` .   U p d a t e d   ` m a i n ( ) `   t o   c a l l   ` e x e c u t e _ l i v e _ c o m m a n d ( ) `   i n s t e a d   o f   t h e   s c a f f o l d   p l a c e h o l d e r .   A d d e d   3   n e w   i g n o r e d   b e n c h m a r k   t e s t s   v e r i f y i n g   t h e   i n j e c t a b l e   s e a m   c o r r e c t l y   r o u t e s   s t a t u s / m o d e l s / b e n c h   t h r o u g h   t h e   t r a n s p o r t   p i p e l i n e . 
 
 - -   R e s u l t :   c l i _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   p a s s e d _ c a s e s = 6 9 ,   f a i l e d _ c a s e s = 0 ,   t o t a l _ c a s e s = 6 9 . 
 
 - -   I n s i g h t :   T h e   C L I   n o w   h a s   a   r e a l   H T T P   c l i e n t   ( ` u r e q ` )   w i r e d   e n d - t o - e n d   f o r   l i v e - c o m p a t i b l e   c o m m a n d s .   T h e   i n j e c t a b l e   t r a n s p o r t   s e a m   r e m a i n s   a v a i l a b l e   f o r   t e s t i n g   w i t h o u t   a   r u n n i n g   s e r v e r .   T h e   C L I   i s   f u n c t i o n a l l y   c o m p l e t e   f o r   t h e   c o m m a n d s   t h a t   t h e   c u r r e n t   b a c k e n d   a l r e a d y   s u p p o r t s . 
 
 - -   N e x t :   C L I   i s   a t   n a t u r a l   s a t u r a t i o n   g i v e n   t h e   c u r r e n t   b a c k e n d .   F u r t h e r   p r o g r e s s   r e q u i r e s   n e w   a d m i n / c o n t r o l - p l a n e   e n d p o i n t s   i n   t h e   b a c k e n d   f o r   s c a n ,   l o a d ,   a u t h ,   c o n f i g ,   a n d   w a t c h   c o m m a n d s . 
 
 - 
 
 - # #   S e g m e n t   1 8 :   U n i f i e d   T a u r i   R u n t i m e   M a n a g e r 
 
 - 
 
 - -   O b j e c t i v e :   r e p l a c e   t h e   s p l i t   d e s k t o p   r u n t i m e   c o n t r o l   f l o w   w i t h   o n e   s a v e d   r u n t i m e - m a n a g e r   s u r f a c e   t h a t   o w n s   l o c a l   s t a r t u p ,   r e m o t e   r o u t i n g ,   a n d   l o c a l   m o d e l / r u n t i m e   s e t t i n g s . 
 
 - -   B e n c h m a r k :   t a r g e t e d   v e r i f i c a t i o n   b u n d l e   u s i n g   ` n p m   t e s t ` ,   ` n p m   r u n   b u i l d ` ,   a n d   ` c a r g o   c h e c k `   p l u s   a c c e p t a n c e   c h e c k s   f o r   a   s i n g l e   r u n t i m e   c o n t r o l   p l a n e   a n d   u p d a t e d   r u n t i m e   U I . 
 
 - -   K e e p / d i s c a r d   r u l e :   a   k e e p   r e q u i r e s   o n e   w o r k i n g   c o n f i g / s t a r t   p a t h ,   n o   b r o k e n   s i d e b a r   s t a r t   b u t t o n ,   a n d   g r e e n   v e r i f i c a t i o n   a c r o s s   f r o n t e n d   a n d   R u s t   c h e c k s . 
 
 - 
 
 - # # #   R u n   4 0 :   u n i f y   r u n t i m e   m a n a g e r   c o n f i g / s t a r t   f l o w   a n d   r e f a c t o r   r u n t i m e   U I   -   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 3 : 3 5 
 
 - -   W h a t   c h a n g e d :   R e m o v e d   t h e   a c t i v e   d e p e n d e n c y   o n   ` u s e S e r v e r P r o c e s s `   a n d   t h e   e m b e d d e d   l e g a c y   ` S e r v e r P a n e l `   f r o m   t h e   s i d e b a r   f l o w ,   r e b u i l t   ` R u n t i m e S e t t i n g s D r a w e r `   i n t o   a   f u l l   l o c a l / r e m o t e   r u n t i m e   w o r k s p a c e ,   a d d e d   T a u r i   w r a p p e r s   f o r   G P U / m o d e l   p i c k i n g   a n d   s c a n n i n g ,   m a d e   t h e   s i d e b a r   r u n t i m e   c a r d   r o u t e   s e t u p / s t a r t   f r o m   t h e   s a m e   s a v e d   r u n t i m e   s t a t e ,   a n d   r e f r e s h e d   r u n t i m e / s i d e b a r / g l o b a l   s t y l i n g   t o w a r d   a   c l e a n e r   A I   d e s k t o p   i d e n t i t y . 
 
 - -   R e s u l t :   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   u n i f i e d _ c o n t r o l _ p l a n e = 1 ,   d e s i g n _ r e f a c t o r _ d o n e = 1 . 
 
 - -   I n s i g h t :   T h e   r u n t i m e   f a i l u r e s   w e r e   c a u s e d   b y   s t a t e   o w n e r s h i p   d r i f t ,   n o t   s t a r t u p   l o g i c   a l o n e .   O n c e   l o c a l   r u n t i m e   c o n f i g u r a t i o n   a n d   s t a r t u p   l i v e d   i n   t h e   s a m e   d o m a i n ,   b o t h   r u n t i m e   e n t r y   p o i n t s   a l i g n e d   a n d   t h e   b r o k e n   s t a r t   p a t h   d i s a p p e a r e d . 
 
 - -   N e x t :   i m p r o v e   r e a d i n e s s   p r o b i n g   b e y o n d   r a w   T C P - o p e n   d e t e c t i o n ,   t h e n   s m o k e - t e s t   t h e   d e s k t o p   r u n t i m e   e n d   t o   e n d   a g a i n s t   a   r e a l   l o c a l   m o d e l   a n d   r e c o r d   a   s t r i c t e r   f o l l o w - u p   s c o r e   f o r   s t a r t u p / r e a d i n e s s   b e h a v i o r . 
 
 - 
 
 - # # #   R u n   4 1 :   r e p l a c e   t c p - o n l y   r e a d i n e s s   w i t h   / h e a l t h   r e a d i n e s s   p r o b e   -   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 3 : 4 3 
 
 - -   W h a t   c h a n g e d :   R e p l a c e d   t h e   r u n t i m e   s t a r t u p   r e a d i n e s s   c h e c k   i n   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / h e a l t h . r s `   s o   i t   n o w   i s s u e s   ` G E T   / h e a l t h ` ,   r e q u i r e s   a n   H T T P   2 0 0   r e s p o n s e ,   a n d   v a l i d a t e s   ` { " s t a t u s " : " o k " } `   b e f o r e   m a r k i n g   t h e   l o c a l   A P I   a s   r e a d y .   A d d e d   R u s t   t e s t s   c o v e r i n g   h e a l t h y   H T T P   s u c c e s s ,   u n h e a l t h y   J S O N   p a y l o a d   r e j e c t i o n ,   a n d   p l a i n - o p e n - p o r t   r e j e c t i o n . 
 
 - -   R e s u l t :   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   h e a l t h _ p r o b e _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T C P - o p e n   w a s   t o o   w e a k   f o r   a   d e s k t o p - m a n a g e d   A P I   b e c a u s e   a n y   b o u n d   s o c k e t   c o u l d   m a s q u e r a d e   a s   r e a d i n e s s .   A   l i g h t w e i g h t   h e a l t h   r e q u e s t   g i v e s   t h e   r u n t i m e   m a n a g e r   a   m u c h   m o r e   t r u t h f u l   s t a r t u p   s i g n a l   w i t h o u t   i n t r o d u c i n g   f r o n t e n d   c o m p l e x i t y . 
 
 - -   N e x t :   r u n   a n   e n d - t o - e n d   d e s k t o p   s m o k e   t e s t   a g a i n s t   a   r e a l   l o c a l   m o d e l   s o   t h e   n e x t   s e g m e n t   c a n   s c o r e   s t a r t u p   b e h a v i o r   f r o m   t h e   a c t u a l   a p p   s u r f a c e ,   n o t   j u s t   b a c k e n d   v e r i f i c a t i o n . 
 
 - 
 
 - # # #   R u n   4 2 :   a d d   r u n t i m e   U I   s m o k e   c o v e r a g e   a n d   p r e s e r v e   s a v e d   m o d e l   o n   e m p t y   r e s c a n s   -   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 6   2 3 : 5 0 
 
 - -   W h a t   c h a n g e d :   A d d e d   j s d o m - b a s e d   r u n t i m e   s m o k e   t e s t s   f o r   ` R u n t i m e S t a t u s C a r d `   a n d   ` R u n t i m e S e t t i n g s D r a w e r ` ,   i n s t a l l e d   ` j s d o m `   f o r   V i t e s t   b r o w s e r l e s s   c o m p o n e n t   c o v e r a g e ,   a n d   f i x e d   ` c h o o s e M o d e l ( ) `   i n   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S e t t i n g s D r a w e r . t s x `   s o   a   p r e v i o u s l y   s a v e d   ` m o d e l _ p a t h `   i s   p r e s e r v e d   w h e n   a   m o d e l s - f o l d e r   r e s c a n   r e t u r n s   n o   r e s u l t s . 
 
 - -   R e s u l t :   r u n t i m e _ s u r f a c e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   r u n t i m e _ s m o k e _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   f i r s t   u s e f u l   a p p - s u r f a c e   s m o k e   t e s t   i m m e d i a t e l y   c a u g h t   a   r e a l   r e g r e s s i o n   t h a t   b a c k e n d / r u n t i m e   c h e c k s   c o u l d   n o t   s e e :   a   v a l i d   s a v e d   m o d e l   c o u l d   d i s a p p e a r   f r o m   d r a w e r   s t a t e   a f t e r   a n   e m p t y   s c a n ,   w h i c h   s i l e n t l y   d i s a b l e d   t h e   u n i f i e d   s t a r t   a c t i o n . 
 
 - -   N e x t :   p u s h   t h e   s m o k e   c o v e r a g e   o n e   s t e p   f u r t h e r   w i t h   a   f o c u s e d   e n d - t o - e n d   s t a r t u p   p a t h   c h e c k ,   i d e a l l y   v a l i d a t i n g   t h a t   a   s a v e d   l o c a l   c o n f i g   t r a n s i t i o n s   f r o m   s e t u p   - >   s t a r t i n g   - >   r e a d y   c o r r e c t l y   f r o m   t h e   d e s k t o p   s u r f a c e . 
 
 - 
 
 - # #   S e g m e n t   1 9 :   T a u r i   R u n t i m e   L i f e c y c l e   A c c e p t a n c e 
 
 - 
 
 - -   O b j e c t i v e :   r e p l a c e   t h e   s t a l e   C L I - o r i e n t e d   b e n c h m a r k   w i t h   a   T a u r i   d e s k t o p   l i f e c y c l e   b e n c h m a r k   a n d   h a r d e n   t h e   a p p - s u r f a c e   c o n t r a c t   a r o u n d   l o c a l / r e m o t e   m o d e   t r a n s i t i o n s . 
 
 - -   B e n c h m a r k :   ` . / a u t o r e s e a r c h . s h `   n o w   r u n s   ` e x p e r i m e n t s / b e n c h _ t a u r i _ r u n t i m e _ s u r f a c e . p y ` ,   w h i c h   s c o r e s   r u n t i m e - f o c u s e d   f r o n t e n d   t e s t s   p l u s   ` n p m   r u n   b u i l d `   a n d   ` c a r g o   c h e c k ` . 
 
 - -   K e e p / d i s c a r d   r u l e :   h i g h e r   ` r u n t i m e _ l i f e c y c l e _ s c o r e `   w i n s   w h i l e   t h e   a c t i v e   d e s k t o p   r u n t i m e   C T A   a n d   v e r i f i c a t i o n   b u n d l e   r e m a i n   g r e e n . 
 
 - 
 
 - # # #   R u n   4 3 :   a l i g n   t h e   T a u r i   l i f e c y c l e   h a r n e s s   a n d   k e e p   t h e   l o c a l   C T A   v i s i b l e   d u r i n g   m o d e   s w i t c h e s   -   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 7   0 1 : 2 6 
 
 - -   W h a t   c h a n g e d :   R e p l a c e d   t h e   s t a l e   C L I   b e n c h m a r k   i n   ` a u t o r e s e a r c h . s h `   w i t h   a   n e w   ` e x p e r i m e n t s / b e n c h _ t a u r i _ r u n t i m e _ s u r f a c e . p y `   d r i v e r ,   a d d e d   a   r u n t i m e   s m o k e   t e s t   t h a t   s w i t c h e s   ` R u n t i m e S e t t i n g s D r a w e r `   f r o m   r e m o t e   t o   l o c a l   m o d e ,   a n d   f i x e d   t h e   d r a w e r   f o o t e r   i n   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S e t t i n g s D r a w e r . t s x `   s o   t h e   l o c a l   p r i m a r y   C T A   i s   k e y e d   o f f   t h e   e d i t e d   l o c a l   ` m o d e `   i n s t e a d   o f   t h e   p r e v i o u s l y   s a v e d   ` s n a p s h o t . c o n f i g . c o n n e c t i o n _ m o d e ` . 
 
 - -   R e s u l t :   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   l o c a l _ m o d e _ c t a _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   p r e v i o u s   s e g m e n t   w a s   s a t u r a t e d   p a r t l y   b e c a u s e   t h e   h a r n e s s   w a s   n o   l o n g e r   m e a s u r i n g   t h e   l i v e   d e s k t o p   c o n t r a c t .   O n c e   t h e   b e n c h m a r k   t a r g e t e d   t h e   T a u r i   r u n t i m e   s u r f a c e   d i r e c t l y ,   i t   i m m e d i a t e l y   e x p o s e d   a   r e a l   l i f e c y c l e   r e g r e s s i o n :   s w i t c h i n g   f r o m   r e m o t e   t o   l o c a l   m o d e   c o u l d   h i d e   t h e   a p p l y / s t a r t   C T A   b e f o r e   s a v e ,   m a k i n g   t h e   s a v e d   l o c a l   f l o w   f e e l   b r o k e n   e v e n   t h o u g h   t h e   b a c k e n d   s t a t e   w a s   v a l i d . 
 
 - -   N e x t :   r a i s e   t h e   l i f e c y c l e   s c o r e   a g a i n   w i t h   a   s t r i c t e r   s a v e d - s t a r t u p   p a t h   c h e c k ,   i d e a l l y   c o v e r i n g   t h e   ` s t o p p e d   - >   s t a r t i n g   - >   r e a d y `   t r a n s i t i o n   a n d   d e g r a d e d   b e h a v i o r   a f t e r   a   f a i l e d   h e a l t h   r e v a l i d a t i o n . 
 
 - 
 
 - # # #   R u n   4 4 :   c o v e r   s a v e d   l o c a l   s t a r t u p   t r a n s i t i o n s   a n d   l o c a l   o n b o a r d i n g   f r o m   b r o w s e   t o   r e a d y   -   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 7   0 1 : 4 0 
 
 - -   W h a t   c h a n g e d :   E x t e n d e d   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S u r f a c e . t e s t . t s x `   w i t h   t w o   h o o k - b a c k e d   l i f e c y c l e   c h e c k s   t h a t   r u n   t h r o u g h   ` u s e R u n t i m e M a n a g e r ` :   o n e   n o w   r e q u i r e s   a   s a v e d   l o c a l   c o n f i g   t o   e x p o s e   ` L o c a l   A P I   o f f l i n e   - >   S t a r t i n g   l o c a l   A P I   - >   R e a d y ` ,   a n d   a n o t h e r   e x e r c i s e s   l o c a l   o n b o a r d i n g   b y   b r o w s i n g   a   m o d e l s   f o l d e r ,   a u t o - s e l e c t i n g   t h e   d i s c o v e r e d   m o d e l ,   s a v i n g   c o n f i g ,   a n d   s t a r t i n g   t h e   l o c a l   A P I   f r o m   t h e   s a m e   d r a w e r   f l o w .   U p d a t e d   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s `   t o   p u b l i s h   o p t i m i s t i c   ` s t a r t i n g `   a n d   ` s t o p p i n g `   s n a p s h o t s   w h i l e   t h e   T a u r i   c o m m a n d s   a r e   i n   f l i g h t .   R a i s e d   ` e x p e r i m e n t s / b e n c h _ t a u r i _ r u n t i m e _ s u r f a c e . p y `   s o   t h e   b e n c h m a r k   n o w   r e c o r d s   ` l o c a l _ m o d e _ c t a _ p a s s e d ` ,   ` s a v e d _ s t a r t u p _ f l o w _ p a s s e d ` ,   a n d   ` l o c a l _ o n b o a r d i n g _ f l o w _ p a s s e d `   a s   e x p l i c i t   l i f e c y c l e   c h e c k s   a l o n g s i d e   t h e   b r o a d e r   r u n t i m e   s u i t e . 
 
 - -   R e s u l t :   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   l o c a l _ m o d e _ c t a _ p a s s e d = 1 ,   s a v e d _ s t a r t u p _ f l o w _ p a s s e d = 1 ,   l o c a l _ o n b o a r d i n g _ f l o w _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   s a v e d   l o c a l   s t a r t u p   f l o w   w a s   p r e v i o u s l y   t r u s t w o r t h y   o n l y   a f t e r   t h e   b a c k e n d   r e t u r n e d ;   t h e   d e s k t o p   s u r f a c e   s h o w e d   ` W o r k i n g . . . `   b u t   s k i p p e d   t h e   v i s i b l e   ` s t a r t i n g `   s t a t e   e n t i r e l y .   M o v i n g   t h e   i n - f l i g h t   s t a t e   i n t o   ` u s e R u n t i m e M a n a g e r `   c l o s e s   t h a t   U X   g a p   a n d   m a k e s   t h e   s t a t u s   c a r d / d r a w e r   r e f l e c t   t h e   r e a l   l i f e c y c l e   i m m e d i a t e l y .   T h e   o n b o a r d i n g   s m o k e   a l s o   p r o v e s   t h e   u n i f i e d   d r a w e r   n o w   c o v e r s   b r o w s e   - >   a u t o - s e l e c t   - >   s a v e   - >   s t a r t   w i t h o u t   f a l l i n g   b a c k   t o   s e p a r a t e   l e g a c y   c o n t r o l s . 
 
 - -   N e x t :   k e e p   t h e   l i f e c y c l e   s e g m e n t   f o c u s e d   o n   t r u t h f u l n e s s   a f t e r   s t a r t u p ,   e s p e c i a l l y   p e r i o d i c   ` / h e a l t h `   r e v a l i d a t i o n   t h a t   c a n   d e m o t e   a   s t a l e   ` r e a d y `   p r o c e s s   i n t o   ` d e g r a d e d `   w h e n   t h e   c h i l d   s t o p s   s e r v i n g   c o r r e c t l y . 
 
 - 
 
 - # # #   R u n   4 5 :   r e v a l i d a t e   m a n a g e d   l o c a l   h e a l t h   a f t e r   s t a r t u p   a n d   s u r f a c e   d e g r a d e d   s t a t e   -   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 7   0 3 : 1 1 
 
 - -   W h a t   c h a n g e d :   A d d e d   a   d e g r a d e d - s t a t e   l i f e c y c l e   c h e c k   t o   ` t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S u r f a c e . t e s t . t s x ` ,   e x t e n d e d   ` e x p e r i m e n t s / b e n c h _ t a u r i _ r u n t i m e _ s u r f a c e . p y `   w i t h   ` h e a l t h _ r e v a l i d a t i o n _ p a s s e d ` ,   a n d   u p d a t e d   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / h e a l t h . r s `   p l u s   ` t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s `   s o   a   r u n n i n g   m a n a g e d   l o c a l   c h i l d   i s   p e r i o d i c a l l y   r e v a l i d a t e d   v i a   ` / h e a l t h ` .   T h e   r u n t i m e   n o w   d e m o t e s   s t a l e   ` r e a d y `   s t a t e   t o   ` d e g r a d e d `   w h e n   t h e   p r o c e s s   i s   s t i l l   a l i v e   b u t   n o   l o n g e r   s e r v e s   a   h e a l t h y   e n d p o i n t ,   a n d   c l e a r s   t h e   ` h e a l t h _ c h e c k _ f a i l e d `   e r r o r   w h e n   h e a l t h   r e c o v e r s .   A d d e d   R u s t   t e s t s   c o v e r i n g   b o t h   t h e   d e g r a d e   a n d   r e c o v e r y   p a t h s . 
 
 - -   R e s u l t :   r u n t i m e _ l i f e c y c l e _ s c o r e = 1 0 0 . 0 ,   u n i t _ p a s s e d = 1 ,   b u i l d _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   l o c a l _ m o d e _ c t a _ p a s s e d = 1 ,   s a v e d _ s t a r t u p _ f l o w _ p a s s e d = 1 ,   l o c a l _ o n b o a r d i n g _ f l o w _ p a s s e d = 1 ,   h e a l t h _ r e v a l i d a t i o n _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   f r o n t e n d   s u r f a c e   w a s   a l r e a d y   h o n e s t   o n c e   i t   r e c e i v e d   a   d e g r a d e d   s n a p s h o t ;   t h e   r e a l   l i f e c y c l e   g a p   w a s   t h a t   b a c k e n d   r u n t i m e   s t a t e   c o u l d   s t a y   s t u c k   a t   ` r e a d y `   f o r e v e r   a s   l o n g   a s   t h e   c h i l d   p r o c e s s   h a d   n o t   e x i t e d .   R e v a l i d a t i n g   ` / h e a l t h `   i n s i d e   r u n t i m e   s t a t e   r e f r e s h   c l o s e s   t h a t   t r u t h f u l n e s s   g a p   w i t h o u t   r e i n t r o d u c i n g   a   s e c o n d   f r o n t e n d   c o n t r o l   p l a n e . 
 
 - -   N e x t :   t h i s   l i f e c y c l e   s e g m e n t   i s   s a t u r a t e d   a g a i n   a t   ` 1 0 0 . 0 % ` .   T h e   n e x t   w o r t h w h i l e   m o v e   s h o u l d   r a i s e   t h e   b a r   b e y o n d   s t a t e   t r u t h f u l n e s s ,   l i k e l y   a r o u n d   a   h i g h e r - f i d e l i t y   d e s k t o p   i n t e g r a t i o n   c h e c k   o r   a   r e a l   m a n a g e d - r u n t i m e   s m o k e   p a t h   a g a i n s t   a n   a c t u a l   l o c a l   m o d e l   p r o c e s s . 
 
 - 
 
 - # #   S e g m e n t   2 0 :   l o c a l l l m   B a t c h   A s s e r t 
 
 - 
 
 - -   O b j e c t i v e :   s t o p   t h e   l o c a l   ` l o c a l l l m `   s e r v e r   f r o m   c r a s h i n g   o n   f i r s t   c h a t   c o m p l e t i o n   w i t h   ` G G M L _ A S S E R T ( n _ t o k e n s _ a l l   < =   c p a r a m s . n _ b a t c h ) ` . 
 
 - -   B e n c h m a r k :   ` . / a u t o r e s e a r c h . s h `   n o w   r u n s   a   f o c u s e d   p r o m p t - p r e f i l l   r e g r e s s i o n   h a r n e s s   i n   ` e x p e r i m e n t s / b e n c h _ l o c a l l l m _ p r e f i l l _ b a t c h . p y ` . 
 
 - -   K e e p / d i s c a r d   r u l e :   h i g h e r   ` p r e f i l l _ b a t c h _ a s s e r t _ s c o r e `   w i n s   w h i l e   t h e   t a r g e t e d   p r o m p t - p r e f i l l   c h e c k s ,   ` c a r g o   c h e c k ` ,   a n d   a   r e a l   ` L O C A L L L M _ B A T C H = 1 2 8 `   c o m p l e t i o n   r e m a i n   g r e e n . 
 
 - 
 
 - # #   S e g m e n t   2 1 :   T a u r i   C h a t   A c t i v e   H i s t o r y 
 
 + # #   K e y   I n s i g h t s 
 
 + 1 .   * * R o o t   c a u s e * * :   ` s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d `   a p e n a s   o b t i n h a   a   U R L   d o   r u n t i m e   s e m   v e r i f i c a r   ` p r o c e s s _ r u n n i n g `   o u   ` r e a d y ` 
 
 + 2 .   * * F i x   p a t t e r n * * :   V a l i d a r   e s t a d o   a n t e s   d e   s p a w n a r   b a c k g r o u n d   t a s k ,   r e t o r n a n d o   e r r o   d e s c r i t i v o   i m e d i a t o 
 
 + 3 .   * * E r r o r   m e s s a g e s * * :   D i f e r e n c i a r   e n t r e   " r u n t i m e   n % o   i n i c i a d o " ,   " m o d e l o   c a r r e g a n d o " ,   " e r r o   n o   r u n t i m e " ,   e t c . 
 
   
 
 - -   O b j e c t i v e :   m a k e   a   n e w l y   s e n t   m e s s a g e   c r e a t e / s e l e c t   i t s   c h a t   i m m e d i a t e l y ,   k e e p   t h e   l i v e   g e n e r a t i o n   a t t a c h e d   t o   t h a t   c h a t ,   a n d   p r e s e r v e   h i s t o r y   w h e n   r e v i s i t i n g   g e n e r a t e d   c h a t s . 
 
 - -   B e n c h m a r k :   ` . / a u t o r e s e a r c h . s h `   n o w   r u n s   f o c u s e d   f r o n t e n d   r e g r e s s i o n s   i n   ` s r c / A p p . t e s t . t s x `   a n d   ` s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x `   p l u s   ` n p m   r u n   b u i l d ` . 
 
 - -   K e e p / d i s c a r d   r u l e :   h i g h e r   ` c h a t _ h i s t o r y _ s c o r e `   w i n s   w h i l e   b o t h   t h e   a p p - l e v e l   s e n d / c r e a t e / h i s t o r y   f l o w   a n d   t h e   s t a l e - r e q u e s t   a b o r t   g u a r d   r e m a i n   g r e e n . 
 
 + # #   N e x t   I d e a s 
 
 + -   [ x ]   I m p l e m e n t a r   v a l i d a % % o   d e   e s t a d o   p r % - H T T P 
 
 + -   [ x ]   A d i c i o n a r   m e n s a g e n s   d e   e r r o   d e s c r i t i v a s 
 
 + -   [   ]   T e s t a r   m a n u a l m e n t e   m o d o   l o c a l   v s   r e m o t o 
 
 + -   [   ]   A d i c i o n a r   h e a l t h   c h e c k   H T T P   o p c i o n a l   ( G E T   / h e a l t h ) 
 
   
 
 - # # #   R u n   4 7 :   p r e s e r v e   i n - f l i g h t   g e n e r a t i o n   w h e n   c h a t I d   s w i t c h e s   t o   t h e   n e w l y   c r e a t e d   c h a t   -   c h a t _ h i s t o r y _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 8   2 0 : 0 6 
 
 - -   W h a t   c h a n g e d :   A d d e d   a n   a p p - l e v e l   r e g r e s s i o n   f o r   s e n d i n g   f r o m   t h e   e m p t y   c o m p o s e r   i n t o   a   b r a n d - n e w   c h a t ,   t h e n   u p d a t e d   ` t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x `   t o   t r a c k   t h e   p e n d i n g   r e q u e s t   c h a t   i d   s o   ` c h a t I d `   c h a n g e s   o n l y   a b o r t   w h e n   t h e   u s e r   t r u l y   s w i t c h e s   a w a y   t o   a n o t h e r   c h a t ,   n o t   w h e n   t h e   c o m p o s e r   p r o m o t e s   ` n u l l `   i n t o   t h e   j u s t - c r e a t e d   c h a t . 
 
 - -   R e s u l t :   c h a t _ h i s t o r y _ s c o r e = 1 0 0 . 0 ,   a p p _ s e n d _ f l o w _ p a s s e d = 1 ,   c h a t _ s w i t c h _ a b o r t _ g u a r d _ p a s s e d = 1 ,   f r o n t e n d _ t e s t s _ p a s s e d = 1 ,   f r o n t e n d _ b u i l d _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   p r e v i o u s   s a v e d - c h a t   r a c e   f i x   w a s   d i r e c t i o n a l l y   r i g h t   b u t   t o o   b r o a d .   ` n u l l   - >   n e w l y   c r e a t e d   c h a t   i d `   i s   p a r t   o f   t h e   s a m e   s e n d   f l o w ,   n o t   a   u s e r   n a v i g a t i o n   a w a y   f r o m   t h e   a c t i v e   r e q u e s t . 
 
 - -   N e x t :   i f   m o r e   r e p o r t s   a p p e a r ,   r a i s e   t h e   b a r   w i t h   a   b r o w s e r / E 2 E   s m o k e   t h a t   s e n d s   a   m e s s a g e ,   s w i t c h e s   c h a t s   m i d - s t r e a m ,   a n d   r e t u r n s   t o   c o n f i r m   p e r s i s t e d   h i s t o r y   f r o m   t h e   r e n d e r e d   a p p   s h e l l . 
 
 - -   I n i t i a l   h y p o t h e s i s :   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s `   s t i l l   u s e s   ` l l a m a _ b a t c h _ g e t _ o n e ( ) `   f o r   f u l l   p r o m p t   p r e f i l l ,   w h i c h   l i k e l y   r e q u e s t s   l o g i t s   f o r   e v e r y   p r o m p t   t o k e n .   N e w e r   l l a m a . c p p   o u t p u t - b u f f e r   s e m a n t i c s   a p p e a r   t o   n e e d   a n   e x p l i c i t   b a t c h   t h a t   o n l y   a s k s   f o r   l o g i t s   o n   t h e   f i n a l   p r o m p t   t o k e n   a n d   s p l i t s   l a r g e r   p r o m p t s   b y   ` n _ b a t c h ` . 
 
 - -   B a s e l i n e   s t a t u s :   p e n d i n g   f i r s t   r e d   r u n . 
 
 + - - - 
 
   
 
 - # # #   R u n   4 6 :   c h u n k   p r o m p t   p r e f i l l   e x p l i c i t l y   a n d   f i x   l i v e   b a t c h   m e t a d a t a   -   p r e f i l l _ b a t c h _ a s s e r t _ s c o r e = 1 0 0 . 0   ( K E E P ) 
 
 - -   T i m e s t a m p :   2 0 2 6 - 0 3 - 2 7   1 5 : 0 8 
 
 - -   W h a t   c h a n g e d :   R e p l a c e d   f u l l - p r o m p t   p r e f i l l   i n   ` c r a t e s / i n f e r e n c e - c o r e / s r c / s e s s i o n . r s `   w i t h   a n   e x p l i c i t   c h u n k e d   ` l l a m a _ b a t c h _ i n i t ( ) `   p a t h   t h a t   o n l y   r e q u e s t s   l o g i t s   f o r   t h e   f i n a l   p r o m p t   t o k e n   a n d   s p l i t s   p r o m p t s   b y   ` n _ b a t c h ` .   P a s s e d   ` n _ b a t c h `   f r o m   ` c r a t e s / i n f e r e n c e - c o r e / s r c / e n g i n e . r s ` ,   b o u n d   ` l l a m a _ g e t _ m e m o r y `   /   ` l l a m a _ m e m o r y _ c l e a r `   i n   ` c r a t e s / l l a m a - s y s / s r c / l i b . r s ` ,   a n d   c l e a r e d   c o n t e x t   m e m o r y   a f t e r   w a r m u p   s o   t h e   l i v e   r e p r o   s t a r t e d   f r o m   a   c l e a n   s t a t e .   T h e   d e c i s i v e   l i v e   f i x   w a s   a l s o   w i r i n g   ` b a t c h . n _ t o k e n s `   c o r r e c t l y   b e f o r e   e a c h   ` l l a m a _ d e c o d e ( ) `   c a l l . 
 
 - -   R e s u l t :   p r e f i l l _ b a t c h _ a s s e r t _ s c o r e = 1 0 0 . 0 ,   p r e f i l l _ p l a n _ p a s s e d = 1 ,   c a r g o _ c h e c k _ p a s s e d = 1 ,   s e r v e r _ b u i l d _ p a s s e d = 1 ,   l i v e _ c o m p l e t i o n _ p a s s e d = 1 . 
 
 - -   I n s i g h t :   T h e   o r i g i n a l   G G M L   a s s e r t   c a m e   f r o m   t h e   o l d   s h o r t h a n d   b a t c h   p a t h   o v e r - r e q u e s t i n g   p r o m p t   o u t p u t s ,   b u t   t h e   f i r s t   e x p l i c i t   p r e f i l l   i m p l e m e n t a t i o n   s t i l l   f a i l e d   l i v e   b e c a u s e   ` l l a m a _ b a t c h _ i n i t ( ) `   l e a v e s   ` n _ t o k e n s `   u n i n i t i a l i z e d .   O n c e   t h e   p r e f i l l   b a t c h   b o t h   r e q u e s t e d   o n l y   t h e   f i n a l   p r o m p t   l o g i t   a n d   r e p o r t e d   a   v a l i d   t o k e n   c o u n t ,   t h e   r e a l   ` L O C A L L L M _ B A T C H = 1 2 8 `   c o m p l e t i o n   s u c c e e d e d   a g a i n s t   t h e   l o c a l   Q w e n   G G U F   w i t h o u t   c r a s h i n g   o r   r e t u r n i n g   ` g e n e r a t i o n _ f a i l e d ` . 
 
 - -   N e x t :   k e e p   t h i s   b r a n c h   s t a t e   a n d   c o n s i d e r   a   f o l l o w - u p   h a r d e n i n g   s e g m e n t   a r o u n d   l o n g e r   m u l t i - c h u n k   p r o m p t s ,   m u l t i - s e q u e n c e   c o m p a t i b i l i t y ,   o r   a   r e g r e s s i o n   h a r n e s s   t h a t   d i s t i n g u i s h e s   w a r m u p - o n l y   s t a r t u p   s u c c e s s   f r o m   f i r s t - r e q u e s t   d e c o d e   s u c c e s s . 
 
 d i f f   - - g i t   a / t a u r i - a p p / A G E N T S . m d   b / t a u r i - a p p / A G E N T S . m d 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 8 d 4 f 9 0 5 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / A G E N T S . m d 
 
 @ @   - 0 , 0   + 1 , 5 8   @ @ 
 
 + #   c o n t e x t - m o d e        M A N D A T O R Y   r o u t i n g   r u l e s 
 
 + 
 
 + Y o u   h a v e   c o n t e x t - m o d e   M C P   t o o l s   a v a i l a b l e .   T h e s e   r u l e s   a r e   N O T   o p t i o n a l        t h e y   p r o t e c t   y o u r   c o n t e x t   w i n d o w   f r o m   f l o o d i n g .   A   s i n g l e   u n r o u t e d   c o m m a n d   c a n   d u m p   5 6   K B   i n t o   c o n t e x t   a n d   w a s t e   t h e   e n t i r e   s e s s i o n . 
 
 + 
 
 + # #   B L O C K E D   c o m m a n d s        d o   N O T   a t t e m p t   t h e s e 
 
 + 
 
 + # # #   c u r l   /   w g e t        B L O C K E D 
 
 + A n y   s h e l l   c o m m a n d   c o n t a i n i n g   ` c u r l `   o r   ` w g e t `   w i l l   b e   i n t e r c e p t e d   a n d   b l o c k e d   b y   t h e   c o n t e x t - m o d e   p l u g i n .   D o   N O T   r e t r y . 
 
 + I n s t e a d   u s e : 
 
 + -   ` c o n t e x t - m o d e _ c t x _ f e t c h _ a n d _ i n d e x ( u r l ,   s o u r c e ) `   t o   f e t c h   a n d   i n d e x   w e b   p a g e s 
 
 + -   ` c o n t e x t - m o d e _ c t x _ e x e c u t e ( l a n g u a g e :   " j a v a s c r i p t " ,   c o d e :   " c o n s t   r   =   a w a i t   f e t c h ( . . . ) " ) `   t o   r u n   H T T P   c a l l s   i n   s a n d b o x 
 
 + 
 
 + # # #   I n l i n e   H T T P        B L O C K E D 
 
 + A n y   s h e l l   c o m m a n d   c o n t a i n i n g   ` f e t c h ( ' h t t p ` ,   ` r e q u e s t s . g e t ( ` ,   ` r e q u e s t s . p o s t ( ` ,   ` h t t p . g e t ( ` ,   o r   ` h t t p . r e q u e s t ( `   w i l l   b e   i n t e r c e p t e d   a n d   b l o c k e d .   D o   N O T   r e t r y   w i t h   s h e l l . 
 
 + I n s t e a d   u s e : 
 
 + -   ` c o n t e x t - m o d e _ c t x _ e x e c u t e ( l a n g u a g e ,   c o d e ) `   t o   r u n   H T T P   c a l l s   i n   s a n d b o x        o n l y   s t d o u t   e n t e r s   c o n t e x t 
 
 + 
 
 + # # #   D i r e c t   w e b   f e t c h i n g        B L O C K E D 
 
 + D o   N O T   u s e   a n y   d i r e c t   U R L   f e t c h i n g   t o o l .   U s e   t h e   s a n d b o x   e q u i v a l e n t . 
 
 + I n s t e a d   u s e : 
 
 + -   ` c o n t e x t - m o d e _ c t x _ f e t c h _ a n d _ i n d e x ( u r l ,   s o u r c e ) `   t h e n   ` c o n t e x t - m o d e _ c t x _ s e a r c h ( q u e r i e s ) `   t o   q u e r y   t h e   i n d e x e d   c o n t e n t 
 
 + 
 
 + # #   R E D I R E C T E D   t o o l s        u s e   s a n d b o x   e q u i v a l e n t s 
 
 + 
 
 + # # #   S h e l l   ( > 2 0   l i n e s   o u t p u t ) 
 
 + S h e l l   i s   O N L Y   f o r :   ` g i t ` ,   ` m k d i r ` ,   ` r m ` ,   ` m v ` ,   ` c d ` ,   ` l s ` ,   ` n p m   i n s t a l l ` ,   ` p i p   i n s t a l l ` ,   a n d   o t h e r   s h o r t - o u t p u t   c o m m a n d s . 
 
 + F o r   e v e r y t h i n g   e l s e ,   u s e : 
 
 + -   ` c o n t e x t - m o d e _ c t x _ b a t c h _ e x e c u t e ( c o m m a n d s ,   q u e r i e s ) `        r u n   m u l t i p l e   c o m m a n d s   +   s e a r c h   i n   O N E   c a l l 
 
 + -   ` c o n t e x t - m o d e _ c t x _ e x e c u t e ( l a n g u a g e :   " s h e l l " ,   c o d e :   " . . . " ) `        r u n   i n   s a n d b o x ,   o n l y   s t d o u t   e n t e r s   c o n t e x t 
 
 + 
 
 + # # #   F i l e   r e a d i n g   ( f o r   a n a l y s i s ) 
 
 + I f   y o u   a r e   r e a d i n g   a   f i l e   t o   * * e d i t * *   i t        r e a d i n g   i s   c o r r e c t   ( e d i t   n e e d s   c o n t e n t   i n   c o n t e x t ) . 
 
 + I f   y o u   a r e   r e a d i n g   t o   * * a n a l y z e ,   e x p l o r e ,   o r   s u m m a r i z e * *        u s e   ` c o n t e x t - m o d e _ c t x _ e x e c u t e _ f i l e ( p a t h ,   l a n g u a g e ,   c o d e ) `   i n s t e a d .   O n l y   y o u r   p r i n t e d   s u m m a r y   e n t e r s   c o n t e x t . 
 
 + 
 
 + # # #   g r e p   /   s e a r c h   ( l a r g e   r e s u l t s ) 
 
 + S e a r c h   r e s u l t s   c a n   f l o o d   c o n t e x t .   U s e   ` c o n t e x t - m o d e _ c t x _ e x e c u t e ( l a n g u a g e :   " s h e l l " ,   c o d e :   " g r e p   . . . " ) `   t o   r u n   s e a r c h e s   i n   s a n d b o x .   O n l y   y o u r   p r i n t e d   s u m m a r y   e n t e r s   c o n t e x t . 
 
 + 
 
 + # #   T o o l   s e l e c t i o n   h i e r a r c h y 
 
 + 
 
 + 1 .   * * G A T H E R * * :   ` c o n t e x t - m o d e _ c t x _ b a t c h _ e x e c u t e ( c o m m a n d s ,   q u e r i e s ) `        P r i m a r y   t o o l .   R u n s   a l l   c o m m a n d s ,   a u t o - i n d e x e s   o u t p u t ,   r e t u r n s   s e a r c h   r e s u l t s .   O N E   c a l l   r e p l a c e s   3 0 +   i n d i v i d u a l   c a l l s . 
 
 + 2 .   * * F O L L O W - U P * * :   ` c o n t e x t - m o d e _ c t x _ s e a r c h ( q u e r i e s :   [ " q 1 " ,   " q 2 " ,   . . . ] ) `        Q u e r y   i n d e x e d   c o n t e n t .   P a s s   A L L   q u e s t i o n s   a s   a r r a y   i n   O N E   c a l l . 
 
 + 3 .   * * P R O C E S S I N G * * :   ` c o n t e x t - m o d e _ c t x _ e x e c u t e ( l a n g u a g e ,   c o d e ) `   |   ` c o n t e x t - m o d e _ c t x _ e x e c u t e _ f i l e ( p a t h ,   l a n g u a g e ,   c o d e ) `        S a n d b o x   e x e c u t i o n .   O n l y   s t d o u t   e n t e r s   c o n t e x t . 
 
 + 4 .   * * W E B * * :   ` c o n t e x t - m o d e _ c t x _ f e t c h _ a n d _ i n d e x ( u r l ,   s o u r c e ) `   t h e n   ` c o n t e x t - m o d e _ c t x _ s e a r c h ( q u e r i e s ) `        F e t c h ,   c h u n k ,   i n d e x ,   q u e r y .   R a w   H T M L   n e v e r   e n t e r s   c o n t e x t . 
 
 + 5 .   * * I N D E X * * :   ` c o n t e x t - m o d e _ c t x _ i n d e x ( c o n t e n t ,   s o u r c e ) `        S t o r e   c o n t e n t   i n   F T S 5   k n o w l e d g e   b a s e   f o r   l a t e r   s e a r c h . 
 
 + 
 
 + # #   O u t p u t   c o n s t r a i n t s 
 
 + 
 
 + -   K e e p   r e s p o n s e s   u n d e r   5 0 0   w o r d s . 
 
 + -   W r i t e   a r t i f a c t s   ( c o d e ,   c o n f i g s ,   P R D s )   t o   F I L E S        n e v e r   r e t u r n   t h e m   a s   i n l i n e   t e x t .   R e t u r n   o n l y :   f i l e   p a t h   +   1 - l i n e   d e s c r i p t i o n . 
 
 + -   W h e n   i n d e x i n g   c o n t e n t ,   u s e   d e s c r i p t i v e   s o u r c e   l a b e l s   s o   o t h e r s   c a n   ` s e a r c h ( s o u r c e :   " l a b e l " ) `   l a t e r . 
 
 + 
 
 + # #   c t x   c o m m a n d s 
 
 + 
 
 + |   C o m m a n d   |   A c t i o n   | 
 
 + | - - - - - - - - - | - - - - - - - - | 
 
 + |   ` c t x   s t a t s `   |   C a l l   t h e   ` s t a t s `   M C P   t o o l   a n d   d i s p l a y   t h e   f u l l   o u t p u t   v e r b a t i m   | 
 
 + |   ` c t x   d o c t o r `   |   C a l l   t h e   ` d o c t o r `   M C P   t o o l ,   r u n   t h e   r e t u r n e d   s h e l l   c o m m a n d ,   d i s p l a y   a s   c h e c k l i s t   | 
 
 + |   ` c t x   u p g r a d e `   |   C a l l   t h e   ` u p g r a d e `   M C P   t o o l ,   r u n   t h e   r e t u r n e d   s h e l l   c o m m a n d ,   d i s p l a y   a s   c h e c k l i s t   | 
 
 d i f f   - - g i t   a / t a u r i - a p p / p a c k a g e - l o c k . j s o n   b / t a u r i - a p p / p a c k a g e - l o c k . j s o n 
 
 i n d e x   f 2 a e f b d . . 2 9 5 f a 3 a   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / p a c k a g e - l o c k . j s o n 
 
 + + +   b / t a u r i - a p p / p a c k a g e - l o c k . j s o n 
 
 @ @   - 1 2 , 6   + 1 2 , 7   @ @ 
 
                   " @ t a u r i - a p p s / a p i " :   " ^ 2 " , 
 
                   " @ t a u r i - a p p s / p l u g i n - s h e l l " :   " ^ 2 " , 
 
                   " d o m p u r i f y " :   " ^ 3 . 0 . 0 " , 
 
 +                 " f r a m e r - m o t i o n " :   " ^ 1 2 . 3 8 . 0 " , 
 
                   " h i g h l i g h t . j s " :   " ^ 1 1 . 0 . 0 " , 
 
                   " l u c i d e - r e a c t " :   " ^ 1 . 7 . 0 " , 
 
                   " m a r k e d " :   " ^ 1 2 . 0 . 0 " , 
 
 @ @   - 2 7 5 5 , 6   + 2 7 5 6 , 3 3   @ @ 
 
                   " u r l " :   " h t t p s : / / g i t h u b . c o m / s p o n s o r s / r a w i f y " 
 
               } 
 
           } , 
 
 +         " n o d e _ m o d u l e s / f r a m e r - m o t i o n " :   { 
 
 +             " v e r s i o n " :   " 1 2 . 3 8 . 0 " , 
 
 +             " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / f r a m e r - m o t i o n / - / f r a m e r - m o t i o n - 1 2 . 3 8 . 0 . t g z " , 
 
 +             " i n t e g r i t y " :   " s h a 5 1 2 - r F Y k Y / p i g b c s w l 1 X Q S b 7 q 4 2 4 k S T Q 8 q 6 e A C + Y U s S K o o H Q Y u L d z d H j r t 6 u x U C + P R A O + + q 5 I S 7 + T a m g I w 1 A p h x R + g = = " , 
 
 +             " l i c e n s e " :   " M I T " , 
 
 +             " d e p e n d e n c i e s " :   { 
 
 +                 " m o t i o n - d o m " :   " ^ 1 2 . 3 8 . 0 " , 
 
 +                 " m o t i o n - u t i l s " :   " ^ 1 2 . 3 6 . 0 " , 
 
 +                 " t s l i b " :   " ^ 2 . 4 . 0 " 
 
 +             } , 
 
 +             " p e e r D e p e n d e n c i e s " :   { 
 
 +                 " @ e m o t i o n / i s - p r o p - v a l i d " :   " * " , 
 
 +                 " r e a c t " :   " ^ 1 8 . 0 . 0   | |   ^ 1 9 . 0 . 0 " , 
 
 +                 " r e a c t - d o m " :   " ^ 1 8 . 0 . 0   | |   ^ 1 9 . 0 . 0 " 
 
 +             } , 
 
 +             " p e e r D e p e n d e n c i e s M e t a " :   { 
 
 +                 " @ e m o t i o n / i s - p r o p - v a l i d " :   { 
 
 +                     " o p t i o n a l " :   t r u e 
 
 +                 } , 
 
 +                 " r e a c t " :   { 
 
 +                     " o p t i o n a l " :   t r u e 
 
 +                 } , 
 
 +                 " r e a c t - d o m " :   { 
 
 +                     " o p t i o n a l " :   t r u e 
 
 +                 } 
 
 +             } 
 
 +         } , 
 
           " n o d e _ m o d u l e s / f s e v e n t s " :   { 
 
               " v e r s i o n " :   " 2 . 3 . 3 " , 
 
               " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / f s e v e n t s / - / f s e v e n t s - 2 . 3 . 3 . t g z " , 
 
 @ @   - 3 3 7 8 , 6   + 3 4 0 6 , 2 1   @ @ 
 
                   " u r l " :   " h t t p s : / / g i t h u b . c o m / s p o n s o r s / j o n s c h l i n k e r t " 
 
               } 
 
           } , 
 
 +         " n o d e _ m o d u l e s / m o t i o n - d o m " :   { 
 
 +             " v e r s i o n " :   " 1 2 . 3 8 . 0 " , 
 
 +             " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / m o t i o n - d o m / - / m o t i o n - d o m - 1 2 . 3 8 . 0 . t g z " , 
 
 +             " i n t e g r i t y " :   " s h a 5 1 2 - p d k H L D 8 Q Y R p 8 V f i N L b 8 x I B J i s 1 b y Q 9 g P T 3 J n h 2 j q f F t A s W U A 3 d E e p D l s W e / x M p O 8 M c V + V d p K V c p + E + T G J E t O o A = = " , 
 
 +             " l i c e n s e " :   " M I T " , 
 
 +             " d e p e n d e n c i e s " :   { 
 
 +                 " m o t i o n - u t i l s " :   " ^ 1 2 . 3 6 . 0 " 
 
 +             } 
 
 +         } , 
 
 +         " n o d e _ m o d u l e s / m o t i o n - u t i l s " :   { 
 
 +             " v e r s i o n " :   " 1 2 . 3 6 . 0 " , 
 
 +             " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / m o t i o n - u t i l s / - / m o t i o n - u t i l s - 1 2 . 3 6 . 0 . t g z " , 
 
 +             " i n t e g r i t y " :   " s h a 5 1 2 - e H W i s y g b i w V v f 6 P Z 1 v h a H C L a m v k S b P I e A Y x W U u L 3 a 2 P D / T R O g E 7 F v f H W T I H 4 v M l 7 9 8 Q L f M w 1 5 n R q I a R D X T l Y R g = = " , 
 
 +             " l i c e n s e " :   " M I T " 
 
 +         } , 
 
           " n o d e _ m o d u l e s / m s " :   { 
 
               " v e r s i o n " :   " 2 . 1 . 3 " , 
 
               " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / m s / - / m s - 2 . 1 . 3 . t g z " , 
 
 @ @   - 4 2 2 9 , 9   + 4 2 7 2 , 7   @ @ 
 
               " v e r s i o n " :   " 2 . 8 . 1 " , 
 
               " r e s o l v e d " :   " h t t p s : / / r e g i s t r y . n p m j s . o r g / t s l i b / - / t s l i b - 2 . 8 . 1 . t g z " , 
 
               " i n t e g r i t y " :   " s h a 5 1 2 - o J F u 9 4 H Q b + K V d u S U Q L 7 w n p m q n f m L s O A / n A h 6 b 6 E H 0 w C E o K 0 / m P e X U 6 c 3 w K D V 8 3 M k O u H P R H t S X K K U 9 9 I B a z S / 2 w = = " , 
 
 -             " d e v " :   t r u e , 
 
 -             " l i c e n s e " :   " 0 B S D " , 
 
 -             " o p t i o n a l " :   t r u e 
 
 +             " l i c e n s e " :   " 0 B S D " 
 
           } , 
 
           " n o d e _ m o d u l e s / t y p e s c r i p t " :   { 
 
               " v e r s i o n " :   " 5 . 9 . 3 " , 
 
 d i f f   - - g i t   a / t a u r i - a p p / p a c k a g e . j s o n   b / t a u r i - a p p / p a c k a g e . j s o n 
 
 i n d e x   2 e a 9 0 3 9 . . a 0 6 3 0 f 0   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / p a c k a g e . j s o n 
 
 + + +   b / t a u r i - a p p / p a c k a g e . j s o n 
 
 @ @   - 1 5 , 6   + 1 5 , 7   @ @ 
 
           " @ t a u r i - a p p s / a p i " :   " ^ 2 " , 
 
           " @ t a u r i - a p p s / p l u g i n - s h e l l " :   " ^ 2 " , 
 
           " d o m p u r i f y " :   " ^ 3 . 0 . 0 " , 
 
 +         " f r a m e r - m o t i o n " :   " ^ 1 2 . 3 8 . 0 " , 
 
           " h i g h l i g h t . j s " :   " ^ 1 1 . 0 . 0 " , 
 
           " l u c i d e - r e a c t " :   " ^ 1 . 7 . 0 " , 
 
           " m a r k e d " :   " ^ 1 2 . 0 . 0 " , 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / C a r g o . l o c k   b / t a u r i - a p p / s r c - t a u r i / C a r g o . l o c k 
 
 i n d e x   d 2 f d 0 a 9 . . 1 c e 9 c f 4   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / C a r g o . l o c k 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / C a r g o . l o c k 
 
 @ @   - 8 7 9 , 6   + 8 7 9 , 7   @ @   d e p e n d e n c i e s   =   [ 
 
     " t a u r i - p l u g i n - d i a l o g " , 
 
     " t a u r i - p l u g i n - s h e l l " , 
 
     " t o k i o " , 
 
 +   " t r a c i n g " , 
 
   ] 
 
   
 
   [ [ p a c k a g e ] ] 
 
 @ @   - 9 0 7 , 6   + 9 0 8 , 7   @ @   s o u r c e   =   " r e g i s t r y + h t t p s : / / g i t h u b . c o m / r u s t - l a n g / c r a t e s . i o - i n d e x " 
 
   c h e c k s u m   =   " 0 7 b b e 8 9 c 5 0 d 7 a 5 3 5 e 5 3 9 b 8 c 1 7 b c 0 b 4 9 b d b 7 7 7 4 7 0 3 4 d a a 8 0 8 7 4 0 7 d 6 5 5 f 3 f 7 c c 1 d " 
 
   d e p e n d e n c i e s   =   [ 
 
     " f u t u r e s - c o r e " , 
 
 +   " f u t u r e s - s i n k " , 
 
   ] 
 
   
 
   [ [ p a c k a g e ] ] 
 
 @ @   - 2 9 0 9 , 7   + 2 9 1 1 , 9   @ @   c h e c k s u m   =   " e d d d 3 c a 5 5 9 2 0 3 1 8 0 a 3 0 7 f 1 2 d 1 1 4 c 2 6 8 a b f 5 8 3 f 5 9 b 0 3 c b 9 0 6 f d 0 b 3 f f 8 6 4 6 c 1 1 4 7 " 
 
   d e p e n d e n c i e s   =   [ 
 
     " b a s e 6 4   0 . 2 2 . 1 " , 
 
     " b y t e s " , 
 
 +   " f u t u r e s - c h a n n e l " , 
 
     " f u t u r e s - c o r e " , 
 
 +   " f u t u r e s - u t i l " , 
 
     " h t t p " , 
 
     " h t t p - b o d y " , 
 
     " h t t p - b o d y - u t i l " , 
 
 @ @   - 4 3 1 7 , 9   + 4 3 2 1 , 2 1   @ @   s o u r c e   =   " r e g i s t r y + h t t p s : / / g i t h u b . c o m / r u s t - l a n g / c r a t e s . i o - i n d e x " 
 
   c h e c k s u m   =   " 6 3 e 7 1 6 6 2 f a 4 b 2 a 2 c 3 a 2 6 f 5 7 0 f 0 3 7 e b 9 5 b b 1 f 8 5 3 9 7 f 3 c d 8 0 7 6 c a e d 2 f 0 2 6 a 6 d 1 0 0 " 
 
   d e p e n d e n c i e s   =   [ 
 
     " p i n - p r o j e c t - l i t e " , 
 
 +   " t r a c i n g - a t t r i b u t e s " , 
 
     " t r a c i n g - c o r e " , 
 
   ] 
 
   
 
 + [ [ p a c k a g e ] ] 
 
 + n a m e   =   " t r a c i n g - a t t r i b u t e s " 
 
 + v e r s i o n   =   " 0 . 1 . 3 1 " 
 
 + s o u r c e   =   " r e g i s t r y + h t t p s : / / g i t h u b . c o m / r u s t - l a n g / c r a t e s . i o - i n d e x " 
 
 + c h e c k s u m   =   " 7 4 9 0 c f a 5 e c 9 6 3 7 4 6 5 6 8 7 4 0 6 5 1 a c 6 7 8 1 f 7 0 1 c 9 c 5 e a 2 5 7 c 5 8 e 0 5 7 f 3 b a 8 c f 6 9 e 8 d a " 
 
 + d e p e n d e n c i e s   =   [ 
 
 +   " p r o c - m a c r o 2 " , 
 
 +   " q u o t e " , 
 
 +   " s y n   2 . 0 . 1 1 7 " , 
 
 + ] 
 
 + 
 
   [ [ p a c k a g e ] ] 
 
   n a m e   =   " t r a c i n g - c o r e " 
 
   v e r s i o n   =   " 0 . 1 . 3 6 " 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / C a r g o . t o m l   b / t a u r i - a p p / s r c - t a u r i / C a r g o . t o m l 
 
 i n d e x   b 2 3 5 c 1 2 . . b 3 6 d e 5 5   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / C a r g o . t o m l 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / C a r g o . t o m l 
 
 @ @   - 2 4 , 7   + 2 4 , 8   @ @   t a u r i - p l u g i n - s h e l l   =   " 2 " 
 
   t a u r i - p l u g i n - d i a l o g   =   " 2 " 
 
   s e r d e   =   {   v e r s i o n   =   " 1 " ,   f e a t u r e s   =   [ " d e r i v e " ]   } 
 
   s e r d e _ j s o n   =   " 1 " 
 
 - r e q w e s t   =   {   v e r s i o n   =   " 0 . 1 2 " ,   d e f a u l t - f e a t u r e s   =   f a l s e ,   f e a t u r e s   =   [ " j s o n " ,   " r u s t l s - t l s " ]   } 
 
 + r e q w e s t   =   {   v e r s i o n   =   " 0 . 1 2 " ,   d e f a u l t - f e a t u r e s   =   f a l s e ,   f e a t u r e s   =   [ " j s o n " ,   " r u s t l s - t l s " ,   " b l o c k i n g " ]   } 
 
 + t r a c i n g   =   " 0 . 1 " 
 
   t o k i o   =   {   v e r s i o n   =   " 1 " ,   f e a t u r e s   =   [ " f s " ,   " i o - u t i l " ,   " s y n c " ,   " t i m e " ]   } 
 
   r u n t i m e - d e p s   =   {   p a t h   =   " . . / . . / c r a t e s / r u n t i m e - d e p s "   } 
 
   
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s 
 
 i n d e x   9 c b 8 9 e 7 . . f 5 4 f 6 5 e   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / l i b . r s 
 
 @ @   - 1 , 1 5   + 1 , 2 1   @ @ 
 
   u s e   s t d : : s y n c : : A r c ; 
 
 + u s e   s t d : : t i m e : : D u r a t i o n ; 
 
   
 
 - u s e   t a u r i : : { A p p H a n d l e ,   M a n a g e r ,   S t a t e } ; 
 
 + u s e   s e r d e : : S e r i a l i z e ; 
 
 + u s e   t a u r i : : { A p p H a n d l e ,   E m i t t e r ,   M a n a g e r ,   S t a t e } ; 
 
   
 
   m o d   g p u ; 
 
   m o d   m o d e l _ l i b r a r y ; 
 
   m o d   m o d e l _ f i l e s ; 
 
 + m o d   m o d e l _ a l i a s ; 
 
   m o d   r u n t i m e ; 
 
   
 
   u s e   r u n t i m e : : p r o c e s s : : f i n d _ l o c a l l l m _ b i n a r y ; 
 
   u s e   r u n t i m e : : t y p e s : : { R u n t i m e C o n f i g ,   R u n t i m e S n a p s h o t } ; 
 
 - u s e   r u n t i m e : : { b o o t s t r a p _ r u n t i m e ,   g e t _ r u n t i m e _ s n a p s h o t ,   s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d ,   s t a r t _ r u n t i m e ,   s t o p _ r u n t i m e ,   R u n t i m e S t a t e } ; 
 
 + u s e   r u n t i m e : : { 
 
 +         b o o t s t r a p _ r u n t i m e ,   g e t _ r u n t i m e _ s n a p s h o t ,   s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d ,   s t a r t _ r u n t i m e , 
 
 +         s t a r t _ r u n t i m e _ w i t h _ s t a t u s ,   s t o p _ r u n t i m e ,   R u n t i m e S t a t e , 
 
 + } ; 
 
   u s e   g p u : : q u e r y _ g p u ; 
 
   u s e   m o d e l _ l i b r a r y : : h u g g i n g f a c e : : { 
 
           c a n c e l _ h u g g i n g _ f a c e _ d o w n l o a d ,   s e a r c h _ h u g g i n g _ f a c e _ m o d e l s ,   s t a r t _ h u g g i n g _ f a c e _ d o w n l o a d , 
 
 @ @   - 2 1 , 6   + 2 7 , 2 5 9   @ @   u s e   r u n t i m e : : c o n f i g : : { l o a d _ r u n t i m e _ c o n f i g ,   s a v e _ r u n t i m e _ c o n f i g } ; 
 
   u s e   m o d e l _ l i b r a r y : : t y p e s : : { M o d e l L i b r a r y E n t r y ,   M o d e l L i b r a r y S t a t e } ; 
 
   u s e   m o d e l _ f i l e s : : { i m p o r t _ m o d e l ,   p i c k _ m o d e l _ f i l e s ,   p i c k _ m o d e l s _ d i r ,   s c a n _ m o d e l s } ; 
 
   
 
 + / /              F o r g e A g e n t   t y p e s                                                                                                                                                                              
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + # [ s e r d e ( r e n a m e _ a l l   =   " l o w e r c a s e " ) ] 
 
 + e n u m   F o r g e A g e n t S t e p S t a t u s   { 
 
 +         P e n d i n g , 
 
 +         R u n n i n g , 
 
 +         C o m p l e t e d , 
 
 +         E r r o r , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t S u b S t e p   { 
 
 +         i d :   S t r i n g , 
 
 +         d e s c r i p t i o n :   S t r i n g , 
 
 +         s t a t u s :   F o r g e A g e n t S t e p S t a t u s , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t S t e p   { 
 
 +         i d :   u 3 2 , 
 
 +         t i t l e :   S t r i n g , 
 
 +         d e s c r i p t i o n :   S t r i n g , 
 
 +         s t a t u s :   F o r g e A g e n t S t e p S t a t u s , 
 
 +         s u b _ s t e p s :   V e c < F o r g e A g e n t S u b S t e p > , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t P l a n   { 
 
 +         t i t l e :   S t r i n g , 
 
 +         o v e r v i e w :   S t r i n g , 
 
 +         s t e p s :   V e c < F o r g e A g e n t S t e p > , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t A r t i f a c t   { 
 
 +         f i l e n a m e :   S t r i n g , 
 
 +         c o n t e n t :   S t r i n g , 
 
 +         l a n g u a g e :   S t r i n g , 
 
 +         c t a _ l a b e l :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t S t a r t P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         p l a n :   F o r g e A g e n t P l a n , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t S t e p S t a r t e d P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s t e p _ i d :   u 3 2 , 
 
 +         t i t l e :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t S t e p C o m p l e t e d P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s t e p _ i d :   u 3 2 , 
 
 +         m e s s a g e :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t A r t i f a c t R e a d y P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         a r t i f a c t :   F o r g e A g e n t A r t i f a c t , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s u m m a r y :   S t r i n g , 
 
 + } 
 
 + 
 
 + / /              S p e c i a l i s t   e v e n t   t y p e s                                                                                                                                                            
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   S p e c i a l i s t T h i n k i n g S t a r t e d P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s p e c i a l i s t _ i d :   S t r i n g , 
 
 +         s p e c i a l i s t _ n a m e :   S t r i n g , 
 
 +         s p e c i a l i s t _ t i t l e :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   S p e c i a l i s t T h i n k i n g U p d a t e P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s p e c i a l i s t _ i d :   S t r i n g , 
 
 +         t h i n k i n g :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   S p e c i a l i s t R e s p o n s e C o m p l e t e d P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s p e c i a l i s t _ i d :   S t r i n g , 
 
 +         s p e c i a l i s t _ n a m e :   S t r i n g , 
 
 +         t h i n k i n g :   S t r i n g , 
 
 +         r e s p o n s e :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( C l o n e ,   S e r i a l i z e ) ] 
 
 + s t r u c t   A g e n t F i n a l R e s p o n s e P a y l o a d   { 
 
 +         p l a n _ i d :   S t r i n g , 
 
 +         s u m m a r y :   S t r i n g , 
 
 + } 
 
 + 
 
 + / /              S p e c i a l i s t   d e f i n i t i o n s                                                                                                                                                            
 
 + 
 
 + s t r u c t   S p e c i a l i s t   { 
 
 +         i d :   & ' s t a t i c   s t r , 
 
 +         n a m e :   & ' s t a t i c   s t r , 
 
 +         t i t l e :   & ' s t a t i c   s t r , 
 
 +         e m o j i :   & ' s t a t i c   s t r , 
 
 +         p r o m p t _ s n i p p e t :   & ' s t a t i c   s t r , 
 
 + } 
 
 + 
 
 + c o n s t   S P E C I A L I S T S :   & [ S p e c i a l i s t ]   =   & [ 
 
 +         S p e c i a l i s t   { 
 
 +                 i d :   " a n a l y s t " , 
 
 +                 n a m e :   " A n a l i s t a " , 
 
 +                 t i t l e :   " A n % l i s e   T % c n i c a " , 
 
 +                 e m o j i :   "    " , 
 
 +                 p r o m p t _ s n i p p e t :   " V o c %   %   u m   a n a l i s t a   t % c n i c o   r i g o r o s o .   A n a l i s e   o   p r o b l e m a   d e c o m p o n d o - o   e m   c o m p o n e n t e s   c l a r o s ,   i d e n t i f i c a n d o   r e q u i s i t o s   f u n c i o n a i s   e   n % o - f u n c i o n a i s ,   e   a v a l i a n d o   t r a d e - o f f s . " , 
 
 +         } , 
 
 +         S p e c i a l i s t   { 
 
 +                 i d :   " a r c h i t e c t " , 
 
 +                 n a m e :   " A r q u i t e t o " , 
 
 +                 t i t l e :   " A r q u i t e t u r a   d e   S o f t w a r e " , 
 
 +                 e m o j i :   "       " , 
 
 +                 p r o m p t _ s n i p p e t :   " V o c %   %   u m   a r q u i t e t o   d e   s o f t w a r e   e x p e r i e n t e .   A n a l i s e   a   e s t r u t u r a ,   i d e n t i f i q u e   p a d r % e s   r e l e v a n t e s ,   p r o p o n h a   a b o r d a g e n s   e s c a l % v e i s   e   c o n s i d e r e   a   e v o l u % % o   d o   s i s t e m a . " , 
 
 +         } , 
 
 +         S p e c i a l i s t   { 
 
 +                 i d :   " d e v e l o p e r " , 
 
 +                 n a m e :   " D e s e n v o l v e d o r " , 
 
 +                 t i t l e :   " I m p l e m e n t a % % o " , 
 
 +                 e m o j i :   "   W%" , 
 
 +                 p r o m p t _ s n i p p e t :   " V o c %   %   u m   d e s e n v o l v e d o r   p r a g m % t i c o .   F o q u e   e m   c %%d i g o   f u n c i o n a l ,   p r % t i c a s   m o d e r n a s ,   l e g i b i l i d a d e   e   m a n u t e n i b i l i d a d e . " , 
 
 +         } , 
 
 +         S p e c i a l i s t   { 
 
 +                 i d :   " c r i t i c " , 
 
 +                 n a m e :   " C r % t i c o " , 
 
 +                 t i t l e :   " R e v i s % o   e   R i s c o s " , 
 
 +                 e m o j i :   "       " , 
 
 +                 p r o m p t _ s n i p p e t :   " V o c %   %   u m   c r % t i c o   t % c n i c o .   I d e n t i f i q u e   r i s c o s ,   p o n t o s   f r a c o s ,   c a s o s   e d g e   e   p o s s % v e i s   p r o b l e m a s   a n t e s   d e   r e c o m e n d a r   u m a   s o l u % % o . " , 
 
 +         } , 
 
 + ] ; 
 
 + 
 
 + f n   b u i l d _ f o r g e a g e n t _ p l a n ( p r o m p t :   & s t r )   - >   F o r g e A g e n t P l a n   { 
 
 +         l e t   t r i m m e d   =   p r o m p t . t r i m ( ) . t r i m _ e n d _ m a t c h e s ( ' ? ' ) ; 
 
 +         l e t   t i t l e   =   i f   t r i m m e d . i s _ e m p t y ( )   { 
 
 +                 " P l a n e j a n d o   a   t a r e f a " . t o _ s t r i n g ( ) 
 
 +         }   e l s e   { 
 
 +                 t r i m m e d . c h a r s ( ) . t a k e ( 4 8 ) . c o l l e c t ( ) 
 
 +         } ; 
 
 +         l e t   m u t   t i t l e _ c h a r s   =   t i t l e . c h a r s ( ) ; 
 
 +         l e t   c a p i t a l i z e d _ t i t l e   =   m a t c h   t i t l e _ c h a r s . n e x t ( )   { 
 
 +                 S o m e ( f i r s t )   = >   f i r s t . t o _ u p p e r c a s e ( ) . c o l l e c t : : < S t r i n g > ( )   +   t i t l e _ c h a r s . a s _ s t r ( ) , 
 
 +                 N o n e   = >   " P l a n e j a n d o   a   t a r e f a " . t o _ s t r i n g ( ) , 
 
 +         } ; 
 
 + 
 
 +         F o r g e A g e n t P l a n   { 
 
 +                 t i t l e :   c a p i t a l i z e d _ t i t l e , 
 
 +                 o v e r v i e w :   " V o u   e s t r u t u r a r   u m   p l a n o   c u r t o ,   e x e c u t a r   c a d a   e t a p a   v i s u a l m e n t e   e   e n t r e g a r   a   r e s p o s t a   f i n a l   n o   e s t i l o   F o r g e A g e n t . " . t o _ s t r i n g ( ) , 
 
 +                 s t e p s :   v e c ! [ 
 
 +                         F o r g e A g e n t S t e p   { 
 
 +                                 i d :   1 , 
 
 +                                 t i t l e :   " E n t e n d e r   a   s o l i c i t a % % o " . t o _ s t r i n g ( ) , 
 
 +                                 d e s c r i p t i o n :   " Q u e b r a r   o   p e d i d o   e m   o b j e t i v o ,   s t a c k   e   f o r m a t o   d e   e n t r e g a . " . t o _ s t r i n g ( ) , 
 
 +                                 s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 s u b _ s t e p s :   v e c ! [ F o r g e A g e n t S u b S t e p   { 
 
 +                                         i d :   " 1 . 1 " . t o _ s t r i n g ( ) , 
 
 +                                         d e s c r i p t i o n :   " E x t r a i r   o   o b j e t i v o   p r i n c i p a l   d o   p r o m p t " . t o _ s t r i n g ( ) , 
 
 +                                         s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 } ] , 
 
 +                         } , 
 
 +                         F o r g e A g e n t S t e p   { 
 
 +                                 i d :   2 , 
 
 +                                 t i t l e :   " P r e p a r a r   a   s o l u % % o " . t o _ s t r i n g ( ) , 
 
 +                                 d e s c r i p t i o n :   " M o n t a r   a   e s t r u t u r a ,   d e p e n d % n c i a s   e   f l u x o   r e c o m e n d a d o . " . t o _ s t r i n g ( ) , 
 
 +                                 s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 s u b _ s t e p s :   v e c ! [ F o r g e A g e n t S u b S t e p   { 
 
 +                                         i d :   " 2 . 1 " . t o _ s t r i n g ( ) , 
 
 +                                         d e s c r i p t i o n :   " O r g a n i z a r   a   i m p l e m e n t a % % o   e m   b l o c o s   c l a r o s " . t o _ s t r i n g ( ) , 
 
 +                                         s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 } ] , 
 
 +                         } , 
 
 +                         F o r g e A g e n t S t e p   { 
 
 +                                 i d :   3 , 
 
 +                                 t i t l e :   " G e r a r   a   r e s p o s t a   f i n a l " . t o _ s t r i n g ( ) , 
 
 +                                 d e s c r i p t i o n :   " E n t r e g a r   o   c o n t e %Q%d o   f i n a l   c o m   o r i e n t a % % o   p r % t i c a   e   a r t e f a t o . " . t o _ s t r i n g ( ) , 
 
 +                                 s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 s u b _ s t e p s :   v e c ! [ F o r g e A g e n t S u b S t e p   { 
 
 +                                         i d :   " 3 . 1 " . t o _ s t r i n g ( ) , 
 
 +                                         d e s c r i p t i o n :   " C o n s o l i d a r   a   s a % d a   f i n a l   p a r a   o   u s u % r i o " . t o _ s t r i n g ( ) , 
 
 +                                         s t a t u s :   F o r g e A g e n t S t e p S t a t u s : : P e n d i n g , 
 
 +                                 } ] , 
 
 +                         } , 
 
 +                 ] , 
 
 +         } 
 
 + } 
 
 + 
 
 + f n   r e s o l v e _ r u n t i m e _ u r l ( c o n f i g :   & R u n t i m e C o n f i g )   - >   S t r i n g   { 
 
 +         m a t c h   c o n f i g . c o n n e c t i o n _ m o d e   { 
 
 +                 r u n t i m e : : t y p e s : : C o n n e c t i o n M o d e : : L o c a l   = >   f o r m a t ! ( " h t t p : / / { } " ,   c o n f i g . a d d r . t r i m ( ) ) , 
 
 +                 r u n t i m e : : t y p e s : : C o n n e c t i o n M o d e : : R e m o t e   = >   c o n f i g . s e r v e r _ u r l . t r i m ( ) . t r i m _ e n d _ m a t c h e s ( ' / ' ) . t o _ s t r i n g ( ) , 
 
 +         } 
 
 + } 
 
 + 
 
 + f n   b u i l d _ m u l t i a g e n t _ s y s t e m _ p r o m p t ( u s e r _ p r o m p t :   & s t r )   - >   S t r i n g   { 
 
 +         l e t   m u t   s p e c i a l i s t _ p r o m p t s   =   S t r i n g : : n e w ( ) ; 
 
 +         f o r   s p e c   i n   S P E C I A L I S T S   { 
 
 +                 s p e c i a l i s t _ p r o m p t s . p u s h _ s t r ( & f o r m a t ! ( 
 
 +                         " -   * * { } * *   ( { } )   { } :   { } \ n " , 
 
 +                         s p e c . n a m e ,   s p e c . t i t l e ,   s p e c . e m o j i ,   s p e c . p r o m p t _ s n i p p e t 
 
 +                 ) ) ; 
 
 +         } 
 
 + 
 
 +         f o r m a t ! ( 
 
 +                 r # " V o c %   %   o   a g e n t e   p r i n c i p a l   d e   u m   s i s t e m a   m u l t i - a g e n t e .   S u a   t a r e f a   %   c o o r d e n a r   m %Q%l t i p l o s   e s p e c i a l i s t a s   p a r a   r e s p o n d e r   %   p e r g u n t a   d o   u s u % r i o   d a   m e l h o r   f o r m a   p o s s % v e l . 
 
 + 
 
 + * * E s p e c i a l i s t a s   d i s p o n % v e i s : * * 
 
 + { } 
 
 + 
 
 + * * T a r e f a : * * 
 
 + A   p e r g u n t a   d o   u s u % r i o   % :   " { } " 
 
 + 
 
 + * * I n s t r u % % e s : * * 
 
 + 1 .   A n a l i s e   a   p e r g u n t a   e   i d e n t i f i q u e   q u a i s   e s p e c i a l i s t a s   s % o   r e l e v a n t e s   ( 1   a   4 ) 
 
 + 2 .   P a r a   c a d a   e s p e c i a l i s t a   r e l e v a n t e ,   g e r e   u m a   r e s p o s t a   n o   s e g u i n t e   f o r m a t o   J S O N : 
 
 + { { 
 
 +     " s p e c i a l i s t _ i d " :   " i d _ d o _ e s p e c i a l i s t a " , 
 
 +     " s p e c i a l i s t _ n a m e " :   " N o m e " , 
 
 +     " t h i n k i n g " :   " S u a   c a d e i a   d e   r a c i o c % n i o   -   p e n s e   p a s s o   a   p a s s o   s o b r e   o   p r o b l e m a " , 
 
 +     " r e s p o n s e " :   " S u a   r e s p o s t a   f i n a l   a o   u s u % r i o   s o b r e   o   a s s u n t o " 
 
 + } } 
 
 + 
 
 + 3 .   A f t e r   a l l   s p e c i a l i s t s   h a v e   r e s p o n d e d ,   p r o v i d e   y o u r   s y n t h e s i s   a s   t h e   m a i n   a g e n t : 
 
 + { { 
 
 +     " t y p e " :   " f i n a l _ r e s p o n s e " , 
 
 +     " s u m m a r y " :   " R e s u m o   c o n s o l i d a d o   d e   t o d a s   a s   p e r s p e c t i v a s ,   c o m   a   r e c o m e n d a % % o   f i n a l   p a r a   o   u s u % r i o " 
 
 + } } 
 
 + 
 
 + * * I m p o r t a n t e : * * 
 
 + -   R e s p o n d a   T O D O S   o s   e s p e c i a l i s t a s   r e l e v a n t e s   e m   u m a   %Q%n i c a   m e n s a g e m   J S O N 
 
 + -   O   c a m p o   " t h i n k i n g "   d e v e   m o s t r a r   a   c a d e i a   d e   r a c i o c % n i o   c o m p l e t a 
 
 + -   O   c a m p o   " r e s p o n s e "   d e v e   s e r   u m a   r e s p o s t a   s u b s t a n c i a l ,   n % o   u m   r e s u m o 
 
 + -   A p %%s   o s   e s p e c i a l i s t a s ,   i n c l u a   s e m p r e   a   r e s p o s t a   f i n a l   d o   a g e n t e   p r i n c i p a l 
 
 + -   N % O   g e r e   a r t e f a t o s   d e   a r q u i v o   a   m e n o s   q u e   o   u s u % r i o   s o l i c i t e   e x p l i c i t a m e n t e 
 
 + -   R e s p o n d a   e m   p o r t u g u % s   b r a s i l e i r o " # , 
 
 +                 s p e c i a l i s t _ p r o m p t s ,   u s e r _ p r o m p t 
 
 +         ) 
 
 + } 
 
 + 
 
   / /              S e r v e r   l i f e c y c l e                                                                                                                                                                              
 
   
 
   # [ t a u r i : : c o m m a n d ] 
 
 @ @   - 1 3 0 , 1 2   + 3 8 9 , 1 8   @ @   a s y n c   f n   s w a p _ m o d e l _ c o m m a n d ( 
 
   
 
           / /   L o a d ,   u p d a t e   m o d e l _ p a t h ,   s a v e 
 
           l e t   m u t   c o n f i g   =   l o a d _ r u n t i m e _ c o n f i g ( & a p p ) ? ; 
 
 -         c o n f i g . m o d e l _ p a t h   =   S o m e ( n e w _ m o d e l _ p a t h ) ; 
 
 +         c o n f i g . m o d e l _ p a t h   =   S o m e ( n e w _ m o d e l _ p a t h . c l o n e ( ) ) ; 
 
           s a v e _ r u n t i m e _ c o n f i g ( & a p p ,   & c o n f i g ) 
 
                   . m a p _ e r r ( | e |   f o r m a t ! ( " s w a p   s a v e   f a i l e d :   { e } " ) ) ? ; 
 
   
 
 +         / /   C R I T I C A L :   U p d a t e   t h e   i n t e r n a l   s t a t e   c o n f i g   s o   s t a r t _ r u n t i m e   u s e s   t h e   n e w   m o d e l 
 
 +         { 
 
 +                 l e t   m u t   i n n e r   =   s t a t e . 0 . l o c k ( ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
 +                 i n n e r . c o n f i g   =   c o n f i g ; 
 
 +         } 
 
 + 
 
           / /   R e s t a r t   w i t h   t h e   u p d a t e d   c o n f i g 
 
 -         s t a r t _ r u n t i m e ( a p p ,   s t a t e ) 
 
 +         s t a r t _ r u n t i m e _ w i t h _ s t a t u s ( a p p ,   s t a t e ,   r u n t i m e : : t y p e s : : R u n t i m e S t a t u s : : L o a d i n g ) 
 
   } 
 
   
 
   / / /   D e l e t e   a   l o c a l   . g g u f   m o d e l   f i l e   f r o m   d i s k . 
 
 @ @   - 1 4 8 , 6   + 4 1 3 , 2 8   @ @   f n   d e l e t e _ m o d e l _ f i l e ( f i l e _ p a t h :   S t r i n g )   - >   R e s u l t < ( ) ,   S t r i n g >   { 
 
           s t d : : f s : : r e m o v e _ f i l e ( p a t h ) . m a p _ e r r ( | e |   f o r m a t ! ( " D e l e t e   f a i l e d :   { e } " ) ) 
 
   } 
 
   
 
 + / / /   R e s o l v e   w h i c h   m o d e l   s h o u l d   b e   u s e d   a t   s t a r t u p   b a s e d   o n   a l i a s   p o l i c y . 
 
 + / / /   R e t u r n s   N o n e   i f   n o   s u i t a b l e   m o d e l   i s   f o u n d . 
 
 + # [ t a u r i : : c o m m a n d ] 
 
 + f n   r e s o l v e _ s t a r t u p _ m o d e l _ c o m m a n d ( 
 
 +         a p p :   A p p H a n d l e , 
 
 + )   - >   R e s u l t < O p t i o n < m o d e l _ a l i a s : : S t a r t u p M o d e l R e s o l u t i o n > ,   S t r i n g >   { 
 
 +         u s e   c r a t e : : m o d e l _ l i b r a r y : : p a t h s : : r e s o l v e _ m o d e l s _ d i r ; 
 
 + 
 
 +         l e t   c o n f i g   =   r u n t i m e : : c o n f i g : : l o a d _ r u n t i m e _ c o n f i g ( & a p p ) . u n w r a p _ o r _ d e f a u l t ( ) ; 
 
 +         l e t   m o d e l s _ d i r   =   r e s o l v e _ m o d e l s _ d i r ( c o n f i g . m o d e l s _ d i r . a s _ d e r e f ( ) ) ; 
 
 + 
 
 +         l e t   m o d e l s   =   i f   m o d e l s _ d i r . e x i s t s ( )   { 
 
 +                 l e t   d i r _ s t r   =   m o d e l s _ d i r . t o _ s t r i n g _ l o s s y ( ) . t o _ s t r i n g ( ) ; 
 
 +                 m o d e l _ f i l e s : : s c a n _ m o d e l s ( d i r _ s t r ) . u n w r a p _ o r _ d e f a u l t ( ) 
 
 +         }   e l s e   { 
 
 +                 V e c : : n e w ( ) 
 
 +         } ; 
 
 + 
 
 +         l e t   p r e f e r r e d   =   c o n f i g . p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s . a s _ d e r e f ( ) ; 
 
 +         O k ( m o d e l _ a l i a s : : r e s o l v e _ s t a r t u p _ m o d e l ( p r e f e r r e d ,   & m o d e l s ) ) 
 
 + } 
 
 + 
 
   / / /   O p e n   t h e   f o l d e r   c o n t a i n i n g   a   m o d e l   f i l e   i n   t h e   n a t i v e   f i l e   e x p l o r e r 
 
   / / /   a n d   o p t i o n a l l y   s e l e c t / h i g h l i g h t   t h e   f i l e . 
 
   # [ t a u r i : : c o m m a n d ] 
 
 @ @   - 2 0 9 , 6   + 4 9 6 , 2 6 3   @ @   f n   g e t _ m o d e l _ l i b r a r y _ s t a t e _ c o m m a n d ( a p p :   A p p H a n d l e )   - >   R e s u l t < M o d e l L i b r a r y S t a t e , 
 
           } ) 
 
   } 
 
   
 
 + # [ d e r i v e ( s e r d e : : D e s e r i a l i z e ) ] 
 
 + s t r u c t   C h a t C o m p l e t i o n M e s s a g e   { 
 
 +         r o l e :   S t r i n g , 
 
 +         c o n t e n t :   S t r i n g , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( s e r d e : : D e s e r i a l i z e ) ] 
 
 + s t r u c t   C h a t C o m p l e t i o n C h o i c e   { 
 
 +         m e s s a g e :   C h a t C o m p l e t i o n M e s s a g e , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( s e r d e : : D e s e r i a l i z e ) ] 
 
 + s t r u c t   C h a t C o m p l e t i o n R e s p o n s e   { 
 
 +         c h o i c e s :   V e c < C h a t C o m p l e t i o n C h o i c e > , 
 
 + } 
 
 + 
 
 + # [ t a u r i : : c o m m a n d ] 
 
 + a s y n c   f n   s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d ( 
 
 +         a p p :   A p p H a n d l e , 
 
 +         s t a t e :   S t a t e < ' _ ,   R u n t i m e S t a t e > , 
 
 +         p r o m p t :   S t r i n g , 
 
 + )   - >   R e s u l t < F o r g e A g e n t S t a r t P a y l o a d ,   S t r i n g >   { 
 
 +         l e t   n o w   =   s t d : : t i m e : : S y s t e m T i m e : : n o w ( ) 
 
 +                 . d u r a t i o n _ s i n c e ( s t d : : t i m e : : U N I X _ E P O C H ) 
 
 +                 . m a p _ e r r ( | e r r o r |   f o r m a t ! ( " c l o c k   e r r o r :   { e r r o r } " ) ) ? 
 
 +                 . a s _ m i l l i s ( ) ; 
 
 +         l e t   p l a n _ i d   =   f o r m a t ! ( " f o r g e a g e n t - { n o w } " ) ; 
 
 +         l e t   p l a n   =   b u i l d _ f o r g e a g e n t _ p l a n ( & p r o m p t ) ; 
 
 + 
 
 +         l e t   r e s p o n s e   =   F o r g e A g e n t S t a r t P a y l o a d   { 
 
 +                 p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                 p l a n :   p l a n . c l o n e ( ) , 
 
 +         } ; 
 
 + 
 
 +         l e t   a p p _ h a n d l e   =   a p p . c l o n e ( ) ; 
 
 + 
 
 +         / /   G e t   r u n t i m e   s t a t e   a n d   v a l i d a t e   b e f o r e   p r o c e e d i n g 
 
 +         l e t   ( r u n t i m e _ u r l ,   c o n n e c t i o n _ m o d e )   =   { 
 
 +                 l e t   i n n e r   =   s t a t e . 0 . l o c k ( ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
 +                 l e t   u r l   =   r e s o l v e _ r u n t i m e _ u r l ( & i n n e r . c o n f i g ) ; 
 
 +                 l e t   m o d e   =   i n n e r . c o n f i g . c o n n e c t i o n _ m o d e . c l o n e ( ) ; 
 
 +                 ( u r l ,   m o d e ) 
 
 +         } ; 
 
 + 
 
 +         / /   V a l i d a t e   r u n t i m e   s t a t e   f o r   l o c a l   m o d e   b e f o r e   s p a w n i n g   b a c k g r o u n d   t a s k 
 
 +         i f   c o n n e c t i o n _ m o d e   = =   r u n t i m e : : t y p e s : : C o n n e c t i o n M o d e : : L o c a l   { 
 
 +                 l e t   s n a p s h o t   =   g e t _ r u n t i m e _ s n a p s h o t _ c o m m a n d ( s t a t e . c l o n e ( ) ) ? ; 
 
 +                 
 
 +                 i f   ! s n a p s h o t . p r o c e s s _ r u n n i n g   { 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   " O   r u n t i m e   l o c a l   n % o   e s t %   i n i c i a d o .   I n i c i e   o   r u n t i m e   a n t e s   d e   u s a r   o   F o r g e A g e n t . " . t o _ s t r i n g ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n   E r r ( " R u n t i m e   n o t   r u n n i n g " . i n t o ( ) ) ; 
 
 +                 } 
 
 +                 
 
 +                 i f   ! s n a p s h o t . r e a d y   { 
 
 +                         l e t   e r r o r _ m e s s a g e   =   m a t c h   s n a p s h o t . s t a t u s   { 
 
 +                                 r u n t i m e : : t y p e s : : R u n t i m e S t a t u s : : L o a d i n g   = >   " O   m o d e l o   e s t %   c a r r e g a n d o .   A g u a r d e   a n t e s   d e   e n v i a r   m e n s a g e n s . " . t o _ s t r i n g ( ) , 
 
 +                                 r u n t i m e : : t y p e s : : R u n t i m e S t a t u s : : E r r o r   = >   { 
 
 +                                         s n a p s h o t . l a s t _ e r r o r 
 
 +                                                 . m a p ( | e |   f o r m a t ! ( " E r r o   n o   r u n t i m e :   { } " ,   e . m e s s a g e ) ) 
 
 +                                                 . u n w r a p _ o r _ e l s e ( | |   " O   r u n t i m e   e n c o n t r o u   u m   e r r o .   V e r i f i q u e   o s   l o g s . " . t o _ s t r i n g ( ) ) 
 
 +                                 } , 
 
 +                                 r u n t i m e : : t y p e s : : R u n t i m e S t a t u s : : S t a r t i n g   = >   " O   r u n t i m e   e s t %   i n i c i a n d o .   A g u a r d e . . . " . t o _ s t r i n g ( ) , 
 
 +                                 r u n t i m e : : t y p e s : : R u n t i m e S t a t u s : : S t o p p i n g   = >   " O   r u n t i m e   e s t %   p a r a n d o .   A g u a r d e   f i n a l i z a r . " . t o _ s t r i n g ( ) , 
 
 +                                 _   = >   " O   r u n t i m e   n % o   e s t %   p r o n t o .   T e n t e   r e i n i c i a r . " . t o _ s t r i n g ( ) , 
 
 +                         } ; 
 
 +                         
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   e r r o r _ m e s s a g e , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n   E r r ( " R u n t i m e   n o t   r e a d y " . i n t o ( ) ) ; 
 
 +                 } 
 
 +         } 
 
 + 
 
 +         l e t   s y s t e m _ p r o m p t   =   b u i l d _ m u l t i a g e n t _ s y s t e m _ p r o m p t ( & p r o m p t ) ; 
 
 + 
 
 +         / /   S p a w n   b a c k g r o u n d   t a s k 
 
 +         s t d : : t h r e a d : : s p a w n ( m o v e   | |   { 
 
 +                 / /   S i m u l a t e   s t e p   p r o g r e s s i o n 
 
 +                 f o r   s t e p   i n   & p l a n . s t e p s   { 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : s t e p - s t a r t e d " , 
 
 +                                 F o r g e A g e n t S t e p S t a r t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s t e p _ i d :   s t e p . i d , 
 
 +                                         t i t l e :   s t e p . t i t l e . c l o n e ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         s t d : : t h r e a d : : s l e e p ( D u r a t i o n : : f r o m _ m i l l i s ( 3 0 0 ) ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : s t e p - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t S t e p C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s t e p _ i d :   s t e p . i d , 
 
 +                                         m e s s a g e :   m a t c h   s t e p . i d   { 
 
 +                                                 1   = >   " A n a l i s e i   a   s o l i c i t a % % o   e   d e f i n i   o   o b j e t i v o   p r i n c i p a l . " . t o _ s t r i n g ( ) , 
 
 +                                                 2   = >   " E s t r u t u r e i   a   s o l u % % o   e   o r g a n i z e i   a   e x e c u % % o   e m   b l o c o s   c l a r o s . " . t o _ s t r i n g ( ) , 
 
 +                                                 _   = >   " C o n s o l i d e i   a   e n t r e g a   f i n a l . " . t o _ s t r i n g ( ) , 
 
 +                                         } , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                 } 
 
 + 
 
 +                 / /   B u i l d   H T T P   c l i e n t 
 
 +                 l e t   O k ( c l i e n t )   =   r e q w e s t : : b l o c k i n g : : C l i e n t : : b u i l d e r ( ) 
 
 +                         . t i m e o u t ( D u r a t i o n : : f r o m _ s e c s ( 1 2 0 ) ) 
 
 +                         . b u i l d ( ) 
 
 +                 e l s e   { 
 
 +                         e p r i n t l n ! ( " F a i l e d   t o   c r e a t e   H T T P   c l i e n t " ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   " D e s c u l p e ,   h o u v e   u m   e r r o   a o   p r o c e s s a r   s u a   s o l i c i t a % % o .   T e n t e   n o v a m e n t e . " . t o _ s t r i n g ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n ; 
 
 +                 } ; 
 
 + 
 
 +                 l e t   r e q u e s t _ b o d y   =   s e r d e _ j s o n : : j s o n ! ( { 
 
 +                         " m o d e l " :   " l o c a l " , 
 
 +                         " m e s s a g e s " :   [ 
 
 +                                 {   " r o l e " :   " s y s t e m " ,   " c o n t e n t " :   s y s t e m _ p r o m p t   } , 
 
 +                                 {   " r o l e " :   " u s e r " ,   " c o n t e n t " :   & p r o m p t   } 
 
 +                         ] , 
 
 +                         " s t r e a m " :   f a l s e , 
 
 +                         " m a x _ t o k e n s " :   2 0 4 8 
 
 +                 } ) ; 
 
 + 
 
 +                 l e t   O k ( r e s p )   =   c l i e n t 
 
 +                         . p o s t ( f o r m a t ! ( " { } / v 1 / c h a t / c o m p l e t i o n s " ,   r u n t i m e _ u r l ) ) 
 
 +                         . h e a d e r ( " C o n t e n t - T y p e " ,   " a p p l i c a t i o n / j s o n " ) 
 
 +                         . j s o n ( & r e q u e s t _ b o d y ) 
 
 +                         . s e n d ( ) 
 
 +                 e l s e   { 
 
 +                         e p r i n t l n ! ( " F a i l e d   t o   c a l l   L L M " ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   " D e s c u l p e ,   h o u v e   u m   e r r o   d e   c o m u n i c a % % o   c o m   o   s e r v i d o r   d e   i n f e r % n c i a . " . t o _ s t r i n g ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n ; 
 
 +                 } ; 
 
 + 
 
 +                 i f   ! r e s p . s t a t u s ( ) . i s _ s u c c e s s ( )   { 
 
 +                         e p r i n t l n ! ( " L L M   r e q u e s t   f a i l e d :   { } " ,   r e s p . s t a t u s ( ) ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   " D e s c u l p e ,   o   s e r v i d o r   d e   i n f e r % n c i a   n % o   e s t %   d i s p o n % v e l .   V e r i f i q u e   s e   o   m o d e l o   e s t %   c a r r e g a d o . " . t o _ s t r i n g ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n ; 
 
 +                 } 
 
 + 
 
 +                 l e t   O k ( d a t a )   =   r e s p . j s o n : : < C h a t C o m p l e t i o n R e s p o n s e > ( )   e l s e   { 
 
 +                         e p r i n t l n ! ( " F a i l e d   t o   p a r s e   L L M   r e s p o n s e " ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   " D e s c u l p e ,   h o u v e   u m   e r r o   a o   p r o c e s s a r   a   r e s p o s t a .   T e n t e   n o v a m e n t e . " . t o _ s t r i n g ( ) , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n ; 
 
 +                 } ; 
 
 + 
 
 +                 l e t   c o n t e n t   =   d a t a . c h o i c e s . f i r s t ( ) 
 
 +                         . m a p ( | c |   c . m e s s a g e . c o n t e n t . c l o n e ( ) ) 
 
 +                         . u n w r a p _ o r _ d e f a u l t ( ) ; 
 
 + 
 
 +                 l e t   O k ( j s o n )   =   s e r d e _ j s o n : : f r o m _ s t r : : < s e r d e _ j s o n : : V a l u e > ( & c o n t e n t )   e l s e   { 
 
 +                         e p r i n t l n ! ( " F a i l e d   t o   p a r s e   J S O N   f r o m   L L M   r e s p o n s e :   { } " ,   c o n t e n t ) ; 
 
 +                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                 " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                                 F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                         s u m m a r y :   c o n t e n t , 
 
 +                                 } , 
 
 +                         ) ; 
 
 +                         r e t u r n ; 
 
 +                 } ; 
 
 + 
 
 +                 i f   l e t   S o m e ( s p e c i a l i s t s )   =   j s o n . g e t ( " s p e c i a l i s t s " ) . a n d _ t h e n ( | v |   v . a s _ a r r a y ( ) )   { 
 
 +                         f o r   s p e c   i n   s p e c i a l i s t s   { 
 
 +                                 l e t   s p e c i a l i s t _ i d   =   s p e c . g e t ( " s p e c i a l i s t _ i d " ) 
 
 +                                         . a n d _ t h e n ( | v |   v . a s _ s t r ( ) ) . u n w r a p _ o r ( " u n k n o w n " ) . t o _ s t r i n g ( ) ; 
 
 +                                 l e t   s p e c i a l i s t _ n a m e   =   s p e c . g e t ( " s p e c i a l i s t _ n a m e " ) 
 
 +                                         . a n d _ t h e n ( | v |   v . a s _ s t r ( ) ) . u n w r a p _ o r ( " E s p e c i a l i s t a " ) . t o _ s t r i n g ( ) ; 
 
 +                                 l e t   t h i n k i n g   =   s p e c . g e t ( " t h i n k i n g " ) 
 
 +                                         . a n d _ t h e n ( | v |   v . a s _ s t r ( ) ) . u n w r a p _ o r ( " " ) . t o _ s t r i n g ( ) ; 
 
 +                                 l e t   s p e c _ r e s p o n s e   =   s p e c . g e t ( " r e s p o n s e " ) 
 
 +                                         . a n d _ t h e n ( | v |   v . a s _ s t r ( ) ) . u n w r a p _ o r ( " " ) . t o _ s t r i n g ( ) ; 
 
 + 
 
 +                                 l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                         " f o r g e a g e n t : s p e c i a l i s t - t h o u g h t - s t a r t e d " , 
 
 +                                         S p e c i a l i s t T h i n k i n g S t a r t e d P a y l o a d   { 
 
 +                                                 p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                                 s p e c i a l i s t _ i d :   s p e c i a l i s t _ i d . c l o n e ( ) , 
 
 +                                                 s p e c i a l i s t _ n a m e :   s p e c i a l i s t _ n a m e . c l o n e ( ) , 
 
 +                                                 s p e c i a l i s t _ t i t l e :   s p e c i a l i s t _ n a m e . c l o n e ( ) , 
 
 +                                         } , 
 
 +                                 ) ; 
 
 + 
 
 +                                 i f   ! t h i n k i n g . i s _ e m p t y ( )   { 
 
 +                                         l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                                 " f o r g e a g e n t : s p e c i a l i s t - t h o u g h t - u p d a t e " , 
 
 +                                                 S p e c i a l i s t T h i n k i n g U p d a t e P a y l o a d   { 
 
 +                                                         p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                                         s p e c i a l i s t _ i d :   s p e c i a l i s t _ i d . c l o n e ( ) , 
 
 +                                                         t h i n k i n g :   t h i n k i n g . c l o n e ( ) , 
 
 +                                                 } , 
 
 +                                         ) ; 
 
 +                                 } 
 
 + 
 
 +                                 l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                                         " f o r g e a g e n t : s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " , 
 
 +                                         S p e c i a l i s t R e s p o n s e C o m p l e t e d P a y l o a d   { 
 
 +                                                 p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                                 s p e c i a l i s t _ i d , 
 
 +                                                 s p e c i a l i s t _ n a m e , 
 
 +                                                 t h i n k i n g , 
 
 +                                                 r e s p o n s e :   s p e c _ r e s p o n s e , 
 
 +                                         } , 
 
 +                                 ) ; 
 
 +                         } 
 
 +                 } 
 
 + 
 
 +                 l e t   s u m m a r y   =   j s o n . g e t ( " s u m m a r y " ) 
 
 +                         . a n d _ t h e n ( | v |   v . a s _ s t r ( ) ) 
 
 +                         . u n w r a p _ o r ( & c o n t e n t ) 
 
 +                         . t o _ s t r i n g ( ) ; 
 
 + 
 
 +                 l e t   _   =   a p p _ h a n d l e . e m i t ( 
 
 +                         " f o r g e a g e n t : p l a n - c o m p l e t e d " , 
 
 +                         F o r g e A g e n t P l a n C o m p l e t e d P a y l o a d   { 
 
 +                                 p l a n _ i d :   p l a n _ i d . c l o n e ( ) , 
 
 +                                 s u m m a r y , 
 
 +                         } , 
 
 +                 ) ; 
 
 +         } ) ; 
 
 + 
 
 +         O k ( r e s p o n s e ) 
 
 + } 
 
 + 
 
   / /              A p p   e n t r y                                                                                                                                                                                                   
 
   
 
   # [ c f g _ a t t r ( m o b i l e ,   t a u r i : : m o b i l e _ e n t r y _ p o i n t ) ] 
 
 @ @   - 2 3 7 , 8   + 7 8 1 , 1 0   @ @   p u b   f n   r u n ( )   { 
 
                           s a v e _ r u n t i m e _ c o n f i g _ c o m m a n d _ h a n d l e r , 
 
                           s t a r t _ r u n t i m e _ c o m m a n d , 
 
                           s t o p _ r u n t i m e _ c o m m a n d , 
 
 +                         r e s o l v e _ s t a r t u p _ m o d e l _ c o m m a n d , 
 
                           g e t _ a p p _ d a t a _ d i r , 
 
                           f i n d _ s e r v e r _ b i n a r y , 
 
 +                         s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d , 
 
                   ] ) 
 
                   . s e t u p ( | a p p |   { 
 
                           # [ c f g ( d e b u g _ a s s e r t i o n s ) ] 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ a l i a s . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ a l i a s . r s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 9 b 0 c 6 8 c 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ a l i a s . r s 
 
 @ @   - 0 , 0   + 1 , 2 2 8   @ @ 
 
 + / / !   M o d e l   a l i a s   r e s o l u t i o n   a n d   s t a r t u p   m o d e l   s e l e c t i o n   p o l i c y . 
 
 + / / ! 
 
 + / / !   A l i a s   t a b l e : 
 
 + / / !       0 . 8 B   f a m i l y        " C o o p e r " 
 
 + / / !       2 B   f a m i l y            " I r o n " 
 
 + / / !       4 B   f a m i l y            " S t e e l " 
 
 + 
 
 + u s e   c r a t e : : m o d e l _ f i l e s : : M o d e l F i l e ; 
 
 + 
 
 + / / /   C a n o n i c a l   d i s p l a y   a l i a s   f o r   a   m o d e l   f a m i l y . 
 
 + # [ d e r i v e ( D e b u g ,   C l o n e ,   P a r t i a l E q ,   E q ,   s e r d e : : S e r i a l i z e ,   s e r d e : : D e s e r i a l i z e ) ] 
 
 + # [ s e r d e ( r e n a m e _ a l l   =   " s n a k e _ c a s e " ) ] 
 
 + p u b   e n u m   M o d e l A l i a s   { 
 
 +         C o o p e r , 
 
 +         I r o n , 
 
 +         S t e e l , 
 
 +         U n k n o w n , 
 
 + } 
 
 + 
 
 + i m p l   M o d e l A l i a s   { 
 
 +         p u b   f n   a s _ s t r ( & s e l f )   - >   & ' s t a t i c   s t r   { 
 
 +                 m a t c h   s e l f   { 
 
 +                         M o d e l A l i a s : : C o o p e r   = >   " C o o p e r " , 
 
 +                         M o d e l A l i a s : : I r o n   = >   " I r o n " , 
 
 +                         M o d e l A l i a s : : S t e e l   = >   " S t e e l " , 
 
 +                         M o d e l A l i a s : : U n k n o w n   = >   " U n k n o w n " , 
 
 +                 } 
 
 +         } 
 
 + } 
 
 + 
 
 + / / /   R e s o l v e   a   m o d e l   f i l e   p a t h / n a m e   t o   a   d i s p l a y   a l i a s . 
 
 + / / /   P r i o r i t y : 
 
 + / / /       1 .   f i l e n a m e   c o n t a i n s   " 0 . 8 b "   ( c a s e - i n s e n s i t i v e )        C o o p e r 
 
 + / / /       2 .   f i l e n a m e   c o n t a i n s   " 4 b "   ( c a s e - i n s e n s i t i v e )        S t e e l     ( c h e c k e d   b e f o r e   2 b   t o   a v o i d   f a l s e   m a t c h ) 
 
 + / / /       3 .   f i l e n a m e   c o n t a i n s   " 2 b "   ( c a s e - i n s e n s i t i v e )        I r o n 
 
 + / / /       4 .   f a l l b a c k        U n k n o w n 
 
 + p u b   f n   r e s o l v e _ a l i a s ( p a t h :   & s t r )   - >   M o d e l A l i a s   { 
 
 +         l e t   l o w e r   =   p a t h . t o _ l o w e r c a s e ( ) ; 
 
 +         / /   E x t r a c t   j u s t   t h e   f i l e n a m e   f o r   m a t c h i n g 
 
 +         l e t   f i l e n a m e   =   l o w e r . r s p l i t ( [ ' / ' ,   ' \ \ ' ] ) . n e x t ( ) . u n w r a p _ o r ( & l o w e r ) ; 
 
 + 
 
 +         i f   f i l e n a m e . c o n t a i n s ( " 0 . 8 b " )   { 
 
 +                 M o d e l A l i a s : : C o o p e r 
 
 +         }   e l s e   i f   f i l e n a m e . c o n t a i n s ( " 4 b " )   { 
 
 +                 M o d e l A l i a s : : S t e e l 
 
 +         }   e l s e   i f   f i l e n a m e . c o n t a i n s ( " 2 b " )   { 
 
 +                 M o d e l A l i a s : : I r o n 
 
 +         }   e l s e   { 
 
 +                 M o d e l A l i a s : : U n k n o w n 
 
 +         } 
 
 + } 
 
 + 
 
 + / / /   R e s u l t   o f   s t a r t u p   m o d e l   r e s o l u t i o n . 
 
 + # [ d e r i v e ( D e b u g ,   C l o n e ,   s e r d e : : S e r i a l i z e ,   s e r d e : : D e s e r i a l i z e ) ] 
 
 + p u b   s t r u c t   S t a r t u p M o d e l R e s o l u t i o n   { 
 
 +         p u b   m o d e l _ p a t h :   S t r i n g , 
 
 +         p u b   a l i a s :   M o d e l A l i a s , 
 
 +         p u b   r e a s o n :   S t a r t u p R e a s o n , 
 
 + } 
 
 + 
 
 + # [ d e r i v e ( D e b u g ,   C l o n e ,   P a r t i a l E q ,   E q ,   s e r d e : : S e r i a l i z e ,   s e r d e : : D e s e r i a l i z e ) ] 
 
 + # [ s e r d e ( r e n a m e _ a l l   =   " s n a k e _ c a s e " ) ] 
 
 + p u b   e n u m   S t a r t u p R e a s o n   { 
 
 +         S a v e d P r e f e r e n c e , 
 
 +         D e f a u l t I r o n , 
 
 +         F a l l b a c k C o o p e r , 
 
 +         M i s s i n g S a v e d M o d e l , 
 
 + } 
 
 + 
 
 + / / /   R e s o l v e   w h i c h   m o d e l   t o   s t a r t   a t   a p p   l a u n c h . 
 
 + / / / 
 
 + / / /   P o l i c y   ( f r o m   S D D ) : 
 
 + / / /       1 .   I f   u s e r   s a v e d   a   p r e f e r r e d   a l i a s   a n d   a   m a t c h i n g   m o d e l   e x i s t s        u s e   i t 
 
 + / / /       2 .   P r e f e r   I r o n   ( 2 B ) 
 
 + / / /       3 .   F a l l b a c k   t o   C o o p e r   ( 0 . 8 B ) 
 
 + / / /       4 .   S t e e l   i s   i g n o r e d   b y   a u t o - s t a r t   p o l i c y 
 
 + p u b   f n   r e s o l v e _ s t a r t u p _ m o d e l ( 
 
 +         p r e f e r r e d _ a l i a s :   O p t i o n < & s t r > , 
 
 +         d i s c o v e r e d :   & [ M o d e l F i l e ] , 
 
 + )   - >   O p t i o n < S t a r t u p M o d e l R e s o l u t i o n >   { 
 
 +         i f   d i s c o v e r e d . i s _ e m p t y ( )   { 
 
 +                 r e t u r n   N o n e ; 
 
 +         } 
 
 + 
 
 +         / /   C l a s s i f y   a l l   d i s c o v e r e d   m o d e l s 
 
 +         l e t   c l a s s i f i e d :   V e c < ( & M o d e l F i l e ,   M o d e l A l i a s ) >   =   d i s c o v e r e d 
 
 +                 . i t e r ( ) 
 
 +                 . m a p ( | m |   ( m ,   r e s o l v e _ a l i a s ( & m . p a t h ) ) ) 
 
 +                 . c o l l e c t ( ) ; 
 
 + 
 
 +         / /   1 .   R e s p e c t   s a v e d   p r e f e r e n c e   i f   a v a i l a b l e 
 
 +         i f   l e t   S o m e ( p r e f )   =   p r e f e r r e d _ a l i a s   { 
 
 +                 l e t   t a r g e t _ a l i a s   =   m a t c h   p r e f . t o _ l o w e r c a s e ( ) . a s _ s t r ( )   { 
 
 +                         " c o o p e r "   = >   M o d e l A l i a s : : C o o p e r , 
 
 +                         " i r o n "   = >   M o d e l A l i a s : : I r o n , 
 
 +                         " s t e e l "   = >   M o d e l A l i a s : : S t e e l , 
 
 +                         _   = >   M o d e l A l i a s : : U n k n o w n , 
 
 +                 } ; 
 
 +                 i f   t a r g e t _ a l i a s   ! =   M o d e l A l i a s : : U n k n o w n   { 
 
 +                         i f   l e t   S o m e ( ( m o d e l ,   a l i a s ) )   =   c l a s s i f i e d . i t e r ( ) . f i n d ( | ( _ ,   a ) |   * a   = =   t a r g e t _ a l i a s )   { 
 
 +                                 r e t u r n   S o m e ( S t a r t u p M o d e l R e s o l u t i o n   { 
 
 +                                         m o d e l _ p a t h :   m o d e l . p a t h . c l o n e ( ) , 
 
 +                                         a l i a s :   a l i a s . c l o n e ( ) , 
 
 +                                         r e a s o n :   S t a r t u p R e a s o n : : S a v e d P r e f e r e n c e , 
 
 +                                 } ) ; 
 
 +                         } 
 
 +                         / /   S a v e d   m o d e l   n o t   f o u n d        f a l l   t h r o u g h   t o   d e f a u l t   p o l i c y   w i t h   M i s s i n g S a v e d M o d e l   r e a s o n 
 
 +                 } 
 
 +         } 
 
 + 
 
 +         / /   2 .   P r e f e r   I r o n 
 
 +         i f   l e t   S o m e ( ( m o d e l ,   _ ) )   =   c l a s s i f i e d . i t e r ( ) . f i n d ( | ( _ ,   a ) |   * a   = =   M o d e l A l i a s : : I r o n )   { 
 
 +                 r e t u r n   S o m e ( S t a r t u p M o d e l R e s o l u t i o n   { 
 
 +                         m o d e l _ p a t h :   m o d e l . p a t h . c l o n e ( ) , 
 
 +                         a l i a s :   M o d e l A l i a s : : I r o n , 
 
 +                         r e a s o n :   S t a r t u p R e a s o n : : D e f a u l t I r o n , 
 
 +                 } ) ; 
 
 +         } 
 
 + 
 
 +         / /   3 .   F a l l b a c k   t o   C o o p e r 
 
 +         i f   l e t   S o m e ( ( m o d e l ,   _ ) )   =   c l a s s i f i e d . i t e r ( ) . f i n d ( | ( _ ,   a ) |   * a   = =   M o d e l A l i a s : : C o o p e r )   { 
 
 +                 r e t u r n   S o m e ( S t a r t u p M o d e l R e s o l u t i o n   { 
 
 +                         m o d e l _ p a t h :   m o d e l . p a t h . c l o n e ( ) , 
 
 +                         a l i a s :   M o d e l A l i a s : : C o o p e r , 
 
 +                         r e a s o n :   S t a r t u p R e a s o n : : F a l l b a c k C o o p e r , 
 
 +                 } ) ; 
 
 +         } 
 
 + 
 
 +         / /   4 .   N o   s u i t a b l e   m o d e l   f o u n d   ( S t e e l   o n l y   o r   U n k n o w n   o n l y ) 
 
 +         N o n e 
 
 + } 
 
 + 
 
 + # [ c f g ( t e s t ) ] 
 
 + m o d   t e s t s   { 
 
 +         u s e   s u p e r : : * ; 
 
 +         u s e   c r a t e : : m o d e l _ f i l e s : : M o d e l F i l e ; 
 
 + 
 
 +         f n   m a k e _ m o d e l ( n a m e :   & s t r )   - >   M o d e l F i l e   { 
 
 +                 M o d e l F i l e   { 
 
 +                         n a m e :   n a m e . t o _ s t r i n g ( ) , 
 
 +                         p a t h :   f o r m a t ! ( " D : / m o d e l s / { n a m e } " ) , 
 
 +                 } 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   r e s o l v e _ a l i a s _ d e t e c t s _ c o o p e r _ f r o m _ f i l e n a m e ( )   { 
 
 +                 a s s e r t _ e q ! ( 
 
 +                         r e s o l v e _ a l i a s ( " D : / m o d e l s / r a h u l 7 s t a r _ Q w e n 3 . 5 - 0 . 8 B - C o d e r . g g u f " ) , 
 
 +                         M o d e l A l i a s : : C o o p e r 
 
 +                 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   r e s o l v e _ a l i a s _ d e t e c t s _ i r o n _ f r o m _ f i l e n a m e ( )   { 
 
 +                 a s s e r t _ e q ! ( 
 
 +                         r e s o l v e _ a l i a s ( " D : / m o d e l s / Q w e n 3 . 5 - 2 B . Q 6 _ K . g g u f " ) , 
 
 +                         M o d e l A l i a s : : I r o n 
 
 +                 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   r e s o l v e _ a l i a s _ d e t e c t s _ s t e e l _ f r o m _ f i l e n a m e ( )   { 
 
 +                 a s s e r t _ e q ! ( 
 
 +                         r e s o l v e _ a l i a s ( " D : / m o d e l s / Q w e n 3 . 5 - 4 B - A b l i t e r a t e d . i 1 - Q 6 _ K . g g u f " ) , 
 
 +                         M o d e l A l i a s : : S t e e l 
 
 +                 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   r e s o l v e _ a l i a s _ r e t u r n s _ u n k n o w n _ f o r _ u n r e c o g n i z e d ( )   { 
 
 +                 a s s e r t _ e q ! ( 
 
 +                         r e s o l v e _ a l i a s ( " D : / m o d e l s / s o m e - o t h e r - m o d e l . g g u f " ) , 
 
 +                         M o d e l A l i a s : : U n k n o w n 
 
 +                 ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ p i c k s _ i r o n _ w h e n _ b o t h _ a v a i l a b l e ( )   { 
 
 +                 l e t   m o d e l s   =   v e c ! [ 
 
 +                         m a k e _ m o d e l ( " r a h u l 7 s t a r _ Q w e n 3 . 5 - 0 . 8 B - C o d e r . g g u f " ) , 
 
 +                         m a k e _ m o d e l ( " Q w e n 3 . 5 - 2 B . Q 6 _ K . g g u f " ) , 
 
 +                 ] ; 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( N o n e ,   & m o d e l s ) . u n w r a p ( ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . a l i a s ,   M o d e l A l i a s : : I r o n ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . r e a s o n ,   S t a r t u p R e a s o n : : D e f a u l t I r o n ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ f a l l s _ b a c k _ t o _ c o o p e r _ w h e n _ i r o n _ m i s s i n g ( )   { 
 
 +                 l e t   m o d e l s   =   v e c ! [ m a k e _ m o d e l ( " r a h u l 7 s t a r _ Q w e n 3 . 5 - 0 . 8 B - C o d e r . g g u f " ) ] ; 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( N o n e ,   & m o d e l s ) . u n w r a p ( ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . a l i a s ,   M o d e l A l i a s : : C o o p e r ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . r e a s o n ,   S t a r t u p R e a s o n : : F a l l b a c k C o o p e r ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ r e s p e c t s _ s a v e d _ p r e f e r e n c e ( )   { 
 
 +                 l e t   m o d e l s   =   v e c ! [ 
 
 +                         m a k e _ m o d e l ( " r a h u l 7 s t a r _ Q w e n 3 . 5 - 0 . 8 B - C o d e r . g g u f " ) , 
 
 +                         m a k e _ m o d e l ( " Q w e n 3 . 5 - 2 B . Q 6 _ K . g g u f " ) , 
 
 +                 ] ; 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( S o m e ( " c o o p e r " ) ,   & m o d e l s ) . u n w r a p ( ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . a l i a s ,   M o d e l A l i a s : : C o o p e r ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . r e a s o n ,   S t a r t u p R e a s o n : : S a v e d P r e f e r e n c e ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ i g n o r e s _ s t e e l _ i n _ a u t o _ p o l i c y ( )   { 
 
 +                 l e t   m o d e l s   =   v e c ! [ m a k e _ m o d e l ( " Q w e n 3 . 5 - 4 B - A b l i t e r a t e d . i 1 - Q 6 _ K . g g u f " ) ] ; 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( N o n e ,   & m o d e l s ) ; 
 
 +                 a s s e r t ! ( r e s u l t . i s _ n o n e ( ) ,   " S t e e l   s h o u l d   n o t   b e   a u t o - s e l e c t e d " ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ r e t u r n s _ n o n e _ w h e n _ n o _ m o d e l s ( )   { 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( N o n e ,   & [ ] ) ; 
 
 +                 a s s e r t ! ( r e s u l t . i s _ n o n e ( ) ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s t a r t u p _ r e s o l v e r _ f a l l s _ t h r o u g h _ w h e n _ s a v e d _ p r e f e r e n c e _ n o t _ f o u n d ( )   { 
 
 +                 / /   S a v e d   p r e f e r e n c e   i s   " i r o n "   b u t   o n l y   C o o p e r   i s   a v a i l a b l e        f a l l b a c k   t o   C o o p e r 
 
 +                 l e t   m o d e l s   =   v e c ! [ m a k e _ m o d e l ( " r a h u l 7 s t a r _ Q w e n 3 . 5 - 0 . 8 B - C o d e r . g g u f " ) ] ; 
 
 +                 l e t   r e s u l t   =   r e s o l v e _ s t a r t u p _ m o d e l ( S o m e ( " i r o n " ) ,   & m o d e l s ) . u n w r a p ( ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . a l i a s ,   M o d e l A l i a s : : C o o p e r ) ; 
 
 +                 a s s e r t _ e q ! ( r e s u l t . r e a s o n ,   S t a r t u p R e a s o n : : F a l l b a c k C o o p e r ) ; 
 
 +         } 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s 
 
 i n d e x   e a 0 e f 4 6 . . f 3 b e f b 3   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / m o d e l _ f i l e s . r s 
 
 @ @   - 3 , 6   + 3 , 8   @ @   u s e   s t d : : p a t h : : P a t h ; 
 
   u s e   t a u r i : : A p p H a n d l e ; 
 
   u s e   t a u r i _ p l u g i n _ d i a l o g : : D i a l o g E x t ; 
 
   
 
 + u s e   c r a t e : : m o d e l _ l i b r a r y : : p a t h s : : r e s o l v e _ m o d e l s _ d i r ; 
 
 + 
 
   # [ d e r i v e ( s e r d e : : S e r i a l i z e ,   s e r d e : : D e s e r i a l i z e ,   C l o n e ,   D e b u g ,   P a r t i a l E q ,   E q ) ] 
 
   p u b   s t r u c t   M o d e l F i l e   { 
 
           p u b   n a m e :   S t r i n g , 
 
 @ @   - 3 4 , 2 3   + 3 6 , 9 4   @ @   f n   s c a n _ m o d e l _ d i r ( p a t h :   & P a t h )   - >   R e s u l t < V e c < M o d e l F i l e > ,   S t r i n g >   { 
 
                   r e t u r n   E r r ( f o r m a t ! ( " N o t   a   d i r e c t o r y :   { } " ,   p a t h . d i s p l a y ( ) ) ) ; 
 
           } 
 
   
 
 +         / /   D e f a u l t   s c a n   i s   t o p - l e v e l   o n l y   ( n o   r e c u r s i o n   i n t o   s u b d i r e c t o r i e s ) 
 
 +         s c a n _ m o d e l _ d i r _ t o p _ l e v e l ( p a t h ) 
 
 + } 
 
 + 
 
 + / / /   S c a n s   o n l y   t h e   i m m e d i a t e   c h i l d r e n   o f   ` p a t h `   ( d e p t h = 1 ,   n o   r e c u r s i o n ) . 
 
 + / / /   R e t u r n s   o n l y   f i l e s   w i t h   a   ` . g g u f `   e x t e n s i o n   ( c a s e - i n s e n s i t i v e ) ,   s o r t e d   b y   n a m e . 
 
 + f n   s c a n _ m o d e l _ d i r _ t o p _ l e v e l ( p a t h :   & P a t h )   - >   R e s u l t < V e c < M o d e l F i l e > ,   S t r i n g >   { 
 
 +         i f   ! p a t h . e x i s t s ( )   { 
 
 +                 r e t u r n   E r r ( f o r m a t ! ( " D i r e c t o r y   n o t   f o u n d :   { } " ,   p a t h . d i s p l a y ( ) ) ) ; 
 
 +         } 
 
 +         i f   ! p a t h . i s _ d i r ( )   { 
 
 +                 r e t u r n   E r r ( f o r m a t ! ( " N o t   a   d i r e c t o r y :   { } " ,   p a t h . d i s p l a y ( ) ) ) ; 
 
 +         } 
 
 + 
 
           l e t   e n t r i e s   =   s t d : : f s : : r e a d _ d i r ( p a t h ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
 -         l e t   m u t   m o d e l s   =   V e c : : n e w ( ) ; 
 
 +         l e t   m u t   m o d e l s :   V e c < M o d e l F i l e >   =   e n t r i e s 
 
 +                 . f l a t t e n ( ) 
 
 +                 . m a p ( | e |   e . p a t h ( ) ) 
 
 +                 . f i l t e r ( | p |   { 
 
 +                         p . i s _ f i l e ( ) 
 
 +                                 & &   p . e x t e n s i o n ( ) 
 
 +                                         . m a p ( | e x t |   e x t . e q _ i g n o r e _ a s c i i _ c a s e ( " g g u f " ) ) 
 
 +                                         . u n w r a p _ o r ( f a l s e ) 
 
 +                 } ) 
 
 +                 . m a p ( | p |   m o d e l _ f i l e _ f r o m _ p a t h ( & p ) ) 
 
 +                 . c o l l e c t ( ) ; 
 
 + 
 
 +         m o d e l s . s o r t _ b y ( | a ,   b |   a . n a m e . c m p ( & b . n a m e ) ) ; 
 
 +         O k ( m o d e l s ) 
 
 + } 
 
 + 
 
 + / / /   S c a n s   o n l y   ` m o d e l s / t e x t - l l m / `   f o r   ` . g g u f `   f i l e s . 
 
 + / / /   A l l   o t h e r   d i r e c t o r i e s   a r e   i g n o r e d . 
 
 + f n   s c a n _ m o d e l _ d i r _ f o r _ c h a t ( d i r :   & P a t h ,   m o d e l s :   & m u t   V e c < M o d e l F i l e > )   - >   R e s u l t < ( ) ,   S t r i n g >   { 
 
 +         l e t   t e x t _ l l m _ d i r   =   d i r . j o i n ( " t e x t - l l m " ) ; 
 
 + 
 
 +         i f   ! t e x t _ l l m _ d i r . e x i s t s ( )   { 
 
 +                 r e t u r n   O k ( ( ) ) ; 
 
 +         } 
 
 + 
 
 +         i f   ! t e x t _ l l m _ d i r . i s _ d i r ( )   { 
 
 +                 r e t u r n   E r r ( f o r m a t ! ( " N o t   a   d i r e c t o r y :   { } " ,   t e x t _ l l m _ d i r . d i s p l a y ( ) ) ) ; 
 
 +         } 
 
 + 
 
 +         l e t   e n t r i e s   =   s t d : : f s : : r e a d _ d i r ( t e x t _ l l m _ d i r ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
   
 
           f o r   e n t r y   i n   e n t r i e s . f l a t t e n ( )   { 
 
                   l e t   p a t h   =   e n t r y . p a t h ( ) ; 
 
                   i f   p a t h . i s _ f i l e ( ) 
 
                           & &   p a t h 
 
 -                         . e x t e n s i o n ( ) 
 
 -                         . m a p ( | e x t |   e x t . e q _ i g n o r e _ a s c i i _ c a s e ( " g g u f " ) ) 
 
 -                         . u n w r a p _ o r ( f a l s e ) 
 
 +                                 . e x t e n s i o n ( ) 
 
 +                                 . m a p ( | e x t |   e x t . e q _ i g n o r e _ a s c i i _ c a s e ( " g g u f " ) ) 
 
 +                                 . u n w r a p _ o r ( f a l s e ) 
 
                   { 
 
                           m o d e l s . p u s h ( m o d e l _ f i l e _ f r o m _ p a t h ( & p a t h ) ) ; 
 
                   } 
 
           } 
 
   
 
 -         m o d e l s . s o r t _ b y ( | a ,   b |   a . n a m e . c m p ( & b . n a m e ) ) ; 
 
 -         O k ( m o d e l s ) 
 
 +         O k ( ( ) ) 
 
 + } 
 
 + 
 
 + / / /   R e c u r s i v e l y   s c a n s   a l l   s u b d i r e c t o r i e s   f o r   . g g u f   f i l e s . 
 
 + / / /   K e p t   f o r   f u t u r e   u s e   w h e n   d e e p   s c a n n i n g   m a y   b e   n e e d e d . 
 
 + # [ a l l o w ( d e a d _ c o d e ) ] 
 
 + f n   s c a n _ m o d e l _ d i r _ r e c u r s i v e ( d i r :   & P a t h ,   m o d e l s :   & m u t   V e c < M o d e l F i l e > )   - >   R e s u l t < ( ) ,   S t r i n g >   { 
 
 +         l e t   e n t r i e s   =   s t d : : f s : : r e a d _ d i r ( d i r ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
 + 
 
 +         f o r   e n t r y   i n   e n t r i e s . f l a t t e n ( )   { 
 
 +                 l e t   p a t h   =   e n t r y . p a t h ( ) ; 
 
 +                 i f   p a t h . i s _ d i r ( )   { 
 
 +                         / /   S k i p   h i d d e n   d i r e c t o r i e s   ( e . g .   . g i t ,   . c a c h e ) 
 
 +                         i f   l e t   S o m e ( n a m e )   =   p a t h . f i l e _ n a m e ( ) . a n d _ t h e n ( | n |   n . t o _ s t r ( ) )   { 
 
 +                                 i f   n a m e . s t a r t s _ w i t h ( ' . ' )   { 
 
 +                                         c o n t i n u e ; 
 
 +                                 } 
 
 +                         } 
 
 +                         s c a n _ m o d e l _ d i r _ r e c u r s i v e ( & p a t h ,   m o d e l s ) ? ; 
 
 +                 }   e l s e   i f   p a t h . i s _ f i l e ( ) 
 
 +                         & &   p a t h 
 
 +                                 . e x t e n s i o n ( ) 
 
 +                                 . m a p ( | e x t |   e x t . e q _ i g n o r e _ a s c i i _ c a s e ( " g g u f " ) ) 
 
 +                                 . u n w r a p _ o r ( f a l s e ) 
 
 +                 { 
 
 +                         m o d e l s . p u s h ( m o d e l _ f i l e _ f r o m _ p a t h ( & p a t h ) ) ; 
 
 +                 } 
 
 +         } 
 
 + 
 
 +         O k ( ( ) ) 
 
   } 
 
   
 
   f n   i m p o r t _ m o d e l _ f i l e ( s r c :   & P a t h ,   d e s t _ d i r :   & P a t h )   - >   R e s u l t < M o d e l F i l e ,   S t r i n g >   { 
 
 @ @   - 8 6 , 7   + 1 5 9 , 2 3   @ @   f n   i m p o r t _ m o d e l _ f i l e ( s r c :   & P a t h ,   d e s t _ d i r :   & P a t h )   - >   R e s u l t < M o d e l F i l e ,   S t r i n g >   { 
 
   
 
   # [ t a u r i : : c o m m a n d ] 
 
   p u b   f n   s c a n _ m o d e l s ( d i r :   S t r i n g )   - >   R e s u l t < V e c < M o d e l F i l e > ,   S t r i n g >   { 
 
 -         s c a n _ m o d e l _ d i r ( P a t h : : n e w ( & d i r ) ) 
 
 +         l e t   p a t h   =   i f   d i r . t r i m ( ) . i s _ e m p t y ( )   { 
 
 +                 r e s o l v e _ m o d e l s _ d i r ( N o n e ) 
 
 +         }   e l s e   { 
 
 +                 r e s o l v e _ m o d e l s _ d i r ( S o m e ( & d i r ) ) 
 
 +         } ; 
 
 +         
 
 +         i f   ! p a t h . e x i s t s ( )   { 
 
 +                 r e t u r n   E r r ( f o r m a t ! ( " D i r e c t o r y   n o t   f o u n d :   { } " ,   p a t h . d i s p l a y ( ) ) ) ; 
 
 +         } 
 
 +         i f   ! p a t h . i s _ d i r ( )   { 
 
 +                 r e t u r n   E r r ( f o r m a t ! ( " N o t   a   d i r e c t o r y :   { } " ,   p a t h . d i s p l a y ( ) ) ) ; 
 
 +         } 
 
 + 
 
 +         l e t   m u t   m o d e l s   =   V e c : : n e w ( ) ; 
 
 +         s c a n _ m o d e l _ d i r _ f o r _ c h a t ( & p a t h ,   & m u t   m o d e l s ) ? ; 
 
 +         m o d e l s . s o r t _ b y ( | a ,   b |   a . n a m e . c m p ( & b . n a m e ) ) ; 
 
 +         O k ( m o d e l s ) 
 
   } 
 
   
 
   # [ t a u r i : : c o m m a n d ] 
 
 @ @   - 1 2 9 , 7   + 2 1 8 , 7   @ @   p u b   f n   i m p o r t _ m o d e l ( s r c _ p a t h :   S t r i n g ,   d e s t _ d i r :   S t r i n g )   - >   R e s u l t < M o d e l F i l e ,   S t r 
 
   
 
   # [ c f g ( t e s t ) ] 
 
   m o d   t e s t s   { 
 
 -         u s e   s u p e r : : { i m p o r t _ m o d e l _ f i l e ,   s c a n _ m o d e l _ d i r } ; 
 
 +         u s e   s u p e r : : { i m p o r t _ m o d e l _ f i l e ,   s c a n _ m o d e l _ d i r ,   s c a n _ m o d e l _ d i r _ f o r _ c h a t } ; 
 
           u s e   s t d : : p a t h : : P a t h B u f ; 
 
           u s e   s t d : : t i m e : : { S y s t e m T i m e ,   U N I X _ E P O C H } ; 
 
   
 
 @ @   - 1 7 1 , 6   + 2 6 0 , 6 8   @ @   m o d   t e s t s   { 
 
                   l e t   _   =   s t d : : f s : : r e m o v e _ d i r _ a l l ( & d i r ) ; 
 
           } 
 
   
 
 +         # [ t e s t ] 
 
 +         f n   s c a n _ m o d e l _ d i r _ f o r _ c h a t _ o n l y _ s c a n s _ t e x t _ l l m _ d i r e c t o r y ( )   { 
 
 +                 l e t   d i r   =   t e m p _ p a t h ( " s c a n - m o d e l s - t e x t - l l m " ) ; 
 
 +                 l e t   e m b e d d i n g s   =   d i r . j o i n ( " e m b e d d i n g s " ) ; 
 
 +                 l e t   a u d i o   =   d i r . j o i n ( " a u d i o " ) ; 
 
 +                 l e t   t e x t _ l l m   =   d i r . j o i n ( " t e x t - l l m " ) ; 
 
 +                 s t d : : f s : : c r e a t e _ d i r _ a l l ( & e m b e d d i n g s ) . e x p e c t ( " c r e a t e   e m b e d d i n g s   d i r " ) ; 
 
 +                 s t d : : f s : : c r e a t e _ d i r _ a l l ( & a u d i o ) . e x p e c t ( " c r e a t e   a u d i o   d i r " ) ; 
 
 +                 s t d : : f s : : c r e a t e _ d i r _ a l l ( & t e x t _ l l m ) . e x p e c t ( " c r e a t e   t e x t - l l m   d i r " ) ; 
 
 + 
 
 +                 s t d : : f s : : w r i t e ( d i r . j o i n ( " t o p - l e v e l . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   t o p - l e v e l   m o d e l " ) ; 
 
 +                 s t d : : f s : : w r i t e ( e m b e d d i n g s . j o i n ( " e m b e d d i n g - m o d e l . g g u f " ) ,   b " d e m o " ) 
 
 +                         . e x p e c t ( " w r i t e   e m b e d d i n g   m o d e l " ) ; 
 
 +                 s t d : : f s : : w r i t e ( a u d i o . j o i n ( " w h i s p e r . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   a u d i o   m o d e l " ) ; 
 
 +                 s t d : : f s : : w r i t e ( t e x t _ l l m . j o i n ( " c h a t - m o d e l . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   c h a t   m o d e l " ) ; 
 
 + 
 
 +                 l e t   m u t   m o d e l s   =   V e c : : n e w ( ) ; 
 
 +                 s c a n _ m o d e l _ d i r _ f o r _ c h a t ( & d i r ,   & m u t   m o d e l s ) . e x p e c t ( " s c a n   f o r   c h a t " ) ; 
 
 +                 l e t   n a m e s :   V e c < _ >   =   m o d e l s . i n t o _ i t e r ( ) . m a p ( | m |   m . n a m e ) . c o l l e c t ( ) ; 
 
 + 
 
 +                 a s s e r t _ e q ! ( n a m e s ,   v e c ! [ " c h a t - m o d e l . g g u f " ] ) ; 
 
 + 
 
 +                 l e t   _   =   s t d : : f s : : r e m o v e _ d i r _ a l l ( & d i r ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s c a n _ m o d e l _ d i r _ r e c u r s i v e _ f i n d s _ n e s t e d _ g g u f ( )   { 
 
 +                 / /   T e s t s   t h a t   t h e   r e c u r s i v e   s c a n   f u n c t i o n   s t i l l   w o r k s   f o r   f u t u r e   u s e 
 
 +                 u s e   s u p e r : : s c a n _ m o d e l _ d i r _ r e c u r s i v e ; 
 
 +                 
 
 +                 l e t   d i r   =   t e m p _ p a t h ( " s c a n - m o d e l s - r e c u r s i v e - f n " ) ; 
 
 +                 l e t   s u b   =   d i r . j o i n ( " m r a d e r m a c h e r " ) . j o i n ( " S u r i - Q w e n - 3 . 5 - 4 B - U n c e n s o r e d - i 1 - G G U F " ) ; 
 
 +                 s t d : : f s : : c r e a t e _ d i r _ a l l ( & s u b ) . e x p e c t ( " c r e a t e   n e s t e d   d i r s " ) ; 
 
 +                 s t d : : f s : : w r i t e ( d i r . j o i n ( " t o p - l e v e l . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   t o p - l e v e l   m o d e l " ) ; 
 
 +                 s t d : : f s : : w r i t e ( s u b . j o i n ( " n e s t e d - m o d e l . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   n e s t e d   m o d e l " ) ; 
 
 + 
 
 +                 l e t   m u t   m o d e l s   =   V e c : : n e w ( ) ; 
 
 +                 s c a n _ m o d e l _ d i r _ r e c u r s i v e ( & d i r ,   & m u t   m o d e l s ) . e x p e c t ( " r e c u r s i v e   s c a n " ) ; 
 
 +                 m o d e l s . s o r t _ b y ( | a ,   b |   a . n a m e . c m p ( & b . n a m e ) ) ; 
 
 + 
 
 +                 l e t   n a m e s :   V e c < _ >   =   m o d e l s . i t e r ( ) . m a p ( | m |   m . n a m e . a s _ s t r ( ) ) . c o l l e c t ( ) ; 
 
 +                 a s s e r t _ e q ! ( n a m e s ,   v e c ! [ " n e s t e d - m o d e l . g g u f " ,   " t o p - l e v e l . g g u f " ] ) ; 
 
 + 
 
 +                 l e t   _   =   s t d : : f s : : r e m o v e _ d i r _ a l l ( & d i r ) ; 
 
 +         } 
 
 + 
 
 +         # [ t e s t ] 
 
 +         f n   s c a n _ m o d e l _ d i r _ s k i p s _ h i d d e n _ d i r e c t o r i e s ( )   { 
 
 +                 l e t   d i r   =   t e m p _ p a t h ( " s c a n - m o d e l s - h i d d e n " ) ; 
 
 +                 l e t   h i d d e n   =   d i r . j o i n ( " . g i t " ) ; 
 
 +                 s t d : : f s : : c r e a t e _ d i r _ a l l ( & h i d d e n ) . e x p e c t ( " c r e a t e   h i d d e n   d i r " ) ; 
 
 +                 s t d : : f s : : w r i t e ( d i r . j o i n ( " v i s i b l e . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   v i s i b l e   m o d e l " ) ; 
 
 +                 s t d : : f s : : w r i t e ( h i d d e n . j o i n ( " s e c r e t . g g u f " ) ,   b " d e m o " ) . e x p e c t ( " w r i t e   h i d d e n   m o d e l " ) ; 
 
 + 
 
 +                 l e t   m o d e l s   =   s c a n _ m o d e l _ d i r ( & d i r ) . e x p e c t ( " s c a n   m o d e l   d i r " ) ; 
 
 +                 l e t   n a m e s :   V e c < _ >   =   m o d e l s . i n t o _ i t e r ( ) . m a p ( | m |   m . n a m e ) . c o l l e c t ( ) ; 
 
 + 
 
 +                 a s s e r t _ e q ! ( n a m e s ,   v e c ! [ " v i s i b l e . g g u f " ] ) ; 
 
 + 
 
 +                 l e t   _   =   s t d : : f s : : r e m o v e _ d i r _ a l l ( & d i r ) ; 
 
 +         } 
 
 + 
 
           # [ t e s t ] 
 
           f n   i m p o r t _ m o d e l _ f i l e _ r e t u r n s _ e x i s t i n g _ m o d e l _ w h e n _ s o u r c e _ m a t c h e s _ d e s t i n a t i o n ( )   { 
 
                   l e t   d i r   =   t e m p _ p a t h ( " i m p o r t - m o d e l " ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s 
 
 i n d e x   d 9 b 8 a f 4 . . 3 1 1 5 9 3 5   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / m o d . r s 
 
 @ @   - 6 9 , 6   + 6 9 , 7   @ @   f n   s t a r t _ r u n t i m e _ i n n e r ( 
 
           a p p :   & A p p H a n d l e , 
 
           s t a t e :   & S t a t e < ' _ ,   R u n t i m e S t a t e > , 
 
           o v e r r i d e _ c o n f i g :   O p t i o n < R u n t i m e C o n f i g > , 
 
 +         s t a r t u p _ s t a t u s :   R u n t i m e S t a t u s , 
 
   )   - >   R e s u l t < R u n t i m e S n a p s h o t ,   S t r i n g >   { 
 
           l e t   c o m m a n d   =   i f   o v e r r i d e _ c o n f i g . i s _ s o m e ( )   { 
 
                   R u n t i m e L i f e c y c l e C o m m a n d : : S a v e A n d S t a r t 
 
 @ @   - 1 1 3 , 7   + 1 1 4 , 7   @ @   f n   s t a r t _ r u n t i m e _ i n n e r ( 
 
                           r e t u r n   O k ( b u i l d _ s n a p s h o t ( & i n n e r ) ) ; 
 
                   } 
 
   
 
 -                 i n n e r . s t a t u s   =   R u n t i m e S t a t u s : : S t a r t i n g ; 
 
 +                 i n n e r . s t a t u s   =   s t a r t u p _ s t a t u s ; 
 
                   i n n e r . l a s t _ e r r o r   =   N o n e ; 
 
                   i n n e r . c o n f i g . c l o n e ( ) 
 
           } ; 
 
 @ @   - 1 3 7 , 7   + 1 3 8 , 7   @ @   f n   s t a r t _ r u n t i m e _ i n n e r ( 
 
           { 
 
                   l e t   m u t   i n n e r   =   s t a t e . 0 . l o c k ( ) . m a p _ e r r ( | e |   e . t o _ s t r i n g ( ) ) ? ; 
 
                   i n n e r . c h i l d   =   S o m e ( c h i l d ) ; 
 
 -                 i n n e r . s t a t u s   =   R u n t i m e S t a t u s : : S t a r t i n g ; 
 
 +                 i n n e r . s t a t u s   =   s t a r t u p _ s t a t u s ; 
 
           } 
 
   
 
           i f   w a i t _ f o r _ h e a l t h ( & c o n f i g . a d d r ,   D u r a t i o n : : f r o m _ s e c s ( 1 5 ) )   { 
 
 @ @   - 1 6 4 , 1 0   + 1 6 5 , 1 7   @ @   f n   s t a r t _ r u n t i m e _ i n n e r ( 
 
                   } 
 
                   i n n e r . c h i l d   =   N o n e ; 
 
                   i n n e r . s t a t u s   =   R u n t i m e S t a t u s : : E r r o r ; 
 
 -                 l e t   m e s s a g e   =   f o r m a t ! ( 
 
 -                         " L o c a l   A P I   d i d   n o t   p a s s   / h e a l t h   r e a d i n e s s   o n   { }   i n   t i m e " , 
 
 -                         c o n f i g . a d d r 
 
 -                 ) ; 
 
 +                 l e t   m e s s a g e   =   i f   s t a r t u p _ s t a t u s   = =   R u n t i m e S t a t u s : : L o a d i n g   { 
 
 +                         f o r m a t ! ( 
 
 +                                 " M o d e l   l o a d i n g   t i m e d   o u t   b e f o r e   t h e   l o c a l   A P I   b e c a m e   r e a d y   o n   { } " , 
 
 +                                 c o n f i g . a d d r 
 
 +                         ) 
 
 +                 }   e l s e   { 
 
 +                         f o r m a t ! ( 
 
 +                                 " L o c a l   A P I   d i d   n o t   p a s s   / h e a l t h   r e a d i n e s s   o n   { }   i n   t i m e " , 
 
 +                                 c o n f i g . a d d r 
 
 +                         ) 
 
 +                 } ; 
 
                   i n n e r . l a s t _ e r r o r   =   S o m e ( r u n t i m e _ e r r o r ( " h e a l t h _ t i m e o u t " ,   & m e s s a g e ) ) ; 
 
                   f i n i s h _ l i f e c y c l e _ c o m m a n d ( 
 
                           & m u t   i n n e r , 
 
 @ @   - 1 8 3 , 7   + 1 9 1 , 4 3   @ @   p u b   f n   b o o t s t r a p _ r u n t i m e ( 
 
           a p p :   A p p H a n d l e , 
 
           s t a t e :   S t a t e < ' _ ,   R u n t i m e S t a t e > , 
 
   )   - >   R e s u l t < R u n t i m e S n a p s h o t ,   S t r i n g >   { 
 
 -         l e t   c o n f i g   =   l o a d _ r u n t i m e _ c o n f i g ( & a p p ) . u n w r a p _ o r _ d e f a u l t ( ) ; 
 
 +         u s e   c r a t e : : m o d e l _ a l i a s ; 
 
 +         u s e   c r a t e : : m o d e l _ l i b r a r y : : p a t h s : : r e s o l v e _ m o d e l s _ d i r ; 
 
 + 
 
 +         l e t   m u t   c o n f i g   =   l o a d _ r u n t i m e _ c o n f i g ( & a p p ) . u n w r a p _ o r _ d e f a u l t ( ) ; 
 
 + 
 
 +         / /   A u t o - r e s o l v e   m o d e l   i f   n o n e   i s   c o n f i g u r e d   y e t 
 
 +         l e t   m o d e l _ p a t h _ e m p t y   =   c o n f i g 
 
 +                 . m o d e l _ p a t h 
 
 +                 . a s _ d e r e f ( ) 
 
 +                 . m a p ( | p |   p . t r i m ( ) . i s _ e m p t y ( ) ) 
 
 +                 . u n w r a p _ o r ( t r u e ) ; 
 
 + 
 
 +         i f   m o d e l _ p a t h _ e m p t y   & &   c o n f i g . c o n n e c t i o n _ m o d e   = =   C o n n e c t i o n M o d e : : L o c a l   { 
 
 +                 l e t   m o d e l s _ d i r   =   r e s o l v e _ m o d e l s _ d i r ( c o n f i g . m o d e l s _ d i r . a s _ d e r e f ( ) ) ; 
 
 +                 l e t   m o d e l s   =   i f   m o d e l s _ d i r . e x i s t s ( )   { 
 
 +                         l e t   d i r _ s t r   =   m o d e l s _ d i r . t o _ s t r i n g _ l o s s y ( ) . t o _ s t r i n g ( ) ; 
 
 +                         c r a t e : : m o d e l _ f i l e s : : s c a n _ m o d e l s ( d i r _ s t r ) . u n w r a p _ o r _ d e f a u l t ( ) 
 
 +                 }   e l s e   { 
 
 +                         V e c : : n e w ( ) 
 
 +                 } ; 
 
 + 
 
 +                 i f   l e t   S o m e ( r e s o l u t i o n )   =   m o d e l _ a l i a s : : r e s o l v e _ s t a r t u p _ m o d e l ( 
 
 +                         c o n f i g . p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s . a s _ d e r e f ( ) , 
 
 +                         & m o d e l s , 
 
 +                 )   { 
 
 +                         e p r i n t l n ! ( 
 
 +                                 " [ b o o t s t r a p ]   a u t o - s e l e c t e d   m o d e l :   { }   ( { : ? } )   r e a s o n = { : ? } " , 
 
 +                                 r e s o l u t i o n . a l i a s . a s _ s t r ( ) , 
 
 +                                 r e s o l u t i o n . m o d e l _ p a t h , 
 
 +                                 r e s o l u t i o n . r e a s o n 
 
 +                         ) ; 
 
 +                         c o n f i g . m o d e l _ p a t h   =   S o m e ( r e s o l u t i o n . m o d e l _ p a t h ) ; 
 
 +                         / /   A u t o - e n a b l e   O n A p p L a u n c h   w h e n   w e   f o u n d   a   m o d e l   a u t o m a t i c a l l y 
 
 +                         c o n f i g . s t a r t _ p o l i c y   =   S t a r t P o l i c y : : O n A p p L a u n c h ; 
 
 +                 } 
 
 +         } 
 
 + 
 
           l e t   s h o u l d _ a u t o s t a r t   =   c o n f i g . c o n n e c t i o n _ m o d e   = =   C o n n e c t i o n M o d e : : L o c a l 
 
                   & &   c o n f i g . s t a r t _ p o l i c y   = =   S t a r t P o l i c y : : O n A p p L a u n c h 
 
                   & &   c o n f i g 
 
 @ @   - 1 9 9 , 7   + 2 4 3 , 7   @ @   p u b   f n   b o o t s t r a p _ r u n t i m e ( 
 
           } 
 
   
 
           i f   s h o u l d _ a u t o s t a r t   { 
 
 -                 s t a r t _ r u n t i m e _ i n n e r ( & a p p ,   & s t a t e ,   S o m e ( c o n f i g ) ) 
 
 +                 s t a r t _ r u n t i m e _ i n n e r ( & a p p ,   & s t a t e ,   S o m e ( c o n f i g ) ,   R u n t i m e S t a t u s : : L o a d i n g ) 
 
           }   e l s e   { 
 
                   g e t _ r u n t i m e _ s n a p s h o t ( s t a t e ) 
 
           } 
 
 @ @   - 2 0 9 , 7   + 2 5 3 , 1 5   @ @   p u b   f n   s t a r t _ r u n t i m e ( 
 
           a p p :   A p p H a n d l e , 
 
           s t a t e :   S t a t e < ' _ ,   R u n t i m e S t a t e > , 
 
   )   - >   R e s u l t < R u n t i m e S n a p s h o t ,   S t r i n g >   { 
 
 -         s t a r t _ r u n t i m e _ i n n e r ( & a p p ,   & s t a t e ,   N o n e ) 
 
 +         s t a r t _ r u n t i m e _ i n n e r ( & a p p ,   & s t a t e ,   N o n e ,   R u n t i m e S t a t u s : : S t a r t i n g ) 
 
 + } 
 
 + 
 
 + p u b   f n   s t a r t _ r u n t i m e _ w i t h _ s t a t u s ( 
 
 +         a p p :   A p p H a n d l e , 
 
 +         s t a t e :   S t a t e < ' _ ,   R u n t i m e S t a t e > , 
 
 +         s t a r t u p _ s t a t u s :   R u n t i m e S t a t u s , 
 
 + )   - >   R e s u l t < R u n t i m e S n a p s h o t ,   S t r i n g >   { 
 
 +         s t a r t _ r u n t i m e _ i n n e r ( & a p p ,   & s t a t e ,   N o n e ,   s t a r t u p _ s t a t u s ) 
 
   } 
 
   
 
   p u b   f n   s t o p _ r u n t i m e ( s t a t e :   S t a t e < ' _ ,   R u n t i m e S t a t e > )   - >   R e s u l t < R u n t i m e S n a p s h o t ,   S t r i n g >   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / p r o c e s s . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / p r o c e s s . r s 
 
 i n d e x   4 b 5 5 f 9 6 . . 0 4 8 9 a 8 a   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / p r o c e s s . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / p r o c e s s . r s 
 
 @ @   - 1 , 5   + 1 , 5   @ @ 
 
   u s e   s t d : : p a t h : : P a t h B u f ; 
 
 - u s e   s t d : : p r o c e s s : : { C h i l d ,   C o m m a n d } ; 
 
 + u s e   s t d : : p r o c e s s : : { C h i l d ,   C o m m a n d ,   S t d i o } ; 
 
   
 
   u s e   t a u r i : : { A p p H a n d l e ,   M a n a g e r } ; 
 
   
 
 @ @   - 1 0 2 , 6   + 1 0 2 , 9   @ @   p u b   f n   s p a w n _ l o c a l l l m ( a p p :   & A p p H a n d l e ,   c o n f i g :   & R u n t i m e C o n f i g )   - >   R e s u l t < C h i l d , 
 
                   . e n v ( " L O C A L L L M _ C T X " ,   c o n f i g . c t x _ s i z e . t o _ s t r i n g ( ) ) ; 
 
           a p p l y _ r u n t i m e _ t o _ c o m m a n d ( & m u t   c o m m a n d ,   & r u n t i m e ) ; 
 
   
 
 +         / /   S u p p r e s s   v e r b o s e   l l a m a . c p p   l o g s   ( c r e a t e _ t e n s o r ,   e t c . )   b y   r e d i r e c t i n g   s t d e r r 
 
 +         c o m m a n d . s t d e r r ( S t d i o : : n u l l ( ) ) ; 
 
 + 
 
           c o m m a n d 
 
                   . s p a w n ( ) 
 
                   . m a p _ e r r ( | e |   f o r m a t ! ( " F a i l e d   t o   s t a r t   s e r v e r   ( { } ) :   { e } " ,   b i n a r y _ p a t h . d i s p l a y ( ) ) ) 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / s t a t e . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / s t a t e . r s 
 
 i n d e x   0 c 6 9 b b f . . 7 f 7 c 0 d 1   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / s t a t e . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / s t a t e . r s 
 
 @ @   - 9 9 , 1 0   + 9 9 , 1 2   @ @   p u b ( c r a t e )   f n   g u a r d _ s t a r t _ r e q u e s t ( i n n e r :   & m u t   R u n t i m e I n n e r )   - >   R e s u l t < ( ) ,   R u n t i m 
 
   
 
           i f   m a t c h e s ! ( 
 
                   i n n e r . s t a t u s , 
 
 -                 R u n t i m e S t a t u s : : S t a r t i n g   |   R u n t i m e S t a t u s : : S t o p p i n g 
 
 +                 R u n t i m e S t a t u s : : S t a r t i n g   |   R u n t i m e S t a t u s : : L o a d i n g   |   R u n t i m e S t a t u s : : S t o p p i n g 
 
           )   { 
 
                   l e t   m e s s a g e   =   i f   i n n e r . s t a t u s   = =   R u n t i m e S t a t u s : : S t o p p i n g   { 
 
                           " L o c a l   A P I   s t o p   a l r e a d y   i n   p r o g r e s s . " 
 
 +                 }   e l s e   i f   i n n e r . s t a t u s   = =   R u n t i m e S t a t u s : : L o a d i n g   { 
 
 +                         " L o c a l   A P I   m o d e l   i s   s t i l l   l o a d i n g . " 
 
                   }   e l s e   { 
 
                           " L o c a l   A P I   s t a r t   a l r e a d y   i n   p r o g r e s s . " 
 
                   } ; 
 
 @ @   - 1 3 6 , 1 0   + 1 3 8 , 1 2   @ @   p u b ( c r a t e )   f n   g u a r d _ s t o p _ r e q u e s t ( i n n e r :   & m u t   R u n t i m e I n n e r )   - >   R e s u l t < ( ) ,   R u n t i m e 
 
   
 
           i f   m a t c h e s ! ( 
 
                   i n n e r . s t a t u s , 
 
 -                 R u n t i m e S t a t u s : : S t a r t i n g   |   R u n t i m e S t a t u s : : S t o p p i n g 
 
 +                 R u n t i m e S t a t u s : : S t a r t i n g   |   R u n t i m e S t a t u s : : L o a d i n g   |   R u n t i m e S t a t u s : : S t o p p i n g 
 
           )   { 
 
                   l e t   m e s s a g e   =   i f   i n n e r . s t a t u s   = =   R u n t i m e S t a t u s : : S t a r t i n g   { 
 
                           " L o c a l   A P I   s t a r t   a l r e a d y   i n   p r o g r e s s . " 
 
 +                 }   e l s e   i f   i n n e r . s t a t u s   = =   R u n t i m e S t a t u s : : L o a d i n g   { 
 
 +                         " L o c a l   A P I   m o d e l   i s   s t i l l   l o a d i n g . " 
 
                   }   e l s e   { 
 
                           " L o c a l   A P I   s t o p   a l r e a d y   i n   p r o g r e s s . " 
 
                   } ; 
 
 @ @   - 4 4 9 , 6   + 4 5 3 , 2 3   @ @   m o d   t e s t s   { 
 
                   a s s e r t _ e q ! ( i n n e r . a c t i v e _ c o m m a n d ,   R u n t i m e L i f e c y c l e C o m m a n d : : S t a r t ) ; 
 
           } 
 
   
 
 +         # [ t e s t ] 
 
 +         f n   g u a r d _ s t a r t _ r e q u e s t _ b l o c k s _ w h e n _ m o d e l _ i s _ l o a d i n g ( )   { 
 
 +                 l e t   m u t   i n n e r   =   R u n t i m e I n n e r   { 
 
 +                         c h i l d :   N o n e , 
 
 +                         s t a t u s :   R u n t i m e S t a t u s : : L o a d i n g , 
 
 +                         l a s t _ e r r o r :   N o n e , 
 
 +                         a c t i v e _ c o m m a n d :   R u n t i m e L i f e c y c l e C o m m a n d : : I d l e , 
 
 +                         l a s t _ c o m m a n d _ r e s u l t :   R u n t i m e L i f e c y c l e R e s u l t : : d e f a u l t ( ) , 
 
 +                         c o n f i g :   R u n t i m e C o n f i g : : d e f a u l t ( ) , 
 
 +                 } ; 
 
 + 
 
 +                 l e t   b l o c k e d   =   g u a r d _ s t a r t _ r e q u e s t ( & m u t   i n n e r ) . e x p e c t _ e r r ( " s t a r t   s h o u l d   b e   b l o c k e d " ) ; 
 
 + 
 
 +                 a s s e r t _ e q ! ( b l o c k e d . c o m m a n d ,   R u n t i m e L i f e c y c l e C o m m a n d : : S t a r t ) ; 
 
 +                 a s s e r t _ e q ! ( b l o c k e d . m e s s a g e ,   " L o c a l   A P I   m o d e l   i s   s t i l l   l o a d i n g . " ) ; 
 
 +         } 
 
 + 
 
           # [ t e s t ] 
 
           f n   g u a r d _ s t o p _ r e q u e s t _ b l o c k s _ w h e n _ r u n t i m e _ i s _ a l r e a d y _ s t o p p e d ( )   { 
 
                   l e t   m u t   i n n e r   =   R u n t i m e I n n e r   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s 
 
 i n d e x   7 c 3 3 3 6 c . . e b f 5 5 5 c   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s 
 
 + + +   b / t a u r i - a p p / s r c - t a u r i / s r c / r u n t i m e / t y p e s . r s 
 
 @ @   - 2 6 , 6   + 2 6 , 7   @ @   p u b   e n u m   R u n t i m e S t a t u s   { 
 
           # [ d e f a u l t ] 
 
           S t o p p e d , 
 
           S t a r t i n g , 
 
 +         L o a d i n g , 
 
           R e a d y , 
 
           D e g r a d e d , 
 
           S t o p p i n g , 
 
 @ @   - 8 5 , 6   + 8 6 , 7   @ @   p u b   s t r u c t   R u n t i m e C o n f i g   { 
 
           p u b   s e l e c t e d _ m o d e l _ i d :   O p t i o n < S t r i n g > , 
 
           p u b   r e m o t e _ p r e s e t s :   V e c < R e m o t e P r e s e t > , 
 
           p u b   h u g g i n g _ f a c e _ t o k e n :   S t r i n g , 
 
 +         p u b   p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s :   O p t i o n < S t r i n g > , 
 
   } 
 
   
 
   i m p l   R u n t i m e C o n f i g   { 
 
 @ @   - 1 0 9 , 6   + 1 1 1 , 7   @ @   i m p l   D e f a u l t   f o r   R u n t i m e C o n f i g   { 
 
                           s e l e c t e d _ m o d e l _ i d :   N o n e , 
 
                           r e m o t e _ p r e s e t s :   V e c : : n e w ( ) , 
 
                           h u g g i n g _ f a c e _ t o k e n :   S t r i n g : : n e w ( ) , 
 
 +                         p r e f e r r e d _ s t a r t u p _ m o d e l _ a l i a s :   N o n e , 
 
                   } 
 
           } 
 
   } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / A p p . t s x   b / t a u r i - a p p / s r c / A p p . t s x 
 
 i n d e x   c 8 2 5 0 9 4 . . 2 2 5 0 0 a 5   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / A p p . t s x 
 
 + + +   b / t a u r i - a p p / s r c / A p p . t s x 
 
 @ @   - 1 , 1 2   + 1 , 1 5   @ @ 
 
 - i m p o r t   {   u s e S t a t e ,   u s e E f f e c t ,   u s e C a l l b a c k   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   u s e S t a t e ,   u s e E f f e c t ,   u s e C a l l b a c k ,   u s e M e m o   }   f r o m   " r e a c t " ; 
 
   i m p o r t   S i d e b a r   f r o m   " . / c o m p o n e n t s / S i d e b a r " ; 
 
   i m p o r t   C h a t V i e w   f r o m   " . / c o m p o n e n t s / C h a t V i e w " ; 
 
   i m p o r t   S e t t i n g s P a g e   f r o m   " . / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e " ; 
 
 + i m p o r t   {   T o a s t P r o v i d e r   }   f r o m   " . / c o m p o n e n t s / T o a s t " ; 
 
   i m p o r t   {   u s e D B   }   f r o m   " . / h o o k s / u s e D B " ; 
 
   i m p o r t   {   u s e M o d e l s   }   f r o m   " . / h o o k s / u s e M o d e l s " ; 
 
   i m p o r t   {   u s e R u n t i m e M a n a g e r   }   f r o m   " . / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r " ; 
 
   i m p o r t   {   u s e R u n t i m e R e a d y M o d e l R e f r e s h   }   f r o m   " . / f e a t u r e s / r u n t i m e / u s e R u n t i m e R e a d y M o d e l R e f r e s h " ; 
 
 + i m p o r t   {   s w a p M o d e l   }   f r o m   " . / f e a t u r e s / r u n t i m e / a p i " ; 
 
   i m p o r t   t y p e   {   C h a t   }   f r o m   " . / l i b / t y p e s " ; 
 
 + i m p o r t   t y p e   {   R u n t i m e M o d e l F i l e   }   f r o m   " . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
   i m p o r t   " . / A p p . c s s " ; 
 
   
 
   e x p o r t   d e f a u l t   f u n c t i o n   A p p ( )   { 
 
 @ @   - 5 7 , 2 9   + 6 0 , 4 9   @ @   e x p o r t   d e f a u l t   f u n c t i o n   A p p ( )   { 
 
           s e t S i d e b a r O p e n ( f a l s e ) ; 
 
       } ,   [ ] ) ; 
 
   
 
 +     c o n s t   [ i s S w a p p i n g ,   s e t I s S w a p p i n g ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     c o n s t   h a n d l e M o d e l S w a p   =   u s e C a l l b a c k ( a s y n c   ( n e w M o d e l P a t h :   s t r i n g )   = >   { 
 
 +         s e t I s S w a p p i n g ( t r u e ) ; 
 
 +         t r y   { 
 
 +             c o n s t   n e x t   =   a w a i t   s w a p M o d e l ( n e w M o d e l P a t h ) ; 
 
 +             i f   ( n e x t . s t a t u s   ! = =   " r e a d y " )   { 
 
 +                 t h r o w   n e w   E r r o r ( n e x t . l a s t _ e r r o r ? . m e s s a g e   | |   " T h e   s e l e c t e d   m o d e l   d i d   n o t   f i n i s h   l o a d i n g . " ) ; 
 
 +             } 
 
 +             s e t S e l e c t e d M o d e l ( n e w M o d e l P a t h ) ; 
 
 +         }   c a t c h   ( e r r )   { 
 
 +             c o n s o l e . e r r o r ( " [ A p p ]   h a n d l e M o d e l S w a p   f a i l e d : " ,   e r r ) ; 
 
 +         }   f i n a l l y   { 
 
 +             s e t I s S w a p p i n g ( f a l s e ) ; 
 
 +         } 
 
 +     } ,   [ s e t S e l e c t e d M o d e l ] ) ; 
 
 + 
 
 +     c o n s t   l o c a l M o d e l s :   R u n t i m e M o d e l F i l e [ ]   =   u s e M e m o ( ( )   = >   { 
 
 +         r e t u r n   r u n t i m e . s c a n n e d M o d e l s   ? ?   [ ] ; 
 
 +     } ,   [ r u n t i m e . s c a n n e d M o d e l s ] ) ; 
 
 + 
 
       i f   ( ! r e a d y )   { 
 
           r e t u r n   ( 
 
 -             < d i v   c l a s s N a m e = " a p p - l o a d i n g " > 
 
 -                 < d i v   c l a s s N a m e = " l o a d i n g - s p i n n e r "   / > 
 
 -                 < s p a n > I n i t i a l i z i n g    < / s p a n > 
 
 -             < / d i v > 
 
 +             < T o a s t P r o v i d e r > 
 
 +                 < d i v   c l a s s N a m e = " a p p - l o a d i n g " > 
 
 +                     < d i v   c l a s s N a m e = " l o a d i n g - s p i n n e r "   / > 
 
 +                     < s p a n > I n i t i a l i z i n g    < / s p a n > 
 
 +                 < / d i v > 
 
 +             < / T o a s t P r o v i d e r > 
 
           ) ; 
 
       } 
 
   
 
       r e t u r n   ( 
 
 +         < T o a s t P r o v i d e r > 
 
           < d i v   c l a s s N a m e = { ` a p p - l a y o u t $ { s i d e b a r O p e n   & &   v i e w   ! = =   " s e t t i n g s "   ?   "   s i d e b a r - o p e n "   :   " " } ` } > 
 
               { v i e w   ! = =   " s e t t i n g s "   & &   ( 
 
                   < S i d e b a r 
 
                       c h a t s = { c h a t s } 
 
                       c u r r e n t C h a t I d = { c u r r e n t C h a t I d } 
 
 +                     i n i t i a l S c r e e n = { c u r r e n t C h a t I d   = = =   n u l l } 
 
                       o n S e l e c t C h a t = { h a n d l e S e l e c t C h a t } 
 
                       o n N e w C h a t = { n e w C h a t } 
 
                       o n D e l e t e C h a t = { d e l e t e C h a t } 
 
 -                     m o d e l s = { m o d e l s } 
 
 -                     s e l e c t e d M o d e l = { s e l e c t e d M o d e l } 
 
 -                     o n M o d e l C h a n g e = { s e t S e l e c t e d M o d e l } 
 
 -                     s t a t u s = { s t a t u s } 
 
 -                     o n R e f r e s h M o d e l s = { r e f r e s h M o d e l s } 
 
                       o n O p e n S e t t i n g s = { ( )   = >   s e t V i e w ( " s e t t i n g s " ) } 
 
                       o n C l o s e M o b i l e = { ( )   = >   s e t S i d e b a r O p e n ( f a l s e ) } 
 
                   / > 
 
 @ @   - 9 4 , 7   + 1 1 7 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   A p p ( )   { 
 
               ) } 
 
               < d i v   c l a s s N a m e = " a p p - m a i n " > 
 
                   { v i e w   = = =   " s e t t i n g s "   ?   ( 
 
 -                     < S e t t i n g s P a g e   r u n t i m e = { r u n t i m e }   o n C l o s e = { ( )   = >   s e t V i e w ( " c h a t " ) }   / > 
 
 +                     < S e t t i n g s P a g e   r u n t i m e = { r u n t i m e }   o n C l o s e = { ( )   = >   s e t V i e w ( " c h a t " ) }   o n M o d e l S w a p p e d = { s e t S e l e c t e d M o d e l }   / > 
 
                   )   :   ( 
 
                       < C h a t V i e w 
 
                           d b = { d b ! } 
 
 @ @   - 1 0 2 , 1 2   + 1 2 5 , 2 3   @ @   e x p o r t   d e f a u l t   f u n c t i o n   A p p ( )   { 
 
                           s e r v e r = { r u n t i m e . c o n n e c t i o n . s e r v e r U r l } 
 
                           a p i K e y = { r u n t i m e . c o n n e c t i o n . a p i K e y } 
 
                           m o d e l = { s e l e c t e d M o d e l } 
 
 +                         m o d e l s = { m o d e l s } 
 
 +                         l o c a l M o d e l s = { l o c a l M o d e l s } 
 
 +                         s e l e c t e d M o d e l = { s e l e c t e d M o d e l } 
 
 +                         o n M o d e l C h a n g e = { s e t S e l e c t e d M o d e l } 
 
 +                         o n M o d e l S w a p = { h a n d l e M o d e l S w a p } 
 
 +                         i s S w a p p i n g = { i s S w a p p i n g } 
 
 +                         s t a t u s = { s t a t u s } 
 
 +                         r u n t i m e M o d e = { r u n t i m e . s n a p s h o t . c o n f i g . c o n n e c t i o n _ m o d e } 
 
 +                         r u n t i m e S t a t u s = { r u n t i m e . s n a p s h o t . s t a t u s } 
 
                           o n C h a t C r e a t e d = { ( i d )   = >   {   s e t C u r r e n t C h a t I d ( i d ) ;   l o a d C h a t s ( ) ;   s e t S i d e b a r O p e n ( f a l s e ) ;   } } 
 
                           o n C h a t U p d a t e d = { l o a d C h a t s } 
 
                           o n O p e n S i d e b a r = { ( )   = >   s e t S i d e b a r O p e n ( t r u e ) } 
 
 +                         o n O p e n S e t t i n g s = { ( )   = >   s e t V i e w ( " s e t t i n g s " ) } 
 
                       / > 
 
                   ) } 
 
               < / d i v > 
 
           < / d i v > 
 
 +         < / T o a s t P r o v i d e r > 
 
       ) ; 
 
   } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s 
 
 i n d e x   b 2 e 8 e d 5 . . 1 3 5 6 6 d 5   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . c s s 
 
 @ @   - 8 8 , 1 1   + 8 8 , 1 1   @ @ 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 -     p a d d i n g :   0   1 6 p x ; 
 
 +     p a d d i n g :   0   1 4 p x ; 
 
       b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
       b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 -     h e i g h t :   4 8 p x ; 
 
 -     g a p :   1 2 p x ; 
 
 +     h e i g h t :   4 4 p x ; 
 
 +     g a p :   1 0 p x ; 
 
       f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
 @ @   - 1 2 3 , 7   + 1 2 3 , 7   @ @ 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       g a p :   6 p x ; 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
       b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
       b o r d e r - r a d i u s :   9 9 9 p x ; 
 
       p a d d i n g :   4 p x   1 0 p x   4 p x   8 p x ; 
 
 @ @   - 1 5 2 , 6   + 1 5 2 , 5 4   @ @ 
 
       f o n t - w e i g h t :   5 0 0 ; 
 
   } 
 
   
 
 + . c h a t - t o p b a r - c o n t e x t   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   b a s e l i n e ; 
 
 +     g a p :   8 p x ; 
 
 +     m i n - w i d t h :   0 ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 + } 
 
 + 
 
 + . c h a t - t o p b a r - c o n t e x t - l a b e l   { 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . c h a t - t o p b a r - c o n t e x t - c o p y   { 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     w h i t e - s p a c e :   n o w r a p ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 +     t e x t - o v e r f l o w :   e l l i p s i s ; 
 
 + } 
 
 + 
 
 + . t o p b a r - s t a t e - p i l l   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     m i n - h e i g h t :   2 4 p x ; 
 
 +     p a d d i n g :   0   1 0 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     l e t t e r - s p a c i n g :   0 . 0 8 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 + } 
 
 + 
 
 + . t o p b a r - s t a t e - p i l l . o n l i n e   { 
 
 +     b o r d e r - c o l o r :   v a r ( - - b o r d e r 2 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 + } 
 
 + 
 
 + . t o p b a r - s t a t e - p i l l . o f f l i n e   { 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
   / *   T o k e n   s u m m a r y   i n   c e n t e r   * / 
 
   . c h a t - t o k e n - s u m m a r y   { 
 
       d i s p l a y :   f l e x ; 
 
 @ @   - 1 7 7 , 8   + 2 2 5 , 8   @ @ 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       g a p :   5 p x ; 
 
 -     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 1 8 ) ; 
 
       b o r d e r - r a d i u s :   9 9 9 p x ; 
 
       p a d d i n g :   3 p x   1 0 p x   3 p x   8 p x ; 
 
       f o n t - s i z e :   0 . 7 r e m ; 
 
 @ @   - 2 0 2 , 8   + 2 5 0 , 8   @ @ 
 
   / *   T P S   b a d g e   * / 
 
   . t p s - b a d g e   { 
 
       f o n t - s i z e :   0 . 7 r e m ; 
 
 -     b a c k g r o u n d :   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 0 8 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 0 6 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 1 6 ) ; 
 
       p a d d i n g :   3 p x   9 p x ; 
 
       b o r d e r - r a d i u s :   9 9 9 p x ; 
 
       c o l o r :   v a r ( - - s u c c e s s ) ; 
 
 @ @   - 2 6 8 , 8   + 3 1 6 , 8   @ @ 
 
       l e t t e r - s p a c i n g :   0 . 0 1 e m ; 
 
   } 
 
   . t o g g l e - p i l l . o n   { 
 
 -     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 1 2 ) ; 
 
 -     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 3 5 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 1 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 2 8 ) ; 
 
       c o l o r :   v a r ( - - a c c e n t ) ; 
 
   } 
 
   . t o g g l e - p i l l . o f f   { 
 
 @ @   - 4 0 9 , 5 7   + 4 5 7 , 1 6 6   @ @ 
 
       f l e x - d i r e c t i o n :   c o l u m n ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 -     p a d d i n g :   4 0 p x ; 
 
 +     p a d d i n g :   2 8 p x   2 4 p x   3 6 p x ; 
 
   } 
 
   
 
   . e m p t y - s t a t e - p a n e l   { 
 
 -     w i d t h :   m i n ( 1 0 0 % ,   6 8 0 p x ) ; 
 
 -     p a d d i n g :   3 6 p x   3 2 p x ; 
 
 -     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 -     b o r d e r - r a d i u s :   2 4 p x ; 
 
 -     b a c k g r o u n d : 
 
 -         r a d i a l - g r a d i e n t ( c i r c l e   a t   t o p ,   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 1 4 ) ,   t r a n s p a r e n t   4 0 % ) , 
 
 -         l i n e a r - g r a d i e n t ( 1 8 0 d e g ,   r g b a ( 2 0 ,   3 2 ,   4 5 ,   0 . 9 5 ) ,   r g b a ( 1 0 ,   1 6 ,   2 2 ,   0 . 9 6 ) ) ; 
 
 -     b o x - s h a d o w :   v a r ( - - s h a d o w - l g ) ; 
 
 +     w i d t h :   m i n ( 1 0 0 % ,   7 6 0 p x ) ; 
 
 +     p a d d i n g :   8 p x   0   0 ; 
 
       d i s p l a y :   f l e x ; 
 
       f l e x - d i r e c t i o n :   c o l u m n ; 
 
 -     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   1 8 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - h e a d e r   { 
 
 +     p a d d i n g :   0   4 p x ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   1 2 p x ; 
 
 +     m a x - w i d t h :   6 8 c h ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - h e a d e r   h 1   { 
 
 +     f o n t - s i z e :   c l a m p ( 1 . 9 r e m ,   3 v w ,   2 . 6 r e m ) ; 
 
 +     l i n e - h e i g h t :   1 . 0 8 ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 3 e m ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - h e a d e r   p   { 
 
 +     f o n t - s i z e :   0 . 9 5 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 7 ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     m a x - w i d t h :   6 2 c h ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - g r i d   { 
 
 +     d i s p l a y :   g r i d ; 
 
 +     g r i d - t e m p l a t e - c o l u m n s :   m i n m a x ( 0 ,   1 . 5 f r )   m i n m a x ( 2 6 0 p x ,   0 . 9 5 f r ) ; 
 
       g a p :   1 6 p x ; 
 
 -     t e x t - a l i g n :   c e n t e r ; 
 
   } 
 
   
 
 - . e m p t y - i c o n   {   f o n t - s i z e :   2 . 5 r e m ;   } 
 
 + . e m p t y - p a n e l   { 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   1 6 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 ) ; 
 
 +     p a d d i n g :   1 8 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - p a n e l - h e a d   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 2 p x ; 
 
 +     m a r g i n - b o t t o m :   1 4 p x ; 
 
 + } 
 
 + 
 
 + . p a n e l - l a b e l   { 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
 + . p a n e l - h i n t   { 
 
 +     f o n t - s i z e :   0 . 7 7 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
 + . e m p t y - p a n e l - s t a t u s   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   1 2 p x ; 
 
 + } 
 
 + 
 
   . e m p t y - k i c k e r   { 
 
       f o n t - s i z e :   0 . 7 2 r e m ; 
 
 -     l e t t e r - s p a c i n g :   0 . 1 8 e m ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 6 e m ; 
 
       t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 -     c o l o r :   v a r ( - - a c c e n t ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d   { 
 
 +     p a d d i n g :   1 6 p x ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 1 2 ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d - m u t e d   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 1 5 ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - s u m m a r y   { 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 1 5 ) ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - s u m m a r y - i t e m   { 
 
 +     p a d d i n g :   1 4 p x   1 6 p x ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - s u m m a r y - i t e m   +   . w o r k s p a c e - s u m m a r y - i t e m   { 
 
 +     b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d - l a b e l   { 
 
 +     d i s p l a y :   b l o c k ; 
 
 +     m a r g i n - b o t t o m :   8 p x ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d   s t r o n g   { 
 
 +     d i s p l a y :   b l o c k ; 
 
 +     f o n t - s i z e :   0 . 9 6 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     m a r g i n - b o t t o m :   6 p x ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d   p   { 
 
 +     f o n t - s i z e :   0 . 8 4 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 6 ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 + } 
 
 + 
 
 + . w o r k s p a c e - c a r d   . n o t i c e - a c t i o n - b t n   { 
 
 +     m a r g i n - t o p :   1 2 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - p a n e l   . c o m p o s e r - n o t i c e   { 
 
 +     m a r g i n - b o t t o m :   0 ; 
 
   } 
 
 - . e m p t y - s t a t e   h 2   {   f o n t - s i z e :   1 . 8 r e m ;   c o l o r :   v a r ( - - t e x t ) ;   f o n t - w e i g h t :   7 0 0 ;   m a x - w i d t h :   1 4 c h ;   l i n e - h e i g h t :   1 . 2 5 ;   } 
 
 - . e m p t y - s t a t e   p   {   f o n t - s i z e :   0 . 9 r e m ;   m a x - w i d t h :   5 2 c h ;   l i n e - h e i g h t :   1 . 7 ;   c o l o r :   v a r ( - - t e x t 2 ) ;   } 
 
   
 
   . e m p t y - s t a t e - a c t i o n s   { 
 
 -     d i s p l a y :   f l e x ; 
 
 -     f l e x - w r a p :   w r a p ; 
 
 -     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     d i s p l a y :   g r i d ; 
 
       g a p :   1 0 p x ; 
 
 -     m a r g i n - t o p :   4 p x ; 
 
 +     m a r g i n - t o p :   0 ; 
 
   } 
 
   
 
   . s t a r t e r - c h i p   { 
 
 -     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
 -     b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   3 3 ,   0 . 8 5 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 -     p a d d i n g :   9 p x   1 4 p x ; 
 
 -     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     p a d d i n g :   1 2 p x   1 4 p x ; 
 
 +     b o r d e r - r a d i u s :   1 2 p x ; 
 
       c u r s o r :   p o i n t e r ; 
 
       f o n t :   i n h e r i t ; 
 
 -     f o n t - s i z e :   0 . 8 3 r e m ; 
 
 +     f o n t - s i z e :   0 . 8 4 r e m ; 
 
 +     t e x t - a l i g n :   l e f t ; 
 
 +     l i n e - h e i g h t :   1 . 4 5 ; 
 
       t r a n s i t i o n :   t r a n s f o r m   0 . 1 2 s   e a s e ,   b o r d e r - c o l o r   0 . 1 5 s ,   b a c k g r o u n d   0 . 1 5 s ; 
 
   } 
 
   . s t a r t e r - c h i p : h o v e r   { 
 
 -     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 5 ) ; 
 
 -     b a c k g r o u n d :   r g b a ( 2 0 ,   3 2 ,   4 5 ,   0 . 9 8 ) ; 
 
 +     b o r d e r - c o l o r :   v a r ( - - b o r d e r 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
       t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
   } 
 
   
 
 @ @   - 4 7 1 , 3 0   + 6 2 8 , 5 8   @ @ 
 
       j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
       g a p :   1 4 p x ; 
 
       m a r g i n - b o t t o m :   1 2 p x ; 
 
 -     p a d d i n g :   1 4 p x   1 6 p x ; 
 
 -     b o r d e r - r a d i u s :   1 4 p x ; 
 
 +     p a d d i n g :   1 2 p x   1 6 p x ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - l g ) ; 
 
       b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
 -     b a c k g r o u n d :   r g b a ( 2 0 ,   3 2 ,   4 5 ,   0 . 9 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 +     b a c k d r o p - f i l t e r :   b l u r ( 8 p x ) ; 
 
 + } 
 
 + . c o m p o s e r - n o t i c e   s t r o n g   { 
 
 +     d i s p l a y :   b l o c k ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     m a r g i n - b o t t o m :   2 p x ; 
 
 +     f o n t - s i z e :   0 . 8 5 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + } 
 
 + . c o m p o s e r - n o t i c e   p   { 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     m a r g i n :   0 ; 
 
 + } 
 
 + . c o m p o s e r - n o t i c e . w a r n i n g   { 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 0 ,   2 0 4 ,   2 1 ,   0 . 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 0 ,   2 0 4 ,   2 1 ,   0 . 0 4 ) ; 
 
 + } 
 
 + . c o m p o s e r - n o t i c e . i n f o   { 
 
 +     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 2 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 0 4 ) ; 
 
   } 
 
 - . c o m p o s e r - n o t i c e   s t r o n g   {   d i s p l a y :   b l o c k ;   c o l o r :   v a r ( - - t e x t ) ;   m a r g i n - b o t t o m :   3 p x ;   f o n t - s i z e :   0 . 8 8 r e m ;   } 
 
 - . c o m p o s e r - n o t i c e   p   {   c o l o r :   v a r ( - - t e x t 2 ) ;   f o n t - s i z e :   0 . 8 2 r e m ;   l i n e - h e i g h t :   1 . 5 ;   } 
 
 - . c o m p o s e r - n o t i c e . w a r n i n g   {   b o r d e r - c o l o r :   r g b a ( 2 5 5 , 2 1 4 , 1 0 , 0 . 3 ) ;   b a c k g r o u n d :   r g b a ( 7 2 , 5 5 , 4 , 0 . 2 2 ) ;   } 
 
 - . c o m p o s e r - n o t i c e . i n f o         {   b o r d e r - c o l o r :   r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 2 8 ) ;   b a c k g r o u n d :   r g b a ( 1 6 , 3 8 , 6 3 , 0 . 3 ) ;   } 
 
   
 
   . n o t i c e - a c t i o n - b t n   { 
 
       b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
       b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
       c o l o r :   v a r ( - - t e x t ) ; 
 
 -     b o r d e r - r a d i u s :   1 0 p x ; 
 
 -     p a d d i n g :   9 p x   1 3 p x ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s ) ; 
 
 +     p a d d i n g :   8 p x   1 4 p x ; 
 
       f o n t :   i n h e r i t ; 
 
 -     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
       w h i t e - s p a c e :   n o w r a p ; 
 
       c u r s o r :   p o i n t e r ; 
 
 -     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ,   c o l o r   0 . 1 5 s ; 
 
       f l e x - s h r i n k :   0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + } 
 
 + . n o t i c e - a c t i o n - b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 3 5 ) ; 
 
 +     c o l o r :   v a r ( - - a c c e n t 2 ) ; 
 
 + } 
 
 + . n o t i c e - a c t i o n - b t n : a c t i v e   { 
 
 +     t r a n s f o r m :   s c a l e ( 0 . 9 8 ) ; 
 
   } 
 
 - . n o t i c e - a c t i o n - b t n : h o v e r   {   b a c k g r o u n d :   v a r ( - - b g 4 ) ;   b o r d e r - c o l o r :   r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 4 ) ;   } 
 
   
 
   / *           M e s s a g e   w r a p p e r s           * / 
 
   . m s g - w r a p p e r   { 
 
 @ @   - 5 0 4 , 7   + 6 8 9 , 7   @ @ 
 
       w i d t h :   1 0 0 % ; 
 
   } 
 
   . m s g - w r a p p e r . u s e r             {   a l i g n - s e l f :   f l e x - e n d ;   a l i g n - i t e m s :   f l e x - e n d ;   } 
 
 - . m s g - w r a p p e r . a s s i s t a n t   {   a l i g n - s e l f :   f l e x - s t a r t ;   a l i g n - i t e m s :   f l e x - s t a r t ;   w i d t h :   1 0 0 % ;   m a x - w i d t h :   1 0 0 % ;   } 
 
 + . m s g - w r a p p e r . a s s i s t a n t   {   a l i g n - s e l f :   f l e x - s t a r t ;   a l i g n - i t e m s :   f l e x - s t a r t ;   m a x - w i d t h :   8 0 0 p x ;   } 
 
   
 
   / *           B u b b l e s           * / 
 
   . m s g - b u b b l e   { 
 
 @ @   - 6 0 9 , 3 1   + 7 9 4 , 3 4   @ @ 
 
       l i n e - h e i g h t :   1 . 5 5 ; 
 
   } 
 
   
 
 - / *           T h i n k i n g   b u b b l e   ( l o a d i n g   d o t s )           * / 
 
 - . t h i n k i n g   { 
 
 + / *           T h i n k i n g   b u b b l e   ( M a n u s - s t y l e   p u l s i n g   b l u e   d o t )           * / 
 
 + . t h i n k i n g - m a n u s   { 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 -     g a p :   5 p x ; 
 
 -     p a d d i n g :   1 3 p x   1 8 p x ; 
 
 -     w i d t h :   f i t - c o n t e n t ; 
 
 +     g a p :   8 p x ; 
 
 +     p a d d i n g :   8 p x   0 ; 
 
   } 
 
 - . t h i n k i n g   s p a n   { 
 
 + . t h i n k i n g - d o t   { 
 
       w i d t h :   8 p x ; 
 
       h e i g h t :   8 p x ; 
 
 -     b a c k g r o u n d :   # 9 f d 0 f f ; 
 
 +     b a c k g r o u n d :   # 3 B 8 2 F 6 ; 
 
       b o r d e r - r a d i u s :   5 0 % ; 
 
 -     o p a c i t y :   0 . 5 ; 
 
 -     a n i m a t i o n :   t h i n k i n g - b o u n c e   1 . 4 s   e a s e - i n - o u t   i n f i n i t e ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     a n i m a t i o n :   t h i n k i n g - p u l s e   1 . 5 s   e a s e - i n - o u t   i n f i n i t e ; 
 
   } 
 
 - . t h i n k i n g   s p a n : n t h - c h i l d ( 2 )   {   a n i m a t i o n - d e l a y :   0 . 1 6 s ;   } 
 
 - . t h i n k i n g   s p a n : n t h - c h i l d ( 3 )   {   a n i m a t i o n - d e l a y :   0 . 3 2 s ;   } 
 
 - @ k e y f r a m e s   t h i n k i n g - b o u n c e   { 
 
 -     0 % ,   8 0 % ,   1 0 0 %   {   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   o p a c i t y :   0 . 3 ;   } 
 
 -     4 0 %   {   t r a n s f o r m :   t r a n s l a t e Y ( - 6 p x ) ;   o p a c i t y :   1 ;   } 
 
 + . t h i n k i n g - l a b e l   { 
 
 +     f o n t - s i z e :   0 . 8 7 5 r e m ; 
 
 +     c o l o r :   # 9 C A 3 A F ; 
 
 +     f o n t - w e i g h t :   4 0 0 ; 
 
 + } 
 
 + @ k e y f r a m e s   t h i n k i n g - p u l s e   { 
 
 +     0 % ,   1 0 0 %   {   o p a c i t y :   1 ;   t r a n s f o r m :   s c a l e ( 1 ) ;   } 
 
 +     5 0 %               {   o p a c i t y :   0 . 3 5 ;   t r a n s f o r m :   s c a l e ( 0 . 7 ) ;   } 
 
   } 
 
   
 
   @ m e d i a   ( p r e f e r s - r e d u c e d - m o t i o n :   r e d u c e )   { 
 
 -     . t h i n k i n g   s p a n , 
 
 +     . t h i n k i n g - m a n u s , 
 
 +     . t h i n k i n g - d o t , 
 
       . m s g - b u b b l e , 
 
       . q u e u e - c l e a r - b t n , 
 
       . n o t i c e - a c t i o n - b t n , 
 
 @ @   - 7 0 3 , 7   + 8 9 1 , 7   @ @ 
 
       g a p :   8 p x ; 
 
       f o n t - s i z e :   1 1 p x ; 
 
       f o n t - w e i g h t :   5 0 0 ; 
 
 -     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 4 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
       m a r g i n - b o t t o m :   8 p x ; 
 
       p a d d i n g - l e f t :   1 2 p x ; 
 
       u s e r - s e l e c t :   n o n e ; 
 
 @ @   - 7 1 8 , 8   + 9 0 6 , 8   @ @ 
 
       l e t t e r - s p a c i n g :   0 . 0 5 e m ; 
 
   } 
 
   . c a p a b i l i t y - g r o u p   s v g   { 
 
 -     - - p h o s p h o r - c o l o r - p r i m a r y :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 3 5 ) ; 
 
 -     - - p h o s p h o r - c o l o r - s e c o n d a r y :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 5 ) ; 
 
 +     - - p h o s p h o r - c o l o r - p r i m a r y :   v a r ( - - t e x t 3 ) ; 
 
 +     - - p h o s p h o r - c o l o r - s e c o n d a r y :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 2 ) ; 
 
   } 
 
   . s e p a r a t o r   { 
 
       o p a c i t y :   0 . 4 ; 
 
 @ @   - 7 3 0 , 1 4   + 9 1 8 , 1 4   @ @ 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   f l e x - e n d ; 
 
       g a p :   1 2 p x ; 
 
 -     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
 
 -     b o r d e r - r a d i u s :   2 4 p x ; 
 
 -     p a d d i n g :   1 0 p x   1 6 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 5 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - l g ) ; 
 
 +     p a d d i n g :   1 0 p x   1 4 p x ; 
 
       t r a n s i t i o n :   b o r d e r - c o l o r   0 . 2 s ; 
 
   } 
 
   . i n p u t - b o x : f o c u s - w i t h i n   { 
 
 -     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 5 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 2 6 ) ; 
 
   } 
 
   
 
   / *   A t t a c h m e n t   a c t i o n   b u t t o n s   * / 
 
 @ @   - 7 5 9 , 1 2   + 9 4 7 , 1 2   @ @ 
 
       b o r d e r - r a d i u s :   8 p x ; 
 
       c u r s o r :   n o t - a l l o w e d ; 
 
       o p a c i t y :   0 . 5 ; 
 
 -     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 4 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
       p a d d i n g :   0 ; 
 
   } 
 
   . a t t a c h m e n t - a c t i o n s   b u t t o n   s v g   { 
 
       - - p h o s p h o r - c o l o r - p r i m a r y :   c u r r e n t C o l o r ; 
 
 -     - - p h o s p h o r - c o l o r - s e c o n d a r y :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 ) ; 
 
 +     - - p h o s p h o r - c o l o r - s e c o n d a r y :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 4 ) ; 
 
   } 
 
   
 
   / *   T e x t a r e a   i n s i d e   t h e   p i l l   * / 
 
 @ @   - 7 7 3 , 7   + 9 6 1 , 7   @ @ 
 
       a l i g n - s e l f :   c e n t e r ; 
 
       b a c k g r o u n d :   t r a n s p a r e n t ; 
 
       b o r d e r :   n o n e ; 
 
 -     c o l o r :   # f f f ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
       f o n t - s i z e :   1 5 p x ; 
 
       l i n e - h e i g h t :   1 . 5 ; 
 
       f o n t - f a m i l y :   i n h e r i t ; 
 
 @ @   - 7 8 4 , 7   + 9 7 2 , 7   @ @ 
 
       p a d d i n g :   8 p x   0 ; 
 
       m a r g i n :   0 ; 
 
   } 
 
 - . i n p u t - b o x   t e x t a r e a : : p l a c e h o l d e r   {   c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 3 5 ) ;   } 
 
 + . i n p u t - b o x   t e x t a r e a : : p l a c e h o l d e r   {   c o l o r :   v a r ( - - t e x t 3 ) ;   } 
 
   . i n p u t - b o x   t e x t a r e a : d i s a b l e d   {   o p a c i t y :   0 . 4 5 ;   } 
 
   
 
   / *   M e t a   r o w   b e l o w   t h e   p i l l   * / 
 
 @ @   - 8 1 9 , 7   + 1 0 0 7 , 7   @ @ 
 
   . q u e u e - t o g g l e   { 
 
       b a c k g r o u n d :   t r a n s p a r e n t ; 
 
       b o r d e r :   n o n e ; 
 
 -     c o l o r :   # 3 b 8 2 f 6 ; 
 
 +     c o l o r :   v a r ( - - a c c e n t ) ; 
 
       f o n t - s i z e :   1 2 p x ; 
 
       f o n t - w e i g h t :   5 0 0 ; 
 
       c u r s o r :   p o i n t e r ; 
 
 @ @   - 8 2 9 , 7   + 1 0 1 7 , 7   @ @ 
 
       f o n t - f a m i l y :   i n h e r i t ; 
 
   } 
 
   . q u e u e - t o g g l e : h o v e r   { 
 
 -     b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 1 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 0 8 ) ; 
 
   } 
 
   
 
   . q u e u e - p o p o v e r   { 
 
 @ @   - 8 3 8 , 1 1   + 1 0 2 6 , 1 1   @ @ 
 
       l e f t :   1 2 p x ; 
 
       m a r g i n - b o t t o m :   1 2 p x ; 
 
       w i d t h :   3 2 0 p x ; 
 
 -     b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 7 5 ) ; 
 
 -     b a c k d r o p - f i l t e r :   b l u r ( 1 6 p x ) ; 
 
 -     - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 1 6 p x ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 -     b o r d e r - r a d i u s :   1 6 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 4 ,   1 8 ,   2 4 ,   0 . 9 2 ) ; 
 
 +     b a c k d r o p - f i l t e r :   b l u r ( 1 0 p x ) ; 
 
 +     - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 1 0 p x ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - l g ) ; 
 
       b o x - s h a d o w :   0   1 0 p x   4 0 p x   - 1 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 5 ) ; 
 
       o v e r f l o w :   h i d d e n ; 
 
       z - i n d e x :   1 0 0 ; 
 
 @ @   - 8 5 5 , 8   + 1 0 4 3 , 8   @ @ 
 
       f o n t - w e i g h t :   6 0 0 ; 
 
       t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
       l e t t e r - s p a c i n g :   0 . 0 8 e m ; 
 
 -     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 3 5 ) ; 
 
 -     b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
       b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 ) ; 
 
   } 
 
   
 
 @ @   - 9 7 2 , 6   + 1 1 6 0 , 3 0 5   @ @ 
 
   } 
 
   . s t o p - b t n : h o v e r   {   b a c k g r o u n d :   r g b a ( 2 4 0 ,   6 4 ,   6 4 ,   0 . 1 ) ;   } 
 
   
 
 + / *           I n i t i a l   s c r e e n   /   M a n u s - l i k e   l a n d i n g           * / 
 
 + . c h a t - v i e w . i n i t i a l - s c r e e n   { 
 
 +     b a c k g r o u n d :   v a r ( - - b g ) ; 
 
 + } 
 
 + 
 
 + . c h a t - v i e w . i n i t i a l - s c r e e n   . c h a t - t o p b a r   { 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     b o r d e r - b o t t o m - c o l o r :   t r a n s p a r e n t ; 
 
 +     h e i g h t :   5 6 p x ; 
 
 +     p a d d i n g :   0   2 4 p x   0   1 8 p x ; 
 
 + } 
 
 + 
 
 + . c h a t - v i e w . i n i t i a l - s c r e e n   . c h a t - t o p b a r - c e n t e r   { 
 
 +     d i s p l a y :   f l e x ; 
 
 + } 
 
 + 
 
 + . c h a t - v i e w . i n i t i a l - s c r e e n   . c h a t - t o p b a r - r i g h t   { 
 
 +     m a r g i n - l e f t :   a u t o ; 
 
 +     g a p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + / *   H i d e   r u n t i m e   p i l l   o n   i n i t i a l   s c r e e n        m o d e l   b a d g e   i s   s u f f i c i e n t   * / 
 
 + . c h a t - v i e w . i n i t i a l - s c r e e n   . t o p b a r - s t a t e - p i l l - - h e r o   { 
 
 +     d i s p l a y :   n o n e ; 
 
 + } 
 
 + 
 
 + . t o p b a r - m o d e l - b a d g e - - h e r o   { 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     b o r d e r :   0 ; 
 
 +     p a d d i n g :   0 ; 
 
 +     m a x - w i d t h :   n o n e ; 
 
 + } 
 
 + 
 
 + . t o p b a r - m o d e l - b a d g e - - h e r o   . t o p b a r - m o d e l - n a m e   { 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     f o n t - s i z e :   0 . 9 5 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + } 
 
 + 
 
 + . m e s s a g e s - c o n t a i n e r - - h e r o   { 
 
 +     m i n - h e i g h t :   c a l c ( 1 0 0 d v h   -   5 6 p x ) ; 
 
 +     p a d d i n g :   6 2 p x   2 4 p x   4 0 p x ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - - h e r o   { 
 
 +     w i d t h :   m i n ( 1 0 0 % ,   9 2 0 p x ) ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   2 0 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - p a n e l - - h e r o   { 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   2 2 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - h e a d e r - - h e r o   { 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     t e x t - a l i g n :   c e n t e r ; 
 
 +     m a x - w i d t h :   8 2 0 p x ; 
 
 +     g a p :   1 4 p x ; 
 
 + } 
 
 + 
 
 + . e m p t y - s t a t e - h e a d e r - - h e r o   h 1   { 
 
 +     f o n t - f a m i l y :   i n h e r i t ; 
 
 +     f o n t - s i z e :   c l a m p ( 3 . 3 r e m ,   5 v w ,   4 . 4 r e m ) ; 
 
 +     l i n e - h e i g h t :   0 . 9 8 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 4 5 e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   # f f f ; 
 
 + } 
 
 + 
 
 + . h e r o - c o m p o s e r - b l o c k   { 
 
 +     w i d t h :   m i n ( 1 0 0 % ,   7 6 0 p x ) ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   1 2 p x ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - - h e r o   { 
 
 +     m i n - h e i g h t :   0 ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     p a d d i n g :   1 4 p x   1 6 p x   1 2 p x ; 
 
 +     b o r d e r - r a d i u s :   2 8 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 8 ,   1 8 ,   2 0 ,   0 . 9 6 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o x - s h a d o w :   0   1 8 p x   5 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 2 8 ) ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - - h e r o : f o c u s - w i t h i n   { 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 2 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - c o m p o s e r - r o w   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   1 2 p x ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - m a i n   { 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   f l e x - e n d ; 
 
 +     g a p :   1 2 p x ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - m a i n - - h e r o   { 
 
 +     g a p :   1 4 p x ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - - h e r o   t e x t a r e a   { 
 
 +     m i n - h e i g h t :   4 8 p x ; 
 
 +     f o n t - s i z e :   1 6 p x ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     a l i g n - s e l f :   s t r e t c h ; 
 
 +     p a d d i n g :   1 0 p x   0   6 p x ; 
 
 +     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 8 ) ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - - h e r o   t e x t a r e a : : p l a c e h o l d e r   { 
 
 +     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 4 2 ) ; 
 
 + } 
 
 + 
 
 + . a t t a c h m e n t - a c t i o n s - - h e r o   { 
 
 +     a l i g n - s e l f :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
 +     m a r g i n - b o t t o m :   0 ; 
 
 +     p a d d i n g - b o t t o m :   0 ; 
 
 + } 
 
 + 
 
 + . a t t a c h m e n t - a c t i o n s - - h e r o   b u t t o n   { 
 
 +     w i d t h :   3 4 p x ; 
 
 +     h e i g h t :   3 4 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - c o m p o s e r - a c t i o n s   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   1 0 p x ; 
 
 +     p a d d i n g - b o t t o m :   4 p x ; 
 
 + } 
 
 + 
 
 + . h e r o - u t i l i t y - b t n   { 
 
 +     w i d t h :   3 8 p x ; 
 
 +     h e i g h t :   3 8 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 5 ) ; 
 
 +     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 7 8 ) ; 
 
 + } 
 
 + 
 
 + . s e n d - b t n - - h e r o , 
 
 + . s t o p - b t n - - h e r o   { 
 
 +     w i d t h :   4 2 p x ; 
 
 +     h e i g h t :   4 2 p x ; 
 
 +     m i n - w i d t h :   4 2 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   0 ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     m a r g i n - b o t t o m :   0 ; 
 
 + } 
 
 + 
 
 + . c o m p o s e r - f o o t e r - r o w - - h e r o   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 2 p x ; 
 
 +     p a d d i n g - t o p :   1 0 p x ; 
 
 +     b o r d e r - t o p :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 + } 
 
 + 
 
 + . c o m p o s e r - f o o t e r - h i n t - - h e r o   { 
 
 +     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 5 5 ) ; 
 
 +     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 + } 
 
 + 
 
 + . c o m p o s e r - f o o t e r - i c o n s - - h e r o   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 + } 
 
 + 
 
 + . c o m p o s e r - f o o t e r - i c o n s - - h e r o   s p a n   { 
 
 +     w i d t h :   2 2 p x ; 
 
 +     h e i g h t :   2 2 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 + } 
 
 + 
 
 + . s t a r t e r - c h i p - r a i l   { 
 
 +     w i d t h :   m i n ( 1 0 0 % ,   7 6 0 p x ) ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - w r a p :   w r a p ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     g a p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + . s t a r t e r - c h i p - - h e r o   { 
 
 +     w i d t h :   a u t o ; 
 
 +     p a d d i n g :   1 0 p x   1 6 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 6 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 +     c o l o r :   # f f f ; 
 
 + } 
 
 + 
 
 + . s t a r t e r - c h i p - - h e r o : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 6 3 ,   6 3 ,   7 0 ,   0 . 9 6 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - c a r d   { 
 
 +     w i d t h :   m i n ( 1 0 0 % ,   7 6 0 p x ) ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 8 p x ; 
 
 +     m a r g i n - t o p :   2 2 p x ; 
 
 +     p a d d i n g :   1 8 p x   1 8 p x   1 8 p x   2 0 p x ; 
 
 +     b o r d e r - r a d i u s :   2 4 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 4 ,   2 4 ,   2 7 ,   0 . 9 2 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - c o p y   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   6 p x ; 
 
 +     m a x - w i d t h :   4 2 0 p x ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - t i t l e   { 
 
 +     c o l o r :   # f f f ; 
 
 +     f o n t - s i z e :   0 . 9 8 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - s u b t i t l e   { 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     f o n t - s i z e :   0 . 8 4 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w   { 
 
 +     w i d t h :   1 8 6 p x ; 
 
 +     m i n - w i d t h :   1 8 6 p x ; 
 
 +     h e i g h t :   1 0 6 p x ; 
 
 +     b o r d e r - r a d i u s :   1 8 p x ; 
 
 +     p a d d i n g :   1 2 p x ; 
 
 +     d i s p l a y :   g r i d ; 
 
 +     g r i d - t e m p l a t e - c o l u m n s :   1 . 5 f r   1 f r ; 
 
 +     g r i d - t e m p l a t e - r o w s :   1 0 p x   1 f r ; 
 
 +     g a p :   8 p x ; 
 
 +     b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 8 0 d e g ,   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 8 ) ,   r g b a ( 2 4 ,   2 4 ,   2 7 ,   0 . 9 8 ) ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w - b a r , 
 
 + . h e r o - p r o m o - p r e v i e w - p a n e , 
 
 + . h e r o - p r o m o - p r e v i e w   . a c t i v e   { 
 
 +     d i s p l a y :   b l o c k ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w - b a r   { 
 
 +     g r i d - c o l u m n :   1   /   - 1 ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w - p a n e   { 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w - p a n e - - w i d e   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 7 ) ; 
 
 + } 
 
 + 
 
 + . h e r o - p r o m o - p r e v i e w   . a c t i v e   { 
 
 +     w i d t h :   4 4 p x ; 
 
 +     h e i g h t :   1 0 p x ; 
 
 +     a l i g n - s e l f :   e n d ; 
 
 +     b a c k g r o u n d :   r g b a ( 9 6 ,   1 6 5 ,   2 5 0 ,   0 . 4 4 ) ; 
 
 + } 
 
 + 
 
   / *           R e s p o n s i v e           * / 
 
   @ m e d i a   ( m a x - w i d t h :   9 6 0 p x )   { 
 
       . c h a t - m e n u - b t n   {   d i s p l a y :   i n l i n e - f l e x ;   } 
 
 @ @   - 9 9 1 , 7   + 1 4 7 8 , 1 6 7   @ @ 
 
       . i n p u t - c o n t e n t - c o n s t r a i n e d   {   p a d d i n g :   0   1 2 p x   2 0 p x   1 2 p x ;   } 
 
   
 
       . e m p t y - s t a t e   {   p a d d i n g :   2 0 p x   1 2 p x ;   } 
 
 -     . e m p t y - s t a t e - p a n e l   {   p a d d i n g :   2 4 p x   1 8 p x ;   b o r d e r - r a d i u s :   2 0 p x ;   } 
 
 -     . e m p t y - s t a t e   h 2   {   f o n t - s i z e :   1 . 4 5 r e m ;   } 
 
 +     . e m p t y - s t a t e - g r i d   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r ;   } 
 
 +     . e m p t y - s t a t e - h e a d e r   h 1   {   f o n t - s i z e :   1 . 7 r e m ;   } 
 
 +     . e m p t y - s t a t e - p a n e l   {   g a p :   1 4 p x ;   } 
 
       . c o m p o s e r - n o t i c e   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   f l e x - s t a r t ;   } 
 
 + 
 
 +     . m e s s a g e s - c o n t a i n e r - - h e r o   {   p a d d i n g :   5 6 p x   1 4 p x   3 2 p x ;   } 
 
 +     . e m p t y - s t a t e - - h e r o   {   g a p :   1 8 p x ;   } 
 
 +     . e m p t y - s t a t e - h e a d e r - - h e r o   h 1   {   f o n t - s i z e :   c l a m p ( 2 . 2 r e m ,   8 v w ,   3 . 3 r e m ) ;   } 
 
 +     . h e r o - c o m p o s e r - r o w   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   s t r e t c h ;   } 
 
 +     . a t t a c h m e n t - a c t i o n s - - h e r o   {   a l i g n - s e l f :   f l e x - s t a r t ;   } 
 
 +     . i n p u t - b o x - - h e r o   {   p a d d i n g :   1 6 p x ;   b o r d e r - r a d i u s :   2 4 p x ;   } 
 
 +     . i n p u t - b o x - - h e r o   t e x t a r e a   {   m i n - h e i g h t :   7 2 p x ;   f o n t - s i z e :   1 5 p x ;   } 
 
 +     . c o m p o s e r - f o o t e r - r o w - - h e r o   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   f l e x - s t a r t ;   } 
 
 +     . h e r o - p r o m o - c a r d   {   w i d t h :   1 0 0 % ;   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   f l e x - s t a r t ;   } 
 
 +     . h e r o - p r o m o - p r e v i e w   {   m i n - w i d t h :   1 0 0 % ;   w i d t h :   1 0 0 % ;   } 
 
 + } 
 
 + 
 
 + / *           M o d e l   S e l e c t o r   P i l l   ( i n   i n p u t   a r e a )           * / 
 
 + . m o d e l - s e l e c t o r - p i l l - w r a p p e r   { 
 
 +     p o s i t i o n :   r e l a t i v e ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - p i l l   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   4 p x   1 0 p x   4 p x   8 p x ; 
 
 +     f o n t - s i z e :   0 . 7 5 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ,   c o l o r   0 . 1 5 s ; 
 
 +     m a x - w i d t h :   1 8 0 p x ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - p i l l : h o v e r : n o t ( : d i s a b l e d )   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b o r d e r - c o l o r :   v a r ( - - b o r d e r 2 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - p i l l : d i s a b l e d   { 
 
 +     o p a c i t y :   0 . 5 ; 
 
 +     c u r s o r :   n o t - a l l o w e d ; 
 
 + } 
 
 + 
 
 + . m o d e l - s t a t u s - d o t   { 
 
 +     w i d t h :   6 p x ; 
 
 +     h e i g h t :   6 p x ; 
 
 +     b o r d e r - r a d i u s :   5 0 % ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   b o x - s h a d o w   0 . 2 s ; 
 
 + } 
 
 + 
 
 + . m o d e l - s t a t u s - d o t . s t a t u s - o k , 
 
 + . m o d e l - s t a t u s - d o t . s t a t u s - r e a d y   { 
 
 +     b a c k g r o u n d :   v a r ( - - s u c c e s s ) ; 
 
 +     b o x - s h a d o w :   0   0   6 p x   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 5 ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s t a t u s - d o t . s t a t u s - e r r o r , 
 
 + . m o d e l - s t a t u s - d o t . s t a t u s - o f f l i n e   { 
 
 +     b a c k g r o u n d :   v a r ( - - t e x t 3 ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s t a t u s - d o t . s t a t u s - l o a d i n g   { 
 
 +     b a c k g r o u n d :   v a r ( - - w a r n i n g ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - l a b e l   { 
 
 +     w h i t e - s p a c e :   n o w r a p ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 +     t e x t - o v e r f l o w :   e l l i p s i s ; 
 
 +     m a x - w i d t h :   1 2 0 p x ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - c h e v r o n   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     o p a c i t y :   0 . 6 ; 
 
 +     t r a n s i t i o n :   t r a n s f o r m   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - p i l l [ a r i a - e x p a n d e d = " t r u e " ]   . m o d e l - s e l e c t o r - c h e v r o n   { 
 
 +     t r a n s f o r m :   r o t a t e ( 1 8 0 d e g ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - m e n u   { 
 
 +     p o s i t i o n :   a b s o l u t e ; 
 
 +     b o t t o m :   c a l c ( 1 0 0 %   +   8 p x ) ; 
 
 +     l e f t :   0 ; 
 
 +     m i n - w i d t h :   2 0 0 p x ; 
 
 +     m a x - w i d t h :   2 8 0 p x ; 
 
 +     m a x - h e i g h t :   2 4 0 p x ; 
 
 +     o v e r f l o w - y :   a u t o ; 
 
 +     b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
 
 +     b o x - s h a d o w :   v a r ( - - s h a d o w - l g ) ; 
 
 +     z - i n d e x :   1 0 0 ; 
 
 +     l i s t - s t y l e :   n o n e ; 
 
 +     m a r g i n :   0 ; 
 
 +     p a d d i n g :   4 p x ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - i t e m   { 
 
 +     p a d d i n g :   8 p x   1 2 p x ; 
 
 +     f o n t - s i z e :   0 . 7 8 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 s ,   c o l o r   0 . 1 s ; 
 
 +     w h i t e - s p a c e :   n o w r a p ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 +     t e x t - o v e r f l o w :   e l l i p s i s ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - i t e m : h o v e r   { 
 
 +     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 + } 
 
 + 
 
 + . m o d e l - s e l e c t o r - i t e m - - s e l e c t e d   { 
 
 +     b a c k g r o u n d :   r g b a ( 7 5 ,   1 3 4 ,   2 5 5 ,   0 . 1 2 ) ; 
 
 +     c o l o r :   v a r ( - - a c c e n t ) ; 
 
 + } 
 
 + 
 
 + / *   M o d e l   s e l e c t o r   i n   i n p u t   b o x   * / 
 
 + . i n p u t - b o x   . m o d e l - s e l e c t o r - p i l l - w r a p p e r   { 
 
 +     m a r g i n - b o t t o m :   8 p x ; 
 
 + } 
 
 + 
 
 + . i n p u t - b o x - - h e r o   . m o d e l - s e l e c t o r - p i l l - w r a p p e r   { 
 
 +     m a r g i n - b o t t o m :   1 2 p x ; 
 
 + } 
 
 + . c h a t - d e b u g - f a b   { 
 
 +     p o s i t i o n :   f i x e d ; 
 
 +     r i g h t :   2 0 p x ; 
 
 +     b o t t o m :   1 0 4 p x ; 
 
 +     z - i n d e x :   4 0 ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 4 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 7 ,   2 4 ,   3 9 ,   0 . 9 2 ) ; 
 
 +     c o l o r :   # f 8 f a f c ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   1 0 p x   1 4 p x ; 
 
 +     f o n t - s i z e :   1 2 p x ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 0 1 e m ; 
 
 +     b o x - s h a d o w :   0   1 2 p x   3 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 2 8 ) ; 
 
 +     b a c k d r o p - f i l t e r :   b l u r ( 1 4 p x ) ; 
 
 + } 
 
 + 
 
 + . c h a t - d e b u g - f a b : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 3 0 ,   4 1 ,   5 9 ,   0 . 9 8 ) ; 
 
 + } 
 
 + 
 
 + . c h a t - d e b u g - f a b . c o p i e d   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 2 ,   1 0 1 ,   5 2 ,   0 . 9 5 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 1 3 4 ,   2 3 9 ,   1 7 2 ,   0 . 2 8 ) ; 
 
   } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 6 9 0 8 3 0 4 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . d e b u g . t e s t . t s x 
 
 @ @   - 0 , 0   + 1 , 1 3 3   @ @ 
 
 + / *   @ v i t e s t - e n v i r o n m e n t   j s d o m   * / 
 
 + 
 
 + i m p o r t   {   c r e a t e R o o t ,   t y p e   R o o t   }   f r o m   " r e a c t - d o m / c l i e n t " ; 
 
 + i m p o r t   {   a c t   }   f r o m   " r e a c t - d o m / t e s t - u t i l s " ; 
 
 + i m p o r t   {   a f t e r E a c h ,   b e f o r e E a c h ,   d e s c r i b e ,   e x p e c t ,   i t ,   v i   }   f r o m   " v i t e s t " ; 
 
 + 
 
 + i m p o r t   t y p e   {   D B   }   f r o m   " . . / l i b / d b " ; 
 
 + i m p o r t   C h a t V i e w   f r o m   " . / C h a t V i e w " ; 
 
 + 
 
 + f u n c t i o n   c r e a t e D b S t u b ( ) :   D B   { 
 
 +     r e t u r n   { 
 
 +         i n s e r t :   v i . f n ( ( )   = >   1 ) , 
 
 +         q u e r y :   v i . f n ( ( s q l :   s t r i n g )   = >   { 
 
 +             i f   ( s q l . i n c l u d e s ( " F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   O R D E R   B Y   c r e a t e d _ a t   A S C " ) )   { 
 
 +                 r e t u r n   [ 
 
 +                     {   i d :   1 ,   c h a t _ i d :   1 ,   r o l e :   " u s e r " ,   c o n t e n t :   " P e r g u n t a " ,   c r e a t e d _ a t :   1   } , 
 
 +                     {   i d :   2 ,   c h a t _ i d :   1 ,   r o l e :   " a s s i s t a n t " ,   c o n t e n t :   " R e s p o s t a " ,   c r e a t e d _ a t :   2   } , 
 
 +                 ] ; 
 
 +             } 
 
 +             r e t u r n   [ ] ; 
 
 +         } ) , 
 
 +         g e t :   v i . f n ( ( )   = >   n u l l ) , 
 
 +         r u n :   v i . f n ( ) , 
 
 +         p e r s i s t :   v i . f n ( ) , 
 
 +     }   a s   u n k n o w n   a s   D B ; 
 
 + } 
 
 + 
 
 + c o n s t   d e f a u l t P r o p s   =   { 
 
 +     m o d e l s :   [ ] , 
 
 +     l o c a l M o d e l s :   [ ] , 
 
 +     s e l e c t e d M o d e l :   " " , 
 
 +     o n M o d e l C h a n g e :   v i . f n ( ) , 
 
 +     s t a t u s :   " o k "   a s   c o n s t , 
 
 + } ; 
 
 + 
 
 + d e s c r i b e ( " C h a t V i e w   d e b u g   t o o l s " ,   ( )   = >   { 
 
 +     l e t   c o n t a i n e r :   H T M L D i v E l e m e n t ; 
 
 +     l e t   r o o t :   R o o t ; 
 
 +     c o n s t   w r i t e T e x t   =   v i . f n ( ( )   = >   P r o m i s e . r e s o l v e ( ) ) ; 
 
 + 
 
 +     b e f o r e E a c h ( ( )   = >   { 
 
 +         / /   @ t s - e x p e c t - e r r o r   R e a c t   t e s t   e n v i r o n m e n t   f l a g 
 
 +         g l o b a l T h i s . I S _ R E A C T _ A C T _ E N V I R O N M E N T   =   t r u e ; 
 
 +         c o n t a i n e r   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
 +         d o c u m e n t . b o d y . a p p e n d C h i l d ( c o n t a i n e r ) ; 
 
 +         r o o t   =   c r e a t e R o o t ( c o n t a i n e r ) ; 
 
 +         E l e m e n t . p r o t o t y p e . s c r o l l I n t o V i e w   =   v i . f n ( ) ; 
 
 +         O b j e c t . a s s i g n ( n a v i g a t o r ,   {   c l i p b o a r d :   {   w r i t e T e x t   }   } ) ; 
 
 +     } ) ; 
 
 + 
 
 +     a f t e r E a c h ( ( )   = >   { 
 
 +         a c t ( ( )   = >   r o o t . u n m o u n t ( ) ) ; 
 
 +         c o n t a i n e r . r e m o v e ( ) ; 
 
 +         w r i t e T e x t . m o c k C l e a r ( ) ; 
 
 +         v i . r e s t o r e A l l M o c k s ( ) ; 
 
 +         / /   @ t s - e x p e c t - e r r o r   R e a c t   t e s t   e n v i r o n m e n t   f l a g 
 
 +         g l o b a l T h i s . I S _ R E A C T _ A C T _ E N V I R O N M E N T   =   f a l s e ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " s h o w s   a   f l o a t i n g   d e b u g   c o p y   b u t t o n   o n l y   w h e n   d e b u g   t o o l s   a r e   e n a b l e d " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   d b   =   c r e a t e D b S t u b ( ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { 1 } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     s h o w D e b u g T o o l s 
 
 +                     { . . . d e f a u l t P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   d e b u g B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C o p y   d e b u g   t r a n s c r i p t " ] ' ) ; 
 
 +         e x p e c t ( d e b u g B u t t o n ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { 1 } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     s h o w D e b u g T o o l s = { f a l s e } 
 
 +                     { . . . d e f a u l t P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C o p y   d e b u g   t r a n s c r i p t " ] ' ) ) . t o B e N u l l ( ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " c o p i e s   t h e   f u l l   c h a t   t r a n s c r i p t   w i t h   m e s s a g e   d e t a i l s " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   d b   =   c r e a t e D b S t u b ( ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { 1 } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     s h o w D e b u g T o o l s 
 
 +                     { . . . d e f a u l t P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   d e b u g B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C o p y   d e b u g   t r a n s c r i p t " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( d e b u g B u t t o n ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             d e b u g B u t t o n ? . c l i c k ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( w r i t e T e x t ) . t o H a v e B e e n C a l l e d T i m e s ( 1 ) ; 
 
 +         c o n s t   c o p i e d T e x t   =   ( w r i t e T e x t . m o c k . c a l l s [ 0 ]   a s   u n k n o w n   a s   [ s t r i n g ] ) [ 0 ] ; 
 
 +         e x p e c t ( c o p i e d T e x t ) . t o C o n t a i n ( " C h a t   I D :   1 " ) ; 
 
 +         e x p e c t ( c o p i e d T e x t ) . t o C o n t a i n ( " [ U S E R ]   # 1 " ) ; 
 
 +         e x p e c t ( c o p i e d T e x t ) . t o C o n t a i n ( " [ A S S I S T A N T ]   # 2 " ) ; 
 
 +     } ) ; 
 
 + } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x 
 
 i n d e x   b 0 b b f 6 e . . d f a d f 2 7   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t e s t . t s x 
 
 @ @   - 3 , 6   + 3 , 7   @ @ 
 
   i m p o r t   {   c r e a t e R o o t ,   t y p e   R o o t   }   f r o m   " r e a c t - d o m / c l i e n t " ; 
 
   i m p o r t   {   a c t   }   f r o m   " r e a c t - d o m / t e s t - u t i l s " ; 
 
   i m p o r t   {   a f t e r E a c h ,   b e f o r e E a c h ,   d e s c r i b e ,   e x p e c t ,   i t ,   v i   }   f r o m   " v i t e s t " ; 
 
 + i m p o r t   {   p a r s e A s s i s t a n t R e s p o n s e   }   f r o m   " . . / l i b / c h a t " ; 
 
   i m p o r t   t y p e   {   D B   }   f r o m   " . . / l i b / d b " ; 
 
   i m p o r t   C h a t V i e w   f r o m   " . / C h a t V i e w " ; 
 
   i m p o r t   t y p e   {   M e s s a g e   }   f r o m   " . . / l i b / t y p e s " ; 
 
 @ @   - 1 7 , 7   + 1 8 , 1 6   @ @   f u n c t i o n   c r e a t e D b S t u b ( ) :   D B   { 
 
       }   a s   u n k n o w n   a s   D B ; 
 
   } 
 
   
 
 - d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
 + / /   D e f a u l t   p r o p s   f o r   C h a t V i e w   t e s t s 
 
 + c o n s t   d e f a u l t C h a t V i e w P r o p s   =   { 
 
 +     m o d e l s :   [ ]   a s   i m p o r t ( " . . / l i b / t y p e s " ) . M o d e l I n f o [ ] , 
 
 +     l o c a l M o d e l s :   [ ]   a s   i m p o r t ( " . . / f e a t u r e s / r u n t i m e / t y p e s " ) . R u n t i m e M o d e l F i l e [ ] , 
 
 +     s e l e c t e d M o d e l :   " " , 
 
 +     o n M o d e l C h a n g e :   v i . f n ( ) , 
 
 +     s t a t u s :   " e r r o r "   a s   i m p o r t ( " . . / l i b / t y p e s " ) . S e r v e r S t a t u s , 
 
 + } ; 
 
 + 
 
 + d e s c r i b e . s e q u e n t i a l ( " C h a t V i e w " ,   ( )   = >   { 
 
       l e t   c o n t a i n e r :   H T M L D i v E l e m e n t ; 
 
       l e t   r o o t :   R o o t ; 
 
   
 
 @ @   - 3 4 , 6   + 4 4 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
           a c t ( ( )   = >   r o o t . u n m o u n t ( ) ) ; 
 
           c o n t a i n e r . r e m o v e ( ) ; 
 
           v i . r e s t o r e A l l M o c k s ( ) ; 
 
 +         v i . u n s t u b A l l G l o b a l s ( ) ; 
 
           / /   @ t s - e x p e c t - e r r o r   R e a c t   t e s t   e n v i r o n m e n t   f l a g 
 
           g l o b a l T h i s . I S _ R E A C T _ A C T _ E N V I R O N M E N T   =   f a l s e ; 
 
       } ) ; 
 
 @ @   - 5 1 , 6   + 6 2 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 6 8 , 1 0   + 8 0 , 4 4   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
           } ) ; 
 
   
 
           e x p e c t ( t e x t a r e a ? . v a l u e ) . t o B e ( " K e e p   t h i s   d r a f t " ) ; 
 
 -         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " C o n n e c t   a n   A P I " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " C o n n e c t   r u n t i m e " ) ; 
 
           e x p e c t ( v i . m o c k e d ( d b . r u n ) ) . n o t . t o H a v e B e e n C a l l e d ( ) ; 
 
       } ) ; 
 
   
 
 +     i t ( " b l o c k s   s e n d i n g   w h i l e   a   l o c a l   m o d e l   i s   l o a d i n g " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   d b   =   c r e a t e D b S t u b ( ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { n u l l } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     r u n t i m e M o d e = " l o c a l " 
 
 +                     r u n t i m e S t a t u s = " l o a d i n g " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   t e x t a r e a   =   c o n t a i n e r . q u e r y S e l e c t o r ( " t e x t a r e a " )   a s   H T M L T e x t A r e a E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t e x t a r e a ) . t o B e T r u t h y ( ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " M o d e l   l o a d i n g " ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             t e x t a r e a ! . v a l u e   =   " S e n d   t h i s   l a t e r " ; 
 
 +             t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
 +             t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   K e y b o a r d E v e n t ( " k e y d o w n " ,   {   k e y :   " E n t e r " ,   b u b b l e s :   t r u e   } ) ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( v i . m o c k e d ( d b . r u n ) ) . n o t . t o H a v e B e e n C a l l e d ( ) ; 
 
 +         e x p e c t ( t e x t a r e a ? . v a l u e ) . t o B e ( " S e n d   t h i s   l a t e r " ) ; 
 
 +     } ) ; 
 
 + 
 
       i t ( " l o a d s   m e s s a g e s   w h e n   s w i t c h i n g   t o   a   s a v e d   c h a t " ,   a s y n c   ( )   = >   { 
 
           c o n s t   r o w s B y C h a t   =   n e w   M a p < n u m b e r ,   M e s s a g e [ ] > ( [ 
 
               [ 1 ,   [ {   i d :   1 1 ,   c h a t _ i d :   1 ,   r o l e :   " u s e r " ,   c o n t e n t :   " F i r s t   s a v e d   c h a t " ,   c r e a t e d _ a t :   1   } ] ] , 
 
 @ @   - 1 0 3 , 6   + 1 4 9 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 1 1 9 , 6   + 1 6 6 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 1 9 2 , 6   + 2 4 0 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 2 0 4 , 7   + 2 5 3 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
               t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
           } ) ; 
 
   
 
 -         c o n s t   s e n d B u t t o n   =   A r r a y . f r o m ( c o n t a i n e r . q u e r y S e l e c t o r A l l ( " b u t t o n " ) ) . f i n d ( ( n o d e )   = >   n o d e . t e x t C o n t e n t ? . i n c l u d e s ( " S e n d " ) ) ; 
 
 +         c o n s t   s e n d B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " S e n d   m e s s a g e " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
           e x p e c t ( s e n d B u t t o n ) . t o B e T r u t h y ( ) ; 
 
   
 
           a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 @ @   - 2 2 1 , 6   + 2 7 0 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 2 4 7 , 6   + 2 9 7 , 1 1 5   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
           e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . n o t . t o C o n t a i n ( " L a t e   a n s w e r   f r o m   f i r s t   c h a t " ) ; 
 
       } ) ; 
 
   
 
 +     i t ( " s a n i t i z e s   l e a k e d   a s s i s t a n t   t r a n s c r i p t   b e f o r e   s e n d i n g   h i s t o r y   b a c k   t o   t h e   m o d e l " ,   a s y n c   ( )   = >   { 
 
 +         / /   T h e   D B   n o w   s t o r e s   a l r e a d y - c l e a n e d   c o n t e n t   ( l e a k a g e   i s   s t r i p p e d   b e f o r e   i n s e r t ) . 
 
 +         / /   b u i l d A p i M e s s a g e s   t r u s t s   t h e   D B   c o n t e n t   a n d   o n l y   d r o p s   f u l l y - c o r r u p t e d   r o w s . 
 
 +         / /   M e s s a g e s   t h a t   w e r e   f u l l y   l e a k a g e   ( n o   u s e f u l   p r e f i x )   a r e   s a v e d   a s   a           p l a c e h o l d e r 
 
 +         / /   a n d   e x c l u d e d   b y   t h e   N O T   L I K E   '       % '   f i l t e r ,   s o   t h e y   n e v e r   r e a c h   t h e   m o d e l . 
 
 +         c o n s t   r o w s B y C h a t   =   n e w   M a p < n u m b e r ,   M e s s a g e [ ] > ( [ 
 
 +             [ 1 ,   [ 
 
 +                 {   i d :   1 1 ,   c h a t _ i d :   1 ,   r o l e :   " u s e r " ,   c o n t e n t :   " M e n s a g e m   a n t e r i o r " ,   c r e a t e d _ a t :   1   } , 
 
 +                 { 
 
 +                     i d :   1 2 , 
 
 +                     c h a t _ i d :   1 , 
 
 +                     r o l e :   " a s s i s t a n t " , 
 
 +                     / /   S i m u l a t e s   w h a t   i s   s t o r e d   A F T E R   l e a k a g e   s t r i p :   o n l y   t h e   u s e f u l   p r e f i x . 
 
 +                     c o n t e n t :   " R e s p o s t a   %Q%t i l . " , 
 
 +                     c r e a t e d _ a t :   2 , 
 
 +                 } , 
 
 +                 / /   i d :   1 3   w a s   f u l l y   c o r r u p t e d   ( n o   u s e f u l   p r e f i x ) ,   s a v e d   a s           p l a c e h o l d e r . 
 
 +                 / /   I t   i s   e x c l u d e d   b y   t h e   N O T   L I K E   '       % '   f i l t e r   i n   b u i l d A p i M e s s a g e s . 
 
 +             ] ] , 
 
 +         ] ) ; 
 
 + 
 
 +         c o n s t   d b   =   { 
 
 +             i n s e r t :   v i . f n ( ( )   = >   1 ) , 
 
 +             q u e r y :   v i . f n ( ( s q l :   s t r i n g ,   p a r a m s ? :   u n k n o w n [ ] )   = >   { 
 
 +                 i f   ( s q l . i n c l u d e s ( " S E L E C T   r o l e ,   c o n t e n t   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ) )   { 
 
 +                     r e t u r n   [ . . . ( r o w s B y C h a t . g e t ( N u m b e r ( p a r a m s ? . [ 0 ] ) )   ? ?   [ ] ) ] . m a p ( ( {   r o l e ,   c o n t e n t   } )   = >   ( {   r o l e ,   c o n t e n t   } ) ) ; 
 
 +                 } 
 
 +                 i f   ( s q l . i n c l u d e s ( " F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ) )   { 
 
 +                     r e t u r n   [ . . . ( r o w s B y C h a t . g e t ( N u m b e r ( p a r a m s ? . [ 0 ] ) )   ? ?   [ ] ) ] ; 
 
 +                 } 
 
 +                 r e t u r n   [ ] ; 
 
 +             } ) , 
 
 +             g e t :   v i . f n ( ( s q l :   s t r i n g ,   p a r a m s ? :   u n k n o w n [ ] )   = >   { 
 
 +                 i f   ( s q l . i n c l u d e s ( " C O U N T ( * )   a s   c   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ) )   { 
 
 +                     r e t u r n   {   c :   r o w s B y C h a t . g e t ( N u m b e r ( p a r a m s ? . [ 0 ] ) ) ? . l e n g t h   ? ?   0   } ; 
 
 +                 } 
 
 +                 r e t u r n   n u l l ; 
 
 +             } ) , 
 
 +             r u n :   v i . f n ( ( s q l :   s t r i n g ,   p a r a m s ? :   u n k n o w n [ ] )   = >   { 
 
 +                 i f   ( s q l . i n c l u d e s ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' u s e r ' ,   ? ) " ) )   { 
 
 +                     c o n s t   c h a t I d   =   N u m b e r ( p a r a m s ? . [ 0 ] ) ; 
 
 +                     c o n s t   c o n t e n t   =   S t r i n g ( p a r a m s ? . [ 1 ]   ? ?   " " ) ; 
 
 +                     c o n s t   n e x t   =   r o w s B y C h a t . g e t ( c h a t I d )   ? ?   [ ] ; 
 
 +                     n e x t . p u s h ( {   i d :   9 9 ,   c h a t _ i d :   c h a t I d ,   r o l e :   " u s e r " ,   c o n t e n t ,   c r e a t e d _ a t :   9 9   } ) ; 
 
 +                     r o w s B y C h a t . s e t ( c h a t I d ,   n e x t ) ; 
 
 +                 } 
 
 +             } ) , 
 
 +             p e r s i s t :   v i . f n ( ) , 
 
 +         }   a s   u n k n o w n   a s   D B ; 
 
 + 
 
 +         c o n s t   f e t c h S p y   =   v i . f n ( ( )   = > 
 
 +             P r o m i s e . r e s o l v e ( 
 
 +                 n e w   R e s p o n s e ( 
 
 +                     n e w   R e a d a b l e S t r e a m ( { 
 
 +                         s t a r t ( c o n t r o l l e r )   { 
 
 +                             c o n t r o l l e r . e n q u e u e ( n e w   T e x t E n c o d e r ( ) . e n c o d e ( " d a t a :   [ D O N E ] \ n " ) ) ; 
 
 +                             c o n t r o l l e r . c l o s e ( ) ; 
 
 +                         } , 
 
 +                     } ) , 
 
 +                     {   s t a t u s :   2 0 0 ,   h e a d e r s :   {   " C o n t e n t - T y p e " :   " t e x t / e v e n t - s t r e a m "   }   } , 
 
 +                 ) , 
 
 +             ) , 
 
 +         ) ; 
 
 +         v i . s t u b G l o b a l ( " f e t c h " ,   f e t c h S p y ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { 1 } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   t e x t a r e a   =   c o n t a i n e r . q u e r y S e l e c t o r ( " t e x t a r e a " )   a s   H T M L T e x t A r e a E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t e x t a r e a ) . t o B e T r u t h y ( ) ; 
 
 +         c o n s t   s e t T e x t a r e a V a l u e   =   O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( H T M L T e x t A r e a E l e m e n t . p r o t o t y p e ,   " v a l u e " ) ? . s e t ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             s e t T e x t a r e a V a l u e ? . c a l l ( t e x t a r e a ,   " N o v a   p e r g u n t a " ) ; 
 
 +             t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   s e n d B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " S e n d   m e s s a g e " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             s e n d B u t t o n ? . c l i c k ( ) ; 
 
 +             a w a i t   P r o m i s e . r e s o l v e ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( f e t c h S p y ) . t o H a v e B e e n C a l l e d T i m e s ( 1 ) ; 
 
 +         c o n s t   c a l l   =   f e t c h S p y . m o c k . c a l l s [ 0 ]   a s   u n k n o w n   a s   [ s t r i n g ,   R e q u e s t I n i t ] ; 
 
 +         c o n s t   [ ,   i n i t ]   =   c a l l ; 
 
 +         c o n s t   b o d y   =   J S O N . p a r s e ( S t r i n g ( i n i t . b o d y ) ) ; 
 
 + 
 
 +         / /   S y s t e m   p r o m p t   i s   a l w a y s   p r e p e n d e d   a s   t h e   f i r s t   m e s s a g e 
 
 +         e x p e c t ( b o d y . m e s s a g e s [ 0 ] . r o l e ) . t o B e ( " s y s t e m " ) ; 
 
 +         e x p e c t ( b o d y . m e s s a g e s . s l i c e ( 1 ) ) . t o E q u a l ( [ 
 
 +             {   r o l e :   " u s e r " ,   c o n t e n t :   " N o v a   p e r g u n t a "   } , 
 
 +             {   r o l e :   " a s s i s t a n t " ,   c o n t e n t :   " R e s p o s t a   %Q%t i l . "   } , 
 
 +             {   r o l e :   " u s e r " ,   c o n t e n t :   " M e n s a g e m   a n t e r i o r "   } , 
 
 +         ] ) ; 
 
 +     } ) ; 
 
 + 
 
       i t ( " s h o w s   a s s i s t a n t   r e p l y   a f t e r   g e n e r a t i o n   c o m p l e t e s   i n   a n   e x i s t i n g   c h a t " ,   a s y n c   ( )   = >   { 
 
           c o n s t   r o w s B y C h a t   =   n e w   M a p < n u m b e r ,   M e s s a g e [ ] > ( [ 
 
               [ 1 ,   [ {   i d :   1 1 ,   c h a t _ i d :   1 ,   r o l e :   " u s e r " ,   c o n t e n t :   " P r e v i o u s   m e s s a g e " ,   c r e a t e d _ a t :   1   } ] ] , 
 
 @ @   - 3 1 0 , 6   + 4 6 9 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 3 2 5 , 7   + 4 8 5 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
               t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
           } ) ; 
 
   
 
 -         c o n s t   s e n d B u t t o n   =   A r r a y . f r o m ( c o n t a i n e r . q u e r y S e l e c t o r A l l ( " b u t t o n " ) ) . f i n d ( ( n o d e )   = >   n o d e . t e x t C o n t e n t ? . i n c l u d e s ( " S e n d " ) ) ; 
 
 +         c o n s t   s e n d B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " S e n d   m e s s a g e " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
           a w a i t   a c t ( a s y n c   ( )   = >   {   s e n d B u t t o n ? . c l i c k ( ) ;   } ) ; 
 
   
 
           / /   D u r i n g   g e n e r a t i o n ,   u s e r   m e s s a g e   s h o u l d   b e   v i s i b l e 
 
 @ @   - 3 8 2 , 6   + 5 4 2 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
           } ) ; 
 
 @ @   - 3 9 6 , 7   + 5 5 7 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
               t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
           } ) ; 
 
   
 
 -         c o n s t   s e n d B u t t o n   =   A r r a y . f r o m ( c o n t a i n e r . q u e r y S e l e c t o r A l l ( " b u t t o n " ) ) . f i n d ( ( n o d e )   = >   n o d e . t e x t C o n t e n t ? . i n c l u d e s ( " S e n d " ) ) ; 
 
 +         c o n s t   s e n d B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " S e n d   m e s s a g e " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
           e x p e c t ( s e n d B u t t o n ) . t o B e T r u t h y ( ) ; 
 
   
 
           a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 @ @   - 4 2 0 , 6   + 5 8 1 , 7   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
                       m o d e l = " d e m o " 
 
                       o n C h a t C r e a t e d = { v i . f n ( ) } 
 
                       o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
                   / > , 
 
               ) ; 
 
               a w a i t   P r o m i s e . r e s o l v e ( ) ; 
 
 @ @   - 4 2 7 , 4   + 5 8 9 , 1 0 2   @ @   d e s c r i b e ( " C h a t V i e w " ,   ( )   = >   { 
 
   
 
           e x p e c t ( r e q u e s t S i g n a l . a b o r t e d ) . t o B e ( t r u e ) ; 
 
       } ) ; 
 
 + 
 
 +     i t ( " d e r i v e s   v i s i b l e   c o n t e n t   a n d   r e a s o n i n g   f r o m   t h i n k   b l o c k s   b e f o r e   p e r s i s t e n c e " ,   ( )   = >   { 
 
 +         c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( " < t h i n k > a n a l i s e   i n t e r n a < / t h i n k > R e s p o s t a   u t i l   f i n a l " ) ; 
 
 + 
 
 +         e x p e c t ( p a r s e d . c o n t e n t ) . t o B e ( " R e s p o s t a   u t i l   f i n a l " ) ; 
 
 +         e x p e c t ( p a r s e d . r e a s o n i n g ) . t o B e ( " a n a l i s e   i n t e r n a " ) ; 
 
 +         e x p e c t ( p a r s e d . t h i n k i n g O p e n ) . t o B e ( f a l s e ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " s t o r e s   a   c o n t r o l l e d   p l a c e h o l d e r   w h e n   t h e   m o d e l   s t a r t s   i n s i d e   a   l e a k e d   c o d e   f e n c e   t r a n s c r i p t " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   r o w s B y C h a t   =   n e w   M a p < n u m b e r ,   M e s s a g e [ ] > ( [ [ 1 ,   [ ] ] ] ) ; 
 
 +         l e t   n e x t M e s s a g e I d   =   1 ; 
 
 +         c o n s t   d b   =   { 
 
 +             i n s e r t :   v i . f n ( ( )   = >   1 ) , 
 
 +             q u e r y :   v i . f n ( ( s q l :   s t r i n g ,   p a r a m s ? :   u n k n o w n [ ] )   = >   { 
 
 +                 i f   ( s q l . i n c l u d e s ( " F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ) )   { 
 
 +                     r e t u r n   [ . . . ( r o w s B y C h a t . g e t ( N u m b e r ( p a r a m s ? . [ 0 ] ) )   ? ?   [ ] ) ] ; 
 
 +                 } 
 
 +                 r e t u r n   [ ] ; 
 
 +             } ) , 
 
 +             g e t :   v i . f n ( ( )   = >   n u l l ) , 
 
 +             r u n :   v i . f n ( ( s q l :   s t r i n g ,   p a r a m s ? :   u n k n o w n [ ] )   = >   { 
 
 +                 i f   ( s q l . i n c l u d e s ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' u s e r ' ,   ? ) " ) )   { 
 
 +                     c o n s t   c h a t I d   =   N u m b e r ( p a r a m s ? . [ 0 ] ) ; 
 
 +                     c o n s t   c o n t e n t   =   S t r i n g ( p a r a m s ? . [ 1 ]   ? ?   " " ) ; 
 
 +                     c o n s t   n e x t   =   r o w s B y C h a t . g e t ( c h a t I d )   ? ?   [ ] ; 
 
 +                     n e x t . p u s h ( {   i d :   n e x t M e s s a g e I d + + ,   c h a t _ i d :   c h a t I d ,   r o l e :   " u s e r " ,   c o n t e n t ,   c r e a t e d _ a t :   n e x t M e s s a g e I d   } ) ; 
 
 +                     r o w s B y C h a t . s e t ( c h a t I d ,   n e x t ) ; 
 
 +                 } 
 
 +                 i f   ( s q l . i n c l u d e s ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ) " ) )   { 
 
 +                     c o n s t   c h a t I d   =   N u m b e r ( p a r a m s ? . [ 0 ] ) ; 
 
 +                     c o n s t   c o n t e n t   =   S t r i n g ( p a r a m s ? . [ 1 ]   ? ?   " " ) ; 
 
 +                     c o n s t   n e x t   =   r o w s B y C h a t . g e t ( c h a t I d )   ? ?   [ ] ; 
 
 +                     n e x t . p u s h ( {   i d :   n e x t M e s s a g e I d + + ,   c h a t _ i d :   c h a t I d ,   r o l e :   " a s s i s t a n t " ,   c o n t e n t ,   c r e a t e d _ a t :   n e x t M e s s a g e I d   } ) ; 
 
 +                     r o w s B y C h a t . s e t ( c h a t I d ,   n e x t ) ; 
 
 +                 } 
 
 +             } ) , 
 
 +             p e r s i s t :   v i . f n ( ) , 
 
 +         }   a s   u n k n o w n   a s   D B ; 
 
 + 
 
 +         v i . s t u b G l o b a l ( 
 
 +             " f e t c h " , 
 
 +             v i . f n ( ( )   = > 
 
 +                 P r o m i s e . r e s o l v e ( 
 
 +                     n e w   R e s p o n s e ( 
 
 +                         n e w   R e a d a b l e S t r e a m ( { 
 
 +                             s t a r t ( c o n t r o l l e r )   { 
 
 +                                 c o n s t   e n c o d e r   =   n e w   T e x t E n c o d e r ( ) ; 
 
 +                                 c o n t r o l l e r . e n q u e u e ( e n c o d e r . e n c o d e ( " d a t a :   { \ " c h o i c e s \ " : [ { \ " d e l t a \ " : { \ " c o n t e n t \ " : \ " \ \ n \ \ n ` ` ` p y t h o n \ \ n #   S y s t e m :   Y o u   a r e   a   p r e c i s e   c o d i n g   a s s i s t a n t   r u n n i n g   l o c a l l y . \ \ n U s e r :   t e s t e   m e n s a g e m \ \ n A s s i s t a n t :   ` ` ` \ " } } ] } \ n " ) ) ; 
 
 +                                 c o n t r o l l e r . e n q u e u e ( e n c o d e r . e n c o d e ( " d a t a :   [ D O N E ] \ n " ) ) ; 
 
 +                                 c o n t r o l l e r . c l o s e ( ) ; 
 
 +                             } , 
 
 +                         } ) , 
 
 +                         {   s t a t u s :   2 0 0 ,   h e a d e r s :   {   " C o n t e n t - T y p e " :   " t e x t / e v e n t - s t r e a m "   }   } , 
 
 +                     ) , 
 
 +                 ) , 
 
 +             ) , 
 
 +         ) ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < C h a t V i e w 
 
 +                     d b = { d b } 
 
 +                     c h a t I d = { 1 } 
 
 +                     s e r v e r = " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " 
 
 +                     a p i K e y = " " 
 
 +                     m o d e l = " d e m o " 
 
 +                     o n C h a t C r e a t e d = { v i . f n ( ) } 
 
 +                     o n C h a t U p d a t e d = { v i . f n ( ) } 
 
 +                     { . . . d e f a u l t C h a t V i e w P r o p s } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   t e x t a r e a   =   c o n t a i n e r . q u e r y S e l e c t o r ( " t e x t a r e a " )   a s   H T M L T e x t A r e a E l e m e n t   |   n u l l ; 
 
 +         c o n s t   s e n d B u t t o n   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " S e n d   m e s s a g e " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
 +         c o n s t   s e t T e x t a r e a V a l u e   =   O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( H T M L T e x t A r e a E l e m e n t . p r o t o t y p e ,   " v a l u e " ) ? . s e t ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             s e t T e x t a r e a V a l u e ? . c a l l ( t e x t a r e a ,   " t e s t e   m e n s a g e m " ) ; 
 
 +             t e x t a r e a ! . d i s p a t c h E v e n t ( n e w   E v e n t ( " i n p u t " ,   {   b u b b l e s :   t r u e   } ) ) ; 
 
 +             s e n d B u t t o n ? . c l i c k ( ) ; 
 
 +             a w a i t   n e w   P r o m i s e ( ( r e s o l v e )   = >   s e t T i m e o u t ( r e s o l v e ,   0 ) ) ; 
 
 +             a w a i t   n e w   P r o m i s e ( ( r e s o l v e )   = >   s e t T i m e o u t ( r e s o l v e ,   0 ) ) ; 
 
 +             a w a i t   n e w   P r o m i s e ( ( r e s o l v e )   = >   s e t T i m e o u t ( r e s o l v e ,   0 ) ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   r u n C a l l s   =   v i . m o c k e d ( d b . r u n ) . m o c k . c a l l s   a s   A r r a y < [ s t r i n g ,   u n k n o w n [ ] ? ] > ; 
 
 +         e x p e c t ( 
 
 +             r u n C a l l s . s o m e ( 
 
 +                 ( [ s q l ,   p a r a m s ] )   = > 
 
 +                     s q l   = = =   " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ) " 
 
 +                     & &   A r r a y . i s A r r a y ( p a r a m s ) 
 
 +                     & &   p a r a m s [ 0 ]   = = =   1 
 
 +                     & &   p a r a m s [ 1 ]   = = =   "         O   m o d e l o   g e r o u   u m a   r e s p o s t a   c o r r o m p i d a   o u   v a z o u   o   p r o m p t   d e   s i s t e m a . " , 
 
 +             ) , 
 
 +         ) . t o B e ( t r u e ) ; 
 
 +     } ) ; 
 
   } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x 
 
 i n d e x   1 7 5 f 7 c 8 . . 2 b 0 2 a b d   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / C h a t V i e w . t s x 
 
 @ @   - 1 , 1 3   + 1 , 4 8   @ @ 
 
   i m p o r t   {   u s e S t a t e ,   u s e E f f e c t ,   u s e R e f ,   u s e C a l l b a c k   }   f r o m   " r e a c t " ; 
 
   i m p o r t   t y p e   {   D B   }   f r o m   " . . / l i b / d b " ; 
 
 - i m p o r t   t y p e   {   C h a t T o k e n T o t a l s ,   M e s s a g e ,   U s a g e   }   f r o m   " . . / l i b / t y p e s " ; 
 
 - i m p o r t   {   b u i l d C h a t T i t l e ,   p a r s e A s s i s t a n t R e s p o n s e   }   f r o m   " . . / l i b / c h a t " ; 
 
 + i m p o r t   t y p e   {   C h a t T o k e n T o t a l s ,   M e s s a g e ,   U s a g e ,   M o d e l I n f o ,   S e r v e r S t a t u s ,   U s e r M e m o r y   }   f r o m   " . . / l i b / t y p e s " ; 
 
 + i m p o r t   t y p e   {   R u n t i m e M o d e l F i l e ,   R u n t i m e S t a t u s   }   f r o m   " . . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
 + i m p o r t   {   b u i l d C h a t T i t l e ,   p a r s e A s s i s t a n t R e s p o n s e ,   i s L o o p e d O r C o r r u p t e d R e s p o n s e ,   s t r i p P r o m p t E c h o A n d T r a n s c r i p t L e a k a g e   }   f r o m   " . . / l i b / c h a t " ; 
 
 + i m p o r t   {   A I _ C O N T E X T _ L E N G T H ,   A I _ M A X _ H I S T O R Y _ M E S S A G E S ,   A I _ S T R E A M _ D E F A U L T   }   f r o m   " . . / c o n f i g / a i " ; 
 
 + i m p o r t   {   S T O P _ S E Q U E N C E S   }   f r o m   " . . / p r o m p t s / r e s p o n s e - r u l e s " ; 
 
 + i m p o r t   {   S Y S T E M _ P R O M P T   }   f r o m   " . . / p r o m p t s / s y s t e m " ; 
 
 + i m p o r t   {   f o r m a t C h a t D e b u g T r a n s c r i p t   }   f r o m   " . . / l i b / c h a t D e b u g " ; 
 
   i m p o r t   {   r e n d e r M a r k d o w n ,   e n s u r e H l j s   }   f r o m   " . . / l i b / m a r k d o w n " ; 
 
 - i m p o r t   {   g e t C o m p o s e r N o t i c e ,   g e t S u g g e s t e d P r o m p t s   }   f r o m   " . / c h a t - v i e w - s t a t e " ; 
 
 + i m p o r t   {   s a n i t i z e M e s s a g e T e x t   }   f r o m   " . . / l i b / m e s s a g e S a n i t i z e r " ; 
 
 + i m p o r t   {   d e v L o g   }   f r o m   " . . / l i b / d e v L o g g e r " ; 
 
 + i m p o r t   {   g e t C o m p o s e r N o t i c e   }   f r o m   " . / c h a t - v i e w - s t a t e " ; 
 
   i m p o r t   M e s s a g e B u b b l e   f r o m   " . / M e s s a g e B u b b l e " ; 
 
 - i m p o r t   {   A r r o w U p ,   I m a g e ,   M i c r o p h o n e ,   P a p e r c l i p ,   C h a t C i r c l e T e x t   }   f r o m   " @ p h o s p h o r - i c o n s / r e a c t " ; 
 
 + i m p o r t   S t r e a m i n g B u b b l e   f r o m   " . / S t r e a m i n g B u b b l e " ; 
 
 + i m p o r t   {   A g e n t i c T o g g l e   }   f r o m   " . / f o r g e a g e n t " ; 
 
 + / /   a g e n t i c - d e t e c t i o n :   s h o u l d U s e A g e n t i c M o d e   r e m o v e d   f r o m   a u t o - t r i g g e r        a g e n t i c   m o d e   i s   m a n u a l - o n l y   n o w 
 
 + i m p o r t   {   I m a g e ,   M i c r o p h o n e ,   P a p e r c l i p ,   C h a t C i r c l e T e x t ,   P a p e r P l a n e R i g h t ,   D a t a b a s e ,   L i g h t n i n g ,   P l u s ,   M o n i t o r ,   G l o b e ,   P a l e t t e ,   C o d e   }   f r o m   " @ p h o s p h o r - i c o n s / r e a c t " ; 
 
   i m p o r t   " . / C h a t V i e w . c s s " ; 
 
   
 
 + f u n c t i o n   s c o r e B r o k e n E n c o d i n g ( t e x t :   s t r i n g ) :   n u m b e r   { 
 
 +     c o n s t   r e p l a c e m e n t   =   ( t e x t . m a t c h ( /  % / g )   ? ?   [ ] ) . l e n g t h ; 
 
 +     c o n s t   m o j i b a k e   =   ( t e x t . m a t c h ( / ( ? : % . | % . | %%. | <% | <% ) / g )   ? ?   [ ] ) . l e n g t h ; 
 
 +     r e t u r n   r e p l a c e m e n t   *   4   +   m o j i b a k e ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   c r e a t e S t r e a m C h u n k D e c o d e r ( )   { 
 
 +     c o n s t   u t f 8 D e c o d e r   =   n e w   T e x t D e c o d e r ( " u t f - 8 " ) ; 
 
 +     c o n s t   w i n d o w s 1 2 5 2 D e c o d e r   =   n e w   T e x t D e c o d e r ( " w i n d o w s - 1 2 5 2 " ) ; 
 
 + 
 
 +     r e t u r n   { 
 
 +         d e c o d e ( v a l u e :   U i n t 8 A r r a y ) :   s t r i n g   { 
 
 +             c o n s t   u t f 8   =   u t f 8 D e c o d e r . d e c o d e ( v a l u e ,   {   s t r e a m :   t r u e   } ) ; 
 
 +             c o n s t   l a t i n 1   =   w i n d o w s 1 2 5 2 D e c o d e r . d e c o d e ( v a l u e ,   {   s t r e a m :   t r u e   } ) ; 
 
 +             r e t u r n   s c o r e B r o k e n E n c o d i n g ( l a t i n 1 )   <   s c o r e B r o k e n E n c o d i n g ( u t f 8 )   ?   l a t i n 1   :   u t f 8 ; 
 
 +         } , 
 
 +         f l u s h ( ) :   s t r i n g   { 
 
 +             c o n s t   u t f 8   =   u t f 8 D e c o d e r . d e c o d e ( ) ; 
 
 +             c o n s t   l a t i n 1   =   w i n d o w s 1 2 5 2 D e c o d e r . d e c o d e ( ) ; 
 
 +             i f   ( ! u t f 8   & &   ! l a t i n 1 )   r e t u r n   " " ; 
 
 +             r e t u r n   s c o r e B r o k e n E n c o d i n g ( l a t i n 1 )   <   s c o r e B r o k e n E n c o d i n g ( u t f 8 )   ?   l a t i n 1   :   u t f 8 ; 
 
 +         } , 
 
 +     } ; 
 
 + } 
 
 + 
 
   c o n s t   M A X _ M E M O R Y   =   2 0 ; 
 
   
 
   i n t e r f a c e   P r o p s   { 
 
 @ @   - 1 6 , 2 6   + 5 1 , 5 5   @ @   i n t e r f a c e   P r o p s   { 
 
       s e r v e r :   s t r i n g ; 
 
       a p i K e y :   s t r i n g ; 
 
       m o d e l :   s t r i n g ; 
 
 +     m o d e l s :   M o d e l I n f o [ ] ; 
 
 +     l o c a l M o d e l s :   R u n t i m e M o d e l F i l e [ ] ; 
 
 +     s e l e c t e d M o d e l :   s t r i n g ; 
 
 +     o n M o d e l C h a n g e :   ( i d :   s t r i n g )   = >   v o i d ; 
 
 +     o n M o d e l S w a p ? :   ( p a t h :   s t r i n g )   = >   v o i d ; 
 
 +     i s S w a p p i n g ? :   b o o l e a n ; 
 
 +     s t a t u s :   S e r v e r S t a t u s ; 
 
 +     r u n t i m e M o d e ? :   " l o c a l "   |   " r e m o t e " ; 
 
 +     r u n t i m e S t a t u s ? :   R u n t i m e S t a t u s ; 
 
 +     s h o w D e b u g T o o l s ? :   b o o l e a n ; 
 
       o n C h a t C r e a t e d :   ( i d :   n u m b e r )   = >   v o i d ; 
 
       o n C h a t U p d a t e d :   ( )   = >   v o i d ; 
 
 +     o n N e w C h a t ? :   ( )   = >   v o i d ; 
 
       o n O p e n S i d e b a r ? :   ( )   = >   v o i d ; 
 
 +     o n O p e n S e t t i n g s ? :   ( )   = >   v o i d ; 
 
 +     o n D e g r a d a t i o n D e t e c t e d ? :   ( )   = >   v o i d ; 
 
 +     / * *   L i f t   g e n e r a t i n g   s t a t e   t o   p a r e n t   f o r   h e a d e r   d i s p l a y   * / 
 
 +     o n G e n e r a t i n g C h a n g e ? :   ( v :   b o o l e a n )   = >   v o i d ; 
 
 +     / * *   L i f t   s t r e a m   t o k e n   c o u n t   t o   p a r e n t   f o r   h e a d e r   d i s p l a y   * / 
 
 +     o n S t r e a m T o k e n C o u n t C h a n g e ? :   ( v :   n u m b e r )   = >   v o i d ; 
 
 +     / * *   L i f t   T P S   t o   p a r e n t   f o r   h e a d e r   d i s p l a y   * / 
 
 +     o n T p s C h a n g e ? :   ( v :   n u m b e r   |   n u l l )   = >   v o i d ; 
 
 +     o n C h a t T o k e n T o t a l s C h a n g e ? :   ( t o t a l s :   C h a t T o k e n T o t a l s )   = >   v o i d ; 
 
   } 
 
   
 
 - e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a t e d ,   o n C h a t U p d a t e d ,   o n O p e n S i d e b a r   } :   P r o p s )   { 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   
 
 +     d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   
 
 +     m o d e l s ,   l o c a l M o d e l s ,   s e l e c t e d M o d e l ,   o n M o d e l C h a n g e ,   o n M o d e l S w a p ,   i s S w a p p i n g ,   s t a t u s , 
 
 +     r u n t i m e M o d e   =   " r e m o t e " ,   r u n t i m e S t a t u s   =   " r e a d y " ,   s h o w D e b u g T o o l s   =   B o o l e a n ( ( i m p o r t . m e t a   a s   I m p o r t M e t a   &   {   e n v ? :   {   D E V ? :   b o o l e a n   }   } ) . e n v ? . D E V ) , 
 
 +     o n C h a t C r e a t e d ,   o n C h a t U p d a t e d ,   o n N e w C h a t ,   o n O p e n S i d e b a r ,   o n O p e n S e t t i n g s ,   o n D e g r a d a t i o n D e t e c t e d , 
 
 +     o n G e n e r a t i n g C h a n g e ,   o n S t r e a m T o k e n C o u n t C h a n g e ,   o n T p s C h a n g e ,   o n C h a t T o k e n T o t a l s C h a n g e , 
 
 + } :   P r o p s )   { 
 
       c o n s t   [ m e s s a g e s ,   s e t M e s s a g e s ]   =   u s e S t a t e < M e s s a g e [ ] > ( [ ] ) ; 
 
       c o n s t   [ i n p u t ,   s e t I n p u t ]   =   u s e S t a t e ( " " ) ; 
 
       c o n s t   [ g e n e r a t i n g ,   s e t G e n e r a t i n g ]   =   u s e S t a t e ( f a l s e ) ; 
 
       c o n s t   [ s t r e a m C o n t e n t ,   s e t S t r e a m C o n t e n t ]   =   u s e S t a t e ( " " ) ; 
 
       c o n s t   [ s t r e a m R e a s o n i n g ,   s e t S t r e a m R e a s o n i n g ]   =   u s e S t a t e ( " " ) ; 
 
       c o n s t   [ s t r e a m T h i n k i n g O p e n ,   s e t S t r e a m T h i n k i n g O p e n ]   =   u s e S t a t e ( f a l s e ) ; 
 
 -     c o n s t   [ s h o w L i v e R e a s o n i n g ,   s e t S h o w L i v e R e a s o n i n g ]   =   u s e S t a t e ( f a l s e ) ; 
 
 -     c o n s t   [ t p s ,   s e t T p s ]   =   u s e S t a t e < n u m b e r   |   n u l l > ( n u l l ) ; 
 
 -     c o n s t   [ u s e S t r e a m ,   s e t U s e S t r e a m ]   =   u s e S t a t e ( t r u e ) ; 
 
 +     c o n s t   [ t p s ,   s e t T p s L o c a l ]   =   u s e S t a t e < n u m b e r   |   n u l l > ( n u l l ) ; 
 
 +     c o n s t   s e t T p s   =   ( v :   n u m b e r   |   n u l l )   = >   {   s e t T p s L o c a l ( v ) ;   o n T p s C h a n g e ? . ( v ) ;   } ; 
 
 +     c o n s t   [ u s e S t r e a m ,   s e t U s e S t r e a m ]   =   u s e S t a t e ( A I _ S T R E A M _ D E F A U L T ) ; 
 
       c o n s t   [ u s e M e m o r y ,   s e t U s e M e m o r y ]   =   u s e S t a t e ( t r u e ) ; 
 
 -     c o n s t   [ s t r e a m T o k e n C o u n t ,   s e t S t r e a m T o k e n C o u n t ]   =   u s e S t a t e ( 0 ) ; 
 
 +     c o n s t   [ s t r e a m T o k e n C o u n t ,   s e t S t r e a m T o k e n C o u n t L o c a l ]   =   u s e S t a t e ( 0 ) ; 
 
 +     c o n s t   s e t S t r e a m T o k e n C o u n t   =   ( v :   n u m b e r )   = >   {   s e t S t r e a m T o k e n C o u n t L o c a l ( v ) ;   o n S t r e a m T o k e n C o u n t C h a n g e ? . ( v ) ;   } ; 
 
       c o n s t   [ m e s s a g e Q u e u e ,   s e t M e s s a g e Q u e u e ]   =   u s e S t a t e < s t r i n g [ ] > ( [ ] ) ; 
 
       c o n s t   [ s h o w M e m o r y M o d a l ,   s e t S h o w M e m o r y M o d a l ]   =   u s e S t a t e ( f a l s e ) ; 
 
       c o n s t   [ i s Q u e u e O p e n ,   s e t I s Q u e u e O p e n ]   =   u s e S t a t e ( f a l s e ) ; 
 
 +     c o n s t   [ d e b u g C o p i e d ,   s e t D e b u g C o p i e d ]   =   u s e S t a t e ( f a l s e ) ; 
 
 +     c o n s t   [ a g e n t i c M o d e ,   s e t A g e n t i c M o d e ]   =   u s e S t a t e ( f a l s e ) ; 
 
   
 
       c o n s t   m e s s a g e s E n d R e f   =   u s e R e f < H T M L D i v E l e m e n t > ( n u l l ) ; 
 
       c o n s t   t e x t a r e a R e f   =   u s e R e f < H T M L T e x t A r e a E l e m e n t > ( n u l l ) ; 
 
 @ @   - 4 4 , 7   + 1 0 8 , 1 2   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
       c o n s t   p e n d i n g R e q u e s t C h a t I d R e f   =   u s e R e f < n u m b e r   |   n u l l > ( n u l l ) ; 
 
       c o n s t   l o a d M e s s a g e s R e f   =   u s e R e f < ( t a r g e t C h a t I d ? :   n u m b e r   |   n u l l )   = >   v o i d > ( ( )   = >   { } ) ; 
 
       c o n s t   m e s s a g e Q u e u e R e f   =   u s e R e f < s t r i n g [ ] > ( [ ] ) ; 
 
 -     c o n s t   s e n d R e f   =   u s e R e f < ( t e x t :   s t r i n g ,   f r o m C h a t I d ? :   n u m b e r )   = >   P r o m i s e < v o i d > > ( a s y n c   ( )   = >   { } ) ; 
 
 +     c o n s t   s e n d R e f   =   u s e R e f < ( t e x t :   s t r i n g ,   f r o m C h a t I d ? :   n u m b e r ,   r e p l a c e A s s i s t a n t I d ? :   n u m b e r )   = >   P r o m i s e < v o i d > > ( a s y n c   ( )   = >   { } ) ; 
 
 +     c o n s t   o p t i m i s t i c A s s i s t a n t R e f   =   u s e R e f < M e s s a g e   |   n u l l > ( n u l l ) ; 
 
 +     / /   T r a c k s   a c c u m u l a t e d   s t r e a m   c o n t e n t   s o   a b o r t   c a n   p e r s i s t   i t 
 
 +     c o n s t   s t r e a m C o n t e n t A c c R e f   =   u s e R e f < s t r i n g > ( " " ) ; 
 
 +     / /   T P S   d e g r a d a t i o n   d e t e c t i o n :   t i m e r   f i r e s   i f   T P S   s t a y s   <   3 0   f o r   5 s 
 
 +     c o n s t   d e g r a d a t i o n T i m e r R e f   =   u s e R e f < R e t u r n T y p e < t y p e o f   s e t T i m e o u t >   |   n u l l > ( n u l l ) ; 
 
   
 
       / /   S i n g l e   h e l p e r   t o   k e e p   r e f   a n d   s t a t e   i n   s y n c        u s e   a t   e v e r y   q u e u e   m u t a t i o n   s i t e 
 
       c o n s t   s e t Q u e u e   =   ( n e x t :   s t r i n g [ ] )   = >   { 
 
 @ @   - 5 2 , 1 0   + 1 2 1 , 1 0   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
           s e t M e s s a g e Q u e u e ( n e x t ) ; 
 
       } ; 
 
   
 
 -     c o n s t   c o m p o s e r N o t i c e   =   g e t C o m p o s e r N o t i c e ( m o d e l ,   s e r v e r ) ; 
 
 -     c o n s t   s t a r t e r P r o m p t s   =   g e t S u g g e s t e d P r o m p t s ( ) ; 
 
 +     c o n s t   c o m p o s e r N o t i c e   =   g e t C o m p o s e r N o t i c e ( m o d e l ,   s e r v e r ,   r u n t i m e M o d e ,   r u n t i m e S t a t u s ,   B o o l e a n ( i s S w a p p i n g ) ) ; 
 
       c o n s t   e s t i m a t e d T o k e n s   =   i n p u t . l e n g t h   >   0   ?   M a t h . c e i l ( i n p u t . l e n g t h   /   4 )   :   0 ; 
 
   
 
 + 
 
       c o n s t   c h a t T o t a l s   =   m e s s a g e s . r e d u c e < C h a t T o k e n T o t a l s > ( ( a c c ,   m s g )   = >   { 
 
           a c c . p r o m p t _ t o k e n s   + =   m s g . p r o m p t _ t o k e n s   ? ?   0 ; 
 
           a c c . c o m p l e t i o n _ t o k e n s   + =   m s g . c o m p l e t i o n _ t o k e n s   ? ?   0 ; 
 
 @ @   - 7 0 , 1 5   + 1 3 9 , 7 3   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
               ) 
 
           :   0 ; 
 
   
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         o n C h a t T o k e n T o t a l s C h a n g e ? . ( c h a t T o t a l s ) ; 
 
 +     } ,   [ 
 
 +         c h a t T o t a l s . p r o m p t _ t o k e n s , 
 
 +         c h a t T o t a l s . c o m p l e t i o n _ t o k e n s , 
 
 +         c h a t T o t a l s . t o t a l _ t o k e n s , 
 
 +         o n C h a t T o k e n T o t a l s C h a n g e , 
 
 +     ] ) ; 
 
 + 
 
 + 
 
 + 
 
       u s e E f f e c t ( ( )   = >   {   e n s u r e H l j s ( ) ;   } ,   [ ] ) ; 
 
   
 
 +     / /   T P S   d e g r a d a t i o n   d e t e c t i o n :   i f   T P S   <   3 0   f o r   5   c o n t i n u o u s   s e c o n d s ,   n o t i f y 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         i f   ( t p s   = = =   n u l l )   r e t u r n ; 
 
 +         i f   ( t p s   <   3 0 )   { 
 
 +             i f   ( ! d e g r a d a t i o n T i m e r R e f . c u r r e n t )   { 
 
 +                 d e g r a d a t i o n T i m e r R e f . c u r r e n t   =   s e t T i m e o u t ( ( )   = >   { 
 
 +                     o n D e g r a d a t i o n D e t e c t e d ? . ( ) ; 
 
 +                     d e g r a d a t i o n T i m e r R e f . c u r r e n t   =   n u l l ; 
 
 +                 } ,   5 0 0 0 ) ; 
 
 +             } 
 
 +         }   e l s e   { 
 
 +             / /   T P S   r e c o v e r e d        c a n c e l   p e n d i n g   t i m e r 
 
 +             i f   ( d e g r a d a t i o n T i m e r R e f . c u r r e n t )   { 
 
 +                 c l e a r T i m e o u t ( d e g r a d a t i o n T i m e r R e f . c u r r e n t ) ; 
 
 +                 d e g r a d a t i o n T i m e r R e f . c u r r e n t   =   n u l l ; 
 
 +             } 
 
 +         } 
 
 +         r e t u r n   ( )   = >   { 
 
 +             i f   ( d e g r a d a t i o n T i m e r R e f . c u r r e n t )   { 
 
 +                 c l e a r T i m e o u t ( d e g r a d a t i o n T i m e r R e f . c u r r e n t ) ; 
 
 +                 d e g r a d a t i o n T i m e r R e f . c u r r e n t   =   n u l l ; 
 
 +             } 
 
 +         } ; 
 
 +     } ,   [ t p s ,   o n D e g r a d a t i o n D e t e c t e d ] ) ; 
 
 + 
 
       c o n s t   l o a d M e s s a g e s   =   u s e C a l l b a c k ( ( t a r g e t C h a t I d :   n u m b e r   |   n u l l   =   c h a t I d )   = >   { 
 
 -         i f   ( t a r g e t C h a t I d   = =   n u l l )   {   s e t M e s s a g e s ( [ ] ) ;   r e t u r n ;   } 
 
 +         c o n s t   e f f e c t i v e C h a t I d   =   t a r g e t C h a t I d   ? ?   p e n d i n g R e q u e s t C h a t I d R e f . c u r r e n t   ? ?   a c t i v e C h a t I d R e f . c u r r e n t ; 
 
 +         i f   ( e f f e c t i v e C h a t I d   = =   n u l l )   {   s e t M e s s a g e s ( [ ] ) ;   r e t u r n ;   } 
 
           c o n s t   r o w s   =   d b . q u e r y < M e s s a g e > ( 
 
               " S E L E C T   *   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   O R D E R   B Y   c r e a t e d _ a t   A S C " , 
 
 -             [ t a r g e t C h a t I d ] , 
 
 +             [ e f f e c t i v e C h a t I d ] , 
 
           ) ; 
 
 -         s e t M e s s a g e s ( r o w s ) ; 
 
 + 
 
 +         c o n s t   n o r m a l i z e d R o w s   =   r o w s . m a p ( ( r o w )   = >   ( {   . . . r o w   } ) ) ; 
 
 +         c o n s t   o p t i m i s t i c A s s i s t a n t   =   o p t i m i s t i c A s s i s t a n t R e f . c u r r e n t ; 
 
 + 
 
 +         i f   ( 
 
 +             o p t i m i s t i c A s s i s t a n t   & & 
 
 +             o p t i m i s t i c A s s i s t a n t . c h a t _ i d   = = =   e f f e c t i v e C h a t I d   & & 
 
 +             ! n o r m a l i z e d R o w s . s o m e ( ( r o w )   = >   r o w . i d   = = =   o p t i m i s t i c A s s i s t a n t . i d ) 
 
 +         )   { 
 
 +             s e t M e s s a g e s ( [ . . . n o r m a l i z e d R o w s ,   o p t i m i s t i c A s s i s t a n t ] ) ; 
 
 +             r e t u r n ; 
 
 +         } 
 
 + 
 
 +         i f   ( 
 
 +             o p t i m i s t i c A s s i s t a n t   & & 
 
 +             o p t i m i s t i c A s s i s t a n t . c h a t _ i d   = = =   e f f e c t i v e C h a t I d   & & 
 
 +             n o r m a l i z e d R o w s . s o m e ( ( r o w )   = >   r o w . i d   = = =   o p t i m i s t i c A s s i s t a n t . i d ) 
 
 +         )   { 
 
 +             o p t i m i s t i c A s s i s t a n t R e f . c u r r e n t   =   n u l l ; 
 
 +         } 
 
 + 
 
 +         s e t M e s s a g e s ( n o r m a l i z e d R o w s ) ; 
 
       } ,   [ d b ,   c h a t I d ] ) ; 
 
   
 
       l o a d M e s s a g e s R e f . c u r r e n t   =   l o a d M e s s a g e s ; 
 
 @ @   - 9 9 , 7   + 2 2 6 , 6   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
               s e t S t r e a m C o n t e n t ( " " ) ; 
 
               s e t S t r e a m R e a s o n i n g ( " " ) ; 
 
               s e t S t r e a m T h i n k i n g O p e n ( f a l s e ) ; 
 
 -             s e t S h o w L i v e R e a s o n i n g ( f a l s e ) ; 
 
               s e t T p s ( n u l l ) ; 
 
               s e t S t r e a m T o k e n C o u n t ( 0 ) ; 
 
               p e n d i n g R e q u e s t C h a t I d R e f . c u r r e n t   =   n u l l ; 
 
 @ @   - 1 1 1 , 7   + 2 3 7 , 6   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
               s e t S t r e a m C o n t e n t ( " " ) ; 
 
               s e t S t r e a m R e a s o n i n g ( " " ) ; 
 
               s e t S t r e a m T h i n k i n g O p e n ( f a l s e ) ; 
 
 -             s e t S h o w L i v e R e a s o n i n g ( f a l s e ) ; 
 
               s e t T p s ( n u l l ) ; 
 
               s e t S t r e a m T o k e n C o u n t ( 0 ) ; 
 
           } 
 
 @ @   - 1 4 5 , 3 1   + 2 7 0 , 9 1   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
       } ,   [ d b ,   o n C h a t U p d a t e d ] ) ; 
 
   
 
       c o n s t   b u i l d A p i M e s s a g e s   =   u s e C a l l b a c k ( ( c i d :   n u m b e r )   = >   { 
 
 -         c o n s t   l i m i t   =   u s e M e m o r y   ?   M A X _ M E M O R Y   :   1 ; 
 
 -         r e t u r n   d b . q u e r y < {   r o l e :   s t r i n g ;   c o n t e n t :   s t r i n g   } > ( 
 
 -             " S E L E C T   r o l e ,   c o n t e n t   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   A N D   c o n t e n t   ! =   ' '   A N D   c o n t e n t   N O T   L I K E   '         E r r o r : % '   A N D   c o n t e n t   ! =   ' i n t e r n a l   e r r o r '   O R D E R   B Y   c r e a t e d _ a t   D E S C   L I M I T   ? " , 
 
 -             [ c i d ,   l i m i t ] , 
 
 +         c o n s t   h i s t o r y   =   d b . q u e r y < {   r o l e :   s t r i n g ;   c o n t e n t :   s t r i n g   } > ( 
 
 +             " S E L E C T   r o l e ,   c o n t e n t   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   A N D   c o n t e n t   ! =   ' '   A N D   c o n t e n t   N O T   L I K E   ' i n t e r n a l   e r r o r '   A N D   c o n t e n t   N O T   L I K E   '    % '   O R D E R   B Y   c r e a t e d _ a t   D E S C   L I M I T   ? " , 
 
 +             [ c i d ,   A I _ M A X _ H I S T O R Y _ M E S S A G E S ] , 
 
           ) . r e v e r s e ( ) ; 
 
 -     } ,   [ d b ,   u s e M e m o r y ] ) ; 
 
   
 
 -     c o n s t   s e n d   =   u s e C a l l b a c k ( a s y n c   ( t e x t :   s t r i n g ,   f r o m C h a t I d ? :   n u m b e r )   = >   { 
 
 +         / /   D e f e n c e - i n - d e p t h :   r e - s t r i p   l e a k a g e   f r o m   D B   c o n t e n t . 
 
 +         / /   I d e a l l y   t h e   D B   o n l y   c o n t a i n s   c l e a n   d a t a ,   b u t   o l d e r   s e s s i o n s   m a y   h a v e 
 
 +         / /   p e r s i s t e d   " o l a \ n U s e r "   o r   " U s e r \ n U s e r "   b e f o r e   t h e   l e a k a g e   p a t t e r n   w a s 
 
 +         / /   b r o a d   e n o u g h   t o   c a t c h   b a r e   r o l e - n a m e s   w i t h o u t   c o l o n s . 
 
 +         / /   T h i s   r e - s t r i p   i s   s a f e   b e c a u s e   i t   u s e s   t h e   s a m e   f u n c t i o n   u s e d   b e f o r e 
 
 +         / /   i n s e r t i o n        a p p l y i n g   i t   t w i c e   o n   c l e a n   c o n t e n t   i s   a   n o - o p . 
 
 +         c o n s t   h i s t o r y M e s s a g e s   =   h i s t o r y 
 
 +             . m a p ( ( m s g )   = >   { 
 
 +                 i f   ( m s g . r o l e   ! = =   " a s s i s t a n t " )   r e t u r n   m s g ; 
 
 +                 c o n s t   c l e a n e d   =   s t r i p P r o m p t E c h o A n d T r a n s c r i p t L e a k a g e ( m s g . c o n t e n t ) . t r i m E n d ( ) ; 
 
 +                 c o n s t   s a n i t i z e d   =   s a n i t i z e M e s s a g e T e x t ( c l e a n e d ) ; 
 
 +                 d e v L o g . l o g S a n i t i z a t i o n ( " b u i l d A p i M e s s a g e s : a s s i s t a n t - h i s t o r y " ,   { 
 
 +                     b e f o r e :   m s g . c o n t e n t , 
 
 +                     a f t e r :   s a n i t i z e d . t e x t , 
 
 +                     c h a n g e d :   s a n i t i z e d . t e x t   ! = =   m s g . c o n t e n t , 
 
 +                     r e p a i r e d E n c o d i n g :   s a n i t i z e d . r e p a i r e d E n c o d i n g , 
 
 +                 } ) ; 
 
 +                 i f   ( ! s a n i t i z e d . t e x t   | |   i s L o o p e d O r C o r r u p t e d R e s p o n s e ( s a n i t i z e d . t e x t ) )   { 
 
 +                     r e t u r n   {   . . . m s g ,   c o n t e n t :   " "   } ; 
 
 +                 } 
 
 +                 r e t u r n   {   . . . m s g ,   c o n t e n t :   s a n i t i z e d . t e x t   } ; 
 
 +             } ) 
 
 +             . f i l t e r ( ( m s g )   = >   m s g . c o n t e n t . t r i m ( )   ! = =   " " ) ; 
 
 + 
 
 +         / /   P r e p e n d   a   m i n i m a l   s y s t e m   p r o m p t   s o   m o d e l s   l i k e   Q w e n 3   0 . 8 B / 2 B / 4 B 
 
 +         / /   u n d e r s t a n d   t h e y   a r e   a   g e n e r a l - p u r p o s e   a s s i s t a n t   a n d   d o n ' t   r e f u s e 
 
 +         / /   b e n i g n   q u e r i e s   l i k e   " t e s t e "   b y   i m a g i n i n g   t h e y ' r e   r e s t r i c t e d . 
 
 +         r e t u r n   [ 
 
 +             {   r o l e :   " s y s t e m " ,   c o n t e n t :   S Y S T E M _ P R O M P T   } , 
 
 +             . . . h i s t o r y M e s s a g e s , 
 
 +         ] ; 
 
 +     } ,   [ d b ] ) ; 
 
 + 
 
 +     c o n s t   a p p e n d P e r s i s t e d A s s i s t a n t M e s s a g e   =   u s e C a l l b a c k ( ( m e s s a g e :   M e s s a g e )   = >   { 
 
 +         o p t i m i s t i c A s s i s t a n t R e f . c u r r e n t   =   m e s s a g e ; 
 
 + 
 
 +         i f   ( a c t i v e C h a t I d R e f . c u r r e n t   ! = =   m e s s a g e . c h a t _ i d )   r e t u r n ; 
 
 + 
 
 +         s e t M e s s a g e s ( ( p r e v )   = >   { 
 
 +             i f   ( p r e v . s o m e ( ( e n t r y )   = >   e n t r y . i d   = = =   m e s s a g e . i d ) )   r e t u r n   p r e v ; 
 
 +             r e t u r n   [ . . . p r e v ,   m e s s a g e ] ; 
 
 +         } ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     c o n s t   s e n d   =   u s e C a l l b a c k ( a s y n c   ( t e x t :   s t r i n g ,   f r o m C h a t I d ? :   n u m b e r ,   r e p l a c e A s s i s t a n t I d ? :   n u m b e r )   = >   { 
 
           i f   ( ! t e x t . t r i m ( )   | |   g e n e r a t i n g )   r e t u r n ; 
 
           i f   ( g e t C o m p o s e r N o t i c e ( m o d e l ,   s e r v e r ) )   r e t u r n ; 
 
 +         / /   A g e n t i c   m o d e   i s   O N L Y   a c t i v a t e d   v i a   t h e   e x p l i c i t   t o g g l e        n e v e r   a u t o - d e t e c t e d . 
 
 +         / /   A u t o - d e t e c t i o n   w a s   t r i g g e r i n g   o n   b e n i g n   m e s s a g e s   l i k e   " c o m o   f a z e r   u m   c a r r o ? " 
 
 +         / /   a n d   i n j e c t i n g   t h e   F o r g e A g e n t   s y s t e m   p r o m p t ,   c a u s i n g   c o n f u s i n g   r e f u s a l s   o n 
 
 +         / /   s m a l l   Q w e n 3   m o d e l s   ( 0 . 8 B ,   2 B ,   4 B ) . 
 
 +         c o n s t   i s A g e n t i c R e q u e s t   =   a g e n t i c M o d e ; 
 
   
 
 -         s e t G e n e r a t i n g ( t r u e ) ; 
 
 +         s e t G e n e r a t i n g ( t r u e ) ;   o n G e n e r a t i n g C h a n g e ? . ( t r u e ) ; 
 
           s e t S t r e a m C o n t e n t ( " " ) ; 
 
           s e t S t r e a m R e a s o n i n g ( " " ) ; 
 
           s e t S t r e a m T h i n k i n g O p e n ( f a l s e ) ; 
 
 -         s e t S h o w L i v e R e a s o n i n g ( f a l s e ) ; 
 
           s e t S t r e a m T o k e n C o u n t ( 0 ) ; 
 
 +         s t r e a m C o n t e n t A c c R e f . c u r r e n t   =   " " ; 
 
 + 
 
 +         / /           D e v L o g g e r :   s t a r t   i n t e r a c t i o n   t r a c k i n g         
 
 +         d e v L o g . s t a r t I n t e r a c t i o n ( c h a t I d ,   t e x t ,   { 
 
 +             m e m o r y E n a b l e d :   u s e M e m o r y , 
 
 +             a g e n t i c M o d e , 
 
 +         } ) ; 
 
   
 
           c o n s t   c i d   =   f r o m C h a t I d   ? ?   g e t O r C r e a t e C h a t ( t e x t ) ; 
 
           a c t i v e C h a t I d R e f . c u r r e n t   =   c i d ; 
 
           p e n d i n g R e q u e s t C h a t I d R e f . c u r r e n t   =   c i d ; 
 
   
 
 -         d b . r u n ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' u s e r ' ,   ? ) " ,   [ c i d ,   t e x t ] ) ; 
 
 -         c o n s t   c o u n t   =   d b . g e t < {   c :   n u m b e r   } > ( " S E L E C T   C O U N T ( * )   a s   c   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ,   [ c i d ] ) ; 
 
 -         i f   ( c o u n t ? . c   = = =   1 )   e n s u r e C h a t T i t l e ( c i d ,   t e x t ) ; 
 
 +         / /   W h e n   r e p l a c e A s s i s t a n t I d   i s   s e t   w e   a r e   r e s e n d i n g        t h e   u s e r   m e s s a g e   a l r e a d y 
 
 +         / /   e x i s t s   i n   t h e   D B ;   w e   o n l y   d e l e t e   t h e   o l d   a s s i s t a n t   r e p l y   a n d   r e p l a c e   i t . 
 
 +         i f   ( r e p l a c e A s s i s t a n t I d   = =   n u l l )   { 
 
 +             d b . r u n ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' u s e r ' ,   ? ) " ,   [ c i d ,   t e x t ] ) ; 
 
 +             c o n s t   c o u n t   =   d b . g e t < {   c :   n u m b e r   } > ( " S E L E C T   C O U N T ( * )   a s   c   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ? " ,   [ c i d ] ) ; 
 
 +             i f   ( c o u n t ? . c   = = =   1 )   e n s u r e C h a t T i t l e ( c i d ,   t e x t ) ; 
 
 +         }   e l s e   { 
 
 +             / /   D e l e t e   t h e   o l d   a s s i s t a n t   m e s s a g e   t h a t   w e ' r e   r e p l a c i n g 
 
 +             d b . r u n ( " D E L E T E   F R O M   m e s s a g e s   W H E R E   i d   =   ? " ,   [ r e p l a c e A s s i s t a n t I d ] ) ; 
 
 +         } 
 
   
 
           l o a d M e s s a g e s R e f . c u r r e n t ( c i d ) ; 
 
           o n C h a t U p d a t e d ( ) ; 
 
 @ @   - 1 7 8 , 2 2   + 3 6 3 , 4 0   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
           c o n s t   h e a d e r s :   R e c o r d < s t r i n g ,   s t r i n g >   =   {   " C o n t e n t - T y p e " :   " a p p l i c a t i o n / j s o n "   } ; 
 
           i f   ( a p i K e y )   h e a d e r s [ " A u t h o r i z a t i o n " ]   =   ` B e a r e r   $ { a p i K e y } ` ; 
 
   
 
 +         / /           D e v L o g g e r :   l o g   c o n t e x t   a n d   r e q u e s t         
 
 +         d e v L o g . l o g C o n t e x t ( a p i M e s s a g e s ) ; 
 
 + 
 
           a b o r t R e f . c u r r e n t   =   n e w   A b o r t C o n t r o l l e r ( ) ; 
 
   
 
 +         / /   B u i l d   t h e   r e q u e s t   b o d y   w i t h   m i n i m a l   p a r a m e t e r s        n o   s y s t e m   p r o m p t s , 
 
 +         / /   n o   s t o p   s e q u e n c e s ,   n o   r e s p o n s e   f o r m a t   c o n s t r a i n t s .   L e t   t h e   m o d e l   r u n   f r e e l y . 
 
 +         / /   C o n t e x t   w i n d o w   i s   t h e   o n l y   h a r d   l i m i t   w e   e n f o r c e . 
 
 +         c o n s t   r e q u e s t B o d y :   R e c o r d < s t r i n g ,   u n k n o w n >   =   { 
 
 +             m o d e l , 
 
 +             m e s s a g e s :   a p i M e s s a g e s , 
 
 +             s t r e a m :   u s e S t r e a m , 
 
 +             s t r e a m _ o p t i o n s :   u s e S t r e a m   ?   {   i n c l u d e _ u s a g e :   t r u e   }   :   u n d e f i n e d , 
 
 +             n u m _ c t x :   A I _ C O N T E X T _ L E N G T H , 
 
 +             m a x _ t o k e n s :   1 0 2 4 , 
 
 +         } ; 
 
 +         / /   O n l y   i n c l u d e   s t o p   s e q u e n c e s   i f   e x p l i c i t l y   c o n f i g u r e d   ( c u r r e n t l y   e m p t y ) 
 
 +         i f   ( S T O P _ S E Q U E N C E S . l e n g t h   >   0 )   { 
 
 +             r e q u e s t B o d y . s t o p   =   S T O P _ S E Q U E N C E S ; 
 
 +         } 
 
 + 
 
 +         d e v L o g . l o g R e q u e s t ( ` $ { s e r v e r } / v 1 / c h a t / c o m p l e t i o n s ` ,   r e q u e s t B o d y ,   h e a d e r s ) ; 
 
 + 
 
           t r y   { 
 
               c o n s t   r e s   =   a w a i t   f e t c h ( ` $ { s e r v e r } / v 1 / c h a t / c o m p l e t i o n s ` ,   { 
 
                   m e t h o d :   " P O S T " , 
 
                   h e a d e r s , 
 
                   s i g n a l :   a b o r t R e f . c u r r e n t . s i g n a l , 
 
 -                 b o d y :   J S O N . s t r i n g i f y ( { 
 
 -                     m o d e l , 
 
 -                     m e s s a g e s :   a p i M e s s a g e s , 
 
 -                     s t r e a m :   u s e S t r e a m , 
 
 -                     s t r e a m _ o p t i o n s :   u s e S t r e a m   ?   {   i n c l u d e _ u s a g e :   t r u e   }   :   u n d e f i n e d , 
 
 -                     m a x _ t o k e n s :   2 0 4 8 , 
 
 -                 } ) , 
 
 +                 b o d y :   J S O N . s t r i n g i f y ( r e q u e s t B o d y ) , 
 
               } ) ; 
 
   
 
 +             / /           D e v L o g g e r :   l o g   r e s p o n s e   h e a d e r s         
 
 +             d e v L o g . l o g R e s p o n s e ( r e s ) ; 
 
 + 
 
               i f   ( ! r e s . o k )   { 
 
                   c o n s t   e r r   =   a w a i t   r e s . j s o n ( ) . c a t c h ( ( )   = >   ( { } ) ) ; 
 
                   t h r o w   n e w   E r r o r ( ( e r r   a s   {   e r r o r ? :   {   m e s s a g e ? :   s t r i n g   }   } ) ? . e r r o r ? . m e s s a g e   | |   ` H T T P   $ { r e s . s t a t u s } ` ) ; 
 
 @ @   - 2 0 5 , 1 3   + 4 0 8 , 1 3   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
   
 
               i f   ( u s e S t r e a m )   { 
 
                   c o n s t   r e a d e r   =   r e s . b o d y ! . g e t R e a d e r ( ) ; 
 
 -                 c o n s t   d e c o d e r   =   n e w   T e x t D e c o d e r ( ' u t f - 8 ' ) ; 
 
 +                 c o n s t   s t r e a m D e c o d e r   =   c r e a t e S t r e a m C h u n k D e c o d e r ( ) ; 
 
                   l e t   b u f   =   " " ; 
 
   
 
                   w h i l e   ( t r u e )   { 
 
                       c o n s t   {   d o n e ,   v a l u e   }   =   a w a i t   r e a d e r . r e a d ( ) ; 
 
                       i f   ( d o n e )   b r e a k ; 
 
 -                     b u f   + =   d e c o d e r . d e c o d e ( v a l u e ,   {   s t r e a m :   t r u e   } ) ; 
 
 +                     b u f   + =   s t r e a m D e c o d e r . d e c o d e ( v a l u e ) ; 
 
                       c o n s t   l i n e s   =   b u f . s p l i t ( " \ n " ) ; 
 
                       b u f   =   l i n e s . p o p ( ) ! ; 
 
   
 
 @ @   - 2 2 2 , 5 5   + 4 2 5 , 2 2 1   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
                           t r y   { 
 
                               c o n s t   c h u n k   =   J S O N . p a r s e ( d a t a ) ; 
 
                               c o n s t   d e l t a   =   c h u n k . c h o i c e s ? . [ 0 ] ? . d e l t a ? . c o n t e n t ; 
 
 -                             i f   ( d e l t a )   { 
 
 +                             c o n s t   f i n i s h R e a s o n   =   c h u n k . c h o i c e s ? . [ 0 ] ? . f i n i s h _ r e a s o n ; 
 
 +                             i f   ( t y p e o f   d e l t a   = = =   " s t r i n g " )   { 
 
 +                                 c o n s t   s a n i t i z e d D e l t a   =   s a n i t i z e M e s s a g e T e x t ( d e l t a ) ; 
 
 +                                 d e v L o g . l o g S a n i t i z a t i o n ( " s t r e a m : d e l t a " ,   { 
 
 +                                     b e f o r e :   d e l t a , 
 
 +                                     a f t e r :   s a n i t i z e d D e l t a . t e x t , 
 
 +                                     c h a n g e d :   s a n i t i z e d D e l t a . c h a n g e d , 
 
 +                                     r e p a i r e d E n c o d i n g :   s a n i t i z e d D e l t a . r e p a i r e d E n c o d i n g , 
 
 +                                 } ) ; 
 
                                   t o k e n C o u n t + + ; 
 
                                   s e t S t r e a m T o k e n C o u n t ( t o k e n C o u n t ) ; 
 
 -                                 f u l l C o n t e n t   + =   d e l t a ; 
 
 +                                 f u l l C o n t e n t   + =   s a n i t i z e d D e l t a . t e x t ; 
 
 +                                 s t r e a m C o n t e n t A c c R e f . c u r r e n t   =   f u l l C o n t e n t ; 
 
                                   c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( f u l l C o n t e n t ) ; 
 
                                   s e t S t r e a m C o n t e n t ( p a r s e d . c o n t e n t ) ; 
 
                                   s e t S t r e a m R e a s o n i n g ( p a r s e d . r e a s o n i n g ) ; 
 
                                   s e t S t r e a m T h i n k i n g O p e n ( p a r s e d . t h i n k i n g O p e n ) ; 
 
 -                                 i f   ( p a r s e d . r e a s o n i n g )   s e t S h o w L i v e R e a s o n i n g ( t r u e ) ; 
 
 +                                 / /   G i v e   R e a c t   a   c h a n c e   t o   p a i n t   d u r i n g   l o n g / f a s t   s t r e a m s   w i t h o u t 
 
 +                                 / /   d e p e n d i n g   o n   r e q u e s t A n i m a t i o n F r a m e   ( w h i c h   i s   f l a k y   i n   t e s t s ) . 
 
 +                                 i f   ( t o k e n C o u n t   < =   5   | |   t o k e n C o u n t   %   2 4   = = =   0 )   { 
 
 +                                     a w a i t   P r o m i s e . r e s o l v e ( ) ; 
 
 +                                 } 
 
 +                             } 
 
 +                             i f   ( f i n i s h R e a s o n )   { 
 
 +                                 c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( f u l l C o n t e n t ) ; 
 
 +                                 s e t S t r e a m C o n t e n t ( p a r s e d . c o n t e n t ) ; 
 
 +                                 s e t S t r e a m R e a s o n i n g ( p a r s e d . r e a s o n i n g ) ; 
 
 +                                 s e t S t r e a m T h i n k i n g O p e n ( p a r s e d . t h i n k i n g O p e n ) ; 
 
 +                             } 
 
 +                             i f   ( c h u n k . u s a g e )   u s a g e   =   c h u n k . u s a g e ; 
 
 +                             / /           D e v L o g g e r :   l o g   e a c h   c h u n k         
 
 +                             d e v L o g . l o g S t r e a m C h u n k ( l i n e ,   c h u n k ,   d e l t a   ? ?   n u l l ) ; 
 
 +                         }   c a t c h   ( c h u n k E r r )   { 
 
 +                             / /           D e v L o g g e r :   l o g   m a l f o r m e d   c h u n k         
 
 +                             d e v L o g . l o g S t r e a m C h u n k ( l i n e ,   n u l l ,   n u l l ,   ` P a r s e   e r r o r :   $ { c h u n k E r r } ` ) ; 
 
 +                         } 
 
 +                     } 
 
 +                 } 
 
 + 
 
 +                 c o n s t   f l u s h e d R e m a i n d e r   =   s t r e a m D e c o d e r . f l u s h ( ) ; 
 
 +                 i f   ( f l u s h e d R e m a i n d e r )   { 
 
 +                     b u f   + =   f l u s h e d R e m a i n d e r ; 
 
 +                 } 
 
 + 
 
 +                 i f   ( b u f . t r i m ( ) )   { 
 
 +                     c o n s t   p e n d i n g L i n e s   =   b u f . s p l i t ( " \ n " ) . f i l t e r ( ( l i n e )   = >   l i n e . t r i m ( ) . l e n g t h   >   0 ) ; 
 
 +                     f o r   ( c o n s t   l i n e   o f   p e n d i n g L i n e s )   { 
 
 +                         i f   ( ! l i n e . s t a r t s W i t h ( " d a t a :   " ) )   c o n t i n u e ; 
 
 +                         c o n s t   d a t a   =   l i n e . s l i c e ( 6 ) . t r i m ( ) ; 
 
 +                         i f   ( d a t a   = = =   " [ D O N E ] " )   c o n t i n u e ; 
 
 +                         t r y   { 
 
 +                             c o n s t   c h u n k   =   J S O N . p a r s e ( d a t a ) ; 
 
 +                             c o n s t   d e l t a   =   c h u n k . c h o i c e s ? . [ 0 ] ? . d e l t a ? . c o n t e n t ; 
 
 +                             i f   ( t y p e o f   d e l t a   = = =   " s t r i n g " )   { 
 
 +                                 c o n s t   s a n i t i z e d D e l t a   =   s a n i t i z e M e s s a g e T e x t ( d e l t a ) ; 
 
 +                                 t o k e n C o u n t + + ; 
 
 +                                 s e t S t r e a m T o k e n C o u n t ( t o k e n C o u n t ) ; 
 
 +                                 f u l l C o n t e n t   + =   s a n i t i z e d D e l t a . t e x t ; 
 
 +                                 s t r e a m C o n t e n t A c c R e f . c u r r e n t   =   f u l l C o n t e n t ; 
 
                               } 
 
                               i f   ( c h u n k . u s a g e )   u s a g e   =   c h u n k . u s a g e ; 
 
 -                         }   c a t c h   {   / *   i g n o r e   m a l f o r m e d   c h u n k s   * /   } 
 
 +                         }   c a t c h   ( c h u n k E r r )   { 
 
 +                             d e v L o g . l o g S t r e a m C h u n k ( l i n e ,   n u l l ,   n u l l ,   ` P a r s e   e r r o r :   $ { c h u n k E r r } ` ) ; 
 
 +                         } 
 
                       } 
 
                   } 
 
               }   e l s e   { 
 
                   c o n s t   d a t a   =   a w a i t   r e s . j s o n ( ) ; 
 
 -                 f u l l C o n t e n t   =   d a t a . c h o i c e s ? . [ 0 ] ? . m e s s a g e ? . c o n t e n t   | |   " " ; 
 
 +                 c o n s t   r a w N o n S t r e a m   =   d a t a . c h o i c e s ? . [ 0 ] ? . m e s s a g e ? . c o n t e n t   | |   " " ; 
 
 +                 c o n s t   s a n i t i z e d N o n S t r e a m   =   s a n i t i z e M e s s a g e T e x t ( r a w N o n S t r e a m ) ; 
 
 +                 d e v L o g . l o g S a n i t i z a t i o n ( " r e s p o n s e : n o n - s t r e a m - r a w " ,   { 
 
 +                     b e f o r e :   r a w N o n S t r e a m , 
 
 +                     a f t e r :   s a n i t i z e d N o n S t r e a m . t e x t , 
 
 +                     c h a n g e d :   s a n i t i z e d N o n S t r e a m . c h a n g e d , 
 
 +                     r e p a i r e d E n c o d i n g :   s a n i t i z e d N o n S t r e a m . r e p a i r e d E n c o d i n g , 
 
 +                 } ) ; 
 
 +                 f u l l C o n t e n t   =   s a n i t i z e d N o n S t r e a m . t e x t ; 
 
 +                 s t r e a m C o n t e n t A c c R e f . c u r r e n t   =   f u l l C o n t e n t ; 
 
                   u s a g e   =   d a t a . u s a g e ; 
 
                   c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( f u l l C o n t e n t ) ; 
 
                   s e t S t r e a m C o n t e n t ( p a r s e d . c o n t e n t ) ; 
 
                   s e t S t r e a m R e a s o n i n g ( p a r s e d . r e a s o n i n g ) ; 
 
                   s e t S t r e a m T h i n k i n g O p e n ( p a r s e d . t h i n k i n g O p e n ) ; 
 
 -                 i f   ( p a r s e d . r e a s o n i n g )   s e t S h o w L i v e R e a s o n i n g ( t r u e ) ; 
 
               } 
 
   
 
               c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( f u l l C o n t e n t ) ; 
 
 -             c o n s t   f i n a l C o n t e n t   =   p a r s e d . c o n t e n t . t r i m ( )   | |   f u l l C o n t e n t . t r i m ( ) ; 
 
 -             i f   ( f i n a l C o n t e n t   | |   p a r s e d . r e a s o n i n g )   { 
 
 +             c o n s t   f i n a l S a n i t i z e d   =   s a n i t i z e M e s s a g e T e x t ( p a r s e d . c o n t e n t ) ; 
 
 +             d e v L o g . l o g S a n i t i z a t i o n ( " r e s p o n s e : f i n a l - v i s i b l e " ,   { 
 
 +                 b e f o r e :   p a r s e d . c o n t e n t , 
 
 +                 a f t e r :   f i n a l S a n i t i z e d . t e x t , 
 
 +                 c h a n g e d :   f i n a l S a n i t i z e d . c h a n g e d , 
 
 +                 r e p a i r e d E n c o d i n g :   f i n a l S a n i t i z e d . r e p a i r e d E n c o d i n g , 
 
 +             } ) ; 
 
 +             c o n s t   f i n a l C o n t e n t   =   f i n a l S a n i t i z e d . t e x t . t r i m ( ) ; 
 
 +             c o n s t   h a s U s e f u l V i s i b l e C o n t e n t   =   f i n a l C o n t e n t . l e n g t h   >   0 ; 
 
 +             c o n s t   h a s R e a s o n i n g O n l y   =   ! h a s U s e f u l V i s i b l e C o n t e n t   & &   p a r s e d . r e a s o n i n g . t r i m ( ) . l e n g t h   >   0 ; 
 
 +             / /   U s e   t h e   f i e l d   c o m p u t e d   i n s i d e   p a r s e A s s i s t a n t R e s p o n s e   ( v i s i b l e   c o n t e n t   o n l y ,   n o t   t h i n k   b l o c k ) 
 
 +             c o n s t   h a d T r a n s c r i p t L e a k a g e   =   p a r s e d . h a d T r a n s c r i p t L e a k a g e ; 
 
 + 
 
 +             / /           D e v L o g g e r :   l o g   p a r s e d   r e s u l t   a n d   u s a g e         
 
 +             d e v L o g . l o g P a r s e d R e s u l t ( { 
 
 +                 r a w C o n t e n t :   f u l l C o n t e n t , 
 
 +                 v i s i b l e C o n t e n t :   p a r s e d . c o n t e n t , 
 
 +                 r e a s o n i n g C o n t e n t :   p a r s e d . r e a s o n i n g , 
 
 +                 t h i n k i n g O p e n :   p a r s e d . t h i n k i n g O p e n , 
 
 +                 i s C o r r u p t e d :   i s L o o p e d O r C o r r u p t e d R e s p o n s e ( f i n a l C o n t e n t ) , 
 
 +                 t r a n s c r i p t L e a k a g e D e t e c t e d :   h a d T r a n s c r i p t L e a k a g e , 
 
 +             } ) ; 
 
 +             i f   ( u s a g e )   d e v L o g . l o g U s a g e ( u s a g e ) ; 
 
 + 
 
 +             / /   D o n ' t   s a v e   c o r r u p t e d / l o o p e d   r e s p o n s e s   t o   D B        t h e y   w o u l d   p o i s o n   f u t u r e   c o n t e x t 
 
 +             c o n s t   i s C o r r u p t e d   =   i s L o o p e d O r C o r r u p t e d R e s p o n s e ( f i n a l C o n t e n t ) ; 
 
 + 
 
 +             i f   ( h a s U s e f u l V i s i b l e C o n t e n t   & &   ! i s C o r r u p t e d )   { 
 
 +                 c o n s t   p a r a m s   =   [ 
 
 +                     c i d , 
 
 +                     f i n a l C o n t e n t , 
 
 +                     p a r s e d . r e a s o n i n g   | |   n u l l , 
 
 +                     u s a g e ? . p r o m p t _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . c o m p l e t i o n _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . t o t a l _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . t o k e n s _ p e r _ s e c o n d   ? ?   n u l l , 
 
 +                 ] ; 
 
 +                 d b . r u n ( 
 
 +                     ` I N S E R T   I N T O   m e s s a g e s   ( 
 
 +                         c h a t _ i d ,   r o l e ,   c o n t e n t ,   r e a s o n i n g _ c o n t e n t ,   p r o m p t _ t o k e n s ,   c o m p l e t i o n _ t o k e n s ,   t o t a l _ t o k e n s ,   t o k e n s _ p e r _ s e c o n d 
 
 +                     )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) ` , 
 
 +                     p a r a m s , 
 
 +                 ) ; 
 
 + 
 
 +                 c o n s t   p e r s i s t e d R o w s   =   d b . q u e r y < M e s s a g e > ( 
 
 +                     " S E L E C T   *   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   O R D E R   B Y   c r e a t e d _ a t   A S C " , 
 
 +                     [ c i d ] , 
 
 +                 ) ; 
 
 +                 c o n s t   p e r s i s t e d A s s i s t a n t   =   [ . . . p e r s i s t e d R o w s ] 
 
 +                     . r e v e r s e ( ) 
 
 +                     . f i n d ( ( r o w )   = >   r o w . r o l e   = = =   " a s s i s t a n t "   & &   r o w . c o n t e n t   = = =   f i n a l C o n t e n t ) ; 
 
 + 
 
 +                 d e v L o g . l o g D B W r i t e ( " I N S E R T " ,   " m e s s a g e s " ,   p a r a m s ,   p e r s i s t e d A s s i s t a n t ? . i d   ? ?   n u l l ) ; 
 
 + 
 
 +                 i f   ( p e r s i s t e d A s s i s t a n t )   { 
 
 +                     a p p e n d P e r s i s t e d A s s i s t a n t M e s s a g e ( {   . . . p e r s i s t e d A s s i s t a n t   } ) ; 
 
 +                 }   e l s e   { 
 
 +                     a p p e n d P e r s i s t e d A s s i s t a n t M e s s a g e ( { 
 
 +                         i d :   D a t e . n o w ( ) , 
 
 +                         c h a t _ i d :   c i d , 
 
 +                         r o l e :   " a s s i s t a n t " , 
 
 +                         c o n t e n t :   f i n a l C o n t e n t , 
 
 +                         r e a s o n i n g _ c o n t e n t :   p a r s e d . r e a s o n i n g   | |   u n d e f i n e d , 
 
 +                         p r o m p t _ t o k e n s :   u s a g e ? . p r o m p t _ t o k e n s   ? ?   0 , 
 
 +                         c o m p l e t i o n _ t o k e n s :   u s a g e ? . c o m p l e t i o n _ t o k e n s   ? ?   0 , 
 
 +                         t o t a l _ t o k e n s :   u s a g e ? . t o t a l _ t o k e n s   ? ?   0 , 
 
 +                         t o k e n s _ p e r _ s e c o n d :   u s a g e ? . t o k e n s _ p e r _ s e c o n d   ? ?   u n d e f i n e d , 
 
 +                         c r e a t e d _ a t :   D a t e . n o w ( ) , 
 
 +                     } ) ; 
 
 +                 } 
 
 +             }   e l s e   i f   ( h a s R e a s o n i n g O n l y )   { 
 
 +                 c o n s t   p a r a m s   =   [ 
 
 +                     c i d , 
 
 +                     "         O   m o d e l o   g e r o u   a p e n a s   r a c i o c % n i o   i n t e r n o   e   n e n h u m a   r e s p o s t a   u t i l i z % v e l . " , 
 
 +                     p a r s e d . r e a s o n i n g   | |   n u l l , 
 
 +                     u s a g e ? . p r o m p t _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . c o m p l e t i o n _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . t o t a l _ t o k e n s   ? ?   0 , 
 
 +                     u s a g e ? . t o k e n s _ p e r _ s e c o n d   ? ?   n u l l , 
 
 +                 ] ; 
 
                   d b . r u n ( 
 
                       ` I N S E R T   I N T O   m e s s a g e s   ( 
 
                           c h a t _ i d ,   r o l e ,   c o n t e n t ,   r e a s o n i n g _ c o n t e n t ,   p r o m p t _ t o k e n s ,   c o m p l e t i o n _ t o k e n s ,   t o t a l _ t o k e n s ,   t o k e n s _ p e r _ s e c o n d 
 
                       )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) ` , 
 
 -                     [ 
 
 -                         c i d , 
 
 -                         f i n a l C o n t e n t , 
 
 -                         p a r s e d . c o n t e n t . t r i m ( )   ?   p a r s e d . r e a s o n i n g   :   n u l l , 
 
 -                         u s a g e ? . p r o m p t _ t o k e n s   ? ?   0 , 
 
 -                         u s a g e ? . c o m p l e t i o n _ t o k e n s   ? ?   0 , 
 
 -                         u s a g e ? . t o t a l _ t o k e n s   ? ?   0 , 
 
 -                         u s a g e ? . t o k e n s _ p e r _ s e c o n d   ? ?   n u l l , 
 
 -                     ] , 
 
 +                     p a r a m s , 
 
                   ) ; 
 
 +                 d e v L o g . l o g D B W r i t e ( " I N S E R T ( r e a s o n i n g O n l y ) " ,   " m e s s a g e s " ,   p a r a m s ) ; 
 
 +             }   e l s e   i f   ( i s C o r r u p t e d   | |   h a d T r a n s c r i p t L e a k a g e )   { 
 
 +                 / /   S a v e   a   c o n t r o l l e d   p l a c e h o l d e r   i n s t e a d   o f   p e r s i s t i n g   p r o m p t   e c h o   /   t r a n s c r i p t   l e a k a g e . 
 
 +                 c o n s t   p a r a m s   =   [ 
 
 +                     c i d , 
 
 +                     "         O   m o d e l o   g e r o u   u m a   r e s p o s t a   c o r r o m p i d a   o u   v a z o u   o   p r o m p t   d e   s i s t e m a . " , 
 
 +                 ] ; 
 
 +                 d b . r u n ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ) " ,   p a r a m s ) ; 
 
 +                 d e v L o g . l o g D B W r i t e ( " I N S E R T ( c o r r u p t e d ) " ,   " m e s s a g e s " ,   p a r a m s ) ; 
 
               } 
 
               d b . r u n ( " U P D A T E   c h a t s   S E T   u p d a t e d _ a t   =   s t r f t i m e ( ' % s ' , ' n o w ' )   W H E R E   i d   =   ? " ,   [ c i d ] ) ; 
 
               i f   ( u s a g e ? . t o k e n s _ p e r _ s e c o n d )   s e t T p s ( u s a g e . t o k e n s _ p e r _ s e c o n d ) ; 
 
               o n C h a t U p d a t e d ( ) ; 
 
   
 
 + 
 
 + 
 
           }   c a t c h   ( e r r :   u n k n o w n )   { 
 
 -             i f   ( e r r   i n s t a n c e o f   E r r o r   & &   e r r . n a m e   ! = =   " A b o r t E r r o r " )   { 
 
 +             i f   ( e r r   i n s t a n c e o f   E r r o r   & &   e r r . n a m e   = = =   " A b o r t E r r o r " )   { 
 
 +                 / /           S a v e   p a r t i a l   r e s p o n s e   o n   u s e r - i n i t i a t e d   s t o p                                                         
 
 +                 c o n s t   p a r t i a l   =   s t r e a m C o n t e n t A c c R e f . c u r r e n t ; 
 
 +                 d e v L o g . l o g A b o r t ( p a r t i a l ) ; 
 
 +                 i f   ( p a r t i a l . t r i m ( ) )   { 
 
 +                     c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( p a r t i a l ) ; 
 
 +                     c o n s t   f i n a l P a r t i a l   =   s a n i t i z e M e s s a g e T e x t ( p a r s e d . c o n t e n t ) . t e x t . t r i m ( ) ; 
 
 +                     d e v L o g . l o g S a n i t i z a t i o n ( " a b o r t : p a r t i a l - v i s i b l e " ,   { 
 
 +                         b e f o r e :   p a r s e d . c o n t e n t , 
 
 +                         a f t e r :   f i n a l P a r t i a l , 
 
 +                         c h a n g e d :   f i n a l P a r t i a l   ! = =   p a r s e d . c o n t e n t , 
 
 +                         r e p a i r e d E n c o d i n g :   s a n i t i z e M e s s a g e T e x t ( p a r s e d . c o n t e n t ) . r e p a i r e d E n c o d i n g , 
 
 +                     } ) ; 
 
 +                     d b . r u n ( 
 
 +                         ` I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t ,   r e a s o n i n g _ c o n t e n t )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ,   ? ) ` , 
 
 +                         [ 
 
 +                             c i d , 
 
 +                             ` $ { f i n a l P a r t i a l }   _ ( g e r a % % o   c a n c e l a d a ) _ ` , 
 
 +                             p a r s e d . r e a s o n i n g   | |   n u l l , 
 
 +                         ] , 
 
 +                     ) ; 
 
 +                     d b . r u n ( " U P D A T E   c h a t s   S E T   u p d a t e d _ a t   =   s t r f t i m e ( ' % s ' , ' n o w ' )   W H E R E   i d   =   ? " ,   [ c i d ] ) ; 
 
 +                     o n C h a t U p d a t e d ( ) ; 
 
 +                 } 
 
 +             }   e l s e   i f   ( e r r   i n s t a n c e o f   E r r o r )   { 
 
 +                 d e v L o g . l o g E r r o r ( " s e n d " ,   e r r ) ; 
 
                   d b . r u n ( " I N S E R T   I N T O   m e s s a g e s   ( c h a t _ i d ,   r o l e ,   c o n t e n t )   V A L U E S   ( ? ,   ' a s s i s t a n t ' ,   ? ) " ,   [ 
 
                       c i d , 
 
                       `         E r r o r :   $ { e r r . m e s s a g e } ` , 
 
 @ @   - 2 7 8 , 1 5   + 6 4 7 , 2 0   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
                   o n C h a t U p d a t e d ( ) ; 
 
               } 
 
           }   f i n a l l y   { 
 
 -             s e t G e n e r a t i n g ( f a l s e ) ; 
 
 +             d e v L o g . f i n i s h I n t e r a c t i o n ( ) ; 
 
 +             s e t G e n e r a t i n g ( f a l s e ) ;   o n G e n e r a t i n g C h a n g e ? . ( f a l s e ) ; 
 
               s e t S t r e a m C o n t e n t ( " " ) ; 
 
               s e t S t r e a m R e a s o n i n g ( " " ) ; 
 
               s e t S t r e a m T h i n k i n g O p e n ( f a l s e ) ; 
 
 -             s e t S h o w L i v e R e a s o n i n g ( f a l s e ) ; 
 
               s e t S t r e a m T o k e n C o u n t ( 0 ) ; 
 
 +             s t r e a m C o n t e n t A c c R e f . c u r r e n t   =   " " ; 
 
   
 
               i f   ( a c t i v e C h a t I d R e f . c u r r e n t   = = =   c i d )   { 
 
 -                 l o a d M e s s a g e s R e f . c u r r e n t ( c i d ) ; 
 
 +                 c o n s t   o p t i m i s t i c A s s i s t a n t   =   o p t i m i s t i c A s s i s t a n t R e f . c u r r e n t ; 
 
 +                 c o n s t   h a s P e n d i n g O p t i m i s t i c A s s i s t a n t   =   o p t i m i s t i c A s s i s t a n t ? . c h a t _ i d   = = =   c i d ; 
 
 +                 i f   ( ! h a s P e n d i n g O p t i m i s t i c A s s i s t a n t )   { 
 
 +                     l o a d M e s s a g e s R e f . c u r r e n t ( c i d ) ; 
 
 +                 } 
 
               } 
 
               p e n d i n g R e q u e s t C h a t I d R e f . c u r r e n t   =   n u l l ; 
 
               a b o r t R e f . c u r r e n t   =   n u l l ; 
 
 @ @   - 2 9 8 , 7   + 6 7 2 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
                   s e t T i m e o u t ( ( )   = >   s e n d R e f . c u r r e n t ( n e x t I n Q u e u e ) ,   1 0 0 ) ; 
 
               } 
 
           } 
 
 -     } ,   [ g e n e r a t i n g ,   m o d e l ,   s e r v e r ,   a p i K e y ,   u s e S t r e a m ,   d b ,   g e t O r C r e a t e C h a t ,   e n s u r e C h a t T i t l e ,   b u i l d A p i M e s s a g e s ,   o n C h a t U p d a t e d ] ) ; 
 
 +     } ,   [ g e n e r a t i n g ,   m o d e l ,   s e r v e r ,   a p i K e y ,   u s e S t r e a m ,   d b ,   g e t O r C r e a t e C h a t ,   e n s u r e C h a t T i t l e ,   b u i l d A p i M e s s a g e s ,   o n C h a t U p d a t e d ,   a g e n t i c M o d e ,   a p p e n d P e r s i s t e d A s s i s t a n t M e s s a g e ] ) ; 
 
   
 
       / /   K e e p   s e n d R e f   a l w a y s   p o i n t i n g   t o   l a t e s t   s e n d   c l o s u r e 
 
       s e n d R e f . c u r r e n t   =   s e n d ; 
 
 @ @   - 3 3 5 , 6   + 7 0 9 , 2 8   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
           } ) ; 
 
       } ; 
 
   
 
 +     c o n s t   h a n d l e C o p y D e b u g T r a n s c r i p t   =   u s e C a l l b a c k ( a s y n c   ( )   = >   { 
 
 +         c o n s t   s a v e d M e m o r i e s   =   d b . q u e r y < U s e r M e m o r y > ( 
 
 +             " S E L E C T   i d ,   k e y ,   v a l u e ,   c o n f i d e n c e ,   c r e a t e d _ a t ,   u p d a t e d _ a t   F R O M   u s e r _ m e m o r i e s   O R D E R   B Y   u p d a t e d _ a t   D E S C   L I M I T   2 0 " , 
 
 +         ) ; 
 
 +         c o n s t   l a t e s t I n t e r a c t i o n   =   d e v L o g . g e t L a t e s t I n t e r a c t i o n ( c h a t I d ) ; 
 
 +         c o n s t   t r a n s c r i p t   =   f o r m a t C h a t D e b u g T r a n s c r i p t ( { 
 
 +             c h a t I d , 
 
 +             m e s s a g e s , 
 
 +             m o d e l , 
 
 +             s e r v e r , 
 
 +             a p i K e y P r e s e n t :   B o o l e a n ( a p i K e y ) , 
 
 +             m e m o r y E n a b l e d :   u s e M e m o r y , 
 
 +             s t r e a m E n a b l e d :   u s e S t r e a m , 
 
 +             a g e n t i c M o d e , 
 
 +             s a v e d M e m o r i e s , 
 
 +             l a t e s t I n t e r a c t i o n , 
 
 +         } ) ; 
 
 +         a w a i t   n a v i g a t o r . c l i p b o a r d . w r i t e T e x t ( t r a n s c r i p t ) ; 
 
 +         s e t D e b u g C o p i e d ( t r u e ) ; 
 
 +         w i n d o w . s e t T i m e o u t ( ( )   = >   s e t D e b u g C o p i e d ( f a l s e ) ,   2 0 0 0 ) ; 
 
 +     } ,   [ a p i K e y ,   c h a t I d ,   d b ,   m e s s a g e s ,   m o d e l ,   s e r v e r ,   u s e M e m o r y ,   u s e S t r e a m ,   a g e n t i c M o d e ] ) ; 
 
 + 
 
       c o n s t   h a n d l e E d i t A n d R e s e n d   =   ( m s g :   M e s s a g e ,   n e w C o n t e n t :   s t r i n g )   = >   { 
 
           d b . r u n ( " U P D A T E   m e s s a g e s   S E T   c o n t e n t   =   ?   W H E R E   i d   =   ? " ,   [ n e w C o n t e n t ,   m s g . i d ] ) ; 
 
           d b . r u n ( " D E L E T E   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   A N D   i d   >   ? " ,   [ m s g . c h a t _ i d ,   m s g . i d ] ) ; 
 
 @ @   - 3 4 6 , 1 2 0   + 7 4 2 , 9 9   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
           } 
 
       } ; 
 
   
 
 +     / * * 
 
 +       *   R e s e n d :   r e g e n e r a t e   t h e   a s s i s t a n t   r e p l y   f o r   a n   e x i s t i n g   a s s i s t a n t   m e s s a g e . 
 
 +       *   F i n d s   t h e   p r e c e d i n g   u s e r   m e s s a g e   a n d   c a l l s   s e n d ( )   w i t h   r e p l a c e A s s i s t a n t I d 
 
 +       *   s o   t h e   o l d   a s s i s t a n t   r o w   i s   r e p l a c e d        n o   d u p l i c a t e   u s e r   m e s s a g e   i s   i n s e r t e d . 
 
 +       * / 
 
 +     c o n s t   h a n d l e R e s e n d   =   u s e C a l l b a c k ( ( a s s i s t a n t M s g :   M e s s a g e )   = >   { 
 
 +         i f   ( g e n e r a t i n g )   r e t u r n ; 
 
 +         / /   F i n d   t h e   u s e r   m e s s a g e   i m m e d i a t e l y   b e f o r e   t h i s   a s s i s t a n t   m e s s a g e 
 
 +         c o n s t   u s e r M s g   =   d b . g e t < M e s s a g e > ( 
 
 +             ` S E L E C T   *   F R O M   m e s s a g e s 
 
 +               W H E R E   c h a t _ i d   =   ?   A N D   i d   <   ?   A N D   r o l e   =   ' u s e r ' 
 
 +               O R D E R   B Y   i d   D E S C   L I M I T   1 ` , 
 
 +             [ a s s i s t a n t M s g . c h a t _ i d ,   a s s i s t a n t M s g . i d ] , 
 
 +         ) ; 
 
 +         i f   ( ! u s e r M s g )   r e t u r n ; 
 
 + 
 
 +         / /   D e l e t e   a n y   m e s s a g e s   a f t e r   t h e   u s e r   m e s s a g e   u p   t o   a n d   i n c l u d i n g   t h i s   a s s i s t a n t   m s g 
 
 +         d b . r u n ( 
 
 +             " D E L E T E   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   A N D   i d   > =   ?   A N D   i d   < =   ? " , 
 
 +             [ a s s i s t a n t M s g . c h a t _ i d ,   u s e r M s g . i d   +   1 ,   a s s i s t a n t M s g . i d ] , 
 
 +         ) ; 
 
 +         l o a d M e s s a g e s ( ) ; 
 
 +         s e n d ( u s e r M s g . c o n t e n t ,   a s s i s t a n t M s g . c h a t _ i d ,   a s s i s t a n t M s g . i d ) ; 
 
 +     } ,   [ g e n e r a t i n g ,   d b ,   s e n d ,   l o a d M e s s a g e s ] ) ; 
 
 + 
 
       c o n s t   h a n d l e E d i t A s s i s t a n t   =   ( i d :   n u m b e r ,   n e w C o n t e n t :   s t r i n g )   = >   { 
 
           d b . r u n ( " U P D A T E   m e s s a g e s   S E T   c o n t e n t   =   ?   W H E R E   i d   =   ? " ,   [ n e w C o n t e n t ,   i d ] ) ; 
 
           l o a d M e s s a g e s ( ) ; 
 
       } ; 
 
   
 
 -     c o n s t   m e m o r y M e s s a g e s   =   s h o w M e m o r y M o d a l   & &   c h a t I d   ! =   n u l l   ?   b u i l d A p i M e s s a g e s ( c h a t I d )   :   [ ] ; 
 
 - 
 
 -     c o n s t   m o d e l S h o r t   =   m o d e l . l e n g t h   >   3 0   ?   m o d e l . s l i c e ( 0 ,   2 8 )   +   "    "   :   m o d e l ; 
 
 +     c o n s t   m e m o r y M e s s a g e s   =   s h o w M e m o r y M o d a l 
 
 +         ?   d b . q u e r y < U s e r M e m o r y > ( " S E L E C T   i d ,   k e y ,   v a l u e ,   c o n f i d e n c e ,   c r e a t e d _ a t ,   u p d a t e d _ a t   F R O M   u s e r _ m e m o r i e s   O R D E R   B Y   u p d a t e d _ a t   D E S C " ) 
 
 +         :   [ ] ; 
 
   
 
 -     r e t u r n   ( 
 
 -         < d i v   c l a s s N a m e = " c h a t - v i e w " > 
 
 -             { / *           T o p   b a r           * / } 
 
 -             < d i v   c l a s s N a m e = " c h a t - t o p b a r " > 
 
 -                 < d i v   c l a s s N a m e = " c h a t - t o p b a r - l e f t " > 
 
 -                     { o n O p e n S i d e b a r   & &   ( 
 
 -                         < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " c h a t - m e n u - b t n "   o n C l i c k = { o n O p e n S i d e b a r }   a r i a - l a b e l = " O p e n   n a v i g a t i o n " > 
 
 -                               %
 
 -                         < / b u t t o n > 
 
 -                     ) } 
 
 -                     { m o d e l   & &   ( 
 
 -                         < d i v   c l a s s N a m e = " t o p b a r - m o d e l - b a d g e " > 
 
 -                             < d i v   c l a s s N a m e = { ` t o p b a r - s t a t u s - d o t $ { s e r v e r   ?   "   c o n n e c t e d "   :   " " } ` }   / > 
 
 -                             < s p a n   c l a s s N a m e = " t o p b a r - m o d e l - n a m e " > { m o d e l S h o r t } < / s p a n > 
 
 -                         < / d i v > 
 
 -                     ) } 
 
 -                 < / d i v > 
 
 +     c o n s t   h a n d l e C l e a r M e m o r i e s   =   ( )   = >   { 
 
 +         i f   ( ! w i n d o w . c o n f i r m ( " C l e a r   a l l   s a v e d   m e m o r i e s ? " ) )   r e t u r n ; 
 
 +         d b . r u n ( " D E L E T E   F R O M   u s e r _ m e m o r i e s " ) ; 
 
 +         s e t S h o w M e m o r y M o d a l ( f a l s e ) ; 
 
 +     } ; 
 
   
 
 -                 < d i v   c l a s s N a m e = " c h a t - t o p b a r - c e n t e r " > 
 
 -                     { c h a t I d   ! = =   n u l l   & &   c h a t T o t a l s . t o t a l _ t o k e n s   >   0   & &   ( 
 
 -                         < d i v   c l a s s N a m e = " c h a t - t o k e n - s u m m a r y " > 
 
 -                             < s p a n   t i t l e = " P r o m p t   t o k e n s   s e n t " >      { c h a t T o t a l s . p r o m p t _ t o k e n s . t o L o c a l e S t r i n g ( ) } < / s p a n > 
 
 -                             < s p a n   t i t l e = " C o m p l e t i o n   t o k e n s   g e n e r a t e d " >      { c h a t T o t a l s . c o m p l e t i o n _ t o k e n s . t o L o c a l e S t r i n g ( ) } < / s p a n > 
 
 -                             < s p a n   t i t l e = " T o t a l   t o k e n s "   c l a s s N a m e = " t o k e n - t o t a l " > l%   { c h a t T o t a l s . t o t a l _ t o k e n s . t o L o c a l e S t r i n g ( ) } < / s p a n > 
 
 -                         < / d i v > 
 
 -                     ) } 
 
 -                 < / d i v > 
 
 - 
 
 -                 < d i v   c l a s s N a m e = " c h a t - t o p b a r - r i g h t " > 
 
 -                     { g e n e r a t i n g   & &   s t r e a m T o k e n C o u n t   >   0   & &   ( 
 
 -                         < d i v   c l a s s N a m e = " l i v e - t o k e n - c o u n t e r " > 
 
 -                             < s p a n   c l a s s N a m e = " l i v e - t o k e n - p u l s e "   / > 
 
 -                             < s p a n > { s t r e a m T o k e n C o u n t . t o L o c a l e S t r i n g ( ) }   t o k e n s < / s p a n > 
 
 -                         < / d i v > 
 
 -                     ) } 
 
 -                     { t p s   ! = =   n u l l   & &   ! g e n e r a t i n g   & &   ( 
 
 -                         < s p a n   c l a s s N a m e = " t p s - b a d g e " > { t p s . t o F i x e d ( 1 ) }   t o k / s < / s p a n > 
 
 -                     ) } 
 
 - 
 
 -                     < b u t t o n 
 
 -                         t y p e = " b u t t o n " 
 
 -                         c l a s s N a m e = { ` t o p b a r - i c o n - b t n $ { s h o w M e m o r y M o d a l   ?   "   a c t i v e "   :   " " } ` } 
 
 -                         o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( ! s h o w M e m o r y M o d a l ) } 
 
 -                         t i t l e = { ` M e m o r y   c o n t e x t        $ { m e m o r y M e s s a g e C o u n t }   m e s s a g e $ { m e m o r y M e s s a g e C o u n t   ! = =   1   ?   " s "   :   " " } ` } 
 
 -                         a r i a - l a b e l = " V i e w   m e m o r y   c o n t e x t " 
 
 -                     > 
 
 -                         < s v g   w i d t h = " 1 4 "   h e i g h t = " 1 4 "   v i e w B o x = " 0   0   2 4   2 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d " > 
 
 -                             < e l l i p s e   c x = " 1 2 "   c y = " 5 "   r x = " 9 "   r y = " 3 " / > 
 
 -                             < p a t h   d = " M 3   5 v 1 4 c 0   1 . 6 6   4   3   9   3 s 9 - 1 . 3 4   9 - 3 V 5 " / > 
 
 -                             < p a t h   d = " M 3   1 2 c 0   1 . 6 6   4   3   9   3 s 9 - 1 . 3 4   9 - 3 " / > 
 
 -                         < / s v g > 
 
 -                         { m e m o r y M e s s a g e C o u n t   >   0   & &   ( 
 
 -                             < s p a n   c l a s s N a m e = " m e m o r y - c o u n t - b a d g e " > { m e m o r y M e s s a g e C o u n t } < / s p a n > 
 
 -                         ) } 
 
 -                     < / b u t t o n > 
 
 - 
 
 -                     < d i v   c l a s s N a m e = " t o p b a r - t o g g l e s " > 
 
 -                         < b u t t o n 
 
 -                             t y p e = " b u t t o n " 
 
 -                             c l a s s N a m e = { ` t o g g l e - p i l l $ { u s e S t r e a m   ?   "   o n "   :   "   o f f " } ` } 
 
 -                             o n C l i c k = { ( )   = >   s e t U s e S t r e a m ( ! u s e S t r e a m ) } 
 
 -                             t i t l e = { u s e S t r e a m   ?   " S t r e a m i n g   e n a b l e d "   :   " S t r e a m i n g   d i s a b l e d " } 
 
 -                         > 
 
 -                             S t r e a m 
 
 -                         < / b u t t o n > 
 
 -                         < b u t t o n 
 
 -                             t y p e = " b u t t o n " 
 
 -                             c l a s s N a m e = { ` t o g g l e - p i l l $ { u s e M e m o r y   ?   "   o n "   :   "   o f f " } ` } 
 
 -                             o n C l i c k = { ( )   = >   s e t U s e M e m o r y ( ! u s e M e m o r y ) } 
 
 -                             t i t l e = { u s e M e m o r y   ?   ` M e m o r y :   l a s t   $ { M A X _ M E M O R Y }   m e s s a g e s `   :   " M e m o r y   o f f        s i n g l e   t u r n " } 
 
 -                         > 
 
 -                             M e m o r y 
 
 -                         < / b u t t o n > 
 
 -                     < / d i v > 
 
 -                 < / d i v > 
 
 -             < / d i v > 
 
 +     c o n s t   i s I n i t i a l S c r e e n   =   c h a t I d   = = =   n u l l   & &   m e s s a g e s . l e n g t h   = = =   0 ; 
 
 +     c o n s t   q u i c k A c t i o n C h i p s   =   [ " C r e a t e   s l i d e s " ,   " B u i l d   w e b s i t e " ,   " D e v e l o p   d e s k t o p   a p p s " ,   " D e s i g n " ,   " M o r e " ] ; 
 
   
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = { ` c h a t - v i e w $ { i s I n i t i a l S c r e e n   ?   "   i n i t i a l - s c r e e n "   :   " " } ` } > 
 
               { / *           M e m o r y   M o d a l           * / } 
 
               { s h o w M e m o r y M o d a l   & &   ( 
 
 -                 < d i v   c l a s s N a m e = " m e m o r y - m o d a l - o v e r l a y "   o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( f a l s e ) } > 
 
 -                     < d i v   c l a s s N a m e = " m e m o r y - m o d a l "   o n C l i c k = { ( e )   = >   e . s t o p P r o p a g a t i o n ( ) } > 
 
 -                         < d i v   c l a s s N a m e = " m e m o r y - m o d a l - h e a d e r " > 
 
 -                             < d i v   c l a s s N a m e = " m e m o r y - m o d a l - t i t l e " > 
 
 -                                 < s v g   w i d t h = " 1 4 "   h e i g h t = " 1 4 "   v i e w B o x = " 0   0   2 4   2 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d " > 
 
 -                                     < e l l i p s e   c x = " 1 2 "   c y = " 5 "   r x = " 9 "   r y = " 3 " / > 
 
 -                                     < p a t h   d = " M 3   5 v 1 4 c 0   1 . 6 6   4   3   9   3 s 9 - 1 . 3 4   9 - 3 V 5 " / > 
 
 -                                     < p a t h   d = " M 3   1 2 c 0   1 . 6 6   4   3   9   3 s 9 - 1 . 3 4   9 - 3 " / > 
 
 -                                 < / s v g > 
 
 -                                 < s p a n > M e m o r y   C o n t e x t < / s p a n > 
 
 +                 < d i v   c l a s s N a m e = " f i x e d   i n s e t - 0   z - [ 1 2 0 ]   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   b g - b l a c k / 5 5   b a c k d r o p - b l u r - s m   p x - 4 "   o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( f a l s e ) } > 
 
 +                     < d i v   c l a s s N a m e = " w - f u l l   m a x - w - 2 x l   m a x - h - [ 7 8 v h ]   o v e r f l o w - h i d d e n   r o u n d e d - 2 x l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - [ # 1 b 1 b 1 f ]   s h a d o w - 2 x l "   o n C l i c k = { ( e )   = >   e . s t o p P r o p a g a t i o n ( ) } > 
 
 +                         < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   g a p - 3   p x - 5   p y - 4   b o r d e r - b   b o r d e r - w h i t e / 8 " > 
 
 +                             < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2   t e x t - w h i t e / 9 2   t e x t - s m   f o n t - s e m i b o l d " > 
 
 +                                     < D a t a b a s e   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   c l a s s N a m e = " t e x t - b l u e - 3 0 0 "   / > 
 
 +                                     < s p a n > S a v e d   m e m o r i e s < / s p a n > 
 
 +                                 < / d i v > 
 
 +                                 < p   c l a s s N a m e = " m t - 1   t e x t - [ 1 2 p x ]   t e x t - w h i t e / 4 2 " > { m e m o r y M e s s a g e s . l e n g t h }   m e m %%r i a s   s a l v a s   n o   m o d e l o < / p > 
 
 +                             < / d i v > 
 
 +                             < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                                 < b u t t o n 
 
 +                                     t y p e = " b u t t o n " 
 
 +                                     o n C l i c k = { h a n d l e C l e a r M e m o r i e s } 
 
 +                                     c l a s s N a m e = " p x - 3   p y - 1 . 5   r o u n d e d - l g   b o r d e r   b o r d e r - r e d - 4 0 0 / 1 8   b g - r e d - 5 0 0 / 8   t e x t - [ 1 2 p x ]   f o n t - m e d i u m   t e x t - r e d - 3 0 0   h o v e r : b g - r e d - 5 0 0 / 1 4   t r a n s i t i o n - c o l o r s " 
 
 +                                 > 
 
 +                                     L i m p a r   m e m %%r i a s 
 
 +                                 < / b u t t o n > 
 
 +                                 < b u t t o n 
 
 +                                     t y p e = " b u t t o n " 
 
 +                                     o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( f a l s e ) } 
 
 +                                     c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - l g   t e x t - w h i t e / 4 0   h o v e r : t e x t - w h i t e / 8 5   h o v e r : b g - w h i t e / 8   t r a n s i t i o n - c o l o r s " 
 
 +                                     a r i a - l a b e l = " F e c h a r   m e m %%r i a s " 
 
 +                                 > 
 
 +                                        
 
 +                                 < / b u t t o n > 
 
                               < / d i v > 
 
 -                             < s p a n   c l a s s N a m e = " m e m o r y - m o d a l - s u b t i t l e " > 
 
 -                                 { m e m o r y M e s s a g e s . l e n g t h }   m e s s a g e { m e m o r y M e s s a g e s . l e n g t h   ! = =   1   ?   " s "   :   " " }   ,%   { u s e M e m o r y   ?   ` l a s t   $ { M A X _ M E M O R Y } `   :   " s i n g l e   t u r n " }   m o d e 
 
 -                             < / s p a n > 
 
 -                             < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " m e m o r y - m o d a l - c l o s e "   o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( f a l s e ) } >    < / b u t t o n > 
 
                           < / d i v > 
 
 -                         < d i v   c l a s s N a m e = " m e m o r y - m o d a l - b o d y " > 
 
 + 
 
 +                         < d i v   c l a s s N a m e = " o v e r f l o w - y - a u t o   m a x - h - [ c a l c ( 7 8 v h - 7 2 p x ) ]   p - 3   s p a c e - y - 2 " > 
 
                               { m e m o r y M e s s a g e s . l e n g t h   = = =   0   ?   ( 
 
 -                                 < d i v   c l a s s N a m e = " m e m o r y - e m p t y " > N o   m e s s a g e s   i n   c o n t e x t   y e t .   S t a r t   a   c o n v e r s a t i o n   t o   p o p u l a t e   m e m o r y . < / d i v > 
 
 +                                 < d i v   c l a s s N a m e = " r o u n d e d - x l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 3 ]   p x - 4   p y - 8   t e x t - c e n t e r   t e x t - [ 1 3 p x ]   t e x t - w h i t e / 4 2 " > 
 
 +                                     N e n h u m a   m e m %%r i a   s a l v a   a i n d a . 
 
 +                                 < / d i v > 
 
                               )   :   ( 
 
 -                                 m e m o r y M e s s a g e s . m a p ( ( m s g ,   i )   = >   ( 
 
 -                                     < d i v   k e y = { i }   c l a s s N a m e = { ` m e m o r y - i t e m   $ { m s g . r o l e } ` } > 
 
 -                                         < s p a n   c l a s s N a m e = " m e m o r y - i t e m - r o l e " > { m s g . r o l e } < / s p a n > 
 
 -                                         < s p a n   c l a s s N a m e = " m e m o r y - i t e m - c o n t e n t " > 
 
 -                                             { m s g . c o n t e n t . l e n g t h   >   2 4 0   ?   m s g . c o n t e n t . s l i c e ( 0 ,   2 3 8 )   +   "    "   :   m s g . c o n t e n t } 
 
 -                                         < / s p a n > 
 
 +                                 m e m o r y M e s s a g e s . m a p ( ( m e m o r y )   = >   ( 
 
 +                                     < d i v   k e y = { m e m o r y . i d }   c l a s s N a m e = " r o u n d e d - x l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 3 ]   p x - 4   p y - 3 " > 
 
 +                                         < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   j u s t i f y - b e t w e e n   g a p - 3   m b - 1 . 5 " > 
 
 +                                             < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                                                 < p   c l a s s N a m e = " t e x t - [ 1 2 p x ]   u p p e r c a s e   t r a c k i n g - [ 0 . 1 2 e m ]   t e x t - w h i t e / 3 0 " > { m e m o r y . k e y } < / p > 
 
 +                                                 < p   c l a s s N a m e = " m t - 1   t e x t - [ 1 3 p x ]   t e x t - w h i t e / 8 2   l e a d i n g - r e l a x e d   b r e a k - w o r d s " > { m e m o r y . v a l u e } < / p > 
 
 +                                             < / d i v > 
 
 +                                             < s p a n   c l a s s N a m e = " f l e x - s h r i n k - 0   p x - 2   p y - 1   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 4 ]   t e x t - [ 1 0 . 5 p x ]   t e x t - w h i t e / 4 5   t a b u l a r - n u m s " > 
 
 +                                                 { ( m e m o r y . c o n f i d e n c e   *   1 0 0 ) . t o F i x e d ( 0 ) } % 
 
 +                                             < / s p a n > 
 
 +                                         < / d i v > 
 
                                       < / d i v > 
 
                                   ) ) 
 
                               ) } 
 
 @ @   - 4 7 2 , 3 8   + 8 4 7 , 1 4 8   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
               < d i v   c l a s s N a m e = " c h a t - l a y o u t - r o o t " > 
 
                   { / *   S c r o l l a b l e   m e s s a g e   a r e a   * / } 
 
                   < d i v   c l a s s N a m e = " c h a t - s c r o l l - a r e a " > 
 
 -                     < d i v   c l a s s N a m e = " m e s s a g e s - c o n t a i n e r " > 
 
 +                     < d i v   c l a s s N a m e = { ` m e s s a g e s - c o n t a i n e r $ { i s I n i t i a l S c r e e n   ?   "   m e s s a g e s - c o n t a i n e r - - h e r o "   :   " " } ` } > 
 
                           { c h a t I d   = = =   n u l l   & &   m e s s a g e s . l e n g t h   = = =   0   & &   ( 
 
 -                             < d i v   c l a s s N a m e = " e m p t y - s t a t e " > 
 
 -                                 < d i v   c l a s s N a m e = " e m p t y - s t a t e - p a n e l " > 
 
 -                                     < d i v   c l a s s N a m e = " e m p t y - i c o n " >    < / d i v > 
 
 -                                     < s p a n   c l a s s N a m e = " e m p t y - k i c k e r " > L o c a l - f i r s t   A I   w o r k s p a c e < / s p a n > 
 
 -                                     < h 2 > S t a r t   w i t h   a   p r o m p t   t h a t   m o v e s   t h e   p r o j e c t   f o r w a r d . < / h 2 > 
 
 -                                     < p > 
 
 -                                         F o r g e L M   k e e p s   y o u r   c h a t s ,   c o d e   b l o c k s ,   a n d   r u n t i m e   c o n t r o l s   i n   o n e   p l a c e   s o   y o u   c a n   i n s p e c t , 
 
 -                                         i t e r a t e ,   a n d   d e b u g   w i t h o u t   l o s i n g   c o n t e x t . 
 
 -                                     < / p > 
 
 -                                     < d i v   c l a s s N a m e = " e m p t y - s t a t e - a c t i o n s " > 
 
 -                                         { s t a r t e r P r o m p t s . m a p ( ( p r o m p t )   = >   ( 
 
 -                                             < b u t t o n   k e y = { p r o m p t }   t y p e = " b u t t o n "   c l a s s N a m e = " s t a r t e r - c h i p "   o n C l i c k = { ( )   = >   h a n d l e S t a r t e r P r o m p t ( p r o m p t ) } > 
 
 -                                                 { p r o m p t } 
 
 -                                             < / b u t t o n > 
 
 -                                         ) ) } 
 
 +                             < d i v   c l a s s N a m e = " m x - a u t o   f l e x   w - f u l l   m a x - w - 4 x l   f l e x - c o l   i t e m s - c e n t e r   p x - 4   p b - 1 2   p t - 1 0   s m : p x - 6   s m : p t - 1 6 " > 
 
 +                                 < s e c t i o n   c l a s s N a m e = " f l e x   w - f u l l   f l e x - c o l   i t e m s - c e n t e r "   a r i a - l a b e l l e d b y = " w o r k s p a c e - w e l c o m e " > 
 
 +                                     < d i v   c l a s s N a m e = " m b - 5   i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 2   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ]   p x - 4   p y - 2   t e x t - [ 1 2 p x ]   t e x t - w h i t e / 5 5   b a c k d r o p - b l u r - s m " > 
 
 +                                         < s p a n > L o c a l - f i r s t   w o r k s p a c e < / s p a n > 
 
 +                                         < s p a n   c l a s s N a m e = " t e x t - w h i t e / 1 5 " > | < / s p a n > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " f o n t - m e d i u m   t e x t - s k y - 3 0 0   t r a n s i t i o n   h o v e r : t e x t - s k y - 2 0 0 "   o n C l i c k = { o n O p e n S e t t i n g s } > 
 
 +                                             R u n t i m e   s e t t i n g s 
 
 +                                         < / b u t t o n > 
 
                                       < / d i v > 
 
 -                                     { c o m p o s e r N o t i c e   & &   ( 
 
 -                                         < d i v   c l a s s N a m e = { ` c o m p o s e r - n o t i c e   $ { c o m p o s e r N o t i c e . t o n e } ` } > 
 
 -                                             < d i v > 
 
 -                                                 < s t r o n g > { c o m p o s e r N o t i c e . t i t l e } < / s t r o n g > 
 
 -                                                 < p > { c o m p o s e r N o t i c e . d e s c r i p t i o n } < / p > 
 
 -                                             < / d i v > 
 
 -                                             { o n O p e n S i d e b a r   & &   ( 
 
 -                                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " n o t i c e - a c t i o n - b t n "   o n C l i c k = { o n O p e n S i d e b a r } > 
 
 + 
 
 +                                     < d i v   c l a s s N a m e = " m b - 8   t e x t - c e n t e r " > 
 
 +                                         < h 1   i d = " w o r k s p a c e - w e l c o m e "   c l a s s N a m e = " m - 0   t e x t - [ c l a m p ( 2 . 3 5 r e m , 5 v w , 4 . 2 5 r e m ) ]   f o n t - s e m i b o l d   l e a d i n g - [ 0 . 9 5 ]   t r a c k i n g - [ - 0 . 0 4 5 e m ]   t e x t - w h i t e " > 
 
 +                                             W h a t   c a n   I   d o   f o r   y o u ? 
 
 +                                         < / h 1 > 
 
 +                                         < p   c l a s s N a m e = " m x - a u t o   m t - 4   m a x - w - 2 x l   t e x t - [ 1 5 p x ]   l e a d i n g - 7   t e x t - w h i t e / 3 8   s m : t e x t - [ 1 7 p x ] " > 
 
 +                                             Y o u r   l o c a l   A I ,   r u n n i n g   o n   y o u r   m a c h i n e 
 
 +                                         < / p > 
 
 +                                     < / d i v > 
 
 + 
 
 +                                     < d i v   c l a s s N a m e = " w - f u l l   m a x - w - [ 7 8 0 p x ] " > 
 
 +                                         { c o m p o s e r N o t i c e   & &   ( 
 
 +                                             < d i v   c l a s s N a m e = " m b - 3   f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   g a p - 3   r o u n d e d - 2 x l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ]   p x - 4   p y - 3   b a c k d r o p - b l u r - s m " > 
 
 +                                                 < d i v > 
 
 +                                                     < s t r o n g   c l a s s N a m e = " b l o c k   t e x t - [ 1 3 p x ]   t e x t - w h i t e / 8 8 " > { c o m p o s e r N o t i c e . t i t l e } < / s t r o n g > 
 
 +                                                     < p   c l a s s N a m e = " m - 0   m t - 1   t e x t - [ 1 2 p x ]   l e a d i n g - r e l a x e d   t e x t - w h i t e / 5 0 " > { c o m p o s e r N o t i c e . d e s c r i p t i o n } < / p > 
 
 +                                                 < / d i v > 
 
 +                                                 < b u t t o n 
 
 +                                                     t y p e = " b u t t o n " 
 
 +                                                     c l a s s N a m e = " r o u n d e d - x l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 5 ]   p x - 3   p y - 2   t e x t - [ 1 2 p x ]   f o n t - m e d i u m   t e x t - w h i t e / 8 0   t r a n s i t i o n   h o v e r : b g - w h i t e / [ 0 . 0 8 ] " 
 
 +                                                     o n C l i c k = { ( )   = >   { 
 
 +                                                         i f   ( c o m p o s e r N o t i c e . a c t i o n L a b e l   = = =   " O p e n   s e t t i n g s " )   { 
 
 +                                                             o n O p e n S e t t i n g s ? . ( ) ; 
 
 +                                                         }   e l s e   { 
 
 +                                                             o n O p e n S i d e b a r ? . ( ) ; 
 
 +                                                         } 
 
 +                                                     } } 
 
 +                                                 > 
 
                                                       { c o m p o s e r N o t i c e . a c t i o n L a b e l } 
 
                                                   < / b u t t o n > 
 
 -                                             ) } 
 
 +                                             < / d i v > 
 
 +                                         ) } 
 
 + 
 
 +                                         < d i v   c l a s s N a m e = " r o u n d e d - [ 2 8 p x ]   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 5 ]   p - 3   s h a d o w - [ 0 _ 0 _ 0 _ 1 p x _ r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 1 5 ) ]   b a c k d r o p - b l u r - x l   s m : p - 4 " > 
 
 +                                             < d i v   c l a s s N a m e = " r o u n d e d - [ 2 2 p x ]   b o r d e r   b o r d e r - w h i t e / [ 0 . 0 6 ]   b g - w h i t e / [ 0 . 0 3 ]   p x - 4   p b - 3   p t - 4   s m : p x - 5   s m : p t - 5 " > 
 
 +                                                 < t e x t a r e a 
 
 +                                                     r e f = { t e x t a r e a R e f } 
 
 +                                                     v a l u e = { i n p u t } 
 
 +                                                     o n C h a n g e = { ( e )   = >   {   s e t I n p u t ( e . t a r g e t . v a l u e ) ;   a u t o R e s i z e ( ) ;   } } 
 
 +                                                     o n K e y D o w n = { ( e )   = >   { 
 
 +                                                         i f   ( e . k e y   = = =   " E n t e r "   & &   ! e . s h i f t K e y )   {   e . p r e v e n t D e f a u l t ( ) ;   h a n d l e S e n d ( ) ;   } 
 
 +                                                     } } 
 
 +                                                     p l a c e h o l d e r = { 
 
 +                                                         c o m p o s e r N o t i c e 
 
 +                                                             ?   ` $ { c o m p o s e r N o t i c e . t i t l e } .   $ { c o m p o s e r N o t i c e . d e s c r i p t i o n } ` 
 
 +                                                             :   g e n e r a t i n g 
 
 +                                                                 ?   " T y p e   t o   q u e u e   n e x t   m e s s a g e    " 
 
 +                                                                 :   " A s s i g n   a   t a s k   o r   a s k   a n y t h i n g " 
 
 +                                                     } 
 
 +                                                     r o w s = { 1 } 
 
 +                                                     d i s a b l e d = { B o o l e a n ( c o m p o s e r N o t i c e ) } 
 
 +                                                     c l a s s N a m e = " m i n - h - [ 1 2 0 p x ]   w - f u l l   r e s i z e - n o n e   b o r d e r - 0   b g - t r a n s p a r e n t   p - 0   t e x t - [ 1 5 p x ]   l e a d i n g - 7   t e x t - w h i t e / 9 2   o u t l i n e - n o n e   p l a c e h o l d e r : t e x t - w h i t e / 2 0   s m : m i n - h - [ 1 1 2 p x ] " 
 
 +                                                 / > 
 
 + 
 
 +                                                 < d i v   c l a s s N a m e = " m t - 4   f l e x   f l e x - w r a p   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   g a p - 3   b o r d e r - t   b o r d e r - w h i t e / [ 0 . 0 6 ]   p t - 3 " > 
 
 +                                                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2   t e x t - w h i t e / 3 8 " > 
 
 +                                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " f l e x   h - 9   w - 9   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 3 ]   t r a n s i t i o n   h o v e r : b o r d e r - w h i t e / 2 0   h o v e r : b g - w h i t e / [ 0 . 0 6 ]   h o v e r : t e x t - w h i t e / 7 0 "   o n C l i c k = { o n N e w C h a t   ? ?   ( ( )   = >   { } ) } > 
 
 +                                                             < P l u s   s i z e = { 1 6 }   w e i g h t = " b o l d "   / > 
 
 +                                                         < / b u t t o n > 
 
 +                                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " A t t a c h   i m a g e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " f l e x   h - 9   w - 9   c u r s o r - n o t - a l l o w e d   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 2 ]   t e x t - w h i t e / 2 0 " > 
 
 +                                                             < I m a g e   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > 
 
 +                                                         < / b u t t o n > 
 
 +                                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " A t t a c h   f i l e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " f l e x   h - 9   w - 9   c u r s o r - n o t - a l l o w e d   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 2 ]   t e x t - w h i t e / 2 0 " > 
 
 +                                                             < P a p e r c l i p   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > 
 
 +                                                         < / b u t t o n > 
 
 +                                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " V o i c e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " f l e x   h - 9   w - 9   c u r s o r - n o t - a l l o w e d   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 8   b g - w h i t e / [ 0 . 0 2 ]   t e x t - w h i t e / 2 0 " > 
 
 +                                                             < M i c r o p h o n e   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > 
 
 +                                                         < / b u t t o n > 
 
 +                                                     < / d i v > 
 
 + 
 
 +                                                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 4   s e l f - e n d   s m : s e l f - a u t o " > 
 
 +                                                         < A g e n t i c T o g g l e   i s A c t i v e = { a g e n t i c M o d e }   o n T o g g l e = { ( )   = >   s e t A g e n t i c M o d e ( ( v a l u e )   = >   ! v a l u e ) }   d i s a b l e d = { B o o l e a n ( c o m p o s e r N o t i c e ) }   / > 
 
 +                                                         { g e n e r a t i n g   ?   ( 
 
 +                                                             < b u t t o n   c l a s s N a m e = " i n l i n e - f l e x   h - 1 0   i t e m s - c e n t e r   r o u n d e d - 2 x l   b o r d e r   b o r d e r - w h i t e / 1 2   b g - w h i t e / [ 0 . 0 5 ]   p x - 4   t e x t - [ 1 3 p x ]   f o n t - m e d i u m   t e x t - w h i t e / 8 0   t r a n s i t i o n   h o v e r : b g - w h i t e / [ 0 . 0 8 ] "   o n C l i c k = { h a n d l e S t o p }   t y p e = " b u t t o n " > 
 
 +                                                                      S t o p 
 
 +                                                             < / b u t t o n > 
 
 +                                                         )   :   ( 
 
 +                                                             < b u t t o n 
 
 +                                                                 c l a s s N a m e = " i n l i n e - f l e x   h - 1 0   w - 1 0   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b g - w h i t e / [ 0 . 0 8 ]   t e x t - w h i t e / 9 0   t r a n s i t i o n   h o v e r : b g - w h i t e / [ 0 . 1 2 ]   d i s a b l e d : c u r s o r - n o t - a l l o w e d   d i s a b l e d : b g - w h i t e / [ 0 . 0 4 ]   d i s a b l e d : t e x t - w h i t e / 2 5 " 
 
 +                                                                 o n C l i c k = { h a n d l e S e n d } 
 
 +                                                                 d i s a b l e d = { ! i n p u t . t r i m ( )   | |   B o o l e a n ( c o m p o s e r N o t i c e ) } 
 
 +                                                                 t y p e = " b u t t o n " 
 
 +                                                                 a r i a - l a b e l = " S e n d   m e s s a g e " 
 
 +                                                             > 
 
 +                                                                 < P a p e r P l a n e R i g h t   s i z e = { 1 8 }   w e i g h t = " f i l l "   / > 
 
 +                                                             < / b u t t o n > 
 
 +                                                         ) } 
 
 +                                                     < / d i v > 
 
 +                                                 < / d i v > 
 
 +                                             < / d i v > 
 
 + 
 
 +                                             < d i v   c l a s s N a m e = " m t - 3   f l e x   f l e x - w r a p   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   g a p - 3   r o u n d e d - [ 2 0 p x ]   b o r d e r   b o r d e r - w h i t e / [ 0 . 0 6 ]   b g - b l a c k / 1 0   p x - 4   p y - 3   t e x t - [ 1 3 p x ]   t e x t - w h i t e / 5 5 " > 
 
 +                                                 < d i v   c l a s s N a m e = " f l e x   f l e x - w r a p   i t e m s - c e n t e r   g a p - 2   t e x t - w h i t e / 5 8 " > 
 
 +                                                     < L i g h t n i n g   s i z e = { 1 5 }   w e i g h t = " d u o t o n e "   c l a s s N a m e = " t e x t - w h i t e / 4 5 "   / > 
 
 +                                                     < s p a n > C o n n e c t   y o u r   t o o l s   t o   F o r g e L M < / s p a n > 
 
 +                                                     { s h o w D e b u g T o o l s   & &   ( 
 
 +                                                         < b u t t o n 
 
 +                                                             t y p e = " b u t t o n " 
 
 +                                                             o n C l i c k = { ( )   = >   {   v o i d   h a n d l e C o p y D e b u g T r a n s c r i p t ( ) ;   } } 
 
 +                                                             c l a s s N a m e = " m l - 1   i n l i n e - f l e x   i t e m s - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - e m e r a l d - 4 0 0 / 1 8   b g - e m e r a l d - 5 0 0 / 8   p x - 2 . 5   p y - 1   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   t e x t - e m e r a l d - 2 0 0   t r a n s i t i o n   h o v e r : b g - e m e r a l d - 5 0 0 / 1 4 " 
 
 +                                                             a r i a - l a b e l = " C o p y   d e b u g   t r a n s c r i p t " 
 
 +                                                             t i t l e = " C o p y   f u l l   d e b u g   e x p o r t " 
 
 +                                                         > 
 
 +                                                             { d e b u g C o p i e d   ?   " C o p i e d   d e b u g "   :   " C o p y   d e b u g " } 
 
 +                                                         < / b u t t o n > 
 
 +                                                     ) } 
 
 +                                                 < / d i v > 
 
 +                                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 1 . 5   t e x t - w h i t e / 3 8 " > 
 
 +                                                     < s p a n   c l a s s N a m e = " f l e x   h - 7   w - 7   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ] " > < G l o b e   s i z e = { 1 4 }   / > < / s p a n > 
 
 +                                                     < s p a n   c l a s s N a m e = " f l e x   h - 7   w - 7   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ] " > < C o d e   s i z e = { 1 4 }   / > < / s p a n > 
 
 +                                                     < s p a n   c l a s s N a m e = " f l e x   h - 7   w - 7   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ] " > < M o n i t o r   s i z e = { 1 4 }   / > < / s p a n > 
 
 +                                                     < s p a n   c l a s s N a m e = " f l e x   h - 7   w - 7   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ] " > < P a l e t t e   s i z e = { 1 4 }   / > < / s p a n > 
 
 +                                                     < s p a n   c l a s s N a m e = " f l e x   h - 7   w - 7   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 4 ] " > < C h a t C i r c l e T e x t   s i z e = { 1 4 }   / > < / s p a n > 
 
 +                                                 < / d i v > 
 
 +                                             < / d i v > 
 
                                           < / d i v > 
 
 -                                     ) } 
 
 -                                 < / d i v > 
 
 +                                     < / d i v > 
 
 + 
 
 +                                     < d i v   c l a s s N a m e = " m t - 5   f l e x   w - f u l l   m a x - w - [ 7 8 0 p x ]   f l e x - w r a p   i t e m s - c e n t e r   j u s t i f y - c e n t e r   g a p - 3 "   a r i a - l a b e l = " S t a r t e r   p r o m p t s " > 
 
 +                                         { q u i c k A c t i o n C h i p s . m a p ( ( p r o m p t )   = >   ( 
 
 +                                             < b u t t o n 
 
 +                                                 k e y = { p r o m p t } 
 
 +                                                 t y p e = " b u t t o n " 
 
 +                                                 c l a s s N a m e = " r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - w h i t e / [ 0 . 0 2 5 ]   p x - 4   p y - 3   t e x t - [ 1 5 p x ]   f o n t - m e d i u m   t e x t - w h i t e / 7 8   t r a n s i t i o n   h o v e r : b o r d e r - w h i t e / 2 0   h o v e r : b g - w h i t e / [ 0 . 0 5 ]   h o v e r : t e x t - w h i t e " 
 
 +                                                 o n C l i c k = { ( )   = >   h a n d l e S t a r t e r P r o m p t ( p r o m p t ) } 
 
 +                                             > 
 
 +                                                 { p r o m p t } 
 
 +                                             < / b u t t o n > 
 
 +                                         ) ) } 
 
 +                                     < / d i v > 
 
 +                                 < / s e c t i o n > 
 
                               < / d i v > 
 
                           ) } 
 
   
 
 @ @   - 5 1 4 , 5 8   + 9 9 9 , 1 8   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
                                   o n D e l e t e = { h a n d l e D e l e t e M e s s a g e } 
 
                                   o n E d i t A n d R e s e n d = { m s g . r o l e   = = =   " u s e r "   ?   h a n d l e E d i t A n d R e s e n d   :   u n d e f i n e d } 
 
                                   o n E d i t A s s i s t a n t = { m s g . r o l e   = = =   " a s s i s t a n t "   ?   h a n d l e E d i t A s s i s t a n t   :   u n d e f i n e d } 
 
 +                                 o n R e s e n d = { m s g . r o l e   = = =   " a s s i s t a n t "   ?   h a n d l e R e s e n d   :   u n d e f i n e d } 
 
                                   r e n d e r M a r k d o w n = { r e n d e r M a r k d o w n } 
 
                               / > 
 
                           ) ) } 
 
   
 
 -                         { / *   L i v e   s t r e a m i n g   b u b b l e   * / } 
 
 -                         { g e n e r a t i n g   & &   ( s t r e a m R e a s o n i n g   | |   s t r e a m C o n t e n t   | |   s t r e a m T h i n k i n g O p e n )   & &   ( 
 
 -                             < d i v   c l a s s N a m e = " m s g - w r a p p e r   a s s i s t a n t " > 
 
 -                                 < d i v   c l a s s N a m e = " m s g - b u b b l e " > 
 
 -                                     { ( s t r e a m R e a s o n i n g   | |   s t r e a m T h i n k i n g O p e n )   & &   ( 
 
 -                                         < d e t a i l s 
 
 -                                             c l a s s N a m e = " m s g - t h i n k i n g " 
 
 -                                             o p e n = { s h o w L i v e R e a s o n i n g } 
 
 -                                             o n T o g g l e = { ( e v e n t )   = >   s e t S h o w L i v e R e a s o n i n g ( e v e n t . c u r r e n t T a r g e t . o p e n ) } 
 
 -                                         > 
 
 -                                             < s u m m a r y   c l a s s N a m e = " t h i n k i n g - s u m m a r y "   a r i a - l a b e l = " T o g g l e   l i v e   t h i n k i n g   d e t a i l s " > 
 
 -                                                 < s v g   c l a s s N a m e = " t h i n k i n g - c h e v r o n "   v i e w B o x = " 0   0   1 6   1 6 "   f o c u s a b l e = " f a l s e "   a r i a - h i d d e n = " t r u e " > 
 
 -                                                     < p a t h   d = " M 6   4 l 4   4 - 4   4 "   / > 
 
 -                                                 < / s v g > 
 
 -                                                 < s p a n   c l a s s N a m e = " r e a s o n i n g - l i v e - d o t "   a r i a - h i d d e n = " t r u e "   / > 
 
 -                                                 T h i n k i n g { s t r e a m T h i n k i n g O p e n   ?   " . . . "   :   " " } 
 
 -                                             < / s u m m a r y > 
 
 -                                             { s t r e a m R e a s o n i n g   & &   ( 
 
 -                                                 < d i v 
 
 -                                                     c l a s s N a m e = " t h i n k i n g - c o n t e n t " 
 
 -                                                     d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   r e n d e r M a r k d o w n ( s t r e a m R e a s o n i n g )   } } 
 
 -                                                 / > 
 
 -                                             ) } 
 
 -                                         < / d e t a i l s > 
 
 -                                     ) } 
 
 - 
 
 -                                     { s t r e a m C o n t e n t   & &   ( 
 
 -                                         < d i v 
 
 -                                             c l a s s N a m e = " m s g - c o n t e n t " 
 
 -                                             d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   r e n d e r M a r k d o w n ( s t r e a m C o n t e n t )   } } 
 
 -                                         / > 
 
 -                                     ) } 
 
 - 
 
 -                                     { ! s t r e a m C o n t e n t   & &   s t r e a m T h i n k i n g O p e n   & &   ( 
 
 -                                         < d i v   c l a s s N a m e = " t h i n k i n g " > 
 
 -                                             < s p a n   / > < s p a n   / > < s p a n   / > 
 
 -                                         < / d i v > 
 
 -                                     ) } 
 
 -                                 < / d i v > 
 
 -                             < / d i v > 
 
 -                         ) } 
 
 - 
 
 -                         { g e n e r a t i n g   & &   ! s t r e a m R e a s o n i n g   & &   ! s t r e a m C o n t e n t   & &   ! s t r e a m T h i n k i n g O p e n   & &   ( 
 
 -                             < d i v   c l a s s N a m e = " m s g - w r a p p e r   a s s i s t a n t " > 
 
 -                                 < d i v   c l a s s N a m e = " t h i n k i n g " > 
 
 -                                     < s p a n   / > < s p a n   / > < s p a n   / > 
 
 -                                 < / d i v > 
 
 -                             < / d i v > 
 
 +                         { g e n e r a t i n g   & &   ( 
 
 +                             < S t r e a m i n g B u b b l e 
 
 +                                 c o n t e n t = { s t r e a m C o n t e n t } 
 
 +                                 r e a s o n i n g = { s t r e a m R e a s o n i n g } 
 
 +                                 t h i n k i n g O p e n = { s t r e a m T h i n k i n g O p e n } 
 
 +                                 r a w = { s t r e a m C o n t e n t A c c R e f . c u r r e n t } 
 
 +                             / > 
 
                           ) } 
 
   
 
                           < d i v   r e f = { m e s s a g e s E n d R e f }   / > 
 
 @ @   - 5 7 3 , 1 4 3   + 1 0 1 8 , 1 2 0   @ @   e x p o r t   d e f a u l t   f u n c t i o n   C h a t V i e w ( {   d b ,   c h a t I d ,   s e r v e r ,   a p i K e y ,   m o d e l ,   o n C h a t C r e a 
 
                       < / d i v > 
 
                   < / d i v > 
 
   
 
 -                 { / *           M e s s a g e   Q u e u e   i n d i c a t o r           * / } 
 
 -                 { m e s s a g e Q u e u e . l e n g t h   >   0   & &   ( 
 
 -                     < d i v   c l a s s N a m e = " q u e u e - i n d i c a t o r " > 
 
 -                         < s p a n   c l a s s N a m e = " q u e u e - i n d i c a t o r - p u l s e "   / > 
 
 -                         < s p a n   c l a s s N a m e = " q u e u e - i n d i c a t o r - t e x t " > 
 
 -                             { m e s s a g e Q u e u e . l e n g t h }   m e s s a g e { m e s s a g e Q u e u e . l e n g t h   >   1   ?   " s "   :   " " }   q u e u e d 
 
 -                         < / s p a n > 
 
 -                         < b u t t o n 
 
 -                             t y p e = " b u t t o n " 
 
 -                             c l a s s N a m e = " q u e u e - c l e a r - b t n " 
 
 -                             o n C l i c k = { ( )   = >   {   m e s s a g e Q u e u e R e f . c u r r e n t   =   [ ] ;   s e t M e s s a g e Q u e u e ( [ ] ) ;   } } 
 
 -                         > 
 
 -                                  C l e a r 
 
 -                         < / b u t t o n > 
 
 -                     < / d i v > 
 
 -                 ) } 
 
 +                 { / *           F i x e d   I n p u t   ( M a n u s - s t y l e )           * / } 
 
 +                 { ! i s I n i t i a l S c r e e n   & &   ( 
 
 +                     < d i v   c l a s s N a m e = " a b s o l u t e   b o t t o m - 0   l e f t - 0   w - f u l l   f l e x   f l e x - c o l   i t e m s - c e n t e r   z - 5 0   p o i n t e r - e v e n t s - n o n e " 
 
 +                               s t y l e = { {   b a c k g r o u n d :   ' l i n e a r - g r a d i e n t ( t o   b o t t o m ,   t r a n s p a r e n t   0 % ,   v a r ( - - b g )   3 2 % ,   v a r ( - - b g )   1 0 0 % ) ' ,   p a d d i n g T o p :   ' 4 8 p x '   } } > 
 
 +                         < d i v   c l a s s N a m e = " w - f u l l   m a x - w - [ 8 0 0 p x ]   p x - 5   p b - 6   p o i n t e r - e v e n t s - a u t o " > 
 
   
 
 -                 { / *           F i x e d   I n p u t           * / } 
 
 -                 < d i v   c l a s s N a m e = " i n p u t - s t i c k y - w r a p p e r " > 
 
 -                     < d i v   c l a s s N a m e = " i n p u t - g r a d i e n t - m a s k "   / > 
 
 -                     < d i v   c l a s s N a m e = " i n p u t - c o n t e n t - c o n s t r a i n e d " > 
 
 -                         < d i v   c l a s s N a m e = " i n p u t - w r a p p e r " > 
 
 +                             { / *   C o m p o s e r   n o t i c e   * / } 
 
                               { c o m p o s e r N o t i c e   & &   ( 
 
 -                                 < d i v   c l a s s N a m e = { ` c o m p o s e r - n o t i c e   $ { c o m p o s e r N o t i c e . t o n e } ` } > 
 
 +                                 < d i v   c l a s s N a m e = { ' f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   g a p - 3   m b - 3   p x - 4   p y - 3   r o u n d e d - 2 x l   b o r d e r   b a c k d r o p - b l u r - s m   '   +   ( c o m p o s e r N o t i c e . t o n e   = = =   ' w a r n i n g '   ?   ' b o r d e r - y e l l o w - 4 0 0 / 2 0   b g - y e l l o w - 4 0 0 / 5 '   :   ' b o r d e r - b l u e - 4 0 0 / 2 0   b g - b l u e - 4 0 0 / 5 ' ) } > 
 
                                       < d i v > 
 
 -                                         < s t r o n g > { c o m p o s e r N o t i c e . t i t l e } < / s t r o n g > 
 
 -                                         < p > { c o m p o s e r N o t i c e . d e s c r i p t i o n } < / p > 
 
 +                                         < p   c l a s s N a m e = " t e x t - [ 1 3 p x ]   f o n t - s e m i b o l d   t e x t - w h i t e / 9 0   m b - 0 . 5 " > { c o m p o s e r N o t i c e . t i t l e } < / p > 
 
 +                                         < p   c l a s s N a m e = " t e x t - [ 1 2 p x ]   t e x t - w h i t e / 5 0   l e a d i n g - s n u g   m - 0 " > { c o m p o s e r N o t i c e . d e s c r i p t i o n } < / p > 
 
                                       < / d i v > 
 
 -                                     { o n O p e n S i d e b a r   & &   ( 
 
 -                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " n o t i c e - a c t i o n - b t n "   o n C l i c k = { o n O p e n S i d e b a r } > 
 
 -                                             { c o m p o s e r N o t i c e . a c t i o n L a b e l } 
 
 -                                         < / b u t t o n > 
 
 -                                     ) } 
 
 +                                     < b u t t o n   t y p e = " b u t t o n " 
 
 +                                         o n C l i c k = { ( )   = >   c o m p o s e r N o t i c e . a c t i o n L a b e l   = = =   ' O p e n   s e t t i n g s '   ?   o n O p e n S e t t i n g s ? . ( )   :   o n O p e n S i d e b a r ? . ( ) } 
 
 +                                         c l a s s N a m e = " f l e x - s h r i n k - 0   p x - 3   p y - 1 . 5   r o u n d e d - l g   t e x t - [ 1 2 p x ]   f o n t - m e d i u m   t e x t - w h i t e / 8 0   b g - w h i t e / [ 0 . 0 8 ]   h o v e r : b g - w h i t e / [ 0 . 1 4 ]   b o r d e r   b o r d e r - w h i t e / [ 0 . 1 0 ]   t r a n s i t i o n - c o l o r s " 
 
 +                                     > { c o m p o s e r N o t i c e . a c t i o n L a b e l } < / b u t t o n > 
 
                                   < / d i v > 
 
                               ) } 
 
   
 
 -                             { / *   M o d e l   c a p a b i l i t i e s        f l o a t i n g   a b o v e   t h e   p i l l   * / } 
 
 -                             < d i v   c l a s s N a m e = " m o d e l - c a p a b i l i t i e s "   a r i a - l a b e l = " M o d e l   c a p a b i l i t i e s " > 
 
 -                                 < s p a n   c l a s s N a m e = " c a p a b i l i t y - g r o u p " > 
 
 -                                     < s p a n   c l a s s N a m e = " l a b e l " > I n < / s p a n > 
 
 -                                     < C h a t C i r c l e T e x t   s i z e = { 1 4 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                     < I m a g e   s i z e = { 1 4 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                 < / s p a n > 
 
 -                                 < s p a n   c l a s s N a m e = " s e p a r a t o r " > ,% < / s p a n > 
 
 -                                 < s p a n   c l a s s N a m e = " c a p a b i l i t y - g r o u p " > 
 
 -                                     < s p a n   c l a s s N a m e = " l a b e l " > O u t < / s p a n > 
 
 -                                     < C h a t C i r c l e T e x t   s i z e = { 1 4 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                 < / s p a n > 
 
 -                             < / d i v > 
 
 - 
 
 -                             { / *   T h e   t y p i n g   p i l l   * / } 
 
 -                             < d i v   c l a s s N a m e = " i n p u t - b o x " > 
 
 -                                 < d i v   c l a s s N a m e = " a t t a c h m e n t - a c t i o n s "   a r i a - l a b e l = " A t t a c h m e n t   o p t i o n s   ( c o m i n g   s o o n ) " > 
 
 -                                     < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   a r i a - d i s a b l e d = " t r u e "   t i t l e = " A t t a c h   i m a g e   ( C o m i n g   s o o n ) " > 
 
 -                                         < I m a g e   s i z e = { 2 0 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                     < / b u t t o n > 
 
 -                                     < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   a r i a - d i s a b l e d = " t r u e "   t i t l e = " A t t a c h   a u d i o   ( C o m i n g   s o o n ) " > 
 
 -                                         < M i c r o p h o n e   s i z e = { 2 0 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                     < / b u t t o n > 
 
 -                                     < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   a r i a - d i s a b l e d = " t r u e "   t i t l e = " A t t a c h   d o c u m e n t   ( C o m i n g   s o o n ) " > 
 
 -                                         < P a p e r c l i p   s i z e = { 2 0 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                     < / b u t t o n > 
 
 +                             { / *   Q u e u e   b a d g e   * / } 
 
 +                             { m e s s a g e Q u e u e . l e n g t h   >   0   & &   ( 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2   m b - 2   p x - 1 " > 
 
 +                                     < s p a n   c l a s s N a m e = " w - 1 . 5   h - 1 . 5   r o u n d e d - f u l l   b g - i n d i g o - 4 0 0   a n i m a t e - p u l s e " / > 
 
 +                                     < s p a n   c l a s s N a m e = " t e x t - [ 1 1 p x ]   t e x t - w h i t e / 4 0 " > { m e s s a g e Q u e u e . l e n g t h }   m e s s a g e { m e s s a g e Q u e u e . l e n g t h   >   1   ?   ' s '   :   ' ' }   q u e u e d < / s p a n > 
 
 +                                     < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { ( )   = >   {   m e s s a g e Q u e u e R e f . c u r r e n t   =   [ ] ;   s e t M e s s a g e Q u e u e ( [ ] ) ;   } } 
 
 +                                         c l a s s N a m e = " t e x t - [ 1 1 p x ]   t e x t - r e d - 4 0 0 / 6 0   h o v e r : t e x t - r e d - 4 0 0   t r a n s i t i o n - c o l o r s " >      C l e a r < / b u t t o n > 
 
                                   < / d i v > 
 
 +                             ) } 
 
   
 
 +                             { / *   M a i n   i n p u t   b o x   * / } 
 
 +                             < d i v   c l a s s N a m e = " r e l a t i v e   r o u n d e d - 2 x l   b g - [ # 2 6 2 6 2 6 ]   b o r d e r   b o r d e r - w h i t e / [ 0 . 0 8 ]   o v e r f l o w - h i d d e n " > 
 
 +                                 { ! i s I n i t i a l S c r e e n   & &   ( 
 
 +                                     < b u t t o n 
 
 +                                         t y p e = " b u t t o n " 
 
 +                                         c l a s s N a m e = { ` a b s o l u t e   t o p - 3   r i g h t - 3   z - 1 0   w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   t r a n s i t i o n - c o l o r s   $ { s h o w M e m o r y M o d a l   ?   ' b g - b l u e - 5 0 0 / 1 4   b o r d e r - b l u e - 4 0 0 / 2 6   t e x t - b l u e - 3 0 0 '   :   ' b g - w h i t e / [ 0 . 0 4 ]   b o r d e r - w h i t e / [ 0 . 0 8 ]   t e x t - w h i t e / 3 8   h o v e r : t e x t - w h i t e / 7 8   h o v e r : b g - w h i t e / [ 0 . 0 8 ] ' } ` } 
 
 +                                         o n C l i c k = { ( )   = >   s e t S h o w M e m o r y M o d a l ( ! s h o w M e m o r y M o d a l ) } 
 
 +                                         t i t l e = { ` M e m o r y   c o n t e x t        $ { m e m o r y M e s s a g e C o u n t }   m e s s a g e $ { m e m o r y M e s s a g e C o u n t   ! = =   1   ?   ' s '   :   ' ' } ` } 
 
 +                                         a r i a - l a b e l = " V i e w   m e m o r y   c o n t e x t " 
 
 +                                     > 
 
 +                                         < D a t a b a s e   s i z e = { 1 5 }   w e i g h t = " d u o t o n e "   / > 
 
 +                                         { m e m o r y M e s s a g e C o u n t   >   0   & &   ( 
 
 +                                             < s p a n   c l a s s N a m e = " m e m o r y - c o u n t - b a d g e " > { m e m o r y M e s s a g e C o u n t } < / s p a n > 
 
 +                                         ) } 
 
 +                                     < / b u t t o n > 
 
 +                                 ) } 
 
                                   < t e x t a r e a 
 
                                       r e f = { t e x t a r e a R e f } 
 
                                       v a l u e = { i n p u t } 
 
                                       o n C h a n g e = { ( e )   = >   {   s e t I n p u t ( e . t a r g e t . v a l u e ) ;   a u t o R e s i z e ( ) ;   } } 
 
                                       o n K e y D o w n = { ( e )   = >   { 
 
 -                                         i f   ( e . k e y   = = =   " E n t e r "   & &   ! e . s h i f t K e y )   {   e . p r e v e n t D e f a u l t ( ) ;   h a n d l e S e n d ( ) ;   } 
 
 +                                         i f   ( e . k e y   = = =   ' E n t e r '   & &   ! e . s h i f t K e y )   {   e . p r e v e n t D e f a u l t ( ) ;   h a n d l e S e n d ( ) ;   } 
 
                                       } } 
 
 -                                     p l a c e h o l d e r = { 
 
 -                                         c o m p o s e r N o t i c e 
 
 -                                             ?   ` $ { c o m p o s e r N o t i c e . t i t l e } .   $ { c o m p o s e r N o t i c e . d e s c r i p t i o n } ` 
 
 -                                             :   g e n e r a t i n g 
 
 -                                                 ?   " T y p e   t o   q u e u e   n e x t   m e s s a g e    " 
 
 -                                                 :   " M e s s a g e . . . " 
 
 -                                     } 
 
 +                                     p l a c e h o l d e r = { c o m p o s e r N o t i c e   ?   c o m p o s e r N o t i c e . t i t l e   +   '    '   :   g e n e r a t i n g   ?   ' T y p e   t o   q u e u e    '   :   ' S e n d   m e s s a g e   t o   F o r g e L M ' } 
 
                                       r o w s = { 1 } 
 
                                       d i s a b l e d = { B o o l e a n ( c o m p o s e r N o t i c e ) } 
 
 +                                     c l a s s N a m e = " w - f u l l   b g - t r a n s p a r e n t   t e x t - w h i t e / 9 0   p l a c e h o l d e r - w h i t e / 3 0   t e x t - [ 1 4 p x ]   l e a d i n g - r e l a x e d   r e s i z e - n o n e   o u t l i n e - n o n e   p x - 4   p r - 1 4   p t - 4   p b - 2   m a x - h - [ 2 0 0 p x ]   o v e r f l o w - y - a u t o " 
 
 +                                     s t y l e = { {   f o n t F a m i l y :   ' i n h e r i t '   } } 
 
                                   / > 
 
 - 
 
 -                                 { g e n e r a t i n g   ?   ( 
 
 -                                     < b u t t o n   c l a s s N a m e = " s t o p - b t n "   o n C l i c k = { h a n d l e S t o p }   t y p e = " b u t t o n " > 
 
 -                                              S t o p 
 
 -                                     < / b u t t o n > 
 
 -                                 )   :   ( 
 
 -                                     < b u t t o n 
 
 -                                         c l a s s N a m e = " s e n d - b t n " 
 
 -                                         o n C l i c k = { h a n d l e S e n d } 
 
 -                                         d i s a b l e d = { ! i n p u t . t r i m ( )   | |   B o o l e a n ( c o m p o s e r N o t i c e ) } 
 
 -                                         t y p e = " b u t t o n " 
 
 -                                         a r i a - l a b e l = " S e n d   m e s s a g e " 
 
 -                                     > 
 
 -                                         S e n d   < A r r o w U p   s i z e = { 1 8 }   w e i g h t = " d u o t o n e "   / > 
 
 -                                     < / b u t t o n > 
 
 -                                 ) } 
 
 -                             < / d i v > 
 
 - 
 
 -                             { / *   Q u e u e   s y s t e m   * / } 
 
 -                             { m e s s a g e Q u e u e . l e n g t h   >   0   & &   ( 
 
 -                                 < d i v   c l a s s N a m e = " q u e u e - c o n t a i n e r " > 
 
 -                                     { i s Q u e u e O p e n   & &   ( 
 
 -                                         < d i v   c l a s s N a m e = " q u e u e - p o p o v e r " > 
 
 -                                             < d i v   c l a s s N a m e = " q u e u e - h e a d e r " > 
 
 -                                                 < s p a n > M e n s a g e n s   e m   e s p e r a < / s p a n > 
 
 -                                             < / d i v > 
 
 -                                             < u l   c l a s s N a m e = " q u e u e - l i s t " > 
 
 -                                                 { m e s s a g e Q u e u e . m a p ( ( m s g ,   i n d e x )   = >   ( 
 
 -                                                     < l i   k e y = { i n d e x }   c l a s s N a m e = " q u e u e - i t e m " > 
 
 -                                                         < s p a n   c l a s s N a m e = " q u e u e - t e x t " > { m s g } < / s p a n > 
 
 -                                                         < b u t t o n 
 
 -                                                             c l a s s N a m e = " q u e u e - r e m o v e " 
 
 -                                                             a r i a - l a b e l = " R e m o v e r   d a   f i l a " 
 
 -                                                             o n C l i c k = { ( )   = >   { 
 
 -                                                                 c o n s t   n e x t   =   m e s s a g e Q u e u e . f i l t e r ( ( _ ,   i )   = >   i   ! = =   i n d e x ) ; 
 
 -                                                                 s e t Q u e u e ( n e x t ) ; 
 
 -                                                             } } 
 
 -                                                         > 
 
 -                                                                
 
 -                                                         < / b u t t o n > 
 
 -                                                     < / l i > 
 
 -                                                 ) ) } 
 
 -                                             < / u l > 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   p x - 3   p b - 3   p t - 1   g a p - 2 " > 
 
 +                                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 1 " > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { o n N e w C h a t   ? ?   ( ( )   = >   { } ) } 
 
 +                                             c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t e x t - w h i t e / 4 0   h o v e r : t e x t - w h i t e / 8 0   h o v e r : b g - w h i t e / [ 0 . 0 8 ]   t r a n s i t i o n - c o l o r s " > 
 
 +                                             < s v g   w i d t h = " 1 6 "   h e i g h t = " 1 6 "   v i e w B o x = " 0   0   2 4   2 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d " > < p a t h   d = " M 1 2   5 v 1 4 M 5   1 2 h 1 4 " / > < / s v g > 
 
 +                                         < / b u t t o n > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " A t t a c h   i m a g e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t e x t - w h i t e / 2 0   c u r s o r - n o t - a l l o w e d " > < I m a g e   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > < / b u t t o n > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " A t t a c h   f i l e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t e x t - w h i t e / 2 0   c u r s o r - n o t - a l l o w e d " > < P a p e r c l i p   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > < / b u t t o n > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " S c r e e n   ( c o m i n g   s o o n ) "   c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t e x t - w h i t e / 2 0   c u r s o r - n o t - a l l o w e d " > 
 
 +                                             < s v g   w i d t h = " 1 6 "   h e i g h t = " 1 6 "   v i e w B o x = " 0   0   2 4   2 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d " > < r e c t   x = " 2 "   y = " 3 "   w i d t h = " 2 0 "   h e i g h t = " 1 4 "   r x = " 2 " / > < p a t h   d = " M 8   2 1 h 8 M 1 2   1 7 v 4 " / > < / s v g > 
 
 +                                         < / b u t t o n > 
 
 +                                         < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 1   m l - 1   p l - 2   b o r d e r - l   b o r d e r - w h i t e / [ 0 . 0 8 ] " > 
 
 +                                             < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { ( )   = >   s e t U s e S t r e a m ( ! u s e S t r e a m ) } 
 
 +                                                 c l a s s N a m e = { ' i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 1 . 5   p x - 2   p y - 0 . 5   r o u n d e d - f u l l   t e x t - [ 1 0 . 5 p x ]   f o n t - m e d i u m   b o r d e r   t r a n s i t i o n - c o l o r s   '   +   ( u s e S t r e a m   ?   ' b g - b l u e - 5 0 0 / 1 2   b o r d e r - b l u e - 4 0 0 / 2 2   t e x t - b l u e - 3 0 0 '   :   ' b g - w h i t e / [ 0 . 0 4 ]   b o r d e r - w h i t e / [ 0 . 0 8 ]   t e x t - w h i t e / 3 0 ' ) } > 
 
 +                                                 < L i g h t n i n g   s i z e = { 1 1 }   w e i g h t = " f i l l "   / > 
 
 +                                                 < s p a n > S t r e a m < / s p a n > 
 
 +                                             < / b u t t o n > 
 
 +                                             < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { ( )   = >   s e t U s e M e m o r y ( ! u s e M e m o r y ) } 
 
 +                                                 c l a s s N a m e = { ' i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 1 . 5   p x - 2   p y - 0 . 5   r o u n d e d - f u l l   t e x t - [ 1 0 . 5 p x ]   f o n t - m e d i u m   b o r d e r   t r a n s i t i o n - c o l o r s   '   +   ( u s e M e m o r y   ?   ' b g - b l u e - 5 0 0 / 1 2   b o r d e r - b l u e - 4 0 0 / 2 2   t e x t - b l u e - 3 0 0 '   :   ' b g - w h i t e / [ 0 . 0 4 ]   b o r d e r - w h i t e / [ 0 . 0 8 ]   t e x t - w h i t e / 3 0 ' ) } > 
 
 +                                                 < D a t a b a s e   s i z e = { 1 1 }   w e i g h t = " d u o t o n e "   / > 
 
 +                                                 < s p a n > M e m o r y < / s p a n > 
 
 +                                             < / b u t t o n > 
 
                                           < / d i v > 
 
 -                                     ) } 
 
 -                                     < b u t t o n 
 
 -                                         c l a s s N a m e = " q u e u e - t o g g l e " 
 
 -                                         o n C l i c k = { ( )   = >   s e t I s Q u e u e O p e n ( ! i s Q u e u e O p e n ) } 
 
 -                                     > 
 
 -                                         { m e s s a g e Q u e u e . l e n g t h }   q u e u e d 
 
 -                                     < / b u t t o n > 
 
 +                                     < / d i v > 
 
 +                                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 3 " > 
 
 +                                         { s h o w D e b u g T o o l s   & &   ( 
 
 +                                             < b u t t o n 
 
 +                                                 t y p e = " b u t t o n " 
 
 +                                                 o n C l i c k = { ( )   = >   {   v o i d   h a n d l e C o p y D e b u g T r a n s c r i p t ( ) ;   } } 
 
 +                                                 c l a s s N a m e = " i n l i n e - f l e x   h - 8   i t e m s - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - e m e r a l d - 4 0 0 / 1 8   b g - e m e r a l d - 5 0 0 / 8   p x - 3   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   t e x t - e m e r a l d - 2 0 0   t r a n s i t i o n   h o v e r : b g - e m e r a l d - 5 0 0 / 1 4 " 
 
 +                                                 a r i a - l a b e l = " C o p y   d e b u g   t r a n s c r i p t " 
 
 +                                                 t i t l e = " C o p y   f u l l   d e b u g   e x p o r t " 
 
 +                                             > 
 
 +                                                 { d e b u g C o p i e d   ?   ' C o p i e d   d e b u g '   :   ' C o p y   d e b u g ' } 
 
 +                                             < / b u t t o n > 
 
 +                                         ) } 
 
 +                                         < A g e n t i c T o g g l e   i s A c t i v e = { a g e n t i c M o d e }   o n T o g g l e = { ( )   = >   s e t A g e n t i c M o d e ( ( v a l u e )   = >   ! v a l u e ) }   d i s a b l e d = { B o o l e a n ( c o m p o s e r N o t i c e ) }   / > 
 
 +                                         < b u t t o n   t y p e = " b u t t o n "   d i s a b l e d   t i t l e = " V o i c e   ( c o m i n g   s o o n ) "   c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t e x t - w h i t e / 2 5   c u r s o r - n o t - a l l o w e d " > < M i c r o p h o n e   s i z e = { 1 6 }   w e i g h t = " d u o t o n e "   / > < / b u t t o n > 
 
 +                                         { g e n e r a t i n g   ?   ( 
 
 +                                             < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { h a n d l e S t o p }   a r i a - l a b e l = " S t o p " 
 
 +                                                 c l a s s N a m e = " w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b g - w h i t e / [ 0 . 0 9 ]   h o v e r : b g - w h i t e / [ 0 . 1 4 ]   t e x t - w h i t e / 7 0   t r a n s i t i o n - c o l o r s " > 
 
 +                                                 < s v g   w i d t h = " 1 0 "   h e i g h t = " 1 0 "   v i e w B o x = " 0   0   1 0   1 0 "   f i l l = " c u r r e n t C o l o r " > < r e c t   w i d t h = " 1 0 "   h e i g h t = " 1 0 "   r x = " 2 " / > < / s v g > 
 
 +                                             < / b u t t o n > 
 
 +                                         )   :   ( 
 
 +                                             < b u t t o n   t y p e = " b u t t o n "   o n C l i c k = { h a n d l e S e n d }   d i s a b l e d = { ! i n p u t . t r i m ( )   | |   B o o l e a n ( c o m p o s e r N o t i c e ) }   a r i a - l a b e l = " S e n d   m e s s a g e " 
 
 +                                                 c l a s s N a m e = { ' w - 8   h - 8   f l e x   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   t r a n s i t i o n - a l l   '   +   ( i n p u t . t r i m ( )   & &   ! c o m p o s e r N o t i c e   ?   ' b g - w h i t e / 9 0   h o v e r : b g - w h i t e   t e x t - [ # 1 a 1 a 1 a ] '   :   ' b g - w h i t e / [ 0 . 0 9 ]   t e x t - w h i t e / 2 5   c u r s o r - n o t - a l l o w e d ' ) } > 
 
 +                                                 < P a p e r P l a n e R i g h t   s i z e = { 1 5 }   w e i g h t = " f i l l "   / > 
 
 +                                             < / b u t t o n > 
 
 +                                         ) } 
 
 +                                     < / d i v > 
 
                                   < / d i v > 
 
 -                             ) } 
 
 +                             < / d i v > 
 
                           < / d i v > 
 
                       < / d i v > 
 
 -                 < / d i v > 
 
 +                 ) } 
 
               < / d i v > 
 
           < / d i v > 
 
       ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / I c o n . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / I c o n . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . e 7 d 8 1 7 5 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / I c o n . t s x 
 
 @ @   - 0 , 0   + 1 , 3 8   @ @ 
 
 + i m p o r t   t y p e   {   L u c i d e P r o p s   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + i m p o r t   { 
 
 +     A l e r t C i r c l e , 
 
 +     C h e c k C i r c l e , 
 
 +     C h e c k C i r c l e 2 , 
 
 +     C h e v r o n D o w n , 
 
 +     C h e v r o n R i g h t , 
 
 +     C i r c l e , 
 
 +     L o a d e r , 
 
 +     L o a d e r 2 , 
 
 +     M i n u s , 
 
 +     X C i r c l e , 
 
 + }   f r o m   " l u c i d e - r e a c t " ; 
 
 + 
 
 + c o n s t   i c o n s   =   { 
 
 +     A l e r t C i r c l e , 
 
 +     C h e c k C i r c l e , 
 
 +     C h e c k C i r c l e 2 , 
 
 +     C h e v r o n D o w n , 
 
 +     C h e v r o n R i g h t , 
 
 +     C i r c l e , 
 
 +     L o a d e r , 
 
 +     L o a d e r 2 , 
 
 +     M i n u s , 
 
 +     X C i r c l e , 
 
 + }   a s   c o n s t ; 
 
 + 
 
 + e x p o r t   t y p e   I c o n N a m e   =   k e y o f   t y p e o f   i c o n s ; 
 
 + e x p o r t   t y p e   I c o n P r o p s   =   L u c i d e P r o p s   &   { 
 
 +     n a m e :   I c o n N a m e ; 
 
 + } ; 
 
 + 
 
 + e x p o r t   f u n c t i o n   I c o n ( {   n a m e ,   . . . p r o p s   } :   I c o n P r o p s )   { 
 
 +     c o n s t   C o m p o n e n t   =   i c o n s [ n a m e ]   ? ?   C i r c l e ; 
 
 +     r e t u r n   < C o m p o n e n t   { . . . p r o p s }   / > ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   I c o n ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . c s s   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . c s s 
 
 i n d e x   6 7 5 a 5 6 8 . . 1 d c b d f b   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . c s s 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . c s s 
 
 @ @   - 1 6 2 , 6   + 1 6 2 , 9 3 2   @ @ 
 
       p a d d i n g :   1 3 p x   1 6 p x ; 
 
   } 
 
   
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   { 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     m a x - w i d t h :   m i n ( 1 0 0 % ,   7 2 c h ) ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     b o r d e r - r a d i u s :   0 ; 
 
 +     b o x - s h a d o w :   n o n e ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     o v e r f l o w :   v i s i b l e ; 
 
 + } 
 
 + 
 
 + / *           M a n u s   m a r k d o w n           * / 
 
 + . m a n u s - m a r k d o w n   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   1 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 7 8 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 9 4 ) ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   >   : f i r s t - c h i l d   {   m a r g i n - t o p :   0 ;   } 
 
 + . m a n u s - m a r k d o w n   >   : l a s t - c h i l d   {   m a r g i n - b o t t o m :   0 ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   h 1 , 
 
 + . m a n u s - m a r k d o w n   h 2 , 
 
 + . m a n u s - m a r k d o w n   h 3 , 
 
 + . m a n u s - m a r k d o w n   h 4   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - w e i g h t :   5 6 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 3 e m ; 
 
 +     l i n e - h e i g h t :   1 . 1 8 ; 
 
 +     c o l o r :   # f a f a f a ; 
 
 +     m a r g i n :   1 . 2 e m   0   0 . 4 5 e m ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   h 1   {   f o n t - s i z e :   c l a m p ( 1 . 6 5 r e m ,   1 . 3 5 r e m   +   0 . 9 v w ,   2 . 2 r e m ) ;   } 
 
 + . m a n u s - m a r k d o w n   h 2   {   f o n t - s i z e :   c l a m p ( 1 . 2 r e m ,   1 . 1 r e m   +   0 . 4 5 v w ,   1 . 4 5 r e m ) ;   } 
 
 + . m a n u s - m a r k d o w n   h 3   {   f o n t - s i z e :   1 . 0 5 r e m ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   p   {   m a r g i n :   0 . 7 5 e m   0 ;   c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 9 ) ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   u l , 
 
 + . m a n u s - m a r k d o w n   o l   {   m a r g i n :   0 . 9 e m   0 ;   p a d d i n g - l e f t :   1 . 3 5 r e m ;   } 
 
 + . m a n u s - m a r k d o w n   l i   {   m a r g i n :   0 . 3 2 r e m   0 ;   c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 8 8 ) ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   b l o c k q u o t e   { 
 
 +     m a r g i n :   1 . 1 e m   0 ; 
 
 +     b o r d e r - l e f t :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 1 4 ) ; 
 
 +     p a d d i n g - l e f t :   1 r e m ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 7 8 ) ; 
 
 +     f o n t - s t y l e :   n o r m a l ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   h r   {   m a r g i n :   1 . 3 5 e m   0 ;   b o r d e r :   n o n e ;   b o r d e r - t o p :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 0 8 ) ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   a   {   c o l o r :   # d b e a f e ;   t e x t - d e c o r a t i o n - c o l o r :   r g b a ( 2 1 9 ,   2 3 4 ,   2 5 4 ,   0 . 2 8 ) ;   t e x t - u n d e r l i n e - o f f s e t :   0 . 1 8 e m ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   s t r o n g   {   c o l o r :   # f c f c f d ;   f o n t - w e i g h t :   6 2 0 ;   } 
 
 + 
 
 + . m a n u s - m a r k d o w n   c o d e : n o t ( . h l j s )   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o r d e r - r a d i u s :   8 p x ; 
 
 +     p a d d i n g :   0 . 1 r e m   0 . 4 r e m ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   . c o d e - b l o c k   { 
 
 +     m a r g i n :   1 . 1 r e m   0 ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b o r d e r - r a d i u s :   1 8 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 9 ,   9 ,   1 1 ,   0 . 8 8 ) ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   . c o d e - h e a d e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 +     b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 + } 
 
 + 
 
 + . m a n u s - m a r k d o w n   . c o p y - c o d e - b t n   { 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 9 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . m s g - c o n t e n t , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . a g e n t - f i n a l - r e s p o n s e _ _ c o n t e n t   { 
 
 +     p a d d i n g :   0 ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   1 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 7 8 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 9 6 ) ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . m s g - c o n t e n t   >   : f i r s t - c h i l d , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . a g e n t - f i n a l - r e s p o n s e _ _ c o n t e n t   >   : f i r s t - c h i l d   { 
 
 +     m a r g i n - t o p :   0 ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . m s g - c o n t e n t   >   : l a s t - c h i l d , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . a g e n t - f i n a l - r e s p o n s e _ _ c o n t e n t   >   : l a s t - c h i l d   { 
 
 +     m a r g i n - b o t t o m :   0 ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 1 , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 2 , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 3 , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 4 , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 5 , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 6   { 
 
 +     m a r g i n :   1 . 2 e m   0   0 . 4 5 e m ; 
 
 +     c o l o r :   # f a f a f a ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - w e i g h t :   5 6 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 3 e m ; 
 
 +     l i n e - h e i g h t :   1 . 1 8 ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 1   { 
 
 +     f o n t - s i z e :   c l a m p ( 1 . 6 5 r e m ,   1 . 3 5 r e m   +   0 . 9 v w ,   2 . 2 r e m ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 2   { 
 
 +     f o n t - s i z e :   c l a m p ( 1 . 2 r e m ,   1 . 1 r e m   +   0 . 4 5 v w ,   1 . 4 5 r e m ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h 3   { 
 
 +     f o n t - s i z e :   1 . 0 5 r e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   p   { 
 
 +     m a r g i n :   0 . 7 5 e m   0 ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 9 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   u l , 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   o l   { 
 
 +     m a r g i n :   0 . 9 e m   0 ; 
 
 +     p a d d i n g - l e f t :   1 . 3 5 r e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   l i   { 
 
 +     m a r g i n :   0 . 3 2 r e m   0 ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 8 8 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   b l o c k q u o t e   { 
 
 +     m a r g i n :   1 . 1 e m   0 ; 
 
 +     b o r d e r - l e f t :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 1 4 ) ; 
 
 +     p a d d i n g - l e f t :   1 r e m ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 7 8 ) ; 
 
 +     f o n t - s t y l e :   n o r m a l ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   h r   { 
 
 +     m a r g i n :   1 . 3 5 e m   0 ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     b o r d e r - t o p :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 0 8 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   a   { 
 
 +     c o l o r :   # d b e a f e ; 
 
 +     t e x t - d e c o r a t i o n - c o l o r :   r g b a ( 2 1 9 ,   2 3 4 ,   2 5 4 ,   0 . 2 8 ) ; 
 
 +     t e x t - u n d e r l i n e - o f f s e t :   0 . 1 8 e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   s t r o n g   { 
 
 +     c o l o r :   # f c f c f d ; 
 
 +     f o n t - w e i g h t :   6 2 0 ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   c o d e : n o t ( . h l j s )   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o r d e r - r a d i u s :   8 p x ; 
 
 +     p a d d i n g :   0 . 1 r e m   0 . 4 r e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . c o d e - b l o c k   { 
 
 +     m a r g i n :   1 . 1 r e m   0 ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b o r d e r - r a d i u s :   1 8 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 9 ,   9 ,   1 1 ,   0 . 8 8 ) ; 
 
 +     b o x - s h a d o w :   n o n e ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . c o d e - h e a d e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 +     b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - b u b b l e . m s g - b u b b l e - - a s s i s t a n t - t e x t   . c o p y - c o d e - b t n   { 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 9 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 + } 
 
 + 
 
 + . m s g - i n l i n e - m e t a   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 2 p x ; 
 
 +     m a r g i n - t o p :   1 4 p x ; 
 
 +     m i n - h e i g h t :   3 2 p x ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m e s s a g e - m e t r i c s   { 
 
 +     p a d d i n g - l e f t :   0 ; 
 
 +     f o n t - s i z e :   0 . 7 r e m ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 7 2 ) ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     g a p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + . m s g - a c t i o n s - - i n l i n e   { 
 
 +     o p a c i t y :   0 ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   2 p x ; 
 
 +     p a d d i n g :   2 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 5 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 +     t r a n s i t i o n :   o p a c i t y   0 . 2 s   e a s e - o u t ,   b a c k g r o u n d   0 . 2 s   e a s e - o u t ,   b o r d e r - c o l o r   0 . 2 s   e a s e - o u t ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t : h o v e r   . m s g - a c t i o n s - - i n l i n e , 
 
 + . m s g - w r a p p e r . a s s i s t a n t : f o c u s - w i t h i n   . m s g - a c t i o n s - - i n l i n e   { 
 
 +     o p a c i t y :   1 ; 
 
 + } 
 
 + 
 
 + . m s g - a c t i o n s - - i n l i n e   . a c t i o n - b t n   { 
 
 +     m i n - w i d t h :   3 4 p x ; 
 
 +     m i n - h e i g h t :   3 4 p x ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   0 ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 7 ) ; 
 
 + } 
 
 + 
 
 + . m s g - a c t i o n s - - i n l i n e   . a c t i o n - b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     c o l o r :   # f a f a f a ; 
 
 + } 
 
 + 
 
 + . m s g - a c t i o n s - - i n l i n e   . a c t i o n - b t n : f o c u s - v i s i b l e   { 
 
 +     b o x - s h a d o w :   0   0   0   2 p x   r g b a ( 7 5 ,   1 3 4 ,   2 5 5 ,   0 . 3 5 ) ; 
 
 + } 
 
 + 
 
 + . m s g - a c t i o n s - - i n l i n e   . a c t i o n - b t n . c o p i e d   { 
 
 +     c o l o r :   v a r ( - - s u c c e s s ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 1 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . m s g - t h i n k i n g   { 
 
 +     m a r g i n - b o t t o m :   1 4 p x ; 
 
 +     b o r d e r - b o t t o m :   n o n e ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . r e a s o n i n g - t o g g l e   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
 +     p a d d i n g :   0 ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 ) ; 
 
 +     f o n t - s i z e :   0 . 7 2 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 4 e m ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . t h i n k i n g - c o n t e n t   { 
 
 +     p a d d i n g :   1 0 p x   0   0 ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 7 2 ) ; 
 
 + } 
 
 + 
 
 + . m s g - w r a p p e r . a s s i s t a n t   . t h i n k i n g - c o n t e n t   >   : f i r s t - c h i l d   { 
 
 +     m a r g i n - l e f t :   0 ; 
 
 +     p a d d i n g - l e f t :   1 2 p x ; 
 
 +     b o r d e r - l e f t :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 0 8 ) ; 
 
 + } 
 
 + 
 
 + / *           M i n i m a l i s t   A g e n t i c   p l a n           * / 
 
 + . a g e n t i c - p l a n   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ h e a d e r   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
 +     b a c k g r o u n d :   n o n e ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     p a d d i n g :   0 ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     t e x t - a l i g n :   l e f t ; 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     f o n t - f a m i l y :   i n h e r i t ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ h e a d e r : h o v e r   . a g e n t i c - p l a n _ _ t i t l e   { 
 
 +     c o l o r :   v a r ( - - a c c e n t ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ d o t   { 
 
 +     w i d t h :   7 p x ; 
 
 +     h e i g h t :   7 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   v a r ( - - a c c e n t ) ; 
 
 +     b o x - s h a d o w :   0   0   8 p x   v a r ( - - a c c e n t - g l o w ) ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ t i t l e   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 8 2 ) ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 0 5 e m ; 
 
 +     t r a n s i t i o n :   c o l o r   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ b a d g e   { 
 
 +     f o n t - s i z e :   0 . 6 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   1 p x   6 p x ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ c o u n t e r   { 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     m a r g i n - l e f t :   a u t o ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ c h e v r o n   { 
 
 +     w i d t h :   1 4 p x ; 
 
 +     h e i g h t :   1 4 p x ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     t r a n s i t i o n :   t r a n s f o r m   0 . 2 s   e a s e - o u t ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ c h e v r o n . r o t a t e d   { 
 
 +     t r a n s f o r m :   r o t a t e ( 1 8 0 d e g ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ b o d y   { 
 
 +     p a d d i n g - l e f t :   1 5 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ o v e r v i e w   { 
 
 +     m a r g i n :   6 p x   0   1 0 p x ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 6 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 5 ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s t e p s   { 
 
 +     l i s t - s t y l e :   n o n e ; 
 
 +     m a r g i n :   0 ; 
 
 +     p a d d i n g :   0 ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   8 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s t e p   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 +     g a p :   8 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s t e p _ _ c o n t e n t   { 
 
 +     m i n - w i d t h :   0 ; 
 
 +     f l e x :   1 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s t e p _ _ t i t l e   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 4 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 8 ) ; 
 
 +     l i n e - h e i g h t :   1 . 4 ; 
 
 +     m a r g i n :   0 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s t e p _ _ d e s c   { 
 
 +     m a r g i n :   2 p x   0   0 ; 
 
 +     f o n t - s i z e :   0 . 7 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 4 5 ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s u b s t e p s   { 
 
 +     l i s t - s t y l e :   n o n e ; 
 
 +     m a r g i n :   4 p x   0   0 ; 
 
 +     p a d d i n g :   0 ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   3 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - s u b s t e p   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 +     f o n t - s i z e :   0 . 7 6 r e m ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 4 5 ) ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ p r o g   { 
 
 +     m a r g i n - t o p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ p r o g - b a r   { 
 
 +     h e i g h t :   2 p x ; 
 
 +     b a c k g r o u n d :   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - p l a n _ _ p r o g - f i l l   { 
 
 +     h e i g h t :   1 0 0 % ; 
 
 +     b a c k g r o u n d :   v a r ( - - a c c e n t ) ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     t r a n s i t i o n :   w i d t h   0 . 2 5 s   e a s e - o u t ; 
 
 + } 
 
 + 
 
 + / *           A g e n t i c   s t a t u s   d o t s           * / 
 
 + . a g e n t i c - d o t   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     m a r g i n - t o p :   2 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - d o t - - i d l e       {   c o l o r :   v a r ( - - t e x t 3 ) ;   } 
 
 + . a g e n t i c - d o t - - r u n n i n g   {   c o l o r :   v a r ( - - a c c e n t ) ;   } 
 
 + . a g e n t i c - d o t - - d o n e       {   c o l o r :   v a r ( - - s u c c e s s ) ;   } 
 
 + . a g e n t i c - d o t - - e r r o r     {   c o l o r :   v a r ( - - d a n g e r ) ;   } 
 
 + 
 
 + / *           A g e n t i c   u p d a t e   ( i n l i n e   t e x t )           * / 
 
 + . a g e n t i c - u p d a t e   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 4 8 ) ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - u p d a t e _ _ i c o n   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     o p a c i t y :   0 . 7 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - u p d a t e - - s u c c e s s   . a g e n t i c - u p d a t e _ _ i c o n   {   c o l o r :   v a r ( - - s u c c e s s ) ;   o p a c i t y :   1 ;   } 
 
 + . a g e n t i c - u p d a t e - - w a r n i n g   . a g e n t i c - u p d a t e _ _ i c o n   {   c o l o r :   v a r ( - - w a r n i n g ) ;   o p a c i t y :   1 ;   } 
 
 + . a g e n t i c - u p d a t e - - e r r o r       . a g e n t i c - u p d a t e _ _ i c o n   {   c o l o r :   v a r ( - - d a n g e r ) ;     o p a c i t y :   1 ;   } 
 
 + 
 
 + / *           S p e c i a l i s t   c a r d s           * / 
 
 + . s p e c i a l i s t - c a r d   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   0 ; 
 
 +     p a d d i n g :   1 2 p x   0 ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ h e a d e r   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   8 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ i d e n t i t y   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ d o t   { 
 
 +     w i d t h :   7 p x ; 
 
 +     h e i g h t :   7 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   v a r ( - - a c c e n t ) ; 
 
 +     b o x - s h a d o w :   0   0   8 p x   v a r ( - - a c c e n t - g l o w ) ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ n a m e   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 4 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 8 8 ) ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 0 5 e m ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t i t l e   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 7 2 r e m ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 4 ) ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ b a d g e   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   4 p x ; 
 
 +     f o n t - s i z e :   0 . 6 5 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     p a d d i n g :   2 p x   7 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ b a d g e - - t h i n k i n g   { 
 
 +     c o l o r :   v a r ( - - a c c e n t ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 7 2 ,   1 6 6 ,   2 5 5 ,   0 . 2 ) ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ b a d g e - - d o n e   { 
 
 +     c o l o r :   v a r ( - - s u c c e s s ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 0 8 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 4 8 ,   2 0 9 ,   8 8 ,   0 . 2 ) ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - s e c t i o n   { 
 
 +     m a r g i n - t o p :   8 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - t o g g l e   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   5 p x ; 
 
 +     b a c k g r o u n d :   n o n e ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     p a d d i n g :   0 ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 7 2 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 3 8 ) ; 
 
 +     l e t t e r - s p a c i n g :   0 . 0 4 e m ; 
 
 +     t r a n s i t i o n :   c o l o r   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - t o g g l e : h o v e r   { 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 6 5 ) ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ c h e v r o n   { 
 
 +     w i d t h :   1 2 p x ; 
 
 +     h e i g h t :   1 2 p x ; 
 
 +     t r a n s i t i o n :   t r a n s f o r m   0 . 1 8 s   e a s e - o u t ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ c h e v r o n . r o t a t e d   { 
 
 +     t r a n s f o r m :   r o t a t e ( 1 8 0 d e g ) ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - p r e v i e w   { 
 
 +     m a r g i n :   5 p x   0   0 ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 7 6 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 3 2 ) ; 
 
 +     f o n t - s t y l e :   i t a l i c ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - b o d y   { 
 
 +     m a r g i n - t o p :   6 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ t h i n k i n g - t e x t   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 6 5 ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 6 ) ; 
 
 +     b o r d e r - l e f t :   1 p x   s o l i d   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 0 8 ) ; 
 
 +     p a d d i n g - l e f t :   1 2 p x ; 
 
 +     m a r g i n :   0 ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ r e s p o n s e   { 
 
 +     m a r g i n - t o p :   8 p x ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ r e s p o n s e - t e x t   { 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - e d i t o r i a l ) ; 
 
 +     f o n t - s i z e :   0 . 8 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 7 2 ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 8 8 ) ; 
 
 +     m a r g i n :   0 ; 
 
 + } 
 
 + 
 
 + . s p e c i a l i s t - c a r d _ _ d i v i d e r   { 
 
 +     m a r g i n - t o p :   1 2 p x ; 
 
 +     h e i g h t :   1 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 0 5 ) ; 
 
 + } 
 
 + 
 
 + / *           A g e n t i c   a r t i f a c t   r o w           * / 
 
 + . a g e n t i c - a r t i f a c t   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   1 0 p x ; 
 
 +     p a d d i n g :   8 p x   1 2 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
 +     m a r g i n - t o p :   1 2 p x ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t : h o v e r   { 
 
 +     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ i c o n   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     c o l o r :   v a r ( - - a c c e n t ) ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ i n f o   { 
 
 +     m i n - w i d t h :   0 ; 
 
 +     f l e x :   1 ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ n a m e   { 
 
 +     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     w h i t e - s p a c e :   n o w r a p ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 +     t e x t - o v e r f l o w :   e l l i p s i s ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ m e t a   { 
 
 +     f o n t - s i z e :   0 . 7 r e m ; 
 
 +     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     m a r g i n - t o p :   1 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ b t n   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   5 p x ; 
 
 +     p a d d i n g :   5 p x   1 0 p x ; 
 
 +     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r 2 ) ; 
 
 +     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 +     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 +     f o n t - s i z e :   0 . 7 2 r e m ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - s a n s ) ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   c o l o r   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . a g e n t i c - a r t i f a c t _ _ b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 +     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b o r d e r - c o l o r :   v a r ( - - a c c e n t ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s h e l l _ _ h e a d e r   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 2 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s h e l l _ _ l a b e l   { 
 
 +     f o n t - s i z e :   0 . 7 6 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 4 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   r g b a ( 2 2 8 ,   2 2 8 ,   2 3 1 ,   0 . 9 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s h e l l _ _ s t a t u s   { 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     p a d d i n g :   4 p x   1 0 p x ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 4 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 4 ,   2 4 ,   2 7 ,   0 . 7 4 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d   { 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     b o r d e r - r a d i u s :   2 0 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 3 4 ) ; 
 
 +     p a d d i n g :   1 4 p x   1 6 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ e y e b r o w   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 4 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ d o t   { 
 
 +     w i d t h :   8 p x ; 
 
 +     h e i g h t :   8 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   # 6 0 a 5 f a ; 
 
 +     b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 9 6 ,   1 6 5 ,   2 5 0 ,   0 . 4 5 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ t i t l e - r o w   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   b a s e l i n e ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 2 p x ; 
 
 +     m a r g i n - t o p :   8 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ t i t l e   { 
 
 +     m a r g i n :   0 ; 
 
 +     f o n t - s i z e :   1 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l i n e - h e i g h t :   1 . 3 5 ; 
 
 +     c o l o r :   # f a f a f a ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ p r o g r e s s   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     f o n t - s i z e :   0 . 7 5 r e m ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 7 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - c a r d _ _ o v e r v i e w   { 
 
 +     m a r g i n :   6 p x   0   0 ; 
 
 +     f o n t - s i z e :   0 . 8 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 5 ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 7 6 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - p r o g r e s s   { 
 
 +     m a r g i n - t o p :   1 2 p x ; 
 
 +     h e i g h t :   5 p x ; 
 
 +     o v e r f l o w :   h i d d e n ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - p r o g r e s s _ _ b a r   { 
 
 +     h e i g h t :   1 0 0 % ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 9 0 d e g ,   r g b a ( 2 2 6 ,   2 3 2 ,   2 4 0 ,   0 . 9 5 ) ,   r g b a ( 1 4 8 ,   1 6 3 ,   1 8 4 ,   0 . 9 2 ) ) ; 
 
 +     t r a n s i t i o n :   w i d t h   0 . 2 s   e a s e - o u t ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p s   { 
 
 +     l i s t - s t y l e :   n o n e ; 
 
 +     m a r g i n :   0 ; 
 
 +     p a d d i n g :   0 ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p s - - c o m p a c t   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   8 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     g a p :   1 0 p x ; 
 
 +     a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ m a r k e r   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     w i d t h :   2 0 p x ; 
 
 +     h e i g h t :   2 0 p x ; 
 
 +     m a r g i n - t o p :   1 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 9 ,   9 ,   1 1 ,   0 . 7 2 ) ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p . i s - c o m p l e t e   . f o r g e a g e n t - s t e p _ _ m a r k e r   { 
 
 +     b o r d e r - c o l o r :   r g b a ( 5 2 ,   2 1 1 ,   1 5 3 ,   0 . 2 4 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 6 ,   1 8 5 ,   1 2 9 ,   0 . 1 ) ; 
 
 +     c o l o r :   r g b a ( 1 6 7 ,   2 4 3 ,   2 0 8 ,   0 . 9 6 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p . i s - a c t i v e   . f o r g e a g e n t - s t e p _ _ m a r k e r   { 
 
 +     b o r d e r - c o l o r :   r g b a ( 9 6 ,   1 6 5 ,   2 5 0 ,   0 . 3 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 1 2 ) ; 
 
 +     c o l o r :   r g b a ( 1 9 1 ,   2 1 9 ,   2 5 4 ,   0 . 9 6 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ b o d y   { 
 
 +     m i n - w i d t h :   0 ; 
 
 +     f l e x :   1 ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ r o w   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   b a s e l i n e ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     g a p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ t i t l e   { 
 
 +     f o n t - s i z e :   0 . 8 8 r e m ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     l i n e - h e i g h t :   1 . 4 ; 
 
 +     c o l o r :   r g b a ( 2 4 4 ,   2 4 4 ,   2 4 5 ,   0 . 9 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ s t a t u s   { 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 e m ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 7 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ d e s c r i p t i o n , 
 
 + . f o r g e a g e n t - s t e p _ _ s u b s t e p   { 
 
 +     m a r g i n - t o p :   4 p x ; 
 
 +     f o n t - s i z e :   0 . 8 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - s t e p _ _ s u b s t e p s   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   4 p x ; 
 
 +     m a r g i n - t o p :   6 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e s   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   6 p x ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 +     g a p :   8 p x ; 
 
 +     p a d d i n g :   0 ; 
 
 +     f o n t - s i z e :   0 . 8 2 r e m ; 
 
 +     l i n e - h e i g h t :   1 . 5 ; 
 
 +     c o l o r :   r g b a ( 2 1 2 ,   2 1 2 ,   2 1 6 ,   0 . 8 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e _ _ d o t   { 
 
 +     w i d t h :   6 p x ; 
 
 +     h e i g h t :   6 p x ; 
 
 +     m a r g i n - t o p :   0 . 4 5 r e m ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 7 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e - - s u c c e s s   . f o r g e a g e n t - u p d a t e _ _ d o t   { 
 
 +     b a c k g r o u n d :   r g b a ( 5 2 ,   2 1 1 ,   1 5 3 ,   0 . 9 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e - - w a r n i n g   . f o r g e a g e n t - u p d a t e _ _ d o t   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 1 ,   1 9 1 ,   3 6 ,   0 . 9 2 ) ; 
 
 + } 
 
 + 
 
 + . f o r g e a g e n t - u p d a t e - - e r r o r   . f o r g e a g e n t - u p d a t e _ _ d o t   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 1 ,   1 1 3 ,   1 3 3 ,   0 . 9 2 ) ; 
 
 + } 
 
 + 
 
 + . a g e n t - f i n a l - r e s p o n s e   { 
 
 +     p a d d i n g - t o p :   6 p x ; 
 
 + } 
 
 + 
 
 + . a g e n t - f i n a l - r e s p o n s e _ _ l a b e l   { 
 
 +     m a r g i n - b o t t o m :   1 0 p x ; 
 
 +     f o n t - s i z e :   0 . 7 2 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 4 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 8 ) ; 
 
 + } 
 
 + 
 
 + . a g e n t - f i n a l - r e s p o n s e _ _ a r t i f a c t - l a b e l   { 
 
 +     m a r g i n - b o t t o m :   6 p x ; 
 
 +     f o n t - s i z e :   0 . 6 8 r e m ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   0 . 1 2 e m ; 
 
 +     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 +     c o l o r :   r g b a ( 1 6 1 ,   1 6 1 ,   1 7 0 ,   0 . 7 ) ; 
 
 + } 
 
 + 
 
   / *           M e s s a g e   m e t r i c s           * / 
 
   . m e s s a g e - m e t r i c s   { 
 
       d i s p l a y :   f l e x ; 
 
 @ @   - 3 2 4 , 6   + 1 2 5 0 , 2 1   @ @ 
 
       . a c t i o n - b t n   { 
 
           f l e x :   1   1   1 3 2 p x ; 
 
       } 
 
 + 
 
 +     . m s g - i n l i n e - m e t a   { 
 
 +         f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +         a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 +     } 
 
 + 
 
 +     . m s g - a c t i o n s - - i n l i n e   { 
 
 +         o p a c i t y :   1 ; 
 
 +     } 
 
 + 
 
 +     . m s g - a c t i o n s - - i n l i n e   . a c t i o n - b t n   { 
 
 +         f l e x :   0   0   a u t o ; 
 
 +         m i n - w i d t h :   4 0 p x ; 
 
 +         m i n - h e i g h t :   4 0 p x ; 
 
 +     } 
 
   } 
 
   
 
   @ m e d i a   ( p r e f e r s - r e d u c e d - m o t i o n :   r e d u c e )   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t e s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t e s t . t s x 
 
 i n d e x   5 e b 1 2 1 a . . 8 5 6 e 7 6 9   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t e s t . t s x 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t e s t . t s x 
 
 @ @   - 6 9 , 4   + 6 9 , 8 6   @ @   d e s c r i b e ( " M e s s a g e B u b b l e " ,   ( )   = >   { 
 
           e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " T o t a l   4 2 " ) ; 
 
           e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " 6 . 4   t o k / s " ) ; 
 
       } ) ; 
 
 + 
 
 +     i t ( " r e n d e r s   a   c l e a n   a g e n t i c   f i n a l   r e s p o n s e   w i t h o u t   c l a s s i c   b u b b l e   c h r o m e " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   m e s s a g e   =   { 
 
 +             i d :   2 2 , 
 
 +             c h a t _ i d :   5 , 
 
 +             r o l e :   " a s s i s t a n t " , 
 
 +             c o n t e n t :   " A q u i   e s t %   o   g u i a   f i n a l . " , 
 
 +             c r e a t e d _ a t :   D a t e . n o w ( ) , 
 
 +             d i s p l a y _ m o d e :   " a g e n t i c _ f i n a l " , 
 
 +         }   a s   M e s s a g e ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < M e s s a g e B u b b l e 
 
 +                     m e s s a g e = { m e s s a g e } 
 
 +                     o n D e l e t e = { v i . f n ( ) } 
 
 +                     o n E d i t A s s i s t a n t = { v i . f n ( ) } 
 
 +                     r e n d e r M a r k d o w n = { ( t e x t )   = >   ` < p > $ { t e x t } < / p > ` } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( c o n t a i n e r . q u e r y S e l e c t o r ( " . a g e n t - f i n a l - r e s p o n s e " ) ) . t o B e T r u t h y ( ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " A q u i   e s t %   o   g u i a   f i n a l . " ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " k e e p s   f o r g e a g e n t   e x e c u t i o n   c a r d s   v i s i b l e   f o r   p e r s i s t e d   a g e n t i c   m e s s a g e s " ,   a s y n c   ( )   = >   { 
 
 +         c o n s t   m e s s a g e   =   { 
 
 +             i d :   3 1 , 
 
 +             c h a t _ i d :   7 , 
 
 +             r o l e :   " a s s i s t a n t " , 
 
 +             c o n t e n t :   " A q u i   e s t %   a   r e s p o s t a   f i n a l   o r g a n i z a d a . " , 
 
 +             c r e a t e d _ a t :   D a t e . n o w ( ) , 
 
 +             d i s p l a y _ m o d e :   " a g e n t i c _ f i n a l " , 
 
 +             f o r g e a g e n t _ s t a t e :   { 
 
 +                 p l a n _ i d :   " p l a n - 7 " , 
 
 +                 c u r r e n t _ s t e p :   3 , 
 
 +                 s t a t u s :   " c o m p l e t e d " , 
 
 +                 p r o g r e s s :   1 0 0 , 
 
 +                 f i n a l _ r e s p o n s e :   " A q u i   e s t %   a   r e s p o s t a   f i n a l   o r g a n i z a d a   e m   f o r m a t o   M a n u s - s t y l e ,   p r o n t a   p a r a   r e v i s % o   e   e n t r e g a . " , 
 
 +                 a r t i f a c t :   { 
 
 +                     f i l e n a m e :   " f o r g e a g e n t - o u t p u t . m d " , 
 
 +                     c o n t e n t :   " #   R e s u l t a d o   f i n a l \ n \ n P r o m p t   o r i g i n a l :   t e s t a r   o   a g e n t i c o " , 
 
 +                     l a n g u a g e :   " m a r k d o w n " , 
 
 +                     c t a _ l a b e l :   " E n t r e g a r   o   g u i a   a o   u s u % r i o " , 
 
 +                 } , 
 
 +                 s y s t e m _ m e s s a g e s :   [ 
 
 +                     {   i d :   " m 1 " ,   s t e p _ i d :   1 ,   t o n e :   " i n f o " ,   c o n t e n t :   " A n a l i s e i   a   s o l i c i t a % % o   e   d e f i n i   o   o b j e t i v o   p r i n c i p a l . "   } , 
 
 +                     {   i d :   " m 2 " ,   s t e p _ i d :   2 ,   t o n e :   " i n f o " ,   c o n t e n t :   " E s t r u t u r e i   a   s o l u % % o   e   o r g a n i z e i   a   e x e c u % % o   e m   b l o c o s   c l a r o s . "   } , 
 
 +                 ] , 
 
 +                 p l a n :   { 
 
 +                     t i t l e :   " P e s q u i s e   s o b r e   a   q u a l i d a d e   d a s   p e d r a s   n a s   m o n t a n h a s " , 
 
 +                     o v e r v i e w :   " V o u   e s t r u t u r a r   u m   p l a n o   c u r t o ,   e x e c u t a r   c a d a   e t a p a   v i s u a l m e n t e   e   e n t r e g a r   a   r e s p o s t a   f i n a l   n o   e s t i l o   F o r g e A g e n t . " , 
 
 +                     s t e p s :   [ 
 
 +                         {   i d :   1 ,   t i t l e :   " E n t e n d e r   a   s o l i c i t a % % o " ,   d e s c r i p t i o n :   " Q u e b r a r   o   p e d i d o   e m   o b j e t i v o ,   s t a c k   e   f o r m a t o   d e   e n t r e g a . " ,   s t a t u s :   " c o m p l e t e d " ,   s u b _ s t e p s :   [ ]   } , 
 
 +                         {   i d :   2 ,   t i t l e :   " P r e p a r a r   a   s o l u % % o " ,   d e s c r i p t i o n :   " M o n t a r   a   e s t r u t u r a ,   d e p e n d % n c i a s   e   f l u x o   r e c o m e n d a d o . " ,   s t a t u s :   " c o m p l e t e d " ,   s u b _ s t e p s :   [ ]   } , 
 
 +                         {   i d :   3 ,   t i t l e :   " G e r a r   a   r e s p o s t a   f i n a l " ,   d e s c r i p t i o n :   " E n t r e g a r   o   c o n t e %Q%d o   f i n a l   c o m   o r i e n t a % % o   p r % t i c a   e   a r t e f a t o . " ,   s t a t u s :   " c o m p l e t e d " ,   s u b _ s t e p s :   [ ]   } , 
 
 +                     ] , 
 
 +                 } , 
 
 +             } , 
 
 +         }   a s   M e s s a g e   &   {   f o r g e a g e n t _ s t a t e :   u n k n o w n   } ; 
 
 + 
 
 +         a w a i t   a c t ( a s y n c   ( )   = >   { 
 
 +             r o o t . r e n d e r ( 
 
 +                 < M e s s a g e B u b b l e 
 
 +                     m e s s a g e = { m e s s a g e } 
 
 +                     o n D e l e t e = { v i . f n ( ) } 
 
 +                     o n E d i t A s s i s t a n t = { v i . f n ( ) } 
 
 +                     r e n d e r M a r k d o w n = { ( t e x t )   = >   ` < p > $ { t e x t } < / p > ` } 
 
 +                 / > , 
 
 +             ) ; 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( c o n t a i n e r . q u e r y S e l e c t o r ( " . f o r g e a g e n t - s t e p s - - c o m p a c t " ) ) . t o B e T r u t h y ( ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " P e s q u i s e   s o b r e   a   q u a l i d a d e   d a s   p e d r a s   n a s   m o n t a n h a s " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " E n t e n d e r   a   s o l i c i t a % % o " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " A n a l i s e i   a   s o l i c i t a % % o   e   d e f i n i   o   o b j e t i v o   p r i n c i p a l . " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " f o r g e a g e n t - o u t p u t . m d " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " R e s p o s t a   f i n a l " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . t o C o n t a i n ( " C o n c l u %   a   e x e c u % % o   d o   p e d i d o " ) ; 
 
 +         e x p e c t ( c o n t a i n e r . t e x t C o n t e n t ) . n o t . t o C o n t a i n ( " p r o n t a   p a r a   r e v i s % o   e   e n t r e g a " ) ; 
 
 +     } ) ; 
 
   } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t s x 
 
 i n d e x   0 2 d f 8 e 6 . . 4 2 4 2 f e d   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t s x 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / M e s s a g e B u b b l e . t s x 
 
 @ @   - 7 , 1 0   + 7 , 1 1   @ @   i n t e r f a c e   P r o p s   { 
 
       o n D e l e t e :   ( i d :   n u m b e r )   = >   v o i d ; 
 
       o n E d i t A n d R e s e n d ? :   ( m s g :   M e s s a g e ,   n e w C o n t e n t :   s t r i n g )   = >   v o i d ; 
 
       o n E d i t A s s i s t a n t ? :   ( i d :   n u m b e r ,   n e w C o n t e n t :   s t r i n g )   = >   v o i d ; 
 
 +     o n R e s e n d ? :   ( m s g :   M e s s a g e )   = >   v o i d ; 
 
       r e n d e r M a r k d o w n :   ( t e x t :   s t r i n g )   = >   s t r i n g ; 
 
   } 
 
   
 
 - e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d i t A s s i s t a n t ,   r e n d e r M a r k d o w n   } :   P r o p s )   { 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d i t A s s i s t a n t ,   o n R e s e n d ,   r e n d e r M a r k d o w n   } :   P r o p s )   { 
 
       c o n s t   [ e d i t i n g ,   s e t E d i t i n g ]   =   u s e S t a t e ( f a l s e ) ; 
 
       c o n s t   [ e d i t V a l u e ,   s e t E d i t V a l u e ]   =   u s e S t a t e ( m e s s a g e . c o n t e n t ) ; 
 
       c o n s t   [ c o p i e d ,   s e t C o p i e d ]   =   u s e S t a t e ( f a l s e ) ; 
 
 @ @   - 9 0 , 6   + 9 1 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d 
 
       ) ; 
 
   
 
       c o n s t   s h o w F o o t e r   =   m e s s a g e . r o l e   = = =   " a s s i s t a n t " ; 
 
 +     c o n s t   a s s i s t a n t B u b b l e C l a s s   =   " m s g - b u b b l e   m s g - b u b b l e - - a s s i s t a n t - t e x t " ; 
 
   
 
       r e t u r n   ( 
 
           < d i v   c l a s s N a m e = { ` m s g - w r a p p e r   $ { m e s s a g e . r o l e } ` } > 
 
 @ @   - 1 2 2 , 7   + 1 2 4 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d 
 
                       { m e s s a g e . r o l e   = = =   " a s s i s t a n t "   ?   ( 
 
                           < d i v 
 
                               r e f = { b u b b l e R e f } 
 
 -                             c l a s s N a m e = " m s g - b u b b l e " 
 
 +                             c l a s s N a m e = { a s s i s t a n t B u b b l e C l a s s } 
 
                           > 
 
                               { h a s R e a s o n i n g   & &   ( 
 
                                   < d e t a i l s   c l a s s N a m e = " m s g - t h i n k i n g " > 
 
 @ @   - 1 4 1 , 1 2   + 1 4 3 , 1 2   @ @   e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d 
 
                               ) } 
 
   
 
                               < d i v 
 
 -                                 c l a s s N a m e = " m s g - c o n t e n t " 
 
 +                                 c l a s s N a m e = " m s g - c o n t e n t   m s g - c o n t e n t - - a s s i s t a n t " 
 
                                   d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   r e n d e r M a r k d o w n ( m e s s a g e . c o n t e n t )   } } 
 
                               / > 
 
   
 
                               { s h o w F o o t e r   & &   ( 
 
 -                                 < d i v   c l a s s N a m e = " m s g - f o o t e r " > 
 
 +                                 < d i v   c l a s s N a m e = " m s g - i n l i n e - m e t a " > 
 
                                       { h a s U s a g e   & &   ( 
 
                                           < d i v   c l a s s N a m e = " m e s s a g e - m e t r i c s " > 
 
                                               < s p a n > S e n t   { m e s s a g e . p r o m p t _ t o k e n s   ? ?   0 } < / s p a n > 
 
 @ @   - 1 5 6 , 1 3   + 1 5 8 , 2 8   @ @   e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   m e s s a g e ,   o n D e l e t e ,   o n E d i t A n d R e s e n d ,   o n E d 
 
                                           < / d i v > 
 
                                       ) } 
 
                                       { ! h a s U s a g e   & &   < d i v   / > } 
 
 -                                     < d i v   c l a s s N a m e = " m s g - a c t i o n s "   a r i a - l a b e l = " M e s s a g e   a c t i o n s " > 
 
 +                                     < d i v   c l a s s N a m e = " m s g - a c t i o n s   m s g - a c t i o n s - - i n l i n e "   a r i a - l a b e l = " M e s s a g e   a c t i o n s " > 
 
                                           < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = { ` a c t i o n - b t n   $ { c o p i e d   ?   " c o p i e d "   :   " " } ` }   o n C l i c k = { c o p y M e s s a g e }   a r i a - l a b e l = " C o p y   m e s s a g e " > 
 
                                               < s v g   v i e w B o x = " 0   0   2 0   2 0 "   f o c u s a b l e = " f a l s e "   a r i a - h i d d e n = " t r u e " > 
 
                                                   < r e c t   x = " 7 "   y = " 7 "   w i d t h = " 1 0 "   h e i g h t = " 1 0 "   r x = " 2 "   / > 
 
                                                   < p a t h   d = " M 1 3   7 V 5 a 2   2   0   0   0 - 2 - 2 H 5 a 2   2   0   0   0 - 2   2 v 6 a 2   2   0   0   0   2   2 h 2 "   / > 
 
                                               < / s v g > 
 
                                           < / b u t t o n > 
 
 +                                         { o n R e s e n d   & &   ( 
 
 +                                             < b u t t o n 
 
 +                                                 t y p e = " b u t t o n " 
 
 +                                                 c l a s s N a m e = " a c t i o n - b t n " 
 
 +                                                 o n C l i c k = { ( )   = >   o n R e s e n d ( m e s s a g e ) } 
 
 +                                                 a r i a - l a b e l = " R e g e n e r a t e   r e s p o n s e " 
 
 +                                                 t i t l e = " R e g e n e r a t e   r e s p o n s e " 
 
 +                                             > 
 
 +                                                 { / *   R e f r e s h   /   r e g e n e r a t e   i c o n   * / } 
 
 +                                                 < s v g   v i e w B o x = " 0   0   2 0   2 0 "   f o c u s a b l e = " f a l s e "   a r i a - h i d d e n = " t r u e " > 
 
 +                                                     < p a t h   d = " M 4   1 0 a 6   6   0   1   0   1 . 2 4 - 3 . 7 2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                                                     < p o l y l i n e   p o i n t s = " 1   4   4   7   7   4 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                                                 < / s v g > 
 
 +                                             < / b u t t o n > 
 
 +                                         ) } 
 
                                           < b u t t o n 
 
                                               t y p e = " b u t t o n " 
 
                                               c l a s s N a m e = " a c t i o n - b t n " 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 a 6 d b 8 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / M o d e l S e l e c t o r P i l l . t s x 
 
 @ @   - 0 , 0   + 1 , 1 0 3   @ @ 
 
 + i m p o r t   {   u s e S t a t e ,   u s e R e f ,   u s e E f f e c t   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   C h e v r o n D o w n ,   L o a d e r 2   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + i m p o r t   t y p e   {   M o d e l I n f o ,   S e r v e r S t a t u s   }   f r o m   " . . / l i b / t y p e s " ; 
 
 + i m p o r t   t y p e   {   R u n t i m e M o d e l F i l e   }   f r o m   " . . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
 + i m p o r t   {   g e t D i s p l a y N a m e   }   f r o m   " . . / l i b / m o d e l A l i a s " ; 
 
 + 
 
 + i n t e r f a c e   M o d e l S e l e c t o r P i l l P r o p s   { 
 
 +     m o d e l s :   M o d e l I n f o [ ] ; 
 
 +     l o c a l M o d e l s :   R u n t i m e M o d e l F i l e [ ] ; 
 
 +     s e l e c t e d M o d e l :   s t r i n g ; 
 
 +     o n M o d e l C h a n g e :   ( i d :   s t r i n g )   = >   v o i d ; 
 
 +     o n M o d e l S w a p ? :   ( p a t h :   s t r i n g )   = >   v o i d ; 
 
 +     i s S w a p p i n g ? :   b o o l e a n ; 
 
 +     s t a t u s :   S e r v e r S t a t u s ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   M o d e l S e l e c t o r P i l l ( { 
 
 +     m o d e l s , 
 
 +     l o c a l M o d e l s , 
 
 +     s e l e c t e d M o d e l , 
 
 +     o n M o d e l C h a n g e , 
 
 +     o n M o d e l S w a p , 
 
 +     i s S w a p p i n g , 
 
 +     s t a t u s , 
 
 + } :   M o d e l S e l e c t o r P i l l P r o p s )   { 
 
 +     c o n s t   [ d r o p d o w n O p e n ,   s e t D r o p d o w n O p e n ]   =   u s e S t a t e ( f a l s e ) ; 
 
 +     c o n s t   d r o p d o w n R e f   =   u s e R e f < H T M L D i v E l e m e n t > ( n u l l ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         i f   ( ! d r o p d o w n O p e n )   r e t u r n ; 
 
 +         c o n s t   h a n d l e C l i c k O u t s i d e   =   ( e :   M o u s e E v e n t )   = >   { 
 
 +             i f   ( d r o p d o w n R e f . c u r r e n t   & &   ! d r o p d o w n R e f . c u r r e n t . c o n t a i n s ( e . t a r g e t   a s   N o d e ) )   { 
 
 +                 s e t D r o p d o w n O p e n ( f a l s e ) ; 
 
 +             } 
 
 +         } ; 
 
 +         d o c u m e n t . a d d E v e n t L i s t e n e r ( " m o u s e d o w n " ,   h a n d l e C l i c k O u t s i d e ) ; 
 
 +         r e t u r n   ( )   = >   d o c u m e n t . r e m o v e E v e n t L i s t e n e r ( " m o u s e d o w n " ,   h a n d l e C l i c k O u t s i d e ) ; 
 
 +     } ,   [ d r o p d o w n O p e n ] ) ; 
 
 + 
 
 +     c o n s t   h a n d l e S e l e c t M o d e l   =   ( m o d e l I d :   s t r i n g )   = >   { 
 
 +         s e t D r o p d o w n O p e n ( f a l s e ) ; 
 
 +         o n M o d e l C h a n g e ( m o d e l I d ) ; 
 
 +         / /   O n l y   c a l l   o n M o d e l S w a p   f o r   l o c a l   m o d e l s   ( w h i c h   h a v e   f i l e   p a t h s ) 
 
 +         / /   A P I   m o d e l s   d o n ' t   h a v e   p a t h s   a n d   s h o u l d n ' t   t r i g g e r   a   m o d e l   s w a p 
 
 +         c o n s t   i s L o c a l M o d e l   =   l o c a l M o d e l s . s o m e ( ( m )   = >   m . p a t h   = = =   m o d e l I d ) ; 
 
 +         i f   ( o n M o d e l S w a p   & &   i s L o c a l M o d e l )   { 
 
 +             o n M o d e l S w a p ( m o d e l I d ) ; 
 
 +         } 
 
 +     } ; 
 
 + 
 
 +     / /   U n i f i e d   m o d e l   l i s t :   m e r g e   A P I   m o d e l s   +   l o c a l   s c a n n e d   f i l e s 
 
 +     c o n s t   a l l A v a i l a b l e M o d e l s   =   [ 
 
 +         . . . m o d e l s . m a p ( ( m )   = >   ( {   i d :   m . i d ,   l a b e l :   g e t D i s p l a y N a m e ( m . i d )   } ) ) , 
 
 +         . . . l o c a l M o d e l s . m a p ( ( m )   = >   ( {   i d :   m . p a t h ,   l a b e l :   g e t D i s p l a y N a m e ( m . p a t h )   } ) ) , 
 
 +     ] ; 
 
 +     / /   D e d u p l i c a t e   b y   l a b e l   ( d i s p l a y   n a m e )   -   s a m e   n a m e   m e a n s   s a m e   m o d e l 
 
 +     c o n s t   s e e n L a b e l s   =   n e w   S e t < s t r i n g > ( ) ; 
 
 +     c o n s t   d e d u p e d M o d e l s   =   a l l A v a i l a b l e M o d e l s . f i l t e r ( ( m )   = >   { 
 
 +         i f   ( s e e n L a b e l s . h a s ( m . l a b e l ) )   r e t u r n   f a l s e ; 
 
 +         s e e n L a b e l s . a d d ( m . l a b e l ) ; 
 
 +         r e t u r n   t r u e ; 
 
 +     } ) ; 
 
 + 
 
 +     / /   S h o w   a l l   a v a i l a b l e   m o d e l s   i n   t h e   s e l e c t o r 
 
 +     c o n s t   s e l e c t e d L a b e l   =   g e t D i s p l a y N a m e ( s e l e c t e d M o d e l )   | |   " N o   m o d e l " ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " m o d e l - s e l e c t o r - p i l l - w r a p p e r "   r e f = { d r o p d o w n R e f } > 
 
 +             < b u t t o n 
 
 +                 t y p e = " b u t t o n " 
 
 +                 c l a s s N a m e = " m o d e l - s e l e c t o r - p i l l " 
 
 +                 o n C l i c k = { ( )   = >   s e t D r o p d o w n O p e n ( ! d r o p d o w n O p e n ) } 
 
 +                 d i s a b l e d = { d e d u p e d M o d e l s . l e n g t h   = = =   0   | |   i s S w a p p i n g } 
 
 +                 t i t l e = { d e d u p e d M o d e l s . l e n g t h   = = =   0   ?   " S t a r t   s e r v e r   t o   l o a d   m o d e l s "   :   " " } 
 
 +                 a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " 
 
 +                 a r i a - e x p a n d e d = { d r o p d o w n O p e n } 
 
 +             > 
 
 +                 < s p a n   c l a s s N a m e = { ` m o d e l - s t a t u s - d o t   s t a t u s - $ { s t a t u s } ` }   a r i a - h i d d e n = " t r u e "   / > 
 
 +                 { i s S w a p p i n g   ?   ( 
 
 +                     < L o a d e r 2   s i z e = { 1 2 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " a n i m a t e - s p i n "   / > 
 
 +                 )   :   ( 
 
 +                     < s p a n   c l a s s N a m e = " m o d e l - s e l e c t o r - l a b e l " > { s e l e c t e d L a b e l } < / s p a n > 
 
 +                 ) } 
 
 +                 < C h e v r o n D o w n   s i z e = { 1 2 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " m o d e l - s e l e c t o r - c h e v r o n "   / > 
 
 +             < / b u t t o n > 
 
 +             { d r o p d o w n O p e n   & &   ( 
 
 +                 < u l   c l a s s N a m e = " m o d e l - s e l e c t o r - m e n u "   r o l e = " l i s t b o x " > 
 
 +                     { d e d u p e d M o d e l s . m a p ( ( m )   = >   ( 
 
 +                         < l i 
 
 +                             k e y = { m . i d } 
 
 +                             r o l e = " o p t i o n " 
 
 +                             a r i a - s e l e c t e d = { m . i d   = = =   s e l e c t e d M o d e l } 
 
 +                             c l a s s N a m e = { ` m o d e l - s e l e c t o r - i t e m $ { m . i d   = = =   s e l e c t e d M o d e l   ?   "   m o d e l - s e l e c t o r - i t e m - - s e l e c t e d "   :   " " } ` } 
 
 +                             o n C l i c k = { ( )   = >   h a n d l e S e l e c t M o d e l ( m . i d ) } 
 
 +                         > 
 
 +                             { m . l a b e l } 
 
 +                         < / l i > 
 
 +                     ) ) } 
 
 +                 < / u l > 
 
 +             ) } 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 \   N o   n e w l i n e   a t   e n d   o f   f i l e 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . c s s   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . c s s 
 
 i n d e x   e 0 a 0 2 e e . . b 4 6 d 9 f 0   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . c s s 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . c s s 
 
 @ @   - 1 , 8   + 1 , 8   @ @ 
 
   . s i d e b a r   { 
 
 -     w i d t h :   2 8 0 p x ; 
 
 -     m i n - w i d t h :   2 8 0 p x ; 
 
 -     b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
 -     b o r d e r - r i g h t :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     w i d t h :   2 8 8 p x ; 
 
 +     m i n - w i d t h :   2 8 8 p x ; 
 
 +     b a c k g r o u n d :   # 1 8 1 8 1 b ; 
 
 +     b o r d e r - r i g h t :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
       d i s p l a y :   f l e x ; 
 
       f l e x - d i r e c t i o n :   c o l u m n ; 
 
       o v e r f l o w :   h i d d e n ; 
 
 @ @   - 1 8 , 1 2   + 1 8 , 1 0   @ @ 
 
       d i s p l a y :   n o n e ; 
 
   } 
 
   
 
 - / *           H e a d e r           * / 
 
   . s i d e b a r - h e a d e r   { 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 -     p a d d i n g :   1 6 p x   1 6 p x   1 2 p x ; 
 
 -     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     p a d d i n g :   1 2 p x   1 6 p x   8 p x ; 
 
       g a p :   8 p x ; 
 
       f l e x - s h r i n k :   0 ; 
 
   } 
 
 @ @   - 3 1 , 1 8 1   + 2 9 , 1 7 3   @ @ 
 
   . s i d e b a r - b r a n d   { 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   8 p x ; 
 
       f l e x :   1 ; 
 
       m i n - w i d t h :   0 ; 
 
   } 
 
   
 
 - . b r a n d - n a m e   { 
 
 -     f o n t - s i z e :   1 4 p x ; 
 
 -     f o n t - w e i g h t :   6 0 0 ; 
 
 -     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
 + . b r a n d - m a r k   { 
 
 +     w i d t h :   2 4 p x ; 
 
 +     h e i g h t :   2 4 p x ; 
 
 +     b o r d e r - r a d i u s :   7 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 ) ; 
 
       c o l o r :   v a r ( - - t e x t ) ; 
 
 - } 
 
 - 
 
 - . i c o n - b t n   { 
 
 -     b a c k g r o u n d :   n o n e ; 
 
 -     b o r d e r :   n o n e ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 -     c u r s o r :   p o i n t e r ; 
 
 -     w i d t h :   3 2 p x ; 
 
 -     h e i g h t :   3 2 p x ; 
 
 -     d i s p l a y :   f l e x ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 -     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 -     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   c o l o r   0 . 1 5 s ; 
 
       f l e x - s h r i n k :   0 ; 
 
 -     p a d d i n g :   0 ; 
 
   } 
 
   
 
 - . i c o n - b t n : h o v e r   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 + . b r a n d - c o p y   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     m i n - w i d t h :   0 ; 
 
 + } 
 
 + 
 
 + . b r a n d - n a m e   { 
 
 +     f o n t - s i z e :   1 4 p x ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     l e t t e r - s p a c i n g :   - 0 . 0 1 e m ; 
 
       c o l o r :   v a r ( - - t e x t ) ; 
 
   } 
 
   
 
 - / *           M o d e l   s e c t i o n           * / 
 
 - . m o d e l - s e c t i o n   { 
 
 -     p a d d i n g :   1 0 p x   1 6 p x ; 
 
 -     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 + . s i d e b a r - n a v - s e c t i o n   { 
 
 +     p a d d i n g :   4 p x   1 0 p x   1 0 p x ; 
 
       f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
 - . m o d e l - s e c t i o n - l a b e l   { 
 
 -     f o n t - s i z e :   1 1 p x ; 
 
 -     f o n t - w e i g h t :   6 0 0 ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 -     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 -     l e t t e r - s p a c i n g :   0 . 0 6 e m ; 
 
 -     m a r g i n - b o t t o m :   6 p x ; 
 
 + . s i d e b a r - n a v - l i s t   { 
 
 +     d i s p l a y :   g r i d ; 
 
 +     g a p :   4 p x ; 
 
   } 
 
   
 
 - . m o d e l - r o w   { 
 
 + . s i d e b a r - n a v - i t e m   { 
 
 +     w i d t h :   1 0 0 % ; 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 -     g a p :   8 p x ; 
 
 - } 
 
 - 
 
 - . s t a t u s - d o t   { 
 
 -     w i d t h :   7 p x ; 
 
 -     h e i g h t :   7 p x ; 
 
 -     b o r d e r - r a d i u s :   5 0 % ; 
 
 -     f l e x - s h r i n k :   0 ; 
 
 -     t r a n s i t i o n :   b a c k g r o u n d   0 . 3 s ,   b o x - s h a d o w   0 . 3 s ; 
 
 - } 
 
 - 
 
 - . s t a t u s - d o t . s t a t u s - o k   { 
 
 -     b a c k g r o u n d :   v a r ( - - s u c c e s s ) ; 
 
 -     b o x - s h a d o w :   0   0   6 p x   r g b a ( 4 8 , 2 0 9 , 8 8 , 0 . 5 ) ; 
 
 +     g a p :   1 0 p x ; 
 
 +     b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     c o l o r :   # d 4 d 4 d 8 ; 
 
 +     b o r d e r - r a d i u s :   1 2 p x ; 
 
 +     p a d d i n g :   9 p x   1 2 p x ; 
 
 +     f o n t :   i n h e r i t ; 
 
 +     f o n t - s i z e :   1 4 p x ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     t e x t - a l i g n :   l e f t ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   b o r d e r - c o l o r   0 . 2 s ,   c o l o r   0 . 2 s ; 
 
   } 
 
   
 
 - . s t a t u s - d o t . s t a t u s - e r r o r   { 
 
 -     b a c k g r o u n d :   v a r ( - - d a n g e r ) ; 
 
 + . s i d e b a r - n a v - i t e m : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 6 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 +     c o l o r :   # f f f ; 
 
   } 
 
   
 
 - . s t a t u s - d o t . s t a t u s - l o a d i n g   { 
 
 -     b a c k g r o u n d :   v a r ( - - w a r n i n g ) ; 
 
 -     a n i m a t i o n :   p u l s e   1 . 2 s   e a s e - i n - o u t   i n f i n i t e ; 
 
 + . s i d e b a r - n a v - i t e m   s v g   { 
 
 +     c o l o r :   # a 1 a 1 a a ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
 - @ k e y f r a m e s   p u l s e   { 
 
 -     0 % ,   1 0 0 %   {   o p a c i t y :   1 ;   } 
 
 -     5 0 %   {   o p a c i t y :   0 . 3 5 ;   } 
 
 + . s i d e b a r - n a v - b a d g e   { 
 
 +     m a r g i n - l e f t :   a u t o ; 
 
 +     m i n - h e i g h t :   1 8 p x ; 
 
 +     p a d d i n g :   0   7 p x ; 
 
 +     b o r d e r - r a d i u s :   9 9 9 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 1 8 ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 9 6 ,   1 6 5 ,   2 5 0 ,   0 . 2 8 ) ; 
 
 +     c o l o r :   # b f d b f e ; 
 
 +     f o n t - s i z e :   1 0 p x ; 
 
 +     f o n t - w e i g h t :   6 0 0 ; 
 
   } 
 
   
 
 - . m o d e l - s e l e c t   { 
 
 -     f l e x :   1 ; 
 
 -     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 -     b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ; 
 
 -     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 -     f o n t - s i z e :   1 3 p x ; 
 
 -     p a d d i n g :   6 p x   2 8 p x   6 p x   8 p x ; 
 
 -     o u t l i n e :   n o n e ; 
 
 + . i c o n - b t n   { 
 
 +     b a c k g r o u n d :   n o n e ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     c o l o r :   # a 1 a 1 a a ; 
 
       c u r s o r :   p o i n t e r ; 
 
 -     m i n - w i d t h :   0 ; 
 
 -     f o n t - f a m i l y :   i n h e r i t ; 
 
 -     t r a n s i t i o n :   b o r d e r - c o l o r   0 . 1 5 s ,   b a c k g r o u n d   0 . 1 5 s ; 
 
 -     a p p e a r a n c e :   n o n e ; 
 
 -     b a c k g r o u n d - i m a g e :   u r l ( " d a t a : i m a g e / s v g + x m l , % 3 C s v g   x m l n s = ' h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g '   w i d t h = ' 1 0 '   h e i g h t = ' 6 '   v i e w B o x = ' 0   0   1 0   6 ' % 3 E % 3 C p a t h   d = ' M 0   0 l 5   6   5 - 6 z '   f i l l = ' % 2 3 6 b 7 2 8 0 ' / % 3 E % 3 C / s v g % 3 E " ) ; 
 
 -     b a c k g r o u n d - r e p e a t :   n o - r e p e a t ; 
 
 -     b a c k g r o u n d - p o s i t i o n :   r i g h t   8 p x   c e n t e r ; 
 
 - } 
 
 - 
 
 - . m o d e l - s e l e c t : h o v e r   { 
 
 -     b a c k g r o u n d - c o l o r :   v a r ( - - b g 3 ) ; 
 
 -     b o r d e r - c o l o r :   v a r ( - - b o r d e r ) ; 
 
 - } 
 
 - 
 
 - . m o d e l - s e l e c t : f o c u s   { 
 
 -     b o r d e r - c o l o r :   v a r ( - - a c c e n t ) ; 
 
 -     b a c k g r o u n d - c o l o r :   v a r ( - - b g 3 ) ; 
 
 +     w i d t h :   3 2 p x ; 
 
 +     h e i g h t :   3 2 p x ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     b o r d e r - r a d i u s :   1 0 p x ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   c o l o r   0 . 2 s ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 +     p a d d i n g :   0 ; 
 
   } 
 
   
 
 - . m o d e l - s e l e c t : d i s a b l e d   { 
 
 -     o p a c i t y :   0 . 5 ; 
 
 -     c u r s o r :   n o t - a l l o w e d ; 
 
 + . i c o n - b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     c o l o r :   # f f f ; 
 
   } 
 
   
 
 - / *           S i d e b a r   a c t i o n s           * / 
 
   . s i d e b a r - a c t i o n s   { 
 
 -     p a d d i n g :   1 0 p x   1 6 p x   6 p x ; 
 
 +     p a d d i n g :   4 p x   1 0 p x   8 p x ; 
 
       f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
   . n e w - c h a t - b t n   { 
 
       w i d t h :   1 0 0 % ; 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 -     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 -     p a d d i n g :   8 p x   1 2 p x ; 
 
 -     f o n t - s i z e :   1 3 p x ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     c o l o r :   # f f f ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
 +     p a d d i n g :   1 0 p x   1 3 p x ; 
 
 +     f o n t - s i z e :   1 4 p x ; 
 
       f o n t - w e i g h t :   5 0 0 ; 
 
       c u r s o r :   p o i n t e r ; 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 -     j u s t i f y - c o n t e n t :   f l e x - s t a r t ; 
 
       g a p :   8 p x ; 
 
 -     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   c o l o r   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   c o l o r   0 . 2 s ,   b o r d e r - c o l o r   0 . 2 s ,   t r a n s f o r m   0 . 2 s ; 
 
       f o n t - f a m i l y :   i n h e r i t ; 
 
 -     h e i g h t :   3 6 p x ; 
 
   } 
 
   
 
   . n e w - c h a t - b t n : h o v e r   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 -     b o r d e r - c o l o r :   v a r ( - - b o r d e r ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 6 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
   } 
 
   
 
   . n e w - c h a t - b t n : a c t i v e   { 
 
 -     t r a n s f o r m :   s c a l e ( 0 . 9 8 ) ; 
 
 +     t r a n s f o r m :   s c a l e ( 0 . 9 8 5 ) ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - l i s t - m e t a   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     p a d d i n g :   1 4 p x   1 4 p x   6 p x ; 
 
 +     g a p :   1 0 p x ; 
 
   } 
 
   
 
 - / *           C h a t   l i s t           * / 
 
   . c h a t - l i s t - s e c t i o n - l a b e l   { 
 
       f o n t - s i z e :   1 1 p x ; 
 
       f o n t - w e i g h t :   6 0 0 ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 -     t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
 -     l e t t e r - s p a c i n g :   0 . 0 6 e m ; 
 
 -     p a d d i n g :   1 2 p x   1 6 p x   4 p x ; 
 
 -     f l e x - s h r i n k :   0 ; 
 
 +     c o l o r :   # a 1 a 1 a a ; 
 
 +     l e t t e r - s p a c i n g :   0 . 0 2 e m ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - l i s t - f i l t e r   { 
 
 +     f o n t - s i z e :   1 1 p x ; 
 
 +     c o l o r :   # 7 1 7 1 7 a ; 
 
   } 
 
   
 
   . c h a t - l i s t   { 
 
       f l e x :   1 ; 
 
       o v e r f l o w - y :   a u t o ; 
 
 -     p a d d i n g :   4 p x   8 p x   8 p x ; 
 
 +     p a d d i n g :   0   1 0 p x   1 0 p x ; 
 
       d i s p l a y :   f l e x ; 
 
       f l e x - d i r e c t i o n :   c o l u m n ; 
 
 -     g a p :   1 p x ; 
 
 +     g a p :   4 p x ; 
 
   } 
 
   
 
   . c h a t - l i s t - e m p t y   { 
 
       t e x t - a l i g n :   c e n t e r ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     c o l o r :   # 7 1 7 1 7 a ; 
 
       f o n t - s i z e :   1 2 p x ; 
 
 -     p a d d i n g :   2 4 p x   0 ; 
 
 +     p a d d i n g :   2 4 p x   8 p x   2 8 p x ; 
 
       l i n e - h e i g h t :   1 . 6 ; 
 
   } 
 
   
 
 @ @   - 2 1 3 , 1 1   + 2 0 3 , 1 2   @ @ 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       g a p :   4 p x ; 
 
 -     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
       f o n t - s i z e :   1 3 p x ; 
 
 -     c o l o r :   v a r ( - - t e x t 2 ) ; 
 
 -     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 2 s ,   c o l o r   0 . 1 2 s ; 
 
 +     c o l o r :   # d 4 d 4 d 8 ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   c o l o r   0 . 2 s ,   b o r d e r - c o l o r   0 . 2 s ; 
 
       p o s i t i o n :   r e l a t i v e ; 
 
 +     b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ; 
 
   } 
 
   
 
   . c h a t - i t e m - b u t t o n   { 
 
 @ @   - 2 2 5 , 2 9   + 2 1 6 , 3 9   @ @ 
 
       m i n - w i d t h :   0 ; 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
 -     p a d d i n g :   8 p x   1 0 p x ; 
 
 +     g a p :   1 0 p x ; 
 
 +     p a d d i n g :   9 p x   1 0 p x ; 
 
       b a c k g r o u n d :   t r a n s p a r e n t ; 
 
       b o r d e r :   0 ; 
 
       c o l o r :   i n h e r i t ; 
 
       c u r s o r :   p o i n t e r ; 
 
       f o n t :   i n h e r i t ; 
 
       t e x t - a l i g n :   l e f t ; 
 
 -     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
 
 - } 
 
 - 
 
 - . c h a t - i t e m : h o v e r   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
   } 
 
   
 
 + . c h a t - i t e m : h o v e r , 
 
   . c h a t - i t e m : f o c u s - w i t h i n   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 2 ) ; 
 
 +     c o l o r :   # f f f ; 
 
   } 
 
   
 
   . c h a t - i t e m . a c t i v e   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 +     c o l o r :   # f f f ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ; 
 
 + } 
 
 + 
 
 + . c h a t - i t e m - i c o n   { 
 
 +     w i d t h :   2 4 p x ; 
 
 +     h e i g h t :   2 4 p x ; 
 
 +     b o r d e r - r a d i u s :   8 p x ; 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 4 ) ; 
 
 +     c o l o r :   # a 1 a 1 a a ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
   . c h a t - i t e m - t i t l e   { 
 
 @ @   - 2 6 3 , 4 8   + 2 6 4 , 8 3   @ @ 
 
       o p a c i t y :   0 ; 
 
       b a c k g r o u n d :   n o n e ; 
 
       b o r d e r :   n o n e ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     c o l o r :   # 7 1 7 1 7 a ; 
 
       c u r s o r :   p o i n t e r ; 
 
       w i d t h :   2 8 p x ; 
 
       h e i g h t :   2 8 p x ; 
 
       d i s p l a y :   f l e x ; 
 
       a l i g n - i t e m s :   c e n t e r ; 
 
       j u s t i f y - c o n t e n t :   c e n t e r ; 
 
 -     b o r d e r - r a d i u s :   4 p x ; 
 
 -     t r a n s i t i o n :   o p a c i t y   0 . 1 5 s ,   b a c k g r o u n d   0 . 1 5 s ,   c o l o r   0 . 1 5 s ; 
 
 +     b o r d e r - r a d i u s :   8 p x ; 
 
 +     t r a n s i t i o n :   o p a c i t y   0 . 2 s ,   b a c k g r o u n d   0 . 2 s ,   c o l o r   0 . 2 s ; 
 
       f l e x - s h r i n k :   0 ; 
 
       p a d d i n g :   0 ; 
 
       m a r g i n - r i g h t :   4 p x ; 
 
   } 
 
   
 
 - . c h a t - i t e m : h o v e r   . c h a t - i t e m - d e l   { 
 
 -     o p a c i t y :   1 ; 
 
 - } 
 
 - 
 
 + . c h a t - i t e m : h o v e r   . c h a t - i t e m - d e l , 
 
   . c h a t - i t e m : f o c u s - w i t h i n   . c h a t - i t e m - d e l , 
 
   . c h a t - i t e m . a c t i v e   . c h a t - i t e m - d e l   { 
 
       o p a c i t y :   1 ; 
 
   } 
 
   
 
   . c h a t - i t e m - d e l : h o v e r   { 
 
 -     b a c k g r o u n d :   r g b a ( 2 4 0 , 6 4 , 6 4 , 0 . 1 5 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 4 0 ,   6 4 ,   6 4 ,   0 . 1 5 ) ; 
 
       c o l o r :   v a r ( - - d a n g e r ) ; 
 
   } 
 
   
 
 - / *           F o o t e r           * / 
 
   . s i d e b a r - f o o t e r   { 
 
 -     p a d d i n g :   8 p x   1 6 p x ; 
 
 -     b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     p a d d i n g :   1 2 p x   1 4 p x   1 6 p x ; 
 
       d i s p l a y :   f l e x ; 
 
 -     a l i g n - i t e m s :   c e n t e r ; 
 
 -     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 +     g a p :   1 0 p x ; 
 
       f l e x - s h r i n k :   0 ; 
 
   } 
 
   
 
 - . f o o t e r - v e r s i o n   { 
 
 -     f o n t - s i z e :   1 0 p x ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 -     l e t t e r - s p a c i n g :   0 . 0 2 e m ; 
 
 + . s i d e b a r - s h a r e - b t n   { 
 
 +     w i d t h :   1 0 0 % ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
 +     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 2 5 ) ; 
 
 +     c o l o r :   # f f f ; 
 
 +     b o r d e r - r a d i u s :   1 4 p x ; 
 
 +     p a d d i n g :   1 0 p x   1 2 p x ; 
 
 +     t e x t - a l i g n :   l e f t ; 
 
 +     f o n t - s i z e :   1 3 p x ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   b o r d e r - c o l o r   0 . 2 s ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - s h a r e - b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 3 9 ,   3 9 ,   4 2 ,   0 . 9 6 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - f o o t e r - c o p y   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   1 0 p x ; 
 
 + } 
 
 + 
 
 + . f o o t e r - m e t a   { 
 
 +     f o n t - s i z e :   1 1 p x ; 
 
 +     c o l o r :   # a 1 a 1 a a ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - f o o t e r - l i n k   { 
 
 +     d i s p l a y :   i n l i n e - f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 +     b o r d e r :   0 ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     c o l o r :   # 7 1 7 1 7 a ; 
 
 +     f o n t - s i z e :   1 1 p x ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     p a d d i n g :   0 ; 
 
 + } 
 
 + 
 
 + . s i d e b a r - f o o t e r - l i n k : h o v e r   { 
 
 +     c o l o r :   # d 4 d 4 d 8 ; 
 
   } 
 
   
 
   @ m e d i a   ( m a x - w i d t h :   9 6 0 p x )   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t e s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t e s t . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 7 3 c f 8 8 c 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t e s t . t s x 
 
 @ @   - 0 , 0   + 1 , 1 6 1   @ @ 
 
 + / *   @ v i t e s t - e n v i r o n m e n t   j s d o m   * / 
 
 + 
 
 + i m p o r t   {   c r e a t e R o o t ,   t y p e   R o o t   }   f r o m   " r e a c t - d o m / c l i e n t " ; 
 
 + i m p o r t   {   a c t   }   f r o m   " r e a c t - d o m / t e s t - u t i l s " ; 
 
 + i m p o r t   {   a f t e r E a c h ,   b e f o r e E a c h ,   d e s c r i b e ,   e x p e c t ,   i t ,   v i   }   f r o m   " v i t e s t " ; 
 
 + i m p o r t   S i d e b a r   f r o m   " . / S i d e b a r " ; 
 
 + i m p o r t   t y p e   {   C h a t ,   M o d e l I n f o   }   f r o m   " . . / l i b / t y p e s " ; 
 
 + i m p o r t   t y p e   {   R u n t i m e M o d e l F i l e   }   f r o m   " . . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
 + 
 
 + / /              M o c k s                                                                                                                                                                                                            
 
 + 
 
 + c o n s t   d e f a u l t C h a t s :   C h a t [ ]   =   [ 
 
 +     {   i d :   1 ,   t i t l e :   " C h a t   O n e " ,   c r e a t e d _ a t :   1 ,   u p d a t e d _ a t :   2   } , 
 
 + ] ; 
 
 + 
 
 + c o n s t   d e f a u l t A p i M o d e l s :   M o d e l I n f o [ ]   =   [ 
 
 +     {   i d :   " a p i - m o d e l - 1 " ,   o b j e c t :   " m o d e l " ,   c r e a t e d :   1 ,   o w n e d _ b y :   " l o c a l "   } , 
 
 + ] ; 
 
 + 
 
 + c o n s t   d e f a u l t L o c a l M o d e l s :   R u n t i m e M o d e l F i l e [ ]   =   [ 
 
 +     {   n a m e :   " l o c a l - m o d e l - 1 . g g u f " ,   p a t h :   " / m o d e l s / l o c a l - m o d e l - 1 . g g u f "   } , 
 
 +     {   n a m e :   " l o c a l - m o d e l - 2 . g g u f " ,   p a t h :   " / m o d e l s / l o c a l - m o d e l - 2 . g g u f "   } , 
 
 + ] ; 
 
 + 
 
 + c o n s t   d e f a u l t P r o p s   =   { 
 
 +     c h a t s :   d e f a u l t C h a t s , 
 
 +     c u r r e n t C h a t I d :   1 , 
 
 +     o n S e l e c t C h a t :   v i . f n ( ) , 
 
 +     o n N e w C h a t :   v i . f n ( ) , 
 
 +     o n D e l e t e C h a t :   v i . f n ( ) , 
 
 +     m o d e l s :   d e f a u l t A p i M o d e l s , 
 
 +     l o c a l M o d e l s :   d e f a u l t L o c a l M o d e l s , 
 
 +     s e l e c t e d M o d e l :   " a p i - m o d e l - 1 " , 
 
 +     o n M o d e l C h a n g e :   v i . f n ( ) , 
 
 +     o n M o d e l S w a p :   v i . f n ( ) , 
 
 +     i s S w a p p i n g :   f a l s e , 
 
 +     s t a t u s :   " o k "   a s   c o n s t , 
 
 +     o n R e f r e s h M o d e l s :   v i . f n ( ) , 
 
 +     o n O p e n S e t t i n g s :   v i . f n ( ) , 
 
 +     o n C l o s e M o b i l e :   v i . f n ( ) , 
 
 + } ; 
 
 + 
 
 + / /              T e s t   h a r n e s s                                                                                                                                                                                       
 
 + 
 
 + d e s c r i b e ( " S i d e b a r   m o d e l   d r o p d o w n " ,   ( )   = >   { 
 
 +     l e t   c o n t a i n e r :   H T M L D i v E l e m e n t ; 
 
 +     l e t   r o o t :   R o o t ; 
 
 + 
 
 +     b e f o r e E a c h ( ( )   = >   { 
 
 +         / /   @ t s - e x p e c t - e r r o r   R e a c t   t e s t   e n v i r o n m e n t   f l a g 
 
 +         g l o b a l T h i s . I S _ R E A C T _ A C T _ E N V I R O N M E N T   =   t r u e ; 
 
 +         c o n t a i n e r   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
 +         d o c u m e n t . b o d y . a p p e n d C h i l d ( c o n t a i n e r ) ; 
 
 +         r o o t   =   c r e a t e R o o t ( c o n t a i n e r ) ; 
 
 +         v i . c l e a r A l l M o c k s ( ) ; 
 
 +     } ) ; 
 
 + 
 
 +     a f t e r E a c h ( ( )   = >   { 
 
 +         a c t ( ( )   = >   r o o t . u n m o u n t ( ) ) ; 
 
 +         c o n t a i n e r . r e m o v e ( ) ; 
 
 +         v i . r e s t o r e A l l M o c k s ( ) ; 
 
 +         / /   @ t s - e x p e c t - e r r o r   R e a c t   t e s t   e n v i r o n m e n t   f l a g 
 
 +         g l o b a l T h i s . I S _ R E A C T _ A C T _ E N V I R O N M E N T   =   f a l s e ; 
 
 +     } ) ; 
 
 + 
 
 +     f u n c t i o n   r e n d e r S i d e b a r ( p r o p s   =   { } )   { 
 
 +         a c t ( ( )   = >   { 
 
 +             r o o t . r e n d e r ( < S i d e b a r   { . . . d e f a u l t P r o p s }   { . . . p r o p s }   / > ) ; 
 
 +         } ) ; 
 
 +     } 
 
 + 
 
 +     i t ( " r e n d e r s   b o t h   A P I   m o d e l s   a n d   l o c a l   s c a n n e d   m o d e l s   i n   t h e   d r o p d o w n " ,   ( )   = >   { 
 
 +         r e n d e r S i d e b a r ( ) ; 
 
 + 
 
 +         / /   O p e n   t h e   d r o p d o w n 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a c t ( ( )   = >   { 
 
 +             t r i g g e r ? . c l i c k ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         c o n s t   t e x t   =   c o n t a i n e r . t e x t C o n t e n t   ? ?   " " ; 
 
 +         / /   A P I   m o d e l   s h o u l d   b e   p r e s e n t 
 
 +         e x p e c t ( t e x t ) . t o C o n t a i n ( " a p i - m o d e l - 1 " ) ; 
 
 +         / /   L o c a l   m o d e l s   s h o u l d   a l s o   b e   p r e s e n t 
 
 +         e x p e c t ( t e x t ) . t o C o n t a i n ( " l o c a l - m o d e l - 1 . g g u f " ) ; 
 
 +         e x p e c t ( t e x t ) . t o C o n t a i n ( " l o c a l - m o d e l - 2 . g g u f " ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " s h o w s   t h e   s e l e c t e d   m o d e l   l a b e l   i n   t h e   t r i g g e r " ,   ( )   = >   { 
 
 +         r e n d e r S i d e b a r ( {   s e l e c t e d M o d e l :   " / m o d e l s / l o c a l - m o d e l - 1 . g g u f "   } ) ; 
 
 + 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ? . t e x t C o n t e n t ) . t o C o n t a i n ( " l o c a l - m o d e l - 1 . g g u f " ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " c a l l s   o n M o d e l S w a p   w h e n   a   m o d e l   i s   s e l e c t e d   f r o m   t h e   d r o p d o w n " ,   ( )   = >   { 
 
 +         c o n s t   o n M o d e l S w a p   =   v i . f n ( ) ; 
 
 +         c o n s t   o n M o d e l C h a n g e   =   v i . f n ( ) ; 
 
 +         r e n d e r S i d e b a r ( {   o n M o d e l S w a p ,   o n M o d e l C h a n g e   } ) ; 
 
 + 
 
 +         / /   O p e n   t h e   d r o p d o w n 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a c t ( ( )   = >   { 
 
 +             t r i g g e r ? . c l i c k ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         / /   C l i c k   a   l o c a l   m o d e l   o p t i o n 
 
 +         c o n s t   o p t i o n s   =   c o n t a i n e r . q u e r y S e l e c t o r A l l ( ' [ r o l e = " o p t i o n " ] ' ) ; 
 
 +         c o n s t   l o c a l O p t i o n   =   A r r a y . f r o m ( o p t i o n s ) . f i n d ( ( e l )   = >   e l . t e x t C o n t e n t ? . i n c l u d e s ( " l o c a l - m o d e l - 1 . g g u f " ) ) ; 
 
 +         e x p e c t ( l o c a l O p t i o n ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a c t ( ( )   = >   { 
 
 +             ( l o c a l O p t i o n   a s   H T M L E l e m e n t ) ? . c l i c k ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         / /   B o t h   o n M o d e l C h a n g e   a n d   o n M o d e l S w a p   s h o u l d   b e   c a l l e d 
 
 +         e x p e c t ( o n M o d e l C h a n g e ) . t o H a v e B e e n C a l l e d W i t h ( " / m o d e l s / l o c a l - m o d e l - 1 . g g u f " ) ; 
 
 +         e x p e c t ( o n M o d e l S w a p ) . t o H a v e B e e n C a l l e d W i t h ( " / m o d e l s / l o c a l - m o d e l - 1 . g g u f " ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " s h o w s   a   s p i n n e r   w h e n   i s S w a p p i n g   i s   t r u e " ,   ( )   = >   { 
 
 +         r e n d e r S i d e b a r ( {   i s S w a p p i n g :   t r u e   } ) ; 
 
 + 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ) . t o B e T r u t h y ( ) ; 
 
 +         / /   T h e   s p i n n e r   s h o u l d   b e   p r e s e n t   i n s i d e   t h e   t r i g g e r 
 
 +         c o n s t   s p i n n e r   =   t r i g g e r ? . q u e r y S e l e c t o r ( " . a n i m a t e - s p i n " ) ; 
 
 +         e x p e c t ( s p i n n e r ) . t o B e T r u t h y ( ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " d e d u p l i c a t e s   m o d e l s   w h e n   A P I   a n d   l o c a l   m o d e l s   s h a r e   t h e   s a m e   i d " ,   ( )   = >   { 
 
 +         c o n s t   a p i M o d e l s :   M o d e l I n f o [ ]   =   [ 
 
 +             {   i d :   " / m o d e l s / l o c a l - m o d e l - 1 . g g u f " ,   o b j e c t :   " m o d e l " ,   c r e a t e d :   1 ,   o w n e d _ b y :   " l o c a l "   } , 
 
 +         ] ; 
 
 +         r e n d e r S i d e b a r ( {   m o d e l s :   a p i M o d e l s   } ) ; 
 
 + 
 
 +         / /   O p e n   t h e   d r o p d o w n 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ) . t o B e T r u t h y ( ) ; 
 
 + 
 
 +         a c t ( ( )   = >   { 
 
 +             t r i g g e r ? . c l i c k ( ) ; 
 
 +         } ) ; 
 
 + 
 
 +         / /   C o u n t   h o w   m a n y   t i m e s   " l o c a l - m o d e l - 1 . g g u f "   a p p e a r s   a s   a n   o p t i o n 
 
 +         c o n s t   o p t i o n s   =   c o n t a i n e r . q u e r y S e l e c t o r A l l ( ' [ r o l e = " o p t i o n " ] ' ) ; 
 
 +         c o n s t   m a t c h i n g O p t i o n s   =   A r r a y . f r o m ( o p t i o n s ) . f i l t e r ( ( e l )   = >   e l . t e x t C o n t e n t ? . i n c l u d e s ( " l o c a l - m o d e l - 1 . g g u f " ) ) ; 
 
 +         e x p e c t ( m a t c h i n g O p t i o n s ) . t o H a v e L e n g t h ( 1 ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " d i s a b l e s   t h e   d r o p d o w n   w h e n   n o   m o d e l s   a r e   a v a i l a b l e " ,   ( )   = >   { 
 
 +         r e n d e r S i d e b a r ( {   m o d e l s :   [ ] ,   l o c a l M o d e l s :   [ ]   } ) ; 
 
 + 
 
 +         c o n s t   t r i g g e r   =   c o n t a i n e r . q u e r y S e l e c t o r ( ' [ a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " ] ' )   a s   H T M L B u t t o n E l e m e n t   |   n u l l ; 
 
 +         e x p e c t ( t r i g g e r ? . d i s a b l e d ) . t o B e ( t r u e ) ; 
 
 +     } ) ; 
 
 + } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x 
 
 i n d e x   5 4 6 9 5 7 a . . 7 9 a e 1 0 5   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / S i d e b a r . t s x 
 
 @ @   - 1 , 1 1 0   + 1 , 1 1 0   @ @ 
 
 - i m p o r t   t y p e   {   C h a t ,   M o d e l I n f o ,   S e r v e r S t a t u s   }   f r o m   " . . / l i b / t y p e s " ; 
 
 - i m p o r t   {   P l u s ,   S e t t i n g s ,   X ,   T r a s h 2 ,   R e f r e s h C w   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + i m p o r t   {   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   t y p e   {   C h a t   }   f r o m   " . . / l i b / t y p e s " ; 
 
 + i m p o r t   {   P l u s ,   X ,   T r a s h 2 ,   B o t ,   S e a r c h ,   L i b r a r y ,   P a n e l L e f t ,   F i l e C o d e 2 ,   S h i e l d A l e r t ,   S p a r k l e s ,   F o l d e r K a n b a n ,   S e t t i n g s 2   }   f r o m   " l u c i d e - r e a c t " ; 
 
   i m p o r t   " . / S i d e b a r . c s s " ; 
 
   
 
   i n t e r f a c e   P r o p s   { 
 
       c h a t s :   C h a t [ ] ; 
 
       c u r r e n t C h a t I d :   n u m b e r   |   n u l l ; 
 
 +     i n i t i a l S c r e e n ? :   b o o l e a n ; 
 
       o n S e l e c t C h a t :   ( i d :   n u m b e r )   = >   v o i d ; 
 
       o n N e w C h a t :   ( )   = >   v o i d ; 
 
       o n D e l e t e C h a t :   ( i d :   n u m b e r )   = >   v o i d ; 
 
 -     m o d e l s :   M o d e l I n f o [ ] ; 
 
 -     s e l e c t e d M o d e l :   s t r i n g ; 
 
 -     o n M o d e l C h a n g e :   ( v :   s t r i n g )   = >   v o i d ; 
 
 -     s t a t u s :   S e r v e r S t a t u s ; 
 
 -     o n R e f r e s h M o d e l s :   ( )   = >   v o i d ; 
 
       o n O p e n S e t t i n g s :   ( )   = >   v o i d ; 
 
       o n C l o s e M o b i l e :   ( )   = >   v o i d ; 
 
   } 
 
   
 
   e x p o r t   d e f a u l t   f u n c t i o n   S i d e b a r ( { 
 
 -     c h a t s ,   c u r r e n t C h a t I d ,   o n S e l e c t C h a t ,   o n N e w C h a t ,   o n D e l e t e C h a t , 
 
 -     m o d e l s ,   s e l e c t e d M o d e l ,   o n M o d e l C h a n g e ,   s t a t u s ,   o n R e f r e s h M o d e l s , 
 
 +     c h a t s ,   c u r r e n t C h a t I d ,   i n i t i a l S c r e e n   =   f a l s e ,   o n S e l e c t C h a t ,   o n N e w C h a t ,   o n D e l e t e C h a t , 
 
       o n O p e n S e t t i n g s , 
 
       o n C l o s e M o b i l e , 
 
   } :   P r o p s )   { 
 
 +     c o n s t   [ s h a r e C o p i e d ,   s e t S h a r e C o p i e d ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     c o n s t   w o r k s p a c e N a v I t e m s   =   [ 
 
 +         {   l a b e l :   " A g e n t s " ,   i c o n :   B o t ,   b a d g e :   " N e w "   } , 
 
 +         {   l a b e l :   " S e a r c h " ,   i c o n :   S e a r c h   } , 
 
 +         {   l a b e l :   " L i b r a r y " ,   i c o n :   L i b r a r y   } , 
 
 +     ] ; 
 
 + 
 
 +     c o n s t   g e t T a s k I c o n   =   ( t i t l e :   s t r i n g )   = >   { 
 
 +         c o n s t   n o r m a l i z e d   =   t i t l e . t o L o w e r C a s e ( ) ; 
 
 +         i f   ( n o r m a l i z e d . i n c l u d e s ( " e r r o r " )   | |   n o r m a l i z e d . i n c l u d e s ( " f i x " )   | |   n o r m a l i z e d . i n c l u d e s ( " b u g " ) )   r e t u r n   S h i e l d A l e r t ; 
 
 +         i f   ( n o r m a l i z e d . i n c l u d e s ( " d e s i g n " )   | |   n o r m a l i z e d . i n c l u d e s ( " u i " )   | |   n o r m a l i z e d . i n c l u d e s ( " l a n d i n g " ) )   r e t u r n   S p a r k l e s ; 
 
 +         i f   ( n o r m a l i z e d . i n c l u d e s ( " p r o j e c t " )   | |   n o r m a l i z e d . i n c l u d e s ( " p l a n " )   | |   n o r m a l i z e d . i n c l u d e s ( " r o a d m a p " ) )   r e t u r n   F o l d e r K a n b a n ; 
 
 +         r e t u r n   F i l e C o d e 2 ; 
 
 +     } ; 
 
 + 
 
 +     c o n s t   h a n d l e S h a r e   =   a s y n c   ( )   = >   { 
 
 +         t r y   { 
 
 +             a w a i t   n a v i g a t o r . c l i p b o a r d . w r i t e T e x t ( " F o r g e L M        l o c a l - f i r s t   A I   w o r k s p a c e " ) ; 
 
 +             s e t S h a r e C o p i e d ( t r u e ) ; 
 
 +             w i n d o w . s e t T i m e o u t ( ( )   = >   s e t S h a r e C o p i e d ( f a l s e ) ,   1 8 0 0 ) ; 
 
 +         }   c a t c h   { 
 
 +             s e t S h a r e C o p i e d ( f a l s e ) ; 
 
 +         } 
 
 +     } ; 
 
 + 
 
       r e t u r n   ( 
 
 -         < > 
 
 -             < a s i d e   c l a s s N a m e = " s i d e b a r " > 
 
 -                 { / *           H e a d e r           * / } 
 
 -                 < d i v   c l a s s N a m e = " s i d e b a r - h e a d e r " > 
 
 -                     < d i v   c l a s s N a m e = " s i d e b a r - b r a n d " > 
 
 -                         < s p a n   c l a s s N a m e = " b r a n d - n a m e " > F o r g e L M < / s p a n > 
 
 +         < a s i d e   c l a s s N a m e = { ` s i d e b a r $ { i n i t i a l S c r e e n   ?   "   s i d e b a r - - i n i t i a l "   :   " " } ` } > 
 
 +             < d i v   c l a s s N a m e = " s i d e b a r - h e a d e r " > 
 
 +                 < d i v   c l a s s N a m e = " s i d e b a r - b r a n d " > 
 
 +                     < d i v   c l a s s N a m e = " b r a n d - m a r k "   a r i a - h i d d e n = " t r u e " > 
 
 +                         < P a n e l L e f t   s i z e = { 1 5 }   s t r o k e W i d t h = { 1 . 8 }   / > 
 
                       < / d i v > 
 
 -                     < d i v   c l a s s N a m e = " s i d e b a r - h e a d e r - a c t i o n s " > 
 
 -                         < b u t t o n 
 
 -                             c l a s s N a m e = " i c o n - b t n " 
 
 -                             o n C l i c k = { o n O p e n S e t t i n g s } 
 
 -                             t i t l e = " S e t t i n g s " 
 
 -                             a r i a - l a b e l = " O p e n   s e t t i n g s " 
 
 -                             t y p e = " b u t t o n " 
 
 -                         > 
 
 -                             < S e t t i n g s   s i z e = { 1 6 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
 -                         < / b u t t o n > 
 
 -                         < b u t t o n 
 
 -                             c l a s s N a m e = " i c o n - b t n   s i d e b a r - c l o s e - b t n " 
 
 -                             o n C l i c k = { o n C l o s e M o b i l e } 
 
 -                             t i t l e = " C l o s e   n a v i g a t i o n " 
 
 -                             a r i a - l a b e l = " C l o s e   n a v i g a t i o n " 
 
 -                             t y p e = " b u t t o n " 
 
 -                         > 
 
 -                             < X   s i z e = { 1 6 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
 -                         < / b u t t o n > 
 
 +                     < d i v   c l a s s N a m e = " b r a n d - c o p y " > 
 
 +                         < s p a n   c l a s s N a m e = " b r a n d - n a m e " > F o r g e L M < / s p a n > 
 
                       < / d i v > 
 
                   < / d i v > 
 
   
 
 -                 { / *           A c t i v e   m o d e l   s e l e c t o r           * / } 
 
 -                 < d i v   c l a s s N a m e = " m o d e l - s e c t i o n " > 
 
 -                     < d i v   c l a s s N a m e = " m o d e l - s e c t i o n - l a b e l " > M o d e l < / d i v > 
 
 -                     < d i v   c l a s s N a m e = " m o d e l - r o w " > 
 
 -                         < d i v   c l a s s N a m e = { ` s t a t u s - d o t   s t a t u s - $ { s t a t u s } ` }   t i t l e = { s t a t u s }   a r i a - h i d d e n = " t r u e "   / > 
 
 -                         < s e l e c t 
 
 -                             c l a s s N a m e = " m o d e l - s e l e c t " 
 
 -                             v a l u e = { s e l e c t e d M o d e l } 
 
 -                             o n C h a n g e = { ( e )   = >   o n M o d e l C h a n g e ( e . t a r g e t . v a l u e ) } 
 
 -                             d i s a b l e d = { m o d e l s . l e n g t h   = = =   0 } 
 
 -                             t i t l e = { m o d e l s . l e n g t h   = = =   0   ?   " S t a r t   s e r v e r   t o   l o a d   m o d e l s "   :   " " } 
 
 -                             a r i a - l a b e l = " C h o o s e   a c t i v e   m o d e l " 
 
 -                         > 
 
 -                             { m o d e l s . l e n g t h   = = =   0   ?   ( 
 
 -                                 < o p t i o n   v a l u e = " " > S t a r t   s e r v e r   t o   l o a d   m o d e l s < / o p t i o n > 
 
 -                             )   :   ( 
 
 -                                 m o d e l s . m a p ( ( m )   = >   ( 
 
 -                                     < o p t i o n   k e y = { m . i d }   v a l u e = { m . i d } > { m . i d } < / o p t i o n > 
 
 -                                 ) ) 
 
 -                             ) } 
 
 -                         < / s e l e c t > 
 
 -                         < b u t t o n 
 
 -                             c l a s s N a m e = " i c o n - b t n " 
 
 -                             o n C l i c k = { o n R e f r e s h M o d e l s } 
 
 -                             t i t l e = " R e f r e s h   m o d e l s " 
 
 -                             a r i a - l a b e l = " R e f r e s h   m o d e l s " 
 
 -                             t y p e = " b u t t o n " 
 
 -                         > 
 
 -                             < R e f r e s h C w   s i z e = { 1 4 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
 -                         < / b u t t o n > 
 
 -                     < / d i v > 
 
 +                 < d i v   c l a s s N a m e = " s i d e b a r - h e a d e r - a c t i o n s " > 
 
 +                     < b u t t o n 
 
 +                         c l a s s N a m e = " i c o n - b t n   s i d e b a r - c l o s e - b t n " 
 
 +                         o n C l i c k = { o n C l o s e M o b i l e } 
 
 +                         t i t l e = " C l o s e   n a v i g a t i o n " 
 
 +                         a r i a - l a b e l = " C l o s e   n a v i g a t i o n " 
 
 +                         t y p e = " b u t t o n " 
 
 +                     > 
 
 +                         < X   s i z e = { 1 6 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
 +                     < / b u t t o n > 
 
                   < / d i v > 
 
 +             < / d i v > 
 
   
 
 -                 { / *           N e w   c h a t           * / } 
 
 -                 < d i v   c l a s s N a m e = " s i d e b a r - a c t i o n s " > 
 
 -                     < b u t t o n   c l a s s N a m e = " n e w - c h a t - b t n "   o n C l i c k = { o n N e w C h a t }   t y p e = " b u t t o n " > 
 
 -                         < P l u s   s i z e = { 1 6 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
 -                         < s p a n > N e w   C h a t < / s p a n > 
 
 -                     < / b u t t o n > 
 
 +             < d i v   c l a s s N a m e = " s i d e b a r - a c t i o n s   s i d e b a r - a c t i o n s - - t o p " > 
 
 +                 < b u t t o n   c l a s s N a m e = " n e w - c h a t - b t n "   o n C l i c k = { o n N e w C h a t }   t y p e = " b u t t o n " > 
 
 +                     < P l u s   s i z e = { 1 6 }   s t r o k e W i d t h = { 1 . 8 }   / > 
 
 +                     < s p a n > N e w   t a s k < / s p a n > 
 
 +                 < / b u t t o n > 
 
 +             < / d i v > 
 
 + 
 
 +             < d i v   c l a s s N a m e = " s i d e b a r - n a v - s e c t i o n " > 
 
 +                 < d i v   c l a s s N a m e = " s i d e b a r - n a v - l i s t "   a r i a - l a b e l = " W o r k s p a c e   n a v i g a t i o n " > 
 
 +                     { w o r k s p a c e N a v I t e m s . m a p ( ( {   l a b e l ,   i c o n :   I c o n ,   b a d g e   } )   = >   ( 
 
 +                         < b u t t o n   k e y = { l a b e l }   t y p e = " b u t t o n "   c l a s s N a m e = " s i d e b a r - n a v - i t e m " > 
 
 +                             < I c o n   s i z e = { 1 5 }   s t r o k e W i d t h = { 1 . 8 }   / > 
 
 +                             < s p a n > { l a b e l } < / s p a n > 
 
 +                             { b a d g e   ?   < s p a n   c l a s s N a m e = " s i d e b a r - n a v - b a d g e " > { b a d g e } < / s p a n >   :   n u l l } 
 
 +                         < / b u t t o n > 
 
 +                     ) ) } 
 
                   < / d i v > 
 
 +             < / d i v > 
 
   
 
 -                 { / *           C h a t   l i s t           * / } 
 
 -                 { c h a t s . l e n g t h   >   0   & &   ( 
 
 -                     < d i v   c l a s s N a m e = " c h a t - l i s t - s e c t i o n - l a b e l " > C o n v e r s a t i o n s < / d i v > 
 
 +             < d i v   c l a s s N a m e = " s i d e b a r - l i s t - m e t a " > 
 
 +                 < d i v   c l a s s N a m e = " c h a t - l i s t - s e c t i o n - l a b e l " > P r o j e c t s < / d i v > 
 
 +                 < d i v   c l a s s N a m e = " s i d e b a r - l i s t - f i l t e r " > A l l   t a s k s < / d i v > 
 
 +             < / d i v > 
 
 + 
 
 +             < n a v   c l a s s N a m e = " c h a t - l i s t "   a r i a - l a b e l = " C o n v e r s a t i o n   h i s t o r y " > 
 
 +                 { c h a t s . l e n g t h   = = =   0   & &   ( 
 
 +                     < d i v   c l a s s N a m e = " c h a t - l i s t - e m p t y " > 
 
 +                         N o   t a s k s   y e t . < b r   / > S t a r t   a   n e w   t a s k   a b o v e . 
 
 +                     < / d i v > 
 
                   ) } 
 
 -                 < n a v   c l a s s N a m e = " c h a t - l i s t "   a r i a - l a b e l = " C o n v e r s a t i o n   h i s t o r y " > 
 
 -                     { c h a t s . l e n g t h   = = =   0   & &   ( 
 
 -                         < d i v   c l a s s N a m e = " c h a t - l i s t - e m p t y " > 
 
 -                             N o   c o n v e r s a t i o n s   y e t . < b r   / > S t a r t   a   n e w   c h a t   a b o v e . 
 
 -                         < / d i v > 
 
 -                     ) } 
 
 -                     { c h a t s . m a p ( ( c h a t )   = >   ( 
 
 + 
 
 +                 { c h a t s . m a p ( ( c h a t )   = >   { 
 
 +                     c o n s t   T a s k I c o n   =   g e t T a s k I c o n ( c h a t . t i t l e ) ; 
 
 + 
 
 +                     r e t u r n   ( 
 
                           < d i v 
 
                               k e y = { c h a t . i d } 
 
                               c l a s s N a m e = { ` c h a t - i t e m   $ { c h a t . i d   = = =   c u r r e n t C h a t I d   ?   " a c t i v e "   :   " " } ` } 
 
 @ @   - 1 1 5 , 8   + 1 1 5 , 1 2   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S i d e b a r ( { 
 
                                   o n C l i c k = { ( )   = >   o n S e l e c t C h a t ( c h a t . i d ) } 
 
                                   a r i a - c u r r e n t = { c h a t . i d   = = =   c u r r e n t C h a t I d   ?   " p a g e "   :   u n d e f i n e d } 
 
                               > 
 
 +                                 < s p a n   c l a s s N a m e = " c h a t - i t e m - i c o n "   a r i a - h i d d e n = " t r u e " > 
 
 +                                     < T a s k I c o n   s i z e = { 1 4 }   s t r o k e W i d t h = { 1 . 8 }   / > 
 
 +                                 < / s p a n > 
 
                                   < s p a n   c l a s s N a m e = " c h a t - i t e m - t i t l e " > { c h a t . t i t l e } < / s p a n > 
 
                               < / b u t t o n > 
 
 + 
 
                               < b u t t o n 
 
                                   t y p e = " b u t t o n " 
 
                                   c l a s s N a m e = " c h a t - i t e m - d e l " 
 
 @ @   - 1 2 7 , 1 5   + 1 3 1 , 2 3   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S i d e b a r ( { 
 
                                   < T r a s h 2   s i z e = { 1 4 }   s t r o k e W i d t h = { 1 . 5 }   / > 
 
                               < / b u t t o n > 
 
                           < / d i v > 
 
 -                     ) ) } 
 
 -                 < / n a v > 
 
 +                     ) ; 
 
 +                 } ) } 
 
 +             < / n a v > 
 
   
 
 -                 { / *           F o o t e r           * / } 
 
 -                 < d i v   c l a s s N a m e = " s i d e b a r - f o o t e r " > 
 
 -                     < s p a n   c l a s s N a m e = " f o o t e r - v e r s i o n " > F o r g e L M   v 0 . 1 . 0 < / s p a n > 
 
 -                 < / d i v > 
 
 +             < d i v   c l a s s N a m e = " s i d e b a r - f o o t e r " > 
 
 +                 < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " s i d e b a r - s h a r e - b t n "   o n C l i c k = { ( )   = >   {   v o i d   h a n d l e S h a r e ( ) ;   } } > 
 
 +                     { s h a r e C o p i e d   ?   " L i n k   c o p i e d "   :   " S h a r e   F o r g e L M   w i t h   a   f r i e n d " } 
 
 +                 < / b u t t o n > 
 
   
 
 -             < / a s i d e > 
 
 -         < / > 
 
 +                 < d i v   c l a s s N a m e = " s i d e b a r - f o o t e r - c o p y " > 
 
 +                     < s p a n   c l a s s N a m e = " f o o t e r - m e t a " > L o c a l - f i r s t   w o r k s p a c e < / s p a n > 
 
 +                     < b u t t o n   t y p e = " b u t t o n "   c l a s s N a m e = " s i d e b a r - f o o t e r - l i n k "   o n C l i c k = { o n O p e n S e t t i n g s } > 
 
 +                         < S e t t i n g s 2   s i z e = { 1 2 }   s t r o k e W i d t h = { 1 . 8 }   / > 
 
 +                         < s p a n > S e t t i n g s < / s p a n > 
 
 +                     < / b u t t o n > 
 
 +                 < / d i v > 
 
 +             < / d i v > 
 
 +         < / a s i d e > 
 
       ) ; 
 
   } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . c s s   b / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . c s s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . e 2 b 2 e 7 e 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . c s s 
 
 @ @   - 0 , 0   + 1 , 9 7   @ @ 
 
 + . t o a s t - c o n t a i n e r   { 
 
 +     p o s i t i o n :   f i x e d ; 
 
 +     b o t t o m :   2 4 p x ; 
 
 +     r i g h t :   2 4 p x ; 
 
 +     z - i n d e x :   9 9 9 9 ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   8 p x ; 
 
 +     p o i n t e r - e v e n t s :   n o n e ; 
 
 +     m a x - w i d t h :   3 8 0 p x ; 
 
 +     w i d t h :   1 0 0 % ; 
 
 + } 
 
 + 
 
 + . t o a s t   { 
 
 +     b a c k g r o u n d :   # 1 e 2 2 2 8 ; 
 
 +     b o r d e r :   1 p x   s o l i d   # 2 a 3 0 4 0 ; 
 
 +     b o r d e r - r a d i u s :   1 0 p x ; 
 
 +     b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 4 ) ; 
 
 +     p a d d i n g :   1 2 p x   1 4 p x ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   f l e x - s t a r t ; 
 
 +     g a p :   1 2 p x ; 
 
 +     p o i n t e r - e v e n t s :   a l l ; 
 
 +     b o r d e r - l e f t - w i d t h :   3 p x ; 
 
 +     a n i m a t i o n :   t o a s t - i n   0 . 2 s   e a s e ; 
 
 + } 
 
 + 
 
 + @ k e y f r a m e s   t o a s t - i n   { 
 
 +     f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( 8 p x ) ;   } 
 
 +     t o       {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 
 + } 
 
 + 
 
 + . t o a s t - - i n f o         {   b o r d e r - l e f t - c o l o r :   # 4 b 8 6 f f ;   } 
 
 + . t o a s t - - w a r n i n g   {   b o r d e r - l e f t - c o l o r :   # f 5 9 e 0 b ;   } 
 
 + . t o a s t - - e r r o r       {   b o r d e r - l e f t - c o l o r :   # e f 4 4 4 4 ;   } 
 
 + 
 
 + . t o a s t - b o d y   { 
 
 +     f l e x :   1 ; 
 
 +     d i s p l a y :   f l e x ; 
 
 +     f l e x - d i r e c t i o n :   c o l u m n ; 
 
 +     g a p :   3 p x ; 
 
 +     m i n - w i d t h :   0 ; 
 
 + } 
 
 + 
 
 + . t o a s t - m e s s a g e   { 
 
 +     f o n t - s i z e :   1 3 p x ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   # e 8 e a f 0 ; 
 
 +     l i n e - h e i g h t :   1 . 4 ; 
 
 + } 
 
 + 
 
 + . t o a s t - d e t a i l   { 
 
 +     f o n t - s i z e :   1 2 p x ; 
 
 +     c o l o r :   # 8 b 9 2 a 0 ; 
 
 +     l i n e - h e i g h t :   1 . 4 ; 
 
 + } 
 
 + 
 
 + . t o a s t - a c t i o n s   { 
 
 +     d i s p l a y :   f l e x ; 
 
 +     a l i g n - i t e m s :   c e n t e r ; 
 
 +     g a p :   6 p x ; 
 
 +     f l e x - s h r i n k :   0 ; 
 
 + } 
 
 + 
 
 + . t o a s t - a c t i o n - b t n   { 
 
 +     f o n t - s i z e :   1 2 p x ; 
 
 +     f o n t - w e i g h t :   5 0 0 ; 
 
 +     c o l o r :   # 4 b 8 6 f f ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     b o r d e r :   1 p x   s o l i d   r g b a ( 7 5 ,   1 3 4 ,   2 5 5 ,   0 . 3 ) ; 
 
 +     b o r d e r - r a d i u s :   6 p x ; 
 
 +     p a d d i n g :   4 p x   1 0 p x ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     w h i t e - s p a c e :   n o w r a p ; 
 
 +     t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ,   b o r d e r - c o l o r   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . t o a s t - a c t i o n - b t n : h o v e r   { 
 
 +     b a c k g r o u n d :   r g b a ( 7 5 ,   1 3 4 ,   2 5 5 ,   0 . 1 ) ; 
 
 +     b o r d e r - c o l o r :   r g b a ( 7 5 ,   1 3 4 ,   2 5 5 ,   0 . 5 ) ; 
 
 + } 
 
 + 
 
 + . t o a s t - d i s m i s s - b t n   { 
 
 +     f o n t - s i z e :   1 1 p x ; 
 
 +     c o l o r :   # 5 a 6 0 7 0 ; 
 
 +     b a c k g r o u n d :   t r a n s p a r e n t ; 
 
 +     b o r d e r :   n o n e ; 
 
 +     c u r s o r :   p o i n t e r ; 
 
 +     p a d d i n g :   2 p x   4 p x ; 
 
 +     b o r d e r - r a d i u s :   4 p x ; 
 
 +     l i n e - h e i g h t :   1 ; 
 
 +     t r a n s i t i o n :   c o l o r   0 . 1 5 s ; 
 
 + } 
 
 + 
 
 + . t o a s t - d i s m i s s - b t n : h o v e r   { 
 
 +     c o l o r :   # 8 b 9 2 a 0 ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . c 3 a b 1 4 d 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / T o a s t . t s x 
 
 @ @   - 0 , 0   + 1 , 1 2 4   @ @ 
 
 + i m p o r t   {   c r e a t e C o n t e x t ,   u s e C a l l b a c k ,   u s e C o n t e x t ,   u s e R e f ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   " . / T o a s t . c s s " ; 
 
 + 
 
 + e x p o r t   t y p e   T o a s t V a r i a n t   =   ' i n f o '   |   ' w a r n i n g '   |   ' e r r o r ' ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   T o a s t O p t i o n s   { 
 
 +     i d ? :   s t r i n g ; 
 
 +     m e s s a g e :   s t r i n g ; 
 
 +     d e t a i l ? :   s t r i n g ; 
 
 +     a c t i o n ? :   {   l a b e l :   s t r i n g ;   o n C l i c k :   ( )   = >   v o i d   } ; 
 
 +     d u r a t i o n ? :   n u m b e r ;   / /   m s ,   0   =   p e r s i s t e n t 
 
 +     v a r i a n t ? :   T o a s t V a r i a n t ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   T o a s t I t e m   e x t e n d s   R e q u i r e d < O m i t < T o a s t O p t i o n s ,   ' i d '   |   ' a c t i o n ' > >   { 
 
 +     i d :   s t r i n g ; 
 
 +     a c t i o n ? :   {   l a b e l :   s t r i n g ;   o n C l i c k :   ( )   = >   v o i d   } ; 
 
 +     t i m e r I d ? :   R e t u r n T y p e < t y p e o f   s e t T i m e o u t > ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   T o a s t C o n t e x t V a l u e   { 
 
 +     s h o w T o a s t :   ( o p t s :   T o a s t O p t i o n s )   = >   v o i d ; 
 
 + } 
 
 + 
 
 + c o n s t   T o a s t C o n t e x t   =   c r e a t e C o n t e x t < T o a s t C o n t e x t V a l u e   |   n u l l > ( n u l l ) ; 
 
 + 
 
 + e x p o r t   f u n c t i o n   u s e T o a s t ( ) :   T o a s t C o n t e x t V a l u e   { 
 
 +     c o n s t   c t x   =   u s e C o n t e x t ( T o a s t C o n t e x t ) ; 
 
 +     i f   ( ! c t x )   t h r o w   n e w   E r r o r ( " u s e T o a s t   m u s t   b e   u s e d   i n s i d e   < T o a s t P r o v i d e r > " ) ; 
 
 +     r e t u r n   c t x ; 
 
 + } 
 
 + 
 
 + c o n s t   M A X _ T O A S T S   =   3 ; 
 
 + 
 
 + e x p o r t   f u n c t i o n   T o a s t P r o v i d e r ( {   c h i l d r e n   } :   {   c h i l d r e n :   R e a c t . R e a c t N o d e   } )   { 
 
 +     c o n s t   [ t o a s t s ,   s e t T o a s t s ]   =   u s e S t a t e < T o a s t I t e m [ ] > ( [ ] ) ; 
 
 +     c o n s t   c o u n t e r R e f   =   u s e R e f ( 0 ) ; 
 
 + 
 
 +     c o n s t   d i s m i s s   =   u s e C a l l b a c k ( ( i d :   s t r i n g )   = >   { 
 
 +         s e t T o a s t s ( ( p r e v )   = >   { 
 
 +             c o n s t   i t e m   =   p r e v . f i n d ( ( t )   = >   t . i d   = = =   i d ) ; 
 
 +             i f   ( i t e m ? . t i m e r I d )   c l e a r T i m e o u t ( i t e m . t i m e r I d ) ; 
 
 +             r e t u r n   p r e v . f i l t e r ( ( t )   = >   t . i d   ! = =   i d ) ; 
 
 +         } ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     c o n s t   s h o w T o a s t   =   u s e C a l l b a c k ( ( o p t s :   T o a s t O p t i o n s )   = >   { 
 
 +         c o n s t   i d   =   o p t s . i d   ? ?   ` t o a s t - $ { + + c o u n t e r R e f . c u r r e n t } ` ; 
 
 +         c o n s t   d u r a t i o n   =   o p t s . d u r a t i o n   ? ?   6 0 0 0 ; 
 
 +         c o n s t   v a r i a n t   =   o p t s . v a r i a n t   ? ?   ' i n f o ' ; 
 
 + 
 
 +         s e t T o a s t s ( ( p r e v )   = >   { 
 
 +             / /   D e d u p l i c a t e :   i f   s a m e   i d   e x i s t s ,   u p d a t e   i t 
 
 +             c o n s t   e x i s t i n g   =   p r e v . f i n d ( ( t )   = >   t . i d   = = =   i d ) ; 
 
 +             i f   ( e x i s t i n g ? . t i m e r I d )   c l e a r T i m e o u t ( e x i s t i n g . t i m e r I d ) ; 
 
 + 
 
 +             l e t   t i m e r I d :   R e t u r n T y p e < t y p e o f   s e t T i m e o u t >   |   u n d e f i n e d ; 
 
 +             i f   ( d u r a t i o n   >   0 )   { 
 
 +                 t i m e r I d   =   s e t T i m e o u t ( ( )   = >   d i s m i s s ( i d ) ,   d u r a t i o n ) ; 
 
 +             } 
 
 + 
 
 +             c o n s t   n e w I t e m :   T o a s t I t e m   =   { 
 
 +                 i d , 
 
 +                 m e s s a g e :   o p t s . m e s s a g e , 
 
 +                 d e t a i l :   o p t s . d e t a i l   ? ?   ' ' , 
 
 +                 a c t i o n :   o p t s . a c t i o n , 
 
 +                 d u r a t i o n , 
 
 +                 v a r i a n t , 
 
 +                 t i m e r I d , 
 
 +             } ; 
 
 + 
 
 +             i f   ( e x i s t i n g )   { 
 
 +                 r e t u r n   p r e v . m a p ( ( t )   = >   ( t . i d   = = =   i d   ?   n e w I t e m   :   t ) ) ; 
 
 +             } 
 
 + 
 
 +             / /   E n f o r c e   m a x :   r e m o v e   o l d e s t   i f   n e e d e d 
 
 +             c o n s t   n e x t   =   [ . . . p r e v ,   n e w I t e m ] ; 
 
 +             i f   ( n e x t . l e n g t h   >   M A X _ T O A S T S )   { 
 
 +                 c o n s t   r e m o v e d   =   n e x t . s h i f t ( ) ! ; 
 
 +                 i f   ( r e m o v e d . t i m e r I d )   c l e a r T i m e o u t ( r e m o v e d . t i m e r I d ) ; 
 
 +             } 
 
 +             r e t u r n   n e x t ; 
 
 +         } ) ; 
 
 +     } ,   [ d i s m i s s ] ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < T o a s t C o n t e x t . P r o v i d e r   v a l u e = { {   s h o w T o a s t   } } > 
 
 +             { c h i l d r e n } 
 
 +             < d i v   c l a s s N a m e = " t o a s t - c o n t a i n e r "   a r i a - l i v e = " p o l i t e "   a r i a - a t o m i c = " f a l s e " > 
 
 +                 { t o a s t s . m a p ( ( t )   = >   ( 
 
 +                     < d i v 
 
 +                         k e y = { t . i d } 
 
 +                         c l a s s N a m e = { ` t o a s t   t o a s t - - $ { t . v a r i a n t } ` } 
 
 +                         r o l e = { t . v a r i a n t   = = =   ' e r r o r '   ?   ' a l e r t '   :   ' s t a t u s ' } 
 
 +                     > 
 
 +                         < d i v   c l a s s N a m e = " t o a s t - b o d y " > 
 
 +                             < s p a n   c l a s s N a m e = " t o a s t - m e s s a g e " > { t . m e s s a g e } < / s p a n > 
 
 +                             { t . d e t a i l   & &   < s p a n   c l a s s N a m e = " t o a s t - d e t a i l " > { t . d e t a i l } < / s p a n > } 
 
 +                         < / d i v > 
 
 +                         < d i v   c l a s s N a m e = " t o a s t - a c t i o n s " > 
 
 +                             { t . a c t i o n   & &   ( 
 
 +                                 < b u t t o n 
 
 +                                     t y p e = " b u t t o n " 
 
 +                                     c l a s s N a m e = " t o a s t - a c t i o n - b t n " 
 
 +                                     o n C l i c k = { ( )   = >   {   t . a c t i o n ! . o n C l i c k ( ) ;   d i s m i s s ( t . i d ) ;   } } 
 
 +                                 > 
 
 +                                     { t . a c t i o n . l a b e l } 
 
 +                                 < / b u t t o n > 
 
 +                             ) } 
 
 +                             < b u t t o n 
 
 +                                 t y p e = " b u t t o n " 
 
 +                                 c l a s s N a m e = " t o a s t - d i s m i s s - b t n " 
 
 +                                 o n C l i c k = { ( )   = >   d i s m i s s ( t . i d ) } 
 
 +                                 a r i a - l a b e l = " D i s m i s s   n o t i f i c a t i o n " 
 
 +                             > 
 
 +                                    
 
 +                             < / b u t t o n > 
 
 +                         < / d i v > 
 
 +                     < / d i v > 
 
 +                 ) ) } 
 
 +             < / d i v > 
 
 +         < / T o a s t C o n t e x t . P r o v i d e r > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t - v i e w - s t a t e . t s   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t - v i e w - s t a t e . t s 
 
 i n d e x   d 5 c 4 8 8 7 . . 0 3 2 5 7 a d   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t - v i e w - s t a t e . t s 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t - v i e w - s t a t e . t s 
 
 @ @   - 1 , 3   + 1 , 5   @ @ 
 
 + i m p o r t   t y p e   {   R u n t i m e S t a t u s   }   f r o m   " . . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
 + 
 
   e x p o r t   i n t e r f a c e   C o m p o s e r N o t i c e   { 
 
       t o n e :   " i n f o "   |   " w a r n i n g " ; 
 
       t i t l e :   s t r i n g ; 
 
 @ @   - 6 , 3 1   + 8 , 7 9   @ @   e x p o r t   i n t e r f a c e   C o m p o s e r N o t i c e   { 
 
   } 
 
   
 
   c o n s t   S U G G E S T E D _ P R O M P T S   =   [ 
 
 -     " S u m m a r i z e   t h i s   r e p o s i t o r y   a r c h i t e c t u r e . " , 
 
 -     " H e l p   m e   d e b u g   w h y   t h e   l o c a l   r u n t i m e   i s   n o t   r e a d y . " , 
 
 -     " D r a f t   a   c l e a n e r   s y s t e m   p r o m p t   f o r   t h i s   c o d i n g   w o r k f l o w . " , 
 
 +     " I n s p e c t   t h e   r e p o   s t r u c t u r e   a n d   r u n t i m e   f l o w . " , 
 
 +     " D i a g n o s e   w h y   t h e   l o c a l   m o d e l   i s   n o t   r e a d y . " , 
 
 +     " D r a f t   a   t i g h t e r   s y s t e m   p r o m p t   f o r   t h i s   w o r k s p a c e . " , 
 
   ]   a s   c o n s t ; 
 
   
 
   e x p o r t   f u n c t i o n   g e t S u g g e s t e d P r o m p t s ( ) :   s t r i n g [ ]   { 
 
       r e t u r n   [ . . . S U G G E S T E D _ P R O M P T S ] ; 
 
   } 
 
   
 
 - e x p o r t   f u n c t i o n   g e t C o m p o s e r N o t i c e ( m o d e l :   s t r i n g ,   s e r v e r :   s t r i n g ) :   C o m p o s e r N o t i c e   |   n u l l   { 
 
 + e x p o r t   f u n c t i o n   g e t C o m p o s e r N o t i c e ( 
 
 +     m o d e l :   s t r i n g , 
 
 +     s e r v e r :   s t r i n g , 
 
 +     r u n t i m e M o d e :   " l o c a l "   |   " r e m o t e "   =   " r e m o t e " , 
 
 +     r u n t i m e S t a t u s :   R u n t i m e S t a t u s   =   " r e a d y " , 
 
 +     i s S w a p p i n g   =   f a l s e , 
 
 + ) :   C o m p o s e r N o t i c e   |   n u l l   { 
 
       i f   ( ! s e r v e r . t r i m ( ) )   { 
 
           r e t u r n   { 
 
               t o n e :   " w a r n i n g " , 
 
 -             t i t l e :   " C o n n e c t   a n   A P I " , 
 
 -             d e s c r i p t i o n :   " O p e n   r u n t i m e   s e t t i n g s   a n d   c o n f i g u r e   a   l o c a l   o r   r e m o t e   e n d p o i n t   b e f o r e   s e n d i n g   m e s s a g e s . " , 
 
 -             a c t i o n L a b e l :   " S h o w   r u n t i m e   p a n e l " , 
 
 +             t i t l e :   " C o n n e c t   r u n t i m e " , 
 
 +             d e s c r i p t i o n :   " O p e n   t h e   s i d e b a r   a n d   p o i n t   t h e   a p p   a t   a   l o c a l   o r   r e m o t e   e n d p o i n t   b e f o r e   s e n d i n g   a   t a s k . " , 
 
 +             a c t i o n L a b e l :   " O p e n   s i d e b a r " , 
 
           } ; 
 
       } 
 
   
 
 +     i f   ( r u n t i m e M o d e   = = =   " l o c a l "   & &   ( i s S w a p p i n g   | |   r u n t i m e S t a t u s   ! = =   " r e a d y " ) )   { 
 
 +         s w i t c h   ( r u n t i m e S t a t u s )   { 
 
 +             c a s e   " l o a d i n g " : 
 
 +                 r e t u r n   { 
 
 +                     t o n e :   " w a r n i n g " , 
 
 +                     t i t l e :   " M o d e l   l o a d i n g . . . " , 
 
 +                     d e s c r i p t i o n :   " T h e   s e l e c t e d   l o c a l   m o d e l   i s   s t i l l   w a r m i n g   u p .   P l e a s e   w a i t   u n t i l   i t   f i n i s h e s   l o a d i n g   b e f o r e   s e n d i n g   a   m e s s a g e . " , 
 
 +                     a c t i o n L a b e l :   " W a i t i n g " , 
 
 +                 } ; 
 
 +             c a s e   " s t a r t i n g " : 
 
 +                 r e t u r n   { 
 
 +                     t o n e :   " w a r n i n g " , 
 
 +                     t i t l e :   " R u n t i m e   s t a r t i n g . . . " , 
 
 +                     d e s c r i p t i o n :   " T h e   l o c a l   A P I   i s   s t i l l   s t a r t i n g .   W a i t   f o r   i t   t o   b e c o m e   r e a d y   b e f o r e   s e n d i n g   a   m e s s a g e . " , 
 
 +                     a c t i o n L a b e l :   " W a i t i n g " , 
 
 +                 } ; 
 
 +             c a s e   " s t o p p i n g " : 
 
 +                 r e t u r n   { 
 
 +                     t o n e :   " w a r n i n g " , 
 
 +                     t i t l e :   " R u n t i m e   s t o p p i n g . . . " , 
 
 +                     d e s c r i p t i o n :   " T h e   l o c a l   A P I   i s   s h u t t i n g   d o w n .   P l e a s e   w a i t   u n t i l   i t   f i n i s h e s   b e f o r e   s e n d i n g   a n o t h e r   m e s s a g e . " , 
 
 +                     a c t i o n L a b e l :   " W a i t i n g " , 
 
 +                 } ; 
 
 +             c a s e   " d e g r a d e d " : 
 
 +                 r e t u r n   { 
 
 +                     t o n e :   " w a r n i n g " , 
 
 +                     t i t l e :   " R u n t i m e   n o t   r e a d y " , 
 
 +                     d e s c r i p t i o n :   " T h e   l o c a l   A P I   i s   r u n n i n g   b u t   n o t   f u l l y   r e a d y .   W a i t   f o r   t h e   h e a l t h   c h e c k   t o   r e c o v e r   b e f o r e   s e n d i n g   a   m e s s a g e . " , 
 
 +                     a c t i o n L a b e l :   " W a i t i n g " , 
 
 +                 } ; 
 
 +             c a s e   " e r r o r " : 
 
 +             c a s e   " s t o p p e d " : 
 
 +             d e f a u l t : 
 
 +                 r e t u r n   { 
 
 +                     t o n e :   " w a r n i n g " , 
 
 +                     t i t l e :   " R u n t i m e   u n a v a i l a b l e " , 
 
 +                     d e s c r i p t i o n :   " T h e   l o c a l   A P I   i s   n o t   r e a d y .   O p e n   t h e   r u n t i m e   s e t t i n g s   a n d   s t a r t   i t   a g a i n   b e f o r e   s e n d i n g   a   m e s s a g e . " , 
 
 +                     a c t i o n L a b e l :   " O p e n   s e t t i n g s " , 
 
 +                 } ; 
 
 +         } 
 
 +     } 
 
 + 
 
       i f   ( ! m o d e l . t r i m ( ) )   { 
 
           r e t u r n   { 
 
               t o n e :   " i n f o " , 
 
               t i t l e :   " C h o o s e   a   m o d e l " , 
 
 -             d e s c r i p t i o n :   " S t a r t   t h e   r u n t i m e   o r   r e f r e s h   t h e   m o d e l   l i s t ,   t h e n   s e l e c t   t h e   m o d e l   y o u   w a n t   t o   c h a t   w i t h . " , 
 
 -             a c t i o n L a b e l :   " S h o w   r u n t i m e   p a n e l " , 
 
 +             d e s c r i p t i o n :   " R e f r e s h   t h e   m o d e l   l i s t   o r   s t a r t   t h e   r u n t i m e ,   t h e n   s e l e c t   t h e   w o r k s p a c e   m o d e l . " , 
 
 +             a c t i o n L a b e l :   " O p e n   s i d e b a r " , 
 
           } ; 
 
       } 
 
   
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / A r t i f a c t V i e w e r . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / A r t i f a c t V i e w e r . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . b 4 4 9 8 1 8 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / A r t i f a c t V i e w e r . t s x 
 
 @ @   - 0 , 0   + 1 , 3 0 4   @ @ 
 
 + i m p o r t   {   u s e E f f e c t ,   u s e M e m o ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   h l j s   f r o m   " h i g h l i g h t . j s / l i b / c o r e " ; 
 
 + i m p o r t   b a s h   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / b a s h " ; 
 
 + i m p o r t   c   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / c " ; 
 
 + i m p o r t   c p p   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / c p p " ; 
 
 + i m p o r t   c s s   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / c s s " ; 
 
 + i m p o r t   g o   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / g o " ; 
 
 + i m p o r t   j a v a s c r i p t   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / j a v a s c r i p t " ; 
 
 + i m p o r t   j s o n   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / j s o n " ; 
 
 + i m p o r t   p y t h o n   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / p y t h o n " ; 
 
 + i m p o r t   r u s t   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / r u s t " ; 
 
 + i m p o r t   s q l   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / s q l " ; 
 
 + i m p o r t   t y p e s c r i p t   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / t y p e s c r i p t " ; 
 
 + i m p o r t   x m l   f r o m   " h i g h l i g h t . j s / l i b / l a n g u a g e s / x m l " ; 
 
 + i m p o r t   {   e n s u r e H l j s ,   r e n d e r M a r k d o w n   }   f r o m   " . . / . . / l i b / m a r k d o w n " ; 
 
 + 
 
 + i n t e r f a c e   A r t i f a c t V i e w e r P r o p s   { 
 
 +     a r t i f a c t :   { 
 
 +         f i l e n a m e :   s t r i n g ; 
 
 +         c o n t e n t :   s t r i n g ; 
 
 +         l a n g u a g e ? :   s t r i n g ; 
 
 +     } ; 
 
 +     o n D o w n l o a d ? :   ( )   = >   v o i d ; 
 
 + } 
 
 + 
 
 + l e t   c o d e H l R e a d y   =   f a l s e ; 
 
 + 
 
 + f u n c t i o n   e n s u r e C o d e H l j s ( )   { 
 
 +     i f   ( c o d e H l R e a d y )   r e t u r n ; 
 
 + 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " j a v a s c r i p t " ,   j a v a s c r i p t ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " t y p e s c r i p t " ,   t y p e s c r i p t ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " p y t h o n " ,   p y t h o n ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " r u s t " ,   r u s t ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " b a s h " ,   b a s h ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " j s o n " ,   j s o n ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " s q l " ,   s q l ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " c s s " ,   c s s ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " x m l " ,   x m l ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " g o " ,   g o ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " c p p " ,   c p p ) ; 
 
 +     h l j s . r e g i s t e r L a n g u a g e ( " c " ,   c ) ; 
 
 +     c o d e H l R e a d y   =   t r u e ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   g e t E x t e n s i o n ( f i l e n a m e :   s t r i n g )   { 
 
 +     c o n s t   t r i m m e d   =   f i l e n a m e . t r i m ( ) . t o L o w e r C a s e ( ) ; 
 
 +     c o n s t   p a r t s   =   t r i m m e d . s p l i t ( " . " ) ; 
 
 +     i f   ( p a r t s . l e n g t h   <   2 )   r e t u r n   " " ; 
 
 +     r e t u r n   p a r t s [ p a r t s . l e n g t h   -   1 ]   ? ?   " " ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   g e t L a n g u a g e ( f i l e n a m e :   s t r i n g ,   l a n g u a g e ? :   s t r i n g )   { 
 
 +     i f   ( l a n g u a g e )   r e t u r n   l a n g u a g e . t o L o w e r C a s e ( ) ; 
 
 +     c o n s t   e x t   =   g e t E x t e n s i o n ( f i l e n a m e ) ; 
 
 +     c o n s t   m a p :   R e c o r d < s t r i n g ,   s t r i n g >   =   { 
 
 +         m d :   " m a r k d o w n " , 
 
 +         m a r k d o w n :   " m a r k d o w n " , 
 
 +         t s :   " t y p e s c r i p t " , 
 
 +         t s x :   " t y p e s c r i p t " , 
 
 +         j s :   " j a v a s c r i p t " , 
 
 +         j s x :   " j a v a s c r i p t " , 
 
 +         p y :   " p y t h o n " , 
 
 +         r s :   " r u s t " , 
 
 +         g o :   " g o " , 
 
 +         c :   " c " , 
 
 +         h :   " c " , 
 
 +         c p p :   " c p p " , 
 
 +         c c :   " c p p " , 
 
 +         c x x :   " c p p " , 
 
 +         c s s :   " c s s " , 
 
 +         h t m l :   " x m l " , 
 
 +         x m l :   " x m l " , 
 
 +         j s o n :   " j s o n " , 
 
 +         s q l :   " s q l " , 
 
 +         s h :   " b a s h " , 
 
 +         b a s h :   " b a s h " , 
 
 +         z s h :   " b a s h " , 
 
 +     } ; 
 
 +     r e t u r n   m a p [ e x t ]   ? ?   e x t   ? ?   " p l a i n t e x t " ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   f i l e T y p e T o n e ( e x t :   s t r i n g )   { 
 
 +     s w i t c h   ( e x t )   { 
 
 +         c a s e   " m d " : 
 
 +         c a s e   " m a r k d o w n " : 
 
 +             r e t u r n   " f r o m - s k y - 4 0 0 / 2 0   t o - c y a n - 4 0 0 / 1 0   t e x t - s k y - 3 0 0   b o r d e r - s k y - 5 0 0 / 2 0 " ; 
 
 +         c a s e   " j s o n " : 
 
 +             r e t u r n   " f r o m - e m e r a l d - 4 0 0 / 2 0   t o - t e a l - 4 0 0 / 1 0   t e x t - e m e r a l d - 3 0 0   b o r d e r - e m e r a l d - 5 0 0 / 2 0 " ; 
 
 +         c a s e   " t s " : 
 
 +         c a s e   " t s x " : 
 
 +         c a s e   " j s " : 
 
 +         c a s e   " j s x " : 
 
 +             r e t u r n   " f r o m - i n d i g o - 4 0 0 / 2 0   t o - v i o l e t - 4 0 0 / 1 0   t e x t - i n d i g o - 3 0 0   b o r d e r - i n d i g o - 5 0 0 / 2 0 " ; 
 
 +         c a s e   " p y " : 
 
 +             r e t u r n   " f r o m - a m b e r - 4 0 0 / 2 0   t o - o r a n g e - 4 0 0 / 1 0   t e x t - a m b e r - 3 0 0   b o r d e r - a m b e r - 5 0 0 / 2 0 " ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   " f r o m - z i n c - 4 0 0 / 2 0   t o - z i n c - 5 0 0 / 1 0   t e x t - z i n c - 3 0 0   b o r d e r - z i n c - 7 0 0 " ; 
 
 +     } 
 
 + } 
 
 + 
 
 + f u n c t i o n   F i l e G l y p h ( {   f i l e n a m e   } :   {   f i l e n a m e :   s t r i n g   } )   { 
 
 +     c o n s t   e x t   =   g e t E x t e n s i o n ( f i l e n a m e ) ; 
 
 +     c o n s t   t o n e   =   f i l e T y p e T o n e ( e x t ) ; 
 
 + 
 
 +     i f   ( e x t   = = =   " m d "   | |   e x t   = = =   " m a r k d o w n " )   { 
 
 +         r e t u r n   ( 
 
 +             < d i v   c l a s s N a m e = { ` f l e x   h - 1 1   w - 1 1   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - 2 x l   b o r d e r   b g - g r a d i e n t - t o - b r   $ { t o n e } ` } > 
 
 +                 < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 5   w - 5 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < p a t h   d = " M 7   3 . 7 5 h 7 l 4 . 2 5   4 . 2 5 V 2 0 . 2 5 H 7 z "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                     < p a t h   d = " M 1 4   3 . 7 5 v 4 . 5 h 4 . 2 5 "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                     < p a t h   d = " M 1 0   1 1 . 2 5 h 4 "   s t r o k e L i n e c a p = " r o u n d "   / > 
 
 +                     < p a t h   d = " M 1 0   1 4 . 2 5 h 7 "   s t r o k e L i n e c a p = " r o u n d "   / > 
 
 +                     < p a t h   d = " M 1 0   1 7 . 2 5 h 5 "   s t r o k e L i n e c a p = " r o u n d "   / > 
 
 +                 < / s v g > 
 
 +             < / d i v > 
 
 +         ) ; 
 
 +     } 
 
 + 
 
 +     i f   ( [ " t s " ,   " t s x " ,   " j s " ,   " j s x " ,   " c " ,   " c p p " ,   " g o " ,   " r s " ,   " p y " ] . i n c l u d e s ( e x t ) )   { 
 
 +         r e t u r n   ( 
 
 +             < d i v   c l a s s N a m e = { ` f l e x   h - 1 1   w - 1 1   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - 2 x l   b o r d e r   b g - g r a d i e n t - t o - b r   $ { t o n e } ` } > 
 
 +                 < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 5   w - 5 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < p a t h   d = " M 9   8   5   1 2 l 4   4 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                     < p a t h   d = " m 1 5   8   4   4 - 4   4 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                 < / s v g > 
 
 +             < / d i v > 
 
 +         ) ; 
 
 +     } 
 
 + 
 
 +     i f   ( e x t   = = =   " j s o n " )   { 
 
 +         r e t u r n   ( 
 
 +             < d i v   c l a s s N a m e = { ` f l e x   h - 1 1   w - 1 1   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - 2 x l   b o r d e r   b g - g r a d i e n t - t o - b r   $ { t o n e } ` } > 
 
 +                 < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 5   w - 5 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < p a t h   d = " M 9   8 c - 1 . 3   0 - 2   . 7 - 2   2 v 1 c 0   . 7 - . 3   1 . 3 - . 9   1 . 7 - . 6 . 4 - 1 . 1   1 - . 1   1 . 4 . 8 . 3   1   . 8   1   1 . 5 v 1 c 0   1 . 3 . 7   2   2   2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                     < p a t h   d = " M 1 5   8 c 1 . 3   0   2   . 7   2   2 v 1 c 0   . 7 . 3   1 . 3 . 9   1 . 7 . 6 . 4   1 . 1   1   . 1   1 . 4 - . 8 . 3 - 1   . 8 - 1   1 . 5 v 1 c 0   1 . 3 - . 7   2 - 2   2 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                 < / s v g > 
 
 +             < / d i v > 
 
 +         ) ; 
 
 +     } 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = { ` f l e x   h - 1 1   w - 1 1   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - 2 x l   b o r d e r   b g - g r a d i e n t - t o - b r   $ { t o n e } ` } > 
 
 +             < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 5   w - 5 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                 < p a t h   d = " M 7   3 . 7 5 h 7 l 4 . 2 5   4 . 2 5 V 2 0 . 2 5 H 7 z "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                 < p a t h   d = " M 1 4   3 . 7 5 v 4 . 5 h 4 . 2 5 "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +             < / s v g > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   d o w n l o a d F i l e ( f i l e n a m e :   s t r i n g ,   c o n t e n t :   s t r i n g ,   l a n g u a g e ? :   s t r i n g )   { 
 
 +     c o n s t   s a f e F i l e n a m e   =   f i l e n a m e   | |   " a r t i f a c t . t x t " ; 
 
 +     c o n s t   l o w e r   =   s a f e F i l e n a m e . t o L o w e r C a s e ( ) ; 
 
 +     c o n s t   m i m e   = 
 
 +         l a n g u a g e   = = =   " m a r k d o w n "   | |   l o w e r . e n d s W i t h ( " . m d " ) 
 
 +             ?   " t e x t / m a r k d o w n ; c h a r s e t = u t f - 8 " 
 
 +             :   " t e x t / p l a i n ; c h a r s e t = u t f - 8 " ; 
 
 +     c o n s t   b l o b   =   n e w   B l o b ( [ c o n t e n t ] ,   {   t y p e :   m i m e   } ) ; 
 
 +     c o n s t   u r l   =   U R L . c r e a t e O b j e c t U R L ( b l o b ) ; 
 
 +     c o n s t   l i n k   =   d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; 
 
 +     l i n k . h r e f   =   u r l ; 
 
 +     l i n k . d o w n l o a d   =   s a f e F i l e n a m e ; 
 
 +     l i n k . c l i c k ( ) ; 
 
 +     U R L . r e v o k e O b j e c t U R L ( u r l ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   A r t i f a c t V i e w e r ( {   a r t i f a c t ,   o n D o w n l o a d   } :   A r t i f a c t V i e w e r P r o p s )   { 
 
 +     c o n s t   [ e x p a n d e d ,   s e t E x p a n d e d ]   =   u s e S t a t e ( t r u e ) ; 
 
 +     c o n s t   [ c o p i e d ,   s e t C o p i e d ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     c o n s t   e x t   =   g e t E x t e n s i o n ( a r t i f a c t . f i l e n a m e ) ; 
 
 +     c o n s t   i s M a r k d o w n   =   e x t   = = =   " m d "   | |   e x t   = = =   " m a r k d o w n "   | |   a r t i f a c t . l a n g u a g e ? . t o L o w e r C a s e ( )   = = =   " m a r k d o w n " ; 
 
 +     c o n s t   l a n g u a g e   =   g e t L a n g u a g e ( a r t i f a c t . f i l e n a m e ,   a r t i f a c t . l a n g u a g e ) ; 
 
 +     c o n s t   p r e v i e w I d   =   u s e M e m o ( ( )   = >   ` a r t i f a c t - p r e v i e w - $ { a r t i f a c t . f i l e n a m e . r e p l a c e ( / [ ^ a - z A - Z 0 - 9 _ - ] + / g ,   " - " ) } ` ,   [ a r t i f a c t . f i l e n a m e ] ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         v o i d   e n s u r e H l j s ( ) ; 
 
 +         e n s u r e C o d e H l j s ( ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     c o n s t   p r e v i e w H t m l   =   u s e M e m o ( ( )   = >   { 
 
 +         i f   ( i s M a r k d o w n )   r e t u r n   r e n d e r M a r k d o w n ( a r t i f a c t . c o n t e n t ) ; 
 
 + 
 
 +         l e t   h i g h l i g h t e d   =   a r t i f a c t . c o n t e n t ; 
 
 +         t r y   { 
 
 +             h i g h l i g h t e d   =   l a n g u a g e   ! = =   " p l a i n t e x t "   & &   h l j s . g e t L a n g u a g e ( l a n g u a g e ) 
 
 +                 ?   h l j s . h i g h l i g h t ( a r t i f a c t . c o n t e n t ,   {   l a n g u a g e   } ) . v a l u e 
 
 +                 :   h l j s . h i g h l i g h t A u t o ( a r t i f a c t . c o n t e n t ) . v a l u e ; 
 
 +         }   c a t c h   { 
 
 +             h i g h l i g h t e d   =   a r t i f a c t . c o n t e n t . r e p l a c e ( / & / g ,   " & a m p ; " ) . r e p l a c e ( / < / g ,   " & l t ; " ) . r e p l a c e ( / > / g ,   " & g t ; " ) ; 
 
 +         } 
 
 + 
 
 +         r e t u r n   ` < p r e   c l a s s = " h l j s   r o u n d e d - 2 x l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 5 0   p - 4   t e x t - s m   l e a d i n g - 7   t e x t - z i n c - 2 0 0   o v e r f l o w - a u t o " > < c o d e   c l a s s = " l a n g u a g e - $ { l a n g u a g e } " > $ { h i g h l i g h t e d } < / c o d e > < / p r e > ` ; 
 
 +     } ,   [ a r t i f a c t . c o n t e n t ,   i s M a r k d o w n ,   l a n g u a g e ] ) ; 
 
 + 
 
 +     c o n s t   h a n d l e C o p y   =   a s y n c   ( )   = >   { 
 
 +         a w a i t   n a v i g a t o r . c l i p b o a r d . w r i t e T e x t ( a r t i f a c t . c o n t e n t ) ; 
 
 +         s e t C o p i e d ( t r u e ) ; 
 
 +         w i n d o w . s e t T i m e o u t ( ( )   = >   s e t C o p i e d ( f a l s e ) ,   1 2 0 0 ) ; 
 
 +     } ; 
 
 + 
 
 +     c o n s t   h a n d l e D o w n l o a d   =   ( )   = >   { 
 
 +         i f   ( o n D o w n l o a d )   { 
 
 +             o n D o w n l o a d ( ) ; 
 
 +             r e t u r n ; 
 
 +         } 
 
 +         d o w n l o a d F i l e ( a r t i f a c t . f i l e n a m e ,   a r t i f a c t . c o n t e n t ,   a r t i f a c t . l a n g u a g e   ? ?   l a n g u a g e ) ; 
 
 +     } ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < s e c t i o n   c l a s s N a m e = " o v e r f l o w - h i d d e n   r o u n d e d - 3 x l   b o r d e r   b o r d e r - z i n c - 8 0 0 / 8 0   b g - z i n c - 9 5 0   t e x t - z i n c - 1 0 0   s h a d o w - [ 0 _ 2 4 p x _ 8 0 p x _ - 3 6 p x _ r g b a ( 0 , 0 , 0 , 0 . 9 ) ] " > 
 
 +             < h e a d e r   c l a s s N a m e = " b o r d e r - b   b o r d e r - z i n c - 8 0 0 / 8 0   b g - g r a d i e n t - t o - b   f r o m - z i n c - 9 0 0 / 8 0   t o - z i n c - 9 5 0   p x - 4   p y - 4   s m : p x - 5 " > 
 
 +                 < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   j u s t i f y - b e t w e e n   g a p - 4 " > 
 
 +                     < d i v   c l a s s N a m e = " f l e x   m i n - w - 0   i t e m s - c e n t e r   g a p - 3 " > 
 
 +                         < F i l e G l y p h   f i l e n a m e = { a r t i f a c t . f i l e n a m e }   / > 
 
 +                         < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                             < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                                 < h 2   c l a s s N a m e = " t r u n c a t e   t e x t - s m   f o n t - s e m i b o l d   t e x t - z i n c - 5 0 "   t i t l e = { a r t i f a c t . f i l e n a m e } > 
 
 +                                     { a r t i f a c t . f i l e n a m e } 
 
 +                                 < / h 2 > 
 
 +                                 < s p a n   c l a s s N a m e = " r o u n d e d - f u l l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0   p x - 2   p y - 0 . 5   t e x t - [ 1 0 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 2 2 e m ]   t e x t - z i n c - 4 0 0 " > 
 
 +                                     { l a n g u a g e } 
 
 +                                 < / s p a n > 
 
 +                             < / d i v > 
 
 +                             < p   c l a s s N a m e = " m t - 1   t e x t - x s   l e a d i n g - 5   t e x t - z i n c - 5 0 0 " > 
 
 +                                 P r e v i e w ,   c o p y ,   o r   d o w n l o a d   t h e   g e n e r a t e d   a r t i f a c t . 
 
 +                             < / p > 
 
 +                         < / d i v > 
 
 +                     < / d i v > 
 
 + 
 
 +                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                         < b u t t o n 
 
 +                             t y p e = " b u t t o n " 
 
 +                             o n C l i c k = { h a n d l e C o p y } 
 
 +                             c l a s s N a m e = " i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 2   r o u n d e d - x l   b o r d e r   b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 8 0   p x - 3   p y - 2   t e x t - s m   f o n t - m e d i u m   t e x t - z i n c - 1 0 0   t r a n s i t i o n - c o l o r s   h o v e r : b o r d e r - z i n c - 6 0 0   h o v e r : b g - z i n c - 8 0 0 " 
 
 +                         > 
 
 +                             < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 4   w - 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                                 < p a t h   d = " M 9   9 h 1 0 v 1 0 H 9 z "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                                 < p a t h   d = " M 5   1 5 V 5 h 1 0 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                             < / s v g > 
 
 +                             { c o p i e d   ?   " C o p i e d "   :   " C o p y " } 
 
 +                         < / b u t t o n > 
 
 + 
 
 +                         < b u t t o n 
 
 +                             t y p e = " b u t t o n " 
 
 +                             o n C l i c k = { h a n d l e D o w n l o a d } 
 
 +                             c l a s s N a m e = " i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 2   r o u n d e d - x l   b o r d e r   b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 8 0   p x - 3   p y - 2   t e x t - s m   f o n t - m e d i u m   t e x t - z i n c - 1 0 0   t r a n s i t i o n - c o l o r s   h o v e r : b o r d e r - z i n c - 6 0 0   h o v e r : b g - z i n c - 8 0 0 " 
 
 +                         > 
 
 +                             < s v g   v i e w B o x = " 0   0   2 4   2 4 "   c l a s s N a m e = " h - 4   w - 4 "   f i l l = " n o n e "   s t r o k e = " c u r r e n t C o l o r "   s t r o k e W i d t h = " 1 . 8 "   a r i a - h i d d e n = " t r u e " > 
 
 +                                 < p a t h   d = " M 1 2   4 v 1 0 "   s t r o k e L i n e c a p = " r o u n d "   / > 
 
 +                                 < p a t h   d = " m 8   1 0   4   4   4 - 4 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                                 < p a t h   d = " M 5   2 0 h 1 4 "   s t r o k e L i n e c a p = " r o u n d "   / > 
 
 +                             < / s v g > 
 
 +                             D o w n l o a d 
 
 +                         < / b u t t o n > 
 
 + 
 
 +                         < b u t t o n 
 
 +                             t y p e = " b u t t o n " 
 
 +                             a r i a - e x p a n d e d = { e x p a n d e d } 
 
 +                             a r i a - c o n t r o l s = { p r e v i e w I d } 
 
 +                             o n C l i c k = { ( )   = >   s e t E x p a n d e d ( ( v a l u e )   = >   ! v a l u e ) } 
 
 +                             c l a s s N a m e = " i n l i n e - f l e x   i t e m s - c e n t e r   r o u n d e d - x l   b o r d e r   b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 8 0   p - 2   t e x t - z i n c - 3 0 0   t r a n s i t i o n - c o l o r s   h o v e r : b o r d e r - z i n c - 6 0 0   h o v e r : b g - z i n c - 8 0 0 " 
 
 +                         > 
 
 +                             < s v g 
 
 +                                 v i e w B o x = " 0   0   2 4   2 4 " 
 
 +                                 c l a s s N a m e = { ` h - 4   w - 4   t r a n s i t i o n - t r a n s f o r m   d u r a t i o n - 2 0 0   $ { e x p a n d e d   ?   " r o t a t e - 1 8 0 "   :   " r o t a t e - 0 " } ` } 
 
 +                                 f i l l = " n o n e " 
 
 +                                 s t r o k e = " c u r r e n t C o l o r " 
 
 +                                 s t r o k e W i d t h = " 1 . 8 " 
 
 +                                 a r i a - h i d d e n = " t r u e " 
 
 +                             > 
 
 +                                 < p a t h   d = " m 6   9   6   6   6 - 6 "   s t r o k e L i n e c a p = " r o u n d "   s t r o k e L i n e j o i n = " r o u n d "   / > 
 
 +                             < / s v g > 
 
 +                         < / b u t t o n > 
 
 +                     < / d i v > 
 
 +                 < / d i v > 
 
 +             < / h e a d e r > 
 
 + 
 
 +             { e x p a n d e d   ?   ( 
 
 +                 < d i v 
 
 +                     i d = { p r e v i e w I d } 
 
 +                     c l a s s N a m e = " m a x - h - [ 7 0 v h ]   o v e r f l o w - a u t o   p - 4   s m : p - 5 " 
 
 +                 > 
 
 +                     { i s M a r k d o w n   ?   ( 
 
 +                         < d i v 
 
 +                             c l a s s N a m e = " m a x - w - n o n e   t e x t - s m   l e a d i n g - 7   t e x t - z i n c - 3 0 0   [ & _ h 1 ] : m b - 4   [ & _ h 1 ] : t e x t - 3 x l   [ & _ h 1 ] : f o n t - s e m i b o l d   [ & _ h 1 ] : t r a c k i n g - t i g h t   [ & _ h 1 ] : t e x t - z i n c - 5 0   [ & _ h 2 ] : m b - 3   [ & _ h 2 ] : m t - 7   [ & _ h 2 ] : t e x t - 2 x l   [ & _ h 2 ] : f o n t - s e m i b o l d   [ & _ h 2 ] : t e x t - z i n c - 5 0   [ & _ h 3 ] : m b - 2   [ & _ h 3 ] : m t - 5   [ & _ h 3 ] : t e x t - x l   [ & _ h 3 ] : f o n t - s e m i b o l d   [ & _ h 3 ] : t e x t - z i n c - 1 0 0   [ & _ h 4 ] : m t - 5   [ & _ h 4 ] : t e x t - l g   [ & _ h 4 ] : f o n t - s e m i b o l d   [ & _ h 4 ] : t e x t - z i n c - 1 0 0   [ & _ p ] : m y - 3   [ & _ p ] : t e x t - z i n c - 3 0 0   [ & _ a ] : t e x t - s k y - 4 0 0   [ & _ a ] : u n d e r l i n e   [ & _ a : h o v e r ] : t e x t - s k y - 3 0 0   [ & _ u l ] : m y - 3   [ & _ u l ] : l i s t - d i s c   [ & _ u l ] : s p a c e - y - 2   [ & _ u l ] : p l - 6   [ & _ o l ] : m y - 3   [ & _ o l ] : l i s t - d e c i m a l   [ & _ o l ] : s p a c e - y - 2   [ & _ o l ] : p l - 6   [ & _ l i ] : t e x t - z i n c - 3 0 0   [ & _ b l o c k q u o t e ] : m y - 4   [ & _ b l o c k q u o t e ] : b o r d e r - l - 2   [ & _ b l o c k q u o t e ] : b o r d e r - z i n c - 7 0 0   [ & _ b l o c k q u o t e ] : p l - 4   [ & _ b l o c k q u o t e ] : t e x t - z i n c - 4 0 0   [ & _ b l o c k q u o t e ] : i t a l i c   [ & _ h r ] : m y - 6   [ & _ h r ] : b o r d e r - z i n c - 8 0 0   [ & _ t a b l e ] : m y - 4   [ & _ t a b l e ] : w - f u l l   [ & _ t a b l e ] : b o r d e r - c o l l a p s e   [ & _ t a b l e ] : o v e r f l o w - h i d d e n   [ & _ t a b l e ] : r o u n d e d - l g   [ & _ t a b l e ] : b o r d e r   [ & _ t a b l e ] : b o r d e r - z i n c - 8 0 0   [ & _ t h ] : b o r d e r   [ & _ t h ] : b o r d e r - z i n c - 8 0 0   [ & _ t h ] : b g - z i n c - 9 0 0   [ & _ t h ] : p x - 3   [ & _ t h ] : p y - 2   [ & _ t h ] : t e x t - l e f t   [ & _ t h ] : f o n t - s e m i b o l d   [ & _ t h ] : t e x t - z i n c - 1 0 0   [ & _ t d ] : b o r d e r   [ & _ t d ] : b o r d e r - z i n c - 8 0 0   [ & _ t d ] : p x - 3   [ & _ t d ] : p y - 2   [ & _ t d ] : t e x t - z i n c - 3 0 0   [ & _ c o d e : n o t ( . h l j s ) ] : r o u n d e d   [ & _ c o d e : n o t ( . h l j s ) ] : b o r d e r   [ & _ c o d e : n o t ( . h l j s ) ] : b o r d e r - z i n c - 8 0 0   [ & _ c o d e : n o t ( . h l j s ) ] : b g - z i n c - 9 0 0   [ & _ c o d e : n o t ( . h l j s ) ] : p x - 1 . 5   [ & _ c o d e : n o t ( . h l j s ) ] : p y - 0 . 5   [ & _ c o d e : n o t ( . h l j s ) ] : f o n t - m o n o   [ & _ c o d e : n o t ( . h l j s ) ] : t e x t - [ 0 . 8 5 e m ]   [ & _ . c o d e - b l o c k ] : m y - 4   [ & _ . c o d e - b l o c k ] : o v e r f l o w - h i d d e n   [ & _ . c o d e - b l o c k ] : r o u n d e d - 2 x l   [ & _ . c o d e - b l o c k ] : b o r d e r   [ & _ . c o d e - b l o c k ] : b o r d e r - z i n c - 8 0 0   [ & _ . c o d e - b l o c k ] : b g - z i n c - 9 5 0   [ & _ . c o d e - h e a d e r ] : f l e x   [ & _ . c o d e - h e a d e r ] : i t e m s - c e n t e r   [ & _ . c o d e - h e a d e r ] : j u s t i f y - b e t w e e n   [ & _ . c o d e - h e a d e r ] : b o r d e r - b   [ & _ . c o d e - h e a d e r ] : b o r d e r - z i n c - 8 0 0   [ & _ . c o d e - h e a d e r ] : b g - z i n c - 9 0 0 / 8 0   [ & _ . c o d e - h e a d e r ] : p x - 3   [ & _ . c o d e - h e a d e r ] : p y - 2   [ & _ . c o d e - l a n g ] : f o n t - m o n o   [ & _ . c o d e - l a n g ] : t e x t - [ 1 1 p x ]   [ & _ . c o d e - l a n g ] : u p p e r c a s e   [ & _ . c o d e - l a n g ] : t r a c k i n g - [ 0 . 2 2 e m ]   [ & _ . c o d e - l a n g ] : t e x t - z i n c - 5 0 0   [ & _ . c o p y - c o d e - b t n ] : r o u n d e d - l g   [ & _ . c o p y - c o d e - b t n ] : b o r d e r   [ & _ . c o p y - c o d e - b t n ] : b o r d e r - z i n c - 7 0 0   [ & _ . c o p y - c o d e - b t n ] : b g - z i n c - 9 0 0   [ & _ . c o p y - c o d e - b t n ] : p x - 2   [ & _ . c o p y - c o d e - b t n ] : p y - 1   [ & _ . c o p y - c o d e - b t n ] : t e x t - [ 1 1 p x ]   [ & _ . c o p y - c o d e - b t n ] : f o n t - m e d i u m   [ & _ . c o p y - c o d e - b t n ] : u p p e r c a s e   [ & _ . c o p y - c o d e - b t n ] : t r a c k i n g - [ 0 . 1 8 e m ]   [ & _ . c o p y - c o d e - b t n ] : t e x t - z i n c - 2 0 0   [ & _ . c o p y - c o d e - b t n ] : t r a n s i t i o n - c o l o r s   [ & _ . c o p y - c o d e - b t n : h o v e r ] : b o r d e r - z i n c - 6 0 0   [ & _ . c o p y - c o d e - b t n : h o v e r ] : b g - z i n c - 8 0 0 " 
 
 +                             d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   p r e v i e w H t m l   } } 
 
 +                         / > 
 
 +                     )   :   ( 
 
 +                         < d i v 
 
 +                             c l a s s N a m e = " o v e r f l o w - h i d d e n   r o u n d e d - 2 x l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 5 0 " 
 
 +                             d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   p r e v i e w H t m l   } } 
 
 +                         / > 
 
 +                     ) } 
 
 +                 < / d i v > 
 
 +             )   :   ( 
 
 +                 < d i v   c l a s s N a m e = " b o r d e r - t   b o r d e r - z i n c - 8 0 0 / 7 0   p x - 5   p y - 4   t e x t - s m   t e x t - z i n c - 5 0 0 " > 
 
 +                     P r e v i e w   c o l l a p s e d . 
 
 +                 < / d i v > 
 
 +             ) } 
 
 +         < / s e c t i o n > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / M e s s a g e B u b b l e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / M e s s a g e B u b b l e . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 7 c 6 9 2 d 0 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / M e s s a g e B u b b l e . t s x 
 
 @ @   - 0 , 0   + 1 , 1 8 9   @ @ 
 
 + i m p o r t   {   u s e E f f e c t ,   u s e M e m o ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   t y p e   {   M o u s e E v e n t   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   D O M P u r i f y   f r o m   " d o m p u r i f y " ; 
 
 + i m p o r t   h l j s   f r o m   " h i g h l i g h t . j s " ; 
 
 + i m p o r t   {   m a r k e d   }   f r o m   " m a r k e d " ; 
 
 + i m p o r t   {   B o t   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + i m p o r t   " h i g h l i g h t . j s / s t y l e s / g i t h u b - d a r k - d i m m e d . c s s " ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   M e s s a g e B u b b l e P r o p s   { 
 
 +     r o l e :   " u s e r "   |   " a s s i s t a n t " ; 
 
 +     c o n t e n t :   s t r i n g ; 
 
 +     i s A g e n t i c ? :   b o o l e a n ; 
 
 +     t i m e s t a m p ? :   D a t e ; 
 
 + } 
 
 + 
 
 + c o n s t   m a r k d o w n C h r o m e   =   [ 
 
 +     " [ & _ p ] : m - 0 " , 
 
 +     " [ & _ p + p ] : m t - 3 " , 
 
 +     " [ & _ h 1 ] : m t - 4   [ & _ h 1 ] : t e x t - x l   [ & _ h 1 ] : f o n t - s e m i b o l d   [ & _ h 1 ] : t r a c k i n g - t i g h t " , 
 
 +     " [ & _ h 2 ] : m t - 4   [ & _ h 2 ] : t e x t - l g   [ & _ h 2 ] : f o n t - s e m i b o l d   [ & _ h 2 ] : t r a c k i n g - t i g h t " , 
 
 +     " [ & _ h 3 ] : m t - 3   [ & _ h 3 ] : t e x t - b a s e   [ & _ h 3 ] : f o n t - s e m i b o l d " , 
 
 +     " [ & _ u l ] : m y - 3   [ & _ u l ] : l i s t - d i s c   [ & _ u l ] : s p a c e - y - 1   [ & _ u l ] : p l - 5 " , 
 
 +     " [ & _ o l ] : m y - 3   [ & _ o l ] : l i s t - d e c i m a l   [ & _ o l ] : s p a c e - y - 1   [ & _ o l ] : p l - 5 " , 
 
 +     " [ & _ l i > p ] : m - 0 " , 
 
 +     " [ & _ b l o c k q u o t e ] : m y - 3   [ & _ b l o c k q u o t e ] : b o r d e r - l - 2   [ & _ b l o c k q u o t e ] : b o r d e r - z i n c - 7 0 0   [ & _ b l o c k q u o t e ] : p l - 4   [ & _ b l o c k q u o t e ] : t e x t - z i n c - 4 0 0 " , 
 
 +     " [ & _ a ] : t e x t - c y a n - 3 0 0   [ & _ a ] : u n d e r l i n e   [ & _ a ] : u n d e r l i n e - o f f s e t - 4   [ & _ a ] : d e c o r a t i o n - c y a n - 3 0 0 / 4 0   h o v e r : [ & _ a ] : t e x t - c y a n - 2 0 0 " , 
 
 +     " [ & _ s t r o n g ] : f o n t - s e m i b o l d   [ & _ s t r o n g ] : t e x t - z i n c - 5 0 " , 
 
 +     " [ & _ e m ] : i t a l i c " , 
 
 +     " [ & _ h r ] : m y - 4   [ & _ h r ] : b o r d e r - z i n c - 8 0 0 " , 
 
 +     " [ & _ t a b l e ] : m y - 4   [ & _ t a b l e ] : w - f u l l   [ & _ t a b l e ] : o v e r f l o w - h i d d e n   [ & _ t a b l e ] : r o u n d e d - x l   [ & _ t a b l e ] : b o r d e r   [ & _ t a b l e ] : b o r d e r - z i n c - 8 0 0 " , 
 
 +     " [ & _ t h ] : b o r d e r - b   [ & _ t h ] : b o r d e r - z i n c - 8 0 0   [ & _ t h ] : b g - z i n c - 9 0 0   [ & _ t h ] : p x - 3   [ & _ t h ] : p y - 2   [ & _ t h ] : t e x t - l e f t " , 
 
 +     " [ & _ t d ] : b o r d e r - b   [ & _ t d ] : b o r d e r - z i n c - 9 0 0   [ & _ t d ] : p x - 3   [ & _ t d ] : p y - 2 " , 
 
 +     " [ & _ i m g ] : m y - 4   [ & _ i m g ] : r o u n d e d - x l   [ & _ i m g ] : b o r d e r   [ & _ i m g ] : b o r d e r - z i n c - 8 0 0 " , 
 
 +     " [ & _ c o d e : n o t ( p r e _ c o d e ) ] : r o u n d e d - m d   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : b o r d e r   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : b o r d e r - w h i t e / 5   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : b g - w h i t e / 5   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : p x - 1 . 5   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : p y - 0 . 5   [ & _ c o d e : n o t ( p r e _ c o d e ) ] : t e x t - [ 0 . 9 2 e m ] " , 
 
 + ] . j o i n ( "   " ) ; 
 
 + 
 
 + f u n c t i o n   f o r m a t T i m e s t a m p ( t i m e s t a m p ? :   D a t e )   { 
 
 +     i f   ( ! t i m e s t a m p )   r e t u r n   n u l l ; 
 
 +     r e t u r n   n e w   I n t l . D a t e T i m e F o r m a t ( [ ] ,   {   h o u r :   " 2 - d i g i t " ,   m i n u t e :   " 2 - d i g i t "   } ) . f o r m a t ( t i m e s t a m p ) ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   s a f e L a n g ( l a n g ? :   s t r i n g )   { 
 
 +     i f   ( ! l a n g )   r e t u r n   " p l a i n t e x t " ; 
 
 +     c o n s t   n o r m a l i z e d   =   l a n g . t o L o w e r C a s e ( ) . t r i m ( ) ; 
 
 +     r e t u r n   / ^ [ a - z 0 - 9 _ + - ] + $ / . t e s t ( n o r m a l i z e d )   ?   n o r m a l i z e d   :   " p l a i n t e x t " ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   h i g h l i g h t C o d e ( c o d e :   s t r i n g ,   l a n g ? :   s t r i n g )   { 
 
 +     c o n s t   l a n g u a g e   =   s a f e L a n g ( l a n g ) ; 
 
 + 
 
 +     i f   ( l a n g u a g e   ! = =   " p l a i n t e x t "   & &   h l j s . g e t L a n g u a g e ( l a n g u a g e ) )   { 
 
 +         r e t u r n   h l j s . h i g h l i g h t ( c o d e ,   {   l a n g u a g e   } ) . v a l u e ; 
 
 +     } 
 
 + 
 
 +     r e t u r n   h l j s . h i g h l i g h t A u t o ( c o d e ) . v a l u e ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   b u i l d M a r k d o w n ( c o n t e n t :   s t r i n g )   { 
 
 +     c o n s t   r e n d e r e r   =   n e w   m a r k e d . R e n d e r e r ( ) ; 
 
 + 
 
 +     r e n d e r e r . c o d e   =   ( c o d e ,   i n f o s t r i n g )   = >   { 
 
 +         c o n s t   l a n g   =   i n f o s t r i n g ? . s p l i t ( / \ s + / ) [ 0 ] ; 
 
 +         c o n s t   h i g h l i g h t e d   =   h i g h l i g h t C o d e ( c o d e ,   l a n g   | |   u n d e f i n e d ) ; 
 
 +         c o n s t   e n c o d e d C o d e   =   e n c o d e U R I C o m p o n e n t ( c o d e ) ; 
 
 +         c o n s t   l a n g u a g e   =   s a f e L a n g ( l a n g   | |   u n d e f i n e d ) ; 
 
 + 
 
 +         r e t u r n   ` 
 
 +             < d i v   c l a s s = " g r o u p   r e l a t i v e   m y - 4   o v e r f l o w - h i d d e n   r o u n d e d - 2 x l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - [ # 1 1 1 1 1 1 ]   s h a d o w - [ 0 _ 1 6 p x _ 4 0 p x _ r g b a ( 0 , 0 , 0 , 0 . 3 5 ) ] " > 
 
 +                 < b u t t o n 
 
 +                     t y p e = " b u t t o n " 
 
 +                     d a t a - c o p y - c o d e = " t r u e " 
 
 +                     d a t a - c o d e = " $ { e n c o d e d C o d e } " 
 
 +                     c l a s s = " a b s o l u t e   r i g h t - 3   t o p - 3   z - 1 0   i n l i n e - f l e x   i t e m s - c e n t e r   g a p - 1 . 5   r o u n d e d - l g   b o r d e r   b o r d e r - w h i t e / 1 0   b g - z i n c - 9 5 0 / 8 0   p x - 2 . 5   p y - 1   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   t e x t - z i n c - 3 0 0   b a c k d r o p - b l u r   t r a n s i t i o n   h o v e r : b o r d e r - w h i t e / 2 0   h o v e r : b g - w h i t e / 1 0   h o v e r : t e x t - w h i t e " 
 
 +                     a r i a - l a b e l = " C o p y   c o d e " 
 
 +                     t i t l e = " C o p y   c o d e " 
 
 +                 > 
 
 +                     < s p a n   c l a s s = " c o p y - l a b e l " > C o p y < / s p a n > 
 
 +                 < / b u t t o n > 
 
 +                 < d i v   c l a s s = " o v e r f l o w - x - a u t o " > 
 
 +                     < p r e   c l a s s = " m - 0   b g - t r a n s p a r e n t   p - 4   p t - 1 2   t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 1 0 0 " > < c o d e   c l a s s = " h l j s   l a n g u a g e - $ { l a n g u a g e } " > $ { h i g h l i g h t e d } < / c o d e > < / p r e > 
 
 +                 < / d i v > 
 
 +             < / d i v > 
 
 +         ` ; 
 
 +     } ; 
 
 + 
 
 +     c o n s t   r a w H t m l   =   m a r k e d . p a r s e ( c o n t e n t   ? ?   " " ,   { 
 
 +         r e n d e r e r , 
 
 +         b r e a k s :   t r u e , 
 
 +         g f m :   t r u e , 
 
 +     } )   a s   s t r i n g ; 
 
 + 
 
 +     r e t u r n   D O M P u r i f y . s a n i t i z e ( r a w H t m l ,   { 
 
 +         A D D _ A T T R :   [ " d a t a - c o p y - c o d e " ,   " d a t a - c o d e " ,   " a r i a - l a b e l " ,   " t i t l e " ] , 
 
 +     } ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   M e s s a g e B u b b l e ( {   r o l e ,   c o n t e n t ,   i s A g e n t i c ,   t i m e s t a m p   } :   M e s s a g e B u b b l e P r o p s )   { 
 
 +     c o n s t   [ c o p i e d ,   s e t C o p i e d ]   =   u s e S t a t e ( f a l s e ) ; 
 
 +     c o n s t   [ i s S t r e a m i n g ,   s e t I s S t r e a m i n g ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         s e t I s S t r e a m i n g ( t r u e ) ; 
 
 +         c o n s t   t i m e r   =   w i n d o w . s e t T i m e o u t ( ( )   = >   s e t I s S t r e a m i n g ( f a l s e ) ,   4 5 0 ) ; 
 
 +         r e t u r n   ( )   = >   w i n d o w . c l e a r T i m e o u t ( t i m e r ) ; 
 
 +     } ,   [ c o n t e n t ] ) ; 
 
 + 
 
 +     c o n s t   r e n d e r e d C o n t e n t   =   u s e M e m o ( ( )   = >   b u i l d M a r k d o w n ( c o n t e n t ) ,   [ c o n t e n t ] ) ; 
 
 +     c o n s t   t i m e L a b e l   =   f o r m a t T i m e s t a m p ( t i m e s t a m p ) ; 
 
 + 
 
 +     c o n s t   o n C o n t e n t C l i c k   =   a s y n c   ( e v e n t :   M o u s e E v e n t < H T M L D i v E l e m e n t > )   = >   { 
 
 +         c o n s t   t a r g e t   =   e v e n t . t a r g e t   a s   H T M L E l e m e n t ; 
 
 +         c o n s t   b u t t o n   =   t a r g e t . c l o s e s t < H T M L B u t t o n E l e m e n t > ( " [ d a t a - c o p y - c o d e ] " ) ; 
 
 + 
 
 +         i f   ( ! b u t t o n )   r e t u r n ; 
 
 + 
 
 +         c o n s t   c o d e   =   d e c o d e U R I C o m p o n e n t ( b u t t o n . g e t A t t r i b u t e ( " d a t a - c o d e " )   ? ?   " " ) ; 
 
 +         a w a i t   n a v i g a t o r . c l i p b o a r d . w r i t e T e x t ( c o d e ) ; 
 
 + 
 
 +         c o n s t   l a b e l   =   b u t t o n . q u e r y S e l e c t o r < H T M L E l e m e n t > ( " . c o p y - l a b e l " ) ; 
 
 +         c o n s t   i c o n   =   b u t t o n . q u e r y S e l e c t o r < H T M L E l e m e n t > ( " s v g " ) ; 
 
 +         c o n s t   o r i g i n a l   =   l a b e l ? . t e x t C o n t e n t   ? ?   " C o p y " ; 
 
 + 
 
 +         i f   ( l a b e l )   l a b e l . t e x t C o n t e n t   =   " C o p i e d " ; 
 
 +         i f   ( i c o n )   i c o n . s t y l e . d i s p l a y   =   " n o n e " ; 
 
 +         s e t C o p i e d ( t r u e ) ; 
 
 + 
 
 +         w i n d o w . s e t T i m e o u t ( ( )   = >   { 
 
 +             i f   ( l a b e l )   l a b e l . t e x t C o n t e n t   =   o r i g i n a l ; 
 
 +             i f   ( i c o n )   i c o n . s t y l e . d i s p l a y   =   " i n l i n e - f l e x " ; 
 
 +             s e t C o p i e d ( f a l s e ) ; 
 
 +         } ,   1 4 0 0 ) ; 
 
 +     } ; 
 
 + 
 
 +     c o n s t   o u t e r A l i g n   =   r o l e   = = =   " u s e r "   ?   " j u s t i f y - e n d "   :   " j u s t i f y - s t a r t " ; 
 
 +     c o n s t   b u b b l e T o n e   =   r o l e   = = =   " u s e r "   ?   " b g - [ # 1 E 3 A 5 F ]   t e x t - s l a t e - 5 0 "   :   " b g - [ # 1 E 1 E 1 E ]   t e x t - z i n c - 1 0 0 " ; 
 
 +     c o n s t   w i d t h T o n e   =   r o l e   = = =   " u s e r "   ?   " m a x - w - [ 8 4 % ] "   :   " m a x - w - [ 8 6 % ] " ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = { ` f l e x   w - f u l l   $ { o u t e r A l i g n } ` } > 
 
 +             < a r t i c l e 
 
 +                 c l a s s N a m e = { ` $ { w i d t h T o n e }   r o u n d e d - 2 x l   b o r d e r   b o r d e r - w h i t e / 5   p x - 4   p y - 3   s h a d o w - [ 0 _ 1 8 p x _ 5 0 p x _ r g b a ( 0 , 0 , 0 , 0 . 3 5 ) ]   $ { b u b b l e T o n e } ` } 
 
 +             > 
 
 +                 { r o l e   = = =   " a s s i s t a n t "   ?   ( 
 
 +                     < h e a d e r   c l a s s N a m e = " m b - 3   f l e x   i t e m s - s t a r t   g a p - 3 " > 
 
 +                         < d i v   c l a s s N a m e = " f l e x   h - 9   w - 9   s h r i n k - 0   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - w h i t e / 1 0   b g - z i n c - 9 5 0 / 8 0   t e x t - z i n c - 1 0 0   s h a d o w - i n n e r   s h a d o w - b l a c k / 3 0 " > 
 
 +                             < B o t   c l a s s N a m e = " h - 4   w - 4 "   / > 
 
 +                         < / d i v > 
 
 + 
 
 +                         < d i v   c l a s s N a m e = " m i n - w - 0   f l e x - 1 " > 
 
 +                             < d i v   c l a s s N a m e = " f l e x   f l e x - w r a p   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                                 < h 3   c l a s s N a m e = " t e x t - s m   f o n t - s e m i b o l d   t r a c k i n g - t i g h t   t e x t - z i n c - 5 0 " > F o r g e < / h 3 > 
 
 +                                 < s p a n   c l a s s N a m e = " r o u n d e d - f u l l   b o r d e r   b o r d e r - c y a n - 4 0 0 / 2 0   b g - c y a n - 5 0 0 / 1 0   p x - 2   p y - 0 . 5   t e x t - [ 1 0 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   t e x t - c y a n - 2 0 0 " > 
 
 +                                     F o r g e 
 
 +                                 < / s p a n > 
 
 +                                 { i s A g e n t i c   ?   ( 
 
 +                                     < s p a n   c l a s s N a m e = " r o u n d e d - f u l l   b o r d e r   b o r d e r - e m e r a l d - 4 0 0 / 2 0   b g - e m e r a l d - 5 0 0 / 1 0   p x - 2   p y - 0 . 5   t e x t - [ 1 0 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   t e x t - e m e r a l d - 2 0 0 " > 
 
 +                                         A g e n t i c 
 
 +                                     < / s p a n > 
 
 +                                 )   :   n u l l } 
 
 +                                 { t i m e L a b e l   ?   < s p a n   c l a s s N a m e = " t e x t - [ 1 1 p x ]   t e x t - z i n c - 5 0 0 " > { t i m e L a b e l } < / s p a n >   :   n u l l } 
 
 +                             < / d i v > 
 
 +                         < / d i v > 
 
 +                     < / h e a d e r > 
 
 +                 )   :   n u l l } 
 
 + 
 
 +                 < d i v 
 
 +                     o n C l i c k = { o n C o n t e n t C l i c k } 
 
 +                     c l a s s N a m e = { ` $ { m a r k d o w n C h r o m e }   t e x t - [ 1 4 p x ]   l e a d i n g - 6   $ { r o l e   = = =   " u s e r "   ?   " [ & _ a ] : t e x t - s k y - 2 0 0   [ & _ s t r o n g ] : t e x t - w h i t e "   :   " [ & _ a ] : t e x t - c y a n - 3 0 0   [ & _ s t r o n g ] : t e x t - z i n c - 5 0 " } ` } 
 
 +                     d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   r e n d e r e d C o n t e n t   } } 
 
 +                 / > 
 
 + 
 
 +                 { i s S t r e a m i n g   ?   ( 
 
 +                     < d i v   c l a s s N a m e = " m t - 2   f l e x   i t e m s - c e n t e r   g a p - 1   t e x t - x s   t e x t - z i n c - 4 0 0 " > 
 
 +                         < s p a n   c l a s s N a m e = " h - 1 . 5   w - 1 . 5   a n i m a t e - p u l s e   r o u n d e d - f u l l   b g - z i n c - 4 0 0 / 8 0 "   / > 
 
 +                         < s p a n > s t r e a m i n g < / s p a n > 
 
 +                     < / d i v > 
 
 +                 )   :   n u l l } 
 
 + 
 
 +                 { r o l e   = = =   " u s e r "   & &   t i m e L a b e l   ?   ( 
 
 +                     < d i v   c l a s s N a m e = " m t - 2   f l e x   i t e m s - c e n t e r   j u s t i f y - e n d   g a p - 2   t e x t - [ 1 1 p x ]   t e x t - s l a t e - 3 0 0 / 7 0 " > 
 
 +                         < s p a n > { t i m e L a b e l } < / s p a n > 
 
 +                     < / d i v > 
 
 +                 )   :   n u l l } 
 
 + 
 
 +                 { c o p i e d   ?   < s p a n   c l a s s N a m e = " s r - o n l y " > C o d e   c o p i e d < / s p a n >   :   n u l l } 
 
 +             < / a r t i c l e > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T a s k L i s t . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T a s k L i s t . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 6 4 0 4 6 b d 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T a s k L i s t . t s x 
 
 @ @   - 0 , 0   + 1 , 1 9 8   @ @ 
 
 + i m p o r t   {   u s e E f f e c t ,   u s e M e m o ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   A n i m a t e P r e s e n c e ,   m o t i o n   }   f r o m   " f r a m e r - m o t i o n " ; 
 
 + i m p o r t   {   C h e c k ,   C i r c l e ,   C h e v r o n D o w n ,   L o a d e r 2 ,   X   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + 
 
 + t y p e   T a s k S t a t u s   =   " p e n d i n g "   |   " r u n n i n g "   |   " c o m p l e t e d "   |   " e r r o r " ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   T a s k L i s t P r o p s   { 
 
 +     s t e p s :   A r r a y < { 
 
 +         i d :   n u m b e r ; 
 
 +         t i t l e :   s t r i n g ; 
 
 +         d e s c r i p t i o n :   s t r i n g ; 
 
 +         s t a t u s :   T a s k S t a t u s ; 
 
 +         s u b _ s t e p s :   A r r a y < { 
 
 +             i d :   s t r i n g ; 
 
 +             d e s c r i p t i o n :   s t r i n g ; 
 
 +             s t a t u s :   T a s k S t a t u s ; 
 
 +         } > ; 
 
 +     } > ; 
 
 +     a c t i v e S t e p I d ? :   n u m b e r ; 
 
 + } 
 
 + 
 
 + c o n s t   s t a t u s S t y l e s :   R e c o r d < T a s k S t a t u s ,   {   r i n g :   s t r i n g ;   t e x t :   s t r i n g ;   b a d g e :   s t r i n g   } >   =   { 
 
 +     p e n d i n g :   { 
 
 +         r i n g :   " b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 7 0   t e x t - z i n c - 5 0 0 " , 
 
 +         t e x t :   " t e x t - z i n c - 4 0 0 " , 
 
 +         b a d g e :   " b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0   t e x t - z i n c - 4 0 0 " , 
 
 +     } , 
 
 +     r u n n i n g :   { 
 
 +         r i n g :   " b o r d e r - s k y - 5 0 0 / 3 0   b g - s k y - 5 0 0 / 1 0   t e x t - s k y - 4 0 0 " , 
 
 +         t e x t :   " t e x t - s k y - 3 0 0 " , 
 
 +         b a d g e :   " b o r d e r - s k y - 5 0 0 / 2 5   b g - s k y - 5 0 0 / 1 0   t e x t - s k y - 3 0 0 " , 
 
 +     } , 
 
 +     c o m p l e t e d :   { 
 
 +         r i n g :   " b o r d e r - e m e r a l d - 5 0 0 / 3 0   b g - e m e r a l d - 5 0 0 / 1 0   t e x t - e m e r a l d - 4 0 0 " , 
 
 +         t e x t :   " t e x t - e m e r a l d - 3 0 0 " , 
 
 +         b a d g e :   " b o r d e r - e m e r a l d - 5 0 0 / 2 5   b g - e m e r a l d - 5 0 0 / 1 0   t e x t - e m e r a l d - 3 0 0 " , 
 
 +     } , 
 
 +     e r r o r :   { 
 
 +         r i n g :   " b o r d e r - r o s e - 5 0 0 / 3 0   b g - r o s e - 5 0 0 / 1 0   t e x t - r o s e - 4 0 0 " , 
 
 +         t e x t :   " t e x t - r o s e - 3 0 0 " , 
 
 +         b a d g e :   " b o r d e r - r o s e - 5 0 0 / 2 5   b g - r o s e - 5 0 0 / 1 0   t e x t - r o s e - 3 0 0 " , 
 
 +     } , 
 
 + } ; 
 
 + 
 
 + f u n c t i o n   S t a t u s G l y p h ( {   s t a t u s   } :   {   s t a t u s :   T a s k S t a t u s   } )   { 
 
 +     s w i t c h   ( s t a t u s )   { 
 
 +         c a s e   " r u n n i n g " : 
 
 +             r e t u r n   < L o a d e r 2   c l a s s N a m e = " h - 4   w - 4   a n i m a t e - s p i n "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " c o m p l e t e d " : 
 
 +             r e t u r n   < C h e c k   c l a s s N a m e = " h - 4   w - 4 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " e r r o r " : 
 
 +             r e t u r n   < X   c l a s s N a m e = " h - 4   w - 4 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   < C i r c l e   c l a s s N a m e = " h - 4   w - 4 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +     } 
 
 + } 
 
 + 
 
 + f u n c t i o n   T a s k S t a t u s I c o n ( {   s t a t u s   } :   {   s t a t u s :   T a s k S t a t u s   } )   { 
 
 +     c o n s t   p a l e t t e   =   s t a t u s S t y l e s [ s t a t u s ] ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < m o t i o n . d i v 
 
 +             l a y o u t 
 
 +             c l a s s N a m e = { ` r e l a t i v e   f l e x   h - 9   w - 9   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   $ { p a l e t t e . r i n g }   s h a d o w - s m   s h a d o w - b l a c k / 2 0 ` } 
 
 +             a n i m a t e = { s t a t u s   = = =   " c o m p l e t e d "   ?   {   s c a l e :   [ 0 . 9 2 ,   1 . 0 8 ,   1 ]   }   :   {   s c a l e :   1   } } 
 
 +             t r a n s i t i o n = { {   d u r a t i o n :   0 . 3 2 ,   e a s e :   " e a s e O u t "   } } 
 
 +         > 
 
 +             < A n i m a t e P r e s e n c e   m o d e = " w a i t "   i n i t i a l = { f a l s e } > 
 
 +                 < m o t i o n . d i v 
 
 +                     k e y = { s t a t u s } 
 
 +                     i n i t i a l = { {   o p a c i t y :   0 ,   s c a l e :   0 . 7 ,   r o t a t e :   - 8   } } 
 
 +                     a n i m a t e = { {   o p a c i t y :   1 ,   s c a l e :   1 ,   r o t a t e :   0   } } 
 
 +                     e x i t = { {   o p a c i t y :   0 ,   s c a l e :   0 . 7 ,   r o t a t e :   8   } } 
 
 +                     t r a n s i t i o n = { {   d u r a t i o n :   0 . 2   } } 
 
 +                     c l a s s N a m e = { p a l e t t e . t e x t } 
 
 +                 > 
 
 +                     < S t a t u s G l y p h   s t a t u s = { s t a t u s }   / > 
 
 +                 < / m o t i o n . d i v > 
 
 +             < / A n i m a t e P r e s e n c e > 
 
 +             { s t a t u s   = = =   " c o m p l e t e d "   ?   < s p a n   c l a s s N a m e = " a b s o l u t e   i n s e t - 0   r o u n d e d - f u l l   b g - e m e r a l d - 4 0 0 / 1 0   b l u r - [ 1 p x ] "   a r i a - h i d d e n = " t r u e "   / >   :   n u l l } 
 
 +         < / m o t i o n . d i v > 
 
 +     ) ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   T a s k R o w ( { 
 
 +     s t e p , 
 
 +     i s A c t i v e , 
 
 + } :   { 
 
 +     s t e p :   T a s k L i s t P r o p s [ " s t e p s " ] [ n u m b e r ] ; 
 
 +     i s A c t i v e :   b o o l e a n ; 
 
 + } )   { 
 
 +     c o n s t   [ e x p a n d e d ,   s e t E x p a n d e d ]   =   u s e S t a t e ( i s A c t i v e   | |   s t e p . s t a t u s   = = =   " r u n n i n g "   | |   s t e p . s t a t u s   = = =   " c o m p l e t e d " ) ; 
 
 +     c o n s t   h a s S u b S t e p s   =   s t e p . s u b _ s t e p s . l e n g t h   >   0 ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         i f   ( i s A c t i v e   | |   s t e p . s t a t u s   = = =   " r u n n i n g " )   s e t E x p a n d e d ( t r u e ) ; 
 
 +     } ,   [ i s A c t i v e ,   s t e p . s t a t u s ] ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < m o t i o n . l i   l a y o u t   c l a s s N a m e = " r e l a t i v e   p l - 1 0 " > 
 
 +             < d i v   c l a s s N a m e = " a b s o l u t e   l e f t - 4   t o p - 0   b o t t o m - 0   w - p x   b g - z i n c - 8 0 0 / 9 0 "   a r i a - h i d d e n = " t r u e "   / > 
 
 +             < d i v   c l a s s N a m e = " a b s o l u t e   l e f t - [ 1 3 p x ]   t o p - 5   h - 2 . 5   w - 2 . 5   r o u n d e d - f u l l   b o r d e r   b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 5 0 "   a r i a - h i d d e n = " t r u e "   / > 
 
 + 
 
 +             < m o t i o n . a r t i c l e 
 
 +                 l a y o u t 
 
 +                 c l a s s N a m e = { ` r o u n d e d - 2 x l   b o r d e r   b g - z i n c - 9 5 0 / 7 0   p x - 4   p y - 4   s h a d o w - [ 0 _ 0 _ 0 _ 1 p x _ r g b a ( 2 4 , 2 4 , 2 7 , 0 . 3 5 ) ]   t r a n s i t i o n - c o l o r s   d u r a t i o n - 3 0 0   $ { 
 
 +                     i s A c t i v e   ?   " b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 8 5 "   :   " b o r d e r - z i n c - 8 0 0 / 8 0 " 
 
 +                 } ` } 
 
 +             > 
 
 +                 < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   g a p - 3 " > 
 
 +                     < T a s k S t a t u s I c o n   s t a t u s = { s t e p . s t a t u s }   / > 
 
 + 
 
 +                     < d i v   c l a s s N a m e = " m i n - w - 0   f l e x - 1 " > 
 
 +                         < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   j u s t i f y - b e t w e e n   g a p - 3 " > 
 
 +                             < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   f l e x - w r a p   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                                     < s p a n   c l a s s N a m e = " r o u n d e d - m d   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0   p x - 2   p y - 0 . 5   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   t e x t - z i n c - 4 0 0 " > 
 
 +                                         S t e p   { s t e p . i d } 
 
 +                                     < / s p a n > 
 
 +                                     < h 3   c l a s s N a m e = " t r u n c a t e   t e x t - s m   f o n t - s e m i b o l d   t e x t - z i n c - 1 0 0 " > { s t e p . t i t l e } < / h 3 > 
 
 +                                 < / d i v > 
 
 +                                 < p   c l a s s N a m e = " m t - 1   t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 4 0 0 " > { s t e p . d e s c r i p t i o n } < / p > 
 
 +                             < / d i v > 
 
 + 
 
 +                             { h a s S u b S t e p s   ?   ( 
 
 +                                 < b u t t o n 
 
 +                                     t y p e = " b u t t o n " 
 
 +                                     o n C l i c k = { ( )   = >   s e t E x p a n d e d ( ( v a l u e )   = >   ! v a l u e ) } 
 
 +                                     a r i a - e x p a n d e d = { e x p a n d e d } 
 
 +                                     a r i a - l a b e l = { e x p a n d e d   ?   " C o l l a p s e   t a s k   d e t a i l s "   :   " E x p a n d   t a s k   d e t a i l s " } 
 
 +                                     c l a s s N a m e = " i n l i n e - f l e x   h - 8   w - 8   s h r i n k - 0   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - l g   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 5 0   t e x t - z i n c - 4 0 0   t r a n s i t i o n - c o l o r s   h o v e r : b o r d e r - z i n c - 7 0 0   h o v e r : t e x t - z i n c - 2 0 0 " 
 
 +                                 > 
 
 +                                     < C h e v r o n D o w n   c l a s s N a m e = { ` h - 4   w - 4   t r a n s i t i o n - t r a n s f o r m   d u r a t i o n - 3 0 0   $ { e x p a n d e d   ?   " r o t a t e - 1 8 0 "   :   " r o t a t e - 0 " } ` }   a r i a - h i d d e n = " t r u e "   / > 
 
 +                                 < / b u t t o n > 
 
 +                             )   :   n u l l } 
 
 +                         < / d i v > 
 
 + 
 
 +                         < A n i m a t e P r e s e n c e   i n i t i a l = { f a l s e } > 
 
 +                             { h a s S u b S t e p s   & &   e x p a n d e d   ?   ( 
 
 +                                 < m o t i o n . d i v 
 
 +                                     k e y = " s u b s t e p s " 
 
 +                                     i n i t i a l = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                                     a n i m a t e = { {   h e i g h t :   " a u t o " ,   o p a c i t y :   1   } } 
 
 +                                     e x i t = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                                     t r a n s i t i o n = { {   d u r a t i o n :   0 . 2 5 ,   e a s e :   " e a s e O u t "   } } 
 
 +                                     c l a s s N a m e = " o v e r f l o w - h i d d e n " 
 
 +                                 > 
 
 +                                     < d i v   c l a s s N a m e = " m t - 4   s p a c e - y - 2   b o r d e r - l   b o r d e r - z i n c - 8 0 0 / 9 0   p l - 4 " > 
 
 +                                         { s t e p . s u b _ s t e p s . m a p ( ( s u b S t e p )   = >   ( 
 
 +                                             < m o t i o n . d i v 
 
 +                                                 k e y = { s u b S t e p . i d } 
 
 +                                                 l a y o u t 
 
 +                                                 c l a s s N a m e = " f l e x   i t e m s - s t a r t   g a p - 3   r o u n d e d - x l   b o r d e r   b o r d e r - z i n c - 9 0 0   b g - z i n c - 9 5 0 / 6 0   p x - 3   p y - 2 " 
 
 +                                                 i n i t i a l = { {   o p a c i t y :   0 ,   y :   6   } } 
 
 +                                                 a n i m a t e = { {   o p a c i t y :   1 ,   y :   0   } } 
 
 +                                                 t r a n s i t i o n = { {   d u r a t i o n :   0 . 2   } } 
 
 +                                             > 
 
 +                                                 < d i v   c l a s s N a m e = { ` m t - 0 . 5   r o u n d e d - f u l l   p - 1   $ { s t a t u s S t y l e s [ s u b S t e p . s t a t u s ] . b a d g e } ` } > 
 
 +                                                     < S t a t u s G l y p h   s t a t u s = { s u b S t e p . s t a t u s }   / > 
 
 +                                                 < / d i v > 
 
 +                                                 < d i v   c l a s s N a m e = " m i n - w - 0   f l e x - 1 " > 
 
 +                                                     < d i v   c l a s s N a m e = " t e x t - x s   u p p e r c a s e   t r a c k i n g - [ 0 . 1 6 e m ]   t e x t - z i n c - 5 0 0 " > { s u b S t e p . i d } < / d i v > 
 
 +                                                     < d i v   c l a s s N a m e = " t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 2 0 0 " > { s u b S t e p . d e s c r i p t i o n } < / d i v > 
 
 +                                                 < / d i v > 
 
 +                                                 < s p a n   c l a s s N a m e = { ` s h r i n k - 0   r o u n d e d - f u l l   b o r d e r   p x - 2   p y - 0 . 5   t e x t - [ 1 0 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   $ { s t a t u s S t y l e s [ s u b S t e p . s t a t u s ] . b a d g e } ` } > 
 
 +                                                     { s u b S t e p . s t a t u s } 
 
 +                                                 < / s p a n > 
 
 +                                             < / m o t i o n . d i v > 
 
 +                                         ) ) } 
 
 +                                     < / d i v > 
 
 +                                 < / m o t i o n . d i v > 
 
 +                             )   :   n u l l } 
 
 +                         < / A n i m a t e P r e s e n c e > 
 
 +                     < / d i v > 
 
 +                 < / d i v > 
 
 +             < / m o t i o n . a r t i c l e > 
 
 +         < / m o t i o n . l i > 
 
 +     ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   T a s k L i s t ( {   s t e p s ,   a c t i v e S t e p I d   } :   T a s k L i s t P r o p s )   { 
 
 +     c o n s t   a c t i v e I d s   =   u s e M e m o ( ( )   = >   n e w   S e t ( [ a c t i v e S t e p I d ] ) ,   [ a c t i v e S t e p I d ] ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < s e c t i o n   c l a s s N a m e = " r o u n d e d - 3 x l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 5 0   t e x t - z i n c - 1 0 0   s h a d o w - 2 x l   s h a d o w - b l a c k / 2 0 " > 
 
 +             < d i v   c l a s s N a m e = " b o r d e r - b   b o r d e r - z i n c - 8 0 0   p x - 5   p y - 4 " > 
 
 +                 < d i v   c l a s s N a m e = " t e x t - [ 1 1 p x ]   u p p e r c a s e   t r a c k i n g - [ 0 . 2 4 e m ]   t e x t - z i n c - 5 0 0 " > T a s k   l i s t < / d i v > 
 
 +                 < h 2   c l a s s N a m e = " m t - 1   t e x t - l g   f o n t - s e m i b o l d   t e x t - z i n c - 5 0 " > T h i n k i n g   s t e p s < / h 2 > 
 
 +             < / d i v > 
 
 + 
 
 +             < m o t i o n . u l   l a y o u t   c l a s s N a m e = " s p a c e - y - 3   p x - 4   p y - 4 " > 
 
 +                 { s t e p s . m a p ( ( s t e p )   = >   ( 
 
 +                     < T a s k R o w   k e y = { s t e p . i d }   s t e p = { s t e p }   i s A c t i v e = { a c t i v e I d s . h a s ( s t e p . i d ) }   / > 
 
 +                 ) ) } 
 
 +             < / m o t i o n . u l > 
 
 +         < / s e c t i o n > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T h i n k i n g C a r d . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T h i n k i n g C a r d . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 1 6 d 0 a 6 b 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / T h i n k i n g C a r d . t s x 
 
 @ @   - 0 , 0   + 1 , 1 6 5   @ @ 
 
 + i m p o r t   {   I c o n   }   f r o m   " . . / I c o n " ; 
 
 + 
 
 + t y p e   S t e p S t a t u s   =   " p e n d i n g "   |   " r u n n i n g "   |   " c o m p l e t e d "   |   " e r r o r " ; 
 
 + 
 
 + i n t e r f a c e   T h i n k i n g C a r d P r o p s   { 
 
 +     t i t l e :   s t r i n g ; 
 
 +     o v e r v i e w :   s t r i n g ; 
 
 +     s t e p s :   A r r a y < { 
 
 +         i d :   n u m b e r ; 
 
 +         t i t l e :   s t r i n g ; 
 
 +         d e s c r i p t i o n :   s t r i n g ; 
 
 +         s t a t u s :   S t e p S t a t u s ; 
 
 +         s u b _ s t e p s :   A r r a y < { 
 
 +             i d :   s t r i n g ; 
 
 +             d e s c r i p t i o n :   s t r i n g ; 
 
 +             s t a t u s :   S t e p S t a t u s ; 
 
 +         } > ; 
 
 +     } > ; 
 
 +     c u r r e n t S t e p :   n u m b e r ; 
 
 +     i s C o m p l e t e :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   s t a t u s I c o n ( s t a t u s :   S t e p S t a t u s )   { 
 
 +     s w i t c h   ( s t a t u s )   { 
 
 +         c a s e   " r u n n i n g " : 
 
 +             r e t u r n   < I c o n   n a m e = " L o a d e r 2 "   s i z e = { 1 6 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " a n i m a t e - s p i n   t e x t - a m b e r - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " c o m p l e t e d " : 
 
 +             r e t u r n   < I c o n   n a m e = " C h e c k C i r c l e 2 "   s i z e = { 1 6 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " t e x t - e m e r a l d - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " e r r o r " : 
 
 +             r e t u r n   < I c o n   n a m e = " X C i r c l e "   s i z e = { 1 6 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " t e x t - r o s e - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   < I c o n   n a m e = " C i r c l e "   s i z e = { 1 6 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " t e x t - z i n c - 5 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +     } 
 
 + } 
 
 + 
 
 + f u n c t i o n   m i n i I c o n ( s t a t u s :   S t e p S t a t u s )   { 
 
 +     s w i t c h   ( s t a t u s )   { 
 
 +         c a s e   " r u n n i n g " : 
 
 +             r e t u r n   < I c o n   n a m e = " L o a d e r 2 "   s i z e = { 1 2 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " a n i m a t e - s p i n   t e x t - a m b e r - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " c o m p l e t e d " : 
 
 +             r e t u r n   < I c o n   n a m e = " C h e c k C i r c l e 2 "   s i z e = { 1 2 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " t e x t - e m e r a l d - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         c a s e   " e r r o r " : 
 
 +             r e t u r n   < I c o n   n a m e = " X C i r c l e "   s i z e = { 1 2 }   s t r o k e W i d t h = { 2 }   c l a s s N a m e = " t e x t - r o s e - 4 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   < s p a n   c l a s s N a m e = " m t - 0 . 5   h - 2   w - 2   r o u n d e d - f u l l   b o r d e r   b o r d e r - z i n c - 6 0 0   b g - z i n c - 7 0 0 "   a r i a - h i d d e n = " t r u e "   / > ; 
 
 +     } 
 
 + } 
 
 + 
 
 + f u n c t i o n   t o n e ( s t a t u s :   S t e p S t a t u s )   { 
 
 +     s w i t c h   ( s t a t u s )   { 
 
 +         c a s e   " r u n n i n g " : 
 
 +             r e t u r n   " b o r d e r - a m b e r - 5 0 0 / 2 0   b g - a m b e r - 5 0 0 / 1 0   t e x t - a m b e r - 3 0 0 " ; 
 
 +         c a s e   " c o m p l e t e d " : 
 
 +             r e t u r n   " b o r d e r - e m e r a l d - 5 0 0 / 2 0   b g - e m e r a l d - 5 0 0 / 1 0   t e x t - e m e r a l d - 3 0 0 " ; 
 
 +         c a s e   " e r r o r " : 
 
 +             r e t u r n   " b o r d e r - r o s e - 5 0 0 / 2 0   b g - r o s e - 5 0 0 / 1 0   t e x t - r o s e - 3 0 0 " ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   " b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0   t e x t - z i n c - 4 0 0 " ; 
 
 +     } 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   T h i n k i n g C a r d ( {   t i t l e ,   o v e r v i e w ,   s t e p s ,   c u r r e n t S t e p ,   i s C o m p l e t e   } :   T h i n k i n g C a r d P r o p s )   { 
 
 +     c o n s t   c o m p l e t e d C o u n t   =   s t e p s . f i l t e r ( ( s t e p )   = >   s t e p . s t a t u s   = = =   " c o m p l e t e d " ) . l e n g t h ; 
 
 +     c o n s t   p r o g r e s s   =   i s C o m p l e t e   | |   s t e p s . l e n g t h   = = =   0   ?   1 0 0   :   M a t h . r o u n d ( ( c o m p l e t e d C o u n t   /   s t e p s . l e n g t h )   *   1 0 0 ) ; 
 
 +     c o n s t   a c t i v e L a b e l   =   i s C o m p l e t e   ?   " P l a n o   d e   E x e c u % % o "   :   " T h i n k i n g . . . " ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < s e c t i o n   c l a s s N a m e = " o v e r f l o w - h i d d e n   r o u n d e d - 3 x l   b o r d e r   b o r d e r - z i n c - 8 0 0 / 8 0   b g - z i n c - 9 5 0   t e x t - z i n c - 1 0 0   s h a d o w - [ 0 _ 2 4 p x _ 8 0 p x _ - 3 6 p x _ r g b a ( 0 , 0 , 0 , 0 . 9 ) ] " > 
 
 +             < d i v   c l a s s N a m e = " b o r d e r - b   b o r d e r - z i n c - 8 0 0 / 8 0   b g - g r a d i e n t - t o - b   f r o m - z i n c - 9 0 0 / 8 0   t o - z i n c - 9 5 0   p x - 5   p y - 4 " > 
 
 +                 < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   j u s t i f y - b e t w e e n   g a p - 4 " > 
 
 +                     < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                         < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                             < s p a n   c l a s s N a m e = " i n l i n e - f l e x   i t e m s - c e n t e r   r o u n d e d - f u l l   b o r d e r   b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0   p x - 2 . 5   p y - 0 . 5   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 2 e m ]   t e x t - z i n c - 3 0 0 " > 
 
 +                                 { a c t i v e L a b e l } 
 
 +                             < / s p a n > 
 
 +                             < s p a n   c l a s s N a m e = " t e x t - x s   u p p e r c a s e   t r a c k i n g - [ 0 . 2 2 e m ]   t e x t - z i n c - 5 0 0 " > A g e n t i c   m o d e < / s p a n > 
 
 +                         < / d i v > 
 
 +                         < h 2   c l a s s N a m e = " m t - 2   t r u n c a t e   t e x t - l g   f o n t - s e m i b o l d   t e x t - z i n c - 5 0 " > { t i t l e } < / h 2 > 
 
 +                         < p   c l a s s N a m e = " m t - 1   t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 4 0 0 " > { o v e r v i e w } < / p > 
 
 +                     < / d i v > 
 
 + 
 
 +                     < d i v   c l a s s N a m e = " r o u n d e d - 2 x l   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0 / 8 0   p x - 3   p y - 2   t e x t - r i g h t " > 
 
 +                         < d i v   c l a s s N a m e = " t e x t - [ 1 1 p x ]   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   t e x t - z i n c - 5 0 0 " > P r o g r e s s < / d i v > 
 
 +                         < d i v   c l a s s N a m e = " m t - 1   t e x t - x l   f o n t - s e m i b o l d   t a b u l a r - n u m s   t e x t - z i n c - 5 0 " > { p r o g r e s s } % < / d i v > 
 
 +                     < / d i v > 
 
 +                 < / d i v > 
 
 + 
 
 +                 < d i v   c l a s s N a m e = " m t - 4   s p a c e - y - 2 " > 
 
 +                     < d i v   c l a s s N a m e = " h - 2   o v e r f l o w - h i d d e n   r o u n d e d - f u l l   b g - z i n c - 8 0 0 " > 
 
 +                         < d i v 
 
 +                             c l a s s N a m e = " h - f u l l   r o u n d e d - f u l l   b g - g r a d i e n t - t o - r   f r o m - z i n c - 5 0 0   v i a - z i n c - 3 0 0   t o - e m e r a l d - 4 0 0   t r a n s i t i o n - a l l   d u r a t i o n - 5 0 0   e a s e - o u t " 
 
 +                             s t y l e = { {   w i d t h :   ` $ { p r o g r e s s } % `   } } 
 
 +                         / > 
 
 +                     < / d i v > 
 
 +                     < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   j u s t i f y - b e t w e e n   t e x t - [ 1 1 p x ]   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   t e x t - z i n c - 5 0 0 " > 
 
 +                         < s p a n > { s t e p s . l e n g t h }   s t e p s < / s p a n > 
 
 +                         < s p a n > { i s C o m p l e t e   ?   " C o m p l e t e d "   :   ` S t e p   $ { c u r r e n t S t e p } ` } < / s p a n > 
 
 +                     < / d i v > 
 
 +                 < / d i v > 
 
 +             < / d i v > 
 
 + 
 
 +             < d i v   c l a s s N a m e = " p - 4   s m : p - 5 " > 
 
 +                 < u l   c l a s s N a m e = " s p a c e - y - 3 " > 
 
 +                     { s t e p s . m a p ( ( s t e p ,   i n d e x )   = >   { 
 
 +                         c o n s t   i s A c t i v e   =   s t e p . i d   = = =   c u r r e n t S t e p   | |   s t e p . s t a t u s   = = =   " r u n n i n g " ; 
 
 +                         c o n s t   i s D o n e   =   s t e p . s t a t u s   = = =   " c o m p l e t e d " ; 
 
 + 
 
 +                         r e t u r n   ( 
 
 +                             < l i 
 
 +                                 k e y = { s t e p . i d } 
 
 +                                 c l a s s N a m e = { ` r e l a t i v e   r o u n d e d - 2 x l   b o r d e r   p x - 4   p y - 4   t r a n s i t i o n - a l l   d u r a t i o n - 3 0 0   $ { 
 
 +                                     i s A c t i v e   ?   " b o r d e r - z i n c - 7 0 0   b g - z i n c - 9 0 0 / 8 0   s h a d o w - [ 0 _ 0 _ 0 _ 1 p x _ r g b a ( 6 3 , 6 3 , 7 0 , 0 . 3 5 ) ] "   :   " b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 5 0 / 7 0 " 
 
 +                                 }   $ { i s D o n e   ?   " o p a c i t y - 9 5 "   :   " " } ` } 
 
 +                                 a r i a - c u r r e n t = { i s A c t i v e   ?   " s t e p "   :   u n d e f i n e d } 
 
 +                             > 
 
 +                                 { i n d e x   ! = =   s t e p s . l e n g t h   -   1   ?   < d i v   c l a s s N a m e = " a b s o l u t e   l e f t - [ 2 6 p x ]   t o p - 1 2   b o t t o m - 0   w - p x   b g - z i n c - 8 0 0 "   a r i a - h i d d e n = " t r u e "   / >   :   n u l l } 
 
 + 
 
 +                                 < d i v   c l a s s N a m e = " f l e x   g a p - 3 " > 
 
 +                                     < d i v   c l a s s N a m e = { ` m t - 0 . 5   f l e x   h - 9   w - 9   s h r i n k - 0   i t e m s - c e n t e r   j u s t i f y - c e n t e r   r o u n d e d - f u l l   b o r d e r   $ { t o n e ( s t e p . s t a t u s ) } ` } > 
 
 +                                         { s t a t u s I c o n ( s t e p . s t a t u s ) } 
 
 +                                     < / d i v > 
 
 + 
 
 +                                     < d i v   c l a s s N a m e = " m i n - w - 0   f l e x - 1 " > 
 
 +                                         < d i v   c l a s s N a m e = " f l e x   i t e m s - s t a r t   j u s t i f y - b e t w e e n   g a p - 3 " > 
 
 +                                             < d i v   c l a s s N a m e = " m i n - w - 0 " > 
 
 +                                                 < d i v   c l a s s N a m e = " f l e x   i t e m s - c e n t e r   g a p - 2 " > 
 
 +                                                     < s p a n   c l a s s N a m e = " r o u n d e d - m d   b o r d e r   b o r d e r - z i n c - 8 0 0   b g - z i n c - 9 0 0   p x - 2   p y - 0 . 5   t e x t - x s   f o n t - m e d i u m   t e x t - z i n c - 3 0 0 " > 
 
 +                                                         S t e p   { s t e p . i d } 
 
 +                                                     < / s p a n > 
 
 +                                                     < h 3   c l a s s N a m e = " t r u n c a t e   t e x t - s m   f o n t - s e m i b o l d   t e x t - z i n c - 1 0 0 " > { s t e p . t i t l e } < / h 3 > 
 
 +                                                 < / d i v > 
 
 +                                                 < p   c l a s s N a m e = " m t - 1   t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 4 0 0 " > { s t e p . d e s c r i p t i o n } < / p > 
 
 +                                             < / d i v > 
 
 + 
 
 +                                             < s p a n   c l a s s N a m e = { ` s h r i n k - 0   r o u n d e d - f u l l   b o r d e r   p x - 2 . 5   p y - 0 . 5   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 8 e m ]   $ { t o n e ( s t e p . s t a t u s ) } ` } > 
 
 +                                                 { s t e p . s t a t u s } 
 
 +                                             < / s p a n > 
 
 +                                         < / d i v > 
 
 + 
 
 +                                         { s t e p . s u b _ s t e p s . l e n g t h   >   0   ?   ( 
 
 +                                             < d i v   c l a s s N a m e = " m t - 4   s p a c e - y - 2   b o r d e r - l   b o r d e r - z i n c - 8 0 0   p l - 4 " > 
 
 +                                                 { s t e p . s u b _ s t e p s . m a p ( ( s u b S t e p )   = >   ( 
 
 +                                                     < d i v   k e y = { s u b S t e p . i d }   c l a s s N a m e = " f l e x   i t e m s - s t a r t   g a p - 2   r o u n d e d - x l   b o r d e r   b o r d e r - z i n c - 9 0 0   b g - z i n c - 9 5 0 / 6 0   p x - 3   p y - 2 " > 
 
 +                                                         < d i v   c l a s s N a m e = " m t - 0 . 5 " > { m i n i I c o n ( s u b S t e p . s t a t u s ) } < / d i v > 
 
 +                                                         < d i v   c l a s s N a m e = " m i n - w - 0   f l e x - 1 " > 
 
 +                                                             < d i v   c l a s s N a m e = " t e x t - x s   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 6 e m ]   t e x t - z i n c - 5 0 0 " > { s u b S t e p . i d } < / d i v > 
 
 +                                                             < d i v   c l a s s N a m e = " t e x t - s m   l e a d i n g - 6   t e x t - z i n c - 2 0 0 " > { s u b S t e p . d e s c r i p t i o n } < / d i v > 
 
 +                                                         < / d i v > 
 
 +                                                         < s p a n   c l a s s N a m e = { ` r o u n d e d - f u l l   b o r d e r   p x - 2   p y - 0 . 5   t e x t - [ 1 1 p x ]   f o n t - m e d i u m   u p p e r c a s e   t r a c k i n g - [ 0 . 1 6 e m ]   $ { t o n e ( s u b S t e p . s t a t u s ) } ` } > 
 
 +                                                             { s u b S t e p . s t a t u s } 
 
 +                                                         < / s p a n > 
 
 +                                                     < / d i v > 
 
 +                                                 ) ) } 
 
 +                                             < / d i v > 
 
 +                                         )   :   n u l l } 
 
 +                                     < / d i v > 
 
 +                                 < / d i v > 
 
 +                             < / l i > 
 
 +                         ) ; 
 
 +                     } ) } 
 
 +                 < / u l > 
 
 +             < / d i v > 
 
 +         < / s e c t i o n > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / i n d e x . t s   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / i n d e x . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . e 7 a 5 1 8 9 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / c h a t / i n d e x . t s 
 
 @ @   - 0 , 0   + 1 , 4   @ @ 
 
 + e x p o r t   {   d e f a u l t   a s   M e s s a g e B u b b l e   }   f r o m   ' . / M e s s a g e B u b b l e ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   T h i n k i n g C a r d   }   f r o m   ' . / T h i n k i n g C a r d ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   T a s k L i s t   }   f r o m   ' . / T a s k L i s t ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   A r t i f a c t V i e w e r   }   f r o m   ' . / A r t i f a c t V i e w e r ' ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t U p d a t e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t U p d a t e . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . a f b f c 9 0 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t U p d a t e . t s x 
 
 @ @   - 0 , 0   + 1 , 2 6   @ @ 
 
 + i m p o r t   {   I n f o ,   A l e r t T r i a n g l e ,   C h e c k C i r c l e 2 ,   X C i r c l e   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + 
 
 + t y p e   U p d a t e T o n e   =   " i n f o "   |   " s u c c e s s "   |   " w a r n i n g "   |   " e r r o r " ; 
 
 + 
 
 + i n t e r f a c e   A g e n t U p d a t e P r o p s   { 
 
 +     c o n t e n t :   s t r i n g ; 
 
 +     t o n e ? :   U p d a t e T o n e ; 
 
 + } 
 
 + 
 
 + c o n s t   t o n e M a p :   R e c o r d < U p d a t e T o n e ,   t y p e o f   I n f o >   =   { 
 
 +     i n f o :   I n f o , 
 
 +     s u c c e s s :   C h e c k C i r c l e 2 , 
 
 +     w a r n i n g :   A l e r t T r i a n g l e , 
 
 +     e r r o r :   X C i r c l e , 
 
 + } ; 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   A g e n t U p d a t e ( {   c o n t e n t ,   t o n e   =   " i n f o "   } :   A g e n t U p d a t e P r o p s )   { 
 
 +     c o n s t   I c o n C o m p   =   t o n e M a p [ t o n e ] ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = { ` a g e n t i c - u p d a t e   a g e n t i c - u p d a t e - - $ { t o n e } ` } > 
 
 +             < I c o n C o m p   c l a s s N a m e = " a g e n t i c - u p d a t e _ _ i c o n "   s i z e = { 1 2 }   a r i a - h i d d e n = " t r u e "   / > 
 
 +             < s p a n > { c o n t e n t } < / s p a n > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c M e s s a g e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c M e s s a g e . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . c 5 9 9 b a 1 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c M e s s a g e . t s x 
 
 @ @   - 0 , 0   + 1 , 7 6   @ @ 
 
 + i m p o r t   t y p e   {   A g e n t P l a n ,   A g e n t P l a n S t a t e   }   f r o m   " . . / . . / t y p e s / f o r g e a g e n t " ; 
 
 + i m p o r t   {   r e s o l v e F o r g e A g e n t F i n a l R e s p o n s e   }   f r o m   " . . / . . / l i b / f o r g e a g e n t - s t a t e " ; 
 
 + i m p o r t   S t e p C a r d   f r o m   " . / S t e p C a r d " ; 
 
 + i m p o r t   A g e n t U p d a t e   f r o m   " . / A g e n t U p d a t e " ; 
 
 + i m p o r t   F i n a l R e s p o n s e   f r o m   " . / F i n a l R e s p o n s e " ; 
 
 + i m p o r t   A r t i f a c t C a r d   f r o m   " . / A r t i f a c t C a r d " ; 
 
 + i m p o r t   S p e c i a l i s t C a r d   f r o m   " . / S p e c i a l i s t C a r d " ; 
 
 + 
 
 + i n t e r f a c e   A g e n t i c M e s s a g e P r o p s   { 
 
 +     p l a n :   A g e n t P l a n ; 
 
 +     s t a t e :   A g e n t P l a n S t a t e ; 
 
 +     i s E x e c u t i n g ? :   b o o l e a n ; 
 
 +     m o d e l T i e r ? :   " L i t e "   |   " I r o n " ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   A g e n t i c M e s s a g e ( {   p l a n ,   s t a t e ,   i s E x e c u t i n g ,   m o d e l T i e r   =   " L i t e "   } :   A g e n t i c M e s s a g e P r o p s )   { 
 
 +     c o n s t   c u r r e n t S t e p   =   s t a t e ? . c u r r e n t _ s t e p   ? ?   0 ; 
 
 +     c o n s t   i s C o m p l e t e   =   s t a t e ? . s t a t u s   = = =   " c o m p l e t e d " ; 
 
 +     c o n s t   s y s t e m M e s s a g e s   =   s t a t e ? . s y s t e m _ m e s s a g e s   ? ?   [ ] ; 
 
 +     c o n s t   s p e c i a l i s t s   =   s t a t e ? . s p e c i a l i s t s   ? ?   [ ] ; 
 
 +     c o n s t   f i n a l R e s p o n s e   =   r e s o l v e F o r g e A g e n t F i n a l R e s p o n s e ( s t a t e ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " f l e x   m a x - w - [ 9 0 % ]   f l e x - c o l   g a p - 3   p b - 3 " > 
 
 +             { / *   T h i n k i n g   /   P l a n   C a r d   * / } 
 
 +             < S t e p C a r d 
 
 +                 t i t l e = { p l a n . t i t l e } 
 
 +                 o v e r v i e w = { p l a n . o v e r v i e w } 
 
 +                 s t e p s = { p l a n . s t e p s } 
 
 +                 c u r r e n t S t e p = { c u r r e n t S t e p } 
 
 +                 i s C o m p l e t e = { i s C o m p l e t e } 
 
 +                 m o d e l T i e r = { m o d e l T i e r } 
 
 +             / > 
 
 + 
 
 +             { / *   I n t e r m e d i a t e   U p d a t e s   * / } 
 
 +             { s y s t e m M e s s a g e s . l e n g t h   >   0   & &   ( 
 
 +                 < d i v   c l a s s N a m e = " f l e x   f l e x - c o l   g a p - 1 " > 
 
 +                     { s y s t e m M e s s a g e s . m a p ( ( m s g )   = >   ( 
 
 +                         < A g e n t U p d a t e 
 
 +                             k e y = { m s g . i d } 
 
 +                             c o n t e n t = { m s g . c o n t e n t } 
 
 +                             t o n e = { m s g . t o n e } 
 
 +                         / > 
 
 +                     ) ) } 
 
 +                 < / d i v > 
 
 +             ) } 
 
 + 
 
 +             { / *   S p e c i a l i s t   C a r d s   * / } 
 
 +             { s p e c i a l i s t s . l e n g t h   >   0   & &   ( 
 
 +                 < d i v   c l a s s N a m e = " f l e x   f l e x - c o l   g a p - 2 " > 
 
 +                     { s p e c i a l i s t s . m a p ( ( s p e c ,   i )   = >   ( 
 
 +                         < S p e c i a l i s t C a r d 
 
 +                             k e y = { s p e c . i d } 
 
 +                             s p e c i a l i s t = { s p e c } 
 
 +                             i s L a s t = { i   = = =   s p e c i a l i s t s . l e n g t h   -   1 } 
 
 +                         / > 
 
 +                     ) ) } 
 
 +                 < / d i v > 
 
 +             ) } 
 
 + 
 
 +             { / *   F i n a l   R e s p o n s e   * / } 
 
 +             { f i n a l R e s p o n s e   ?   ( 
 
 +                 < F i n a l R e s p o n s e   c o n t e n t = { f i n a l R e s p o n s e }   / > 
 
 +             )   :   n u l l } 
 
 + 
 
 +             { / *   A r t i f a c t   D o w n l o a d   * / } 
 
 +             { s t a t e ? . a r t i f a c t   ?   ( 
 
 +                 < A r t i f a c t C a r d 
 
 +                     f i l e n a m e = { s t a t e . a r t i f a c t . f i l e n a m e } 
 
 +                     c o n t e n t = { s t a t e . a r t i f a c t . c o n t e n t } 
 
 +                     l a n g u a g e = { s t a t e . a r t i f a c t . l a n g u a g e } 
 
 +                 / > 
 
 +             )   :   n u l l } 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c T o g g l e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c T o g g l e . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . b 5 9 8 1 f 9 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A g e n t i c T o g g l e . t s x 
 
 @ @   - 0 , 0   + 1 , 6 5   @ @ 
 
 + i n t e r f a c e   A g e n t i c T o g g l e P r o p s   { 
 
 +     i s A c t i v e :   b o o l e a n ; 
 
 +     o n T o g g l e :   ( )   = >   v o i d ; 
 
 +     d i s a b l e d ? :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   A g e n t i c T o g g l e ( {   i s A c t i v e ,   o n T o g g l e ,   d i s a b l e d   =   f a l s e   } :   A g e n t i c T o g g l e P r o p s )   { 
 
 +     r e t u r n   ( 
 
 +         < b u t t o n 
 
 +             t y p e = " b u t t o n " 
 
 +             o n C l i c k = { o n T o g g l e } 
 
 +             d i s a b l e d = { d i s a b l e d } 
 
 +             a r i a - p r e s s e d = { i s A c t i v e } 
 
 +             a r i a - l a b e l = { i s A c t i v e   ?   " M o d o   a g e n t i c   a t i v o "   :   " M o d o   a g e n t i c   d e s a t i v a d o " } 
 
 +             t i t l e = " A l t e r n a   o   m o d o   a g e n t i c :   o   a s s i s t e n t e   p o d e   p l a n e j a r   e   e x e c u t a r   t a r e f a s   c o m   m a i s   a u t o n o m i a . " 
 
 +             s t y l e = { { 
 
 +                 d i s p l a y :   " i n l i n e - f l e x " , 
 
 +                 a l i g n I t e m s :   " c e n t e r " , 
 
 +                 g a p :   " 6 p x " , 
 
 +                 p a d d i n g :   " 5 p x   1 0 p x " , 
 
 +                 b o r d e r R a d i u s :   " v a r ( - - r a d i u s ) " , 
 
 +                 b o r d e r :   i s A c t i v e 
 
 +                     ?   " 1 p x   s o l i d   r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 3 5 ) " 
 
 +                     :   " 1 p x   s o l i d   v a r ( - - b o r d e r 2 ) " , 
 
 +                 b a c k g r o u n d :   i s A c t i v e 
 
 +                     ?   " r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 0 8 ) " 
 
 +                     :   " v a r ( - - b g 3 ) " , 
 
 +                 c o l o r :   i s A c t i v e   ?   " v a r ( - - a c c e n t 2 ) "   :   " v a r ( - - t e x t 2 ) " , 
 
 +                 f o n t S i z e :   " 0 . 7 8 r e m " , 
 
 +                 f o n t W e i g h t :   5 0 0 , 
 
 +                 f o n t F a m i l y :   " i n h e r i t " , 
 
 +                 c u r s o r :   d i s a b l e d   ?   " n o t - a l l o w e d "   :   " p o i n t e r " , 
 
 +                 o p a c i t y :   d i s a b l e d   ?   0 . 5   :   1 , 
 
 +                 t r a n s i t i o n :   " a l l   0 . 1 5 s   e a s e " , 
 
 +                 w h i t e S p a c e :   " n o w r a p " , 
 
 +                 l e t t e r S p a c i n g :   " - 0 . 0 1 e m " , 
 
 +             } } 
 
 +         > 
 
 +             < s p a n 
 
 +                 a r i a - h i d d e n = " t r u e " 
 
 +                 s t y l e = { { 
 
 +                     w i d t h :   " 6 p x " , 
 
 +                     h e i g h t :   " 6 p x " , 
 
 +                     b o r d e r R a d i u s :   " 5 0 % " , 
 
 +                     b a c k g r o u n d :   i s A c t i v e   ?   " v a r ( - - a c c e n t ) "   :   " v a r ( - - t e x t 3 ) " , 
 
 +                     f l e x S h r i n k :   0 , 
 
 +                     b o x S h a d o w :   i s A c t i v e   ?   " 0   0   6 p x   r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 6 ) "   :   " n o n e " , 
 
 +                     t r a n s i t i o n :   " a l l   0 . 1 5 s   e a s e " , 
 
 +                 } } 
 
 +             / > 
 
 +             A g e n t i c 
 
 +             < s p a n 
 
 +                 s t y l e = { { 
 
 +                     f o n t S i z e :   " 0 . 6 8 r e m " , 
 
 +                     f o n t W e i g h t :   6 0 0 , 
 
 +                     c o l o r :   i s A c t i v e   ?   " v a r ( - - a c c e n t ) "   :   " v a r ( - - t e x t 3 ) " , 
 
 +                     l e t t e r S p a c i n g :   " 0 . 0 5 e m " , 
 
 +                     t e x t T r a n s f o r m :   " u p p e r c a s e " , 
 
 +                 } } 
 
 +             > 
 
 +                 { i s A c t i v e   ?   " O N "   :   " O F F " } 
 
 +             < / s p a n > 
 
 +         < / b u t t o n > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A r t i f a c t C a r d . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A r t i f a c t C a r d . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 3 f 5 b a 0 2 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / A r t i f a c t C a r d . t s x 
 
 @ @   - 0 , 0   + 1 , 6 8   @ @ 
 
 + i m p o r t   {   D o w n l o a d ,   F i l e T e x t ,   F i l e C o d e ,   F i l e J s o n ,   F i l e   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + 
 
 + i n t e r f a c e   A r t i f a c t C a r d P r o p s   { 
 
 +     f i l e n a m e :   s t r i n g ; 
 
 +     c o n t e n t :   s t r i n g ; 
 
 +     l a n g u a g e ? :   s t r i n g ; 
 
 +     o n D o w n l o a d ? :   ( )   = >   v o i d ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   g e t E x t ( f i l e n a m e :   s t r i n g ) :   s t r i n g   { 
 
 +     c o n s t   p a r t s   =   f i l e n a m e . t r i m ( ) . t o L o w e r C a s e ( ) . s p l i t ( " . " ) ; 
 
 +     r e t u r n   p a r t s . l e n g t h   >   1   ?   ( p a r t s [ p a r t s . l e n g t h   -   1 ]   ? ?   " " )   :   " " ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   f o r m a t S i z e ( b y t e s :   n u m b e r ) :   s t r i n g   { 
 
 +     i f   ( b y t e s   <   1 0 2 4 )   r e t u r n   ` $ { b y t e s }   B ` ; 
 
 +     i f   ( b y t e s   <   1 0 2 4   *   1 0 2 4 )   r e t u r n   ` $ { ( b y t e s   /   1 0 2 4 ) . t o F i x e d ( 1 ) }   K B ` ; 
 
 +     r e t u r n   ` $ { ( b y t e s   /   ( 1 0 2 4   *   1 0 2 4 ) ) . t o F i x e d ( 1 ) }   M B ` ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   F i l e I c o n ( {   e x t   } :   {   e x t :   s t r i n g   } )   { 
 
 +     c o n s t   I c o n C o m p   = 
 
 +         e x t   = = =   " m d "   ?   F i l e T e x t 
 
 +         :   [ " t s " ,   " t s x " ,   " j s " ,   " j s x " ,   " p y " ,   " r s " ] . i n c l u d e s ( e x t )   ?   F i l e C o d e 
 
 +         :   e x t   = = =   " j s o n "   ?   F i l e J s o n 
 
 +         :   F i l e ; 
 
 + 
 
 +     r e t u r n   < I c o n C o m p   s i z e = { 1 6 }   c l a s s N a m e = " t e x t - z i n c - 4 0 0 "   / > ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   A r t i f a c t C a r d ( {   f i l e n a m e ,   c o n t e n t ,   l a n g u a g e ,   o n D o w n l o a d   } :   A r t i f a c t C a r d P r o p s )   { 
 
 +     c o n s t   e x t   =   g e t E x t ( f i l e n a m e ) ; 
 
 +     c o n s t   s i z e   =   f o r m a t S i z e ( n e w   B l o b ( [ c o n t e n t ] ) . s i z e ) ; 
 
 + 
 
 +     c o n s t   h a n d l e D o w n l o a d   =   ( )   = >   { 
 
 +         i f   ( o n D o w n l o a d )   {   o n D o w n l o a d ( ) ;   r e t u r n ;   } 
 
 +         c o n s t   b l o b   =   n e w   B l o b ( [ c o n t e n t ] ,   {   t y p e :   " t e x t / p l a i n ; c h a r s e t = u t f - 8 "   } ) ; 
 
 +         c o n s t   u r l   =   U R L . c r e a t e O b j e c t U R L ( b l o b ) ; 
 
 +         c o n s t   a   =   d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; 
 
 +         a . h r e f   =   u r l ; 
 
 +         a . d o w n l o a d   =   f i l e n a m e ; 
 
 +         a . c l i c k ( ) ; 
 
 +         U R L . r e v o k e O b j e c t U R L ( u r l ) ; 
 
 +     } ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " a g e n t i c - a r t i f a c t " > 
 
 +             < s p a n   c l a s s N a m e = " a g e n t i c - a r t i f a c t _ _ i c o n " > 
 
 +                 < F i l e I c o n   e x t = { e x t }   / > 
 
 +             < / s p a n > 
 
 +             < d i v   c l a s s N a m e = " a g e n t i c - a r t i f a c t _ _ i n f o " > 
 
 +                 < p   c l a s s N a m e = " a g e n t i c - a r t i f a c t _ _ n a m e " > { f i l e n a m e } < / p > 
 
 +                 < p   c l a s s N a m e = " a g e n t i c - a r t i f a c t _ _ m e t a " > 
 
 +                     { s i z e } { l a n g u a g e   ?   `   ,%   $ { l a n g u a g e } `   :   " " } 
 
 +                 < / p > 
 
 +             < / d i v > 
 
 +             < b u t t o n 
 
 +                 t y p e = " b u t t o n " 
 
 +                 o n C l i c k = { h a n d l e D o w n l o a d } 
 
 +                 c l a s s N a m e = " a g e n t i c - a r t i f a c t _ _ b t n " 
 
 +                 a r i a - l a b e l = { ` D o w n l o a d   $ { f i l e n a m e } ` } 
 
 +             > 
 
 +                 < D o w n l o a d   s i z e = { 1 1 }   / > 
 
 +                 D o w n l o a d 
 
 +             < / b u t t o n > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / F i n a l R e s p o n s e . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / F i n a l R e s p o n s e . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . d f 2 2 8 b a 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / F i n a l R e s p o n s e . t s x 
 
 @ @   - 0 , 0   + 1 , 4 5   @ @ 
 
 + i m p o r t   {   u s e E f f e c t ,   u s e M e m o ,   u s e R e f   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   r e n d e r M a r k d o w n ,   e n s u r e H l j s   }   f r o m   " . . / . . / l i b / m a r k d o w n " ; 
 
 + 
 
 + i n t e r f a c e   F i n a l R e s p o n s e P r o p s   { 
 
 +     c o n t e n t :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   F i n a l R e s p o n s e ( {   c o n t e n t   } :   F i n a l R e s p o n s e P r o p s )   { 
 
 +     c o n s t   c o n t a i n e r R e f   =   u s e R e f < H T M L D i v E l e m e n t > ( n u l l ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         v o i d   e n s u r e H l j s ( ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     c o n s t   h t m l   =   u s e M e m o ( ( )   = >   r e n d e r M a r k d o w n ( c o n t e n t ) ,   [ c o n t e n t ] ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         c o n s t   r o o t   =   c o n t a i n e r R e f . c u r r e n t ; 
 
 +         i f   ( ! r o o t )   r e t u r n ; 
 
 + 
 
 +         c o n s t   b u t t o n s   =   r o o t . q u e r y S e l e c t o r A l l < H T M L B u t t o n E l e m e n t > ( " . c o p y - c o d e - b t n " ) ; 
 
 +         b u t t o n s . f o r E a c h ( ( b t n )   = >   { 
 
 +             b t n . o n c l i c k   =   ( )   = >   { 
 
 +                 c o n s t   c o d e   =   b t n . g e t A t t r i b u t e ( " d a t a - c o d e " )   | |   " " ; 
 
 +                 n a v i g a t o r . c l i p b o a r d . w r i t e T e x t ( c o d e ) . t h e n ( ( )   = >   { 
 
 +                     c o n s t   o r i g i n a l   =   b t n . t e x t C o n t e n t   | |   " C o p y " ; 
 
 +                     b t n . t e x t C o n t e n t   =   " C o p i e d ! " ; 
 
 +                     b t n . s t y l e . c o l o r   =   " v a r ( - - s u c c e s s ,   # 2 2 c 5 5 e ) " ; 
 
 +                     s e t T i m e o u t ( ( )   = >   { 
 
 +                         b t n . t e x t C o n t e n t   =   o r i g i n a l ; 
 
 +                         b t n . s t y l e . c o l o r   =   " " ; 
 
 +                     } ,   1 5 0 0 ) ; 
 
 +                 } ) ; 
 
 +             } ; 
 
 +         } ) ; 
 
 +     } ,   [ h t m l ] ) ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v 
 
 +             r e f = { c o n t a i n e r R e f } 
 
 +             c l a s s N a m e = " m a n u s - m a r k d o w n   t e x t - [ 1 6 p x ]   l e a d i n g - [ 1 . 5 ]   t e x t - [ v a r ( - - t e x t - p r i m a r y , # e 4 e 4 e 7 ) ] " 
 
 +             d a n g e r o u s l y S e t I n n e r H T M L = { {   _ _ h t m l :   h t m l   } } 
 
 +         / > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S p e c i a l i s t C a r d . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S p e c i a l i s t C a r d . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . f 0 9 c 9 f e 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S p e c i a l i s t C a r d . t s x 
 
 @ @   - 0 , 0   + 1 , 9 0   @ @ 
 
 + i m p o r t   {   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   m o t i o n ,   A n i m a t e P r e s e n c e   }   f r o m   " f r a m e r - m o t i o n " ; 
 
 + i m p o r t   {   C h e v r o n D o w n ,   L o a d e r 2 ,   C h e c k C i r c l e 2   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + i m p o r t   t y p e   {   S p e c i a l i s t S t a t e   }   f r o m   " . . / . . / t y p e s / f o r g e a g e n t " ; 
 
 + 
 
 + i n t e r f a c e   S p e c i a l i s t C a r d P r o p s   { 
 
 +     s p e c i a l i s t :   S p e c i a l i s t S t a t e ; 
 
 +     i s L a s t ? :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   S p e c i a l i s t C a r d ( {   s p e c i a l i s t ,   i s L a s t   =   f a l s e   } :   S p e c i a l i s t C a r d P r o p s )   { 
 
 +     c o n s t   [ t h i n k i n g O p e n ,   s e t T h i n k i n g O p e n ]   =   u s e S t a t e ( f a l s e ) ; 
 
 +     c o n s t   h a s T h i n k i n g   =   s p e c i a l i s t . t h i n k i n g . t r i m ( ) . l e n g t h   >   0 ; 
 
 +     c o n s t   h a s R e s p o n s e   =   s p e c i a l i s t . r e s p o n s e . t r i m ( ) . l e n g t h   >   0 ; 
 
 +     c o n s t   i s T h i n k i n g   =   s p e c i a l i s t . s t a t u s   = = =   " t h i n k i n g " ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d " > 
 
 +             { / *   H e a d e r   r o w   * / } 
 
 +             < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ h e a d e r " > 
 
 +                 < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ i d e n t i t y " > 
 
 +                     < s p a n   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ d o t "   a r i a - h i d d e n = " t r u e "   / > 
 
 +                     < s p a n   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ n a m e " > { s p e c i a l i s t . n a m e } < / s p a n > 
 
 +                     < s p a n   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t i t l e " > { s p e c i a l i s t . t i t l e } < / s p a n > 
 
 +                 < / d i v > 
 
 +                 < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ s t a t u s " > 
 
 +                     { i s T h i n k i n g   ?   ( 
 
 +                         < s p a n   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ b a d g e   s p e c i a l i s t - c a r d _ _ b a d g e - - t h i n k i n g " > 
 
 +                             < L o a d e r 2   c l a s s N a m e = " h - 3   w - 3   a n i m a t e - s p i n "   a r i a - h i d d e n = " t r u e "   / > 
 
 +                             P e n s a n d o 
 
 +                         < / s p a n > 
 
 +                     )   :   ( 
 
 +                         < s p a n   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ b a d g e   s p e c i a l i s t - c a r d _ _ b a d g e - - d o n e " > 
 
 +                             < C h e c k C i r c l e 2   c l a s s N a m e = " h - 3   w - 3 "   a r i a - h i d d e n = " t r u e "   / > 
 
 +                             R e s p o n d i d o 
 
 +                         < / s p a n > 
 
 +                     ) } 
 
 +                 < / d i v > 
 
 +             < / d i v > 
 
 + 
 
 +             { / *   T h i n k i n g   c h a i n        a l w a y s   v i s i b l e   i f   p r e s e n t ,   t o g g l e a b l e   * / } 
 
 +             { h a s T h i n k i n g   & &   ( 
 
 +                 < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t h i n k i n g - s e c t i o n " > 
 
 +                     < b u t t o n 
 
 +                         t y p e = " b u t t o n " 
 
 +                         o n C l i c k = { ( )   = >   s e t T h i n k i n g O p e n ( ( v )   = >   ! v ) } 
 
 +                         c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t h i n k i n g - t o g g l e " 
 
 +                         a r i a - e x p a n d e d = { t h i n k i n g O p e n } 
 
 +                     > 
 
 +                         < C h e v r o n D o w n 
 
 +                             c l a s s N a m e = { ` s p e c i a l i s t - c a r d _ _ c h e v r o n   $ { t h i n k i n g O p e n   ?   " r o t a t e d "   :   " " } ` } 
 
 +                             a r i a - h i d d e n = " t r u e " 
 
 +                         / > 
 
 +                         < s p a n > C a d e i a   d e   r a c i o c % n i o < / s p a n > 
 
 +                     < / b u t t o n > 
 
 +                     < A n i m a t e P r e s e n c e   i n i t i a l = { f a l s e } > 
 
 +                         { t h i n k i n g O p e n   & &   ( 
 
 +                             < m o t i o n . d i v 
 
 +                                 i n i t i a l = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                                 a n i m a t e = { {   h e i g h t :   " a u t o " ,   o p a c i t y :   1   } } 
 
 +                                 e x i t = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                                 t r a n s i t i o n = { {   d u r a t i o n :   0 . 1 8 ,   e a s e :   " e a s e O u t "   } } 
 
 +                                 c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t h i n k i n g - b o d y   o v e r f l o w - h i d d e n " 
 
 +                             > 
 
 +                                 < p   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t h i n k i n g - t e x t " > { s p e c i a l i s t . t h i n k i n g } < / p > 
 
 +                             < / m o t i o n . d i v > 
 
 +                         ) } 
 
 +                     < / A n i m a t e P r e s e n c e > 
 
 +                     { / *   A l w a y s   s h o w   t h i n k i n g   p r e v i e w   w h e n   c o l l a p s e d   * / } 
 
 +                     { ! t h i n k i n g O p e n   & &   ( 
 
 +                         < p   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ t h i n k i n g - p r e v i e w " > 
 
 +                             { s p e c i a l i s t . t h i n k i n g . s l i c e ( 0 ,   1 2 0 ) } 
 
 +                             { s p e c i a l i s t . t h i n k i n g . l e n g t h   >   1 2 0   ?   "    "   :   " " } 
 
 +                         < / p > 
 
 +                     ) } 
 
 +                 < / d i v > 
 
 +             ) } 
 
 + 
 
 +             { / *   R e s p o n s e   * / } 
 
 +             { h a s R e s p o n s e   & &   ( 
 
 +                 < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ r e s p o n s e " > 
 
 +                     < p   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ r e s p o n s e - t e x t " > { s p e c i a l i s t . r e s p o n s e } < / p > 
 
 +                 < / d i v > 
 
 +             ) } 
 
 + 
 
 +             { / *   D i v i d e r   t o   n e x t   s p e c i a l i s t   * / } 
 
 +             { ! i s L a s t   & &   < d i v   c l a s s N a m e = " s p e c i a l i s t - c a r d _ _ d i v i d e r "   a r i a - h i d d e n = " t r u e "   / > } 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S t e p C a r d . t s x   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S t e p C a r d . t s x 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . c 4 e c 2 f b 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / S t e p C a r d . t s x 
 
 @ @   - 0 , 0   + 1 , 1 3 6   @ @ 
 
 + i m p o r t   {   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   m o t i o n ,   A n i m a t e P r e s e n c e   }   f r o m   " f r a m e r - m o t i o n " ; 
 
 + i m p o r t   {   C h e c k ,   C h e v r o n D o w n ,   C i r c l e ,   L o a d e r 2 ,   X   }   f r o m   " l u c i d e - r e a c t " ; 
 
 + 
 
 + t y p e   S t e p S t a t u s   =   " p e n d i n g "   |   " r u n n i n g "   |   " c o m p l e t e d "   |   " e r r o r " ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p C a r d P r o p s   { 
 
 +     t i t l e :   s t r i n g ; 
 
 +     o v e r v i e w :   s t r i n g ; 
 
 +     s t e p s :   A r r a y < { 
 
 +         i d :   n u m b e r ; 
 
 +         t i t l e :   s t r i n g ; 
 
 +         d e s c r i p t i o n :   s t r i n g ; 
 
 +         s t a t u s :   S t e p S t a t u s ; 
 
 +         s u b _ s t e p s :   A r r a y < { 
 
 +             i d :   s t r i n g ; 
 
 +             d e s c r i p t i o n :   s t r i n g ; 
 
 +             s t a t u s :   S t e p S t a t u s ; 
 
 +         } > ; 
 
 +     } > ; 
 
 +     c u r r e n t S t e p :   n u m b e r ; 
 
 +     i s C o m p l e t e :   b o o l e a n ; 
 
 +     m o d e l T i e r ? :   " L i t e "   |   " I r o n " ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   S t a t u s D o t ( {   s t a t u s   } :   {   s t a t u s :   S t e p S t a t u s   } )   { 
 
 +     s w i t c h   ( s t a t u s )   { 
 
 +         c a s e   " r u n n i n g " : 
 
 +             r e t u r n   ( 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - d o t   a g e n t i c - d o t - - r u n n i n g "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < L o a d e r 2   c l a s s N a m e = " h - 2 . 5   w - 2 . 5   a n i m a t e - s p i n "   / > 
 
 +                 < / s p a n > 
 
 +             ) ; 
 
 +         c a s e   " c o m p l e t e d " : 
 
 +             r e t u r n   ( 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - d o t   a g e n t i c - d o t - - d o n e "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < C h e c k   c l a s s N a m e = " h - 2 . 5   w - 2 . 5 "   / > 
 
 +                 < / s p a n > 
 
 +             ) ; 
 
 +         c a s e   " e r r o r " : 
 
 +             r e t u r n   ( 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - d o t   a g e n t i c - d o t - - e r r o r "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < X   c l a s s N a m e = " h - 2 . 5   w - 2 . 5 "   / > 
 
 +                 < / s p a n > 
 
 +             ) ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   ( 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - d o t   a g e n t i c - d o t - - i d l e "   a r i a - h i d d e n = " t r u e " > 
 
 +                     < C i r c l e   c l a s s N a m e = " h - 2   w - 2 "   / > 
 
 +                 < / s p a n > 
 
 +             ) ; 
 
 +     } 
 
 + } 
 
 + 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   S t e p C a r d ( { 
 
 +     t i t l e , 
 
 +     o v e r v i e w , 
 
 +     s t e p s , 
 
 +     c u r r e n t S t e p , 
 
 +     i s C o m p l e t e , 
 
 +     m o d e l T i e r   =   " L i t e " , 
 
 + } :   S t e p C a r d P r o p s )   { 
 
 +     c o n s t   [ o p e n ,   s e t O p e n ]   =   u s e S t a t e ( t r u e ) ; 
 
 +     c o n s t   c o m p l e t e d C o u n t   =   s t e p s . f i l t e r ( ( s )   = >   s . s t a t u s   = = =   " c o m p l e t e d " ) . l e n g t h ; 
 
 +     c o n s t   p r o g r e s s   =   i s C o m p l e t e   ?   1 0 0   :   s t e p s . l e n g t h   >   0   ?   M a t h . r o u n d ( ( c o m p l e t e d C o u n t   /   s t e p s . l e n g t h )   *   1 0 0 )   :   0 ; 
 
 + 
 
 +     r e t u r n   ( 
 
 +         < d i v   c l a s s N a m e = " a g e n t i c - p l a n " > 
 
 +             { / *   H e a d e r   * / } 
 
 +             < b u t t o n 
 
 +                 t y p e = " b u t t o n " 
 
 +                 o n C l i c k = { ( )   = >   s e t O p e n ( ( v )   = >   ! v ) } 
 
 +                 c l a s s N a m e = " a g e n t i c - p l a n _ _ h e a d e r " 
 
 +                 a r i a - e x p a n d e d = { o p e n } 
 
 +             > 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - p l a n _ _ d o t "   a r i a - h i d d e n = " t r u e "   / > 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - p l a n _ _ t i t l e " > { t i t l e } < / s p a n > 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - p l a n _ _ b a d g e " > { m o d e l T i e r } < / s p a n > 
 
 +                 < s p a n   c l a s s N a m e = " a g e n t i c - p l a n _ _ c o u n t e r " > 
 
 +                     { i s C o m p l e t e   ?   ` $ { s t e p s . l e n g t h } / $ { s t e p s . l e n g t h } `   :   ` $ { c o m p l e t e d C o u n t } / $ { s t e p s . l e n g t h } ` } 
 
 +                 < / s p a n > 
 
 +                 < C h e v r o n D o w n   c l a s s N a m e = { ` a g e n t i c - p l a n _ _ c h e v r o n   $ { o p e n   ?   " r o t a t e d "   :   " " } ` }   a r i a - h i d d e n = " t r u e "   / > 
 
 +             < / b u t t o n > 
 
 + 
 
 +             { / *   B o d y   * / } 
 
 +             < A n i m a t e P r e s e n c e   i n i t i a l = { f a l s e } > 
 
 +                 { o p e n   & &   ( 
 
 +                     < m o t i o n . d i v 
 
 +                         i n i t i a l = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                         a n i m a t e = { {   h e i g h t :   " a u t o " ,   o p a c i t y :   1   } } 
 
 +                         e x i t = { {   h e i g h t :   0 ,   o p a c i t y :   0   } } 
 
 +                         t r a n s i t i o n = { {   d u r a t i o n :   0 . 1 8 ,   e a s e :   " e a s e O u t "   } } 
 
 +                         c l a s s N a m e = " a g e n t i c - p l a n _ _ b o d y   o v e r f l o w - h i d d e n " 
 
 +                     > 
 
 +                         { o v e r v i e w   & &   < p   c l a s s N a m e = " a g e n t i c - p l a n _ _ o v e r v i e w " > { o v e r v i e w } < / p > } 
 
 + 
 
 +                         < u l   c l a s s N a m e = " a g e n t i c - s t e p s " > 
 
 +                             { s t e p s . m a p ( ( s t e p )   = >   { 
 
 +                                 c o n s t   i s A c t i v e   =   s t e p . i d   = = =   c u r r e n t S t e p   | |   s t e p . s t a t u s   = = =   " r u n n i n g " ; 
 
 + 
 
 +                                 r e t u r n   ( 
 
 +                                     < l i   k e y = { s t e p . i d }   c l a s s N a m e = " a g e n t i c - s t e p " > 
 
 +                                         < S t a t u s D o t   s t a t u s = { s t e p . s t a t u s }   / > 
 
 +                                         < d i v   c l a s s N a m e = " a g e n t i c - s t e p _ _ c o n t e n t " > 
 
 +                                             < p   c l a s s N a m e = " a g e n t i c - s t e p _ _ t i t l e " > { s t e p . t i t l e } < / p > 
 
 +                                             { s t e p . d e s c r i p t i o n   & &   ( 
 
 +                                                 < p   c l a s s N a m e = " a g e n t i c - s t e p _ _ d e s c " > { s t e p . d e s c r i p t i o n } < / p > 
 
 +                                             ) } 
 
 +                                             { s t e p . s u b _ s t e p s . l e n g t h   >   0   & &   ( 
 
 +                                                 < u l   c l a s s N a m e = " a g e n t i c - s u b s t e p s " > 
 
 +                                                     { s t e p . s u b _ s t e p s . m a p ( ( s u b )   = >   ( 
 
 +                                                         < l i   k e y = { s u b . i d }   c l a s s N a m e = " a g e n t i c - s u b s t e p " > 
 
 +                                                             < S t a t u s D o t   s t a t u s = { s u b . s t a t u s }   / > 
 
 +                                                             < s p a n > { s u b . d e s c r i p t i o n } < / s p a n > 
 
 +                                                         < / l i > 
 
 +                                                     ) ) } 
 
 +                                                 < / u l > 
 
 +                                             ) } 
 
 +                                         < / d i v > 
 
 +                                     < / l i > 
 
 +                                 ) ; 
 
 +                             } ) } 
 
 +                         < / u l > 
 
 + 
 
 +                         { / *   M i n i m a l   p r o g r e s s   l i n e   * / } 
 
 +                         < d i v   c l a s s N a m e = " a g e n t i c - p l a n _ _ p r o g " > 
 
 +                             < d i v   c l a s s N a m e = " a g e n t i c - p l a n _ _ p r o g - b a r " > 
 
 +                                 < d i v   c l a s s N a m e = " a g e n t i c - p l a n _ _ p r o g - f i l l "   s t y l e = { {   w i d t h :   ` $ { p r o g r e s s } % `   } }   / > 
 
 +                             < / d i v > 
 
 +                         < / d i v > 
 
 +                     < / m o t i o n . d i v > 
 
 +                 ) } 
 
 +             < / A n i m a t e P r e s e n c e > 
 
 +         < / d i v > 
 
 +     ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / i n d e x . t s   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / i n d e x . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 6 6 f 2 7 6 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / c o m p o n e n t s / f o r g e a g e n t / i n d e x . t s 
 
 @ @   - 0 , 0   + 1 , 7   @ @ 
 
 + e x p o r t   {   d e f a u l t   a s   A g e n t i c M e s s a g e   }   f r o m   ' . / A g e n t i c M e s s a g e ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   S t e p C a r d   }   f r o m   ' . / S t e p C a r d ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   A g e n t U p d a t e   }   f r o m   ' . / A g e n t U p d a t e ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   F i n a l R e s p o n s e   }   f r o m   ' . / F i n a l R e s p o n s e ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   A r t i f a c t C a r d   }   f r o m   ' . / A r t i f a c t C a r d ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   S p e c i a l i s t C a r d   }   f r o m   ' . / S p e c i a l i s t C a r d ' ; 
 
 + e x p o r t   {   d e f a u l t   a s   A g e n t i c T o g g l e   }   f r o m   ' . / A g e n t i c T o g g l e ' ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / a p i . t e s t . t s   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / a p i . t e s t . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . a 0 4 4 c f 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / a p i . t e s t . t s 
 
 @ @   - 0 , 0   + 1 , 6 4   @ @ 
 
 + / *   @ v i t e s t - e n v i r o n m e n t   j s d o m   * / 
 
 + 
 
 + i m p o r t   {   a f t e r E a c h ,   b e f o r e E a c h ,   d e s c r i b e ,   e x p e c t ,   i t ,   v i   }   f r o m   " v i t e s t " ; 
 
 + i m p o r t   {   s w a p M o d e l   }   f r o m   " . / a p i " ; 
 
 + 
 
 + / /              M o c k s                                                                                                                                                                                                            
 
 + 
 
 + c o n s t   m o c k I n v o k e   =   v i . f n ( ) ; 
 
 + 
 
 + v i . m o c k ( " @ t a u r i - a p p s / a p i / c o r e " ,   ( )   = >   ( { 
 
 +     i n v o k e :   ( . . . a r g s :   u n k n o w n [ ] )   = >   m o c k I n v o k e ( . . . a r g s ) , 
 
 + } ) ) ; 
 
 + 
 
 + / /              T e s t s                                                                                                                                                                                                            
 
 + 
 
 + d e s c r i b e ( " s w a p M o d e l   ( h o t - s w a p   A P I ) " ,   ( )   = >   { 
 
 +     b e f o r e E a c h ( ( )   = >   { 
 
 +         v i . c l e a r A l l M o c k s ( ) ; 
 
 +     } ) ; 
 
 + 
 
 +     a f t e r E a c h ( ( )   = >   { 
 
 +         v i . r e s t o r e A l l M o c k s ( ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " c a l l s   s w a p _ m o d e l _ c o m m a n d   w i t h   t h e   n e w   m o d e l   p a t h " ,   a s y n c   ( )   = >   { 
 
 +         m o c k I n v o k e . m o c k R e s o l v e d V a l u e ( { 
 
 +             s t a t u s :   " r e a d y " , 
 
 +             r e a d y :   t r u e , 
 
 +             p r o c e s s _ r u n n i n g :   t r u e , 
 
 +             r e s o l v e d _ u r l :   " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " , 
 
 +             b i n a r y _ p a t h :   n u l l , 
 
 +             l a s t _ e r r o r :   n u l l , 
 
 +             a c t i v e _ c o m m a n d :   " i d l e " , 
 
 +             l a s t _ c o m m a n d _ r e s u l t :   {   c o m m a n d :   " i d l e " ,   o u t c o m e :   " s u c c e e d e d " ,   m e s s a g e :   " "   } , 
 
 +             c o n f i g :   { 
 
 +                 c o n n e c t i o n _ m o d e :   " l o c a l " , 
 
 +                 s t a r t _ p o l i c y :   " m a n u a l " , 
 
 +                 s e r v e r _ u r l :   " h t t p : / / 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " , 
 
 +                 a p i _ k e y :   " " , 
 
 +                 m o d e l _ p a t h :   " / m o d e l s / n e w - m o d e l . g g u f " , 
 
 +                 m o d e l s _ d i r :   " / m o d e l s " , 
 
 +                 a d d r :   " 1 2 7 . 0 . 0 . 1 : 1 2 3 4 " , 
 
 +                 g p u _ l a y e r s :   0 , 
 
 +                 c t x _ s i z e :   4 0 9 6 , 
 
 +                 e x t r a _ m o d e l _ p a t h s :   [ ] , 
 
 +                 s e l e c t e d _ m o d e l _ i d :   n u l l , 
 
 +                 r e m o t e _ p r e s e t s :   [ ] , 
 
 +                 h u g g i n g _ f a c e _ t o k e n :   " " , 
 
 +             } , 
 
 +         } ) ; 
 
 + 
 
 +         a w a i t   s w a p M o d e l ( " / m o d e l s / n e w - m o d e l . g g u f " ) ; 
 
 + 
 
 +         e x p e c t ( m o c k I n v o k e ) . t o H a v e B e e n C a l l e d W i t h ( " s w a p _ m o d e l _ c o m m a n d " ,   { 
 
 +             n e w M o d e l P a t h :   " / m o d e l s / n e w - m o d e l . g g u f " , 
 
 +         } ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " t h r o w s   w h e n   s w a p _ m o d e l _ c o m m a n d   f a i l s " ,   a s y n c   ( )   = >   { 
 
 +         m o c k I n v o k e . m o c k R e j e c t e d V a l u e ( n e w   E r r o r ( " s w a p   f a i l e d " ) ) ; 
 
 + 
 
 +         a w a i t   e x p e c t ( s w a p M o d e l ( " / m o d e l s / b a d . g g u f " ) ) . r e j e c t s . t o T h r o w ( " s w a p   f a i l e d " ) ; 
 
 +     } ) ; 
 
 + } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S t a t u s C a r d . t s x   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S t a t u s C a r d . t s x 
 
 i n d e x   4 b 5 e d a 0 . . 9 f 7 7 3 4 6   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S t a t u s C a r d . t s x 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e S t a t u s C a r d . t s x 
 
 @ @   - 4 8 , 1 2   + 4 8 , 1 3   @ @   e x p o r t   d e f a u l t   f u n c t i o n   R u n t i m e S t a t u s C a r d ( { 
 
   } :   P r o p s )   { 
 
       c o n s t   t o n e   =   g e t R u n t i m e S t a t u s T o n e ( s n a p s h o t ) ; 
 
       c o n s t   i s L o c a l   =   s n a p s h o t . c o n f i g . c o n n e c t i o n _ m o d e   = = =   " l o c a l " ; 
 
 +     c o n s t   i s L o a d i n g   =   i s L o c a l   & &   s n a p s h o t . s t a t u s   = = =   " l o a d i n g " ; 
 
       c o n s t   s t a r t G u a r d   =   g e t R u n t i m e S t a r t G u a r d ( s n a p s h o t ) ; 
 
       c o n s t   n e e d s S e t u p   =   i s L o c a l   & &   ! s n a p s h o t . p r o c e s s _ r u n n i n g   & &   ! s t a r t G u a r d . c a n S t a r t ; 
 
       c o n s t   p r i m a r y A c t i o n   =   n e e d s S e t u p   ?   o n O p e n S e t t i n g s   :   i s L o c a l   & &   ! s n a p s h o t . p r o c e s s _ r u n n i n g   ?   o n S t a r t   :   o n S t o p ; 
 
       c o n s t   l i f e c y c l e L a b e l   =   g e t L i f e c y c l e A c t i o n L a b e l ( a c t i v e L i f e c y c l e C o m m a n d ) ; 
 
 -     c o n s t   p r i m a r y L a b e l   =   l i f e c y c l e L a b e l   ? ?   ( n e e d s S e t u p   ?   " S e t   u p "   :   i s L o c a l   & &   ! s n a p s h o t . p r o c e s s _ r u n n i n g   ?   " S t a r t "   :   " S t o p " ) ; 
 
 -     c o n s t   p r i m a r y D i s a b l e d   =   b u s y   | |   l i f e c y c l e B u s y   | |   ( i s L o c a l   & &   s n a p s h o t . p r o c e s s _ r u n n i n g   & &   s n a p s h o t . s t a t u s   = = =   " s t o p p i n g " ) ; 
 
 +     c o n s t   p r i m a r y L a b e l   =   i s L o a d i n g   ?   " M o d e l   l o a d i n g . . . "   :   l i f e c y c l e L a b e l   ? ?   ( n e e d s S e t u p   ?   " S e t   u p "   :   i s L o c a l   & &   ! s n a p s h o t . p r o c e s s _ r u n n i n g   ?   " S t a r t "   :   " S t o p " ) ; 
 
 +     c o n s t   p r i m a r y D i s a b l e d   =   b u s y   | |   l i f e c y c l e B u s y   | |   i s L o a d i n g   | |   ( i s L o c a l   & &   s n a p s h o t . p r o c e s s _ r u n n i n g   & &   s n a p s h o t . s t a t u s   = = =   " s t o p p i n g " ) ; 
 
       c o n s t   s h o w L i f e c y c l e R e s u l t   =   l a s t L i f e c y c l e R e s u l t . c o m m a n d   ! = =   " i d l e "   & &   ! l i f e c y c l e B u s y ; 
 
       c o n s t   l i f e c y c l e R e s u l t C l a s s   = 
 
           l a s t L i f e c y c l e R e s u l t . o u t c o m e   = = =   " f a i l e d " 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e W o r k s p a c e . t s x   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e W o r k s p a c e . t s x 
 
 i n d e x   d a 2 3 8 6 5 . . c a f b 5 2 6   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e W o r k s p a c e . t s x 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / c o m p o n e n t s / R u n t i m e W o r k s p a c e . t s x 
 
 @ @   - 2 0 1 , 9   + 2 0 1 , 9   @ @   e x p o r t   d e f a u l t   f u n c t i o n   R u n t i m e W o r k s p a c e ( {   r u n t i m e :   e x t e r n a l R u n t i m e   } :   P r o p s )   { 
 
                               c l a s s N a m e = " r u n t i m e - w o r k s p a c e - b t n   r u n t i m e - w o r k s p a c e - b t n - p r i m a r y " 
 
                               o n C l i c k = { s n a p s h o t . p r o c e s s _ r u n n i n g   ?   ( s t o p L o c a l   ? ?   ( ( )   = >   { } ) )   :   ( s t a r t L o c a l   ? ?   ( ( )   = >   { } ) ) } 
 
                               t y p e = " b u t t o n " 
 
 -                             d i s a b l e d = { b u s y   | |   l i f e c y c l e B u s y   | |   ( s n a p s h o t . p r o c e s s _ r u n n i n g   & &   s n a p s h o t . s t a t u s   = = =   " s t o p p i n g " ) } 
 
 +                             d i s a b l e d = { b u s y   | |   l i f e c y c l e B u s y   | |   s n a p s h o t . s t a t u s   = = =   " l o a d i n g "   | |   ( s n a p s h o t . p r o c e s s _ r u n n i n g   & &   s n a p s h o t . s t a t u s   = = =   " s t o p p i n g " ) } 
 
                           > 
 
 -                             { l i f e c y c l e L a b e l   ? ?   ( s n a p s h o t . p r o c e s s _ r u n n i n g   ?   " S t o p "   :   " S t a r t " ) } 
 
 +                             { s n a p s h o t . s t a t u s   = = =   " l o a d i n g "   ?   " M o d e l   l o a d i n g . . . "   :   l i f e c y c l e L a b e l   ? ?   ( s n a p s h o t . p r o c e s s _ r u n n i n g   ?   " S t o p "   :   " S t a r t " ) } 
 
                           < / b u t t o n > 
 
                       < / > 
 
                   ) } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t e s t . t s   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t e s t . t s 
 
 i n d e x   8 a 1 c d d c . . 9 d 2 7 a e 2   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t e s t . t s 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t e s t . t s 
 
 @ @   - 1 1 0 , 6   + 1 1 0 , 1 0   @ @   d e s c r i b e ( " g e t R u n t i m e S t a t e L a b e l " ,   ( )   = >   { 
 
           e x p e c t ( g e t R u n t i m e S t a t e L a b e l ( c r e a t e S n a p s h o t ( {   s t a t u s :   " s t a r t i n g "   } ) ) ) . t o B e ( " S t a r t i n g   l o c a l   A P I " ) ; 
 
       } ) ; 
 
   
 
 +     i t ( " r e p o r t s   m o d e l   l o a d i n g   s t a t e " ,   ( )   = >   { 
 
 +         e x p e c t ( g e t R u n t i m e S t a t e L a b e l ( c r e a t e S n a p s h o t ( {   s t a t u s :   " l o a d i n g "   } ) ) ) . t o B e ( " M o d e l   l o a d i n g . . . " ) ; 
 
 +     } ) ; 
 
 + 
 
       i t ( " r e p o r t s   r e m o t e   m o d e   w i t h o u t   r u n t i m e   o w n e r s h i p " ,   ( )   = >   { 
 
           e x p e c t ( g e t R u n t i m e S t a t e L a b e l ( c r e a t e S n a p s h o t ( { 
 
               s t a t u s :   " s t o p p e d " , 
 
 @ @   - 1 3 3 , 6   + 1 3 7 , 1 0   @ @   d e s c r i b e ( " g e t R u n t i m e S t a t u s T o n e " ,   ( )   = >   { 
 
       i t ( " m a r k s   l o c a l   n o t - r e a d y   s n a p s h o t s   a s   d a n g e r " ,   ( )   = >   { 
 
           e x p e c t ( g e t R u n t i m e S t a t u s T o n e ( c r e a t e S n a p s h o t ( {   s t a t u s :   " r e a d y " ,   r e a d y :   f a l s e ,   p r o c e s s _ r u n n i n g :   t r u e   } ) ) ) . t o B e ( " d a n g e r " ) ; 
 
       } ) ; 
 
 + 
 
 +     i t ( " t r e a t s   m o d e l   l o a d i n g   a s   a   w a r n i n g " ,   ( )   = >   { 
 
 +         e x p e c t ( g e t R u n t i m e S t a t u s T o n e ( c r e a t e S n a p s h o t ( {   s t a t u s :   " l o a d i n g "   } ) ) ) . t o B e ( " w a r n i n g " ) ; 
 
 +     } ) ; 
 
   } ) ; 
 
   
 
   d e s c r i b e ( " g e t R u n t i m e S t a r t G u a r d " ,   ( )   = >   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t s   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t s 
 
 i n d e x   7 1 4 7 b 1 0 . . a 4 4 d a a 3   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t s 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / r u n t i m e - u t i l s . t s 
 
 @ @   - 1 8 7 , 6   + 1 8 7 , 8   @ @   e x p o r t   f u n c t i o n   g e t R u n t i m e S t a t e L a b e l ( s n a p s h o t :   R u n t i m e S n a p s h o t ) :   s t r i n g   { 
 
       s w i t c h   ( s n a p s h o t . s t a t u s )   { 
 
           c a s e   " r e a d y " : 
 
               r e t u r n   " R e a d y " ; 
 
 +         c a s e   " l o a d i n g " : 
 
 +             r e t u r n   " M o d e l   l o a d i n g . . . " ; 
 
           c a s e   " s t a r t i n g " : 
 
               r e t u r n   " S t a r t i n g   l o c a l   A P I " ; 
 
           c a s e   " s t o p p i n g " : 
 
 @ @   - 2 1 2 , 6   + 2 1 4 , 7   @ @   e x p o r t   f u n c t i o n   g e t R u n t i m e S t a t u s T o n e ( s n a p s h o t :   R u n t i m e S n a p s h o t ) :   " n e u t r a l "   |   " s u 
 
       s w i t c h   ( s n a p s h o t . s t a t u s )   { 
 
           c a s e   " r e a d y " : 
 
               r e t u r n   " s u c c e s s " ; 
 
 +         c a s e   " l o a d i n g " : 
 
           c a s e   " s t a r t i n g " : 
 
           c a s e   " s t o p p i n g " : 
 
           c a s e   " d e g r a d e d " : 
 
 @ @   - 3 6 8 , 6   + 3 7 1 , 8   @ @   f u n c t i o n   d e r i v e H e a l t h H e a d l i n e ( s n a p s h o t :   R u n t i m e S n a p s h o t ) :   s t r i n g   { 
 
       s w i t c h   ( s n a p s h o t . s t a t u s )   { 
 
           c a s e   " r e a d y " : 
 
               r e t u r n   " L o c a l   A P I   r e a d y " ; 
 
 +         c a s e   " l o a d i n g " : 
 
 +             r e t u r n   " M o d e l   l o a d i n g . . . " ; 
 
           c a s e   " s t a r t i n g " : 
 
               r e t u r n   " S t a r t i n g   l o c a l   A P I . . . " ; 
 
           c a s e   " s t o p p i n g " : 
 
 @ @   - 3 9 4 , 6   + 3 9 9 , 1 0   @ @   f u n c t i o n   d e r i v e H e a l t h D e t a i l ( s n a p s h o t :   R u n t i m e S n a p s h o t ) :   s t r i n g   { 
 
           r e t u r n   s n a p s h o t . r e s o l v e d _ u r l   | |   " h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 0 8 0 " ; 
 
       } 
 
   
 
 +     i f   ( s n a p s h o t . s t a t u s   = = =   " l o a d i n g " )   { 
 
 +         r e t u r n   " T h e   l o c a l   m o d e l   i s   w a r m i n g   u p .   P l e a s e   w a i t   b e f o r e   s e n d i n g   a   n e w   m e s s a g e . " ; 
 
 +     } 
 
 + 
 
       i f   ( s n a p s h o t . s t a t u s   = = =   " s t o p p e d " )   { 
 
           r e t u r n   " S t a r t   t h e   l o c a l   A P I   t o   b e g i n " ; 
 
       } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / t y p e s . t s   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / t y p e s . t s 
 
 i n d e x   f 1 9 1 f 1 c . . 4 1 1 5 c a 2   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / t y p e s . t s 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / t y p e s . t s 
 
 @ @   - 1 , 6   + 1 , 6   @ @ 
 
   e x p o r t   t y p e   C o n n e c t i o n M o d e   =   " l o c a l "   |   " r e m o t e " ; 
 
   e x p o r t   t y p e   S t a r t P o l i c y   =   " m a n u a l "   |   " o n _ a p p _ l a u n c h " ; 
 
 - e x p o r t   t y p e   R u n t i m e S t a t u s   =   " s t o p p e d "   |   " s t a r t i n g "   |   " r e a d y "   |   " d e g r a d e d "   |   " s t o p p i n g "   |   " e r r o r " ; 
 
 + e x p o r t   t y p e   R u n t i m e S t a t u s   =   " s t o p p e d "   |   " s t a r t i n g "   |   " l o a d i n g "   |   " r e a d y "   |   " d e g r a d e d "   |   " s t o p p i n g "   |   " e r r o r " ; 
 
   e x p o r t   t y p e   R u n t i m e L i f e c y c l e C o m m a n d   =   " i d l e "   |   " s a v e "   |   " s t a r t "   |   " s t o p "   |   " s a v e _ a n d _ s t a r t " ; 
 
   e x p o r t   t y p e   R u n t i m e L i f e c y c l e O u t c o m e   =   " s u c c e e d e d "   |   " b l o c k e d "   |   " f a i l e d " ; 
 
   e x p o r t   t y p e   R u n t i m e A p p l y I m p a c t   =   " i m m e d i a t e "   |   " r e s t a r t _ r e q u i r e d "   |   " s a v e _ b e f o r e _ a p p l y " ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s 
 
 i n d e x   a 0 2 e 4 3 4 . . f b f 4 7 e 9   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / r u n t i m e / u s e R u n t i m e M a n a g e r . t s 
 
 @ @   - 1 , 4   + 1 , 4   @ @ 
 
 - i m p o r t   {   u s e C a l l b a c k ,   u s e E f f e c t ,   u s e M e m o ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   u s e C a l l b a c k ,   u s e E f f e c t ,   u s e M e m o ,   u s e R e f ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
   i m p o r t   {   b o o t s t r a p R u n t i m e ,   g e t R u n t i m e S n a p s h o t ,   s a v e R u n t i m e C o n f i g ,   s c a n R u n t i m e M o d e l s ,   s t a r t R u n t i m e ,   s t o p R u n t i m e   }   f r o m   " . / a p i " ; 
 
   i m p o r t   { 
 
       c r e a t e D e f a u l t R u n t i m e S n a p s h o t , 
 
 @ @   - 1 7 5 , 6   + 1 7 5 , 9   @ @   e x p o r t   f u n c t i o n   u s e R u n t i m e M a n a g e r ( )   { 
 
                   i f   ( a c t i v e )   { 
 
                       s e t D r a f t S t a t e ( ( c u r r e n t )   = >   r e c o n c i l e D r a f t S t a t e ( c u r r e n t ,   n e x t ) ) ; 
 
                       s e t L o a d i n g ( f a l s e ) ; 
 
 +                     / /   A u t o - s c a n   m o d e l s   o n   s t a r t u p   s o   t h e   s i d e b a r   s h o w s   a l l   a v a i l a b l e   m o d e l s 
 
 +                     c o n s t   m o d e l s D i r   =   n e x t . c o n f i g . m o d e l s _ d i r   ? ?   " " ; 
 
 +                     s c a n M o d e l s R e f . c u r r e n t ? . ( m o d e l s D i r ) . c a t c h ( ( )   = >   u n d e f i n e d ) ; 
 
                   } 
 
               } ) 
 
               . c a t c h ( ( )   = >   { 
 
 @ @   - 3 1 7 , 1 6   + 3 2 0 , 1 1   @ @   e x p o r t   f u n c t i o n   u s e R u n t i m e M a n a g e r ( )   { 
 
           [ ] , 
 
       ) ; 
 
   
 
 +     c o n s t   s c a n M o d e l s R e f   =   u s e R e f < ( d i r :   s t r i n g   |   n u l l )   = >   P r o m i s e < v o i d > > ( ) ; 
 
 + 
 
       / /   P h a s e   4 :   M o d e l   s c a n n i n g   f o r   v a l i d a t i o n 
 
       c o n s t   s c a n M o d e l s   =   u s e C a l l b a c k ( a s y n c   ( d i r P a t h :   s t r i n g   |   n u l l )   = >   { 
 
 -         i f   ( ! d i r P a t h )   { 
 
 -             s e t D r a f t S t a t e ( ( c u r r e n t )   = >   ( { 
 
 -                 . . . c u r r e n t , 
 
 -                 s c a n n e d M o d e l s :   [ ] , 
 
 -                 i s S c a n n i n g :   f a l s e , 
 
 -             } ) ) ; 
 
 -             r e t u r n ; 
 
 -         } 
 
 +         c o n s t   r e s o l v e d D i r   =   d i r P a t h   ? ?   " " ; 
 
   
 
           / /   S e t   s c a n n i n g   s t a t e   f i r s t 
 
           s e t D r a f t S t a t e ( ( c u r r e n t )   = >   ( { 
 
 @ @   - 3 3 5 , 7   + 3 3 3 , 7   @ @   e x p o r t   f u n c t i o n   u s e R u n t i m e M a n a g e r ( )   { 
 
           } ) ) ; 
 
   
 
           t r y   { 
 
 -             c o n s t   m o d e l s   =   a w a i t   s c a n R u n t i m e M o d e l s ( d i r P a t h ) ; 
 
 +             c o n s t   m o d e l s   =   a w a i t   s c a n R u n t i m e M o d e l s ( r e s o l v e d D i r ) ; 
 
   
 
               / /   N o w   u p d a t e   w i t h   r e s u l t s 
 
               s e t D r a f t S t a t e ( ( c u r r e n t )   = >   { 
 
 @ @   - 3 8 0 , 6   + 3 7 8 , 8   @ @   e x p o r t   f u n c t i o n   u s e R u n t i m e M a n a g e r ( )   { 
 
           } 
 
       } ,   [ ] ) ; 
 
   
 
 +     s c a n M o d e l s R e f . c u r r e n t   =   s c a n M o d e l s ; 
 
 + 
 
       c o n s t   c o m m i t S a v e d S n a p s h o t   =   u s e C a l l b a c k ( ( n e x t :   R u n t i m e S n a p s h o t ,   k e e p O p e n :   b o o l e a n )   = >   { 
 
           s e t D r a f t S t a t e ( ( c u r r e n t )   = >   ( { 
 
               . . . c u r r e n t , 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s   b / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s 
 
 i n d e x   f f 5 b f 9 2 . . a 4 d 8 e b 0   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . c s s 
 
 @ @   - 1 4 , 8   + 1 4 , 8   @ @ 
 
   . s p - n a v   { 
 
       w i d t h :   2 2 0 p x ; 
 
       m i n - w i d t h :   2 2 0 p x ; 
 
 -     b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
 -     b o r d e r - r i g h t :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - s u r f a c e ) ; 
 
 +     b o r d e r - r i g h t :   1 p x   s o l i d   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
       d i s p l a y :   f l e x ; 
 
       f l e x - d i r e c t i o n :   c o l u m n ; 
 
       h e i g h t :   1 0 0 v h ; 
 
 @ @   - 6 6 , 1 3   + 6 6 , 1 3   @ @ 
 
   } 
 
   
 
   . s p - n a v - i t e m : h o v e r   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
 +     c o l o r :   v a r ( - - m a n u s - t x ) ; 
 
   } 
 
   
 
   . s p - n a v - i t e m - - a c t i v e   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
 +     c o l o r :   v a r ( - - m a n u s - t x ) ; 
 
       f o n t - w e i g h t :   5 0 0 ; 
 
   } 
 
   
 
 @ @   - 1 8 2 , 1 4   + 1 8 2 , 1 4   @ @ 
 
   . s p - s e c t i o n - t i t l e   { 
 
       f o n t - s i z e :   2 4 p x ; 
 
       f o n t - w e i g h t :   6 0 0 ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     c o l o r :   v a r ( - - m a n u s - t x ) ; 
 
       l e t t e r - s p a c i n g :   - 0 . 0 2 e m ; 
 
       m a r g i n - b o t t o m :   4 p x ; 
 
   } 
 
   
 
   . s p - s e c t i o n - d e s c   { 
 
       f o n t - s i z e :   1 4 p x ; 
 
 -     c o l o r :   v a r ( - - t e x t 3 ) ; 
 
 +     c o l o r :   v a r ( - - m a n u s - t x 2 ) ; 
 
       l i n e - h e i g h t :   1 . 5 ; 
 
   } 
 
   
 
 @ @   - 2 3 0 , 8   + 2 3 0 , 8   @ @ 
 
   
 
   / *           C a r d   ( c o n t i n u o u s ,   m a c O S / L i n e a r   s t y l e )           * / 
 
   . s p - c a r d   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 2 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - m a n u s - h o v e r ) ; 
 
       b o r d e r - r a d i u s :   1 2 p x ; 
 
       o v e r f l o w :   h i d d e n ; 
 
   } 
 
 @ @   - 6 2 2 , 1 0   + 6 2 2 , 1 0   @ @ 
 
   
 
   / *           I n p u t s           * / 
 
   . s p - i n p u t   { 
 
 -     b a c k g r o u n d :   v a r ( - - b g 3 ) ; 
 
 -     b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - s u r f a c e ) ; 
 
 +     b o r d e r :   1 p x   s o l i d   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
       b o r d e r - r a d i u s :   8 p x ; 
 
 -     c o l o r :   v a r ( - - t e x t ) ; 
 
 +     c o l o r :   v a r ( - - m a n u s - t x ) ; 
 
       f o n t - s i z e :   1 3 p x ; 
 
       p a d d i n g :   8 p x   1 2 p x ; 
 
       o u t l i n e :   n o n e ; 
 
 @ @   - 6 3 4 , 1 3   + 6 3 4 , 1 3   @ @ 
 
   } 
 
   
 
   . s p - i n p u t : h o v e r   { 
 
 -     b o r d e r - c o l o r :   v a r ( - - b o r d e r ) ; 
 
 +     b o r d e r - c o l o r :   v a r ( - - m a n u s - h o v e r ) ; 
 
   } 
 
   
 
   . s p - i n p u t : f o c u s   { 
 
 -     b o r d e r - c o l o r :   v a r ( - - a c c e n t ) ; 
 
 -     b a c k g r o u n d :   v a r ( - - b g 4 ) ; 
 
 -     b o x - s h a d o w :   0   0   0   1 p x   v a r ( - - a c c e n t ) ; 
 
 +     b o r d e r - c o l o r :   v a r ( - - m a n u s - b l u e ) ; 
 
 +     b a c k g r o u n d :   v a r ( - - m a n u s - e l e v a t e d ) ; 
 
 +     b o x - s h a d o w :   0   0   0   1 p x   v a r ( - - m a n u s - b l u e ) ; 
 
   } 
 
   
 
   . s p - i n p u t : d i s a b l e d   { 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . t s x   b / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . t s x 
 
 i n d e x   9 d a d 5 4 6 . . 1 6 6 0 6 b f   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . t s x 
 
 + + +   b / t a u r i - a p p / s r c / f e a t u r e s / s e t t i n g s / S e t t i n g s P a g e . t s x 
 
 @ @   - 5 2 , 6   + 5 2 , 7   @ @   i n t e r f a c e   S e t t i n g s R u n t i m e   { 
 
   i n t e r f a c e   P r o p s   { 
 
       r u n t i m e :   S e t t i n g s R u n t i m e ; 
 
       o n C l o s e :   ( )   = >   v o i d ; 
 
 +     o n M o d e l S w a p p e d ? :   ( m o d e l I d :   s t r i n g )   = >   v o i d ; 
 
   } 
 
   
 
   / /              N a v   d e f i n i t i o n                                                                                                                                                                                 
 
 @ @   - 9 6 , 7   + 9 7 , 7   @ @   f u n c t i o n   s t a t u s P i l l C l a s s ( s n a p s h o t :   R u n t i m e S n a p s h o t ) :   s t r i n g   { 
 
   
 
   / /              S e t t i n g s P a g e                                                                                                                                                                                          
 
   
 
 - e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
 + e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e ,   o n M o d e l S w a p p e d   } :   P r o p s )   { 
 
       c o n s t   { 
 
           s n a p s h o t ,   s a v e d B a s e l i n e ,   d r a f t C o n f i g ,   d r a f t D i r t y , 
 
           l o a d i n g ,   b u s y ,   l i f e c y c l e B u s y , 
 
 @ @   - 1 7 7 , 6   + 1 7 8 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
                   i f   ( m o d e l P a t h )   { 
 
                       c o n s o l e . l o g ( " [ S e t t i n g s P a g e ]   A u t o - s e l e c i o n a n d o   m o d e l o   b a i x a d o : " ,   m o d e l P a t h ) ; 
 
                       u p d a t e D r a f t ( {   m o d e l _ p a t h :   m o d e l P a t h   } ) ; 
 
 +                     o n M o d e l S w a p p e d ? . ( m o d e l P a t h ) ; 
 
                       s e t S u c c e s s M e s s a g e ( 
 
                           ` M o d e l o   b a i x a d o   e   s e l e c i o n a d o   c o m   s u c e s s o ! \ n $ { m o d e l P a t h } ` 
 
                       ) ; 
 
 @ @   - 2 8 5 , 6   + 2 8 7 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
           t r y   { 
 
               a w a i t   s w a p M o d e l ( n e w M o d e l P a t h ) ; 
 
               u p d a t e D r a f t ( {   m o d e l _ p a t h :   n e w M o d e l P a t h   } ) ; 
 
 +             o n M o d e l S w a p p e d ? . ( n e w M o d e l P a t h ) ; 
 
               s e t S w a p p i n g M e s s a g e ( " M o d e l o   t r o c a d o   c o m   s u c e s s o . " ) ; 
 
               s e t T i m e o u t ( ( )   = >   s e t S w a p p i n g M e s s a g e ( " " ) ,   3 0 0 0 ) ; 
 
           }   c a t c h   ( e r r o r )   { 
 
 @ @   - 2 9 2 , 7   + 2 9 5 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
           }   f i n a l l y   { 
 
               s e t I s S w a p p i n g ( f a l s e ) ; 
 
           } 
 
 -     } ,   [ i s S w a p p i n g ,   i s D o w n l o a d i n g ,   u p d a t e D r a f t ] ) ; 
 
 +     } ,   [ i s S w a p p i n g ,   i s D o w n l o a d i n g ,   u p d a t e D r a f t ,   o n M o d e l S w a p p e d ] ) ; 
 
   
 
       c o n s t   h a n d l e O p e n F o l d e r   =   u s e C a l l b a c k ( a s y n c   ( f i l e P a t h :   s t r i n g )   = >   { 
 
           t r y   { 
 
 @ @   - 4 9 6 , 7   + 4 9 9 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
                                                               k e y = { m o d e l . p a t h } 
 
                                                               t y p e = " b u t t o n " 
 
                                                               c l a s s N a m e = { ` s p - m o d e l - r o w $ { s e l e c t e d   ?   "   s p - m o d e l - r o w - - s e l e c t e d "   :   " " } ` } 
 
 -                                                             o n C l i c k = { ( )   = >   h a n d l e S e l e c t M o d e l ( m o d e l . p a t h ) } 
 
 +                                                             o n C l i c k = { ( )   = >   h a n d l e M o d e l S w a p ( m o d e l . p a t h ) } 
 
                                                               d i s a b l e d = { b u s y A l l } 
 
                                                           > 
 
                                                               < s p a n   c l a s s N a m e = { ` s p - r a d i o $ { s e l e c t e d   ?   "   s p - r a d i o - - o n "   :   " " } ` }   / > 
 
 @ @   - 5 3 8 , 7   + 5 4 1 , 7   @ @   e x p o r t   d e f a u l t   f u n c t i o n   S e t t i n g s P a g e ( {   r u n t i m e ,   o n C l o s e   } :   P r o p s )   { 
 
                                                               < b u t t o n 
 
                                                                   t y p e = " b u t t o n " 
 
                                                                   c l a s s N a m e = " s p - m o d e l - r o w - s e l e c t " 
 
 -                                                                 o n C l i c k = { ( )   = >   h a n d l e S e l e c t M o d e l ( p ) } 
 
 +                                                                 o n C l i c k = { ( )   = >   h a n d l e M o d e l S w a p ( p ) } 
 
                                                                   d i s a b l e d = { b u s y A l l } 
 
                                                                   a r i a - p r e s s e d = { s e l e c t e d } 
 
                                                               > 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / h o o k s / u s e F o r g e A g e n t S e s s i o n . t s   b / t a u r i - a p p / s r c / h o o k s / u s e F o r g e A g e n t S e s s i o n . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . f 7 7 8 f a e 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / h o o k s / u s e F o r g e A g e n t S e s s i o n . t s 
 
 @ @   - 0 , 0   + 1 , 1 0 9   @ @ 
 
 + i m p o r t   {   u s e C a l l b a c k ,   u s e E f f e c t ,   u s e R e f ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   l i s t e n   }   f r o m   " @ t a u r i - a p p s / a p i / e v e n t " ; 
 
 + i m p o r t   {   i n v o k e   }   f r o m   " @ t a u r i - a p p s / a p i / c o r e " ; 
 
 + 
 
 + i m p o r t   {   a p p l y F o r g e A g e n t E v e n t ,   c r e a t e F o r g e A g e n t S t a t e   }   f r o m   " . . / l i b / f o r g e a g e n t - s t a t e " ; 
 
 + i m p o r t   t y p e   { 
 
 +     A g e n t P l a n , 
 
 +     A g e n t P l a n S t a t e , 
 
 +     A r t i f a c t R e a d y E v e n t , 
 
 +     P l a n C o m p l e t e d E v e n t , 
 
 +     S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t , 
 
 +     S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t , 
 
 +     S p e c i a l i s t T h i n k i n g U p d a t e E v e n t , 
 
 +     S t e p C o m p l e t e d E v e n t , 
 
 +     S t e p E r r o r E v e n t , 
 
 +     S t e p S t a r t e d E v e n t , 
 
 + }   f r o m   " . . / t y p e s / f o r g e a g e n t " ; 
 
 + 
 
 + i n t e r f a c e   S t a r t F o r g e A g e n t R e s p o n s e   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     p l a n :   A g e n t P l a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   u s e F o r g e A g e n t S e s s i o n ( )   { 
 
 +     c o n s t   [ s t a t e ,   s e t S t a t e ]   =   u s e S t a t e < A g e n t P l a n S t a t e   |   n u l l > ( n u l l ) ; 
 
 +     c o n s t   s t a t e R e f   =   u s e R e f < A g e n t P l a n S t a t e   |   n u l l > ( n u l l ) ; 
 
 + 
 
 +     c o n s t   u p d a t e S t a t e   =   u s e C a l l b a c k ( ( n e x t :   A g e n t P l a n S t a t e   |   n u l l   |   ( ( c u r r e n t :   A g e n t P l a n S t a t e   |   n u l l )   = >   A g e n t P l a n S t a t e   |   n u l l ) )   = >   { 
 
 +         s e t S t a t e ( ( c u r r e n t )   = >   { 
 
 +             c o n s t   r e s o l v e d   =   t y p e o f   n e x t   = = =   " f u n c t i o n " 
 
 +                 ?   ( n e x t   a s   ( c u r r e n t :   A g e n t P l a n S t a t e   |   n u l l )   = >   A g e n t P l a n S t a t e   |   n u l l ) ( c u r r e n t ) 
 
 +                 :   n e x t ; 
 
 +             s t a t e R e f . c u r r e n t   =   r e s o l v e d ; 
 
 +             r e t u r n   r e s o l v e d ; 
 
 +         } ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     u s e E f f e c t ( ( )   = >   { 
 
 +         i f   ( ! ( " _ _ T A U R I _ I N T E R N A L S _ _ "   i n   w i n d o w ) )   { 
 
 +             r e t u r n ; 
 
 +         } 
 
 + 
 
 +         l e t   d i s p o s e d   =   f a l s e ; 
 
 + 
 
 +         c o n s t   a t t a c h   =   a s y n c   ( )   = >   { 
 
 +             c o n s t   u n l i s t e n   =   a w a i t   P r o m i s e . a l l ( [ 
 
 +                 l i s t e n < S t e p S t a r t e d E v e n t > ( " f o r g e a g e n t : s t e p - s t a r t e d " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s t e p - s t a r t e d " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < S t e p C o m p l e t e d E v e n t > ( " f o r g e a g e n t : s t e p - c o m p l e t e d " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s t e p - c o m p l e t e d " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < S t e p E r r o r E v e n t > ( " f o r g e a g e n t : s t e p - e r r o r " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s t e p - e r r o r " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < A r t i f a c t R e a d y E v e n t > ( " f o r g e a g e n t : a r t i f a c t - r e a d y " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " a r t i f a c t - r e a d y " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < P l a n C o m p l e t e d E v e n t > ( " f o r g e a g e n t : p l a n - c o m p l e t e d " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " p l a n - c o m p l e t e d " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - t h i n k i n g - s t a r t e d " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s p e c i a l i s t - t h i n k i n g - s t a r t e d " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < S p e c i a l i s t T h i n k i n g U p d a t e E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - t h i n k i n g - u p d a t e " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s p e c i a l i s t - t h i n k i n g - u p d a t e " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +                 l i s t e n < S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t > ( " f o r g e a g e n t : s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " ,   ( e v e n t )   = >   { 
 
 +                     i f   ( d i s p o s e d )   r e t u r n ; 
 
 +                     u p d a t e S t a t e ( ( c u r r e n t )   = >   ( c u r r e n t   ?   a p p l y F o r g e A g e n t E v e n t ( c u r r e n t ,   {   t y p e :   " s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " ,   p a y l o a d :   e v e n t . p a y l o a d   } )   :   c u r r e n t ) ) ; 
 
 +                 } ) , 
 
 +             ] ) ; 
 
 + 
 
 +             r e t u r n   ( )   = >   { 
 
 +                 u n l i s t e n . f o r E a c h ( ( f n )   = >   f n ( ) ) ; 
 
 +             } ; 
 
 +         } ; 
 
 + 
 
 +         l e t   c l e a n u p :   ( ( )   = >   v o i d )   |   u n d e f i n e d ; 
 
 +         v o i d   a t t a c h ( ) . t h e n ( ( f n )   = >   { 
 
 +             c l e a n u p   =   f n ; 
 
 +         } ) ; 
 
 + 
 
 +         r e t u r n   ( )   = >   { 
 
 +             d i s p o s e d   =   t r u e ; 
 
 +             c l e a n u p ? . ( ) ; 
 
 +         } ; 
 
 +     } ,   [ u p d a t e S t a t e ] ) ; 
 
 + 
 
 +     c o n s t   s t a r t   =   u s e C a l l b a c k ( a s y n c   ( p r o m p t :   s t r i n g )   = >   { 
 
 +         c o n s t   r e s p o n s e   =   a w a i t   i n v o k e < S t a r t F o r g e A g e n t R e s p o n s e > ( " s t a r t _ f o r g e a g e n t _ s e s s i o n _ c o m m a n d " ,   {   p r o m p t   } ) ; 
 
 +         c o n s t   i n i t i a l   =   c r e a t e F o r g e A g e n t S t a t e ( r e s p o n s e . p l a n _ i d ,   r e s p o n s e . p l a n ) ; 
 
 +         u p d a t e S t a t e ( i n i t i a l ) ; 
 
 +         r e t u r n   i n i t i a l ; 
 
 +     } ,   [ u p d a t e S t a t e ] ) ; 
 
 + 
 
 +     c o n s t   r e s e t   =   u s e C a l l b a c k ( ( )   = >   u p d a t e S t a t e ( n u l l ) ,   [ u p d a t e S t a t e ] ) ; 
 
 + 
 
 +     c o n s t   g e t S n a p s h o t   =   u s e C a l l b a c k ( ( )   = >   s t a t e R e f . c u r r e n t ,   [ ] ) ; 
 
 + 
 
 +     r e t u r n   {   s t a t e ,   s t a r t ,   r e s e t ,   g e t S n a p s h o t   } ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / h o o k s / u s e M e m o r y E x t r a c t o r . t s   b / t a u r i - a p p / s r c / h o o k s / u s e M e m o r y E x t r a c t o r . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . f b d 4 5 2 a 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / h o o k s / u s e M e m o r y E x t r a c t o r . t s 
 
 @ @   - 0 , 0   + 1 , 2 0 9   @ @ 
 
 + / * * 
 
 +   *   u s e M e m o r y E x t r a c t o r 
 
 +   * 
 
 +   *   R u n s   a   s m a l l   b a c k g r o u n d   L L M   c a l l   a f t e r   e a c h   c o m p l e t e d   a s s i s t a n t   t u r n   t o 
 
 +   *   e x t r a c t   s t r u c t u r e d   f a c t s   a b o u t   t h e   u s e r .   F a c t s   a r e   s t o r e d   i n   ` u s e r _ m e m o r i e s ` 
 
 +   *   a n d   i n j e c t e d   a s   a   s y s t e m   p r o m p t   o n   e v e r y   c h a t   r e q u e s t . 
 
 +   * 
 
 +   *   D e s i g n   c o n s t r a i n t s : 
 
 +   *   -   F i r e - a n d - f o r g e t :   n e v e r   b l o c k s   t h e   m a i n   c h a t   f l o w 
 
 +   *   -   I d e m p o t e n t :   e a c h   m e s s a g e   i s   p r o c e s s e d   a t   m o s t   o n c e   ( m e m o r y _ p r o c e s s e d   f l a g ) 
 
 +   *   -   G r a c e f u l   d e g r a d a t i o n :   i f   t h e   m e m o r y   m o d e l   i s   u n a v a i l a b l e ,   t h e   c h a t   w o r k s   n o r m a l l y 
 
 +   *   -   C h e a p :   s e n d s   o n l y   t h e   l a s t   N   u s e r   m e s s a g e s   a n d   e x t r a c t s   c o m p a c t   k e y / v a l u e   f a c t s 
 
 +   * / 
 
 + 
 
 + i m p o r t   {   u s e C a l l b a c k ,   u s e R e f   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   t y p e   {   D B   }   f r o m   " . . / l i b / d b " ; 
 
 + i m p o r t   t y p e   {   U s e r M e m o r y   }   f r o m   " . . / l i b / t y p e s " ; 
 
 + 
 
 + / /   H o w   m a n y   r e c e n t   u s e r   m e s s a g e s   t o   i n c l u d e   w h e n   e x t r a c t i n g   m e m o r i e s 
 
 + c o n s t   E X T R A C T I O N _ W I N D O W   =   6 ; 
 
 + 
 
 + / /   M i n i m u m   i n t e r v a l   b e t w e e n   e x t r a c t i o n   r u n s   ( m s )        a v o i d s   h a m m e r i n g   o n   r a p i d   s e n d s 
 
 + c o n s t   E X T R A C T I O N _ D E B O U N C E _ M S   =   4 0 0 0 ; 
 
 + 
 
 + c o n s t   E X T R A C T I O N _ S Y S T E M _ P R O M P T   =   ` Y o u   a r e   a   m e m o r y   e x t r a c t i o n   a s s i s t a n t .   Y o u r   j o b   i s   t o   e x t r a c t   f a c t u a l ,   d u r a b l e   i n f o r m a t i o n   a b o u t   t h e   u s e r   f r o m   a   c o n v e r s a t i o n   f r a g m e n t . 
 
 + 
 
 + R u l e s : 
 
 + -   E x t r a c t   O N L Y   s t a b l e ,   r e u s a b l e   f a c t s   ( n a m e ,   o c c u p a t i o n ,   l o c a t i o n ,   p r e f e r e n c e s ,   p r o j e c t s ,   s k i l l s ,   g o a l s ,   c o n s t r a i n t s ) 
 
 + -   I g n o r e   e p h e m e r a l   r e q u e s t s   ( " w h a t   t i m e   i s   i t ? " )   o r   s i n g l e - u s e   c o n t e x t 
 
 + -   O u t p u t   O N L Y   v a l i d   J S O N        a n   a r r a y   o f   o b j e c t s   w i t h   f i e l d s :   k e y   ( s n a k e _ c a s e ,   u n i q u e   i d e n t i f i e r ) ,   v a l u e   ( c o n c i s e   s t r i n g ) ,   c o n f i d e n c e   ( 0 . 0    1 . 0 ) 
 
 + -   I f   n o t h i n g   w o r t h   r e m e m b e r i n g   i s   f o u n d ,   o u t p u t   a n   e m p t y   a r r a y :   [ ] 
 
 + -   K e e p   e a c h   v a l u e   u n d e r   1 2 0   c h a r a c t e r s 
 
 + -   P r e f e r   u p d a t i n g   a n   e x i s t i n g   k e y   o v e r   c r e a t i n g   a   n e a r - d u p l i c a t e 
 
 + 
 
 + E x a m p l e   o u t p u t : 
 
 + [ 
 
 +     { " k e y " :   " u s e r _ n a m e " ,   " v a l u e " :   " A n a " ,   " c o n f i d e n c e " :   0 . 9 5 } , 
 
 +     { " k e y " :   " p r e f e r r e d _ l a n g u a g e " ,   " v a l u e " :   " P y t h o n " ,   " c o n f i d e n c e " :   0 . 9 } , 
 
 +     { " k e y " :   " c u r r e n t _ p r o j e c t " ,   " v a l u e " :   " B u i l d i n g   a   l o c a l   L L M   c h a t   a p p   w i t h   T a u r i " ,   " c o n f i d e n c e " :   0 . 8 5 } 
 
 + ] ` ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   M e m o r y E x t r a c t o r O p t i o n s   { 
 
 +     d b :   D B ; 
 
 +     s e r v e r :   s t r i n g ; 
 
 +     a p i K e y :   s t r i n g ; 
 
 +     / * *   M o d e l   t o   u s e   f o r   e x t r a c t i o n .   F a l l s   b a c k   g r a c e f u l l y   i f   e m p t y .   * / 
 
 +     m e m o r y M o d e l :   s t r i n g ; 
 
 +     e n a b l e d :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   u s e M e m o r y E x t r a c t o r ( { 
 
 +     d b , 
 
 +     s e r v e r , 
 
 +     a p i K e y , 
 
 +     m e m o r y M o d e l , 
 
 +     e n a b l e d , 
 
 + } :   M e m o r y E x t r a c t o r O p t i o n s )   { 
 
 +     c o n s t   l a s t R u n R e f   =   u s e R e f < n u m b e r > ( 0 ) ; 
 
 +     c o n s t   r u n n i n g R e f   =   u s e R e f ( f a l s e ) ; 
 
 + 
 
 +     / * * 
 
 +       *   E x t r a c t s   m e m o r i e s   f r o m   u n p r o c e s s e d   m e s s a g e s   i n   a   g i v e n   c h a t . 
 
 +       *   C a l l e d   f i r e - a n d - f o r g e t   a f t e r   a n   a s s i s t a n t   t u r n   c o m p l e t e s . 
 
 +       * / 
 
 +     c o n s t   e x t r a c t M e m o r i e s   =   u s e C a l l b a c k ( 
 
 +         a s y n c   ( c h a t I d :   n u m b e r )   = >   { 
 
 +             i f   ( ! e n a b l e d   | |   ! s e r v e r   | |   ! m e m o r y M o d e l   | |   r u n n i n g R e f . c u r r e n t )   r e t u r n ; 
 
 + 
 
 +             c o n s t   n o w   =   D a t e . n o w ( ) ; 
 
 +             i f   ( n o w   -   l a s t R u n R e f . c u r r e n t   <   E X T R A C T I O N _ D E B O U N C E _ M S )   r e t u r n ; 
 
 +             l a s t R u n R e f . c u r r e n t   =   n o w ; 
 
 + 
 
 +             / /   C h e c k   i f   t h e r e   a r e   u n p r o c e s s e d   m e s s a g e s 
 
 +             c o n s t   u n p r o c e s s e d   =   d b . g e t < {   c :   n u m b e r   } > ( 
 
 +                 " S E L E C T   C O U N T ( * )   a s   c   F R O M   m e s s a g e s   W H E R E   c h a t _ i d   =   ?   A N D   m e m o r y _ p r o c e s s e d   =   0   A N D   r o l e   =   ' u s e r ' " , 
 
 +                 [ c h a t I d ] , 
 
 +             ) ; 
 
 +             i f   ( ! u n p r o c e s s e d   | |   u n p r o c e s s e d . c   = = =   0 )   r e t u r n ; 
 
 + 
 
 +             r u n n i n g R e f . c u r r e n t   =   t r u e ; 
 
 +             t r y   { 
 
 +                 / /   G e t   t h e   l a s t   N   u s e r   m e s s a g e s   f r o m   t h i s   c h a t 
 
 +                 c o n s t   r e c e n t M e s s a g e s   =   d b . q u e r y < {   r o l e :   s t r i n g ;   c o n t e n t :   s t r i n g   } > ( 
 
 +                     ` S E L E C T   r o l e ,   c o n t e n t   F R O M   m e s s a g e s 
 
 +                       W H E R E   c h a t _ i d   =   ?   A N D   r o l e   I N   ( ' u s e r ' , ' a s s i s t a n t ' ) 
 
 +                       A N D   c o n t e n t   ! =   ' '   A N D   c o n t e n t   N O T   L I K E   '       % ' 
 
 +                       O R D E R   B Y   c r e a t e d _ a t   D E S C   L I M I T   ? ` , 
 
 +                     [ c h a t I d ,   E X T R A C T I O N _ W I N D O W   *   2 ] , 
 
 +                 ) . r e v e r s e ( ) ; 
 
 + 
 
 +                 i f   ( r e c e n t M e s s a g e s . l e n g t h   <   2 )   { 
 
 +                     / /   M a r k   a s   p r o c e s s e d   a n d   s k i p        n o t   e n o u g h   c o n t e x t 
 
 +                     d b . r u n ( 
 
 +                         " U P D A T E   m e s s a g e s   S E T   m e m o r y _ p r o c e s s e d   =   1   W H E R E   c h a t _ i d   =   ?   A N D   m e m o r y _ p r o c e s s e d   =   0 " , 
 
 +                         [ c h a t I d ] , 
 
 +                     ) ; 
 
 +                     r e t u r n ; 
 
 +                 } 
 
 + 
 
 +                 c o n s t   c o n v e r s a t i o n T e x t   =   r e c e n t M e s s a g e s 
 
 +                     . m a p ( ( m )   = >   ` $ { m . r o l e   = = =   " u s e r "   ?   " U s e r "   :   " A s s i s t a n t " } :   $ { m . c o n t e n t . s l i c e ( 0 ,   4 0 0 ) } ` ) 
 
 +                     . j o i n ( " \ n \ n " ) ; 
 
 + 
 
 +                 c o n s t   h e a d e r s :   R e c o r d < s t r i n g ,   s t r i n g >   =   { 
 
 +                     " C o n t e n t - T y p e " :   " a p p l i c a t i o n / j s o n " , 
 
 +                 } ; 
 
 +                 i f   ( a p i K e y )   h e a d e r s [ " A u t h o r i z a t i o n " ]   =   ` B e a r e r   $ { a p i K e y } ` ; 
 
 + 
 
 +                 c o n s t   r e s p o n s e   =   a w a i t   f e t c h ( ` $ { s e r v e r } / v 1 / c h a t / c o m p l e t i o n s ` ,   { 
 
 +                     m e t h o d :   " P O S T " , 
 
 +                     h e a d e r s , 
 
 +                     b o d y :   J S O N . s t r i n g i f y ( { 
 
 +                         m o d e l :   m e m o r y M o d e l , 
 
 +                         m e s s a g e s :   [ 
 
 +                             {   r o l e :   " s y s t e m " ,   c o n t e n t :   E X T R A C T I O N _ S Y S T E M _ P R O M P T   } , 
 
 +                             { 
 
 +                                 r o l e :   " u s e r " , 
 
 +                                 c o n t e n t :   ` E x t r a c t   m e m o r a b l e   f a c t s   f r o m   t h i s   c o n v e r s a t i o n : \ n \ n $ { c o n v e r s a t i o n T e x t } ` , 
 
 +                             } , 
 
 +                         ] , 
 
 +                         s t r e a m :   f a l s e , 
 
 +                         m a x _ t o k e n s :   5 1 2 , 
 
 +                         t e m p e r a t u r e :   0 . 1 , 
 
 +                     } ) , 
 
 +                 } ) ; 
 
 + 
 
 +                 i f   ( ! r e s p o n s e . o k )   r e t u r n ; 
 
 + 
 
 +                 c o n s t   d a t a   =   a w a i t   r e s p o n s e . j s o n ( ) ; 
 
 +                 c o n s t   r a w :   s t r i n g   =   d a t a . c h o i c e s ? . [ 0 ] ? . m e s s a g e ? . c o n t e n t   | |   " " ; 
 
 + 
 
 +                 / /   P a r s e   J S O N   f r o m   r e s p o n s e   ( s t r i p   a n y   m a r k d o w n   f e n c e s ) 
 
 +                 c o n s t   j s o n M a t c h   =   r a w . m a t c h ( / \ [ [ \ s \ S ] * \ ] / ) ; 
 
 +                 i f   ( ! j s o n M a t c h )   r e t u r n ; 
 
 + 
 
 +                 c o n s t   f a c t s :   A r r a y < {   k e y :   s t r i n g ;   v a l u e :   s t r i n g ;   c o n f i d e n c e :   n u m b e r   } >   = 
 
 +                     J S O N . p a r s e ( j s o n M a t c h [ 0 ] ) ; 
 
 + 
 
 +                 i f   ( ! A r r a y . i s A r r a y ( f a c t s ) )   r e t u r n ; 
 
 + 
 
 +                 c o n s t   t s   =   M a t h . f l o o r ( D a t e . n o w ( )   /   1 0 0 0 ) ; 
 
 +                 f o r   ( c o n s t   f a c t   o f   f a c t s )   { 
 
 +                     i f   ( ! f a c t . k e y   | |   ! f a c t . v a l u e )   c o n t i n u e ; 
 
 +                     c o n s t   k e y   =   S t r i n g ( f a c t . k e y ) . t o L o w e r C a s e ( ) . r e p l a c e ( / [ ^ a - z 0 - 9 _ ] / g ,   " _ " ) . s l i c e ( 0 ,   6 4 ) ; 
 
 +                     c o n s t   v a l u e   =   S t r i n g ( f a c t . v a l u e ) . s l i c e ( 0 ,   2 4 0 ) ; 
 
 +                     c o n s t   c o n f i d e n c e   =   M a t h . m a x ( 0 ,   M a t h . m i n ( 1 ,   N u m b e r ( f a c t . c o n f i d e n c e )   | |   0 . 8 ) ) ; 
 
 + 
 
 +                     / /   U p s e r t :   u p d a t e   i f   k e y   e x i s t s   a n d   n e w   c o n f i d e n c e   i s   h i g h e r ,   i n s e r t   o t h e r w i s e 
 
 +                     c o n s t   e x i s t i n g   =   d b . g e t < U s e r M e m o r y > ( 
 
 +                         " S E L E C T   *   F R O M   u s e r _ m e m o r i e s   W H E R E   k e y   =   ? " , 
 
 +                         [ k e y ] , 
 
 +                     ) ; 
 
 + 
 
 +                     i f   ( e x i s t i n g )   { 
 
 +                         i f   ( c o n f i d e n c e   > =   e x i s t i n g . c o n f i d e n c e   -   0 . 0 5 )   { 
 
 +                             d b . r u n ( 
 
 +                                 " U P D A T E   u s e r _ m e m o r i e s   S E T   v a l u e   =   ? ,   c o n f i d e n c e   =   ? ,   u p d a t e d _ a t   =   ?   W H E R E   k e y   =   ? " , 
 
 +                                 [ v a l u e ,   c o n f i d e n c e ,   t s ,   k e y ] , 
 
 +                             ) ; 
 
 +                         } 
 
 +                     }   e l s e   { 
 
 +                         d b . r u n ( 
 
 +                             " I N S E R T   I N T O   u s e r _ m e m o r i e s   ( k e y ,   v a l u e ,   c o n f i d e n c e ,   c r e a t e d _ a t ,   u p d a t e d _ a t )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ) " , 
 
 +                             [ k e y ,   v a l u e ,   c o n f i d e n c e ,   t s ,   t s ] , 
 
 +                         ) ; 
 
 +                     } 
 
 +                 } 
 
 + 
 
 +                 / /   M a r k   a l l   u n p r o c e s s e d   u s e r   m e s s a g e s   i n   t h i s   c h a t   a s   d o n e 
 
 +                 d b . r u n ( 
 
 +                     " U P D A T E   m e s s a g e s   S E T   m e m o r y _ p r o c e s s e d   =   1   W H E R E   c h a t _ i d   =   ?   A N D   m e m o r y _ p r o c e s s e d   =   0 " , 
 
 +                     [ c h a t I d ] , 
 
 +                 ) ; 
 
 +             }   c a t c h   { 
 
 +                 / /   S i l e n t l y   f a i l        m e m o r y   e x t r a c t i o n   i s   n o n - c r i t i c a l 
 
 +             }   f i n a l l y   { 
 
 +                 r u n n i n g R e f . c u r r e n t   =   f a l s e ; 
 
 +             } 
 
 +         } , 
 
 +         [ d b ,   s e r v e r ,   a p i K e y ,   m e m o r y M o d e l ,   e n a b l e d ] , 
 
 +     ) ; 
 
 + 
 
 +     / * * 
 
 +       *   R e a d s   a l l   s t o r e d   m e m o r i e s   a n d   f o r m a t s   t h e m   a s   a   s y s t e m   p r o m p t   s t r i n g . 
 
 +       *   R e t u r n s   e m p t y   s t r i n g   i f   n o   m e m o r i e s   e x i s t . 
 
 +       * / 
 
 +     c o n s t   b u i l d M e m o r y S y s t e m P r o m p t   =   u s e C a l l b a c k ( ( ) :   s t r i n g   = >   { 
 
 +         c o n s t   m e m o r i e s   =   d b . q u e r y < U s e r M e m o r y > ( 
 
 +             " S E L E C T   k e y ,   v a l u e ,   c o n f i d e n c e   F R O M   u s e r _ m e m o r i e s   O R D E R   B Y   u p d a t e d _ a t   D E S C   L I M I T   4 0 " , 
 
 +         ) ; 
 
 +         i f   ( m e m o r i e s . l e n g t h   = = =   0 )   r e t u r n   " " ; 
 
 + 
 
 +         c o n s t   l i n e s   =   m e m o r i e s 
 
 +             . f i l t e r ( ( m )   = >   m . c o n f i d e n c e   > =   0 . 6 ) 
 
 +             . m a p ( ( m )   = >   ` -   $ { m . k e y . r e p l a c e ( / _ / g ,   "   " ) } :   $ { m . v a l u e } ` ) ; 
 
 + 
 
 +         i f   ( l i n e s . l e n g t h   = = =   0 )   r e t u r n   " " ; 
 
 + 
 
 +         r e t u r n   [ 
 
 +             " Y o u   a r e   a   h e l p f u l   a s s i s t a n t   w i t h   m e m o r y   o f   t h i s   u s e r . " , 
 
 +             " K n o w n   f a c t s   a b o u t   t h e   u s e r : " , 
 
 +             . . . l i n e s , 
 
 +             " " , 
 
 +             " U s e   t h i s   c o n t e x t   n a t u r a l l y        d o n ' t   r e p e a t   i t   v e r b a t i m ,   j u s t   l e t   i t   i n f o r m   y o u r   r e s p o n s e s . " , 
 
 +         ] . j o i n ( " \ n " ) ; 
 
 +     } ,   [ d b ] ) ; 
 
 + 
 
 +     r e t u r n   {   e x t r a c t M e m o r i e s ,   b u i l d M e m o r y S y s t e m P r o m p t   } ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s   b / t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s 
 
 i n d e x   9 0 a e 3 4 d . . 7 5 b 6 3 9 0   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s 
 
 + + +   b / t a u r i - a p p / s r c / h o o k s / u s e M o d e l s . t s 
 
 @ @   - 1 , 1 1   + 1 , 2 4   @ @ 
 
 - i m p o r t   {   u s e S t a t e ,   u s e E f f e c t ,   u s e C a l l b a c k   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   {   u s e S t a t e ,   u s e E f f e c t ,   u s e C a l l b a c k ,   u s e R e f   }   f r o m   " r e a c t " ; 
 
   i m p o r t   t y p e   {   M o d e l I n f o ,   S e r v e r S t a t u s   }   f r o m   " . . / l i b / t y p e s " ; 
 
   i m p o r t   {   g e t N e x t S e l e c t e d M o d e l   }   f r o m   " . / m o d e l - s e l e c t i o n " ; 
 
 + i m p o r t   {   r e s o l v e A l i a s   }   f r o m   " . . / l i b / m o d e l A l i a s " ; 
 
 + 
 
 + / /   T e m p o   d e   p r o t e % % o   a p %%s   s e l e % % o   m a n u a l   ( 5   s e g u n d o s ) 
 
 + c o n s t   M A N U A L _ S E L E C T I O N _ L O C K _ M S   =   5 0 0 0 ; 
 
   
 
   e x p o r t   f u n c t i o n   u s e M o d e l s ( s e r v e r :   s t r i n g ,   a p i K e y :   s t r i n g ,   e n a b l e d   =   t r u e )   { 
 
       c o n s t   [ m o d e l s ,   s e t M o d e l s ]   =   u s e S t a t e < M o d e l I n f o [ ] > ( [ ] ) ; 
 
 -     c o n s t   [ s e l e c t e d M o d e l ,   s e t S e l e c t e d M o d e l ]   =   u s e S t a t e < s t r i n g > ( " " ) ; 
 
 +     c o n s t   [ s e l e c t e d M o d e l ,   s e t S e l e c t e d M o d e l S t a t e ]   =   u s e S t a t e < s t r i n g > ( " " ) ; 
 
       c o n s t   [ s t a t u s ,   s e t S t a t u s ]   =   u s e S t a t e < S e r v e r S t a t u s > ( " l o a d i n g " ) ; 
 
 +     
 
 +     / /   R e f   p a r a   r a s t r e a r   q u a n d o   o   u s u % r i o   s e l e c i o n o u   m a n u a l m e n t e   u m   m o d e l o 
 
 +     c o n s t   l a s t M a n u a l S e l e c t i o n R e f   =   u s e R e f < n u m b e r > ( 0 ) ; 
 
 + 
 
 +     / /   W r a p p e r   p a r a   s e t S e l e c t e d M o d e l   q u e   r e g i s t r a   o   t i m e s t a m p 
 
 +     c o n s t   s e t S e l e c t e d M o d e l   =   u s e C a l l b a c k ( ( v a l u e :   s t r i n g   |   ( ( p r e v :   s t r i n g )   = >   s t r i n g ) )   = >   { 
 
 +         l a s t M a n u a l S e l e c t i o n R e f . c u r r e n t   =   D a t e . n o w ( ) ; 
 
 +         s e t S e l e c t e d M o d e l S t a t e ( v a l u e ) ; 
 
 +     } ,   [ ] ) ; 
 
   
 
       c o n s t   r e f r e s h   =   u s e C a l l b a c k ( a s y n c   ( )   = >   { 
 
           i f   ( ! e n a b l e d   | |   ! s e r v e r . t r i m ( ) )   { 
 
 @ @   - 2 5 , 7   + 3 8 , 2 4   @ @   e x p o r t   f u n c t i o n   u s e M o d e l s ( s e r v e r :   s t r i n g ,   a p i K e y :   s t r i n g ,   e n a b l e d   =   t r u e )   { 
 
               c o n s t   d a t a   =   a w a i t   r e s . j s o n ( ) ; 
 
               c o n s t   l i s t :   M o d e l I n f o [ ]   =   d a t a . d a t a   | |   [ ] ; 
 
               s e t M o d e l s ( l i s t ) ; 
 
 -             s e t S e l e c t e d M o d e l ( ( c u r r e n t )   = >   g e t N e x t S e l e c t e d M o d e l ( c u r r e n t ,   l i s t ) ) ; 
 
 +             
 
 +             / /   P r o t e g e   c o n t r a   s o b r e s c r i t a   d e   s e l e % % o   m a n u a l   r e c e n t e 
 
 +             c o n s t   t i m e S i n c e M a n u a l S e l e c t i o n   =   D a t e . n o w ( )   -   l a s t M a n u a l S e l e c t i o n R e f . c u r r e n t ; 
 
 +             c o n s t   i s L o c k A c t i v e   =   t i m e S i n c e M a n u a l S e l e c t i o n   <   M A N U A L _ S E L E C T I O N _ L O C K _ M S ; 
 
 +             
 
 +             s e t S e l e c t e d M o d e l S t a t e ( ( c u r r e n t )   = >   { 
 
 +                 / /   S e   h %   u m   l o c k   a t i v o   e   o   m o d e l o   a t u a l   e x i s t e   n a   n o v a   l i s t a ,   m a n t % m   e l e 
 
 +                 i f   ( i s L o c k A c t i v e   & &   c u r r e n t   & &   l i s t . s o m e ( ( m )   = >   m . i d   = = =   c u r r e n t ) )   { 
 
 +                     r e t u r n   c u r r e n t ; 
 
 +                 } 
 
 +                 / /   P r e f e r   I r o n   ( 2 B )   f i r s t ,   t h e n   C o p p e r   ( 0 . 8 B ) ,   t h e n   f a l l b a c k   t o   n o r m a l   s e l e c t i o n 
 
 +                 c o n s t   i r o n   =   l i s t . f i n d ( ( m )   = >   r e s o l v e A l i a s ( m . i d )   = = =   ' I r o n ' ) ; 
 
 +                 i f   ( i r o n )   r e t u r n   i r o n . i d ; 
 
 +                 c o n s t   c o p p e r   =   l i s t . f i n d ( ( m )   = >   r e s o l v e A l i a s ( m . i d )   = = =   ' C o p p e r ' ) ; 
 
 +                 i f   ( c o p p e r )   r e t u r n   c o p p e r . i d ; 
 
 +                 r e t u r n   g e t N e x t S e l e c t e d M o d e l ( c u r r e n t ,   l i s t ) ; 
 
 +             } ) ; 
 
 +             
 
               s e t S t a t u s ( " o k " ) ; 
 
           }   c a t c h   { 
 
               s e t M o d e l s ( [ ] ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / h o o k s / u s e S e s s i o n M o d e l C o n t r o l l e r . t s   b / t a u r i - a p p / s r c / h o o k s / u s e S e s s i o n M o d e l C o n t r o l l e r . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 2 4 b 9 9 b 1 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / h o o k s / u s e S e s s i o n M o d e l C o n t r o l l e r . t s 
 
 @ @   - 0 , 0   + 1 , 8 5   @ @ 
 
 + i m p o r t   {   u s e C a l l b a c k ,   u s e R e f ,   u s e S t a t e   }   f r o m   " r e a c t " ; 
 
 + i m p o r t   t y p e   {   R u n t i m e M o d e l F i l e   }   f r o m   " . . / f e a t u r e s / r u n t i m e / t y p e s " ; 
 
 + i m p o r t   {   r e s o l v e A l i a s   }   f r o m   " . . / l i b / m o d e l A l i a s " ; 
 
 + i m p o r t   {   u s e T o a s t   }   f r o m   " . . / c o m p o n e n t s / T o a s t " ; 
 
 + 
 
 + i n t e r f a c e   O p t i o n s   { 
 
 +     p r e f e r r e d M o d e l :   s t r i n g ; 
 
 +     o n S w i t c h T o C o o p e r :   ( c o o p e r P a t h :   s t r i n g )   = >   v o i d ; 
 
 +     l o c a l M o d e l s :   R u n t i m e M o d e l F i l e [ ] ; 
 
 + } 
 
 + 
 
 + i n t e r f a c e   S e s s i o n M o d e l C o n t r o l l e r   { 
 
 +     e f f e c t i v e M o d e l :   s t r i n g ; 
 
 +     o v e r r i d e S o u r c e :   ' a u t o '   |   ' u s e r ' ; 
 
 +     s e t U s e r O v e r r i d e :   ( m o d e l P a t h :   s t r i n g )   = >   v o i d ; 
 
 +     c l e a r O v e r r i d e :   ( )   = >   v o i d ; 
 
 +     o n D e g r a d a t i o n D e t e c t e d :   ( )   = >   v o i d ; 
 
 +     d e g r a d a t i o n P r o m p t S h o w n :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   u s e S e s s i o n M o d e l C o n t r o l l e r ( { 
 
 +     p r e f e r r e d M o d e l , 
 
 +     o n S w i t c h T o C o o p e r , 
 
 +     l o c a l M o d e l s , 
 
 + } :   O p t i o n s ) :   S e s s i o n M o d e l C o n t r o l l e r   { 
 
 +     c o n s t   {   s h o w T o a s t   }   =   u s e T o a s t ( ) ; 
 
 +     c o n s t   [ e f f e c t i v e M o d e l ,   s e t E f f e c t i v e M o d e l ]   =   u s e S t a t e < s t r i n g > ( p r e f e r r e d M o d e l ) ; 
 
 +     c o n s t   [ o v e r r i d e S o u r c e ,   s e t O v e r r i d e S o u r c e ]   =   u s e S t a t e < ' a u t o '   |   ' u s e r ' > ( ' a u t o ' ) ; 
 
 +     c o n s t   [ d e g r a d a t i o n P r o m p t S h o w n ,   s e t D e g r a d a t i o n P r o m p t S h o w n ]   =   u s e S t a t e ( f a l s e ) ; 
 
 + 
 
 +     / /   K e e p   e f f e c t i v e M o d e l   i n   s y n c   w h e n   p r e f e r r e d M o d e l   c h a n g e s   e x t e r n a l l y   ( e . g .   s t a r t u p   a u t o - s e l e c t ) 
 
 +     / /   b u t   o n l y   i f   t h e   u s e r   h a s n ' t   m a n u a l l y   o v e r r i d d e n 
 
 +     c o n s t   p r e v P r e f e r r e d R e f   =   u s e R e f ( p r e f e r r e d M o d e l ) ; 
 
 +     i f   ( p r e f e r r e d M o d e l   ! = =   p r e v P r e f e r r e d R e f . c u r r e n t )   { 
 
 +         p r e v P r e f e r r e d R e f . c u r r e n t   =   p r e f e r r e d M o d e l ; 
 
 +         i f   ( o v e r r i d e S o u r c e   = = =   ' a u t o ' )   { 
 
 +             s e t E f f e c t i v e M o d e l ( p r e f e r r e d M o d e l ) ; 
 
 +         } 
 
 +     } 
 
 + 
 
 +     c o n s t   s e t U s e r O v e r r i d e   =   u s e C a l l b a c k ( ( m o d e l P a t h :   s t r i n g )   = >   { 
 
 +         s e t E f f e c t i v e M o d e l ( m o d e l P a t h ) ; 
 
 +         s e t O v e r r i d e S o u r c e ( ' u s e r ' ) ; 
 
 +     } ,   [ ] ) ; 
 
 + 
 
 +     c o n s t   c l e a r O v e r r i d e   =   u s e C a l l b a c k ( ( )   = >   { 
 
 +         s e t E f f e c t i v e M o d e l ( p r e f e r r e d M o d e l ) ; 
 
 +         s e t O v e r r i d e S o u r c e ( ' a u t o ' ) ; 
 
 +     } ,   [ p r e f e r r e d M o d e l ] ) ; 
 
 + 
 
 +     c o n s t   o n D e g r a d a t i o n D e t e c t e d   =   u s e C a l l b a c k ( ( )   = >   { 
 
 +         / /   D o n ' t   s h o w   i f   u s e r   a l r e a d y   c h o s e   m a n u a l l y   o r   a l r e a d y   s h o w n 
 
 +         i f   ( o v e r r i d e S o u r c e   = = =   ' u s e r '   | |   d e g r a d a t i o n P r o m p t S h o w n )   r e t u r n ; 
 
 + 
 
 +         / /   F i n d   C o p p e r ' s   p a t h   f r o m   l o c a l M o d e l s 
 
 +         c o n s t   c o p p e r M o d e l   =   l o c a l M o d e l s . f i n d ( ( m )   = >   r e s o l v e A l i a s ( m . p a t h )   = = =   ' C o p p e r ' ) ; 
 
 +         i f   ( ! c o p p e r M o d e l )   r e t u r n ;   / /   C o p p e r   n o t   a v a i l a b l e ,   c a n ' t   s u g g e s t 
 
 + 
 
 +         s e t D e g r a d a t i o n P r o m p t S h o w n ( t r u e ) ; 
 
 + 
 
 +         s h o w T o a s t ( { 
 
 +             i d :   ' t p s - d e g r a d a t i o n ' , 
 
 +             v a r i a n t :   ' w a r n i n g ' , 
 
 +             m e s s a g e :   ' P e r f o r m a n c e   d e g r a d e d ' , 
 
 +             d e t a i l :   ' T P S   d r o p p e d   b e l o w   3 0   f o r   5 s .   S w i t c h   t o   C o p p e r   ( 0 . 8 B )   f o r   f a s t e r   r e s p o n s e s ? ' , 
 
 +             a c t i o n :   { 
 
 +                 l a b e l :   ' S w i t c h   t o   C o p p e r ' , 
 
 +                 o n C l i c k :   ( )   = >   { 
 
 +                     s e t U s e r O v e r r i d e ( c o p p e r M o d e l . p a t h ) ; 
 
 +                     o n S w i t c h T o C o o p e r ( c o p p e r M o d e l . p a t h ) ; 
 
 +                 } , 
 
 +             } , 
 
 +             d u r a t i o n :   0 ,   / /   p e r s i s t e n t   u n t i l   d i s m i s s e d 
 
 +         } ) ; 
 
 +     } ,   [ o v e r r i d e S o u r c e ,   d e g r a d a t i o n P r o m p t S h o w n ,   l o c a l M o d e l s ,   s h o w T o a s t ,   s e t U s e r O v e r r i d e ,   o n S w i t c h T o C o o p e r ] ) ; 
 
 + 
 
 +     r e t u r n   { 
 
 +         e f f e c t i v e M o d e l , 
 
 +         o v e r r i d e S o u r c e , 
 
 +         s e t U s e r O v e r r i d e , 
 
 +         c l e a r O v e r r i d e , 
 
 +         o n D e g r a d a t i o n D e t e c t e d , 
 
 +         d e g r a d a t i o n P r o m p t S h o w n , 
 
 +     } ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / i n d e x . c s s   b / t a u r i - a p p / s r c / i n d e x . c s s 
 
 i n d e x   3 5 0 3 5 7 e . . 1 1 f c d e a   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / i n d e x . c s s 
 
 + + +   b / t a u r i - a p p / s r c / i n d e x . c s s 
 
 @ @   - 2 , 4 1   + 2 , 5 8   @ @ 
 
   * ,   * : : b e f o r e ,   * : : a f t e r   {   b o x - s i z i n g :   b o r d e r - b o x ;   m a r g i n :   0 ;   p a d d i n g :   0 ;   } 
 
   
 
   : r o o t   { 
 
 -     - - b g :                 # 0 a 1 0 1 6 ; 
 
 -     - - b g 2 :               # 0 f 1 7 2 1 ; 
 
 -     - - b g 3 :               # 1 4 2 0 2 d ; 
 
 -     - - b g 4 :               # 1 8 2 6 3 6 ; 
 
 -     - - b g 5 :               # 2 0 3 2 4 6 ; 
 
 -     - - b o r d e r :         # 2 4 3 2 4 1 ; 
 
 -     - - b o r d e r 2 :       # 3 4 4 7 5 9 ; 
 
 -     - - t e x t :             # e d f 5 f f ; 
 
 -     - - t e x t 2 :           # 9 3 a 8 b c ; 
 
 -     - - t e x t 3 :           # 5 d 7 2 8 8 ; 
 
 -     - - a c c e n t :         # 4 8 a 6 f f ; 
 
 -     - - a c c e n t 2 :       # 2 f 8 a e 3 ; 
 
 -     - - a c c e n t - g l o w :   r g b a ( 7 2 , 1 6 6 , 2 5 5 , 0 . 1 6 ) ; 
 
 -     - - u s e r - b g :       # 1 0 2 6 3 f ; 
 
 -     - - u s e r - b o r d e r :   # 2 1 4 4 6 8 ; 
 
 -     - - a s s t - b g :       # 1 0 1 9 2 4 ; 
 
 -     - - a s s t - b o r d e r :   # 2 4 3 2 4 1 ; 
 
 +     / *   U p d a t e d   t o   M a n u s   d e s i g n   t o k e n s   * / 
 
 +     - - b g :                 # 1 7 1 7 1 7 ;       / *   M a n u s   b g - b a s e   * / 
 
 +     - - b g 2 :               # 1 E 1 E 1 E ;       / *   M a n u s   b g - s u r f a c e   * / 
 
 +     - - b g 3 :               # 2 6 2 6 2 6 ;       / *   M a n u s   b g - e l e v a t e d   * / 
 
 +     - - b g 4 :               # 3 3 3 3 3 3 ;       / *   M a n u s   b g - h o v e r   * / 
 
 +     - - b g 5 :               # 3 D 3 D 3 D ;       / *   s l i g h t l y   l i g h t e r   * / 
 
 +     - - b o r d e r :         # 2 3 2 a 3 3 ; 
 
 +     - - b o r d e r 2 :       # 3 1 3 9 4 4 ; 
 
 +     - - t e x t :             # F 3 F 4 F 6 ;       / *   M a n u s   t e x t - p r i m a r y   * / 
 
 +     - - t e x t 2 :           # 9 C A 3 A F ;       / *   M a n u s   t e x t - s e c o n d a r y   * / 
 
 +     - - t e x t 3 :           # 5 2 5 2 5 B ;       / *   M a n u s   t e x t - m u t e d   * / 
 
 +     - - a c c e n t :         # 4 b 8 6 f f ; 
 
 +     - - a c c e n t 2 :       # 3 6 7 4 e f ; 
 
 +     - - a c c e n t - g l o w :   r g b a ( 7 5 , 1 3 4 , 2 5 5 , 0 . 1 4 ) ; 
 
 +     - - u s e r - b g :       # 1 0 1 c 2 d ; 
 
 +     - - u s e r - b o r d e r :   # 2 0 3 4 5 1 ; 
 
 +     - - a s s t - b g :       # 1 0 1 6 1 d ; 
 
 +     - - a s s t - b o r d e r :   # 2 6 3 0 3 b ; 
 
       - - d a n g e r :         # f 0 4 0 4 0 ; 
 
       - - s u c c e s s :       # 3 0 d 1 5 8 ; 
 
       - - w a r n i n g :       # f f d 6 0 a ; 
 
       - - c o d e - b g :       # 0 d 0 d 1 0 ; 
 
       - - r a d i u s - s m :   6 p x ; 
 
 +     - - r a d i u s - m d :   1 0 p x ; 
 
       - - r a d i u s :         1 0 p x ; 
 
       - - r a d i u s - l g :   1 4 p x ; 
 
 +     - - f o n t - s a n s :   " A p t o s " ,   " S e g o e   U I   V a r i a b l e " ,   " S F   P r o   D i s p l a y " ,   s y s t e m - u i ,   s a n s - s e r i f ; 
 
 +     - - f o n t - e d i t o r i a l :   " A p t o s " ,   " S e g o e   U I   V a r i a b l e " ,   " S F   P r o   T e x t " ,   s y s t e m - u i ,   s a n s - s e r i f ; 
 
 +     - - f o n t - s e r i f :   " I o w a n   O l d   S t y l e " ,   " P a l a t i n o   L i n o t y p e " ,   G e o r g i a ,   s e r i f ; 
 
       - - s h a d o w :         0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 4 ) ; 
 
       - - s h a d o w - l g :   0   8 p x   3 2 p x   r g b a ( 0 , 0 , 0 , 0 . 6 ) ; 
 
       f o n t - s i z e :   1 5 p x ; 
 
   } 
 
   
 
 + / *   M a n u s   d e s i g n   t o k e n s   a s   n a m e d   v a r s   ( f o r   n e w   c o m p o n e n t s )   * / 
 
 + : r o o t   { 
 
 +     - - m a n u s - b a s e :           # 1 7 1 7 1 7 ; 
 
 +     - - m a n u s - s u r f a c e :     # 1 E 1 E 1 E ; 
 
 +     - - m a n u s - e l e v a t e d :   # 2 6 2 6 2 6 ; 
 
 +     - - m a n u s - h o v e r :         # 3 3 3 3 3 3 ; 
 
 +     - - m a n u s - t x :               # F 3 F 4 F 6 ; 
 
 +     - - m a n u s - t x 2 :             # 9 C A 3 A F ; 
 
 +     - - m a n u s - t x 3 :             # 5 2 5 2 5 B ; 
 
 +     - - m a n u s - b l u e :           # 3 B 8 2 F 6 ; 
 
 + } 
 
 + 
 
   h t m l ,   b o d y ,   # r o o t   { 
 
       h e i g h t :   1 0 0 % ; 
 
       o v e r f l o w :   h i d d e n ; 
 
       b a c k g r o u n d :   v a r ( - - b g ) ; 
 
       c o l o r :   v a r ( - - t e x t ) ; 
 
 -     f o n t - f a m i l y :   " S e g o e   U I   V a r i a b l e " ,   " S F   P r o   D i s p l a y " ,   " I B M   P l e x   S a n s " ,   " I n t e r " ,   s y s t e m - u i ,   s a n s - s e r i f ; 
 
 +     f o n t - f a m i l y :   v a r ( - - f o n t - s a n s ) ; 
 
       - w e b k i t - f o n t - s m o o t h i n g :   a n t i a l i a s e d ; 
 
   } 
 
   
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / a g e n t i c - d e t e c t i o n . t s   b / t a u r i - a p p / s r c / l i b / a g e n t i c - d e t e c t i o n . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 0 c f 2 4 9 c 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / a g e n t i c - d e t e c t i o n . t s 
 
 @ @   - 0 , 0   + 1 , 1 1 6   @ @ 
 
 + / * * 
 
 +   *   A g e n t i c   M o d e   D e t e c t i o n 
 
 +   *   
 
 +   *   D e t e c t s   w h e n   a   u s e r   m e s s a g e   s h o u l d   t r i g g e r   a g e n t i c / p l a n n i n g   m o d e 
 
 +   * / 
 
 + 
 
 + / /   K e y w o r d s   t h a t   t r i g g e r   a g e n t i c   m o d e 
 
 + e x p o r t   c o n s t   A G E N T I C _ K E Y W O R D S   =   [ 
 
 +     ' c o m o   f a z e r ' , 
 
 +     ' c o m o   c r i a r ' , 
 
 +     ' c o m o   c o n f i g u r a r ' , 
 
 +     ' c o m o   i n s t a l a r ' , 
 
 +     ' c o m o   u s a r ' , 
 
 +     ' c o m o   i m p l e m e n t a r ' , 
 
 +     ' g u i a ' , 
 
 +     ' t u t o r i a l ' , 
 
 +     ' p a s s o   a   p a s s o ' , 
 
 +     ' e x e m p l o   c o m p l e t o ' , 
 
 +     ' p r o j e t o ' , 
 
 +     ' a p r e n d a ' , 
 
 +     ' e n s i n e ' , 
 
 +     ' e x p l i q u e   d e t a l h a d a m e n t e ' , 
 
 +     ' m e   m o s t r e ' , 
 
 +     ' c r i e   u m ' , 
 
 +     ' f a % a   u m ' , 
 
 +     ' m o n t e   u m ' , 
 
 +     ' d e s e n v o l v a ' , 
 
 +     ' c o n s t r u a ' , 
 
 +     ' s e t u p ' , 
 
 +     ' c o n f i g u r a r ' , 
 
 +     ' i n s t a l a % % o ' , 
 
 +     ' g e t t i n g   s t a r t e d ' , 
 
 +     ' q u i c k s t a r t ' , 
 
 +     ' b o i l e r p l a t e ' , 
 
 +     ' t e m p l a t e ' , 
 
 +     ' s c a f f o l d ' , 
 
 + ] ; 
 
 + 
 
 + / /   R e g e x   p a t t e r n s   f o r   m o r e   c o m p l e x   d e t e c t i o n 
 
 + e x p o r t   c o n s t   A G E N T I C _ P A T T E R N S   =   [ 
 
 +     / \ b ( c o m o | g u i a | t u t o r i a l | p a s s o   a   p a s s o | e x e m p l o   c o m p l e t o | p r o j e t o | a p r e n d a | e n s i n e | m o s t r e ) \ b / i , 
 
 +     / \ b ( p o d e   m e   ( m o s t r a r | e n s i n a r | a j u d a r | e x p l i c a r ) ) \ b / i , 
 
 +     / \ b ( q u e r o   ( a p r e n d e r | c r i a r | f a z e r | c o n s t r u i r | c o n f i g u r a r | m o n t a r ) ) \ b / i , 
 
 +     / \ b ( m e   ( e x p l i q u e | m o s t r e | e n s i n e )   c o m o ) \ b / i , 
 
 +     / \ b ( c r i e | f a % a | m o n t e | d e s e n v o l v a | c o n s t r u a )   ( u m | u m a ) \ b / i , 
 
 + ] ; 
 
 + 
 
 + / * * 
 
 +   *   C h e c k   i f   a   m e s s a g e   s h o u l d   t r i g g e r   a g e n t i c   m o d e 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   s h o u l d U s e A g e n t i c M o d e ( m e s s a g e :   s t r i n g ) :   b o o l e a n   { 
 
 +     c o n s t   l o w e r M e s s a g e   =   m e s s a g e . t o L o w e r C a s e ( ) . t r i m ( ) ; 
 
 +     
 
 +     / /   C h e c k   k e y w o r d s 
 
 +     c o n s t   h a s K e y w o r d   =   A G E N T I C _ K E Y W O R D S . s o m e ( k e y w o r d   = >   
 
 +         l o w e r M e s s a g e . i n c l u d e s ( k e y w o r d . t o L o w e r C a s e ( ) ) 
 
 +     ) ; 
 
 +     
 
 +     / /   C h e c k   p a t t e r n s 
 
 +     c o n s t   h a s P a t t e r n   =   A G E N T I C _ P A T T E R N S . s o m e ( p a t t e r n   = >   
 
 +         p a t t e r n . t e s t ( m e s s a g e ) 
 
 +     ) ; 
 
 +     
 
 +     r e t u r n   h a s K e y w o r d   | |   h a s P a t t e r n ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   E x t r a c t   t h e   c o r e   i n t e n t   f r o m   a   m e s s a g e 
 
 +   *   U s e d   f o r   g e n e r a t i n g   p l a n   t i t l e s 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   e x t r a c t I n t e n t ( m e s s a g e :   s t r i n g ) :   s t r i n g   { 
 
 +     / /   R e m o v e   c o m m o n   p r e f i x e s 
 
 +     l e t   i n t e n t   =   m e s s a g e 
 
 +         . r e p l a c e ( / ^ ( c o m o | m e   m o s t r e | m e   e n s i n e | m e   e x p l i q u e | q u e r o | g o s t a r i a   d e | p o d e | c o n s e g u e ) \ s + / i ,   ' ' ) 
 
 +         . r e p l a c e ( / \ ? $ / g ,   ' ' ) 
 
 +         . t r i m ( ) ; 
 
 +     
 
 +     / /   C a p i t a l i z e   f i r s t   l e t t e r 
 
 +     r e t u r n   i n t e n t . c h a r A t ( 0 ) . t o U p p e r C a s e ( )   +   i n t e n t . s l i c e ( 1 ) ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   C o u n t   h o w   m a n y   a g e n t i c   i n d i c a t o r s   a r e   i n   t h e   m e s s a g e 
 
 +   *   H i g h e r   s c o r e   =   m o r e   l i k e l y   t o   n e e d   a g e n t i c   m o d e 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   g e t A g e n t i c S c o r e ( m e s s a g e :   s t r i n g ) :   n u m b e r   { 
 
 +     c o n s t   l o w e r M e s s a g e   =   m e s s a g e . t o L o w e r C a s e ( ) ; 
 
 +     l e t   s c o r e   =   0 ; 
 
 +     
 
 +     / /   K e y w o r d   m a t c h e s 
 
 +     A G E N T I C _ K E Y W O R D S . f o r E a c h ( k e y w o r d   = >   { 
 
 +         i f   ( l o w e r M e s s a g e . i n c l u d e s ( k e y w o r d . t o L o w e r C a s e ( ) ) )   { 
 
 +             s c o r e   + =   1 ; 
 
 +         } 
 
 +     } ) ; 
 
 +     
 
 +     / /   P a t t e r n   m a t c h e s 
 
 +     A G E N T I C _ P A T T E R N S . f o r E a c h ( p a t t e r n   = >   { 
 
 +         i f   ( p a t t e r n . t e s t ( m e s s a g e ) )   { 
 
 +             s c o r e   + =   2 ; 
 
 +         } 
 
 +     } ) ; 
 
 +     
 
 +     / /   B o n u s   f o r   l o n g e r   m e s s a g e s   ( m o r e   d e t a i l e d   r e q u e s t s ) 
 
 +     i f   ( m e s s a g e . l e n g t h   >   1 0 0 )   s c o r e   + =   1 ; 
 
 +     i f   ( m e s s a g e . l e n g t h   >   2 0 0 )   s c o r e   + =   1 ; 
 
 +     
 
 +     r e t u r n   s c o r e ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   D e t e r m i n e   i f   w e   s h o u l d   u s e   a g e n t i c   m o d e   b a s e d   o n   s c o r e   t h r e s h o l d 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   i s A g e n t i c R e c o m m e n d e d ( m e s s a g e :   s t r i n g ,   t h r e s h o l d :   n u m b e r   =   2 ) :   b o o l e a n   { 
 
 +     r e t u r n   g e t A g e n t i c S c o r e ( m e s s a g e )   > =   t h r e s h o l d ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / c h a t . t e s t . t s   b / t a u r i - a p p / s r c / l i b / c h a t . t e s t . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 1 a d 9 7 e 0 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / c h a t . t e s t . t s 
 
 @ @   - 0 , 0   + 1 , 2 3   @ @ 
 
 + i m p o r t   {   d e s c r i b e ,   e x p e c t ,   i t   }   f r o m   " v i t e s t " ; 
 
 + 
 
 + i m p o r t   {   p a r s e A s s i s t a n t R e s p o n s e   }   f r o m   " . / c h a t " ; 
 
 + 
 
 + d e s c r i b e ( " p a r s e A s s i s t a n t R e s p o n s e " ,   ( )   = >   { 
 
 +     i t ( " r e m o v e s   l e a k e d   r o l e   t r a n s c r i p t   a f t e r   t h e   a s s i s t a n t   a n s w e r " ,   ( )   = >   { 
 
 +         c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( 
 
 +             " R e s p o s t a   f i n a l   p a r a   o   u s u % r i o . \ n \ n A s s i s t a n t :   c o n t i n u a % % o   i n d e v i d a \ n U s e r :   t r e c h o   a n t i g o \ n S y s t e m :   i n s t r u % % o   a n t i g a " , 
 
 +         ) ; 
 
 + 
 
 +         e x p e c t ( p a r s e d . c o n t e n t ) . t o B e ( " R e s p o s t a   f i n a l   p a r a   o   u s u % r i o . " ) ; 
 
 +         e x p e c t ( p a r s e d . r e a s o n i n g ) . t o B e ( " " ) ; 
 
 +     } ) ; 
 
 + 
 
 +     i t ( " k e e p s   v i s i b l e   c o n t e n t   w h i l e   s e p a r a t i n g   t h i n k   b l o c k s " ,   ( )   = >   { 
 
 +         c o n s t   p a r s e d   =   p a r s e A s s i s t a n t R e s p o n s e ( 
 
 +             " < t h i n k > a n % l i s e   i n t e r n a < / t h i n k > \ n \ n E x p l i c a % % o   %Q%t i l . \ n \ n A s s i s t a n t :   l i x o   v a z a d o " , 
 
 +         ) ; 
 
 + 
 
 +         e x p e c t ( p a r s e d . r e a s o n i n g ) . t o B e ( " a n % l i s e   i n t e r n a " ) ; 
 
 +         e x p e c t ( p a r s e d . c o n t e n t ) . t o B e ( " E x p l i c a % % o   %Q%t i l . " ) ; 
 
 +     } ) ; 
 
 + } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / c h a t . t s   b / t a u r i - a p p / s r c / l i b / c h a t . t s 
 
 i n d e x   f 5 b 7 4 a 6 . . 2 c c f 8 2 c   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / l i b / c h a t . t s 
 
 + + +   b / t a u r i - a p p / s r c / l i b / c h a t . t s 
 
 @ @   - 7 , 6   + 7 , 1 9   @ @   e x p o r t   i n t e r f a c e   P a r s e d A s s i s t a n t R e s p o n s e   { 
 
   
 
   c o n s t   T H I N K _ O P E N   =   " < t h i n k > " ; 
 
   c o n s t   T H I N K _ C L O S E   =   " < / t h i n k > " ; 
 
 + c o n s t   T R A N S C R I P T _ L E A K A G E _ P A T T E R N   =   / ( ? : ^ | \ n ) \ s * ( ? : S y s t e m | U s e r | A s s i s t a n t | H u m a n ) : / i ; 
 
 + 
 
 + e x p o r t   c o n s t   C H A T _ T R A N S C R I P T _ S T O P _ S E Q U E N C E S   =   [ 
 
 +     " \ n S y s t e m : " , 
 
 +     " \ n U s e r : " , 
 
 +     " \ n A s s i s t a n t : " , 
 
 +     " \ n \ n S y s t e m : " , 
 
 +     " \ n \ n U s e r : " , 
 
 +     " \ n \ n A s s i s t a n t : " , 
 
 +     " S y s t e m : " , 
 
 +     " \ n H u m a n : " , 
 
 +     " \ n \ n H u m a n : " , 
 
 + ] ; 
 
   
 
   e x p o r t   f u n c t i o n   b u i l d C h a t T i t l e ( t e x t :   s t r i n g ) :   s t r i n g   { 
 
       c o n s t   n o r m a l i z e d   =   t e x t . r e p l a c e ( / \ s + / g ,   "   " ) . t r i m ( ) ; 
 
 @ @   - 1 4 , 6   + 2 7 , 1 6   @ @   e x p o r t   f u n c t i o n   b u i l d C h a t T i t l e ( t e x t :   s t r i n g ) :   s t r i n g   { 
 
       r e t u r n   n o r m a l i z e d . s l i c e ( 0 ,   5 0 )   +   ( n o r m a l i z e d . l e n g t h   >   5 0   ?   " . . . "   :   " " ) ; 
 
   } 
 
   
 
 + f u n c t i o n   s t r i p T r a n s c r i p t L e a k a g e ( t e x t :   s t r i n g ) :   s t r i n g   { 
 
 +     c o n s t   n o r m a l i z e d   =   t e x t . r e p l a c e ( / \ r \ n / g ,   " \ n " ) ; 
 
 +     c o n s t   m a t c h   =   n o r m a l i z e d . m a t c h ( T R A N S C R I P T _ L E A K A G E _ P A T T E R N ) ; 
 
 +     i f   ( ! m a t c h   | |   m a t c h . i n d e x   = =   n u l l )   r e t u r n   t e x t ; 
 
 + 
 
 +     c o n s t   p r e f i x   =   n o r m a l i z e d . s l i c e ( 0 ,   m a t c h . i n d e x ) . t r i m E n d ( ) ; 
 
 +     i f   ( ! p r e f i x )   r e t u r n   " " ; 
 
 +     r e t u r n   p r e f i x ; 
 
 + } 
 
 + 
 
   e x p o r t   f u n c t i o n   p a r s e A s s i s t a n t R e s p o n s e ( r a w C o n t e n t :   s t r i n g ) :   P a r s e d A s s i s t a n t R e s p o n s e   { 
 
       l e t   c u r s o r   =   0 ; 
 
       l e t   t h i n k i n g O p e n   =   f a l s e ; 
 
 @ @   - 4 9 , 1 0   + 7 2 , 1 1   @ @   e x p o r t   f u n c t i o n   p a r s e A s s i s t a n t R e s p o n s e ( r a w C o n t e n t :   s t r i n g ) :   P a r s e d A s s i s t a n t R e s p o 
 
       c o n s t   n o r m a l i z e d C o n t e n t   =   r e a s o n i n g . t r i m ( ) . l e n g t h   >   0 
 
           ?   c o n t e n t . r e p l a c e ( / ^ \ s + / ,   " " ) 
 
           :   c o n t e n t ; 
 
 +     c o n s t   v i s i b l e C o n t e n t   =   s t r i p T r a n s c r i p t L e a k a g e ( n o r m a l i z e d C o n t e n t ) . t r i m E n d ( ) ; 
 
   
 
       r e t u r n   { 
 
           r a w C o n t e n t , 
 
 -         c o n t e n t :   n o r m a l i z e d C o n t e n t . t r i m E n d ( ) , 
 
 +         c o n t e n t :   v i s i b l e C o n t e n t , 
 
           r e a s o n i n g :   r e a s o n i n g . t r i m ( ) , 
 
           t h i n k i n g O p e n , 
 
       } ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t e s t . t s   b / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t e s t . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 3 4 4 9 8 7 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t e s t . t s 
 
 @ @   - 0 , 0   + 1 , 3 4   @ @ 
 
 + i m p o r t   {   d e s c r i b e ,   e x p e c t ,   i t   }   f r o m   " v i t e s t " ; 
 
 + 
 
 + i m p o r t   {   f o r m a t C h a t D e b u g T r a n s c r i p t   }   f r o m   " . / c h a t D e b u g " ; 
 
 + 
 
 + d e s c r i b e ( " f o r m a t C h a t D e b u g T r a n s c r i p t " ,   ( )   = >   { 
 
 +     i t ( " i n c l u d e s   u s e r   a n d   a s s i s t a n t   d e t a i l s   f o r   a   f u l l   c h a t   e x p o r t " ,   ( )   = >   { 
 
 +         c o n s t   o u t p u t   =   f o r m a t C h a t D e b u g T r a n s c r i p t ( { 
 
 +             c h a t I d :   7 , 
 
 +             m e s s a g e s :   [ 
 
 +                 {   i d :   1 0 ,   c h a t _ i d :   7 ,   r o l e :   " u s e r " ,   c o n t e n t :   " P e r g u n t a " ,   c r e a t e d _ a t :   1 7 1 0 0 0 0 0 0 0   } , 
 
 +                 { 
 
 +                     i d :   1 1 , 
 
 +                     c h a t _ i d :   7 , 
 
 +                     r o l e :   " a s s i s t a n t " , 
 
 +                     c o n t e n t :   " R e s p o s t a " , 
 
 +                     r e a s o n i n g _ c o n t e n t :   " R a s c u n h o   i n t e r n o " , 
 
 +                     p r o m p t _ t o k e n s :   1 2 , 
 
 +                     c o m p l e t i o n _ t o k e n s :   3 4 , 
 
 +                     t o t a l _ t o k e n s :   4 6 , 
 
 +                     t o k e n s _ p e r _ s e c o n d :   1 9 . 4 , 
 
 +                     c r e a t e d _ a t :   1 7 1 0 0 0 0 0 6 0 , 
 
 +                 } , 
 
 +             ] , 
 
 +         } ) ; 
 
 + 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " C h a t   I D :   7 " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " [ U S E R ]   # 1 0 " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " P e r g u n t a " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " [ A S S I S T A N T ]   # 1 1 " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " R e s p o s t a " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " R e a s o n i n g : \ n R a s c u n h o   i n t e r n o " ) ; 
 
 +         e x p e c t ( o u t p u t ) . t o C o n t a i n ( " U s a g e :   p r o m p t = 1 2   c o m p l e t i o n = 3 4   t o t a l = 4 6   t p s = 1 9 . 4 " ) ; 
 
 +     } ) ; 
 
 + } ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t s   b / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 5 d 3 1 a 9 1 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / c h a t D e b u g . t s 
 
 @ @   - 0 , 0   + 1 , 4 5   @ @ 
 
 + i m p o r t   t y p e   {   M e s s a g e   }   f r o m   " . / t y p e s " ; 
 
 + 
 
 + i n t e r f a c e   F o r m a t C h a t D e b u g T r a n s c r i p t O p t i o n s   { 
 
 +     c h a t I d :   n u m b e r   |   n u l l ; 
 
 +     m e s s a g e s :   M e s s a g e [ ] ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   f o r m a t T i m e s t a m p ( t i m e s t a m p :   n u m b e r   |   n u l l   |   u n d e f i n e d ) :   s t r i n g   { 
 
 +     i f   ( ! t i m e s t a m p )   r e t u r n   " u n k n o w n " ; 
 
 +     r e t u r n   n e w   D a t e ( t i m e s t a m p   *   1 0 0 0 ) . t o I S O S t r i n g ( ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   f o r m a t C h a t D e b u g T r a n s c r i p t ( {   c h a t I d ,   m e s s a g e s   } :   F o r m a t C h a t D e b u g T r a n s c r i p t O p t i o n s ) :   s t r i n g   { 
 
 +     c o n s t   l i n e s   =   [ 
 
 +         " #   C h a t   D e b u g   E x p o r t " , 
 
 +         ` C h a t   I D :   $ { c h a t I d   ? ?   " n e w - c h a t " } ` , 
 
 +         ` M e s s a g e   c o u n t :   $ { m e s s a g e s . l e n g t h } ` , 
 
 +         " " , 
 
 +     ] ; 
 
 + 
 
 +     f o r   ( c o n s t   m e s s a g e   o f   m e s s a g e s )   { 
 
 +         l i n e s . p u s h ( ` [ $ { m e s s a g e . r o l e . t o U p p e r C a s e ( ) } ]   # $ { m e s s a g e . i d } ` ) ; 
 
 +         l i n e s . p u s h ( ` C r e a t e d :   $ { f o r m a t T i m e s t a m p ( m e s s a g e . c r e a t e d _ a t ) } ` ) ; 
 
 +         l i n e s . p u s h ( ` C o n t e n t : \ n $ { m e s s a g e . c o n t e n t   | |   " ( e m p t y ) " } ` ) ; 
 
 + 
 
 +         i f   ( m e s s a g e . r e a s o n i n g _ c o n t e n t ? . t r i m ( ) )   { 
 
 +             l i n e s . p u s h ( ` R e a s o n i n g : \ n $ { m e s s a g e . r e a s o n i n g _ c o n t e n t } ` ) ; 
 
 +         } 
 
 + 
 
 +         i f   ( 
 
 +             m e s s a g e . p r o m p t _ t o k e n s   ! =   n u l l   | | 
 
 +             m e s s a g e . c o m p l e t i o n _ t o k e n s   ! =   n u l l   | | 
 
 +             m e s s a g e . t o t a l _ t o k e n s   ! =   n u l l   | | 
 
 +             m e s s a g e . t o k e n s _ p e r _ s e c o n d   ! =   n u l l 
 
 +         )   { 
 
 +             l i n e s . p u s h ( 
 
 +                 ` U s a g e :   p r o m p t = $ { m e s s a g e . p r o m p t _ t o k e n s   ? ?   0 }   c o m p l e t i o n = $ { m e s s a g e . c o m p l e t i o n _ t o k e n s   ? ?   0 }   t o t a l = $ { m e s s a g e . t o t a l _ t o k e n s   ? ?   0 }   t p s = $ { m e s s a g e . t o k e n s _ p e r _ s e c o n d   ? ?   " n / a " } ` , 
 
 +             ) ; 
 
 +         } 
 
 + 
 
 +         l i n e s . p u s h ( " " ) ; 
 
 +     } 
 
 + 
 
 +     r e t u r n   l i n e s . j o i n ( " \ n " ) . t r i m E n d ( ) ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / d b . t s   b / t a u r i - a p p / s r c / l i b / d b . t s 
 
 i n d e x   4 4 b 7 9 9 b . . 9 3 1 d 0 e 9   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / l i b / d b . t s 
 
 + + +   b / t a u r i - a p p / s r c / l i b / d b . t s 
 
 @ @   - 1 8 8 , 1 1   + 1 8 8 , 3 0   @ @   e x p o r t   a s y n c   f u n c t i o n   i n i t D B ( ) :   P r o m i s e < D B >   { 
 
       d b . r u n ( ` C R E A T E   I N D E X   I F   N O T   E X I S T S   i d x _ m s g _ c h a t   O N   m e s s a g e s ( c h a t _ i d ,   c r e a t e d _ a t ) ` ) ; 
 
   
 
       e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " r e a s o n i n g _ c o n t e n t " ,   " r e a s o n i n g _ c o n t e n t   T E X T " ) ; 
 
 +     e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " d i s p l a y _ m o d e " ,   " d i s p l a y _ m o d e   T E X T " ) ; 
 
 +     e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " f o r g e a g e n t _ s t a t e " ,   " f o r g e a g e n t _ s t a t e   T E X T " ) ; 
 
       e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " p r o m p t _ t o k e n s " ,   " p r o m p t _ t o k e n s   I N T E G E R   N O T   N U L L   D E F A U L T   0 " ) ; 
 
       e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " c o m p l e t i o n _ t o k e n s " ,   " c o m p l e t i o n _ t o k e n s   I N T E G E R   N O T   N U L L   D E F A U L T   0 " ) ; 
 
       e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " t o t a l _ t o k e n s " ,   " t o t a l _ t o k e n s   I N T E G E R   N O T   N U L L   D E F A U L T   0 " ) ; 
 
       e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " t o k e n s _ p e r _ s e c o n d " ,   " t o k e n s _ p e r _ s e c o n d   R E A L " ) ; 
 
   
 
 +     / /   U s e r   m e m o r i e s   t a b l e   f o r   s e m a n t i c   m e m o r y   s y s t e m 
 
 +     d b . r u n ( ` 
 
 +         C R E A T E   T A B L E   I F   N O T   E X I S T S   u s e r _ m e m o r i e s   ( 
 
 +             i d   I N T E G E R   P R I M A R Y   K E Y   A U T O I N C R E M E N T , 
 
 +             k e y   T E X T   N O T   N U L L   U N I Q U E , 
 
 +             v a l u e   T E X T   N O T   N U L L , 
 
 +             c o n f i d e n c e   R E A L   N O T   N U L L   D E F A U L T   1 . 0 , 
 
 +             c r e a t e d _ a t   I N T E G E R   N O T   N U L L   D E F A U L T   ( s t r f t i m e ( ' % s ' , ' n o w ' ) ) , 
 
 +             u p d a t e d _ a t   I N T E G E R   N O T   N U L L   D E F A U L T   ( s t r f t i m e ( ' % s ' , ' n o w ' ) ) 
 
 +         ) 
 
 +     ` ) ; 
 
 +     d b . r u n ( ` C R E A T E   I N D E X   I F   N O T   E X I S T S   i d x _ m e m o r i e s _ k e y   O N   u s e r _ m e m o r i e s ( k e y ) ` ) ; 
 
 +     d b . r u n ( ` C R E A T E   I N D E X   I F   N O T   E X I S T S   i d x _ m e m o r i e s _ u p d a t e d   O N   u s e r _ m e m o r i e s ( u p d a t e d _ a t   D E S C ) ` ) ; 
 
 + 
 
 +     / /   T r a c k   w h i c h   m e s s a g e s   h a v e   a l r e a d y   b e e n   p r o c e s s e d   f o r   m e m o r y   e x t r a c t i o n 
 
 +     e n s u r e C o l u m n ( d b ,   " m e s s a g e s " ,   " m e m o r y _ p r o c e s s e d " ,   " m e m o r y _ p r o c e s s e d   I N T E G E R   N O T   N U L L   D E F A U L T   0 " ) ; 
 
 + 
 
       c o n s t   c h a t C o u n t   =   d b . g e t < {   c :   n u m b e r   } > ( " S E L E C T   C O U N T ( * )   a s   c   F R O M   c h a t s " ) ; 
 
       c o n s t   m s g C o u n t   =   d b . g e t < {   c :   n u m b e r   } > ( " S E L E C T   C O U N T ( * )   a s   c   F R O M   m e s s a g e s " ) ; 
 
       c o n s o l e . l o g ( ` [ D B ]   i n i t D B :   r e a d y        $ { c h a t C o u n t ? . c   ? ?   0 }   c h a t s ,   $ { m s g C o u n t ? . c   ? ?   0 }   m e s s a g e s ` ) ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / f o r g e a g e n t - s t a t e . t s   b / t a u r i - a p p / s r c / l i b / f o r g e a g e n t - s t a t e . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . a a e 2 3 4 3 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / f o r g e a g e n t - s t a t e . t s 
 
 @ @   - 0 , 0   + 1 , 2 4 2   @ @ 
 
 + i m p o r t   t y p e   { 
 
 +     A g e n t P l a n , 
 
 +     A g e n t P l a n S t a t e , 
 
 +     A r t i f a c t R e a d y E v e n t , 
 
 +     P l a n C o m p l e t e d E v e n t , 
 
 +     S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t , 
 
 +     S p e c i a l i s t S t a t e , 
 
 +     S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t , 
 
 +     S p e c i a l i s t T h i n k i n g U p d a t e E v e n t , 
 
 +     S t e p C o m p l e t e d E v e n t , 
 
 +     S t e p E r r o r E v e n t , 
 
 +     S t e p S t a r t e d E v e n t , 
 
 + }   f r o m   " . . / t y p e s / f o r g e a g e n t " ; 
 
 + 
 
 + t y p e   F o r g e A g e n t E v e n t   = 
 
 +     |   {   t y p e :   " s t e p - s t a r t e d " ;   p a y l o a d :   S t e p S t a r t e d E v e n t   } 
 
 +     |   {   t y p e :   " s t e p - c o m p l e t e d " ;   p a y l o a d :   S t e p C o m p l e t e d E v e n t   } 
 
 +     |   {   t y p e :   " s t e p - e r r o r " ;   p a y l o a d :   S t e p E r r o r E v e n t   } 
 
 +     |   {   t y p e :   " a r t i f a c t - r e a d y " ;   p a y l o a d :   A r t i f a c t R e a d y E v e n t   } 
 
 +     |   {   t y p e :   " p l a n - c o m p l e t e d " ;   p a y l o a d :   P l a n C o m p l e t e d E v e n t   } 
 
 +     |   {   t y p e :   " s p e c i a l i s t - t h i n k i n g - s t a r t e d " ;   p a y l o a d :   S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t   } 
 
 +     |   {   t y p e :   " s p e c i a l i s t - t h i n k i n g - u p d a t e " ;   p a y l o a d :   S p e c i a l i s t T h i n k i n g U p d a t e E v e n t   } 
 
 +     |   {   t y p e :   " s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " ;   p a y l o a d :   S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t   } ; 
 
 + 
 
 + t y p e   F o r g e A g e n t S t a t e   =   A g e n t P l a n S t a t e   &   { 
 
 +     s p e c i a l i s t s :   S p e c i a l i s t S t a t e [ ] ; 
 
 + } ; 
 
 + 
 
 + e x p o r t   f u n c t i o n   s e r i a l i z e F o r g e A g e n t S t a t e ( s t a t e :   A g e n t P l a n S t a t e   |   n u l l   |   u n d e f i n e d ) :   s t r i n g   |   n u l l   { 
 
 +     i f   ( ! s t a t e )   r e t u r n   n u l l ; 
 
 +     r e t u r n   J S O N . s t r i n g i f y ( s t a t e ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   w i t h P e r s i s t e d F o r g e A g e n t R e s p o n s e ( 
 
 +     s t a t e :   A g e n t P l a n S t a t e   |   n u l l   |   u n d e f i n e d , 
 
 +     f i n a l R e s p o n s e :   s t r i n g   |   n u l l   |   u n d e f i n e d , 
 
 + ) :   A g e n t P l a n S t a t e   |   n u l l   { 
 
 +     i f   ( ! s t a t e )   r e t u r n   n u l l ; 
 
 + 
 
 +     c o n s t   n o r m a l i z e d R e s p o n s e   =   r e s o l v e F o r g e A g e n t F i n a l R e s p o n s e ( s t a t e ,   f i n a l R e s p o n s e ) ; 
 
 +     i f   ( ! n o r m a l i z e d R e s p o n s e )   { 
 
 +         r e t u r n   s t a t e ; 
 
 +     } 
 
 + 
 
 +     r e t u r n   { 
 
 +         . . . s t a t e , 
 
 +         f i n a l _ r e s p o n s e :   n o r m a l i z e d R e s p o n s e , 
 
 +     } ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   i s G e n e r i c F o r g e A g e n t R e s p o n s e ( v a l u e :   s t r i n g   |   n u l l   |   u n d e f i n e d ) :   b o o l e a n   { 
 
 +     c o n s t   n o r m a l i z e d   =   v a l u e ? . t r i m ( ) . t o L o w e r C a s e ( ) ; 
 
 +     i f   ( ! n o r m a l i z e d )   r e t u r n   t r u e ; 
 
 + 
 
 +     r e t u r n   [ 
 
 +         " a q u i   e s t %   a   r e s p o s t a   f i n a l   o r g a n i z a d a   e m   f o r m a t o   m a n u s - s t y l e ,   p r o n t a   p a r a   r e v i s % o   e   e n t r e g a . " , 
 
 +         " a q u i   e s t %   a   r e s p o s t a   f i n a l   o r g a n i z a d a . " , 
 
 +     ] . i n c l u d e s ( n o r m a l i z e d ) ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   e x t r a c t P r o m p t F r o m A r t i f a c t ( s t a t e :   A g e n t P l a n S t a t e   |   n u l l   |   u n d e f i n e d ) :   s t r i n g   |   n u l l   { 
 
 +     c o n s t   c o n t e n t   =   s t a t e ? . a r t i f a c t ? . c o n t e n t ; 
 
 +     i f   ( ! c o n t e n t )   r e t u r n   n u l l ; 
 
 + 
 
 +     c o n s t   m a t c h   =   c o n t e n t . m a t c h ( / p r o m p t   o r i g i n a l : \ s * ( . + ) / i ) ; 
 
 +     r e t u r n   m a t c h ? . [ 1 ] ? . t r i m ( )   ? ?   n u l l ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   r e s o l v e F o r g e A g e n t F i n a l R e s p o n s e ( 
 
 +     s t a t e :   A g e n t P l a n S t a t e   |   n u l l   |   u n d e f i n e d , 
 
 +     f a l l b a c k C o n t e n t ? :   s t r i n g   |   n u l l , 
 
 + ) :   s t r i n g   { 
 
 +     c o n s t   r e s o l v e d F a l l b a c k   =   f a l l b a c k C o n t e n t ? . t r i m ( )   ? ?   " " ; 
 
 +     c o n s t   s t a t e R e s p o n s e   =   s t a t e ? . f i n a l _ r e s p o n s e ? . t r i m ( )   ? ?   " " ; 
 
 + 
 
 +     i f   ( s t a t e R e s p o n s e   & &   ! i s G e n e r i c F o r g e A g e n t R e s p o n s e ( s t a t e R e s p o n s e ) )   { 
 
 +         r e t u r n   s t a t e R e s p o n s e ; 
 
 +     } 
 
 + 
 
 +     i f   ( r e s o l v e d F a l l b a c k   & &   ! i s G e n e r i c F o r g e A g e n t R e s p o n s e ( r e s o l v e d F a l l b a c k ) )   { 
 
 +         r e t u r n   r e s o l v e d F a l l b a c k ; 
 
 +     } 
 
 + 
 
 +     i f   ( ! s t a t e )   { 
 
 +         r e t u r n   r e s o l v e d F a l l b a c k ; 
 
 +     } 
 
 + 
 
 +     c o n s t   p r o m p t   =   e x t r a c t P r o m p t F r o m A r t i f a c t ( s t a t e ) ; 
 
 +     c o n s t   c o m p l e t e d U p d a t e s   =   ( s t a t e . s y s t e m _ m e s s a g e s   ? ?   [ ] ) 
 
 +         . m a p ( ( m e s s a g e )   = >   m e s s a g e . c o n t e n t . t r i m ( ) ) 
 
 +         . f i l t e r ( B o o l e a n ) 
 
 +         . s l i c e ( - 3 ) ; 
 
 + 
 
 +     c o n s t   s e c t i o n s   =   [ 
 
 +         " # #   R e s p o s t a   f i n a l " , 
 
 +         p r o m p t 
 
 +             ?   ` C o n c l u %   a   e x e c u % % o   d o   p e d i d o   * * $ { p r o m p t } * * . ` 
 
 +             :   ` C o n c l u %   a   e x e c u % % o   d e   * * $ { s t a t e . p l a n . t i t l e } * * . ` , 
 
 +         c o m p l e t e d U p d a t e s . l e n g t h   >   0 
 
 +             ?   ` O   q u e   f o i   e n t r e g u e : \ n $ { c o m p l e t e d U p d a t e s . m a p ( ( i t e m )   = >   ` -   $ { i t e m } ` ) . j o i n ( " \ n " ) } ` 
 
 +             :   n u l l , 
 
 +         s t a t e . a r t i f a c t 
 
 +             ?   ` A r t e f a t o   d i s p o n % v e l :   \ ` $ { s t a t e . a r t i f a c t . f i l e n a m e } \ ` $ { s t a t e . a r t i f a c t . c t a _ l a b e l   ?   ` ,   p r o n t o   p a r a   $ { s t a t e . a r t i f a c t . c t a _ l a b e l . t o L o w e r C a s e ( ) } `   :   " . " } ` 
 
 +             :   n u l l , 
 
 +     ] . f i l t e r ( ( s e c t i o n ) :   s e c t i o n   i s   s t r i n g   = >   B o o l e a n ( s e c t i o n ) ) ; 
 
 + 
 
 +     r e t u r n   s e c t i o n s . j o i n ( " \ n \ n " ) ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   p a r s e F o r g e A g e n t S t a t e ( v a l u e :   u n k n o w n ) :   A g e n t P l a n S t a t e   |   n u l l   { 
 
 +     i f   ( ! v a l u e )   r e t u r n   n u l l ; 
 
 + 
 
 +     c o n s t   p a r s e d   =   t y p e o f   v a l u e   = = =   " s t r i n g "   ?   s a f e P a r s e ( v a l u e )   :   v a l u e ; 
 
 +     i f   ( ! p a r s e d   | |   t y p e o f   p a r s e d   ! = =   " o b j e c t " )   r e t u r n   n u l l ; 
 
 + 
 
 +     c o n s t   c a n d i d a t e   =   p a r s e d   a s   P a r t i a l < A g e n t P l a n S t a t e > ; 
 
 +     i f   ( t y p e o f   c a n d i d a t e . p l a n _ i d   ! = =   " s t r i n g " )   r e t u r n   n u l l ; 
 
 +     i f   ( ! c a n d i d a t e . p l a n   | |   t y p e o f   c a n d i d a t e . p l a n   ! = =   " o b j e c t " )   r e t u r n   n u l l ; 
 
 +     i f   ( ! A r r a y . i s A r r a y ( c a n d i d a t e . p l a n . s t e p s ) )   r e t u r n   n u l l ; 
 
 + 
 
 +     r e t u r n   c a n d i d a t e   a s   A g e n t P l a n S t a t e ; 
 
 + } 
 
 + 
 
 + f u n c t i o n   s a f e P a r s e ( v a l u e :   s t r i n g ) :   u n k n o w n   { 
 
 +     t r y   { 
 
 +         r e t u r n   J S O N . p a r s e ( v a l u e ) ; 
 
 +     }   c a t c h   { 
 
 +         r e t u r n   n u l l ; 
 
 +     } 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   c r e a t e F o r g e A g e n t S t a t e ( p l a n I d :   s t r i n g ,   p l a n :   A g e n t P l a n ) :   A g e n t P l a n S t a t e   { 
 
 +     r e t u r n   { 
 
 +         p l a n _ i d :   p l a n I d , 
 
 +         p l a n , 
 
 +         c u r r e n t _ s t e p :   0 , 
 
 +         s t a t u s :   " p l a n n i n g " , 
 
 +         p r o g r e s s :   0 , 
 
 +         s y s t e m _ m e s s a g e s :   [ ] , 
 
 +         s p e c i a l i s t s :   [ ] , 
 
 +     }   a s   F o r g e A g e n t S t a t e ; 
 
 + } 
 
 + 
 
 + e x p o r t   f u n c t i o n   a p p l y F o r g e A g e n t E v e n t ( s t a t e :   A g e n t P l a n S t a t e ,   e v e n t :   F o r g e A g e n t E v e n t ) :   A g e n t P l a n S t a t e   { 
 
 +     i f   ( s t a t e . p l a n _ i d   ! = =   e v e n t . p a y l o a d . p l a n _ i d )   r e t u r n   s t a t e ; 
 
 + 
 
 +     c o n s t   c u r r e n t S t a t e   =   s t a t e   a s   F o r g e A g e n t S t a t e ; 
 
 + 
 
 +     s w i t c h   ( e v e n t . t y p e )   { 
 
 +         c a s e   " s t e p - s t a r t e d " :   { 
 
 +             c o n s t   s t e p s   =   c u r r e n t S t a t e . p l a n . s t e p s . m a p ( ( s t e p )   = > 
 
 +                 s t e p . i d   = = =   e v e n t . p a y l o a d . s t e p _ i d 
 
 +                     ?   {   . . . s t e p ,   s t a t u s :   " r u n n i n g "   a s   c o n s t   } 
 
 +                     :   s t e p , 
 
 +             ) ; 
 
 +             r e t u r n   { 
 
 +                 . . . c u r r e n t S t a t e , 
 
 +                 s t a t u s :   " e x e c u t i n g " , 
 
 +                 c u r r e n t _ s t e p :   e v e n t . p a y l o a d . s t e p _ i d , 
 
 +                 p r o g r e s s :   M a t h . m a x ( c u r r e n t S t a t e . p r o g r e s s ,   M a t h . r o u n d ( ( ( e v e n t . p a y l o a d . s t e p _ i d   -   1 )   /   c u r r e n t S t a t e . p l a n . s t e p s . l e n g t h )   *   1 0 0 ) ) , 
 
 +                 p l a n :   {   . . . c u r r e n t S t a t e . p l a n ,   s t e p s   } , 
 
 +             }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " s t e p - c o m p l e t e d " :   { 
 
 +             c o n s t   s t e p s   =   c u r r e n t S t a t e . p l a n . s t e p s . m a p ( ( s t e p )   = > 
 
 +                 s t e p . i d   = = =   e v e n t . p a y l o a d . s t e p _ i d 
 
 +                     ?   {   . . . s t e p ,   s t a t u s :   " c o m p l e t e d "   a s   c o n s t   } 
 
 +                     :   s t e p , 
 
 +             ) ; 
 
 +             c o n s t   s y s t e m M e s s a g e s   =   [ 
 
 +                 . . . ( c u r r e n t S t a t e . s y s t e m _ m e s s a g e s   ? ?   [ ] ) , 
 
 +                 { 
 
 +                     i d :   ` $ { c u r r e n t S t a t e . p l a n _ i d } - $ { e v e n t . p a y l o a d . s t e p _ i d } - $ { ( c u r r e n t S t a t e . s y s t e m _ m e s s a g e s   ? ?   [ ] ) . l e n g t h   +   1 } ` , 
 
 +                     s t e p _ i d :   e v e n t . p a y l o a d . s t e p _ i d , 
 
 +                     t o n e :   " i n f o "   a s   c o n s t , 
 
 +                     c o n t e n t :   e v e n t . p a y l o a d . m e s s a g e , 
 
 +                 } , 
 
 +             ] ; 
 
 +             r e t u r n   { 
 
 +                 . . . c u r r e n t S t a t e , 
 
 +                 s t a t u s :   " e x e c u t i n g " , 
 
 +                 c u r r e n t _ s t e p :   e v e n t . p a y l o a d . s t e p _ i d , 
 
 +                 p r o g r e s s :   M a t h . r o u n d ( ( e v e n t . p a y l o a d . s t e p _ i d   /   c u r r e n t S t a t e . p l a n . s t e p s . l e n g t h )   *   1 0 0 ) , 
 
 +                 s y s t e m _ m e s s a g e s :   s y s t e m M e s s a g e s , 
 
 +                 p l a n :   {   . . . c u r r e n t S t a t e . p l a n ,   s t e p s   } , 
 
 +             }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " s t e p - e r r o r " :   { 
 
 +             c o n s t   s t e p s   =   c u r r e n t S t a t e . p l a n . s t e p s . m a p ( ( s t e p )   = > 
 
 +                 s t e p . i d   = = =   e v e n t . p a y l o a d . s t e p _ i d 
 
 +                     ?   {   . . . s t e p ,   s t a t u s :   " e r r o r "   a s   c o n s t   } 
 
 +                     :   s t e p , 
 
 +             ) ; 
 
 +             r e t u r n   { 
 
 +                 . . . c u r r e n t S t a t e , 
 
 +                 s t a t u s :   " e r r o r " , 
 
 +                 e r r o r :   e v e n t . p a y l o a d . e r r o r , 
 
 +                 p l a n :   {   . . . c u r r e n t S t a t e . p l a n ,   s t e p s   } , 
 
 +             }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " a r t i f a c t - r e a d y " : 
 
 +             r e t u r n   {   . . . c u r r e n t S t a t e ,   a r t i f a c t :   e v e n t . p a y l o a d . a r t i f a c t   }   a s   F o r g e A g e n t S t a t e ; 
 
 +         c a s e   " s p e c i a l i s t - t h i n k i n g - s t a r t e d " :   { 
 
 +             c o n s t   s p e c i a l i s t :   S p e c i a l i s t S t a t e   =   { 
 
 +                 i d :   e v e n t . p a y l o a d . s p e c i a l i s t _ i d , 
 
 +                 n a m e :   e v e n t . p a y l o a d . s p e c i a l i s t _ n a m e , 
 
 +                 t i t l e :   e v e n t . p a y l o a d . s p e c i a l i s t _ t i t l e , 
 
 +                 t h i n k i n g :   " " , 
 
 +                 r e s p o n s e :   " " , 
 
 +                 s t a t u s :   " t h i n k i n g " , 
 
 +             } ; 
 
 +             c o n s t   e x i s t i n g   =   c u r r e n t S t a t e . s p e c i a l i s t s . f i n d I n d e x ( ( s )   = >   s . i d   = = =   e v e n t . p a y l o a d . s p e c i a l i s t _ i d ) ; 
 
 +             c o n s t   s p e c i a l i s t s   =   e x i s t i n g   > =   0 
 
 +                 ?   c u r r e n t S t a t e . s p e c i a l i s t s . m a p ( ( s ,   i )   = >   ( i   = = =   e x i s t i n g   ?   s p e c i a l i s t   :   s ) ) 
 
 +                 :   [ . . . c u r r e n t S t a t e . s p e c i a l i s t s ,   s p e c i a l i s t ] ; 
 
 +             r e t u r n   {   . . . c u r r e n t S t a t e ,   s p e c i a l i s t s   }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " s p e c i a l i s t - t h i n k i n g - u p d a t e " :   { 
 
 +             c o n s t   s p e c i a l i s t s   =   c u r r e n t S t a t e . s p e c i a l i s t s . m a p ( ( s )   = > 
 
 +                 s . i d   = = =   e v e n t . p a y l o a d . s p e c i a l i s t _ i d 
 
 +                     ?   {   . . . s ,   t h i n k i n g :   e v e n t . p a y l o a d . t h i n k i n g   } 
 
 +                     :   s , 
 
 +             ) ; 
 
 +             r e t u r n   {   . . . c u r r e n t S t a t e ,   s p e c i a l i s t s   }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " s p e c i a l i s t - r e s p o n s e - c o m p l e t e d " :   { 
 
 +             c o n s t   s p e c i a l i s t s   =   c u r r e n t S t a t e . s p e c i a l i s t s . m a p ( ( s )   = > 
 
 +                 s . i d   = = =   e v e n t . p a y l o a d . s p e c i a l i s t _ i d 
 
 +                     ?   {   . . . s ,   t h i n k i n g :   e v e n t . p a y l o a d . t h i n k i n g ,   r e s p o n s e :   e v e n t . p a y l o a d . r e s p o n s e ,   s t a t u s :   " r e s p o n d e d "   a s   c o n s t   } 
 
 +                     :   s , 
 
 +             ) ; 
 
 +             r e t u r n   {   . . . c u r r e n t S t a t e ,   s p e c i a l i s t s   }   a s   F o r g e A g e n t S t a t e ; 
 
 +         } 
 
 +         c a s e   " p l a n - c o m p l e t e d " : 
 
 +             r e t u r n   { 
 
 +                 . . . c u r r e n t S t a t e , 
 
 +                 s t a t u s :   " c o m p l e t e d " , 
 
 +                 p r o g r e s s :   1 0 0 , 
 
 +                 f i n a l _ r e s p o n s e :   e v e n t . p a y l o a d . s u m m a r y , 
 
 +             }   a s   F o r g e A g e n t S t a t e ; 
 
 +     } 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / m o d e l A l i a s . t s   b / t a u r i - a p p / s r c / l i b / m o d e l A l i a s . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 3 2 8 d a 4 e 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / l i b / m o d e l A l i a s . t s 
 
 @ @   - 0 , 0   + 1 , 7 6   @ @ 
 
 + e x p o r t   t y p e   M o d e l A l i a s   =   ' C o p p e r '   |   ' I r o n '   |   ' S t e e l '   |   ' U n k n o w n ' ; 
 
 + 
 
 + / * * 
 
 +   *   R e s o l v e s   m o d e l   a l i a s   f r o m   f i l e n a m e   o r   p a t h 
 
 +   *   M a t c h e s :   C o p p e r   ( 0 . 8 B ) ,   I r o n   ( 2 B ) ,   S t e e l   ( 4 B ) 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   r e s o l v e A l i a s ( m o d e l I d O r P a t h :   s t r i n g ) :   M o d e l A l i a s   { 
 
 +     c o n s t   l o w e r   =   m o d e l I d O r P a t h . t o L o w e r C a s e ( ) ; 
 
 +     
 
 +     / /   M a t c h   b y   f i l e n a m e   p a t t e r n   f i r s t 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' c o p p e r ' ) )   r e t u r n   ' C o p p e r ' ; 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' i r o n ' ) )   r e t u r n   ' I r o n ' ; 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' s t e e l ' ) )   r e t u r n   ' S t e e l ' ; 
 
 +     
 
 +     / /   F a l l b a c k :   m a t c h   b y   p a r a m e t e r   s i z e   i n d i c a t o r s 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' 0 . 8 b ' ) )   r e t u r n   ' C o p p e r ' ; 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' 4 b ' ) )   r e t u r n   ' S t e e l ' ; 
 
 +     i f   ( l o w e r . i n c l u d e s ( ' 2 b ' ) )   r e t u r n   ' I r o n ' ; 
 
 +     
 
 +     r e t u r n   ' U n k n o w n ' ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   G e t s   c l e a n   d i s p l a y   n a m e   f o r   m o d e l   s e l e c t o r 
 
 +   *   R e t u r n s :   C o p p e r ,   I r o n ,   S t e e l   ( n e v e r   f u l l   f i l e n a m e ) 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   g e t D i s p l a y N a m e ( m o d e l I d O r P a t h :   s t r i n g ) :   s t r i n g   { 
 
 +     c o n s t   a l i a s   =   r e s o l v e A l i a s ( m o d e l I d O r P a t h ) ; 
 
 +     i f   ( a l i a s   ! = =   ' U n k n o w n ' )   r e t u r n   a l i a s ; 
 
 +     
 
 +     / /   F o r   u n k n o w n   m o d e l s ,   e x t r a c t   a   c l e a n   n a m e   f r o m   f i l e n a m e 
 
 +     c o n s t   p a r t s   =   m o d e l I d O r P a t h . r e p l a c e ( / \ \ / g ,   ' / ' ) . s p l i t ( ' / ' ) ; 
 
 +     c o n s t   b a s e   =   p a r t s [ p a r t s . l e n g t h   -   1 ] ; 
 
 +     
 
 +     / /   R e m o v e   . g g u f   e x t e n s i o n   a n d   c o m m o n   s u f f i x e s 
 
 +     l e t   c l e a n   =   b a s e . r e p l a c e ( / \ . g g u f $ / i ,   ' ' ) ; 
 
 +     c l e a n   =   c l e a n . r e p l a c e ( / - Q \ d + _ [ K M L ] + $ / i ,   ' ' ) ;     / /   R e m o v e   q u a n t i z a t i o n   s u f f i x 
 
 +     c l e a n   =   c l e a n . r e p l a c e ( / - G G U F $ / i ,   ' ' ) ; 
 
 +     
 
 +     r e t u r n   c l e a n . s l i c e ( 0 ,   2 0 ) ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   R e t u r n s   t r u e   i f   t h i s   m o d e l   s h o u l d   a p p e a r   i n   t h e   p r i m a r y   c h a t   s e l e c t o r 
 
 +   *   A l l   v a l i d   m o d e l s   ( C o p p e r ,   I r o n ,   S t e e l )   a r e   s h o w n 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   i s I n C h a t S e l e c t o r ( m o d e l I d O r P a t h :   s t r i n g ) :   b o o l e a n   { 
 
 +     c o n s t   a l i a s   =   r e s o l v e A l i a s ( m o d e l I d O r P a t h ) ; 
 
 +     r e t u r n   a l i a s   = = =   ' C o p p e r '   | |   a l i a s   = = =   ' I r o n '   | |   a l i a s   = = =   ' S t e e l ' ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   G e t s   t h e   F o r g e M e t a l   e n u m   v a l u e   f o r   a   m o d e l 
 
 +   *   U s e d   i n t e r n a l l y   f o r   m o d e l   m a n a g e m e n t 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   g e t F o r g e M e t a l ( m o d e l I d O r P a t h :   s t r i n g ) :   ' C o p p e r '   |   ' I r o n '   |   ' S t e e l '   |   n u l l   { 
 
 +     c o n s t   a l i a s   =   r e s o l v e A l i a s ( m o d e l I d O r P a t h ) ; 
 
 +     i f   ( a l i a s   = = =   ' U n k n o w n ' )   r e t u r n   n u l l ; 
 
 +     r e t u r n   a l i a s ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   G e t s   m o d e l   d e s c r i p t i o n / t o o l t i p   t e x t 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   g e t M o d e l D e s c r i p t i o n ( a l i a s :   M o d e l A l i a s ) :   s t r i n g   { 
 
 +     s w i t c h   ( a l i a s )   { 
 
 +         c a s e   ' C o p p e r ' : 
 
 +             r e t u r n   ' C o p p e r   ( 0 . 8 B )   -   F a s t   a n d   l i g h t w e i g h t ' ; 
 
 +         c a s e   ' I r o n ' : 
 
 +             r e t u r n   ' I r o n   ( 2 B )   -   B a l a n c e d   p e r f o r m a n c e ' ; 
 
 +         c a s e   ' S t e e l ' : 
 
 +             r e t u r n   ' S t e e l   ( 4 B )   -   M o s t   c a p a b l e ' ; 
 
 +         d e f a u l t : 
 
 +             r e t u r n   ' U n k n o w n   m o d e l ' ; 
 
 +     } 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / l i b / t y p e s . t s   b / t a u r i - a p p / s r c / l i b / t y p e s . t s 
 
 i n d e x   0 c 6 b 2 3 9 . . e 6 4 7 f f 9   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / s r c / l i b / t y p e s . t s 
 
 + + +   b / t a u r i - a p p / s r c / l i b / t y p e s . t s 
 
 @ @   - 1 , 3   + 1 , 5   @ @ 
 
 + i m p o r t   t y p e   {   A g e n t P l a n S t a t e   }   f r o m   " . . / t y p e s / f o r g e a g e n t " ; 
 
 + 
 
   e x p o r t   i n t e r f a c e   C h a t   { 
 
       i d :   n u m b e r ; 
 
       t i t l e :   s t r i n g ; 
 
 @ @   - 1 0 , 6   + 1 2 , 8   @ @   e x p o r t   i n t e r f a c e   M e s s a g e   { 
 
       c h a t _ i d :   n u m b e r ; 
 
       r o l e :   " u s e r "   |   " a s s i s t a n t "   |   " s y s t e m " ; 
 
       c o n t e n t :   s t r i n g ; 
 
 +     d i s p l a y _ m o d e ? :   " d e f a u l t "   |   " a g e n t i c _ f i n a l "   |   n u l l ; 
 
 +     f o r g e a g e n t _ s t a t e ? :   A g e n t P l a n S t a t e   |   n u l l ; 
 
       r e a s o n i n g _ c o n t e n t ? :   s t r i n g   |   n u l l ; 
 
       p r o m p t _ t o k e n s ? :   n u m b e r   |   n u l l ; 
 
       c o m p l e t i o n _ t o k e n s ? :   n u m b e r   |   n u l l ; 
 
 @ @   - 3 9 , 3   + 4 3 , 1 2   @ @   e x p o r t   i n t e r f a c e   U s a g e   { 
 
       t o t a l _ t o k e n s :   n u m b e r ; 
 
       t o k e n s _ p e r _ s e c o n d ? :   n u m b e r ; 
 
   } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   U s e r M e m o r y   { 
 
 +     i d :   n u m b e r ; 
 
 +     k e y :   s t r i n g ; 
 
 +     v a l u e :   s t r i n g ; 
 
 +     c o n f i d e n c e :   n u m b e r ; 
 
 +     c r e a t e d _ a t :   n u m b e r ; 
 
 +     u p d a t e d _ a t :   n u m b e r ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / p r o m p t s / f o r g e a g e n t . t s   b / t a u r i - a p p / s r c / p r o m p t s / f o r g e a g e n t . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 2 2 b 5 5 0 c 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / p r o m p t s / f o r g e a g e n t . t s 
 
 @ @   - 0 , 0   + 1 , 1 1 9   @ @ 
 
 + / * * 
 
 +   *   F o r g e A g e n t   S y s t e m   P r o m p t 
 
 +   *   
 
 +   *   E s t e   p r o m p t   d e v e   s e r   u s a d o   q u a n d o   o   m o d o   a g e n t i c   %   a t i v a d o . 
 
 +   *   E l e   i n s t r u i   o   m o d e l o   a   r e t o r n a r   a p e n a s   J S O N   e s t r u t u r a d o   n o   f o r m a t o   A g e n t P l a n . 
 
 +   * / 
 
 + 
 
 + e x p o r t   c o n s t   F O R G E A G E N T _ S Y S T E M _ P R O M P T   =   ` V o c %   %   o   F o r g e A g e n t ,   u m   a s s i s t e n t e   e s p e c i a l i z a d o   e m   c r i a r   p l a n o s   e s t r u t u r a d o s   e   e x e c u t % v e i s . 
 
 + 
 
 + S U A   T A R E F A : 
 
 + 1 .   A n a l i s a r   a   s o l i c i t a % % o   d o   u s u % r i o 
 
 + 2 .   C r i a r   u m   p l a n o   p a s s o   a   p a s s o   d e t a l h a d o 
 
 + 3 .   R e t o r n a r   A P E N A S   u m   o b j e t o   J S O N   v % l i d o   n o   f o r m a t o   e s p e c i f i c a d o   a b a i x o 
 
 + 
 
 + R E G R A S   I M P O R T A N T E S : 
 
 + -   N U N C A   a d i c i o n e   t e x t o   f o r a   d o   J S O N 
 
 + -   N U N C A   u s e   m a r k d o w n   c o d e   b l o c k s   ( \ ` \ ` \ ` j s o n ) 
 
 + -   S e m p r e   d i v i d a   t a r e f a s   c o m p l e x a s   e m   p a s s o s   c l a r o s 
 
 + -   C a d a   p a s s o   d e v e   t e r   2 - 5   s u b - p a s s o s   q u a n d o   a p l i c % v e l 
 
 + -   U s e   l i n g u a g e m   c l a r a   e   d i r e t a 
 
 + -   O   o v e r v i e w   d e v e   t e r   n o   m % x i m o   2   f r a s e s 
 
 + -   O   t % t u l o   d e v e   t e r   n o   m % x i m o   5 0   c a r a c t e r e s 
 
 + -   M % x i m o   d e   1 0   p a s s o s   p r i n c i p a i s 
 
 + -   R e s p o n d a   e m   p o r t u g u % s   d o   B r a s i l 
 
 + 
 
 + E S T R U T U R A   J S O N   O B R I G A T % R I A : 
 
 + { 
 
 +     " t i t l e " :   " s t r i n g   ( m a x   5 0   c h a r s ) " , 
 
 +     " o v e r v i e w " :   " s t r i n g   ( m a x   2   f r a s e s ) " , 
 
 +     " s t e p s " :   [ 
 
 +         { 
 
 +             " i d " :   n u m b e r , 
 
 +             " t i t l e " :   " s t r i n g " , 
 
 +             " d e s c r i p t i o n " :   " s t r i n g " , 
 
 +             " s t a t u s " :   " p e n d i n g " , 
 
 +             " s u b _ s t e p s " :   [ 
 
 +                 { 
 
 +                     " i d " :   " s t r i n g   ( f o r m a t o :   ' { s t e p _ i d } . { s u b _ i d } ' ) " , 
 
 +                     " d e s c r i p t i o n " :   " s t r i n g " , 
 
 +                     " s t a t u s " :   " p e n d i n g " 
 
 +                 } 
 
 +             ] 
 
 +         } 
 
 +     ] 
 
 + } 
 
 + 
 
 + E X E M P L O   D E   R E S P O S T A   V % L I D A : 
 
 + { " t i t l e " : " C r i a r   A P I   N o d e . j s " , " o v e r v i e w " : " V a m o s   c r i a r   u m a   A P I   R E S T   c o m p l e t a   u s a n d o   E x p r e s s . j s . " , " s t e p s " : [ { " i d " : 1 , " t i t l e " : " C o n f i g u r a r   a m b i e n t e " , " d e s c r i p t i o n " : " P r e p a r a r   a m b i e n t e   d e   d e s e n v o l v i m e n t o " , " s t a t u s " : " p e n d i n g " , " s u b _ s t e p s " : [ { " i d " : " 1 . 1 " , " d e s c r i p t i o n " : " V e r i f i c a r   i n s t a l a % % o   d o   N o d e . j s " , " s t a t u s " : " p e n d i n g " } , { " i d " : " 1 . 2 " , " d e s c r i p t i o n " : " I n s t a l a r   n p m " , " s t a t u s " : " p e n d i n g " } ] } ] } 
 
 + 
 
 + L E M B R E - S E :   R e t o r n e   A P E N A S   o   J S O N ,   s e m   e x p l i c a % % e s   a d i c i o n a i s . ` ; 
 
 + 
 
 + / * * 
 
 +   *   P r o m p t   p a r a   g e r a % % o   d o   a r t e f a t o   f i n a l 
 
 +   *   U s a d o   a p %%s   t o d o s   o s   s t e p s   s e r e m   c o m p l e t a d o s 
 
 +   * / 
 
 + e x p o r t   c o n s t   F O R G E A G E N T _ A R T I F A C T _ P R O M P T   =   ` V o c %   %   o   F o r g e A g e n t .   C o m   b a s e   n o   p l a n o   e x e c u t a d o ,   c r i e   u m   a r t e f a t o   f i n a l   c o m p l e t o . 
 
 + 
 
 + O   a r t e f a t o   d e v e   s e r   u m   d o c u m e n t o   M a r k d o w n   b e m   e s t r u t u r a d o   c o n t e n d o : 
 
 + 1 .   T % t u l o   d o   g u i a 
 
 + 2 .   I n t r o d u % % o   b r e v e 
 
 + 3 .   C o n t e %Q%d o   c o m p l e t o   ( c %%d i g o ,   e x p l i c a % % e s ,   c o m a n d o s ) 
 
 + 4 .   C o n c l u s % o 
 
 + 
 
 + R E G R A S : 
 
 + -   U s e   M a r k d o w n   v % l i d o 
 
 + -   I n c l u a   b l o c o s   d e   c %%d i g o   q u a n d o   n e c e s s % r i o 
 
 + -   S e j a   c o m p l e t o   m a s   c o n c i s o 
 
 + -   U s e   e m o j i s   a p r o p r i a d o s   p a r a   m e l h o r a r   l e g i b i l i d a d e 
 
 + -   R e s p o n d a   e m   p o r t u g u % s   d o   B r a s i l 
 
 + 
 
 + R e t o r n e   A P E N A S   o   c o n t e %Q%d o   d o   m a r k d o w n ,   s e m   b l o c o s   d e   c %%d i g o   ( \ ` \ ` \ ` ) . ` ; 
 
 + 
 
 + / * * 
 
 +   *   T r i g g e r   k e y w o r d s   f o r   a u t o m a t i c   a g e n t i c   m o d e   d e t e c t i o n 
 
 +   * / 
 
 + e x p o r t   c o n s t   A G E N T I C _ T R I G G E R _ K E Y W O R D S   =   [ 
 
 +     ' c o m o   f a z e r ' , 
 
 +     ' c o m o   c r i a r ' , 
 
 +     ' c o m o   c o n f i g u r a r ' , 
 
 +     ' c o m o   i n s t a l a r ' , 
 
 +     ' c o m o   u s a r ' , 
 
 +     ' c o m o   i m p l e m e n t a r ' , 
 
 +     ' g u i a ' , 
 
 +     ' t u t o r i a l ' , 
 
 +     ' p a s s o   a   p a s s o ' , 
 
 +     ' e x e m p l o   c o m p l e t o ' , 
 
 +     ' p r o j e t o ' , 
 
 +     ' a p r e n d a ' , 
 
 +     ' e n s i n e ' , 
 
 +     ' e x p l i q u e   d e t a l h a d a m e n t e ' , 
 
 + ] ; 
 
 + 
 
 + / * * 
 
 +   *   R e g e x   p a t t e r n s   f o r   t r i g g e r   d e t e c t i o n 
 
 +   * / 
 
 + e x p o r t   c o n s t   A G E N T I C _ T R I G G E R _ P A T T E R N S   =   [ 
 
 +     / \ b ( c o m o | g u i a | t u t o r i a l | p a s s o   a   p a s s o | e x e m p l o   c o m p l e t o | p r o j e t o | a p r e n d a | e n s i n e ) \ b / i , 
 
 +     / \ b ( p o d e   m e   ( m o s t r a r | e n s i n a r | a j u d a r | e x p l i c a r ) ) \ b / i , 
 
 +     / \ b ( q u e r o   ( a p r e n d e r | c r i a r | f a z e r | c o n s t r u i r | c o n f i g u r a r ) ) \ b / i , 
 
 + ] ; 
 
 + 
 
 + / * * 
 
 +   *   C h e c k   i f   a   m e s s a g e   s h o u l d   t r i g g e r   a g e n t i c   m o d e 
 
 +   * / 
 
 + e x p o r t   f u n c t i o n   s h o u l d T r i g g e r A g e n t i c ( m e s s a g e :   s t r i n g ) :   b o o l e a n   { 
 
 +     c o n s t   l o w e r M e s s a g e   =   m e s s a g e . t o L o w e r C a s e ( ) ; 
 
 +     
 
 +     / /   C h e c k   k e y w o r d s 
 
 +     c o n s t   h a s K e y w o r d   =   A G E N T I C _ T R I G G E R _ K E Y W O R D S . s o m e ( k e y w o r d   = >   
 
 +         l o w e r M e s s a g e . i n c l u d e s ( k e y w o r d . t o L o w e r C a s e ( ) ) 
 
 +     ) ; 
 
 +     
 
 +     / /   C h e c k   p a t t e r n s 
 
 +     c o n s t   h a s P a t t e r n   =   A G E N T I C _ T R I G G E R _ P A T T E R N S . s o m e ( p a t t e r n   = >   
 
 +         p a t t e r n . t e s t ( m e s s a g e ) 
 
 +     ) ; 
 
 +     
 
 +     r e t u r n   h a s K e y w o r d   | |   h a s P a t t e r n ; 
 
 + } 
 
 d i f f   - - g i t   a / t a u r i - a p p / s r c / t y p e s / f o r g e a g e n t . t s   b / t a u r i - a p p / s r c / t y p e s / f o r g e a g e n t . t s 
 
 n e w   f i l e   m o d e   1 0 0 6 4 4 
 
 i n d e x   0 0 0 0 0 0 0 . . 7 4 a 1 e 8 4 
 
 - - -   / d e v / n u l l 
 
 + + +   b / t a u r i - a p p / s r c / t y p e s / f o r g e a g e n t . t s 
 
 @ @   - 0 , 0   + 1 , 2 4 2   @ @ 
 
 + / * * 
 
 +   *   F o r g e A g e n t   T y p e s 
 
 +   *   
 
 +   *   T y p e S c r i p t   d e f i n i t i o n s   f o r   t h e   A g e n t P l a n   s t r u c t u r e d   o u t p u t 
 
 +   * / 
 
 + 
 
 + e x p o r t   t y p e   S t e p S t a t u s   =   ' p e n d i n g '   |   ' r u n n i n g '   |   ' c o m p l e t e d '   |   ' e r r o r ' ; 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S u b S t e p   { 
 
 +     / * *   F o r m a t :   " { s t e p _ i d } . { s u b _ i d } "   e . g . ,   " 1 . 1 " ,   " 2 . 3 "   * / 
 
 +     i d :   s t r i n g ; 
 
 +     / * *   D e s c r i p t i o n   o f   t h e   s u b - t a s k   * / 
 
 +     d e s c r i p t i o n :   s t r i n g ; 
 
 +     / * *   C u r r e n t   s t a t u s   * / 
 
 +     s t a t u s :   S t e p S t a t u s ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p   { 
 
 +     / * *   S e q u e n t i a l   I D   s t a r t i n g   f r o m   1   * / 
 
 +     i d :   n u m b e r ; 
 
 +     / * *   S h o r t   t i t l e   ( m a x   ~ 5 0   c h a r s )   * / 
 
 +     t i t l e :   s t r i n g ; 
 
 +     / * *   D e t a i l e d   d e s c r i p t i o n   * / 
 
 +     d e s c r i p t i o n :   s t r i n g ; 
 
 +     / * *   C u r r e n t   e x e c u t i o n   s t a t u s   * / 
 
 +     s t a t u s :   S t e p S t a t u s ; 
 
 +     / * *   S u b - t a s k s   b r e a k d o w n   * / 
 
 +     s u b _ s t e p s :   S u b S t e p [ ] ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   A g e n t P l a n   { 
 
 +     / * *   P l a n   t i t l e   ( m a x   5 0   c h a r s )   * / 
 
 +     t i t l e :   s t r i n g ; 
 
 +     / * *   B r i e f   o v e r v i e w   ( m a x   2   s e n t e n c e s )   * / 
 
 +     o v e r v i e w :   s t r i n g ; 
 
 +     / * *   L i s t   o f   e x e c u t i o n   s t e p s   * / 
 
 +     s t e p s :   S t e p [ ] ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   A r t i f a c t   { 
 
 +     / * *   F i l e n a m e   w i t h   e x t e n s i o n   * / 
 
 +     f i l e n a m e :   s t r i n g ; 
 
 +     / * *   F u l l   c o n t e n t   * / 
 
 +     c o n t e n t :   s t r i n g ; 
 
 +     / * *   L a n g u a g e   f o r   s y n t a x   h i g h l i g h t i n g   * / 
 
 +     l a n g u a g e ? :   ' m a r k d o w n '   |   ' j a v a s c r i p t '   |   ' t y p e s c r i p t '   |   ' p y t h o n '   |   ' r u s t '   |   ' j s o n '   |   s t r i n g ; 
 
 +     / * *   C T A   l a b e l   s h o w n   i n   f i n a l   r e s p o n s e   * / 
 
 +     c t a _ l a b e l ? :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   A g e n t S y s t e m M e s s a g e   { 
 
 +     i d :   s t r i n g ; 
 
 +     s t e p _ i d :   n u m b e r ; 
 
 +     t o n e :   ' i n f o '   |   ' s u c c e s s '   |   ' w a r n i n g '   |   ' e r r o r ' ; 
 
 +     c o n t e n t :   s t r i n g ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   R u n t i m e   s t a t e   f o r   p l a n   e x e c u t i o n 
 
 +   * / 
 
 + e x p o r t   i n t e r f a c e   A g e n t P l a n S t a t e   { 
 
 +     / * *   U n i q u e   p l a n   I D   * / 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     / * *   T h e   p l a n   d e f i n i t i o n   * / 
 
 +     p l a n :   A g e n t P l a n ; 
 
 +     / * *   C u r r e n t   s t e p   i n d e x   ( 0 - b a s e d )   * / 
 
 +     c u r r e n t _ s t e p :   n u m b e r ; 
 
 +     / * *   O v e r a l l   s t a t u s   * / 
 
 +     s t a t u s :   ' p l a n n i n g '   |   ' e x e c u t i n g '   |   ' c o m p l e t e d '   |   ' e r r o r '   |   ' c a n c e l l e d ' ; 
 
 +     / * *   P r o g r e s s   p e r c e n t a g e   ( 0 - 1 0 0 )   * / 
 
 +     p r o g r e s s :   n u m b e r ; 
 
 +     / * *   E r r o r   m e s s a g e   i f   s t a t u s   i s   ' e r r o r '   * / 
 
 +     e r r o r ? :   s t r i n g ; 
 
 +     / * *   G e n e r a t e d   a r t i f a c t   * / 
 
 +     a r t i f a c t ? :   A r t i f a c t ; 
 
 +     / * *   D e n s e   t r a n s c r i p t   u p d a t e s   s h o w n   b e t w e e n   s t e p s   * / 
 
 +     s y s t e m _ m e s s a g e s ? :   A g e n t S y s t e m M e s s a g e [ ] ; 
 
 +     / * *   F i n a l   p r o s e   r e s p o n s e   s h o w n   a f t e r   e x e c u t i o n   * / 
 
 +     f i n a l _ r e s p o n s e ? :   s t r i n g ; 
 
 +     / * *   A c t i v e   s p e c i a l i s t   a g e n t s   * / 
 
 +     s p e c i a l i s t s ? :   S p e c i a l i s t S t a t e [ ] ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   P r o p s   f o r   F o r g e A g e n t   c o m p o n e n t s 
 
 +   * / 
 
 + e x p o r t   i n t e r f a c e   F o r g e A g e n t B u b b l e P r o p s   { 
 
 +     / * *   T h e   p l a n   t o   d i s p l a y   * / 
 
 +     p l a n :   A g e n t P l a n ; 
 
 +     / * *   C u r r e n t   e x e c u t i o n   s t a t e   * / 
 
 +     s t a t e ? :   A g e n t P l a n S t a t e ; 
 
 +     / * *   W h e t h e r   t h e   p l a n   i s   c u r r e n t l y   e x e c u t i n g   * / 
 
 +     i s E x e c u t i n g :   b o o l e a n ; 
 
 +     / * *   O p t i o n a l   m a r k d o w n   r e n d e r e r   f o r   t h e   f i n a l   r e s p o n s e   * / 
 
 +     r e n d e r M a r k d o w n ? :   ( t e x t :   s t r i n g )   = >   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   P l a n C a r d P r o p s   { 
 
 +     p l a n :   A g e n t P l a n ; 
 
 +     s t a t e :   A g e n t P l a n S t a t e ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p I t e m P r o p s   { 
 
 +     s t e p :   S t e p ; 
 
 +     i s A c t i v e :   b o o l e a n ; 
 
 +     i s L a s t :   b o o l e a n ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   A r t i f a c t V i e w e r P r o p s   { 
 
 +     a r t i f a c t :   A r t i f a c t ; 
 
 +     o n D o w n l o a d ? :   ( )   = >   v o i d ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   T a u r i   e v e n t   p a y l o a d s 
 
 +   * / 
 
 + e x p o r t   i n t e r f a c e   P l a n S t a r t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     t i t l e :   s t r i n g ; 
 
 +     t o t a l _ s t e p s :   n u m b e r ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p S t a r t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s t e p _ i d :   n u m b e r ; 
 
 +     t i t l e :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p C o m p l e t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s t e p _ i d :   n u m b e r ; 
 
 +     m e s s a g e :   s t r i n g ; 
 
 +     s u b _ s t e p s _ c o m p l e t e d ? :   s t r i n g [ ] ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S t e p E r r o r E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s t e p _ i d :   n u m b e r ; 
 
 +     e r r o r :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   A r t i f a c t R e a d y E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     a r t i f a c t :   A r t i f a c t ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   P l a n C o m p l e t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s u m m a r y :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S p e c i a l i s t T h i n k i n g S t a r t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ n a m e :   s t r i n g ; 
 
 +     s p e c i a l i s t _ t i t l e :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S p e c i a l i s t T h i n k i n g U p d a t e E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ i d :   s t r i n g ; 
 
 +     t h i n k i n g :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S p e c i a l i s t R e s p o n s e C o m p l e t e d E v e n t   { 
 
 +     p l a n _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ i d :   s t r i n g ; 
 
 +     s p e c i a l i s t _ n a m e :   s t r i n g ; 
 
 +     t h i n k i n g :   s t r i n g ; 
 
 +     r e s p o n s e :   s t r i n g ; 
 
 + } 
 
 + 
 
 + e x p o r t   i n t e r f a c e   S p e c i a l i s t S t a t e   { 
 
 +     i d :   s t r i n g ; 
 
 +     n a m e :   s t r i n g ; 
 
 +     t i t l e :   s t r i n g ; 
 
 +     t h i n k i n g :   s t r i n g ; 
 
 +     r e s p o n s e :   s t r i n g ; 
 
 +     s t a t u s :   ' t h i n k i n g '   |   ' r e s p o n d e d ' ; 
 
 + } 
 
 + 
 
 + / * * 
 
 +   *   J S O N   S c h e m a   f o r   v a l i d a t i o n   ( c a n   b e   u s e d   w i t h   z o d   o r   a j v ) 
 
 +   * / 
 
 + e x p o r t   c o n s t   A g e n t P l a n J S O N S c h e m a   =   { 
 
 +     t y p e :   ' o b j e c t ' , 
 
 +     r e q u i r e d :   [ ' t i t l e ' ,   ' o v e r v i e w ' ,   ' s t e p s ' ] , 
 
 +     p r o p e r t i e s :   { 
 
 +         t i t l e :   { 
 
 +             t y p e :   ' s t r i n g ' , 
 
 +             m a x L e n g t h :   5 0 , 
 
 +         } , 
 
 +         o v e r v i e w :   { 
 
 +             t y p e :   ' s t r i n g ' , 
 
 +             m a x L e n g t h :   2 0 0 , 
 
 +         } , 
 
 +         s t e p s :   { 
 
 +             t y p e :   ' a r r a y ' , 
 
 +             m a x I t e m s :   1 0 , 
 
 +             i t e m s :   { 
 
 +                 t y p e :   ' o b j e c t ' , 
 
 +                 r e q u i r e d :   [ ' i d ' ,   ' t i t l e ' ,   ' d e s c r i p t i o n ' ,   ' s t a t u s ' ,   ' s u b _ s t e p s ' ] , 
 
 +                 p r o p e r t i e s :   { 
 
 +                     i d :   { 
 
 +                         t y p e :   ' n u m b e r ' , 
 
 +                         m i n i m u m :   1 , 
 
 +                     } , 
 
 +                     t i t l e :   { 
 
 +                         t y p e :   ' s t r i n g ' , 
 
 +                     } , 
 
 +                     d e s c r i p t i o n :   { 
 
 +                         t y p e :   ' s t r i n g ' , 
 
 +                     } , 
 
 +                     s t a t u s :   { 
 
 +                         t y p e :   ' s t r i n g ' , 
 
 +                         e n u m :   [ ' p e n d i n g ' ,   ' r u n n i n g ' ,   ' c o m p l e t e d ' ,   ' e r r o r ' ] , 
 
 +                     } , 
 
 +                     s u b _ s t e p s :   { 
 
 +                         t y p e :   ' a r r a y ' , 
 
 +                         i t e m s :   { 
 
 +                             t y p e :   ' o b j e c t ' , 
 
 +                             r e q u i r e d :   [ ' i d ' ,   ' d e s c r i p t i o n ' ,   ' s t a t u s ' ] , 
 
 +                             p r o p e r t i e s :   { 
 
 +                                 i d :   { 
 
 +                                     t y p e :   ' s t r i n g ' , 
 
 +                                     p a t t e r n :   ' ^ \ \ d + \ \ . \ \ d + $ ' , 
 
 +                                 } , 
 
 +                                 d e s c r i p t i o n :   { 
 
 +                                     t y p e :   ' s t r i n g ' , 
 
 +                                 } , 
 
 +                                 s t a t u s :   { 
 
 +                                     t y p e :   ' s t r i n g ' , 
 
 +                                     e n u m :   [ ' p e n d i n g ' ,   ' r u n n i n g ' ,   ' c o m p l e t e d ' ,   ' e r r o r ' ] , 
 
 +                                 } , 
 
 +                             } , 
 
 +                         } , 
 
 +                     } , 
 
 +                 } , 
 
 +             } , 
 
 +         } , 
 
 +     } , 
 
 + } ; 
 
 d i f f   - - g i t   a / t a u r i - a p p / t a i l w i n d . c o n f i g . j s   b / t a u r i - a p p / t a i l w i n d . c o n f i g . j s 
 
 i n d e x   a 1 4 f b 8 7 . . 2 b 7 5 5 1 e   1 0 0 6 4 4 
 
 - - -   a / t a u r i - a p p / t a i l w i n d . c o n f i g . j s 
 
 + + +   b / t a u r i - a p p / t a i l w i n d . c o n f i g . j s 
 
 @ @   - 2 0 , 6   + 2 0 , 1 5   @ @   e x p o r t   d e f a u l t   { 
 
                   " c - d a n g e r " :     " v a r ( - - d a n g e r ) " , 
 
                   " c - s u c c e s s " :   " v a r ( - - s u c c e s s ) " , 
 
                   " c - w a r n " :         " v a r ( - - w a r n i n g ) " , 
 
 +                 / /   M a n u s   d e s i g n   t o k e n s 
 
 +                 " m a n u s - b a s e " :           " v a r ( - - m a n u s - b a s e ) " , 
 
 +                 " m a n u s - s u r f a c e " :     " v a r ( - - m a n u s - s u r f a c e ) " , 
 
 +                 " m a n u s - e l e v a t e d " :   " v a r ( - - m a n u s - e l e v a t e d ) " , 
 
 +                 " m a n u s - h o v e r " :         " v a r ( - - m a n u s - h o v e r ) " , 
 
 +                 " m a n u s - t x " :               " v a r ( - - m a n u s - t x ) " , 
 
 +                 " m a n u s - t x 2 " :             " v a r ( - - m a n u s - t x 2 ) " , 
 
 +                 " m a n u s - t x 3 " :             " v a r ( - - m a n u s - t x 3 ) " , 
 
 +                 " m a n u s - b l u e " :           " v a r ( - - m a n u s - b l u e ) " , 
 
               } , 
 
           } , 
 
       } , 
 
 