MCPcopy
hub / github.com/Fission-AI/OpenSpec / removeWorkset

Function removeWorkset

src/core/worksets.ts:345–357  ·  view source on GitHub ↗
(
  name: string,
  options: WorksetPathOptions = {}
)

Source from the content-addressed store, hash-verified

343 * never-opened workset has no file - ENOENT is fine.
344 */
345export async function removeWorkset(
346 name: string,
347 options: WorksetPathOptions = {}
348): Promise<void> {
349 await withWorksetsLock(async (state) => {
350 const next = withoutWorkset(state, name);
351 await writeFileAtomically(
352 getWorksetsFilePath(options),
353 serializeWorksetsState(next, options)
354 );
355 await fs.rm(getWorksetCodeWorkspacePath(name, options), { force: true });
356 }, options);
357}
358
359function toWorkset(
360 name: string,

Callers 1

removeMethod · 0.85

Calls 6

withWorksetsLockFunction · 0.85
withoutWorksetFunction · 0.85
writeFileAtomicallyFunction · 0.85
getWorksetsFilePathFunction · 0.85
serializeWorksetsStateFunction · 0.85

Tested by

no test coverage detected