dsh-edit-turn 0.2.10 → 0.2.11

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/README.md CHANGED
@@ -219,6 +219,11 @@ ln -s /path/to/dsh-install/node_modules ./node_modules
219
219
 
220
220
  ### 更新日志
221
221
 
222
+ **0.2.11** —— 修「字怎么变大了」。
223
+
224
+ - **修复:改写后的气泡与编辑器不跟随平台的"内容字号"设置**。平台的气泡用 `font-size: var(--dsh-content-font-size,14px)` + `line-height: calc(22px + var(--dsh-content-font-delta,0px))`;我们的替代气泡写成 `font:inherit`(继承了行的 16px,比气泡的 15px 大),编辑器又写死 15px——读者一改内容字号,两处都对不上,看起来就是"字变大了"。现在两者都取平台同一个变量/公式(该变量定义在 body 上,编辑器所在的浮层是其子节点,可直接继承)。
225
+ - 真机验证:默认设置下平台气泡 / 替代气泡 / 编辑器均为 15px;把 `--dsh-content-font-size` 改成 18px 后,三者同步变为 18px。+ 2 条静态检查;110 单测 / 80 契约 / 静态 / verify:live / verify:ui 全绿。
226
+
222
227
  **0.2.10** —— 修「编辑器浮层留在设置页上」。
223
228
 
224
229
  - **修复:会话视图卸载后编辑器没有跟着走**。编辑器挂在 `body` 的独立浮层上(这是为了躲开宿主重绘),而没有任何框架会替它收尾:切到设置页时对话视图(连同注册在输入框卡上的条目)卸载了,编辑器却留在浮层里**飘在设置页上**。现在条目卸载时清掉自己的编辑器与参考,空浮层也一并移除。
package/lib/client.js CHANGED
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
30
30
  const ROUTE_PREFIX = '/dsh-edit-turn'
31
31
 
32
32
  /** Keep in sync with package.json and lib/index.js. */
33
- const PLUGIN_VERSION = '0.2.10'
33
+ const PLUGIN_VERSION = '0.2.11'
34
34
 
35
35
  // --- copy -----------------------------------------------------------------
36
36
 
@@ -145,7 +145,12 @@ window.__ModuleLoader__.load({
145
145
  // a replacement message, so this one is ours. Styled from the plugin own
146
146
  // namespaced variables, which follow the active theme without borrowing
147
147
  // CSS-module hashes that change between builds.
148
- '.dshet-revision{box-sizing:border-box;align-self:flex-end;width:fit-content;max-width:min(72ch,86%);margin:6px 0 6px auto;padding:9px 14px;border-radius:16px;background:var(--dshet-field);color:var(--dshet-ink);font:inherit;line-height:inherit;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}',
148
+ // Font metrics copied from the platform's own user bubble
149
+ // (`.Sixlwa_bubble`): a fixed size or `font:inherit` is wrong here -
150
+ // inherit picks up the row's 16px, fixed ignores the reader's content
151
+ // font setting, and either way the rewritten text changed size against
152
+ // the bubble it replaces.
153
+ '.dshet-revision{box-sizing:border-box;align-self:flex-end;width:fit-content;max-width:min(72ch,86%);margin:6px 0 6px auto;padding:9px 14px;border-radius:16px;background:var(--dshet-field);color:var(--dshet-ink);font:inherit;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}',
149
154
  '.dshet-revision:empty{display:none}',
150
155
  '.dshet-revision{position:relative}',
151
156
  // Fallback only: a row with no action bar to keep is displayed away
@@ -187,7 +192,7 @@ window.__ModuleLoader__.load({
187
192
  '.dshet-layer .dshet-editor{position:absolute;pointer-events:auto}',
188
193
  '.dshet-editor{margin:0;border:1px solid var(--dshet-line);border-radius:16px;background:var(--dshet-panel);backdrop-filter:blur(18px) saturate(1.2);box-shadow:var(--dshet-shadow);color:var(--dshet-ink);transition:border-color .12s}',
189
194
  '.dshet-editor:focus-within{border-color:var(--dsw-alias-button-primary-fill,var(--dshet-accent))}',
190
- '.dshet-editor textarea{display:block;width:100%;min-height:47px;max-height:46vh;overflow-y:auto;resize:none;box-sizing:border-box;padding:11px 14px 0;border:0;background:transparent;color:inherit;font:inherit;font-size:15px;line-height:25px;outline:none}',
195
+ '.dshet-editor textarea{display:block;width:100%;min-height:47px;max-height:46vh;overflow-y:auto;resize:none;box-sizing:border-box;padding:11px 14px 0;border:0;background:transparent;color:inherit;font:inherit;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));outline:none}',
191
196
  '.dshet-editor textarea::placeholder{color:var(--dshet-ink-dim)}',
192
197
  '.dshet-editor textarea:disabled{opacity:.65}',
193
198
  '.dshet-note,.dshet-warn,.dshet-error{margin:4px 14px 0;font-size:12px;line-height:19px}',
package/lib/index.js CHANGED
@@ -22,7 +22,7 @@
22
22
  // admission path. It resumes the Session when cold and starts exactly one
23
23
  // new turn from the revised text.
24
24
  //
25
- // The silent replacement carrier is an EMPTY `developer/message` (0.2.10;
25
+ // The silent replacement carrier is an EMPTY `developer/message` (0.2.11;
26
26
  // before that an empty `system/message`, which no reader accepts - see the
27
27
  // README). Empty content projects to no model message, so the rollback adds
28
28
  // nothing the model can see and the derived context after an edit is exactly
@@ -60,7 +60,7 @@ export const PLUGIN_ID = 'dsh-edit-turn'
60
60
  export const name = PLUGIN_ID
61
61
 
62
62
  /** Keep in sync with package.json and lib/client.js. */
63
- export const PLUGIN_VERSION = '0.2.10'
63
+ export const PLUGIN_VERSION = '0.2.11'
64
64
 
65
65
  // A ring of the last few requests, answering "did the browser half even ask, and
66
66
  // what did it get?" without needing its console. Read-only diagnostics: the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-edit-turn",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Edit any user turn in DeepSeek Harness and re-run it: an inline editor on the message row rolls the conversation back to just before that turn through the official surface-replace contract, then re-prompts the agent with the revised text. The append-only session log is never rewritten.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",