|
@@ -340,12 +340,8 @@ export const useChat = ({ chatType }: UseChatProps) => {
|
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES && metadata.suggestions) {
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES && metadata.suggestions) {
|
|
|
setCurrentSuggestions(metadata.suggestions);
|
|
setCurrentSuggestions(metadata.suggestions);
|
|
|
setShowDynamicSuggestions(true);
|
|
setShowDynamicSuggestions(true);
|
|
|
- setInputDisabledForSuggestions(true);
|
|
|
|
|
-
|
|
|
|
|
- // Habilitar el input después de 3 segundos para dar tiempo a leer las sugerencias
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- setInputDisabledForSuggestions(false);
|
|
|
|
|
- }, 3000);
|
|
|
|
|
|
|
+ // Input siempre habilitado - sin cooldown
|
|
|
|
|
+ setInputDisabledForSuggestions(false);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
console.log("❌ [CHAT] Error en respuesta de API - Status:", response.status);
|
|
console.log("❌ [CHAT] Error en respuesta de API - Status:", response.status);
|
|
@@ -383,12 +379,8 @@ export const useChat = ({ chatType }: UseChatProps) => {
|
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES) {
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES) {
|
|
|
setCurrentSuggestions(fallbackMessage.suggestions || []);
|
|
setCurrentSuggestions(fallbackMessage.suggestions || []);
|
|
|
setShowDynamicSuggestions(true);
|
|
setShowDynamicSuggestions(true);
|
|
|
- setInputDisabledForSuggestions(true);
|
|
|
|
|
-
|
|
|
|
|
- // Habilitar el input después de 3 segundos
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- setInputDisabledForSuggestions(false);
|
|
|
|
|
- }, 3000);
|
|
|
|
|
|
|
+ // Input siempre habilitado - sin cooldown
|
|
|
|
|
+ setInputDisabledForSuggestions(false);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -467,12 +459,8 @@ export const useChat = ({ chatType }: UseChatProps) => {
|
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES) {
|
|
if (!isPsychological && messageCount + 1 < MAX_MESSAGES) {
|
|
|
setCurrentSuggestions(fallbackMessage.suggestions || []);
|
|
setCurrentSuggestions(fallbackMessage.suggestions || []);
|
|
|
setShowDynamicSuggestions(true);
|
|
setShowDynamicSuggestions(true);
|
|
|
- setInputDisabledForSuggestions(true);
|
|
|
|
|
-
|
|
|
|
|
- // Habilitar el input después de 3 segundos
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- setInputDisabledForSuggestions(false);
|
|
|
|
|
- }, 3000);
|
|
|
|
|
|
|
+ // Input siempre habilitado - sin cooldown
|
|
|
|
|
+ setInputDisabledForSuggestions(false);
|
|
|
}
|
|
}
|
|
|
} finally {
|
|
} finally {
|
|
|
const totalTime = Date.now() - startTime;
|
|
const totalTime = Date.now() - startTime;
|