-
Notifications
You must be signed in to change notification settings - Fork 3
feat: 发布 beauticode-dsh 1.0.19 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # DSH 背景栏视觉方向说明 | ||
|
|
||
| 本次不是重做 DSH,也不是把背景功能扩张成独立的素材管理器。目标是让侧边栏里的「背景」入口更像一个稳定、可信、长期使用的本地工具:用户能在几秒内完成图片导入、视频导入、声音控制、清除背景和已保存主题切换;正在处理时知道系统在做什么;发生错误或超时时按钮一定恢复;同时不把绝对路径、技术协议或多余统计暴露给普通用户。背景栏仍然依附 DSH 左侧栏,不能抢过会话、模型和输入区的主层级。 | ||
|
|
||
| 受众是主要在 Windows 本机使用 DSH 的用户。观看距离约为普通笔记本 60–90 厘米,面板宽度应控制在 224–272 像素,正文不低于 13 像素,辅助标签不低于 11 像素。视觉温度需要冷静、可靠、轻微有人味,避免常见 AI 产品的紫蓝渐变、发光描边、Bento 卡片堆叠、每个动作都配一个装饰图标,以及过度圆润的胶囊按钮。颜色从真实「画窗」背景里的雨蓝、雾灰和 DSH 现有深色侧栏采样,收敛为一组中性灰阶加一个低饱和蓝;错误只在发生时使用克制的红色。字体沿用 DSH 系统字体,不额外下载字体。 | ||
|
|
||
| 内容结构固定为四层:第一层是当前背景和来源状态;第二层是最常用的图片、视频导入;第三层是声音、清除、皮肤中心等次级操作;第四层是已保存主题。主题列表只使用现有名称、媒体类型、来源类型和选中状态,不新增缩略图接口,不把本地路径送到网页。忙碌状态必须局部化:当前操作显示进度文本,其余按钮暂时不可用,但面板仍可关闭;45 秒客户端上限后恢复交互并说明原背景保持不变。原生文件选择器是用户控制的系统窗口,不套用该操作超时。 | ||
|
|
||
| 三个方向共享以上功能,但构图互异。方向 A 用包豪斯式规则线和编号建立明确秩序,强调“工具盒”;方向 B 最大程度融入 DSH 本体,把状态和动作做成低噪声的原生侧栏;方向 C 借鉴纸质媒体清单,把导入动作和已保存主题放在一条连续的纵向轨道里,强调主题切换效率。三版都不依赖新增后端能力,选定后只改 `console.js` 的结构和样式,不动 local 导入、事务或媒体服务协议。 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # DSH 背景栏方向确认 | ||
|
|
||
| - 已评审:A「网格工具盒」、B「原生侧栏」、C「媒体清单」 | ||
| - 最终设计:`direction-c-media-ledger.html`、`direction-c-media-ledger.png` | ||
| - 用户选择原话:`C吧` | ||
| - 结论:正式背景栏采用 C「媒体清单」方向;保持现有 DSH 侧栏位置、local 零复制导入、主题切换和超时恢复语义。 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <!doctype html> | ||
| <html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>方向 C · 媒体清单</title><style> | ||
| *{box-sizing:border-box}html,body{margin:0;height:100%;font-family:"Segoe UI","Microsoft YaHei",sans-serif;color:#f1f3f4}body{overflow:hidden;background:#172231 url("../../integrations/deepseek-harness/themes/internal-beyond/bg-canvas-4k.png") center/cover no-repeat}.sidebar{position:absolute;inset:0 auto 0 0;width:274px;padding:18px 12px;background:rgba(15,24,35,.68);border-right:1px solid rgba(255,255,255,.13);backdrop-filter:blur(12px)}.brand{font-size:17px;font-weight:700}.brand small{font:9px ui-monospace,monospace;border:1px solid currentColor;padding:2px 4px}.new{margin-top:24px;width:100%;height:40px;border:1px solid rgba(255,255,255,.13);border-radius:5px;background:rgba(40,44,51,.76);color:inherit;font:600 14px inherit}.section{margin:20px 8px 8px;color:#bac3cc;font-size:13px}.session{height:34px;padding:7px 10px}.session.active{background:rgba(255,255,255,.09)}.bottom{position:absolute;left:8px;right:8px;bottom:12px}.panel{padding:0 14px 12px;background:#ece9e2;color:#202327;border-top:4px solid #252a30;box-shadow:0 16px 32px rgba(0,0,0,.3)}.head{display:flex;align-items:end;justify-content:space-between;padding:13px 0 11px;border-bottom:1px solid #b9b6af}.head h2{margin:0;font:650 16px Georgia,"Songti SC",serif}.head span{font:10px ui-monospace,monospace;color:#696d70}.import{display:grid;grid-template-columns:34px 1fr auto;align-items:center;min-height:48px;border-bottom:1px solid #c8c5be;background:transparent;color:inherit;width:100%;padding:0;text-align:left}.num{font:10px ui-monospace,monospace;color:#74787b}.import strong{display:block;font-size:13px}.import small{font-size:10px;color:#717579}.arrow{font-size:16px}.controls{display:flex;gap:12px;padding:9px 0;border-bottom:1px solid #c8c5be}.controls button{border:0;padding:0;background:transparent;color:#595e62;font:11px inherit;text-decoration:underline;text-underline-offset:3px}.label{padding:11px 0 5px;font:10px ui-monospace,monospace;color:#686d71;letter-spacing:.08em}.theme{display:grid;grid-template-columns:16px 1fr auto;align-items:center;height:31px;border-bottom:1px dotted #bbb8b1;font-size:12px}.theme:last-child{border:0}.theme .dot{font-size:10px}.theme.on{font-weight:650}.theme em{font:normal 9px ui-monospace,monospace;color:#777b7e}.nav{height:38px;margin-top:7px;padding:9px 11px;border-radius:7px;font-size:14px}.nav.on{background:rgba(255,255,255,.12);outline:1px solid rgba(255,255,255,.5)}.hero{position:absolute;left:52%;top:48%;transform:translate(-50%,-50%);font-size:24px;font-weight:650;text-shadow:0 1px 10px rgba(0,0,0,.5)}button{cursor:pointer}button:hover{opacity:.65} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 使演示样式符合设计约束。
🤖 Prompt for AI Agents |
||
| </style></head><body><aside class="sidebar"><div class="brand">deepseek <small>HARNESS</small></div><button class="new">+ 新会话</button><div class="section">工作区</div><div class="session active">新会话</div><div class="session">Session Title</div><div class="session">WoRk</div><div class="bottom"><section class="panel"><header class="head"><h2>背景清单</h2><span>画窗 / 已应用</span></header><button class="import"><span class="num">01</span><span><strong>导入图片</strong><small>直接引用本地文件</small></span><span class="arrow">→</span></button><button class="import"><span class="num">02</span><span><strong>导入视频</strong><small>MP4 · 零复制播放</small></span><span class="arrow">→</span></button><div class="controls"><button>声音已关</button><button>清除背景</button><button>打开皮肤中心</button></div><div class="label">SAVED / 03</div><div class="theme on"><span class="dot">●</span>画窗<em>内置</em></div><div class="theme"><span></span>芙莉莲 第一集<em>本地</em></div><div class="theme"><span></span>雨夜<em>本地</em></div></section><div class="nav on">▧ 背景</div><div class="nav">⚙ 设置</div></div></aside><div class="hero">探索未至之境</div></body></html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,48 @@ | ||
| # DeepSeek Harness 桥接插件 | ||
|
|
||
| 该 Cordis 插件向 DSH Web 注入 beautiCode 浏览器客户端,并提供本机鉴权接口。支持图片、MP4、播放位置、静音、摸鱼模式以及清除背景。 | ||
|
|
||
| 装好插件并运行 `dsh web` 后,侧栏「设置」上方会出现「背景」:可从文件夹选图片或 MP4、清除、开关声音、切换已保存主题。网页控制台没有摸鱼;浅色/深色跟 DSH 自己的外观走。下次打开会恢复上次背景。 | ||
|
|
||
| 插件也会注册对话工具(`beauticode_*`)和斜杠命令(`/bg`、`/bg-theme`、`/bg-clear`)。不需要托盘;托盘若已在跑则复用它。 | ||
|
|
||
| beautiCode **不启动** DeepSeek Harness。请先自己运行 `dsh web`。 | ||
|
|
||
| 不需要 fork 仓库。一行安装: | ||
|
|
||
| ```sh | ||
| npx beauticode-dsh | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
|
|
||
| 已有 pnpm 时也可以: | ||
|
|
||
| ```sh | ||
| npx @deepseek-ai/dsh plugin --profile web add beauticode-dsh | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
|
|
||
| 在仓库根目录一键写入插件(不需要 pnpm): | ||
|
|
||
| ```powershell | ||
| powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install-dsh-plugin.ps1 | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
|
|
||
| 也可以手动(`dsh plugin add` 需要 pnpm): | ||
|
|
||
| ```sh | ||
| dsh plugin --profile web add file:%CD%/integrations/deepseek-harness | ||
| # 或 | ||
| npx @deepseek-ai/dsh plugin --profile web add file:%CD%/integrations/deepseek-harness | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
|
|
||
| 手动接入时: | ||
|
|
||
| 1. 修改 `cordis.patch.example.yml` 中的 `file:///.../index.mjs`。 | ||
| 2. 确保 DSH 和 beautiCode 使用相同的 `BEAUTICODE_DATA_ROOT`。 | ||
| 3. 自己运行 `dsh web`(或带 `--patch`)。 | ||
| 4. 打开页面后用侧栏「背景」,或输入 `/bg <本机绝对路径>`,或直接跟 AI 说把某个视频/图片设为背景。 | ||
|
|
||
| 安全边界:DSH Web 必须绑定本机回环地址;控制端点需要随机令牌;媒体 URL 仅允许带令牌的回环 HTTP 地址;浏览器回执只接受同源请求。 | ||
| # DeepSeek Harness 桥接插件 | ||
| 该 Cordis 插件向 DSH Web 注入 beautiCode 浏览器客户端,并提供本机鉴权接口。支持图片、MP4、播放位置、静音、摸鱼模式以及清除背景。 | ||
| 装好插件并运行 `dsh web` 后,侧栏「设置」上方会出现「背景」:在 Windows 上点击图片或视频会打开系统文件选择器,选好后在页面内命名,背景立即应用并进入已保存主题;也可以清除、开关声音、切换或删除主题,以及打开「皮肤中心」安装已审核的社区皮肤。本地导入只在 Node 端保存绝对路径,并通过带 Range 支持的回环媒体服务读取原文件,不复制用户选择的图片或整段视频主文件。Windows 强制使用本地引用;原生选择器不可用时会明确报错,不会静默上传或复制媒体。非 Windows 环境保留兼容上传,并明确提示该模式会保存托管副本。网页控制台没有摸鱼;浅色/深色跟 DSH 自己的外观走。下次打开会恢复上次背景。设置 `BEAUTICODE_SKIN_CENTER` 或填写 `skin-center.json` 后,皮肤中心才会显示远程目录。 | ||
| 插件也会注册对话工具(`beauticode_*`)和斜杠命令(`/bg`、`/bg-theme`、`/bg-clear`)。不需要托盘;托盘若已在跑则复用它。 | ||
| beautiCode **不启动** DeepSeek Harness。请先自己运行 `dsh web`。 | ||
| 不需要 fork 仓库。一行安装: | ||
| ```sh | ||
| npx beauticode-dsh | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
| 已有 pnpm 时也可以: | ||
| ```sh | ||
| npx @deepseek-ai/dsh plugin --profile web add beauticode-dsh | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
| 在仓库根目录一键写入插件(不需要 pnpm): | ||
| ```powershell | ||
| powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install-dsh-plugin.ps1 | ||
| npx @deepseek-ai/dsh web | ||
| ``` | ||
| 也可以手动(`dsh plugin add` 需要 pnpm): | ||
| ```sh | ||
| dsh plugin --profile web add file:%CD%/integrations/deepseek-harness | ||
| # 或 | ||
| npx @deepseek-ai/dsh plugin --profile web add file:%CD%/integrations/deepseek-harness | ||
| npx @deepseek-ai/dsh web | ||
|
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- README.zh-CN.md ---'
cat -n integrations/deepseek-harness/README.zh-CN.md | sed -n '1,80p'
printf '%s\n' '--- related shell/path examples ---'
rg -n -C 2 '%CD%|\$\{?PWD\}?|PowerShell|cmd\.exe|Git Bash|plugin --profile web add|dsh plugin' \
integrations/deepseek-harness README.md .github 2>/dev/null || trueRepository: starsstreaming/beautiCode Length of output: 7173 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
path = Path("integrations/deepseek-harness/README.zh-CN.md")
lines = path.read_text(encoding="utf-8").splitlines()
block = "\n".join(lines[33:39])
print("--- documented block ---")
print(block)
assert lines[33] == "```sh"
assert "%CD%" in block
PY
printf '%s\n' '--- POSIX sh expansion ---'
sh -c 'printf "%s\n" "file:%CD%/integrations/deepseek-harness"'
printf '%s\n' '--- bash expansion ---'
bash -c 'printf "%s\n" "file:%CD%/integrations/deepseek-harness"'
if command -v pwsh >/dev/null 2>&1; then
printf '%s\n' '--- PowerShell expansion ---'
pwsh -NoProfile -Command 'Write-Output "file:%CD%/integrations/deepseek-harness"'
elif command -v powershell >/dev/null 2>&1; then
printf '%s\n' '--- Windows PowerShell expansion ---'
powershell -NoProfile -Command 'Write-Output "file:%CD%/integrations/deepseek-harness"'
else
printf '%s\n' 'PowerShell executable unavailable in the sandbox'
fiRepository: starsstreaming/beautiCode Length of output: 583 按目标 shell 提供可执行的路径写法。 该代码块标记为 🤖 Prompt for AI Agents |
||
| ``` | ||
| 手动接入时: | ||
| 1. 修改 `cordis.patch.yml` 中的插件接入项;优先使用上面的安装命令自动完成接线。 | ||
| 2. 确保 DSH 和 beautiCode 使用相同的 `BEAUTICODE_DATA_ROOT`。 | ||
| 3. 自己运行 `dsh web`(或带 `--patch`)。 | ||
| 4. 打开页面后用侧栏「背景」,或输入 `/bg <本机绝对路径>`,或直接跟 AI 说把某个视频/图片设为背景。 | ||
| 安全边界:DSH Web 必须绑定本机回环地址;控制端点需要随机令牌;媒体 URL 仅允许带令牌的回环 HTTP 地址;浏览器回执只接受同源请求。 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
同步设计文档与最终实现范围。
本句将选定方向限定为只修改
console.js,且不触碰导入、事务和媒体服务协议。但当前 cohort 同时包含integrations/deepseek-harness/gallery.js、integrations/deepseek-harness/gallery-host.mjs以及核心媒体来源、事务和媒体服务改动。请改为“视觉方向本身不新增协议依赖”,或明确这是设计阶段约束,避免后续维护者误判实现范围。🧰 Tools
🪛 LanguageTool
[uncategorized] ~9-~9: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...纸质媒体清单,把导入动作和已保存主题放在一条连续的纵向轨道里,强调主题切换效率。三版都不依赖新增后端能力,选定后只改
console.js的结构和样式,不动 ...(wa5)
🤖 Prompt for AI Agents