Files
ai-agent/web/components/kefu/customer-message-editor.tsx
T
mlogclub 67900d9849 feat: replace ImMessageEditor with AgentMessageEditor and CustomerMessageEditor, refactor shared message editor logic
- Introduced AgentMessageEditor component for agent message handling.
- Created CustomerMessageEditor component to handle customer messages.
- Refactored shared message editor logic into SharedMessageEditor.
- Removed the old KefuMessageEditor component.
- Updated chat panel to use the new AgentMessageEditor.
- Updated KefuChatShell to use CustomerMessageEditor instead of KefuMessageEditor.
- Added quick reply fetching and handling in AgentMessageEditor.
2026-04-25 18:33:32 +08:00

35 lines
817 B
TypeScript

"use client"
import {
SharedMessageEditor,
type UploadedMessageEditorImage,
} from "@/components/chat/shared-message-editor"
type CustomerMessageEditorProps = {
disabled?: boolean
uploadingAsset?: boolean
onSend: (html: string) => Promise<void>
onUploadImage: (file: File) => Promise<UploadedMessageEditorImage | null>
onSendAttachment: (file: File) => Promise<void>
}
export function CustomerMessageEditor({
disabled = false,
uploadingAsset = false,
onSend,
onUploadImage,
onSendAttachment,
}: CustomerMessageEditorProps) {
return (
<SharedMessageEditor
variant="customer"
disabled={disabled}
uploadingAsset={uploadingAsset}
manageLocalUploading
onSend={onSend}
onUploadImage={onUploadImage}
onSendAttachment={onSendAttachment}
/>
)
}