@onescience/onecode-web 1.14.50-202609211543 → 1.14.50-202609211735
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-6KN0RQrl.js → 3Dmol-DAc0iqro.js} +1 -1
- package/assets/{account-system-otYB3_WE.js → account-system-BEMu9fRT.js} +1 -1
- package/assets/{alert-04-DCjEhXXs.js → alert-01-DsZFfDAX.js} +1 -1
- package/assets/{alert-05-iWxV1Z9_.js → alert-02-BiWLijVd.js} +1 -1
- package/assets/{alert-01-Dw7BMte3.js → alert-04-DEYnOyOw.js} +1 -1
- package/assets/{alert-02-DEgH3QoX.js → alert-05-CPZD_uec.js} +1 -1
- package/assets/alert-06-CAL2weES.js +1 -0
- package/assets/alert-07-U4-dH-Gy.js +1 -0
- package/assets/alert-08-CMOL3oPC.js +1 -0
- package/assets/alert-10-ETQ-WCYs.js +1 -0
- package/assets/{bip-bop-03-C-5dUoxZ.js → bip-bop-03-CghOTh8W.js} +1 -1
- package/assets/{bip-bop-04-DfYQlM8Z.js → bip-bop-04-BRhgrdxK.js} +1 -1
- package/assets/{bip-bop-06-B7EX2kQP.js → bip-bop-06-BIbQGcgQ.js} +1 -1
- package/assets/{bip-bop-08-Cmdx5QE3.js → bip-bop-08-BZgRdZWn.js} +1 -1
- package/assets/bip-bop-09-S_xTwgQF.js +1 -0
- package/assets/{center-CuMj7QAC.js → center-Dj4yUiUv.js} +1 -1
- package/assets/{dialog-fork-5dpwlF0t.js → dialog-fork-C9xJAx_L.js} +1 -1
- package/assets/{dialog-project-upload-D72Rki74.js → dialog-project-upload-Ba1LztBo.js} +1 -1
- package/assets/{dialog-select-file-OIlAYf0h.js → dialog-select-file-gEd2YPOb.js} +1 -1
- package/assets/{dialog-select-model-DhdtvNc5.js → dialog-select-model-B474XOy0.js} +2 -2
- package/assets/{dialog-terminal-unavailable-B1k0lz52.js → dialog-terminal-unavailable-D9qKTMzo.js} +1 -1
- package/assets/docs-C5Avriy-.js +1 -0
- package/assets/{ghostty-web-CbV1s_aN.js → ghostty-web-5swYPwV6.js} +1 -1
- package/assets/{index-DmizPRT_.js → index-B4Rq6cTB.js} +255 -255
- package/assets/{index-BllUU_4z.css → index-CywsxbkM.css} +1 -1
- package/assets/{intro-Fe9Bm41K.js → intro-DDBPpOaz.js} +1 -1
- package/assets/{nope-02-iOY5jRej.js → nope-02-23LU7-Xg.js} +1 -1
- package/assets/{nope-05-D5uMZVV9.js → nope-05-CYZeqlOf.js} +1 -1
- package/assets/{nope-08-DYr024N2.js → nope-08-BNqtWFPH.js} +1 -1
- package/assets/{nope-11-BlHPJbMc.js → nope-11-CFXv8uAr.js} +1 -1
- package/assets/nope-12-C8UcRo0B.js +1 -0
- package/assets/onescience-h0vffieB.js +82 -0
- package/assets/{resources-X2GY3SG5.js → resources-DQZvyQgd.js} +1 -1
- package/assets/skills-QB6M06cC.js +1 -0
- package/assets/{staplebops-03-THKny9jd.js → staplebops-03-PntHi3VI.js} +1 -1
- package/assets/{staplebops-04-DNapR0Tx.js → staplebops-04-8MeVJXLc.js} +1 -1
- package/assets/{staplebops-06-DnewISE4.js → staplebops-06-B-eE_Odg.js} +1 -1
- package/assets/{staplebops-07-DfE2yZUb.js → staplebops-07-BVs6ivoL.js} +1 -1
- package/assets/{wizard-BHx-CZvi.js → wizard-D_xWAIv4.js} +1 -1
- package/assets/{yup-01-tLLiqxVC.js → yup-01-3tk1rGqD.js} +1 -1
- package/assets/{yup-03-CBDbSXJr.js → yup-03-DzDcrjVo.js} +1 -1
- package/assets/{yup-04-D4oyNIWM.js → yup-04-DtiuFs75.js} +1 -1
- package/assets/{yup-05-XA2LomgQ.js → yup-05-l8zqLwIJ.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/alert-06-CHgvdtVo.js +0 -1
- package/assets/alert-07-DqlMkN-L.js +0 -1
- package/assets/alert-08-CuaJVnvk.js +0 -1
- package/assets/alert-10-BUR_ln1e.js +0 -1
- package/assets/bip-bop-09-Dubu-jQM.js +0 -1
- package/assets/docs-Cx0FDcw0.js +0 -1
- package/assets/nope-12-DpVLMYzP.js +0 -1
- package/assets/onescience-DGfOmlg9.js +0 -82
- package/assets/skills-ZrFAv1Vn.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cV as p,i as s,a as l,bi as g,aH as h,cW as u,t as b}from"./index-
|
|
1
|
+
import{cV as p,i as s,a as l,bi as g,aH as h,cW as u,t as b}from"./index-B4Rq6cTB.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(h,{get href(){return g()},class:"os-client-resources-close","aria-label":"关闭资源配置",children:"×"}),null),s(o,()=>r.t("dialog.ssh.description")),s(d,l(u,{variant:"page"})),a})()}export{m as WorkbenchResourcesPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as W,P as q,K as H,c as E,D as g,ag as I,i as a,a as o,t as v,cS as u,d as O,k as _,R as z,j as K,cj as y,ck as C,cl as L,A as N,aH as B,cT as A,S as G,b as J,x as Q,F as V,v as X,cU as Y}from"./index-B4Rq6cTB.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==="plaza"||s==="repo"||s==="upload")return s}function ne(){const c=W(),s=q(),P=H(),[p,x]=E(0),R=g(()=>(p(),!!_())),d=g(()=>!R()),[n,T]=E(ae(c.search)??"list"),j=g(()=>{p();const e=_();return e&&(z(e,P.projects.lastCode())||K(e))||""}),b=e=>{T(e),s(A(e),{replace:!0})};I(()=>{const e=()=>x(i=>i+1);window.addEventListener(y,e),window.addEventListener(C,e),window.addEventListener(L,e),N(()=>{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,S=m.nextSibling,D=i.nextSibling;return a(f,()=>h().label),a(U,()=>h().hint),a(i,o(G,{get when(){return d()},get children(){var t=Z();return t.firstChild,a(t,o(B,{get href(){return`/login?redirect=${encodeURIComponent(A(n()))}`},children:"去登录"}),null),t}}),S),a(S,o(V,{each:u,children:t=>(()=>{var r=te(),w=r.firstChild,F=w.nextSibling;return r.$$click=()=>b(t.id),a(w,()=>t.label),a(F,()=>t.hint),J(l=>{var $=n()===t.id,k=n()===t.id;return $!==l.e&&r.classList.toggle("is-active",l.e=$),k!==l.t&&Q(r,"aria-pressed",l.t=k),l},{e:void 0,t:void 0}),r})()})),a(D,o(Y,{get directory(){return X(()=>!!d())()?void 0:j()||void 0},get loginRequired(){return d()},get tab(){return n()},onTabChange:b,variant:"page-body"})),e})()}O(["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-202609211735/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-202609211735/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-202609211735/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-202609211735/assets/staplebops-07-cqQEvbIf.aac";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Ve,c as Ge,at as Ke,cA as He,z as tt,D as E,cB as Ne,cC as Be,cD as at,cE as De,cF as xe,cG as it,an as me,i as t,aD as Qe,a as i,b as C,F as N,x as q,S as h,v as lt,cH as rt,cI as nt,cJ as qe,cK as st,t as r,cL as Je,cx as ct,O as ot,cM as dt,P as ut,L as pt,N as gt,K as ht,ag as bt,r as ze,h as ke,j as Ie,k as fe,l as Pe,m as Le,p as Fe,n as Te,o as Re,w as Ee,cN as $t,cO as vt,aC as de,cP as mt,cQ as _t,g as Xe,H as Ye,cR as ft,az as yt,aH as K,b6 as Ae,cy as St,aG as wt,cz as Ct,Q as xt}from"./index-DmizPRT_.js";var zt=r("<button type=button class=os-client-capability-wizard-papers-more>"),kt=r("<div class=os-client-capability-wizard-papers><h3>相关论文</h3><ul>"),It=r("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),Pt=r("<p class=os-client-capability-wizard-note>工作目录与运行环境由系统自动识别,本步只需填写下列业务参数。"),Lt=r("<p class=os-client-capability-wizard-missing>还有 <!> 个必填参数未填,可先创建;缺口将由智能体追问,也可点左侧步骤提前补全。"),Ft=r("<small>"),Tt=r("<ul class=os-client-capability-wizard-output-list>"),Rt=r("<div class=os-client-capability-wizard-quality><strong>质量门禁</strong><p>"),Et=r('<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=场景向导><button type=button class=os-client-capability-wizard-backdrop aria-label=关闭场景></button><section class=os-client-capability-wizard-dialog><header class=os-client-capability-wizard-head><button type=button class=os-client-capability-wizard-intro-back>返回场景列表</button><div class=os-client-capability-wizard-head-title><h2></h2><p></p></div><button type=button class=os-client-capability-wizard-close aria-label=关闭>×</button></header><div class=os-client-capability-wizard-columns><aside class=os-client-capability-wizard-column aria-label=工作流><h3>工作流</h3><p class=os-client-capability-wizard-note>点击步骤查看对应参数与产出;创建后将自动按序执行。</p><ol class=os-client-capability-wizard-workflow></ol></aside><section class=os-client-capability-wizard-column aria-label=补充信息><div class=os-client-capability-wizard-column-head><h3>本步参数</h3><small>/<!> · 已填 <!>/</small></div><div class=os-client-capability-wizard-fields></div><div class=os-client-capability-wizard-step-nav><button type=button>上一步</button><button type=button>下一步</button></div></section><section class=os-client-capability-wizard-column aria-label="本步产出与 Prompt"><div class=os-client-capability-wizard-outputs aria-label=本步产出><div class=os-client-capability-wizard-outputs-head><span>本步产出</span></div></div><div class=os-client-capability-wizard-column-head><h3>本步 Prompt</h3><small>第 <!> 步</small></div><textarea class=os-client-capability-wizard-prompt rows=12 readonly></textarea></section></div><footer class=os-client-capability-wizard-footer><button type=button>返回能力中心</button><button type=button data-primary=true>创建任务并自动逐步执行'),Wt=r("<li><button type=button class=os-client-capability-wizard-step><span></span><div><p>"),jt=r('<li><a target=_blank rel="noopener noreferrer">'),Ht=r("<p>"),Dt=r("<div class=os-client-capability-wizard-step-banner><strong>"),qt=r("<p class=os-client-capability-wizard-note>本步无需额外用户参数。"),At=r("<em>*"),Mt=r("<textarea rows=3>"),Ot=r("<em class=os-client-capability-wizard-field-hint>,智能体将尝试自动修正"),Ut=r("<em class=os-client-capability-wizard-field-hint>未填时由智能体追问"),Vt=r("<label class=os-client-capability-wizard-field><span>"),Gt=r("<input type=text>"),Kt=r("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Nt=r("<li>");const Me=2;function Bt(e){const[c,z]=Ge(!1),[n,k]=Ke({values:He(e.scenario),activeStepIndex:0});tt(()=>{k({values:He(e.scenario),activeStepIndex:0}),z(!1)});const F=E(()=>Ne(e.scenario)),I=E(()=>F()[n.activeStepIndex]??F()[0]),x=E(()=>{const b=I();return b?Be(e.scenario,b):e.scenario.user_input}),ue=E(()=>at(e.scenario,n.values)),B=E(()=>x().filter(b=>De(b)?!String(n.values[xe(b)]??"").trim():!1)),ye=E(()=>x().filter(b=>String(n.values[xe(b)]??"").trim()).length),T=E(()=>{const O=I()?.prompt||e.scenario.ai_prompt?.template||"";return it(O,n.values)}),M=E(()=>I()?.outputs??[]),H=E(()=>(e.scenario.related_papers??[]).filter(b=>!!String(b.url??"").trim())),ae=E(()=>c()?H():H().slice(0,Me)),A=E(()=>Math.max(0,H().length-Me)),Q=(b,O)=>{k("values",b,O)},ie=b=>{k("activeStepIndex",b)},pe=()=>{const b=Je(e.scenario.user_input,n.values);k("values",b),e.onSubmit({values:b})};return(()=>{var b=Et(),O=b.firstChild,Se=O.nextSibling,le=Se.firstChild,ge=le.firstChild,he=ge.nextSibling,l=he.firstChild,p=l.nextSibling,f=he.nextSibling,$=le.nextSibling,P=$.firstChild,U=P.firstChild,be=U.nextSibling,$e=be.nextSibling,J=P.nextSibling,re=J.firstChild,ne=re.firstChild,V=ne.nextSibling,Y=V.firstChild,ve=Y.nextSibling,we=ve.nextSibling,se=we.nextSibling;se.nextSibling;var G=re.nextSibling,ce=G.nextSibling,d=ce.firstChild,v=d.nextSibling,m=J.nextSibling,S=m.firstChild,R=S.firstChild;R.firstChild;var D=S.nextSibling,W=D.firstChild,X=W.nextSibling,Z=X.firstChild,j=Z.nextSibling;j.nextSibling;var ee=D.nextSibling,te=$.nextSibling,oe=te.firstChild,Ce=oe.nextSibling;return me(O,"click",e.onClose,!0),me(ge,"click",e.onClose,!0),t(l,()=>e.scenario.name),t(p,()=>Qe(e.scenario.problem_and_applicability)),me(f,"click",e.onClose,!0),t($e,i(N,{get each(){return F()},children:(a,s)=>(()=>{var u=Wt(),w=u.firstChild,g=w.firstChild,y=g.nextSibling,L=y.firstChild;return w.$$click=()=>ie(s()),t(g,()=>s()+1),t(L,()=>a.name),C(()=>u.classList.toggle("is-active",n.activeStepIndex===s())),u})()})),t(P,i(h,{get when(){return H().length>0},get children(){var a=kt(),s=a.firstChild,u=s.nextSibling;return t(u,i(N,{get each(){return ae()},children:w=>(()=>{var g=jt(),y=g.firstChild;return t(y,()=>w.title),C(L=>{var o=w.url,_=w.title;return o!==L.e&&q(y,"href",L.e=o),_!==L.t&&q(y,"title",L.t=_),L},{e:void 0,t:void 0}),g})()})),t(a,i(h,{get when(){return A()>0},get children(){var w=zt();return w.$$click=()=>z(g=>!g),t(w,(()=>{var g=lt(()=>!!c());return()=>g()?"收起":`展开其余 ${A()} 篇`})()),w}}),null),C(()=>u.classList.toggle("is-expanded",!!(c()&&A()>0))),a}}),null),t(P,i(h,{get when(){return e.scenario.HPC},get children(){var a=It(),s=a.firstChild,u=s.nextSibling;return t(u,()=>e.scenario.HPC),a}}),null),t(V,()=>n.activeStepIndex+1,Y),t(V,()=>F().length,ve),t(V,ye,se),t(V,()=>x().length,null),t(J,i(h,{get when(){return I()},children:a=>(()=>{var s=Dt(),u=s.firstChild;return t(u,()=>a().name),t(s,i(h,{get when(){return a().purpose?.trim()},get children(){var w=Ht();return t(w,()=>a().purpose),w}}),null),s})()}),G),t(J,i(h,{get when(){return e.scenario.system_auto_detection?.fields?.length},get children(){return Pt()}}),G),t(J,i(h,{get when(){return B().length>0||ue().length>0},get children(){var a=Lt(),s=a.firstChild,u=s.nextSibling;return u.nextSibling,t(a,()=>ue().length,u),a}}),G),t(G,i(h,{get when(){return x().length>0},get fallback(){return qt()},get children(){return i(N,{get each(){return x()},children:a=>{const s=xe(a),u=De(a),w=u&&!String(n.values[s]??"").trim(),g=String(n.values[s]??"").trim()&&rt(a,n.values[s]??"");return(()=>{var y=Vt(),L=y.firstChild;return y.classList.toggle("is-required",!!u),y.classList.toggle("is-gap",!!w),t(L,()=>nt(a),null),t(L,i(h,{when:u,get children(){return At()}}),null),t(y,i(h,{get when(){return st(a)},get fallback(){return(()=>{var o=Gt();return o.$$input=_=>Q(s,_.currentTarget.value),C(_=>{var We=a.input_type==="int"||a.input_type==="float"?"decimal":void 0,je=qe(a);return We!==_.e&&q(o,"inputmode",_.e=We),je!==_.t&&q(o,"placeholder",_.t=je),_},{e:void 0,t:void 0}),C(()=>o.value=n.values[s]??""),o})()},get children(){var o=Mt();return o.$$input=_=>Q(s,_.currentTarget.value),C(()=>q(o,"placeholder",qe(a))),C(()=>o.value=n.values[s]??""),o}}),null),t(y,i(h,{when:g,get children(){var o=Ot(),_=o.firstChild;return t(o,g,_),o}}),null),t(y,i(h,{when:w,get children(){return Ut()}}),null),y})()}})}})),d.$$click=()=>ie(Math.max(0,n.activeStepIndex-1)),v.$$click=()=>ie(Math.min(F().length-1,n.activeStepIndex+1)),t(R,i(h,{get when(){return I()?.result_subfolder},get children(){var a=Ft();return t(a,()=>I()?.result_subfolder),C(()=>q(a,"title",I()?.result_subfolder)),a}}),null),t(S,i(h,{get when(){return M().length>0},get fallback(){return Kt()},get children(){var a=Tt();return t(a,i(N,{get each(){return M()},children:s=>(()=>{var u=Nt();return t(u,s),u})()})),a}}),null),t(S,i(h,{get when(){return I()?.quality_gate},get children(){var a=Rt(),s=a.firstChild,u=s.nextSibling;return t(u,()=>I()?.quality_gate),a}}),null),t(X,()=>n.activeStepIndex+1,j),me(oe,"click",e.onClose,!0),Ce.$$click=pe,C(a=>{var s=n.activeStepIndex<=0,u=n.activeStepIndex>=F().length-1;return s!==a.e&&(d.disabled=a.e=s),u!==a.t&&(v.disabled=a.t=u),a},{e:void 0,t:void 0}),C(()=>ee.value=T()),b})()}Ve(["click","input"]);function Qt(e,c){return e.replace(/\{\{(\w+)\}\}/g,(z,n)=>c[n]??"")}var Jt=r("<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=能力向导>"),Xt=r("<section class=os-client-capability-wizard-dialog><p>未找到该能力。"),Yt=r("<div class=os-client-capability-wizard-scenario-group><span>完整工作流场景 · "),Zt=r("<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>创建任务"),ea=r("<section class=os-client-capability-wizard-dialog><p>「<!>」暂无 OneScience 源码或魔搭映射,当前不可使用。"),ta=r("<button type=button><strong></strong><p>"),aa=r("<button type=button><strong></strong><p></p><small> · <!> 步"),Oe=r("<p class=os-client-capability-wizard-empty>请先选择任务场景。"),ia=r("<div class=os-client-capability-wizard-required aria-label=该能力需要什么数据><h4>该能力需要什么数据</h4><ul>"),la=r("<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>"),ra=r("<textarea rows=3>"),na=r("<label class=os-client-capability-wizard-field><span>"),sa=r("<input type=text>"),ca=r("<li>"),oa=r("<div class=os-client-capability-wizard-right-head><strong></strong><p>"),da=r("<div class=os-client-capability-wizard-outputs aria-label=预计产出><span>预计产出</span><p>");function ua(e){return e==="hpc"?"软件介绍":"模型介绍"}function pa(e){return`使用 ${e} 开始科研任务`}function ga(e){if(!ze({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const c=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!c)return!1;const z=Le(c);return Fe(z,e.prompt),Te(z),e.openProject?.(c),e.touchCode?.(c),Re({variant:"success",title:`已为你创建「${e.title}」任务`}),e.navigate(Ee(c)),!0}function Ze(e){const c=$t(e.scenario),z=c[0];if(!z?.promptTemplate.trim()||!ze({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.id||e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const n=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!n)return!1;const k=Le(n),F=Ne(e.scenario),I=F[0]?Be(e.scenario,F[0]):e.scenario.user_input,x=Je(e.scenario.user_input,e.values);return vt(k,{title:e.scenario.name,scenarioId:de(e.scenario),values:x,steps:c}),mt("todo"),Fe(k,_t(z,x,I)),Te(k),e.openProject?.(n),e.touchCode?.(n),Re({variant:"success",title:`已创建「${e.scenario.name}」`,description:`将按 ${c.length} 步自动依次执行,缺参或失败时暂停`}),e.navigate(Ee(n)),!0}function et(e){if(!ze({navigate:e.navigate,action:{type:"wizard",resourceId:e.resourceId,scenarioId:e.scenarioId,values:e.values,prompt:e.prompt},isLoggedIn:e.isLoggedIn}))return!1;const c=Xe(e.resourceId),z=c?.scenarios.find(F=>F.id===e.scenarioId);if(!c||!z||!Ye(c))return!1;const n=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!n)return!1;const k=Le(n);return Fe(k,e.prompt),Te(k),e.openProject?.(n),e.touchCode?.(n),Re({variant:"success",title:`已为你创建 ${c.name}「${z.title}」任务`}),e.navigate(Ee(n)),!0}function _e(e,c){return Qt(e.promptTemplate,c)}function Ue(e){return Object.fromEntries(e.fields.map(c=>[c.id,ha(c)]))}function ha(e){return e.default?.trim()?e.default:e.placeholder?.replace(/^例如[::]\s*/,"").trim()??""}function ba(){const e=ct(),c=ot(),[z]=dt(),n=ut(),k=pt(),F=gt(),I=ht(),x=()=>Xe(e.id??""),ue=()=>Ct(c.search),B=()=>St(c.search,{category:x()?.category??"onemodel",domain:x()?.domain??"materials"}),ye=()=>wt(e.id??"",ue()),[T,M]=Ke({scenarioId:"",values:{},prompt:""}),[H,ae]=Ge(""),A=()=>x()?.scenarios.find(l=>l.id===T.scenarioId),Q=E(()=>{const l=x();return l?ft({domain:l.domain,name:l.name,id:l.id,category:l.category}):[]}),ie=E(()=>{const l=H();if(l)return yt(l)??Q().find(p=>de(p)===l)}),pe=()=>({navigate:n,isLoggedIn:!!fe(),path:k.data.path,recent:xt(k.data.project),lastCodeWorkspace:I.projects.lastCode(),openProject:l=>F.projects.open(l),touchCode:l=>I.projects.touchCode(l)}),b=()=>{const l=A();l&&M("prompt",_e(l,T.values))};bt(()=>{const l=x();if(!l?.scenarios.length)return;const p=z.scenario,$=(p?l.scenarios.find(U=>U.id===p):void 0)??l.scenarios[0],P=Ue($);M({scenarioId:$.id,values:P,prompt:_e($,P)})});const O=l=>{const f=x()?.scenarios.find(P=>P.id===l);if(!f)return;ae("");const $=Ue(f);M({scenarioId:f.id,values:$,prompt:_e(f,$)})},Se=l=>{ae(l)},le=(l,p)=>{const f=A();if(!f)return;const $={...T.values,[l]:p};M({values:$,prompt:_e(f,$)})},ge=()=>{const l=x(),p=A();!l||!p||et({resourceId:l.id,scenarioId:p.id,values:{...T.values},prompt:T.prompt,...pe()})},he=(l,p)=>{Ze({scenario:l,values:p.values,...pe()})};return(()=>{var l=Jt();return t(l,i(h,{get when(){return x()},get fallback(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return Ae()},"aria-label":"关闭向导"}),(()=>{var p=Xt();return p.firstChild,t(p,i(K,{get href(){return Ae()},children:"返回能力中心"}),null),p})()]},children:p=>i(h,{get when(){return Ye(p())},get fallback(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return B()},"aria-label":"关闭向导"}),(()=>{var f=ea(),$=f.firstChild,P=$.firstChild,U=P.nextSibling;return U.nextSibling,t($,()=>p().name,U),t(f,i(K,{get href(){return B()},children:"返回模型库"}),null),f})()]},get children(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return B()},"aria-label":"关闭向导"}),(()=>{var f=Zt(),$=f.firstChild,P=$.firstChild,U=P.firstChild,be=$.nextSibling,$e=be.firstChild,J=$e.firstChild,re=J.nextSibling,ne=$e.nextSibling;ne.firstChild;var V=ne.nextSibling,Y=V.firstChild,ve=Y.firstChild,we=ve.nextSibling,se=Y.nextSibling,G=be.nextSibling,ce=G.firstChild;return t($,i(K,{class:"os-client-capability-wizard-intro-back",get href(){return ye()},get children(){return ua(p().category)}}),P),t(U,()=>pa(p().name)),t($,i(K,{class:"os-client-capability-wizard-close",get href(){return B()},"aria-label":"关闭",children:"×"}),null),t(re,i(N,{get each(){return p().scenarios},children:d=>(()=>{var v=ta(),m=v.firstChild,S=m.nextSibling;return v.$$click=()=>O(d.id),t(m,()=>d.title),t(S,()=>d.summary),C(R=>{var D=!H()&&T.scenarioId===d.id,W=!H()&&T.scenarioId===d.id;return D!==R.e&&v.classList.toggle("is-active",R.e=D),W!==R.t&&q(v,"aria-pressed",R.t=W),R},{e:void 0,t:void 0}),v})()}),null),t(re,i(h,{get when(){return Q().length>0},get children(){var d=Yt(),v=d.firstChild;return v.firstChild,t(v,()=>Q().length,null),t(d,i(N,{get each(){return Q()},children:m=>(()=>{var S=aa(),R=S.firstChild,D=R.nextSibling,W=D.nextSibling,X=W.firstChild,Z=X.nextSibling;return Z.nextSibling,S.$$click=()=>Se(de(m)),t(R,()=>m.name),t(D,()=>Qe(m.problem_and_applicability)),t(W,()=>m.scenario_id,X),t(W,()=>m.workflow_steps?.length||m.workflow.length,Z),C(j=>{var ee=H()===de(m),te=H()===de(m);return ee!==j.e&&S.classList.toggle("is-active",j.e=ee),te!==j.t&&q(S,"aria-pressed",j.t=te),j},{e:void 0,t:void 0}),S})()}),null),d}}),null),t(ne,i(h,{get when(){return A()},keyed:!0,get fallback(){return Oe()},children:d=>(()=>{var v=la(),m=v.firstChild,S=m.nextSibling,R=S.firstChild,D=R.nextSibling,W=D.firstChild,X=W.firstChild,Z=X.nextSibling,j=W.nextSibling,ee=j.firstChild,te=ee.nextSibling,oe=j.nextSibling,Ce=oe.firstChild,a=Ce.nextSibling,s=oe.nextSibling,u=s.firstChild,w=u.nextSibling;return t(m,i(N,{get each(){return d.fields},children:g=>(()=>{var y=na(),L=y.firstChild;return t(L,()=>g.label),t(y,i(h,{get when(){return g.multiline},get fallback(){return(()=>{var o=sa();return o.$$input=_=>le(g.id,_.currentTarget.value),C(()=>q(o,"placeholder",g.placeholder)),C(()=>o.value=T.values[g.id]??""),o})()},get children(){var o=ra();return o.$$input=_=>le(g.id,_.currentTarget.value),C(()=>q(o,"placeholder",g.placeholder)),C(()=>o.value=T.values[g.id]??""),o}}),null),y})()})),t(Z,()=>d.capabilitySummary.current),t(te,()=>d.capabilitySummary.keyConfig),t(a,()=>d.capabilitySummary.resources),t(w,()=>d.capabilitySummary.deliverables),t(v,i(h,{get when(){return d.requiredData?.length},get children(){var g=ia(),y=g.firstChild,L=y.nextSibling;return t(L,i(N,{get each(){return d.requiredData},children:o=>(()=>{var _=ca();return t(_,o),_})()})),g}}),null),v})()}),null),t(V,i(h,{get when(){return A()},keyed:!0,get fallback(){return Oe()},children:d=>[(()=>{var v=oa(),m=v.firstChild,S=m.nextSibling;return t(m,()=>d.title),t(S,()=>d.summary),v})(),(()=>{var v=da(),m=v.firstChild,S=m.nextSibling;return t(S,()=>d.expectedOutputs),v})()]}),Y),we.$$click=b,se.$$input=d=>M("prompt",d.currentTarget.value),t(G,i(K,{get href(){return B()},children:"返回能力中心"}),ce),ce.$$click=ge,C(()=>ce.disabled=!T.prompt.trim()),C(()=>se.value=T.prompt),f})(),i(h,{get when(){return ie()},children:f=>i(Bt,{get scenario(){return f()},onClose:()=>ae(""),onSubmit:$=>he(f(),$)})})]}})})),l})()}Ve(["click","input"]);const va=Object.freeze(Object.defineProperty({__proto__:null,CapabilityWizardPage:ba,startCapabilityPromptTask:ga,startCapabilityScenarioRunTask:Ze,startCapabilityWizardTask:et},Symbol.toStringTag,{value:"Module"}));export{Bt as S,Ze as a,et as b,ga as s,va as w};
|
|
1
|
+
import{d as Ve,c as Ge,at as Ke,cA as He,z as tt,D as E,cB as Ne,cC as Be,cD as at,cE as De,cF as xe,cG as it,an as me,i as t,aD as Qe,a as i,b as C,F as N,x as q,S as h,v as lt,cH as rt,cI as nt,cJ as qe,cK as st,t as r,cL as Je,cx as ct,O as ot,cM as dt,P as ut,L as pt,N as gt,K as ht,ag as bt,r as ze,h as ke,j as Ie,k as fe,l as Pe,m as Le,p as Fe,n as Te,o as Re,w as Ee,cN as $t,cO as vt,aC as de,cP as mt,cQ as _t,g as Xe,H as Ye,cR as ft,az as yt,aH as K,b6 as Ae,cy as St,aG as wt,cz as Ct,Q as xt}from"./index-B4Rq6cTB.js";var zt=r("<button type=button class=os-client-capability-wizard-papers-more>"),kt=r("<div class=os-client-capability-wizard-papers><h3>相关论文</h3><ul>"),It=r("<div class=os-client-capability-wizard-papers><h3>HPC 软件</h3><span>"),Pt=r("<p class=os-client-capability-wizard-note>工作目录与运行环境由系统自动识别,本步只需填写下列业务参数。"),Lt=r("<p class=os-client-capability-wizard-missing>还有 <!> 个必填参数未填,可先创建;缺口将由智能体追问,也可点左侧步骤提前补全。"),Ft=r("<small>"),Tt=r("<ul class=os-client-capability-wizard-output-list>"),Rt=r("<div class=os-client-capability-wizard-quality><strong>质量门禁</strong><p>"),Et=r('<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=场景向导><button type=button class=os-client-capability-wizard-backdrop aria-label=关闭场景></button><section class=os-client-capability-wizard-dialog><header class=os-client-capability-wizard-head><button type=button class=os-client-capability-wizard-intro-back>返回场景列表</button><div class=os-client-capability-wizard-head-title><h2></h2><p></p></div><button type=button class=os-client-capability-wizard-close aria-label=关闭>×</button></header><div class=os-client-capability-wizard-columns><aside class=os-client-capability-wizard-column aria-label=工作流><h3>工作流</h3><p class=os-client-capability-wizard-note>点击步骤查看对应参数与产出;创建后将自动按序执行。</p><ol class=os-client-capability-wizard-workflow></ol></aside><section class=os-client-capability-wizard-column aria-label=补充信息><div class=os-client-capability-wizard-column-head><h3>本步参数</h3><small>/<!> · 已填 <!>/</small></div><div class=os-client-capability-wizard-fields></div><div class=os-client-capability-wizard-step-nav><button type=button>上一步</button><button type=button>下一步</button></div></section><section class=os-client-capability-wizard-column aria-label="本步产出与 Prompt"><div class=os-client-capability-wizard-outputs aria-label=本步产出><div class=os-client-capability-wizard-outputs-head><span>本步产出</span></div></div><div class=os-client-capability-wizard-column-head><h3>本步 Prompt</h3><small>第 <!> 步</small></div><textarea class=os-client-capability-wizard-prompt rows=12 readonly></textarea></section></div><footer class=os-client-capability-wizard-footer><button type=button>返回能力中心</button><button type=button data-primary=true>创建任务并自动逐步执行'),Wt=r("<li><button type=button class=os-client-capability-wizard-step><span></span><div><p>"),jt=r('<li><a target=_blank rel="noopener noreferrer">'),Ht=r("<p>"),Dt=r("<div class=os-client-capability-wizard-step-banner><strong>"),qt=r("<p class=os-client-capability-wizard-note>本步无需额外用户参数。"),At=r("<em>*"),Mt=r("<textarea rows=3>"),Ot=r("<em class=os-client-capability-wizard-field-hint>,智能体将尝试自动修正"),Ut=r("<em class=os-client-capability-wizard-field-hint>未填时由智能体追问"),Vt=r("<label class=os-client-capability-wizard-field><span>"),Gt=r("<input type=text>"),Kt=r("<p class=os-client-capability-wizard-outputs-empty>本步暂无结构化产出清单。"),Nt=r("<li>");const Me=2;function Bt(e){const[c,z]=Ge(!1),[n,k]=Ke({values:He(e.scenario),activeStepIndex:0});tt(()=>{k({values:He(e.scenario),activeStepIndex:0}),z(!1)});const F=E(()=>Ne(e.scenario)),I=E(()=>F()[n.activeStepIndex]??F()[0]),x=E(()=>{const b=I();return b?Be(e.scenario,b):e.scenario.user_input}),ue=E(()=>at(e.scenario,n.values)),B=E(()=>x().filter(b=>De(b)?!String(n.values[xe(b)]??"").trim():!1)),ye=E(()=>x().filter(b=>String(n.values[xe(b)]??"").trim()).length),T=E(()=>{const O=I()?.prompt||e.scenario.ai_prompt?.template||"";return it(O,n.values)}),M=E(()=>I()?.outputs??[]),H=E(()=>(e.scenario.related_papers??[]).filter(b=>!!String(b.url??"").trim())),ae=E(()=>c()?H():H().slice(0,Me)),A=E(()=>Math.max(0,H().length-Me)),Q=(b,O)=>{k("values",b,O)},ie=b=>{k("activeStepIndex",b)},pe=()=>{const b=Je(e.scenario.user_input,n.values);k("values",b),e.onSubmit({values:b})};return(()=>{var b=Et(),O=b.firstChild,Se=O.nextSibling,le=Se.firstChild,ge=le.firstChild,he=ge.nextSibling,l=he.firstChild,p=l.nextSibling,f=he.nextSibling,$=le.nextSibling,P=$.firstChild,U=P.firstChild,be=U.nextSibling,$e=be.nextSibling,J=P.nextSibling,re=J.firstChild,ne=re.firstChild,V=ne.nextSibling,Y=V.firstChild,ve=Y.nextSibling,we=ve.nextSibling,se=we.nextSibling;se.nextSibling;var G=re.nextSibling,ce=G.nextSibling,d=ce.firstChild,v=d.nextSibling,m=J.nextSibling,S=m.firstChild,R=S.firstChild;R.firstChild;var D=S.nextSibling,W=D.firstChild,X=W.nextSibling,Z=X.firstChild,j=Z.nextSibling;j.nextSibling;var ee=D.nextSibling,te=$.nextSibling,oe=te.firstChild,Ce=oe.nextSibling;return me(O,"click",e.onClose,!0),me(ge,"click",e.onClose,!0),t(l,()=>e.scenario.name),t(p,()=>Qe(e.scenario.problem_and_applicability)),me(f,"click",e.onClose,!0),t($e,i(N,{get each(){return F()},children:(a,s)=>(()=>{var u=Wt(),w=u.firstChild,g=w.firstChild,y=g.nextSibling,L=y.firstChild;return w.$$click=()=>ie(s()),t(g,()=>s()+1),t(L,()=>a.name),C(()=>u.classList.toggle("is-active",n.activeStepIndex===s())),u})()})),t(P,i(h,{get when(){return H().length>0},get children(){var a=kt(),s=a.firstChild,u=s.nextSibling;return t(u,i(N,{get each(){return ae()},children:w=>(()=>{var g=jt(),y=g.firstChild;return t(y,()=>w.title),C(L=>{var o=w.url,_=w.title;return o!==L.e&&q(y,"href",L.e=o),_!==L.t&&q(y,"title",L.t=_),L},{e:void 0,t:void 0}),g})()})),t(a,i(h,{get when(){return A()>0},get children(){var w=zt();return w.$$click=()=>z(g=>!g),t(w,(()=>{var g=lt(()=>!!c());return()=>g()?"收起":`展开其余 ${A()} 篇`})()),w}}),null),C(()=>u.classList.toggle("is-expanded",!!(c()&&A()>0))),a}}),null),t(P,i(h,{get when(){return e.scenario.HPC},get children(){var a=It(),s=a.firstChild,u=s.nextSibling;return t(u,()=>e.scenario.HPC),a}}),null),t(V,()=>n.activeStepIndex+1,Y),t(V,()=>F().length,ve),t(V,ye,se),t(V,()=>x().length,null),t(J,i(h,{get when(){return I()},children:a=>(()=>{var s=Dt(),u=s.firstChild;return t(u,()=>a().name),t(s,i(h,{get when(){return a().purpose?.trim()},get children(){var w=Ht();return t(w,()=>a().purpose),w}}),null),s})()}),G),t(J,i(h,{get when(){return e.scenario.system_auto_detection?.fields?.length},get children(){return Pt()}}),G),t(J,i(h,{get when(){return B().length>0||ue().length>0},get children(){var a=Lt(),s=a.firstChild,u=s.nextSibling;return u.nextSibling,t(a,()=>ue().length,u),a}}),G),t(G,i(h,{get when(){return x().length>0},get fallback(){return qt()},get children(){return i(N,{get each(){return x()},children:a=>{const s=xe(a),u=De(a),w=u&&!String(n.values[s]??"").trim(),g=String(n.values[s]??"").trim()&&rt(a,n.values[s]??"");return(()=>{var y=Vt(),L=y.firstChild;return y.classList.toggle("is-required",!!u),y.classList.toggle("is-gap",!!w),t(L,()=>nt(a),null),t(L,i(h,{when:u,get children(){return At()}}),null),t(y,i(h,{get when(){return st(a)},get fallback(){return(()=>{var o=Gt();return o.$$input=_=>Q(s,_.currentTarget.value),C(_=>{var We=a.input_type==="int"||a.input_type==="float"?"decimal":void 0,je=qe(a);return We!==_.e&&q(o,"inputmode",_.e=We),je!==_.t&&q(o,"placeholder",_.t=je),_},{e:void 0,t:void 0}),C(()=>o.value=n.values[s]??""),o})()},get children(){var o=Mt();return o.$$input=_=>Q(s,_.currentTarget.value),C(()=>q(o,"placeholder",qe(a))),C(()=>o.value=n.values[s]??""),o}}),null),t(y,i(h,{when:g,get children(){var o=Ot(),_=o.firstChild;return t(o,g,_),o}}),null),t(y,i(h,{when:w,get children(){return Ut()}}),null),y})()}})}})),d.$$click=()=>ie(Math.max(0,n.activeStepIndex-1)),v.$$click=()=>ie(Math.min(F().length-1,n.activeStepIndex+1)),t(R,i(h,{get when(){return I()?.result_subfolder},get children(){var a=Ft();return t(a,()=>I()?.result_subfolder),C(()=>q(a,"title",I()?.result_subfolder)),a}}),null),t(S,i(h,{get when(){return M().length>0},get fallback(){return Kt()},get children(){var a=Tt();return t(a,i(N,{get each(){return M()},children:s=>(()=>{var u=Nt();return t(u,s),u})()})),a}}),null),t(S,i(h,{get when(){return I()?.quality_gate},get children(){var a=Rt(),s=a.firstChild,u=s.nextSibling;return t(u,()=>I()?.quality_gate),a}}),null),t(X,()=>n.activeStepIndex+1,j),me(oe,"click",e.onClose,!0),Ce.$$click=pe,C(a=>{var s=n.activeStepIndex<=0,u=n.activeStepIndex>=F().length-1;return s!==a.e&&(d.disabled=a.e=s),u!==a.t&&(v.disabled=a.t=u),a},{e:void 0,t:void 0}),C(()=>ee.value=T()),b})()}Ve(["click","input"]);function Qt(e,c){return e.replace(/\{\{(\w+)\}\}/g,(z,n)=>c[n]??"")}var Jt=r("<div class=os-client-capability-wizard-overlay role=dialog aria-modal=true aria-label=能力向导>"),Xt=r("<section class=os-client-capability-wizard-dialog><p>未找到该能力。"),Yt=r("<div class=os-client-capability-wizard-scenario-group><span>完整工作流场景 · "),Zt=r("<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>创建任务"),ea=r("<section class=os-client-capability-wizard-dialog><p>「<!>」暂无 OneScience 源码或魔搭映射,当前不可使用。"),ta=r("<button type=button><strong></strong><p>"),aa=r("<button type=button><strong></strong><p></p><small> · <!> 步"),Oe=r("<p class=os-client-capability-wizard-empty>请先选择任务场景。"),ia=r("<div class=os-client-capability-wizard-required aria-label=该能力需要什么数据><h4>该能力需要什么数据</h4><ul>"),la=r("<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>"),ra=r("<textarea rows=3>"),na=r("<label class=os-client-capability-wizard-field><span>"),sa=r("<input type=text>"),ca=r("<li>"),oa=r("<div class=os-client-capability-wizard-right-head><strong></strong><p>"),da=r("<div class=os-client-capability-wizard-outputs aria-label=预计产出><span>预计产出</span><p>");function ua(e){return e==="hpc"?"软件介绍":"模型介绍"}function pa(e){return`使用 ${e} 开始科研任务`}function ga(e){if(!ze({navigate:e.navigate,action:{type:"prompt",prompt:e.prompt,title:e.title,workflow:e.workflow},isLoggedIn:e.isLoggedIn}))return!1;const c=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!c)return!1;const z=Le(c);return Fe(z,e.prompt),Te(z),e.openProject?.(c),e.touchCode?.(c),Re({variant:"success",title:`已为你创建「${e.title}」任务`}),e.navigate(Ee(c)),!0}function Ze(e){const c=$t(e.scenario),z=c[0];if(!z?.promptTemplate.trim()||!ze({navigate:e.navigate,action:{type:"scenario-run",scenarioId:e.scenario.id||e.scenario.scenario_id,values:e.values},isLoggedIn:e.isLoggedIn}))return!1;const n=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!n)return!1;const k=Le(n),F=Ne(e.scenario),I=F[0]?Be(e.scenario,F[0]):e.scenario.user_input,x=Je(e.scenario.user_input,e.values);return vt(k,{title:e.scenario.name,scenarioId:de(e.scenario),values:x,steps:c}),mt("todo"),Fe(k,_t(z,x,I)),Te(k),e.openProject?.(n),e.touchCode?.(n),Re({variant:"success",title:`已创建「${e.scenario.name}」`,description:`将按 ${c.length} 步自动依次执行,缺参或失败时暂停`}),e.navigate(Ee(n)),!0}function et(e){if(!ze({navigate:e.navigate,action:{type:"wizard",resourceId:e.resourceId,scenarioId:e.scenarioId,values:e.values,prompt:e.prompt},isLoggedIn:e.isLoggedIn}))return!1;const c=Xe(e.resourceId),z=c?.scenarios.find(F=>F.id===e.scenarioId);if(!c||!z||!Ye(c))return!1;const n=ke({path:e.path,recent:e.recent,lastCodeWorkspace:e.lastCodeWorkspace})||Ie(fe())||Pe(document,e.path);if(!n)return!1;const k=Le(n);return Fe(k,e.prompt),Te(k),e.openProject?.(n),e.touchCode?.(n),Re({variant:"success",title:`已为你创建 ${c.name}「${z.title}」任务`}),e.navigate(Ee(n)),!0}function _e(e,c){return Qt(e.promptTemplate,c)}function Ue(e){return Object.fromEntries(e.fields.map(c=>[c.id,ha(c)]))}function ha(e){return e.default?.trim()?e.default:e.placeholder?.replace(/^例如[::]\s*/,"").trim()??""}function ba(){const e=ct(),c=ot(),[z]=dt(),n=ut(),k=pt(),F=gt(),I=ht(),x=()=>Xe(e.id??""),ue=()=>Ct(c.search),B=()=>St(c.search,{category:x()?.category??"onemodel",domain:x()?.domain??"materials"}),ye=()=>wt(e.id??"",ue()),[T,M]=Ke({scenarioId:"",values:{},prompt:""}),[H,ae]=Ge(""),A=()=>x()?.scenarios.find(l=>l.id===T.scenarioId),Q=E(()=>{const l=x();return l?ft({domain:l.domain,name:l.name,id:l.id,category:l.category}):[]}),ie=E(()=>{const l=H();if(l)return yt(l)??Q().find(p=>de(p)===l)}),pe=()=>({navigate:n,isLoggedIn:!!fe(),path:k.data.path,recent:xt(k.data.project),lastCodeWorkspace:I.projects.lastCode(),openProject:l=>F.projects.open(l),touchCode:l=>I.projects.touchCode(l)}),b=()=>{const l=A();l&&M("prompt",_e(l,T.values))};bt(()=>{const l=x();if(!l?.scenarios.length)return;const p=z.scenario,$=(p?l.scenarios.find(U=>U.id===p):void 0)??l.scenarios[0],P=Ue($);M({scenarioId:$.id,values:P,prompt:_e($,P)})});const O=l=>{const f=x()?.scenarios.find(P=>P.id===l);if(!f)return;ae("");const $=Ue(f);M({scenarioId:f.id,values:$,prompt:_e(f,$)})},Se=l=>{ae(l)},le=(l,p)=>{const f=A();if(!f)return;const $={...T.values,[l]:p};M({values:$,prompt:_e(f,$)})},ge=()=>{const l=x(),p=A();!l||!p||et({resourceId:l.id,scenarioId:p.id,values:{...T.values},prompt:T.prompt,...pe()})},he=(l,p)=>{Ze({scenario:l,values:p.values,...pe()})};return(()=>{var l=Jt();return t(l,i(h,{get when(){return x()},get fallback(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return Ae()},"aria-label":"关闭向导"}),(()=>{var p=Xt();return p.firstChild,t(p,i(K,{get href(){return Ae()},children:"返回能力中心"}),null),p})()]},children:p=>i(h,{get when(){return Ye(p())},get fallback(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return B()},"aria-label":"关闭向导"}),(()=>{var f=ea(),$=f.firstChild,P=$.firstChild,U=P.nextSibling;return U.nextSibling,t($,()=>p().name,U),t(f,i(K,{get href(){return B()},children:"返回模型库"}),null),f})()]},get children(){return[i(K,{class:"os-client-capability-wizard-backdrop",get href(){return B()},"aria-label":"关闭向导"}),(()=>{var f=Zt(),$=f.firstChild,P=$.firstChild,U=P.firstChild,be=$.nextSibling,$e=be.firstChild,J=$e.firstChild,re=J.nextSibling,ne=$e.nextSibling;ne.firstChild;var V=ne.nextSibling,Y=V.firstChild,ve=Y.firstChild,we=ve.nextSibling,se=Y.nextSibling,G=be.nextSibling,ce=G.firstChild;return t($,i(K,{class:"os-client-capability-wizard-intro-back",get href(){return ye()},get children(){return ua(p().category)}}),P),t(U,()=>pa(p().name)),t($,i(K,{class:"os-client-capability-wizard-close",get href(){return B()},"aria-label":"关闭",children:"×"}),null),t(re,i(N,{get each(){return p().scenarios},children:d=>(()=>{var v=ta(),m=v.firstChild,S=m.nextSibling;return v.$$click=()=>O(d.id),t(m,()=>d.title),t(S,()=>d.summary),C(R=>{var D=!H()&&T.scenarioId===d.id,W=!H()&&T.scenarioId===d.id;return D!==R.e&&v.classList.toggle("is-active",R.e=D),W!==R.t&&q(v,"aria-pressed",R.t=W),R},{e:void 0,t:void 0}),v})()}),null),t(re,i(h,{get when(){return Q().length>0},get children(){var d=Yt(),v=d.firstChild;return v.firstChild,t(v,()=>Q().length,null),t(d,i(N,{get each(){return Q()},children:m=>(()=>{var S=aa(),R=S.firstChild,D=R.nextSibling,W=D.nextSibling,X=W.firstChild,Z=X.nextSibling;return Z.nextSibling,S.$$click=()=>Se(de(m)),t(R,()=>m.name),t(D,()=>Qe(m.problem_and_applicability)),t(W,()=>m.scenario_id,X),t(W,()=>m.workflow_steps?.length||m.workflow.length,Z),C(j=>{var ee=H()===de(m),te=H()===de(m);return ee!==j.e&&S.classList.toggle("is-active",j.e=ee),te!==j.t&&q(S,"aria-pressed",j.t=te),j},{e:void 0,t:void 0}),S})()}),null),d}}),null),t(ne,i(h,{get when(){return A()},keyed:!0,get fallback(){return Oe()},children:d=>(()=>{var v=la(),m=v.firstChild,S=m.nextSibling,R=S.firstChild,D=R.nextSibling,W=D.firstChild,X=W.firstChild,Z=X.nextSibling,j=W.nextSibling,ee=j.firstChild,te=ee.nextSibling,oe=j.nextSibling,Ce=oe.firstChild,a=Ce.nextSibling,s=oe.nextSibling,u=s.firstChild,w=u.nextSibling;return t(m,i(N,{get each(){return d.fields},children:g=>(()=>{var y=na(),L=y.firstChild;return t(L,()=>g.label),t(y,i(h,{get when(){return g.multiline},get fallback(){return(()=>{var o=sa();return o.$$input=_=>le(g.id,_.currentTarget.value),C(()=>q(o,"placeholder",g.placeholder)),C(()=>o.value=T.values[g.id]??""),o})()},get children(){var o=ra();return o.$$input=_=>le(g.id,_.currentTarget.value),C(()=>q(o,"placeholder",g.placeholder)),C(()=>o.value=T.values[g.id]??""),o}}),null),y})()})),t(Z,()=>d.capabilitySummary.current),t(te,()=>d.capabilitySummary.keyConfig),t(a,()=>d.capabilitySummary.resources),t(w,()=>d.capabilitySummary.deliverables),t(v,i(h,{get when(){return d.requiredData?.length},get children(){var g=ia(),y=g.firstChild,L=y.nextSibling;return t(L,i(N,{get each(){return d.requiredData},children:o=>(()=>{var _=ca();return t(_,o),_})()})),g}}),null),v})()}),null),t(V,i(h,{get when(){return A()},keyed:!0,get fallback(){return Oe()},children:d=>[(()=>{var v=oa(),m=v.firstChild,S=m.nextSibling;return t(m,()=>d.title),t(S,()=>d.summary),v})(),(()=>{var v=da(),m=v.firstChild,S=m.nextSibling;return t(S,()=>d.expectedOutputs),v})()]}),Y),we.$$click=b,se.$$input=d=>M("prompt",d.currentTarget.value),t(G,i(K,{get href(){return B()},children:"返回能力中心"}),ce),ce.$$click=ge,C(()=>ce.disabled=!T.prompt.trim()),C(()=>se.value=T.prompt),f})(),i(h,{get when(){return ie()},children:f=>i(Bt,{get scenario(){return f()},onClose:()=>ae(""),onSubmit:$=>he(f(),$)})})]}})})),l})()}Ve(["click","input"]);const va=Object.freeze(Object.defineProperty({__proto__:null,CapabilityWizardPage:ba,startCapabilityPromptTask:ga,startCapabilityScenarioRunTask:Ze,startCapabilityWizardTask:et},Symbol.toStringTag,{value:"Module"}));export{Bt as S,Ze as a,et as b,ga as s,va 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-202609211735/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-202609211735/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-202609211735/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-202609211735/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-202609211735/favicon-96x96-v3.png" sizes="96x96" />
|
|
12
|
+
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/favicon-v3.ico" />
|
|
13
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/apple-touch-icon-v3.png" />
|
|
14
|
+
<link rel="manifest" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/site.webmanifest" />
|
|
15
|
+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/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-202609211735/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-202609211735/social-share.png" />
|
|
20
|
+
<meta property="twitter:image" content="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/social-share.png" />
|
|
21
|
+
<script id="oc-theme-preload-script" src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/oc-theme-preload.js"></script>
|
|
22
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/assets/index-B4Rq6cTB.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211735/assets/index-CywsxbkM.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-202609211735",
|
|
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-202609211735/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-202609211543/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-202609211543/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-202609211543/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-202609211543/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-202609211543/assets/bip-bop-09-CxEgoAHQ.aac";export{e as default};
|
package/assets/docs-Cx0FDcw0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as z,P as I,c as M,z as N,D as R,i as t,a as d,t as n,d as W,bi as j,aH as q,b as x,x as k,F as g,S as B,bk as G}from"./index-DmizPRT_.js";import{d as J}from"./onescience-docs-CH5KBTI9.js";var K=n("<div class=os-client-capability-page-grid>"),Q=n('<div class="os-client-capability-page os-client-docs-page"><header class=os-client-docs-head><div class=os-client-docs-head-copy><h2>帮助</h2><p>平台使用说明、插件镜像与版本记录</p></div></header><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-docs-tabs"role=tablist aria-label=文档分类></div></section><div class=os-client-capability-page-body><section class=os-client-capability-resource-panel>'),T=n("<button type=button><strong></strong><small>"),U=n("<p class=os-client-capability-empty>该分类下暂无文档。"),V=n("<article class=os-client-capability-card><div><h4></h4><p></p></div><div class=os-client-capability-meta></div><div class=os-client-capability-actions><a target=_blank rel=noreferrer data-primary=true>"),X=n("<span>");const v=[{id:"manual",label:"用户手册",hint:"平台与 OneSkills 使用说明",match:e=>e.includes("用户手册")},{id:"plugins",label:"插件与镜像",hint:"插件协议与运行镜像",match:e=>e.includes("插件")||e.includes("镜像")},{id:"release",label:"发版记录",hint:"版本变化与重要调整",match:e=>e.includes("发版记录")||e.includes("版本记录")}];function w(e){const c=e.replace(/^#/,"").trim().toLowerCase();return c==="manual"||c==="plugins"||c==="release"?c:"manual"}function ee(){const e=z(),c=I(),[b,f]=M(w(e.hash));N(()=>f(w(e.hash)));const H=l=>{f(l),c(G(l),{replace:!0})},$=()=>v.find(l=>l.id===b())??v[0],_=R(()=>J.filter(l=>$().match(l.tags)));return(()=>{var l=Q(),u=l.firstChild;u.firstChild;var m=u.nextSibling,y=m.firstChild,D=y.firstChild,E=D.nextSibling,F=y.nextSibling,L=m.nextSibling,A=L.firstChild;return t(u,d(q,{get href(){return j()},class:"os-client-docs-close","aria-label":"关闭帮助",children:"×"}),null),t(E,()=>$().label),t(F,d(g,{each:v,children:i=>(()=>{var a=T(),r=a.firstChild,h=r.nextSibling;return a.$$click=()=>H(i.id),t(r,()=>i.label),t(h,()=>i.hint),x(s=>{var p=b()===i.id,o=b()===i.id;return p!==s.e&&a.classList.toggle("is-active",s.e=p),o!==s.t&&k(a,"aria-pressed",s.t=o),s},{e:void 0,t:void 0}),a})()})),t(A,d(B,{get when(){return _().length>0},get fallback(){return U()},get children(){var i=K();return t(i,d(g,{get each(){return _()},children:a=>(()=>{var r=V(),h=r.firstChild,s=h.firstChild,p=s.nextSibling,o=h.nextSibling,O=o.nextSibling,S=O.firstChild;return t(s,()=>a.title),t(p,()=>a.copy),t(o,d(g,{get each(){return a.tags},children:P=>(()=>{var C=X();return t(C,P),C})()})),t(S,()=>a.action),x(()=>k(S,"href",a.href)),r})()})),i}})),l})()}W(["click"]);export{ee as WorkbenchDocsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="https://cdn.jsdelivr.net/npm/@onescience/onecode-web@1.14.50-202609211543/assets/nope-12-BJR1Ka3c.aac";export{e as default};
|