feat: Implement main application shell with navigation and color scheme toggle
- Added Appshell component with responsive navbar and main content area - Integrated ColorSchemeToggle for light/dark mode switching - Created Welcome component with styled title and introductory text - Developed ChatPage for LLM interaction with WebSocket support - Implemented Biblioteca for managing notes with rich text editor - Added LoginPage for user authentication with error handling - Introduced MessageList and MessageBubble components for chat messages - Styled components with CSS modules for consistent design
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
from domains.Security.GenerarIDs import GeneradorIDUnico
|
||||
from typing import List
|
||||
|
||||
class Nota:
|
||||
def __init__(
|
||||
self,
|
||||
titulo: str,
|
||||
tags: List[str] = None,
|
||||
conexiones: List[str] = None,
|
||||
texto: str = "",
|
||||
vector: List[float] = None,
|
||||
resumen: str = "",
|
||||
vector_resumen: List[float] = None,
|
||||
id: str = None
|
||||
):
|
||||
"""
|
||||
Clase que representa una nota de texto con estructura semántica.
|
||||
|
||||
:param titulo: Título de la nota.
|
||||
:param tags: Lista de etiquetas asociadas.
|
||||
:param conexiones: Lista de identificadores relacionados.
|
||||
:param vector: Embedding vectorial de la nota.
|
||||
:param resumen: Texto resumen de la nota.
|
||||
:param vector_resumen: Embedding del resumen.
|
||||
:param id: Identificador único (si no se proporciona, se genera automáticamente).
|
||||
"""
|
||||
self.id = id if id is not None else GeneradorIDUnico("NOTA").generar()
|
||||
self.titulo = titulo
|
||||
self.tags = tags if tags is not None else []
|
||||
self.conexiones = conexiones if conexiones is not None else []
|
||||
self.texto = texto
|
||||
self.vector = vector
|
||||
self.resumen = resumen
|
||||
self.vector_resumen = vector_resumen
|
||||
|
||||
def __repr__(self):
|
||||
return (
|
||||
f"<Nota id={self.id}, titulo='{self.titulo}', tags={len(self.tags)}, "
|
||||
f"conexiones={len(self.conexiones)}, vector_dim={len(self.vector)}, "
|
||||
f"resumen_len={len(self.resumen)}, vector_resumen_dim={len(self.vector_resumen)}>"
|
||||
)
|
||||
Reference in New Issue
Block a user