feat: add bounded connection network diagnostics

This commit is contained in:
Agent Workbench Dev
2026-11-03 23:11:33 +08:00
parent dca6cbdb2c
commit 54dbe3d6fc
30 changed files with 683 additions and 40 deletions
+2 -1
View File
@@ -130,12 +130,13 @@ export class Provider {
}
async abortRequests() {
this.requestsClosing = true;
await this.hub?.networkChecks?.stopAll();
const operations = [...(this.requestControllers ?? [])];
for (const operation of operations) operation.controller.abort(new Error('用户停止执行宿主。'));
await Promise.all(operations.map(operation => operation.done));
const transport=this.transport;this.transport=null;await transport?.close();
}
resumeRequests() { this.requestsClosing = false; }
resumeRequests() { this.requestsClosing = false; if (this.hub?.networkChecks) this.hub.networkChecks.closing = false; }
modelHub(store) { return this.hub ??= new ModelHub(store, this); }
prepareConfig(config, store) { return this.modelHub(store).prepare(config); }
redact(value, key = this.apiKey) {