({
config: newConfig,
}: ConfigResult<ContinueConfig>)
| 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 | } |
no test coverage detected