Skip to main content

How to use dsh-bash-terminal

DSH Windows Plugin: After the Web UI lets users select their preferred default terminal, shell tools consistently invoke PowerShell, Git Bash, or WSL to execute commands.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-bash-terminal

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add dsh-bash-terminal

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 终端由用户决定,AI 无法更改:Web UI 设置页(设置 → 通用)出现"默认终端"下拉(PowerShell / Git Bash / WSL);shell 工具永远只使用该设置,不暴露终端参数给模型。设置通过 DSH settings 系统持久化(settings.yaml)。
  • 不占用 ctx.shell 能力接缝:DSH 自带的沙箱化 pwsh 工具保持原样可用;本插件的 shell 工具是额外的多终端入口。
  • 通过共享的 ctx.subprocess seam 派生进程:进程树终止(Windows taskkill /T)、SIGTERM→grace→SIGKILL、输出 spill 文件,与官方 dsh-tool-bash / dsh-tool-pwsh 行为一致。
  • 后台任务注册进通用 jobs registry,支持 run_in_background / job_output / job_kill。
  • 前端设置页的「默认终端」是枚举(UI 自动渲染为下拉),模型每次调用都只按该设置执行,无法自行切换终端。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

What does this plugin do?

Provides a unified shell tool for DSH Windows users, letting your chosen "default terminal" (PowerShell / Git Bash / WSL) run commands and providing an interactive terminal tool.

Can it only be used on Windows?

Yes. The plugin skips registering tools on non-win32 platforms, so macOS/Linux installations won't have usable shell tools.

Can AI models switch terminals by themselves?

No. Terminal selection is changed by you in Settings → General → Default Terminal. The model only sees the "shell" tool and doesn't have terminal parameters exposed to it.

Does it conflict with the official pwsh tool?

No conflict. The official sandboxed pwsh tool remains available as before. This plugin is an additional multi-terminal entry and doesn't occupy the ctx.shell slot.

How to uninstall?

Run install.ps1 uninstall. It will restore DSH settings whitelist, clean up patches, and remove the plugin from profile bundles.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: ^0.1.0-rc.6
  • Node: >=20
  • Platforms: Windows
  • Native modules: node-pty

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule