feat: 支持在消息流中展示@的知识库和文件

This commit is contained in:
wizardchen
2025-12-22 11:49:58 +08:00
committed by lyingbug
parent 3c83cf9873
commit 58ae0d8350
10 changed files with 219 additions and 26 deletions
+8 -1
View File
@@ -816,7 +816,14 @@ const createSession = (val: string) => {
if (props.isReplying) {
return MessagePlugin.error(t('input.messages.replying'));
}
emit('send-msg', val, selectedModelId.value);
// 获取@提及的知识库和文件信息
const mentionedItems = allSelectedItems.value.map(item => ({
id: item.id,
name: item.name,
type: item.type,
kb_type: item.type === 'kb' ? (item.kbType || 'document') : undefined
}));
emit('send-msg', val, selectedModelId.value, mentionedItems);
clearvalue();
}