Refactor prompt icons and add navigation to clearChat

This commit is contained in:
n4ze3m 2024-03-04 15:01:53 +05:30
parent 1b689c91c0
commit 21ab18dd7d
2 changed files with 5 additions and 5 deletions

View File

@ -135,13 +135,13 @@ export const PromptBody = () => {
key: "is_system", key: "is_system",
render: (is_system) => render: (is_system) =>
is_system ? ( is_system ? (
<span className="flex justify-between"> <span className="flex items-center gap-2">
<Computer className="w-5 h-5 mr-3" /> <Computer className="w-5 h-5 " />
System Prompt System Prompt
</span> </span>
) : ( ) : (
<span className="flex justify-between"> <span className="flex items-center gap-2">
<Zap className="w-5 h-5 mr-3" /> <Zap className="w-5 h-5" />
Quick Prompt Quick Prompt
</span> </span>
) )

View File

@ -120,6 +120,7 @@ export const useMessageOption = () => {
const abortControllerRef = React.useRef<AbortController | null>(null) const abortControllerRef = React.useRef<AbortController | null>(null)
const clearChat = () => { const clearChat = () => {
navigate("/")
setMessages([]) setMessages([])
setHistory([]) setHistory([])
setHistoryId(null) setHistoryId(null)
@ -128,7 +129,6 @@ export const useMessageOption = () => {
setIsProcessing(false) setIsProcessing(false)
setStreaming(false) setStreaming(false)
textareaRef?.current?.focus() textareaRef?.current?.focus()
navigate("/")
} }
const searchChatMode = async ( const searchChatMode = async (