MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / constructor

Method constructor

src/services/code-index/cache-manager.ts:22–33  ·  view source on GitHub ↗

* Creates a new cache manager * @param context VS Code extension context * @param workspacePath Path to the workspace

(
		private context: vscode.ExtensionContext,
		private workspacePath: string,
	)

Source from the content-addressed store, hash-verified

20 * @param workspacePath Path to the workspace
21 */
22 constructor(
23 private context: vscode.ExtensionContext,
24 private workspacePath: string,
25 ) {
26 this.cachePath = vscode.Uri.joinPath(
27 context.globalStorageUri,
28 `roo-index-cache-${createHash("sha256").update(workspacePath).digest("hex")}.json`,
29 )
30 this._debouncedSaveCache = debounce(async () => {
31 await this._performSave()
32 }, 1500)
33 }
34
35 /**
36 * Initializes the cache manager by loading the cache file

Callers

nothing calls this directly

Calls 3

_performSaveMethod · 0.95
joinPathMethod · 0.80
updateMethod · 0.65

Tested by

no test coverage detected