# dsh-settings-float **Repository Path**: loosount/dsh-settings-float ## Basic Information - **Project Name**: dsh-settings-float - **Description**: DSH 设置浮窗:可拖动/可缩放/可最小化,遮罩不再误点会话。Draggable floating Settings window for DeepSeek Harness. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-26 - **Last Updated**: 2026-10-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: dsh ## README # dsh-settings-float · DSH 设置浮窗 > 把 DSH 的「设置」面板变成可拖动、可缩放、可最小化的浮窗;遮罩不再挡住会话,也不会被误点。 > > Turn the DSH Settings dialog into a draggable, resizable, minimizable floating window whose shield never lets a stray click reach the conversation. --- ## 中文 ### 它解决什么 DSH 的设置是个居中模态框:一打开就盖住整个会话,看不见刚才聊到哪;关掉再打开,位置尺寸又得重来。 这个插件把设置改成一张浮窗: | 原来 | 现在 | |---|---| | 居中模态,盖住整个会话 | 浮窗,默认居中,大小按窗口比例(`min(880px, 72vw)` × `min(700px, 76vh)`) | | 动不了 | 拖左边菜单或顶部标题条就能挪;右下角可拉伸 | | 尺寸不记 | 你拖过拉过之后,位置尺寸记在 localStorage,下次照旧 | | 只有 ✕ | ✕ 左边多一个「—」,一点折成一条标题栏 | | 背后全黑,看不见也说不了话 | 背后透明可见;点击被一层**透明挡板**吃掉,不会误点到会话(比如把图片点开) | ### 关键设计 - **挡板是真的**:遮罩保留 `pointer-events`,点击落到它身上,根本到不了会话。所以不会误触发图片查看器,也不会把字打进输入框。 - **不吃掉关闭逻辑**:在 `window` 的**捕获阶段**吞掉挡板上的点击,官方的「点外面就关闭」处理器收不到信号,设置不会莫名消失。 - **滚轮照常**:挡板上的滚轮会临时让路,算出底下能滚的容器再把滚动量转过去——设置开着也能往上翻聊天。 - **最小化才让路**:点「—」之后遮罩才放行,这时会话恢复可点。 - **不碰源码**:全部通过客户端插件注入样式与少量交互逻辑,不修改 DSH 任何文件。 - **不依赖哈希类名**:选择器挂在 `[data-shortcut-modal="settings"]` 与其父节点上,DSH 小版本升级一般不会失效。 ### 安装 ```bash # 从 git 装 dsh plugin --profile desktop add "git+https://gitee.com/loosount/dsh-settings-float.git" # 或本地目录 dsh plugin --profile desktop add "link:C:\projects\dsh-settings-float" ``` 装完**重启一次 DSH**。 ### 使用 | 操作 | 结果 | |---|---| | 拖左边菜单 / 顶部标题条 | 移动窗口 | | 拉右下角 | 缩放 | | 点标题栏的「—」 | 折成一条,会话恢复可点 | | 点「▢」 | 还原,会话重新被挡住 | | ✕ 或 Esc | 关闭设置 | ### 已知取舍 - 遮罩挡住点击之后,**点空白处不会再关闭设置**(那一下会落在挡板上)。要关就点 ✕ 或按 Esc。 - 只测过 Windows 桌面版(Electron / Chromium)。浏览器版 DSH 理论可用,未验证。 --- ## English ### What it fixes DSH's Settings is a centered modal: it covers the whole conversation while it is open, and it forgets its size and position every time. This plugin turns it into a floating window: | Before | After | |---|---| | Centered modal covering the chat | Floating window, centered by default, sized as a share of the viewport (`min(880px, 72vw)` × `min(700px, 76vh)`) | | Can't be moved | Drag the left nav or the title strip; resize from the bottom-right corner | | Size forgotten | Once you drag or resize, the geometry is remembered in localStorage | | Only a ✕ | A "—" sits left of the ✕ and collapses the window to a title bar | | Chat hidden behind a dark mask | Chat stays visible; clicks are absorbed by an **invisible shield**, so they never reach the conversation (no image viewer popping open by accident) | ### Design notes - **The shield is real.** The mask keeps `pointer-events`, so clicks land on it and never reach the chat. - **It doesn't swallow the close logic.** Shield clicks are stopped during the **window capture phase**, so the host's "click outside closes the dialog" handler never sees them. - **The wheel still works.** Wheel events over the shield are re-dispatched to the scrollable container underneath, so you can keep reading the chat. - **Minimize is the escape hatch.** Only after collapsing does the shield step aside and the conversation become interactive again. - **No source patching.** Everything is a client-side plugin: styles plus a small amount of interaction logic. - **Not tied to hashed class names.** Selectors hang off `[data-shortcut-modal="settings"]` and its parent. ### Install ```bash dsh plugin --profile desktop add "git+https://gitee.com/loosount/dsh-settings-float.git" ``` Restart DSH once after installing. ### Known trade-offs - With the shield in place, **clicking outside no longer closes Settings**; use ✕ or Esc. - Verified on the Windows desktop build (Electron / Chromium) only. The browser build should work but is untested. --- ## 署名 · Credits 昆昆的赛博打工鲸(Finn) MIT License — see [LICENSE](LICENSE).