@onescience/onecode-web 1.14.50-202609031600 → 1.14.50-202609071521

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 (75) hide show
  1. package/assets/{3Dmol-CcTSgS_I.js → 3Dmol-BBe_mNlJ.js} +1 -1
  2. package/assets/account-system-Dwi2xgXX.js +1 -0
  3. package/assets/{alert-04-Db4ZS6xF.js → alert-01-BwT8PyA2.js} +1 -1
  4. package/assets/{alert-05-BrjFsUk3.js → alert-02-DL_Hozvd.js} +1 -1
  5. package/assets/{alert-01-CPXWs6nf.js → alert-04-BMC8BgKu.js} +1 -1
  6. package/assets/{alert-02-DI1DD_3d.js → alert-05-BdPKihXd.js} +1 -1
  7. package/assets/alert-06-CXOdx709.js +1 -0
  8. package/assets/alert-07-DHYkPTfg.js +1 -0
  9. package/assets/alert-08-Bj-NpjH1.js +1 -0
  10. package/assets/alert-10-0Z2UEjuX.js +1 -0
  11. package/assets/{bip-bop-03-CYdvX8k_.js → bip-bop-03-DHsaXfIM.js} +1 -1
  12. package/assets/{bip-bop-04-KJbD4lUd.js → bip-bop-04-BtdF6fK1.js} +1 -1
  13. package/assets/{bip-bop-06-Cc85gIuq.js → bip-bop-06-CY_ZWHaR.js} +1 -1
  14. package/assets/{bip-bop-08-DQAl-h9L.js → bip-bop-08-Fc6621fg.js} +1 -1
  15. package/assets/bip-bop-09-B8A7Fzat.js +1 -0
  16. package/assets/center-Du8raWkz.js +5 -0
  17. package/assets/dialog-edit-project-BWSljV71.js +1 -0
  18. package/assets/dialog-fork-De_7mQ6k.js +1 -0
  19. package/assets/dialog-project-upload-BGS1HdpV.js +2 -0
  20. package/assets/dialog-select-file-CwKZwwPL.js +1 -0
  21. package/assets/dialog-select-model-CbOVwO1s.js +2 -0
  22. package/assets/dialog-terminal-unavailable-DxSPTWtf.js +3 -0
  23. package/assets/docs-D2uWkeFz.js +1 -0
  24. package/assets/ghostty-web-0LLJoc4B.js +13 -0
  25. package/assets/home-C6hwg1cL.js +1 -0
  26. package/assets/{index-Cxa2Vk80.js → index-Cxg7oCCB.js} +158 -158
  27. package/assets/index-D8rxV13k.css +1 -0
  28. package/assets/intro-oB7XqOIB.js +1 -0
  29. package/assets/{nope-02-CEsZCG3w.js → nope-02-CrCpUOWA.js} +1 -1
  30. package/assets/{nope-05-BpK9LKjZ.js → nope-05-DOwpRanZ.js} +1 -1
  31. package/assets/{nope-08-D-5nAWNU.js → nope-08-dWMZrEu4.js} +1 -1
  32. package/assets/{nope-11-COnsf8VE.js → nope-11-D1b3syFM.js} +1 -1
  33. package/assets/nope-12-Cifc2OtG.js +1 -0
  34. package/assets/onescience-0qW5Uv7c.js +82 -0
  35. package/assets/{resources-C7NB-V9a.js → resources-B0ZUUluy.js} +2 -2
  36. package/assets/selection-D7DGmYLZ.js +1 -0
  37. package/assets/shell-V-2mXIBe.js +2 -0
  38. package/assets/skills-CaLvQClr.js +1 -0
  39. package/assets/{staplebops-03-DSwM4GRQ.js → staplebops-03-DZoq47RX.js} +1 -1
  40. package/assets/{staplebops-04-ze2zihJz.js → staplebops-04-vyKRj5Hr.js} +1 -1
  41. package/assets/{staplebops-06-BJVX7hv9.js → staplebops-06-CH-pJHfc.js} +1 -1
  42. package/assets/{staplebops-07-B3Bn5VQK.js → staplebops-07-BzUCUDbK.js} +1 -1
  43. package/assets/status-popover-body--BJDT6mD.js +2 -0
  44. package/assets/wizard-C7wldoTg.js +1 -0
  45. package/assets/{yup-01-Ctxq7OVz.js → yup-01-CtjovY3S.js} +1 -1
  46. package/assets/{yup-03-C8Lemx9x.js → yup-03-qrYctadK.js} +1 -1
  47. package/assets/{yup-04-tKpnqLFc.js → yup-04-BMoYNjee.js} +1 -1
  48. package/assets/{yup-05-ByOdNO_N.js → yup-05-CO9CIwVo.js} +1 -1
  49. package/index.html +11 -11
  50. package/package.json +2 -2
  51. package/assets/account-system-DRcY1oD1.js +0 -1
  52. package/assets/alert-06-CBhGhcW9.js +0 -1
  53. package/assets/alert-07-BiN6DBuL.js +0 -1
  54. package/assets/alert-08-pH5OhsOk.js +0 -1
  55. package/assets/alert-10-kyJVFv2A.js +0 -1
  56. package/assets/bip-bop-09-C5SnVe_l.js +0 -1
  57. package/assets/center-Cp7MBrmk.js +0 -1
  58. package/assets/dialog-edit-project-TXt8WU1J.js +0 -1
  59. package/assets/dialog-fork-fs_cIK4A.js +0 -1
  60. package/assets/dialog-project-upload-B8QKyumt.js +0 -2
  61. package/assets/dialog-select-file-CfgzSPbz.js +0 -1
  62. package/assets/dialog-select-model-C8p6HIH2.js +0 -2
  63. package/assets/dialog-terminal-unavailable-BPf6D9pa.js +0 -3
  64. package/assets/docs-BW2dQfrB.js +0 -1
  65. package/assets/ghostty-web-CbT7vRAF.js +0 -13
  66. package/assets/home-v-RyEJXO.js +0 -1
  67. package/assets/index-q70uwQje.css +0 -1
  68. package/assets/intro-BwCcm56A.js +0 -1
  69. package/assets/nope-12-UlwuxqTc.js +0 -1
  70. package/assets/onescience-DBtZsoEm.js +0 -82
  71. package/assets/onescience-skill-detail-dialog-C23957tN.js +0 -1
  72. package/assets/shell-Bex4QMb_.js +0 -2
  73. package/assets/skills-BgxyM9mc.js +0 -1
  74. package/assets/status-popover-body-BhWWbkYJ.js +0 -2
  75. package/assets/wizard-BQDxCspK.js +0 -1
