Skip to content

Commit 9dfa496

Browse files
authored
fix: make code index initialization non-blocking at activation (#8933)
1 parent f9d6fe7 commit 9dfa496

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/extension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ export async function activate(context: vscode.ExtensionContext) {
110110
if (manager) {
111111
codeIndexManagers.push(manager)
112112

113-
try {
114-
await manager.initialize(contextProxy)
115-
} catch (error) {
113+
// Initialize in background; do not block extension activation
114+
void manager.initialize(contextProxy).catch((error) => {
115+
const message = error instanceof Error ? error.message : String(error)
116116
outputChannel.appendLine(
117-
`[CodeIndexManager] Error during background CodeIndexManager configuration/indexing for ${folder.uri.fsPath}: ${error.message || error}`,
117+
`[CodeIndexManager] Error during background CodeIndexManager configuration/indexing for ${folder.uri.fsPath}: ${message}`,
118118
)
119-
}
119+
})
120120

121121
context.subscriptions.push(manager)
122122
}

0 commit comments

Comments
 (0)