feat: новая функция

This commit is contained in:
2025-11-01 17:25:49 +03:00
parent 772d4cff54
commit e28848146d
19 changed files with 1680 additions and 67 deletions

View File

@@ -21,6 +21,7 @@
:message="message"
:isPrivateChat="isPrivateChat"
:currentUserId="currentUserId"
@consent-granted="handleConsentGranted"
/>
</div>
</div>
@@ -113,6 +114,7 @@
</div>
</div>
</div>
</div>
</template>
@@ -148,6 +150,7 @@ const emit = defineEmits([
'send-message',
'load-more', // Событие для загрузки старых сообщений
'ai-reply',
'remove-consent-messages', // Событие для удаления системных сообщений о согласиях
]);
const messagesContainer = ref(null);
@@ -155,6 +158,11 @@ const messageInputRef = ref(null);
const chatInputRef = ref(null); // Ref для chat-input
const chatInputHeight = ref(80); // Начальная высота (можно подобрать точнее)
function handleConsentGranted(messageId) {
// После подписания удаляем системное сообщение о необходимости согласия
emit('remove-consent-messages', [messageId]);
}
// Локальное состояние для предпросмотра, синхронизированное с props.attachments
const localAttachments = ref([...props.attachments]);
watch(() => props.attachments, (newVal) => {