@onescience/onecode-web 1.14.50-202609101413 → 1.14.50-202609101646
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{3Dmol-zJlIxigb.js → 3Dmol-BwUAfJ9S.js} +1 -1
- package/assets/account-system-Bixt2wkW.js +1 -0
- package/assets/{alert-04-Cp8Jzdn0.js → alert-01-jRaj8g5g.js} +1 -1
- package/assets/{alert-05-BYORi2oX.js → alert-02-BUny2E8L.js} +1 -1
- package/assets/{alert-01-DbaABqZT.js → alert-04-BO_3whC8.js} +1 -1
- package/assets/{alert-02-eqeAgNGg.js → alert-05-E6mt-DDA.js} +1 -1
- package/assets/alert-06-D4xVKvt3.js +1 -0
- package/assets/alert-07-SATnNV3s.js +1 -0
- package/assets/alert-08-BZOkQMWt.js +1 -0
- package/assets/alert-10-CwIsuibB.js +1 -0
- package/assets/{bip-bop-03-Ds3vHxbp.js → bip-bop-03-DXwmuva7.js} +1 -1
- package/assets/{bip-bop-04-D99hrVJe.js → bip-bop-04-CPaWV-GN.js} +1 -1
- package/assets/{bip-bop-06-DlpeuHaw.js → bip-bop-06-rLczdPfL.js} +1 -1
- package/assets/{bip-bop-08-CjWzcmzu.js → bip-bop-08-BoszHGTp.js} +1 -1
- package/assets/bip-bop-09-Dmn-Zia_.js +1 -0
- package/assets/{center-DsgKhadM.js → center-CXnW6efM.js} +4 -4
- package/assets/dialog-edit-project-Cohs1a-E.js +1 -0
- package/assets/dialog-fork-CTohTbEY.js +1 -0
- package/assets/dialog-project-upload-vX1xOJn3.js +2 -0
- package/assets/{dialog-select-file-DLA9ErDC.js → dialog-select-file-1kwhziFH.js} +1 -1
- package/assets/dialog-select-model-DYef5Kd7.js +2 -0
- package/assets/dialog-terminal-unavailable-DR8ugCvy.js +3 -0
- package/assets/{docs-Cifj5x1f.js → docs-DbrcFw1_.js} +1 -1
- package/assets/ghostty-web-DY7xj-fL.js +13 -0
- package/assets/home-D7j2pC1k.js +1 -0
- package/assets/{index-DAMGhM04.js → index-CDgkkcJS.js} +355 -351
- package/assets/index-Dv4yLSDf.css +1 -0
- package/assets/{intro-xfetq0Ge.js → intro-D1N6jcgB.js} +1 -1
- package/assets/{nope-02-CS3zLx1E.js → nope-02-BZai3zMU.js} +1 -1
- package/assets/{nope-05-N-44ZznA.js → nope-05-xCKAI-GD.js} +1 -1
- package/assets/{nope-08-DUvkdjgJ.js → nope-08-B9xsyWV7.js} +1 -1
- package/assets/{nope-11-_EA8CZRx.js → nope-11-BRYmC6WI.js} +1 -1
- package/assets/nope-12-Caq-RMDD.js +1 -0
- package/assets/{onescience-DW8h4YYj.js → onescience-dYCbd2FC.js} +1 -1
- package/assets/{resources-Bl-zSce9.js → resources-h77Xtx4W.js} +1 -1
- package/assets/{selection-nvVPsBCu.js → selection-QPBUNekB.js} +1 -1
- package/assets/shell-BHWcVn6H.js +2 -0
- package/assets/skills-DBXwtiuD.js +1 -0
- package/assets/{staplebops-03-_xJyIJJ9.js → staplebops-03-B33jNym9.js} +1 -1
- package/assets/{staplebops-04-CrIbX8pr.js → staplebops-04-ByKBT8VW.js} +1 -1
- package/assets/{staplebops-06-dlB6b1hl.js → staplebops-06-kjCa6Ujj.js} +1 -1
- package/assets/{staplebops-07-C7F2ZZAN.js → staplebops-07-CnM6znEI.js} +1 -1
- package/assets/status-popover-body-B_LzuDCL.js +2 -0
- package/assets/wizard-DNUPns5W.js +1 -0
- package/assets/{yup-01-VPcNQT02.js → yup-01-Cd5uCv1_.js} +1 -1
- package/assets/{yup-03-DLmWjz7J.js → yup-03-TNs5cy3u.js} +1 -1
- package/assets/{yup-04-D-3taxv0.js → yup-04-CrJOUC_g.js} +1 -1
- package/assets/{yup-05-Bw62VCi-.js → yup-05-CLqrsVG_.js} +1 -1
- package/assets/{zh-DZqW_6rA.js → zh-M_rL6vl6.js} +1 -1
- package/assets/{zht-D5OqTOhl.js → zht-5kvKl4Oi.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/account-system-Je0BaqzS.js +0 -1
- package/assets/alert-06-B_4asjWo.js +0 -1
- package/assets/alert-07-Ge19oXLk.js +0 -1
- package/assets/alert-08-MWp7nDRp.js +0 -1
- package/assets/alert-10-B6OkVYJX.js +0 -1
- package/assets/bip-bop-09-DnNBRsGS.js +0 -1
- package/assets/dialog-edit-project-BKAq5m-l.js +0 -1
- package/assets/dialog-fork-D-mzsM6m.js +0 -1
- package/assets/dialog-project-upload-BtvMY5nK.js +0 -2
- package/assets/dialog-select-model-MQ1sAuiV.js +0 -2
- package/assets/dialog-terminal-unavailable-CExY762o.js +0 -3
- package/assets/ghostty-web-B_HTry8X.js +0 -13
- package/assets/home-DCRzZvKt.js +0 -1
- package/assets/index-HqBqMM3b.css +0 -1
- package/assets/nope-12-B_QLtLqS.js +0 -1
- package/assets/shell-C8tK_G1X.js +0 -2
- package/assets/skills-BtiyBPum.js +0 -1
- package/assets/status-popover-body-Cq-V73L7.js +0 -2
- package/assets/wizard-Bq1war3C.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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 B,b_ as U,dB as V,dC as X,bi as Z}from"./index-CDgkkcJS.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 B()},"aria-label":"关闭介绍"}),(()=>{var t=ti();return t.firstChild,i(t,e(n,{get href(){return B()},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,E=R.nextSibling,A=u.nextSibling,F=A.firstChild,I=F.firstChild,L=I.nextSibling,z=F.nextSibling,O=z.firstChild,Y=O.nextSibling,j=z.nextSibling,q=j.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(E,()=>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(L,e(o,{get each(){return t().intro.suited},children:a=>(()=>{var l=m();return i(l,a),l})()})),i(Y,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 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-202609101646/assets/nope-12-BJR1Ka3c.aac";export{e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as At,c as n,bU as bt,i,ak as Ne,S as v,Q as E,T as R,R as ne,n as P,x as ge,F as ce,t as o,bc as mt,bV as ys,bW as er,bX as Da,bY as Wt,bZ as Ja,Z as ws,ba as $s,Y as Cs,b_ as Ss,b$ as tr,c0 as _s,aI as je,I as It,L as Ze,ag as Ut,c1 as Ps,o as W,av as pa,c2 as ga,c3 as Ua,l as ot,s as ft,bt as ar,bF as gt,c4 as Gr,c5 as Br,c6 as $i,c7 as Ci,c8 as ks,c9 as Ds,ca as sa,k as Si,cb as Hr,f as vt,e as Xt,h as Tt,g as fa,j as As,m as qr,y as xs,G as Ms,H as Is,bA as et,cc as ir,cd as Fs,ce as zr,cf as jr,cg as Wr,bB as Vr,ch as ni,ci as Ts,cj as Es,ck as Ns,aX as Kr,cl as Os,cm as Rs,cn as rr,bE as ca,N as Ls,co as Aa,V as Ta,cp as Us,ai as ht,aW as xt,aY as _i,q as Pi,cq as Gs,aZ as Xr,a7 as Bs,cr as Hs,cs as qs,ct as zs,cu as js,cv as Ea,cw as la,cx as Ws,cy as Qa,p as Za,cz as Vs,cA as Ks,cB as ra,cC as Xs,cD as Js,cE as Qs,cF as Zs,cG as ki,cH as Ys,cI as eo,cJ as to,cK as Di,cL as Ai,cM as Jr,cN as Qr,cO as si,cP as ao,cQ as oi,cR as io,cS as ro,cT as no,cU as zt,cV as so,cW as oo,cX as Zr,cY as Yr,cZ as en,c_ as tn,c$ as an,d0 as lo,bI as co,d1 as uo,d2 as mo,d3 as ho,d4 as po,D as kt,d5 as go,d6 as fo,d7 as bo,d8 as vo,d9 as nr,da as yo,db as li,dc as wo,dd as rn,de as nn,df as $o,dg as sn,_ as jt,dh as xi,r as Co,di as So,dj as _o,X as Po,bC as ko,bD as Ya,dk as on,v as Do,dl as Ao,E as xo,dm as Mo,dn as sr,dp as Io,dq as Fo,dr as To}from"./index-DAMGhM04.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,c1 as bt,i,au 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,bk 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,bO 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,bJ as et,cl as ir,cm as Fs,cn as zr,co as jr,cp as Wr,bK as Vr,cq as ni,cr as Ts,cs as Es,ct as Ns,b3 as Kr,cu as Os,cv as Rs,cw as rr,bN as ca,T as Ls,cx as Aa,_ as Ta,cy as Us,as as ht,b2 as xt,b4 as _i,y as Pi,cz as Gs,b5 as Xr,ae as Bs,cA as Hs,cB as qs,cC as zs,cD as js,cE as Ea,cF as la,ba 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,bR 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,bL as ko,bM 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-CDgkkcJS.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,
|
|
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-CDgkkcJS.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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bS as s,bi as y}from"./index-CDgkkcJS.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-project-upload-vX1xOJn3.js","assets/index-CDgkkcJS.js","assets/index-Dv4yLSDf.css","assets/dialog-terminal-unavailable-DR8ugCvy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as Te,c as e,I as ue,D as I,i as s,S as k,F as Ce,d as Ne,t as l,p as oe,a as Se,s as ee,b as je,e as it,f as bn,g as _t,h as wn,j as $n,k as _n,l as yn,m as yt,n as N,o as S,q as Ee,r as Ot,v as rt,w as st,x as De,y as kn,z as zt,A as Sn,B as kt,C as Z,E as Ft,G as lt,H as xn,J as Nt,K as Cn,L as me,M as Ln,N as Pn,O as Dn,P as En,Q as jn,R as fe,T as Mn,U as Rn,V as In,W as H,X as we,Y as z,Z as An,_ as On,$ as tn,a0 as ct,a1 as Ke,a2 as zn,a3 as Kt,a4 as Tt,a5 as ae,a6 as nn,a7 as Fn,a8 as rn,a9 as Nn,aa as Kn,ab as Pe,ac as dt,ad as tt,ae as Tn,af as Wn,ag as Hn,ah as ut,ai as Bn,aj as qn,ak as Un,al as Vn,am as Xn,an as Gn,ao as Qn,ap as Zn,aq as Jn,ar as Wt,as as sn,at as Yn,au as wt,av as er,aw as on,ax as pe,ay as tr,az as Ht,aA as nr,aB as rr,aC as sr,aD as ir,aE as or,aF as an,aG as $t,aH as Bt,aI as ar,aJ as lr,aK as cr,aL as ht,aM as qt,aN as Ut,aO as dr,aP as ln,aQ as St,aR as cn,aS as ur,aT as hr,aU as gr,aV as mr,aW as fr,aX as pr,aY as vr,aZ as Vt,a_ as Xt,a$ as br,b0 as wr,b1 as $r,b2 as ze}from"./index-CDgkkcJS.js";import{DialogEditProject as _r}from"./dialog-edit-project-Cohs1a-E.js";import{c as yr}from"./selection-QPBUNekB.js";var kr=l("<span class=os-client-session-menu-label>"),Sr=l("<div class=os-client-session-menu-empty>");const xr="os-client-session-menu",Cr="os-client-session-menu os-client-session-menu-sub";function Lr(r){const a=Te(),n=()=>ee(),$=()=>Se(n(),r.currentDirectory),o=()=>r.projects().filter(c=>oe(c.worktree)!==oe(r.currentDirectory)).filter(c=>!Se(n(),c.worktree));return e(k,{get when(){return $()},get children(){return e(I.Sub,{get children(){return[e(I.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 c=kr();return s(c,()=>a.t("session.move.toProject")),c})(),e(ue,{name:"chevron-right",size:"small",class:"os-client-session-menu-chevron"})]}}),e(I.Portal,{get children(){return e(I.SubContent,{class:Cr,get children(){return[e(I.Item,{"data-action":"session-move-new-project",class:"os-client-session-menu-item",onSelect:()=>r.onNewProject(),get children(){return[e(ue,{name:"plus",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return a.t("session.move.newProject")}})]}}),e(I.Separator,{class:"os-client-session-menu-separator"}),e(k,{get when(){return o().length>0},get fallback(){return(()=>{var c=Sr();return s(c,()=>a.t("session.move.emptyProjects")),c})()},get children(){return e(Ce,{get each(){return o()},children:c=>e(I.Item,{"data-action":"session-move-target",class:"os-client-session-menu-item",onSelect:()=>r.onMove(c.worktree),get children(){return[e(ue,{name:"folder",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return Ne(c)}})]}})})}})]}})}})]}})}})}function Gt(r){const a=Te();return[e(I.Item,{"data-action":"session-archive",class:"os-client-session-menu-item",onSelect:()=>r.onArchive(),get children(){return[e(ue,{name:"archive",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return a.t("common.archive")}})]}}),e(Lr,{get currentDirectory(){return r.currentDirectory},get projects(){return r.projects},get onMove(){return r.onMove},get onNewProject(){return r.onNewProject}}),e(I.Separator,{class:"os-client-session-menu-separator"}),e(I.Item,{"data-action":"session-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>r.onDelete(),get children(){return[e(ue,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return a.t("common.delete")}})]}})]}var Pr=l("<button type=button aria-haspopup=menu>..."),gt=l('<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">'),Dr=l("<span class=os-sidebar-label>"),Er=l('<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">'),jr=l("<span class=os-sidebar-label>新建会话"),Mr=l('<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">'),Rr=l("<span class=os-sidebar-label>能力中心"),Ir=l('<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">'),Ar=l("<span class=os-sidebar-label>skills设置"),Or=l('<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">'),zr=l("<span class=os-sidebar-label>资源配置"),Fr=l("<p class=os-client-empty-hint>登录后同步个人空间"),Nr=l("<div class=os-client-task-list-scroll>"),Kr=l("<button type=button class=os-client-task-more data-action=recent-expand>展开更多"),Tr=l("<button type=button class=os-client-task-more data-action=recent-collapse>收起"),Wr=l("<p class=os-client-empty-hint>登录后查看未分类会话"),Hr=l("<button type=button class=os-client-shared-cases-more data-action=shared-cases-expand>展开更多"),Br=l("<button type=button class=os-client-shared-cases-more data-action=shared-cases-collapse>收起"),qr=l("<div class=os-client-shared-cases-list>"),Ur=l('<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>'),Vr=l('<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">'),Xr=l("<span class=os-sidebar-label>帮助"),Gr=l('<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>设置'),Qr=l("<p class=os-client-empty-hint>暂无项目,点击 + 打开目录"),Zr=l("<div class=os-client-project-sessions>"),Jr=l("<div class=os-client-project-block><div class=os-client-project-row>"),mt=l("<span class=os-client-task-main><span>"),Qt=l("<div class=os-client-session-row>"),Yr=l("<p class=os-client-empty-hint>暂无未分类会话,点击 + 新建"),es=l("<p class=os-client-empty-hint>暂无默认案例");const nt=4,Zt=200,ft=4,Jt=400;function pt(r){let a;const n=()=>r.openKey()===r.menuKey,$=o=>{o.preventDefault(),o.stopPropagation(),n()?r.setOpenKey(""):r.setOpenKey(r.menuKey)};return e(I,{modal:!1,preventScroll:!1,gutter:6,placement:"bottom-end",get open(){return n()},getAnchorRect:()=>a?.getBoundingClientRect(),onOpenChange:o=>{if(o){n()||r.setOpenKey(r.menuKey);return}Date.now()-r.openedAt()<Jt||r.setOpenKey("")},get children(){return[(()=>{var o=Pr();return o.$$click=$,o.$$pointerup=c=>{c.preventDefault(),c.stopPropagation()},o.$$pointerdown=c=>{c.preventDefault(),c.stopPropagation()},Ke(c=>{a=c},o),H(c=>{var _=r.triggerClass,L=r.label,w=n();return _!==c.e&&zn(o,c.e=_),L!==c.t&&z(o,"aria-label",c.t=L),w!==c.a&&z(o,"aria-expanded",c.a=w),c},{e:void 0,t:void 0,a:void 0}),o})(),e(I.Portal,{get children(){return e(I.Content,{class:xr,onOpenAutoFocus:o=>o.preventDefault(),onFocusOutside:o=>o.preventDefault(),onCloseAutoFocus:o=>o.preventDefault(),onInteractOutside:o=>{const c=o.target;if(c instanceof Node&&a?.contains(c)){o.preventDefault();return}Date.now()-r.openedAt()<Jt&&o.preventDefault()},onPointerDown:o=>o.stopPropagation(),get children(){return r.children}})}})]}})}function ts(){const r=it(),a=bn(),n=Te(),$=_t(),o=wn(),c=$n(),_=_n(),L=yn(),w=yt(),[P,U]=N(0),D=S(()=>(P(),!!ee())),d=()=>tn(r.pathname),p=()=>(r.pathname,r.search,yr()),J=()=>r.pathname.startsWith("/workspace/capabilities"),F=()=>r.pathname.startsWith("/workspace/skills"),A=()=>r.pathname.startsWith("/workspace/resources"),j=()=>r.pathname.startsWith("/workspace/docs"),[R,O]=N(!0),[B,Q]=N(!1),[V,le]=N(!1),[se,Me]=N("");let ce=0;const $e=t=>{t&&(ce=Date.now()),Me(t)},he=()=>ce;Ee(()=>{const t=()=>U(i=>i+1);window.addEventListener(Ot,t),window.addEventListener(rt,t),window.addEventListener(st,t),De(()=>{window.removeEventListener(Ot,t),window.removeEventListener(rt,t),window.removeEventListener(st,t)})});const _e=S(()=>kn($.projects.list(),ee())),ie=S(()=>_e().filter(t=>!Se(ee(),t.worktree))),g=S(()=>zt(ee())?.trim()||""),h=S(()=>Sn(ee())?.trim()||""),x=S(()=>{const t=/^\/workspace\/([^/]+)\/session/.exec(r.pathname)?.[1];return t?kt(t)??"":""}),m=()=>/\/session\/([^/?#]+)/.exec(r.pathname)?.[1],v=t=>{const i=x();if(!i)return!1;const f=oe(i);return oe(t.worktree)===f?!0:t.sandboxes?.some(M=>oe(M)===f)??!1};Z(()=>{if(!D())return;const t=[...ie().flatMap(i=>[i.worktree,...i.sandboxes??[]]),g()].filter(i=>i.length>0);for(const i of t)Ft(()=>{o.project.loadSessions(i)})}),Z(()=>{const t=h();if(!t)return;const[i,f]=o.child(t,{bootstrap:!1});(i.limit??0)<Zt&&f("limit",Zt),Ft(()=>{o.project.loadSessions(t)})});const C=S(()=>{const t=g();if(!t)return[];const[i]=o.child(t,{bootstrap:!1});return lt(i,Date.now(),t).map(f=>({session:f,directory:t}))}),u=S(()=>V()?C():C().slice(0,ft)),X=S(()=>!V()&&C().length>ft),te=S(()=>V()&&C().length>ft),ye=S(()=>{const t=h();if(!t)return[];const[i]=o.child(t,{bootstrap:!1});return xn(lt(i,Date.now(),t).filter(f=>Nt(f.id)))}),Re=S(()=>R()?B()?ye():ye().slice(0,nt):[]),We=S(()=>R()&&!B()&&ye().length>nt),He=S(()=>R()&&B()&&ye().length>nt);Z(()=>{const t=Cn(r.search),i=m(),f=t&&t!=="open"?t:Nt(i)?i:void 0;if((t||f)&&O(!0),f&&ye().findIndex(K=>K.id===f)>=nt&&Q(!0),!t||t==="open")return;const M=h();M&&i!==t&&a(me(M,t),{replace:!0})});function ve(t,i=!0){$.projects.open(t),L.projects.touchCode(t),i&&a(me(t))}function Be(){w.show(()=>e(qn,{onCreated:t=>ve(t)}))}function qe(t){w.show(()=>e(_r,{project:t}))}function Ue(t){const i=t.worktree;if(Se(ee(),i))return;const f=ie(),M=oe(i),y=f.findIndex(Y=>oe(Y.worktree)===M);if(y===-1)return;const K=v(t);if($.projects.close(i),K){const Y=f[y+1]??f[y-1];a(Y?me(Y.worktree):"/workspace")}}function Ve(t){const[i,f]=o.child(t,{bootstrap:!1}),M=i.session.map(y=>y.id);Vn(t,M),o.session.setActive(t,void 0),f(ut(y=>{Xn(y,M),y.session=[]})),Gn(t,void 0),o.set("project",ut(y=>{const K=y.findIndex(Y=>oe(Y.worktree)===oe(t));K>=0&&y.splice(K,1)}))}async function Xe(t){if(Se(ee(),t.worktree))return!1;const i=t.worktree,f=ie(),M=oe(i),y=f.findIndex(G=>oe(G.worktree)===M),K=v(t);if(await c.client.experimental.session.list({directory:i,roots:!0,archived:!0,limit:1}).then(G=>(G.data??[]).some(Ae=>!!Ae.time?.archived)).catch(()=>!1))return ae({title:n.t("sidebar.project.delete.failed"),description:n.t("sidebar.project.delete.hasArchived")}),!1;const de=Un(i)?.workspaceID?.trim();if(de&&await c.client.experimental.workspace.remove({id:de,directory:i}).catch(()=>{}),!await c.client.project.remove({directory:i}).then(G=>G.data).catch(G=>(ae({title:n.t("sidebar.project.delete.failed"),description:tt(G,n.t("common.requestFailed"))}),!1)))return!1;if(Ve(i),$.projects.close(i),K){const G=y>=0?f[y+1]??f[y-1]:void 0;a(G?me(G.worktree):"/workspace")}return!0}function Ge(t){const i=S(()=>Ne(t.project)),[f,M]=N(!1),[y,K]=N("checking");Ee(()=>{c.client.experimental.session.list({directory:t.project.worktree,roots:!0,archived:!0,limit:1}).then(de=>{const xe=(de.data??[]).some(G=>!!G.time?.archived);K(xe?"blocked":"ok")}).catch(()=>K("ok"))});const Y=async()=>{if(f()||y()!=="ok")return;M(!0);const de=await Xe(t.project);M(!1),de&&w.close()};return e(dt,{get title(){return n.t("sidebar.project.delete.title")},fit:!0,get children(){var de=gt(),xe=de.firstChild,G=xe.nextSibling;return s(xe,(()=>{var Ae=we(()=>y()==="blocked");return()=>Ae()?n.t("sidebar.project.delete.hasArchived"):n.t("sidebar.project.delete.confirm",{name:i()})})()),s(G,e(Pe,{variant:"ghost",size:"large",get disabled(){return f()},onClick:()=>w.close(),get children(){return n.t("common.cancel")}}),null),s(G,e(k,{get when(){return y()!=="blocked"},get children(){return e(Pe,{variant:"primary",size:"large",get disabled(){return f()||y()==="checking"},onClick:()=>void Y(),get children(){return we(()=>!!f())()?n.t("sidebar.project.delete.busy"):n.t("sidebar.project.delete.button")}})}}),null),de}})}function Qe(t){Se(ee(),t.worktree)||w.show(()=>e(Ge,{project:t}))}async function Ze(){const t=_.openDirectoryPickerDialog;function i(f){if(Array.isArray(f)){f.forEach((M,y)=>ve(M,y===0));return}f&&ve(f)}if(t&&Wn({hasNativePicker:!!t,isLocalServer:!!L.isLocal(),hasPlatformSession:!!ee()})){const f=await t({title:n.t("command.project.open"),multiple:!0});i(f);return}w.show(()=>e(Hn,{multiple:!0,onSelect:i,onCreateFolder:Be}),()=>i(null))}function Le(){ct({navigate:a,action:{type:"install",resourceId:"__project__"},isLoggedIn:D()})&&Ze()}function Je(){if(!ct({navigate:a,action:{type:"install",resourceId:"__task__"},isLoggedIn:D()}))return;const t=zt(ee());t&&(Kt(Tt(t)),ve(t))}function Ye(t){ct({navigate:a,action:{type:"install",resourceId:"__task__"},isLoggedIn:D()})&&(Kt(Tt(t)),ve(t))}function Ie(t){const i=ee();return Fn(i,t)?!1:rn(i,t)}function dn(t){if(!Ie(t)){ae({title:n.t("dialog.project.upload.failed"),description:n.t("dialog.project.upload.destinationHint"),variant:"error"});return}nn(()=>import("./dialog-project-upload-vX1xOJn3.js"),__vite__mapDeps([0,1,2])).then(i=>{w.show(()=>e(i.DialogProjectUpload,{directory:t}))})}function xt(t){if(m()!==t.id)return;const i=x();if(!i){a("/workspace");return}a(me(i))}function ot(t,i){const[,f]=o.child(t,{bootstrap:!1});f(ut(M=>{const y=Bn.search(M.session,i,Y=>Y.id);if(!y.found)return;const K=M.session[y.index];M.session.splice(y.index,1),K&&!K.parentID&&(M.sessionTotal=Math.max(0,M.sessionTotal-1))}))}async function Ct(t){ot(t.directory,t.id),xt(t),await c.client.session.update({directory:t.directory,sessionID:t.id,time:{archived:Date.now()}}).then(()=>!0).catch(f=>(ae({title:n.t("common.archive"),description:tt(f,n.t("common.requestFailed"))}),!1))||o.project.loadSessions(t.directory)}async function un(t){return await c.client.session.delete({sessionID:t.id,directory:t.directory}).then(f=>f.data).catch(f=>(ae({title:n.t("session.delete.failed.title"),description:tt(f,n.t("common.requestFailed"))}),!1))?(ot(t.directory,t.id),xt(t),!0):!1}function Lt(t){const i=at(t);w.show(()=>e(dt,{get title(){return n.t("session.delete.title")},fit:!0,get children(){var f=gt(),M=f.firstChild,y=M.nextSibling;return s(M,()=>n.t("session.delete.confirm",{name:i})),s(y,e(Pe,{variant:"ghost",size:"large",onClick:()=>w.close(),get children(){return n.t("common.cancel")}}),null),s(y,e(Pe,{variant:"primary",size:"large",onClick:()=>{un(t).then(K=>{K&&w.close()})},get children(){return n.t("session.delete.button")}}),null),f}}))}function Pt(t){const[i]=o.child(t,{bootstrap:!1});return lt(i,Date.now(),t).map(f=>({session:f,directory:t}))}function at(t){const[i]=o.child(t.directory,{bootstrap:!1});return Nn({title:t.title,fallbackText:Kn(t.id,i.message,i.part),emptyLabel:n.t("command.session.new")})}function Dt(t,i){if(oe(t.directory)===oe(i))return;if(!Se(ee(),t.directory)){ae({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}if(Se(ee(),i)){ae({title:n.t("session.move.failed.title"),description:n.t("session.move.failed.onlyDefault")});return}const f=Ne({worktree:i});w.show(()=>e(dt,{get title(){return n.t("session.move.confirm.title")},fit:!0,get children(){var M=gt(),y=M.firstChild,K=y.nextSibling;return s(y,()=>n.t("session.move.confirm.description",{project:f})),s(K,e(Pe,{variant:"ghost",size:"large",onClick:()=>w.close(),get children(){return n.t("common.cancel")}}),null),s(K,e(Pe,{variant:"primary",size:"large",onClick:()=>{hn(t,i).then(Y=>{Y&&w.close()})},get children(){return n.t("session.move.confirm.action")}}),null),M}}))}async function hn(t,i){const f=t.directory;return await c.client.session.update({directory:t.directory,sessionID:t.id,moveTo:i}).then(()=>!0).catch(y=>(ae({title:n.t("session.move.failed.title"),description:tt(y,n.t("common.requestFailed"))}),!1))?(ot(f,t.id),$.projects.open(i),L.projects.touchCode(i),o.project.loadSessions(f),o.project.loadSessions(i),m()===t.id?(a(me(i,t.id)),!0):(ae({title:n.t("session.move.success.title"),description:n.t("session.move.success.description",{project:Ne({worktree:i})})}),!0)):!1}function gn(){w.show(()=>e(Tn,{tab:"account"}))}return(()=>{var t=Gr(),i=t.firstChild,f=i.nextSibling,M=f.firstChild,y=M.firstChild,K=y.nextSibling,Y=K.firstChild,de=Y.firstChild,xe=de.nextSibling,G=xe.firstChild,Ae=Y.nextSibling,Et=K.nextSibling,jt=Et.firstChild,mn=jt.firstChild,fn=mn.nextSibling,Mt=fn.firstChild,pn=jt.nextSibling,vn=f.nextSibling,Rt=vn.firstChild,It=Rt.firstChild;return Ln(i,Pn(()=>_.platform==="desktop"?{"data-tauri-drag-region":!0}:{}),!1,!0),s(i,e(fe,{get href(){return jn(_.platform)},class:"os-sidebar-brand-link",get children(){return[e(Dn,{class:"os-sidebar-brand-mark"}),(()=>{var E=Dr();return s(E,()=>En(_.platform)),E})()]}})),s(y,e(fe,{get href(){return Mn()},class:"os-sidebar-link",get classList(){return{"is-active":d()}},get children(){return[Er(),jr()]}}),null),s(y,e(fe,{get href(){return p()},class:"os-sidebar-link",get classList(){return{"is-active":J()}},get children(){return[Mr(),Rr()]}}),null),s(y,e(fe,{get href(){return Rn()},class:"os-sidebar-link",get classList(){return{"is-active":F()}},get children(){return[Ir(),Ar()]}}),null),s(y,e(fe,{get href(){return In()},class:"os-sidebar-link",get classList(){return{"is-active":A()}},get children(){return[Or(),zr()]}}),null),G.$$click=Le,s(Ae,e(k,{get when(){return we(()=>!!D())()&&ie().length>0},get fallback(){return e(k,{get when(){return D()},get children(){return Qr()}})},get children(){return e(Ce,{get each(){return ie().map(E=>E.worktree)},children:E=>{const q=()=>ie().find(ne=>ne.worktree===E);return e(k,{get when(){return q()},children:ne=>(()=>{var re=Jr(),T=re.firstChild;return s(T,e(fe,{get href(){return me(E)},class:"os-client-project-item",get classList(){return{"is-active":v(ne())}},onClick:b=>{b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||(b.preventDefault(),ve(E))},get children(){return Ne(ne())}}),null),s(T,e(pt,{menuKey:`project:${E}`,openKey:se,setOpenKey:$e,openedAt:he,triggerClass:"os-client-project-more",get label(){return n.t("common.moreOptions")},get children(){return[e(I.Item,{"data-action":"project-new-session",class:"os-client-session-menu-item",onSelect:()=>Ye(E),get children(){return[e(ue,{name:"new-session",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.session.new")}})]}}),e(k,{get when(){return Ie(E)},get children(){return e(I.Item,{"data-action":"project-upload",class:"os-client-session-menu-item",onSelect:()=>dn(E),get children(){return[e(ue,{name:"cloud-upload",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("command.project.upload")}})]}})}}),e(I.Item,{"data-action":"project-rename",class:"os-client-session-menu-item",onSelect:()=>{const b=q();b&&qe(b)},get children(){return[e(ue,{name:"edit",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("common.rename")}})]}}),e(I.Separator,{class:"os-client-session-menu-separator"}),e(I.Item,{"data-action":"project-remove-from-view",class:"os-client-session-menu-item",onSelect:()=>{const b=q();b&&Ue(b)},get children(){return[e(ue,{name:"close-small",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.removeFromView")}})]}}),e(I.Item,{"data-action":"project-delete",class:"os-client-session-menu-item is-danger",onSelect:()=>{const b=q();b&&Qe(b)},get children(){return[e(ue,{name:"trash",size:"small",class:"os-client-session-menu-icon"}),e(I.ItemLabel,{class:"os-client-session-menu-label",get children(){return n.t("sidebar.project.delete")}})]}})]}}),null),s(re,e(k,{get when(){return v(ne())},get children(){var b=Zr();return s(b,e(Ce,{get each(){return Pt(E).map(W=>W.session.id)},children:W=>{const be=()=>Pt(E).find(ke=>ke.session.id===W);return e(k,{get when(){return be()},children:ke=>(()=>{var Oe=Qt();return s(Oe,e(fe,{get href(){return me(ke().directory,W)},class:"os-client-task-item",get classList(){return{"is-active":m()===W}},"data-session-id":W,get children(){var ge=mt(),et=ge.firstChild;return s(et,()=>at(ke().session)),ge}}),null),s(Oe,e(pt,{menuKey:`session:${W}`,openKey:se,setOpenKey:$e,openedAt:he,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Gt,{get currentDirectory(){return ke().directory},projects:ie,onArchive:()=>void Ct(ke().session),onDelete:()=>Lt(ke().session),onMove:ge=>Dt(ke().session,ge),onNewProject:Le})}}),null),H(ge=>{var et=m()===W,At=se()===`session:${W}`;return et!==ge.e&&Oe.classList.toggle("is-active",ge.e=et),At!==ge.t&&Oe.classList.toggle("is-menu-open",ge.t=At),ge},{e:void 0,t:void 0}),Oe})()})}})),b}}),null),H(b=>{var W=!!v(ne()),be=se()===`project:${E}`;return W!==b.e&&T.classList.toggle("is-active",b.e=W),be!==b.t&&T.classList.toggle("is-menu-open",b.t=be),b},{e:void 0,t:void 0}),re})()})}})}})),s(K,e(k,{get when(){return!D()},get children(){return Fr()}}),null),Mt.$$click=Je,s(pn,e(k,{get when(){return we(()=>!!D())()&&C().length>0},get fallback(){return e(k,{get when(){return D()},get children(){return Yr()}})},get children(){return[(()=>{var E=Nr();return s(E,e(Ce,{get each(){return u().map(q=>q.session.id)},children:q=>{const ne=()=>u().find(re=>re.session.id===q);return e(k,{get when(){return ne()},children:re=>(()=>{var T=Qt();return s(T,e(fe,{get href(){return me(re().directory,q)},class:"os-client-task-item",get classList(){return{"is-active":m()===q}},"data-session-id":q,get children(){var b=mt(),W=b.firstChild;return s(W,()=>at(re().session)),b}}),null),s(T,e(pt,{menuKey:`recent:${q}`,openKey:se,setOpenKey:$e,openedAt:he,triggerClass:"os-client-session-more",get label(){return n.t("common.moreOptions")},get children(){return e(Gt,{get currentDirectory(){return re().directory},projects:ie,onArchive:()=>void Ct(re().session),onDelete:()=>Lt(re().session),onMove:b=>Dt(re().session,b),onNewProject:Le})}}),null),H(b=>{var W=m()===q,be=se()===`recent:${q}`;return W!==b.e&&T.classList.toggle("is-active",b.e=W),be!==b.t&&T.classList.toggle("is-menu-open",b.t=be),b},{e:void 0,t:void 0}),T})()})}})),H(()=>z(E,"data-expanded",V()?"true":"false")),E})(),e(k,{get when(){return X()},get children(){var E=Kr();return E.$$click=()=>le(!0),E}}),e(k,{get when(){return te()},get children(){var E=Tr();return E.$$click=()=>le(!1),E}})]}})),s(Et,e(k,{get when(){return!D()},get children(){return Wr()}}),null),s(f,e(k,{get when(){return h()},get children(){var E=Ur(),q=E.firstChild,ne=q.firstChild,re=ne.nextSibling;return q.$$click=()=>O(T=>!T),s(re,()=>n.t("sidebar.section.sharedCases")),s(E,e(k,{get when(){return R()},get children(){var T=qr();return s(T,e(k,{get when(){return Re().length>0},get fallback(){return es()},get children(){return e(Ce,{get each(){return Re()},children:b=>e(fe,{get href(){return me(h(),b.id)},class:"os-client-task-item",get classList(){return{"is-active":m()===b.id}},get"data-session-id"(){return b.id},get children(){var W=mt(),be=W.firstChild;return s(be,()=>An(b.title)??b.id),W}})})}}),null),s(T,e(k,{get when(){return We()},get children(){var b=Hr();return b.$$click=()=>Q(!0),b}}),null),s(T,e(k,{get when(){return He()},get children(){var b=Br();return b.$$click=()=>Q(!1),b}}),null),T}}),null),H(T=>{var b=R(),W=R()?"true":"false";return b!==T.e&&z(q,"aria-expanded",T.e=b),W!==T.t&&z(ne,"data-open",T.t=W),T},{e:void 0,t:void 0}),E}}),null),s(Rt,e(fe,{get href(){return On()},class:"os-sidebar-footer-action",get classList(){return{"is-active":j()}},get children(){return[Vr(),Xr()]}}),It),It.$$click=gn,H(E=>{var q=!D(),ne=!D();return q!==E.e&&G.classList.toggle("is-muted",E.e=q),ne!==E.t&&Mt.classList.toggle("is-muted",E.t=ne),E},{e:void 0,t:void 0}),t})()}je(["pointerdown","pointerup","click"]);var ns=l('<pre class="os-client-right-files-preview whitespace-pre-wrap break-all p-3 text-12-regular m-0">'),rs=l("<button type=button class=os-client-right-files-back>← 返回目录"),ss=l("<span class=os-client-right-files-title>"),is=l("<button type=button>"),os=l("<div class=os-client-right-files-actions><button type=button>关闭"),as=l("<p class=os-client-right-files-hint>正在加载目录…"),ls=l("<p class=os-client-right-files-hint>该目录为空"),cs=l("<div class=os-client-right-files-tree><p class=os-client-right-files-root></p><div class=os-client-right-files-tree-scroll>"),ds=l("<div class=os-client-right-files-unsaved>"),us=l("<p class=os-client-right-files-hint>…"),hs=l("<textarea class=os-client-right-files-textarea autocapitalize=off autocomplete=off autocorrect=off>"),gs=l("<pre class=os-client-right-files-preview>"),ms=l("<div class=os-client-right-files-editor>"),fs=l("<section class=os-client-right-files><header class=os-client-right-files-header>"),ps=l("<strong>目录"),vs=l("<div class=os-client-right-files-actions><button type=button aria-label=刷新>刷新</button><button type=button>关闭"),bs=l("<p class=os-client-right-files-hint>加载失败:"),ws=l("<p class=os-client-right-files-hint>");function $s(r){const a=r.replace(/\\/g,"/").split("/");return a[a.length-1]||r}function _s(r){const a=Qn(),n=Zn(),$=Te(),[o,c]=N("tree"),[_,L]=N(),[w,P]=N(""),[U,D]=N(!1),[d,p]=N(!1),[J,F]=N(0);let A;const j=S(()=>a.tree.state("")),R=S(()=>a.tree.children("")),O=S(()=>Jn(_())),B=(h=!1)=>{n.directory&&(h?a.tree.refresh(""):a.tree.list(""))};Ee(()=>{queueMicrotask(()=>B(!0))}),Z(()=>{if(!n.directory||o()!=="tree")return;const x=j();x?.loading||x?.loaded||x?.error||a.tree.list("")});const Q=S(()=>{const h=_();if(h)return a.get(h)}),V=S(()=>Q()?.content?.content??""),le=S(()=>!!Q()?.loaded),se=S(()=>!!Q()?.loading),Me=S(()=>Q()?.error),ce=S(()=>{const h=Q();return!(!h?.loaded||h.content?.type!=="text"||h.content.encoding==="base64"||Wt(_()))}),$e=S(()=>ce()&&O()==="text"),he=S(()=>{if(!(!ce()||$e()))return{draft:w,setDraft:h=>{P(h),D(!0)},textareaRef:h=>{A=h},class:"os-client-right-files-textarea"}}),_e=h=>(()=>{var x=ns();return s(x,h),x})();Z(()=>{const h=_();h&&a.load(h)}),Z(sn(_,()=>{D(!1),P(le()?V():""),F(0)},{defer:!1})),Z(()=>{!le()||U()||P(V())});const ie=async()=>{const h=_();if(!(!h||d()||!U()||!ce())){p(!0);try{await a.write(h,w()),D(!1),Ht(h)&&F(x=>x+1)}finally{p(!1)}}};Z(()=>{if(typeof window>"u")return;Yn(window,"keydown",x=>{!(x.metaKey||x.ctrlKey)||x.key.toLowerCase()!=="s"||!A?.contains(document.activeElement)&&document.activeElement!==A||(x.preventDefault(),ie())})});const g=h=>{L(h),c("editor")};return(()=>{var h=fs(),x=h.firstChild;return s(x,e(k,{get when(){return o()==="editor"},get fallback(){return[ps(),(()=>{var m=vs(),v=m.firstChild,C=v.nextSibling;return v.$$click=()=>{B(!0),a.tree.refreshAll()},wt(C,"click",r.onClose,!0),m})()]},get children(){return[(()=>{var m=rs();return m.$$click=()=>c("tree"),m})(),(()=>{var m=ss();return s(m,(()=>{var v=we(()=>!!_());return()=>v()?$s(_()):""})()),H(()=>z(m,"title",_())),m})(),(()=>{var m=os(),v=m.firstChild;return s(m,e(k,{get when(){return ce()},get children(){var C=is();return C.$$click=()=>void ie(),s(C,(()=>{var u=we(()=>!!d());return()=>u()?$.t("common.saving"):$.t("common.save")})()),H(()=>C.disabled=!U()||d()),C}}),v),wt(v,"click",r.onClose,!0),m})()]}})),s(h,e(k,{get when(){return o()==="tree"},get children(){var m=cs(),v=m.firstChild,C=v.nextSibling;return s(v,()=>n.directory),s(m,e(k,{get when(){return we(()=>!!j()?.loading)()&&R().length===0},get children(){return as()}}),C),s(m,e(k,{get when(){return j()?.error},children:u=>(()=>{var X=bs();return X.firstChild,s(X,u,null),X})()}),C),s(m,e(k,{get when(){return we(()=>!!(j()?.loaded&&R().length===0))()&&!j()?.error},get children(){return ls()}}),C),s(C,e(er,{path:"",class:"os-client-right-file-tree",nodeClass:"os-client-right-file-node",get active(){return _()},draggable:!1,onFileClick:u=>g(u.path)})),H(()=>z(v,"title",n.directory)),m}}),null),s(h,e(k,{get when(){return o()==="editor"},get children(){var m=ms();return s(m,e(k,{get when(){return U()},get children(){var v=ds();return s(v,()=>$.t("session.file.unsaved")),v}}),null),s(m,e(k,{get when(){return we(()=>!!se())()&&!le()},get children(){var v=us(),C=v.firstChild;return s(v,()=>$.t("common.loading"),C),v}}),null),s(m,e(k,{get when(){return Me()},children:v=>(()=>{var C=ws();return s(C,v),C})()}),null),s(m,e(k,{get when(){return le()},get children(){return e(on,{get children(){return[e(pe,{get when(){return Ht(_())},get children(){return e(tr,{path:_,contents:V,renderSource:_e,get editSource(){return he()},previewRevision:J,chrome:"workbench"})}}),e(pe,{get when(){return O()==="markdown"},get children(){return e(nr,{path:_,contents:V,renderSource:_e,get editSource(){return he()},chrome:"workbench"})}}),e(pe,{get when(){return O()==="csv"},get children(){return e(rr,{path:_,contents:V,renderSource:_e,get editSource(){return he()},chrome:"workbench"})}}),e(pe,{get when(){return Wt(_())},get children(){return e(sr,{path:_,chrome:"workbench"})}}),e(pe,{get when(){return or(_())},get children(){return e(ir,{path:_,contents:V,renderSource:_e,get editSource(){return he()},chrome:"workbench"})}}),e(pe,{get when(){return $e()},get children(){var v=hs();v.$$input=u=>{P(u.currentTarget.value),D(!0)};var C=A;return typeof C=="function"?Ke(C,v):A=v,z(v,"spellcheck",!1),H(()=>v.value=w()),v}}),e(pe,{when:!0,get children(){var v=gs();return s(v,()=>V()||"(二进制或不支持预览的文件)"),v}})]}})}}),null),m}}),null),H(()=>z(h,"data-view",o())),h})()}je(["click","input"]);var ys=l('<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>'),ks=l("<ul class=os-client-right-todo-list>"),Ss=l("<span class=os-client-right-todo-text>"),xs=l('<li class="os-client-right-todo-item is-clickable"role=button tabindex=0>'),Cs=l("<p class=os-client-right-todo-progress>已完成 <!> / "),Ls=l("<section class=os-client-right-todo><header class=os-client-right-todo-header><strong></strong><button type=button>关闭"),Ps=l("<p class=os-client-right-todo-empty>暂无场景工作流。从能力中心场景创建任务后,步骤会显示在这里。"),Ds=l("<span class=os-client-right-todo-stop> · ");function Es(r){return r==="completed"?"completed":r==="in_progress"?"in_progress":r==="failed"?"cancelled":"pending"}function js(r){if(r==="in_progress")return ys()}function Ms(r,a){return a?"confirm":r==="pending"?"edit":r==="completed"||r==="failed"||r==="in_progress"?"rerun":"view"}function Rs(r){return(()=>{var a=ks();return s(a,e(Ce,{get each(){return r.items},children:n=>(()=>{var $=xs();return $.$$keydown=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r.onOpen(n.index))},$.$$click=()=>r.onOpen(n.index),s($,e(ar,{readOnly:!0,get checked(){return n.status==="completed"},get indeterminate(){return n.status==="in_progress"},get icon(){return js(n.status)},get children(){var o=Ss();return s(o,()=>n.content),H(c=>{var _=n.status==="completed"||n.status==="cancelled",L=n.status==="pending";return _!==c.e&&o.classList.toggle("is-done",c.e=_),L!==c.t&&o.classList.toggle("is-pending",c.t=L),c},{e:void 0,t:void 0}),o}})),H(()=>z($,"data-state",n.status)),$})()})),a})()}function Is(r){const a=yt();an();const n=S(()=>$t(r.directoryKey,r.sessionID)??Bt(r.directoryKey)),$=S(()=>{const L=n();return L?.steps.length?L.steps.map((w,P)=>({content:w.name,status:Es(w.status),index:P})):[]}),o=S(()=>$().filter(L=>L.status==="completed").length),c=S(()=>n()?.title||"待办"),_=L=>{const w=$t(r.directoryKey,r.sessionID)??Bt(r.directoryKey);if(!w)return;const P=w.steps[L];if(!P)return;const U=lr(w,L),D=P.status==="pending"&&w.phase==="awaiting_confirm"&&w.currentIndex===L,d=Ms(P.status,D),p=P.status==="in_progress",J=d==="confirm"?"确认下一步参数":d==="edit"?"编辑步骤参数":p?"终止并重新执行":d==="rerun"?"从此步重新执行":"查看步骤参数",F=r.directoryKey;a.show(()=>e(dr,{title:J,get stepName(){return P.name},fields:U,get values(){return w.values},mode:d,get firstDecision(){return D&&w.confirmMode==="unset"},aborting:p,rerunActionLabel:p?"终止并重新执行":"从此步重新执行",get reason(){return d==="confirm"?`下一步「${P.name}」可按需调整参数,确认后将自动发送并执行。`:d==="edit"?`可修改「${P.name}」的预填参数,保存后在执行该步时生效。`:p?`将停止自动续跑并从「${P.name}」重发。已提交的外部作业需自行取消;可先修改参数再确认。`:d==="rerun"?`可修改「${P.name}」参数。确认后将从该步重新执行,并重置后续步骤状态。`:`「${P.name}」当前为只读,展示该步相关参数。`},canContinue:D,onSave:A=>{qt(F,A),ae({title:"已保存步骤参数"})},onConfirm:A=>{const j=Ut(F,A);j&&(ht(F,j),ae({title:A.mode==="auto"?`连续执行:${j.stepName}`:`继续执行:${j.stepName}`}))},onSaveAndContinue:A=>{qt(F,A.values);const j=Ut(F,A);j&&(ht(F,j),ae({title:A.mode==="auto"?`连续执行:${j.stepName}`:`继续执行:${j.stepName}`}))},onRerun:A=>{const j=cr(F,{stepIndex:L,values:A});j&&(ht(F,j),ae({title:p?`已终止并从该步重跑:${j.stepName}`:`已从该步重新执行:${j.stepName}`}))}}))};return(()=>{var L=Ls(),w=L.firstChild,P=w.firstChild,U=P.nextSibling;return s(P,c),wt(U,"click",r.onClose,!0),s(L,e(k,{get when(){return $().length>0},get fallback(){return Ps()},get children(){return[(()=>{var D=Cs(),d=D.firstChild,p=d.nextSibling;return p.nextSibling,s(D,o,p),s(D,()=>$().length,null),s(D,e(k,{get when(){return n()?.stopReason},children:J=>(()=>{var F=Ds();return F.firstChild,s(F,J,null),F})()}),null),D})(),e(Rs,{get items(){return $()},onOpen:_})]}}),null),H(()=>z(P,"title",c())),L})()}je(["click","keydown"]);var As=l("<div class=os-client-right-add-dropdown role=menu>"),Os=l('<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>'),zs=l("<button type=button role=menuitem>"),Fs=l("<section class=os-client-right-empty><strong>尚未打开页面</strong><p>点击 + 打开目录、可视化组件或待办;在会话中可从目录点文件到右侧编辑。"),Ns=l("<section class=os-client-right-pane-stub><header><strong>可视化组件</strong><button type=button>关闭</button></header><p>请从「目录」中打开 `.html` / `.md` / `.csv` / `.pdf` / `.xyz` 文件查看可视化预览;后续版本将提供独立可视化入口。"),Ks=l("<section class=os-client-right-pane-stub><header><strong>目录</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看目录。"),Ts=l("<section class=os-client-right-pane-stub><header><strong>待办</strong><button type=button>关闭</button></header><p>请先打开项目或任务后再查看待办。");const Ws=[{id:"directory",label:"目录"},{id:"viz",label:"可视化组件"},{id:"todo",label:"待办"}];function Hs(){const r=it(),[a,n]=N(!1),[$,o]=N();let c;const _=S(()=>ln(r.pathname)),L=S(()=>{const d=_()?.dir;return d?kt(d)??"":""}),w=S(()=>St(r.pathname)&&!!L()),P=S(()=>{an();const d=_()?.dir;if(!d)return!1;const p=$t(d,_()?.id);return p?p.phase!=="done"&&p.phase!=="stopped":!1});Ee(()=>{const d=p=>{a()&&(c?.contains(p.target)||n(!1))};document.addEventListener("pointerdown",d),De(()=>document.removeEventListener("pointerdown",d))}),Z(d=>{const p=w();return p&&!d&&!$()&&o("directory"),p}),Z(()=>{if(!cn())return;const p=ur();p&&(o(p),n(!1))});const U=d=>{o(d),n(!1)},D=()=>{if(P()&&$()!=="todo"){o("todo");return}o(void 0)};return(()=>{var d=Os(),p=d.firstChild,J=p.firstChild,F=J.firstChild,A=p.nextSibling,j=c;return typeof j=="function"?Ke(j,p):c=p,F.$$click=()=>n(R=>!R),s(J,e(k,{get when(){return a()},get children(){var R=As();return s(R,e(Ce,{get each(){return[...Ws]},children:O=>(()=>{var B=zs();return B.$$click=()=>U(O.id),s(B,()=>O.label),B})()})),R}}),null),s(A,e(k,{get when(){return $()},get fallback(){return Fs()},children:R=>e(on,{get children(){return[e(pe,{get when(){return R()==="directory"},get children(){return e(k,{get when(){return w()},get fallback(){return(()=>{var O=Ks(),B=O.firstChild,Q=B.firstChild,V=Q.nextSibling;return V.$$click=D,O})()},get children(){return e(hr,{params:()=>({dir:_().dir,id:_()?.id}),get children(){return e(gr,{directory:()=>L(),get children(){return e(mr,{get children(){return e(fr,{get children(){return e(_s,{onClose:D})}})}})}})}})}})}}),e(pe,{get when(){return R()==="todo"},get children(){return e(k,{get when(){return _()?.dir},get fallback(){return(()=>{var O=Ts(),B=O.firstChild,Q=B.firstChild,V=Q.nextSibling;return V.$$click=()=>o(void 0),O})()},children:O=>e(Is,{get directoryKey(){return O()},get sessionID(){return _()?.id},onClose:()=>o(void 0)})})}}),e(pe,{get when(){return R()==="viz"},get children(){var O=Ns(),B=O.firstChild,Q=B.firstChild,V=Q.nextSibling;return V.$$click=D,O}})]}})})),H(R=>{var O=!!a(),B=a();return O!==R.e&&F.classList.toggle("is-open",R.e=O),B!==R.t&&z(F,"aria-expanded",R.t=B),R},{e:void 0,t:void 0}),d})()}je(["click"]);var Bs=l('<button type=button class="os-client-panel-toggle os-client-terminal-toggle"aria-controls=terminal-panel>'),qs=l('<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 Us(){const r=it(),a=_t(),n=Te(),$=pr(),o=yt(),[c,_]=N(ee()),L=S(()=>tn(r.pathname)||St(r.pathname)),w=S(()=>!L()||vr()&&!c()?!1:a.terminal.enabled()?!0:Vt(c())),P=S(()=>a.view("workbench").terminal.opened()),U=S(()=>{const d=ln(r.pathname);return d?.dir?kt(d.dir)??"":""});Ee(()=>{const d=()=>_(ee());window.addEventListener(st,d),window.addEventListener(rt,d),window.addEventListener("storage",d),De(()=>{window.removeEventListener(st,d),window.removeEventListener(rt,d),window.removeEventListener("storage",d)})}),Z(()=>{w()&&Xt()}),Z(sn(L,(d,p)=>{p===void 0||d||!p||P()&&(a.view("workbench").terminal.close(),a.terminal.closeFullscreen())}));const D=()=>{if(Vt(c())||!a.terminal.enabled()){nn(()=>import("./dialog-terminal-unavailable-DR8ugCvy.js"),__vite__mapDeps([3,1,2])).then(d=>{o.show(()=>e(d.DialogTerminalUnavailable,{}))});return}if(!P()){const d=U();if(d&&!br(d)&&!rn(c(),d))return;Xt()}a.view("workbench").terminal.toggle()};return e(k,{get when(){return w()},get children(){var d=Bs();return d.$$click=p=>p.preventDefault(),d.$$pointerdown=p=>{p.button===0&&(p.preventDefault(),D())},s(d,e(Vs,{get active(){return P()}})),H(p=>{var J=!!P(),F=n.t("command.terminal.toggle"),A=n.t("command.terminal.toggle"),j=P(),R=`${n.t("command.terminal.toggle")} (${$.keybind("terminal.toggle")})`;return J!==p.e&&d.classList.toggle("is-active",p.e=J),F!==p.t&&z(d,"data-tooltip",p.t=F),A!==p.a&&z(d,"aria-label",p.a=A),j!==p.o&&z(d,"aria-expanded",p.o=j),R!==p.i&&z(d,"title",p.i=R),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d}})}function Vs(r){return(()=>{var a=qs(),n=a.firstChild,$=n.nextSibling;return H(()=>z($,"opacity",r.active?1:.85)),a})()}je(["pointerdown","click"]);var Xs=l('<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>'),Gs=l('<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>'),Qs=l('<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>'),Zs=l("<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,Js=230,Ys=430,ei=200,Yt=1280;function en(r){return(()=>{var a=Xs();return H(n=>{var $=r.side,o=r.open?"true":"false";return $!==n.e&&z(a,"data-side",n.e=$),o!==n.t&&z(a,"data-open",n.t=o),n},{e:void 0,t:void 0}),a})()}function vt(r){return Math.min(Ys,Math.max(Js,Math.round(r)))}function bt(r){const a=typeof window>"u"?Yt:Math.min(Yt,Math.floor(window.innerWidth*.85));return Math.min(a,Math.max(ei,Math.round(r)))}function si(r){const a=_t(),n=it(),[$,o]=N(!0),[c,_]=N(!1),[L,w]=N(Fe),[P,U]=N(Fe),[D,d]=N(!1),[p,J]=N(!1),[F,A]=N(0),[j,R]=N({left:0,right:0}),[O,B]=N(),[Q,V]=N(),le=S(()=>a.view("workbench").terminal.opened()),se=()=>le(),Me=S(()=>{if(!le())return 0;const g=F();return g>0?g:a.terminal.height()}),ce=()=>{const g=O();if(!g)return;const h=g.querySelector(":scope > .os-workspace-main");if(!h)return;const x=g.getBoundingClientRect(),m=getComputedStyle(g),v=x.left+(parseFloat(m.borderLeftWidth)||0),C=x.right-(parseFloat(m.borderRightWidth)||0),u=h.getBoundingClientRect(),te=g.querySelector(":scope > .os-client-right-sidebar")?.getBoundingClientRect()??u;R({left:Math.max(0,Math.round(u.left-v)),right:Math.max(0,Math.round(C-te.right))})},$e=()=>{o(g=>(g||w(Fe),!g))},he=()=>{_(g=>(g||(U(Fe),St(n.pathname)&&wr("directory")),!g))};Z(()=>{cn()&&(_(!0),U(h=>h>0?h:Fe))});const _e=g=>{if(g.button!==0)return;g.preventDefault();const h=g.clientX,x=L();d(!0);const m=C=>{w(vt(x+(C.clientX-h)))},v=()=>{d(!1),window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v)},ie=g=>{if(g.button!==0)return;g.preventDefault();const h=g.clientX,x=P();J(!0);const m=C=>{U(bt(x+(h-C.clientX)))},v=()=>{J(!1),window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v)};return Z(()=>{const g=Q();if(!g||typeof ResizeObserver>"u")return;const h=()=>{const m=g.querySelector("#terminal-panel");A(m?Math.round(m.getBoundingClientRect().height):0)};h();const x=new ResizeObserver(h);x.observe(g),De(()=>x.disconnect())}),Z(()=>{le()||A(0)}),Ee(()=>{a.view("workbench").terminal.close(),a.terminal.closeFullscreen(),A(0)}),Z(()=>{$(),c(),L(),P(),D(),p(),se(),O(),ce();const g=requestAnimationFrame(ce);De(()=>cancelAnimationFrame(g))}),Z(()=>{const g=O();if(!g||typeof ResizeObserver>"u")return;const h=new ResizeObserver(()=>ce());h.observe(g);const x=g.querySelector(":scope > .os-workspace-main");x&&h.observe(x);const m=g.querySelector(":scope > .os-client-right-sidebar");m&&h.observe(m),De(()=>h.disconnect())}),(()=>{var g=Zs(),h=g.firstChild,x=h.firstChild,m=x.nextSibling,v=h.nextSibling,C=v.nextSibling;return Ke(B,g),x.$$click=$e,s(x,e(en,{side:"left",get open(){return $()}})),s(h,e(Us,{}),m),m.$$click=he,s(m,e(en,{side:"right",get open(){return c()}})),s(g,e(k,{get when(){return $()},get children(){return[e(ts,{}),(()=>{var u=Gs();return u.$$keydown=X=>{if(X.key==="ArrowLeft"){X.preventDefault(),w(te=>vt(te-16));return}X.key==="ArrowRight"&&(X.preventDefault(),w(te=>vt(te+16)))},u.$$pointerdown=_e,H(()=>z(u,"aria-valuenow",L())),u})()]}}),v),s(v,()=>r.children),s(g,e(k,{get when(){return c()},get children(){return[(()=>{var u=Qs();return u.$$keydown=X=>{if(X.key==="ArrowLeft"){X.preventDefault(),U(te=>bt(te+16));return}X.key==="ArrowRight"&&(X.preventDefault(),U(te=>bt(te-16)))},u.$$pointerdown=ie,H(()=>z(u,"aria-valuenow",P())),u})(),e(Hs,{})]}}),C),Ke(V,C),z(C,"id",$r),H(u=>{var X=!!$(),te=!!c(),ye=!!D(),Re=!!p(),We=!!se(),He=!!(a.terminal.fullscreen()&&a.view("workbench").terminal.opened()),ve=`${L()}px`,Be=`${P()}px`,qe=`${Me()}px`,Ue=`${j().left}px`,Ve=`${j().right}px`,Xe=!!$(),Ge=$()?"关闭左侧栏":"打开左侧栏",Qe=$()?"关闭左侧栏":"打开左侧栏",Ze=!!c(),Le=c()?"关闭右侧栏":"打开右侧栏",Je=c()?"关闭右侧栏":"打开右侧栏",Ye=!!se(),Ie=!se();return X!==u.e&&g.classList.toggle("has-left-sidebar",u.e=X),te!==u.t&&g.classList.toggle("has-right-sidebar",u.t=te),ye!==u.a&&g.classList.toggle("is-resizing-left",u.a=ye),Re!==u.o&&g.classList.toggle("is-resizing-right",u.o=Re),We!==u.i&&g.classList.toggle("has-terminal-open",u.i=We),He!==u.n&&g.classList.toggle("has-terminal-fullscreen",u.n=He),ve!==u.s&&ze(g,"--os-client-sidebar-w",u.s=ve),Be!==u.h&&ze(g,"--os-client-tool-w",u.h=Be),qe!==u.r&&ze(g,"--os-client-terminal-h",u.r=qe),Ue!==u.d&&ze(g,"--os-client-terminal-left",u.d=Ue),Ve!==u.l&&ze(g,"--os-client-terminal-right",u.l=Ve),Xe!==u.u&&x.classList.toggle("is-active",u.u=Xe),Ge!==u.c&&z(x,"data-tooltip",u.c=Ge),Qe!==u.w&&z(x,"aria-label",u.w=Qe),Ze!==u.m&&m.classList.toggle("is-active",u.m=Ze),Le!==u.f&&z(m,"data-tooltip",u.f=Le),Je!==u.y&&z(m,"aria-label",u.y=Je),Ye!==u.g&&C.classList.toggle("is-open",u.g=Ye),Ie!==u.p&&z(C,"aria-hidden",u.p=Ie),u},{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}),g})()}je(["click","pointerdown","keydown"]);export{si as WorkbenchShell};
|
|
@@ -0,0 +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 _,bm 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-CDgkkcJS.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,m=i.firstChild,M=m.firstChild,f=M.nextSibling,U=f.nextSibling,w=m.nextSibling,q=i.nextSibling;return a(f,()=>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 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/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-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/assets/staplebops-07-cqQEvbIf.aac";export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDgkkcJS.js","assets/index-Dv4yLSDf.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-CDgkkcJS.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-CDgkkcJS.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Ne,m as tt,bR as Ye,dD as Oe,C as it,o as L,dE as at,dF as ke,dG as Ie,dH as ye,dI as Ue,dJ as le,dK as lt,au as Se,i as t,bZ as Je,c as a,W as w,F as Q,Y as A,S as g,X as Pe,dL as rt,dM as nt,dN as Ae,dO as st,dP as ct,t as n,dQ as ot,dA as dt,e as ut,dR as pt,f as gt,h as bt,g as ht,l as $t,n as vt,q as mt,a0 as Fe,b3 as Te,z as Le,s as Ce,b5 as Re,a4 as We,bk as je,a3 as qe,a5 as De,L as Ee,dS as _t,dT as ft,bY as pe,b0 as yt,dU as St,bi as Qe,b_ as Xe,dV as wt,bW as Ct,R as J,cl as Be,dB as xt,b$ as zt,dC as kt,b4 as It}from"./index-CDgkkcJS.js";var Pt=n("<div class=os-client-capability-wizard-papers><h3>相关论文</h3><ul>"),Ft=n("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),Tt=n("<p class=os-client-capability-wizard-note>工作目录与运行环境由系统自动识别,本步只需填写下列业务参数。"),Lt=n("<p class=os-client-capability-wizard-missing>本步还有 <!> 个必填参数未填写。"),Rt=n("<p class=os-client-capability-wizard-missing>本步有 <!> 个参数类型不正确,请按标注类型修改。"),Wt=n("<p class=os-client-capability-wizard-missing>其他步骤还有 <!> 个必填参数未填写,可点击左侧步骤继续补全。"),jt=n("<p class=os-client-capability-wizard-missing>其他步骤还有 <!> 个参数类型不正确,可点击左侧步骤修改。"),qt=n("<small>"),Dt=n("<ul class=os-client-capability-wizard-output-list>"),Et=n("<div class=os-client-capability-wizard-quality><strong>质量门禁</strong><p>"),Ht=n('<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>创建任务并自动逐步执行'),Mt=n("<li><button type=button class=os-client-capability-wizard-step><span></span><div><p>"),Ot=n('<li><a target=_blank rel="noopener noreferrer">'),Ut=n("<p>"),At=n("<div class=os-client-capability-wizard-step-banner><strong>"),Bt=n("<p class=os-client-capability-wizard-note>本步无需额外用户参数。"),Kt=n("<em>*"),Vt=n("<small class=os-client-capability-wizard-field-type>"),Gt=n("<textarea rows=3>"),Ke=n("<em class=os-client-capability-wizard-field-error>"),Nt=n("<label class=os-client-capability-wizard-field><span>"),Yt=n("<input type=text>"),Jt=n("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Qt=n("<li>");function Xt(e){const d=tt(),[l,$]=Ye({values:Oe(e.scenario),attempted:!1,activeStepIndex:0});it(()=>{$({values:Oe(e.scenario),attempted:!1,activeStepIndex:0})});const S=L(()=>at(e.scenario)),k=L(()=>S()[l.activeStepIndex]??S()[0]),B=L(()=>{const v=k();return v?ke(e.scenario,v):e.scenario.user_input}),R=L(()=>Ie(e.scenario,l.values)),ge=L(()=>ye(e.scenario.user_input,l.values)),K=L(()=>B().filter(v=>Ue(v)?!String(l.values[le(v)]??"").trim():!1)),oe=L(()=>ye(B(),l.values)),I=L(()=>B().filter(v=>String(l.values[le(v)]??"").trim()).length),X=L(()=>{const P=k()?.prompt||e.scenario.ai_prompt?.template||"";return lt(P,l.values)}),G=L(()=>k()?.outputs??[]),re=L(()=>(e.scenario.related_papers??[]).filter(v=>!!String(v.url??"").trim())),N=(v,P)=>{$("values",v,P)},Z=v=>{$("activeStepIndex",v)},xe=()=>{$("attempted",!0);const v=ye(e.scenario.user_input,l.values);if(v.length>0){const W=le(v[0]),x=S().findIndex(te=>ke(e.scenario,te).some(r=>le(r)===W));x>=0&&$("activeStepIndex",x);return}const P=Ie(e.scenario,l.values);if(P.length===0){e.onSubmit({values:{...l.values}});return}const de=le(P[0]),ee=S().findIndex(W=>ke(e.scenario,W).some(x=>le(x)===de));ee>=0&&$("activeStepIndex",ee),d.show(()=>a(ot,{title:"请补充必填参数",get reason(){return`还有 ${P.length} 个必填参数未填写,补充后即可创建任务并自动逐步执行。`},fields:P,get values(){return l.values},onConfirm:W=>{const x={...l.values,...W};$("values",x),!(ye(e.scenario.user_input,x).length>0||Ie(e.scenario,x).length>0)&&e.onSubmit({values:x})}}))};return(()=>{var v=Ht(),P=v.firstChild,de=P.nextSibling,ee=de.firstChild,W=ee.firstChild,x=W.nextSibling,te=x.firstChild,r=te.nextSibling,b=x.nextSibling,m=ee.nextSibling,h=m.firstChild,j=h.firstChild,Y=j.nextSibling,be=Y.nextSibling,q=h.nextSibling,he=q.firstChild,$e=he.firstChild,V=$e.nextSibling,ue=V.firstChild,ne=ue.nextSibling,ze=ne.nextSibling,ve=ze.nextSibling;ve.nextSibling;var D=he.nextSibling,me=D.nextSibling,ie=me.firstChild,u=ie.nextSibling,p=q.nextSibling,_=p.firstChild,F=_.firstChild;F.firstChild;var T=_.nextSibling,H=T.firstChild,E=H.nextSibling,se=E.firstChild,M=se.nextSibling;M.nextSibling;var ae=T.nextSibling,ce=m.nextSibling,_e=ce.firstChild,fe=_e.nextSibling;return Se(P,"click",e.onClose,!0),Se(W,"click",e.onClose,!0),t(te,()=>e.scenario.name),t(r,()=>Je(e.scenario.problem_and_applicability)),Se(b,"click",e.onClose,!0),t(be,a(Q,{get each(){return S()},children:(i,s)=>(()=>{var c=Mt(),z=c.firstChild,O=z.firstChild,f=O.nextSibling,y=f.firstChild;return z.$$click=()=>Z(s()),t(O,()=>s()+1),t(y,()=>i.name),w(()=>c.classList.toggle("is-active",l.activeStepIndex===s())),c})()})),t(h,a(g,{get when(){return re().length>0},get children(){var i=Pt(),s=i.firstChild,c=s.nextSibling;return t(c,a(Q,{get each(){return re()},children:z=>(()=>{var O=Ot(),f=O.firstChild;return t(f,()=>z.title),w(y=>{var U=z.url,o=z.title;return U!==y.e&&A(f,"href",y.e=U),o!==y.t&&A(f,"title",y.t=o),y},{e:void 0,t:void 0}),O})()})),i}}),null),t(h,a(g,{get when(){return e.scenario.HPC},get children(){var i=Ft(),s=i.firstChild,c=s.nextSibling;return t(c,()=>e.scenario.HPC),i}}),null),t(V,()=>l.activeStepIndex+1,ue),t(V,()=>S().length,ne),t(V,I,ve),t(V,()=>B().length,null),t(q,a(g,{get when(){return k()},children:i=>(()=>{var s=At(),c=s.firstChild;return t(c,()=>i().name),t(s,a(g,{get when(){return i().purpose?.trim()},get children(){var z=Ut();return t(z,()=>i().purpose),z}}),null),s})()}),D),t(q,a(g,{get when(){return e.scenario.system_auto_detection?.fields?.length},get children(){return Tt()}}),D),t(q,a(g,{get when(){return Pe(()=>!!l.attempted)()&&K().length>0},get children(){var i=Lt(),s=i.firstChild,c=s.nextSibling;return c.nextSibling,t(i,()=>K().length,c),i}}),D),t(q,a(g,{get when(){return oe().length>0},get children(){var i=Rt(),s=i.firstChild,c=s.nextSibling;return c.nextSibling,t(i,()=>oe().length,c),i}}),D),t(q,a(g,{get when(){return Pe(()=>!!(l.attempted&&R().length>0))()&&K().length===0},get children(){var i=Wt(),s=i.firstChild,c=s.nextSibling;return c.nextSibling,t(i,()=>R().length,c),i}}),D),t(q,a(g,{get when(){return Pe(()=>!!(l.attempted&&ge().length>0))()&&oe().length===0},get children(){var i=jt(),s=i.firstChild,c=s.nextSibling;return c.nextSibling,t(i,()=>ge().length,c),i}}),D),t(D,a(g,{get when(){return B().length>0},get fallback(){return Bt()},get children(){return a(Q,{get each(){return B()},children:i=>{const s=le(i),c=Ue(i),z=l.attempted&&c&&!String(l.values[s]??"").trim(),O=rt(i,l.values[s]??""),f=!!O&&(l.attempted||!!String(l.values[s]??"").trim());return(()=>{var y=Nt(),U=y.firstChild;return y.classList.toggle("is-required",!!c),y.classList.toggle("is-invalid",!!(z||f)),t(U,()=>nt(i),null),t(U,a(g,{when:c,get children(){return Kt()}}),null),t(U,a(g,{get when(){return i.input_type},get children(){var o=Vt();return t(o,()=>i.input_type),o}}),null),t(y,a(g,{get when(){return st(i)},get fallback(){return(()=>{var o=Yt();return o.$$input=C=>N(s,C.currentTarget.value),w(C=>{var He=i.input_type==="int"||i.input_type==="float"?"decimal":void 0,Me=Ae(i);return He!==C.e&&A(o,"inputmode",C.e=He),Me!==C.t&&A(o,"placeholder",C.t=Me),C},{e:void 0,t:void 0}),w(()=>o.value=l.values[s]??""),o})()},get children(){var o=Gt();return o.$$input=C=>N(s,C.currentTarget.value),w(()=>A(o,"placeholder",Ae(i))),w(()=>o.value=l.values[s]??""),o}}),null),t(y,a(g,{when:f,get children(){var o=Ke();return t(o,O),o}}),null),t(y,a(g,{when:z&&!f,get children(){var o=Ke();return t(o,()=>ct(i,"")),o}}),null),y})()}})}})),ie.$$click=()=>Z(Math.max(0,l.activeStepIndex-1)),u.$$click=()=>Z(Math.min(S().length-1,l.activeStepIndex+1)),t(F,a(g,{get when(){return k()?.result_subfolder},get children(){var i=qt();return t(i,()=>k()?.result_subfolder),w(()=>A(i,"title",k()?.result_subfolder)),i}}),null),t(_,a(g,{get when(){return G().length>0},get fallback(){return Jt()},get children(){var i=Dt();return t(i,a(Q,{get each(){return G()},children:s=>(()=>{var c=Qt();return t(c,s),c})()})),i}}),null),t(_,a(g,{get when(){return k()?.quality_gate},get children(){var i=Et(),s=i.firstChild,c=s.nextSibling;return t(c,()=>k()?.quality_gate),i}}),null),t(E,()=>l.activeStepIndex+1,M),Se(_e,"click",e.onClose,!0),fe.$$click=xe,w(i=>{var s=l.activeStepIndex<=0,c=l.activeStepIndex>=S().length-1;return s!==i.e&&(ie.disabled=i.e=s),c!==i.t&&(u.disabled=i.t=c),i},{e:void 0,t:void 0}),w(()=>ae.value=X()),v})()}Ne(["click","input"]);function Zt(e,d){return e.replace(/\{\{(\w+)\}\}/g,(l,$)=>d[$]??"")}var ei=n("<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=能力向导>"),ti=n("<section class=os-client-capability-wizard-dialog><p>未找到该能力。"),ii=n("<div class=os-client-capability-wizard-scenario-group><span>完整工作流场景"),ai=n("<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>创建任务"),li=n("<section class=os-client-capability-wizard-dialog><p>「<!>」暂无 OneScience 源码或魔搭映射,当前不可使用。"),ri=n("<button type=button><strong></strong><p>"),ni=n("<button type=button><strong></strong><p></p><small> · <!> 步"),Ve=n("<p class=os-client-capability-wizard-empty>请先选择任务场景。"),si=n("<div class=os-client-capability-wizard-required aria-label=该能力需要什么数据><h4>该能力需要什么数据</h4><ul>"),ci=n("<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>"),oi=n("<textarea rows=3>"),di=n("<label class=os-client-capability-wizard-field><span>"),ui=n("<input type=text>"),pi=n("<li>"),gi=n("<div class=os-client-capability-wizard-right-head><strong></strong><p>"),bi=n("<div class=os-client-capability-wizard-outputs aria-label=预计产出><span>预计产出</span><p>");function hi(e){return e==="hpc"?"软件介绍":"模型介绍"}function $i(e){return`使用 ${e} 开始科研任务`}function vi(e){if(!Fe({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const d=Te({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!d)return!1;const l=We(d);return je(l,e.prompt),qe(l),e.openProject?.(d),e.touchCode?.(d),De({variant:"success",title:`已为你创建「${e.title}」任务`}),e.navigate(Ee(d)),!0}function Ze(e){const d=_t(e.scenario),l=d[0];if(!l?.promptTemplate.trim()||!Fe({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.id||e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const $=Te({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=We($);return ft(S,{title:e.scenario.name,scenarioId:pe(e.scenario),values:e.values,steps:d}),yt("todo"),je(S,St(l,e.values)),qe(S),e.openProject?.($),e.touchCode?.($),De({variant:"success",title:`已创建「${e.scenario.name}」`,description:`将按 ${d.length} 步自动依次执行,缺参或失败时暂停`}),e.navigate(Ee($)),!0}function et(e){if(!Fe({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=Qe(e.resourceId),l=d?.scenarios.find(k=>k.id===e.scenarioId);if(!d||!l||!Xe(d))return!1;const $=Te({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=We($);return je(S,e.prompt),qe(S),e.openProject?.($),e.touchCode?.($),De({variant:"success",title:`已为你创建 ${d.name}「${l.title}」任务`}),e.navigate(Ee($)),!0}function we(e,d){return Zt(e.promptTemplate,d)}function Ge(e){return Object.fromEntries(e.fields.map(d=>[d.id,mi(d)]))}function mi(e){return e.default?.trim()?e.default:e.placeholder?.replace(/^例如[::]\s*/,"").trim()??""}function _i(){const e=dt(),d=ut(),[l]=pt(),$=gt(),S=bt(),k=ht(),B=$t(),R=()=>Qe(e.id??""),ge=()=>kt(d.search),K=()=>xt(d.search,{category:R()?.category??"onemodel",domain:R()?.domain??"materials"}),oe=()=>zt(e.id??"",ge()),[I,X]=Ye({scenarioId:"",values:{},prompt:""}),[G,re]=vt(""),N=()=>R()?.scenarios.find(r=>r.id===I.scenarioId),Z=L(()=>{const r=R();return r?wt({domain:r.domain,name:r.name,id:r.id,category:r.category}):[]}),xe=L(()=>{const r=G();if(r)return Ct(r)??Z().find(b=>pe(b)===r)}),v=()=>({navigate:$,isLoggedIn:!!Ce(),path:S.data.path,recent:It(S.data.project),lastCodeWorkspace:B.projects.lastCode(),openProject:r=>k.projects.open(r),touchCode:r=>B.projects.touchCode(r)}),P=()=>{const r=N();r&&X("prompt",we(r,I.values))};mt(()=>{const r=R();if(!r?.scenarios.length)return;const b=l.scenario,h=(b?r.scenarios.find(Y=>Y.id===b):void 0)??r.scenarios[0],j=Ge(h);X({scenarioId:h.id,values:j,prompt:we(h,j)})});const de=r=>{const m=R()?.scenarios.find(j=>j.id===r);if(!m)return;re("");const h=Ge(m);X({scenarioId:m.id,values:h,prompt:we(m,h)})},ee=r=>{re(r)},W=(r,b)=>{const m=N();if(!m)return;const h={...I.values,[r]:b};X({values:h,prompt:we(m,h)})},x=()=>{const r=R(),b=N();!r||!b||et({resourceId:r.id,scenarioId:b.id,values:{...I.values},prompt:I.prompt,...v()})},te=(r,b)=>{Ze({scenario:r,values:b.values,...v()})};return(()=>{var r=ei();return t(r,a(g,{get when(){return R()},get fallback(){return[a(J,{class:"os-client-capability-wizard-backdrop",get href(){return Be()},"aria-label":"关闭向导"}),(()=>{var b=ti();return b.firstChild,t(b,a(J,{get href(){return Be()},children:"返回能力中心"}),null),b})()]},children:b=>a(g,{get when(){return Xe(b())},get fallback(){return[a(J,{class:"os-client-capability-wizard-backdrop",get href(){return K()},"aria-label":"关闭向导"}),(()=>{var m=li(),h=m.firstChild,j=h.firstChild,Y=j.nextSibling;return Y.nextSibling,t(h,()=>b().name,Y),t(m,a(J,{get href(){return K()},children:"返回模型库"}),null),m})()]},get children(){return[a(J,{class:"os-client-capability-wizard-backdrop",get href(){return K()},"aria-label":"关闭向导"}),(()=>{var m=ai(),h=m.firstChild,j=h.firstChild,Y=j.firstChild,be=h.nextSibling,q=be.firstChild,he=q.firstChild,$e=he.nextSibling,V=q.nextSibling;V.firstChild;var ue=V.nextSibling,ne=ue.firstChild,ze=ne.firstChild,ve=ze.nextSibling,D=ne.nextSibling,me=be.nextSibling,ie=me.firstChild;return t(h,a(J,{class:"os-client-capability-wizard-intro-back",get href(){return oe()},get children(){return hi(b().category)}}),j),t(Y,()=>$i(b().name)),t(h,a(J,{class:"os-client-capability-wizard-close",get href(){return K()},"aria-label":"关闭",children:"×"}),null),t($e,a(Q,{get each(){return b().scenarios},children:u=>(()=>{var p=ri(),_=p.firstChild,F=_.nextSibling;return p.$$click=()=>de(u.id),t(_,()=>u.title),t(F,()=>u.summary),w(T=>{var H=!G()&&I.scenarioId===u.id,E=!G()&&I.scenarioId===u.id;return H!==T.e&&p.classList.toggle("is-active",T.e=H),E!==T.t&&A(p,"aria-pressed",T.t=E),T},{e:void 0,t:void 0}),p})()}),null),t($e,a(g,{get when(){return Z().length>0},get children(){var u=ii();return u.firstChild,t(u,a(Q,{get each(){return Z()},children:p=>(()=>{var _=ni(),F=_.firstChild,T=F.nextSibling,H=T.nextSibling,E=H.firstChild,se=E.nextSibling;return se.nextSibling,_.$$click=()=>ee(pe(p)),t(F,()=>p.name),t(T,()=>Je(p.problem_and_applicability)),t(H,()=>p.scenario_id,E),t(H,()=>p.workflow_steps?.length||p.workflow.length,se),w(M=>{var ae=G()===pe(p),ce=G()===pe(p);return ae!==M.e&&_.classList.toggle("is-active",M.e=ae),ce!==M.t&&A(_,"aria-pressed",M.t=ce),M},{e:void 0,t:void 0}),_})()}),null),u}}),null),t(V,a(g,{get when(){return N()},keyed:!0,get fallback(){return Ve()},children:u=>(()=>{var p=ci(),_=p.firstChild,F=_.nextSibling,T=F.firstChild,H=T.nextSibling,E=H.firstChild,se=E.firstChild,M=se.nextSibling,ae=E.nextSibling,ce=ae.firstChild,_e=ce.nextSibling,fe=ae.nextSibling,i=fe.firstChild,s=i.nextSibling,c=fe.nextSibling,z=c.firstChild,O=z.nextSibling;return t(_,a(Q,{get each(){return u.fields},children:f=>(()=>{var y=di(),U=y.firstChild;return t(U,()=>f.label),t(y,a(g,{get when(){return f.multiline},get fallback(){return(()=>{var o=ui();return o.$$input=C=>W(f.id,C.currentTarget.value),w(()=>A(o,"placeholder",f.placeholder)),w(()=>o.value=I.values[f.id]??""),o})()},get children(){var o=oi();return o.$$input=C=>W(f.id,C.currentTarget.value),w(()=>A(o,"placeholder",f.placeholder)),w(()=>o.value=I.values[f.id]??""),o}}),null),y})()})),t(M,()=>u.capabilitySummary.current),t(_e,()=>u.capabilitySummary.keyConfig),t(s,()=>u.capabilitySummary.resources),t(O,()=>u.capabilitySummary.deliverables),t(p,a(g,{get when(){return u.requiredData?.length},get children(){var f=si(),y=f.firstChild,U=y.nextSibling;return t(U,a(Q,{get each(){return u.requiredData},children:o=>(()=>{var C=pi();return t(C,o),C})()})),f}}),null),p})()}),null),t(ue,a(g,{get when(){return N()},keyed:!0,get fallback(){return Ve()},children:u=>[(()=>{var p=gi(),_=p.firstChild,F=_.nextSibling;return t(_,()=>u.title),t(F,()=>u.summary),p})(),(()=>{var p=bi(),_=p.firstChild,F=_.nextSibling;return t(F,()=>u.expectedOutputs),p})()]}),ne),ve.$$click=P,D.$$input=u=>X("prompt",u.currentTarget.value),t(me,a(J,{get href(){return K()},children:"返回能力中心"}),ie),ie.$$click=x,w(()=>ie.disabled=!I.prompt.trim()),w(()=>D.value=I.prompt),m})(),a(g,{get when(){return xe()},children:m=>a(Xt,{get scenario(){return m()},onClose:()=>re(""),onSubmit:h=>te(m(),h)})})]}})})),r})()}Ne(["click","input"]);const yi=Object.freeze(Object.defineProperty({__proto__:null,CapabilityWizardPage:_i,startCapabilityPromptTask:vi,startCapabilityScenarioRunTask:Ze,startCapabilityWizardTask:et},Symbol.toStringTag,{value:"Module"}));export{Xt as S,Ze as a,et as b,vi as s,yi as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/assets/yup-01-BtRq6dLN.aac";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/assets/yup-03-BHLEoqSS.aac";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/assets/yup-04-C7yadpJT.aac";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
1
|
+
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609101646/assets/yup-05-CuuaeyjC.aac";export{e as default};
|