loyalchiiina/dsh-console-sentinel ↗★ 0
dsh-console-sentinel
DSH console window sentinel - auto-hides idle AI/script console windows on Windows
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:loyalchiiina/dsh-console-sentinelREADME
Read the full README ↗配置(cordis.yml)
| 键 | 默认值 | 含义 |
|---|---|---|
enabled | true | 总开关 |
scanIntervalSec | 10 | 扫描 + CPU 采样间隔 |
idleThresholdSec | 60 | 持续低 CPU 多少秒算「用完了」 |
cpuThresholdPct | 1 | CPU 低于此值算空闲 |
autoAction | hide | none | hide | close |
probeTimeoutMs | 20000 | 探针硬超时 |
spikeTolerance | 2 | 连续多少次「忙」采样才重置空闲时钟 |
guardForeground | true | 永不自动处理前台窗口 |
scope.wmiDetached | true | 管理 WMI 拉起的脱离控制台 |
scope.dshHost | true | 管理宿主派生的控制台 |
scope.orphaned | false | 管理父进程已退出的控制台 |
scope.scriptConsole | true | 管理标题是脚本可执行文件路径的控制台(Windows Terminal 承载的脚本会话) |
scope.excludeTitles | [] | 标题 substring 黑名单 |
scope.emptyConsole | true | 把「没有任何工作子进程」的解释器控制台(PowerShell/Python/cmd 只剩 conhost)判为空壳,无论父链如何都纳入管理 —— 这是安全清理残留空 PowerShell 的开关(不必打开整个 orphaned,后者会误伤 mpiexec/fl2610/在跑的计算) |
emptyConsoleAction | hide | 对空壳控制台的动作:none | hide | close;独立于 autoAction,即便自动动作关闭也能单独生效 |
whitelist.processes | [] | 豁免进程映像名(如 code.exe),永不自动处理/一键关闭(运行时用 sentinel_whitelist 增删) |
whitelist.titles | [] | 豁免标题子串,永不自动处理/一键关闭 |
- id: dsh-console-sentinel
config:
idleThresholdSec: 90
scope:
excludeTitles:
- keep-alive