@logictan/dsh-easyrewrite 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Renzic-Stone
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,215 @@
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Renzic-Stone/DSH-EasyRewrite/main/assets/logo-dark.png" />
4
+ <img src="https://raw.githubusercontent.com/Renzic-Stone/DSH-EasyRewrite/main/assets/logo.png" alt="dsh-easyrewrite" width="320" />
5
+ </picture>
6
+
7
+ # DSH-EasyRewrite
8
+
9
+ [中文](README.md) | [日本語](README.ja.md)
10
+
11
+ <a href="https://www.npmjs.com/package/dsh-easyrewrite"><img src="https://img.shields.io/npm/v/dsh-easyrewrite?style=flat-square&label=npm&color=4d6bfe" alt="npm version"></a> <a href="https://github.com/Renzic-Stone/DSH-EasyRewrite/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Renzic-Stone/DSH-EasyRewrite?style=flat-square&label=license" alt="license"></a> <a href="https://github.com/Renzic-Stone/DSH-EasyRewrite/stargazers"><img src="https://img.shields.io/github/stars/Renzic-Stone/DSH-EasyRewrite?style=flat-square&label=stars&color=f1c40f" alt="stars"></a> <a href="https://www.npmjs.com/package/dsh-easyrewrite"><img src="https://img.shields.io/npm/dm/dsh-easyrewrite?style=flat-square&label=downloads&color=2ea44f" alt="downloads"></a> <a href="https://dshfind.com/en/plugins/Renzic-Stone/DSH-EasyRewrite?ref=badge"><img src="https://dshfind.com/api/badge/Renzic-Stone/DSH-EasyRewrite?metric=downloads&lang=en" alt="dshfind"></a>
12
+
13
+ `#dsh` `#deepseek-harness` `#recall` `#rewrite` `#bubble-edit` `#version-pager` `#i18n` `#multilingual`
14
+
15
+ </div>
16
+
17
+ **Inline-edit & recall your own user messages in the DeepSeek Harness Web UI — lazily, seamlessly, and without ever losing your work.**
18
+
19
+ Click your own message bubble to edit it in place; hit the recall button beside copy to withdraw it and everything after it. Nothing is ever really changed until you commit — the conversation, the model context, and the session log stay untouched until you press **Confirm** (rewrite) or **Send** (recall).
20
+
21
+ > Compatible with DeepSeek Harness Web (**2.4.0 requires dsh 0.1.2-rc.1+**; users on dsh 0.1.1-rc.2 and older hosts, please stay on **2.3.1** — the final release of that line, fully functional, no further features). Built on official extension points only — no source patches.
22
+
23
+ ---
24
+
25
+ ## 📸 Visual Tour
26
+
27
+ <div align="center">
28
+ <img src="docs/images/drag-drop-dual-dropzone.png" alt="Dual dropzone and synchronized expansion" width="920" />
29
+ <p><em>✨ <b>Dual-dropzone & synchronized 2.5x expansion</b>: smart drag-and-drop dispatch (drop onto the bubble to add images to current edit, or drop into the 2.5x expanded bottom composer to stage for new sessions — strictly isolated with zero leakage)</em></p>
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## Quick Start
35
+
36
+ ```sh
37
+ # One-line install via npm
38
+ dsh plugin --profile web add dsh-easyrewrite
39
+ ```
40
+
41
+ ## Features (what we've built)
42
+
43
+ ### Bubble Inline Edit (Rewrite) — Shipped (M2/M4)
44
+ - **Click to edit**: Click your message bubble to enter inline editing directly (original Markdown source preserved), Esc to cancel / Ctrl+Enter to confirm.
45
+ - **Adjustable width modes**: Compact (starts at bubble width, up to 360px) / Standard (fixed 360px) / Expanded (full message width) / Custom, with automatic vertical expansion and smooth inner scrolling.
46
+ - **On-the-spot model & effort switching**: Native dropdown menu embedded inside the bubble editor allows instant switching of provider, model, and reasoning effort for the resend.
47
+ - **Rich image support & drag-drop management**: Multi-image messages render in equal-width thumbnail strips, supporting individual `×` deletion, clipboard paste, and drag-and-drop addition. Edits survive tab switching and page reloads.
48
+
49
+ <div align="center">
50
+ <img src="docs/images/bubble-edit-active.png" alt="Bubble inline edit" width="380" />
51
+ &nbsp;&nbsp;
52
+ <img src="docs/images/bubble-edit-model-select.png" alt="Model & reasoning selection" width="380" />
53
+ </div>
54
+ <div align="center" style="margin-top: 8px;">
55
+ <img src="docs/images/bubble-edit-images.png" alt="Bubble image editing" width="380" />
56
+ </div>
57
+
58
+ <br>
59
+
60
+ ### Message Recall (撤回) — Done, End to End
61
+ - **Native & frictionless action**: Permanent recall button placed cleanly next to the official copy button on hover.
62
+ - **Inline confirmation capsule**: Native-styled capsule (`撤回这条消息及其后 x 条提问?` + Confirm / Cancel pills), calculating the exact count of subsequent user prompts to be truncated in real time.
63
+ - **Lazy commit & "正在修改" editing bar**: Confirming only populates the composer with a top editing bar; truncation only commits when you press **Send**. Cancelling (`×`) at any point cleanly restores your draft with zero context disruption.
64
+ - **Seamless replacement & context folding**: Subsequent conversation turns are automatically folded and hidden during edit. Resending archives the original session and seamlessly replaces it with the truncated new session.
65
+
66
+ <div align="center">
67
+ <img src="docs/images/message-hover-actions.png" alt="Message hover actions" width="220" />
68
+ &nbsp;&nbsp;
69
+ <img src="docs/images/recall-confirm-capsule.png" alt="Inline confirmation capsule" width="300" />
70
+ </div>
71
+ <div align="center" style="margin-top: 8px;">
72
+ <img src="docs/images/recall-editing.png" alt="Recall editing and context fold" width="780" />
73
+ </div>
74
+
75
+ <br>
76
+
77
+ ### Version Pager (< X >) — Shipped (M3)
78
+ - **Seamless history version navigation**: The **`‹ X/N ›`** control is embedded directly inside the action strip of the final reply after every recall/edit resend.
79
+ - **Context synchronization**: Clicking arrows (or pressing ←/→ keys) toggles the target branch, and **all subsequent dialogue context automatically syncs with the active version**.
80
+ - **Archive swap & smooth viewport anchoring**: The workspace list keeps only one active session at any time, while the chat viewport stays rock-solid without jumping.
81
+
82
+ <div align="center">
83
+ <img src="docs/images/version-pager.png" alt="Version pager" width="620" />
84
+ </div>
85
+
86
+ <br>
87
+
88
+ ### Settings & Customization — Shipped (M3/M4)
89
+ - **Integrated settings card**: Integrates into **Settings → Plugins → EasyRewrite** with native design tokens and automatic trilingual localization (中文 / English / 日本語).
90
+ - **Rich toggles & fine-grained control**:
91
+ - Bubble edit toggle & fallback recall button
92
+ - Bubble editor width presets (Compact / Standard / Expanded / Custom)
93
+ - Recall confirmation capsule & visual display modes (Simple / Minimal / Info)
94
+ - Customizable shortcut recording (trigger recall with one keystroke when composer is unfocused)
95
+ - Composer conflict resolution (Overwrite mode safely restores pre-existing draft upon send/cancel)
96
+ - Full version history tree explorer with manual restoration
97
+ - Built-in one-click plugin update check & auto-upgrade
98
+
99
+ <div align="center">
100
+ <img src="docs/images/settings-panel-1.png" alt="Settings panel part 1" width="440" />
101
+ &nbsp;&nbsp;
102
+ <img src="docs/images/settings-panel-2.png" alt="Settings panel part 2" width="440" />
103
+ </div>
104
+
105
+ <br>
106
+
107
+ ### Draft Auto-Backup — Shipped (M3)
108
+ - Pending drafts untouched for over 10 seconds with recent changes are safely backed up locally; deleted immediately upon Confirm/Send.
109
+ - Path: `$DSH_HOME/dsh-easyrewrite/backups/<sessionId>.json`.
110
+ - Crash recovery: restores draft automatically only when there is no active local draft — never overwriting your live input.
111
+
112
+ ---
113
+
114
+ ## How we differ from similar plugins
115
+
116
+ | Capability | dsh-easyrewrite | Other recall/edit plugins |
117
+ | :--- | :---: | :--- |
118
+ | Recall | ✅ | Basic capability |
119
+ | **Seamless replacement** (feels like a *native* feature — frictionless edit-resend) | ✅ | Basic capability, but ours is **more refined** |
120
+ | **Lazy commit** (context changes only after you confirm; closing mid-way changes nothing) | ✅ | Some competitors edit immediately, causing cache-hit / context issues |
121
+ | **Bubble inline edit (Rewrite)** | ✅ | **No comparable feature in any competitor** |
122
+ | **Version pager < X >** (switch history versions — a **gold-standard design** proven by countless Chatbox users) | ✅ | **No comparable feature in any competitor** |
123
+ | **Draft persistence + timeout auto-backup + crash recovery** (solid recovery that protects every bit of your thinking) | ✅ | **No comparable feature in any competitor** |
124
+ | **Attachment-preserving edit resend** | ✅ | No comparable feature in any competitor |
125
+ | **Official extension points only** (zero source patches, clean uninstall) | ✅ | Competitors rely on source patches — hard to uninstall, complex dependencies |
126
+ | Trilingual UI & i18n | ✅ | Few have proper i18n; we natively support multiple languages with three presets |
127
+ | **Every feature can be toggled off** | ✅ | **No competitor does it better** |
128
+
129
+ ---
130
+
131
+ ## Design philosophy
132
+
133
+ **1. Simple to use, easy to onboard, compatible by contract**
134
+
135
+ - Interactions need no manual: **click the bubble to edit, recall key sits beside copy** — no new concepts, no new entry points.
136
+ - Sensible defaults: the default settings are the right choice for most scenarios; install, restart, done.
137
+ - Compatibility is a hard promise: only official extension points (keyed slot override, official `sessions.fork` RPC, official components & design tokens) — **no source patches, no brittle internal APIs**, actively adapted across DSH releases.
138
+ - Uninstall restores everything; nothing of your install is left behind.
139
+
140
+ **2. Faithful to the original experience — seamless & invisible**
141
+
142
+ - UI language follows dsh's native design (grey-blue palette, rounded corners, pills, official icons), dark/light theme aware — feels like an official feature, not "another plugin skin".
143
+ - Original interactions stay intact: copy key, hover timestamps, bubble look — all preserved.
144
+ - **Invisible**: day-to-day use barely notices the plugin — features live where you expect them, results match intuition; no popups, no interrupted rhythm.
145
+ - **Lazy commit** is the foundation: entering edit mode or confirming a recall is purely local draft state; **context changes only at "确定" (rewrite) or "发送" (recall)**. Close dsh mid-way and nothing moves.
146
+ - **Seamless replacement**: after a recall it *feels* like the original conversation was edited — the old session is archived, a same-titled replacement takes over, and your edited text is sent for you. No "a new conversation appeared" split.
147
+ - **Bubble edit (landing soon)**: click the bubble to edit in place, what you edit is what you send — the natural extension of the same seamless philosophy.
148
+
149
+ **3. Persistent & accident-proof**
150
+
151
+ - Edit/recall drafts **persist per session**: switching chats, refreshing, even restarting dsh — progress resumes where you left it. No "lost half-written" moments.
152
+ - In overwrite mode the pre-recall draft is restored after both send and cancel — **no data loss on any path**.
153
+ - Long-idle pending drafts auto-backup to local files (removed once handled) — a safety net for the extreme case.
154
+ - Every destructive step has a confirm and an undo path: confirmation capsule, × cancel, one-pending-per-session — **mistakes are recoverable, data is never lost**.
155
+
156
+ **4. Complete logging, fast diagnosis**
157
+
158
+ - Every client step (load, confirm, pending, send-hook, fork, resume) is reported to the host and written to a unified log: `$DSH_HOME/dsh-easyrewrite.log`.
159
+ - Uniform format (JSON lines: time / level / tag / message / data) — one reproduction is enough to locate the issue, no back-and-forth descriptions.
160
+ - Host behaviour lands in the same log (requests, rejection reasons, exceptions), so both halves reconcile on one trail.
161
+ - Logs stay local; nothing is uploaded.
162
+
163
+ **5. Continuously updated, actively compatible**
164
+
165
+ - Follows DSH releases (rc.x → stable); upstream API changes are adapted promptly.
166
+ - Semantic versioning + CHANGELOG; breaking changes announced in advance.
167
+ - Community-driven: issues and PRs answered, new ideas and scenarios folded into the roadmap.
168
+
169
+ ---
170
+
171
+ ## Install
172
+
173
+ ```sh
174
+ # npm (published)
175
+ dsh plugin --profile web add dsh-easyrewrite
176
+ # or from GitHub
177
+ dsh plugin --profile web add github:Renzic-Stone/DSH-EasyRewrite
178
+ ```
179
+
180
+ Restart `dsh web`, hard-refresh (`Ctrl+Shift+R`), done.
181
+
182
+ > A note on **when recall works**: DSH forks only at closed-turn boundaries, so a message inside a still-open turn cannot be truncated yet — wait for the reply to finish, then recall. (The UI tells you: `该消息所在回合尚未结束…`)
183
+
184
+ ---
185
+
186
+ ## Debugging
187
+
188
+ Every client step is reported to the host and written to a unified log:
189
+
190
+ ```
191
+ $DSH_HOME/dsh-easyrewrite.log # e.g. ~/.dsh/dsh-easyrewrite.log
192
+ ```
193
+
194
+ JSON lines: `{ t, level, tag, message, data }`.
195
+
196
+ ---
197
+
198
+ ## Structure
199
+
200
+ ```
201
+ dsh-easyrewrite/
202
+ ├── lib/index.js # host half: boundary resolution + /bubble/recall, /bubble/log
203
+ ├── src/client.src.js # client template (icons inlined at build)
204
+ ├── assets/ # recall / edit icons (PNG, theme-adaptive via CSS invert)
205
+ ├── build.mjs # assets → data-URL → lib/client.js
206
+ ├── DESIGN.md # full interaction design (v1.0, 20 product decisions)
207
+ ├── PROJECT_PLAN.md # roadmap, architecture, git workflow
208
+ └── docs/ # api-facts, m0-verify
209
+ ```
210
+
211
+ ---
212
+
213
+ ## License
214
+
215
+ MIT
package/README.ja.md ADDED
@@ -0,0 +1,215 @@
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Renzic-Stone/DSH-EasyRewrite/main/assets/logo-dark.png" />
4
+ <img src="https://raw.githubusercontent.com/Renzic-Stone/DSH-EasyRewrite/main/assets/logo.png" alt="dsh-easyrewrite" width="320" />
5
+ </picture>
6
+
7
+ # DSH-EasyRewrite
8
+
9
+ [中文](README.md) | [English](README.en.md)
10
+
11
+ <a href="https://www.npmjs.com/package/dsh-easyrewrite"><img src="https://img.shields.io/npm/v/dsh-easyrewrite?style=flat-square&label=npm&color=4d6bfe" alt="npm version"></a> <a href="https://github.com/Renzic-Stone/DSH-EasyRewrite/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Renzic-Stone/DSH-EasyRewrite?style=flat-square&label=license" alt="license"></a> <a href="https://github.com/Renzic-Stone/DSH-EasyRewrite/stargazers"><img src="https://img.shields.io/github/stars/Renzic-Stone/DSH-EasyRewrite?style=flat-square&label=stars&color=f1c40f" alt="stars"></a> <a href="https://www.npmjs.com/package/dsh-easyrewrite"><img src="https://img.shields.io/npm/dm/dsh-easyrewrite?style=flat-square&label=downloads&color=2ea44f" alt="downloads"></a> <a href="https://dshfind.com/ja/plugins/Renzic-Stone/DSH-EasyRewrite?ref=badge"><img src="https://dshfind.com/api/badge/Renzic-Stone/DSH-EasyRewrite?metric=downloads&lang=ja" alt="dshfind"></a>
12
+
13
+ `#dsh` `#deepseek-harness` `#撤回` `#バブル編集` `#取り消し` `#バージョンページャー` `#i18n` `#多言語`
14
+
15
+ </div>
16
+
17
+ **DeepSeek Harness Web で自分のメッセージをインライン編集・撤回——遅延・シームレス・データ損失ゼロ。**
18
+
19
+ 自分のメッセージバブルをクリックすればその場で編集、コピーキーの隣の撤回キーでそのメッセージと以降の内容をすべて撤回できます。**すべての変更はあなたが本当に確認した後にのみ発生します**——「確定」(編集)または「送信」(撤回)を押すまでは、会話・モデルコンテキスト・セッションログは一切変わりません。
20
+
21
+ > DeepSeek Harness Web(**2.4.0 は dsh 0.1.2-rc.1+ が必要**。0.1.1-rc.2 以前のホストのユーザーは **2.3.1** に留まってください——このラインの最終版で、機能は完全に動作しますが新機能は追加されません)対応。公式拡張ポイントのみを使用し、DSH ソースコードは変更しません。
22
+
23
+ ---
24
+
25
+ ## 📸 インターフェース一覧 / Visual Tour
26
+
27
+ <div align="center">
28
+ <img src="docs/images/drag-drop-dual-dropzone.png" alt="デュアルドロップゾーンと連動拡大" width="920" />
29
+ <p><em>✨ <b>独創的なデュアルドロップと連動拡大</b>:画像ドラッグ時のスマート振り分け(上部バブルへドロップで現在編集中のメッセージに追加、下部へドロップで2.5倍に滑らか拡大した入力欄へ新セッション用に一時保管——2区画が完全隔離され誤送信ゼロ)</em></p>
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## クイックスタート
35
+
36
+ ```sh
37
+ # npm からワンクリックインストール
38
+ dsh plugin --profile web add dsh-easyrewrite
39
+ ```
40
+
41
+ ## 実装済み機能
42
+
43
+ ### バブルインライン編集(Rewrite)——実装済み(M2/M4)
44
+ - **クリックでその場編集**:自分のメッセージバブルをクリックするだけでインライン編集モードへ(元の Markdown 原文を保持)、Esc でキャンセル / Ctrl+Enter で確定。
45
+ - **編集幅プリセット**:コンパクト(バブル幅連動、上限 360px)/ スタンダード(固定 360px)/ エクステンド(メッセージ行全幅)/ カスタム、自動伸長&内部スムーズスクロール。
46
+ - **モデルと推论レベルのその場切替**:編集枠内に組み込まれたドロップダウンメニューから、再送時のモデルおよび推論深度(Reasoning Effort)を直接変更可能。
47
+ - **画像メッセージの完全編集&ドラッグ追加**:複数画像は等幅サムネイル列で表示。個別の `×` 削除、クリップボード貼り付け、ドラッグ&ドロップ追加に対応し、更新後も編集状態が復元。
48
+
49
+ <div align="center">
50
+ <img src="docs/images/bubble-edit-active.png" alt="バブルインライン編集" width="380" />
51
+ &nbsp;&nbsp;
52
+ <img src="docs/images/bubble-edit-model-select.png" alt="モデル・推論レベル切替" width="380" />
53
+ </div>
54
+ <div align="center" style="margin-top: 8px;">
55
+ <img src="docs/images/bubble-edit-images.png" alt="画像編集プレビュー" width="380" />
56
+ </div>
57
+
58
+ <br>
59
+
60
+ ### 撤回(Recall)——エンドツーエンド完了
61
+ - **ネイティブな操作性**:各ユーザーメッセージの公式コピーキーの隣に撤回キーが常駐、ホバーで自然に表示。
62
+ - **インライン確認カプセル**:公式デザインと調和したグレーカプセル(`このメッセージと後続の x 件の質問を撤回しますか?` + 確定/キャンセル)、切り詰められる後続質問数をリアルタイムに自動集計。
63
+ - **遅延コミットと「変更中」バー**:確認しても入力欄に元下書きが反映されるのみ。実際の切り詰めは「送信」を押した瞬間に実行。途中で `×` を押せば元の下書きへ即座に復元され、会話や文脈は一切破壊されません。
64
+ - **シームレス置換&後続文脈の折りたたみ**:編集中や撤回待機中は後続メッセージを自動で非表示化。再送後は元セッションがアーカイブされ、同名の新セッションへ違和感なく切り替わります。
65
+
66
+ <div align="center">
67
+ <img src="docs/images/message-hover-actions.png" alt="メッセージホバー操作" width="220" />
68
+ &nbsp;&nbsp;
69
+ <img src="docs/images/recall-confirm-capsule.png" alt="インライン確認カプセル" width="300" />
70
+ </div>
71
+ <div align="center" style="margin-top: 8px;">
72
+ <img src="docs/images/recall-editing.png" alt="撤回編集中とコンテキスト折りたたみ" width="780" />
73
+ </div>
74
+
75
+ <br>
76
+
77
+ ### バージョンページャー(< X >)——実装済み(M3)
78
+ - **多バージョン間のシームレス切替**:撤回・編集再送を行うたび、回答末尾のアクションバーに **`‹ X/N ›`** ページャーが自動挿入。
79
+ - **コンテキスト完全連動**:矢印をクリック(または ←/→ キー)すると、**後続の会話全体がアクティブなバージョンに追従して即時更新**。
80
+ - **ビューポート固定&アーカイブ交換**:ワークスペース一覧には常に1つのアクティブセッションのみが保持され、画面のスクロール位置が飛ばずに滑らかに切り替わります。
81
+
82
+ <div align="center">
83
+ <img src="docs/images/version-pager.png" alt="バージョンページャー" width="620" />
84
+ </div>
85
+
86
+ <br>
87
+
88
+ ### 設定センター&詳細カスタマイズ(Settings)——実装済み(M3/M4)
89
+ - **公式準拠の折りたたみ設定カード**:**設定 → プラグイン → EasyRewrite** にシームレスに統合、システム言語に完全連動(中文 / English / 日本語)。
90
+ - **充実のオプション一覧**:
91
+ - バブル編集の全体スイッチ、オフ時の代替撤回キー表示
92
+ - 編集幅プリセット(コンパクト / スタンダード / エクステンド / カスタム)
93
+ - 撤回確認カプセルの表示切替、原文確認時の画像表示、3種の表示モード(シンプル / ミニマル / インフォ)
94
+ - ショートカットキー録音(入力欄フォーカス外で直近のメッセージをワンキー撤回)
95
+ - 入力欄反映モード(上書きモードでは送信・キャンセル後に元の下書きを完全復元)
96
+ - バージョン履歴ツリーの閲覧と手動復元
97
+ - プラグイン組み込みの更新チェックとワンクリック更新
98
+
99
+ <div align="center">
100
+ <img src="docs/images/settings-panel-1.png" alt="設定カード(上部)" width="440" />
101
+ &nbsp;&nbsp;
102
+ <img src="docs/images/settings-panel-2.png" alt="設定カード(下部)" width="440" />
103
+ </div>
104
+
105
+ <br>
106
+
107
+ ### 下書き自動バックアップ——実装済み(M3)
108
+ - 10秒以上操作されず変更があった下書きは、自動でローカルファイルへ安全にバックアップ。「確定 / 送信」完了時に自動削除。
109
+ - 保存先:`$DSH_HOME/dsh-easyrewrite/backups/<セッションID>.json`。
110
+ - 復元フォールバック:ローカルに保留状態がない場合のみバックアップから復元——現在編集中の下書きを破壊することはありません。
111
+
112
+ ---
113
+
114
+ ## 類似プラグインとの違い
115
+
116
+ | 機能 | dsh-easyrewrite | 他の撤回・編集プラグイン |
117
+ | :--- | :---: | :--- |
118
+ | 撤回(Recall) | ✅ | 基本機能 |
119
+ | **シームレス置換**("ネイティブ機能のよう"に感じる、違和感のない再送) | ✅ | 基本機能ですが、こちらが**より洗練** |
120
+ | **遅延コミット**(確認後にのみ context を変更、途中で閉じても変更なし) | ✅ | 一部の競合は即時変更し、キャッシュヒット/context 問題を引き起こす |
121
+ | **バブルインライン編集(Rewrite)** | ✅ | **競合に同機能なし** |
122
+ | **バージョンページャー < X >**(履歴切替、無数の Chatbox ユーザーに検証された**黄金デザイン**) | ✅ | **競合に同機能なし** |
123
+ | **下書き永続化 + 自動バックアップ + 異常時復元**(思考の結晶を守る充実した復元ロジック) | ✅ | **競合に同機能なし** |
124
+ | **編集再送で添付(画像)保持** | ✅ | 競合に同機能なし |
125
+ | **公式拡張ポイントのみ**(ソースパッチなし、アンインストールで完全復元) | ✅ | 競合はソースパッチ依存——アンインストール困難、依存複雑 |
126
+ | 3言語 UI と i18n | ✅ | まともな i18n はほぼなし。多言語をネイティブ対応し、3 言語プリセット |
127
+ | **全機能を個別にオフ可能** | ✅ | **競合でこれより優れたものはない** |
128
+
129
+ ---
130
+
131
+ ## 設計哲学
132
+
133
+ **1. シンプル・使いやすい・互換性が高い(Simple & Compatible)**
134
+
135
+ - 説明書いらずの直感的操作:**バブルをクリックして編集、コピーキーの隣で撤回**——新しい概念や入口はありません。
136
+ - デフォルトが最適解:インストールしてすぐ使え、設定不要。
137
+ - 互換性はハードな約束:公式拡張ポイントのみを使用(keyed スロット、公式 fork RPC、公式コンポーネント・デザイントークン)、**ソースに触れず、壊れやすい内部 API に依存せず**、DSH のアップデートには積極的に追従。
138
+ - アンインストールで完全復元:設定の残骸も公式ファイルの変更もなし。
139
+
140
+ **2. オリジナル体験の維持、シームレス・無感覚(Faithful, Seamless & Invisible)**
141
+
142
+ - UI は dsh のネイティブスタイル(グレーブルー、角丸、カプセル、公式アイコン)、ダーク/ライトテーマ対応——"プラグインのスキン"ではなく公式機能のようです。
143
+ - 既存の操作はそのまま:コピーキー、ホバー時刻、バブル外観——すべて維持。
144
+ - **無感覚**:日常使用ではプラグインの存在をほぼ感じません——機能はあるべき場所にあり、結果は直感どおり。ポップアップで邪魔せず、リズムを崩しません。
145
+ - **遅延コミット**が体験の基盤:編集開始・撤回確認はローカルの下書き状態に過ぎず、**context は「確定」(rewrite)または「送信」(recall)でのみ変更**。途中で dsh を閉じても何も変わりません。
146
+ - **シームレス置換**:撤回後は"元の会話が編集された"ように感じます——元セッションはアーカイブ、同名セッションが引き継ぎ、編集済みテキストを自動送信。"新しい会話が現れた"という分断はありません。
147
+ - **バブル編集(近日公開)**:クリックでその場編集、見たままが送信内容——同じシームレス哲学の自然な延長です。
148
+
149
+ **3. 永続化と誤操作防止、データゼロ損失(Persistent & Accident-proof)**
150
+
151
+ - 編集/撤回の下書きは**セッション単位で永続化**:会話切替・リフレッシュ・dsh 再起動でも進捗はそのまま——"書いたものが消えた"はありません。
152
+ - 上書きモードでは、送信・キャンセル後も元の下書きが復元——**どの操作経路でもデータは失われません**。
153
+ - 保留中の下書きが長時間放置されるとローカルファイルに自動バックアップ(処理完了後に削除)——極端なケースでもセーフティネット。
154
+ - 破壊的操作にはすべて確認と取り消しの道:確認カプセル、× キャンセル、セッションごと 1 保留——**ミスは取り消せ、データは失われない**。
155
+
156
+ **4. 充実したログ体制(Log Everything, Diagnose Fast)**
157
+
158
+ - 全ステップを打点:client の各重要ステップ(ロード、確認、保留、送信フック、fork、resume)が自動で host に報告され、`$DSH_HOME/dsh-easyrewrite.log` に統一記録。
159
+ - 統一フォーマット(JSON 行:時刻 / レベル / タグ / メッセージ / データ)——再現 1 回で特定可能、問題の説明を何度も繰り返す必要はありません。
160
+ - host 自身の挙動も同じログに(リクエスト、拒否理由、例外)——前後端が一つのトレースで照合できます。
161
+ - ログはローカルのみ、アップロードは一切なし。
162
+
163
+ **5. 継続更新、積極的な互換対応(Keep Moving)**
164
+
165
+ - DSH のバージョン遷移(rc.x → 安定版)に追従、上流 API の変化には即時対応。
166
+ - セマンティックバージョニング + CHANGELOG、破壊的変更は事前告知。
167
+ - コミュニティ駆動:issue / PR に積極対応、新しいアイデアやシナリオをロードマップに継続反映。
168
+
169
+ ---
170
+
171
+ ## インストール
172
+
173
+ ```sh
174
+ # npm 公開済み(推奨)
175
+ dsh plugin --profile web add dsh-easyrewrite
176
+ # または GitHub から
177
+ dsh plugin --profile web add github:Renzic-Stone/DSH-EasyRewrite
178
+ ```
179
+
180
+ `dsh web` を再起動し、ページを `Ctrl+Shift+R` でハードリフレッシュしてください。
181
+
182
+ > **撤回タイミングについて**:DSH の fork は閉じたターン境界でのみ切り詰め可能なため、未終了ターン内のメッセージは一時的に撤回できません——返信完了後に撤回してください。(画面に「このメッセージのターンがまだ終了していません…」と表示されます)
183
+
184
+ ---
185
+
186
+ ## デバッグ
187
+
188
+ client の各ステップは host に報告され、統一ログに書き込まれます:
189
+
190
+ ```
191
+ $DSH_HOME/dsh-easyrewrite.log # 例: ~/.dsh/dsh-easyrewrite.log
192
+ ```
193
+
194
+ JSON 行形式:`{ t, level, tag, message, data }`。
195
+
196
+ ---
197
+
198
+ ## プロジェクト構成
199
+
200
+ ```
201
+ dsh-easyrewrite/
202
+ ├── lib/index.js # host half:境界解決 + /bubble/recall、/bubble/log
203
+ ├── src/client.src.js # client テンプレート(アイコンはビルド時にインライン化)
204
+ ├── assets/ # 撤回/編集アイコン(PNG、ダークモードは CSS invert で自動対応)
205
+ ├── build.mjs # assets → data-URL → lib/client.js
206
+ ├── DESIGN.md # 完全なインタラクションデザイン(v1.0、20 の製品決定)
207
+ ├── PROJECT_PLAN.md # ロードマップ、アーキテクチャ、git ワークフロー
208
+ └── docs/ # api-facts、m0-verify
209
+ ```
210
+
211
+ ---
212
+
213
+ ## License
214
+
215
+ MIT