MCPcopy Index your code
hub / github.com/simstudioai/sim / isWorkspaceFileGrepPath

Function isWorkspaceFileGrepPath

apps/sim/lib/copilot/tools/handlers/vfs.ts:32–35  ·  view source on GitHub ↗

* True when a grep `path` targets the workspace files tree (`files/` or * `recently-deleted/files/`). Such greps search a single file's content via * WorkspaceVFS.grepFile; every other path searches the VFS map.

(path: string | undefined)

Source from the content-addressed store, hash-verified

30 * {@link WorkspaceVFS.grepFile}; every other path searches the VFS map.
31 */
32function isWorkspaceFileGrepPath(path: string | undefined): path is string {
33 if (!path) return false
34 return /^(recently-deleted\/)?files(\/|$)/.test(path.replace(/^\/+/, ''))
35}
36
37/** True when a grep `path` targets the chat-scoped uploads namespace. */
38function isChatUploadGrepPath(path: string | undefined): path is string {

Callers 1

executeVfsGrepFunction · 0.85

Calls 2

testMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected