PageSourceSearch

https://astron.ai/assets/index-DA5Mca7X.js

js astron.ai collected 2026-09-24 13:18:45 UTC 15,409 bytes, 1 lines download raw bytes

1import{r as p,j as t}from"./index-CJQpyVoF.js";/* empty css                        */import{w as U,x as H,y as V}from"./userAuth-Bzc-YaEz.js";import{g as Y,c as J,a as X}from"./prompt-D_AMTQy-.js";import{p as ee}from"./index-Bpsi5fUJ.js";import{x as te}from"./AppEntry-yGjZDq3c.js";import{i as L}from"./input_error_msg-00mgFdkQ.js";import{u as C}from"./useTranslation-CZJVCIH1.js";import{c as T}from"./useUrlParam-CZ4aw4md.js";import{F as w}from"./index-ByGsukvN.js";import{M as oe}from"./index-CSwuRCeV.js";import{I as _}from"./index-CS8YAtyi.js";import{S as E}from"./index-BQyCNz27.js";import{B as F}from"./button-COlcySkY.js";import{C as re}from"./index-BoKyBx8L.js";import{i as se}from"./index-B491JDAL.js";import{S as G}from"./SpaceButton-Du44tacF.js";import{a as ae}from"./arrow-down-white-JDA--J6P.js";import{l as le}from"./lodash-DQpAQgZ8.js";import{u as ie}from"./useScreenWidth-CSF8pP7F.js";import{u as pe}from"./useOrderIsExpired-C3lj0fcm.js";import{s as h}from"./inviteCode-D9rgtvJs.js";import{P as ne}from"./index-VAO7k5M2.js";import{F as me}from"./Table-B8VxV0Ub.js";import"./base64-Cs2W2fcZ.js";import"./index-xBPjzTPJ.js";import"./index-CiW30IE2.js";import"./tslib.es6-BO7bUXQ_.js";import"./reactNode-CvZomqk2.js";import"./dayjs.min-MSV7X6E-.js";import"./context-DKhv_b6t.js";import"./Compact-BviLumD4.js";import"./motion-BwoXtl0z.js";import"./collapse-BbEVqHco.js";import"./zoom-DpNIHBsI.js";import"./row-BXqHUWkn.js";import"./responsiveObserver-DyJXlrPc.js";import"./index-34CVpSRX.js";import"./index-DnoH8i83.js";import"./index-Cb4CfQq0.js";import"./ContextIsolator-hwtSycux.js";import"./useLocale-Dmo9Agcu.js";import"./ActionButton-DJ1XBOXE.js";import"./index-Cbb5YXZ-.js";import"./fade-DU7Y_kU8.js";import"./Skeleton-CRGI6EI_.js";import"./PurePanel-CKKM5xpM.js";import"./compact-item-5orumCwJ.js";import"./SearchOutlined-D1PhykWn.js";import"./Overflow-Dh_HYkSz.js";import"./CheckOutlined-DczzTUs8.js";import"./DownOutlined-Bedvisqk.js";import"./index-DNC8bdm4.js";import"./debounce-qn1Id9XS.js";import"./isObjectLike-DQv7v4oa.js";import"./index-D4cn76_n.js";import"./index-D06cA49-.js";import"./icon_zhishi_search-VMy98n1a.js";import"./useUserStore-CzLMwWtH.js";import"./traceAndOrder-Ckos_Swc.js";import"./utils-DBy4YQWF.js";import"./knowledge-B6Xt4n06.js";import"./v4-CtRu48qb.js";import"./index-CzF7my_k.js";import"./styleChecker-Qlp7tQr6.js";import"./addEventListener-B4p1orND.js";import"./conductUtil-BjxLXQtP.js";import"./index-D8n5n2bd.js";import"./index-TUPY4PN5.js";import"./index-Bzc9CXj1.js";import"./RightOutlined-DlN6rwzX.js";import"./EllipsisOutlined-DtZ6Tilt.js";import"./index-ad3S-Ulj.js";import"./index-BSH15dlR.js";import"./useBreakpoint-Bpehexoc.js";import"./useForceUpdate-DvJ9yelE.js";import"./Pagination-C67t5xY0.js";import"./LeftOutlined-C7JmM6ZX.js";import"./CaretDownOutlined-Dv3U9ShB.js";const ce="_promptTitle_1aw21_2",de="_customTable_1aw21_12",ue="_customTable_box_1aw21_30",j={promptTitle:ce,customTable:de,customTable_box:ue};function he({open:s,setOpen:d}){const{t:a}=C(),x=T(),[m]=w.useForm(),[i,y]=p.useState([]),[g,P]=p.useState(""),I=p.useMemo(()=>{var l;return(l=i.find(r=>r.value===g))==null?void 0:l.workflowId},[g,i]),Q=()=>{m.validateFields().then(l=>{const r={promptKey:l.promptKey,name:l.name,workflowId:I};J(r).then(f=>{x(`/promptgroupdebugger/${f==null?void 0:f.id}?workflowId=${I}`)})})},u=()=>{d(!1)};return p.useEffect(()=>{Y().then(l=>{y(l==null?void 0:l.map(r=>({label:r.name,value:r.id,workflowId:r==null?void 0:r.workflowId,disabled:!(r!=null&&r.isCanPublish)||!(r!=null&&r.isLLm)||(r==null?void 0:r.isMultiParams),tooltip:r!=null&&r.isCanPublish?r!=null&&r.isLLm?r!=null&&r.isMultiParams?"multipleParams":"":"noLLMNode":"workflowNotDebugged"})))})},[]),console.log("flowList@@",i),t.jsxs(oe,{width:500,footer:null,title:a("createPromptGroupModal.title"),open:s,centered:!0,destroyOnClose:!0,maskClosable:!1,onOk:Q,onCancel:u,children:[t.jsx("p",{className:"text-desc",children:a("createPromptGroupModal.description")}),t.jsxs("div",{className:"mt-3",children:[t.jsxs(w,{form:m,name:"basic",autoComplete:"off",layout:"vertical",children:[t.jsx(w.Item,{label:a("createPromptGroupModal.fields.promptKey"),name:"promptKey",rules:[{required:!0,message:a("createPromptGroupModal.validation.requiredPromptKey")},{pattern:/^[a-zA-Z][a-zA-Z0-9\-_.]*$/,message:t.jsxs("div",{className:"flex items-start gap-1 mt-2",children:[t.jsx("img",{src:L,className:"w-[14px] h-[14px] mt-0.5",alt:""}),t.jsx("p",{className:"text-[#F74E43] text-sm",children:a("createPromptGroupModal.validation.promptKeyRule")})]})}],children:t.jsx(_,{placeholder:a("createPromptGroupModal.fields.promptKeyPlaceholder"),showCount:!0,maxLength:40})}),t.jsx(w.Item,{labelCol:{span:24},wrapperCol:{span:24},label:a("createPromptGroupModal.fields.promptName"),name:"name",rules:[{required:!0,message:a("createPromptGroupModal.validation.requiredPromptName")},{pattern:/^[a-zA-Z0-9\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5\-_.]*$/,message:t.jsxs("div",{className:"flex items-start gap-1 mt-2",children:[t.jsx("img",{src:L,className:"w-[14px] h-[14px] mt-0.5",alt:""}),t.jsx("p",{className:"text-[#F74E43] text-sm",children:a("createPromptGroupModal.validation.promptNameRule")})]})}],children:t.jsx(_,{placeholder:a("createPromptGroupModal.fields.promptNamePlaceholder"),showCount:!0,maxLength:100})}),t.jsx(w.Item,{labelCol:{span:24},wrapperCol:{span:24},label:a("createPromptGroupModal.fields.workflow"),name:"flowId",rules:[{required:!0,message:a("createPromptGroupModal.validation.requiredWorkflow")}],children:t.jsx(E,{placeholder:a("createPromptGroupModal.fields.workflowPlaceholder"),value:g,onChange:l=>P(l),options:i,optionRender:l=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{children:l.data.label}),l.data.tooltip&&t.jsxs("span",{className:"text-desc",children:["(",a(`common.${l.data.tooltip}`),")"]})]})})})]}),t.jsxs("div",{className:"flex items-center justify-end gap-4 mt-10 mb-2",children:[t.jsx(F,{onClick:u,children:a("createPromptGroupModal.buttons.cancel")}),t.jsx(F,{type:"primary",onClick:Q,children:a("createPromptGroupModal.buttons.confirm")})]})]})]})}const xe="_headSeach_1ty1k_1",ge="_seach_1ty1k_7",fe="_RetractableInput_1ty1k_11",we="_seachInput_1ty1k_18",v={headSeach:xe,seach:ge,RetractableInput:fe,seachInput:we},Ie="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M7.615728,1.000786413L7.615728,1Q7.615728,0.9409052,7.604199,0.882946Q7.592671,0.824986,7.570056,0.77039Q7.547441,0.715793,7.51461,0.666658Q7.481779,0.61
17522,7.439992,0.575736Q7.398206,0.5339499999999999,7.34907,0.501118Q7.299935,0.468287,7.245338,0.44567199999999996Q7.190742,0.42305800000000005,7.132782,0.41152900000000003Q7.0748231,0.4,7.0157283,0.4Q6.9566831,0.4,6.898771,0.41151000000000004Q6.840858,0.42301900000000003,6.7863,0.445597Q6.731742,0.468175,6.682631,0.500955Q6.633521,0.5337339999999999,6.591742,0.575458Q6.549964,0.617182,6.51712,0.666249Q6.484276,0.715317,6.461627,0.769845Q6.4389769999999995,0.8243739999999999,6.427392,0.882271Q6.415806,0.9401684,6.415729,0.999213587L6.415728,0.999999999274001L6.4,12.9992L6.4,13Q6.4,13.0591,6.411529,13.1171Q6.423058,13.175,6.445672,13.2296Q6.468287,13.2842,6.501118,13.3333Q6.53395,13.3825,6.575736,13.4243Q6.617522,13.466,6.666658,13.4989Q6.715793,13.5317,6.77039,13.5543Q6.824986,13.5769,6.882946,13.5885Q6.9409051999999996,13.6,7,13.6Q7.0590452,13.6,7.116958,13.5885Q7.17487,13.577,7.229428,13.5544Q7.283986,13.5318,7.333097,13.499Q7.382207,13.4663,7.423986,13.4245Q7.465764,13.3828,7.498608,13.3337Q7.531452,13.2847,7.554102,13.2302Q7.576751,13.1756,7.588336,13.1177Q7.599922,13.0598,7.599999,13.0008L7.600001,13L7.615728,1.000945423L7.615728,1.000786413Z'%20fill-rule='evenodd'%20fill='%236356EA'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M1,6.4L13,6.4Q13.0591,6.4,13.1171,6.411529Q13.175,6.423058,13.2296,6.445672Q13.2842,6.468287,13.3333,6.501118Q13.3825,6.53395,13.4243,6.575736Q13.466,6.617522,13.4989,6.666658Q13.5317,6.715793,13.5543,6.77039Q13.5769,6.824986,13.5885,6.882946Q13.6,6.9409051999999996,13.6,7Q13.6,7.0590948000000004,13.5885,7.117054Q13.5769,7.175014,13.5543,7.22961Q13.5317,7.284207,13.4989,7.333342Q13.466,7.382478,13.4243,7.424264Q13.3825,7.46605,13.3333,7.498882Q13.2842,7.531713,13.2296,7.554328Q13.175,7.576942,13.1171,7.588471Q13.0591,7.6,13,7.6L1,7.6Q0.9409052,7.6,0.882946,7.588471Q0.824986,7.576942,0.77039,7.554328Q0.715793,7.531713,0.666658,7.498882Q0.617522,7.46605,0.575736,7.424264Q0.5339499999999999,7.382478,0.501118,7.333342Q0.468287,7.284207,0.44567199999999996,7.22961Q0.42305800000000005,7.175014,0.41152900000000003,7.117054Q0.4,7.0590948000000004,0.4,7Q0.4,6.9409051999999996,0.41152900000000003,6.882946Q0.42305800000000005,6.824986,0.44567199999999996,6.77039Q0.468287,6.715793,0.501118,6.666658Q0.5339499999999999,6.617522,0.575736,6.575736Q0.617522,6.53395,0.666658,6.501118Q0.715793,6.468287,0.77039,6.445672Q0.824986,6.423058,0.882946,6.411529Q0.9409052,6.4,1,6.4Z'%20fill-rule='evenodd'%20fill='%236356EA'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Qe=({msg:s,onChangeSelect:d,getRobotsDebounce:a,setCreatePromptGroupModal:x,showModal:m})=>{const{t:i}=C();return t.jsxs("div",{className:v.headSeach,children:[t.jsxs("div",{className:v.seach,children:[t.jsx("div",{className:v.seachInput,children:t.jsx(E,{className:"ant-select-UI",showSearch:!0,allowClear:!0,style:{width:"128px"},placeholder:i("promptIndex.search.status"),optionFilterProp:"label",notFoundContent:null,onChange:d,filterOption:!1,options:[{value:0,label:i("promptIndex.search.unpublished")},{value:1,label:i("promptIndex.search.published")}]})}),t.jsx("div",{className:v.RetractableInput,children:t.jsx(se,{className:"retractable-input-UI",flag:!0,value:s.promptName,restrictFirstChar:!0,onChange:a})})]}),t.jsxs("div",{className:"flex items-center gap-6",children:[t.jsx(G,{config:{key:"createPromptGroup",text:i("promptIndex.actions.createPromptGroup"),type:"default",size:"small",icon:t.jsx("img",{src:Ie,alt:"arrow-down",style:{width:14,height:14,marginRight:4}}),onClick:()=>x(!0)},style:{borderRadius:"10px",color:"#6356EA"}}),t.jsx(G,{config:{key:"createPrompt",text:i("promptIndex.actions.createPrompt"),type:"primary",size:"small",icon:t.jsx("img",{src:ae,alt:"arrow-down",style:{width:14,height:14,marginRight:4}}),onClick:()=>m()}})]})]})};function je(){const{t:s}=C(),[,d]=te(ee),a=T(),{wrapWithOrderCheck:x,withCheckIsExpired:m}=pe(),i=ie(),y=async e=>{console.log(e,"bot"),m(),await H({promptId:e.id}),M(c)},g=e=>{U(e).then(o=>{console.log(o,"res"),d(o),a(`/prompt/promption?id=${o==null?void 0:o.id}`)}).catch(o=>{h.error(o==null?void 0:o.msg)}),console.log("Success:",e)},P=le.debounce(g,500),I=e=>{console.log("Failed:",e)},[Q,u]=p.useState(!1),[l,r]=p.useState(!1),f=()=>{m(),u(!0)},R=()=>{m(),r(!0)},z=()=>{u(!1)},A=()=>{u(!1)},[b,N]=p.useState({promptStatus:"",promptName:""}),[O,$]=p.useState([]),[D,K]=p.useState(),[c,W]=p.useState({pageIndex:0,pageSize:10}),B=[{title:s("promptIndex.table.index"),dataIndex:"index",ellipsis:!0,width:80,align:"left",render:(e,o,n)=>c.pageIndex*c.pageSize+n+1},{dataIndex:"promptKey",title:"Prompt KEY",align:"left",ellipsis:!0,render:e=>t.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"200px"},children:e})},{dataIndex:"type",title:s("promptIndex.table.type"),align:"left",ellipsis:!0,render:e=>t.jsx("div",{children:s(e?"promptIndex.table.promptGroup":"promptIndex.table.prompt")})},{dataIndex:"name",title:s("promptIndex.table.promptName"),align:"left",ellipsis:!0,render:e=>t.jsx("div",{title:e,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"200px"},children:e})},{dataIndex:"action",title:s("promptIndex.table.status"),align:"left",ellipsis:!0,render:e=>t.jsx("div",{style:{width:"fit-content",minWidth:"58px",height:"24px",lineHeight:"24px",textAlign:e.type?"left"
1:"center",borderRadius:"4px",background:e.type?"":e.status==1?"#E5F7F1":"#F0F0F1",color:e.type?"":e.status==1?"#02B578":"#676773"},children:e.type?"--":e.status==1?s("promptIndex.search.published"):s("promptIndex.search.unpublished")})},{dataIndex:"latestVersion",title:s("promptIndex.table.latestVersion"),align:"left",ellipsis:!0,render:e=>t.jsx("div",{children:e||"--"})},{dataIndex:"commitTime",title:s("promptIndex.table.commitTime"),align:"left",ellipsis:!0,width:150,render:e=>t.jsx("div",{children:e?e==null?void 0:e.replace(/T/g," ").slice(0,16):"--"})},{dataIndex:"createTime",title:s("promptIndex.table.createTime"),align:"left",ellipsis:!0,width:150,render:e=>t.jsx("div",{children:e==null?void 0:e.replace(/T/g," ").slice(0,16)})},{dataIndex:"action",title:s("promptIndex.table.action"),align:"left",ellipsis:!0,fixed:i>1440?void 0:"right",width:156,render:e=>t.jsxs("span",{className:j.historyAct,children:[t.jsx("span",{style:{color:"#6356EA",marginRight:"16px",cursor:"pointer"},onClick:async()=>{m(),(e==null?void 0:e.type)===1?X(e.workflowId).then(o=>{if(o!=null&&o.isDeleted){h.warning(s("promptIndex.messages.workflowDeleted"));return}if(o!=null&&o.isMultiParams){h.warning(s("promptIndex.messages.multiParams"));return}if(!(o!=null&&o.isCanPublish)){h.warning(s("promptIndex.messages.notDebugged"));return}if(!(o!=null&&o.isLLm)){h.warning(s("promptIndex.messages.noLLMNode"));return}a(`/promptgroupdebugger/${e.id}?workflowId=${e.workflowId}`)}):(console.log(e,"bot"),await d(e),a(`/prompt/promption?id=${e.id}`))},children:s("promptIndex.actions.edit")}),(e==null?void 0:e.type)===0&&t.jsx("span",{style:{color:"#6356EA",marginRight:"16px",cursor:"pointer"},onClick:()=>{console.log(e,"bot"),m(),a("/management/evaluation")},children:s("promptIndex.actions.evaluate")}),t.jsx(ne,{title:s("promptIndex.actions.confirmDelete"),onConfirm:()=>y(e),children:x(t.jsx("span",{style:{color:"#6356EA",cursor:"pointer"},children:s("promptIndex.actions.delete")}))})]})}],q=e=>{N(o=>({...o,promptStatus:e}))},M=e=>{V({...b,pageIndex:e.pageIndex,pageSize:e.pageSize}).then(o=>{var S;const n=(S=o==null?void 0:o.content)==null?void 0:S.map(k=>({...k,action:k}));console.log(n,"dataNow---1"),$(n??[]),K(o.totalElements)}).catch(o=>{console.error(o),o!=null&&o.msg&&h.error(o.msg)})},Z=e=>{const o=e.target.value;N(n=>({...n,promptName:o}))};return p.useEffect(()=>{M(c)},[c,b]),t.jsxs("div",{className:"flex-1 flex flex-col page-container-inner-UI",children:[t.jsx("div",{className:j.promptTitle,children:s("promptIndex.title")}),t.jsx(Qe,{msg:b,onChangeSelect:q,getRobotsDebounce:Z,setCreatePromptGroupModal:R,showModal:f}),t.jsx("div",{className:j.customTable_box,children:t.jsx(me,{className:j.customTable,dataSource:O,columns:B,rowKey:e=>e.createTime,pagination:{position:["bottomCenter"],total:D,showTotal:e=>s("promptIndex.actions.totalData",{total:e}),showSizeChanger:!0,current:c.pageIndex+1,pageSize:c.pageSize,pageSizeOptions:[10,20,50],onChange:(e,o)=>{console.log(e,o,"pageIndex, pageSize"),W(n=>({...n,pageIndex:o!==(n==null?void 0:n.pageSize)?0:e-1,pageSize:o}))}},scroll:{scrollToFirstRowOnChange:!0,y:"max(200px ,calc(100vh - 300px))",x:i>1440?void 0:1e3}})}),t.jsx(re,{isCreatePrompt:Q,handleCreatePrompt:z,handleCreatePromptCancel:A,onFinish:P,onFinishFailed:I}),t.jsx(he,{open:l,setOpen:r})]})}const Zt=p.memo(je);export{Zt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.