feat: 完善智能体图片聊天与会话恢复

- 增加私有图片上传、绑定、历史回显与生命周期清理

- 支持输入草稿恢复、图片交互和模型图片能力约束

- 修复旧脏会话幂等删除与前端会话恢复
This commit is contained in:
2026-07-17 19:54:26 +08:00
parent 62d763199f
commit 1e6158be77
62 changed files with 5333 additions and 189 deletions

View File

@@ -1,11 +1,12 @@
<script setup lang="ts">
import type {
ChatTimelineItem as ChatTimelineItemType,
ChatImageLoader,
ChatTimelineMessageItem,
ChatTimelineToolApprovalPayload,
} from './types';
import {nextTick, onBeforeUnmount, ref, watch} from 'vue';
import { nextTick, onBeforeUnmount, ref, watch } from 'vue';
import ChatTimelineItem from './ChatTimelineItem.vue';
@@ -13,6 +14,7 @@ const props = defineProps<{
approvalLoading?: boolean;
copyable?: (item: ChatTimelineMessageItem) => boolean;
emptyText?: string;
imageLoader?: ChatImageLoader;
items: ChatTimelineItemType[];
regenerable?: (item: ChatTimelineMessageItem) => boolean;
regenerateDisabled?: boolean;
@@ -153,6 +155,7 @@ watch(
:key="item.id"
:assistant-actions-visible="isAssistantActionAnchor(item, index, items)"
:item="item"
:image-loader="imageLoader"
:approval-loading="approvalLoading"
:copyable="canCopyMessage(item)"
:regenerable="canRegenerateMessage(item)"