跳到主要内容

chat-panel

<ai-portal.chat-panel>

构件 ai-portal.chat-panel

介绍​

弹出式 AI 对话面板,提供一个模态框样式的聊天界面,支持与 AI 助手进行对话交互。

Examples​

Basic​

Playground

Properties​

NameDescriptionTypeDefaultRequired
panelTitlestring
aiEmployeeIdstring
cmdCommandPayload
widthstring | number
heightstring | number
placeholderstring
uploadOptionsUploadOptions
help

Show help messages when no conversation exists.

{ useBrick: UseBrickConf }
maskClosable

Whether to close the panel when clicking the mask.

boolean false

Methods​

NameDescriptionParamsReturns
open
close
setInputValuecontent: string
sendpayload: ChatPayload
showFilefile: FileInfo

Type references​

CommandPayloadServiceFlowStart​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-start"✅
payload{ spaceInstanceId: string; spaceName?: string; flowInstanceId?: string; flowName?: string }✅

BaseCommandPayload​

NameDescriptionTypeDefaultRequired
typestring✅
payloadunknown

CommandPayloadServiceFlowCreate​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-create"✅
payload{ spaceInstanceId: string; spaceName?: string }✅

CommandPayloadServiceFlowEdit​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-edit"✅
payload{ spaceInstanceId: string; spaceName?: string; flowInstanceId: string; flowName?: string }✅

CommandPayloadGoalPlan​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"goal-plan"✅
payload{ goalId: string; goalName?: string; description?: string }✅

CommandPayloadBusinessObjectManagement​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceObject-createOrEdit"✅
payload{ spaceInstanceId: string; serviceObjectId?: string }✅

CommandPayloadBusinessInstanceManagement​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceObjectInstance-createOrEdit"✅
payload{ spaceInstanceId: string; serviceObjectId: string; instanceId?: string }✅

CommandPayloadSpaceConfig​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"space-config"✅
payload{ spaceInstanceId: string; ServiceObjectId?: string; InstanceId?: string }✅

LegacyCommandPayloadServiceFlowStarting​

NameDescriptionTypeDefaultRequired
type"serviceFlowStarting"✅
serviceFlowStarting{ spaceInstanceId?: string; spaceName?: string; flowInstanceId?: string; flowName?: string }✅

UploadOptions​

NameDescriptionTypeDefaultRequired
enabledboolean
dragDisabledboolean
dragTipsstring
acceptstring
maxFilesnumber
maxSize

In bytes

number
readableAcceptstring
readableMaxSizestring

ChatPayload​

extends ExtraChatPayload
NameDescriptionTypeDefaultRequired
contentstring✅

ExtraChatPayload​

NameDescriptionTypeDefaultRequired
filesUploadFileInfo[]
cmdCommandPayload | null
aiEmployeeIdstring | null
agentIdstring
spaceIdstring

UploadFileInfo​

NameDescriptionTypeDefaultRequired
fileIdstring✅

FileInfo​

NameDescriptionTypeDefaultRequired
namestring
mimeTypestring
sizenumber
bytesstring
uristring

CommandPayload​

CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | CommandPayloadBusinessObjectManagement | CommandPayloadBusinessInstanceManagement | CommandPayloadSpaceConfig | LegacyCommandPayloadServiceFlowStarting