dsh-deepseek-chat 0.1.16 → 0.1.18

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
@@ -4,7 +4,7 @@
4
4
 
5
5
  CHAT模式 加载真实的 [DeepSeek Chat 官网](https://chat.deepseek.com/),使用官网的聊天功能和账号历史;HARNESS模式 为原 DSH 工作区。
6
6
 
7
- 当前版本 **0.1.16** · 适配 **DSH 0.2.0-rc.2 桌面版** · 默认语言为简体中文。
7
+ 当前本地候选版本 **0.1.18**(npm 公开版本为 0.1.17) · 适配 **DSH 0.2.0-rc.2 桌面版** · 默认语言为简体中文。
8
8
 
9
9
  ## 功能预览
10
10
 
@@ -60,16 +60,16 @@ dsh plugin --profile desktop add dsh-deepseek-chat
60
60
  已有安装可能继续使用之前锁定的版本。升级到当前版本时,在 DSH 的插件安装输入框中明确输入:
61
61
 
62
62
  ```text
63
- dsh-deepseek-chat@0.1.16
63
+ dsh-deepseek-chat@0.1.17
64
64
  ```
65
65
 
66
66
  使用命令行指定要升级的版本:
67
67
 
68
68
  ```bash
69
- dsh plugin --profile desktop add dsh-deepseek-chat@0.1.16
69
+ dsh plugin --profile desktop add dsh-deepseek-chat@0.1.17
70
70
  ```
71
71
 
72
- **完整退出并重新打开 DSH**,在插件管理页检查已安装版本为 **0.1.16**。进入 CHAT 后,“对话”标题右侧应显示刷新图标,未登录时登录按钮应有蓝色背景。
72
+ **完整退出并重新打开 DSH**,在插件管理页检查已安装版本为 **0.1.17**。进入 CHAT 后,“对话”标题右侧应显示刷新图标,未登录时登录按钮应有蓝色背景。
73
73
 
74
74
  使用其他 profile 时替换 `desktop`。通过 DSH 官方插件管理器或 CLI 更新,让依赖记录和锁文件一起更新;直接覆盖安装目录中的文件不能保证下次启动仍使用新版。
75
75
 
@@ -96,7 +96,7 @@ dsh plugin --profile desktop add https://github.com/xingxingbk-git/dsh-deepseek-
96
96
  将构建生成的 `.tgz` 文件交给 DSH 官方插件管理器安装,或使用 CLI:
97
97
 
98
98
  ```bash
99
- dsh plugin --profile desktop add /absolute/path/dsh-deepseek-chat-0.1.16.tgz
99
+ dsh plugin --profile desktop add /absolute/path/dsh-deepseek-chat-0.1.18.tgz
100
100
  ```
101
101
 
102
102
  将路径替换成你的实际安装包;使用其他 profile 时替换 `desktop`。**安装或更新后,完整退出并重新打开 DSH**,让新插件生效。
@@ -145,7 +145,7 @@ pnpm install --frozen-lockfile
145
145
  pnpm package:plugin
146
146
  ```
147
147
 
148
- 生成 `artifacts/dsh-deepseek-chat-0.1.16.tgz`,包含 Host、Client、类型声明、图标和 bundle patch。插件管理列表的图标位于 `assets/icon.svg`,替换后重新打包安装即可;SVG 须自包含且不超过 256 KiB。
148
+ 生成 `artifacts/dsh-deepseek-chat-0.1.18.tgz`,包含 Host、Client、类型声明、图标和 bundle patch。插件管理列表的图标位于 `assets/icon.svg`,替换后重新打包安装即可;SVG 须自包含且不超过 256 KiB。
149
149
 
150
150
  修改源码后执行 `pnpm release:prepare`,并将源码与整个 `lib/` 一起提交。`pnpm check:distribution` 会检查编译产物与源码、版本及安装入口是否一致;旧产物或缺失文件会使检查失败。安装用户不需要执行这些开发命令。
151
151
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "format": 1,
3
3
  "name": "dsh-deepseek-chat",
4
- "version": "0.1.16",
4
+ "version": "0.1.18",
5
5
  "inputs": {
6
6
  "assets/icon.svg": "8ea4f1d75f655c24e7f42fd5ed76763872d2c2c9d0661e14d64bcbc4dc5f84c8",
7
7
  "cordis.patch.yml": "05edb71cd276de1251ae67644ec68b54efc26258814956fa0e932d36da741bdc",
8
- "package.json": "f2f99547ceab3a45dece0543f4c32ed0be0867d25ea325ed9bf8402a1c6c1714",
8
+ "package.json": "a9adcb61ef0398a2f716b8fbb427da044808d7361684db3eb857c911110b4a73",
9
9
  "pnpm-lock.yaml": "c4f600b0d599b85f6181d295cd5f9f06f1eb0435eeeb2e7cf1a376b3c6a4ca15",
10
10
  "scripts/build.mjs": "715879e3c25382c35b06db2065b3b13815d1185aa4b9267b68a6257cacee30ec",
11
11
  "scripts/check-artifact.mjs": "6fec38fb74e41dfeacef7147280c69854087d0665747d7d65137cc98f9dc673b",
@@ -13,18 +13,18 @@
13
13
  "scripts/client-contract.mjs": "1e212575218fc985f4405e2eac98b33a969494ff6b2144b1204a6d66963ba894",
14
14
  "scripts/distribution-manifest.mjs": "e746c447b03b0e9a86efce7827bbd5d9184c6ccd1f1f0f1c9eb12abfe1b2f3b7",
15
15
  "src/authorization.ts": "5f0c1b69e43541ce606349047788df72e442e9cbb3267c8c0caf2c0f556a5589",
16
- "src/client.ts": "89daf45dd171db396208102d76d080e581ca9ef5c6bc9a893e55b139a990cdc8",
16
+ "src/client.ts": "cf41fb5dd826fb404e645a8baf1dfc7e570e085782c1d18bf9a9c4be010e1c92",
17
17
  "src/core/mode.ts": "2fe56c319706d86746010bd5551f4ee47e31e12a0ee28effffb719b0696ad70c",
18
18
  "src/index.ts": "59edf0d6af2feec3e08da322cabc07a2dc83868312c4daa1074b2a5b12892f57",
19
19
  "src/protocol.ts": "5194007a0c06f7b293cc34579ccdc150c23c35b825091667f37a7293594bd29f",
20
20
  "src/server.ts": "295c52235fa399967a594b76b1f4c869adccc978ee3c0f3f8f3a12894b81ef9b",
21
- "src/sidebar-adapter.ts": "edcc051bbcaabb2d09055b231f57253a50a6d9e75acf18adafbf262001b18a48",
22
- "src/styles.ts": "e14e7c882d6d3476da96d45dc837ac653247b17e35ae5042dea83eda4531723c",
23
- "src/ui.tsx": "f98ced07985556ae4d054fa13120ed329d06a8d4d4506f708fe7abca8e7a590c",
21
+ "src/sidebar-adapter.ts": "83c2ce69a160cfeb8e4af6498d2233c150e8c1decdf4805288d56a9829835ad4",
22
+ "src/styles.ts": "af329e4cdd0a63df88d4bf2f102ab44bef477881733605b9fda89d3740981490",
23
+ "src/ui.tsx": "1b74bbb58c64eac78e824ecf389490e5bfb9e1c11ecf4d5e7a92cc2f6f48a221",
24
24
  "src/web-surface.tsx": "a13ec7ad7d151877d27e7cb79c80e6bf549cbd08f84a53eeadd56d4667419918",
25
- "src/website-conversation-actions.ts": "3aee35c114567514f71cca7495dad7ec251cc79ed866571e417323c564e3f59e",
25
+ "src/website-conversation-actions.ts": "558196cb6ad5c34b8cbffe1ebef4a77a8a0312cfc4bf275fa13c4d9aeaf02f0e",
26
26
  "src/website-header.ts": "ac4972a28a5f0968de4d5f98d54fbac853f901c7eda00c0849984a2e66f291f3",
27
- "src/website-navigation.ts": "80810fac9e0c13bf18b4cb4d0832001d6dfb83b3dc0b9eb136baefbf9f38877c",
27
+ "src/website-navigation.ts": "bc7bb07e8283a2bf3331d6f31496136dda5b072f8f05b695f438a8299bc26b94",
28
28
  "src/website-notice.ts": "65c781bec41e6c2e541d9512cc0051864d64fc3204b3ba5f2e005bdc955f39c9",
29
29
  "src/website-session-store.ts": "8ef6d49465e0034f12b763a666b4a90c8c9819fb8baea06dcaba340fd97d72f1",
30
30
  "src/website-session.ts": "f2434fafc40adb15b5f16fc8b6152bd8df7e85f5210330a1337502c9a08136d8",
@@ -32,7 +32,7 @@
32
32
  "tsconfig.json": "1ad0b3b39537564a180dc7f4084ceb3098b567f509320c77d71bc37aaf4f1879"
33
33
  },
34
34
  "artifacts": {
35
- "lib/client.js": "48d18e6367f314ae29dce2f93796d8ea4b02499be2d3856318bad8ab6d615618",
35
+ "lib/client.js": "f3c71862a00a5bc7aa6a10521afb49c7df33fa2947493f87197ff4946ae3bcb7",
36
36
  "lib/index.js": "e9c50cc544f24c60d086538ab1283ae0ed2811f23c9bb469916a2e89c3ffb38d",
37
37
  "lib/types/authorization.d.ts": "130649eed3635e75c3f50c13de93c52440a27f1b88136ab2297552570c013d49",
38
38
  "lib/types/client.d.ts": "a79702d5d86c75e81f1e954b3e9f4a562a6b3082d68d798d6a1b37bd41b908a7",
@@ -40,9 +40,9 @@
40
40
  "lib/types/index.d.ts": "8257403b97e892a879328654761e3ff8008bbcae0bfacce6e190ef9b5d94750e",
41
41
  "lib/types/protocol.d.ts": "11e77f35382fdc32f9fb0bec48641c43fc2f74064741bf89145fd931a3918a95",
42
42
  "lib/types/server.d.ts": "62b23f8f9fe9bb16a20274929876c1a34b3ab1e94179567e2e3a56cd67638288",
43
- "lib/types/sidebar-adapter.d.ts": "9296987e7ecbd76e42d75bbf65d06f3e368dc036501baf931d7eaa9fb923252d",
44
- "lib/types/styles.d.ts": "305836b3ce5cb256ffb033038b7df2919759976f3ca29395a7cd41bbd5811536",
45
- "lib/types/ui.d.ts": "dcccb0fe08c0b482abd305db39a4d90f66295bb44f9c37931240194f6a28eb10",
43
+ "lib/types/sidebar-adapter.d.ts": "5730bbeb661d8731620dc22397c8a8928209124b8d92d8b8549b6a84824e0518",
44
+ "lib/types/styles.d.ts": "c7434168512577eb1255158835dd6ea044413edd586844b21daf711ea2eeffec",
45
+ "lib/types/ui.d.ts": "7e6df316358f9ed0d9cdcd60789be2ed79f2f93bb70d9ff579d6a06221abdc19",
46
46
  "lib/types/web-surface.d.ts": "71686d72b4a5d6c619ee4ec916bbf7b853a87a7cc4d506fbfd0359191434984f",
47
47
  "lib/types/website-conversation-actions.d.ts": "3bfea5b960e2e78ba6a03c060ff606a3b07293028843c481f8d8f3a41d733c19",
48
48
  "lib/types/website-header.d.ts": "6379a35e7d35af3fb969802ee2cae969a104dbad937f7b9e371463a0bd7dea9d",
package/lib/client.js CHANGED
@@ -14739,10 +14739,6 @@ window.__ModuleLoader__.load({
14739
14739
  descriptors: DSH_CHAT_DESCRIPTORS
14740
14740
  };
14741
14741
 
14742
- // src/ui.tsx
14743
- var import_react = require("react");
14744
- var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
14745
-
14746
14742
  // src/styles.ts
14747
14743
  var chatStyles = String.raw`
14748
14744
  .dsh-chat-rename-input{box-sizing:border-box;width:100%;height:44px;padding:7px 14px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);outline:none;background:transparent;font-size:14px;font-weight:400;line-height:22px;color:var(--dsw-alias-label-primary)}
