MCPcopy Create free account
hub / github.com/SethGammon/Citadel / projectSlug

Function projectSlug

scripts/test-cost-tracker.js:32–35  ·  view source on GitHub ↗

* Mirror the slug logic from runtimes/claude-code/adapters/session-tokens.js * so we write JSONL to the exact path the adapter will look for.

(projectDir)

Source from the content-addressed store, hash-verified

30 * so we write JSONL to the exact path the adapter will look for.
31 */
32function projectSlug(projectDir) {
33 const normalized = projectDir.replace(/\\/g, '/');
34 return normalized.replace(/^\//, '').replace(/:/g, '-').replace(/\//g, '-');
35}
36
37function makeSandbox() {
38 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-cost-'));

Callers 2

makeSandboxFunction · 0.85
writeSessionJSONLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected