Introduction¶
When developing or debugging with dsh-TUI, managing background tasks (such as bash scripts and sub-agents) is a common pain point. The official WebUI provides a task list panel, but the TUI currently lacks the corresponding functionality, making it less intuitive to view task status and output or cancel tasks. The dsh-tui-jobs plugin was created to fill this gap.
Plugin Overview¶
This is a background task panel for dsh-TUI, maintained by developer FUSU123fusu. It uses a command-line interface to list, view, and cancel background tasks, addressing the missing task management in the TUI environment and aligning with the official WebUI in terms of the task list panel functionality.
Core Features¶
- Lists all currently visible background tasks (including bash and sub-agents).
- Refreshes task status changes in real time.
- Views the output content of completed tasks.
- Cancels running tasks.
Installation and Usage¶
- Clone the repository and package it
git clone https://github.com/FUSU123fusu/dsh-tui-jobs.git
cd dsh-tui-jobs
npm pack
- Install the plugin
dsh plugin --profile <你的profile> add file:dsh-tui-jobs-0.1.0.tgz
-
Open the panel
In dsh-TUI, enter the/jobscommand to open the task panel. -
Interact
* List: use↑/↓to select tasks.
* View details: pressEnterto open the detail view and view the output.
* Cancel task: pressxto cancel (must double-press within a 3-second window).
* Refresh list: pressr.
* Exit: pressEsc.
Design and Notes¶
- Output reading mechanism: To avoid interfering with the model-side completion notifications, the panel never reads the output of running tasks. Only the outputs of terminal-state tasks (completed/killed/failed) are readable, and the reads are idempotent.
- Accidental tap protection: Cancelling a task requires pressing
xtwice within a 3-second time window to prevent accidental operations. - List sorting: Running tasks are displayed first in the list, and completed tasks are sorted with the newest first. The duration of running tasks is updated every second.
- Environment compatibility: If the host environment does not support scenes (web, headless), the panel automatically falls back to a text list.
Conclusion¶
With disciplined output reading and accidental tap protection, dsh-tui-jobs provides dsh-TUI users with reliable background task management. If you want to dig deeper or contribute code, you can visit the project homepage.
- Project URL: https://github.com/FUSU123fusu/dsh-tui-jobs
- Plugin directory: https://www.skillhub.cn/plugins/FUSU123fusu/dsh-tui-jobs