@@ -14760,8 +14756,7 @@ window.__ModuleLoader__.load({
14760
14756
  .dsh-chat-mode-compact .dsh-chat-modes{flex-direction:column;width:30px;gap:3px}.dsh-chat-mode-compact .dsh-chat-modes button{width:24px;padding:4px 2px}
14761
14757
  [data-dsh-chat-brand-fill="identity"]{flex:1;width:100%}
14762
14758
  [data-dsh-chat-brand-fill="name"]{flex:1}
14763
- [data-dsh-chat-sidebar-mode="chat"] [data-dsh-chat-plugin-row="true"],
14764
- [data-dsh-chat-sidebar-mode="chat"] [data-dsh-chat-only-plugins="true"]{display:none}
14759
+ [data-dsh-chat-sidebar-mode="chat"] > [data-dsh-chat-panel-region="true"]{display:none}
14765
14760
  [data-dsh-chat-sidebar-mode="chat"] [data-dsh-chat-new-session="true"]:disabled{opacity:.45;cursor:default}
14766
14761
  .dsh-chat-brand-name{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;flex:1;width:100%}
14767
14762
  .dsh-chat-brand-wordmark{display:block;flex:0 1 102px;min-width:0;width:102px;height:24px;overflow:hidden}
@@ -14777,11 +14772,28 @@ window.__ModuleLoader__.load({
14777
14772
  .dsh-chat-authorization-notice{position:absolute;top:calc(100% + 6px);right:0;width:230px;max-width:calc(100vw - 24px);padding:10px 12px;z-index:40;border:1px solid var(--dsw-alias-border-l2,#dee1e8);border-radius:8px;background:var(--dsw-specific-sidebar-fill,#f4f5f8);box-shadow:0 4px 16px #0d1a3520;font-size:11px;line-height:1.6;color:var(--dsw-alias-label-primary,#22242a)}
14778
14773
  .dsh-chat-authorization-notice p{margin:0 0 5px}
14779
14774
  .dsh-chat-navigation{display:flex;flex-direction:column;height:100%;min-height:0;background:transparent;color:inherit}
14780
- .dsh-chat-navigation-header{display:flex;align-items:center;justify-content:space-between;padding:0 14px 8px 16px;min-height:36px;color:var(--dsw-alias-label-secondary,#8b8d91);font-size:14px}
14781
- .dsh-chat-navigation-header>div{display:flex;gap:2px}
14775
+ .dsh-chat-navigation-header{margin:2px 12px 4px;padding:0 4px}
14776
+ .dsh-chat-navigation-header{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}
14777
+ .dsh-chat-search-label{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}
14778
+ [data-searching] .dsh-chat-search-label{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}
14779
+ .dsh-chat-search-slot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}
14780
+ [data-searching] .dsh-chat-search-slot{max-width:100%;padding-left:0}
14781
+ .dsh-chat-search-actions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}
14782
+ [data-searching] .dsh-chat-search-actions{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}
14783
+ .dsh-chat-search{box-sizing:border-box;border-radius:var(--dsw-radius-sm);cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}
14784
+ [data-searching] .dsh-chat-search{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;margin-inline:-2px;padding:0 4px 0 0}
14785
+ .dsh-chat-search-button{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}
14786
+ [data-searching] .dsh-chat-search .dsh-chat-search-button{width:28px;height:30px}
14787
+ .dsh-chat-search-button:hover{background:var(--dsw-alias-interactive-bg-hover)}
14788
+ [data-searching] .dsh-chat-search .dsh-chat-search-button:hover{background:0 0}
14789
+ .dsh-chat-search-input{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}
14790
+ [data-searching] .dsh-chat-search .dsh-chat-search-input{opacity:1;pointer-events:auto;margin-left:-2px}
14791
+ .dsh-chat-search-input::placeholder{color:var(--dsw-alias-label-tertiary)}
14792
+ .dsh-chat-search-clear{border-radius:var(--dsw-radius-sm);cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}
14793
+ .dsh-chat-search-button:focus-visible,.dsh-chat-search-clear:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}
14794
+ .dsh-chat-search-clear:hover{background:var(--dsw-alias-interactive-bg-hover)}
14782
14795
  .dsh-chat-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border:0;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary,#8b8d91);cursor:pointer;font-size:21px!important}.dsh-chat-icon-button:hover{background:var(--dsw-alias-interactive-bg-hover,#ffffff0d)}.dsh-chat-icon-button:disabled{opacity:.4;cursor:default}
14783
- .dsh-chat-refreshing{animation:dsh-chat-refresh-spin .8s linear infinite}@keyframes dsh-chat-refresh-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.dsh-chat-refreshing{animation:none}}
14784
- .dsh-chat-navigation-search{margin:0 14px 8px;padding:7px 9px;min-width:0;border:1px solid var(--dsw-alias-border-l2,#85858b40);border-radius:6px;background:transparent;color:inherit;font:inherit;font-size:12px}
14796
+ .dsh-chat-refreshing{animation:dsh-chat-refresh-spin .8s linear infinite}@keyframes dsh-chat-refresh-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.dsh-chat-refreshing{animation:none}.dsh-chat-search,.dsh-chat-search-label,.dsh-chat-search-slot,.dsh-chat-search-input,.dsh-chat-search-actions{transition:none}}
14785
14797
  .dsh-chat-navigation-list{flex:1;min-height:0;overflow:auto;padding:0 12px 12px;scrollbar-width:thin}
14786
14798
  .dsh-chat-conversation-group h3{font-size:12px;font-weight:400;color:var(--dsw-alias-label-secondary,#8b8d91);margin:15px 4px 6px}
14787
14799
  .dsh-chat-conversation-row{display:block;flex:1;min-width:0;width:100%;min-height:32px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:13px;cursor:pointer}.dsh-chat-conversation-item{display:flex;align-items:center;border-radius:8px;padding-right:4px;min-width:0}
@@ -14809,14 +14821,69 @@ window.__ModuleLoader__.load({
14809
14821
  .dsh-chat-settings-account{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;min-width:0}.dsh-chat-settings-account>div{flex:1 1 0%;min-width:0;max-width:100%}.dsh-chat-settings-account strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsh-chat-settings-account button{flex-shrink:0;white-space:nowrap;padding:8px 14px;border:1px solid #ff5f64;border-radius:8px;background:transparent;color:#ff5f64;cursor:pointer;font:inherit}.dsh-chat-settings-account button:disabled{opacity:.4;cursor:default}
14810
14822
  .dsh-chat-settings-error{color:#ff8585;line-height:1.5;font-size:12px}
14811
14823
  `;
14824
+ var styleLeases = /* @__PURE__ */ new WeakMap();
14825
+ function acquireChatStyles(doc) {
14826
+ let lease = styleLeases.get(doc);
14827
+ if (!lease) {
14828
+ const style = doc.createElement("style");
14829
+ style.setAttribute("data-dsh-deepseek-chat-styles", "true");
14830
+ let users = 0;
14831
+ const ensure = () => {
14832
+ if (style.textContent !== chatStyles) style.textContent = chatStyles;
14833
+ if (style.media) style.media = "";
14834
+ if (style.hasAttribute("disabled")) style.removeAttribute("disabled");
14835
+ if (!style.isConnected) doc.head.appendChild(style);
14836
+ if (style.sheet?.disabled) style.sheet.disabled = false;
14837
+ };
14838
+ const observer = new MutationObserver(ensure);
14839
+ ensure();
14840
+ observer.observe(doc.head, {
14841
+ childList: true,
14842
+ subtree: true,
14843
+ characterData: true,
14844
+ attributes: true,
14845
+ attributeFilter: ["disabled", "media"]
14846
+ });
14847
+ const current = {
14848
+ ensure,
14849
+ retain() {
14850
+ users++;
14851
+ ensure();
14852
+ },
14853
+ release() {
14854
+ if (--users > 0) return;
14855
+ observer.disconnect();
14856
+ style.remove();
14857
+ if (styleLeases.get(doc) === current) styleLeases.delete(doc);
14858
+ }
14859
+ };
14860
+ lease = current;
14861
+ styleLeases.set(doc, current);
14862
+ }
14863
+ lease.retain();
14864
+ let released = false;
14865
+ return () => {
14866
+ if (!released) {
14867
+ released = true;
14868
+ lease.release();
14869
+ }
14870
+ };
14871
+ }
14872
+ function ensureChatStyles(doc) {
14873
+ styleLeases.get(doc)?.ensure();
14874
+ }
14812
14875
 
14813
14876
  // src/ui.tsx
14877
+ var import_react_dom = require("react-dom");
14878
+ var import_react = require("react");
14879
+ var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
14814
14880
  var import_jsx_runtime = require("react/jsx-runtime");
14815
14881
  function useDshChat(bridge) {
14816
14882
  return (0, import_react.useSyncExternalStore)(bridge.subscribe, bridge.getSnapshot, bridge.getSnapshot);
14817
14883
  }
14818
14884
  function DshChatStyles() {
14819
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: chatStyles });
14885
+ (0, import_react.useLayoutEffect)(() => acquireChatStyles(document), []);
14886
+ return null;
14820
14887
  }
14821
14888
  function PanelIcon() {
14822
14889
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
@@ -14841,38 +14908,47 @@ window.__ModuleLoader__.load({
14841
14908
  function DshChatBrandName({ bridge }) {
14842
14909
  const name2 = (0, import_react.useRef)(null);
14843
14910
  const anchor = (0, import_react.useRef)(null);
14911
+ const [localAnchor, setLocalAnchor] = (0, import_react.useState)(null);
14844
14912
  (0, import_react.useLayoutEffect)(() => {
14845
14913
  const element = anchor.current;
14846
14914
  const group = name2.current;
14847
14915
  if (!element || !group) return;
14848
- bridge.attachSidebar(group);
14849
- let visible = false;
14850
14916
  const measure = () => {
14917
+ if (!group.isConnected || !element.isConnected) return;
14918
+ ensureChatStyles(document);
14919
+ bridge.attachSidebar(group);
14851
14920
  const rect = element.getBoundingClientRect();
14852
- bridge.updateBrandAnchor(visible && rect.width > 0 && rect.height > 0 ? { left: rect.left, top: rect.top, width: rect.width, height: rect.height } : null);
14921
+ const visible = rect.width > 0 && rect.height > 0 && rect.right > 0 && rect.left < window.innerWidth && rect.bottom > 0 && rect.top < window.innerHeight && getComputedStyle(group).visibility !== "hidden";
14922
+ const next = visible ? { left: rect.left, top: rect.top, width: rect.width, height: rect.height } : null;
14923
+ setLocalAnchor((previous) => previous?.left === next?.left && previous?.top === next?.top && previous?.width === next?.width && previous?.height === next?.height ? previous : next);
14924
+ bridge.updateBrandAnchor(next, group);
14853
14925
  };
14854
14926
  const resize = new ResizeObserver(measure);
14855
14927
  resize.observe(group);
14856
14928
  resize.observe(element);
14857
- const intersection2 = new IntersectionObserver((entries) => {
14858
- visible = entries.some((entry) => entry.target === element && entry.isIntersecting && entry.intersectionRatio >= 0.99);
14859
- measure();
14860
- }, { threshold: [0, 0.99, 1] });
14861
- intersection2.observe(element);
14929
+ const reconcile = window.setInterval(measure, 250);
14930
+ measure();
14931
+ window.addEventListener("focus", measure);
14932
+ document.addEventListener("visibilitychange", measure);
14862
14933
  window.addEventListener("resize", measure);
14863
14934
  window.addEventListener("scroll", measure, true);
14864
14935
  return () => {
14865
14936
  resize.disconnect();
14866
- intersection2.disconnect();
14937
+ window.clearInterval(reconcile);
14938
+ window.removeEventListener("focus", measure);
14939
+ document.removeEventListener("visibilitychange", measure);
14867
14940
  window.removeEventListener("resize", measure);
14868
14941
  window.removeEventListener("scroll", measure, true);
14869
- bridge.updateBrandAnchor(null);
14942
+ bridge.updateBrandAnchor(null, group);
14870
14943
  };
14871
14944
  }, [bridge]);
14872
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { ref: name2, className: "dsh-chat-brand-name", children: [
14873
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatStyles, {}),
14874
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatWordmark, {}),
14875
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchor, className: "dsh-chat-brand-anchor" })
14945
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
14946
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { ref: name2, className: "dsh-chat-brand-name", children: [
14947
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatStyles, {}),
14948
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatWordmark, {}),
14949
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchor, className: "dsh-chat-brand-anchor" })
14950
+ ] }),
14951
+ (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatBrandControl, { bridge, rect: localAnchor }), document.body)
14876
14952
  ] });
14877
14953
  }
14878
14954
  function DshChatAuthorizationNotice({ bridge, state }) {
@@ -14882,9 +14958,9 @@ window.__ModuleLoader__.load({
14882
14958
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-text-button", onClick: () => bridge.refreshAuthorization(), children: "\u91CD\u8BD5\u8FDE\u63A5" })
14883
14959
  ] });
14884
14960
  }
14885
- function DshChatBrandControl({ bridge }) {
14961
+ function DshChatBrandControl({ bridge, rect: ownedRect }) {
14886
14962
  const state = useDshChat(bridge);
14887
- const rect = state.brandAnchor;
14963
+ const rect = ownedRect === void 0 ? state.brandAnchor : ownedRect;
14888
14964
  if (rect === null) return null;
14889
14965
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-chat-brand-control", "aria-label": "dsh-deepseek-chat \u6A21\u5F0F\u9009\u62E9", style: {
14890
14966
  left: rect.left,
@@ -14976,11 +15052,49 @@ window.__ModuleLoader__.load({
14976
15052
  error51 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-chat-rename-error", role: "alert", children: error51 })
14977
15053
  ] });
14978
15054
  }
15055
+ function guardHarnessSearchReplay(entry) {
15056
+ if (entry.locale !== "workspace" || typeof entry.component !== "function" || !entry.children?.["sidebar.workspaces.session.menu.item"] || !entry.inject) return null;
15057
+ const original = entry.component;
15058
+ function SearchRequestGuard(props) {
15059
+ const originalHook = props.useWorkspaceShortcuts;
15060
+ const request = originalHook((state) => state.searchRequest);
15061
+ const mountedRequest = (0, import_react.useRef)(request);
15062
+ const guardedHook = (0, import_react.useCallback)((selector) => originalHook((state) => selector(state.searchRequest === mountedRequest.current ? { ...state, searchRequest: 0 } : state)), [originalHook]);
15063
+ return (0, import_react.createElement)(original, { ...props, useWorkspaceShortcuts: guardedHook });
15064
+ }
15065
+ function GuardedWorkspace(props) {
15066
+ return typeof props.useWorkspaceShortcuts === "function" ? (0, import_react.createElement)(SearchRequestGuard, props) : (0, import_react.createElement)(original, props);
15067
+ }
15068
+ entry.component = GuardedWorkspace;
15069
+ return () => {
15070
+ if (entry.component === GuardedWorkspace) entry.component = original;
15071
+ };
15072
+ }
14979
15073
  function DshChatChatNavigation({ bridge, wide, expandSidebar }) {
14980
15074
  const state = useDshChat(bridge);
14981
15075
  const [renameTarget, setRenameTarget] = (0, import_react.useState)(null);
14982
15076
  const [query, setQuery] = (0, import_react.useState)("");
14983
15077
  const [searching, setSearching] = (0, import_react.useState)(false);
15078
+ const searchRoot = (0, import_react.useRef)(null);
15079
+ const searchInput = (0, import_react.useRef)(null);
15080
+ const searchButton = (0, import_react.useRef)(null);
15081
+ const closeSearch = () => {
15082
+ setQuery("");
15083
+ setSearching(false);
15084
+ };
15085
+ (0, import_react.useLayoutEffect)(() => {
15086
+ if (wide && searching) searchInput.current?.focus({ preventScroll: true });
15087
+ }, [wide, searching]);
15088
+ (0, import_react.useEffect)(() => {
15089
+ if (!wide || !searching) return;
15090
+ const outside = (event) => {
15091
+ if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target)) return;
15092
+ searchInput.current?.blur();
15093
+ if (!query.trim()) setSearching(false);
15094
+ };
15095
+ document.addEventListener("click", outside);
15096
+ return () => document.removeEventListener("click", outside);
15097
+ }, [wide, searching, query]);
14984
15098
  const navigation = state.websiteNavigation;
14985
15099
  const refreshing = state.websiteNavigationRefreshing;
14986
15100
  const refreshDisabled = !state.modeEnabled || !state.desktopAvailable || refreshing || state.webLoading || navigation.authenticated !== true || ["signing-in", "signing-out"].includes(state.websiteAuthenticationStatus) || navigation.settings?.pending;
@@ -14995,17 +15109,25 @@ window.__ModuleLoader__.load({
14995
15109
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatStyles, {}),
14996
15110
  renameTarget && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DshChatRenameConversation, { bridge, item: renameTarget, onClose: () => setRenameTarget(null) }, renameTarget.href),
14997
15111
  !wide ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-icon-button", onClick: expandSidebar, "aria-label": "\u5C55\u5F00\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PanelIcon, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
14998
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "dsh-chat-navigation-header", children: [
14999
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u5BF9\u8BDD" }),
15000
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
15001
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-icon-button", "aria-label": "\u641C\u7D22\u5B98\u7F51\u5BF9\u8BDD", onClick: () => setSearching((value) => !value), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "17", height: "17", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
15002
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8.5", cy: "8.5", r: "6", stroke: "currentColor", strokeWidth: "1.4" }),
15003
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m13 13 4 4", stroke: "currentColor", strokeWidth: "1.4" })
15004
- ] }) }),
15005
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Tooltip, { label: refreshing ? "\u6B63\u5728\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868\u2026" : "\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868", delayMs: 500, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-icon-button", "aria-label": "\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868", "aria-busy": refreshing, disabled: refreshDisabled, onClick: () => bridge.refreshWebsiteNavigation(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 14, className: refreshing ? "dsh-chat-refreshing" : void 0 }) }) })
15006
- ] })
15112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "dsh-chat-navigation-header", "data-searching": searching || void 0, children: [
15113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-chat-search-label", children: "\u5BF9\u8BDD" }),
15114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-chat-search-slot", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: searchRoot, className: "dsh-chat-search", onClick: () => setSearching(true), children: [
15115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Tooltip, { label: "\u641C\u7D22\u5B98\u7F51\u5BF9\u8BDD", delayMs: 500, disabled: searching, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: searchButton, type: "button", className: "dsh-chat-search-button", "aria-label": "\u641C\u7D22\u5B98\u7F51\u5BF9\u8BDD", "aria-expanded": searching, onClick: () => setSearching(true), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: searching ? 11 : 14 }) }) }),
15116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ref: searchInput, className: "dsh-chat-search-input", type: "text", "aria-label": "\u641C\u7D22\u5DF2\u52A0\u8F7D\u7684\u5B98\u7F51\u5BF9\u8BDD\u6807\u9898", placeholder: "\u641C\u7D22\u4F1A\u8BDD\u540D\u79F0", maxLength: 300, value: query, tabIndex: searching ? 0 : -1, onChange: (event) => setQuery(event.target.value), onKeyDown: (event) => {
15117
+ if (event.key === "Escape" && !event.nativeEvent.isComposing) {
15118
+ event.preventDefault();
15119
+ event.stopPropagation();
15120
+ closeSearch();
15121
+ searchButton.current?.focus({ preventScroll: true });
15122
+ }
15123
+ } }),
15124
+ searching && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-search-clear", "aria-label": "\u5173\u95ED\u5B98\u7F51\u5BF9\u8BDD\u641C\u7D22", onClick: (event) => {
15125
+ event.stopPropagation();
15126
+ closeSearch();
15127
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconCloseFillRegular, {}) })
15128
+ ] }) }),
15129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-chat-search-actions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Tooltip, { label: refreshing ? "\u6B63\u5728\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868\u2026" : "\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868", delayMs: 500, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-chat-icon-button", "aria-label": "\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868", "aria-busy": refreshing, disabled: refreshDisabled, onClick: () => bridge.refreshWebsiteNavigation(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 14, className: refreshing ? "dsh-chat-refreshing" : void 0 }) }) }) })
15007
15130
  ] }),
15008
- searching && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { className: "dsh-chat-navigation-search", "aria-label": "\u641C\u7D22\u5DF2\u52A0\u8F7D\u7684\u5B98\u7F51\u5BF9\u8BDD\u6807\u9898", placeholder: "\u641C\u7D22\u5BF9\u8BDD", value: query, onChange: (event) => setQuery(event.target.value), autoFocus: true }),
15009
15131
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-chat-navigation-list", children: [
15010
15132
  refreshing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dsh-chat-navigation-status", role: "status", children: "\u6B63\u5728\u5237\u65B0\u5B98\u7F51\u5BF9\u8BDD\u5217\u8868\u2026" }),
15011
15133
  navigation.authenticated === true && navigation.status === "ready" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
@@ -15155,7 +15277,7 @@ window.__ModuleLoader__.load({
15155
15277
  }
15156
15278
 
15157
15279
  // src/web-surface.tsx
15158
- var import_react_dom = require("react-dom");
15280
+ var import_react_dom2 = require("react-dom");
15159
15281
  var import_react2 = require("react");
15160
15282
 
15161
15283
  // src/website-conversation-actions.ts
@@ -15184,49 +15306,81 @@ window.__ModuleLoader__.load({
15184
15306
  const menuSelector = '[role="menu"],.ds-dropdown-menu';
15185
15307
  const existing = new Set(doc.querySelectorAll(menuSelector));
15186
15308
  if ([...existing].some((el) => el.getBoundingClientRect().height > 0)) return "\u8BF7\u5148\u5173\u95ED\u5B98\u7F51\u5F53\u524D\u83DC\u5355\uFF0C\u518D\u64CD\u4F5C\u5BF9\u8BDD\u3002";
15309
+ const originalTitle = (link.getAttribute("title") || link.textContent || "").trim();
15310
+ const editorHost = row.parentElement && row.parentElement !== sidebar && sidebar.contains(row.parentElement) && row.parentElement.querySelectorAll("a[href]").length === 1 ? row.parentElement : row;
15187
15311
  const originalPath = doc.defaultView.location.pathname;
15188
- triggers[0].click();
15189
- const deadline = Date.now() + 3e3;
15190
- while (Date.now() < deadline) {
15191
- await new Promise((resolve) => setTimeout(resolve, 50));
15192
- if (!link.isConnected || !profile.isConnected || !profile.hasAttribute("data-dsh-chat-profile-confirmed") || doc.defaultView?.location.origin !== "https://chat.deepseek.com" || doc.defaultView.location.pathname !== originalPath) return error51;
15193
- const menus = [...doc.querySelectorAll(menuSelector)].filter((el) => !existing.has(el) && el.getBoundingClientRect().height > 0);
15194
- const matches = menus.flatMap((menu) => [...menu.querySelectorAll('[role="menuitem"],.ds-dropdown-menu-option,button,[role="button"]')]).filter((el) => labels[command.action].test(el.textContent?.trim() || "") && !el.matches(':disabled,[aria-disabled="true"]'));
15195
- const unique = [...new Set(matches)].filter((el) => !matches.some((other) => other !== el && el.contains(other)));
15196
- if (unique.length === 1) {
15197
- unique[0].click();
15198
- if (command.action !== "rename") return null;
15199
- const renameDeadline = Date.now() + 3e3;
15200
- let submitted = false;
15201
- while (Date.now() < renameDeadline) {
15202
- await new Promise((resolve) => setTimeout(resolve, 50));
15203
- if (!profile.isConnected || doc.defaultView?.location.pathname !== originalPath) return error51;
15204
- if (submitted) {
15205
- const current = [...sidebar.querySelectorAll("a[href]")].find((el) => el.href === command.href);
15206
- if ((current?.getAttribute("title") || current?.textContent || "").trim() === command.title.trim()) return null;
15207
- continue;
15312
+ const hideActionMenu = () => {
15313
+ for (const menu of doc.querySelectorAll(menuSelector)) {
15314
+ if (existing.has(menu) || ![...menu.querySelectorAll('[role="menuitem"],.ds-dropdown-menu-option,button,[role="button"]')].some((el) => labels[command.action].test(el.textContent?.trim() || ""))) continue;
15315
+ menu.setAttribute("data-dsh-chat-action-menu", "");
15316
+ }
15317
+ };
15318
+ const observer = new MutationObserver(hideActionMenu);
15319
+ observer.observe(doc.body, { childList: true, subtree: true, characterData: true });
15320
+ try {
15321
+ triggers[0].click();
15322
+ hideActionMenu();
15323
+ const deadline = Date.now() + 3e3;
15324
+ while (Date.now() < deadline) {
15325
+ await new Promise((resolve) => setTimeout(resolve, 50));
15326
+ if (!link.isConnected || !profile.isConnected || !profile.hasAttribute("data-dsh-chat-profile-confirmed") || doc.defaultView?.location.origin !== "https://chat.deepseek.com" || doc.defaultView.location.pathname !== originalPath) return error51;
15327
+ const menus = [...doc.querySelectorAll(menuSelector)].filter((el) => !existing.has(el) && el.getBoundingClientRect().height > 0);
15328
+ const matches = menus.flatMap((menu) => [...menu.querySelectorAll('[role="menuitem"],.ds-dropdown-menu-option,button,[role="button"]')]).filter((el) => labels[command.action].test(el.textContent?.trim() || "") && !el.matches(':disabled,[aria-disabled="true"]'));
15329
+ const unique = [...new Set(matches)].filter((el) => !matches.some((other) => other !== el && el.contains(other)));
15330
+ if (unique.length === 1) {
15331
+ unique[0].click();
15332
+ if (command.action !== "rename") return null;
15333
+ const renameDeadline = Date.now() + 3e3;
15334
+ let submitted = false;
15335
+ while (Date.now() < renameDeadline) {
15336
+ await new Promise((resolve) => setTimeout(resolve, 50));
15337
+ if (!profile.isConnected || doc.defaultView?.location.pathname !== originalPath) return error51;
15338
+ if (submitted) {
15339
+ const current = [...sidebar.querySelectorAll("a[href]")].find((el) => el.href === command.href);
15340
+ if ((current?.getAttribute("title") || current?.textContent || "").trim() === command.title.trim()) return null;
15341
+ continue;
15342
+ }
15343
+ const inputs = [...sidebar.querySelectorAll('input:not([type="hidden"])')].filter((input2) => !input2.disabled && input2.type === "text" && !/搜索|search/i.test([input2.getAttribute("aria-label"), input2.getAttribute("placeholder"), input2.getAttribute("title")].join(" ")) && !input2.closest('[role="dialog"],.ds-modal-content'));
15344
+ const rowInputs = inputs.filter((input2) => editorHost.contains(input2));
15345
+ const inline = rowInputs.length ? rowInputs : inputs.filter((input2) => input2.value.trim() === originalTitle);
15346
+ if (inline.length === 1) {
15347
+ const input2 = inline[0];
15348
+ const setter2 = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
15349
+ if (!setter2) return error51;
15350
+ input2.focus();
15351
+ setter2.call(input2, command.title.trim());
15352
+ input2.dispatchEvent(new Event("input", { bubbles: true }));
15353
+ input2.dispatchEvent(new Event("change", { bubbles: true }));
15354
+ await new Promise((resolve) => setTimeout(resolve, 50));
15355
+ input2.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", code: "Enter", bubbles: true, cancelable: true }));
15356
+ input2.dispatchEvent(new KeyboardEvent("keyup", { key: "Enter", code: "Enter", bubbles: true }));
15357
+ submitted = true;
15358
+ continue;
15359
+ }
15360
+ const dialogs = [...doc.querySelectorAll('[role="dialog"],.ds-modal-content')].filter((el) => /重命名|Rename/i.test(el.textContent || "") && el.querySelectorAll('input:not([type="hidden"])').length === 1).filter((el) => !el.querySelector('[role="dialog"],.ds-modal-content'));
15361
+ if (dialogs.length !== 1) continue;
15362
+ const dialog = dialogs[0];
15363
+ const input = dialog.querySelector('input:not([type="hidden"])');
15364
+ if (!["text", ""].includes(input.type) || input.disabled) return error51;
15365
+ const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
15366
+ if (!setter) return error51;
15367
+ setter.call(input, command.title.trim());
15368
+ input.dispatchEvent(new Event("input", { bubbles: true }));
15369
+ input.dispatchEvent(new Event("change", { bubbles: true }));
15370
+ await new Promise((resolve) => setTimeout(resolve, 50));
15371
+ const confirms = [...dialog.querySelectorAll('button,[role="button"],.ds-button')].filter((el) => /^(确定|确认|保存|重命名|Confirm|Save|Rename)$/i.test(el.textContent?.trim() || "") && !el.matches(':disabled,[aria-disabled="true"]'));
15372
+ if (confirms.length !== 1) return error51;
15373
+ confirms[0].click();
15374
+ submitted = true;
15208
15375
  }
15209
- const dialogs = [...doc.querySelectorAll('[role="dialog"],.ds-modal-content')].filter((el) => /重命名|Rename/i.test(el.textContent || "") && el.querySelectorAll('input:not([type="hidden"])').length === 1).filter((el) => !el.querySelector('[role="dialog"],.ds-modal-content'));
15210
- if (dialogs.length !== 1) continue;
15211
- const dialog = dialogs[0];
15212
- const input = dialog.querySelector('input:not([type="hidden"])');
15213
- if (!["text", ""].includes(input.type) || input.disabled) return error51;
15214
- const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
15215
- if (!setter) return error51;
15216
- setter.call(input, command.title.trim());
15217
- input.dispatchEvent(new Event("input", { bubbles: true }));
15218
- input.dispatchEvent(new Event("change", { bubbles: true }));
15219
- await new Promise((resolve) => setTimeout(resolve, 50));
15220
- const confirms = [...dialog.querySelectorAll('button,[role="button"],.ds-button')].filter((el) => /^(确定|确认|保存|重命名|Confirm|Save|Rename)$/i.test(el.textContent?.trim() || "") && !el.matches(':disabled,[aria-disabled="true"]'));
15221
- if (confirms.length !== 1) return error51;
15222
- confirms[0].click();
15223
- submitted = true;
15224
- }
15225
- return "\u5B98\u7F51\u672A\u786E\u8BA4\u91CD\u547D\u540D\u7ED3\u679C\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u540E\u91CD\u8BD5\u3002";
15226
- }
15227
- }
15228
- if (!doc.querySelector('[role="dialog"],.ds-modal-content')) triggers[0].dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
15229
- return error51;
15376
+ return "\u5B98\u7F51\u672A\u786E\u8BA4\u91CD\u547D\u540D\u7ED3\u679C\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u540E\u91CD\u8BD5\u3002";
15377
+ }
15378
+ }
15379
+ if (!doc.querySelector('[role="dialog"],.ds-modal-content')) triggers[0].dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
15380
+ return error51;
15381
+ } finally {
15382
+ observer.disconnect();
15383
+ }
15230
15384
  }
15231
15385
 
15232
15386
  // src/website-header.ts
@@ -15580,7 +15734,7 @@ window.__ModuleLoader__.load({
15580
15734
  const conversationError = "\u8BE5\u5BF9\u8BDD\u4E0D\u5728\u5F53\u524D\u5B98\u7F51\u5217\u8868\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u3002";
15581
15735
  const styleId = "dsh-chat-website-navigation-style";
15582
15736
  const preparingStyleId = "dsh-chat-website-preparing-style";
15583
- const owned = [marker, presentedMarker, missingSidebarMarker, fallbackMarker, fallbackErrorMarker, profileMarker, profileProofMarker, profileAvatarMarker, navigationWidthMarker, expandingMarker, compactToggleMarker, "data-dsh-chat-conversation-error", "data-dsh-chat-layout", "data-dsh-chat-content", "data-dsh-chat-web-chrome", "data-dsh-chat-settings-dialog", "data-dsh-chat-settings-host", "data-dsh-chat-settings-tabs", "data-dsh-chat-settings-pane", "data-dsh-chat-settings-layout", "data-dsh-chat-settings-chrome", "data-dsh-chat-settings-appearance", "data-dsh-chat-header-row", "data-dsh-chat-header-title", "data-dsh-chat-header-share", "data-dsh-chat-header-title-host", "data-dsh-chat-header-editor", "data-dsh-chat-header-native-depth"];
15737
+ const owned = [marker, presentedMarker, missingSidebarMarker, fallbackMarker, fallbackErrorMarker, profileMarker, profileProofMarker, profileAvatarMarker, navigationWidthMarker, expandingMarker, compactToggleMarker, "data-dsh-chat-action-menu", "data-dsh-chat-conversation-error", "data-dsh-chat-layout", "data-dsh-chat-content", "data-dsh-chat-web-chrome", "data-dsh-chat-settings-dialog", "data-dsh-chat-settings-host", "data-dsh-chat-settings-tabs", "data-dsh-chat-settings-pane", "data-dsh-chat-settings-layout", "data-dsh-chat-settings-chrome", "data-dsh-chat-settings-appearance", "data-dsh-chat-header-row", "data-dsh-chat-header-title", "data-dsh-chat-header-share", "data-dsh-chat-header-title-host", "data-dsh-chat-header-editor", "data-dsh-chat-header-native-depth"];
15584
15738
  const empty = (status) => ({ status, ...status === "sign-in" ? { authenticated: false } : {}, conversations: [], selectedHref: null, canCreate: false, error: null });
15585
15739
  const clearSettings = (preserveConfirmedPreferences = false) => {
15586
15740
  const confirmed = ["data-dsh-chat-language", "data-dsh-chat-theme", "data-dsh-chat-dark-complete", "data-dsh-chat-settings-restored"];
@@ -15901,7 +16055,8 @@ window.__ModuleLoader__.load({
15901
16055
  if (r.top >= -1 && r.top <= 72 && r.height > 0 && r.height <= 80 && r.width <= 400 && candidate.querySelectorAll(iconButtonSelector).length >= 2 && candidate.querySelectorAll(iconButtonSelector).length <= 3 && candidate.querySelector("svg,img") && !candidate.querySelector('textarea,[contenteditable="true"]') && !candidate.textContent?.trim()) candidate.setAttribute("data-dsh-chat-web-chrome", "");
15902
16056
  }
15903
16057
  }
15904
- const styleText = `[${marker}],[data-dsh-chat-web-chrome]{display:none!important}
16058
+ const styleText = `[data-dsh-chat-action-menu]{visibility:hidden!important;pointer-events:none!important}
16059
+ [${marker}],[data-dsh-chat-web-chrome]{display:none!important}
15905
16060
  [data-dsh-chat-layout]{grid-template-columns:minmax(0,1fr)!important}
15906
16061
  [data-dsh-chat-content]{margin-left:0!important;min-width:0!important;width:100%!important;max-width:none!important;flex:1 1 0%!important}`;
15907
16062
  let style = doc.getElementById(styleId);
@@ -15923,7 +16078,7 @@ window.__ModuleLoader__.load({
15923
16078
  }
15924
16079
  function websiteCommandScript(command) {
15925
16080
  if (command.type === "refresh") throw new Error("Website refresh must be handled by the guest owner");
15926
- if (command.type === "conversation-action") return `(async () => { const adaptWebsiteSettings = ${adaptWebsiteSettings.toString()}; const adaptWebsiteHeader = ${adaptWebsiteHeader.toString()}; const dismissWebsiteEnvironmentNotice = ${dismissWebsiteEnvironmentNotice.toString()}; const adapt = ${adaptWebsiteNavigation.toString()}; const command = ${JSON.stringify(command)}; const before = adapt(document,location,{type:'snapshot',showOriginal:false}); if (before.authenticated !== true || !before.conversations.some(item=>item.href===command.href)) return before; const error = await (${performWebsiteConversationAction.toString()})(document,command); if(error) document.documentElement.setAttribute('data-dsh-chat-conversation-error',error); else document.documentElement.removeAttribute('data-dsh-chat-conversation-error'); return adapt(document,location,{type:'snapshot',showOriginal:false}); })()`;
16081
+ if (command.type === "conversation-action") return `(async () => { const adaptWebsiteSettings = ${adaptWebsiteSettings.toString()}; const adaptWebsiteHeader = ${adaptWebsiteHeader.toString()}; const dismissWebsiteEnvironmentNotice = ${dismissWebsiteEnvironmentNotice.toString()}; const adapt = ${adaptWebsiteNavigation.toString()}; const command = ${JSON.stringify(command)}; const before = adapt(document,location,{type:'snapshot',showOriginal:false}); if (before.authenticated !== true || !before.conversations.some(item=>item.href===command.href)) return before; const error = await (${performWebsiteConversationAction.toString()})(document,command); if(error) document.documentElement.setAttribute('data-dsh-chat-action-menu', 'data-dsh-chat-conversation-error',error); else document.documentElement.removeAttribute('data-dsh-chat-conversation-error'); return adapt(document,location,{type:'snapshot',showOriginal:false}); })()`;
15927
16082
  return `(() => { const adaptWebsiteSettings = ${adaptWebsiteSettings.toString()}; const adaptWebsiteHeader = ${adaptWebsiteHeader.toString()}; const dismissWebsiteEnvironmentNotice = ${dismissWebsiteEnvironmentNotice.toString()}; return (${adaptWebsiteNavigation.toString()})(document,location,${JSON.stringify(command)}); })()`;
15928
16083
  }
15929
16084
  function parseWebsiteNavigation(value) {
@@ -16468,7 +16623,7 @@ window.__ModuleLoader__.load({
16468
16623
  const activeReservation = reservation !== null && reservation.generation === state.authorizationGeneration && reservation.storageKey === state.accountStorageKey ? reservation : null;
16469
16624
  const clearance = 0;
16470
16625
  const logoutError = state.websiteAuthenticationStatus === "error" && /退出/.test(state.websiteSessionError ?? "");
16471
- return (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { id: "dsh-chat-website-surface", className: "dsh-chat-web-surface", "aria-label": "DeepSeek \u5B98\u7F51\u7F51\u9875", "aria-hidden": !visible, style: {
16626
+ return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { id: "dsh-chat-website-surface", className: "dsh-chat-web-surface", "aria-label": "DeepSeek \u5B98\u7F51\u7F51\u9875", "aria-hidden": !visible, style: {
16472
16627
  zIndex: inSettings ? 0 : 14,
16473
16628
  visibility: visible ? "visible" : "hidden",
16474
16629
  display: (inSettings || state.mode === "chat") && rect ? "flex" : "none",
@@ -16510,13 +16665,17 @@ window.__ModuleLoader__.load({
16510
16665
  }
16511
16666
 
16512
16667
  // src/sidebar-adapter.ts
16513
- var newSessionLabels = /* @__PURE__ */ new Set(["\u65B0\u5EFA\u4F1A\u8BDD", "\u65B0\u4F1A\u8BDD", "New Session"]);
16514
- var pluginLabels = /* @__PURE__ */ new Set(["\u63D2\u4EF6", "Plugins"]);
16515
16668
  function createSidebarBinding(read, create, report) {
16516
16669
  let adapter = null;
16670
+ let owner = null;
16517
16671
  return {
16518
16672
  attach(name2) {
16673
+ if (owner === name2 && adapter?.valid()) {
16674
+ adapter.sync();
16675
+ return;
16676
+ }
16519
16677
  adapter?.dispose();
16678
+ owner = name2;
16520
16679
  adapter = attachSidebarAdapter(name2, read, create);
16521
16680
  report(adapter !== null);
16522
16681
  },
@@ -16526,6 +16685,7 @@ window.__ModuleLoader__.load({
16526
16685
  dispose() {
16527
16686
  adapter?.dispose();
16528
16687
  adapter = null;
16688
+ owner = null;
16529
16689
  }
16530
16690
  };
16531
16691
  }
@@ -16537,8 +16697,10 @@ window.__ModuleLoader__.load({
16537
16697
  const row = brand?.parentElement;
16538
16698
  const root = row?.parentElement;
16539
16699
  if (!nameSeat || !identity || !brand || !row || !root || identity.getAttribute("aria-hidden") !== "true" || !row.hasAttribute("data-window-drag") || identity.children.length !== 2) return null;
16540
- const newButton = Array.from(root.children).find((element) => element.tagName === "BUTTON" && newSessionLabels.has(element.getAttribute("aria-label") ?? ""));
16541
- if (!newButton) return null;
16700
+ const next = row.nextElementSibling;
16701
+ const buttons = Array.from(root.children).filter((element) => element.tagName === "BUTTON");
16702
+ if (!next || next.tagName !== "BUTTON" || buttons.length !== 1 || buttons[0] !== next) return null;
16703
+ const newButton = next;
16542
16704
  const originalAttributes = /* @__PURE__ */ new Map();
16543
16705
  const mark = (element, key, value) => {
16544
16706
  let originals = originalAttributes.get(element);
@@ -16565,14 +16727,12 @@ window.__ModuleLoader__.load({
16565
16727
  const sync = () => {
16566
16728
  if (disposed) return;
16567
16729
  const state = read();
16730
+ mark(identity, "data-dsh-chat-brand-fill", "identity");
16731
+ mark(nameSeat, "data-dsh-chat-brand-fill", "name");
16568
16732
  mark(root, "data-dsh-chat-sidebar-mode", state.chat ? "chat" : "harness");
16569
16733
  newButton.disabled = state.chat ? !state.canCreate : originallyDisabled;
16570
16734
  for (const nav of Array.from(root.children).filter((element) => element.tagName === "NAV")) {
16571
- const buttons = Array.from(nav.children).filter((element) => element.tagName === "BUTTON");
16572
- for (const button of buttons) {
16573
- if (pluginLabels.has(button.getAttribute("aria-label") ?? "")) mark(button, "data-dsh-chat-plugin-row", "true");
16574
- }
16575
- mark(nav, "data-dsh-chat-only-plugins", buttons.length > 0 && buttons.every((button) => pluginLabels.has(button.getAttribute("aria-label") ?? "")) ? "true" : "false");
16735
+ mark(nav, "data-dsh-chat-panel-region", "true");
16576
16736
  }
16577
16737
  };
16578
16738
  const observer = new MutationObserver(sync);
@@ -16580,6 +16740,7 @@ window.__ModuleLoader__.load({
16580
16740
  sync();
16581
16741
  return {
16582
16742
  sync,
16743
+ valid: () => !disposed && name2.isConnected && nameSeat.parentElement === identity && identity.parentElement === brand && brand.parentElement === row && row.parentElement === root && newButton.parentElement === root,
16583
16744
  dispose() {
16584
16745
  if (disposed) return;
16585
16746
  disposed = true;
@@ -16649,6 +16810,7 @@ window.__ModuleLoader__.load({
16649
16810
  const pendingPreferences = /* @__PURE__ */ new Map();
16650
16811
  let viewport = null;
16651
16812
  let brandAnchor = null;
16813
+ let brandAnchorOwner = null;
16652
16814
  let sidebarAdapted = null;
16653
16815
  let websiteNavigation = emptyNavigation();
16654
16816
  let showWebsiteNavigation = false;
@@ -16990,7 +17152,9 @@ window.__ModuleLoader__.load({
16990
17152
  viewport = next;
16991
17153
  publish();
16992
17154
  },
16993
- updateBrandAnchor: (next) => {
17155
+ updateBrandAnchor: (next, owner) => {
17156
+ if (owner && next === null && brandAnchorOwner !== owner) return;
17157
+ if (owner) brandAnchorOwner = next === null ? null : owner;
16994
17158
  if (brandAnchor?.left === next?.left && brandAnchor?.top === next?.top && brandAnchor?.width === next?.width && brandAnchor?.height === next?.height) return;
16995
17159
  brandAnchor = next;
16996
17160
  publish();
@@ -17361,11 +17525,27 @@ window.__ModuleLoader__.load({
17361
17525
  });
17362
17526
  publish();
17363
17527
  ctx.effect(() => {
17528
+ const guardedEntries = /* @__PURE__ */ new Map();
17529
+ const guardSearch = () => {
17530
+ const current = ctx.slots.entries("sidebar.workspaces");
17531
+ for (const [entry, cleanup] of guardedEntries) if (!current.includes(entry)) {
17532
+ cleanup();
17533
+ guardedEntries.delete(entry);
17534
+ }
17535
+ for (const entry of ctx.slots.entries("sidebar.workspaces")) {
17536
+ if (guardedEntries.has(entry)) continue;
17537
+ const cleanup = guardHarnessSearchReplay(entry);
17538
+ if (cleanup) guardedEntries.set(entry, cleanup);
17539
+ }
17540
+ };
17541
+ guardSearch();
17542
+ const stopSearchGuard = ctx.slots.subscribe("sidebar.workspaces", guardSearch);
17543
+ const releaseStyles = typeof document === "undefined" ? () => {
17544
+ } : acquireChatStyles(document);
17364
17545
  ctx.slots.inject("settings.section", () => ctx.slots.register({ name: "settings.section", id: "dsh-deepseek-chat.chat-settings", order: 80, label: "CHAT\u8BBE\u7F6E", inject: () => ({ bridge }) }, DshChatChatSettings));
17365
17546
  ctx.slots.inject("main", () => ctx.slots.register({ name: "main", key: CHAT_PANEL, inject: () => ({ bridge }) }, DshChatChatPanel));
17366
17547
  ctx.slots.inject("sidebar.brand.name", () => ctx.slots.register({ name: "sidebar.brand.name", priority: -100, inject: () => ({ bridge }) }, DshChatBrandName));
17367
17548
  ctx.slots.inject("shell.overlay", () => [
17368
- ctx.slots.register({ name: "shell.overlay", id: "dsh-deepseek-chat.brand-control", order: 100, inject: () => ({ bridge }) }, DshChatBrandControl),
17369
17549
  ctx.slots.register({ name: "shell.overlay", id: "dsh-deepseek-chat.website", order: 90, inject: () => ({ bridge, nativeBrowser }) }, DshChatWebSurface)
17370
17550
  ]);
17371
17551
  const stopMode = mode.subscribe(publish);
@@ -17379,8 +17559,12 @@ window.__ModuleLoader__.load({
17379
17559
  void refreshAuthorization();
17380
17560
  return () => {
17381
17561
  clearTimeout(logoutTimer);
17562
+ stopSearchGuard();
17563
+ for (const cleanup of guardedEntries.values()) cleanup();
17564
+ guardedEntries.clear();
17382
17565
  mode.dispose();
17383
17566
  sidebar?.dispose();
17567
+ releaseStyles();
17384
17568
  stopPanel();
17385
17569
  stopMode();
17386
17570
  disposed = true;
@@ -13,5 +13,6 @@ export declare function createSidebarBinding(read: () => SidebarAdapterState, cr
13
13
  * Unknown layouts are left alone; no global search or hashed CSS selectors. */
14
14
  export declare function attachSidebarAdapter(name: HTMLElement, read: () => SidebarAdapterState, create: () => void): {
15
15
  sync(): void;
16
+ valid(): boolean;
16
17
  dispose(): void;
17
18
  } | null;
@@ -1,2 +1,5 @@
1
1
  /** Own UI plus the user's narrowly approved, reversible rc.2 sidebar markers. */
2
2
  export declare const chatStyles: string;
3
+ export declare function acquireChatStyles(doc: Document): () => void;
4
+ /** CSSOM disabling does not emit a DOM mutation; the brand measurement also checks it. */
5
+ export declare function ensureChatStyles(doc: Document): void;
package/lib/types/ui.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { StoredEntry } from '@deepseek-ai/dsh-client-ui-slots';
1
2
  import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
2
3
  import type { WebsiteCommand, WebsiteNavigation } from './website-navigation.js';
3
4
  import type { WebsiteSession } from './protocol.js';
@@ -46,7 +47,7 @@ export interface DshChatUIBridge {
46
47
  toggleSidebar(): void;
47
48
  attachViewport(element: HTMLElement | null): void;
48
49
  updateViewport(rect: DshChatViewportRect | null): void;
49
- updateBrandAnchor(rect: DshChatViewportRect | null): void;
50
+ updateBrandAnchor(rect: DshChatViewportRect | null, owner?: HTMLElement): void;
50
51
  attachSidebar(element: HTMLElement): void;
51
52
  reloadWebsite(): void;
52
53
  refreshWebsiteNavigation(): void;
@@ -75,15 +76,20 @@ export interface DshChatBridgeProps {
75
76
  readonly bridge: DshChatUIBridge;
76
77
  }
77
78
  export declare function useDshChat(bridge: DshChatUIBridge): DshChatViewState;
78
- export declare function DshChatStyles(): import("react/jsx-runtime").JSX.Element;
79
+ export declare function DshChatStyles(): null;
79
80
  export declare function DshChatModeSelector({ bridge, state, compact }: DshChatBridgeProps & {
80
81
  readonly state: DshChatViewState;
81
82
  readonly compact?: boolean;
82
83
  }): import("react/jsx-runtime").JSX.Element;
83
- /** Decorative brand content only: this slot has an aria-hidden/New Session owner. */
84
+ /** The brand seat owns identity and its portalled controls as one lifetime. */
84
85
  export declare function DshChatBrandName({ bridge }: PropsRuntime<'sidebar.brand.name'> & DshChatBridgeProps): import("react/jsx-runtime").JSX.Element;
85
86
  /** The interactive surface is outside the brand slot's hidden/button ancestry. */
86
- export declare function DshChatBrandControl({ bridge }: PropsRuntime<'shell.overlay'> & DshChatBridgeProps): import("react/jsx-runtime").JSX.Element | null;
87
+ export declare function DshChatBrandControl({ bridge, rect: ownedRect }: DshChatBridgeProps & {
88
+ readonly rect?: DshChatViewportRect | null;
89
+ }): import("react/jsx-runtime").JSX.Element | null;
90
+ /** rc.2 replays its retained request counter on WorkspaceBrowser remount.
91
+ * Adapt only the view hook; never mutate the host request store or actions. */
92
+ export declare function guardHarnessSearchReplay(entry: StoredEntry): (() => void) | null;
87
93
  /** Only the middle browsing region changes; the shipped shell and Settings stay mounted. */
88
94
  export declare function DshChatChatNavigation({ bridge, wide, expandSidebar }: PropsRuntime<'sidebar.workspaces'> & DshChatBridgeProps): import("react/jsx-runtime").JSX.Element;
89
95
  /** Measures only this plugin's own element; website content lives in the retained overlay. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-deepseek-chat",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "CHAT / HARNESS mode switcher for DeepSeek Harness",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,17 +10,13 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/xingxingbk-git/dsh-deepseek-chat/issues"
12
12
  },
13
- "keywords": [
14
- "dsh",
15
- "deepseek",
16
- "chat",
17
- "dsh-plugin"
18
- ],
13
+ "keywords": ["dsh", "deepseek", "chat", "dsh-plugin"],
19
14
  "publishConfig": {
20
15
  "access": "public",
21
16
  "registry": "https://registry.npmjs.org/"
22
17
  },
23
18
  "type": "module",
19
+ "packageManager": "pnpm@10.33.2",
24
20
  "engines": {
25
21
  "node": "^22.19.0 || >=24.0.0"
26
22
  },
@@ -43,6 +39,17 @@
43
39
  "README.md",
44
40
  "assets/icon.svg"
45
41
  ],
42
+ "scripts": {
43
+ "build:plugin": "node ./scripts/build.mjs",
44
+ "release:prepare": "node ./scripts/build.mjs && node ./scripts/check-distribution.mjs",
45
+ "check:distribution": "node ./scripts/check-distribution.mjs",
46
+ "typecheck": "tsc -p tsconfig.json --noEmit",
47
+ "test": "node ./scripts/test.mjs",
48
+ "preview": "node ./scripts/preview.mjs",
49
+ "check:artifact": "node ./scripts/check-artifact.mjs",
50
+ "check:git-install": "node ./scripts/check-git-install.mjs",
51
+ "package:plugin": "pnpm release:prepare && pnpm pack --pack-destination ./artifacts"
52
+ },
46
53
  "dsh": {
47
54
  "bundle": {
48
55
  "patch": "./cordis.patch.yml"
@@ -93,16 +100,5 @@
93
100
  "react-dom": "18.3.1",
94
101
  "typescript": "5.8.3"
95
102
  },
96
- "icon": "./assets/icon.svg",
97
- "scripts": {
98
- "build:plugin": "node ./scripts/build.mjs",
99
- "release:prepare": "node ./scripts/build.mjs && node ./scripts/check-distribution.mjs",
100
- "check:distribution": "node ./scripts/check-distribution.mjs",
101
- "typecheck": "tsc -p tsconfig.json --noEmit",
102
- "test": "node ./scripts/test.mjs",
103
- "preview": "node ./scripts/preview.mjs",
104
- "check:artifact": "node ./scripts/check-artifact.mjs",
105
- "check:git-install": "node ./scripts/check-git-install.mjs",
106
- "package:plugin": "pnpm release:prepare && pnpm pack --pack-destination ./artifacts"
107
- }
108
- }
103
+ "icon": "./assets/icon.svg"
104
+ }