| 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); |