mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
fix chat
This commit is contained in:
@ -10,7 +10,7 @@ import { useChat } from './hooks'
|
||||
import Chat from '@/app/components/base/chat/chat'
|
||||
import type { OnSend } from '@/app/components/base/chat/types'
|
||||
import { useFeaturesStore } from '@/app/components/base/features/hooks'
|
||||
import { fetchConvesationMessages } from '@/service/debug'
|
||||
import { fetchSuggestedQuestions } from '@/service/debug'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
|
||||
const ChatWrapper = () => {
|
||||
@ -49,10 +49,10 @@ const ChatWrapper = () => {
|
||||
query,
|
||||
files,
|
||||
inputs: workflowStore.getState().inputs,
|
||||
conversationId,
|
||||
conversation_id: conversationId,
|
||||
},
|
||||
{
|
||||
onGetSuggestedQuestions: (conversationId, getAbortController) => fetchConvesationMessages(appId, conversationId, getAbortController),
|
||||
onGetSuggestedQuestions: (messageId, getAbortController) => fetchSuggestedQuestions(appId, messageId, getAbortController),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import type { FC } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useStore } from '../../store'
|
||||
import ChatWrapper from './chat-wrapper'
|
||||
|
||||
const DebugAndPreview: FC = () => {
|
||||
const DebugAndPreview = () => {
|
||||
const { t } = useTranslation()
|
||||
const showRunHistory = useStore(s => s.showRunHistory)
|
||||
|
||||
@ -28,4 +28,4 @@ const DebugAndPreview: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default DebugAndPreview
|
||||
export default memo(DebugAndPreview)
|
||||
|
||||
@ -29,6 +29,9 @@ const UserInput = () => {
|
||||
})
|
||||
}
|
||||
|
||||
if (!variables.length)
|
||||
return null
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`
|
||||
|
||||
@ -3,7 +3,9 @@ import Run from '../run'
|
||||
import { useStore } from '../store'
|
||||
|
||||
const Record = () => {
|
||||
const { currentSequenceNumber, workflowRunId } = useStore()
|
||||
const currentSequenceNumber = useStore(s => s.currentSequenceNumber)
|
||||
const workflowRunId = useStore(s => s.workflowRunId)
|
||||
|
||||
return (
|
||||
<div className='flex flex-col w-[400px] h-full rounded-2xl border-[0.5px] border-gray-200 shadow-xl bg-white'>
|
||||
<div className='flex items-center justify-between p-4 pb-1 text-base font-semibold text-gray-900'>
|
||||
|
||||
Reference in New Issue
Block a user