MCPcopy Create free account
hub / github.com/chieapp/chie / #refreshToken

Method #refreshToken

src/view/chat-view.ts:487–497  ·  view source on GitHub ↗
(action: 'refresh' | 'login')

Source from the content-addressed store, hash-verified

485 }
486
487 async #refreshToken(action: 'refresh' | 'login') {
488 try {
489 const record = apiManager.getAPIRecord(this.service.api.credential.type);
490 deepAssign(this.service.api.credential, await record[action]());
491 apiManager.updateCredential(this.service.api.credential);
492 this.service.regenerateLastResponse();
493 } catch (error) {
494 if (error.name != 'CancelledError')
495 alert(error.message);
496 }
497 }
498}
499
500// Return the button tooltip for button mode.

Callers

nothing calls this directly

Calls 4

deepAssignFunction · 0.90
alertFunction · 0.85
getAPIRecordMethod · 0.80
updateCredentialMethod · 0.80

Tested by

no test coverage detected