dsh-shell-settings
其他 活跃维护

dsh-shell-settings

Yaya716/dsh-shell-settings

为dsh提供shell执行环境选择能力,支持系统默认、cmd、PowerShell 5.1、pwsh 7+多种环境选项,配置变更立即生效,无需重启等待。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
None
开源协议
4 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Yaya716/dsh-shell-settings
git clone https://github.com/Yaya716/dsh-shell-settings.git
git clone git@github.com:Yaya716/dsh-shell-settings.git
README.md main

@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.yamlshell: 部分),随设置文档热重载;
  • Host 侧:dsh-pwsh-local 的 executor 按 kind 解析 shell 可执行文件与 argv;dsh-tool-pwshkind 动态注册 pwshcmd 模型工具;
  • 切换后新命令立即生效,无需重启 dsh 进程。

回滚

  1. C:\Users\yuyang\.dsh\profiles\web\cordis.patch.yml 移除本扩展的 insert 行;
  2. 删除 C:\Users\yuyang\.dsh\extensions\shell-settings\
    C:\Users\yuyang\.dsh\profiles\web\node_modules\@local\dsh-shell-settings\
  3. 还原 patch-src 中备份的 dsh-pwsh-local / dsh-tool-pwsh 包文件;
  4. 重启 dsh 进程。