PageSourceSearch

https://featherless.ai/_nuxt/TBMhwzX2.js

js featherless.ai collected 2026-10-02 04:17:33 UTC 3,893 bytes, 1 lines download raw bytes

1import{P as z,eT as F,eH as Y,bJ as B,fD as M,aW as x,u as P,bK as i,r as m,fE as b,aN as J,y as s,M as p,eJ as K,L as u,bd as w,bm as $,eP as T,eK as S,eS as L}from"./dEDPT-Uz.js";import{_ as R}from"./DdBURpvi.js";import{_ as q}from"./CHZyei1h.js";import{_ as H}from"./hU3iu6qM.js";import{a as O,c as U,_ as W,b as j}from"./BYT7_IKY.js";import{r as G}from"./BeeT8aOf.js";import"./1Fh_g1AI.js";import"./CPWHIdlp.js";import"./CncbQRJV.js";import"./BtTMRrtZ.js";import"./ML7pnZSW.js";import"./YPf3taQ0.js";import"./BHP1h-30.js";import"./Dw1IoM2_.js";import"./Chb-i8kd.js";import"./3epjO1mJ.js";import"./CAfxP78f.js";import"./Ba2_rzVF.js";import"./BCmzbhQa.js";import"./WAtr3iJS.js";import"./B4yjbBGj.js";import"./7dnsc6hK.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="aef1e3dd-0ba5-4199-b03a-1015c0c70202",n._sentryDebugIdIdentifier="sentry-dbid-aef1e3dd-0ba5-4199-b03a-1015c0c70202")}catch{}const Q={class:"flex gap-3 flex-wrap"},X={class:"flex flex-wrap flex-col grow"},Z={class:"text-xs text-content-secondary flex gap-0.5 items-center"},ee={class:"text-xl font-semibold max-w-lg"},Te=z({__name:"edit",async setup(n){let o,v;const h=F(),d=Y();G();const a=m(()=>String(h.params.slug)),[{data:l,error:A},{data:_}]=([o,v]=B(()=>Promise.all([b(()=>`internal-app-${a.value}`,()=>d.organizations.apps.get(a.value),"$OvTzly400p"),b(()=>`internal-app-yaml-${a.value}`,()=>d.organizations.apps.getYaml(a.value).catch(()=>null),"$wr5zD87is-")])),o=await o,v(),o);if(A.value||!l.value)throw M({statusCode:404,statusMessage:"Agent not found"});const C=m(()=>l.value?.latestTemplate?.tag??null),c=m(()=>{const r=l.value?.latestTemplate?.appVersion;if(!r)return"v1.0.0";const e=r.split(".");if(e.length!==3)return`v${r}`;const t=parseInt(e[2],10);return isNaN(t)?`v${r}`:`v${e[0]}.${e[1]}.${t+1}`}),D=m(()=>c.value.replace(/^v/,"")),y=x(_.value?.yaml?O(a.value,_.value.yaml):U(l.value)),f=x(!1);async function E({state:r,iconBase64:e}){f.value=!0;try{const t=await d.organizations.apps.update(a.value,{yaml:j(r,D.value),iconBase64:typeof e=="string"?e:void 0});T({title:"Agent updated",description:`Saved as ${t.latestTemplate?.tag??c.value}.`,variant:"success"}),await S(`/account/agents/apps/${a.value}`)}catch(t){const g=t instanceof L?t.data?.message??t.message:"Failed to save agent";T({title:"Save failed",description:g,variant:"destructive",duration:1e4})}finally{f.value=!1}}function V(){S(`/account/agents/apps/${a.value}`)}return(r,e)=>{const t=K,g=R,k=q,I=H;return J(),P(I,{class:"space-y-6"},{default:i(()=>[s("header",Q,[s("div",X,[s("div",Z,[p(t,{to:"/account/agents",class:"hover:underline"},{default:i(()=>[...e[1]||(e[1]=[u(" Agents ",-1)])]),_:1}),e[3]||(e[3]=s("span",{class:"mx-1"},"/",-1)),p(t,{to:"/account/agents/marketplace",class:"hover:underline"},{default:i(()=>[...e[2]||(e[2]=[u(" Marketplace ",-1)])]),_:1}),e[4]||(e[4]=s("span",{class:"mx-1"},"/",-1)),p(t,{to:`/account/agents/apps/${a.value}`,class:"hover:underline"},{default:i(()=>[u(w($(l)?.name??a.value),1)]),_:1},8,["to"]),e[5]||(e[5]=s("span",{class:"mx-1"},"/",-1)),e[6]||(e[6]=u(" Edit ",-1))]),s("h1",ee," Edit "+w($(l)?.name??a.value),1)])]),p(k,null,{default:i(()=>[p(g,{class:"p-6 text-sm space-y-2 text-content-secondary"},{default:i(()=>[...e[7]||(e[7]=[s("p",null,[u(" Saving commits a new "),s("code",null,"app.yaml"),u(" and tag to your repo. Running sandboxes on the previous version keep running — they're tied to the tag they launched from. ")],-1)])]),_:1})]),_:1}),p(W,{modelValue:y.value,"onUpdate:modelValue":e[0]||(e[0]=N=>y.value=N),mode:"edit",submitting:f.value,"current-tag":C.value??void 0,"next-tag":c.value,onSubmit:E,onCancel:V},null,8,["modelValue","submitting","current-tag","next-tag"])]),_:1})}}});
1export{Te 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.