feat: add host actions visibility control in KefuChatShell

This commit is contained in:
mlogclub
2026-04-24 22:40:34 +08:00
parent 1db5c3bf39
commit 14f220619f
2 changed files with 32 additions and 22 deletions
+2
View File
@@ -4,6 +4,7 @@ import {
} from "@/lib/kefu-widget-config"
type HostBridgeOptions = {
onInit?: () => void
onOpen?: () => void
onMinimize?: () => void
onMaximizedChange?: (isMaximized: boolean) => void
@@ -40,6 +41,7 @@ export function bindKefuHostBridge(options: HostBridgeOptions = {}) {
if (data.type === INIT_MESSAGE_TYPE && data.payload) {
setKefuWidgetConfig(data.payload as KefuWidgetHostConfig)
options.onInit?.()
return
}