MCPcopy
hub / github.com/continuedev/continue / handleConfigUpdate

Method handleConfigUpdate

core/indexing/CodebaseIndexer.ts:840–871  ·  view source on GitHub ↗
({
    config: newConfig,
  }: ConfigResult<ContinueConfig>)

Source from the content-addressed store, hash-verified

838 }
839
840 private async handleConfigUpdate({
841 config: newConfig,
842 }: ConfigResult<ContinueConfig>) {
843 if (newConfig) {
844 const ideSettings = await this.ide.getIdeSettings();
845 const pauseCodebaseIndexOnStart = ideSettings.pauseCodebaseIndexOnStart;
846 if (pauseCodebaseIndexOnStart) {
847 this.paused = true;
848 }
849
850 const needsReindex = !this.isIndexingConfigSame(this.config, newConfig);
851
852 this.config = newConfig; // IMPORTANT - need to set up top, other methods below use this without passing it in
853
854 // No point in indexing if no codebase context provider
855 const hasIndexingProviders = this.hasIndexingContextProvider();
856 if (!hasIndexingProviders) {
857 return;
858 }
859
860 // Skip codebase indexing if not supported
861 // No warning message here because would show on ANY config update
862 if (!this.config.selectedModelByRole.embed) {
863 return;
864 }
865
866 if (needsReindex) {
867 const dirs = await this.ide.getWorkspaceDirs();
868 void this.refreshCodebaseIndex(dirs);
869 }
870 }
871 }
872}

Callers 1

initMethod · 0.95

Calls 5

isIndexingConfigSameMethod · 0.95
refreshCodebaseIndexMethod · 0.95
getIdeSettingsMethod · 0.65
getWorkspaceDirsMethod · 0.65

Tested by

no test coverage detected