dsh-composer-rewind 2.0.2 → 2.0.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/client.js +28 -11
- package/package.json +53 -53
package/client.js
CHANGED
|
@@ -1771,7 +1771,7 @@ window.__ModuleLoader__.load({
|
|
|
1771
1771
|
];
|
|
1772
1772
|
|
|
1773
1773
|
const ACTION_PATHS = {
|
|
1774
|
-
restore: ['
|
|
1774
|
+
restore: ['M3.1 6.2h4.7a3.2 3.2 0 0 1 0 6.4H4.5', 'M6.2 3.4 3.1 6.2l3.1 2.8'],
|
|
1775
1775
|
copy: ['M5.6 5.6h6.8v6.8H5.6z', 'M3.6 10.4V3.6h6.8'],
|
|
1776
1776
|
trash: ['M2.9 4.4h10.2', 'M6 4.4V2.9h4v1.5', 'M4.4 4.4l.7 8.7h5.8l.7-8.7', 'M6.6 6.8v4.2', 'M9.4 6.8v4.2'],
|
|
1777
1777
|
search: ['M7.2 12a4.8 4.8 0 1 0 0-9.6 4.8 4.8 0 0 0 0 9.6Z', 'M10.7 10.7 13.6 13.6'],
|
|
@@ -2196,16 +2196,32 @@ window.__ModuleLoader__.load({
|
|
|
2196
2196
|
let panelFrame = null;
|
|
2197
2197
|
|
|
2198
2198
|
function measurePanelFrame() {
|
|
2199
|
-
if (typeof window === 'undefined') return { left: 12, width: 360, bottom: 96, maxHeight:
|
|
2199
|
+
if (typeof window === 'undefined') return { left: 12, width: 360, bottom: 96, maxHeight: 400 };
|
|
2200
2200
|
const node = typeof document !== 'undefined' ? document.querySelector('.pv-trigger') : null;
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
const
|
|
2208
|
-
|
|
2201
|
+
// The `+` menu is anchored to the composer card, not to the button:
|
|
2202
|
+
// same left edge, same width, 4px above the card.
|
|
2203
|
+
const card = node && node.closest ? node.closest('[data-composer-card]') : null;
|
|
2204
|
+
const rim = card || node;
|
|
2205
|
+
const rect = rim && rim.getBoundingClientRect ? rim.getBoundingClientRect() : null;
|
|
2206
|
+
if (!rect) return { left: 12, width: Math.min(360, window.innerWidth - 24), bottom: 96, maxHeight: 400 };
|
|
2207
|
+
const width = Math.max(240, Math.min(rect.width, window.innerWidth - 24));
|
|
2208
|
+
const left = Math.max(12, Math.min(rect.left, window.innerWidth - width - 12));
|
|
2209
|
+
const bottom = Math.max(4, window.innerHeight - rect.top + 4);
|
|
2210
|
+
// MenuView uses a 400px cap and keeps 84px of viewport above itself.
|
|
2211
|
+
const above = rect.top - 84;
|
|
2212
|
+
return { left, width, bottom, maxHeight: Math.max(160, Math.min(400, above)) };
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* The host `+` menu treats pointerdowns inside the composer card as its
|
|
2217
|
+
* own and stays open. Toggle it closed before we show the history panel,
|
|
2218
|
+
* otherwise both surfaces occupy the exact same frame.
|
|
2219
|
+
*/
|
|
2220
|
+
function dismissHostMenu() {
|
|
2221
|
+
if (typeof document === 'undefined') return;
|
|
2222
|
+
const menu = document.querySelector('[data-trigger-menu]');
|
|
2223
|
+
if (!menu || typeof document.body.dispatchEvent !== 'function') return;
|
|
2224
|
+
document.body.dispatchEvent(new MouseEvent('pointerdown', { bubbles: true, cancelable: true }));
|
|
2209
2225
|
}
|
|
2210
2226
|
|
|
2211
2227
|
function placeHoverCard(rect, width, height) {
|
|
@@ -2240,7 +2256,8 @@ window.__ModuleLoader__.load({
|
|
|
2240
2256
|
onClick: () => {
|
|
2241
2257
|
publishComposer(props.sessionId, props.inputActions);
|
|
2242
2258
|
panelFrame = open ? null : measurePanelFrame();
|
|
2243
|
-
|
|
2259
|
+
if (!open) dismissHostMenu();
|
|
2260
|
+
setOpen(!open);
|
|
2244
2261
|
},
|
|
2245
2262
|
},
|
|
2246
2263
|
h(TriggerIcon, { size: 18 }),
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-composer-rewind",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Composer input history for the DeepSeek Harness Web UI: records composer contents, attachments, command tokens and the active DSH setup, then restores the whole composer state.",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"dsh",
|
|
8
|
-
"dsh-plugin",
|
|
9
|
-
"deepseek-harness",
|
|
10
|
-
"composer-history",
|
|
11
|
-
"composer"
|
|
12
|
-
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/QIUZAIYOU/dsh-composer-rewind.git"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/QIUZAIYOU/dsh-composer-rewind#readme",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://github.com/QIUZAIYOU/dsh-composer-rewind/issues"
|
|
20
|
-
},
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
|
-
"exports": {
|
|
25
|
-
".": "./index.js",
|
|
26
|
-
"./client": "./client.js",
|
|
27
|
-
"./locale/*.json": "./locale/*.json",
|
|
28
|
-
"./icon": "./icon.svg"
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"index.js",
|
|
32
|
-
"client.js",
|
|
33
|
-
"cordis.patch.yml",
|
|
34
|
-
"locale/*.json",
|
|
35
|
-
"icon.svg",
|
|
36
|
-
"README.md"
|
|
37
|
-
],
|
|
38
|
-
"dsh": {
|
|
39
|
-
"bundle": {
|
|
40
|
-
"patch": "./cordis.patch.yml"
|
|
41
|
-
},
|
|
42
|
-
"client": {
|
|
43
|
-
"platform": "web",
|
|
44
|
-
"immediately": true,
|
|
45
|
-
"external": [
|
|
46
|
-
"@deepseek-ai/dsh-client-ui-primitives"
|
|
47
|
-
],
|
|
48
|
-
"inject": [
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-conversation"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-composer-rewind",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Composer input history for the DeepSeek Harness Web UI: records composer contents, attachments, command tokens and the active DSH setup, then restores the whole composer state.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"dsh",
|
|
8
|
+
"dsh-plugin",
|
|
9
|
+
"deepseek-harness",
|
|
10
|
+
"composer-history",
|
|
11
|
+
"composer"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/QIUZAIYOU/dsh-composer-rewind.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/QIUZAIYOU/dsh-composer-rewind#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/QIUZAIYOU/dsh-composer-rewind/issues"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./index.js",
|
|
26
|
+
"./client": "./client.js",
|
|
27
|
+
"./locale/*.json": "./locale/*.json",
|
|
28
|
+
"./icon": "./icon.svg"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"client.js",
|
|
33
|
+
"cordis.patch.yml",
|
|
34
|
+
"locale/*.json",
|
|
35
|
+
"icon.svg",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"dsh": {
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
},
|
|
42
|
+
"client": {
|
|
43
|
+
"platform": "web",
|
|
44
|
+
"immediately": true,
|
|
45
|
+
"external": [
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-primitives"
|
|
47
|
+
],
|
|
48
|
+
"inject": [
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|