Rename variable for clarity in image attachment check

This commit is contained in:
2026-04-17 13:08:03 +02:00
parent 43c6f6360b
commit b5e1bc9a68

View File

@@ -2402,8 +2402,8 @@ async function sendMessage() {
const existingMessages = (chatSessions.find(s => s.session_id === targetSessionId)?.messages) || []
const outgoingAttachments = composerAttachments.map(({ id, ...attachment }) => ({ ...attachment }))
const conversationNeedsVision = existingMessages.some(messageHasImageAttachments) || outgoingAttachments.some(attachmentIsImage)
if (conversationNeedsVision && !canAttachImages) {
const historyNeedsVision = existingMessages.some(messageHasImageAttachments)
if (historyNeedsVision && !canAttachImages) {
window.alert(imageAttachmentUnavailableReason)
return
}