Choco-Zz/dsh-image-amnesia0

dsh-image-amnesia

历史图片遗忘插件:在请求转发前丢弃历史图片,仅保留最新图片

AI 分析

核心用途是防止多轮对话中历史图片重复上传导致中转 API 报错。适合频繁使用多模态/视觉模型、且受限于中转网关上传大小限制的 DSH 用户。

套件
dsh-image-amnesia
版本
1.0.1
授權
MIT
最近更新
2026年8月31日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Choco-Zz/dsh-image-amnesia

dsh-image-amnesia

A DeepSeek Harness profile bundle that keeps native vision (Grok, Claude, GPT, …) while stopping historical images from being re-uploaded to relay providers on every turn.

The local session still stores every original image. Only the outbound model request is projected. Every agent in the profile — including subagents and task-board jobs — shares the same wrap.

Why

DSH's built-in visual offload defaults are about 20MB / 600 images. Relays (OpenAI-compatible gateways) usually die long before that. Each read_image or paste stays in history and is sent again on the next turn.

This plugin drops oldest images first, and always keeps the newest keepAtLeast image so the current look still reaches a native vision model.

Install

pnpm dsh plugin --profile web add github:Choco-Zz/dsh-image-amnesia
pnpm dsh plugin --profile desktop add github:Choco-Zz/dsh-image-amnesia

Local checkout:

pnpm dsh plugin --profile web add "link:D:/CodexProjects/dsh-image-amnesia"

Install once per profile. You do not install it per agent. Subagents, task-board cron jobs, and new chats in that profile are covered automatically. See AGENTS.md.

Defaults

KeyDefaultMeaning
enabledtrueMaster switch
maxImages1Images kept in the outbound request
maxBytes2097152Byte budget for kept images
keepAtLeast1Never drop the newest N images

Settings → Plugins → Plugin configuration → Image amnesia. Set maxImages to 3 to keep three images in one request. Refresh or restart DSH if the card is missing. You can also edit image-amnesia.maxImages in settings.yaml.

Verify

Paste three images in one session. Host log:

dsh-image-amnesia: dropped 2/3 image(s); kept 1

node --test

License

MIT