READMESource: main@d8f8d7a0
@local/dsh-shell-settings
在 设置 → 常规 新增「Shell 类型」设置行,选择 dsh 执行智能体命令所使用的 shell:
| 选项 | 内部值 | 效果 |
|---|---|---|
| 系统默认 | system-default |
平台默认(Windows → pwsh 7+) |
| CMD | cmd |
cmd.exe /d /s /c,模型工具切换为 cmd 方言 |
| Windows PowerShell (5.1) | windows-powershell |
powershell.exe(System32) |
| PowerShell 7+ (pwsh) | pwsh |
明确使用 pwsh 7+ |
工作机制
- 浏览器侧:本扩展读取/写入
shell设置命名空间的kind字段(settings.yaml的shell:部分),随设置文档热重载; - Host 侧:
dsh-pwsh-local的 executor 按kind解析 shell 可执行文件与 argv;dsh-tool-pwsh按kind动态注册pwsh或cmd模型工具; - 切换后新命令立即生效,无需重启 dsh 进程。
回滚
- 从
C:\Users\yuyang\.dsh\profiles\web\cordis.patch.yml移除本扩展的 insert 行; - 删除
C:\Users\yuyang\.dsh\extensions\shell-settings\与C:\Users\yuyang\.dsh\profiles\web\node_modules\@local\dsh-shell-settings\; - 还原
patch-src中备份的dsh-pwsh-local/dsh-tool-pwsh包文件; - 重启 dsh 进程。
No comments yet. Be the first to write one.