MCPcopy Create free account
hub / github.com/experdot/pointer / tryGetCurrentAccountScope

Function tryGetCurrentAccountScope

src/renderer/src/persistence/scope.ts:4–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { persistence } from './registry'
3
4export function tryGetCurrentAccountScope(): AccountScope | null {
5 const accountId = persistence.database.getActiveContext().accountId
6 if (!accountId) {
7 return null
8 }
9 return { accountId }
10}
11
12export function getCurrentAccountScope(): AccountScope {
13 const scope = tryGetCurrentAccountScope()

Callers 1

getCurrentAccountScopeFunction · 0.85

Calls 1

getActiveContextMethod · 0.80

Tested by

no test coverage detected