MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / getWorkspaceRoot

Function getWorkspaceRoot

src/app/service/agent/core/opfs_helpers.ts:33–36  ·  view source on GitHub ↗
(create = false)

Source from the content-addressed store, hash-verified

31
32/** Get the workspace root directory handle */
33export async function getWorkspaceRoot(create = false): Promise<FileSystemDirectoryHandle> {
34 const opfsRoot = await navigator.storage.getDirectory();
35 return getDirectory(opfsRoot, WORKSPACE_ROOT, create);
36}
37
38/** Split a sanitized path into parent directory path and filename */
39export function splitPath(sanitized: string): { dirPath: string; fileName: string } {

Callers 5

handleOPFSApiMethod · 0.90
createOPFSToolsFunction · 0.90
getAttachmentMethod · 0.90
deleteAttachmentMethod · 0.90
writeWorkspaceFileFunction · 0.85

Calls 1

getDirectoryFunction · 0.85

Tested by

no test coverage detected