feat(file-check): 新增文件资产管理与清理功能,支持上传、查询、删除及下载

This commit is contained in:
hugo committed 2026-07-14 09:14:44 +08:00
1 parent 143e054d86
commit 729546a7b7
52 files changed
+3420 -34

No files matched your search

@@ -62,6 +62,9 @@ export interface ShippingSendHandlerContext {
handleShippingAutoUploadFile: (file: File) => Promise<void>;
handleShippingAutoUploadNoticeBatch: (files: File[]) => Promise<void>;
isShippingNoticeBatchSubmitting?: () => boolean;
hasBlockingNoticeIntake?: () => boolean;
hasNoticeIntakeFailures?: () => boolean;
getParsedIntakeNos?: () => string[];
refreshShippingActions: () => Promise<void>;
shippingSuggestedPrompt: ComputedRef<string>;
isShippingShortageQueryIntent: (text: string) => boolean;
@@ -187,6 +190,30 @@ export function createShippingSendHandlers(ctx: ShippingSendHandlerContext) {
_content: string,
trimmed: string,
): Promise<boolean> => {
if (!ctx.isShippingNoticeAgent.value) return false;
const noticeItems = ctx.attachments.value.filter((item) => item.kind === 'shipping_notice');
if (noticeItems.length > 0) {
if (ctx.hasBlockingNoticeIntake?.()) {
ctx.msg.info(ctx.t('chat.shippingNoticeWaitingForParse'));
return true;
}
if (ctx.hasNoticeIntakeFailures?.()) {
ctx.msg.warning(ctx.t('chat.shippingNoticeParseFailedHint'));
return true;
}
const intakeNos = ctx.getParsedIntakeNos?.() || [];
if (intakeNos.length && (!trimmed || ctx.shippingAutoFlowRequested.value)) {
ctx.shippingAutoFlowRequested.value = false;
if (typeof textOrEvent !== 'string') ctx.input.value = '';
try {
await ctx.handleShippingAutoUploadNoticeBatch([]);
} catch (e: unknown) {
const errorMessage = e instanceof Error ? e.message : '文件处理失败';
ctx.msg.warning(errorMessage);
}
return true;
}
}
if (!(ctx.shippingAutoFlowRequested.value || !trimmed)) return false;
if (!ctx.isShippingNoticeAgent.value || ctx.attachments.value.length === 0) return false;
if (ctx.isThinking.value || ctx.isUploadingAttachments.value) return false;