@@ -21,7 +21,7 @@ import iconUp from '../../public/svg/chevron-up-icon.svg?raw';
2121import  {  type  TabContent  }  from  './tab-component.js' ; 
2222import  {  ChatController  }  from  './chat-controller.js' ; 
2323import  {  ChatHistoryController  }  from  './chat-history-controller.js' ; 
24- import  {  container ,  type  ChatInputComponent ,  ComponentType  }  from  './composable.js' ; 
24+ import  {  container ,  type  ChatInputComponent ,  ComponentType ,   type   ChatInputFooterComponent  }  from  './composable.js' ; 
2525import  getDecorators  from  'inversify-inject-decorators' ; 
2626const  {  lazyMultiInject }  =  getDecorators ( container ) ; 
2727
@@ -88,9 +88,6 @@ export class ChatComponent extends LitElement {
8888 @state ( ) 
8989 isShowingThoughtProcess  =  false ; 
9090
91-  @state ( ) 
92-  isDefaultPromptsEnabled : boolean  =  globalConfig . IS_DEFAULT_PROMPTS_ENABLED  &&  ! this . isChatStarted ; 
93- 
9491 @state ( ) 
9592 selectedCitation : Citation  |  undefined  =  undefined ; 
9693
@@ -107,6 +104,9 @@ export class ChatComponent extends LitElement {
107104 @lazyMultiInject ( ComponentType . ChatInputComponent ) 
108105 chatInputComponents : ChatInputComponent [ ] ; 
109106
107+  @lazyMultiInject ( ComponentType . ChatInputFooterComponent ) 
108+  chatInputFooterComponets : ChatInputFooterComponent [ ] ; 
109+ 
110110 override  updated ( changedProperties : Map < string  |  number  |  symbol ,  unknown > )  { 
111111 super . updated ( changedProperties ) ; 
112112 // The following block is only necessary when you want to override the component from settings in the outside. 
@@ -177,7 +177,6 @@ export class ChatComponent extends LitElement {
177177 this . collapseAside ( event ) ; 
178178 const  question  =  DOMPurify . sanitize ( this . questionInput . value ) ; 
179179 this . isChatStarted  =  true ; 
180-  this . isDefaultPromptsEnabled  =  false ; 
181180
182181 await  this . chatController . generateAnswer ( 
183182 { 
@@ -221,7 +220,6 @@ export class ChatComponent extends LitElement {
221220 this . isChatStarted  =  false ; 
222221 this . chatThread  =  [ ] ; 
223222 this . isDisabled  =  false ; 
224-  this . isDefaultPromptsEnabled  =  true ; 
225223 this . selectedCitation  =  undefined ; 
226224 this . chatController . reset ( ) ; 
227225 // clean up the current session content from the history too 
@@ -230,13 +228,6 @@ export class ChatComponent extends LitElement {
230228 this . handleUserChatCancel ( event ) ; 
231229 } 
232230
233-  // Show the default prompts when enabled 
234-  showDefaultPrompts ( event : Event ) : void   { 
235-  if  ( ! this . isDefaultPromptsEnabled )  { 
236-  this . resetCurrentChat ( event ) ; 
237-  } 
238-  } 
239- 
240231 // Handle the change event on the input field 
241232 handleOnInputChange ( ) : void   { 
242233 this . isResetInput  =  ! ! this . questionInput . value ; 
@@ -477,13 +468,9 @@ export class ChatComponent extends LitElement {
477468 </ button >  
478469 </ div >  
479470
480-  ${ this . isDefaultPromptsEnabled  
481-  ? ''  
482-  : html `< div  class ="chat__containerFooter ">   
483-  < button  type ="button " @click ="${ this . showDefaultPrompts }  " class ="defaults__span button ">  
484-  ${ globalConfig . DISPLAY_DEFAULT_PROMPTS_BUTTON }  
485-  </ button >  
486-  </ div > ` } 
471+  ${ this . chatInputFooterComponets . map ( ( component )  =>  
472+  component . render ( this . resetCurrentChat ,  this . isChatStarted ) ,  
473+  ) }  
487474 </ form >  
488475 </ section >  
489476 ${ this . isShowingThoughtProcess  
0 commit comments