MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / runIncrementalIndex

Function runIncrementalIndex

tests/auto-refresh-e2e.test.ts:93–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 let incrementalRuns = 0;
92
93 const runIncrementalIndex = async (): Promise<void> => {
94 if (indexStatus === 'indexing') return;
95 indexStatus = 'indexing';
96
97 try {
98 await new CodebaseIndexer({
99 rootPath: tempDir,
100 config: { skipEmbedding: true },
101 incrementalOnly: true
102 }).index();
103 indexStatus = 'ready';
104 } catch (error) {
105 indexStatus = 'error';
106 throw error;
107 }
108
109 if (autoRefresh.consumeQueuedRefresh(indexStatus)) {
110 incrementalRuns++;
111 void runIncrementalIndex();
112 }
113 };
114
115 let resolveReady!: () => void;
116 const watcherReady = new Promise<void>((resolve) => {

Callers 1

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected