({ force = false } = {})
| 8530 | } |
| 8531 | |
| 8532 | const accessSession = this.getQuickAskAccessSession(session, quickAskModel); |
| 8533 | const bannedAccess = this.getBannedAccessWarning(accessSession); |
| 8534 | if (bannedAccess) { |
| 8535 | this.showBannedStationWarningModal({ |
| 8536 | ...bannedAccess, |
| 8537 | sessionId: session.id |
| 8538 | }); |
| 8539 | throw new Error('The current station is banned.'); |
| 8540 | } |
| 8541 | |
| 8542 | const hasAccessToken = !!this.inferenceService.getAccessToken(accessSession); |
| 8543 | const isAccessExpired = this.inferenceService.isAccessExpired(accessSession); |
| 8544 | if (!hasAccessToken || isAccessExpired) { |
| 8545 | options.onStatus?.('requesting-key'); |
| 8546 | try { |
| 8547 | if (this.floatingPanel) { |
| 8548 | this.floatingPanel.showMessage(`Acquiring ${accessLabel}...`, 'info'); |
| 8549 | } |
| 8550 | await this.acquireAndSetAccess(session, { |
| 8551 | modelIdOverride: quickAskModel.modelId, |
| 8552 | modelNameOverride: quickAskModel.modelName, |
| 8553 | signal: abortController.signal, |
no outgoing calls
no test coverage detected