refactor(Agent/Chat): 使用 cozeInfo 替代 botId 获取聊天记录
- 移除了 HistoryChat 组件中的 botId属性 - 使用 cozeInfo.bot_id 替代 botId 获取历史聊天数据
This commit is contained in:
@ -39,11 +39,7 @@ const props = defineProps({
|
|||||||
cozeInfo: {
|
cozeInfo: {
|
||||||
type: Object as () => any,
|
type: Object as () => any,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
}
|
||||||
botId: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const delMessage = async (chatId, conversationId) => {
|
const delMessage = async (chatId, conversationId) => {
|
||||||
@ -67,7 +63,7 @@ const truncateText = (text: string, maxLength = 30) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getHistoryChatData(props.botId);
|
getHistoryChatData(props.cozeInfo.bot_id);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user