diff options
| author | Frank <[email protected]> | 2025-10-06 16:15:10 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-10-06 17:13:19 -0400 |
| commit | 9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8 (patch) | |
| tree | c9f936bfcaf7cf7f275334e869738c87989a2362 /packages/console/core/src/actor.ts | |
| parent | 1b17d8070bcddeddaea3dea403f031a161539901 (diff) | |
| download | opencode-9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8.tar.gz opencode-9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8.zip | |
wip: zen
Diffstat (limited to 'packages/console/core/src/actor.ts')
| -rw-r--r-- | packages/console/core/src/actor.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/console/core/src/actor.ts b/packages/console/core/src/actor.ts index 0d13f7216..ae11335f8 100644 --- a/packages/console/core/src/actor.ts +++ b/packages/console/core/src/actor.ts @@ -20,6 +20,7 @@ export namespace Actor { properties: { userID: string workspaceID: string + accountID: string } } @@ -71,4 +72,12 @@ export namespace Actor { } throw new Error(`actor of type "${actor.type}" is not associated with a workspace`) } + + export function account() { + const actor = use() + if ("accountID" in actor.properties) { + return actor.properties.accountID + } + throw new Error(`actor of type "${actor.type}" is not associated with an account`) + } } |
