Bundle
dsh-plugin-background
Web GUI background plugin: per-area image groups with per-image display and rendering config (fill/fit/stretch/tile/center/custom + position, scale, size, repeat, rotation, radius, opacity, blur), slideshow playback, and local file/folder picking stored as IndexedDB blobs (no base64 packing); own settings section. TypeScript sources, esbuild-built bundle.
- Source
- gameswu
- stars
- 11 stars
- License
- MIT
- Updated
- Updated 6 hours ago
Readme
# dsh-plugin-background DeepSeek Harness Web 界面的背景插件:为对话区、轨迹区、侧边栏、设置页等界面区域设置独立背景,支持图片轮播与静音视频。灵感来自 VSCode 的 [`background`](https://marketplace.visualstudio.com/items?itemName=shalldie.background) 扩展。 > 兼容性:v0.5.0 起要求 **DSH ≥ 0.1.5-rc.1**(客户端继续使用平台基线模块 `@deepseek-ai/dsh-client-store` 与 `@deepseek-ai/dsh-client-ui-primitives`;0.1.5-rc.1 的平台基线新增 `@deepseek-ai/dsh-client-ui-dockkit`,本插件不导入它)。背景区域仍为对话区、轨迹区、左侧栏与设置面板;0.1.5-rc.1 新增的官方右侧栏没有对应的背景层需求,本兼容版本不为其增加新区域(存在 dsh-plugin-vscode-sidebar 时,其右侧面板与标签页区域照旧可用)。 ## 它能做什么 - 每个区域一套独立背景:图片组像 PPT 一样轮播切换,视频组静音循环播放(每组只含一种媒体) - 支持粘贴 URL(逗号分隔多张)、选择本地图片/视频、或整个文件夹;本地文件刷新后保留 - 每张图独立设置:显示模式(填充/适应/拉伸/平铺/居中/自定义)、不透明度、模糊 - 轮播间隔、顺序/随机、下一张;切换前预加载并交叉淡入,不会闪空 - 勾选多个区域后添加,同一批图可一次落到多个区域 - 拖拽两个区域可**合并为一张跨区域大图**(多显示器壁纸效果),拖出即拆分 - 兼容 [dsh-plugin-vscode-sidebar](https://github.com/gameswu/dsh-plugin-vscode-sidebar):其右侧面板、下侧面板整体以及其中每个标签页都可作为独立背景区域 ## 安装 本插件是一个自带补丁层的**组合包**(`dsh.bundle` + `cordis.patch.yml`)。用 `dsh plugin` 安装即可——它把参数转发给 profile 的 pnpm,并自动把包挂载进 `dsh.profile.bundles`,无需手动编辑任何配置文件: ```bash # 从本地路径安装(<路径>/background 为本仓库目录) dsh plugin --profile web add <路径>/background # 或从 GitHub 安装(建议锁定 commit) dsh plugin --profile web add github:gameswu/dsh-plugin-background#<sha> ``` 从 GitHub 安装时,pnpm 会在安装后运行本包的 `prepare` 脚本构建 `lib/client.js`;pnpm ≥10 默认拒绝执行,首次 `add` 会失败并提示把包键加入该 profile 的 `pnpm-workspace.yaml` 后重试: ```yaml allowBuilds: dsh-plugin-background: true ``` > 授权构建意味着安装时会在你的机器上执行本包的构建脚本——请只对可信来源授权。 安装完成后重启 Web 界面(`dsh web`)即可生效。 ## 使用 打开 **设置 → 插件 → 背景**: 1. 在表面列表中点击要配置的区域(勾选多行可一次添加到多个区域) 2. 粘贴图片/视频链接,或选择本地文件 3. 点击缩略图进入编辑器调整显示模式与参数 4. 把一个区域行**拖到另一个区域行上**,即可合并为跨区域大图 ## 更新与开发 ```bash pnpm install # 安装依赖(esbuild 为构建依赖;typescript、React 18/@types、0.1.5-rc.1 client 类型仅开发/typecheck 用) pnpm build # 打包 → lib/client.js pnpm typecheck # 类型检查 ``` 本地路径安装(pnpm link)会直接使用本仓库的构建产物:重新构建后硬刷新浏览器(Ctrl+Shift+R)即可,无需重启服务。 ## License [MIT](LICENSE)
Install
dsh plugin --profile web add github:gameswu/dsh-plugin-background
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-plugin-background from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.