Mejorar la responsividad de los chats fix #202 fix #203 #215

Merged
roberto.silva merged 2 commits from issue/202-mejorar-la-responsividad-de-los-chats into main 2026-03-23 18:34:30 +00:00
2 changed files with 5 additions and 16 deletions
Showing only changes of commit a2234e5022 - Show all commits

View File

@@ -20,8 +20,6 @@ import { useState, useEffect, useRef, useMemo } from 'react'
import { ImprovementCard } from './SaveAsignatura/ImprovementCardProps'
import type { IASugerencia } from '@/types/asignatura'
import ReferenciasParaIA from '@/components/planes/wizard/PasoDetallesPanel/ReferenciasParaIA'
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
import { Button } from '@/components/ui/button'
@@ -55,16 +53,7 @@ interface SelectedField {
value: string
}
interface IAAsignaturaTabProps {
asignatura?: Record<string, any>
onAcceptSuggestion: (sugerencia: IASugerencia) => void
onRejectSuggestion: (messageId: string) => void
}
export function IAAsignaturaTab({
onAcceptSuggestion,
onRejectSuggestion,
}: IAAsignaturaTabProps) {
export function IAAsignaturaTab() {
const queryClient = useQueryClient()
const { asignaturaId } = useParams({
from: '/planes/$planId/asignaturas/$asignaturaId',
@@ -147,7 +136,7 @@ export function IAAsignaturaTab({
const dynamicFields = datosGenerales?.datos
? Object.keys(datosGenerales.datos).map((key) => {
const estructuraProps =
datosGenerales?.estructuras_asignatura?.definicion?.properties || {}
datosGenerales.estructuras_asignatura?.definicion?.properties || {}
return {
key,
label:

View File

@@ -210,7 +210,7 @@ function RouteComponent() {
return messages
})
}, [mensajesDelChat, activeChatId, availableFields])
const scrollToBottom = (behavior = 'smooth') => {
const scrollToBottom = (behavior: ScrollBehavior = 'smooth') => {
if (scrollRef.current) {
const scrollContainer = scrollRef.current.querySelector(
'[data-radix-scroll-area-viewport]',
@@ -218,7 +218,7 @@ function RouteComponent() {
if (scrollContainer) {
scrollContainer.scrollTo({
top: scrollContainer.scrollHeight,
behavior: behavior, // 'instant' para carga inicial, 'smooth' para mensajes nuevos
behavior,
})
}
}
@@ -576,7 +576,7 @@ function RouteComponent() {
onBlur={(e) => {
if (editingChatId === chat.id) {
const newTitle =
e.currentTarget.textContent?.trim() || ''
e.currentTarget.textContent.trim() || ''
if (newTitle && newTitle !== chat.nombre) {
updateTitleMutation({
id: chat.id,