Skip to content

Commit e8acbfe

Browse files
authored
test(map): track symbol-aware fixture index (#101)
* test(map): track symbol-aware fixture index * test(map): align fixture metadata
1 parent 2d08c89 commit e8acbfe

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dist/
66
.codebase-context/*
77
**/.codebase-context/*
88
!/.codebase-context/memory.json
9+
!tests/fixtures/map-fixture/.codebase-context/index.json
910
.codebase/
1011
*.log
1112
.DS_Store
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"header": { "buildId": "map-fixture-v1", "formatVersion": 4 },
3+
"chunks": [
4+
{
5+
"id": "c1",
6+
"content": "export interface SearchOptions {\n query: string;\n limit?: number;\n}",
7+
"filePath": "/fixture/src/core/search.ts",
8+
"relativePath": "src/core/search.ts",
9+
"startLine": 1,
10+
"endLine": 4,
11+
"language": "typescript",
12+
"dependencies": [],
13+
"imports": [],
14+
"exports": ["SearchOptions"],
15+
"tags": [],
16+
"metadata": {
17+
"symbolAware": true,
18+
"symbolName": "SearchOptions",
19+
"symbolKind": "interface"
20+
}
21+
},
22+
{
23+
"id": "c2",
24+
"content": "export class CodebaseSearcher {\n private rootPath: string;\n constructor(rootPath: string) {\n this.rootPath = rootPath;\n }\n}",
25+
"filePath": "/fixture/src/core/search.ts",
26+
"relativePath": "src/core/search.ts",
27+
"startLine": 10,
28+
"endLine": 15,
29+
"language": "typescript",
30+
"dependencies": [],
31+
"imports": [],
32+
"exports": ["CodebaseSearcher"],
33+
"tags": [],
34+
"metadata": {
35+
"symbolAware": true,
36+
"symbolName": "CodebaseSearcher",
37+
"symbolKind": "class"
38+
}
39+
},
40+
{
41+
"id": "c3",
42+
"content": "export type SearchResult = { chunk: CodeChunk; score: number; };",
43+
"filePath": "/fixture/src/types.ts",
44+
"relativePath": "src/types.ts",
45+
"startLine": 5,
46+
"endLine": 5,
47+
"language": "typescript",
48+
"dependencies": [],
49+
"imports": [],
50+
"exports": ["SearchResult"],
51+
"tags": [],
52+
"metadata": {
53+
"symbolAware": true,
54+
"symbolName": "SearchResult",
55+
"symbolKind": "type"
56+
}
57+
},
58+
{
59+
"id": "c4",
60+
"content": "function helperUtil() {\n return 42;\n}",
61+
"filePath": "/fixture/src/utils/helpers.ts",
62+
"relativePath": "src/utils/helpers.ts",
63+
"startLine": 1,
64+
"endLine": 3,
65+
"language": "typescript",
66+
"dependencies": [],
67+
"imports": [],
68+
"exports": [],
69+
"tags": [],
70+
"metadata": {
71+
"symbolAware": false,
72+
"symbolKind": "function"
73+
}
74+
}
75+
]
76+
}

0 commit comments

Comments
 (0)