Commit 96d0d16
committed
feat(core): extend SearchResult type with snippet and imports
Implements #69 - Richer Search Results (sub-issue 3/5)
Changes:
- Add SearchResultMetadata interface with typed fields for:
- path, type, language, name, startLine, endLine
- exported, signature, docstring
- snippet (new from #67)
- imports (new from #68)
- Update SearchResult to use SearchResultMetadata
- Update prepareDocumentsForEmbedding to include snippet/imports
- Use SearchResultMetadata in LanceDBVectorStore.search()
Features:
- Typed metadata fields provide IDE autocomplete
- Backward compatible with existing code (fields optional)
- Extensible via index signature for custom fields
Testing:
- All 1265 tests passing
- TypeScript compiles without errors
Closes #691 parent b369a72 commit 96d0d16
File tree
3 files changed
+39
-3
lines changed- packages/core/src
- indexer/utils
- vector
3 files changed
+39
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
122 | | - | |
| 128 | + | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
14 | 40 | | |
15 | 41 | | |
16 | 42 | | |
17 | 43 | | |
18 | 44 | | |
19 | 45 | | |
20 | | - | |
| 46 | + | |
21 | 47 | | |
22 | 48 | | |
23 | 49 | | |
| |||
0 commit comments