@testver/testver 1.4.2 → 1.4.3
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/dist/index.js +1174 -800
- package/package.json +1 -1
- package/src/ui/static/assets/AIPanel-KQFq4c0Q.js +32 -0
- package/src/ui/static/assets/AIRecordPanel-CAs8fXyS.js +40 -0
- package/src/ui/static/assets/AIStreamUI-p_sMTEDQ.js +9 -0
- package/src/ui/static/assets/{AITestGenPage-D3t2gPAA.js → AITestGenPage-CHaHfmu4.js} +1 -1
- package/src/ui/static/assets/APITestingPage-BSGJY_hd.js +19 -0
- package/src/ui/static/assets/{AboutPage-CjEqKB-q.js → AboutPage-CDa24SCJ.js} +1 -1
- package/src/ui/static/assets/{AdvancedPage-4kAcpE8Y.js → AdvancedPage-BqXP0FLg.js} +1 -1
- package/src/ui/static/assets/{AnalyticsPage-64mYNK2v.js → AnalyticsPage-Lm8noJqC.js} +1 -1
- package/src/ui/static/assets/{AuditLogPage-BQjOzQje.js → AuditLogPage-BvldSIik.js} +1 -1
- package/src/ui/static/assets/ChangesSummary-Cu0_4Ucf.js +3 -0
- package/src/ui/static/assets/{CodeMapPage-B1ezmnlE.js → CodeMapPage-uEjuo3fk.js} +3 -3
- package/src/ui/static/assets/{ConfirmDialog-t7mpeeSN.js → ConfirmDialog-DtotgVmI.js} +1 -1
- package/src/ui/static/assets/{CoveragePage-YMmCbiBk.js → CoveragePage-jNkQJA1P.js} +1 -1
- package/src/ui/static/assets/{CronBuilder-Nk-K-_8I.js → CronBuilder-D2fERHt9.js} +1 -1
- package/src/ui/static/assets/{Dashboard-BDVxO2V4.js → Dashboard-BaIj_IdQ.js} +1 -1
- package/src/ui/static/assets/{DefectsPage-l8yGeCyR.js → DefectsPage-DH0njYFG.js} +3 -3
- package/src/ui/static/assets/{EmptyState-D1T3JWUr.js → EmptyState-utxlJ0fu.js} +1 -1
- package/src/ui/static/assets/{ExportButton-Dt5RhL-h.js → ExportButton-ouKqn9CU.js} +1 -1
- package/src/ui/static/assets/{FileViewer-CrKgh_cB.js → FileViewer-mU3JloJ6.js} +1 -1
- package/src/ui/static/assets/{GitPage-_4nCEzkJ.js → GitPage-TrX-RqNC.js} +5 -5
- package/src/ui/static/assets/{ImportExportPage-BcR7IQi9.js → ImportExportPage-CIhK_raX.js} +1 -1
- package/src/ui/static/assets/{JiraPushDialog-C2sP4_4h.js → JiraPushDialog-DgEZS-0u.js} +1 -1
- package/src/ui/static/assets/{KpiTile-inmeEsy3.js → KpiTile-BHLE3HVj.js} +1 -1
- package/src/ui/static/assets/{LiveExecutionView-D5BRe9jq.js → LiveExecutionView-CaIf7Jux.js} +1 -1
- package/src/ui/static/assets/{ManagePage-B8iG6Q0B.js → ManagePage-SvRQ6L19.js} +1 -1
- package/src/ui/static/assets/{MediaModal-C5n6sHYi.js → MediaModal-DNM45Uz2.js} +1 -1
- package/src/ui/static/assets/{MobileRunPicker-0h-N2c6d.js → MobileRunPicker-DFKm6_nU.js} +1 -1
- package/src/ui/static/assets/{MobileRunTarget-Bo_xekig.js → MobileRunTarget-DHDoDZ_F.js} +3 -3
- package/src/ui/static/assets/{ModuleExplorer-VGcmK167.js → ModuleExplorer-rni7JbsL.js} +1 -1
- package/src/ui/static/assets/{OutputPage-B_1nPPxE.js → OutputPage-Cn2WCpJ6.js} +1 -1
- package/src/ui/static/assets/{PipelinesPanel-PmmPu8pj.js → PipelinesPanel-D6zWcLtD.js} +1 -1
- package/src/ui/static/assets/{ProfilePage-y7tJNNFd.js → ProfilePage-BKNdkSnx.js} +1 -1
- package/src/ui/static/assets/{ProjectExplorer-DbfGhRq0.js → ProjectExplorer-5e7J8t-o.js} +1 -1
- package/src/ui/static/assets/{RemoteFileStrip-WuRKtx_h.js → RemoteFileStrip-C1S2aclP.js} +1 -1
- package/src/ui/static/assets/{ReportCard-G52Q6-2i.js → ReportCard-D4EElEe9.js} +2 -2
- package/src/ui/static/assets/{ReportFullView-Bt8UFP2J.js → ReportFullView-2w2ysKRg.js} +1 -1
- package/src/ui/static/assets/{ReportsPage-DMtDi73Q.js → ReportsPage-9Fx-IEwV.js} +2 -2
- package/src/ui/static/assets/{ResultsPage-BI9jpK2N.js → ResultsPage-DPkfGh-K.js} +1 -1
- package/src/ui/static/assets/{RunState-ifC4zi6M.js → RunState-CRuS_bC2.js} +1 -1
- package/src/ui/static/assets/{RunTargets-C7vpCbck.js → RunTargets-CPKBrefj.js} +1 -1
- package/src/ui/static/assets/{ScriptMappingPage-7vHuvhQw.js → ScriptMappingPage-C3K_uyf0.js} +1 -1
- package/src/ui/static/assets/{SearchableDevicePicker-BYxYJNWl.js → SearchableDevicePicker-DubIldKj.js} +1 -1
- package/src/ui/static/assets/{SettingsPage-DSISg7r7.js → SettingsPage-BuZrrlW2.js} +1 -1
- package/src/ui/static/assets/{SharedReportView-BOqKGJmR.js → SharedReportView-ig5hECRk.js} +1 -1
- package/src/ui/static/assets/{SourcesPage-CgqtYGBi.js → SourcesPage-BPkqRqkC.js} +1 -1
- package/src/ui/static/assets/{TestExplorerPage-gYLhCD4d.js → TestExplorerPage-C_jl93GR.js} +3 -3
- package/src/ui/static/assets/{TestManagementPage-wqYTKP7W.js → TestManagementPage-DJiWpCne.js} +2 -2
- package/src/ui/static/assets/{TestPlansPage-DOKX9p6z.js → TestPlansPage-G1lvK1C0.js} +3 -3
- package/src/ui/static/assets/{TestverCreditsDetail-cSW0SpNx.js → TestverCreditsDetail-BKpt4oLW.js} +1 -1
- package/src/ui/static/assets/{TestverCreditsRing-DpMzl3h7.js → TestverCreditsRing-CEBSy3w3.js} +1 -1
- package/src/ui/static/assets/{UncommittedDiffViewer-BxS0zi-p.js → UncommittedDiffViewer-FKvUZcRi.js} +2 -2
- package/src/ui/static/assets/{UserManagementPage-B5d0uDU_.js → UserManagementPage-gDGhaHE4.js} +3 -3
- package/src/ui/static/assets/{WorkflowsPage-Bk0DFnFS.js → WorkflowsPage-BACdnU-1.js} +1 -1
- package/src/ui/static/assets/{hiddenLlmProviders-CdhhNa5G.js → hiddenLlmProviders-DzwaR-b9.js} +1 -1
- package/src/ui/static/assets/index-D6sQYc_0.js +47 -0
- package/src/ui/static/assets/{index-DpQhqcHv.js → index-DLmlY2Ol.js} +1 -1
- package/src/ui/static/assets/index-aInN0yoR.css +1 -0
- package/src/ui/static/assets/{reportMeta-AKcU_qwq.js → reportMeta-3kxT7BIT.js} +1 -1
- package/src/ui/static/assets/{useChartTheme-BFz2QcND.js → useChartTheme-CTIe6M63.js} +1 -1
- package/src/ui/static/assets/{useDebouncedValue-BsHptIvX.js → useDebouncedValue-C9odz7b2.js} +1 -1
- package/src/ui/static/assets/{useFeatureFlags-DNkIctil.js → useFeatureFlags-DrhvBp0C.js} +1 -1
- package/src/ui/static/assets/{useJiraConnector-D5ysBBvz.js → useJiraConnector-Dwj69Rfh.js} +1 -1
- package/src/ui/static/assets/useOwnership-C1CmzcvJ.js +1 -0
- package/src/ui/static/assets/useSuites-V0AxZYex.js +1 -0
- package/src/ui/static/assets/{useTabParam-ChbOedP1.js → useTabParam-CyYAP90W.js} +1 -1
- package/src/ui/static/assets/{useTestExplorer-DT8frjCK.js → useTestExplorer-CUqC18DV.js} +1 -1
- package/src/ui/static/assets/{useTestLifecycle-OcwQaB1s.js → useTestLifecycle-C2S_vaX2.js} +1 -1
- package/src/ui/static/assets/{useTestManagement-Xm4Bcx3u.js → useTestManagement-DW6AW2mt.js} +2 -2
- package/src/ui/static/assets/{useTestResults-D5EwGIX9.js → useTestResults-yjH1aUy-.js} +1 -1
- package/src/ui/static/assets/{vendor-charts-DWFQlmCz.js → vendor-charts-By5uZ93z.js} +1 -1
- package/src/ui/static/assets/{vendor-flow-YGpC9U9I.js → vendor-flow-B61ZV-pm.js} +1 -1
- package/src/ui/static/assets/{vendor-icons-BKPiFyYV.js → vendor-icons-D_Dmmj8d.js} +277 -282
- package/src/ui/static/assets/vendor-query-DkZSMtfn.js +1 -0
- package/src/ui/static/assets/{vendor-quill-W-RoQfb6.js → vendor-quill-xJF2Jvjc.js} +1 -1
- package/src/ui/static/assets/{vendor-react-CTbHBddL.js → vendor-react-DOVfxdUy.js} +1 -1
- package/src/ui/static/index.html +5 -5
- package/src/ui/static/assets/AIPanel-B_R-CbrF.js +0 -32
- package/src/ui/static/assets/AIRecordPanel-BRQWIU5h.js +0 -40
- package/src/ui/static/assets/AIStreamUI-C3D989_6.js +0 -9
- package/src/ui/static/assets/APITestingPage-Cmwkiiys.js +0 -19
- package/src/ui/static/assets/ChangesSummary-CY_Vb27i.js +0 -2
- package/src/ui/static/assets/DiffViewer-BIU09a_i.js +0 -2
- package/src/ui/static/assets/index-BYVxKLrT.js +0 -47
- package/src/ui/static/assets/index-C2KJt7SI.css +0 -1
- package/src/ui/static/assets/useOwnership-U0AfKBRo.js +0 -1
- package/src/ui/static/assets/useSuites-DyfN9HVv.js +0 -1
- package/src/ui/static/assets/vendor-query-BrzmPFT3.js +0 -1
package/src/ui/static/assets/{UncommittedDiffViewer-BxS0zi-p.js → UncommittedDiffViewer-FKvUZcRi.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p,j as t}from"./vendor-react-
|
|
2
|
-
`),l=D[s]??!1,z=l?0:Math.max(0,a.length-$);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"border-t border-white/5 max-h-[440px] overflow-auto",children:t.jsx("pre",{className:"text-sm font-mono leading-[1.6] whitespace-pre",children:(l?a:a.slice(0,$)).map((d,
|
|
1
|
+
import{r as p,j as t}from"./vendor-react-DOVfxdUy.js";import{ax as O,r as T,h as B,y as F,t as I,b4 as R,cx as H,b7 as K,ab as V,d4 as X,d5 as q,b_ as G}from"./vendor-icons-D_Dmmj8d.js";const $=200,x=r=>`${r.staged?"s":"u"}:${r.path}`;function Y({files:r,showGroups:P=!0,defaultExpanded:g=!1,onStageFile:u,onUnstageFile:b,onStageAll:j,onUnstageAll:f,onDiscardFile:N,busy:c=!1}){const[E,w]=p.useState(()=>{if(g){const e={};return r.forEach(s=>{e[x(s)]=!0}),e}return{}}),[v,U]=p.useState(g),[D,A]=p.useState({});if(r.length===0)return null;const y=r.filter(e=>e.staged),C=r.filter(e=>!e.staged),W=()=>{const e=!v;U(e);const s={};r.forEach(n=>{s[x(n)]=e}),w(s)},L=e=>{w(s=>({...s,[e]:!s[e]}))},_=e=>{switch(e){case"added":case"untracked":return t.jsx(G,{size:13,className:"text-emerald-400"});case"deleted":return t.jsx(q,{size:13,className:"text-red-400"});case"renamed":return t.jsx(X,{size:13,className:"text-sky-400"});default:return t.jsx(V,{size:13,className:"text-amber-400"})}},k=(e,s)=>{const n=E[s]??!1,h=!e.staged&&u,m=e.staged&&b;return t.jsxs("div",{className:"rounded-lg border border-white/5 bg-black/20 overflow-hidden",children:[t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 hover:bg-surface-2/50 transition-colors",children:[t.jsxs("button",{onClick:()=>L(s),"aria-expanded":n,className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[t.jsx("span",{className:"text-gray-500 flex-shrink-0",children:n?t.jsx(F,{size:13}):t.jsx(I,{size:13})}),_(e.status),t.jsx("span",{className:"text-sm text-gray-200 font-mono truncate flex-1",children:e.path}),e.additions>0&&t.jsxs("span",{className:"text-xs text-emerald-500 flex-shrink-0 font-medium",children:["+",e.additions]}),e.deletions>0&&t.jsxs("span",{className:"text-xs text-red-500 flex-shrink-0 font-medium",children:["-",e.deletions]}),t.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full flex-shrink-0 font-medium ${e.status==="untracked"||e.status==="added"?"bg-emerald-500/10 text-emerald-500":e.status==="deleted"?"bg-red-500/10 text-red-500":"bg-amber-500/10 text-amber-500"}`,children:e.status})]}),h&&t.jsxs("button",{onClick:a=>{a.stopPropagation(),u(e.path)},disabled:c,className:"flex items-center gap-1 px-2.5 py-1.5 rounded text-xs font-medium text-emerald-500 hover:bg-emerald-500/10 border border-emerald-500/20 flex-shrink-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:`Stage ${e.path} — put its changes into the next commit`,"aria-label":`Stage ${e.path}`,children:[t.jsx(R,{size:12})," Stage"]}),m&&t.jsxs("button",{onClick:a=>{a.stopPropagation(),b(e.path)},disabled:c,className:"flex items-center gap-1 px-2.5 py-1.5 rounded text-xs font-medium text-gray-400 hover:bg-gray-500/10 border border-white/10 flex-shrink-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:`Unstage ${e.path} — take it out of the next commit (your edits stay)`,"aria-label":`Unstage ${e.path}`,children:[t.jsx(H,{size:12})," Unstage"]}),N&&!e.staged&&t.jsxs("button",{onClick:a=>{a.stopPropagation(),N(e)},disabled:c,className:"flex items-center gap-1 px-2.5 py-1.5 rounded text-xs font-medium text-red-500 hover:bg-red-500/10 border border-red-500/20 flex-shrink-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:`Discard changes to ${e.path} — throw the edits away for good (can't be undone)`,"aria-label":`Discard changes to ${e.path}`,children:[t.jsx(K,{size:12})," Discard"]})]}),n&&e.patch&&(()=>{const a=e.patch.split(`
|
|
2
|
+
`),l=D[s]??!1,z=l?0:Math.max(0,a.length-$);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"border-t border-white/5 max-h-[440px] overflow-auto",children:t.jsx("pre",{className:"text-sm font-mono leading-[1.6] whitespace-pre",children:(l?a:a.slice(0,$)).map((d,M)=>{let o="",i="text-gray-400";return d.startsWith("+++")||d.startsWith("---")?(i="text-gray-500 font-bold",o="bg-white/[0.02]"):d.startsWith("@@")?(i="text-sky-400/50",o="bg-sky-500/5"):d.startsWith("+")?(i="text-emerald-500",o="bg-emerald-500/10"):d.startsWith("-")&&(i="text-red-500",o="bg-red-500/10"),t.jsx("div",{className:`px-3 ${o} ${i}`,children:d||" "},M)})})}),z>0&&t.jsxs("button",{onClick:()=>A(d=>({...d,[s]:!0})),className:"w-full px-3 py-1.5 text-xs font-medium text-brand-400 hover:text-brand-300 hover:bg-brand-500/5 border-t border-white/5 transition-colors",children:["Show all ",a.length," lines (",z," more)"]}),e.truncated&&t.jsx("div",{className:"border-t border-white/5 px-3 py-1.5 text-xs text-amber-600 dark:text-amber-400",children:"This diff is too large to show in full — the rest is cut off. Open the file to see all of it."})]})})(),n&&!e.patch&&t.jsx("div",{className:"border-t border-white/5 px-3 py-2 text-xs text-gray-500",children:e.noPreview?"No preview — only the first 50 new files are previewed. Stage and commit work as usual.":"No diff content available."})]},s)},S=(e,s,n,h,m,a)=>e.length===0?null:t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[h,t.jsxs("span",{className:`text-[11px] font-semibold uppercase flex-1 ${m}`,children:[n," (",e.length,")"]}),a&&t.jsx("button",{onClick:a.onClick,disabled:c,className:"text-[11px] text-gray-500 hover:text-gray-300 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a.label})]}),t.jsx("div",{className:"space-y-1",children:e.map(l=>k(l,x(l)))})]});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-[11px] font-semibold text-gray-400 uppercase",children:[r.length," changed file",r.length!==1?"s":""]}),t.jsxs("button",{onClick:W,className:"flex items-center gap-1 text-[11px] text-gray-500 hover:text-gray-300 transition-colors",children:[t.jsx(O,{size:11}),v?"Collapse All":"Expand All"]})]}),P?t.jsxs("div",{className:"space-y-4",children:[S(y,"s","Staged",t.jsx(T,{size:12,className:"text-emerald-400"}),"text-emerald-400",f&&y.length>0?{label:"Unstage All",onClick:f}:void 0),S(C,"u","Unstaged",t.jsx(B,{size:12,className:"text-amber-400"}),"text-amber-400",j&&C.length>0?{label:"Stage All",onClick:j}:void 0)]}):t.jsx("div",{className:"space-y-1",children:r.map(e=>k(e,x(e)))})]})}export{Y as U};
|
package/src/ui/static/assets/{UserManagementPage-B5d0uDU_.js → UserManagementPage-gDGhaHE4.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{r as c,j as e,
|
|
1
|
+
import{r as c,j as e,d as N}from"./vendor-react-DOVfxdUy.js";import{a as W}from"./formatDate-T65-Y6Mi.js";import{a as Y,u as Z,c as m}from"./vendor-query-DkZSMtfn.js";import{ae as ee,b as se,fD as te,fE as ae,fF as re,fG as le,fH as ie,fI as ne,fJ as de,B as oe,eK as D}from"./index-D6sQYc_0.js";import{U as ce,b4 as xe,d6 as z,d7 as P,ac as M,o as q,b6 as me,a8 as L,am as K,z as ue,b7 as he,X as be}from"./vendor-icons-D_Dmmj8d.js";const pe=[{value:"admin",label:"Admin",description:"Full access + user management (created by the super admin)"},{value:"tester",label:"Tester",description:"Run tests, edit files, use tools"},{value:"viewer",label:"Viewer",description:"Read-only dashboard access"}],ye=t=>t==="superadmin"?"super admin":t,fe=t=>t==="superadmin"?"yellow":t==="admin"?"brand":t==="tester"?"green":"gray";function ke(){const{user:t}=ee(),{toast:l}=se(),u=Y(),{data:v,isLoading:$}=Z({queryKey:["users"],queryFn:te}),[n,p]=c.useState(null),[r,w]=c.useState(null),[h,y]=c.useState(null),[b,f]=c.useState(null),[i,g]=c.useState(null),[a,d]=c.useState({username:"",displayName:"",email:"",password:"",role:"tester"}),[k,F]=c.useState(""),S=(v==null?void 0:v.users)??[],C=(t==null?void 0:t.role)==="superadmin",R=m({mutationFn:()=>ae(a),onSuccess:()=>{u.invalidateQueries({queryKey:["users"]}),l("success","User created successfully"),o()},onError:s=>l("error",s.message)}),A=m({mutationFn:s=>re(s.id,s.updates),onSuccess:()=>{u.invalidateQueries({queryKey:["users"]}),l("success","User updated"),o()},onError:s=>l("error",s.message)}),O=m({mutationFn:le,onSuccess:()=>{u.invalidateQueries({queryKey:["users"]}),l("success","User deleted")},onError:s=>l("error",s.message)}),E=m({mutationFn:()=>ie(r.id,k),onSuccess:()=>{l("success","Password reset successfully"),o()},onError:s=>l("error",s.message)}),T=m({mutationFn:ne,onSuccess:()=>{u.invalidateQueries({queryKey:["users"]}),l("success","Two-factor authentication reset"),f(null)},onError:s=>l("error",s.message)}),Q=m({mutationFn:de,onSuccess:s=>{u.invalidateQueries({queryKey:["users"]}),l("success",`Revoked ${s.sessionsRevoked} session(s)`)},onError:s=>l("error",s.message)});function I(){d({username:"",displayName:"",email:"",password:"",role:"tester"}),p("create")}function B(s){w(s),d({username:s.username,displayName:s.displayName,email:s.email||"",password:"",role:s.role}),p("edit")}function X(s){w(s),F(""),p("reset-password")}function o(){p(null),w(null)}function G(s){y(s)}function H(){h&&(O.mutate(h.id),y(null))}function J(s){g(s)}function V(){i&&(A.mutate({id:i.id,updates:{isActive:!i.isActive}}),g(null))}const x=s=>s.id===(t==null?void 0:t.id)?!0:!(s.role==="superadmin"||s.role==="admin"&&!C),j=s=>s.role==="superadmin",_=s=>!!s.twoFactorEnabled&&s.id!==(t==null?void 0:t.id)&&!j(s)&&x(s);return e.jsxs("div",{className:"min-h-screen bg-surface-0 text-gray-200",children:[e.jsx("div",{className:"border-b border-white/5 bg-surface-1",children:e.jsx("div",{className:"max-w-[1400px] mx-auto px-6 py-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-gray-100 flex items-center gap-3",children:[e.jsx(ce,{size:24,className:"text-brand-300"}),"User Management",e.jsxs("span",{className:"text-sm font-normal bg-brand-500/15 text-brand-300 px-2.5 py-0.5 rounded-full",children:[S.length," users"]})]}),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Manage user accounts, roles, and access"})]}),e.jsxs("button",{onClick:I,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-brand-600 hover:bg-brand-500 rounded-lg transition-colors",children:[e.jsx(xe,{size:16}),"Add User"]})]})})}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8 space-y-6",children:[$?e.jsx("div",{className:"text-sm text-gray-500",children:"Loading users..."}):e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 overflow-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5 text-sm text-gray-500",children:[e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"User"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Email"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Role"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Status"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"2FA"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Last Login"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Sessions"}),e.jsx("th",{className:"text-right px-4 py-3 font-medium",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-white/5",children:S.map(s=>e.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-brand-500/20 flex items-center justify-center text-brand-300 text-sm font-semibold",children:s.displayName.charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-200 font-medium",children:s.displayName}),e.jsxs("p",{className:"text-xs text-gray-500",children:["@",s.username]})]}),s.id===(t==null?void 0:t.id)&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 bg-brand-500/10 text-brand-400 rounded",children:"you"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-sm text-gray-400",children:s.email||e.jsx("span",{className:"text-gray-600 italic",children:"—"})})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx(oe,{label:ye(s.role),color:fe(s.role)})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("span",{className:`flex items-center gap-1.5 text-xs ${s.isActive?"text-emerald-400":"text-gray-500"}`,children:[s.isActive?e.jsx(z,{size:14}):e.jsx(P,{size:14}),s.isActive?"Active":"Disabled"]})}),e.jsx("td",{className:"px-4 py-3","data-testid":`two-factor-${s.username}`,children:s.twoFactorEnabled?e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400 whitespace-nowrap",children:[e.jsx(M,{size:14})," On"]}):s.twoFactorRequired?e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-amber-400 whitespace-nowrap",title:"Required by the workspace — they set it up at their next sign-in",children:[e.jsx(q,{size:13,className:"flex-shrink-0"})," Not set up"]}):e.jsx("span",{className:"text-xs text-gray-500",children:"Off"})}),e.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:s.lastLoginAt?W(s.lastLoginAt):"Never"}),e.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:s.sessions}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx("button",{onClick:()=>B(s),className:"p-1.5 rounded hover:bg-surface-2 text-gray-400 hover:text-gray-200 disabled:opacity-30",title:"Edit user",disabled:!x(s),children:e.jsx(me,{size:14})}),e.jsx("button",{onClick:()=>X(s),className:"p-1.5 rounded hover:bg-surface-2 text-gray-400 hover:text-gray-200 disabled:opacity-30",title:"Reset password",disabled:!x(s),children:e.jsx(L,{size:14})}),e.jsx("button",{onClick:()=>f(s),className:"p-1.5 rounded hover:bg-surface-2 text-gray-400 hover:text-amber-400 disabled:opacity-30",title:s.twoFactorEnabled?s.id===(t==null?void 0:t.id)?"Turn your own off from Profile":j(s)?"The super admin's two-factor authentication cannot be reset here":"Reset two-factor authentication":"Two-factor authentication is off",disabled:!_(s),children:e.jsx(K,{size:14})}),e.jsx("button",{onClick:()=>Q.mutate(s.id),className:"p-1.5 rounded hover:bg-surface-2 text-gray-400 hover:text-gray-200 disabled:opacity-30",title:"Revoke sessions",disabled:s.sessions===0||!x(s),children:e.jsx(ue,{size:14})}),e.jsx("button",{onClick:()=>J(s),className:`p-1.5 rounded hover:bg-surface-2 disabled:opacity-30 ${s.isActive?"text-gray-400 hover:text-amber-400":"text-gray-400 hover:text-emerald-400"}`,title:s.isActive?"Disable user":"Enable user",disabled:j(s)||!x(s),children:s.isActive?e.jsx(P,{size:14}):e.jsx(z,{size:14})}),e.jsx("button",{onClick:()=>G(s),className:"p-1.5 rounded hover:bg-surface-2 text-gray-400 hover:text-red-400 disabled:opacity-30",title:"Delete user",disabled:s.id===(t==null?void 0:t.id)||j(s)||!x(s),children:e.jsx(he,{size:14})})]})})]},s.id))})]})}),n&&N.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:o}),e.jsxs("div",{className:"relative bg-surface-1 rounded-xl border border-white/10 p-6 w-full max-w-md animate-fade-in",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-100",children:n==="create"?"Create User":n==="edit"?"Edit User":"Reset Password"}),e.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-surface-2 text-gray-400",children:e.jsx(be,{size:18})})]}),(n==="create"||n==="edit")&&e.jsxs("form",{onSubmit:s=>{s.preventDefault(),n==="create"?R.mutate():r&&A.mutate({id:r.id,updates:{displayName:a.displayName,email:a.email,role:a.role}})},className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:["Username ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",value:a.username,onChange:s=>d({...a,username:s.target.value}),disabled:n==="edit",className:`w-full px-3 py-2 bg-surface-2 border border-white/10 rounded-xl text-[15px] text-gray-100\r
|
|
2
2
|
focus:outline-none focus:border-brand-500/50 disabled:opacity-50`,placeholder:"username"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:["Display Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",value:a.displayName,onChange:s=>d({...a,displayName:s.target.value}),className:`w-full px-3 py-2 bg-surface-2 border border-white/10 rounded-xl text-[15px] text-gray-100\r
|
|
3
3
|
focus:outline-none focus:border-brand-500/50`,placeholder:"Display Name"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:["Email ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"email",required:!0,value:a.email,onChange:s=>d({...a,email:s.target.value}),className:`w-full px-3 py-2 bg-surface-2 border border-white/10 rounded-lg text-sm text-gray-100\r
|
|
4
4
|
focus:outline-none focus:border-brand-500/50`,placeholder:"user@example.com"})]}),n==="create"&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:["Password ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx(D,{value:a.password,onChange:s=>d({...a,password:s.target.value}),className:`w-full px-3 py-2 bg-surface-2 border border-white/10 rounded-lg text-sm text-gray-100\r
|
|
5
5
|
focus:outline-none focus:border-brand-500/50`,placeholder:"Min. 6 characters"})]}),n==="edit"&&(r==null?void 0:r.role)==="superadmin"?e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Role"}),e.jsx("p",{className:"text-xs text-gray-500 border border-white/5 rounded-lg p-2.5",children:"Super admin — the account created at setup. This role cannot be changed."})]}):e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Role"}),e.jsx("div",{className:"space-y-2",children:pe.filter(s=>C||s.value!=="admin"||(r==null?void 0:r.role)==="admin").map(s=>{const U=!C&&(r==null?void 0:r.role)==="admin";return e.jsxs("label",{className:`flex items-center gap-3 p-2.5 rounded-lg border transition-colors
|
|
6
6
|
${U?"cursor-not-allowed opacity-60":"cursor-pointer"}
|
|
7
7
|
${a.role===s.value?"border-brand-500/50 bg-brand-500/5":"border-white/5 hover:border-white/10"}`,children:[e.jsx("input",{type:"radio",name:"role",value:s.value,checked:a.role===s.value,disabled:U,onChange:()=>d({...a,role:s.value}),className:"accent-brand-500"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm text-gray-200",children:s.label}),e.jsx("p",{className:"text-xs text-gray-500",children:s.description})]})]},s.value)})})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{type:"button",onClick:o,className:"px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 rounded-lg hover:bg-surface-2",children:"Cancel"}),e.jsxs("button",{type:"submit",disabled:R.isPending||A.isPending,className:`flex items-center gap-2 px-5 py-2.5 bg-brand-600 hover:bg-brand-500 text-white text-[15px] font-medium rounded-xl\r
|
|
8
|
-
disabled:opacity-50 transition-colors`,children:[e.jsx(M,{size:14}),n==="create"?"Create":"Save"]})]})]}),n==="reset-password"&&r&&e.jsxs("form",{onSubmit:s=>{s.preventDefault(),E.mutate()},className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["Set a new password for ",e.jsx("span",{className:"text-gray-200 font-medium",children:r.username})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"New Password"}),e.jsx(D,{value:k,onChange:s=>
|
|
8
|
+
disabled:opacity-50 transition-colors`,children:[e.jsx(M,{size:14}),n==="create"?"Create":"Save"]})]})]}),n==="reset-password"&&r&&e.jsxs("form",{onSubmit:s=>{s.preventDefault(),E.mutate()},className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["Set a new password for ",e.jsx("span",{className:"text-gray-200 font-medium",children:r.username})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"New Password"}),e.jsx(D,{value:k,onChange:s=>F(s.target.value),className:`w-full px-3 py-2 bg-surface-2 border border-white/10 rounded-xl text-[15px] text-gray-100\r
|
|
9
9
|
focus:outline-none focus:border-brand-500/50`,placeholder:"Min. 6 characters",autoFocus:!0})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{type:"button",onClick:o,className:"px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 rounded-lg hover:bg-surface-2",children:"Cancel"}),e.jsxs("button",{type:"submit",disabled:E.isPending||k.length<6,className:`flex items-center gap-2 px-5 py-2.5 bg-brand-600 hover:bg-brand-500 text-white text-[15px] font-medium rounded-xl\r
|
|
10
|
-
disabled:opacity-50 transition-colors`,children:[e.jsx(L,{size:14}),"Reset Password"]})]})]})]})]}),document.body),i&&N.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[70] flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>g(null)}),e.jsxs("div",{className:"relative z-10 bg-surface-1 rounded-xl border border-white/10 shadow-2xl w-full max-w-md mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 border-b border-white/5",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center shrink-0 ${i.isActive?"bg-amber-500/10":"bg-emerald-500/10"}`,children:i.isActive?e.jsx(P,{size:20,className:"text-amber-400"}):e.jsx(z,{size:20,className:"text-emerald-400"})}),e.jsx("h3",{className:"text-base font-semibold text-gray-100",children:i.isActive?"Disable User":"Enable User"})]}),e.jsx("div",{className:"px-6 py-4",children:e.jsx("p",{className:"text-sm text-gray-300",children:i.isActive?e.jsxs(e.Fragment,{children:["Are you sure you want to disable ",e.jsxs("strong",{className:"text-gray-100",children:['"',i.displayName,'"']}),"? They will not be able to log in and all active sessions will be revoked."]}):e.jsxs(e.Fragment,{children:["Are you sure you want to re-enable ",e.jsxs("strong",{className:"text-gray-100",children:['"',i.displayName,'"']}),"? They will be able to log in again."]})})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-white/5",children:[e.jsx("button",{onClick:()=>g(null),className:"px-4 py-2 text-sm text-gray-400 hover:text-gray-200 transition-colors rounded-lg",children:"Cancel"}),e.jsx("button",{onClick:
|
|
10
|
+
disabled:opacity-50 transition-colors`,children:[e.jsx(L,{size:14}),"Reset Password"]})]})]})]})]}),document.body),i&&N.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[70] flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>g(null)}),e.jsxs("div",{className:"relative z-10 bg-surface-1 rounded-xl border border-white/10 shadow-2xl w-full max-w-md mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 border-b border-white/5",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center shrink-0 ${i.isActive?"bg-amber-500/10":"bg-emerald-500/10"}`,children:i.isActive?e.jsx(P,{size:20,className:"text-amber-400"}):e.jsx(z,{size:20,className:"text-emerald-400"})}),e.jsx("h3",{className:"text-base font-semibold text-gray-100",children:i.isActive?"Disable User":"Enable User"})]}),e.jsx("div",{className:"px-6 py-4",children:e.jsx("p",{className:"text-sm text-gray-300",children:i.isActive?e.jsxs(e.Fragment,{children:["Are you sure you want to disable ",e.jsxs("strong",{className:"text-gray-100",children:['"',i.displayName,'"']}),"? They will not be able to log in and all active sessions will be revoked."]}):e.jsxs(e.Fragment,{children:["Are you sure you want to re-enable ",e.jsxs("strong",{className:"text-gray-100",children:['"',i.displayName,'"']}),"? They will be able to log in again."]})})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-white/5",children:[e.jsx("button",{onClick:()=>g(null),className:"px-4 py-2 text-sm text-gray-400 hover:text-gray-200 transition-colors rounded-lg",children:"Cancel"}),e.jsx("button",{onClick:V,className:`px-4 py-2 text-sm font-medium text-white rounded-lg transition-colors ${i.isActive?"bg-amber-600 hover:bg-amber-500":"bg-emerald-600 hover:bg-emerald-500"}`,children:i.isActive?"Disable User":"Enable User"})]})]})]}),document.body),b&&N.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[70] flex items-center justify-center","data-testid":"reset-two-factor-dialog",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>f(null)}),e.jsxs("div",{className:"relative z-10 bg-surface-1 rounded-xl border border-white/10 shadow-2xl w-full max-w-md mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 border-b border-white/5",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-amber-500/10 flex items-center justify-center shrink-0",children:e.jsx(K,{size:20,className:"text-amber-400"})}),e.jsx("h3",{className:"text-base font-semibold text-gray-100",children:"Reset two-factor authentication"})]}),e.jsxs("div",{className:"px-6 py-4 space-y-2",children:[e.jsxs("p",{className:"text-sm text-gray-300",children:["Turn off two-factor authentication for ",e.jsx("strong",{className:"text-gray-100",children:b.displayName})," (@",b.username,")?"]}),e.jsxs("p",{className:"text-xs text-gray-500",children:["Use this when they lost their phone and their recovery codes. Their authenticator entry, recovery codes and trusted browsers stop working.",b.twoFactorRequired?" The workspace requires two-factor authentication, so they set it up again at their next sign-in.":" They sign in with their password only until they turn it on again."," ","If email is set up, they are told by email."]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-white/5",children:[e.jsx("button",{onClick:()=>f(null),className:"px-4 py-2 text-sm text-gray-400 hover:text-gray-200 transition-colors rounded-lg",children:"Cancel"}),e.jsx("button",{onClick:()=>T.mutate(b.id),disabled:T.isPending,className:"px-4 py-2 text-sm font-medium text-white bg-amber-600 hover:bg-amber-500 rounded-lg transition-colors disabled:opacity-50",children:"Reset 2FA"})]})]})]}),document.body),h&&N.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[70] flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>y(null)}),e.jsxs("div",{className:"relative z-10 bg-surface-1 rounded-xl border border-white/10 shadow-2xl w-full max-w-md mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 border-b border-white/5",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-red-500/10 flex items-center justify-center shrink-0",children:e.jsx(q,{size:20,className:"text-red-400"})}),e.jsx("h3",{className:"text-base font-semibold text-gray-100",children:"Delete User"})]}),e.jsxs("div",{className:"px-6 py-4",children:[e.jsxs("p",{className:"text-sm text-gray-300",children:["Are you sure you want to permanently delete ",e.jsxs("strong",{className:"text-gray-100",children:['"',h.displayName,'"']})," (@",h.username,")?"]}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"This action cannot be undone. The user will be permanently removed along with all their sessions."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-white/5",children:[e.jsx("button",{onClick:()=>y(null),className:"px-4 py-2 text-sm text-gray-400 hover:text-gray-200 transition-colors rounded-lg",children:"Cancel"}),e.jsx("button",{onClick:H,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-500 rounded-lg transition-colors",children:"Delete Permanently"})]})]})]}),document.body)]})]})}export{ke as UserManagementPage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as e,n as Ma}from"./vendor-react-
|
|
1
|
+
import{r,j as e,n as Ma}from"./vendor-react-DOVfxdUy.js";import{f as wt,a as Oa}from"./formatDate-T65-Y6Mi.js";import{u as la}from"./useTabParam-CyYAP90W.js";import{ab as Ta,g2 as Aa,g3 as Da,ac as Pa,g4 as gs,g5 as bs,g6 as ys,g7 as La,g8 as Ra,g9 as Wa,ga as Ya,gb as Fa,gc as _a,gd as Xa,ge as Ha,gf as Ua,gg as Ba,gh as is,gi as Ga,b as Va,gj as Wt,gk as Rs,gl as Ae,gm as Ka,gn as Ja,go as Za,gp as qa,gq as Qa,gr as er,gs as tr,gt as sr}from"./index-D6sQYc_0.js";import{b3 as Ct,a4 as He,as as St,ac as zt,Z as Re,da as $t,G as Et,a7 as Je,bx as Ze,b2 as qe,a2 as kt,cT as ia,b7 as lt,a0 as be,ag as Se,X as he,db as oa,ba as ca,u as ke,b4 as Ie,aX as ar,aW as rr,aU as nr,an as lr,dc as ir,dd as or,ah as Xe,av as cr,cf as dr,v as ot,b0 as xr,b6 as da,o as Ne,al as Ws,y as Ee,t as Ce,cR as Yt,cn as _e,cm as xa,b8 as os,bS as ur,a_ as fs,C as js,ap as mr,c as qt,bc as Qt,S as nt,f as vt,cH as Ys,cI as Fs,cW as ua,R as pr,ct as _s,bO as hr,a5 as fr,aJ as gr,b as ma,cd as br,D as yr,bd as Ft,E as jr,c7 as cs,bA as Nr,aa as vr,by as Xs,a3 as ds,cz as wr}from"./vendor-icons-D_Dmmj8d.js";import{A as Ns}from"./AIStreamUI-p_sMTEDQ.js";import{R as bt,j as kr,h as _t,X as Xt,Y as Ht,T as yt,L as Cr,k as Sr,A as zr,B as Hs,l as Us,P as $r,m as Er,n as Ir}from"./vendor-charts-By5uZ93z.js";import"./vendor-query-DkZSMtfn.js";function it(t){return t.type?t.type:t.skill?"skill":t.tool||t.command?"tool":t.mcp?"mcp":t.if!==void 0?"condition":t.forEach?"loop":t.parallelSteps?"parallel":t.message&&!t.skill&&!t.tool&&!t.mcp?"checkpoint":t.waitSeconds!==void 0?"delay":t.workflowId?"subworkflow":t.script?"script":"tool"}const Me={skill:{label:"Skill",iconName:"Brain",description:"Invoke a skill with LLM reasoning",category:"actions",color:"purple",bgClass:"bg-purple-500/15",borderClass:"border-purple-500/30",textClass:"text-purple-400",accentColor:"#a855f7"},tool:{label:"Tool",iconName:"Wrench",description:"Call a built-in tool directly",category:"actions",color:"cyan",bgClass:"bg-cyan-500/15",borderClass:"border-cyan-500/30",textClass:"text-cyan-400",accentColor:"#22d3ee"},mcp:{label:"MCP",iconName:"Plug",description:"Call an MCP server tool",category:"actions",color:"emerald",bgClass:"bg-emerald-500/15",borderClass:"border-emerald-500/30",textClass:"text-emerald-400",accentColor:"#34d399"},condition:{label:"Condition",iconName:"GitBranch",description:"If/else branching logic",category:"flow",color:"amber",bgClass:"bg-amber-500/15",borderClass:"border-amber-500/30",textClass:"text-amber-400",accentColor:"#f59e0b"},loop:{label:"Loop",iconName:"Repeat",description:"Iterate over a list",category:"flow",color:"blue",bgClass:"bg-blue-500/15",borderClass:"border-blue-500/30",textClass:"text-blue-400",accentColor:"#3b82f6"},parallel:{label:"Parallel",iconName:"Zap",description:"Run steps concurrently",category:"flow",color:"yellow",bgClass:"bg-yellow-500/15",borderClass:"border-yellow-500/30",textClass:"text-yellow-400",accentColor:"#eab308"},checkpoint:{label:"Checkpoint",iconName:"ShieldCheck",description:"Pause for human approval",category:"utilities",color:"orange",bgClass:"bg-orange-500/15",borderClass:"border-orange-500/30",textClass:"text-orange-400",accentColor:"#f97316"},delay:{label:"Delay",iconName:"Timer",description:"Wait for duration or condition",category:"utilities",color:"gray",bgClass:"bg-gray-500/15",borderClass:"border-gray-500/30",textClass:"text-gray-400",accentColor:"#6b7280"},subworkflow:{label:"Sub-Workflow",iconName:"Workflow",description:"Embed another workflow",category:"utilities",color:"pink",bgClass:"bg-pink-500/15",borderClass:"border-pink-500/30",textClass:"text-pink-400",accentColor:"#ec4899"},script:{label:"Script",iconName:"FileCode",description:"Run custom JavaScript",category:"actions",color:"teal",bgClass:"bg-teal-500/15",borderClass:"border-teal-500/30",textClass:"text-teal-400",accentColor:"#14b8a6"}},xs=260,Bs=80,us=50,Mr=80,Ut=60;function Or(t){if(t.length===0)return{nodes:[],edges:[],width:0,height:0};const s=new Map(t.map(l=>[l.id,l])),n=new Map;function o(l,M=new Set){if(n.has(l))return n.get(l);if(M.has(l))return 0;M.add(l);const h=s.get(l);if(!(h!=null&&h.dependsOn)||h.dependsOn.length===0)return n.set(l,0),0;const u=Math.max(...h.dependsOn.map(D=>s.has(D)?o(D,M)+1:0));return n.set(l,u),u}for(const l of t)o(l.id);const w=new Map;for(const[l,M]of n)w.has(M)||w.set(M,[]),w.get(M).push(l);const j=Math.max(...n.values(),0),d=[];for(let l=0;l<=j;l++){const M=w.get(l)??[];M.length*(xs+us)-us;const h=Ut;M.forEach((u,D)=>{const O=s.get(u);d.push({id:u,step:O,x:h+D*(xs+us),y:Ut+l*(Bs+Mr),width:xs,height:Bs,layer:l,column:D})})}const $=new Map(d.map(l=>[l.id,l])),I=[];for(const l of t)if(l.dependsOn)for(const M of l.dependsOn){const h=$.get(M),u=$.get(l.id);h&&u&&I.push({from:M,to:l.id,fromX:h.x+h.width/2,fromY:h.y+h.height,toX:u.x+u.width/2,toY:u.y})}const E=Math.max(...d.map(l=>l.x+l.width),0)+Ut,k=Math.max(...d.map(l=>l.y+l.height),0)+Ut;return{nodes:d,edges:I,width:E,height:k}}function ms(t){switch(t){case"completed":return{bg:"bg-emerald-500/15",text:"text-emerald-400",border:"border-emerald-500/30"};case"running":return{bg:"bg-cyan-500/15",text:"text-cyan-400",border:"border-cyan-500/30"};case"failed":return{bg:"bg-red-500/15",text:"text-red-400",border:"border-red-500/30"};case"skipped":return{bg:"bg-gray-500/15",text:"text-gray-400",border:"border-gray-500/30"};case"waiting":return{bg:"bg-amber-500/15",text:"text-amber-400",border:"border-amber-500/30"};case"pending":return{bg:"bg-surface-2",text:"text-gray-500",border:"border-white/5"};default:return{bg:"bg-surface-2",text:"text-gray-500",border:"border-white/5"}}}function je(t){if(t<1e3)return`${t}ms`;if(t<6e4)return`${(t/1e3).toFixed(1)}s`;const s=Math.floor(t/6e4),n=Math.round(t%6e4/1e3);return`${s}m ${n}s`}const Tr={Brain:qe,Wrench:Ze,Plug:Je,GitBranch:Et,Repeat:$t,Zap:Re,ShieldCheck:zt,Timer:St,Workflow:He,FileCode:Ct};function Ar({node:t,selected:s,stepStatus:n,stepDuration:o,onClick:w,onDelete:j,onToggleDisable:d,onExecuteStep:$,readOnly:I,isConnecting:E,isDragging:k,onDragStart:l}){const[M,h]=r.useState(!1),u=it(t.step),D=Me[u],O=n||"pending",c=O==="running",z=O==="completed",C=O==="failed",L=O==="skipped",m=O==="waiting",g=!!t.step.disabled,F=t.step.description||t.step.action||t.step.command||t.step.skill||t.step.tool||t.step.mcp||t.id,V=F.length>30?F.slice(0,27)+"...":F,N=Tr[D.iconName],U=C?"#ef4444":z?"#34d399":c?"#22d3ee":D.accentColor;return e.jsx("div",{className:`absolute ${k?"z-50":""}`,style:{left:t.x,top:t.y,width:t.width,height:t.height,opacity:k?.85:void 0,cursor:k?"grabbing":void 0},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1)},children:e.jsxs("div",{className:"relative",children:[M&&!I&&!E&&e.jsxs("div",{className:"absolute z-20 flex items-center gap-0.5 bg-surface-1 border border-white/10 rounded-lg p-0.5 shadow-lg shadow-black/30",style:{animation:"fadeIn 0.15s ease-out",top:-4,right:-4},onMouseDown:v=>v.stopPropagation(),children:[$&&e.jsx("button",{onClick:v=>{v.stopPropagation(),$(t.id)},className:"p-1 rounded hover:bg-emerald-500/20 text-gray-400 hover:text-emerald-400 transition-colors",title:"Execute step",children:e.jsx(kt,{size:12})}),d&&e.jsx("button",{onClick:v=>{v.stopPropagation(),d(t.id)},className:`p-1 rounded hover:bg-amber-500/20 transition-colors ${g?"text-amber-400":"text-gray-400 hover:text-amber-400"}`,title:g?"Enable step":"Disable step",children:e.jsx(ia,{size:12})}),j&&e.jsx("button",{onClick:v=>{v.stopPropagation(),j(t.id)},className:"p-1 rounded hover:bg-red-500/20 text-gray-400 hover:text-red-400 transition-colors",title:"Delete step",children:e.jsx(lt,{size:12})})]}),e.jsx("div",{onMouseDown:v=>{l&&!I&&l(t.id,v)},style:{height:t.height,borderColor:k||s?void 0:U,borderWidth:"1px"},className:`w-full flex rounded-xl overflow-hidden transition-all duration-150
|
|
2
2
|
${k?"ring-2 ring-cyan-400/60 !border-cyan-500/50 shadow-2xl shadow-cyan-500/20 cursor-grabbing":l&&!I?"cursor-grab":"cursor-pointer"}
|
|
3
3
|
${!k&&s?"ring-2 ring-cyan-400/50 !border-cyan-500/50 shadow-lg shadow-cyan-500/10":!k&&M?"shadow-lg shadow-black/30":k?"":"shadow-md shadow-black/20"}
|
|
4
4
|
${c?"wf-node-running":""}
|
package/src/ui/static/assets/{hiddenLlmProviders-CdhhNa5G.js → hiddenLlmProviders-DzwaR-b9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./vendor-react-
|
|
1
|
+
import{j as a}from"./vendor-react-DOVfxdUy.js";import{er as s}from"./index-D6sQYc_0.js";import{b2 as e}from"./vendor-icons-D_Dmmj8d.js";function i({provider:t,size:l=16}){const c=typeof document<"u"&&!document.documentElement.classList.contains("light");switch(t){case"openai":return a.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"#10A37F",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071.005l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071-.006l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.661zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"})});case"anthropic":return a.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"#D97757",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.257 0h3.603L16.744 20.48h-3.603L6.57 3.52zM0 20.48h3.603L7.173 9.14l-1.74-4.49L0 20.48z"})});case"google":return a.jsxs("svg",{width:l,height:l,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#4285F4"}),a.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#g-grad-0)"}),a.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#g-grad-1)"}),a.jsxs("defs",{children:[a.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"g-grad-0",x1:"7",x2:"11",y1:"15.5",y2:"12",children:[a.jsx("stop",{stopColor:"#08B962"}),a.jsx("stop",{offset:"1",stopColor:"#08B962",stopOpacity:0})]}),a.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"g-grad-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11",children:[a.jsx("stop",{stopColor:"#F94543"}),a.jsx("stop",{offset:"1",stopColor:"#F94543",stopOpacity:0})]})]})]});case"xai":return a.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"#F55036",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"})});case"ollama":return a.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:c?"#FFFFFF":"#000000",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"})});case"testver":return a.jsx("span",{style:{width:l,height:l,display:"inline-block"},children:a.jsx(s,{className:"w-full h-full object-contain"})});case"lmstudio":return a.jsxs("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"#6C63FF",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M2.84 2a1.273 1.273 0 100 2.547h14.107a1.273 1.273 0 100-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H22.04a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h14.106a1.274 1.274 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H15.38a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h14.106a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h9.698a1.273 1.273 0 100-2.547h-9.698z",fillOpacity:"0.3"}),a.jsx("path",{d:"M2.84 2a1.273 1.273 0 100 2.547h10.287a1.274 1.274 0 000-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H18.22a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H11.56a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h5.78a1.273 1.273 0 100-2.547h-5.78z"})]});default:return a.jsx(e,{size:l})}}const n=new Set(["openai","anthropic","google","xai"]);export{n as H,i as P};
|