MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / getMemoryDbPath

Function getMemoryDbPath

packages/baseai/src/utils/memory/db/lib.ts:244–260  ·  view source on GitHub ↗
(memoryName: string)

Source from the content-addressed store, hash-verified

242
243// Get the path of the db file for a memory
244export function getMemoryDbPath(memoryName: string): string {
245 // Process.cwd() returns the current working directory of the Node.js process.
246 // This is the directory from which the script is run. It is always the root of the project.
247
248 // Path is cwd()/.baseai/db/{memoryName}.json
249 const projectRootPath = process.cwd();
250
251 // Db file path
252 const memoryDBPath = path.join(
253 projectRootPath,
254 '.baseai',
255 'db',
256 `${memoryName}.json`
257 );
258
259 return memoryDBPath;
260}

Callers 1

loadDbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected