MCPcopy Index your code
hub / github.com/continuedev/continue / handleConfigUpdate

Method handleConfigUpdate

core/indexing/docs/DocsService.ts:366–387  ·  view source on GitHub ↗
({
    config: newConfig,
  }: ConfigResult<ContinueConfig>)

Source from the content-addressed store, hash-verified

364 }
365
366 private async handleConfigUpdate({
367 config: newConfig,
368 }: ConfigResult<ContinueConfig>) {
369 if (newConfig) {
370 const oldConfig = this.config;
371 this.config = newConfig; // IMPORTANT - need to set up top, other methods below use this without passing it in
372
373 // No point in indexing if no docs context provider
374 const hasDocsContextProvider = this.hasDocsContextProvider();
375 if (!hasDocsContextProvider) {
376 return;
377 }
378
379 // Skip docs indexing if not supported
380 // No warning message here because would show on ANY config update
381 if (!this.config.selectedModelByRole.embed) {
382 return;
383 }
384
385 await this.syncDocs(oldConfig, newConfig, false);
386 }
387 }
388
389 async syncDocsWithPrompt(reIndex: boolean = false) {
390 await this.syncDocs(undefined, this.config, reIndex);

Callers 2

initMethod · 0.95

Calls 2

syncDocsMethod · 0.95

Tested by 1