MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / loadSkillState

Function loadSkillState

src/skills/loader.ts:22–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22export async function loadSkillState(): Promise<SkillState> {
23 try {
24 const raw = await fs.readFile(stateFilePath(), 'utf-8');
25 const parsed = JSON.parse(raw);
26 return typeof parsed === 'object' && parsed !== null ? parsed : {};
27 } catch {
28 return {};
29 }
30}
31
32export async function saveSkillState(state: SkillState): Promise<void> {
33 await fs.mkdir(path.dirname(stateFilePath()), { recursive: true });

Callers 3

loadSkillsFunction · 0.85
listAllSkillsWithStateFunction · 0.85
setSkillEnabledFunction · 0.85

Calls 1

stateFilePathFunction · 0.85

Tested by

no test coverage detected