 Bacon = require 'baconjs'
 {Task} = require 'atom'
 Path = require 'path'
-atoms = require './streams.coffee'
+{projectsPaths} = require './streams.coffee'
 columns = require './columns.coffee'
 
 # @param {Stream} watchedProjectsStream objects containing a path {String} and a task {Task}

      task: task
    }

  # Only used to manage
  projectsProp = projects(watchedProjectsStream, removedStream)
  deactivateBus = new Bacon.Bus()
  projectsProp.sampledBy(deactivateBus).onValue (projects) ->
    task.send('dispose') for {task} in projects
    return Bacon.noMore

  addItemsStream = watchedProjectsStream.flatMap ({task}) ->
    Bacon.fromEvent(task, 'add')

      projects.filter ({path}) ->
        path isnt removedPath

watchedProjects = (addedStream) ->
  addedStream.map (path) ->
    task = new Task(require.resolve('./watch-project-task.coffee'))
    task.start(path,
      atom.config.get('core.ignoredNames'),
      atom.config.get('core.excludeVcsIgnoredPaths')
    )
