| 666 | } |
| 667 | |
| 668 | private async initOnce(): Promise<void> { |
| 669 | if (this.resourcesClosed) { |
| 670 | this.mcp = new DeepWikiMcp(); |
| 671 | this.httpAgent = new http.Agent({ keepAlive: true }); |
| 672 | this.httpsAgent = new https.Agent({ keepAlive: true }); |
| 673 | this.httpClient = axios.create({ |
| 674 | httpAgent: this.httpAgent, |
| 675 | httpsAgent: this.httpsAgent, |
| 676 | }); |
| 677 | this.resourcesClosed = false; |
| 678 | } |
| 679 | if (this.inited) return; |
| 680 | await this.store.init(); |
| 681 | this.inited = true; |
| 682 | } |
| 683 | |
| 684 | private getMainPrefix(): string { |
| 685 | const prefixes = getPrefixes(); |