packages/dsh-task-board
zhu1090093659/dsh-web侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
把输入框的模型控件换成 PI-Desktop 风格的选择器:双栏菜单(搜索、按 provider 分组、上下文窗口与能力徽标)、推理强度滑块、↑/↓ 提示词历史回溯,以及带撤销的提示词改写按钮。
把 PI-Desktop 的输入框控件搬进 DeepSeek Harness 的 composer:模型选择、推理强度、提示词历史回溯与提示词改写。
中文 | English

插件在 composer 上占用三个插槽,各自独立工作。
conversation.input.model以 priority: -20 注册,覆盖内置的模型控件(数值越低越优先渲染),因此输入框里看到的是这个 chip。
DeepSeek V4 Pro · high)。1M、262.1K、128K),支持推理与图片输入的模型带徽标。{ provider, model },然后退回根面板。conversation.input.left不渲染任何控件,只接管键盘:草稿为空时按 ↑ 从最近一条已发送提示往回走(最多 40 条),↓ 往前走并在越界时清空草稿;一旦手动编辑草稿,回溯立即结束。
conversation.input.right一个 Sparkles 按钮,落在 composer 工具栏的 right 座位(宿主把它渲染在模型 chip 左侧,见下方截图)。
/ 开头的草稿不改写。pi_composer_custom_providers_v1 里有可用的自定义 Provider,草稿会 POST 到它的 OpenAI 兼容 /v1/chat/completions(7 秒超时,草稿会离开本机)。display: none,Provider Studio 面板没有接线。要用自定义 Provider,得自己往 localStorage 写这个键。:root,跟随宿主的深色标记 body[data-ds-dark-theme](DSH 主题包写入的就是这个标记),也支持 prefers-color-scheme: dark。title / aria 文案目前是硬编码中文,英文界面下也会显示中文。插件市场(收录后):设置 → 插件市场,搜索 dsh-pi-composer 一键安装。
命令行(自管 profile):
dsh plugin --profile <profile> add https://github.com/pomelo-ccc/dsh-pi-composer/releases/download/v1.1.2/dsh-pi-composer-1.1.2.tgz
这条 URL 钉住了 tag 与文件名,发下一个版本时换成新的 tag / 文件名即可(latest/download/<版本无关文件名> 虽然看起来更省事,但 pnpm 会按 URL 缓存解析结果,URL 背后内容一变,重新安装就会报 ERR_PNPM_MISSING_TARBALL_INTEGRITY;实测如此)。
Desktop 应用的 desktop profile 由 Electron 应用独占管理,CLI 会拒绝写入,请在插件市场里安装。
手动接入:把仓库目录作为 link: 依赖加入 profile 的 package.json,并在 dsh.profile.bundles 里列出本包。
四张截图都用本仓库的 client.js 在无头 Chromium 中挂载真实组件渲染,模型目录使用示例数据(DeepSeek 账号 / DeepSeek / 阿里百炼 三组,共 4 个模型),深浅色分别用宿主的 body[data-ds-dark-theme] 标记切换。
| 根面板(浅色) | 模型面板(浅色) | 模型面板(深色) | 根面板(深色) |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
engines.dsh:>=0.1.0-rc.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0slots / locale 服务;dsh.client.inject 已声明 dsh-client-ui-conversation、dsh-client-ui-model-selection、dsh-client-locale。react / react-dom 由宿主客户端模块加载器提供。结构、类名、CSS 规则、图标字形、token 格式与交互契约以 PI-Desktop 的实现为蓝本:
apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
apps/desktop/src/features/chat/composer/ComposerModelList.tsx
apps/desktop/src/features/chat/composer/ThinkingLevelSlider.tsx
apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts
apps/desktop/src/features/chat/composer/hooks/useComposerInputHistory.ts
apps/desktop/src/components/settings/AnchoredMenu.tsx
apps/desktop/src/styles/composer*.css
packages/shared/src/model-catalog.ts
本仓库自己写的部分:颜色层与设计令牌(DSH 里没有 PI-Desktop 的 --ds-* 调色板,这里自带浅色 / 深色两套令牌,由宿主深色标记切换)、DSH 客户端接线(模块加载器入口、插槽注册、目录映射、locale 注册)以及测试。移植范围与原创部分逐文件列在 NOTICE。
npm test
测试在 Node vm 里按浏览器模块加载器的方式加载 client.js,用最小 hook 运行时驱动组件,断言注册 id、声明式注入、chip 文案、两栏菜单结构、搜索过滤、选择提交、滑块的键盘规则与历史监听器。
GNU Lesser General Public License v3.0(SPDX LGPL-3.0-only),全文见 LICENSE。
本仓库是 PI-Desktop(https://github.com/vastsa/PI-Desktop,同为 LGPL-3.0)部分实现的移植;移植了哪些文件、哪些是本仓库原创,见 NOTICE。
Composer controls for DeepSeek Harness, ported from PI-Desktop.
conversation.input.model, priority -20, shadows the built-in control): a chip showing model · effort, a two-pane menu (root pane: current model cell + reasoning-effort slider; model pane: search plus provider-grouped model list with context-window formatting and reasoning/vision badges), and selection that submits { provider, model } to the model directory.conversation.input.left): no visible control; an empty draft plus ↑ walks back through up to 40 accepted prompts, ↓ walks forward, and editing the draft ends the browse.conversation.input.right): a Sparkles button with undo, sitting left of the model chip. With a usable custom provider in localStorage key pi_composer_custom_providers_v1 the draft is POSTed to its OpenAI-compatible /v1/chat/completions (7s timeout); otherwise a built-in heuristic template rewrites it locally with no network request. No UI in this plugin writes that key yet.:root only and follow the host's dark marker body[data-ds-dark-theme], plus prefers-color-scheme: dark. Dictionaries ship in zh and en (the rewrite button's titles are still hardcoded Chinese).Install via the plugin market, or:
dsh plugin --profile <profile> add https://github.com/pomelo-ccc/dsh-pi-composer/releases/download/v1.1.2/dsh-pi-composer-1.1.2.tgz
Screenshots are rendered from this repository's real client.js in headless Chromium against a sample model directory; dark shots use the host's body[data-ds-dark-theme] marker.
LGPL-3.0 (SPDX LGPL-3.0-only) — see LICENSE and NOTICE for the ported scope.