Skip to content

Releases

dsh-window-bounds 0.1.2 — 面板中文名称与介绍

Choose a tag to compare

@flying4055 flying4055 released this 13 Oct 11:38

插件面板显示中文名称与介绍

面板卡片上的标题与描述改为从 locale/<语言>.json 读取,与生态内其他插件同一约定:

{
  "meta": {
    "title": "桌面窗口尺寸记忆",
    "description": "记住 DeepSeek Harness 桌面端的窗口尺寸与位置,下次启动回到你上次离开的地方,不再固定 1280×820。"
  }
}

宿主读取 <包名>/locale/en.json 来发现语言字典目录,再按当前语言挑选字段;两者都缺失时静默回退到 package.json 的 name/description(也就是英文)。因此 en.json 必须存在,否则其他语言永远不会被选中。tests/host.spec.js 现在断言两份字典都存在、均已翻译、且都在 files 与 exports 中,防止这种静默回退回归。

新增 locale/zh.json、locale/en.json
变更 package.json(exports/files)、install.mjs、两份 README
测试 28 通过

dsh-window-bounds 0.1.1 — 修复启动崩溃

Choose a tag to compare

@flying4055 flying4055 released this 13 Oct 11:29

修复:插件可能导致桌面端启动崩溃

症状:桌面端重启后弹出 DeepSeek Harness is unavailable / desktop welcome: Web RPC failed,应用无法启动。

根因:DSH 0.2.0-rc.2 的设置服务用 Config !== undefined && 'toJSON' in Config 判断插件 Config 是否可渲染,随后把选中的对象当作 schemastery schema 使用,直接读取 schema.meta.volatile 与 schema.dict。0.1.0 的 Config 是普通对象却带 toJSON,因此通过判定后在 settings/describe 中抛出:

TypeError: Cannot read properties of undefined (reading 'volatile')

该 Remote 调用整体失败,欢迎窗口随之崩溃。

修复:Config 只导出 ~standard(loader 仍会校验 config),设置服务安全跳过它;JSON Schema 投影移到 configJsonSchema(),刻意不挂在 Config 上。tests/host.spec.js 增加断言守住这个不变式,并固化了该崩溃特征。

影响版本:0.1.0(仅桌面端 DSH 0.2.0-rc.2 复现)。如果你已安装 0.1.0 且应用无法启动,请在崩溃对话框选择「禁用第三方插件、备份 profile patch 并重启」,然后升级到本版本。

测试 27 通过
变更 lib/index.js、README.md、README.en.md、tests/host.spec.js

dsh-window-bounds 0.1.0

Choose a tag to compare

@flying4055 flying4055 released this 13 Oct 11:10

Remember the DeepSeek Harness desktop window size and position between launches.

Install

dsh plugin --profile <profile> add flying4055/dsh-window-bounds

The desktop profile is owned by the Electron application, so install there through Plugins -> Add plugin.

Why a plugin

The official desktop shell (@deepseek-ai/dsh-desktop) creates its main window with hardcoded width: 1280, height: 820 and exposes no IPC channel for window geometry. The remaining surface is the window itself: a page on the dsh-app://app origin may call window.resizeTo() / window.moveTo(), which this plugin drives from a head script injected through the webserver's structured index table.

Verified end to end

Runtime trace from the shell (trace: true):

{"phase":"boot",   "geometry":{"x":632,"y":290,"outerWidth":1296,"outerHeight":828},
                   "detail":{"stored":{"x":303,"y":214,"width":1707,"height":1053}}}
{"phase":"settled","geometry":{"x":295,"y":214,"outerWidth":1739,"outerHeight":1069}}

Behaviour

  • Size and position are restored, clamped to the current display's work area; a geometry from a disconnected display falls back to the shell default while a still-valid size is kept.
  • Saving is debounced, because closing the desktop window hides it to the tray instead of quitting.
  • Configuration is a validated Config schema (Standard Schema) with defaults for enabled, remember, restorePosition, minWidth, minHeight, maxPosition, saveDelayMs and trace.
  • No dependencies: the desktop profile has no @deepseek-ai packages of its own, so the plugin validates its own configuration.

26 tests: node --test tests/geometry.spec.js tests/host.spec.js.