From 1e62029b6c3aea9e74913c2f2078eb107f2bf7fb Mon Sep 17 00:00:00 2001 From: Paulhenry Saux Date: Fri, 14 Aug 2026 13:26:08 +0200 Subject: [PATCH] feat(plugin): add isActive property to AccountResponse in plugin API --- lib/plugin-sandbox/host-api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugin-sandbox/host-api.ts b/lib/plugin-sandbox/host-api.ts index 81d541be4..80c625ce6 100644 --- a/lib/plugin-sandbox/host-api.ts +++ b/lib/plugin-sandbox/host-api.ts @@ -228,11 +228,14 @@ interface AccountResponse { avatarColor: string; isConnected: boolean; isDefault: boolean; + isActive: boolean; } function doUserGetAccounts(): AccountResponse[] { const state = useAccountStore.getState(); + const activeAccountId = state.activeAccountId; // we remove sensitive fields from the account entries before returning to the plugin + // we add a new field isActive to indicate which account is currently active const accounts = state.accounts.map((account) => ({ id: account.id, label: account.label, @@ -243,6 +246,7 @@ function doUserGetAccounts(): AccountResponse[] { avatarColor: account.avatarColor, isConnected: account.isConnected, isDefault: account.isDefault, + isActive: account.id === activeAccountId, })); return accounts;