PageSourceSearch

https://jitera.ai/assets/index-clcBTW1g.js

js jitera.ai collected 2026-10-05 13:47:35 UTC 10,089 bytes, 1 lines download raw bytes

1import{u as q,j as e,e as Y,a as Z,r as A,b as J}from"./react-router-vendor-C1eXCCJq.js";import{m as Q,a as I,av as U,B as v,by as k,gA as j,gB as y,Y as ee,ao as M,aw as E,ag as te,d7 as ae,am as oe}from"./index-DGeutESm.js";import{C as se}from"./confirm-dialog-B2ASTQEd.js";import{O as p}from"./overview-list-item-B6FO6Oq5.js";import{S as _}from"./skeleton-DlbQ77Lz.js";import{U as ne,u as re,A as ie}from"./upload-agent-icon-CVay-g2c.js";import{u as le}from"./use-update-agent-model-Bmzc3Bw4.js";import{u as me,A as ce}from"./use-generate-app-data-ByKb7Q6S.js";import{u as de}from"./use-agent-apps-C10WSbZ8.js";import{u as pe}from"./use-oauth-redirect-resume-lxH5A0Ck.js";import"./image-dot-display-canvas-BaHslVVB.js";import{u as ue}from"./use-project-CdzGlcW_.js";import{I as z}from"./input-DWz_ASGw.js";import{C as ge}from"./chat-agent-model-selector-CWj8gs0B.js";import{u as fe}from"./use-permissions-f_UTcO4p.js";import{u as xe}from"./use-automations-B0h0d2Rr.js";import{C as he}from"./index.esm-eW0W5_6z.js";import{D as Ae,b as je}from"./dialog-BBz3j44a.js";import{L as T}from"./label-DXCtnOjP.js";import{u as ve}from"./use-agent-form-DWmI5EFH.js";import{C as Ne}from"./chevron-right-Bg8ISQ4l.js";import{u as Ce}from"./use-boost-workflows-Bc_Mt6Ih.js";import"./graphql-vendor-C7dkimgf.js";import"./effect-vendor-Bu2WJVca.js";import"./index-G1ZKUv16.js";import"./agent-icon-DKCPYh5q.js";import"./expandable-text-DtO-L83K.js";import"./truncated-tooltip-Ae2SS0Mi.js";import"./tooltip-BcVjjbUq.js";import"./index-DnB4reBa.js";import"./index-Ccz-94Ln.js";import"./index-zdegFVI4.js";import"./index-BGxYwIjB.js";import"./index-CuBUOxlK.js";import"./index-uWWQsitp.js";import"./index-Hnxb5FzS.js";import"./upload-avatar-buJoTl1J.js";import"./avvvatars-react.esm-CSGGS0mw.js";import"./avatar-BPocB0PB.js";import"./pencil-BPA4Dipn.js";import"./agent-transformers-59x3fAhs.js";import"./index-6jp0qIn8.js";import"./list-load-error-PnfOi1Nz.js";import"./triangle-alert-CW19wSCa.js";import"./rotate-cw-q3J3__Q9.js";import"./permission-gated-button-3Ybrfisu.js";import"./badge-_8vqx0uK.js";import"./loading-BzbPtzBZ.js";import"./add-app-modal-BxPrIUNV.js";import"./tabs-ByWELhVO.js";import"./index-C2Xt_Me1.js";import"./index-Cs35k95E.js";import"./index-C9rtdgo3.js";import"./index-DKi6hC25.js";import"./spinner-BVZ1ZVBW.js";import"./settings-card-Csje9cDB.js";import"./search-j2n75f1Z.js";import"./plus-wvQlIbwJ.js";import"./custom-app-form-UeqKXyMJ.js";import"./url-utils-CEuNt_Zj.js";import"./use-copy-CTsKryN4.js";import"./zod-BJEWpDir.js";import"./trash-2-Ctw6w5aj.js";import"./errors-B0ttkalA.js";import"./use-integrations-BvhUiJz2.js";import"./types-BhR1gl41.js";import"./use-effect-action-BFwstJni.js";import"./errors-DKXDhs1n.js";import"./use-debounce-DCHsjRUc.js";import"./use-infinite-scroll-Twfh4W9A.js";import"./agent-app-name-DpveE6Io.js";import"./feature-restricted-context-5gsbfUNN.js";import"./index-Cdt1cVbS.js";import"./index-BDZbAJ4b.js";import"./index-ykBNMfdz.js";import"./upgrade-plan-alert-zVi5xTAs.js";import"./alert-DxHsS0ik.js";import"./enable-on-demand-dialog-B4cvzpC9.js";import"./pricing-modal-CeAAbnwS.js";import"./billing-service-BQRO6WUu.js";import"./use-credit-balance-D94iTmPE.js";import"./use-credit-warning-state-CICkR8jf.js";import"./use-billing-portal-session-d2mbsqIE.js";import"./use-upgrade-subscription-plan-CFmFn9Kv.js";import"./lock-AIgqAP0m.js";import"./check-B2PX-AQh.js";import"./use-model-selector-DkEDyB8L.js";import"./boost-layer-BOsMJ-8S.js";const be=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],we=Q("zap",be);function ye({projectSlug:m,projectUuid:i,agentId:n}){const{t:o}=I(),t=q(),{automations:c,loading:d}=xe(i,n),u=()=>{t({to:"/p/$projectSlug/settings/agent/automation",params:{projectSlug:m},search:{a:n}})},g=d?void 0:c.length===0?o("agent.automations_summary_empty"):o("agent.automations_summary_count",{count:c.length});return e.jsxs("div",{className:"w-full flex flex-col",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:o("agent.automations_summary_title")}),e.jsx("div",{className:"pt-4",children:e.jsx(p.Container,{className:"shadow-xs border border-foreground
1/5 bg-background/80",children:e.jsx(p,{icon:e.jsx("div",{className:"flex items-center justify-center size-8 rounded-full bg-muted",children:e.jsx(we,{className:"size-3.5 text-muted-foreground"})}),title:o("agent.automations_summary_title"),description:g,descriptionClassName:"truncate text-xs",trailingContent:d?e.jsx(U,{className:"size-4 animate-spin text-muted-foreground"}):e.jsx(v,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:u,children:o("agent.automations_summary_manage")})})})})]})}function _e({agentId:m,open:i,onOpenChange:n}){const{t:o}=I(),{agents:t}=k(),c=t[m],{form:d,handleSubmit:u,handleCancel:g,isLoading:s}=ve({mode:"edit",agentId:m}),{register:h,formState:N,control:C}=d,{isDirty:x,isValid:l}=N,f=()=>{g(),n(!1)},b=async()=>{await d.handleSubmit(async a=>{await u(a),n(!1)})()};return e.jsx(Ae,{open:i,onOpenChange:a=>!a&&!s&&f(),children:e.jsx(je,{className:"p-6 gap-6 max-w-md z-[60] rounded-3xl",overlayClassName:"z-[60]",closeButtonClassName:"focus:outline-none focus:ring-0 focus:ring-offset-0",showCloseButton:!s,onInteractOutside:a=>{s&&a.preventDefault()},onEscapeKeyDown:a=>{s&&a.preventDefault()},children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx(he,{name:"avatar",control:C,render:({field:a})=>e.jsx(ne,{value:a.value,onChange:a.onChange,imageUrl:c?.avatarUrl,imageId:c?.avatarId})})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(T,{htmlFor:"agent-name",className:"text-muted-foreground",children:o("chat.agent_name")}),e.jsx(z,{id:"agent-name",placeholder:o("chat.agent_name"),maxLength:j,className:"rounded-full",...h("name",{required:!0,maxLength:j,onChange:a=>{a.target.value.length>j&&(a.target.value=a.target.value.slice(0,j))}})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(T,{htmlFor:"agent-description",className:"text-muted-foreground",children:o("chat.agent_description")}),e.jsx(z,{id:"agent-description",placeholder:o("chat.agent_description"),maxLength:y,className:"rounded-full",...h("description",{onChange:a=>{a.target.value.length>y&&(a.target.value=a.target.value.slice(0,y))}})})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(v,{type:"button",variant:"outline",className:"rounded-full",onClick:f,disabled:s,children:o("common.cancel")}),e.jsx(v,{type:"button",variant:"default",className:"rounded-full",disabled:!x||!l||s,onClick:b,children:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"mr-2 h-4 w-4 animate-spin"}),o("common.saving")]}):o("organization.settings_modal.save_changes")})]})]})})})}function Ie({agentId:m}={}){const{t:i}=I(),{projectSlug:n,agentId:o}=Y({strict:!1}),t=m??o,{getAgents:c}=k(),{updateAgentModel:d}=le(),u=Z(),{hasPermission:g}=fe({resource:{type:ee.BoostWorkflow,boostWorkflowId:t??""},skip:!t}),s=g(M.Update),h=g(M.Destroy),{canAccess:N}=E({featureKey:"mail_app"}),{canAccess:C}=E({featureKey:"automations"}),x=c(),l=A.useMemo(()=>x.find(r=>r.id===t),[x,t]),{data:f}=ue({projectSlug:n||""}),b=l?.workflow?.values?.model??l?.modelId,a=l?.email!=null,{data:B,loading:P,refetch:O}=de({agentId:t??""}),R=B?.agentApps??[],{generateAppData:G}=me({onCompleted:()=>O()}),[W,S]=A.useState(null),F=async r=>{S(r.code),await G(t??"",r.code),S(null)},H=async r=>{t&&await d(t,r)},K=A.useCallback(r=>!n||!t?"#":u.buildLocation({to:"/p/$projectSlug/settings/agent/connectors/$appId",params:{projectSlug:n,appId:r},search:{a:t}}).href,[n,t,u]),w=te(se),[D,L]=A.useState(!1),{deleteAgent:$}=re(),V=async()=>{if(!t)return;if(await w.show({title:i("agent.delete_title"),description:i("agent.delete_description"),confirmText:i("agent.delete_confirm"),variant:"destructive",isAsyncAction:!0}))try{await $(t),w.hide()}catch{oe.error(i("agent.delete_error")),w.hide()}};pe();const X=ae(r=>r.isAddingApp);return!n||!l?null:e.jsxs("div",{className:"relative flex-1 h-full flex flex-col @container",children:[X&&e.jsx("div",{className:"fixed inset-0 z-50 bg-black/30 cursor-wait"}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-[720px] flex-col gap-6 px-4 py-6 pb-12",children:[e.jsx("div",{className:"shadow-xs border border-foreground
1/5 rounded-3xl bg-background/80 p-2",children:e.jsx(ie,{name:l.name,description:l.description,avatarUrl:l.avatarUrl,avatarId:l.avatarId,onClick:s?()=>L(!0):void 0,action:s?e.jsx(Ne,{className:"size-4 text-muted-foreground","aria-hidden":"true"}):void 0})}),e.jsx(p.Container,{className:"shadow-xs border border-foreground/5 bg-background/80",children:e.jsx(ge,{value:b,onValueChange:H,disabled:!s,renderLoading:()=>e.jsx(p,{title:"",trailingContent:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{className:"h-4 w-16"}),e.jsx(_,{className:"h-4 w-24"})]}),children:e.jsx(_,{className:"h-4 w-16 absolute left-3 top-1/2 -translate-y-1/2"})}),renderTrigger:r=>e.jsx(p,{title:i("agent.model"),trailingText:r.name,showChevron:s,showHover:s})})}),e.jsx(ce,{boostWorkflowId:l.id,projectId:f?.numericId,projectUuid:f?.uuid,agentApps:R,loading:P,hasEmail:a,generatingAppCode:W,canAddApp:s,onAddApp:F,appItemLinkBuilder:K,canAccessMailApp:N}),C&&t&&e.jsx(ye,{projectSlug:n,projectUuid:f?.uuid??void 0,agentId:t}),h&&x.length>1&&e.jsx(p.Container,{className:"shadow-xs border border-foreground
1/5 bg-background/80",children:e.jsx(p,{as:v,variant:"ghost",className:"flex h-12 w-full gap-2 rounded-2xl text-destructive hover:text-destructive",type:"button",onClick:V,children:e.jsx("span",{children:i("agent.delete_button")})})})]})}),t&&s&&D&&e.jsx(_e,{agentId:t,open:D,onOpenChange:L})]})}function ma(){const{a:m}=J({from:"/p/$projectSlug/agents/"}),{getAgents:i}=k(),{loading:n}=Ce(),o=m??(n?void 0:i()[0]?.id);return e.jsx(Ie,{agentId:o})}export{ma as component};

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.