Rename variable for clarity in image attachment check
This commit is contained in:
@@ -2402,8 +2402,8 @@ async function sendMessage() {
|
|||||||
|
|
||||||
const existingMessages = (chatSessions.find(s => s.session_id === targetSessionId)?.messages) || []
|
const existingMessages = (chatSessions.find(s => s.session_id === targetSessionId)?.messages) || []
|
||||||
const outgoingAttachments = composerAttachments.map(({ id, ...attachment }) => ({ ...attachment }))
|
const outgoingAttachments = composerAttachments.map(({ id, ...attachment }) => ({ ...attachment }))
|
||||||
const conversationNeedsVision = existingMessages.some(messageHasImageAttachments) || outgoingAttachments.some(attachmentIsImage)
|
const historyNeedsVision = existingMessages.some(messageHasImageAttachments)
|
||||||
if (conversationNeedsVision && !canAttachImages) {
|
if (historyNeedsVision && !canAttachImages) {
|
||||||
window.alert(imageAttachmentUnavailableReason)
|
window.alert(imageAttachmentUnavailableReason)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user