Refactor prompt icons and add navigation to clearChat
This commit is contained in:
		
							parent
							
								
									1b689c91c0
								
							
						
					
					
						commit
						21ab18dd7d
					
				| @ -135,13 +135,13 @@ export const PromptBody = () => { | ||||
|                 key: "is_system", | ||||
|                 render: (is_system) => | ||||
|                   is_system ? ( | ||||
|                     <span className="flex justify-between"> | ||||
|                        <Computer className="w-5 h-5 mr-3" /> | ||||
|                     <span className="flex items-center gap-2"> | ||||
|                        <Computer className="w-5 h-5 " /> | ||||
|                        System Prompt | ||||
|                     </span> | ||||
|                   ) : ( | ||||
|                     <span className="flex justify-between"> | ||||
|                       <Zap className="w-5 h-5 mr-3" /> | ||||
|                     <span className="flex items-center gap-2"> | ||||
|                       <Zap className="w-5 h-5" /> | ||||
|                       Quick Prompt | ||||
|                     </span> | ||||
|                   ) | ||||
|  | ||||
| @ -120,6 +120,7 @@ export const useMessageOption = () => { | ||||
|   const abortControllerRef = React.useRef<AbortController | null>(null) | ||||
| 
 | ||||
|   const clearChat = () => { | ||||
|     navigate("/") | ||||
|     setMessages([]) | ||||
|     setHistory([]) | ||||
|     setHistoryId(null) | ||||
| @ -128,7 +129,6 @@ export const useMessageOption = () => { | ||||
|     setIsProcessing(false) | ||||
|     setStreaming(false) | ||||
|     textareaRef?.current?.focus() | ||||
|     navigate("/") | ||||
|   } | ||||
| 
 | ||||
|   const searchChatMode = async ( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user