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

Function addFolder

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

Source from the content-addressed store, hash-verified

457 return ensureFolderPath(view, path);
458 },
459 addFolder(path) {
460 const newPath = ensureFolderPath(view, path);
461 const current = useSheetContextStore.getState().viewStates[view].folders;
462 const set = new Set(current);
463 set.add(newPath);
464 const next = sortBy([...set]);
465 useSheetContextStore.getState().setViewFolders(view, next);
466 persistViewFolders(view, next);
467 return newPath;
468 },
469 removeFolder(path) {
470 const current = useSheetContextStore.getState().viewStates[view].folders;
471 const next = current.filter(

Callers

nothing calls this directly

Calls 3

ensureFolderPathFunction · 0.85
persistViewFoldersFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected