support attach
This commit is contained in:
@@ -28,6 +28,10 @@ const {
|
||||
} = useAiChat({
|
||||
request: ({ message, signal }) => fetchReply(message, signal)
|
||||
});
|
||||
|
||||
function selectAttachment() {
|
||||
// 在业务侧打开文件选择器
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -41,6 +45,7 @@ const {
|
||||
@stop="stopGeneration"
|
||||
@retry="retryLastMessage"
|
||||
@new-conversation="resetConversation"
|
||||
@add-attachment="selectAttachment"
|
||||
/>
|
||||
</template>
|
||||
```
|
||||
@@ -64,7 +69,7 @@ const {
|
||||
|
||||
## 自定义
|
||||
|
||||
`welcome`、`composer`、`tool-status`、`message` 等插槽可以替换对应区域。`composer` 插槽会拿到 `draft`、`on-send`、`on-stop`、`on-retry`、`on-new-conversation` 等,便于接入自定义输入框。
|
||||
`welcome`、`composer`、`tool-status`、`message` 等插槽可以替换对应区域。`composer` 插槽会拿到 `draft`、`on-send`、`on-stop`、`on-retry`、`on-new-conversation`、`on-add-attachment` 等,便于接入自定义输入框。
|
||||
|
||||
## API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user