DeepSeek Harness plugin

dsh-meme

让 agent 在回复正文内联渲染表情包:inject_meme 工具 + systemPrompt 引导 + webServer 图片路由

Jump to install

Source facts

Repository
omdsh-dev/dsh-meme
Latest update
Aug 14, 2026
Category
Just for Fun
GitHub stars
2
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/omdsh-dev/dsh-meme
Plugin: dsh-meme
Author: omdsh-dev

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

@dsh-external/dsh-meme

让 agent 在回复正文中自然内联渲染一张表情包。agent 通过 inject_meme 工具选取搭配当前语气的表情,得到一段 markdown 图片片段,DSH WebUI 渲染器将其就地渲染成表情图。

效果

agent 回复正文里会出现这种 markdown 图片片段,DSH WebUI 渲染器将其原生渲染成表情图:

![测试通过!](http://127.0.0.1:62537/api/dsh-meme/21-tests-passed.png)

机制

1. inject_meme 工具(模型可见):选一个表情 id,返回可嵌入回复正文的 markdown 图片片段(含 text / image / markdown 字段)。 2. systemPrompt.section:在提示消费时惰性读取 httpServer 端口,给模型一份"如何在回复中自然嵌表情"的强倾向引导 + 完整表情清单,让 agent 每次回复都优先配一张。 3. ctx.httpServer 图片路由 /api/dsh-meme/*.png:流式返回内置 PNG,带多层防护(basename + .png 白名单 + 查表 + existsSync 预检 + stream error 兜底),ENOENT 时干净返回 404,绝不打崩进程。

DSH WebUI 的 markdown 渲染器(packages/client/ui-primitives/src/markdown/render.tsxrenderImage)对绝对 http/https 图片 URL 原生渲染成 <img>,因此本插件不需要 browser client half、不修改渲染器,也不引入任何外部消息协议。

安装

Profile Bundle 方式(推荐)

把插件加入 profile 层:

dsh plugin --profile web add "C:/path/to/dsh-meme"

或在本机通过 $DSH_HOME/cordis.patch.yml 用 server 插件绝对路径引用:

- insert:
    - id: dsh-meme
      name: "file:///C:/Users/12971/.dsh/plugins/dsh-meme/lib/index.js"

验证安装

dsh --profile web --dump-config | grep dsh-meme   # 配置中出现该行即装配成功

可用表情(24 张)

idtext适用语气
daily-chat适合日常对话,即时响应日常问候、即时回应
human-questions人类的怪问题怎么那么多…怪问题、离谱脑洞
use-ai-for-this你拿AI搞这个?这么简单还要用AI
fish-philosophy生鱼忧患,死鱼安乐摆烂、不想干
enough这就够了完成、可以了
server-busy服务器繁忙,请稍后再试限流、超时、503
thinking-stopped思考已停止没思路、无语
great-question哇,这个问题问的真妙!好问题、问得妙
deep-thought已深度思考深度思考、推理
no-thanksNo thanks I use DeepSeek要换模型
self-destruct最近自己搓自己时…自修改
restart-myself我重启一下自己重启、重载
hot-update热更新成功,进程没了热更新、启动失败
restore-session正在恢复会话…resume、恢复会话
browser-left会话太长,浏览器先走一步长会话、浏览器卡
not-stuck我不是卡,我在深度思考卡住、没反应
memory-alive内存正在努力活着内存、OOM
subagents-down已召唤Subagent,已全员中断子代理、委派
plugins插件装得很好,下次别装了插件冲突、上下文爆炸
session-lockedSession没坏,只是打不开了session损坏、加载失败
tests-passed测试通过!测试、CI 全绿
root-cause找到原因了根因、定位到
running-tests正在跑测试跑测试、验证中
fixed-review改好了,你看看修好请验收

开发

node <monorepo>/node_modules/typescript/bin/tsc -p tsconfig.json   # 构建

依赖通过 node_modules junction 链接到 monorepo(vendor/cordispackages/core/{tools,system-prompt,agent}packages/host/webserver.pnpm/@types+node)。新增/替换表情只需更换 assets/memes/*.png 并在 src/catalog.ts 增删对应 Meme 条目(file 与文件名一致),同时递增 src/index.tsMEME_ASSET_REVISION 使浏览器缓存随版本刷新。

边界

  • 图片 URL 使用绝对 loopback 地址 http://127.0.0.1:<port>,从当前进程 httpServer 端口惰性解析,带 ?v= 资产版本号;cache-control: public, max-age=86400, immutable
  • 一回合最多建议 1 张;模型按 system prompt 引导在合适语气处嵌入,不替代实质回答(正式/严肃场景会跳过)。
  • 图片路由只服务内置清单中的 .png:路径穿越、非 .png、未映射文件均返回 404;缺失文件干净 404,不抛未捕获错误。

Known Limitations and Deferred Work

  • 内置 24 张表情来自 DSH 自身的表情素材库(与 DSH WebUI 已有的表情主题一致)。如需更统一的视觉风格或更大的表情集,可整体替换 assets/memes/*.png + 更新 src/catalog.ts
  • 目前仅覆盖 agent→回复正文的嵌入方向;如需用户在输入框主动选表情发送,属于另一插件能力(本插件不承载)。