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

Method keyView

apps/sim/lib/copilot/vfs/workspace-vfs.ts:495–506  ·  view source on GitHub ↗

* A keys-only view (eager values plus empty placeholders for unresolved lazy * paths) for glob/suggestSimilar, which match on keys and never read content.

(includeDeleted: boolean)

Source from the content-addressed store, hash-verified

493 * paths) for glob/suggestSimilar, which match on keys and never read content.
494 */
495 private keyView(includeDeleted: boolean): Map<string, string> {
496 const view = new Map<string, string>()
497 for (const [key, value] of this.files) {
498 if (includeDeleted || !this.isRecentlyDeleted(key)) view.set(key, value)
499 }
500 for (const key of this.lazy.keys()) {
501 if ((includeDeleted || !this.isRecentlyDeleted(key)) && !view.has(key)) {
502 view.set(key, '')
503 }
504 }
505 return view
506 }
507
508 /**
509 * Materialize workspace data into the VFS.

Callers 2

globMethod · 0.95
suggestSimilarMethod · 0.95

Calls 2

isRecentlyDeletedMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected