| 83 | ]; |
| 84 | |
| 85 | constructor( |
| 86 | private readonly configHandler: ConfigHandler, |
| 87 | protected readonly ide: IDE, |
| 88 | private readonly messenger?: IMessenger<ToCoreProtocol, FromCoreProtocol>, |
| 89 | initialPaused: boolean = false, |
| 90 | ) { |
| 91 | this.codebaseIndexingState = { |
| 92 | status: "loading", |
| 93 | desc: "loading", |
| 94 | progress: 0, |
| 95 | }; |
| 96 | |
| 97 | // Initialize pause token |
| 98 | this.pauseToken = new PauseToken(initialPaused); |
| 99 | |
| 100 | this.initPromise = this.init(configHandler); |
| 101 | |
| 102 | this.indexingCancellationController = new AbortController(); |
| 103 | this.indexingCancellationController.abort(); // initialize and abort so that a new one can be created |
| 104 | } |
| 105 | |
| 106 | // Initialization - load config and attach config listener |
| 107 | private async init(configHandler: ConfigHandler) { |