输入框增强:按工作区缓存新会话草稿、按会话缓存已有会话草稿,切换后自动恢复,发送或清空后不再回填;同时在 @ 补全中增加“插件”分组,选中已安装插件后会把该插件信息作为运行时上下文交给 Agent。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:CatLollipop/dsh-composer-draft-cache
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
DeepSeek Harness(dsh)的输入框增强插件,包含两个能力:
- 草稿缓存:记住尚未发出的输入框草稿,切走再回来时自动填回;已发送或手动清空的草稿不会重新出现。
@插件提及:在输入框里输入@即可选择已安装的社区插件(而不是只能 @ 文件/会话);选中后会插入一个原子引用,Agent 本轮会被明确告知"用户指定使用该插件",并收到该插件的名称与说明。例如:@ui-ux 设计插件的标题 帮我做这个页面的 UI/UE 设计。
A DeepSeek Harness composer-enhancement bundle with two features:
- Draft cache — keeps unsent composer drafts and puts them back when you return: per workspace for "new session" composers (each workspace's new session action opens a fresh blank Session), and per Session id for already-created ("historical") Sessions. Sending or deliberately clearing a draft removes its entry immediately, so submitted content never returns.
@pluginmentions — typing@in the composer now offers one more completion group: the installed community plugins, next to files and Sessions. Picking one inserts an atomic mention chip; the Host half reads the mention from the accepted user message and publishes the selected plugin's metadata as bounded runtime context, so the model knows the user explicitly chose that plugin for this turn.
Features
Draft cache
- Headless: registers one entry in the
conversation.input.dockslot that always rendersnull; no visual footprint, no layout change. - Two scopes: workspace key while the Session is still a new/blank Session, Session-id key once the Session has started.
- Never resurrects sent text: the restore predicate requires that this mount
has not seen any text yet (
sawText); once text was seen, an empty composer means send/clear and the entry is deleted instead of restored. Extra guards discard a new-session entry when its source Session already attempted a prompt (promptAttempted) or is no longer blank. - Performance: composer state is read through primitive selectors
(
draft/ attachment count / submit phase) withObject.isequality, so unrelated store publishes (queue, occurrences, claim, uploads) neither re-render the component nor re-run its effect. No timers, DOM writes, or per-render allocations. - Storage: in-memory map +
sessionStoragemirror underdsh.composer-draft-cache.v1:(workspace:<path>/session:<id>keys). Survives a page reload, discarded when the app window closes; never writes to the Host or the Session log.
@plugin mentions
- Composer menu: a second
@source (plugin) lists enabled community plugins from the HostpluginInventoryRemote, newest snapshot cached for a few seconds; the live query filters by title, module name and description. Core@deepseek-ai/*platform rows are not listed — only plugins you installed on top of the harness. - Atomic mention chip: a pick inserts
@[Title](dsh-plugin:<package name>)as an atomic reference (sourceplugin), displayed as@ Title; the hand-typed shortcut@plugin:<package name>works too. - Model effect: on
agent/pre-stepthe Host half collects mentions from the accepted user messages, keeps them for the turn (later tool-call steps keep the same selection), and publishes a bounded## User-selected pluginsblock throughctx.systemPrompt.context(): display title, package name, Loader entry id and description, plus the instruction that the user asked to use that plugin and that non-existent capabilities must not be invented. Unknown/disabled packages are reported instead of guessed. - Sent-message rendering: a
userTextrule and aconversation.user.text.noderenderer show the mention as a compact inline chip in Chat instead of raw Markdown.
Compatibility
Built and verified against DeepSeek Harness 0.2.1-rc.2 (Desktop profile). Uses documented extension seams only:
- Client:
slots,inputTriggers.registerSource,uiConversation.userText,remote.pluginInventory,locale. - Host:
loader,systemPrompt.context, theagent/pre-stepwaterfall (returns the downstream decision unchanged and only records the selection).
It does not import Harness Client packages; UI styling uses --dsw-alias-*
theme tokens only.
Install
Put this directory anywhere on disk (e.g. a workspace folder).
Install it as a profile bundle through the Plugin Manager, or with the
plugin_managertool:plugin_manager action=install_bundle target=<absolute path to this directory>Refresh the Web GUI once. Verify the live registration: the
composer-draft-cacheentry appears inconversation.input.dock, and thepluginentry inconversation.user.text.node.
Usage
- Type into a workspace's "new session" composer, switch to another workspace, then open that workspace's "new session" again — the draft is back.
- Type into any Session, switch away and return — that Session's draft is back.
- Send or delete the draft — it is gone and will not come back.
- Type
@in the composer: files and Sessions appear as before, and a Plugins group lists installed community plugins. Pick one (for example a UI/UE design plugin), then describe the task; the agent receives the plugin's metadata as explicit runtime context for that turn. - You can also hand-type
@plugin:<package name>.
Limitations
- Drafts containing reference/command chips are restored as their plain clipboard text; attached images/files are not restored.
- The draft cache lives with the browser page: closing the app window clears it.
@plugincompletion lists Loader-visible plugins (a community plugin needs at least one Host row, which everydsh.bundlepatch normally inserts). A client-only package without a Host row is not listed; hand-typing its exact package name still reaches the model as a mention but without injected metadata.- The mention selection applies while its turn runs; a later turn without any mention clears it.
- The
@source registers underplugin; on a page that went through several hot reloads of this plugin it may fall back toplugins/plugin-mentions(and the two extra names exist as serializer aliases). A normal page reload restores the preferred name.
Development
node --check client.js index.js lib/mentions.js
node --test test/logic.test.mjs test/mentions.test.mjs
test/logic.test.mjsloads the realclient.jsin avmsandbox with a stub React hook dispatcher and stub Slot/session/locale/inventory services: draft cache scenarios, restore/send/clear guards, and the@plugincompletion source, pick serialization and sent-message rule.test/mentions.test.mjscovers the pure mention parsing/rendering helpers and drivesindex.jsagainst a stub Cordis context the way the agent loop does (runtime-context provider +agent/pre-stepwaterfall).
License
MIT — see LICENSE.
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10406
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10406
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 7675
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7201
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 5142
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
Devin-AXIS/deepseek-design#deepseek-idesign★ 1816
可视化设计工作室,支持网站、App 原型、海报、信息卡、报告和杂志的模板创建、元素编辑、选区级 AI 草稿衔接与导出。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。