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.
This commit is contained in:
mlogclub
2026-04-25 18:33:32 +08:00
parent 9a2ae5c505
commit 67900d9849
7 changed files with 594 additions and 745 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ import {
import { useShallow } from "zustand/react/shallow"
import { KefuConnectionStatus } from "@/components/kefu/connection-status"
import { KefuMessageEditor } from "@/components/kefu/message-editor"
import { CustomerMessageEditor } from "@/components/kefu/customer-message-editor"
import {
KefuMessageList,
type KefuMessageListHandle,
@@ -319,7 +319,7 @@ export function KefuChatShell() {
loadingOlder={messagesLoadingMore}
onLoadOlder={loadOlderMessages}
/>
<KefuMessageEditor
<CustomerMessageEditor
disabled={!conversation}
onSend={handleSend}
onUploadImage={uploadMessageImage}