@kervnet/opencode-kiro-auth 1.7.12 → 1.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -39,6 +39,12 @@ export class AuthHandler {
|
|
|
39
39
|
}
|
|
40
40
|
const { syncFromKiroCli } = await import('../../plugin/sync/kiro-cli.js');
|
|
41
41
|
await syncFromKiroCli();
|
|
42
|
+
// Reload accounts from database into memory
|
|
43
|
+
if (this.accountManager) {
|
|
44
|
+
this.repository.invalidateCache();
|
|
45
|
+
const freshAccounts = await this.repository.findAll();
|
|
46
|
+
this.accountManager.replaceAccounts(freshAccounts);
|
|
47
|
+
}
|
|
42
48
|
logger.log('Background token refresh completed');
|
|
43
49
|
}
|
|
44
50
|
catch (e) {
|
|
@@ -10,6 +10,7 @@ export declare class AccountManager {
|
|
|
10
10
|
static loadFromDisk(strategy?: AccountSelectionStrategy): Promise<AccountManager>;
|
|
11
11
|
getAccountCount(): number;
|
|
12
12
|
getAccounts(): ManagedAccount[];
|
|
13
|
+
replaceAccounts(newAccounts: ManagedAccount[]): void;
|
|
13
14
|
shouldShowToast(debounce?: number): boolean;
|
|
14
15
|
shouldShowUsageToast(debounce?: number): boolean;
|
|
15
16
|
getMinWaitTime(): number;
|
package/dist/plugin/accounts.js
CHANGED
|
@@ -50,6 +50,9 @@ export class AccountManager {
|
|
|
50
50
|
getAccounts() {
|
|
51
51
|
return [...this.accounts];
|
|
52
52
|
}
|
|
53
|
+
replaceAccounts(newAccounts) {
|
|
54
|
+
this.accounts = newAccounts;
|
|
55
|
+
}
|
|
53
56
|
shouldShowToast(debounce = 10000) {
|
|
54
57
|
if (Date.now() - this.lastToastTime < debounce)
|
|
55
58
|
return false;
|
package/package.json
CHANGED