@onescience/onecode-web 1.14.50-202609151008 → 1.14.50-202609160919

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.
Files changed (58) hide show
  1. package/assets/{3Dmol-B_IGbao6.js → 3Dmol-xleXy9GQ.js} +1 -1
  2. package/assets/{account-system-CTeHb1vW.js → account-system-eYkc0SIK.js} +1 -1
  3. package/assets/{alert-04-BgqqlHmI.js → alert-01-CJCeF3ai.js} +1 -1
  4. package/assets/{alert-05-le40y4Ov.js → alert-02-CJi22mxO.js} +1 -1
  5. package/assets/{alert-01-BYx7_Y6Z.js → alert-04-BuuL0AIT.js} +1 -1
  6. package/assets/{alert-02-BNmvIR_v.js → alert-05-DcXrpRhd.js} +1 -1
  7. package/assets/alert-06-C3By8s_s.js +1 -0
  8. package/assets/alert-07-C-ojhQuZ.js +1 -0
  9. package/assets/alert-08-B8D0_9P3.js +1 -0
  10. package/assets/alert-10-DieOLQIQ.js +1 -0
  11. package/assets/{bip-bop-03-CqDsqjlf.js → bip-bop-03-BfWYH28z.js} +1 -1
  12. package/assets/{bip-bop-04-BfYqJzN5.js → bip-bop-04-BG-CNh_8.js} +1 -1
  13. package/assets/{bip-bop-06-Qa8_OIBP.js → bip-bop-06-j4-Pah17.js} +1 -1
  14. package/assets/{bip-bop-08-BRNo3MPi.js → bip-bop-08--N0Z031u.js} +1 -1
  15. package/assets/bip-bop-09-CrOhSPop.js +1 -0
  16. package/assets/center-B1n9y8EL.js +15 -0
  17. package/assets/{current-project-JlNpICgB.js → current-project-D88n80Ca.js} +1 -1
  18. package/assets/{dialog-edit-project-DIJi2nFh.js → dialog-edit-project-DkwpgJNK.js} +1 -1
  19. package/assets/{dialog-fork-BAdUOYrd.js → dialog-fork-DWY7BL9L.js} +1 -1
  20. package/assets/{dialog-project-upload-WdGsdhnu.js → dialog-project-upload-CQETR8DT.js} +1 -1
  21. package/assets/{dialog-select-file-BxZRrD_x.js → dialog-select-file-BeSTKWgn.js} +1 -1
  22. package/assets/{dialog-select-model-CHEbu3nA.js → dialog-select-model-C285UQWZ.js} +2 -2
  23. package/assets/{dialog-terminal-unavailable-Ct951kdx.js → dialog-terminal-unavailable-BJHx-DqW.js} +1 -1
  24. package/assets/{docs-9XmuiAVT.js → docs-DUvUHosJ.js} +1 -1
  25. package/assets/{ghostty-web-CQYfPYJQ.js → ghostty-web-DOfPEAa3.js} +1 -1
  26. package/assets/{home-rWV4IZFi.js → home-D0znvU1o.js} +1 -1
  27. package/assets/{index-DVeuXHcQ.css → index-B_MGkqLF.css} +1 -1
  28. package/assets/{index-ClzL6bnc.js → index-D89_umhI.js} +38 -38
  29. package/assets/{intro-CIrXkjnS.js → intro-RRbGgi66.js} +1 -1
  30. package/assets/{nope-02-ASorFz7P.js → nope-02-HEvVIfx-.js} +1 -1
  31. package/assets/{nope-05-Bb9darrm.js → nope-05-RgyHBqFD.js} +1 -1
  32. package/assets/{nope-08-ZdNZ54iS.js → nope-08-BS9LU-iv.js} +1 -1
  33. package/assets/{nope-11-CikRcDLB.js → nope-11-DDmUqlQl.js} +1 -1
  34. package/assets/nope-12-xFjEj3BZ.js +1 -0
  35. package/assets/{onescience-DIK2-VdE.js → onescience-Bh7elMIY.js} +1 -1
  36. package/assets/{resources-Bxi9A2NO.js → resources-BWggkSux.js} +1 -1
  37. package/assets/{selection-BA_gCWSj.js → selection-BGUJK_pT.js} +1 -1
  38. package/assets/{shell-DKbXW0cq.js → shell-DC-zhUf2.js} +2 -2
  39. package/assets/{skills-BOyLnWtR.js → skills-KXwoMhyR.js} +1 -1
  40. package/assets/{staplebops-03-2uZeelsg.js → staplebops-03-Jk0L8SSt.js} +1 -1
  41. package/assets/{staplebops-04-D8jUYwrY.js → staplebops-04-BpKJFMZ2.js} +1 -1
  42. package/assets/{staplebops-06-DPjsXuSG.js → staplebops-06-DXJvqdBM.js} +1 -1
  43. package/assets/{staplebops-07-CLnq5SIW.js → staplebops-07-C2GlRGJk.js} +1 -1
  44. package/assets/{status-popover-body-v0yai74z.js → status-popover-body-D6a05RuM.js} +2 -2
  45. package/assets/{wizard-DOKm2QfM.js → wizard-DO-x_wJv.js} +1 -1
  46. package/assets/{yup-01-Dao8BLua.js → yup-01-Cr-oSr_6.js} +1 -1
  47. package/assets/{yup-03-lf7BNtmg.js → yup-03-Cf1DFqxz.js} +1 -1
  48. package/assets/{yup-04-COy1Rj2j.js → yup-04-DzDXJxIT.js} +1 -1
  49. package/assets/{yup-05-CnbyLsuQ.js → yup-05-C5d28SLh.js} +1 -1
  50. package/index.html +11 -11
  51. package/package.json +2 -2
  52. package/assets/alert-06-B0g8xkop.js +0 -1
  53. package/assets/alert-07-PkjYJmP3.js +0 -1
  54. package/assets/alert-08-Dw29jME6.js +0 -1
  55. package/assets/alert-10-BlTMfkM6.js +0 -1
  56. package/assets/bip-bop-09-DWh-JEv4.js +0 -1
  57. package/assets/center-D4mU1wNB.js +0 -15
  58. package/assets/nope-12-BQ1aWMNo.js +0 -1
@@ -1 +1 @@
1
- import{dA as M,e as N,i,c as e,t as r,R as n,S as p,F as o,c0 as W,W as Q,Y as T,cl as j,bo as U,dB as V,dC as X,bj as Z}from"./index-ClzL6bnc.js";var ii=r("<div class=os-client-capability-intro-overlay role=dialog aria-modal=true aria-label=能力介绍>"),ti=r("<section class=os-client-capability-intro-dialog><p>未找到该能力。"),ei=r("<p class=os-client-capability-unavailable-hint>暂无 OneScience 源码或魔搭映射,当前不可使用。"),li=r("<section class=os-client-capability-intro-scenarios aria-label=快捷场景><div class=os-client-capability-intro-scenarios-copy><h3></h3><p></p></div><div class=os-client-capability-intro-scenario-grid>"),ai=r("<section class=os-client-capability-intro-dialog><header class=os-client-capability-intro-head><div><span></span><h2></h2><p></p></div></header><div class=os-client-capability-intro-matrix><article class=os-client-capability-intro-block data-tone=suited><h3>适合解决</h3><div class=os-client-capability-intro-chips></div></article><article class=os-client-capability-intro-block data-tone=not-for><h3>不建议直接用在</h3><div class=os-client-capability-intro-chips></div></article><article class=os-client-capability-intro-block data-tone=prepare><h3>需要准备什么</h3><div class=os-client-capability-intro-chips></div></article></div><section class=os-client-capability-intro-flow aria-label=使用流程><h3>怎么用</h3><ol></ol></section><footer class=os-client-capability-intro-footer><a class=os-client-capability-intro-docs-link target=_blank rel=noreferrer>深入资料"),m=r("<span>"),ri=r("<li><span></span><strong>"),ni=r("<strong>"),si=r("<p>");function ci(b){return b==="hpc"?{title:"不用手写复杂作业脚本",body:"选择一个常见软件任务,系统会把输入文件、HPC 资源、运行脚本和审批步骤整理成可执行任务。"}:{title:"不用理解复杂模型细节",body:"选择一个常见能力,系统会把研究对象、输入数据、目标和运行偏好整理成可执行任务。"}}function di(){const b=M(),C=N(),h=()=>Z(b.id??""),S=()=>X(C.search),g=()=>V(C.search,{category:h()?.category??"onemodel",domain:h()?.domain??"materials"});return(()=>{var x=ii();return i(x,e(p,{get when(){return h()},get fallback(){return[e(n,{class:"os-client-capability-intro-backdrop",get href(){return j()},"aria-label":"关闭介绍"}),(()=>{var t=ti();return t.firstChild,i(t,e(n,{get href(){return j()},children:"返回能力中心"}),null),t})()]},children:t=>{const k=()=>ci(t().category),_=()=>U(t());return[e(n,{class:"os-client-capability-intro-backdrop",get href(){return g()},"aria-label":"关闭介绍"}),(()=>{var $=ai(),u=$.firstChild,w=u.firstChild,H=w.firstChild,R=H.nextSibling,B=R.nextSibling,A=u.nextSibling,F=A.firstChild,E=F.firstChild,I=E.nextSibling,z=F.nextSibling,L=z.firstChild,O=L.nextSibling,Y=z.nextSibling,q=Y.firstChild,D=q.nextSibling,P=A.nextSibling,G=P.firstChild,J=G.nextSibling,y=P.nextSibling,K=y.firstChild;return i(H,()=>t().intro.title||"30 秒看懂模型"),i(R,()=>t().name),i(B,()=>t().intro.subtitle),i(w,e(p,{get when(){return!_()},get children(){return ei()}}),null),i(u,e(n,{class:"os-client-capability-intro-close",get href(){return g()},"aria-label":"关闭",children:"×"}),null),i(I,e(o,{get each(){return t().intro.suited},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(O,e(o,{get each(){return t().intro.notFor},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(D,e(o,{get each(){return t().intro.prepare},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(J,e(o,{get each(){return t().intro.steps},children:(a,l)=>(()=>{var s=ri(),d=s.firstChild,f=d.nextSibling;return i(d,()=>l()+1),i(f,a),s})()})),i($,e(p,{get when(){return _()},get children(){var a=li(),l=a.firstChild,s=l.firstChild,d=s.nextSibling,f=l.nextSibling;return i(s,()=>k().title),i(d,()=>k().body),i(f,e(o,{get each(){return t().scenarios},children:v=>e(n,{class:"os-client-capability-intro-scenario-card",get href(){return W(t().id,v.id,S())},get children(){return[(()=>{var c=ni();return i(c,()=>v.title),c})(),(()=>{var c=si();return i(c,()=>v.summary),c})()]}})})),a}}),y),i(y,e(p,{get when(){return _()},get fallback(){return e(n,{class:"os-client-capability-intro-wizard-link",get href(){return g()},children:"返回模型库"})},get children(){return e(n,{class:"os-client-capability-intro-wizard-link",get href(){return W(t().id,void 0,S())},"data-primary":"true",children:"进入能力向导"})}}),null),Q(()=>T(K,"href",t().docsHref)),$})()]}})),x})()}export{di as CapabilityIntroPage};
1
+ import{dC as M,e as N,i,c as e,t as r,R as n,S as p,F as o,c2 as E,W as Q,Y as T,cn as W,bo as U,dD as V,dE as X,bj as Z}from"./index-D89_umhI.js";var ii=r("<div class=os-client-capability-intro-overlay role=dialog aria-modal=true aria-label=能力介绍>"),ti=r("<section class=os-client-capability-intro-dialog><p>未找到该能力。"),ei=r("<p class=os-client-capability-unavailable-hint>暂无 OneScience 源码或魔搭映射,当前不可使用。"),li=r("<section class=os-client-capability-intro-scenarios aria-label=快捷场景><div class=os-client-capability-intro-scenarios-copy><h3></h3><p></p></div><div class=os-client-capability-intro-scenario-grid>"),ai=r("<section class=os-client-capability-intro-dialog><header class=os-client-capability-intro-head><div><span></span><h2></h2><p></p></div></header><div class=os-client-capability-intro-matrix><article class=os-client-capability-intro-block data-tone=suited><h3>适合解决</h3><div class=os-client-capability-intro-chips></div></article><article class=os-client-capability-intro-block data-tone=not-for><h3>不建议直接用在</h3><div class=os-client-capability-intro-chips></div></article><article class=os-client-capability-intro-block data-tone=prepare><h3>需要准备什么</h3><div class=os-client-capability-intro-chips></div></article></div><section class=os-client-capability-intro-flow aria-label=使用流程><h3>怎么用</h3><ol></ol></section><footer class=os-client-capability-intro-footer><a class=os-client-capability-intro-docs-link target=_blank rel=noreferrer>深入资料"),m=r("<span>"),ri=r("<li><span></span><strong>"),ni=r("<strong>"),si=r("<p>");function ci(b){return b==="hpc"?{title:"不用手写复杂作业脚本",body:"选择一个常见软件任务,系统会把输入文件、HPC 资源、运行脚本和审批步骤整理成可执行任务。"}:{title:"不用理解复杂模型细节",body:"选择一个常见能力,系统会把研究对象、输入数据、目标和运行偏好整理成可执行任务。"}}function di(){const b=M(),C=N(),h=()=>Z(b.id??""),S=()=>X(C.search),g=()=>V(C.search,{category:h()?.category??"onemodel",domain:h()?.domain??"materials"});return(()=>{var x=ii();return i(x,e(p,{get when(){return h()},get fallback(){return[e(n,{class:"os-client-capability-intro-backdrop",get href(){return W()},"aria-label":"关闭介绍"}),(()=>{var t=ti();return t.firstChild,i(t,e(n,{get href(){return W()},children:"返回能力中心"}),null),t})()]},children:t=>{const k=()=>ci(t().category),_=()=>U(t());return[e(n,{class:"os-client-capability-intro-backdrop",get href(){return g()},"aria-label":"关闭介绍"}),(()=>{var $=ai(),u=$.firstChild,w=u.firstChild,H=w.firstChild,R=H.nextSibling,j=R.nextSibling,F=u.nextSibling,z=F.firstChild,D=z.firstChild,I=D.nextSibling,A=z.nextSibling,L=A.firstChild,O=L.nextSibling,Y=A.nextSibling,q=Y.firstChild,B=q.nextSibling,P=F.nextSibling,G=P.firstChild,J=G.nextSibling,y=P.nextSibling,K=y.firstChild;return i(H,()=>t().intro.title||"30 秒看懂模型"),i(R,()=>t().name),i(j,()=>t().intro.subtitle),i(w,e(p,{get when(){return!_()},get children(){return ei()}}),null),i(u,e(n,{class:"os-client-capability-intro-close",get href(){return g()},"aria-label":"关闭",children:"×"}),null),i(I,e(o,{get each(){return t().intro.suited},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(O,e(o,{get each(){return t().intro.notFor},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(B,e(o,{get each(){return t().intro.prepare},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(J,e(o,{get each(){return t().intro.steps},children:(a,l)=>(()=>{var s=ri(),d=s.firstChild,f=d.nextSibling;return i(d,()=>l()+1),i(f,a),s})()})),i($,e(p,{get when(){return _()},get children(){var a=li(),l=a.firstChild,s=l.firstChild,d=s.nextSibling,f=l.nextSibling;return i(s,()=>k().title),i(d,()=>k().body),i(f,e(o,{get each(){return t().scenarios},children:v=>e(n,{class:"os-client-capability-intro-scenario-card",get href(){return E(t().id,v.id,S())},get children(){return[(()=>{var c=ni();return i(c,()=>v.title),c})(),(()=>{var c=si();return i(c,()=>v.summary),c})()]}})})),a}}),y),i(y,e(p,{get when(){return _()},get fallback(){return e(n,{class:"os-client-capability-intro-wizard-link",get href(){return g()},children:"返回模型库"})},get children(){return e(n,{class:"os-client-capability-intro-wizard-link",get href(){return E(t().id,void 0,S())},"data-primary":"true",children:"进入能力向导"})}}),null),Q(()=>T(K,"href",t().docsHref)),$})()]}})),x})()}export{di as CapabilityIntroPage};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/nope-02-EygnDbCM.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/nope-02-EygnDbCM.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/nope-05-DZsXzrQW.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/nope-05-DZsXzrQW.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/nope-08-COPo0uNf.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/nope-08-COPo0uNf.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/nope-11-CVdXg8G-.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/nope-11-CVdXg8G-.aac";export{e as default};
@@ -0,0 +1 @@
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/nope-12-BJR1Ka3c.aac";export{e as default};
@@ -1,4 +1,4 @@
1
- import{b as At,c as n,c1 as bt,i,az as Ne,S as v,W as E,Y as R,X as ne,n as P,C as ge,F as ce,t as o,a2 as mt,c2 as ys,c3 as er,c4 as Da,c5 as Wt,c6 as Ja,a4 as ws,bl as $s,a3 as Cs,c7 as Ss,c8 as tr,c9 as _s,x as je,I as It,R as Ze,q as Ut,ca as Ps,o as W,a1 as pa,cb as ga,cc as Ua,l as ot,s as ft,bC as ar,bQ as gt,cd as Gr,ce as Br,cf as $i,cg as Ci,ch as ks,ci as Ds,cj as sa,k as Si,ck as Hr,f as vt,e as Xt,h as Tt,g as fa,j as As,m as qr,E as xs,M as Ms,N as Is,bL as et,cl as ir,cm as Fs,cn as zr,co as jr,cp as Wr,bM as Vr,cq as ni,cr as Ts,cs as Es,ct as Ns,bf as Kr,cu as Os,cv as Rs,cw as rr,bP as ca,T as Ls,cx as Aa,_ as Ta,cy as Us,av as ht,b6 as xt,be as _i,y as Pi,cz as Gs,bg as Xr,ae as Bs,cA as Hs,cB as qs,cC as zs,cD as js,cE as Ea,cF as la,as as Ws,cG as Qa,p as Za,cH as Vs,cI as Ks,cJ as ra,cK as Xs,cL as Js,cM as Qs,cN as Zs,cO as ki,cP as Ys,cQ as eo,cR as to,cS as Di,cT as Ai,cU as Jr,cV as Qr,cW as si,cX as ao,cY as oi,cZ as io,c_ as ro,c$ as no,d0 as zt,d1 as so,d2 as oo,d3 as Zr,d4 as Yr,d5 as en,d6 as tn,d7 as an,d8 as lo,bT as co,d9 as uo,da as mo,db as ho,dc as po,D as kt,dd as go,de as fo,df as bo,dg as vo,dh as nr,di as yo,dj as li,dk as wo,dl as rn,dm as nn,dn as $o,dp as sn,a5 as jt,dq as xi,z as Co,dr as So,ds as _o,a0 as Po,bN as ko,bO as Ya,dt as on,A as Do,du as Ao,L as xo,dv as Mo,dw as sr,dx as Io,dy as Fo,dz as To}from"./index-ClzL6bnc.js";import{d as Eo}from"./onescience-docs-CH5KBTI9.js";var No=o("<div><div class=os-download-path-hint-title></div><ul class=os-download-path-hint-list>"),Oo=o("<li class=break-all>"),Ro=o("<div class=os-download-env-row><div class=os-download-env-field><span class=os-field-label-row><span class=os-field-label>下载到环境</span></span><div>"),Lo=o("<p class=os-section-copy>确认将 <strong></strong> <!>以下路径吗?"),Uo=o("<p class=os-section-copy data-testid=download-register-guide>下载完成不会自动登记。请到 OneData「原始数据」确认接入后再加工或训练。"),Go=o("<p class=os-section-copy>SCNet 侧无法直接访问 ModelScope。确认后将打开科研开发会话,由 Agent 使用 scnet MCP 工具完成下载与传输。"),Bo=o("<div class=os-dataset-download-info-row><span></span><strong>"),Ho=o("<div class=os-upload-error>可用空间不足,无法下载该数据集"),or=o("<div class=os-upload-error>"),qo=o("<div class=os-upload-error>无法从魔搭获取数据集大小,暂不可下载"),zo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow>数据集</div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><div class=os-dataset-download-info><div class=os-dataset-download-info-row><span>数据集大小(预估)</span><strong></strong></div></div><div class=os-upload-actions><button type=button class="os-button os-button-secondary">取消</button><button type=button class="os-button os-button-primary">'),jo=o("<label><span class=os-field-label-row><span class=os-field-label><span class=os-field-required aria-hidden=true> *</span></span></span><input>"),Wo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow>取消下载</div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><p class=os-section-copy>确认取消 <strong></strong> 的下载吗?已下载的部分文件将被保留,你可以稍后重新下载。</p><div class=os-upload-actions><button type=button class="os-button os-button-secondary">继续下载</button><button type=button class="os-button os-button-primary">'),Vo=o("<p class=os-section-copy>正在删除所选副本…"),Ko=o("<p class=os-section-copy>"),Xo=o("<button type=button class=os-download-copy-all>"),Jo=o("<div class=os-download-copy-list role=group aria-label=选择要删除的环境>"),Qo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow></div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><div class=os-upload-actions><button type=button class="os-button os-button-secondary">取消</button><button type=button class="os-button os-button-primary">'),lr=o("<strong>"),Zo=o("<span class=os-download-copy-partial> 未完成"),Yo=o("<button type=button class=os-download-copy-item><span class=os-download-copy-item-title></span><span class=os-download-copy-item-path>"),el=o('<span class="os-download-copy-path break-all">');function cr(e){const t=()=>e.paths.filter(a=>a.trim());return n(v,{get when(){return t().length>0},get children(){var a=No(),r=a.firstChild,s=r.nextSibling;return i(r,()=>e.confirmed?"数据集位置":"数据集实际位置(随 ModelScope 版本可能不同)"),i(s,n(ce,{get each(){return t()},children:c=>(()=>{var d=Oo();return i(d,c),d})()})),E(()=>mt(a,`os-download-path-hint ${e.class??""}`.trim())),a}})}function tl(e){const t=()=>e.actionLabel??"下载",a=()=>e.environment??{kind:"local"},r=()=>e.diskLoading?"加载中...":er(e.availableBytes),s=()=>e.sizeLoading?"加载中...":e.datasetBytes===void 0?"无法从魔搭获取数据集大小":er(e.datasetBytes),c=()=>{if(a().kind==="ssh")return e.remotePath??"";if(a().kind==="scnet")return e.remotePath?.trim()||"(SCNet 默认缓存目录)";const h=`/${e.datasetId}`;return e.targetPath.endsWith(h)?e.targetPath.slice(0,-h.length):e.targetPath},d=()=>{const h=(e.actualPaths??[]).map(f=>f.trim()).filter(Boolean);return h.length>0?{paths:[...new Set(h)],confirmed:!0}:{paths:ys(c(),e.datasetId),confirmed:!1}},l=()=>e.busy?a().kind==="ssh"?"正在提交到远端...":"正在提交下载...":a().kind==="scnet"?"创建下载任务":t()==="更新"?"确认更新":"确认下载",p=()=>!!e.sizeLoading||e.datasetBytes===void 0,y=()=>{if(a().kind==="scnet")return!1;const h=e.datasetBytes,f=e.availableBytes;return h===void 0||f===void 0||f<=0?!1:h>f},b=()=>a().kind==="scnet"||e.diskLoading?!1:e.availableBytes===void 0,u=()=>!!e.busy||!!e.confirmDisabled||a().kind==="ssh"&&!(e.remotePath??"").trim()||p()||!!e.diskLoading||b()||y();return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var h=zo(),f=h.firstChild,w=f.firstChild,C=w.firstChild,g=C.firstChild,M=g.firstChild,O=g.nextSibling,U=C.nextSibling,V=w.nextSibling,N=V.firstChild,H=N.firstChild,D=H.nextSibling,T=V.nextSibling,z=T.firstChild,L=z.nextSibling;return f.$$click=S=>S.stopPropagation(),i(g,t,M),i(O,()=>e.title),Ne(U,"click",e.onClose,!0),i(f,n(v,{get when(){return e.environmentSelector},get children(){var S=Ro(),I=S.firstChild,B=I.firstChild,re=B.nextSibling;return i(re,()=>e.environmentSelector),S}}),V),i(f,n(v,{get when(){return a().kind==="local"},get fallback(){return[(()=>{var S=jo(),I=S.firstChild,B=I.firstChild,re=B.firstChild,de=I.nextSibling;return i(B,()=>a().kind==="ssh"?"远端存储目录":"SCNet 目标目录",re),de.$$input=J=>e.onRemotePathChange?.(J.currentTarget.value),E(()=>R(de,"placeholder",a().kind==="ssh"?"/work/you/modelscope/hub/datasets":"modelscope/hub/datasets")),E(()=>de.value=e.remotePath??""),S})(),n(cr,{get paths(){return d().paths},get confirmed(){return d().confirmed}})]},get children(){return[(()=>{var S=Lo(),I=S.firstChild,B=I.nextSibling,re=B.nextSibling,de=re.nextSibling;return de.nextSibling,i(B,()=>e.datasetId),i(S,()=>t()==="更新"?"更新到":"下载到",de),S})(),n(cr,{get paths(){return d().paths},get confirmed(){return d().confirmed}})]}}),V),i(f,n(v,{get when(){return d().confirmed},get children(){return Uo()}}),V),i(f,n(v,{get when(){return a().kind==="scnet"},get children(){return Go()}}),V),i(D,s),i(V,n(v,{get when(){return a().kind!=="scnet"},get children(){var S=Bo(),I=S.firstChild,B=I.nextSibling;return i(I,()=>a().kind==="ssh"?"远端可用空间":"项目路径可用空间"),i(B,r),S}}),null),i(f,n(v,{get when(){return y()},get children(){return Ho()}}),T),i(f,n(v,{get when(){return b()},get children(){var S=or();return i(S,()=>a().kind==="ssh"?"无法获取远端可用空间,暂不可下载":"无法获取项目路径可用空间,暂不可下载"),S}}),T),i(f,n(v,{get when(){return ne(()=>!e.sizeLoading)()&&e.datasetBytes===void 0},get children(){return qo()}}),T),i(f,n(v,{get when(){return e.error},get children(){var S=or();return i(S,()=>e.error),S}}),T),Ne(z,"click",e.onClose,!0),Ne(L,"click",e.onConfirm,!0),i(L,l),E(S=>{var I=y()?"":void 0,B=b()?"":void 0,re=e.busy,de=u();return I!==S.e&&R(V,"data-insufficient",S.e=I),B!==S.t&&R(V,"data-unknown",S.t=B),re!==S.a&&(z.disabled=S.a=re),de!==S.o&&(L.disabled=S.o=de),S},{e:void 0,t:void 0,a:void 0,o:void 0}),h}})}})}function al(e){return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var t=Wo(),a=t.firstChild,r=a.firstChild,s=r.firstChild,c=s.firstChild,d=c.nextSibling,l=s.nextSibling,p=r.nextSibling,y=p.firstChild,b=y.nextSibling,u=p.nextSibling,h=u.firstChild,f=h.nextSibling;return a.$$click=w=>w.stopPropagation(),i(d,()=>e.title),Ne(l,"click",e.onClose,!0),i(b,()=>e.datasetId),Ne(h,"click",e.onClose,!0),Ne(f,"click",e.onConfirm,!0),i(f,()=>e.busy?"正在取消...":"确认取消"),E(w=>{var C=e.busy,g=e.busy;return C!==w.e&&(h.disabled=w.e=C),g!==w.t&&(f.disabled=w.t=g),w},{e:void 0,t:void 0}),t}})}})}function il(e){const[t,a]=P();ge(()=>{if(!e.open){a(void 0);return}e.busy||a(e.copies)});const r=()=>e.busy?t()??e.copies:e.copies,s=()=>new Set(e.selectedKeys),c=()=>r().filter(u=>s().has(u.key)),d=()=>r().length>0&&c().length===r().length,l=()=>{const u=c();return u.length>0&&u.every(h=>h.partial)},p=()=>!!e.busy||c().length===0,y=u=>{if(e.busy)return;const h=new Set(s());h.has(u)?h.delete(u):h.add(u),e.onSelectedKeysChange([...h])},b=()=>{e.busy||e.onSelectedKeysChange(d()?[]:r().map(u=>u.key))};return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var u=Qo(),h=u.firstChild,f=h.firstChild,w=f.firstChild,C=w.firstChild,g=C.nextSibling,M=w.nextSibling,O=f.nextSibling,U=O.firstChild,V=U.nextSibling;return h.$$click=N=>N.stopPropagation(),i(C,()=>l()?"清理残留文件":"删除数据集"),i(g,()=>e.title),Ne(M,"click",e.onClose,!0),i(h,n(v,{get when(){return e.busy},get children(){return Vo()}}),O),i(h,n(v,{get when(){return!e.busy},get children(){return[(()=>{var N=Ko();return i(N,(()=>{var H=ne(()=>r().length>1);return()=>H()?"该数据集已下载到多个环境。请选择要删除的副本,此操作不可恢复。":ne(()=>!!l())()?["确认清理 ",(()=>{var D=lr();return i(D,()=>e.datasetId),D})()," 未完成的下载残留吗?请选择环境后继续。"]:["请选择要删除 ",(()=>{var D=lr();return i(D,()=>e.datasetId),D})()," 的环境。此操作不可恢复。"]})()),N})(),n(v,{get when(){return r().length>1},get children(){var N=Xo();return N.$$click=b,i(N,()=>d()?"取消全选":"全选"),E(()=>N.disabled=e.busy),N}}),(()=>{var N=Jo();return i(N,n(ce,{get each(){return r()},children:H=>(()=>{var D=Yo(),T=D.firstChild,z=T.nextSibling;return D.$$click=()=>y(H.key),i(T,()=>H.label,null),i(T,n(v,{get when(){return H.partial},get children(){return Zo()}}),null),i(z,n(ce,{get each(){return H.paths},children:L=>(()=>{var S=el();return i(S,L),S})()})),E(L=>{var S=s().has(H.key)?"":void 0,I=s().has(H.key),B=e.busy;return S!==L.e&&R(D,"data-selected",L.e=S),I!==L.t&&R(D,"aria-pressed",L.t=I),B!==L.a&&(D.disabled=L.a=B),L},{e:void 0,t:void 0,a:void 0}),D})()})),N})()]}}),O),Ne(U,"click",e.onClose,!0),Ne(V,"click",e.onConfirm,!0),i(V,(()=>{var N=ne(()=>!!e.busy);return()=>N()?"正在删除...":l()?"确认清理":"确认删除"})()),E(N=>{var H=e.busy,D=e.busy,T=p();return H!==N.e&&(M.disabled=N.e=H),D!==N.t&&(U.disabled=N.t=D),T!==N.a&&(V.disabled=N.a=T),N},{e:void 0,t:void 0,a:void 0}),u}})}})}At(["click","input"]);const St=`请按照下面的内容,使用OneScience,进行后续工作。
1
+ import{b as At,c as n,c3 as bt,i,az as Ne,S as v,W as E,Y as R,X as ne,n as P,C as ge,F as ce,t as o,a2 as mt,c4 as ys,c5 as er,c6 as Da,c7 as Wt,c8 as Ja,a4 as ws,bl as $s,a3 as Cs,c9 as Ss,ca as tr,cb as _s,x as je,I as It,R as Ze,q as Ut,cc as Ps,o as W,a1 as pa,cd as ga,ce as Ua,l as ot,s as ft,bD as ar,bS as gt,cf as Gr,cg as Br,ch as $i,ci as Ci,cj as ks,ck as Ds,cl as sa,k as Si,cm as Hr,f as vt,e as Xt,h as Tt,g as fa,j as As,m as qr,E as xs,M as Ms,N as Is,bN as et,cn as ir,co as Fs,cp as zr,cq as jr,cr as Wr,bO as Vr,cs as ni,ct as Ts,cu as Es,cv as Ns,bf as Kr,cw as Os,cx as Rs,cy as rr,bR as ca,T as Ls,cz as Aa,_ as Ta,cA as Us,av as ht,b6 as xt,be as _i,y as Pi,cB as Gs,bg as Xr,ae as Bs,cC as Hs,cD as qs,cE as zs,cF as js,cG as Ea,cH as la,as as Ws,cI as Qa,p as Za,cJ as Vs,cK as Ks,cL as ra,cM as Xs,cN as Js,cO as Qs,cP as Zs,cQ as ki,cR as Ys,cS as eo,cT as to,cU as Di,cV as Ai,cW as Jr,cX as Qr,cY as si,cZ as ao,c_ as oi,c$ as io,d0 as ro,d1 as no,d2 as zt,d3 as so,d4 as oo,d5 as Zr,d6 as Yr,d7 as en,d8 as tn,d9 as an,da as lo,bV as co,db as uo,dc as mo,dd as ho,de as po,D as kt,df as go,dg as fo,dh as bo,di as vo,dj as nr,dk as yo,dl as li,dm as wo,dn as rn,dp as nn,dq as $o,dr as sn,a5 as jt,ds as xi,z as Co,dt as So,du as _o,a0 as Po,bP as ko,bQ as Ya,dv as on,A as Do,dw as Ao,L as xo,dx as Mo,dy as sr,dz as Io,dA as Fo,dB as To}from"./index-D89_umhI.js";import{d as Eo}from"./onescience-docs-CH5KBTI9.js";var No=o("<div><div class=os-download-path-hint-title></div><ul class=os-download-path-hint-list>"),Oo=o("<li class=break-all>"),Ro=o("<div class=os-download-env-row><div class=os-download-env-field><span class=os-field-label-row><span class=os-field-label>下载到环境</span></span><div>"),Lo=o("<p class=os-section-copy>确认将 <strong></strong> <!>以下路径吗?"),Uo=o("<p class=os-section-copy data-testid=download-register-guide>下载完成不会自动登记。请到 OneData「原始数据」确认接入后再加工或训练。"),Go=o("<p class=os-section-copy>SCNet 侧无法直接访问 ModelScope。确认后将打开科研开发会话,由 Agent 使用 scnet MCP 工具完成下载与传输。"),Bo=o("<div class=os-dataset-download-info-row><span></span><strong>"),Ho=o("<div class=os-upload-error>可用空间不足,无法下载该数据集"),or=o("<div class=os-upload-error>"),qo=o("<div class=os-upload-error>无法从魔搭获取数据集大小,暂不可下载"),zo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow>数据集</div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><div class=os-dataset-download-info><div class=os-dataset-download-info-row><span>数据集大小(预估)</span><strong></strong></div></div><div class=os-upload-actions><button type=button class="os-button os-button-secondary">取消</button><button type=button class="os-button os-button-primary">'),jo=o("<label><span class=os-field-label-row><span class=os-field-label><span class=os-field-required aria-hidden=true> *</span></span></span><input>"),Wo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow>取消下载</div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><p class=os-section-copy>确认取消 <strong></strong> 的下载吗?已下载的部分文件将被保留,你可以稍后重新下载。</p><div class=os-upload-actions><button type=button class="os-button os-button-secondary">继续下载</button><button type=button class="os-button os-button-primary">'),Vo=o("<p class=os-section-copy>正在删除所选副本…"),Ko=o("<p class=os-section-copy>"),Xo=o("<button type=button class=os-download-copy-all>"),Jo=o("<div class=os-download-copy-list role=group aria-label=选择要删除的环境>"),Qo=o('<div class=os-modal-backdrop role=presentation><div class="os-upload-dialog os-download-dialog"><div class=os-upload-head><div><div class=os-eyebrow></div><h2></h2></div><button type=button class="os-button os-button-secondary os-button-square">×</button></div><div class=os-upload-actions><button type=button class="os-button os-button-secondary">取消</button><button type=button class="os-button os-button-primary">'),lr=o("<strong>"),Zo=o("<span class=os-download-copy-partial> 未完成"),Yo=o("<button type=button class=os-download-copy-item><span class=os-download-copy-item-title></span><span class=os-download-copy-item-path>"),el=o('<span class="os-download-copy-path break-all">');function cr(e){const t=()=>e.paths.filter(a=>a.trim());return n(v,{get when(){return t().length>0},get children(){var a=No(),r=a.firstChild,s=r.nextSibling;return i(r,()=>e.confirmed?"数据集位置":"数据集实际位置(随 ModelScope 版本可能不同)"),i(s,n(ce,{get each(){return t()},children:c=>(()=>{var d=Oo();return i(d,c),d})()})),E(()=>mt(a,`os-download-path-hint ${e.class??""}`.trim())),a}})}function tl(e){const t=()=>e.actionLabel??"下载",a=()=>e.environment??{kind:"local"},r=()=>e.diskLoading?"加载中...":er(e.availableBytes),s=()=>e.sizeLoading?"加载中...":e.datasetBytes===void 0?"无法从魔搭获取数据集大小":er(e.datasetBytes),c=()=>{if(a().kind==="ssh")return e.remotePath??"";if(a().kind==="scnet")return e.remotePath?.trim()||"(SCNet 默认缓存目录)";const h=`/${e.datasetId}`;return e.targetPath.endsWith(h)?e.targetPath.slice(0,-h.length):e.targetPath},d=()=>{const h=(e.actualPaths??[]).map(f=>f.trim()).filter(Boolean);return h.length>0?{paths:[...new Set(h)],confirmed:!0}:{paths:ys(c(),e.datasetId),confirmed:!1}},l=()=>e.busy?a().kind==="ssh"?"正在提交到远端...":"正在提交下载...":a().kind==="scnet"?"创建下载任务":t()==="更新"?"确认更新":"确认下载",p=()=>!!e.sizeLoading||e.datasetBytes===void 0,y=()=>{if(a().kind==="scnet")return!1;const h=e.datasetBytes,f=e.availableBytes;return h===void 0||f===void 0||f<=0?!1:h>f},b=()=>a().kind==="scnet"||e.diskLoading?!1:e.availableBytes===void 0,u=()=>!!e.busy||!!e.confirmDisabled||a().kind==="ssh"&&!(e.remotePath??"").trim()||p()||!!e.diskLoading||b()||y();return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var h=zo(),f=h.firstChild,w=f.firstChild,C=w.firstChild,g=C.firstChild,M=g.firstChild,O=g.nextSibling,U=C.nextSibling,V=w.nextSibling,N=V.firstChild,H=N.firstChild,D=H.nextSibling,T=V.nextSibling,z=T.firstChild,L=z.nextSibling;return f.$$click=S=>S.stopPropagation(),i(g,t,M),i(O,()=>e.title),Ne(U,"click",e.onClose,!0),i(f,n(v,{get when(){return e.environmentSelector},get children(){var S=Ro(),I=S.firstChild,B=I.firstChild,re=B.nextSibling;return i(re,()=>e.environmentSelector),S}}),V),i(f,n(v,{get when(){return a().kind==="local"},get fallback(){return[(()=>{var S=jo(),I=S.firstChild,B=I.firstChild,re=B.firstChild,de=I.nextSibling;return i(B,()=>a().kind==="ssh"?"远端存储目录":"SCNet 目标目录",re),de.$$input=J=>e.onRemotePathChange?.(J.currentTarget.value),E(()=>R(de,"placeholder",a().kind==="ssh"?"/work/you/modelscope/hub/datasets":"modelscope/hub/datasets")),E(()=>de.value=e.remotePath??""),S})(),n(cr,{get paths(){return d().paths},get confirmed(){return d().confirmed}})]},get children(){return[(()=>{var S=Lo(),I=S.firstChild,B=I.nextSibling,re=B.nextSibling,de=re.nextSibling;return de.nextSibling,i(B,()=>e.datasetId),i(S,()=>t()==="更新"?"更新到":"下载到",de),S})(),n(cr,{get paths(){return d().paths},get confirmed(){return d().confirmed}})]}}),V),i(f,n(v,{get when(){return d().confirmed},get children(){return Uo()}}),V),i(f,n(v,{get when(){return a().kind==="scnet"},get children(){return Go()}}),V),i(D,s),i(V,n(v,{get when(){return a().kind!=="scnet"},get children(){var S=Bo(),I=S.firstChild,B=I.nextSibling;return i(I,()=>a().kind==="ssh"?"远端可用空间":"项目路径可用空间"),i(B,r),S}}),null),i(f,n(v,{get when(){return y()},get children(){return Ho()}}),T),i(f,n(v,{get when(){return b()},get children(){var S=or();return i(S,()=>a().kind==="ssh"?"无法获取远端可用空间,暂不可下载":"无法获取项目路径可用空间,暂不可下载"),S}}),T),i(f,n(v,{get when(){return ne(()=>!e.sizeLoading)()&&e.datasetBytes===void 0},get children(){return qo()}}),T),i(f,n(v,{get when(){return e.error},get children(){var S=or();return i(S,()=>e.error),S}}),T),Ne(z,"click",e.onClose,!0),Ne(L,"click",e.onConfirm,!0),i(L,l),E(S=>{var I=y()?"":void 0,B=b()?"":void 0,re=e.busy,de=u();return I!==S.e&&R(V,"data-insufficient",S.e=I),B!==S.t&&R(V,"data-unknown",S.t=B),re!==S.a&&(z.disabled=S.a=re),de!==S.o&&(L.disabled=S.o=de),S},{e:void 0,t:void 0,a:void 0,o:void 0}),h}})}})}function al(e){return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var t=Wo(),a=t.firstChild,r=a.firstChild,s=r.firstChild,c=s.firstChild,d=c.nextSibling,l=s.nextSibling,p=r.nextSibling,y=p.firstChild,b=y.nextSibling,u=p.nextSibling,h=u.firstChild,f=h.nextSibling;return a.$$click=w=>w.stopPropagation(),i(d,()=>e.title),Ne(l,"click",e.onClose,!0),i(b,()=>e.datasetId),Ne(h,"click",e.onClose,!0),Ne(f,"click",e.onConfirm,!0),i(f,()=>e.busy?"正在取消...":"确认取消"),E(w=>{var C=e.busy,g=e.busy;return C!==w.e&&(h.disabled=w.e=C),g!==w.t&&(f.disabled=w.t=g),w},{e:void 0,t:void 0}),t}})}})}function il(e){const[t,a]=P();ge(()=>{if(!e.open){a(void 0);return}e.busy||a(e.copies)});const r=()=>e.busy?t()??e.copies:e.copies,s=()=>new Set(e.selectedKeys),c=()=>r().filter(u=>s().has(u.key)),d=()=>r().length>0&&c().length===r().length,l=()=>{const u=c();return u.length>0&&u.every(h=>h.partial)},p=()=>!!e.busy||c().length===0,y=u=>{if(e.busy)return;const h=new Set(s());h.has(u)?h.delete(u):h.add(u),e.onSelectedKeysChange([...h])},b=()=>{e.busy||e.onSelectedKeysChange(d()?[]:r().map(u=>u.key))};return n(v,{get when(){return e.open},get children(){return n(bt,{get children(){var u=Qo(),h=u.firstChild,f=h.firstChild,w=f.firstChild,C=w.firstChild,g=C.nextSibling,M=w.nextSibling,O=f.nextSibling,U=O.firstChild,V=U.nextSibling;return h.$$click=N=>N.stopPropagation(),i(C,()=>l()?"清理残留文件":"删除数据集"),i(g,()=>e.title),Ne(M,"click",e.onClose,!0),i(h,n(v,{get when(){return e.busy},get children(){return Vo()}}),O),i(h,n(v,{get when(){return!e.busy},get children(){return[(()=>{var N=Ko();return i(N,(()=>{var H=ne(()=>r().length>1);return()=>H()?"该数据集已下载到多个环境。请选择要删除的副本,此操作不可恢复。":ne(()=>!!l())()?["确认清理 ",(()=>{var D=lr();return i(D,()=>e.datasetId),D})()," 未完成的下载残留吗?请选择环境后继续。"]:["请选择要删除 ",(()=>{var D=lr();return i(D,()=>e.datasetId),D})()," 的环境。此操作不可恢复。"]})()),N})(),n(v,{get when(){return r().length>1},get children(){var N=Xo();return N.$$click=b,i(N,()=>d()?"取消全选":"全选"),E(()=>N.disabled=e.busy),N}}),(()=>{var N=Jo();return i(N,n(ce,{get each(){return r()},children:H=>(()=>{var D=Yo(),T=D.firstChild,z=T.nextSibling;return D.$$click=()=>y(H.key),i(T,()=>H.label,null),i(T,n(v,{get when(){return H.partial},get children(){return Zo()}}),null),i(z,n(ce,{get each(){return H.paths},children:L=>(()=>{var S=el();return i(S,L),S})()})),E(L=>{var S=s().has(H.key)?"":void 0,I=s().has(H.key),B=e.busy;return S!==L.e&&R(D,"data-selected",L.e=S),I!==L.t&&R(D,"aria-pressed",L.t=I),B!==L.a&&(D.disabled=L.a=B),L},{e:void 0,t:void 0,a:void 0}),D})()})),N})()]}}),O),Ne(U,"click",e.onClose,!0),Ne(V,"click",e.onConfirm,!0),i(V,(()=>{var N=ne(()=>!!e.busy);return()=>N()?"正在删除...":l()?"确认清理":"确认删除"})()),E(N=>{var H=e.busy,D=e.busy,T=p();return H!==N.e&&(M.disabled=N.e=H),D!==N.t&&(U.disabled=N.t=D),T!==N.a&&(V.disabled=N.a=T),N},{e:void 0,t:void 0,a:void 0}),u}})}})}At(["click","input"]);const St=`请按照下面的内容,使用OneScience,进行后续工作。
2
2
  ————————
3
3
  `,ln={training:{id:"training",label:"模型训练",description:"准备训练配置并做小规模验证"},inference:{id:"inference",label:"推理",description:"加载权重并完成推理验证"},"secondary-development":{id:"secondary-development",label:"二次开发",description:"改结构、做适配或扩展能力"},"parallel-expansion":{id:"parallel-expansion",label:"并行扩展",description:"改造为分布式或多卡训练"},"scientific-research":{id:"scientific-research",label:"科研开发",description:"选择论文或 GitHub 案例,复现并验证"}},rl=Object.values(ln),nl={training:`3)围绕 {title} 完成训练或微调准备与小规模验证:定位训练入口与配置方式,生成 training_config,优先 smoke training(小样本、少步数)。
4
4
  能跑则跑通并汇报;不能跑则列出阻塞项与最小补齐方案。
@@ -1 +1 @@
1
- import{u as p,i as s,c as l,T as g,R as u,dY as h,t as b}from"./index-ClzL6bnc.js";var v=b('<div class="os-client-capability-page os-client-resources-page"><header class=os-client-resources-head><div class=os-client-resources-head-copy><h2>资源配置</h2><p>SSH 连接配置</p></div></header><section class=os-client-capability-selector aria-label=资源配置><div class=os-client-capability-current-domain><span>当前配置:</span><strong>SSH 连接</strong><small></small></div></section><div class="os-client-capability-page-body os-client-resources-body">');function m(){const r=p();return(()=>{var a=v(),e=a.firstChild;e.firstChild;var i=e.nextSibling,t=i.firstChild,n=t.firstChild,c=n.nextSibling,o=c.nextSibling,d=i.nextSibling;return s(e,l(u,{get href(){return g()},class:"os-client-resources-close","aria-label":"关闭资源配置",children:"×"}),null),s(o,()=>r.t("dialog.ssh.description")),s(d,l(h,{variant:"page"})),a})()}export{m as WorkbenchResourcesPage};
1
+ import{u as p,i as s,c as l,T as g,R as u,d_ as h,t as b}from"./index-D89_umhI.js";var v=b('<div class="os-client-capability-page os-client-resources-page"><header class=os-client-resources-head><div class=os-client-resources-head-copy><h2>资源配置</h2><p>SSH 连接配置</p></div></header><section class=os-client-capability-selector aria-label=资源配置><div class=os-client-capability-current-domain><span>当前配置:</span><strong>SSH 连接</strong><small></small></div></section><div class="os-client-capability-page-body os-client-resources-body">');function f(){const r=p();return(()=>{var a=v(),e=a.firstChild;e.firstChild;var i=e.nextSibling,t=i.firstChild,n=t.firstChild,c=n.nextSibling,o=c.nextSibling,d=i.nextSibling;return s(e,l(u,{get href(){return g()},class:"os-client-resources-close","aria-label":"关闭资源配置",children:"×"}),null),s(o,()=>r.t("dialog.ssh.description")),s(d,l(h,{variant:"page"})),a})()}export{f as WorkbenchResourcesPage};
@@ -1 +1 @@
1
- import{bU as s,bj as y}from"./index-ClzL6bnc.js";const m="os-capability-catalog-selection",l={categoryId:"scenario",domainId:"all"};function n(t){return t==="scenario"||t==="onemodel"||t==="hpc"||t==="onedata"||t==="oneskills"}function i(t){return t==="all"||t==="materials"||t==="weather"||t==="fluid"||t==="bio"}function f(t){const a=new URLSearchParams(t).get("category");return n(a)?a:void 0}function u(t){const a=new URLSearchParams(t).get("domain");return i(a)?a:void 0}function g(){try{if(typeof localStorage>"u")return;const t=localStorage.getItem(m);if(!t)return;const a=JSON.parse(t);return!n(a.categoryId)||!i(a.domainId)?void 0:{categoryId:a.categoryId,domainId:a.domainId}}catch{return}}function p(t){try{if(typeof localStorage>"u"||!n(t.categoryId)||!i(t.domainId))return;localStorage.setItem(m,JSON.stringify(t))}catch{}}function S(){const t=g()??l,a=new URLSearchParams({category:t.categoryId,domain:t.domainId});return`${s.capabilities}?${a}`}function b(t,a){const o=f(a),r=u(a),c=g();if(o)return r?{categoryId:o,domainId:r}:o==="oneskills"?{categoryId:o,domainId:c?.domainId??"all"}:{categoryId:o,domainId:"all"};const d=new RegExp(`^${s.capabilities}/([^/]+)`).exec(t),e=d?.[1]?y(d[1]):void 0;return e?{categoryId:e.category,domainId:r??e.domain}:c??l}export{S as c,u as d,g as r,b as s,p as w};
1
+ import{bW as s,bj as y}from"./index-D89_umhI.js";const m="os-capability-catalog-selection",l={categoryId:"scenario",domainId:"all"};function n(t){return t==="scenario"||t==="onemodel"||t==="hpc"||t==="onedata"||t==="oneskills"}function i(t){return t==="all"||t==="materials"||t==="weather"||t==="fluid"||t==="bio"}function f(t){const a=new URLSearchParams(t).get("category");return n(a)?a:void 0}function u(t){const a=new URLSearchParams(t).get("domain");return i(a)?a:void 0}function g(){try{if(typeof localStorage>"u")return;const t=localStorage.getItem(m);if(!t)return;const a=JSON.parse(t);return!n(a.categoryId)||!i(a.domainId)?void 0:{categoryId:a.categoryId,domainId:a.domainId}}catch{return}}function p(t){try{if(typeof localStorage>"u"||!n(t.categoryId)||!i(t.domainId))return;localStorage.setItem(m,JSON.stringify(t))}catch{}}function S(){const t=g()??l,a=new URLSearchParams({category:t.categoryId,domain:t.domainId});return`${s.capabilities}?${a}`}function b(t,a){const o=f(a),r=u(a),c=g();if(o)return r?{categoryId:o,domainId:r}:o==="oneskills"?{categoryId:o,domainId:c?.domainId??"all"}:{categoryId:o,domainId:"all"};const d=new RegExp(`^${s.capabilities}/([^/]+)`).exec(t),e=d?.[1]?y(d[1]):void 0;return e?{categoryId:e.category,domainId:r??e.domain}:c??l}export{S as c,u as d,g as r,b as s,p as w};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-project-upload-WdGsdhnu.js","assets/index-ClzL6bnc.js","assets/index-DVeuXHcQ.css","assets/dialog-terminal-unavailable-Ct951kdx.js"])))=>i.map(i=>d[i]);
2
- import{u as Te,c as e,I as he,D as O,i,S as _,F as Ce,d as Ne,t as a,p as le,a as ke,s as te,b as Me,e as it,f as kn,g as kt,h as Sn,j as xn,k as Cn,l as Ln,m as St,n as K,o as $,q as je,r as Ft,v as rt,w as st,x as Ee,y as Pn,z as Nt,A as Dn,B as xt,C as Z,E as Kt,G as lt,H as En,J as Tt,K as jn,L as fe,M as Mn,N as Rn,O as In,P as An,Q as On,R as pe,T as zn,U as Fn,V as Nn,W as X,X as be,Y as F,Z as Kn,_ as Tn,$ as sn,a0 as ct,a1 as Ke,a2 as Wn,a3 as Wt,a4 as wt,a5 as ce,a6 as on,a7 as Hn,a8 as an,a9 as Bn,aa as qn,ab as De,ac as dt,ad as tt,ae as Un,af as Vn,ag as Xn,ah as ut,ai as Gn,aj as Qn,ak as ln,al as Zn,am as Jn,an as Yn,ao as er,ap as tr,aq as nr,ar as Ht,as as Bt,at as rr,au as sr,av as $t,aw as cn,ax as qt,ay as ir,az as _t,aA as or,aB as dn,aC as ve,aD as ar,aE as Ut,aF as lr,aG as cr,aH as dr,aI as ur,aJ as hr,aK as un,aL as yt,aM as Vt,aN as gr,aO as mr,aP as fr,aQ as ht,aR as Xt,aS as Gt,aT as pr,aU as hn,aV as Ct,aW as gn,aX as vr,aY as br,aZ as wr,a_ as $r,a$ as _r,b0 as yr,b1 as kr,b2 as Qt,b3 as Zt,b4 as Sr,b5 as xr,b6 as ze}from"./index-ClzL6bnc.js";import{DialogEditProject as Cr}from"./dialog-edit-project-DIJi2nFh.js";import{c as Lr}from"./selection-BA_gCWSj.js";import{u as mn}from"./current-project-JlNpICgB.js";var Pr=a("<span class=os-client-session-menu-label>"),Dr=a("<div class=os-client-session-menu-empty>");const Er="os-client-session-menu",jr="os-client-session-menu os-client-session-menu-sub";function Mr(r){const u=Te(),n=()=>te(),p=()=>ke(n(),r.currentDirectory),l=()=>r.projects().filter(c=>le(c.worktree)!==le(r.currentDirectory)).filter(c=>!ke(n(),c.worktree));return e(_,{get when(){return p()},get children(){return e(O.Sub,{get children(){return[e(O.SubTrigger,{"data-action":"session-move",class:"os-client-session-menu-item",get children(){return[e(he,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),(()=>{var c=Pr();return i(c,()=>u.t("session.move.toProject")),c})(),e(he,{name:"chevron-right",size:"small",class:"os-client-session-menu-chevron"})]}}),e(O.Portal,{get children(){return e(O.SubContent,{class:jr,get children(){return[e(O.Item,{"data-action":"session-move-new-project",class:"os-client-session-menu-item",onSelect:()=>r.onNewProject(),get children(){return[e(he,{name:"plus",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("session.move.newProject")}})]}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(_,{get when(){return l().length>0},get fallback(){return(()=>{var c=Dr();return i(c,()=>u.t("session.move.emptyProjects")),c})()},get children(){return e(Ce,{get each(){return l()},children:c=>e(O.Item,{"data-action":"session-move-target",class:"os-client-session-menu-item",onSelect:()=>r.onMove(c.worktree),get children(){return[e(he,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return Ne(c)}})]}})})}})]}})}})]}})}})}function Jt(r){const u=Te();return[e(O.Item,{"data-action":"session-archive",class:"os-client-session-menu-item",onSelect:()=>r.onArchive(),get children(){return[e(he,{name:"archive",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("common.archive")}})]}}),e(Mr,{get currentDirectory(){return r.currentDirectory},get projects(){return r.projects},get onMove(){return r.onMove},get onNewProject(){return r.onNewProject}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(O.Item,{"data-action":"session-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>r.onDelete(),get children(){return[e(he,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("common.delete")}})]}})]}var Rr=a("<button type=button aria-haspopup=menu>..."),gt=a('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><span class="text-14-regular text-text-strong"></span><div class="flex justify-end gap-2">'),Ir=a("<span class=os-sidebar-label>"),Ar=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M21 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z">'),Or=a("<span class=os-sidebar-label>新建会话"),zr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M5 5h5v5H5z"></path><path d="M14 5h5v5h-5z"></path><path d="M5 14h5v5H5z"></path><path d="M14 14h5v5h-5z">'),Fr=a("<span class=os-sidebar-label>能力中心"),Nr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.5-3.5a5.8 5.8 0 0 1-7.6 7.6l-6.8 6.8a2.1 2.1 0 0 1-3-3l6.8-6.8a5.8 5.8 0 0 1 7.6-7.6z">'),Kr=a("<span class=os-sidebar-label>skills设置"),Tr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><rect x=3 y=4 width=18 height=6 rx=1.5></rect><rect x=3 y=14 width=18 height=6 rx=1.5></rect><path d="M7 7h.01"></path><path d="M7 17h.01">'),Wr=a("<span class=os-sidebar-label>资源配置"),Hr=a("<p class=os-client-empty-hint>登录后同步个人空间"),Br=a("<div class=os-client-task-list-scroll>"),qr=a("<button type=button class=os-client-task-more data-action=recent-expand>展开更多"),Ur=a("<button type=button class=os-client-task-more data-action=recent-collapse>收起"),Vr=a("<p class=os-client-empty-hint>登录后查看未分类会话"),Xr=a("<button type=button class=os-client-shared-cases-more data-action=shared-cases-expand>展开更多"),Gr=a("<button type=button class=os-client-shared-cases-more data-action=shared-cases-collapse>收起"),Qr=a("<div class=os-client-shared-cases-list>"),Zr=a('<section class="os-sidebar-group os-client-shared-cases"data-section=shared-cases><button type=button class=os-client-shared-cases-toggle data-action=shared-cases-toggle><span class=os-client-shared-cases-chevron aria-hidden=true></span><span>'),Jr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M7 4h7l3 3v13H7z"></path><path d="M14 4v4h4"></path><path d="M10 12h5"></path><path d="M10 16h5">'),Yr=a("<span class=os-sidebar-label>帮助"),es=a('<aside class=os-sidebar><div class=os-sidebar-brand></div><nav class=os-sidebar-nav><div class=os-sidebar-nav-scroll><div class="os-sidebar-group os-client-capability-group"></div><div class="os-sidebar-group os-client-list-section"><div class=os-client-section-title><span>项目</span><span class=os-client-section-actions><button type=button aria-label=新建项目>+</button></span></div><div class=os-client-project-list></div></div><div class="os-sidebar-group os-client-list-section"><div class=os-client-section-title><span>未分类</span><span class=os-client-section-actions><button type=button aria-label=新建会话>+</button></span></div><div class=os-client-task-list></div></div></div></nav><div class=os-sidebar-footer><div class=os-sidebar-footer-actions><button type=button class=os-sidebar-footer-action><svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z"></path><path d="M12 3.5v2"></path><path d="M12 18.5v2"></path><path d="m5.6 5.6 1.4 1.4"></path><path d="m17 17 1.4 1.4"></path><path d="M3.5 12h2"></path><path d="M18.5 12h2"></path><path d="m5.6 18.4 1.4-1.4"></path><path d="m17 7 1.4-1.4"></path></svg><span class=os-sidebar-label>设置'),ts=a("<p class=os-client-empty-hint>暂无项目,点击 + 打开目录"),ns=a("<div class=os-client-project-sessions>"),rs=a("<div class=os-client-project-block><div class=os-client-project-row>"),mt=a("<span class=os-client-task-main><span>"),Yt=a("<div class=os-client-session-row>"),ss=a("<p class=os-client-empty-hint>暂无未分类会话,点击 + 新建"),is=a("<p class=os-client-empty-hint>暂无默认案例");const nt=4,en=200,ft=4,tn=400;function pt(r){let u;const n=()=>r.openKey()===r.menuKey,p=l=>{l.preventDefault(),l.stopPropagation(),n()?r.setOpenKey(""):r.setOpenKey(r.menuKey)};return e(O,{modal:!1,preventScroll:!1,gutter:6,placement:"bottom-end",get open(){return n()},getAnchorRect:()=>u?.getBoundingClientRect(),onOpenChange:l=>{if(l){n()||r.setOpenKey(r.menuKey);return}Date.now()-r.openedAt()<tn||r.setOpenKey("")},get children(){return[(()=>{var l=Rr();return l.$$click=p,l.$$pointerup=c=>{c.preventDefault(),c.stopPropagation()},l.$$pointerdown=c=>{c.preventDefault(),c.stopPropagation()},Ke(c=>{u=c},l),X(c=>{var S=r.triggerClass,x=r.label,v=n();return S!==c.e&&Wn(l,c.e=S),x!==c.t&&F(l,"aria-label",c.t=x),v!==c.a&&F(l,"aria-expanded",c.a=v),c},{e:void 0,t:void 0,a:void 0}),l})(),e(O.Portal,{get children(){return e(O.Content,{class:Er,onOpenAutoFocus:l=>l.preventDefault(),onFocusOutside:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),onInteractOutside:l=>{const c=l.target;if(c instanceof Node&&u?.contains(c)){l.preventDefault();return}Date.now()-r.openedAt()<tn&&l.preventDefault()},onPointerDown:l=>l.stopPropagation(),get children(){return r.children}})}})]}})}function os(){const r=it(),u=kn(),n=Te(),p=kt(),l=Sn(),c=xn(),S=Cn(),x=Ln(),v=St(),[E,z]=K(0),L=$(()=>(E(),!!te())),V=()=>sn(r.pathname),f=()=>(r.pathname,r.search,Lr()),j=()=>r.pathname.startsWith("/workspace/capabilities"),N=()=>r.pathname.startsWith("/workspace/skills"),y=()=>r.pathname.startsWith("/workspace/resources"),b=()=>r.pathname.startsWith("/workspace/docs"),[J,Y]=K(!0),[ne,de]=K(!1),[T,A]=K(!1),[M,se]=K("");let ie=0;const Se=t=>{t&&(ie=Date.now()),se(t)},ge=()=>ie;je(()=>{const t=()=>z(o=>o+1);window.addEventListener(Ft,t),window.addEventListener(rt,t),window.addEventListener(st,t),Ee(()=>{window.removeEventListener(Ft,t),window.removeEventListener(rt,t),window.removeEventListener(st,t)})});const Le=$(()=>Pn(p.projects.list(),te())),re=$(()=>Le().filter(t=>!ke(te(),t.worktree))),h=$(()=>Nt(te())?.trim()||""),I=$(()=>Dn(te())?.trim()||""),W=$(()=>{const t=/^\/workspace\/([^/]+)\/session/.exec(r.pathname)?.[1];return t?xt(t)??"":""}),d=()=>/\/session\/([^/?#]+)/.exec(r.pathname)?.[1],C=t=>{const o=W();if(!o)return!1;const g=le(o);return le(t.worktree)===g?!0:t.sandboxes?.some(R=>le(R)===g)??!1};Z(()=>{if(!L())return;const t=[...re().flatMap(o=>[o.worktree,...o.sandboxes??[]]),h()].filter(o=>o.length>0);for(const o of t)Kt(()=>{l.project.loadSessions(o)})}),Z(()=>{const t=I();if(!t)return;const[o,g]=l.child(t,{bootstrap:!1});(o.limit??0)<en&&g("limit",en),Kt(()=>{l.project.loadSessions(t)})});const w=$(()=>{const t=h();if(!t)return[];const[o]=l.child(t,{bootstrap:!1});return lt(o,Date.now(),t).map(g=>({session:g,directory:t}))}),s=$(()=>T()?w():w().slice(0,ft)),P=$(()=>!T()&&w().length>ft),H=$(()=>T()&&w().length>ft),_e=$(()=>{const t=I();if(!t)return[];const[o]=l.child(t,{bootstrap:!1});return En(lt(o,Date.now(),t).filter(g=>Tt(g.id)))}),Re=$(()=>J()?ne()?_e():_e().slice(0,nt):[]),We=$(()=>J()&&!ne()&&_e().length>nt),He=$(()=>J()&&ne()&&_e().length>nt);Z(()=>{const t=jn(r.search),o=d(),g=t&&t!=="open"?t:Tt(o)?o:void 0;if((t||g)&&Y(!0),g&&_e().findIndex(B=>B.id===g)>=nt&&de(!0),!t||t==="open")return;const R=I();R&&o!==t&&u(fe(R,t),{replace:!0})});function we(t,o=!0){p.projects.open(t),x.projects.touchCode(t),o&&u(fe(t))}function Be(){v.show(()=>e(Qn,{onCreated:t=>we(t)}))}function qe(t){v.show(()=>e(Cr,{project:t}))}function Ue(t){const o=t.worktree;if(ke(te(),o))return;const g=re(),R=le(o),k=g.findIndex(ee=>le(ee.worktree)===R);if(k===-1)return;const B=C(t);if(p.projects.close(o),B){const ee=g[k+1]??g[k-1];u(ee?fe(ee.worktree):"/workspace")}}function Ve(t){const[o,g]=l.child(t,{bootstrap:!1}),R=o.session.map(k=>k.id);Zn(t,R),l.session.setActive(t,void 0),g(ut(k=>{Jn(k,R),k.session=[]})),Yn(t,void 0),l.set("project",ut(k=>{const B=k.findIndex(ee=>le(ee.worktree)===le(t));B>=0&&k.splice(B,1)}))}async function Xe(t){if(ke(te(),t.worktree))return!1;const o=t.worktree,g=re(),R=le(o),k=g.findIndex(Q=>le(Q.worktree)===R),B=C(t);if(await c.client.experimental.session.list({directory:o,roots:!0,archived:!0,limit:1}).then(Q=>(Q.data??[]).some(Ae=>!!Ae.time?.archived)).catch(()=>!1))return ce({title:n.t("sidebar.project.delete.failed"),description:n.t("sidebar.project.delete.hasArchived")}),!1;const ue=ln(o)?.workspaceID?.trim();if(ue&&await c.client.experimental.workspace.remove({id:ue,directory:o}).catch(()=>{}),!await c.client.project.remove({directory:o}).then(Q=>Q.data).catch(Q=>(ce({title:n.t("sidebar.project.delete.failed"),description:tt(Q,n.t("common.requestFailed"))}),!1)))return!1;if(Ve(o),p.projects.close(o),B){const Q=k>=0?g[k+1]??g[k-1]:void 0;u(Q?fe(Q.worktree):"/workspace")}return!0}function Ge(t){const o=$(()=>Ne(t.project)),[g,R]=K(!1),[k,B]=K("checking");je(()=>{c.client.experimental.session.list({directory:t.project.worktree,roots:!0,archived:!0,limit:1}).then(ue=>{const xe=(ue.data??[]).some(Q=>!!Q.time?.archived);B(xe?"blocked":"ok")}).catch(()=>B("ok"))});const ee=async()=>{if(g()||k()!=="ok")return;R(!0);const ue=await Xe(t.project);R(!1),ue&&v.close()};return e(dt,{get title(){return n.t("sidebar.project.delete.title")},fit:!0,get children(){var ue=gt(),xe=ue.firstChild,Q=xe.nextSibling;return i(xe,(()=>{var Ae=be(()=>k()==="blocked");return()=>Ae()?n.t("sidebar.project.delete.hasArchived"):n.t("sidebar.project.delete.confirm",{name:o()})})()),i(Q,e(De,{variant:"ghost",size:"large",get disabled(){return g()},onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(Q,e(_,{get when(){return k()!=="blocked"},get children(){return e(De,{variant:"primary",size:"large",get disabled(){return g()||k()==="checking"},onClick:()=>void ee(),get children(){return be(()=>!!g())()?n.t("sidebar.project.delete.busy"):n.t("sidebar.project.delete.button")}})}}),null),ue}})}function Qe(t){ke(te(),t.worktree)||v.show(()=>e(Ge,{project:t}))}async function Ze(){const t=S.openDirectoryPickerDialog;function o(g){if(Array.isArray(g)){g.forEach((R,k)=>we(R,k===0));return}g&&we(g)}if(t&&Vn({hasNativePicker:!!t,isLocalServer:!!x.isLocal(),hasPlatformSession:!!te()})){const g=await t({title:n.t("command.project.open"),multiple:!0});o(g);return}v.show(()=>e(Xn,{multiple:!0,onSelect:o,onCreateFolder:Be}),()=>o(null))}function Pe(){ct({navigate:u,action:{type:"install",resourceId:"__project__"},isLoggedIn:L()})&&Ze()}function Je(){if(!ct({navigate:u,action:{type:"install",resourceId:"__task__"},isLoggedIn:L()}))return;const t=Nt(te());t&&(Wt(wt(t)),we(t))}function Ye(t){ct({navigate:u,action:{type:"install",resourceId:"__task__"},isLoggedIn:L()})&&(Wt(wt(t)),we(t))}function Ie(t){const o=te();return Hn(o,t)?!1:an(o,t)}function fn(t){if(!Ie(t)){ce({title:n.t("dialog.project.upload.failed"),description:n.t("dialog.project.upload.destinationHint"),variant:"error"});return}on(()=>import("./dialog-project-upload-WdGsdhnu.js"),__vite__mapDeps([0,1,2])).then(o=>{v.show(()=>e(o.DialogProjectUpload,{directory:t}))})}function Lt(t){if(d()!==t.id)return;const o=W();if(!o){u("/workspace");return}u(fe(o))}function ot(t,o){const[,g]=l.child(t,{bootstrap:!1});g(ut(R=>{const k=Gn.search(R.session,o,ee=>ee.id);if(!k.found)return;const B=R.session[k.index];R.session.splice(k.index,1),B&&!B.parentID&&(R.sessionTotal=Math.max(0,R.sessionTotal-1))}))}async function Pt(t){ot(t.directory,t.id),Lt(t),await c.client.session.update({directory:t.directory,sessionID:t.id,time:{archived:Date.now()}}).then(()=>!0).catch(g=>(ce({title:n.t("common.archive"),description:tt(g,n.t("common.requestFailed"))}),!1))||l.project.loadSessions(t.directory)}async function pn(t){return await c.client.session.delete({sessionID:t.id,directory:t.directory}).then(g=>g.data).catch(g=>(ce({title:n.t("session.delete.failed.title"),description:tt(g,n.t("common.requestFailed"))}),!1))?(ot(t.directory,t.id),Lt(t),!0):!1}function Dt(t){const o=at(t);v.show(()=>e(dt,{get title(){return n.t("session.delete.title")},fit:!0,get children(){var g=gt(),R=g.firstChild,k=R.nextSibling;return i(R,()=>n.t("session.delete.confirm",{name:o})),i(k,e(De,{variant:"ghost",size:"large",onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(k,e(De,{variant:"primary",size:"large",onClick:()=>{pn(t).then(B=>{B&&v.close()})},get children(){return n.t("session.delete.button")}}),null),g}}))}function Et(t){const[o]=l.child(t,{bootstrap:!1});return lt(o,Date.now(),t).map(g=>({session:g,directory:t}))}function at(t){const[o]=l.child(t.directory,{bootstrap:!1});return Bn({title:t.title,fallbackText:qn(t.id,o.message,o.part),emptyLabel:n.t("command.session.new")})}function jt(t,o){if(le(t.directory)===le(o))return;if(!ke(te(),t.directory)){ce({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}if(ke(te(),o)){ce({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}const g=Ne({worktree:o});v.show(()=>e(dt,{get title(){return n.t("session.move.confirm.title")},fit:!0,get children(){var R=gt(),k=R.firstChild,B=k.nextSibling;return i(k,()=>n.t("session.move.confirm.description",{project:g})),i(B,e(De,{variant:"ghost",size:"large",onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(B,e(De,{variant:"primary",size:"large",onClick:()=>{vn(t,o).then(ee=>{ee&&v.close()})},get children(){return n.t("session.move.confirm.action")}}),null),R}}))}async function vn(t,o){const g=t.directory;return await c.client.session.update({directory:t.directory,sessionID:t.id,moveTo:o}).then(()=>!0).catch(k=>(ce({title:n.t("session.move.failed.title"),description:tt(k,n.t("common.requestFailed"))}),!1))?(ot(g,t.id),p.projects.open(o),x.projects.touchCode(o),l.project.loadSessions(g),l.project.loadSessions(o),d()===t.id?(u(fe(o,t.id)),!0):(ce({title:n.t("session.move.success.title"),description:n.t("session.move.success.description",{project:Ne({worktree:o})})}),!0)):!1}function bn(){v.show(()=>e(Un,{tab:"account"}))}return(()=>{var t=es(),o=t.firstChild,g=o.nextSibling,R=g.firstChild,k=R.firstChild,B=k.nextSibling,ee=B.firstChild,ue=ee.firstChild,xe=ue.nextSibling,Q=xe.firstChild,Ae=ee.nextSibling,Mt=B.nextSibling,Rt=Mt.firstChild,wn=Rt.firstChild,$n=wn.nextSibling,It=$n.firstChild,_n=Rt.nextSibling,yn=g.nextSibling,At=yn.firstChild,Ot=At.firstChild;return Mn(o,Rn(()=>S.platform==="desktop"?{"data-tauri-drag-region":!0}:{}),!1,!0),i(o,e(pe,{get href(){return On(S.platform)},class:"os-sidebar-brand-link",get children(){return[e(In,{class:"os-sidebar-brand-mark"}),(()=>{var D=Ir();return i(D,()=>An(S.platform)),D})()]}})),i(k,e(pe,{get href(){return zn()},class:"os-sidebar-link",get classList(){return{"is-active":V()}},get children(){return[Ar(),Or()]}}),null),i(k,e(pe,{get href(){return f()},class:"os-sidebar-link",get classList(){return{"is-active":j()}},get children(){return[zr(),Fr()]}}),null),i(k,e(pe,{get href(){return Fn()},class:"os-sidebar-link",get classList(){return{"is-active":N()}},get children(){return[Nr(),Kr()]}}),null),i(k,e(pe,{get href(){return Nn()},class:"os-sidebar-link",get classList(){return{"is-active":y()}},get children(){return[Tr(),Wr()]}}),null),Q.$$click=Pe,i(Ae,e(_,{get when(){return be(()=>!!L())()&&re().length>0},get fallback(){return e(_,{get when(){return L()},get children(){return ts()}})},get children(){return e(Ce,{get each(){return re().map(D=>D.worktree)},children:D=>{const G=()=>re().find(oe=>oe.worktree===D);return e(_,{get when(){return G()},children:oe=>(()=>{var ae=rs(),q=ae.firstChild;return i(q,e(pe,{get href(){return fe(D)},class:"os-client-project-item",get classList(){return{"is-active":C(oe())}},onClick:m=>{m.metaKey||m.ctrlKey||m.shiftKey||m.altKey||(m.preventDefault(),we(D))},get children(){return Ne(oe())}}),null),i(q,e(pt,{menuKey:`project:${D}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-project-more",get label(){return n.t("common.moreOptions")},get children(){return[e(O.Item,{"data-action":"project-new-session",class:"os-client-session-menu-item",onSelect:()=>Ye(D),get children(){return[e(he,{name:"new-session",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.session.new")}})]}}),e(_,{get when(){return Ie(D)},get children(){return e(O.Item,{"data-action":"project-upload",class:"os-client-session-menu-item",onSelect:()=>fn(D),get children(){return[e(he,{name:"cloud-upload",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.project.upload")}})]}})}}),e(O.Item,{"data-action":"project-rename",class:"os-client-session-menu-item",onSelect:()=>{const m=G();m&&qe(m)},get children(){return[e(he,{name:"edit",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("common.rename")}})]}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(O.Item,{"data-action":"project-remove-from-view",class:"os-client-session-menu-item",onSelect:()=>{const m=G();m&&Ue(m)},get children(){return[e(he,{name:"close-small",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.removeFromView")}})]}}),e(O.Item,{"data-action":"project-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>{const m=G();m&&Qe(m)},get children(){return[e(he,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.delete")}})]}})]}}),null),i(ae,e(_,{get when(){return C(oe())},get children(){var m=ns();return i(m,e(Ce,{get each(){return Et(D).map(U=>U.session.id)},children:U=>{const $e=()=>Et(D).find(ye=>ye.session.id===U);return e(_,{get when(){return $e()},children:ye=>(()=>{var Oe=Yt();return i(Oe,e(pe,{get href(){return fe(ye().directory,U)},class:"os-client-task-item",get classList(){return{"is-active":d()===U}},"data-session-id":U,get children(){var me=mt(),et=me.firstChild;return i(et,()=>at(ye().session)),me}}),null),i(Oe,e(pt,{menuKey:`session:${U}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Jt,{get currentDirectory(){return ye().directory},projects:re,onArchive:()=>void Pt(ye().session),onDelete:()=>Dt(ye().session),onMove:me=>jt(ye().session,me),onNewProject:Pe})}}),null),X(me=>{var et=d()===U,zt=M()===`session:${U}`;return et!==me.e&&Oe.classList.toggle("is-active",me.e=et),zt!==me.t&&Oe.classList.toggle("is-menu-open",me.t=zt),me},{e:void 0,t:void 0}),Oe})()})}})),m}}),null),X(m=>{var U=!!C(oe()),$e=M()===`project:${D}`;return U!==m.e&&q.classList.toggle("is-active",m.e=U),$e!==m.t&&q.classList.toggle("is-menu-open",m.t=$e),m},{e:void 0,t:void 0}),ae})()})}})}})),i(B,e(_,{get when(){return!L()},get children(){return Hr()}}),null),It.$$click=Je,i(_n,e(_,{get when(){return be(()=>!!L())()&&w().length>0},get fallback(){return e(_,{get when(){return L()},get children(){return ss()}})},get children(){return[(()=>{var D=Br();return i(D,e(Ce,{get each(){return s().map(G=>G.session.id)},children:G=>{const oe=()=>s().find(ae=>ae.session.id===G);return e(_,{get when(){return oe()},children:ae=>(()=>{var q=Yt();return i(q,e(pe,{get href(){return fe(ae().directory,G)},class:"os-client-task-item",get classList(){return{"is-active":d()===G}},"data-session-id":G,get children(){var m=mt(),U=m.firstChild;return i(U,()=>at(ae().session)),m}}),null),i(q,e(pt,{menuKey:`recent:${G}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Jt,{get currentDirectory(){return ae().directory},projects:re,onArchive:()=>void Pt(ae().session),onDelete:()=>Dt(ae().session),onMove:m=>jt(ae().session,m),onNewProject:Pe})}}),null),X(m=>{var U=d()===G,$e=M()===`recent:${G}`;return U!==m.e&&q.classList.toggle("is-active",m.e=U),$e!==m.t&&q.classList.toggle("is-menu-open",m.t=$e),m},{e:void 0,t:void 0}),q})()})}})),X(()=>F(D,"data-expanded",T()?"true":"false")),D})(),e(_,{get when(){return P()},get children(){var D=qr();return D.$$click=()=>A(!0),D}}),e(_,{get when(){return H()},get children(){var D=Ur();return D.$$click=()=>A(!1),D}})]}})),i(Mt,e(_,{get when(){return!L()},get children(){return Vr()}}),null),i(g,e(_,{get when(){return I()},get children(){var D=Zr(),G=D.firstChild,oe=G.firstChild,ae=oe.nextSibling;return G.$$click=()=>Y(q=>!q),i(ae,()=>n.t("sidebar.section.sharedCases")),i(D,e(_,{get when(){return J()},get children(){var q=Qr();return i(q,e(_,{get when(){return Re().length>0},get fallback(){return is()},get children(){return e(Ce,{get each(){return Re()},children:m=>e(pe,{get href(){return fe(I(),m.id)},class:"os-client-task-item",get classList(){return{"is-active":d()===m.id}},get"data-session-id"(){return m.id},get children(){var U=mt(),$e=U.firstChild;return i($e,()=>Kn(m.title)??m.id),U}})})}}),null),i(q,e(_,{get when(){return We()},get children(){var m=Xr();return m.$$click=()=>de(!0),m}}),null),i(q,e(_,{get when(){return He()},get children(){var m=Gr();return m.$$click=()=>de(!1),m}}),null),q}}),null),X(q=>{var m=J(),U=J()?"true":"false";return m!==q.e&&F(G,"aria-expanded",q.e=m),U!==q.t&&F(oe,"data-open",q.t=U),q},{e:void 0,t:void 0}),D}}),null),i(At,e(pe,{get href(){return Tn()},class:"os-sidebar-footer-action",get classList(){return{"is-active":b()}},get children(){return[Jr(),Yr()]}}),Ot),Ot.$$click=bn,X(D=>{var G=!L(),oe=!L();return G!==D.e&&Q.classList.toggle("is-muted",D.e=G),oe!==D.t&&It.classList.toggle("is-muted",D.t=oe),D},{e:void 0,t:void 0}),t})()}Me(["pointerdown","pointerup","click"]);var as=a('<pre class="os-client-right-files-preview whitespace-pre-wrap break-all p-3 text-12-regular m-0">'),ls=a("<button type=button class=os-client-right-files-back>← 返回目录"),cs=a("<span class=os-client-right-files-title>"),ds=a("<button type=button>"),us=a("<div class=os-client-right-files-actions><button type=button>关闭"),hs=a("<p class=os-client-right-files-hint>SSH 未连接,目录显示远端路径。请先在项目栏连接远端。"),gs=a("<p class=os-client-right-files-hint>正在加载目录…"),ms=a("<p class=os-client-right-files-hint>该目录为空"),fs=a("<div class=os-client-right-files-tree-scroll>"),ps=a("<div class=os-client-right-files-tree><p class=os-client-right-files-root>"),vs=a("<div class=os-client-right-files-unsaved>"),bs=a("<p class=os-client-right-files-hint>…"),ws=a("<textarea class=os-client-right-files-textarea autocapitalize=off autocomplete=off autocorrect=off>"),$s=a("<pre class=os-client-right-files-preview>"),_s=a("<div class=os-client-right-files-editor>"),ys=a("<section class=os-client-right-files><header class=os-client-right-files-header>"),ks=a("<strong>目录"),Ss=a("<div class=os-client-right-files-actions><button type=button aria-label=刷新>刷新</button><button type=button>关闭"),xs=a("<p class=os-client-right-files-hint>加载失败:"),Cs=a("<p class=os-client-right-files-hint>");function Ls(r){const u=r.replace(/\\/g,"/").split("/");return u[u.length-1]||r}function Ps(r){const u=er(),n=tr(),p=Te(),[l,c]=K("tree"),[S,x]=K(),[v,E]=K(""),[z,L]=K(!1),[V,f]=K(!1),[j,N]=K(0);let y;const b=$(()=>u.tree.state("")),J=$(()=>u.tree.children("")),Y=$(()=>nr(S())),ne=$(()=>{Ht(),Bt();const d=n.directory;return d?rr(d):!1}),de=$(()=>{Ht(),Bt();const d=n.directory;return d&&sr(d).kind==="ssh"?ln(d)?.remotePath?.trim()||"未连接远端":d}),T=(d=!1)=>{!n.directory||ne()||(d?u.tree.refresh(""):u.tree.list(""))};je(()=>{queueMicrotask(()=>T(!0))}),Z(()=>{if(!n.directory||l()!=="tree"||ne())return;const C=b();C?.loading||C?.loaded||C?.error||u.tree.list("")}),Z($t(()=>cn(n.directory)??"",()=>{l()==="tree"&&T(!0)}));const A=$(()=>{const d=S();if(d)return u.get(d)}),M=$(()=>A()?.content?.content??""),se=$(()=>!!A()?.loaded),ie=$(()=>!!A()?.loading),Se=$(()=>A()?.error),ge=$(()=>{const d=A();return!(!d?.loaded||d.content?.type!=="text"||d.content.encoding==="base64"||qt(S()))}),Le=$(()=>ge()&&Y()==="text"),re=$(()=>{if(!(!ge()||Le()))return{draft:v,setDraft:d=>{E(d),L(!0)},textareaRef:d=>{y=d},class:"os-client-right-files-textarea"}}),h=d=>(()=>{var C=as();return i(C,d),C})();Z(()=>{const d=S();d&&u.load(d)}),Z($t(S,()=>{L(!1),E(se()?M():""),N(0)},{defer:!1})),Z(()=>{!se()||z()||E(M())});const I=async()=>{const d=S();if(!(!d||V()||!z()||!ge())){f(!0);try{await u.write(d,v()),L(!1),Ut(d)&&N(C=>C+1)}finally{f(!1)}}};Z(()=>{if(typeof window>"u")return;ir(window,"keydown",C=>{!(C.metaKey||C.ctrlKey)||C.key.toLowerCase()!=="s"||!y?.contains(document.activeElement)&&document.activeElement!==y||(C.preventDefault(),I())})});const W=d=>{x(d),c("editor")};return(()=>{var d=ys(),C=d.firstChild;return i(C,e(_,{get when(){return l()==="editor"},get fallback(){return[ks(),(()=>{var w=Ss(),s=w.firstChild,P=s.nextSibling;return s.$$click=()=>{T(!0),u.tree.refreshAll()},_t(P,"click",r.onClose,!0),w})()]},get children(){return[(()=>{var w=ls();return w.$$click=()=>c("tree"),w})(),(()=>{var w=cs();return i(w,(()=>{var s=be(()=>!!S());return()=>s()?Ls(S()):""})()),X(()=>F(w,"title",S())),w})(),(()=>{var w=us(),s=w.firstChild;return i(w,e(_,{get when(){return ge()},get children(){var P=ds();return P.$$click=()=>void I(),i(P,(()=>{var H=be(()=>!!V());return()=>H()?p.t("common.saving"):p.t("common.save")})()),X(()=>P.disabled=!z()||V()),P}}),s),_t(s,"click",r.onClose,!0),w})()]}})),i(d,e(_,{get when(){return l()==="tree"},get children(){var w=ps(),s=w.firstChild;return i(s,de),i(w,e(_,{get when(){return ne()},get children(){return hs()}}),null),i(w,e(_,{get when(){return be(()=>!!(!ne()&&b()?.loading))()&&J().length===0},get children(){return gs()}}),null),i(w,e(_,{get when(){return be(()=>!ne())()&&b()?.error},children:P=>(()=>{var H=xs();return H.firstChild,i(H,P,null),H})()}),null),i(w,e(_,{get when(){return be(()=>!!(!ne()&&b()?.loaded&&J().length===0))()&&!b()?.error},get children(){return ms()}}),null),i(w,e(_,{get when(){return!ne()},get children(){var P=fs();return i(P,e(or,{path:"",class:"os-client-right-file-tree",nodeClass:"os-client-right-file-node",get active(){return S()},draggable:!1,onFileClick:H=>W(H.path)})),P}}),null),X(()=>F(s,"title",de())),w}}),null),i(d,e(_,{get when(){return l()==="editor"},get children(){var w=_s();return i(w,e(_,{get when(){return z()},get children(){var s=vs();return i(s,()=>p.t("session.file.unsaved")),s}}),null),i(w,e(_,{get when(){return be(()=>!!ie())()&&!se()},get children(){var s=bs(),P=s.firstChild;return i(s,()=>p.t("common.loading"),P),s}}),null),i(w,e(_,{get when(){return Se()},children:s=>(()=>{var P=Cs();return i(P,s),P})()}),null),i(w,e(_,{get when(){return se()},get children(){return e(dn,{get children(){return[e(ve,{get when(){return Ut(S())},get children(){return e(ar,{path:S,contents:M,renderSource:h,get editSource(){return re()},previewRevision:j,chrome:"workbench"})}}),e(ve,{get when(){return Y()==="markdown"},get children(){return e(lr,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return Y()==="csv"},get children(){return e(cr,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return qt(S())},get children(){return e(dr,{path:S,chrome:"workbench"})}}),e(ve,{get when(){return hr(S())},get children(){return e(ur,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return Le()},get children(){var s=ws();s.$$input=H=>{E(H.currentTarget.value),L(!0)};var P=y;return typeof P=="function"?Ke(P,s):y=s,F(s,"spellcheck",!1),X(()=>s.value=v()),s}}),e(ve,{when:!0,get children(){var s=$s();return i(s,()=>M()||"(二进制或不支持预览的文件)"),s}})]}})}}),null),w}}),null),X(()=>F(d,"data-view",l())),d})()}Me(["click","input"]);var Ds=a('<svg viewBox="0 0 12 12"width=12 height=12 fill=currentColor aria-hidden=true><circle cx=6 cy=6 r=3 class=os-client-right-todo-pulse>'),Es=a("<ul class=os-client-right-todo-list>"),js=a("<span class=os-client-right-todo-text>"),Ms=a('<li class="os-client-right-todo-item is-clickable"role=button tabindex=0>'),Rs=a("<p class=os-client-right-todo-progress>已完成 <!> / "),Is=a("<section class=os-client-right-todo><header class=os-client-right-todo-header><strong></strong><button type=button>关闭"),As=a("<p class=os-client-right-todo-empty>暂无场景工作流。从能力中心场景创建任务后,步骤会显示在这里。"),Os=a("<span class=os-client-right-todo-stop> · ");function zs(r){return r==="completed"?"completed":r==="in_progress"?"in_progress":r==="failed"?"cancelled":"pending"}function Fs(r){if(r==="in_progress")return Ds()}function Ns(r,u){return u?"confirm":r==="pending"?"edit":r==="completed"||r==="failed"||r==="in_progress"?"rerun":"view"}function Ks(r){return(()=>{var u=Es();return i(u,e(Ce,{get each(){return r.items},children:n=>(()=>{var p=Ms();return p.$$keydown=l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r.onOpen(n.index))},p.$$click=()=>r.onOpen(n.index),i(p,e(gr,{readOnly:!0,get checked(){return n.status==="completed"},get indeterminate(){return n.status==="in_progress"},get icon(){return Fs(n.status)},get children(){var l=js();return i(l,()=>n.content),X(c=>{var S=n.status==="completed"||n.status==="cancelled",x=n.status==="pending";return S!==c.e&&l.classList.toggle("is-done",c.e=S),x!==c.t&&l.classList.toggle("is-pending",c.t=x),c},{e:void 0,t:void 0}),l}})),X(()=>F(p,"data-state",n.status)),p})()})),u})()}function Ts(r){const u=St();un();const n=$(()=>yt(r.directoryKey,r.sessionID)??Vt(r.directoryKey)),p=$(()=>{const x=n();return x?.steps.length?x.steps.map((v,E)=>({content:v.name,status:zs(v.status),index:E})):[]}),l=$(()=>p().filter(x=>x.status==="completed").length),c=$(()=>n()?.title||"待办"),S=x=>{const v=yt(r.directoryKey,r.sessionID)??Vt(r.directoryKey);if(!v)return;const E=v.steps[x];if(!E)return;const z=mr(v,x),L=E.status==="pending"&&v.phase==="awaiting_confirm"&&v.currentIndex===x,V=Ns(E.status,L),f=E.status==="in_progress",j=V==="confirm"?"确认下一步参数":V==="edit"?"编辑步骤参数":f?"终止并重新执行":V==="rerun"?"从此步重新执行":"查看步骤参数",N=r.directoryKey;u.show(()=>e(pr,{title:j,get stepName(){return E.name},fields:z,get values(){return v.values},mode:V,get firstDecision(){return L&&v.confirmMode==="unset"},aborting:f,rerunActionLabel:f?"终止并重新执行":"从此步重新执行",get reason(){return V==="confirm"?`下一步「${E.name}」可按需调整参数,确认后将自动发送并执行。`:V==="edit"?`可修改「${E.name}」的预填参数,保存后在执行该步时生效。`:f?`将停止自动续跑并从「${E.name}」重发。已提交的外部作业需自行取消;可先修改参数再确认。`:V==="rerun"?`可修改「${E.name}」参数。确认后将从该步重新执行,并重置后续步骤状态。`:`「${E.name}」当前为只读,展示该步相关参数。`},canContinue:L,onSave:y=>{Xt(N,y),ce({title:"已保存步骤参数"})},onConfirm:y=>{const b=Gt(N,y);b&&(ht(N,b),ce({title:y.mode==="auto"?`连续执行:${b.stepName}`:`继续执行:${b.stepName}`}))},onSaveAndContinue:y=>{Xt(N,y.values);const b=Gt(N,y);b&&(ht(N,b),ce({title:y.mode==="auto"?`连续执行:${b.stepName}`:`继续执行:${b.stepName}`}))},onRerun:y=>{const b=fr(N,{stepIndex:x,values:y});b&&(ht(N,b),ce({title:f?`已终止并从该步重跑:${b.stepName}`:`已从该步重新执行:${b.stepName}`}))}}))};return(()=>{var x=Is(),v=x.firstChild,E=v.firstChild,z=E.nextSibling;return i(E,c),_t(z,"click",r.onClose,!0),i(x,e(_,{get when(){return p().length>0},get fallback(){return As()},get children(){return[(()=>{var L=Rs(),V=L.firstChild,f=V.nextSibling;return f.nextSibling,i(L,l,f),i(L,()=>p().length,null),i(L,e(_,{get when(){return n()?.stopReason},children:j=>(()=>{var N=Os();return N.firstChild,i(N,j,null),N})()}),null),L})(),e(Ks,{get items(){return p()},onOpen:S})]}}),null),X(()=>F(E,"title",c())),x})()}Me(["click","keydown"]);var Ws=a("<div class=os-client-right-add-dropdown role=menu>"),Hs=a('<aside class="os-client-right-sidebar os-client-right-dock"><div class=os-client-right-toolbar><div class=os-client-right-add-menu><button type=button class=os-client-right-add-button aria-label=打开页面><span class=os-client-right-add-icon aria-hidden=true></span></button></div></div><div class=os-client-right-dock-body>'),Bs=a("<button type=button role=menuitem>"),qs=a("<section class=os-client-right-empty><strong>尚未打开页面</strong><p>点击 + 打开目录、可视化组件或待办;在会话中可从目录点文件到右侧编辑。"),Us=a("<section class=os-client-right-pane-stub><header><strong>可视化组件</strong><button type=button>关闭</button></header><p>请从「目录」中打开 `.html` / `.md` / `.csv` / `.pdf` / `.xyz` 文件查看可视化预览;后续版本将提供独立可视化入口。"),Vs=a("<section class=os-client-right-pane-stub><header><strong>目录</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看目录。"),Xs=a("<section class=os-client-right-pane-stub><header><strong>待办</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看待办。");const Gs=[{id:"directory",label:"目录"},{id:"viz",label:"可视化组件"},{id:"todo",label:"待办"}];function Qs(){const r=it(),u=mn(),[n,p]=K(!1),[l,c]=K();let S;const x=$(()=>hn(r.pathname)),v=$(()=>{const y=x()?.dir;return y?xt(y)??"":""}),E=$(()=>Ct(r.pathname)&&!!v()),z=$(()=>v()||u()),L=$(()=>x()?.dir||(z()?wt(z()):"")),V=$(()=>!!z()&&!!L()),f=$(()=>{un();const y=x()?.dir;if(!y)return!1;const b=yt(y,x()?.id);return b?b.phase!=="done"&&b.phase!=="stopped":!1});je(()=>{const y=b=>{n()&&(S?.contains(b.target)||p(!1))};document.addEventListener("pointerdown",y),Ee(()=>document.removeEventListener("pointerdown",y))}),Z(y=>{const b=E();return b&&!y&&!l()&&c("directory"),b}),Z(()=>{if(!gn())return;const b=vr();b&&(c(b),p(!1))});const j=y=>{c(y),p(!1)},N=()=>{if(f()&&l()!=="todo"){c("todo");return}c(void 0)};return(()=>{var y=Hs(),b=y.firstChild,J=b.firstChild,Y=J.firstChild,ne=b.nextSibling,de=S;return typeof de=="function"?Ke(de,b):S=b,Y.$$click=()=>p(T=>!T),i(J,e(_,{get when(){return n()},get children(){var T=Ws();return i(T,e(Ce,{get each(){return[...Gs]},children:A=>(()=>{var M=Bs();return M.$$click=()=>j(A.id),i(M,()=>A.label),M})()})),T}}),null),i(ne,e(_,{get when(){return l()},get fallback(){return qs()},children:T=>e(dn,{get children(){return[e(ve,{get when(){return T()==="directory"},get children(){return e(_,{get when(){return V()},get fallback(){return(()=>{var A=Vs(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=N,A})()},get children(){return e(br,{params:()=>({dir:L(),id:x()?.id}),get children(){return e(wr,{directory:()=>z(),get children(){return e($r,{get children(){return e(_r,{get children(){return e(Ps,{onClose:N})}})}})}})}})}})}}),e(ve,{get when(){return T()==="todo"},get children(){return e(_,{get when(){return x()?.dir},get fallback(){return(()=>{var A=Xs(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=()=>c(void 0),A})()},children:A=>e(Ts,{get directoryKey(){return A()},get sessionID(){return x()?.id},onClose:()=>c(void 0)})})}}),e(ve,{get when(){return T()==="viz"},get children(){var A=Us(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=N,A}})]}})})),X(T=>{var A=!!n(),M=n();return A!==T.e&&Y.classList.toggle("is-open",T.e=A),M!==T.t&&F(Y,"aria-expanded",T.t=M),T},{e:void 0,t:void 0}),y})()}Me(["click"]);var Zs=a('<button type=button class="os-client-panel-toggle os-client-terminal-toggle"aria-controls=terminal-panel>'),Js=a('<svg class=os-client-pane-toggle-icon viewBox="0 0 24 24"aria-hidden=true><rect x=4.5 y=5.5 width=15 height=13 rx=1.35 fill=none stroke=currentColor stroke-width=1.4></rect><path d="M8 10.25l2.4 2.25L8 14.75M12.25 14.75H16"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round stroke-linejoin=round>');function Ys(){const r=it(),u=kt(),n=Te(),p=yr(),l=St(),[c,S]=K(te()),x=mn(),v=$(()=>sn(r.pathname)||Ct(r.pathname)),E=$(()=>!v()||kr()&&!c()?!1:u.terminal.enabled()?!0:Qt(c())),z=$(()=>u.view("workbench").terminal.opened()),L=$(()=>{const f=hn(r.pathname);return f?.dir?xt(f.dir)??"":x()});je(()=>{const f=()=>S(te());window.addEventListener(st,f),window.addEventListener(rt,f),window.addEventListener("storage",f),Ee(()=>{window.removeEventListener(st,f),window.removeEventListener(rt,f),window.removeEventListener("storage",f)})}),Z(()=>{E()&&Zt()}),Z($t(v,(f,j)=>{j===void 0||f||!j||z()&&(u.view("workbench").terminal.close(),u.terminal.closeFullscreen())}));const V=()=>{if(Qt(c())||!u.terminal.enabled()){on(()=>import("./dialog-terminal-unavailable-Ct951kdx.js"),__vite__mapDeps([3,1,2])).then(f=>{l.show(()=>e(f.DialogTerminalUnavailable,{}))});return}if(!z()){const f=L();if(f&&!cn(f)&&!an(c(),f))return;Zt()}u.view("workbench").terminal.toggle()};return e(_,{get when(){return E()},get children(){var f=Zs();return f.$$click=j=>j.preventDefault(),f.$$pointerdown=j=>{j.button===0&&(j.preventDefault(),V())},i(f,e(ei,{get active(){return z()}})),X(j=>{var N=!!z(),y=n.t("command.terminal.toggle"),b=n.t("command.terminal.toggle"),J=z(),Y=`${n.t("command.terminal.toggle")} (${p.keybind("terminal.toggle")})`;return N!==j.e&&f.classList.toggle("is-active",j.e=N),y!==j.t&&F(f,"data-tooltip",j.t=y),b!==j.a&&F(f,"aria-label",j.a=b),J!==j.o&&F(f,"aria-expanded",j.o=J),Y!==j.i&&F(f,"title",j.i=Y),j},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),f}})}function ei(r){return(()=>{var u=Js(),n=u.firstChild,p=n.nextSibling;return X(()=>F(p,"opacity",r.active?1:.85)),u})()}Me(["pointerdown","click"]);var ti=a('<svg class=os-client-pane-toggle-icon viewBox="0 0 24 24"aria-hidden=true><rect class=os-client-pane-toggle-icon-main x=4.5 y=5.5 width=7.7 height=13 rx=1.35></rect><rect class=os-client-pane-toggle-icon-divider x=12.15 y=5.5 width=1.15 height=13 rx=0.55></rect><rect class=os-client-pane-toggle-icon-side x=14.05 y=5.5 width=5.45 height=13 rx=1.35>'),ni=a('<div class="os-client-pane-resizer os-client-pane-resizer-sidebar"role=separator aria-orientation=vertical aria-label=调整左边栏宽度 aria-valuemin=230 aria-valuemax=430 tabindex=0>'),ri=a('<div class="os-client-pane-resizer os-client-pane-resizer-tool"role=separator aria-orientation=vertical aria-label=调整右边栏宽度 aria-valuemin=200 aria-valuemax=1280 tabindex=0>'),si=a("<main class=os-client-workbench><div class=os-client-workbench-chrome><button type=button class=os-client-panel-toggle></button><button type=button class=os-client-panel-toggle></button></div><section class=os-workspace-main></section><div class=os-client-terminal-dock>");const Fe=320,ii=230,oi=430,ai=200,nn=1280;function rn(r){return(()=>{var u=ti();return X(n=>{var p=r.side,l=r.open?"true":"false";return p!==n.e&&F(u,"data-side",n.e=p),l!==n.t&&F(u,"data-open",n.t=l),n},{e:void 0,t:void 0}),u})()}function vt(r){return Math.min(oi,Math.max(ii,Math.round(r)))}function bt(r){const u=typeof window>"u"?nn:Math.min(nn,Math.floor(window.innerWidth*.85));return Math.min(u,Math.max(ai,Math.round(r)))}function hi(r){const u=kt(),n=it(),[p,l]=K(!0),[c,S]=K(!1),[x,v]=K(Fe),[E,z]=K(Fe),[L,V]=K(!1),[f,j]=K(!1),[N,y]=K(0),[b,J]=K({left:0,right:0}),[Y,ne]=K(),[de,T]=K(),A=$(()=>u.view("workbench").terminal.opened()),M=()=>A(),se=$(()=>{if(!A())return 0;const h=N();return h>0?h:u.terminal.height()}),ie=()=>{const h=Y();if(!h)return;const I=h.querySelector(":scope > .os-workspace-main");if(!I)return;const W=h.getBoundingClientRect(),d=getComputedStyle(h),C=W.left+(parseFloat(d.borderLeftWidth)||0),w=W.right-(parseFloat(d.borderRightWidth)||0),s=I.getBoundingClientRect(),H=h.querySelector(":scope > .os-client-right-sidebar")?.getBoundingClientRect()??s;J({left:Math.max(0,Math.round(s.left-C)),right:Math.max(0,Math.round(w-H.right))})},Se=()=>{l(h=>(h||v(Fe),!h))},ge=()=>{S(h=>(h||(z(Fe),Ct(n.pathname)&&Sr("directory")),!h))};Z(()=>{gn()&&(S(!0),z(I=>I>0?I:Fe))});const Le=h=>{if(h.button!==0)return;h.preventDefault();const I=h.clientX,W=x();V(!0);const d=w=>{v(vt(W+(w.clientX-I)))},C=()=>{V(!1),window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C)},re=h=>{if(h.button!==0)return;h.preventDefault();const I=h.clientX,W=E();j(!0);const d=w=>{z(bt(W+(I-w.clientX)))},C=()=>{j(!1),window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C)};return Z(()=>{const h=de();if(!h||typeof ResizeObserver>"u")return;const I=()=>{const d=h.querySelector("#terminal-panel");y(d?Math.round(d.getBoundingClientRect().height):0)};I();const W=new ResizeObserver(I);W.observe(h),Ee(()=>W.disconnect())}),Z(()=>{A()||y(0)}),je(()=>{u.view("workbench").terminal.close(),u.terminal.closeFullscreen(),y(0)}),Z(()=>{p(),c(),x(),E(),L(),f(),M(),Y(),ie();const h=requestAnimationFrame(ie);Ee(()=>cancelAnimationFrame(h))}),Z(()=>{const h=Y();if(!h||typeof ResizeObserver>"u")return;const I=new ResizeObserver(()=>ie());I.observe(h);const W=h.querySelector(":scope > .os-workspace-main");W&&I.observe(W);const d=h.querySelector(":scope > .os-client-right-sidebar");d&&I.observe(d),Ee(()=>I.disconnect())}),(()=>{var h=si(),I=h.firstChild,W=I.firstChild,d=W.nextSibling,C=I.nextSibling,w=C.nextSibling;return Ke(ne,h),W.$$click=Se,i(W,e(rn,{side:"left",get open(){return p()}})),i(I,e(Ys,{}),d),d.$$click=ge,i(d,e(rn,{side:"right",get open(){return c()}})),i(h,e(_,{get when(){return p()},get children(){return[e(os,{}),(()=>{var s=ni();return s.$$keydown=P=>{if(P.key==="ArrowLeft"){P.preventDefault(),v(H=>vt(H-16));return}P.key==="ArrowRight"&&(P.preventDefault(),v(H=>vt(H+16)))},s.$$pointerdown=Le,X(()=>F(s,"aria-valuenow",x())),s})()]}}),C),i(C,()=>r.children),i(h,e(_,{get when(){return c()},get children(){return[(()=>{var s=ri();return s.$$keydown=P=>{if(P.key==="ArrowLeft"){P.preventDefault(),z(H=>bt(H+16));return}P.key==="ArrowRight"&&(P.preventDefault(),z(H=>bt(H-16)))},s.$$pointerdown=re,X(()=>F(s,"aria-valuenow",E())),s})(),e(Qs,{})]}}),w),Ke(T,w),F(w,"id",xr),X(s=>{var P=!!p(),H=!!c(),_e=!!L(),Re=!!f(),We=!!M(),He=!!(u.terminal.fullscreen()&&u.view("workbench").terminal.opened()),we=`${x()}px`,Be=`${E()}px`,qe=`${se()}px`,Ue=`${b().left}px`,Ve=`${b().right}px`,Xe=!!p(),Ge=p()?"关闭左侧栏":"打开左侧栏",Qe=p()?"关闭左侧栏":"打开左侧栏",Ze=!!c(),Pe=c()?"关闭右侧栏":"打开右侧栏",Je=c()?"关闭右侧栏":"打开右侧栏",Ye=!!M(),Ie=!M();return P!==s.e&&h.classList.toggle("has-left-sidebar",s.e=P),H!==s.t&&h.classList.toggle("has-right-sidebar",s.t=H),_e!==s.a&&h.classList.toggle("is-resizing-left",s.a=_e),Re!==s.o&&h.classList.toggle("is-resizing-right",s.o=Re),We!==s.i&&h.classList.toggle("has-terminal-open",s.i=We),He!==s.n&&h.classList.toggle("has-terminal-fullscreen",s.n=He),we!==s.s&&ze(h,"--os-client-sidebar-w",s.s=we),Be!==s.h&&ze(h,"--os-client-tool-w",s.h=Be),qe!==s.r&&ze(h,"--os-client-terminal-h",s.r=qe),Ue!==s.d&&ze(h,"--os-client-terminal-left",s.d=Ue),Ve!==s.l&&ze(h,"--os-client-terminal-right",s.l=Ve),Xe!==s.u&&W.classList.toggle("is-active",s.u=Xe),Ge!==s.c&&F(W,"data-tooltip",s.c=Ge),Qe!==s.w&&F(W,"aria-label",s.w=Qe),Ze!==s.m&&d.classList.toggle("is-active",s.m=Ze),Pe!==s.f&&F(d,"data-tooltip",s.f=Pe),Je!==s.y&&F(d,"aria-label",s.y=Je),Ye!==s.g&&w.classList.toggle("is-open",s.g=Ye),Ie!==s.p&&F(w,"aria-hidden",s.p=Ie),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0}),h})()}Me(["click","pointerdown","keydown"]);export{hi as WorkbenchShell};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-project-upload-CQETR8DT.js","assets/index-D89_umhI.js","assets/index-B_MGkqLF.css","assets/dialog-terminal-unavailable-BJHx-DqW.js"])))=>i.map(i=>d[i]);
2
+ import{u as Te,c as e,I as he,D as O,i,S as _,F as Ce,d as Ne,t as a,p as le,a as ke,s as te,b as Me,e as it,f as kn,g as kt,h as Sn,j as xn,k as Cn,l as Ln,m as St,n as K,o as $,q as je,r as Ft,v as rt,w as st,x as Ee,y as Pn,z as Nt,A as Dn,B as xt,C as Z,E as Kt,G as lt,H as En,J as Tt,K as jn,L as fe,M as Mn,N as Rn,O as In,P as An,Q as On,R as pe,T as zn,U as Fn,V as Nn,W as X,X as be,Y as F,Z as Kn,_ as Tn,$ as sn,a0 as ct,a1 as Ke,a2 as Wn,a3 as Wt,a4 as wt,a5 as ce,a6 as on,a7 as Hn,a8 as an,a9 as Bn,aa as qn,ab as De,ac as dt,ad as tt,ae as Un,af as Vn,ag as Xn,ah as ut,ai as Gn,aj as Qn,ak as ln,al as Zn,am as Jn,an as Yn,ao as er,ap as tr,aq as nr,ar as Ht,as as Bt,at as rr,au as sr,av as $t,aw as cn,ax as qt,ay as ir,az as _t,aA as or,aB as dn,aC as ve,aD as ar,aE as Ut,aF as lr,aG as cr,aH as dr,aI as ur,aJ as hr,aK as un,aL as yt,aM as Vt,aN as gr,aO as mr,aP as fr,aQ as ht,aR as Xt,aS as Gt,aT as pr,aU as hn,aV as Ct,aW as gn,aX as vr,aY as br,aZ as wr,a_ as $r,a$ as _r,b0 as yr,b1 as kr,b2 as Qt,b3 as Zt,b4 as Sr,b5 as xr,b6 as ze}from"./index-D89_umhI.js";import{DialogEditProject as Cr}from"./dialog-edit-project-DkwpgJNK.js";import{c as Lr}from"./selection-BGUJK_pT.js";import{u as mn}from"./current-project-D88n80Ca.js";var Pr=a("<span class=os-client-session-menu-label>"),Dr=a("<div class=os-client-session-menu-empty>");const Er="os-client-session-menu",jr="os-client-session-menu os-client-session-menu-sub";function Mr(r){const u=Te(),n=()=>te(),p=()=>ke(n(),r.currentDirectory),l=()=>r.projects().filter(c=>le(c.worktree)!==le(r.currentDirectory)).filter(c=>!ke(n(),c.worktree));return e(_,{get when(){return p()},get children(){return e(O.Sub,{get children(){return[e(O.SubTrigger,{"data-action":"session-move",class:"os-client-session-menu-item",get children(){return[e(he,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),(()=>{var c=Pr();return i(c,()=>u.t("session.move.toProject")),c})(),e(he,{name:"chevron-right",size:"small",class:"os-client-session-menu-chevron"})]}}),e(O.Portal,{get children(){return e(O.SubContent,{class:jr,get children(){return[e(O.Item,{"data-action":"session-move-new-project",class:"os-client-session-menu-item",onSelect:()=>r.onNewProject(),get children(){return[e(he,{name:"plus",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("session.move.newProject")}})]}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(_,{get when(){return l().length>0},get fallback(){return(()=>{var c=Dr();return i(c,()=>u.t("session.move.emptyProjects")),c})()},get children(){return e(Ce,{get each(){return l()},children:c=>e(O.Item,{"data-action":"session-move-target",class:"os-client-session-menu-item",onSelect:()=>r.onMove(c.worktree),get children(){return[e(he,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return Ne(c)}})]}})})}})]}})}})]}})}})}function Jt(r){const u=Te();return[e(O.Item,{"data-action":"session-archive",class:"os-client-session-menu-item",onSelect:()=>r.onArchive(),get children(){return[e(he,{name:"archive",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("common.archive")}})]}}),e(Mr,{get currentDirectory(){return r.currentDirectory},get projects(){return r.projects},get onMove(){return r.onMove},get onNewProject(){return r.onNewProject}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(O.Item,{"data-action":"session-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>r.onDelete(),get children(){return[e(he,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return u.t("common.delete")}})]}})]}var Rr=a("<button type=button aria-haspopup=menu>..."),gt=a('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><span class="text-14-regular text-text-strong"></span><div class="flex justify-end gap-2">'),Ir=a("<span class=os-sidebar-label>"),Ar=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M21 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z">'),Or=a("<span class=os-sidebar-label>新建会话"),zr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M5 5h5v5H5z"></path><path d="M14 5h5v5h-5z"></path><path d="M5 14h5v5H5z"></path><path d="M14 14h5v5h-5z">'),Fr=a("<span class=os-sidebar-label>能力中心"),Nr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.5-3.5a5.8 5.8 0 0 1-7.6 7.6l-6.8 6.8a2.1 2.1 0 0 1-3-3l6.8-6.8a5.8 5.8 0 0 1 7.6-7.6z">'),Kr=a("<span class=os-sidebar-label>skills设置"),Tr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><rect x=3 y=4 width=18 height=6 rx=1.5></rect><rect x=3 y=14 width=18 height=6 rx=1.5></rect><path d="M7 7h.01"></path><path d="M7 17h.01">'),Wr=a("<span class=os-sidebar-label>资源配置"),Hr=a("<p class=os-client-empty-hint>登录后同步个人空间"),Br=a("<div class=os-client-task-list-scroll>"),qr=a("<button type=button class=os-client-task-more data-action=recent-expand>展开更多"),Ur=a("<button type=button class=os-client-task-more data-action=recent-collapse>收起"),Vr=a("<p class=os-client-empty-hint>登录后查看未分类会话"),Xr=a("<button type=button class=os-client-shared-cases-more data-action=shared-cases-expand>展开更多"),Gr=a("<button type=button class=os-client-shared-cases-more data-action=shared-cases-collapse>收起"),Qr=a("<div class=os-client-shared-cases-list>"),Zr=a('<section class="os-sidebar-group os-client-shared-cases"data-section=shared-cases><button type=button class=os-client-shared-cases-toggle data-action=shared-cases-toggle><span class=os-client-shared-cases-chevron aria-hidden=true></span><span>'),Jr=a('<svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M7 4h7l3 3v13H7z"></path><path d="M14 4v4h4"></path><path d="M10 12h5"></path><path d="M10 16h5">'),Yr=a("<span class=os-sidebar-label>帮助"),es=a('<aside class=os-sidebar><div class=os-sidebar-brand></div><nav class=os-sidebar-nav><div class=os-sidebar-nav-scroll><div class="os-sidebar-group os-client-capability-group"></div><div class="os-sidebar-group os-client-list-section"><div class=os-client-section-title><span>项目</span><span class=os-client-section-actions><button type=button aria-label=新建项目>+</button></span></div><div class=os-client-project-list></div></div><div class="os-sidebar-group os-client-list-section"><div class=os-client-section-title><span>未分类</span><span class=os-client-section-actions><button type=button aria-label=新建会话>+</button></span></div><div class=os-client-task-list></div></div></div></nav><div class=os-sidebar-footer><div class=os-sidebar-footer-actions><button type=button class=os-sidebar-footer-action><svg class=os-sidebar-icon viewBox="0 0 24 24"aria-hidden=true><path d="M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z"></path><path d="M12 3.5v2"></path><path d="M12 18.5v2"></path><path d="m5.6 5.6 1.4 1.4"></path><path d="m17 17 1.4 1.4"></path><path d="M3.5 12h2"></path><path d="M18.5 12h2"></path><path d="m5.6 18.4 1.4-1.4"></path><path d="m17 7 1.4-1.4"></path></svg><span class=os-sidebar-label>设置'),ts=a("<p class=os-client-empty-hint>暂无项目,点击 + 打开目录"),ns=a("<div class=os-client-project-sessions>"),rs=a("<div class=os-client-project-block><div class=os-client-project-row>"),mt=a("<span class=os-client-task-main><span>"),Yt=a("<div class=os-client-session-row>"),ss=a("<p class=os-client-empty-hint>暂无未分类会话,点击 + 新建"),is=a("<p class=os-client-empty-hint>暂无默认案例");const nt=4,en=200,ft=4,tn=400;function pt(r){let u;const n=()=>r.openKey()===r.menuKey,p=l=>{l.preventDefault(),l.stopPropagation(),n()?r.setOpenKey(""):r.setOpenKey(r.menuKey)};return e(O,{modal:!1,preventScroll:!1,gutter:6,placement:"bottom-end",get open(){return n()},getAnchorRect:()=>u?.getBoundingClientRect(),onOpenChange:l=>{if(l){n()||r.setOpenKey(r.menuKey);return}Date.now()-r.openedAt()<tn||r.setOpenKey("")},get children(){return[(()=>{var l=Rr();return l.$$click=p,l.$$pointerup=c=>{c.preventDefault(),c.stopPropagation()},l.$$pointerdown=c=>{c.preventDefault(),c.stopPropagation()},Ke(c=>{u=c},l),X(c=>{var S=r.triggerClass,x=r.label,v=n();return S!==c.e&&Wn(l,c.e=S),x!==c.t&&F(l,"aria-label",c.t=x),v!==c.a&&F(l,"aria-expanded",c.a=v),c},{e:void 0,t:void 0,a:void 0}),l})(),e(O.Portal,{get children(){return e(O.Content,{class:Er,onOpenAutoFocus:l=>l.preventDefault(),onFocusOutside:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),onInteractOutside:l=>{const c=l.target;if(c instanceof Node&&u?.contains(c)){l.preventDefault();return}Date.now()-r.openedAt()<tn&&l.preventDefault()},onPointerDown:l=>l.stopPropagation(),get children(){return r.children}})}})]}})}function os(){const r=it(),u=kn(),n=Te(),p=kt(),l=Sn(),c=xn(),S=Cn(),x=Ln(),v=St(),[E,z]=K(0),L=$(()=>(E(),!!te())),V=()=>sn(r.pathname),f=()=>(r.pathname,r.search,Lr()),j=()=>r.pathname.startsWith("/workspace/capabilities"),N=()=>r.pathname.startsWith("/workspace/skills"),y=()=>r.pathname.startsWith("/workspace/resources"),b=()=>r.pathname.startsWith("/workspace/docs"),[J,Y]=K(!0),[ne,de]=K(!1),[T,A]=K(!1),[M,se]=K("");let ie=0;const Se=t=>{t&&(ie=Date.now()),se(t)},ge=()=>ie;je(()=>{const t=()=>z(o=>o+1);window.addEventListener(Ft,t),window.addEventListener(rt,t),window.addEventListener(st,t),Ee(()=>{window.removeEventListener(Ft,t),window.removeEventListener(rt,t),window.removeEventListener(st,t)})});const Le=$(()=>Pn(p.projects.list(),te())),re=$(()=>Le().filter(t=>!ke(te(),t.worktree))),h=$(()=>Nt(te())?.trim()||""),I=$(()=>Dn(te())?.trim()||""),W=$(()=>{const t=/^\/workspace\/([^/]+)\/session/.exec(r.pathname)?.[1];return t?xt(t)??"":""}),d=()=>/\/session\/([^/?#]+)/.exec(r.pathname)?.[1],C=t=>{const o=W();if(!o)return!1;const g=le(o);return le(t.worktree)===g?!0:t.sandboxes?.some(R=>le(R)===g)??!1};Z(()=>{if(!L())return;const t=[...re().flatMap(o=>[o.worktree,...o.sandboxes??[]]),h()].filter(o=>o.length>0);for(const o of t)Kt(()=>{l.project.loadSessions(o)})}),Z(()=>{const t=I();if(!t)return;const[o,g]=l.child(t,{bootstrap:!1});(o.limit??0)<en&&g("limit",en),Kt(()=>{l.project.loadSessions(t)})});const w=$(()=>{const t=h();if(!t)return[];const[o]=l.child(t,{bootstrap:!1});return lt(o,Date.now(),t).map(g=>({session:g,directory:t}))}),s=$(()=>T()?w():w().slice(0,ft)),P=$(()=>!T()&&w().length>ft),H=$(()=>T()&&w().length>ft),_e=$(()=>{const t=I();if(!t)return[];const[o]=l.child(t,{bootstrap:!1});return En(lt(o,Date.now(),t).filter(g=>Tt(g.id)))}),Re=$(()=>J()?ne()?_e():_e().slice(0,nt):[]),We=$(()=>J()&&!ne()&&_e().length>nt),He=$(()=>J()&&ne()&&_e().length>nt);Z(()=>{const t=jn(r.search),o=d(),g=t&&t!=="open"?t:Tt(o)?o:void 0;if((t||g)&&Y(!0),g&&_e().findIndex(B=>B.id===g)>=nt&&de(!0),!t||t==="open")return;const R=I();R&&o!==t&&u(fe(R,t),{replace:!0})});function we(t,o=!0){p.projects.open(t),x.projects.touchCode(t),o&&u(fe(t))}function Be(){v.show(()=>e(Qn,{onCreated:t=>we(t)}))}function qe(t){v.show(()=>e(Cr,{project:t}))}function Ue(t){const o=t.worktree;if(ke(te(),o))return;const g=re(),R=le(o),k=g.findIndex(ee=>le(ee.worktree)===R);if(k===-1)return;const B=C(t);if(p.projects.close(o),B){const ee=g[k+1]??g[k-1];u(ee?fe(ee.worktree):"/workspace")}}function Ve(t){const[o,g]=l.child(t,{bootstrap:!1}),R=o.session.map(k=>k.id);Zn(t,R),l.session.setActive(t,void 0),g(ut(k=>{Jn(k,R),k.session=[]})),Yn(t,void 0),l.set("project",ut(k=>{const B=k.findIndex(ee=>le(ee.worktree)===le(t));B>=0&&k.splice(B,1)}))}async function Xe(t){if(ke(te(),t.worktree))return!1;const o=t.worktree,g=re(),R=le(o),k=g.findIndex(Q=>le(Q.worktree)===R),B=C(t);if(await c.client.experimental.session.list({directory:o,roots:!0,archived:!0,limit:1}).then(Q=>(Q.data??[]).some(Ae=>!!Ae.time?.archived)).catch(()=>!1))return ce({title:n.t("sidebar.project.delete.failed"),description:n.t("sidebar.project.delete.hasArchived")}),!1;const ue=ln(o)?.workspaceID?.trim();if(ue&&await c.client.experimental.workspace.remove({id:ue,directory:o}).catch(()=>{}),!await c.client.project.remove({directory:o}).then(Q=>Q.data).catch(Q=>(ce({title:n.t("sidebar.project.delete.failed"),description:tt(Q,n.t("common.requestFailed"))}),!1)))return!1;if(Ve(o),p.projects.close(o),B){const Q=k>=0?g[k+1]??g[k-1]:void 0;u(Q?fe(Q.worktree):"/workspace")}return!0}function Ge(t){const o=$(()=>Ne(t.project)),[g,R]=K(!1),[k,B]=K("checking");je(()=>{c.client.experimental.session.list({directory:t.project.worktree,roots:!0,archived:!0,limit:1}).then(ue=>{const xe=(ue.data??[]).some(Q=>!!Q.time?.archived);B(xe?"blocked":"ok")}).catch(()=>B("ok"))});const ee=async()=>{if(g()||k()!=="ok")return;R(!0);const ue=await Xe(t.project);R(!1),ue&&v.close()};return e(dt,{get title(){return n.t("sidebar.project.delete.title")},fit:!0,get children(){var ue=gt(),xe=ue.firstChild,Q=xe.nextSibling;return i(xe,(()=>{var Ae=be(()=>k()==="blocked");return()=>Ae()?n.t("sidebar.project.delete.hasArchived"):n.t("sidebar.project.delete.confirm",{name:o()})})()),i(Q,e(De,{variant:"ghost",size:"large",get disabled(){return g()},onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(Q,e(_,{get when(){return k()!=="blocked"},get children(){return e(De,{variant:"primary",size:"large",get disabled(){return g()||k()==="checking"},onClick:()=>void ee(),get children(){return be(()=>!!g())()?n.t("sidebar.project.delete.busy"):n.t("sidebar.project.delete.button")}})}}),null),ue}})}function Qe(t){ke(te(),t.worktree)||v.show(()=>e(Ge,{project:t}))}async function Ze(){const t=S.openDirectoryPickerDialog;function o(g){if(Array.isArray(g)){g.forEach((R,k)=>we(R,k===0));return}g&&we(g)}if(t&&Vn({hasNativePicker:!!t,isLocalServer:!!x.isLocal(),hasPlatformSession:!!te()})){const g=await t({title:n.t("command.project.open"),multiple:!0});o(g);return}v.show(()=>e(Xn,{multiple:!0,onSelect:o,onCreateFolder:Be}),()=>o(null))}function Pe(){ct({navigate:u,action:{type:"install",resourceId:"__project__"},isLoggedIn:L()})&&Ze()}function Je(){if(!ct({navigate:u,action:{type:"install",resourceId:"__task__"},isLoggedIn:L()}))return;const t=Nt(te());t&&(Wt(wt(t)),we(t))}function Ye(t){ct({navigate:u,action:{type:"install",resourceId:"__task__"},isLoggedIn:L()})&&(Wt(wt(t)),we(t))}function Ie(t){const o=te();return Hn(o,t)?!1:an(o,t)}function fn(t){if(!Ie(t)){ce({title:n.t("dialog.project.upload.failed"),description:n.t("dialog.project.upload.destinationHint"),variant:"error"});return}on(()=>import("./dialog-project-upload-CQETR8DT.js"),__vite__mapDeps([0,1,2])).then(o=>{v.show(()=>e(o.DialogProjectUpload,{directory:t}))})}function Lt(t){if(d()!==t.id)return;const o=W();if(!o){u("/workspace");return}u(fe(o))}function ot(t,o){const[,g]=l.child(t,{bootstrap:!1});g(ut(R=>{const k=Gn.search(R.session,o,ee=>ee.id);if(!k.found)return;const B=R.session[k.index];R.session.splice(k.index,1),B&&!B.parentID&&(R.sessionTotal=Math.max(0,R.sessionTotal-1))}))}async function Pt(t){ot(t.directory,t.id),Lt(t),await c.client.session.update({directory:t.directory,sessionID:t.id,time:{archived:Date.now()}}).then(()=>!0).catch(g=>(ce({title:n.t("common.archive"),description:tt(g,n.t("common.requestFailed"))}),!1))||l.project.loadSessions(t.directory)}async function pn(t){return await c.client.session.delete({sessionID:t.id,directory:t.directory}).then(g=>g.data).catch(g=>(ce({title:n.t("session.delete.failed.title"),description:tt(g,n.t("common.requestFailed"))}),!1))?(ot(t.directory,t.id),Lt(t),!0):!1}function Dt(t){const o=at(t);v.show(()=>e(dt,{get title(){return n.t("session.delete.title")},fit:!0,get children(){var g=gt(),R=g.firstChild,k=R.nextSibling;return i(R,()=>n.t("session.delete.confirm",{name:o})),i(k,e(De,{variant:"ghost",size:"large",onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(k,e(De,{variant:"primary",size:"large",onClick:()=>{pn(t).then(B=>{B&&v.close()})},get children(){return n.t("session.delete.button")}}),null),g}}))}function Et(t){const[o]=l.child(t,{bootstrap:!1});return lt(o,Date.now(),t).map(g=>({session:g,directory:t}))}function at(t){const[o]=l.child(t.directory,{bootstrap:!1});return Bn({title:t.title,fallbackText:qn(t.id,o.message,o.part),emptyLabel:n.t("command.session.new")})}function jt(t,o){if(le(t.directory)===le(o))return;if(!ke(te(),t.directory)){ce({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}if(ke(te(),o)){ce({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}const g=Ne({worktree:o});v.show(()=>e(dt,{get title(){return n.t("session.move.confirm.title")},fit:!0,get children(){var R=gt(),k=R.firstChild,B=k.nextSibling;return i(k,()=>n.t("session.move.confirm.description",{project:g})),i(B,e(De,{variant:"ghost",size:"large",onClick:()=>v.close(),get children(){return n.t("common.cancel")}}),null),i(B,e(De,{variant:"primary",size:"large",onClick:()=>{vn(t,o).then(ee=>{ee&&v.close()})},get children(){return n.t("session.move.confirm.action")}}),null),R}}))}async function vn(t,o){const g=t.directory;return await c.client.session.update({directory:t.directory,sessionID:t.id,moveTo:o}).then(()=>!0).catch(k=>(ce({title:n.t("session.move.failed.title"),description:tt(k,n.t("common.requestFailed"))}),!1))?(ot(g,t.id),p.projects.open(o),x.projects.touchCode(o),l.project.loadSessions(g),l.project.loadSessions(o),d()===t.id?(u(fe(o,t.id)),!0):(ce({title:n.t("session.move.success.title"),description:n.t("session.move.success.description",{project:Ne({worktree:o})})}),!0)):!1}function bn(){v.show(()=>e(Un,{tab:"account"}))}return(()=>{var t=es(),o=t.firstChild,g=o.nextSibling,R=g.firstChild,k=R.firstChild,B=k.nextSibling,ee=B.firstChild,ue=ee.firstChild,xe=ue.nextSibling,Q=xe.firstChild,Ae=ee.nextSibling,Mt=B.nextSibling,Rt=Mt.firstChild,wn=Rt.firstChild,$n=wn.nextSibling,It=$n.firstChild,_n=Rt.nextSibling,yn=g.nextSibling,At=yn.firstChild,Ot=At.firstChild;return Mn(o,Rn(()=>S.platform==="desktop"?{"data-tauri-drag-region":!0}:{}),!1,!0),i(o,e(pe,{get href(){return On(S.platform)},class:"os-sidebar-brand-link",get children(){return[e(In,{class:"os-sidebar-brand-mark"}),(()=>{var D=Ir();return i(D,()=>An(S.platform)),D})()]}})),i(k,e(pe,{get href(){return zn()},class:"os-sidebar-link",get classList(){return{"is-active":V()}},get children(){return[Ar(),Or()]}}),null),i(k,e(pe,{get href(){return f()},class:"os-sidebar-link",get classList(){return{"is-active":j()}},get children(){return[zr(),Fr()]}}),null),i(k,e(pe,{get href(){return Fn()},class:"os-sidebar-link",get classList(){return{"is-active":N()}},get children(){return[Nr(),Kr()]}}),null),i(k,e(pe,{get href(){return Nn()},class:"os-sidebar-link",get classList(){return{"is-active":y()}},get children(){return[Tr(),Wr()]}}),null),Q.$$click=Pe,i(Ae,e(_,{get when(){return be(()=>!!L())()&&re().length>0},get fallback(){return e(_,{get when(){return L()},get children(){return ts()}})},get children(){return e(Ce,{get each(){return re().map(D=>D.worktree)},children:D=>{const G=()=>re().find(oe=>oe.worktree===D);return e(_,{get when(){return G()},children:oe=>(()=>{var ae=rs(),q=ae.firstChild;return i(q,e(pe,{get href(){return fe(D)},class:"os-client-project-item",get classList(){return{"is-active":C(oe())}},onClick:m=>{m.metaKey||m.ctrlKey||m.shiftKey||m.altKey||(m.preventDefault(),we(D))},get children(){return Ne(oe())}}),null),i(q,e(pt,{menuKey:`project:${D}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-project-more",get label(){return n.t("common.moreOptions")},get children(){return[e(O.Item,{"data-action":"project-new-session",class:"os-client-session-menu-item",onSelect:()=>Ye(D),get children(){return[e(he,{name:"new-session",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.session.new")}})]}}),e(_,{get when(){return Ie(D)},get children(){return e(O.Item,{"data-action":"project-upload",class:"os-client-session-menu-item",onSelect:()=>fn(D),get children(){return[e(he,{name:"cloud-upload",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.project.upload")}})]}})}}),e(O.Item,{"data-action":"project-rename",class:"os-client-session-menu-item",onSelect:()=>{const m=G();m&&qe(m)},get children(){return[e(he,{name:"edit",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("common.rename")}})]}}),e(O.Separator,{class:"os-client-session-menu-separator"}),e(O.Item,{"data-action":"project-remove-from-view",class:"os-client-session-menu-item",onSelect:()=>{const m=G();m&&Ue(m)},get children(){return[e(he,{name:"close-small",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.removeFromView")}})]}}),e(O.Item,{"data-action":"project-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>{const m=G();m&&Qe(m)},get children(){return[e(he,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(O.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.delete")}})]}})]}}),null),i(ae,e(_,{get when(){return C(oe())},get children(){var m=ns();return i(m,e(Ce,{get each(){return Et(D).map(U=>U.session.id)},children:U=>{const $e=()=>Et(D).find(ye=>ye.session.id===U);return e(_,{get when(){return $e()},children:ye=>(()=>{var Oe=Yt();return i(Oe,e(pe,{get href(){return fe(ye().directory,U)},class:"os-client-task-item",get classList(){return{"is-active":d()===U}},"data-session-id":U,get children(){var me=mt(),et=me.firstChild;return i(et,()=>at(ye().session)),me}}),null),i(Oe,e(pt,{menuKey:`session:${U}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Jt,{get currentDirectory(){return ye().directory},projects:re,onArchive:()=>void Pt(ye().session),onDelete:()=>Dt(ye().session),onMove:me=>jt(ye().session,me),onNewProject:Pe})}}),null),X(me=>{var et=d()===U,zt=M()===`session:${U}`;return et!==me.e&&Oe.classList.toggle("is-active",me.e=et),zt!==me.t&&Oe.classList.toggle("is-menu-open",me.t=zt),me},{e:void 0,t:void 0}),Oe})()})}})),m}}),null),X(m=>{var U=!!C(oe()),$e=M()===`project:${D}`;return U!==m.e&&q.classList.toggle("is-active",m.e=U),$e!==m.t&&q.classList.toggle("is-menu-open",m.t=$e),m},{e:void 0,t:void 0}),ae})()})}})}})),i(B,e(_,{get when(){return!L()},get children(){return Hr()}}),null),It.$$click=Je,i(_n,e(_,{get when(){return be(()=>!!L())()&&w().length>0},get fallback(){return e(_,{get when(){return L()},get children(){return ss()}})},get children(){return[(()=>{var D=Br();return i(D,e(Ce,{get each(){return s().map(G=>G.session.id)},children:G=>{const oe=()=>s().find(ae=>ae.session.id===G);return e(_,{get when(){return oe()},children:ae=>(()=>{var q=Yt();return i(q,e(pe,{get href(){return fe(ae().directory,G)},class:"os-client-task-item",get classList(){return{"is-active":d()===G}},"data-session-id":G,get children(){var m=mt(),U=m.firstChild;return i(U,()=>at(ae().session)),m}}),null),i(q,e(pt,{menuKey:`recent:${G}`,openKey:M,setOpenKey:Se,openedAt:ge,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Jt,{get currentDirectory(){return ae().directory},projects:re,onArchive:()=>void Pt(ae().session),onDelete:()=>Dt(ae().session),onMove:m=>jt(ae().session,m),onNewProject:Pe})}}),null),X(m=>{var U=d()===G,$e=M()===`recent:${G}`;return U!==m.e&&q.classList.toggle("is-active",m.e=U),$e!==m.t&&q.classList.toggle("is-menu-open",m.t=$e),m},{e:void 0,t:void 0}),q})()})}})),X(()=>F(D,"data-expanded",T()?"true":"false")),D})(),e(_,{get when(){return P()},get children(){var D=qr();return D.$$click=()=>A(!0),D}}),e(_,{get when(){return H()},get children(){var D=Ur();return D.$$click=()=>A(!1),D}})]}})),i(Mt,e(_,{get when(){return!L()},get children(){return Vr()}}),null),i(g,e(_,{get when(){return I()},get children(){var D=Zr(),G=D.firstChild,oe=G.firstChild,ae=oe.nextSibling;return G.$$click=()=>Y(q=>!q),i(ae,()=>n.t("sidebar.section.sharedCases")),i(D,e(_,{get when(){return J()},get children(){var q=Qr();return i(q,e(_,{get when(){return Re().length>0},get fallback(){return is()},get children(){return e(Ce,{get each(){return Re()},children:m=>e(pe,{get href(){return fe(I(),m.id)},class:"os-client-task-item",get classList(){return{"is-active":d()===m.id}},get"data-session-id"(){return m.id},get children(){var U=mt(),$e=U.firstChild;return i($e,()=>Kn(m.title)??m.id),U}})})}}),null),i(q,e(_,{get when(){return We()},get children(){var m=Xr();return m.$$click=()=>de(!0),m}}),null),i(q,e(_,{get when(){return He()},get children(){var m=Gr();return m.$$click=()=>de(!1),m}}),null),q}}),null),X(q=>{var m=J(),U=J()?"true":"false";return m!==q.e&&F(G,"aria-expanded",q.e=m),U!==q.t&&F(oe,"data-open",q.t=U),q},{e:void 0,t:void 0}),D}}),null),i(At,e(pe,{get href(){return Tn()},class:"os-sidebar-footer-action",get classList(){return{"is-active":b()}},get children(){return[Jr(),Yr()]}}),Ot),Ot.$$click=bn,X(D=>{var G=!L(),oe=!L();return G!==D.e&&Q.classList.toggle("is-muted",D.e=G),oe!==D.t&&It.classList.toggle("is-muted",D.t=oe),D},{e:void 0,t:void 0}),t})()}Me(["pointerdown","pointerup","click"]);var as=a('<pre class="os-client-right-files-preview whitespace-pre-wrap break-all p-3 text-12-regular m-0">'),ls=a("<button type=button class=os-client-right-files-back>← 返回目录"),cs=a("<span class=os-client-right-files-title>"),ds=a("<button type=button>"),us=a("<div class=os-client-right-files-actions><button type=button>关闭"),hs=a("<p class=os-client-right-files-hint>SSH 未连接,目录显示远端路径。请先在项目栏连接远端。"),gs=a("<p class=os-client-right-files-hint>正在加载目录…"),ms=a("<p class=os-client-right-files-hint>该目录为空"),fs=a("<div class=os-client-right-files-tree-scroll>"),ps=a("<div class=os-client-right-files-tree><p class=os-client-right-files-root>"),vs=a("<div class=os-client-right-files-unsaved>"),bs=a("<p class=os-client-right-files-hint>…"),ws=a("<textarea class=os-client-right-files-textarea autocapitalize=off autocomplete=off autocorrect=off>"),$s=a("<pre class=os-client-right-files-preview>"),_s=a("<div class=os-client-right-files-editor>"),ys=a("<section class=os-client-right-files><header class=os-client-right-files-header>"),ks=a("<strong>目录"),Ss=a("<div class=os-client-right-files-actions><button type=button aria-label=刷新>刷新</button><button type=button>关闭"),xs=a("<p class=os-client-right-files-hint>加载失败:"),Cs=a("<p class=os-client-right-files-hint>");function Ls(r){const u=r.replace(/\\/g,"/").split("/");return u[u.length-1]||r}function Ps(r){const u=er(),n=tr(),p=Te(),[l,c]=K("tree"),[S,x]=K(),[v,E]=K(""),[z,L]=K(!1),[V,f]=K(!1),[j,N]=K(0);let y;const b=$(()=>u.tree.state("")),J=$(()=>u.tree.children("")),Y=$(()=>nr(S())),ne=$(()=>{Ht(),Bt();const d=n.directory;return d?rr(d):!1}),de=$(()=>{Ht(),Bt();const d=n.directory;return d&&sr(d).kind==="ssh"?ln(d)?.remotePath?.trim()||"未连接远端":d}),T=(d=!1)=>{!n.directory||ne()||(d?u.tree.refresh(""):u.tree.list(""))};je(()=>{queueMicrotask(()=>T(!0))}),Z(()=>{if(!n.directory||l()!=="tree"||ne())return;const C=b();C?.loading||C?.loaded||C?.error||u.tree.list("")}),Z($t(()=>cn(n.directory)??"",()=>{l()==="tree"&&T(!0)}));const A=$(()=>{const d=S();if(d)return u.get(d)}),M=$(()=>A()?.content?.content??""),se=$(()=>!!A()?.loaded),ie=$(()=>!!A()?.loading),Se=$(()=>A()?.error),ge=$(()=>{const d=A();return!(!d?.loaded||d.content?.type!=="text"||d.content.encoding==="base64"||qt(S()))}),Le=$(()=>ge()&&Y()==="text"),re=$(()=>{if(!(!ge()||Le()))return{draft:v,setDraft:d=>{E(d),L(!0)},textareaRef:d=>{y=d},class:"os-client-right-files-textarea"}}),h=d=>(()=>{var C=as();return i(C,d),C})();Z(()=>{const d=S();d&&u.load(d)}),Z($t(S,()=>{L(!1),E(se()?M():""),N(0)},{defer:!1})),Z(()=>{!se()||z()||E(M())});const I=async()=>{const d=S();if(!(!d||V()||!z()||!ge())){f(!0);try{await u.write(d,v()),L(!1),Ut(d)&&N(C=>C+1)}finally{f(!1)}}};Z(()=>{if(typeof window>"u")return;ir(window,"keydown",C=>{!(C.metaKey||C.ctrlKey)||C.key.toLowerCase()!=="s"||!y?.contains(document.activeElement)&&document.activeElement!==y||(C.preventDefault(),I())})});const W=d=>{x(d),c("editor")};return(()=>{var d=ys(),C=d.firstChild;return i(C,e(_,{get when(){return l()==="editor"},get fallback(){return[ks(),(()=>{var w=Ss(),s=w.firstChild,P=s.nextSibling;return s.$$click=()=>{T(!0),u.tree.refreshAll()},_t(P,"click",r.onClose,!0),w})()]},get children(){return[(()=>{var w=ls();return w.$$click=()=>c("tree"),w})(),(()=>{var w=cs();return i(w,(()=>{var s=be(()=>!!S());return()=>s()?Ls(S()):""})()),X(()=>F(w,"title",S())),w})(),(()=>{var w=us(),s=w.firstChild;return i(w,e(_,{get when(){return ge()},get children(){var P=ds();return P.$$click=()=>void I(),i(P,(()=>{var H=be(()=>!!V());return()=>H()?p.t("common.saving"):p.t("common.save")})()),X(()=>P.disabled=!z()||V()),P}}),s),_t(s,"click",r.onClose,!0),w})()]}})),i(d,e(_,{get when(){return l()==="tree"},get children(){var w=ps(),s=w.firstChild;return i(s,de),i(w,e(_,{get when(){return ne()},get children(){return hs()}}),null),i(w,e(_,{get when(){return be(()=>!!(!ne()&&b()?.loading))()&&J().length===0},get children(){return gs()}}),null),i(w,e(_,{get when(){return be(()=>!ne())()&&b()?.error},children:P=>(()=>{var H=xs();return H.firstChild,i(H,P,null),H})()}),null),i(w,e(_,{get when(){return be(()=>!!(!ne()&&b()?.loaded&&J().length===0))()&&!b()?.error},get children(){return ms()}}),null),i(w,e(_,{get when(){return!ne()},get children(){var P=fs();return i(P,e(or,{path:"",class:"os-client-right-file-tree",nodeClass:"os-client-right-file-node",get active(){return S()},draggable:!1,onFileClick:H=>W(H.path)})),P}}),null),X(()=>F(s,"title",de())),w}}),null),i(d,e(_,{get when(){return l()==="editor"},get children(){var w=_s();return i(w,e(_,{get when(){return z()},get children(){var s=vs();return i(s,()=>p.t("session.file.unsaved")),s}}),null),i(w,e(_,{get when(){return be(()=>!!ie())()&&!se()},get children(){var s=bs(),P=s.firstChild;return i(s,()=>p.t("common.loading"),P),s}}),null),i(w,e(_,{get when(){return Se()},children:s=>(()=>{var P=Cs();return i(P,s),P})()}),null),i(w,e(_,{get when(){return se()},get children(){return e(dn,{get children(){return[e(ve,{get when(){return Ut(S())},get children(){return e(ar,{path:S,contents:M,renderSource:h,get editSource(){return re()},previewRevision:j,chrome:"workbench"})}}),e(ve,{get when(){return Y()==="markdown"},get children(){return e(lr,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return Y()==="csv"},get children(){return e(cr,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return qt(S())},get children(){return e(dr,{path:S,chrome:"workbench"})}}),e(ve,{get when(){return hr(S())},get children(){return e(ur,{path:S,contents:M,renderSource:h,get editSource(){return re()},chrome:"workbench"})}}),e(ve,{get when(){return Le()},get children(){var s=ws();s.$$input=H=>{E(H.currentTarget.value),L(!0)};var P=y;return typeof P=="function"?Ke(P,s):y=s,F(s,"spellcheck",!1),X(()=>s.value=v()),s}}),e(ve,{when:!0,get children(){var s=$s();return i(s,()=>M()||"(二进制或不支持预览的文件)"),s}})]}})}}),null),w}}),null),X(()=>F(d,"data-view",l())),d})()}Me(["click","input"]);var Ds=a('<svg viewBox="0 0 12 12"width=12 height=12 fill=currentColor aria-hidden=true><circle cx=6 cy=6 r=3 class=os-client-right-todo-pulse>'),Es=a("<ul class=os-client-right-todo-list>"),js=a("<span class=os-client-right-todo-text>"),Ms=a('<li class="os-client-right-todo-item is-clickable"role=button tabindex=0>'),Rs=a("<p class=os-client-right-todo-progress>已完成 <!> / "),Is=a("<section class=os-client-right-todo><header class=os-client-right-todo-header><strong></strong><button type=button>关闭"),As=a("<p class=os-client-right-todo-empty>暂无场景工作流。从能力中心场景创建任务后,步骤会显示在这里。"),Os=a("<span class=os-client-right-todo-stop> · ");function zs(r){return r==="completed"?"completed":r==="in_progress"?"in_progress":r==="failed"?"cancelled":"pending"}function Fs(r){if(r==="in_progress")return Ds()}function Ns(r,u){return u?"confirm":r==="pending"?"edit":r==="completed"||r==="failed"||r==="in_progress"?"rerun":"view"}function Ks(r){return(()=>{var u=Es();return i(u,e(Ce,{get each(){return r.items},children:n=>(()=>{var p=Ms();return p.$$keydown=l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r.onOpen(n.index))},p.$$click=()=>r.onOpen(n.index),i(p,e(gr,{readOnly:!0,get checked(){return n.status==="completed"},get indeterminate(){return n.status==="in_progress"},get icon(){return Fs(n.status)},get children(){var l=js();return i(l,()=>n.content),X(c=>{var S=n.status==="completed"||n.status==="cancelled",x=n.status==="pending";return S!==c.e&&l.classList.toggle("is-done",c.e=S),x!==c.t&&l.classList.toggle("is-pending",c.t=x),c},{e:void 0,t:void 0}),l}})),X(()=>F(p,"data-state",n.status)),p})()})),u})()}function Ts(r){const u=St();un();const n=$(()=>yt(r.directoryKey,r.sessionID)??Vt(r.directoryKey)),p=$(()=>{const x=n();return x?.steps.length?x.steps.map((v,E)=>({content:v.name,status:zs(v.status),index:E})):[]}),l=$(()=>p().filter(x=>x.status==="completed").length),c=$(()=>n()?.title||"待办"),S=x=>{const v=yt(r.directoryKey,r.sessionID)??Vt(r.directoryKey);if(!v)return;const E=v.steps[x];if(!E)return;const z=mr(v,x),L=E.status==="pending"&&v.phase==="awaiting_confirm"&&v.currentIndex===x,V=Ns(E.status,L),f=E.status==="in_progress",j=V==="confirm"?"确认下一步参数":V==="edit"?"编辑步骤参数":f?"终止并重新执行":V==="rerun"?"从此步重新执行":"查看步骤参数",N=r.directoryKey;u.show(()=>e(pr,{title:j,get stepName(){return E.name},fields:z,get values(){return v.values},mode:V,get firstDecision(){return L&&v.confirmMode==="unset"},aborting:f,rerunActionLabel:f?"终止并重新执行":"从此步重新执行",get reason(){return V==="confirm"?`下一步「${E.name}」可按需调整参数,确认后将自动发送并执行。`:V==="edit"?`可修改「${E.name}」的预填参数,保存后在执行该步时生效。`:f?`将停止自动续跑并从「${E.name}」重发。已提交的外部作业需自行取消;可先修改参数再确认。`:V==="rerun"?`可修改「${E.name}」参数。确认后将从该步重新执行,并重置后续步骤状态。`:`「${E.name}」当前为只读,展示该步相关参数。`},canContinue:L,onSave:y=>{Xt(N,y),ce({title:"已保存步骤参数"})},onConfirm:y=>{const b=Gt(N,y);b&&(ht(N,b),ce({title:y.mode==="auto"?`连续执行:${b.stepName}`:`继续执行:${b.stepName}`}))},onSaveAndContinue:y=>{Xt(N,y.values);const b=Gt(N,y);b&&(ht(N,b),ce({title:y.mode==="auto"?`连续执行:${b.stepName}`:`继续执行:${b.stepName}`}))},onRerun:y=>{const b=fr(N,{stepIndex:x,values:y});b&&(ht(N,b),ce({title:f?`已终止并从该步重跑:${b.stepName}`:`已从该步重新执行:${b.stepName}`}))}}))};return(()=>{var x=Is(),v=x.firstChild,E=v.firstChild,z=E.nextSibling;return i(E,c),_t(z,"click",r.onClose,!0),i(x,e(_,{get when(){return p().length>0},get fallback(){return As()},get children(){return[(()=>{var L=Rs(),V=L.firstChild,f=V.nextSibling;return f.nextSibling,i(L,l,f),i(L,()=>p().length,null),i(L,e(_,{get when(){return n()?.stopReason},children:j=>(()=>{var N=Os();return N.firstChild,i(N,j,null),N})()}),null),L})(),e(Ks,{get items(){return p()},onOpen:S})]}}),null),X(()=>F(E,"title",c())),x})()}Me(["click","keydown"]);var Ws=a("<div class=os-client-right-add-dropdown role=menu>"),Hs=a('<aside class="os-client-right-sidebar os-client-right-dock"><div class=os-client-right-toolbar><div class=os-client-right-add-menu><button type=button class=os-client-right-add-button aria-label=打开页面><span class=os-client-right-add-icon aria-hidden=true></span></button></div></div><div class=os-client-right-dock-body>'),Bs=a("<button type=button role=menuitem>"),qs=a("<section class=os-client-right-empty><strong>尚未打开页面</strong><p>点击 + 打开目录、可视化组件或待办;在会话中可从目录点文件到右侧编辑。"),Us=a("<section class=os-client-right-pane-stub><header><strong>可视化组件</strong><button type=button>关闭</button></header><p>请从「目录」中打开 `.html` / `.md` / `.csv` / `.pdf` / `.xyz` 文件查看可视化预览;后续版本将提供独立可视化入口。"),Vs=a("<section class=os-client-right-pane-stub><header><strong>目录</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看目录。"),Xs=a("<section class=os-client-right-pane-stub><header><strong>待办</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看待办。");const Gs=[{id:"directory",label:"目录"},{id:"viz",label:"可视化组件"},{id:"todo",label:"待办"}];function Qs(){const r=it(),u=mn(),[n,p]=K(!1),[l,c]=K();let S;const x=$(()=>hn(r.pathname)),v=$(()=>{const y=x()?.dir;return y?xt(y)??"":""}),E=$(()=>Ct(r.pathname)&&!!v()),z=$(()=>v()||u()),L=$(()=>x()?.dir||(z()?wt(z()):"")),V=$(()=>!!z()&&!!L()),f=$(()=>{un();const y=x()?.dir;if(!y)return!1;const b=yt(y,x()?.id);return b?b.phase!=="done"&&b.phase!=="stopped":!1});je(()=>{const y=b=>{n()&&(S?.contains(b.target)||p(!1))};document.addEventListener("pointerdown",y),Ee(()=>document.removeEventListener("pointerdown",y))}),Z(y=>{const b=E();return b&&!y&&!l()&&c("directory"),b}),Z(()=>{if(!gn())return;const b=vr();b&&(c(b),p(!1))});const j=y=>{c(y),p(!1)},N=()=>{if(f()&&l()!=="todo"){c("todo");return}c(void 0)};return(()=>{var y=Hs(),b=y.firstChild,J=b.firstChild,Y=J.firstChild,ne=b.nextSibling,de=S;return typeof de=="function"?Ke(de,b):S=b,Y.$$click=()=>p(T=>!T),i(J,e(_,{get when(){return n()},get children(){var T=Ws();return i(T,e(Ce,{get each(){return[...Gs]},children:A=>(()=>{var M=Bs();return M.$$click=()=>j(A.id),i(M,()=>A.label),M})()})),T}}),null),i(ne,e(_,{get when(){return l()},get fallback(){return qs()},children:T=>e(dn,{get children(){return[e(ve,{get when(){return T()==="directory"},get children(){return e(_,{get when(){return V()},get fallback(){return(()=>{var A=Vs(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=N,A})()},get children(){return e(br,{params:()=>({dir:L(),id:x()?.id}),get children(){return e(wr,{directory:()=>z(),get children(){return e($r,{get children(){return e(_r,{get children(){return e(Ps,{onClose:N})}})}})}})}})}})}}),e(ve,{get when(){return T()==="todo"},get children(){return e(_,{get when(){return x()?.dir},get fallback(){return(()=>{var A=Xs(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=()=>c(void 0),A})()},children:A=>e(Ts,{get directoryKey(){return A()},get sessionID(){return x()?.id},onClose:()=>c(void 0)})})}}),e(ve,{get when(){return T()==="viz"},get children(){var A=Us(),M=A.firstChild,se=M.firstChild,ie=se.nextSibling;return ie.$$click=N,A}})]}})})),X(T=>{var A=!!n(),M=n();return A!==T.e&&Y.classList.toggle("is-open",T.e=A),M!==T.t&&F(Y,"aria-expanded",T.t=M),T},{e:void 0,t:void 0}),y})()}Me(["click"]);var Zs=a('<button type=button class="os-client-panel-toggle os-client-terminal-toggle"aria-controls=terminal-panel>'),Js=a('<svg class=os-client-pane-toggle-icon viewBox="0 0 24 24"aria-hidden=true><rect x=4.5 y=5.5 width=15 height=13 rx=1.35 fill=none stroke=currentColor stroke-width=1.4></rect><path d="M8 10.25l2.4 2.25L8 14.75M12.25 14.75H16"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round stroke-linejoin=round>');function Ys(){const r=it(),u=kt(),n=Te(),p=yr(),l=St(),[c,S]=K(te()),x=mn(),v=$(()=>sn(r.pathname)||Ct(r.pathname)),E=$(()=>!v()||kr()&&!c()?!1:u.terminal.enabled()?!0:Qt(c())),z=$(()=>u.view("workbench").terminal.opened()),L=$(()=>{const f=hn(r.pathname);return f?.dir?xt(f.dir)??"":x()});je(()=>{const f=()=>S(te());window.addEventListener(st,f),window.addEventListener(rt,f),window.addEventListener("storage",f),Ee(()=>{window.removeEventListener(st,f),window.removeEventListener(rt,f),window.removeEventListener("storage",f)})}),Z(()=>{E()&&Zt()}),Z($t(v,(f,j)=>{j===void 0||f||!j||z()&&(u.view("workbench").terminal.close(),u.terminal.closeFullscreen())}));const V=()=>{if(Qt(c())||!u.terminal.enabled()){on(()=>import("./dialog-terminal-unavailable-BJHx-DqW.js"),__vite__mapDeps([3,1,2])).then(f=>{l.show(()=>e(f.DialogTerminalUnavailable,{}))});return}if(!z()){const f=L();if(f&&!cn(f)&&!an(c(),f))return;Zt()}u.view("workbench").terminal.toggle()};return e(_,{get when(){return E()},get children(){var f=Zs();return f.$$click=j=>j.preventDefault(),f.$$pointerdown=j=>{j.button===0&&(j.preventDefault(),V())},i(f,e(ei,{get active(){return z()}})),X(j=>{var N=!!z(),y=n.t("command.terminal.toggle"),b=n.t("command.terminal.toggle"),J=z(),Y=`${n.t("command.terminal.toggle")} (${p.keybind("terminal.toggle")})`;return N!==j.e&&f.classList.toggle("is-active",j.e=N),y!==j.t&&F(f,"data-tooltip",j.t=y),b!==j.a&&F(f,"aria-label",j.a=b),J!==j.o&&F(f,"aria-expanded",j.o=J),Y!==j.i&&F(f,"title",j.i=Y),j},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),f}})}function ei(r){return(()=>{var u=Js(),n=u.firstChild,p=n.nextSibling;return X(()=>F(p,"opacity",r.active?1:.85)),u})()}Me(["pointerdown","click"]);var ti=a('<svg class=os-client-pane-toggle-icon viewBox="0 0 24 24"aria-hidden=true><rect class=os-client-pane-toggle-icon-main x=4.5 y=5.5 width=7.7 height=13 rx=1.35></rect><rect class=os-client-pane-toggle-icon-divider x=12.15 y=5.5 width=1.15 height=13 rx=0.55></rect><rect class=os-client-pane-toggle-icon-side x=14.05 y=5.5 width=5.45 height=13 rx=1.35>'),ni=a('<div class="os-client-pane-resizer os-client-pane-resizer-sidebar"role=separator aria-orientation=vertical aria-label=调整左边栏宽度 aria-valuemin=230 aria-valuemax=430 tabindex=0>'),ri=a('<div class="os-client-pane-resizer os-client-pane-resizer-tool"role=separator aria-orientation=vertical aria-label=调整右边栏宽度 aria-valuemin=200 aria-valuemax=1280 tabindex=0>'),si=a("<main class=os-client-workbench><div class=os-client-workbench-chrome><button type=button class=os-client-panel-toggle></button><button type=button class=os-client-panel-toggle></button></div><section class=os-workspace-main></section><div class=os-client-terminal-dock>");const Fe=320,ii=230,oi=430,ai=200,nn=1280;function rn(r){return(()=>{var u=ti();return X(n=>{var p=r.side,l=r.open?"true":"false";return p!==n.e&&F(u,"data-side",n.e=p),l!==n.t&&F(u,"data-open",n.t=l),n},{e:void 0,t:void 0}),u})()}function vt(r){return Math.min(oi,Math.max(ii,Math.round(r)))}function bt(r){const u=typeof window>"u"?nn:Math.min(nn,Math.floor(window.innerWidth*.85));return Math.min(u,Math.max(ai,Math.round(r)))}function hi(r){const u=kt(),n=it(),[p,l]=K(!0),[c,S]=K(!1),[x,v]=K(Fe),[E,z]=K(Fe),[L,V]=K(!1),[f,j]=K(!1),[N,y]=K(0),[b,J]=K({left:0,right:0}),[Y,ne]=K(),[de,T]=K(),A=$(()=>u.view("workbench").terminal.opened()),M=()=>A(),se=$(()=>{if(!A())return 0;const h=N();return h>0?h:u.terminal.height()}),ie=()=>{const h=Y();if(!h)return;const I=h.querySelector(":scope > .os-workspace-main");if(!I)return;const W=h.getBoundingClientRect(),d=getComputedStyle(h),C=W.left+(parseFloat(d.borderLeftWidth)||0),w=W.right-(parseFloat(d.borderRightWidth)||0),s=I.getBoundingClientRect(),H=h.querySelector(":scope > .os-client-right-sidebar")?.getBoundingClientRect()??s;J({left:Math.max(0,Math.round(s.left-C)),right:Math.max(0,Math.round(w-H.right))})},Se=()=>{l(h=>(h||v(Fe),!h))},ge=()=>{S(h=>(h||(z(Fe),Ct(n.pathname)&&Sr("directory")),!h))};Z(()=>{gn()&&(S(!0),z(I=>I>0?I:Fe))});const Le=h=>{if(h.button!==0)return;h.preventDefault();const I=h.clientX,W=x();V(!0);const d=w=>{v(vt(W+(w.clientX-I)))},C=()=>{V(!1),window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C)},re=h=>{if(h.button!==0)return;h.preventDefault();const I=h.clientX,W=E();j(!0);const d=w=>{z(bt(W+(I-w.clientX)))},C=()=>{j(!1),window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C)};return Z(()=>{const h=de();if(!h||typeof ResizeObserver>"u")return;const I=()=>{const d=h.querySelector("#terminal-panel");y(d?Math.round(d.getBoundingClientRect().height):0)};I();const W=new ResizeObserver(I);W.observe(h),Ee(()=>W.disconnect())}),Z(()=>{A()||y(0)}),je(()=>{u.view("workbench").terminal.close(),u.terminal.closeFullscreen(),y(0)}),Z(()=>{p(),c(),x(),E(),L(),f(),M(),Y(),ie();const h=requestAnimationFrame(ie);Ee(()=>cancelAnimationFrame(h))}),Z(()=>{const h=Y();if(!h||typeof ResizeObserver>"u")return;const I=new ResizeObserver(()=>ie());I.observe(h);const W=h.querySelector(":scope > .os-workspace-main");W&&I.observe(W);const d=h.querySelector(":scope > .os-client-right-sidebar");d&&I.observe(d),Ee(()=>I.disconnect())}),(()=>{var h=si(),I=h.firstChild,W=I.firstChild,d=W.nextSibling,C=I.nextSibling,w=C.nextSibling;return Ke(ne,h),W.$$click=Se,i(W,e(rn,{side:"left",get open(){return p()}})),i(I,e(Ys,{}),d),d.$$click=ge,i(d,e(rn,{side:"right",get open(){return c()}})),i(h,e(_,{get when(){return p()},get children(){return[e(os,{}),(()=>{var s=ni();return s.$$keydown=P=>{if(P.key==="ArrowLeft"){P.preventDefault(),v(H=>vt(H-16));return}P.key==="ArrowRight"&&(P.preventDefault(),v(H=>vt(H+16)))},s.$$pointerdown=Le,X(()=>F(s,"aria-valuenow",x())),s})()]}}),C),i(C,()=>r.children),i(h,e(_,{get when(){return c()},get children(){return[(()=>{var s=ri();return s.$$keydown=P=>{if(P.key==="ArrowLeft"){P.preventDefault(),z(H=>bt(H+16));return}P.key==="ArrowRight"&&(P.preventDefault(),z(H=>bt(H-16)))},s.$$pointerdown=re,X(()=>F(s,"aria-valuenow",E())),s})(),e(Qs,{})]}}),w),Ke(T,w),F(w,"id",xr),X(s=>{var P=!!p(),H=!!c(),_e=!!L(),Re=!!f(),We=!!M(),He=!!(u.terminal.fullscreen()&&u.view("workbench").terminal.opened()),we=`${x()}px`,Be=`${E()}px`,qe=`${se()}px`,Ue=`${b().left}px`,Ve=`${b().right}px`,Xe=!!p(),Ge=p()?"关闭左侧栏":"打开左侧栏",Qe=p()?"关闭左侧栏":"打开左侧栏",Ze=!!c(),Pe=c()?"关闭右侧栏":"打开右侧栏",Je=c()?"关闭右侧栏":"打开右侧栏",Ye=!!M(),Ie=!M();return P!==s.e&&h.classList.toggle("has-left-sidebar",s.e=P),H!==s.t&&h.classList.toggle("has-right-sidebar",s.t=H),_e!==s.a&&h.classList.toggle("is-resizing-left",s.a=_e),Re!==s.o&&h.classList.toggle("is-resizing-right",s.o=Re),We!==s.i&&h.classList.toggle("has-terminal-open",s.i=We),He!==s.n&&h.classList.toggle("has-terminal-fullscreen",s.n=He),we!==s.s&&ze(h,"--os-client-sidebar-w",s.s=we),Be!==s.h&&ze(h,"--os-client-tool-w",s.h=Be),qe!==s.r&&ze(h,"--os-client-terminal-h",s.r=qe),Ue!==s.d&&ze(h,"--os-client-terminal-left",s.d=Ue),Ve!==s.l&&ze(h,"--os-client-terminal-right",s.l=Ve),Xe!==s.u&&W.classList.toggle("is-active",s.u=Xe),Ge!==s.c&&F(W,"data-tooltip",s.c=Ge),Qe!==s.w&&F(W,"aria-label",s.w=Qe),Ze!==s.m&&d.classList.toggle("is-active",s.m=Ze),Pe!==s.f&&F(d,"data-tooltip",s.f=Pe),Je!==s.y&&F(d,"aria-label",s.y=Je),Ye!==s.g&&w.classList.toggle("is-open",s.g=Ye),Ie!==s.p&&F(w,"aria-hidden",s.p=Ie),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0}),h})()}Me(["click","pointerdown","keydown"]);export{hi as WorkbenchShell};
@@ -1 +1 @@
1
- import{e as j,f as D,l as I,n as E,o as g,q as X,i as a,c as o,t as v,dW as u,b as z,s as _,bp as H,z as N,r as y,v as C,w as L,x as O,R as Y,U as x,S as B,W as G,Y as J,F as K,X as Q,dX as V}from"./index-ClzL6bnc.js";var Z=v("<p class=os-client-skills-login-hint>登录后可同步个人空间技能。 "),ee=v('<div class="os-client-capability-page os-client-skills-page"><section class=os-client-capability-selector aria-label=技能设置><div class=os-client-capability-current-domain><span>技能设置:</span><strong></strong><small></small></div><div class="os-client-capability-tabs os-client-skills-tabs"role=tablist aria-label=技能管理视图></div></section><div class=os-client-capability-page-body>'),te=v("<button type=button><strong></strong><small>");function ae(c){const s=new URLSearchParams(c).get("tab");if(s==="list"||s==="repo"||s==="upload")return s}function ne(){const c=j(),s=D(),A=I(),[b,P]=E(0),R=g(()=>(b(),!!_())),d=g(()=>!R()),[n,T]=E(ae(c.search)??"list"),W=g(()=>{b();const e=_();return e&&(H(e,A.projects.lastCode())||N(e))||""}),p=e=>{T(e),s(x(e),{replace:!0})};X(()=>{const e=()=>P(i=>i+1);window.addEventListener(y,e),window.addEventListener(C,e),window.addEventListener(L,e),O(()=>{window.removeEventListener(y,e),window.removeEventListener(C,e),window.removeEventListener(L,e)})});const h=()=>u.find(e=>e.id===n())??u[0];return(()=>{var e=ee(),i=e.firstChild,f=i.firstChild,M=f.firstChild,m=M.nextSibling,U=m.nextSibling,w=f.nextSibling,q=i.nextSibling;return a(m,()=>h().label),a(U,()=>h().hint),a(i,o(B,{get when(){return d()},get children(){var t=Z();return t.firstChild,a(t,o(Y,{get href(){return`/login?redirect=${encodeURIComponent(x(n()))}`},children:"去登录"}),null),t}}),w),a(w,o(K,{each:u,children:t=>(()=>{var r=te(),S=r.firstChild,F=S.nextSibling;return r.$$click=()=>p(t.id),a(S,()=>t.label),a(F,()=>t.hint),G(l=>{var $=n()===t.id,k=n()===t.id;return $!==l.e&&r.classList.toggle("is-active",l.e=$),k!==l.t&&J(r,"aria-pressed",l.t=k),l},{e:void 0,t:void 0}),r})()})),a(q,o(V,{get directory(){return Q(()=>!!d())()?void 0:W()||void 0},get loginRequired(){return d()},get tab(){return n()},onTabChange:p,variant:"page-body"})),e})()}z(["click"]);export{ne as WorkbenchSkillsPage};
1
+ import{e as j,f as D,l as I,n as E,o as g,q as Y,i as a,c as o,t as v,dY as u,b as z,s as _,br as H,z as N,r as y,v as C,w as L,x as O,R as X,U as x,S as Z,W as B,Y as G,F as J,X as K,dZ as Q}from"./index-D89_umhI.js";var V=v("<p class=os-client-skills-login-hint>登录后可同步个人空间技能。 "),ee=v('<div class="os-client-capability-page os-client-skills-page"><section class=os-client-capability-selector aria-label=技能设置><div class=os-client-capability-current-domain><span>技能设置:</span><strong></strong><small></small></div><div class="os-client-capability-tabs os-client-skills-tabs"role=tablist aria-label=技能管理视图></div></section><div class=os-client-capability-page-body>'),te=v("<button type=button><strong></strong><small>");function ae(c){const s=new URLSearchParams(c).get("tab");if(s==="list"||s==="repo"||s==="upload")return s}function ne(){const c=j(),s=D(),A=I(),[b,P]=E(0),R=g(()=>(b(),!!_())),d=g(()=>!R()),[n,T]=E(ae(c.search)??"list"),M=g(()=>{b();const e=_();return e&&(H(e,A.projects.lastCode())||N(e))||""}),p=e=>{T(e),s(x(e),{replace:!0})};Y(()=>{const e=()=>P(i=>i+1);window.addEventListener(y,e),window.addEventListener(C,e),window.addEventListener(L,e),O(()=>{window.removeEventListener(y,e),window.removeEventListener(C,e),window.removeEventListener(L,e)})});const h=()=>u.find(e=>e.id===n())??u[0];return(()=>{var e=ee(),i=e.firstChild,f=i.firstChild,U=f.firstChild,m=U.nextSibling,W=m.nextSibling,w=f.nextSibling,q=i.nextSibling;return a(m,()=>h().label),a(W,()=>h().hint),a(i,o(Z,{get when(){return d()},get children(){var t=V();return t.firstChild,a(t,o(X,{get href(){return`/login?redirect=${encodeURIComponent(x(n()))}`},children:"去登录"}),null),t}}),w),a(w,o(J,{each:u,children:t=>(()=>{var r=te(),S=r.firstChild,F=S.nextSibling;return r.$$click=()=>p(t.id),a(S,()=>t.label),a(F,()=>t.hint),B(l=>{var $=n()===t.id,k=n()===t.id;return $!==l.e&&r.classList.toggle("is-active",l.e=$),k!==l.t&&G(r,"aria-pressed",l.t=k),l},{e:void 0,t:void 0}),r})()})),a(q,o(Q,{get directory(){return K(()=>!!d())()?void 0:M()||void 0},get loginRequired(){return d()},get tab(){return n()},onTabChange:p,variant:"page-body"})),e})()}z(["click"]);export{ne as WorkbenchSkillsPage};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/staplebops-03-Aug82oH0.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/staplebops-03-Aug82oH0.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/staplebops-04-olyHi8qQ.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/staplebops-04-olyHi8qQ.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/staplebops-06-Cj_2vOI4.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/staplebops-06-Cj_2vOI4.aac";export{e as default};
@@ -1 +1 @@
1
- const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609151008/assets/staplebops-07-cqQEvbIf.aac";export{e as default};
1
+ const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609160919/assets/staplebops-07-cqQEvbIf.aac";export{e as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ClzL6bnc.js","assets/index-DVeuXHcQ.css"])))=>i.map(i=>d[i]);
2
- import{ez as I,h as H,j as J,cC as Q,m as U,u as z,x as K,n as W,C as X,eC as Y,eD as q,eE as Z,eF as ee,o as P,eG as te,i as a,c as s,eH as v,S as $,F as G,eI as ae,X as E,W as R,cj as se,eJ as ne,Y as re,ab as A,ap as le,eK as oe,e9 as ce,a5 as ie,p as ue,t as c,a6 as de,b as ge}from"./index-ClzL6bnc.js";var pe=c("<div class=os-ssh-dialog-stack>"),he=c('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-sm min-h-14 gap-2">'),be=c('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-sm min-h-14 gap-2"><div class="flex flex-wrap gap-2 pt-1">'),ve=c('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),B=c('<div class="text-14-regular text-text-base text-center my-auto py-2">'),me=c('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div></div><span class="text-14-regular text-text-base truncate flex-1"></span><div>'),fe=c('<span class="text-11-regular text-text-weaker shrink-0">· 检测中...'),xe=c('<span class="text-12-regular text-text-weak truncate pl-3.5">'),ye=c('<button type=button class="flex flex-col gap-0.5 w-full px-3 py-1.5 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div class="flex items-center gap-2 min-w-0"><span class="os-ssh-connectivity-dot shrink-0"aria-hidden=true></span><span class="text-14-regular text-text-base truncate"></span><span class="text-11-regular text-text-weaker shrink-0">'),_e=c('<span class="text-11-regular text-text-weaker shrink-0">· ');const $e=()=>{const k=I(),m=le(),f=z(),S=Q(),w=oe();return ce(()=>({mutationFn:async i=>{await(k.data.mcp[i]?.status==="connected"?m.client.mcp.disconnect({name:i}):m.client.mcp.connect({name:i}))},onSuccess:()=>S.refetchQueries(w.mcp(ue(k.directory))),onError:i=>{ie({variant:"error",title:f.t("common.requestFailed"),description:i instanceof Error?i.message:String(i)})}}))};function Se(k){const m=I(),f=H(),S=J(),w=Q(),i=U(),l=z();let C=0,F=!1;K(()=>{F=!0,C+=1});const[O,T]=W();X(()=>{if(!k.shown()){T(void 0);return}let r=!1;const e=q();(async()=>{const t=await Y(S.url);r||e!==q()||t===void 0||(T(t),Z(t),await ee({serverUrl:S.url,queryClient:w}).catch(()=>{}))})(),K(()=>{r=!0})});const p=$e(),j=P(()=>{const r=new Set([...Object.keys(f.data.config.mcp??{}),...Object.keys(m.data.mcp??{})]);return Array.from(r).sort((e,t)=>e.localeCompare(t))}),N=r=>m.data.mcp?.[r]?.status,L=P(()=>{const r=O()??f.data.config.ssh??{};return Object.entries(r).map(([e,t])=>({name:e,config:t})).filter(e=>!!e.config&&typeof e.config=="object"&&"host"in e.config).sort((e,t)=>e.name.localeCompare(t.name))}),V=P(()=>O()??f.data.config.ssh),D=te({ssh:V}),M=r=>{const e=++C;de(()=>import("./index-ClzL6bnc.js").then(t=>t.eM),__vite__mapDeps([0,1])).then(t=>{F||C!==e||i.show(()=>(()=>{var n=pe();return a(n,s(t.DialogSelectSsh,{initialMode:r})),n})())})};return(()=>{var r=ve();return a(r,s(v,{get"aria-label"(){return l.t("status.popover.ariaLabel")},class:"tabs bg-background-strong rounded-xl overflow-hidden","data-component":"tabs","data-active":"mcp",defaultValue:"mcp",variant:"alt",get children(){return[s(v.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 pt-2 pb-0 gap-3 h-10",get children(){return[s(v.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return l.t("status.popover.tab.mcp")}}),s(v.Trigger,{value:"ssh","data-slot":"tab",class:"text-12-regular",get children(){return l.t("status.popover.tab.ssh")}})]}}),s(v.Content,{value:"mcp",get children(){var e=he(),t=e.firstChild;return a(t,s($,{get when(){return j().length>0},get fallback(){return(()=>{var n=B();return a(n,()=>l.t("dialog.mcp.empty")),n})()},get children(){return s(G,{get each(){return j()},children:n=>{const o=()=>N(n),h=()=>o()==="connected";return(()=>{var u=me(),b=u.firstChild,x=b.nextSibling,y=x.nextSibling;return u.$$click=()=>{p.isPending||p.mutate(n)},a(x,n),y.$$click=d=>d.stopPropagation(),a(y,s(ae,{get checked(){return h()},get disabled(){return E(()=>!!p.isPending)()&&p.variables===n},onChange:()=>{p.isPending||p.mutate(n)}})),R(d=>{var g=p.isPending&&p.variables===n,_={"size-2 rounded-full shrink-0":!0,"bg-icon-success-base":h(),"bg-border-weak-base":!h()};return g!==d.e&&(u.disabled=d.e=g),d.t=se(b,_,d.t),d},{e:void 0,t:void 0}),u})()}})}})),e}}),s(v.Content,{value:"ssh",get children(){var e=be(),t=e.firstChild,n=t.firstChild;return a(t,s($,{get when(){return L().length>0},get fallback(){return(()=>{var o=B();return a(o,()=>l.t("dialog.ssh.empty")),o})()},get children(){return s(G,{get each(){return L()},children:o=>{const h=()=>D.byName()[o.name];return(()=>{var u=ye(),b=u.firstChild,x=b.firstChild,y=x.nextSibling,d=y.nextSibling;return u.$$click=()=>M(),a(y,()=>o.name),a(d,(()=>{var g=E(()=>o.config.enabled===!1);return()=>g()?l.t("dialog.ssh.status.disabled"):l.t("dialog.ssh.status.enabled")})()),a(b,s($,{get when(){return h()},children:g=>(()=>{var _=_e();return _.firstChild,a(_,()=>ne(g().connectivity),null),_})()}),null),a(b,s($,{get when(){return E(()=>!!D.loading())()&&!h()},get children(){return fe()}}),null),a(u,s($,{get when(){return o.config.remotePath},get children(){var g=xe();return a(g,()=>o.config.remotePath),g}}),null),R(()=>re(x,"data-state",D.loading()&&!h()?"testing":h()?.connectivity??"idle")),u})()}})}}),n),a(n,s(A,{variant:"secondary",class:"h-8 px-3 py-1.5",onClick:()=>M(),get children(){return l.t("status.popover.action.manageSsh")}}),null),a(n,s(A,{variant:"secondary",icon:"plus-small",class:"h-8 px-3 py-1.5",onClick:()=>M("add"),get children(){return l.t("dialog.ssh.addButton")}}),null),e}})]}})),r})()}ge(["click"]);export{Se as StatusPopoverBody};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D89_umhI.js","assets/index-B_MGkqLF.css"])))=>i.map(i=>d[i]);
2
+ import{eB as I,h as H,j as J,cE as Q,m as U,u as N,x as K,n as W,C as X,eE as Y,eF as q,eG as Z,eH as ee,o as P,eI as te,i as a,c as s,eJ as v,S as $,F as B,eK as ae,X as E,W as G,cl as se,eL as ne,Y as re,ab as R,ap as le,eM as oe,eb as ce,a5 as ie,p as ue,t as c,a6 as de,b as ge}from"./index-D89_umhI.js";var pe=c("<div class=os-ssh-dialog-stack>"),he=c('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-sm min-h-14 gap-2">'),be=c('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-sm min-h-14 gap-2"><div class="flex flex-wrap gap-2 pt-1">'),ve=c('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),A=c('<div class="text-14-regular text-text-base text-center my-auto py-2">'),me=c('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div></div><span class="text-14-regular text-text-base truncate flex-1"></span><div>'),fe=c('<span class="text-11-regular text-text-weaker shrink-0">· 检测中...'),xe=c('<span class="text-12-regular text-text-weak truncate pl-3.5">'),ye=c('<button type=button class="flex flex-col gap-0.5 w-full px-3 py-1.5 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div class="flex items-center gap-2 min-w-0"><span class="os-ssh-connectivity-dot shrink-0"aria-hidden=true></span><span class="text-14-regular text-text-base truncate"></span><span class="text-11-regular text-text-weaker shrink-0">'),_e=c('<span class="text-11-regular text-text-weaker shrink-0">· ');const $e=()=>{const k=I(),m=le(),f=N(),S=Q(),w=oe();return ce(()=>({mutationFn:async i=>{await(k.data.mcp[i]?.status==="connected"?m.client.mcp.disconnect({name:i}):m.client.mcp.connect({name:i}))},onSuccess:()=>S.refetchQueries(w.mcp(ue(k.directory))),onError:i=>{ie({variant:"error",title:f.t("common.requestFailed"),description:i instanceof Error?i.message:String(i)})}}))};function Se(k){const m=I(),f=H(),S=J(),w=Q(),i=U(),l=N();let C=0,O=!1;K(()=>{O=!0,C+=1});const[F,L]=W();X(()=>{if(!k.shown()){L(void 0);return}let r=!1;const e=q();(async()=>{const t=await Y(S.url);r||e!==q()||t===void 0||(L(t),Z(t),await ee({serverUrl:S.url,queryClient:w}).catch(()=>{}))})(),K(()=>{r=!0})});const p=$e(),T=P(()=>{const r=new Set([...Object.keys(f.data.config.mcp??{}),...Object.keys(m.data.mcp??{})]);return Array.from(r).sort((e,t)=>e.localeCompare(t))}),V=r=>m.data.mcp?.[r]?.status,j=P(()=>{const r=F()??f.data.config.ssh??{};return Object.entries(r).map(([e,t])=>({name:e,config:t})).filter(e=>!!e.config&&typeof e.config=="object"&&"host"in e.config).sort((e,t)=>e.name.localeCompare(t.name))}),z=P(()=>F()??f.data.config.ssh),M=te({ssh:z}),D=r=>{const e=++C;de(()=>import("./index-D89_umhI.js").then(t=>t.eO),__vite__mapDeps([0,1])).then(t=>{O||C!==e||i.show(()=>(()=>{var n=pe();return a(n,s(t.DialogSelectSsh,{initialMode:r})),n})())})};return(()=>{var r=ve();return a(r,s(v,{get"aria-label"(){return l.t("status.popover.ariaLabel")},class:"tabs bg-background-strong rounded-xl overflow-hidden","data-component":"tabs","data-active":"mcp",defaultValue:"mcp",variant:"alt",get children(){return[s(v.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 pt-2 pb-0 gap-3 h-10",get children(){return[s(v.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return l.t("status.popover.tab.mcp")}}),s(v.Trigger,{value:"ssh","data-slot":"tab",class:"text-12-regular",get children(){return l.t("status.popover.tab.ssh")}})]}}),s(v.Content,{value:"mcp",get children(){var e=he(),t=e.firstChild;return a(t,s($,{get when(){return T().length>0},get fallback(){return(()=>{var n=A();return a(n,()=>l.t("dialog.mcp.empty")),n})()},get children(){return s(B,{get each(){return T()},children:n=>{const o=()=>V(n),h=()=>o()==="connected";return(()=>{var u=me(),b=u.firstChild,x=b.nextSibling,y=x.nextSibling;return u.$$click=()=>{p.isPending||p.mutate(n)},a(x,n),y.$$click=d=>d.stopPropagation(),a(y,s(ae,{get checked(){return h()},get disabled(){return E(()=>!!p.isPending)()&&p.variables===n},onChange:()=>{p.isPending||p.mutate(n)}})),G(d=>{var g=p.isPending&&p.variables===n,_={"size-2 rounded-full shrink-0":!0,"bg-icon-success-base":h(),"bg-border-weak-base":!h()};return g!==d.e&&(u.disabled=d.e=g),d.t=se(b,_,d.t),d},{e:void 0,t:void 0}),u})()}})}})),e}}),s(v.Content,{value:"ssh",get children(){var e=be(),t=e.firstChild,n=t.firstChild;return a(t,s($,{get when(){return j().length>0},get fallback(){return(()=>{var o=A();return a(o,()=>l.t("dialog.ssh.empty")),o})()},get children(){return s(B,{get each(){return j()},children:o=>{const h=()=>M.byName()[o.name];return(()=>{var u=ye(),b=u.firstChild,x=b.firstChild,y=x.nextSibling,d=y.nextSibling;return u.$$click=()=>D(),a(y,()=>o.name),a(d,(()=>{var g=E(()=>o.config.enabled===!1);return()=>g()?l.t("dialog.ssh.status.disabled"):l.t("dialog.ssh.status.enabled")})()),a(b,s($,{get when(){return h()},children:g=>(()=>{var _=_e();return _.firstChild,a(_,()=>ne(g().connectivity),null),_})()}),null),a(b,s($,{get when(){return E(()=>!!M.loading())()&&!h()},get children(){return fe()}}),null),a(u,s($,{get when(){return o.config.remotePath},get children(){var g=xe();return a(g,()=>o.config.remotePath),g}}),null),G(()=>re(x,"data-state",M.loading()&&!h()?"testing":h()?.connectivity??"idle")),u})()}})}}),n),a(n,s(R,{variant:"secondary",class:"h-8 px-3 py-1.5",onClick:()=>D(),get children(){return l.t("status.popover.action.manageSsh")}}),null),a(n,s(R,{variant:"secondary",icon:"plus-small",class:"h-8 px-3 py-1.5",onClick:()=>D("add"),get children(){return l.t("dialog.ssh.addButton")}}),null),e}})]}})),r})()}ge(["click"]);export{Se as StatusPopoverBody};