(text: string)
| 394 | } |
| 395 | |
| 396 | private stripWikiExploreTail(text: string): string { |
| 397 | if (!text) return text; |
| 398 | const marker = "Wiki pages you might want to explore:"; |
| 399 | const idx = text.indexOf(marker); |
| 400 | if (idx === -1) return text; |
| 401 | return text.slice(0, idx).trimEnd(); |
| 402 | } |
| 403 | |
| 404 | private async ensureConnected(): Promise<void> { |
| 405 | if (this.closed) throw new Error("DeepWiki MCP client is closed"); |