Skip to content

Commit 049269f

Browse files
committed
fix(format): apply prettier formatting to all source files
1 parent 39f777e commit 049269f

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

src/core/indexer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ export class CodebaseIndexer {
376376

377377
if ((i + batchSize) % 100 === 0 || i + batchSize >= chunksToEmbed.length) {
378378
console.error(
379-
`Embedded ${Math.min(i + batchSize, chunksToEmbed.length)}/${chunksToEmbed.length
379+
`Embedded ${Math.min(i + batchSize, chunksToEmbed.length)}/${
380+
chunksToEmbed.length
380381
} chunks`
381382
);
382383
}

src/core/search.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ export class CodebaseSearcher {
331331
const name = componentName || (classMatch ? classMatch[1] : null);
332332

333333
if (name && componentType) {
334-
return `${componentType.charAt(0).toUpperCase() + componentType.slice(1)
335-
} '${name}' in ${fileName}.`;
334+
return `${
335+
componentType.charAt(0).toUpperCase() + componentType.slice(1)
336+
} '${name}' in ${fileName}.`;
336337
} else if (name) {
337338
return `'${name}' defined in ${fileName}.`;
338339
} else if (componentType) {

src/errors/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ export class IndexCorruptedError extends Error {
88
this.name = 'IndexCorruptedError';
99
}
1010
}
11-

src/index.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ const indexState: IndexState = {
6363
status: 'idle'
6464
};
6565

66-
6766
const server: Server = new Server(
6867
{
6968
name: 'codebase-context',
@@ -594,19 +593,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
594593
lastIndexed: indexState.lastIndexed?.toISOString(),
595594
stats: indexState.stats
596595
? {
597-
totalFiles: indexState.stats.totalFiles,
598-
indexedFiles: indexState.stats.indexedFiles,
599-
totalChunks: indexState.stats.totalChunks,
600-
duration: `${(indexState.stats.duration / 1000).toFixed(2)}s`
601-
}
596+
totalFiles: indexState.stats.totalFiles,
597+
indexedFiles: indexState.stats.indexedFiles,
598+
totalChunks: indexState.stats.totalChunks,
599+
duration: `${(indexState.stats.duration / 1000).toFixed(2)}s`
600+
}
602601
: undefined,
603602
progress: progress
604603
? {
605-
phase: progress.phase,
606-
percentage: progress.percentage,
607-
filesProcessed: progress.filesProcessed,
608-
totalFiles: progress.totalFiles
609-
}
604+
phase: progress.phase,
605+
percentage: progress.percentage,
606+
filesProcessed: progress.filesProcessed,
607+
totalFiles: progress.totalFiles
608+
}
610609
: undefined,
611610
error: indexState.error,
612611
hint: 'Use refresh_index to manually trigger re-indexing when needed.'

src/storage/lancedb.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ export class LanceDBStorageProvider implements VectorStorageProvider {
189189
console.error('Failed to search:', error);
190190
// For other errors, we throw IndexCorruptedError to be safe and trigger auto-heal
191191
// if it looks like a database issue
192-
if (error instanceof Error && (error.message.includes('LanceDB') || error.message.includes('Arrow'))) {
192+
if (
193+
error instanceof Error &&
194+
(error.message.includes('LanceDB') || error.message.includes('Arrow'))
195+
) {
193196
throw new IndexCorruptedError(`LanceDB runtime error: ${error.message}`);
194197
}
195198
return [];

0 commit comments

Comments
 (0)