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

Function worksetNotFoundError

src/core/worksets.ts:279–297  ·  view source on GitHub ↗
(
  name: string,
  state: WorksetsState
)

Source from the content-addressed store, hash-verified

277}
278
279export function worksetNotFoundError(
280 name: string,
281 state: WorksetsState
282): StoreError {
283 const savedNames = Object.keys(state.worksets).sort((a, b) =>
284 a.localeCompare(b)
285 );
286 return new StoreError(
287 `Workset '${name}' is not saved on this machine.`,
288 'workset_not_found',
289 {
290 target: 'workset.name',
291 fix:
292 savedNames.length > 0
293 ? `Saved worksets: ${savedNames.join(', ')}. See them with: openspec workset list`
294 : `Create it first: openspec workset create ${name}`,
295 }
296 );
297}
298
299export function withWorkset(
300 state: WorksetsState,

Callers 3

openMethod · 0.85
removeMethod · 0.85
withoutWorksetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected