MCPcopy
hub / github.com/npmx-dev/npmx.dev / removeOperation

Method removeOperation

cli/src/mock-state.ts:214–222  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

212 }
213
214 removeOperation(id: string): boolean {
215 const index = this.state.operations.findIndex(op => op.id === id)
216 if (index === -1) return false
217 const op = this.state.operations[index]
218 // Can't remove running operations
219 if (op?.status === 'running') return false
220 this.state.operations.splice(index, 1)
221 return true
222 }
223
224 clearOperations(): number {
225 const removable = this.state.operations.filter(op => op.status !== 'running')

Callers 1

createMockConnectorAppFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected