@cannbot-plugin/cannbot-dsh-server 1.0.0-alpha.5 → 1.0.0-alpha.6

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/INSTALL.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | 系统 | 安装 | 启动 |
6
6
  | --- | --- | --- |
7
- | Windows x64 | 双击 `CANNBot-Setup.exe`,阅读协议并按向导安装 | 从桌面快捷方式或开始菜单打开 |
7
+ | Windows x64 | 双击 `CANNBot-Setup.exe`,确认协议和安装目录,点一次「开始安装」即可安装 DSH 和工作台 | 从桌面快捷方式或开始菜单打开 |
8
8
  | Linux x64 / arm64 | 在终端运行 `sh CANNBot-Setup.sh`,阅读协议并输入 `AGREE` | 运行 `~/.local/share/cannbot/bin/cannbot` |
9
9
  | macOS Intel / Apple 芯片 | 双击 `CANNBot-Setup.pkg`,阅读并确认协议 | 从个人“应用程序”打开 CANNBot |
10
10
 
package/LICENSE CHANGED
@@ -1,38 +1,38 @@
1
- CANN Open Software License Agreement Version 2.0
2
-
3
- This CANN Open Software License Agreement Version 2.0 (hereinafter referred to as this "Agreement") is a legal agreement between you and Huawei, and it governs your use, modification, or distribution of CANN Open Software (hereinafter referred to as "Software"). Please read this Agreement carefully.
4
-
5
- If you are entering into this Agreement on behalf of a company or other legal entity, you represent that you have the legal authority to bind that entity to this Agreement, in which case "you" will mean the entity you represent.
6
-
7
- BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU AGREE YOU HAVE FULLY UNDERSTOOD AND ACCEPTED THE TERMS CONTAINED HEREIN. IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS AGREEMENT, OR IF YOU DO NOT QUALIFY FOR AGREEING TO THIS AGREEMENT, YOU ARE NOT AUTHORIZED TO AND SHALL NOT DOWNLOAD, INSTALL, OR MAKE ANY USE OF THE SOFTWARE.
8
-
9
- 1. Definition
10
-
11
- 1.1 Software means the APIs, source code files, binaries, and related documents of Compute Architecture for Neural Networks("CANN") that are licensable by Huawei, and provided and licensed under this Agreement.
12
-
13
- 1.2 Huawei AI Processors mean AI chipsets (i) branded with "Ascend", "Kirin"," Yueying" or other brands owned or controlled by Huawei; or (ii) manufactured (including have manufactured), supplied (including have supplied) or designed (including have designed) by Huawei.
14
-
15
- 2. Grant of Intellectual Property Rights
16
- 2.1 Subject to the terms and conditions of this Agreement, including your full compliance thereof, Huawei hereby grants you a limited, worldwide, royalty-free, non-transferable, non-sublicensable, and revocable license for you to (i) download, use, modify, integrate, and distribute the Software or its derivative works for the purpose of developing software solely for use in systems with Huawei AI Processors and/or Software, and (ii) distribute any software developed based upon Software and/or its derivative works solely for use in systems with Huawei AI Processors and/or Software.
17
-
18
- 3. Restrictions
19
- 3.1 You are not authorized to, and shall not use, modify, or distribute this Software or its derivative works for any other purposes than those expressly permitted by this Agreement. You shall not make any use of the Software or its derivative works to develop or distribute any software for use in systems with processors other than Huawei AI Processors. All rights not expressly granted herein are expressly reserved by Huawei.
20
-
21
- 3.2 You are not authorized to, and shall not remove, obscure, or alter any copyright or other notices in this Software or any part of it.
22
-
23
- 3.3 Distribution Restrictions
24
- You may distribute the Software or its derivative works in any medium, whether in source or executable forms, for the purpose stipulated in Section 2; provided that you provide recipients with a copy of this Agreement, and retain all notices in the Software.
25
-
26
- 4. Disclaimer of Warranty and Limitation of Liability
27
- THE SOFTWARE IS PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL HUAWEI OR ANY OTHER COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE, IN WHOLE OR IN PART, NO MATTER HOW IT IS CAUSED OR THE LEGAL THEORY IT IS BASED ON, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
28
-
29
- 5. Termination
30
- 5.1 This Agreement will continue to apply until terminated by either you or Huawei as described below:
31
- a.You may terminate this Agreement by ceasing your use of the Software;
32
- b. Huawei may at any time, terminate this Agreement if: (i) you fail to comply with any term of this Agreement; or (ii) you directly or indirectly initiate any legal proceeding against any individual or entity by alleging that the Software or any part of it infringes your intellectual property rights.
33
- 5.2 By termination, all the rights granted to you under this Agreement are terminated, and you shall cease to use and delete this Software or any derivative works immediately. All rights granted to you under this Agreement shall hereby be void ab initio in the event of termination in accordance with Section 5.1. b above. Huawei reserves the right to pursue any and all legal remedies available to enforce the terms and conditions of this Agreement or to protect Huawei’s intellectual property rights for such breach or violation. All provisions shall survive the termination of this Agreement except for Section 2 and Section 3.3.
34
-
35
- 6. MISCELLANEOUS
36
- If the application of any provision of this Agreement to any particular facts or circumstances is held to be invalid or unenforceable by a court of competent jurisdiction, then (a) the validity and enforceability of such provision as applied to any other particular facts or circumstances and the validity of other provisions of this Agreement shall not in any way be affected or impaired thereby and (b) such provision shall be enforced to the maximum extent possible so as to affect the intent of the you and Huawei and reformed without further action by you and Huawei to the extent necessary to make such provision valid and enforceable.
37
-
38
- END OF THE TERMS AND CONDITIONS
1
+ CANN Open Software License Agreement Version 2.0
2
+
3
+ This CANN Open Software License Agreement Version 2.0 (hereinafter referred to as this "Agreement") is a legal agreement between you and Huawei, and it governs your use, modification, or distribution of CANN Open Software (hereinafter referred to as "Software"). Please read this Agreement carefully.
4
+
5
+ If you are entering into this Agreement on behalf of a company or other legal entity, you represent that you have the legal authority to bind that entity to this Agreement, in which case "you" will mean the entity you represent.
6
+
7
+ BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU AGREE YOU HAVE FULLY UNDERSTOOD AND ACCEPTED THE TERMS CONTAINED HEREIN. IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS AGREEMENT, OR IF YOU DO NOT QUALIFY FOR AGREEING TO THIS AGREEMENT, YOU ARE NOT AUTHORIZED TO AND SHALL NOT DOWNLOAD, INSTALL, OR MAKE ANY USE OF THE SOFTWARE.
8
+
9
+ 1. Definition
10
+
11
+ 1.1 Software means the APIs, source code files, binaries, and related documents of Compute Architecture for Neural Networks("CANN") that are licensable by Huawei, and provided and licensed under this Agreement.
12
+
13
+ 1.2 Huawei AI Processors mean AI chipsets (i) branded with "Ascend", "Kirin"," Yueying" or other brands owned or controlled by Huawei; or (ii) manufactured (including have manufactured), supplied (including have supplied) or designed (including have designed) by Huawei.
14
+
15
+ 2. Grant of Intellectual Property Rights
16
+ 2.1 Subject to the terms and conditions of this Agreement, including your full compliance thereof, Huawei hereby grants you a limited, worldwide, royalty-free, non-transferable, non-sublicensable, and revocable license for you to (i) download, use, modify, integrate, and distribute the Software or its derivative works for the purpose of developing software solely for use in systems with Huawei AI Processors and/or Software, and (ii) distribute any software developed based upon Software and/or its derivative works solely for use in systems with Huawei AI Processors and/or Software.
17
+
18
+ 3. Restrictions
19
+ 3.1 You are not authorized to, and shall not use, modify, or distribute this Software or its derivative works for any other purposes than those expressly permitted by this Agreement. You shall not make any use of the Software or its derivative works to develop or distribute any software for use in systems with processors other than Huawei AI Processors. All rights not expressly granted herein are expressly reserved by Huawei.
20
+
21
+ 3.2 You are not authorized to, and shall not remove, obscure, or alter any copyright or other notices in this Software or any part of it.
22
+
23
+ 3.3 Distribution Restrictions
24
+ You may distribute the Software or its derivative works in any medium, whether in source or executable forms, for the purpose stipulated in Section 2; provided that you provide recipients with a copy of this Agreement, and retain all notices in the Software.
25
+
26
+ 4. Disclaimer of Warranty and Limitation of Liability
27
+ THE SOFTWARE IS PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL HUAWEI OR ANY OTHER COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE, IN WHOLE OR IN PART, NO MATTER HOW IT IS CAUSED OR THE LEGAL THEORY IT IS BASED ON, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
28
+
29
+ 5. Termination
30
+ 5.1 This Agreement will continue to apply until terminated by either you or Huawei as described below:
31
+ a.You may terminate this Agreement by ceasing your use of the Software;
32
+ b. Huawei may at any time, terminate this Agreement if: (i) you fail to comply with any term of this Agreement; or (ii) you directly or indirectly initiate any legal proceeding against any individual or entity by alleging that the Software or any part of it infringes your intellectual property rights.
33
+ 5.2 By termination, all the rights granted to you under this Agreement are terminated, and you shall cease to use and delete this Software or any derivative works immediately. All rights granted to you under this Agreement shall hereby be void ab initio in the event of termination in accordance with Section 5.1. b above. Huawei reserves the right to pursue any and all legal remedies available to enforce the terms and conditions of this Agreement or to protect Huawei’s intellectual property rights for such breach or violation. All provisions shall survive the termination of this Agreement except for Section 2 and Section 3.3.
34
+
35
+ 6. MISCELLANEOUS
36
+ If the application of any provision of this Agreement to any particular facts or circumstances is held to be invalid or unenforceable by a court of competent jurisdiction, then (a) the validity and enforceability of such provision as applied to any other particular facts or circumstances and the validity of other provisions of this Agreement shall not in any way be affected or impaired thereby and (b) such provision shall be enforced to the maximum extent possible so as to affect the intent of the you and Huawei and reformed without further action by you and Huawei to the extent necessary to make such provision valid and enforceable.
37
+
38
+ END OF THE TERMS AND CONDITIONS
@@ -1,13 +1,13 @@
1
- #!/usr/bin/env node
2
- // Copyright (c) 2026 Huawei Technologies Co., Ltd.
3
- // This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4
- // CANN Open Software License Agreement Version 2.0 (the "License").
5
- // Please refer to the License for details. You may not use this file except in compliance with the License.
6
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7
- // INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8
- // See LICENSE in the root of the software repository for the full text of the License.
9
-
10
- import { initializeBeforeLaunch } from '../lib/initialize-workspace.js'
11
- const [directory, workflow, ...extra] = process.argv.slice(2)
12
- if (!directory || !workflow || extra.length) throw new Error('Usage: initialize-workspace.mjs <new-empty-directory> <workflow-id>')
13
- await initializeBeforeLaunch(directory, workflow)
1
+ #!/usr/bin/env node
2
+ // Copyright (c) 2026 Huawei Technologies Co., Ltd.
3
+ // This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4
+ // CANN Open Software License Agreement Version 2.0 (the "License").
5
+ // Please refer to the License for details. You may not use this file except in compliance with the License.
6
+ // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7
+ // INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8
+ // See LICENSE in the root of the software repository for the full text of the License.
9
+
10
+ import { initializeBeforeLaunch } from '../lib/initialize-workspace.js'
11
+ const [directory, workflow, ...extra] = process.argv.slice(2)
12
+ if (!directory || !workflow || extra.length) throw new Error('Usage: initialize-workspace.mjs <new-empty-directory> <workflow-id>')
13
+ await initializeBeforeLaunch(directory, workflow)
package/lib/client.js CHANGED
@@ -286,9 +286,9 @@ window.__ModuleLoader__.load({
286
286
  light: "#C7000B",
287
287
  dark: "#C7000B"
288
288
  }]));
289
- // \0dsh-inline-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\interface.css.mjs
289
+ // \0dsh-inline-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\interface.css.mjs
290
290
  var interface_css_default = "span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-dsh-hero]){width:auto;min-width:0;height:auto}span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-dsh-hero])+span{display:none}[data-cannbot-dsh-hero]{color:var(--dsw-alias-label-primary);justify-content:center;align-items:center;gap:10px;font-size:26px;font-weight:500;line-height:32px;display:inline-flex}[data-cannbot-dsh-hero] svg{flex-shrink:0}.cannbot-dsh-name{letter-spacing:-.3px;font-weight:650}";
291
- // \0dsh-global-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\controls.css.mjs
291
+ // \0dsh-global-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\controls.css.mjs
292
292
  const css$5 = ".cannbot-dsh-workflow{flex-direction:column;align-items:flex-start;gap:4px;min-width:120px;max-width:280px;display:inline-flex;position:relative}.cannbot-dsh-workflow-anchor{flex:none;min-width:120px;max-width:100%}.cannbot-dsh-workflow-trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:100%;min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0 8px;font-family:inherit;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.cannbot-dsh-workflow-trigger svg{flex:none}.cannbot-dsh-workflow-trigger svg:last-child{color:var(--dsw-alias-label-caption)}.cannbot-dsh-workflow-trigger[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.cannbot-dsh-workflow-trigger:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.cannbot-dsh-workflow-trigger:focus-visible{outline:2px solid var(--dsw-focus-ring-color);outline-offset:2px}.cannbot-dsh-workflow-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}@media (hover:hover){.cannbot-dsh-workflow-trigger:not(:disabled):hover{background:var(--dsw-alias-interactive-bg-hover)}}.cannbot-dsh-workflow-option{white-space:normal;flex-direction:column;gap:4px;max-width:320px;padding:5px 0;display:flex}.cannbot-dsh-workflow-option small{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5}.cannbot-dsh-error{color:var(--dsw-alias-label-secondary);max-width:100%;font-size:12px;line-height:18px}.cannbot-dsh-error button{color:inherit;font:inherit;text-align:start;cursor:pointer;text-underline-offset:3px;background:0 0;border:0;padding:0 8px;text-decoration:underline}.cannbot-dsh-toggle{box-sizing:border-box;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px;display:flex}.cannbot-dsh-toggle-name{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:12px;line-height:20px;display:inline-flex}.cannbot-dsh-toggle-name svg{flex-shrink:0}.cannbot-dsh-toggle-compact{flex-direction:column;gap:6px}.cannbot-dsh-switch{background:var(--dsw-alias-interactive-bg-hover,#d7dadd);cursor:pointer;border:0;border-radius:99px;flex-shrink:0;width:36px;height:20px;padding:2px}.cannbot-dsh-switch[aria-checked=true]{background:#cf1740}.cannbot-dsh-switch>span{background:#fff;border-radius:50%;width:16px;height:16px;display:block;transform:translate(0)}.cannbot-dsh-switch[aria-checked=true]>span{transform:translate(16px)}.cannbot-dsh-switch:focus-visible{outline:2px solid var(--dsw-focus-ring-color,#cf1740);outline-offset:2px}.cannbot-dsh-update{border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:var(--dsw-radius-md,12px);color:var(--dsw-alias-label-primary);padding:16px}.cannbot-dsh-update-heading{flex-wrap:wrap;align-items:baseline;gap:12px;margin-bottom:14px;display:flex}.cannbot-dsh-update h4{margin:0;font-size:14px;font-weight:600}.cannbot-dsh-update-heading>span,.cannbot-dsh-update p{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.6}.cannbot-dsh-update-actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.cannbot-dsh-update-button{box-sizing:border-box;background:var(--dsw-alias-brand-primary,#cf1740);color:#fff;min-height:32px;font:inherit;cursor:pointer;border:0;border-radius:8px;align-items:center;padding:5px 14px;font-size:13px;text-decoration:none;display:inline-flex}.cannbot-dsh-update-button:disabled{opacity:.6;cursor:default}.cannbot-dsh-update-button:focus-visible,.cannbot-dsh-update-recheck:focus-visible{outline:2px solid var(--dsw-focus-ring-color,#cf1740);outline-offset:3px}.cannbot-dsh-update-recheck{font:inherit;color:var(--dsw-alias-brand-primary,#cf1740);cursor:pointer;background:0 0;border:0;padding:4px;font-size:12px}.cannbot-dsh-update p{margin:10px 0 0}.cannbot-dsh-content{margin-top:16px}.cannbot-dsh-content details{margin-top:12px;font-size:12px}.cannbot-dsh-content summary{cursor:pointer}.cannbot-dsh-content pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;font-size:11px;line-height:1.5;overflow:auto}.cannbot-dsh-workflow-package{border-bottom:1px solid var(--dsw-alias-border-l2,#eee);justify-content:space-between;align-items:center;gap:12px;padding:14px 0;display:flex}.cannbot-dsh-workflow-package>div:first-child{min-width:0}.cannbot-dsh-workflow-package strong{font-size:13px;font-weight:500}.cannbot-dsh-workflow-package small{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:11px;line-height:1.6;display:block}.cannbot-dsh-workflow-package-actions{flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;gap:8px;display:flex}@media (width<=480px){.cannbot-dsh-workflow-package{flex-direction:column;align-items:flex-start}}.cannbot-dsh-session-workflow{border-radius:var(--dsw-radius-sm,6px);background:var(--dsw-alias-interactive-bg-hover);min-width:0;max-width:min(320px,40vw);color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;padding:3px 8px;font-size:12px;line-height:20px;display:inline-flex}.cannbot-dsh-session-workflow>span{flex-shrink:0}.cannbot-dsh-session-workflow code{text-overflow:ellipsis;white-space:nowrap;font-size:inherit;color:var(--dsw-alias-label-primary);overflow:hidden}.cannbot-task-list{width:calc(100% - 48px);max-width:var(--dsh-composer-card-max-width,760px);box-sizing:border-box;border-radius:var(--dsw-radius-lg,12px);background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);margin:0 auto;padding:8px 12px;font-size:13px}.cannbot-task-list .cannbot-task-list-toggle{text-align:left;flex-wrap:wrap;align-items:center;gap:12px;width:100%;padding:0;display:flex}.cannbot-task-list-toggle span{color:var(--dsw-alias-label-secondary)}.cannbot-task-list-chevron{margin-left:auto}.cannbot-task-list button{color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;margin-left:auto}.cannbot-task-list ul{max-height:220px;margin:8px 0 0;padding:0;list-style:none;overflow-y:auto}.cannbot-task-list li{overflow-wrap:anywhere;gap:8px;padding:3px 0;display:flex}.cannbot-task-list li[data-status=completed]{color:var(--dsw-alias-label-secondary)}.cannbot-task-list-icon{flex:none;justify-content:center;align-items:center;width:14px;display:inline-flex}";
293
293
  const tagId$5 = "@cannbot-plugin/cannbot-dsh-server/controls.css";
294
294
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
@@ -2140,7 +2140,7 @@ window.__ModuleLoader__.load({
2140
2140
  };
2141
2141
  return api;
2142
2142
  }
2143
- // \0dsh-global-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\native-workbench.css.mjs
2143
+ // \0dsh-global-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\native-workbench.css.mjs
2144
2144
  const css$4 = ".cannbot-native-home{background:var(--dsw-alias-bg-base);flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;position:relative}.cannbot-native-notice{text-align:center;font:inherit;color:var(--dsw-alias-label-secondary);margin:0;position:absolute;bottom:16px;left:16px;right:16px}.cannbot-native-notice button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;margin-left:8px}.cannbot-workspace-preparing{text-align:center;color:var(--dsw-alias-label-primary);margin:auto;padding:32px}.cannbot-workspace-preparing strong{font-size:16px;font-weight:500;display:block}.cannbot-workspace-preparing p{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:13px}.cannbot-preparing-spinner{box-sizing:border-box;border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-state-business-primary);border-radius:50%;width:24px;height:24px;margin:0 auto 20px;animation:1s linear infinite cannbot-preparing-spin;display:block}@keyframes cannbot-preparing-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.cannbot-preparing-spinner{animation:none}}";
2145
2145
  const tagId$4 = "@cannbot-plugin/cannbot-dsh-server/native-workbench.css";
2146
2146
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
@@ -2579,8 +2579,8 @@ window.__ModuleLoader__.load({
2579
2579
  else check();
2580
2580
  });
2581
2581
  }
2582
- // \0dsh-global-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\workbench.css.mjs
2583
- const css$3 = ".cannbot-workbench{--cwb-ink:var(--dsw-alias-label-primary,#17181d);--cwb-muted:var(--dsw-alias-label-secondary,#677185);--cwb-surface:var(--dsw-alias-bg-layer-1,#fff);--cwb-border:var(--dsw-alias-border-l2,#e2e5eb);--cwb-soft:var(--dsw-alias-bg-layer-3,#f6f8fa);--cwb-accent:var(--dsw-alias-state-business-primary,#c7000b);--cwb-selected:var(--dsw-alias-bg-layer-3,#f6f8fa);color:var(--cwb-ink);background:var(--dsw-alias-bg-base,var(--cwb-surface));height:100%;font-family:inherit;font-size:14px;overflow:auto}.cannbot-workbench *,.cannbot-workbench :before,.cannbot-workbench :after{box-sizing:border-box}.cannbot-workbench button,.cannbot-workbench input,.cannbot-workbench select,.cannbot-workbench textarea{font:inherit}.cannbot-workbench button{cursor:pointer}.cannbot-workbench button:disabled{opacity:.5;cursor:default}.cannbot-workbench :is(button,input,select,textarea):focus-visible{outline:2px solid var(--cwb-accent);outline-offset:3px}.cwb-header{border-bottom:1px solid var(--cwb-border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;min-height:62px;padding:12px 30px;display:flex}.cwb-workspace{flex-wrap:wrap;align-items:center;gap:12px;min-width:0;display:flex}.cwb-workspace-info{min-width:0}.cwb-workspace-choice{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.cwb-inherited{color:var(--cwb-muted);background:var(--cwb-soft);border-radius:5px;padding:3px 7px;font-size:11px}.cwb-workspace-path{text-overflow:ellipsis;white-space:nowrap;max-width:min(52vw,560px);color:var(--cwb-muted);padding-left:6px;font-size:12px;line-height:1.5;display:block;overflow:hidden}.cwb-workspace select{background:var(--cwb-surface);max-width:300px;color:var(--cwb-ink);border:0;padding:6px}.cwb-content{max-width:1260px;margin:0 auto;padding:26px 32px 22px}.cwb-heading{margin-bottom:20px}.cwb-heading h1{letter-spacing:-.5px;margin:0 0 8px;font-size:28px;font-weight:650;line-height:1.3}.cwb-heading p{color:var(--cwb-muted);margin:0;font-size:15px;line-height:1.6}.cwb-text-button{color:var(--cwb-muted);text-align:start;background:0 0;border:0;align-items:center;gap:7px;padding:5px 2px;display:inline-flex}.cwb-text-button:hover:not(:disabled){color:var(--cwb-accent)}.cwb-home{justify-content:center;align-items:center;padding:24px;display:flex}.cwb-home .cwb-content{width:100%;max-width:var(--dsh-composer-card-max-width,720px);margin:auto;padding:0 0 32px}.cwb-hero{color:var(--cwb-ink);flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 10px;margin-bottom:12px;font-size:26px;font-weight:500;line-height:32px;display:flex}.cwb-hero>img{flex:none}.cwb-hero h1{font:inherit;margin:0}.cwb-composer{--dsw-elevation-stroke-color:var(--cwb-border);border-radius:var(--dsw-radius-panel,16px);background:var(--dsw-specific-input-major,var(--cwb-surface));width:100%;box-shadow:var(--dsw-elevation-soft,0 0 0 1px var(--cwb-border), 0 2px 8px #00000008);border:0;flex-direction:column;gap:8px;padding-top:8px;display:flex}.cwb-composer-context{align-items:center;gap:2px;min-width:0;margin:4px 0 8px;padding:0 16px 0 12px;display:flex}.cwb-workspace-chip{border-radius:var(--dsw-radius-sm,4px);max-width:min(100%,360px);min-height:28px;color:var(--cwb-ink);background:0 0;border:0;align-items:center;gap:4px;padding:0 8px;line-height:20px;display:inline-flex;font-size:13px!important;font-weight:500!important}.cwb-workspace-chip:hover:not(:disabled),.cwb-attach:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,var(--cwb-soft))}.cwb-workspace-chip>svg{flex:none}.cwb-workspace-chip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-bound-workflow{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--cwb-muted);padding:0 8px;font-size:12px;line-height:20px;overflow:hidden}.cwb-workspace-menu-label{flex-direction:column;min-width:0;max-width:min(420px,70vw);display:flex}.cwb-workspace-menu-label>span,.cwb-workspace-menu-label>small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-workspace-menu-label>small{color:var(--dsw-alias-label-secondary,#677185);font-size:11px}.cwb-composer textarea{resize:vertical;width:100%;min-height:52px;max-height:340px;color:var(--cwb-ink);line-height:calc(24px + var(--dsh-content-font-delta,0px));font-size:var(--dsh-content-font-size,14px);background:0 0;border:0;outline:0;padding:0 20px;display:block}.cwb-composer textarea:focus-visible{outline:0}.cwb-composer textarea::placeholder{color:var(--cwb-muted)}.cwb-composer-actions,.cwb-composer-tools{flex-wrap:wrap;align-items:center;gap:16px;min-width:0;display:flex}.cwb-composer-actions{justify-content:space-between;padding:0 12px 10px}.cwb-attach{border-radius:var(--dsw-radius-sm,4px);width:28px;height:28px;color:var(--cwb-muted);background:0 0;border:0;place-items:center;padding:0;display:inline-grid}.cwb-send{background:var(--dsw-alias-button-info-fill,var(--cwb-accent));color:#fff;border:0;border-radius:999px;flex:none;place-items:center;width:34px;height:34px;padding:0;display:grid}.cwb-send:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--cwb-accent))}.cannbot-workbench .cwb-send:disabled{opacity:.4}.cwb-primary{color:#fff;white-space:nowrap;background:#c7000b;border:1px solid #c7000b;border-radius:9px;justify-content:center;align-items:center;gap:22px;min-height:42px;padding:10px 22px;font-weight:550;display:inline-flex}.cwb-primary:hover:not(:disabled){background:#c7000b}.cwb-selection{color:var(--cwb-accent);background:var(--cwb-selected);border-radius:7px;align-items:center;gap:8px;min-width:0;max-width:100%;padding:6px 9px;font-size:12px;display:inline-flex}.cwb-selection>span{overflow-wrap:anywhere}.cwb-selection button,.cwb-files button{color:inherit;background:0 0;border:0;padding:0 4px;font-size:18px}.cwb-files{flex-wrap:wrap;gap:8px;margin:0;padding:0 20px;list-style:none;display:flex}.cwb-files li{border:1px solid var(--cwb-border);border-radius:6px;align-items:center;gap:6px;max-width:250px;padding:3px 6px;display:inline-flex}.cwb-files li span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-hint{color:var(--cwb-muted);margin:10px 0 0;font-size:12px;line-height:1.6}.cwb-error{border-left:3px solid var(--cwb-accent);background:var(--cwb-selected);color:var(--cwb-ink);padding:12px 14px;line-height:1.6}.cwb-error-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.cwb-error .cwb-text-button{color:var(--cwb-accent)}.cwb-error summary{cursor:pointer;color:var(--cwb-muted);font-size:12px}.cwb-error details p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.cwb-catalog-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:26px 0 6px;display:flex}.cwb-catalog-heading h2{margin:0;font-size:20px;font-weight:600}.cwb-search{border:1px solid var(--cwb-border);color:var(--cwb-muted);border-radius:8px;align-items:center;gap:9px;padding:8px 11px;display:flex}.cwb-search input{width:170px;color:var(--cwb-ink);background:0 0;border:0;outline:0;font-size:13px}.cwb-categories{border-bottom:1px solid var(--cwb-border);gap:22px;margin-bottom:18px;display:flex;overflow-x:auto}.cwb-categories button{color:var(--cwb-muted);white-space:nowrap;background:0 0;border:0;border-bottom:2px solid #0000;padding:12px 3px}.cwb-categories button[aria-pressed=true]{border-bottom-color:var(--cwb-accent);color:var(--cwb-accent);font-weight:550}.cwb-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:10px;display:grid}.cwb-card{text-align:start;border:1px solid var(--cwb-border);width:100%;min-height:96px;color:var(--cwb-ink);background:var(--cwb-surface);border-radius:9px;grid-template-columns:28px minmax(0,1fr) 18px;align-items:start;gap:10px;padding:14px;transition:border-color .15s,background .15s;display:grid}.cwb-card:hover:not(:disabled){border-color:var(--cwb-accent)}.cwb-card[aria-pressed=true]{border-color:var(--cwb-accent);background:var(--cwb-selected)}.cwb-card-icon{background:var(--cwb-selected);width:40px;height:40px;color:var(--cwb-accent);border-radius:9px;flex:none;justify-content:center;align-items:center;display:inline-flex}.cwb-card .cwb-card-icon{border-radius:6px;width:28px;height:28px}.cwb-card .cwb-card-icon svg{width:19px;height:19px}.cwb-card-copy{flex-direction:column;gap:5px;min-width:0;padding-top:3px;display:flex}.cwb-card-copy strong{overflow-wrap:anywhere;font-size:14px;font-weight:600;line-height:1.4}.cwb-card-copy>span{color:var(--cwb-muted);font-size:12px;line-height:1.55}.cwb-card-corner{width:18px;height:18px;color:var(--cwb-muted);background:0 0;border:0;justify-content:center;align-items:center;margin-top:3px;display:inline-flex}.cwb-card-corner svg{flex:none;display:block}.cwb-empty{color:var(--cwb-muted);padding:20px 0;line-height:1.7}.cwb-library{border:1px solid var(--cwb-border);border-radius:12px;grid-template-columns:minmax(220px,.85fr) minmax(0,2fr);display:grid;overflow:hidden}.cwb-library-list{background:var(--cwb-soft);border-right:1px solid var(--cwb-border);padding:10px}.cwb-library-list button{text-align:start;width:100%;color:var(--cwb-ink);background:0 0;border:1px solid #0000;border-radius:8px;gap:12px;padding:14px 12px;display:flex}.cwb-library-list button[aria-current=true]{border-color:var(--cwb-border);background:var(--cwb-surface)}.cwb-library-list button[aria-current=true]>svg{color:var(--cwb-accent)}.cwb-library-list button>svg{flex:none;margin-top:2px}.cwb-library-list button span{min-width:0}.cwb-library-list strong{overflow-wrap:anywhere;font-size:13px;font-weight:550;line-height:1.5;display:block}.cwb-library-list small{color:var(--cwb-muted);margin-top:5px;font-size:12px;line-height:1.6;display:block}.cwb-detail{min-width:0;padding:28px 30px}.cwb-detail-title{align-items:center;gap:14px;display:flex}.cwb-detail-title small{color:var(--cwb-muted);font-size:12px}.cwb-detail-title h2{overflow-wrap:anywhere;margin:5px 0 0;font-size:21px;line-height:1.4}.cwb-detail-summary{color:var(--cwb-muted);margin:17px 0 20px;line-height:1.7}.cwb-guide-sections{grid-template-columns:1fr;gap:18px;margin-top:28px;display:grid}.cwb-detail h3{margin:0 0 9px;font-size:14px;font-weight:600}.cwb-guide-sections ul{color:var(--cwb-muted);margin:0;padding-left:18px;font-size:13px;line-height:1.9}.cwb-example{border:1px solid var(--cwb-border);background:var(--cwb-soft);border-radius:9px;margin-top:24px;padding:18px}.cwb-example p{color:var(--cwb-muted);margin:8px 0;font-size:13px;line-height:1.8}.cwb-example .cwb-text-button{color:var(--cwb-accent)}.cwb-example small{color:var(--cwb-muted);margin-top:6px;font-size:11px;display:block}.cwb-version{border-top:1px solid var(--cwb-border);color:var(--cwb-muted);margin-top:24px;padding-top:18px;font-size:12px;line-height:1.8}.cwb-version summary{cursor:pointer}.cwb-version-actions{flex-wrap:wrap;gap:15px;display:flex}.cannbot-workbench{container:cwb/inline-size}@container cwb (width<=900px){.cwb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container cwb (width<=590px){.cwb-grid{grid-template-columns:1fr}}@media (width<=1120px){.cwb-content{padding:24px}.cwb-library{grid-template-columns:minmax(190px,.9fr) minmax(0,1.6fr)}.cwb-detail{padding:22px}}@media (width<=700px){.cwb-header{padding:12px 16px}.cwb-content{padding:22px 16px}.cwb-home{padding:16px}.cwb-heading h1{font-size:25px}.cwb-grid,.cwb-library{grid-template-columns:1fr}.cwb-library-list{border-right:0;border-bottom:1px solid var(--cwb-border);max-height:220px;overflow:auto}.cwb-workspace select{max-width:190px}.cwb-composer-tools{gap:8px}.cwb-primary{padding:9px 17px}.cwb-search,.cwb-search input{width:100%}}@media (prefers-reduced-motion:reduce){.cwb-card{transition:none}}.cwb-directory{border:1px solid var(--cwb-border);width:min(600px,100vw - 40px);max-height:80vh;color:var(--cwb-ink);background:var(--cwb-surface);border-radius:12px;padding:24px;overflow:auto}.cwb-directory::backdrop{background:#00000059}.cwb-directory h2{margin:0 0 12px;font-size:20px}.cwb-directory p{color:var(--cwb-muted);font-size:13px}.cwb-directory form{gap:8px;display:flex}.cwb-directory input{border:1px solid var(--cwb-border);background:var(--cwb-surface);min-width:0;color:inherit;border-radius:6px;flex:1;padding:8px}.cwb-directory nav{flex-wrap:wrap;gap:8px;margin:12px 0;display:flex}.cwb-directory-list{max-height:35vh;padding:0;list-style:none;overflow:auto}.cwb-directory-list button{text-align:start;width:100%;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px;padding:10px}.cwb-directory-list button:hover{background:var(--cwb-soft)}.cwb-directory footer{justify-content:flex-end;gap:16px;margin-top:20px;display:flex}.cwb-directory{--cwb-ink:var(--dsw-alias-label-primary,CanvasText);--cwb-muted:var(--dsw-alias-label-secondary,#677185);--cwb-surface:var(--dsw-alias-bg-layer-1,Canvas);--cwb-border:var(--dsw-alias-border-l2,#d7d7d7);--cwb-soft:var(--dsw-alias-bg-layer-3,#f6f8fa);--cwb-accent:var(--dsw-alias-brand-primary,#c7000b);--cwb-selected:var(--dsw-alias-bg-layer-3,#f6f8fa);font-family:inherit;font-size:14px}.cwb-directory :is(button,input,select){font:inherit}.cwb-directory button{cursor:pointer}.cwb-directory button:disabled{opacity:.5;cursor:default}.cwb-directory :is(button,input,select):focus-visible{outline:2px solid var(--cwb-accent);outline-offset:2px}";
2582
+ // \0dsh-global-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\workbench.css.mjs
2583
+ const css$3 = ".cannbot-workbench{--cwb-ink:var(--dsw-alias-label-primary,#17181d);--cwb-muted:var(--dsw-alias-label-secondary,#677185);--cwb-surface:var(--dsw-alias-bg-layer-1,#fff);--cwb-border:var(--dsw-alias-border-l2,#e2e5eb);--cwb-soft:var(--dsw-alias-bg-layer-3,#f6f8fa);--cwb-accent:var(--dsw-alias-state-business-primary,#c7000b);--cwb-selected:var(--dsw-alias-bg-layer-3,#f6f8fa);color:var(--cwb-ink);background:var(--dsw-alias-bg-base,var(--cwb-surface));height:100%;font-family:inherit;font-size:14px;overflow:auto}.cannbot-workbench *,.cannbot-workbench :before,.cannbot-workbench :after{box-sizing:border-box}.cannbot-workbench button,.cannbot-workbench input,.cannbot-workbench select,.cannbot-workbench textarea{font:inherit}.cannbot-workbench button{cursor:pointer}.cannbot-workbench button:disabled{opacity:.5;cursor:default}.cannbot-workbench :is(button,input,select,textarea):focus-visible{outline:2px solid var(--cwb-accent);outline-offset:3px}.cwb-header{border-bottom:1px solid var(--cwb-border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;min-height:62px;padding:12px 30px;display:flex}.cwb-workspace{flex-wrap:wrap;align-items:center;gap:12px;min-width:0;display:flex}.cwb-workspace-info{min-width:0}.cwb-workspace-choice{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.cwb-inherited{color:var(--cwb-muted);background:var(--cwb-soft);border-radius:5px;padding:3px 7px;font-size:11px}.cwb-workspace-path{text-overflow:ellipsis;white-space:nowrap;max-width:min(52vw,560px);color:var(--cwb-muted);padding-left:6px;font-size:12px;line-height:1.5;display:block;overflow:hidden}.cwb-workspace select{background:var(--cwb-surface);max-width:300px;color:var(--cwb-ink);border:0;padding:6px}.cwb-content{max-width:1260px;margin:0 auto;padding:26px 32px 22px}.cwb-heading{margin-bottom:20px}.cwb-heading h1{letter-spacing:-.5px;margin:0 0 8px;font-size:28px;font-weight:650;line-height:1.3}.cwb-heading p{color:var(--cwb-muted);margin:0;font-size:15px;line-height:1.6}.cwb-text-button{color:var(--cwb-muted);text-align:start;background:0 0;border:0;align-items:center;gap:7px;padding:5px 2px;display:inline-flex}.cwb-text-button:hover:not(:disabled){color:var(--cwb-accent)}.cwb-home{justify-content:center;align-items:center;padding:24px;display:flex}.cwb-home .cwb-content{width:100%;max-width:var(--dsh-composer-card-max-width,720px);margin:auto;padding:0 0 32px}.cwb-hero{color:var(--cwb-ink);flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 10px;margin-bottom:12px;font-size:26px;font-weight:500;line-height:32px;display:flex}.cwb-hero>img{flex:none}.cwb-hero h1{font:inherit;margin:0}.cwb-composer{--dsw-elevation-stroke-color:var(--cwb-border);border-radius:var(--dsw-radius-panel,16px);background:var(--dsw-specific-input-major,var(--cwb-surface));width:100%;box-shadow:var(--dsw-elevation-soft,0 0 0 1px var(--cwb-border), 0 2px 8px #00000008);border:0;flex-direction:column;gap:8px;padding-top:8px;display:flex}.cwb-composer-context{align-items:center;gap:2px;min-width:0;margin:4px 0 8px;padding:0 16px 0 12px;display:flex}.cwb-workspace-chip{border-radius:var(--dsw-radius-sm,4px);max-width:min(100%,360px);min-height:28px;color:var(--cwb-ink);background:0 0;border:0;align-items:center;gap:4px;padding:0 8px;line-height:20px;display:inline-flex;font-size:13px!important;font-weight:500!important}.cwb-workspace-chip:hover:not(:disabled),.cwb-attach:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,var(--cwb-soft))}.cwb-workspace-chip>svg{flex:none}.cwb-workspace-chip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-bound-workflow{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--cwb-muted);padding:0 8px;font-size:12px;line-height:20px;overflow:hidden}.cwb-workspace-menu-label{flex-direction:column;min-width:0;max-width:min(420px,70vw);display:flex}.cwb-workspace-menu-label>span,.cwb-workspace-menu-label>small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-workspace-menu-label>small{color:var(--dsw-alias-label-secondary,#677185);font-size:11px}.cwb-composer textarea{resize:vertical;width:100%;min-height:52px;max-height:340px;color:var(--cwb-ink);line-height:calc(24px + var(--dsh-content-font-delta,0px));font-size:var(--dsh-content-font-size,14px);background:0 0;border:0;outline:0;padding:0 20px;display:block}.cwb-composer textarea:focus-visible{outline:0}.cwb-composer textarea::placeholder{color:var(--cwb-muted)}.cwb-composer-actions,.cwb-composer-tools{flex-wrap:wrap;align-items:center;gap:16px;min-width:0;display:flex}.cwb-composer-actions{justify-content:space-between;padding:0 12px 10px}.cwb-attach{border-radius:var(--dsw-radius-sm,4px);width:28px;height:28px;color:var(--cwb-muted);background:0 0;border:0;place-items:center;padding:0;display:inline-grid}.cwb-send{background:var(--dsw-alias-button-info-fill,var(--cwb-accent));color:#fff;border:0;border-radius:999px;flex:none;place-items:center;width:34px;height:34px;padding:0;display:grid}.cwb-send:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--cwb-accent))}.cannbot-workbench .cwb-send:disabled{opacity:.4}.cwb-primary{color:#fff;white-space:nowrap;background:#c7000b;border:1px solid #c7000b;border-radius:9px;justify-content:center;align-items:center;gap:22px;min-height:42px;padding:10px 22px;font-weight:550;display:inline-flex}.cwb-primary:hover:not(:disabled){background:#c7000b}.cwb-selection{color:var(--cwb-accent);background:var(--cwb-selected);border-radius:7px;align-items:center;gap:8px;min-width:0;max-width:100%;padding:6px 9px;font-size:12px;display:inline-flex}.cwb-selection>span{overflow-wrap:anywhere}.cwb-selection button,.cwb-files button{color:inherit;background:0 0;border:0;padding:0 4px;font-size:18px}.cwb-files{flex-wrap:wrap;gap:8px;margin:0;padding:0 20px;list-style:none;display:flex}.cwb-files li{border:1px solid var(--cwb-border);border-radius:6px;align-items:center;gap:6px;max-width:250px;padding:3px 6px;display:inline-flex}.cwb-files li span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cwb-hint{color:var(--cwb-muted);margin:10px 0 0;font-size:12px;line-height:1.6}.cwb-error{border-left:3px solid var(--cwb-accent);background:var(--cwb-selected);color:var(--cwb-ink);padding:12px 14px;line-height:1.6}.cwb-error-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.cwb-error .cwb-text-button{color:var(--cwb-accent)}.cwb-error summary{cursor:pointer;color:var(--cwb-muted);font-size:12px}.cwb-error details p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.cwb-catalog-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:26px 0 6px;display:flex}.cwb-catalog-heading h2{margin:0;font-size:20px;font-weight:600}.cwb-search{border:1px solid var(--cwb-border);color:var(--cwb-muted);border-radius:8px;align-items:center;gap:9px;padding:8px 11px;display:flex}.cwb-search input{width:170px;color:var(--cwb-ink);background:0 0;border:0;outline:0;font-size:13px}.cwb-categories{border-bottom:1px solid var(--cwb-border);gap:22px;margin-bottom:18px;display:flex;overflow-x:auto}.cwb-categories button{color:var(--cwb-muted);white-space:nowrap;background:0 0;border:0;border-bottom:2px solid #0000;padding:12px 3px}.cwb-categories button[aria-pressed=true]{border-bottom-color:var(--cwb-accent);color:var(--cwb-accent);font-weight:550}.cwb-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:10px;display:grid}.cwb-card{text-align:start;border:1px solid var(--cwb-border);width:100%;min-height:96px;color:var(--cwb-ink);background:var(--cwb-surface);border-radius:9px;grid-template-columns:28px minmax(0,1fr) 18px;align-items:start;gap:10px;padding:14px;transition:border-color .15s,background .15s;display:grid}.cwb-card:hover:not(:disabled){border-color:var(--cwb-accent)}.cwb-card[aria-pressed=true]{border-color:var(--cwb-accent);background:var(--cwb-selected)}.cwb-card-icon{background:var(--cwb-selected);width:40px;height:40px;color:var(--cwb-accent);border-radius:9px;flex:none;justify-content:center;align-items:center;display:inline-flex}.cwb-card .cwb-card-icon{border-radius:6px;width:28px;height:28px}.cwb-card .cwb-card-icon svg{width:19px;height:19px}.cwb-card-copy{flex-direction:column;gap:5px;min-width:0;padding-top:3px;display:flex}.cwb-card-copy strong{overflow-wrap:anywhere;font-size:14px;font-weight:600;line-height:1.4}.cwb-card-copy>span{color:var(--cwb-muted);font-size:12px;line-height:1.55}.cwb-card-corner{width:18px;height:18px;color:var(--cwb-muted);background:0 0;border:0;justify-content:center;align-items:center;margin-top:3px;display:inline-flex}.cwb-card-corner svg{flex:none;display:block}.cwb-empty{color:var(--cwb-muted);padding:20px 0;line-height:1.7}.cwb-library{border:1px solid var(--cwb-border);border-radius:12px;grid-template-columns:minmax(220px,.85fr) minmax(0,2fr);display:grid;overflow:hidden}.cwb-library-list{background:var(--cwb-soft);border-right:1px solid var(--cwb-border);padding:10px}.cwb-library-list button{text-align:start;width:100%;color:var(--cwb-ink);background:0 0;border:1px solid #0000;border-radius:8px;gap:12px;padding:14px 12px;display:flex}.cwb-library-list button[aria-current=true]{border-color:var(--cwb-border);background:var(--cwb-surface)}.cwb-library-list button[aria-current=true]>svg{color:var(--cwb-accent)}.cwb-library-list button>svg{flex:none;margin-top:2px}.cwb-library-list button span{min-width:0}.cwb-library-list strong{overflow-wrap:anywhere;font-size:13px;font-weight:550;line-height:1.5;display:block}.cwb-library-list small{color:var(--cwb-muted);margin-top:5px;font-size:12px;line-height:1.6;display:block}.cwb-detail{min-width:0;padding:28px 30px}.cwb-detail-title{align-items:center;gap:14px;display:flex}.cwb-detail-title small{color:var(--cwb-muted);font-size:12px}.cwb-detail-title h2{overflow-wrap:anywhere;margin:5px 0 0;font-size:21px;line-height:1.4}.cwb-detail-summary{color:var(--cwb-muted);margin:17px 0 20px;line-height:1.7}.cwb-guide-sections{grid-template-columns:1fr;gap:18px;margin-top:28px;display:grid}.cwb-detail h3{margin:0 0 9px;font-size:14px;font-weight:600}.cwb-guide-sections ul{color:var(--cwb-muted);margin:0;padding-left:18px;font-size:13px;line-height:1.9}.cwb-example{border:1px solid var(--cwb-border);background:var(--cwb-soft);border-radius:9px;margin-top:24px;padding:18px}.cwb-example p{color:var(--cwb-muted);margin:8px 0;font-size:13px;line-height:1.8}.cwb-example .cwb-text-button{color:var(--cwb-accent)}.cwb-example small{color:var(--cwb-muted);margin-top:6px;font-size:11px;display:block}.cwb-version{border-top:1px solid var(--cwb-border);color:var(--cwb-muted);margin-top:24px;padding-top:18px;font-size:12px;line-height:1.8}.cwb-version summary{cursor:pointer}.cwb-version-actions{flex-wrap:wrap;gap:15px;display:flex}.cannbot-workbench{container:cwb/inline-size}@container cwb (width<=900px){.cwb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container cwb (width<=590px){.cwb-grid{grid-template-columns:1fr}}@media (width<=1120px){.cwb-content{padding:24px}.cwb-library{grid-template-columns:minmax(190px,.9fr) minmax(0,1.6fr)}.cwb-detail{padding:22px}}@media (width<=700px){.cwb-header{padding:12px 16px}.cwb-content{padding:22px 16px}.cwb-home{padding:16px}.cwb-heading h1{font-size:25px}.cwb-grid,.cwb-library{grid-template-columns:1fr}.cwb-library-list{border-right:0;border-bottom:1px solid var(--cwb-border);max-height:220px;overflow:auto}.cwb-workspace select{max-width:190px}.cwb-composer-tools{gap:8px}.cwb-primary{padding:9px 17px}.cwb-search,.cwb-search input{width:100%}}@media (prefers-reduced-motion:reduce){.cwb-card{transition:none}}.cwb-directory{border:1px solid var(--cwb-border);width:min(600px,100vw - 40px);max-height:80vh;color:var(--cwb-ink);background:var(--cwb-surface);border-radius:12px;padding:24px;overflow:auto}.cwb-directory::backdrop{background:#00000059}.cwb-directory.cb-initialization{--cwb-surface:var(--dsw-alias-bg-layer-1,Canvas);--cwb-ink:var(--dsw-alias-label-primary,CanvasText);--cwb-muted:var(--dsw-alias-label-secondary,GrayText);--cwb-border:var(--dsw-alias-border-l2,ButtonBorder);box-sizing:border-box;width:min(790px,95vw);max-height:90vh}.cb-initialization header{justify-content:space-between;align-items:baseline;display:flex}.cb-initialization-terminal{background:#181818;border-radius:8px;padding:8px;overflow:auto}.cwb-directory h2{margin:0 0 12px;font-size:20px}.cwb-directory p{color:var(--cwb-muted);font-size:13px}.cwb-directory form{gap:8px;display:flex}.cwb-directory input{border:1px solid var(--cwb-border);background:var(--cwb-surface);min-width:0;color:inherit;border-radius:6px;flex:1;padding:8px}.cwb-directory nav{flex-wrap:wrap;gap:8px;margin:12px 0;display:flex}.cwb-directory-list{max-height:35vh;padding:0;list-style:none;overflow:auto}.cwb-directory-list button{text-align:start;width:100%;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px;padding:10px}.cwb-directory-list button:hover{background:var(--cwb-soft)}.cwb-directory footer{justify-content:flex-end;gap:16px;margin-top:20px;display:flex}.cwb-directory{--cwb-ink:var(--dsw-alias-label-primary,CanvasText);--cwb-muted:var(--dsw-alias-label-secondary,#677185);--cwb-surface:var(--dsw-alias-bg-layer-1,Canvas);--cwb-border:var(--dsw-alias-border-l2,#d7d7d7);--cwb-soft:var(--dsw-alias-bg-layer-3,#f6f8fa);--cwb-accent:var(--dsw-alias-brand-primary,#c7000b);--cwb-selected:var(--dsw-alias-bg-layer-3,#f6f8fa);font-family:inherit;font-size:14px}.cwb-directory :is(button,input,select){font:inherit}.cwb-directory button{cursor:pointer}.cwb-directory button:disabled{opacity:.5;cursor:default}.cwb-directory :is(button,input,select):focus-visible{outline:2px solid var(--cwb-accent);outline-offset:2px}";
2584
2584
  const tagId$3 = "@cannbot-plugin/cannbot-dsh-server/workbench.css";
2585
2585
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
2586
2586
  const tag = document.createElement("style");
@@ -15650,7 +15650,7 @@ window.__ModuleLoader__.load({
15650
15650
  function InitializationDialog({ operation, endpoint = CANNBOT_WORKSPACES_PATH, complete, close }) {
15651
15651
  const dialog = (0, react.useRef)(null), element = (0, react.useRef)(null);
15652
15652
  const [snapshot, setSnapshot] = (0, react.useState)(), [error, setError] = (0, react.useState)(""), [cancelling, setCancelling] = (0, react.useState)(false);
15653
- const job = (0, react.useRef)(""), initial = (0, react.useRef)(operation), startId = (0, react.useRef)(crypto.randomUUID()), term = (0, react.useRef)(), sendCancel = (0, react.useRef)();
15653
+ const job = (0, react.useRef)(""), initial = (0, react.useRef)(operation), startId = (0, react.useRef)(crypto.randomUUID()), sendCancel = (0, react.useRef)();
15654
15654
  const retry = (0, react.useRef)();
15655
15655
  (0, react.useEffect)(() => {
15656
15656
  dialog.current?.showModal();
@@ -15667,9 +15667,8 @@ window.__ModuleLoader__.load({
15667
15667
  foreground: "#e5e5e5"
15668
15668
  }
15669
15669
  });
15670
- term.current = terminal;
15671
15670
  terminal.open(element.current);
15672
- let disposed = false, timer, offset = 0, sequence = 0, accepting = false, inputQueue = Promise.resolve(), done = false;
15671
+ let disposed = false, timer, offset = 0, sequence = 0, accepting = false, inputQueue = Promise.resolve(), done = false, stopping = false;
15673
15672
  const url = new URL(endpoint, document.baseURI);
15674
15673
  const request = async (body) => {
15675
15674
  const response = await fetch(url, {
@@ -15685,7 +15684,7 @@ window.__ModuleLoader__.load({
15685
15684
  return value;
15686
15685
  };
15687
15686
  const update = (value) => {
15688
- if (disposed) return;
15687
+ if (disposed || done) return;
15689
15688
  job.current = value.jobId;
15690
15689
  setSnapshot(value);
15691
15690
  sequence = Math.max(sequence, value.inputSequence);
@@ -15695,8 +15694,10 @@ window.__ModuleLoader__.load({
15695
15694
  }
15696
15695
  if (value.nextOffset > offset) terminal.write(value.output.slice(Math.max(0, offset - value.offset)));
15697
15696
  offset = Math.max(offset, value.nextOffset);
15698
- accepting = value.interactive && value.phase === "running";
15699
- terminal.options.disableStdin = !accepting;
15697
+ const readyForInput = value.interactive && value.phase === "running" && !stopping;
15698
+ terminal.options.disableStdin = !readyForInput;
15699
+ if (readyForInput && !accepting) terminal.focus();
15700
+ accepting = readyForInput;
15700
15701
  if (value.phase === "ready") {
15701
15702
  done = true;
15702
15703
  complete(value.result);
@@ -15730,7 +15731,8 @@ window.__ModuleLoader__.load({
15730
15731
  poll();
15731
15732
  };
15732
15733
  sendCancel.current = async () => {
15733
- if (!job.current) return;
15734
+ if (!job.current || stopping || done) return;
15735
+ stopping = true;
15734
15736
  setCancelling(true);
15735
15737
  accepting = false;
15736
15738
  terminal.options.disableStdin = true;
@@ -15741,8 +15743,11 @@ window.__ModuleLoader__.load({
15741
15743
  offset
15742
15744
  }));
15743
15745
  } catch (reason) {
15744
- setCancelling(false);
15745
- if (!disposed) setError(String(reason.message));
15746
+ stopping = false;
15747
+ if (!disposed) {
15748
+ setCancelling(false);
15749
+ setError(String(reason.message));
15750
+ }
15746
15751
  }
15747
15752
  };
15748
15753
  const input = terminal.onData((data) => {
@@ -15775,32 +15780,41 @@ window.__ModuleLoader__.load({
15775
15780
  clearTimeout(timer);
15776
15781
  input.dispose();
15777
15782
  terminal.dispose();
15778
- term.current = void 0;
15779
15783
  };
15780
15784
  }, []);
15781
15785
  const finished = snapshot?.phase === "error";
15782
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dialog", {
15786
+ return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dialog", {
15783
15787
  ref: dialog,
15784
15788
  className: "cwb-directory cb-initialization",
15785
15789
  "aria-label": "工作流初始化",
15790
+ onClick: (event) => event.stopPropagation(),
15786
15791
  onCancel: (event) => {
15787
15792
  event.preventDefault();
15788
15793
  if (finished) close();
15789
15794
  else sendCancel.current?.();
15790
15795
  },
15791
15796
  children: [
15792
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: "工作流初始化" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15797
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: operation.action === "switch-workflow" ? "切换工作流" : "安装工作流" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15793
15798
  type: "button",
15794
15799
  className: "cwb-text-button",
15795
15800
  disabled: !finished && (!snapshot || cancelling),
15796
15801
  onClick: () => finished ? close() : void sendCancel.current?.(),
15797
15802
  children: finished ? "关闭" : cancelling ? "正在取消…" : "取消初始化"
15798
15803
  })] }),
15799
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: snapshot?.interactive ? "请点击终端,按提示回答问卷;支持方向键、空格和回车。" : "正在准备工作区,完成后才能开始对话。" }),
15804
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15805
+ role: "status",
15806
+ children: finished ? "初始化未完成。" : snapshot?.interactive ? "请在终端中按提示操作,完成后将自动返回工作区。" : "正在准备工作区…"
15807
+ }),
15800
15808
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15801
15809
  ref: element,
15802
15810
  className: "cb-initialization-terminal",
15803
- "aria-label": "初始化交互终端"
15811
+ "aria-label": "初始化交互终端",
15812
+ onKeyDown: (event) => {
15813
+ if (event.key === "Escape") {
15814
+ event.preventDefault();
15815
+ event.stopPropagation();
15816
+ }
15817
+ }
15804
15818
  }),
15805
15819
  error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
15806
15820
  role: "alert",
@@ -15813,7 +15827,7 @@ window.__ModuleLoader__.load({
15813
15827
  })]
15814
15828
  })
15815
15829
  ]
15816
- });
15830
+ }), document.body);
15817
15831
  }
15818
15832
  // plugin/frontend/SidebarActions.tsx
15819
15833
  function ArchivedViewMenu({ value, change }) {
@@ -16151,25 +16165,36 @@ window.__ModuleLoader__.load({
16151
16165
  await readback?.refresh();
16152
16166
  close();
16153
16167
  } catch {
16168
+ setRunning(false);
16154
16169
  setError("工作流已切换,列表刷新失败。请刷新列表,无需再次切换。");
16155
16170
  }
16156
16171
  };
16157
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
16172
+ if (running) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InitializationDialog, {
16173
+ endpoint,
16174
+ operation: {
16175
+ action: "switch-workflow",
16176
+ workspaceId: workspace.workspaceId,
16177
+ pluginId
16178
+ },
16179
+ close: () => setRunning(false),
16180
+ complete: () => {
16181
+ setCommitted(true);
16182
+ refresh();
16183
+ }
16184
+ });
16185
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
16158
16186
  open: true,
16159
16187
  closeLabel: "关闭",
16160
16188
  title: "切换工作流",
16161
16189
  description: "同一工作区只能激活一个工作流。切换成功后,之前的会话永久冻结为只读;即使切回原工作流,也需新建会话。项目代码保留。",
16162
- onClose: () => {
16163
- if (!running) close();
16164
- },
16190
+ onClose: close,
16165
16191
  footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
16166
16192
  variant: "outline",
16167
- disabled: running,
16168
16193
  onClick: close,
16169
16194
  children: "取消"
16170
16195
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
16171
16196
  variant: "outline",
16172
- disabled: running || !committed && (!pluginId || pluginId === workspace.pluginId),
16197
+ disabled: !committed && (!pluginId || pluginId === workspace.pluginId),
16173
16198
  onClick: () => committed ? void refresh() : setRunning(true),
16174
16199
  children: committed ? "刷新列表" : "切换并冻结旧会话"
16175
16200
  })] }),
@@ -16179,7 +16204,7 @@ window.__ModuleLoader__.load({
16179
16204
  children: ["工作流", /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
16180
16205
  "aria-label": "工作流",
16181
16206
  value: pluginId,
16182
- disabled: running || committed,
16207
+ disabled: committed,
16183
16208
  onChange: (event) => setPluginId(event.target.value),
16184
16209
  children: [
16185
16210
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
@@ -16209,20 +16234,7 @@ window.__ModuleLoader__.load({
16209
16234
  children: error
16210
16235
  })
16211
16236
  ]
16212
- }), running && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InitializationDialog, {
16213
- endpoint,
16214
- operation: {
16215
- action: "switch-workflow",
16216
- workspaceId: workspace.workspaceId,
16217
- pluginId
16218
- },
16219
- close: () => setRunning(false),
16220
- complete: () => {
16221
- setRunning(false);
16222
- setCommitted(true);
16223
- refresh();
16224
- }
16225
- })] });
16237
+ });
16226
16238
  }
16227
16239
  function activeRefusal(reason) {
16228
16240
  if (!reason || typeof reason !== "object") return;
@@ -16752,7 +16764,7 @@ window.__ModuleLoader__.load({
16752
16764
  ]
16753
16765
  });
16754
16766
  }
16755
- // \0dsh-global-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\modes.css.mjs
16767
+ // \0dsh-global-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\modes.css.mjs
16756
16768
  const css$1 = "[data-slot=sidebar] [data-cannbot-mode-switch-host]{-webkit-app-region:no-drag;flex-direction:column;flex-shrink:0;min-width:0;display:flex}.cb-mode-switch{box-sizing:border-box;min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;border-radius:var(--dsw-radius-md,8px);background:0 0;border:0;align-items:center;gap:8px;margin:0 2px;padding:7px 8px;font-size:14px;line-height:22px;display:flex}.cb-mode-switch-icon{flex:none;justify-content:center;align-items:center;display:inline-flex}.cb-mode-switch-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}[data-sidebar-collapsed=true] .cb-mode-switch{justify-content:center;width:36px;height:36px;margin:0;padding:0}[data-sidebar-collapsed=true] .cb-mode-switch-name{display:none}[data-sidebar-collapsed=true] .cb-mode-switch-icon>*{width:18px;height:18px}.cb-workspaces{box-sizing:border-box;height:100%;min-height:0;padding-right:var(--dsh-sidebar-inline-padding,12px);color:var(--dsw-alias-label-primary);flex-direction:column;font-family:inherit;display:flex}[data-cannbot-embedded-frame]>[data-cannbot-embedded-column=sidebar],[data-cannbot-embedded-frame]>[data-side=sidebar],[data-cannbot-embedded-frame]>[data-shell-leading]{display:none}[data-cannbot-embedded-frame]>[data-cannbot-embedded-column=main]{grid-area:1/1/auto/3}[data-cannbot-embedded-frame]>[data-cannbot-embedded-column=rightbar]{grid-area:1/3/auto/4}.cb-icon-button,.cb-add-server,.cb-session,.cb-sidebar-error>button{font:inherit;color:inherit;cursor:pointer;border-radius:var(--dsw-radius-md,8px);background:0 0;border:0}.cb-icon-button:hover,.cb-add-server:hover,.cb-mode-switch:hover{background:var(--dsw-alias-interactive-bg-hover)}.cb-workspaces button:focus-visible,.cb-mode-switch:focus-visible,.cb-project-row:focus-visible{outline:2px solid var(--dsw-focus-ring-color);outline-offset:-2px}.cb-icon-button{flex-shrink:0;justify-content:center;align-items:center;padding:6px;display:inline-flex}.cb-workspace-list{min-height:0;overflow-y:auto}.cb-project-row{box-sizing:border-box;height:34px;padding:0 8px;min-width:0;color:var(--dsw-alias-label-primary);border-radius:var(--dsw-radius-md);user-select:none;align-items:center;gap:6px;padding-inline-start:calc(8px + var(--cb-workspace-indent,0px));display:flex}.cb-project-row[aria-expanded]{cursor:pointer}.cb-project-row:hover,.cb-project-row:has([aria-haspopup=menu][aria-expanded=true]){background:var(--dsw-alias-interactive-bg-hover)}.cb-project-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:inherit;font-size:14px;line-height:20px;overflow:hidden}.cb-project-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex;overflow:hidden}.cb-project-accessory{flex:none;align-items:center;display:inline-flex}.cb-leading{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.cb-project-selected>.cb-project-row>.cb-folder{color:var(--dsw-alias-state-business-primary)}.cb-project-row>.cb-chevron{color:var(--dsw-alias-label-caption);display:none}.cb-project-row:hover>.cb-chevron{display:inline-flex}.cb-project-row:has(>.cb-chevron):hover>.cb-folder{display:none}.cb-chevron>svg{transition:transform .15s var(--ds-ease-in-out)}.cb-chevron-open{transform:rotate(90deg)}.cb-project-children{min-width:0}.cb-project-nested>.cb-project-children{--cb-workspace-indent:12px}.cb-project-row+.cb-project-children,.cb-project-children>*+*{margin-top:2px}.cb-project+.cb-project{margin-top:4px}.cb-project-action,.cb-connection-action{border-radius:var(--dsw-radius-xs);width:16px;height:16px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.cb-project-action:hover:not(:disabled),.cb-connection-action:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.cb-workspaces .cb-server-actions .cb-connection-action{opacity:0;pointer-events:none}.cb-project-row:hover .cb-connection-action,.cb-project-row:focus-within .cb-connection-action,.cb-project-row:has([aria-haspopup=menu][aria-expanded=true]) .cb-connection-action{opacity:1;pointer-events:auto}.cb-connection-action>span{display:inline-flex}.cb-connection-pending{animation:1s linear infinite cb-connection-spin}@keyframes cb-connection-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.cb-connection-pending{animation:none}.cb-chevron>svg{transition:none}}.cb-server-actions{flex-shrink:0;align-items:center;gap:15px;display:flex}.cb-workspaces button:disabled{cursor:default;opacity:.55}.cb-session-row{min-height:32px;border-radius:var(--dsw-radius-md);min-width:0;color:var(--dsw-alias-label-primary);user-select:none;flex-wrap:wrap;align-items:center;gap:0;padding:0 8px;padding-inline-start:calc(8px + var(--cb-workspace-indent,0px));display:flex}.cb-session{text-align:left;flex:1;align-items:center;min-width:0;height:32px;padding:0;display:flex}.cb-session-title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;margin:0 6px 0 4px;font-size:14px;line-height:20px;overflow:hidden}.cb-session-row:hover,.cb-session-row:has([aria-current=page]),.cb-session-row:has([aria-haspopup=menu][aria-expanded=true]){background:var(--dsw-alias-interactive-bg-hover)}.cb-session-time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:10px;line-height:16px}.cb-session-pin{width:16px;height:20px;color:var(--dsw-alias-label-caption);flex:none;justify-content:center;align-items:center;margin-left:6px;display:inline-flex}.cb-row-actions{flex:none;align-items:center;gap:15px;display:none}.cb-project-row .cb-row-actions{height:20px}.cb-project-row:hover .cb-row-actions,.cb-project-row:focus-within .cb-row-actions,.cb-project-row:has([aria-haspopup=menu][aria-expanded=true]) .cb-row-actions,.cb-session-row:hover>.cb-row-actions,.cb-session-row:focus-within>.cb-row-actions,.cb-session-row:has([aria-haspopup=menu][aria-expanded=true])>.cb-row-actions{display:inline-flex}.cb-server-actions>.cb-row-actions{visibility:hidden;pointer-events:none;display:inline-flex}.cb-project-row:hover .cb-server-actions>.cb-row-actions,.cb-project-row:focus-within .cb-server-actions>.cb-row-actions,.cb-project-row:has([aria-haspopup=menu][aria-expanded=true]) .cb-server-actions>.cb-row-actions{visibility:visible;pointer-events:auto}.cb-session-row:hover>.cb-session-time,.cb-session-row:hover>.cb-session-pin,.cb-session-row:focus-within>.cb-session-time,.cb-session-row:focus-within>.cb-session-pin,.cb-session-row:has([aria-haspopup=menu][aria-expanded=true])>.cb-session-time,.cb-session-row:has([aria-haspopup=menu][aria-expanded=true])>.cb-session-pin{display:none}.cb-session-archived .cb-session-title{color:var(--dsw-alias-label-caption)}.cb-session-row>.cb-sidebar-error{flex-basis:100%}.cb-empty,.cb-sidebar-error{color:var(--dsw-alias-label-secondary);margin:8px;font-size:12px;line-height:1.6}.cb-sidebar-error{color:var(--dsw-alias-state-danger-primary,#c7000b)}.cwb-plugin-choice{flex-direction:column;gap:8px;margin:16px 0;display:flex}.cwb-plugin-choice select{color:inherit;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,8px);padding:8px}.cb-rename-input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);width:100%;height:44px;font:inherit;color:var(--dsw-alias-label-primary);background:0 0;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.cb-rename-input:disabled{color:var(--dsw-alias-label-dimmed)}.cb-danger-action:not(:disabled){color:var(--dsw-alias-state-error-primary)}.cb-archive-activity{color:var(--dsw-alias-label-primary);margin:0 0 8px;padding-left:18px;font-size:13px;line-height:20px}.cb-archive-activity li{overflow-wrap:anywhere}.cb-workspaces-heading{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:4px;margin:2px 0 4px;padding-left:4px;display:flex}.cb-workspaces-heading h2{min-width:0;margin:0;font-size:14px;font-weight:400;line-height:20px}.cb-heading-actions{align-items:center;gap:4px;margin-left:auto;display:flex}.cb-toolbar-button,.cb-add-server{border-radius:var(--dsw-radius-sm);width:28px;height:28px;font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;font-size:14px;display:inline-flex}.cb-toolbar-button:hover{background:var(--dsw-alias-interactive-bg-hover)}.cb-server-drop-before,.cb-server-drop-after{position:relative}.cb-server-drop-before:before,.cb-server-drop-after:after{content:\"\";z-index:1;pointer-events:none;background:linear-gradient(55deg,transparent calc(50% - 1px),var(--dsw-alias-state-business-primary) calc(50% - 1px),var(--dsw-alias-state-business-primary) calc(50% + 1px),transparent calc(50% + 1px)) 0 0/5px 7px no-repeat,linear-gradient(125deg,transparent calc(50% - 1px),var(--dsw-alias-state-business-primary) calc(50% - 1px),var(--dsw-alias-state-business-primary) calc(50% + 1px),transparent calc(50% + 1px)) 0 5px/5px 7px no-repeat,linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px/calc(100% - 4px) 2px no-repeat;height:12px;position:absolute;left:0;right:0}.cb-server-drop-before:before{top:-8px}.cb-server-drop-after:after{bottom:-8px}[data-cannbot-servers-host]{-webkit-app-region:no-drag;flex-direction:column;flex-shrink:0;display:flex}.cb-remote-folder{width:16px;height:16px;display:inline-flex;position:relative}.cb-globe-badge{background:var(--dsw-alias-bg-base);color:var(--dsw-alias-state-business-primary,#c7000b);border-radius:50%;display:flex;position:absolute;bottom:-3px;right:-4px}.cb-server-page{width:100%;max-width:880px;height:100%;margin:0 auto;padding:32px 40px}.cb-server-page .cb-workspaces-heading{height:40px;margin-bottom:20px}.cb-server-page .cb-workspaces-heading h2{color:var(--dsw-alias-label-primary);font-size:20px;font-weight:600}.cb-server-page .cb-project-row{height:44px}.cb-server-status{color:var(--dsw-alias-label-tertiary);font-size:12px}.cb-create-workspace{box-sizing:border-box;width:min(520px,100vw - 48px)}.cb-create-field{flex-direction:column;gap:8px;margin:16px 0 8px;display:flex}.cb-create-field input,.cb-create-field select{box-sizing:border-box;width:100%;font:inherit;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);color:inherit;background:0 0;padding:10px 12px}.cb-parent-browser{margin-top:12px}.cb-parent-browser .cwb-directory-list{min-height:0;max-height:180px}.cb-create-field select option{background:var(--dsw-alias-bg-layer-1,Canvas);color:var(--dsw-alias-label-primary,CanvasText)}.cb-create-field select option:disabled{color:var(--dsw-alias-label-dimmed,GrayText)}.cb-workspace-connection{box-sizing:border-box;width:min(680px,100vw - 48px)}.cb-workspace-connection pre{box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-base);min-height:160px;max-height:320px;color:var(--dsw-alias-label-primary);padding:16px;font:12px/1.6 ui-monospace,Consolas,monospace;overflow:auto}.cb-workspace-connection>p{color:var(--dsw-alias-label-secondary);font-size:13px}.cb-workspace-connection>header{justify-content:space-between;align-items:center;gap:16px;display:flex}.cb-workspace-connection>header h2{margin:0}.cb-connection-progress[open]{flex-direction:column;height:min(480px,100vh - 48px);max-height:calc(100vh - 48px);display:flex}.cb-connection-progress pre{flex:1;min-height:0;max-height:none;margin:8px 0;overflow:auto}.cb-connection-progress>p,.cb-connection-progress>footer{flex:none}.cb-connection-progress .cwb-error{max-height:44px;overflow:auto}.cb-create-workspace{overflow:visible}.cb-parent-picker{position:relative}.cb-parent-browser{z-index:5;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);margin:4px 0 0;padding:12px;position:absolute;top:100%;left:0;right:0;box-shadow:0 8px 24px #0002}.cb-parent-browser nav{flex-wrap:wrap;gap:4px;display:flex}.cb-parent-browser footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;margin-top:8px;padding-top:8px;display:flex}.cb-parent-browser p{font-size:13px}.cb-parent-browser .cwb-directory-list{max-height:min(180px,25vh);overflow:auto}.cb-parent-browser{flex-direction:column;display:flex}.cb-parent-browser .cwb-directory-list{flex:1;min-height:0}.cb-parent-browser>nav,.cb-parent-browser>footer,.cb-parent-browser>p{flex-shrink:0}";
16757
16769
  const tagId$1 = "@cannbot-plugin/cannbot-dsh-server/modes.css";
16758
16770
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
@@ -17023,13 +17035,15 @@ window.__ModuleLoader__.load({
17023
17035
  };
17024
17036
  (0, react.useEffect)(() => {
17025
17037
  alive.current = true;
17026
- dialog.current?.showModal();
17027
17038
  return () => {
17028
17039
  alive.current = false;
17029
17040
  reading.current?.abort();
17030
17041
  clearTimeout(typing.current);
17031
17042
  };
17032
17043
  }, []);
17044
+ (0, react.useEffect)(() => {
17045
+ if (!initialization) dialog.current?.showModal();
17046
+ }, [initialization]);
17033
17047
  (0, react.useEffect)(() => {
17034
17048
  reading.current?.abort();
17035
17049
  clearTimeout(typing.current);
@@ -17110,6 +17124,28 @@ window.__ModuleLoader__.load({
17110
17124
  if (alive.current && !workflowNotice) setSaving(false);
17111
17125
  }
17112
17126
  };
17127
+ if (initialization) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InitializationDialog, {
17128
+ operation: initialization,
17129
+ endpoint: location?.endpoint,
17130
+ close: () => {
17131
+ setInitialization(void 0);
17132
+ setSaving(false);
17133
+ },
17134
+ complete: (value) => {
17135
+ const { workspace } = value;
17136
+ if (location?.onCreated) location.onCreated(workspace, true).catch(() => {
17137
+ if (alive.current) {
17138
+ setInitialization(void 0);
17139
+ setSaving(false);
17140
+ setError("工作区已创建,请从侧边栏重新打开。");
17141
+ }
17142
+ });
17143
+ else {
17144
+ modes.enterCreatedWorkspace(workspace);
17145
+ close();
17146
+ }
17147
+ }
17148
+ });
17113
17149
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dialog", {
17114
17150
  ref: dialog,
17115
17151
  className: "cwb-directory cb-create-workspace",
@@ -17275,26 +17311,6 @@ window.__ModuleLoader__.load({
17275
17311
  className: "cwb-error",
17276
17312
  children: error
17277
17313
  }),
17278
- initialization && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InitializationDialog, {
17279
- operation: initialization,
17280
- endpoint: location?.endpoint,
17281
- close: () => {
17282
- setInitialization(void 0);
17283
- setSaving(false);
17284
- },
17285
- complete: (value) => {
17286
- const result = value;
17287
- setInitialization(void 0);
17288
- setSaving(false);
17289
- if (location?.onCreated) location.onCreated(result.workspace, true).catch(() => {
17290
- if (alive.current) setError("工作区已创建,请从侧边栏重新打开。");
17291
- });
17292
- else {
17293
- modes.enterCreatedWorkspace(result.workspace);
17294
- close();
17295
- }
17296
- }
17297
- }),
17298
17314
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
17299
17315
  type: "button",
17300
17316
  className: "cwb-text-button",
@@ -17375,7 +17391,51 @@ window.__ModuleLoader__.load({
17375
17391
  owned.clear();
17376
17392
  };
17377
17393
  }
17378
- // \0dsh-global-css:D:\DSH\cannbot-rebase-20261126\dsh\plugin\frontend\workspace-tree-bridge.css.mjs
17394
+ // plugin/frontend/embedded-terminal.ts
17395
+ /** Run in the remote Web profile. The native terminal inherits the remote session's cwd. */
17396
+ function mountWorkspaceTerminal(ctx, modes) {
17397
+ const sidebar = ctx.sidebarRight, types = ctx.sidebarRightTabs;
17398
+ if (!sidebar.mounted?.subscribe || !sidebar.openTabs?.subscribe || !types.subscribe || typeof sidebar.openTabIn !== "function" || typeof sidebar.tabsIn !== "function") return () => {};
17399
+ let opened = "", frame = 0;
17400
+ let retry;
17401
+ const sync = () => {
17402
+ frame = 0;
17403
+ const state = modes.getSnapshot(), session = sidebar.mounted.getSnapshot();
17404
+ if (!session || state.restoringSession || state.creating || state.navigationError || session !== state.activeSessionId) return;
17405
+ const workspace = state.workspaces.find((item) => item.workspaceId === state.selectedWorkspaceId);
17406
+ if (!workspace || !workspace.sessionIds.includes(session) || !types.get("terminal")) return;
17407
+ if (opened === session) return;
17408
+ const existing = sidebar.tabsIn(session).find((tab) => tab.kind === "terminal");
17409
+ if (existing) {
17410
+ if (!sidebar.isExpanded()) sidebar.toggleExpanded();
17411
+ sidebar.focus(existing.id);
17412
+ } else {
17413
+ sidebar.openTabIn(session, "terminal");
17414
+ if (!sidebar.tabsIn(session).some((tab) => tab.kind === "terminal")) {
17415
+ clearTimeout(retry);
17416
+ retry = setTimeout(schedule, 150);
17417
+ return;
17418
+ }
17419
+ }
17420
+ opened = session;
17421
+ };
17422
+ const schedule = () => {
17423
+ if (!frame) frame = requestAnimationFrame(sync);
17424
+ };
17425
+ const stops = [
17426
+ modes.subscribe(schedule),
17427
+ sidebar.mounted.subscribe(schedule),
17428
+ sidebar.openTabs.subscribe(schedule),
17429
+ types.subscribe(schedule)
17430
+ ];
17431
+ schedule();
17432
+ return () => {
17433
+ for (const stop of stops) stop();
17434
+ cancelAnimationFrame(frame);
17435
+ clearTimeout(retry);
17436
+ };
17437
+ }
17438
+ // \0dsh-global-css:D:\DSH\.work\wf-pkg-pr-1130\dsh\plugin\frontend\workspace-tree-bridge.css.mjs
17379
17439
  const css = "[data-slot=sidebar\\.workspaces][data-cannbot-workspaces-hidden]{display:none!important}[data-cannbot-workspace-tree-host]{flex-direction:column;flex:1;height:100%;min-height:0;display:flex}[data-cannbot-workspace-tree-host]:not([data-cannbot-workspaces-active]){display:none}";
17380
17440
  const tagId = "@cannbot-plugin/cannbot-dsh-server/workspace-tree-bridge.css";
17381
17441
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
@@ -17675,7 +17735,13 @@ window.__ModuleLoader__.load({
17675
17735
  storeFor: (id) => scoped.conversation.blocks.storeFor(id),
17676
17736
  set: (id, value) => scoped.conversation.blocks.set(id, value)
17677
17737
  }));
17678
- if (modes.embedded) releases.push(mountEmbeddedShell(document));
17738
+ if (modes.embedded) {
17739
+ releases.push(mountEmbeddedShell(document));
17740
+ const terminalScope = scoped.inject(["sidebarRight", "sidebarRightTabs"], (remote) => {
17741
+ remote.effect(() => mountWorkspaceTerminal(remote, modes));
17742
+ });
17743
+ releases.push(() => terminalScope.dispose());
17744
+ }
17679
17745
  releases.push(injectSlot(scoped, "sidebar.brand.mark", () => scoped.slots.register({
17680
17746
  name: "sidebar.brand.mark",
17681
17747
  priority: -100