Chore: chat log refactor (#5523)
This commit is contained in:
parent
47a5d4527b
commit
8294e97113
97 changed files with 165 additions and 5249 deletions
|
|
@ -14,7 +14,7 @@ import { useWorkflowRun } from '../../hooks'
|
|||
import UserInput from './user-input'
|
||||
import Chat from '@/app/components/base/chat/chat'
|
||||
import type { ChatItem } from '@/app/components/base/chat/types'
|
||||
import { fetchConvesationMessages } from '@/service/debug'
|
||||
import { fetchConversationMessages } from '@/service/debug'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
import Loading from '@/app/components/base/loading'
|
||||
|
||||
|
|
@ -51,11 +51,11 @@ const ChatRecord = () => {
|
|||
return res
|
||||
}, [chatList])
|
||||
|
||||
const handleFetchConvesationMessages = useCallback(async () => {
|
||||
const handleFetchConversationMessages = useCallback(async () => {
|
||||
if (appDetail && currentConversationID) {
|
||||
try {
|
||||
setFetched(false)
|
||||
const res = await fetchConvesationMessages(appDetail.id, currentConversationID)
|
||||
const res = await fetchConversationMessages(appDetail.id, currentConversationID)
|
||||
setFetched(true)
|
||||
setChatList((res as any).data)
|
||||
}
|
||||
|
|
@ -65,8 +65,8 @@ const ChatRecord = () => {
|
|||
}
|
||||
}, [appDetail, currentConversationID])
|
||||
useEffect(() => {
|
||||
handleFetchConvesationMessages()
|
||||
}, [currentConversationID, appDetail, handleFetchConvesationMessages])
|
||||
handleFetchConversationMessages()
|
||||
}, [currentConversationID, appDetail, handleFetchConversationMessages])
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { FC } from 'react'
|
|||
import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'
|
||||
import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'
|
||||
import { Markdown } from '@/app/components/base/markdown'
|
||||
import LoadingAnim from '@/app/components/app/chat/loading-anim'
|
||||
import LoadingAnim from '@/app/components/base/chat/chat/loading-anim'
|
||||
|
||||
type OutputPanelProps = {
|
||||
isRunning?: boolean
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { FC } from 'react'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import { ImageIndentLeft } from '@/app/components/base/icons/src/vender/line/editor'
|
||||
import { Markdown } from '@/app/components/base/markdown'
|
||||
import LoadingAnim from '@/app/components/app/chat/loading-anim'
|
||||
import LoadingAnim from '@/app/components/base/chat/chat/loading-anim'
|
||||
|
||||
type ResultTextProps = {
|
||||
isRunning?: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue