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

Function tryGetCurrentWorkspaceScope

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

Source from the content-addressed store, hash-verified

18}
19
20export function tryGetCurrentWorkspaceScope(): WorkspaceScope | null {
21 const context = persistence.database.getActiveContext()
22 if (!context.accountId || !context.workspacePath) {
23 return null
24 }
25 return {
26 accountId: context.accountId,
27 workspacePath: context.workspacePath
28 }
29}
30
31export function getCurrentWorkspaceScope(): WorkspaceScope {
32 const scope = tryGetCurrentWorkspaceScope()

Callers 7

pagesStore.tsFile · 0.90
persistFunction · 0.90
tabsStore.tsFile · 0.90
foldersStore.tsFile · 0.90
messagesStore.tsFile · 0.90
getCurrentWorkspaceScopeFunction · 0.85

Calls 1

getActiveContextMethod · 0.80

Tested by

no test coverage detected