DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-window-size

m

dsh-window-size

Manifest valid

DSH client plugin: saves the main window size/position in "Settings" and automatically restores it on restart. Uses koffi/user32 to modify the window in-process — no scheduled tasks, no external processes.

UI (client)hasBundlePatchMachine translated

dsh-window-size(窗口尺寸)

DSH 客户端主窗口的尺寸与位置,存下来,并在每次启动客户端时自动恢复一次。

入口在哪

只在一个地方:客户端 → 设置 → 窗口尺寸(settings.section 插槽)。 主界面不加按钮、不加面板,也不注册任何工具或命令。

怎么用

  1. 打开「设置 → 窗口尺寸」;
  2. 填宽 / 高(下限就是客户端自己的 minWidth 520、minHeight 600),X / Y 可留空(留空=位置交给客户端);
  3. 点「保存并应用」→ 立刻生效,同时落盘;
  4. 以后每次启动客户端,宿主半会在窗口出现后应用一次保存的尺寸,然后停手。

想回到客户端默认尺寸 → 「清除保存」(删掉配置文件)。

它是怎么做的(以及为什么不长成"守护脚本"的样子)

  • 没有计划任务、没有常驻轮询、没有外部脚本进程。窗口操作在客户端宿主进程内直接用 Win32 完成: 通过客户端自带的 koffi(resources\app.asar.unpacked\dsh\node_modules\koffi)绑定 user32.dll, 调 EnumWindows / GetWindowRect / SetWindowPos / ShowWindow。 宿主进程是客户端主进程的子进程,完整性级别与窗口一致,所以 SetWindowPos 不会被 UIPI 拦下。
  • 动手的时刻只有两个:客户端启动后收敛一次、用户在设置页点保存/应用。 客户端没开的时候,这里什么都不存在——不会有任何进程、窗口、弹窗。
  • 只认"标题含 DeepSeek Harness"或"属于本进程树"的可见窗口,绝不碰其它程序的窗口。
  • 窗口控制加载失败也不会抛给宿主:设置页会显示失败原因,配置照样能存。

文件与协议

位置说明
~/.dsh/window-size.json保存的配置:{width,height,x,y,maximized,applyOnStart,savedAt}
~/.dsh/window-size.log只有启动应用/保存的结果行,供排查(自动截断,不会无限涨)
POST /api/window-size/dispatch宿主半注册的 RPC(走 connection.fetch.register)

RPC 报文与 dsh-novel-desk 同一套:

// 客户端 → 宿主
{ "type": "client-request", "method": "window-size/dispatch", "rpcId": "…", "payload": { "action": "config.save", "args": { "width": 2027, "height": 1074, "x": 231, "y": 163 } } }
// 宿主 → 客户端
{ "type": "server-response", "rpcId": "…", "result": { "ok": true, "value": { "saved": {}, "current": {}, "applied": {} } } }

action 取值:state.get / config.save / config.apply / config.clear / window.read / windows.list。

安装

# 客户端自带 pnpm;profile 在 ~/.dsh/profiles/desktop
# 已经通过 dsh-super-injector 的 dev_install_package 装配(profile package.json 的 link 依赖 + dsh.profile.bundles)

包内 cordis.patch.yml 就一行 insert,保证重启后由 profile 的 bundles 正常装配。

卸载

  1. 从 profile 的 dsh.profile.bundles 与 dependencies 里删掉 dsh-window-size,删掉 ~/.dsh/profiles/desktop/node_modules/dsh-window-size 这个 junction;
  2. 删掉 ~/.dsh/window-size.json 与 ~/.dsh/window-size.log。

(用注入器就一步:dev_uninject_plugin 匹配 dsh-window-size。)

Comments

Loading…

Similar plugins

dsh-desktop-auto-restart

DSH 桌面端(Windows)重启插件:从侧边栏按钮或默认关闭的模型工具重启宿主,重启后按会话原有预设自动唤醒;宿主繁忙时拒绝重启。

Development & InfrastructureTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add dsh-desktop-auto-restart

by gaoyian7251

在 DSH 桌面客户端「设置 → 通用设置」中选择启动窗口状态(默认 / 最大化 / 全屏)。Windows.

Development & InfrastructureManifest valid

★ 2

MIT

JavaScript

Oct 8, 2026

dsh plugin --profile web add dsh-window-state

by jipika

DSH 插件中心(本地改版):插件管理/市场额外提升为设置窗口左侧导航的独立分栏(settings.section#plugin-console),原「设置 → 插件」tab 保留。基于上游 0.3.63。

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 27, 2026

dsh plugin --profile web add @noob-stupid/dsh-plugin-console

by AsakuraAOI

DSH 待办清单:左侧导航、Agent 工具与可置顶的独立窗口。

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Oct 18, 2026

dsh plugin --profile web add dsh-todo

by buhuikongpan

DSH 分层插件管理器:原生插件按 系统层/WebUI 层/工具层 只读展示,用户扩展支持停用/启用、补登记、卸载与可编辑描述。

UI & ExperienceManifest valid

★ 9

JavaScript

Aug 20, 2026

dsh plugin --profile web add dsh-pluginmanager

by AGImentu

DSH 插件:在「更多设置」里查看、修改并保存所有 agent 共用的全局系统提示词,保存后立即生效。

Development & InfrastructureTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Oct 6, 2026

dsh plugin --profile web add dsh-prompt-editor