@onescience/onecode-web 1.14.50-202609141631 → 1.14.50-202609141749
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-BcAnND8e.js → 3Dmol-BzrzYmYr.js} +1 -1
- package/assets/{account-system-C-X3tt5b.js → account-system-YP1vm0p9.js} +1 -1
- package/assets/{alert-04-CaMG0Bzh.js → alert-01-CwP96IwE.js} +1 -1
- package/assets/{alert-05-D72dLAD1.js → alert-02-CcDpq8KC.js} +1 -1
- package/assets/{alert-01-D6TAHx4S.js → alert-04-BFgEV-X1.js} +1 -1
- package/assets/{alert-02-B06XMEjt.js → alert-05-BnWRJBBv.js} +1 -1
- package/assets/alert-06-Cx_unJKZ.js +1 -0
- package/assets/alert-07-DU4mwZd2.js +1 -0
- package/assets/alert-08-CsktSiNh.js +1 -0
- package/assets/alert-10-BP8sCiE8.js +1 -0
- package/assets/{bip-bop-03-C0ptGXEB.js → bip-bop-03-BGsxn0Bw.js} +1 -1
- package/assets/{bip-bop-04-CW9V4QqZ.js → bip-bop-04-Db-RIgyD.js} +1 -1
- package/assets/{bip-bop-06-J35fi2cB.js → bip-bop-06-B8tkMD4E.js} +1 -1
- package/assets/{bip-bop-08-DK2AlLyt.js → bip-bop-08-7dPFPRQ_.js} +1 -1
- package/assets/bip-bop-09-Nv0MwUKK.js +1 -0
- package/assets/{center-Cv8SnYAR.js → center-Ck1X-YZw.js} +1 -1
- package/assets/{current-project-DpisCbmX.js → current-project-BJrL_nAv.js} +1 -1
- package/assets/{dialog-edit-project-D1QiV1lb.js → dialog-edit-project-DsYHqlmz.js} +1 -1
- package/assets/{dialog-fork-BTYK9k31.js → dialog-fork-OpEimzlt.js} +1 -1
- package/assets/{dialog-project-upload-DGBE14Yk.js → dialog-project-upload-BvBLKRzF.js} +1 -1
- package/assets/{dialog-select-file-DNzVZ9Hn.js → dialog-select-file-DI7Rgmg5.js} +1 -1
- package/assets/{dialog-select-model-BGvyGloR.js → dialog-select-model-B6qAKNkv.js} +2 -2
- package/assets/{dialog-terminal-unavailable-e6R9_l2x.js → dialog-terminal-unavailable-CnuUlDeK.js} +1 -1
- package/assets/{docs-DJdUiAIL.js → docs-C8EJLWld.js} +1 -1
- package/assets/{ghostty-web-Yz75Zh3l.js → ghostty-web-BkLwJdKt.js} +1 -1
- package/assets/{home-B8nBl6AZ.js → home-zKFyFeJF.js} +1 -1
- package/assets/{index-DcAzlkrJ.js → index-BfgC-BpF.js} +40 -40
- package/assets/{index-CAWVV-dl.css → index-CK0ZjbzP.css} +1 -1
- package/assets/{intro-PHoyONe8.js → intro-C4vK3jtw.js} +1 -1
- package/assets/{nope-02-ChI1e9rL.js → nope-02-l-3NPRWX.js} +1 -1
- package/assets/{nope-05-CyjuJbTA.js → nope-05-Crxz1LLw.js} +1 -1
- package/assets/{nope-08-CTNnfMoW.js → nope-08-DmTExMLp.js} +1 -1
- package/assets/{nope-11-C_tu4RX2.js → nope-11-D2aMr3CQ.js} +1 -1
- package/assets/nope-12-poq0iyLb.js +1 -0
- package/assets/{onescience-B63JrJAj.js → onescience-D9hb01CU.js} +1 -1
- package/assets/{resources-G5IkcMme.js → resources-Vkb8YnFe.js} +1 -1
- package/assets/{selection-DpNrNB6i.js → selection-BBowXPcv.js} +1 -1
- package/assets/{shell-CZBfSOyt.js → shell-BtEe37MN.js} +2 -2
- package/assets/{skills-BhDEuokd.js → skills-CxA4rhwr.js} +1 -1
- package/assets/{staplebops-03-C97Nsdaq.js → staplebops-03-Btj-EUQm.js} +1 -1
- package/assets/{staplebops-04-L3aFWOFf.js → staplebops-04-Ct16wrox.js} +1 -1
- package/assets/{staplebops-06-DvMBO_Dt.js → staplebops-06-VUWj5bjf.js} +1 -1
- package/assets/{staplebops-07-wiVgDHWx.js → staplebops-07-DlS8encY.js} +1 -1
- package/assets/{status-popover-body-Af9z0NSU.js → status-popover-body-i8jar7R1.js} +2 -2
- package/assets/{wizard-B6YZTfze.js → wizard-DX_vKq-x.js} +1 -1
- package/assets/{yup-01-BhA98P7h.js → yup-01-DkrwuySv.js} +1 -1
- package/assets/{yup-03-fouMySlJ.js → yup-03-D8GIQZYo.js} +1 -1
- package/assets/{yup-04-B459Jion.js → yup-04-B3AOXUOd.js} +1 -1
- package/assets/{yup-05-BiAh1-eK.js → yup-05-CDKnBTjV.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/alert-06-nnCZ59ig.js +0 -1
- package/assets/alert-07-K__uwA9X.js +0 -1
- package/assets/alert-08-BYGQ21_y.js +0 -1
- package/assets/alert-10-CMrTzbLq.js +0 -1
- package/assets/bip-bop-09-DYuti-nv.js +0 -1
- package/assets/nope-12-Bp0uBd_Z.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Ne,m as tt,bT as Xe,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,az as Se,i as t,b_ 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 Te,bf as Fe,z as Le,s as Ce,bg as Re,a4 as je,bl as We,a3 as qe,a5 as De,L as Ee,dS as _t,dT as ft,bZ as pe,b4 as yt,dU as St,bj as Qe,bo as Ye,dV as wt,bX as Ct,R as J,cl as Be,dB as xt,b$ as zt,dC as kt,be as It}from"./index-DcAzlkrJ.js";var Pt=n("<div class=os-client-capability-wizard-papers><h3>相关论文</h3><ul>"),Tt=n("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),Ft=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>本步有 <!> 个参数类型不正确,请按标注类型修改。"),jt=n("<p class=os-client-capability-wizard-missing>其他步骤还有 <!> 个必填参数未填写,可点击左侧步骤继续补全。"),Wt=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>"),Xt=n("<input type=text>"),Jt=n("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Qt=n("<li>");function Yt(e){const d=tt(),[l,$]=Xe({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),Y=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 j=le(v[0]),x=S().findIndex(te=>ke(e.scenario,te).some(r=>le(r)===j));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(j=>ke(e.scenario,j).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:j=>{const x={...l.values,...j};$("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,j=ee.firstChild,x=j.nextSibling,te=x.firstChild,r=te.nextSibling,b=x.nextSibling,m=ee.nextSibling,h=m.firstChild,W=h.firstChild,X=W.nextSibling,be=X.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,T=_.firstChild;T.firstChild;var F=_.nextSibling,H=F.firstChild,E=H.nextSibling,se=E.firstChild,M=se.nextSibling;M.nextSibling;var ae=F.nextSibling,ce=m.nextSibling,_e=ce.firstChild,fe=_e.nextSibling;return Se(P,"click",e.onClose,!0),Se(j,"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=Tt(),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 Ft()}}),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=jt(),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=Wt(),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=Xt();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(T,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=Y()),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(!Te({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const d=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!d)return!1;const l=je(d);return We(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()||!Te({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.id||e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const $=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=je($);return ft(S,{title:e.scenario.name,scenarioId:pe(e.scenario),values:e.values,steps:d}),yt("todo"),We(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(!Te({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||!Ye(d))return!1;const $=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=je($);return We(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,Y]=Xe({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&&Y("prompt",we(r,I.values))};mt(()=>{const r=R();if(!r?.scenarios.length)return;const b=l.scenario,h=(b?r.scenarios.find(X=>X.id===b):void 0)??r.scenarios[0],W=Ge(h);Y({scenarioId:h.id,values:W,prompt:we(h,W)})});const de=r=>{const m=R()?.scenarios.find(W=>W.id===r);if(!m)return;re("");const h=Ge(m);Y({scenarioId:m.id,values:h,prompt:we(m,h)})},ee=r=>{re(r)},j=(r,b)=>{const m=N();if(!m)return;const h={...I.values,[r]:b};Y({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 Ye(b())},get fallback(){return[a(J,{class:"os-client-capability-wizard-backdrop",get href(){return K()},"aria-label":"关闭向导"}),(()=>{var m=li(),h=m.firstChild,W=h.firstChild,X=W.nextSibling;return X.nextSibling,t(h,()=>b().name,X),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,W=h.firstChild,X=W.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)}}),W),t(X,()=>$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,T=_.nextSibling;return p.$$click=()=>de(u.id),t(_,()=>u.title),t(T,()=>u.summary),w(F=>{var H=!G()&&I.scenarioId===u.id,E=!G()&&I.scenarioId===u.id;return H!==F.e&&p.classList.toggle("is-active",F.e=H),E!==F.t&&A(p,"aria-pressed",F.t=E),F},{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(),T=_.firstChild,F=T.nextSibling,H=F.nextSibling,E=H.firstChild,se=E.nextSibling;return se.nextSibling,_.$$click=()=>ee(pe(p)),t(T,()=>p.name),t(F,()=>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,T=_.nextSibling,F=T.firstChild,H=F.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=>j(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=>j(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,T=_.nextSibling;return t(_,()=>u.title),t(T,()=>u.summary),p})(),(()=>{var p=bi(),_=p.firstChild,T=_.nextSibling;return t(T,()=>u.expectedOutputs),p})()]}),ne),ve.$$click=P,D.$$input=u=>Y("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(Yt,{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{Yt as S,Ze as a,et as b,vi as s,yi as w};
|
|
1
|
+
import{b as Ne,m as tt,bT as Xe,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,az as Se,i as t,b_ 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 Te,bf as Fe,z as Le,s as Ce,bg as Re,a4 as je,bl as We,a3 as qe,a5 as De,L as Ee,dS as _t,dT as ft,bZ as pe,b4 as yt,dU as St,bj as Qe,bo as Ye,dV as wt,bX as Ct,R as J,cl as Be,dB as xt,b$ as zt,dC as kt,be as It}from"./index-BfgC-BpF.js";var Pt=n("<div class=os-client-capability-wizard-papers><h3>相关论文</h3><ul>"),Tt=n("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),Ft=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>本步有 <!> 个参数类型不正确,请按标注类型修改。"),jt=n("<p class=os-client-capability-wizard-missing>其他步骤还有 <!> 个必填参数未填写,可点击左侧步骤继续补全。"),Wt=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>"),Xt=n("<input type=text>"),Jt=n("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Qt=n("<li>");function Yt(e){const d=tt(),[l,$]=Xe({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),Y=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 j=le(v[0]),x=S().findIndex(te=>ke(e.scenario,te).some(r=>le(r)===j));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(j=>ke(e.scenario,j).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:j=>{const x={...l.values,...j};$("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,j=ee.firstChild,x=j.nextSibling,te=x.firstChild,r=te.nextSibling,b=x.nextSibling,m=ee.nextSibling,h=m.firstChild,W=h.firstChild,X=W.nextSibling,be=X.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,T=_.firstChild;T.firstChild;var F=_.nextSibling,H=F.firstChild,E=H.nextSibling,se=E.firstChild,M=se.nextSibling;M.nextSibling;var ae=F.nextSibling,ce=m.nextSibling,_e=ce.firstChild,fe=_e.nextSibling;return Se(P,"click",e.onClose,!0),Se(j,"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=Tt(),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 Ft()}}),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=jt(),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=Wt(),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=Xt();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(T,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=Y()),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(!Te({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const d=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!d)return!1;const l=je(d);return We(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()||!Te({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.id||e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const $=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=je($);return ft(S,{title:e.scenario.name,scenarioId:pe(e.scenario),values:e.values,steps:d}),yt("todo"),We(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(!Te({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||!Ye(d))return!1;const $=Fe({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Le(Ce())||Re(document,e.path);if(!$)return!1;const S=je($);return We(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,Y]=Xe({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&&Y("prompt",we(r,I.values))};mt(()=>{const r=R();if(!r?.scenarios.length)return;const b=l.scenario,h=(b?r.scenarios.find(X=>X.id===b):void 0)??r.scenarios[0],W=Ge(h);Y({scenarioId:h.id,values:W,prompt:we(h,W)})});const de=r=>{const m=R()?.scenarios.find(W=>W.id===r);if(!m)return;re("");const h=Ge(m);Y({scenarioId:m.id,values:h,prompt:we(m,h)})},ee=r=>{re(r)},j=(r,b)=>{const m=N();if(!m)return;const h={...I.values,[r]:b};Y({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 Ye(b())},get fallback(){return[a(J,{class:"os-client-capability-wizard-backdrop",get href(){return K()},"aria-label":"关闭向导"}),(()=>{var m=li(),h=m.firstChild,W=h.firstChild,X=W.nextSibling;return X.nextSibling,t(h,()=>b().name,X),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,W=h.firstChild,X=W.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)}}),W),t(X,()=>$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,T=_.nextSibling;return p.$$click=()=>de(u.id),t(_,()=>u.title),t(T,()=>u.summary),w(F=>{var H=!G()&&I.scenarioId===u.id,E=!G()&&I.scenarioId===u.id;return H!==F.e&&p.classList.toggle("is-active",F.e=H),E!==F.t&&A(p,"aria-pressed",F.t=E),F},{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(),T=_.firstChild,F=T.nextSibling,H=F.nextSibling,E=H.firstChild,se=E.nextSibling;return se.nextSibling,_.$$click=()=>ee(pe(p)),t(T,()=>p.name),t(F,()=>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,T=_.nextSibling,F=T.firstChild,H=F.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=>j(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=>j(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,T=_.nextSibling;return t(_,()=>u.title),t(T,()=>u.summary),p})(),(()=>{var p=bi(),_=p.firstChild,T=_.nextSibling;return t(T,()=>u.expectedOutputs),p})()]}),ne),ve.$$click=P,D.$$input=u=>Y("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(Yt,{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{Yt 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-202609141749/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-202609141749/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-202609141749/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-202609141749/assets/yup-05-CuuaeyjC.aac";export{e as default};
|
package/index.html
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
name="description"
|
|
9
9
|
content="OneScience is an AI for Science workspace for research discovery, agent workflows, and scientific knowledge."
|
|
10
10
|
/>
|
|
11
|
-
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
12
|
-
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
13
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
14
|
-
<link rel="manifest" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
15
|
-
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
16
|
-
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
11
|
+
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/favicon-96x96-v3.png" sizes="96x96" />
|
|
12
|
+
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/favicon-v3.ico" />
|
|
13
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/apple-touch-icon-v3.png" />
|
|
14
|
+
<link rel="manifest" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/site.webmanifest" />
|
|
15
|
+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/assets/fonts/inter-400.woff2" as="font" type="font/woff2" crossorigin />
|
|
16
|
+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/assets/fonts/noto-sc-400.woff2" as="font" type="font/woff2" crossorigin />
|
|
17
17
|
<meta name="theme-color" content="#F8F7F7" />
|
|
18
18
|
<meta name="theme-color" content="#131010" media="(prefers-color-scheme: dark)" />
|
|
19
|
-
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
20
|
-
<meta property="twitter:image" content="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
21
|
-
<script id="oc-theme-preload-script" src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
22
|
-
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
23
|
-
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
19
|
+
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/social-share.png" />
|
|
20
|
+
<meta property="twitter:image" content="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/social-share.png" />
|
|
21
|
+
<script id="oc-theme-preload-script" src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/oc-theme-preload.js"></script>
|
|
22
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/assets/index-BfgC-BpF.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/assets/index-CK0ZjbzP.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body class="antialiased overscroll-none text-12-regular overflow-hidden">
|
|
26
26
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onescience/onecode-web",
|
|
3
|
-
"version": "1.14.50-
|
|
3
|
+
"version": "1.14.50-202609141749",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "OneCode web UI static assets for CDN delivery.",
|
|
8
|
-
"homepage": "https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-
|
|
8
|
+
"homepage": "https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141749/index.html",
|
|
9
9
|
"jsdelivr": "index.html",
|
|
10
10
|
"files": [
|
|
11
11
|
"**/*"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/alert-06-GK5Tqy6u.aac";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/alert-07-0r0kiLGz.aac";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/alert-08-CZowNquU.aac";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/alert-10-Ck5hR7zH.aac";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/bip-bop-09-CxEgoAHQ.aac";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609141631/assets/nope-12-BJR1Ka3c.aac";export{e as default};
|