@@ -1 +0,0 @@
1
- import{d as nt,c as C,B as at,a as ot,cW as dt,x as ct,b as n,P as ut,i,S as h,F as j,f as x,s as A,e as J,m as N,cX as gt,ar as D,t as a}from"./index-Cxa2Vk80.js";function It(e){return{prompt:`请基于 OneSkills 技能「${e.title}」进行科研开发。`,skill:{name:e.id,title:e.title}}}const Z=["name","description","layer","tags","references","allowed-tools","metadata"],vt={name:"名称",description:"描述",tags:"标签",references:"引用资源","allowed-tools":"可用工具",metadata:"元数据",layer:"分层"};function ft(e){return vt[e]??e}function et(e){const o=Object.keys(e);return[...Z.filter(b=>o.includes(b)),...o.filter(b=>!Z.includes(b)).sort()].flatMap(b=>{const k=e[b];return k==null||k===""?[]:[[b,k]]})}function ht(e){return e?et(e).length>0:!1}function bt(e){return typeof e=="boolean"?e?"是":"否":typeof e=="number"?String(e):typeof e=="string"?e:JSON.stringify(e,null,2)}function M(e){return Array.isArray(e)?e.flatMap(o=>o==null||o===""?[]:[typeof o=="string"?o:JSON.stringify(o)]):[]}function tt(e){if(!(e===null||typeof e!="object"||Array.isArray(e)))return JSON.stringify(e,null,2)}var kt=a("<section class=os-skill-detail-meta><div class=os-skill-detail-section-label>技能元数据</div><dl class=os-skill-detail-meta-grid>"),mt=a("<dt>"),yt=a('<div class="os-tag-row os-skill-detail-meta-tags">'),$t=a("<span class=os-skill-detail-meta-value>"),pt=a("<dd>"),wt=a("<span class=os-tag>"),_t=a("<pre class=os-skill-detail-meta-nested>"),St=a("<div class=os-skill-detail-chips>"),Lt=a('<div class=os-skill-detail-loading><div class=os-skill-detail-loading-bar></div><div class="os-skill-detail-loading-bar os-skill-detail-loading-bar-short"></div><div class=os-skill-detail-loading-bar></div><p>正在加载 SKILL.md...'),Ct=a("<section class=os-skill-detail-content><div class=os-skill-detail-section-label>技能说明"),xt=a("<div role=presentation><div role=dialog aria-modal=true><div><div class=os-skill-detail-head-main><div>OneSkills</div><h2></h2><p class=os-skill-detail-summary></p></div><button type=button aria-label=关闭>×</button></div><div class=os-skill-detail-body></div><div><div><button type=button>关闭</button><button type=button>开发"),Ft=a("<span class=os-skill-detail-chip>"),Ot=a("<div>"),Et=a("<p class=os-section-copy>该技能暂无正文内容。"),At=a("<div class=os-skill-detail-markdown>"),Dt=a("<span class=os-skill-detail-path-empty>路径待加载"),Mt=a("<code class=os-skill-detail-path><span class=os-skill-detail-path-label>路径</span><span class=os-skill-detail-path-value>");function Nt(e){const o=()=>et(e.data);return(()=>{var y=kt(),b=y.firstChild,k=b.nextSibling;return i(k,n(j,{get each(){return o()},children:([F,u])=>[(()=>{var m=mt();return i(m,()=>ft(F)),m})(),(()=>{var m=pt();return i(m,n(h,{get when(){return M(u).length>0},get children(){var g=yt();return i(g,n(j,{get each(){return M(u)},children:$=>(()=>{var p=wt();return i(p,$),p})()})),g}}),null),i(m,n(h,{get when(){return N(()=>M(u).length===0)()&&tt(u)},children:g=>(()=>{var $=_t();return i($,g),$})()}),null),i(m,n(h,{get when(){return N(()=>M(u).length===0)()&&!tt(u)},get children(){var g=$t();return i(g,()=>bt(u)),g}}),null),m})()]})),x(()=>y.classList.toggle("is-workbench",!!e.workbench)),y})()}function Jt(e){const[o,y]=C(!1),[b,k]=C(),[F,u]=C(),[m,g]=C(),[$,p]=C(),l=()=>e.variant==="workbench",w=at(()=>e.open?e.item:void 0);ot(()=>{const r=w(),c=e.serverUrl;if(!r||!c){y(!1),k(void 0),u(void 0),g(void 0),p(void 0);return}let v=!0;y(!0),k(void 0),u(void 0),g(void 0),p(void 0),dt(c,r.id).then(f=>{if(v){if(y(!1),!f.loaded){p(f.error??"无法加载技能内容");return}if(g(f.location),f.content){k(f.content),u(f.frontmatter);return}p(f.error??"技能文件不可用")}}),ct(()=>{v=!1})});const B=()=>{const r=w();if(!r)return[];const c=[];r.layer&&c.push({label:r.layer,tone:"layer"}),r.provider&&c.push({label:r.provider,tone:"provider"});for(const v of(r.tags??[]).slice(0,4))v===r.layer||v===r.provider||c.push({label:v});return c};return n(h,{get when(){return w()},get children(){return n(ut,{get mount(){return typeof document>"u"?void 0:document.body},get children(){var r=xt(),c=r.firstChild,v=c.firstChild,f=v.firstChild,P=f.firstChild,H=P.nextSibling,lt=H.nextSibling,K=f.nextSibling,_=v.nextSibling,O=_.nextSibling,E=O.firstChild,I=E.firstChild,U=I.nextSibling;return r.$$click=t=>{t.target===t.currentTarget&&e.onClose()},c.$$click=t=>t.stopPropagation(),i(H,()=>w().title),i(lt,()=>w().copy),i(f,n(h,{get when(){return B().length>0},get children(){var t=St();return i(t,n(j,{get each(){return B()},children:d=>(()=>{var s=Ft();return i(s,()=>d.label),x(()=>A(s,"data-tone",d.tone)),s})()})),t}}),null),J(K,"click",e.onClose,!0),i(_,n(h,{get when(){return o()},get children(){return Lt()}}),null),i(_,n(h,{get when(){return N(()=>!o())()&&$()},children:t=>(()=>{var d=Ot();return i(d,t),x(s=>{var S=!l(),L=!!l();return S!==s.e&&d.classList.toggle("os-upload-error",s.e=S),L!==s.t&&d.classList.toggle("os-client-capability-skill-detail-error",s.t=L),s},{e:void 0,t:void 0}),d})()}),null),i(_,n(h,{get when(){return N(()=>!o())()&&!$()},get children(){return[n(h,{get when(){return ht(F())},get children(){return n(Nt,{get data(){return F()},get workbench(){return l()}})}}),(()=>{var t=Ct();return t.firstChild,i(t,n(h,{get when(){return b()},get fallback(){return Et()},children:d=>(()=>{var s=At();return i(s,n(gt,{get text(){return d()},get cacheKey(){return`skill-detail:${w().id}`}})),s})()}),null),t})()]}}),null),i(O,n(h,{get when(){return m()},get fallback(){return Dt()},children:t=>(()=>{var d=Mt(),s=d.firstChild,S=s.nextSibling;return i(S,t),x(()=>A(d,"title",t())),d})()}),E),J(I,"click",e.onClose,!0),J(U,"click",e.onDevelop,!0),x(t=>{var d=!l(),s=!!l(),S={"os-upload-dialog os-skill-detail-dialog":!l(),"os-client-capability-skill-detail-dialog":l()},L=`技能详情 ${w().title}`,q=!l(),R=!!l(),T=!l(),W=!!l(),it={"os-button os-button-secondary os-button-square":!l(),"os-client-capability-skill-detail-close":l()},X=!!l(),z=o(),G=!l(),Q=!!l(),V=!l(),Y=!!l(),rt={"os-button os-button-secondary":!l(),"os-client-capability-skill-detail-action":l()},st={"os-button os-button-primary":!l(),"os-client-capability-skill-detail-action is-primary":l()};return d!==t.e&&r.classList.toggle("os-modal-backdrop",t.e=d),s!==t.t&&r.classList.toggle("os-client-capability-skill-detail-overlay",t.t=s),t.a=D(c,S,t.a),L!==t.o&&A(c,"aria-label",t.o=L),q!==t.i&&v.classList.toggle("os-skill-detail-head",t.i=q),R!==t.n&&v.classList.toggle("os-client-capability-skill-detail-head",t.n=R),T!==t.s&&P.classList.toggle("os-eyebrow",t.s=T),W!==t.h&&P.classList.toggle("os-client-capability-skill-detail-eyebrow",t.h=W),t.r=D(K,it,t.r),X!==t.d&&_.classList.toggle("is-workbench",t.d=X),z!==t.l&&A(_,"aria-busy",t.l=z),G!==t.u&&O.classList.toggle("os-skill-detail-footer",t.u=G),Q!==t.c&&O.classList.toggle("os-client-capability-skill-detail-footer",t.c=Q),V!==t.w&&E.classList.toggle("os-upload-actions",t.w=V),Y!==t.m&&E.classList.toggle("os-client-capability-skill-detail-actions",t.m=Y),t.f=D(I,rt,t.f),t.y=D(U,st,t.y),t},{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}),r}})}})}nt(["click"]);export{Jt as S,It as s};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-terminal-unavailable-BPf6D9pa.js","assets/index-Cxa2Vk80.js","assets/index-q70uwQje.css"])))=>i.map(i=>d[i]);
2
- import{bC as De,b as e,I as ue,b8 as k,i as r,S as _,F as pe,bD as Ne,t as i,az as de,bE as _e,ab as J,d as ye,R as et,Q as Nt,U as tt,T as Ot,V as Bt,M as qt,O as Kt,W as Lt,c as F,B as w,am as Xt,bm as ct,bt as Ut,bF as nt,a as U,X as dt,bG as Ke,bH as Vt,bI as ut,bJ as Gt,bw as ce,Y as Qt,Z as Zt,bK as Yt,bL as Jt,bM as en,A as ie,af as tn,$ as nn,bN as rn,bO as sn,f as N,m as ve,s as R,bP as on,ah as ln,bQ as Pt,bp as Xe,r as ht,p as gt,bR as an,bS as cn,bk as we,bT as Fe,bU as mt,bV as Ue,ap as dn,bW as un,bX as hn,bY as gn,bZ as mn,b_ as vn,b$ as pn,c0 as fn,c1 as bn,y as Be,c2 as vt,aj as Et,c3 as $n,e as Je,c4 as wn,c5 as Dt,c6 as oe,c7 as _n,c8 as pt,c9 as yn,ca as kn,cb as Sn,cc as xn,cd as Cn,C as Oe,ce as Ln,cf as Pn,cg as En,ch as Mt,ci as It,x as Ee,cj as Rt,ck as Dn,cl as Mn,cm as In,cn as Rn,co as Tn,cp as jn,cq as zn,cr as ft,cs as bt,ct as $t,cu as wt,cv as An,cw as Wn,cx as Fn,ak as Le}from"./index-Cxa2Vk80.js";import{DialogEditProject as Hn}from"./dialog-edit-project-TXt8WU1J.js";var Nn=i("<span class=os-client-session-menu-label>"),On=i("<div class=os-client-session-menu-empty>");const Ve="os-client-session-menu",Bn="os-client-session-menu os-client-session-menu-sub";function qn(c){const o=De(),s=()=>J(),L=()=>_e(s(),c.currentDirectory),u=()=>c.projects().filter(h=>de(h.worktree)!==de(c.currentDirectory)).filter(h=>!_e(s(),h.worktree));return e(_,{get when(){return L()},get children(){return e(k.Sub,{get children(){return[e(k.SubTrigger,{"data-action":"session-move",class:"os-client-session-menu-item",get children(){return[e(ue,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),(()=>{var h=Nn();return r(h,()=>o.t("session.move.toProject")),h})(),e(ue,{name:"chevron-right",size:"small",class:"os-client-session-menu-chevron"})]}}),e(k.Portal,{get children(){return e(k.SubContent,{class:Bn,get children(){return[e(k.Item,{"data-action":"session-move-new-project",class:"os-client-session-menu-item",onSelect:()=>c.onNewProject(),get children(){return[e(ue,{name:"plus",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return o.t("session.move.newProject")}})]}}),e(k.Separator,{class:"os-client-session-menu-separator"}),e(_,{get when(){return u().length>0},get fallback(){return(()=>{var h=On();return r(h,()=>o.t("session.move.emptyProjects")),h})()},get children(){return e(pe,{get each(){return u()},children:h=>e(k.Item,{"data-action":"session-move-target",class:"os-client-session-menu-item",onSelect:()=>c.onMove(h.worktree),get children(){return[e(ue,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return Ne(h)}})]}})})}})]}})}})]}})}})}function _t(c){const o=De();return[e(k.Item,{"data-action":"session-archive",class:"os-client-session-menu-item",onSelect:()=>c.onArchive(),get children(){return[e(ue,{name:"archive",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return o.t("common.archive")}})]}}),e(qn,{get currentDirectory(){return c.currentDirectory},get projects(){return c.projects},get onMove(){return c.onMove},get onNewProject(){return c.onNewProject}}),e(k.Separator,{class:"os-client-session-menu-separator"}),e(k.Item,{"data-action":"session-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>c.onDelete(),get children(){return[e(ue,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return o.t("common.delete")}})]}})]}var yt=i('<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">'),Kn=i("<span class=os-sidebar-label>"),Xn=i('<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">'),Un=i("<span class=os-sidebar-label>新建会话"),Vn=i('<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">'),Gn=i("<span class=os-sidebar-label>能力中心"),Qn=i('<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">'),Zn=i("<span class=os-sidebar-label>skills设置"),Yn=i('<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">'),Jn=i("<span class=os-sidebar-label>资源配置"),er=i("<p class=os-client-empty-hint>登录后同步个人空间"),tr=i("<div class=os-client-task-list-scroll>"),nr=i("<button type=button class=os-client-task-more data-action=recent-expand>展开更多"),rr=i("<button type=button class=os-client-task-more data-action=recent-collapse>收起"),sr=i("<p class=os-client-empty-hint>登录后查看未分类会话"),ir=i("<button type=button class=os-client-shared-cases-more data-action=shared-cases-expand>展开更多"),or=i("<button type=button class=os-client-shared-cases-more data-action=shared-cases-collapse>收起"),lr=i("<div class=os-client-shared-cases-list>"),ar=i('<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>'),cr=i('<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">'),dr=i("<span class=os-sidebar-label>帮助"),ur=i('<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>设置'),hr=i("<p class=os-client-empty-hint>暂无项目,点击 + 打开目录"),gr=i("<div class=os-client-project-sessions>"),mr=i("<div class=os-client-project-block><div class=os-client-project-row>"),Ge=i("<span class=os-client-task-main><span>"),kt=i("<div class=os-client-session-row>"),vr=i("<p class=os-client-empty-hint>暂无未分类会话,点击 + 新建"),pr=i("<p class=os-client-empty-hint>暂无默认案例");const He=4,St=200,Qe=4;function fr(){const c=et(),o=Nt(),s=De(),L=tt(),u=Ot(),h=Bt(),m=qt(),z=Kt(),P=Lt(),$=()=>!!J(),D=()=>Pt(c.pathname),T=()=>c.pathname.startsWith("/workspace/capabilities"),f=()=>c.pathname.startsWith("/workspace/skills"),y=()=>c.pathname.startsWith("/workspace/resources"),se=()=>c.pathname.startsWith("/workspace/docs"),[O,C]=F(!0),[S,E]=F(!1),[X,Q]=F(!1),le=w(()=>Xt(L.projects.list(),J())),q=w(()=>le().filter(t=>!_e(J(),t.worktree))),ee=w(()=>ct(J())?.trim()||""),ae=w(()=>Ut(J())?.trim()||""),he=w(()=>{const t=/^\/workspace\/([^/]+)\/session/.exec(c.pathname)?.[1];return t?nt(t)??"":""}),V=()=>/\/session\/([^/?#]+)/.exec(c.pathname)?.[1],me=t=>{const l=he();if(!l)return!1;const g=de(l);return de(t.worktree)===g?!0:t.sandboxes?.some(W=>de(W)===g)??!1};U(()=>{if(!$())return;const t=[...q().flatMap(l=>[l.worktree,...l.sandboxes??[]]),ee()].filter(l=>l.length>0);for(const l of t)dt(()=>{u.project.loadSessions(l)})}),U(()=>{const t=ae();if(!t)return;const[l,g]=u.child(t,{bootstrap:!1});(l.limit??0)<St&&g("limit",St),dt(()=>{u.project.loadSessions(t)})});const te=w(()=>{const t=ee();if(!t)return[];const[l]=u.child(t,{bootstrap:!1});return Ke(l,Date.now(),t).map(g=>({session:g,directory:t}))}),ge=w(()=>X()?te():te().slice(0,Qe)),d=w(()=>!X()&&te().length>Qe),M=w(()=>X()&&te().length>Qe),a=w(()=>{const t=ae();if(!t)return[];const[l]=u.child(t,{bootstrap:!1});return Vt(Ke(l,Date.now(),t).filter(g=>ut(g.id)))}),b=w(()=>O()?S()?a():a().slice(0,He):[]),p=w(()=>O()&&!S()&&a().length>He),v=w(()=>O()&&S()&&a().length>He);U(()=>{const t=Gt(c.search),l=V(),g=t&&t!=="open"?t:ut(l)?l:void 0;if((t||g)&&C(!0),g&&a().findIndex(G=>G.id===g)>=He&&E(!0),!t||t==="open")return;const W=ae();W&&l!==t&&o(ce(W,t),{replace:!0})});function n(t,l=!0){L.projects.open(t),z.projects.touchCode(t),l&&o(ce(t))}function A(){P.show(()=>e(vn,{onCreated:t=>n(t)}))}function K(t){P.show(()=>e(Hn,{project:t}))}function Me(t){const l=t.worktree;if(_e(J(),l))return;const g=q(),W=de(l),j=g.findIndex(re=>de(re.worktree)===W);if(j===-1)return;if(me(t)){const re=g[j+1]??g[j-1];o(re?ce(re.worktree):"/workspace")}L.projects.close(l)}async function Ie(){const t=m.openDirectoryPickerDialog;function l(g){if(Array.isArray(g)){g.forEach((W,j)=>n(W,j===0));return}g&&n(g)}if(t&&un({hasNativePicker:!!t,isLocalServer:!!z.isLocal(),hasPlatformSession:!!J()})){const g=await t({title:s.t("command.project.open"),multiple:!0});l(g);return}P.show(()=>e(hn,{multiple:!0,onSelect:l,onCreateFolder:A}),()=>l(null))}function fe(){Xe({navigate:o,action:{type:"install",resourceId:"__project__"},isLoggedIn:$()})&&Ie()}function Re(){if(!Xe({navigate:o,action:{type:"install",resourceId:"__task__"},isLoggedIn:$()}))return;const t=ct(J());t&&(ht(gt(t)),n(t))}function Te(t){Xe({navigate:o,action:{type:"install",resourceId:"__task__"},isLoggedIn:$()})&&(ht(gt(t)),n(t))}function ke(t){if(V()!==t.id)return;const l=he();if(!l){o("/workspace");return}o(ce(l))}function be(t,l){const[,g]=u.child(t,{bootstrap:!1});g(gn(W=>{const j=mn.search(W.session,l,re=>re.id);if(!j.found)return;const G=W.session[j.index];W.session.splice(j.index,1),G&&!G.parentID&&(W.sessionTotal=Math.max(0,W.sessionTotal-1))}))}async function Se(t){be(t.directory,t.id),ke(t),await h.client.session.update({directory:t.directory,sessionID:t.id,time:{archived:Date.now()}}).then(()=>!0).catch(g=>(we({title:s.t("common.archive"),description:Ue(g,s.t("common.requestFailed"))}),!1))||u.project.loadSessions(t.directory)}async function je(t){return await h.client.session.delete({sessionID:t.id,directory:t.directory}).then(g=>g.data).catch(g=>(we({title:s.t("session.delete.failed.title"),description:Ue(g,s.t("common.requestFailed"))}),!1))?(be(t.directory,t.id),ke(t),!0):!1}function xe(t){const l=$e(t);P.show(()=>e(mt,{get title(){return s.t("session.delete.title")},fit:!0,get children(){var g=yt(),W=g.firstChild,j=W.nextSibling;return r(W,()=>s.t("session.delete.confirm",{name:l})),r(j,e(Fe,{variant:"ghost",size:"large",onClick:()=>P.close(),get children(){return s.t("common.cancel")}}),null),r(j,e(Fe,{variant:"primary",size:"large",onClick:()=>{je(t).then(G=>{G&&P.close()})},get children(){return s.t("session.delete.button")}}),null),g}}))}function ze(t){const[l]=u.child(t,{bootstrap:!1});return Ke(l,Date.now(),t).map(g=>({session:g,directory:t}))}function $e(t){const[l]=u.child(t.directory,{bootstrap:!1});return an({title:t.title,fallbackText:cn(t.id,l.message,l.part),emptyLabel:s.t("command.session.new")})}function Ce(t,l){if(de(t.directory)===de(l))return;if(!_e(J(),t.directory)){we({title:s.t("session.move.failed.title"),description:s.t("session.move.failed.onlyDefault")});return}if(_e(J(),l)){we({title:s.t("session.move.failed.title"),description:s.t("session.move.failed.onlyDefault")});return}const g=Ne({worktree:l});P.show(()=>e(mt,{get title(){return s.t("session.move.confirm.title")},fit:!0,get children(){var W=yt(),j=W.firstChild,G=j.nextSibling;return r(j,()=>s.t("session.move.confirm.description",{project:g})),r(G,e(Fe,{variant:"ghost",size:"large",onClick:()=>P.close(),get children(){return s.t("common.cancel")}}),null),r(G,e(Fe,{variant:"primary",size:"large",onClick:()=>{Ae(t,l).then(re=>{re&&P.close()})},get children(){return s.t("session.move.confirm.action")}}),null),W}}))}async function Ae(t,l){const g=t.directory;return await h.client.session.update({directory:t.directory,sessionID:t.id,moveTo:l}).then(()=>!0).catch(j=>(we({title:s.t("session.move.failed.title"),description:Ue(j,s.t("common.requestFailed"))}),!1))?(be(g,t.id),L.projects.open(l),z.projects.touchCode(l),u.project.loadSessions(g),u.project.loadSessions(l),V()===t.id?(o(ce(l,t.id)),!0):(we({title:s.t("session.move.success.title"),description:s.t("session.move.success.description",{project:Ne({worktree:l})})}),!0)):!1}function We(){P.show(()=>e(dn,{tab:"account"}))}return(()=>{var t=ur(),l=t.firstChild,g=l.nextSibling,W=g.firstChild,j=W.firstChild,G=j.nextSibling,re=G.firstChild,Tt=re.firstChild,jt=Tt.nextSibling,rt=jt.firstChild,zt=re.nextSibling,st=G.nextSibling,it=st.firstChild,At=it.firstChild,Wt=At.nextSibling,ot=Wt.firstChild,Ft=it.nextSibling,Ht=g.nextSibling,lt=Ht.firstChild,at=lt.firstChild;return Qt(l,Zt(()=>m.platform==="desktop"?{"data-tauri-drag-region":!0}:{}),!1,!0),r(l,e(ie,{get href(){return en(m.platform)},class:"os-sidebar-brand-link",get children(){return[e(Yt,{class:"os-sidebar-brand-mark"}),(()=>{var x=Kn();return r(x,()=>Jt(m.platform)),x})()]}})),r(j,e(ie,{get href(){return tn()},class:"os-sidebar-link",get classList(){return{"is-active":D()}},get children(){return[Xn(),Un()]}}),null),r(j,e(ie,{get href(){return nn()},class:"os-sidebar-link",get classList(){return{"is-active":T()}},get children(){return[Vn(),Gn()]}}),null),r(j,e(ie,{get href(){return rn()},class:"os-sidebar-link",get classList(){return{"is-active":f()}},get children(){return[Qn(),Zn()]}}),null),r(j,e(ie,{get href(){return sn()},class:"os-sidebar-link",get classList(){return{"is-active":y()}},get children(){return[Yn(),Jn()]}}),null),rt.$$click=fe,r(zt,e(_,{get when(){return ve(()=>!!$())()&&q().length>0},get fallback(){return e(_,{get when(){return $()},get children(){return hr()}})},get children(){return e(pe,{get each(){return q()},children:x=>(()=>{var H=mr(),Z=H.firstChild;return r(Z,e(ie,{get href(){return ce(x.worktree)},class:"os-client-project-item",get children(){return Ne(x)}}),null),r(Z,e(k,{get children(){return[e(k.Trigger,{type:"button",class:"os-client-project-more",get"aria-label"(){return s.t("common.moreOptions")},onClick:Y=>Y.stopPropagation(),children:"..."}),e(k.Portal,{get children(){return e(k.Content,{class:Ve,get children(){return[e(k.Item,{"data-action":"project-new-session",class:"os-client-session-menu-item",onSelect:()=>Te(x.worktree),get children(){return[e(ue,{name:"new-session",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return s.t("command.session.new")}})]}}),e(k.Item,{"data-action":"project-rename",class:"os-client-session-menu-item",onSelect:()=>K(x),get children(){return[e(ue,{name:"edit",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return s.t("common.rename")}})]}}),e(k.Separator,{class:"os-client-session-menu-separator"}),e(k.Item,{"data-action":"project-remove-from-view",class:"os-client-session-menu-item",onSelect:()=>Me(x),get children(){return[e(ue,{name:"close-small",size:"small",class:"os-client-session-menu-icon"}),e(k.ItemLabel,{class:"os-client-session-menu-label",get children(){return s.t("sidebar.project.removeFromView")}})]}})]}})}})]}}),null),r(H,e(_,{get when(){return me(x)},get children(){var Y=gr();return r(Y,e(pe,{get each(){return ze(x.worktree)},children:I=>(()=>{var B=kt();return r(B,e(ie,{get href(){return ce(I.directory,I.session.id)},class:"os-client-task-item",get classList(){return{"is-active":V()===I.session.id}},get"data-session-id"(){return I.session.id},get children(){var ne=Ge(),qe=ne.firstChild;return r(qe,()=>$e(I.session)),ne}}),null),r(B,e(k,{get children(){return[e(k.Trigger,{type:"button",class:"os-client-session-more",get"aria-label"(){return s.t("common.moreOptions")},onClick:ne=>ne.stopPropagation(),children:"..."}),e(k.Portal,{get children(){return e(k.Content,{class:Ve,get children(){return e(_t,{get currentDirectory(){return I.directory},projects:q,onArchive:()=>void Se(I.session),onDelete:()=>xe(I.session),onMove:ne=>Ce(I.session,ne),onNewProject:fe})}})}})]}}),null),N(()=>B.classList.toggle("is-active",V()===I.session.id)),B})()})),Y}}),null),H})()})}})),r(G,e(_,{get when(){return!$()},get children(){return er()}}),null),ot.$$click=Re,r(Ft,e(_,{get when(){return ve(()=>!!$())()&&te().length>0},get fallback(){return e(_,{get when(){return $()},get children(){return vr()}})},get children(){return[(()=>{var x=tr();return r(x,e(pe,{get each(){return ge()},children:H=>(()=>{var Z=kt();return r(Z,e(ie,{get href(){return ce(H.directory,H.session.id)},class:"os-client-task-item",get classList(){return{"is-active":V()===H.session.id}},get"data-session-id"(){return H.session.id},get children(){var Y=Ge(),I=Y.firstChild;return r(I,()=>$e(H.session)),Y}}),null),r(Z,e(k,{get children(){return[e(k.Trigger,{type:"button",class:"os-client-session-more",get"aria-label"(){return s.t("common.moreOptions")},onClick:Y=>Y.stopPropagation(),children:"..."}),e(k.Portal,{get children(){return e(k.Content,{class:Ve,get children(){return e(_t,{get currentDirectory(){return H.directory},projects:q,onArchive:()=>void Se(H.session),onDelete:()=>xe(H.session),onMove:Y=>Ce(H.session,Y),onNewProject:fe})}})}})]}}),null),N(()=>Z.classList.toggle("is-active",V()===H.session.id)),Z})()})),N(()=>R(x,"data-expanded",X()?"true":"false")),x})(),e(_,{get when(){return d()},get children(){var x=nr();return x.$$click=()=>Q(!0),x}}),e(_,{get when(){return M()},get children(){var x=rr();return x.$$click=()=>Q(!1),x}})]}})),r(st,e(_,{get when(){return!$()},get children(){return sr()}}),null),r(g,e(_,{get when(){return ae()},get children(){var x=ar(),H=x.firstChild,Z=H.firstChild,Y=Z.nextSibling;return H.$$click=()=>C(I=>!I),r(Y,()=>s.t("sidebar.section.sharedCases")),r(x,e(_,{get when(){return O()},get children(){var I=lr();return r(I,e(_,{get when(){return b().length>0},get fallback(){return pr()},get children(){return e(pe,{get each(){return b()},children:B=>e(ie,{get href(){return ce(ae(),B.id)},class:"os-client-task-item",get classList(){return{"is-active":V()===B.id}},get"data-session-id"(){return B.id},get children(){var ne=Ge(),qe=ne.firstChild;return r(qe,()=>on(B.title)??B.id),ne}})})}}),null),r(I,e(_,{get when(){return p()},get children(){var B=ir();return B.$$click=()=>E(!0),B}}),null),r(I,e(_,{get when(){return v()},get children(){var B=or();return B.$$click=()=>E(!1),B}}),null),I}}),null),N(I=>{var B=O(),ne=O()?"true":"false";return B!==I.e&&R(H,"aria-expanded",I.e=B),ne!==I.t&&R(Z,"data-open",I.t=ne),I},{e:void 0,t:void 0}),x}}),null),r(lt,e(ie,{get href(){return ln()},class:"os-sidebar-footer-action",get classList(){return{"is-active":se()}},get children(){return[cr(),dr()]}}),at),at.$$click=We,N(x=>{var H=!$(),Z=!$();return H!==x.e&&rt.classList.toggle("is-muted",x.e=H),Z!==x.t&&ot.classList.toggle("is-muted",x.t=Z),x},{e:void 0,t:void 0}),t})()}ye(["click"]);var br=i('<pre class="os-client-right-files-preview whitespace-pre-wrap break-all p-3 text-12-regular m-0">'),$r=i("<button type=button class=os-client-right-files-back>← 返回目录"),wr=i("<span class=os-client-right-files-title>"),_r=i("<button type=button>"),yr=i("<div class=os-client-right-files-actions><button type=button>关闭"),kr=i("<p class=os-client-right-files-hint>正在加载目录…"),Sr=i("<p class=os-client-right-files-hint>该目录为空"),xr=i("<div class=os-client-right-files-tree><p class=os-client-right-files-root></p><div class=os-client-right-files-tree-scroll>"),Cr=i("<div class=os-client-right-files-unsaved>"),Lr=i("<p class=os-client-right-files-hint>…"),Pr=i("<textarea class=os-client-right-files-textarea autocapitalize=off autocomplete=off autocorrect=off>"),Er=i("<pre class=os-client-right-files-preview>"),Dr=i("<div class=os-client-right-files-editor>"),Mr=i("<section class=os-client-right-files><header class=os-client-right-files-header>"),Ir=i("<strong>目录"),Rr=i("<div class=os-client-right-files-actions><button type=button aria-label=刷新>刷新</button><button type=button>关闭"),Tr=i("<p class=os-client-right-files-hint>加载失败:"),jr=i("<p class=os-client-right-files-hint>");function zr(c){const o=c.replace(/\\/g,"/").split("/");return o[o.length-1]||c}function Ar(c){const o=pn(),s=fn(),L=De(),[u,h]=F("tree"),[m,z]=F(),[P,$]=F(""),[D,T]=F(!1),[f,y]=F(!1),[se,O]=F(0);let C;const S=w(()=>o.tree.state("")),E=w(()=>o.tree.children("")),X=w(()=>bn(m())),Q=(a=!1)=>{s.directory&&(a?o.tree.refresh(""):o.tree.list(""))};Be(()=>{queueMicrotask(()=>Q(!0))}),U(()=>{if(!s.directory||u()!=="tree")return;const b=S();b?.loading||b?.loaded||b?.error||o.tree.list("")});const le=w(()=>{const a=m();if(a)return o.get(a)}),q=w(()=>le()?.content?.content??""),ee=w(()=>!!le()?.loaded),ae=w(()=>!!le()?.loading),he=w(()=>le()?.error),V=w(()=>{const a=le();return!(!a?.loaded||a.content?.type!=="text"||a.content.encoding==="base64"||vt(m()))}),me=w(()=>V()&&X()==="text"),te=w(()=>{if(!(!V()||me()))return{draft:P,setDraft:a=>{$(a),T(!0)},textareaRef:a=>{C=a},class:"os-client-right-files-textarea"}}),ge=a=>(()=>{var b=br();return r(b,a),b})();U(()=>{const a=m();a&&o.load(a)}),U(Et(m,()=>{T(!1),$(ee()?q():""),O(0)},{defer:!1})),U(()=>{!ee()||D()||$(q())});const d=async()=>{const a=m();if(!(!a||f()||!D()||!V())){y(!0);try{await o.write(a,P()),T(!1),pt(a)&&O(b=>b+1)}finally{y(!1)}}};U(()=>{if(typeof window>"u")return;$n(window,"keydown",b=>{!(b.metaKey||b.ctrlKey)||b.key.toLowerCase()!=="s"||!C?.contains(document.activeElement)&&document.activeElement!==C||(b.preventDefault(),d())})});const M=a=>{z(a),h("editor")};return(()=>{var a=Mr(),b=a.firstChild;return r(b,e(_,{get when(){return u()==="editor"},get fallback(){return[Ir(),(()=>{var p=Rr(),v=p.firstChild,n=v.nextSibling;return v.$$click=()=>{Q(!0),o.tree.refreshAll()},Je(n,"click",c.onClose,!0),p})()]},get children(){return[(()=>{var p=$r();return p.$$click=()=>h("tree"),p})(),(()=>{var p=wr();return r(p,(()=>{var v=ve(()=>!!m());return()=>v()?zr(m()):""})()),N(()=>R(p,"title",m())),p})(),(()=>{var p=yr(),v=p.firstChild;return r(p,e(_,{get when(){return V()},get children(){var n=_r();return n.$$click=()=>void d(),r(n,(()=>{var A=ve(()=>!!f());return()=>A()?L.t("common.saving"):L.t("common.save")})()),N(()=>n.disabled=!D()||f()),n}}),v),Je(v,"click",c.onClose,!0),p})()]}})),r(a,e(_,{get when(){return u()==="tree"},get children(){var p=xr(),v=p.firstChild,n=v.nextSibling;return r(v,()=>s.directory),r(p,e(_,{get when(){return ve(()=>!!S()?.loading)()&&E().length===0},get children(){return kr()}}),n),r(p,e(_,{get when(){return S()?.error},children:A=>(()=>{var K=Tr();return K.firstChild,r(K,A,null),K})()}),n),r(p,e(_,{get when(){return ve(()=>!!(S()?.loaded&&E().length===0))()&&!S()?.error},get children(){return Sr()}}),n),r(n,e(wn,{path:"",class:"os-client-right-file-tree",nodeClass:"os-client-right-file-node",get active(){return m()},draggable:!1,onFileClick:A=>M(A.path)})),N(()=>R(v,"title",s.directory)),p}}),null),r(a,e(_,{get when(){return u()==="editor"},get children(){var p=Dr();return r(p,e(_,{get when(){return D()},get children(){var v=Cr();return r(v,()=>L.t("session.file.unsaved")),v}}),null),r(p,e(_,{get when(){return ve(()=>!!ae())()&&!ee()},get children(){var v=Lr(),n=v.firstChild;return r(v,()=>L.t("common.loading"),n),v}}),null),r(p,e(_,{get when(){return he()},children:v=>(()=>{var n=jr();return r(n,v),n})()}),null),r(p,e(_,{get when(){return ee()},get children(){return e(Dt,{get children(){return[e(oe,{get when(){return pt(m())},get children(){return e(_n,{path:m,contents:q,renderSource:ge,get editSource(){return te()},previewRevision:se,chrome:"workbench"})}}),e(oe,{get when(){return X()==="markdown"},get children(){return e(yn,{path:m,contents:q,renderSource:ge,get editSource(){return te()},chrome:"workbench"})}}),e(oe,{get when(){return X()==="csv"},get children(){return e(kn,{path:m,contents:q,renderSource:ge,get editSource(){return te()},chrome:"workbench"})}}),e(oe,{get when(){return vt(m())},get children(){return e(Sn,{path:m,chrome:"workbench"})}}),e(oe,{get when(){return Cn(m())},get children(){return e(xn,{path:m,contents:q,renderSource:ge,get editSource(){return te()},chrome:"workbench"})}}),e(oe,{get when(){return me()},get children(){var v=Pr();v.$$input=A=>{$(A.currentTarget.value),T(!0)};var n=C;return typeof n=="function"?Oe(n,v):C=v,R(v,"spellcheck",!1),N(()=>v.value=P()),v}}),e(oe,{when:!0,get children(){var v=Er();return r(v,()=>q()||"(二进制或不支持预览的文件)"),v}})]}})}}),null),p}}),null),N(()=>R(a,"data-view",u())),a})()}ye(["click","input"]);var Wr=i('<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>'),Fr=i("<ul class=os-client-right-todo-list>"),Hr=i("<span class=os-client-right-todo-text>"),Nr=i("<li class=os-client-right-todo-item>"),Or=i("<p class=os-client-right-todo-progress>已完成 <!> / "),Br=i("<section class=os-client-right-todo><header class=os-client-right-todo-header><strong></strong><button type=button>关闭"),qr=i("<p class=os-client-right-todo-empty>暂无场景工作流。从能力中心场景创建任务后,步骤会显示在这里。"),Kr=i("<span class=os-client-right-todo-stop> · ");function Xr(c){return c==="completed"?"completed":c==="in_progress"?"in_progress":c==="failed"?"cancelled":"pending"}function Ur(c){if(c==="in_progress")return Wr()}function Vr(c){return(()=>{var o=Fr();return r(o,e(pe,{get each(){return c.items},children:s=>(()=>{var L=Nr();return r(L,e(En,{readOnly:!0,get checked(){return s.status==="completed"},get indeterminate(){return s.status==="in_progress"},get icon(){return Ur(s.status)},get children(){var u=Hr();return r(u,()=>s.content),N(h=>{var m=s.status==="completed"||s.status==="cancelled",z=s.status==="pending";return m!==h.e&&u.classList.toggle("is-done",h.e=m),z!==h.t&&u.classList.toggle("is-pending",h.t=z),h},{e:void 0,t:void 0}),u}})),N(()=>R(L,"data-state",s.status)),L})()})),o})()}function Gr(c){Ln();const o=w(()=>Pn(c.directoryKey)),s=w(()=>{const h=o();return h?.steps.length?h.steps.map(m=>({content:m.name,status:Xr(m.status)})):[]}),L=w(()=>s().filter(h=>h.status==="completed").length),u=w(()=>o()?.title||"待办");return(()=>{var h=Br(),m=h.firstChild,z=m.firstChild,P=z.nextSibling;return r(z,u),Je(P,"click",c.onClose,!0),r(h,e(_,{get when(){return s().length>0},get fallback(){return qr()},get children(){return[(()=>{var $=Or(),D=$.firstChild,T=D.nextSibling;return T.nextSibling,r($,L,T),r($,()=>s().length,null),r($,e(_,{get when(){return o()?.stopReason},children:f=>(()=>{var y=Kr();return y.firstChild,r(y,f,null),y})()}),null),$})(),e(Vr,{get items(){return s()}})]}}),null),N(()=>R(z,"title",u())),h})()}ye(["click"]);var Qr=i("<div class=os-client-right-add-dropdown role=menu>"),Zr=i('<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>'),Yr=i("<button type=button role=menuitem>"),Jr=i("<section class=os-client-right-empty><strong>尚未打开页面</strong><p>点击 + 打开目录、可视化组件或待办;在会话中可从目录点文件到右侧编辑。"),es=i("<section class=os-client-right-pane-stub><header><strong>可视化组件</strong><button type=button>关闭</button></header><p>请从「目录」中打开 `.html` / `.md` / `.csv` / `.pdf` / `.xyz` 文件查看可视化预览;后续版本将提供独立可视化入口。"),ts=i("<section class=os-client-right-pane-stub><header><strong>目录</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看目录。"),ns=i("<section class=os-client-right-pane-stub><header><strong>待办</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看待办。");const rs=[{id:"directory",label:"目录"},{id:"viz",label:"可视化组件"},{id:"todo",label:"待办"}];function ss(){const c=et(),[o,s]=F(!1),[L,u]=F();let h;const m=w(()=>Mt(c.pathname)),z=w(()=>{const D=m()?.dir;return D?nt(D)??"":""}),P=w(()=>It(c.pathname)&&!!z());Be(()=>{const D=T=>{o()&&(h?.contains(T.target)||s(!1))};document.addEventListener("pointerdown",D),Ee(()=>document.removeEventListener("pointerdown",D))}),U(()=>{if(!Rt())return;const T=Dn();T&&(u(T),s(!1))});const $=D=>{u(D),s(!1)};return(()=>{var D=Zr(),T=D.firstChild,f=T.firstChild,y=f.firstChild,se=T.nextSibling,O=h;return typeof O=="function"?Oe(O,T):h=T,y.$$click=()=>s(C=>!C),r(f,e(_,{get when(){return o()},get children(){var C=Qr();return r(C,e(pe,{get each(){return[...rs]},children:S=>(()=>{var E=Yr();return E.$$click=()=>$(S.id),r(E,()=>S.label),E})()})),C}}),null),r(se,e(_,{get when(){return L()},get fallback(){return Jr()},children:C=>e(Dt,{get children(){return[e(oe,{get when(){return C()==="directory"},get children(){return e(_,{get when(){return P()},get fallback(){return(()=>{var S=ts(),E=S.firstChild,X=E.firstChild,Q=X.nextSibling;return Q.$$click=()=>u(void 0),S})()},get children(){return e(Mn,{params:()=>({dir:m().dir,id:m()?.id}),get children(){return e(In,{directory:()=>z(),get children(){return e(Rn,{get children(){return e(Tn,{get children(){return e(Ar,{onClose:()=>u(void 0)})}})}})}})}})}})}}),e(oe,{get when(){return C()==="todo"},get children(){return e(_,{get when(){return m()?.dir},get fallback(){return(()=>{var S=ns(),E=S.firstChild,X=E.firstChild,Q=X.nextSibling;return Q.$$click=()=>u(void 0),S})()},children:S=>e(Gr,{get directoryKey(){return S()},get sessionID(){return m()?.id},onClose:()=>u(void 0)})})}}),e(oe,{get when(){return C()==="viz"},get children(){var S=es(),E=S.firstChild,X=E.firstChild,Q=X.nextSibling;return Q.$$click=()=>u(void 0),S}})]}})})),N(C=>{var S=!!o(),E=o();return S!==C.e&&y.classList.toggle("is-open",C.e=S),E!==C.t&&R(y,"aria-expanded",C.t=E),C},{e:void 0,t:void 0}),D})()}ye(["click"]);var is=i('<button type=button class="os-client-panel-toggle os-client-terminal-toggle"aria-controls=terminal-panel>'),os=i('<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 ls(){const c=et(),o=tt(),s=De(),L=jn(),u=Lt(),[h,m]=F(J()),z=w(()=>Pt(c.pathname)||It(c.pathname)),P=w(()=>!z()||zn()&&!h()?!1:o.terminal.enabled()?!0:ft(h())),$=w(()=>o.view("workbench").terminal.opened()),D=w(()=>{const f=Mt(c.pathname);return f?.dir?nt(f.dir)??"":""});Be(()=>{const f=()=>m(J());window.addEventListener(bt,f),window.addEventListener($t,f),window.addEventListener("storage",f),Ee(()=>{window.removeEventListener(bt,f),window.removeEventListener($t,f),window.removeEventListener("storage",f)})}),U(()=>{P()&&wt()}),U(Et(z,(f,y)=>{y===void 0||f||!y||$()&&(o.view("workbench").terminal.close(),o.terminal.closeFullscreen())}));const T=()=>{if(ft(h())||!o.terminal.enabled()){An(()=>import("./dialog-terminal-unavailable-BPf6D9pa.js"),__vite__mapDeps([0,1,2])).then(f=>{u.show(()=>e(f.DialogTerminalUnavailable,{}))});return}if(!$()){const f=D();if(f&&!Wn(h(),f))return;wt()}o.view("workbench").terminal.toggle()};return e(_,{get when(){return P()},get children(){var f=is();return f.$$click=y=>y.preventDefault(),f.$$pointerdown=y=>{y.button===0&&(y.preventDefault(),T())},r(f,e(as,{get active(){return $()}})),N(y=>{var se=!!$(),O=s.t("command.terminal.toggle"),C=s.t("command.terminal.toggle"),S=$(),E=`${s.t("command.terminal.toggle")} (${L.keybind("terminal.toggle")})`;return se!==y.e&&f.classList.toggle("is-active",y.e=se),O!==y.t&&R(f,"data-tooltip",y.t=O),C!==y.a&&R(f,"aria-label",y.a=C),S!==y.o&&R(f,"aria-expanded",y.o=S),E!==y.i&&R(f,"title",y.i=E),y},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),f}})}function as(c){return(()=>{var o=os(),s=o.firstChild,L=s.nextSibling;return N(()=>R(L,"opacity",c.active?1:.85)),o})()}ye(["pointerdown","click"]);var cs=i('<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>'),ds=i('<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>'),us=i('<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>'),hs=i("<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 Pe=320,gs=230,ms=430,vs=200,xt=1280;function Ct(c){return(()=>{var o=cs();return N(s=>{var L=c.side,u=c.open?"true":"false";return L!==s.e&&R(o,"data-side",s.e=L),u!==s.t&&R(o,"data-open",s.t=u),s},{e:void 0,t:void 0}),o})()}function Ze(c){return Math.min(ms,Math.max(gs,Math.round(c)))}function Ye(c){const o=typeof window>"u"?xt:Math.min(xt,Math.floor(window.innerWidth*.85));return Math.min(o,Math.max(vs,Math.round(c)))}function bs(c){const o=tt(),[s,L]=F(!0),[u,h]=F(!1),[m,z]=F(Pe),[P,$]=F(Pe),[D,T]=F(!1),[f,y]=F(!1),[se,O]=F(0),[C,S]=F({left:0,right:0}),[E,X]=F(),[Q,le]=F(),q=w(()=>o.view("workbench").terminal.opened()),ee=()=>q(),ae=w(()=>{if(!q())return 0;const d=se();return d>0?d:o.terminal.height()}),he=()=>{const d=E();if(!d)return;const M=d.querySelector(":scope > .os-workspace-main");if(!M)return;const a=d.getBoundingClientRect(),b=getComputedStyle(d),p=a.left+(parseFloat(b.borderLeftWidth)||0),v=a.right-(parseFloat(b.borderRightWidth)||0),n=M.getBoundingClientRect(),K=d.querySelector(":scope > .os-client-right-sidebar")?.getBoundingClientRect()??n;S({left:Math.max(0,Math.round(n.left-p)),right:Math.max(0,Math.round(v-K.right))})},V=()=>{L(d=>(d||z(Pe),!d))},me=()=>{h(d=>(d||$(Pe),!d))};U(()=>{Rt()&&(h(!0),$(M=>M>0?M:Pe))});const te=d=>{if(d.button!==0)return;d.preventDefault();const M=d.clientX,a=m();T(!0);const b=v=>{z(Ze(a+(v.clientX-M)))},p=()=>{T(!1),window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p)};window.addEventListener("pointermove",b),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p)},ge=d=>{if(d.button!==0)return;d.preventDefault();const M=d.clientX,a=P();y(!0);const b=v=>{$(Ye(a+(M-v.clientX)))},p=()=>{y(!1),window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p)};window.addEventListener("pointermove",b),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p)};return U(()=>{const d=Q();if(!d||typeof ResizeObserver>"u")return;const M=()=>{const b=d.querySelector("#terminal-panel");O(b?Math.round(b.getBoundingClientRect().height):0)};M();const a=new ResizeObserver(M);a.observe(d),Ee(()=>a.disconnect())}),U(()=>{q()||O(0)}),Be(()=>{o.view("workbench").terminal.close(),o.terminal.closeFullscreen(),O(0)}),U(()=>{s(),u(),m(),P(),D(),f(),ee(),E(),he();const d=requestAnimationFrame(he);Ee(()=>cancelAnimationFrame(d))}),U(()=>{const d=E();if(!d||typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>he());M.observe(d);const a=d.querySelector(":scope > .os-workspace-main");a&&M.observe(a);const b=d.querySelector(":scope > .os-client-right-sidebar");b&&M.observe(b),Ee(()=>M.disconnect())}),(()=>{var d=hs(),M=d.firstChild,a=M.firstChild,b=a.nextSibling,p=M.nextSibling,v=p.nextSibling;return Oe(X,d),a.$$click=V,r(a,e(Ct,{side:"left",get open(){return s()}})),r(M,e(ls,{}),b),b.$$click=me,r(b,e(Ct,{side:"right",get open(){return u()}})),r(d,e(_,{get when(){return s()},get children(){return[e(fr,{}),(()=>{var n=ds();return n.$$keydown=A=>{if(A.key==="ArrowLeft"){A.preventDefault(),z(K=>Ze(K-16));return}A.key==="ArrowRight"&&(A.preventDefault(),z(K=>Ze(K+16)))},n.$$pointerdown=te,N(()=>R(n,"aria-valuenow",m())),n})()]}}),p),r(p,()=>c.children),r(d,e(_,{get when(){return u()},get children(){return[(()=>{var n=us();return n.$$keydown=A=>{if(A.key==="ArrowLeft"){A.preventDefault(),$(K=>Ye(K+16));return}A.key==="ArrowRight"&&(A.preventDefault(),$(K=>Ye(K-16)))},n.$$pointerdown=ge,N(()=>R(n,"aria-valuenow",P())),n})(),e(ss,{})]}}),v),Oe(le,v),R(v,"id",Fn),N(n=>{var A=!!s(),K=!!u(),Me=!!D(),Ie=!!f(),fe=!!ee(),Re=!!(o.terminal.fullscreen()&&o.view("workbench").terminal.opened()),Te=`${m()}px`,ke=`${P()}px`,be=`${ae()}px`,Se=`${C().left}px`,je=`${C().right}px`,xe=!!s(),ze=s()?"关闭左侧栏":"打开左侧栏",$e=s()?"关闭左侧栏":"打开左侧栏",Ce=!!u(),Ae=u()?"关闭右侧栏":"打开右侧栏",We=u()?"关闭右侧栏":"打开右侧栏",t=!!ee(),l=!ee();return A!==n.e&&d.classList.toggle("has-left-sidebar",n.e=A),K!==n.t&&d.classList.toggle("has-right-sidebar",n.t=K),Me!==n.a&&d.classList.toggle("is-resizing-left",n.a=Me),Ie!==n.o&&d.classList.toggle("is-resizing-right",n.o=Ie),fe!==n.i&&d.classList.toggle("has-terminal-open",n.i=fe),Re!==n.n&&d.classList.toggle("has-terminal-fullscreen",n.n=Re),Te!==n.s&&Le(d,"--os-client-sidebar-w",n.s=Te),ke!==n.h&&Le(d,"--os-client-tool-w",n.h=ke),be!==n.r&&Le(d,"--os-client-terminal-h",n.r=be),Se!==n.d&&Le(d,"--os-client-terminal-left",n.d=Se),je!==n.l&&Le(d,"--os-client-terminal-right",n.l=je),xe!==n.u&&a.classList.toggle("is-active",n.u=xe),ze!==n.c&&R(a,"data-tooltip",n.c=ze),$e!==n.w&&R(a,"aria-label",n.w=$e),Ce!==n.m&&b.classList.toggle("is-active",n.m=Ce),Ae!==n.f&&R(b,"data-tooltip",n.f=Ae),We!==n.y&&R(b,"aria-label",n.y=We),t!==n.g&&v.classList.toggle("is-open",n.g=t),l!==n.p&&R(v,"aria-hidden",n.p=l),n},{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}),d})()}ye(["click","pointerdown","keydown"]);export{bs as WorkbenchShell};
@@ -1 +0,0 @@
1
- import{R as q,Q as D,O as I,c as k,B as g,y as N,i as a,b as o,t as v,dg as u,d as O,ab as E,cK as B,bm as H,cy as _,ct as C,cs as L,x as K,A as Q,bN as x,S as z,f as G,s as J,F as V,m as X,dh as Y}from"./index-Cxa2Vk80.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=q(),s=D(),A=I(),[b,P]=k(0),R=g(()=>(b(),!!E())),d=g(()=>!R()),[n,T]=k(ae(c.search)??"list"),M=g(()=>{b();const e=E();return e&&(B(e,A.projects.lastCode())||H(e))||""}),p=e=>{T(e),s(x(e),{replace:!0})};N(()=>{const e=()=>P(i=>i+1);window.addEventListener(_,e),window.addEventListener(C,e),window.addEventListener(L,e),K(()=>{window.removeEventListener(_,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,m=i.firstChild,F=m.firstChild,f=F.nextSibling,U=f.nextSibling,w=m.nextSibling,W=i.nextSibling;return a(f,()=>h().label),a(U,()=>h().hint),a(i,o(z,{get when(){return d()},get children(){var t=Z();return t.firstChild,a(t,o(Q,{get href(){return`/login?redirect=${encodeURIComponent(x(n()))}`},children:"去登录"}),null),t}}),w),a(w,o(V,{each:u,children:t=>(()=>{var r=te(),S=r.firstChild,j=S.nextSibling;return r.$$click=()=>p(t.id),a(S,()=>t.label),a(j,()=>t.hint),G(l=>{var $=n()===t.id,y=n()===t.id;return $!==l.e&&r.classList.toggle("is-active",l.e=$),y!==l.t&&J(r,"aria-pressed",l.t=y),l},{e:void 0,t:void 0}),r})()})),a(W,o(Y,{get directory(){return X(()=>!!d())()?void 0:M()||void 0},get loginRequired(){return d()},get tab(){return n()},onTabChange:p,variant:"page-body"})),e})()}O(["click"]);export{ne as WorkbenchSkillsPage};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cxa2Vk80.js","assets/index-q70uwQje.css"])))=>i.map(i=>d[i]);
2
- import{d_ as z,T as X,V as Y,at as I,W as Z,Q as ee,bC as H,x as K,c as te,a as ae,e1 as se,e2 as Q,e3 as ne,e4 as re,B as O,e5 as le,i as a,b as s,e6 as b,S as _,F as A,dn as ce,m as T,f as G,ar as oe,bT as w,e7 as ie,s as ue,c0 as de,di as ge,dl as pe,bk as he,az as ve,t as u,bO as be,cv as me,d as fe}from"./index-Cxa2Vk80.js";var xe=u("<div class=os-ssh-dialog-stack>"),N=u('<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">'),ye=u('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),V=u('<div class="text-14-regular text-text-base text-center my-auto py-2">'),_e=u('<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>'),$e=u('<span class="text-11-regular text-text-weaker shrink-0">· 检测中...'),ke=u('<span class="text-12-regular text-text-weak truncate pl-3.5">'),Se=u('<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">'),we=u('<span class="text-11-regular text-text-weaker shrink-0">· ');const Ce=()=>{const $=z(),m=de(),f=H(),k=I(),C=ge();return pe(()=>({mutationFn:async i=>{await($.data.mcp[i]?.status==="connected"?m.client.mcp.disconnect({name:i}):m.client.mcp.connect({name:i}))},onSuccess:()=>k.refetchQueries(C.mcp(ve($.directory))),onError:i=>{he({variant:"error",title:f.t("common.requestFailed"),description:i instanceof Error?i.message:String(i)})}}))};function De($){const m=z(),f=X(),k=Y(),C=I(),i=Z(),E=ee(),c=H();let M=0,F=!1;K(()=>{F=!0,M+=1});const[L,R]=te();ae(()=>{if(!$.shown()){R(void 0);return}let r=!1;const e=Q();(async()=>{const t=await se(k.url);r||e!==Q()||t===void 0||(R(t),ne(t),await re({serverUrl:k.url,queryClient:C}).catch(()=>{}))})(),K(()=>{r=!0})});const d=Ce(),B=O(()=>{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))}),U=r=>m.data.mcp?.[r]?.status,j=O(()=>{const r=L()??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))}),W=O(()=>L()??f.data.config.ssh),D=le({ssh:W}),P=r=>{const e=++M;me(()=>import("./index-Cxa2Vk80.js").then(t=>t.e9),__vite__mapDeps([0,1])).then(t=>{F||M!==e||i.show(()=>(()=>{var o=xe();return a(o,s(t.DialogSelectSsh,{initialMode:r})),o})())})},q=r=>{E(be("mcp",r))};return(()=>{var r=ye();return a(r,s(b,{get"aria-label"(){return c.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(b.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 pt-2 pb-0 gap-3 h-10",get children(){return[s(b.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return c.t("status.popover.tab.mcp")}}),s(b.Trigger,{value:"ssh","data-slot":"tab",class:"text-12-regular",get children(){return c.t("status.popover.tab.ssh")}})]}}),s(b.Content,{value:"mcp",get children(){var e=N(),t=e.firstChild,o=t.firstChild;return a(t,s(_,{get when(){return B().length>0},get fallback(){return(()=>{var n=V();return a(n,()=>c.t("dialog.mcp.empty")),n})()},get children(){return s(A,{get each(){return B()},children:n=>{const h=()=>U(n),g=()=>h()==="connected";return(()=>{var p=_e(),x=p.firstChild,y=x.nextSibling,S=y.nextSibling;return p.$$click=()=>{d.isPending||d.mutate(n)},a(y,n),S.$$click=l=>l.stopPropagation(),a(S,s(ce,{get checked(){return g()},get disabled(){return T(()=>!!d.isPending)()&&d.variables===n},onChange:()=>{d.isPending||d.mutate(n)}})),G(l=>{var v=d.isPending&&d.variables===n,J={"size-2 rounded-full shrink-0":!0,"bg-icon-success-base":g(),"bg-border-weak-base":!g()};return v!==l.e&&(p.disabled=l.e=v),l.t=oe(x,J,l.t),l},{e:void 0,t:void 0}),p})()}})}}),o),a(o,s(w,{variant:"secondary",class:"h-8 px-3 py-1.5",onClick:()=>q(),get children(){return c.t("status.popover.action.manageMcp")}}),null),a(o,s(w,{variant:"secondary",icon:"plus-small",class:"h-8 px-3 py-1.5",onClick:()=>q("add"),get children(){return c.t("dialog.mcp.addButton")}}),null),e}}),s(b.Content,{value:"ssh",get children(){var e=N(),t=e.firstChild,o=t.firstChild;return a(t,s(_,{get when(){return j().length>0},get fallback(){return(()=>{var n=V();return a(n,()=>c.t("dialog.ssh.empty")),n})()},get children(){return s(A,{get each(){return j()},children:n=>{const h=()=>D.byName()[n.name];return(()=>{var g=Se(),p=g.firstChild,x=p.firstChild,y=x.nextSibling,S=y.nextSibling;return g.$$click=()=>P(),a(y,()=>n.name),a(S,(()=>{var l=T(()=>n.config.enabled===!1);return()=>l()?c.t("dialog.ssh.status.disabled"):c.t("dialog.ssh.status.enabled")})()),a(p,s(_,{get when(){return h()},children:l=>(()=>{var v=we();return v.firstChild,a(v,()=>ie(l().connectivity),null),v})()}),null),a(p,s(_,{get when(){return T(()=>!!D.loading())()&&!h()},get children(){return $e()}}),null),a(g,s(_,{get when(){return n.config.remotePath},get children(){var l=ke();return a(l,()=>n.config.remotePath),l}}),null),G(()=>ue(x,"data-state",D.loading()&&!h()?"testing":h()?.connectivity??"idle")),g})()}})}}),o),a(o,s(w,{variant:"secondary",class:"h-8 px-3 py-1.5",onClick:()=>P(),get children(){return c.t("status.popover.action.manageSsh")}}),null),a(o,s(w,{variant:"secondary",icon:"plus-small",class:"h-8 px-3 py-1.5",onClick:()=>P("add"),get children(){return c.t("dialog.ssh.addButton")}}),null),e}})]}})),r})()}fe(["click"]);export{De as StatusPopoverBody};
@@ -1 +0,0 @@
1
- import{d as Ge,W as Xe,b3 as Ke,c$ as De,a as et,B as j,d0 as tt,d1 as xe,d2 as ze,d3 as He,d4 as oe,d5 as it,d6 as at,e as _e,i as t,b as a,S as g,f,F as E,s as A,m as Me,d7 as lt,d8 as Ue,d9 as rt,t as l,da as nt,cY as st,R as ct,db as ot,Q as dt,T as ut,U as pt,O as gt,c as bt,y as ht,bp as Ie,a9 as Pe,bm as Fe,ab as fe,ao as Le,p as Te,q as Re,r as We,bk as je,bw as qe,dc as $t,dd as vt,de as _t,cI as Ne,cT as Qe,df as mt,cR as ft,A as Z,$ as Ee,cZ as yt,cU as St,c_ as wt,al as Ct}from"./index-Cxa2Vk80.js";var xt=l("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),zt=l("<div class=os-client-capability-wizard-papers><h3>相关论文"),kt=l("<p class=os-client-capability-wizard-note>工作目录与运行环境由系统自动识别,本步只需填写下列业务参数。"),It=l("<p class=os-client-capability-wizard-missing>本步还有 <!> 个必填参数未填写。"),Pt=l("<p class=os-client-capability-wizard-missing>其他步骤还有 <!> 个必填参数未填写,可点击左侧步骤继续补全。"),ke=l("<small>"),Ft=l("<ul class=os-client-capability-wizard-output-list>"),Lt=l("<div class=os-client-capability-wizard-quality><strong>质量门禁</strong><p>"),Tt=l('<div class="os-client-capability-wizard-outputs os-client-capability-wizard-overall"aria-label=全局交付要点><div class=os-client-capability-wizard-outputs-head><span>全局交付要点</span></div><ul class=os-client-capability-wizard-output-list>'),Rt=l('<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=场景向导><button type=button class=os-client-capability-wizard-backdrop aria-label=关闭场景></button><section class=os-client-capability-wizard-dialog><header class=os-client-capability-wizard-head><button type=button class=os-client-capability-wizard-intro-back>返回场景列表</button><div class=os-client-capability-wizard-head-title><h2></h2><p></p></div><button type=button class=os-client-capability-wizard-close aria-label=关闭>×</button></header><div class=os-client-capability-wizard-columns><aside class=os-client-capability-wizard-column aria-label=工作流><h3>工作流</h3><p class=os-client-capability-wizard-note>点击步骤查看对应参数与产出;创建后将自动按序执行。</p><ol class=os-client-capability-wizard-workflow></ol></aside><section class=os-client-capability-wizard-column aria-label=补充信息><div class=os-client-capability-wizard-column-head><h3>本步参数</h3><small>/<!> · 已填 <!>/</small></div><div class=os-client-capability-wizard-fields></div><div class=os-client-capability-wizard-step-nav><button type=button>上一步</button><button type=button>下一步</button></div></section><section class=os-client-capability-wizard-column aria-label="本步产出与 Prompt"><div class=os-client-capability-wizard-outputs aria-label=本步产出><div class=os-client-capability-wizard-outputs-head><span>本步产出</span></div></div><div class=os-client-capability-wizard-column-head><h3>本步 Prompt</h3><small>第 <!> 步</small></div><textarea class=os-client-capability-wizard-prompt rows=12 readonly></textarea></section></div><footer class=os-client-capability-wizard-footer><button type=button>返回能力中心</button><button type=button data-primary=true>创建任务并自动逐步执行'),Wt=l("<em>参数 <!>/"),jt=l("<li><button type=button class=os-client-capability-wizard-step><span></span><div><p>"),qt=l("<a target=_blank rel=noreferrer> · "),Ot=l("<div class=os-client-capability-wizard-step-banner><strong>"),Dt=l("<p>"),Ht=l("<p class=os-client-capability-wizard-note>本步无需额外用户参数。"),Mt=l("<em>*"),Ut=l("<textarea rows=3>"),Et=l("<label class=os-client-capability-wizard-field><span>"),At=l("<input type=text>"),Vt=l("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Ae=l("<li>");function Bt(e){const d=Xe(),[s,$]=Ke({values:De(e.scenario),attempted:!1,activeStepIndex:0});et(()=>{$({values:De(e.scenario),attempted:!1,activeStepIndex:0})});const y=j(()=>tt(e.scenario)),k=j(()=>y()[s.activeStepIndex]??y()[0]),V=j(()=>{const v=k();return v?xe(e.scenario,v):e.scenario.user_input}),L=j(()=>ze(e.scenario,s.values)),de=j(()=>V().filter(v=>He(v)?!String(s.values[oe(v)]??"").trim():!1)),J=j(()=>V().filter(v=>String(s.values[oe(v)]??"").trim()).length),ye=j(()=>{const T=k()?.prompt||e.scenario.ai_prompt?.template||"";return it(T,s.values)}),C=j(()=>k()?.outputs??[]),B=j(()=>at(e.scenario)),G=()=>(e.scenario.related_papers??[]).slice(0,3),ae=(v,T)=>{$("values",v,T)},H=v=>{$("activeStepIndex",v)},ue=()=>{$("attempted",!0);const v=ze(e.scenario,s.values);if(v.length===0){e.onSubmit({values:{...s.values}});return}const T=oe(v[0]),le=y().findIndex(K=>xe(e.scenario,K).some(q=>oe(q)===T));le>=0&&$("activeStepIndex",le),d.show(()=>a(nt,{title:"请补充必填参数",get reason(){return`还有 ${v.length} 个必填参数未填写,补充后即可创建任务并自动逐步执行。`},fields:v,get values(){return s.values},onConfirm:K=>{const q={...s.values,...K};$("values",q),!(ze(e.scenario,q).length>0)&&e.onSubmit({values:q})}}))};return(()=>{var v=Rt(),T=v.firstChild,le=T.nextSibling,K=le.firstChild,q=K.firstChild,re=q.nextSibling,he=re.firstChild,Se=he.nextSibling,r=re.nextSibling,p=K.nextSibling,h=p.firstChild,_=h.firstChild,R=_.nextSibling,N=R.nextSibling,M=h.nextSibling,pe=M.firstChild,we=pe.firstChild,Q=we.nextSibling,ne=Q.firstChild,ge=ne.nextSibling,be=ge.nextSibling,$e=be.nextSibling;$e.nextSibling;var Y=pe.nextSibling,ve=Y.nextSibling,se=ve.firstChild,ce=se.nextSibling,u=M.nextSibling,o=u.firstChild,m=o.firstChild;m.firstChild;var x=o.nextSibling,P=x.firstChild,W=P.nextSibling,O=W.firstChild,X=O.nextSibling;X.nextSibling;var U=x.nextSibling,ee=p.nextSibling,te=ee.firstChild,Ce=te.nextSibling;return _e(T,"click",e.onClose,!0),_e(q,"click",e.onClose,!0),t(he,()=>e.scenario.name),t(Se,()=>e.scenario.problem_and_applicability),_e(r,"click",e.onClose,!0),t(N,a(E,{get each(){return y()},children:(i,n)=>{const c=()=>xe(e.scenario,i),w=()=>c().filter(D=>String(s.values[oe(D)]??"").trim()).length,S=()=>c().length;return(()=>{var D=jt(),b=D.firstChild,F=b.firstChild,ie=F.nextSibling,I=ie.firstChild;return b.$$click=()=>H(n()),t(F,()=>n()+1),t(I,()=>i.name),t(ie,a(g,{get when(){return i.purpose},get children(){var z=ke();return t(z,()=>i.purpose),z}}),null),t(ie,a(g,{get when(){return S()>0},get children(){var z=Wt(),Je=z.firstChild,Oe=Je.nextSibling;return Oe.nextSibling,t(z,w,Oe),t(z,S,null),z}}),null),f(()=>D.classList.toggle("is-active",s.activeStepIndex===n())),D})()}})),t(h,a(g,{get when(){return e.scenario.HPC},get children(){var i=xt(),n=i.firstChild,c=n.nextSibling;return t(c,()=>e.scenario.HPC),i}}),null),t(h,a(g,{get when(){return G().length>0},get children(){var i=zt();return i.firstChild,t(i,a(E,{get each(){return G()},children:n=>(()=>{var c=qt(),w=c.firstChild;return t(c,()=>n.paper_id,w),t(c,()=>n.relation,null),f(()=>A(c,"href",n.url)),c})()}),null),i}}),null),t(Q,()=>s.activeStepIndex+1,ne),t(Q,()=>y().length,ge),t(Q,J,$e),t(Q,()=>V().length,null),t(M,a(g,{get when(){return k()},children:i=>(()=>{var n=Ot(),c=n.firstChild;return t(c,()=>i().name),t(n,a(g,{get when(){return i().purpose},children:w=>(()=>{var S=Dt();return t(S,w),S})()}),null),n})()}),Y),t(M,a(g,{get when(){return e.scenario.system_auto_detection?.fields?.length},get children(){return kt()}}),Y),t(M,a(g,{get when(){return Me(()=>!!s.attempted)()&&de().length>0},get children(){var i=It(),n=i.firstChild,c=n.nextSibling;return c.nextSibling,t(i,()=>de().length,c),i}}),Y),t(M,a(g,{get when(){return Me(()=>!!(s.attempted&&L().length>0))()&&de().length===0},get children(){var i=Pt(),n=i.firstChild,c=n.nextSibling;return c.nextSibling,t(i,()=>L().length,c),i}}),Y),t(Y,a(g,{get when(){return V().length>0},get fallback(){return Ht()},get children(){return a(E,{get each(){return V()},children:i=>{const n=oe(i),c=He(i),w=s.attempted&&c&&!String(s.values[n]??"").trim();return(()=>{var S=Et(),D=S.firstChild;return S.classList.toggle("is-required",!!c),S.classList.toggle("is-invalid",!!w),t(D,()=>lt(i),null),t(D,a(g,{when:c,get children(){return Mt()}}),null),t(S,a(g,{get when(){return rt(i)},get fallback(){return(()=>{var b=At();return b.$$input=F=>ae(n,F.currentTarget.value),f(()=>A(b,"placeholder",Ue(i))),f(()=>b.value=s.values[n]??""),b})()},get children(){var b=Ut();return b.$$input=F=>ae(n,F.currentTarget.value),f(()=>A(b,"placeholder",Ue(i))),f(()=>b.value=s.values[n]??""),b}}),null),S})()}})}})),se.$$click=()=>H(Math.max(0,s.activeStepIndex-1)),ce.$$click=()=>H(Math.min(y().length-1,s.activeStepIndex+1)),t(m,a(g,{get when(){return k()?.result_subfolder},get children(){var i=ke();return t(i,()=>k()?.result_subfolder),f(()=>A(i,"title",k()?.result_subfolder)),i}}),null),t(o,a(g,{get when(){return C().length>0},get fallback(){return Vt()},get children(){var i=Ft();return t(i,a(E,{get each(){return C()},children:n=>(()=>{var c=Ae();return t(c,n),c})()})),i}}),null),t(o,a(g,{get when(){return k()?.quality_gate},get children(){var i=Lt(),n=i.firstChild,c=n.nextSibling;return t(c,()=>k()?.quality_gate),i}}),null),t(u,a(g,{get when(){return B().length>0},get children(){var i=Tt(),n=i.firstChild;n.firstChild;var c=n.nextSibling;return t(n,a(g,{get when(){return e.scenario.results_folder},get children(){var w=ke();return t(w,()=>e.scenario.results_folder),f(()=>A(w,"title",e.scenario.results_folder)),w}}),null),t(c,a(E,{get each(){return B().slice(0,6)},children:w=>(()=>{var S=Ae();return t(S,w),S})()})),i}}),x),t(W,()=>s.activeStepIndex+1,X),_e(te,"click",e.onClose,!0),Ce.$$click=ue,f(i=>{var n=s.activeStepIndex<=0,c=s.activeStepIndex>=y().length-1;return n!==i.e&&(se.disabled=i.e=n),c!==i.t&&(ce.disabled=i.t=c),i},{e:void 0,t:void 0}),f(()=>U.value=ye()),v})()}Ge(["click","input"]);function Gt(e,d){return e.replace(/\{\{(\w+)\}\}/g,(s,$)=>d[$]??"")}var Kt=l("<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=能力向导>"),Nt=l("<section class=os-client-capability-wizard-dialog><p>未找到该能力。"),Qt=l("<div class=os-client-capability-wizard-scenario-group><span>完整工作流场景"),Yt=l("<section class=os-client-capability-wizard-dialog><header class=os-client-capability-wizard-head><div class=os-client-capability-wizard-head-title><h2></h2></div></header><div class=os-client-capability-wizard-columns><aside class=os-client-capability-wizard-column aria-label=你想做什么?><h3>你想做什么?</h3><div class=os-client-capability-wizard-scenarios></div></aside><section class=os-client-capability-wizard-column aria-label=补充信息><h3>补充信息</h3></section><section class=os-client-capability-wizard-column aria-label=起始任务><div class=os-client-capability-wizard-column-head><h3>起始任务</h3><button type=button>重新生成</button></div><textarea class=os-client-capability-wizard-prompt rows=14></textarea></section></div><footer class=os-client-capability-wizard-footer><button type=button data-primary=true>创建任务"),Zt=l("<section class=os-client-capability-wizard-dialog><p>「<!>」暂无 OneScience 源码或魔搭映射,当前不可使用。"),Jt=l("<button type=button><strong></strong><p>"),Xt=l("<button type=button><strong></strong><p></p><small> · <!> 步"),Ve=l("<p class=os-client-capability-wizard-empty>请先选择任务场景。"),ei=l("<div class=os-client-capability-wizard-required aria-label=该能力需要什么数据><h4>该能力需要什么数据</h4><ul>"),ti=l("<div class=os-client-capability-wizard-middle><div class=os-client-capability-wizard-fields></div><div class=os-client-capability-wizard-summary aria-label=当前能力配置><h4>当前能力配置</h4><dl><div><dt>当前能力</dt><dd></dd></div><div><dt>关键配置</dt><dd></dd></div><div><dt>运行资源</dt><dd></dd></div><div><dt>交付结果</dt><dd>"),ii=l("<textarea rows=3>"),ai=l("<label class=os-client-capability-wizard-field><span>"),li=l("<input type=text>"),ri=l("<li>"),ni=l("<div class=os-client-capability-wizard-right-head><strong></strong><p>"),si=l("<div class=os-client-capability-wizard-outputs aria-label=预计产出><span>预计产出</span><p>");function ci(e){return e==="hpc"?"软件介绍":"模型介绍"}function oi(e){return`使用 ${e} 开始科研任务`}function di(e){if(!Ie({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const d=Pe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Fe(fe())||Le(document,e.path);if(!d)return!1;const s=Te(d);return Re(s,e.prompt),We(s),e.openProject?.(d),e.touchCode?.(d),je({variant:"success",title:`已为你创建「${e.title}」任务`}),e.navigate(qe(d)),!0}function Ye(e){const d=$t(e.scenario),s=d[0];if(!s?.promptTemplate.trim()||!Ie({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const $=Pe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Fe(fe())||Le(document,e.path);if(!$)return!1;const y=Te($);return vt(y,{title:e.scenario.name,scenarioId:e.scenario.scenario_id,values:e.values,steps:d}),Re(y,_t(s,e.values)),We(y),e.openProject?.($),e.touchCode?.($),je({variant:"success",title:`已创建「${e.scenario.name}」`,description:`将按 ${d.length} 步自动依次执行,缺参或失败时暂停`}),e.navigate(qe($)),!0}function Ze(e){if(!Ie({navigate:e.navigate,action:{type:"wizard",resourceId:e.resourceId,scenarioId:e.scenarioId,values:e.values,prompt:e.prompt},isLoggedIn:e.isLoggedIn}))return!1;const d=Ne(e.resourceId),s=d?.scenarios.find(k=>k.id===e.scenarioId);if(!d||!s||!Qe(d))return!1;const $=Pe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Fe(fe())||Le(document,e.path);if(!$)return!1;const y=Te($);return Re(y,e.prompt),We(y),e.openProject?.($),e.touchCode?.($),je({variant:"success",title:`已为你创建 ${d.name}「${s.title}」任务`}),e.navigate(qe($)),!0}function me(e,d){return Gt(e.promptTemplate,d)}function Be(e){return Object.fromEntries(e.fields.map(d=>[d.id,ui(d)]))}function ui(e){return e.default?.trim()?e.default:e.placeholder?.replace(/^例如[::]\s*/,"").trim()??""}function pi(){const e=st(),d=ct(),[s]=ot(),$=dt(),y=ut(),k=pt(),V=gt(),L=()=>Ne(e.id??""),de=()=>wt(d.search),J=()=>yt(d.search,{category:L()?.category??"onemodel",domain:L()?.domain??"materials"}),ye=()=>St(e.id??"",de()),[C,B]=Ke({scenarioId:"",values:{},prompt:""}),[G,ae]=bt(""),H=()=>L()?.scenarios.find(r=>r.id===C.scenarioId),ue=j(()=>{const r=L();return r?mt({domain:r.domain,name:r.name,id:r.id}):[]}),v=j(()=>{const r=G();if(r)return ft(r)??ue().find(p=>p.scenario_id===r)}),T=()=>({navigate:$,isLoggedIn:!!fe(),path:y.data.path,recent:Ct(y.data.project),lastCodeWorkspace:V.projects.lastCode(),openProject:r=>k.projects.open(r),touchCode:r=>V.projects.touchCode(r)}),le=()=>{const r=H();r&&B("prompt",me(r,C.values))};ht(()=>{const r=L();if(!r?.scenarios.length)return;const p=s.scenario,_=(p?r.scenarios.find(N=>N.id===p):void 0)??r.scenarios[0],R=Be(_);B({scenarioId:_.id,values:R,prompt:me(_,R)})});const K=r=>{const h=L()?.scenarios.find(R=>R.id===r);if(!h)return;ae("");const _=Be(h);B({scenarioId:h.id,values:_,prompt:me(h,_)})},q=r=>{ae(r)},re=(r,p)=>{const h=H();if(!h)return;const _={...C.values,[r]:p};B({values:_,prompt:me(h,_)})},he=()=>{const r=L(),p=H();!r||!p||Ze({resourceId:r.id,scenarioId:p.id,values:{...C.values},prompt:C.prompt,...T()})},Se=(r,p)=>{Ye({scenario:r,values:p.values,...T()})};return(()=>{var r=Kt();return t(r,a(g,{get when(){return L()},get fallback(){return[a(Z,{class:"os-client-capability-wizard-backdrop",get href(){return Ee()},"aria-label":"关闭向导"}),(()=>{var p=Nt();return p.firstChild,t(p,a(Z,{get href(){return Ee()},children:"返回能力中心"}),null),p})()]},children:p=>a(g,{get when(){return Qe(p())},get fallback(){return[a(Z,{class:"os-client-capability-wizard-backdrop",get href(){return J()},"aria-label":"关闭向导"}),(()=>{var h=Zt(),_=h.firstChild,R=_.firstChild,N=R.nextSibling;return N.nextSibling,t(_,()=>p().name,N),t(h,a(Z,{get href(){return J()},children:"返回模型库"}),null),h})()]},get children(){return[a(Z,{class:"os-client-capability-wizard-backdrop",get href(){return J()},"aria-label":"关闭向导"}),(()=>{var h=Yt(),_=h.firstChild,R=_.firstChild,N=R.firstChild,M=_.nextSibling,pe=M.firstChild,we=pe.firstChild,Q=we.nextSibling,ne=pe.nextSibling;ne.firstChild;var ge=ne.nextSibling,be=ge.firstChild,$e=be.firstChild,Y=$e.nextSibling,ve=be.nextSibling,se=M.nextSibling,ce=se.firstChild;return t(_,a(Z,{class:"os-client-capability-wizard-intro-back",get href(){return ye()},get children(){return ci(p().category)}}),R),t(N,()=>oi(p().name)),t(_,a(Z,{class:"os-client-capability-wizard-close",get href(){return J()},"aria-label":"关闭",children:"×"}),null),t(Q,a(E,{get each(){return p().scenarios},children:u=>(()=>{var o=Jt(),m=o.firstChild,x=m.nextSibling;return o.$$click=()=>K(u.id),t(m,()=>u.title),t(x,()=>u.summary),f(P=>{var W=!G()&&C.scenarioId===u.id,O=!G()&&C.scenarioId===u.id;return W!==P.e&&o.classList.toggle("is-active",P.e=W),O!==P.t&&A(o,"aria-pressed",P.t=O),P},{e:void 0,t:void 0}),o})()}),null),t(Q,a(g,{get when(){return ue().length>0},get children(){var u=Qt();return u.firstChild,t(u,a(E,{get each(){return ue()},children:o=>(()=>{var m=Xt(),x=m.firstChild,P=x.nextSibling,W=P.nextSibling,O=W.firstChild,X=O.nextSibling;return X.nextSibling,m.$$click=()=>q(o.scenario_id),t(x,()=>o.name),t(P,()=>o.problem_and_applicability),t(W,()=>o.scenario_id,O),t(W,()=>o.workflow_steps?.length||o.workflow.length,X),f(U=>{var ee=G()===o.scenario_id,te=G()===o.scenario_id;return ee!==U.e&&m.classList.toggle("is-active",U.e=ee),te!==U.t&&A(m,"aria-pressed",U.t=te),U},{e:void 0,t:void 0}),m})()}),null),u}}),null),t(ne,a(g,{get when(){return H()},keyed:!0,get fallback(){return Ve()},children:u=>(()=>{var o=ti(),m=o.firstChild,x=m.nextSibling,P=x.firstChild,W=P.nextSibling,O=W.firstChild,X=O.firstChild,U=X.nextSibling,ee=O.nextSibling,te=ee.firstChild,Ce=te.nextSibling,i=ee.nextSibling,n=i.firstChild,c=n.nextSibling,w=i.nextSibling,S=w.firstChild,D=S.nextSibling;return t(m,a(E,{get each(){return u.fields},children:b=>(()=>{var F=ai(),ie=F.firstChild;return t(ie,()=>b.label),t(F,a(g,{get when(){return b.multiline},get fallback(){return(()=>{var I=li();return I.$$input=z=>re(b.id,z.currentTarget.value),f(()=>A(I,"placeholder",b.placeholder)),f(()=>I.value=C.values[b.id]??""),I})()},get children(){var I=ii();return I.$$input=z=>re(b.id,z.currentTarget.value),f(()=>A(I,"placeholder",b.placeholder)),f(()=>I.value=C.values[b.id]??""),I}}),null),F})()})),t(U,()=>u.capabilitySummary.current),t(Ce,()=>u.capabilitySummary.keyConfig),t(c,()=>u.capabilitySummary.resources),t(D,()=>u.capabilitySummary.deliverables),t(o,a(g,{get when(){return u.requiredData?.length},get children(){var b=ei(),F=b.firstChild,ie=F.nextSibling;return t(ie,a(E,{get each(){return u.requiredData},children:I=>(()=>{var z=ri();return t(z,I),z})()})),b}}),null),o})()}),null),t(ge,a(g,{get when(){return H()},keyed:!0,get fallback(){return Ve()},children:u=>[(()=>{var o=ni(),m=o.firstChild,x=m.nextSibling;return t(m,()=>u.title),t(x,()=>u.summary),o})(),(()=>{var o=si(),m=o.firstChild,x=m.nextSibling;return t(x,()=>u.expectedOutputs),o})()]}),be),Y.$$click=le,ve.$$input=u=>B("prompt",u.currentTarget.value),t(se,a(Z,{get href(){return J()},children:"返回能力中心"}),ce),ce.$$click=he,f(()=>ce.disabled=!C.prompt.trim()),f(()=>ve.value=C.prompt),h})(),a(g,{get when(){return v()},children:h=>a(Bt,{get scenario(){return h()},onClose:()=>ae(""),onSubmit:_=>Se(h(),_)})})]}})})),r})()}Ge(["click","input"]);const bi=Object.freeze(Object.defineProperty({__proto__:null,CapabilityWizardPage:pi,startCapabilityPromptTask:di,startCapabilityScenarioRunTask:Ye,startCapabilityWizardTask:Ze},Symbol.toStringTag,{value:"Module"}));export{Bt as S,Ye as a,Ze as b,di as s,bi as w};