fix(ai-chat): harden prompt security against injections, fix login methods detection & align desktop input dock (v3.8.43)
This commit is contained in:
@@ -330,7 +330,10 @@
|
||||
const typing = document.getElementById('aiChatTyping');
|
||||
const sendBtn = document.getElementById('aiChatSendBtn');
|
||||
|
||||
if (textarea) textarea.value = '';
|
||||
if (textarea) {
|
||||
textarea.value = '';
|
||||
textarea.style.height = '24px';
|
||||
}
|
||||
|
||||
appendMessage('user', queryText, [], true);
|
||||
|
||||
@@ -510,8 +513,15 @@
|
||||
appendMessage('assistant', getWelcomeMessage(role, name), getDefaultOptions(role), false);
|
||||
}
|
||||
|
||||
// Atajo Enter en desktop
|
||||
// Ajuste dinámico de altura y atajo Enter
|
||||
if (textarea) {
|
||||
textarea.addEventListener('input', () => {
|
||||
textarea.style.height = '24px';
|
||||
const newHeight = Math.min(textarea.scrollHeight, 80);
|
||||
if (newHeight > 24) {
|
||||
textarea.style.height = `${newHeight}px`;
|
||||
}
|
||||
});
|
||||
textarea.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user