TaskDeck:Task View

From MutigerAffe Wiki
Jump to navigation Jump to search

Task Deck adds its own container to the Activity Bar. It holds one view, Tasks, with all tasks VS Code knows about.

The Tasks view with two sources and one task each

What is listed

The view asks VS Code for all available tasks. These are the tasks from .vscode/tasks.json and the tasks of every installed task provider, for example npm scripts or Gulp and Grunt tasks.

Each task belongs to a source. The source is the name VS Code gives the task provider, for example Workspace for tasks.json or npm. Tasks without a source are listed under Unknown.

Layout

  • Every source is a group that you can expand and collapse. Groups start expanded.
  • The groups are sorted alphabetically by source name.
  • The number next to a source is the number of tasks of that source. Tasks hidden by a name filter are included in this number.
  • Tasks are listed in the order VS Code returns them.
  • If you pinned tasks, the Pinned group comes first. See Pinned Tasks.
  • If there is only one visible source and nothing is pinned, the tasks are shown directly, without a source group above them.

Running a task

Click a task to run it. Task Deck starts the task through VS Code, just like Terminal → Run Task.

The row of a task shows:

  • the task name
  • the task's detail text next to the name, if the task has one
  • the detail text or the name as tooltip

The task icon is tinted in the color of its source. See Sources.

Run state

Icon Text next to the name Meaning
play icon detail text Ready to run
spinning icon running… The task is running
warning triangle exit 1 (the exit code) The last run ended with an exit code other than 0
spinning icon loading… The entry comes from the stored list and is not confirmed yet (see below)

The warning stays until the task runs again and ends with exit code 0. The exit code is only known for tasks that start a process, for example shell and process tasks. The run state is not saved and is gone after a restart of VS Code.

Loading and refreshing

Collecting all tasks can take a while, for example when task providers scan the workspace. Task Deck therefore stores the last task list for each workspace.

  • When you open the view, it shows the stored list at once. These entries show loading… and can't be run yet. Clicking one shows Task Deck: still refreshing the task list… in the status bar for a few seconds.
  • At the same time the current list is collected in the background. Once it is there, the entries become runnable. The view is only redrawn if the list has changed.
  • On the very first start in a workspace there is no stored list, so the view stays empty until the list is ready.

The list is collected again when:

  • you click the refresh icon in the view title (Refresh)
  • a .vscode/tasks.json file in the workspace is created, changed or deleted
  • one of the Task Deck settings changes

Other changes, for example a new script in package.json, are only picked up after a refresh.

View title buttons

Icon Command What it does
search Task Deck: Find Task… Opens a search across all visible tasks. See Find Task.
refresh Refresh Collects the task list again.
gear Open Settings Opens the Settings editor filtered to the Task Deck settings. See Sources.
Task Deck
Start Installation
Features Task View · Sources · Pinned Tasks · Find Task
Reference Commands and Settings · FAQ · Version History
Links Project page on mutigeraffe.com · Install from the VS Code Marketplace