MCPcopy Index your code
hub / github.com/codeaashu/claude-code / saveFacets

Function saveFacets

src/commands/insights.ts:963–974  ·  view source on GitHub ↗
(facets: SessionFacets)

Source from the content-addressed store, hash-verified

961}
962
963async function saveFacets(facets: SessionFacets): Promise<void> {
964 try {
965 await mkdir(getFacetsDir(), { recursive: true })
966 } catch {
967 // Directory may already exist
968 }
969 const facetPath = join(getFacetsDir(), `${facets.session_id}.json`)
970 await writeFile(facetPath, jsonStringify(facets, null, 2), {
971 encoding: 'utf-8',
972 mode: 0o600,
973 })
974}
975
976async function loadCachedSessionMeta(
977 sessionId: string,

Callers 1

generateUsageReportFunction · 0.85

Calls 3

mkdirFunction · 0.85
getFacetsDirFunction · 0.85
jsonStringifyFunction · 0.85

Tested by

no test coverage detected