MCPcopy Create free account
hub / github.com/bytebase/bytebase / currentScope

Function currentScope

frontend/src/views/sql-editor/Sheet/context.ts:265–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263};
264
265const currentScope = (): {
266 wsScope: string;
267 project: string;
268 email: string;
269} | null => {
270 const project = getSQLEditorEditorState().project;
271 if (!project) return null;
272 try {
273 const state = useAppStore.getState();
274 const email = state.currentUser?.email ?? "";
275 const wsScope = workspaceCacheScope(
276 state.isSaaSMode(),
277 state.currentUser?.workspace ?? ""
278 );
279 return { wsScope, project, email };
280 } catch {
281 return null;
282 }
283};
284
285const isWorksheetFilter = (v: unknown): v is WorksheetFilter =>
286 typeof v === "object" &&

Callers 4

reloadFromStorageFunction · 0.70
persistFilterFunction · 0.70
persistExpandedKeysFunction · 0.70
persistViewFoldersFunction · 0.70

Calls 2

getSQLEditorEditorStateFunction · 0.90
workspaceCacheScopeFunction · 0.90

Tested by

no test coverage detected