MCPcopy Create free account
hub / github.com/afar1/fieldtheory-cli / removeUserFrame

Function removeUserFrame

src/frames-registry.ts:151–161  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

149}
150
151export function removeUserFrame(id: string): boolean {
152 if (DEFAULT_FRAMES_BY_ID[id]) {
153 throw new Error(`Cannot remove built-in frame "${id}".`);
154 }
155 const frames = loadUserFrames();
156 const before = frames.length;
157 const next = frames.filter((f) => f.id !== id);
158 if (next.length === before) return false;
159 saveUserFrames(next);
160 return true;
161}
162
163/**
164 * Read a Frame from a JSON file on disk and add it to the user registry.

Callers 1

buildCliFunction · 0.85

Calls 2

loadUserFramesFunction · 0.85
saveUserFramesFunction · 0.85

Tested by

no test coverage detected