构件 ai-portal.chat-box
Examples
Basic
With cruise canvas
Properties
| Name | Description | Type | Default | Required |
|---|
disabled | | boolean | | |
placeholder | | string | | |
autoFocus | | boolean | | |
aiEmployees | | AIEmployee[] | | |
commands | | Command[] | | |
uploadOptions | | UploadOptions | | |
Events
| Name | Description | Event Detail |
|---|
message.submit | | string |
chat.submit | | ChatPayload |
Methods
| Name | Description | Params | Returns |
|---|
setValue | | value: string | |
getValue | | | |
focusOnInput | | | |
Type references
AIEmployee
| Name | Description | Type | Default | Required |
|---|
employeeId | | string | | ✅ |
name | | string | | ✅ |
Command
| Name | Description | Type | Default | Required |
|---|
label | | string | | ✅ |
value | | string | | ✅ |
groupKey | | string | | |
groupLabel | | string | | |
subCommands | | Command[] | | |
payload | | CommandPayload | | |
UploadOptions
| Name | Description | Type | Default | Required |
|---|
enabled | | boolean | | |
dragDisabled | | boolean | | |
dragTips | | string | | |
accept | | string | | |
maxFiles | | number | | |
maxSize | In bytes | number | | |
readableAccept | | string | | |
readableMaxSize | | string | | |
ChatPayload
extends ExtraChatPayload
| Name | Description | Type | Default | Required |
|---|
content | | string | | ✅ |
| Name | Description | Type | Default | Required |
|---|
files | | UploadFileInfo[] | | |
cmd | | CommandPayload | null | | |
aiEmployeeId | | string | null | | |
UploadFileInfo
| Name | Description | Type | Default | Required |
|---|
fileId | | string | | ✅ |