dsh-draft-shield
其他 活跃维护

dsh-draft-shield

johndfowler/dsh-draft-shield

作为Web GUI编辑器辅助插件,可自动拦截浏览器页面翻译对React控制编辑区的干扰,避免未发送的草稿被翻译功能覆盖清空,保障编辑内容不丢失。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
None
开源协议
4 KB
仓库大小
26 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:johndfowler/dsh-draft-shield
git clone https://github.com/johndfowler/dsh-draft-shield.git
git clone git@github.com:johndfowler/dsh-draft-shield.git
README.md master

dsh-draft-shield

DeepSeek Harness Web GUI plugin that stops browser page-translation from wiping composer drafts.

Problem

DSH uses a React-controlled textarea for its message composer. If the browser auto-translates the page (Chrome/Edge/Safari offer this when the GUI renders non-English UI), the translation pass rewrites DOM text nodes mid-typing — and React's next render loses control of the input, so text you just typed disappears from the message box.

This shows up as: type a few characters, the box silently empties. Intermittent, worse while idle, and only in a browser with translation enabled for the site (incognito/extension-free tabs are unaffected).

Fix

Marks the document untranslatable at load:

  • <html translate="no"> + notranslate class
  • <meta name="google" content="notranslate">

Chrome, Edge, and Safari respect these markers and stop offering/applying translation — so nothing rewrites the DOM, and drafts survive, on every profile and device.

Install

cd /Users/jdf/.dsh/profiles/web
pnpm add file:/path/to/dsh-draft-shield
# then append "dsh-draft-shield" to dsh.profile.bundles in package.json,
# and restart `dsh web`.

License

MIT