feat: campos documentation, notes y code en registry

Añade campos documentation, notes y code a functions y types.
El parser extrae el contenido del .md y el código fuente del archivo
referenciado en file_path. El indexer los almacena en SQLite y los
incluye en FTS5 para búsqueda sobre código y documentación.
Nueva migración 003_documentation.sql para añadir las columnas.
This commit is contained in:
2026-03-28 20:32:15 +01:00
parent 476696dd10
commit 49eecd0c87
7 changed files with 290 additions and 68 deletions
+21
View File
@@ -289,6 +289,15 @@ func printFunction(f *registry.Function) {
if f.Example != "" {
fmt.Printf("\nExample:\n%s\n", f.Example)
}
if f.Notes != "" {
fmt.Printf("\nNotes:\n%s\n", f.Notes)
}
if f.Documentation != "" {
fmt.Printf("\nDocumentation:\n%s\n", f.Documentation)
}
if f.Code != "" {
fmt.Printf("\nCode:\n%s\n", f.Code)
}
if f.Kind == registry.KindComponent {
fmt.Printf("Framework: %s\n", f.Framework)
if f.HasState != nil {
@@ -316,6 +325,18 @@ func printType(t *registry.Type) {
if t.Definition != "" {
fmt.Printf("\nDefinition:\n%s\n", t.Definition)
}
if t.Examples != "" {
fmt.Printf("\nExamples:\n%s\n", t.Examples)
}
if t.Notes != "" {
fmt.Printf("\nNotes:\n%s\n", t.Notes)
}
if t.Documentation != "" {
fmt.Printf("\nDocumentation:\n%s\n", t.Documentation)
}
if t.Code != "" {
fmt.Printf("\nCode:\n%s\n", t.Code)
}
}
// --- add ---