(clearPersistentSession: boolean)
| 356 | } |
| 357 | |
| 358 | private async resetConnection(clearPersistentSession: boolean): Promise<void> { |
| 359 | if (this.transport) { |
| 360 | await closeTransportQuietly(this.transport); |
| 361 | this.transport = undefined; |
| 362 | } |
| 363 | |
| 364 | if (!clearPersistentSession) { |
| 365 | return; |
| 366 | } |
| 367 | |
| 368 | this.cachedSessionId = undefined; |
| 369 | this.cachedTools = undefined; |
| 370 | this.discoveredTools = undefined; |
| 371 | await this.cacheStore.clear(this.endpoint.toString()); |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | function readToolText(result: ToolCallResult, context: string): string { |
no test coverage detected