xchannel1987/dsh-power-xc0

dsh-power-xc

DSH 的独立电源控制插件:提供带有重启/关机菜单的侧边栏电源按钮,以及 Windows 关机风格的覆盖层。拥有独立的重启与关机引擎。

AI 分析

核心用途是为 DSH 提供便捷的系统电源管理。适合需要直接在 Web 界面或通过斜杠命令/模型工具快速重启或关闭 DSH 服务的用户。

套件
dsh-power-xc
版本
0.1.0
授權
MIT
最近更新
2026年8月29日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xchannel1987/dsh-power-xc

使用 DSH CLI

dsh plugin --profile web add dsh-power-xc

或使用 npm

npm install dsh-power-xc


安装后重启 DSH,侧边栏底部将出现电源按钮。

## 🎮 使用方式

### 方式一:Web UI
1. 点击侧边栏底部的电源按钮
2. 选择「重启」或「关机」
3. 确认操作

### 方式二:斜杠命令
- 输入 `/restart` 重启 DSH
- 输入 `/shutdown` 关闭 DSH

### 方式三:模型工具
在对话中请求模型重启 DSH,模型会调用 `restart_harness` 工具。

## ⚙️ 工作原理

用户点击重启 ↓ 显示过渡动画 ↓ 启动独立 helper 进程 ↓ 等待旧进程退出 ↓ 释放端口 ↓ 以原命令行重新拉起 ↓ 页面自动重连


## 🔒 安全设计

- **分离进程**:helper 独立于主进程运行
- **超时保护**:30 秒超时机制
- **状态监控**:健康检查端点
- **优雅退出**:会话刷新不会阻塞重启

## 📄 许可证

[MIT](https://github.com/xchannel1987/dsh-power-xc/blob/58fccf791ff0e6228fd462e49018443cd394ec42/LICENSE)

## 🔗 链接

- [GitHub](https://github.com/xchannel1987/dsh-power-xc)
- [npm](https://www.npmjs.com/package/dsh-power-xc)
- [问题反馈](https://github.com/xchannel1987/dsh-power-xc/issues)

## 🎮 使用方式

### 方式一:Web UI
1. 点击侧边栏底部的电源按钮
2. 选择「重启」或「关机」
3. 确认操作

### 方式二:斜杠命令
- 输入 `/restart` 重启 DSH
- 输入 `/shutdown` 关闭 DSH

### 方式三:模型工具
在对话中请求模型重启 DSH,模型会调用 `restart_harness` 工具。