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:
@@ -79,7 +79,7 @@ imports: [react]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "functions/components/DataTable.tsx"
|
||||
file_path: "frontend/functions/ui/data_table.tsx"
|
||||
props:
|
||||
- name: data
|
||||
type: "T[]"
|
||||
@@ -105,7 +105,7 @@ func writeTempFile(t *testing.T, dir, name, content string) string {
|
||||
func TestParseFunctionMD(t *testing.T) {
|
||||
path := writeTempFile(t, t.TempDir(), "filter_slice.md", functionMD)
|
||||
|
||||
f, err := ParseFunctionMD(path)
|
||||
f, err := ParseFunctionMD(path, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -130,7 +130,7 @@ func TestParseFunctionMD(t *testing.T) {
|
||||
func TestParseTypeMD(t *testing.T) {
|
||||
path := writeTempFile(t, t.TempDir(), "ohlcv.md", typeMD)
|
||||
|
||||
typ, err := ParseTypeMD(path)
|
||||
typ, err := ParseTypeMD(path, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func TestParseTypeMD(t *testing.T) {
|
||||
func TestParseComponentMD(t *testing.T) {
|
||||
path := writeTempFile(t, t.TempDir(), "DataTable.md", componentMD)
|
||||
|
||||
f, err := ParseFunctionMD(path)
|
||||
f, err := ParseFunctionMD(path, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -174,7 +174,7 @@ func TestParseComponentMD(t *testing.T) {
|
||||
func TestParseMissingFrontmatter(t *testing.T) {
|
||||
path := writeTempFile(t, t.TempDir(), "bad.md", "# No frontmatter here\n")
|
||||
|
||||
_, err := ParseFunctionMD(path)
|
||||
_, err := ParseFunctionMD(path, "")
|
||||
if err == nil {
|
||||
t.Error("expected error for missing frontmatter")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user