fix(webui): keep missing pasted paths silent (#6408)

* fix(attachments): keep missing pasted paths silent

* fix(webui): limit missing-path silence to paste inspection
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-23 11:41:46 +08:00
1 parent 06f3981962
commit 9cff5a90cc
2 files changed
+26 -30

No files matched your search

@@ -1582,8 +1582,9 @@ export function ThreadComposer({
setPathInspection((current) => current?.generation === generation ? { ...current, attachment } : current);
}).catch((error: unknown) => {
if (generation !== pathCheckGeneration.current || pathCheckScope.current !== scopeIdentity) return;
setInlineError(error instanceof Error ? error.message : t("message.attachmentUnavailable"));
setPathInspection(null);
if (error instanceof Error && "status" in error && error.status === 404) return;
setInlineError(error instanceof Error ? error.message : t("message.attachmentUnavailable"));
});
}, [interactionDisabled, onAttachmentPaste, onInspectAttachment, rawSelection, replaceMentionInput, scopeIdentity, t, value]);