@alook/app 0.0.1 → 0.0.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/bundled/email-worker/index.js +9 -5
- package/bundled/web/.open-next/.build/durable-objects/queue.js +4 -4
- package/bundled/web/.open-next/assets/BUILD_ID +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0.johotcqi6_q.css +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{00hhut1u6hwn6.js → 0071-212kfu1m.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0il_mcv02512i.js → 06ksvdw1qrvwk.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0a27029.-35e~.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0d7119q.u8xvu.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{08qdwj1xra2jx.js → 0eh6y91g1-0lc.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0gnzww73lhyo3.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0idrbu7e1a~hd.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{076bjy-c4b08..js → 0p7q1v_ivmnag.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0nd3e0dbrnq5i.js → 0qwgr1bo.q5v3.js} +4 -4
- package/bundled/web/.open-next/assets/_next/static/chunks/{028dxg8z6qji0.js → 0t3e2f8aogso_.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0tb03bpdj_am_.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0whmpqhfadal3.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/11~usj.s5mzti.js +3 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0-ac~bnnatk~x.js → 12oay61-cq.qw.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/130t-y.8dp~je.js +3 -0
- package/bundled/web/.open-next/cache/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/_global-error.cache +1 -1
- package/bundled/web/.open-next/cache/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/_not-found.cache +1 -1
- package/bundled/web/.open-next/cache/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/sitemap.xml.cache +1 -1
- package/bundled/web/.open-next/cloudflare/cache-assets-manifest.sql +1 -1
- package/bundled/web/.open-next/cloudflare/init.js +1 -1
- package/bundled/web/.open-next/dynamodb-provider/dynamodb-cache.json +1 -1
- package/bundled/web/.open-next/middleware/handler.mjs +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/BUILD_ID +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/build-manifest.json +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/invite/[token]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/studio/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/activity/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/[convId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/email/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/files/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/meetings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/calendar/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/help/email-setup/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/home/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/issues/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/runtimes/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/[traceId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/unread/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/workspaces/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/0b5f_next_dist_esm_build_templates_app-route_08rz-qa.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0ibtxgc._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0mexljd._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0.foxln._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_038.hft._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0d0a35l._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0fq1zoa._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0grgpqw._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0h5jww9._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0ufmel3._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0vhi1.k._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0yeokgf._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_studio_new_client_tsx_0zandi2._.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_home_page_tsx_0lkx78f._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_settings_page_tsx_0fdcupy._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_workspace-shell_tsx_0479plk._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_lib_templates_index_ts_13n9_2e._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-build-manifest.js +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +18 -18
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +215 -197
- package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +2 -2
- package/dist/index.js +14 -12
- package/package.json +5 -2
- package/bundled/web/.open-next/assets/_next/static/chunks/07xq7yw.r_ik6.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/086ly6x4sipjy.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0hk6-z1a4kq.1.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0iwzwcvjl~190.js +0 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/0lxa14d_o098o.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0nykvgip8dwr..js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0py48kb~gy1yv.css +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0rtp9qz2346v9.js +0 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/0~wu41ykjx3ud.js +0 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_08.z.g0._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_08wm2-0._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0aao.99._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0e2t1n5._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0lz_8zr._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0pp~l23._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_13_029z._.js +0 -3
- /package/bundled/web/.open-next/assets/_next/static/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/_buildManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/_clientMiddlewareManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/_ssgManifest.js +0 -0
- /package/bundled/web/.open-next/cache/{36j5LIYm2caTV9Ksu2QBr → YGJyWNUCWhOqpFg-fDYKo}/robots.txt.cache +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[527779,a=>{"use strict";let b=(0,a.i(790090).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",0,b],527779)},22902,a=>{"use strict";var b=a.i(749314),c=a.i(432340),d=a.i(732254);a.s(["ConfirmDialog",0,function({open:a,onOpenChange:e,title:f,description:g,confirmLabel:h="Remove",loadingLabel:i,confirmVariant:j="destructive",loading:k=!1,onConfirm:l}){return(0,b.jsx)(c.Dialog,{open:a,onOpenChange:e,children:(0,b.jsxs)(c.DialogContent,{showCloseButton:!1,children:[(0,b.jsxs)(c.DialogHeader,{children:[(0,b.jsx)(c.DialogTitle,{children:f}),(0,b.jsx)(c.DialogDescription,{children:g})]}),(0,b.jsxs)(c.DialogFooter,{children:[(0,b.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>e(!1),disabled:k,children:"Cancel"}),(0,b.jsx)(d.Button,{variant:j,size:"sm",onClick:l,disabled:k,children:k?i??`${h}...`:h})]})]})})}])},439882,a=>{"use strict";var b=a.i(749314),c=a.i(75118);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})},"CardAction",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-action",className:(0,c.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...d})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},74414,a=>{"use strict";var b=a.i(749314),c=a.i(385539);function d({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 16 16",fill:"#D97757",className:a,children:(0,b.jsx)("path",{d:"m3.127 10.604 3.135-1.76.053-.153-.053-.085H6.11l-.525-.032-1.791-.048-1.554-.065-1.505-.08-.38-.081L0 7.832l.036-.234.32-.214.455.04 1.009.069 1.513.105 1.097.064 1.626.17h.259l.036-.105-.089-.065-.068-.064-1.566-1.062-1.695-1.121-.887-.646-.48-.327-.243-.306-.104-.67.435-.48.585.04.15.04.593.456 1.267.981 1.654 1.218.242.202.097-.068.012-.049-.109-.181-.9-1.626-.96-1.655-.428-.686-.113-.411a2 2 0 0 1-.068-.484l.496-.674L4.446 0l.662.089.279.242.411.94.666 1.48 1.033 2.014.302.597.162.553.06.17h.105v-.097l.085-1.134.157-1.392.154-1.792.052-.504.25-.605.497-.327.387.186.319.456-.045.294-.19 1.23-.37 1.93-.243 1.29h.142l.161-.16.654-.868 1.097-1.372.484-.545.565-.601.363-.287h.686l.505.751-.226.775-.707.895-.585.759-.839 1.13-.524.904.048.072.125-.012 1.897-.403 1.024-.186 1.223-.21.553.258.06.263-.218.536-1.307.323-1.533.307-2.284.54-.028.02.032.04 1.029.098.44.024h1.077l2.005.15.525.346.315.424-.053.323-.807.411-3.631-.863-.872-.218h-.12v.073l.726.71 1.331 1.202 1.667 1.55.084.383-.214.302-.226-.032-1.464-1.101-.565-.497-1.28-1.077h-.084v.113l.295.432 1.557 2.34.08.718-.112.234-.404.141-.444-.08-.911-1.28-.94-1.44-.759-1.291-.093.053-.448 4.821-.21.246-.484.186-.403-.307-.214-.496.214-.98.258-1.28.21-1.016.19-1.263.112-.42-.008-.028-.092.012-.953 1.307-1.448 1.957-1.146 1.227-.274.109-.477-.247.045-.44.266-.39 1.586-2.018.956-1.25.617-.723-.004-.105h-.036l-4.212 2.736-.75.096-.324-.302.04-.496.154-.162 1.267-.871z"})})}function e({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:a,children:(0,b.jsx)("path",{d:"M14.949 6.547a3.94 3.94 0 0 0-.348-3.273 4.11 4.11 0 0 0-4.4-1.934A4.1 4.1 0 0 0 8.423.2 4.15 4.15 0 0 0 6.305.086a4.1 4.1 0 0 0-1.891.948 4.04 4.04 0 0 0-1.158 1.753 4.1 4.1 0 0 0-1.563.679A4 4 0 0 0 .554 4.72a3.99 3.99 0 0 0 .502 4.731 3.94 3.94 0 0 0 .346 3.274 4.11 4.11 0 0 0 4.402 1.933c.382.425.852.764 1.377.995.526.231 1.095.35 1.67.346 1.78.002 3.358-1.132 3.901-2.804a4.1 4.1 0 0 0 1.563-.68 4 4 0 0 0 1.14-1.253 3.99 3.99 0 0 0-.506-4.716m-6.097 8.406a3.05 3.05 0 0 1-1.945-.694l.096-.054 3.23-1.838a.53.53 0 0 0 .265-.455v-4.49l1.366.778q.02.011.025.035v3.722c-.003 1.653-1.361 2.992-3.037 2.996m-6.53-2.75a2.95 2.95 0 0 1-.36-2.01l.095.057L5.29 12.09a.53.53 0 0 0 .527 0l3.949-2.246v1.555a.05.05 0 0 1-.022.041L6.473 13.3c-1.454.826-3.311.335-4.15-1.098m-.85-6.94A3.02 3.02 0 0 1 3.07 3.949v3.785a.51.51 0 0 0 .262.451l3.93 2.237-1.366.779a.05.05 0 0 1-.048 0L2.585 9.342a2.98 2.98 0 0 1-1.113-4.094zm11.216 2.571L8.747 5.576l1.362-.776a.05.05 0 0 1 .048 0l3.265 1.86a3 3 0 0 1 1.173 1.207 2.96 2.96 0 0 1-.27 3.2 3.05 3.05 0 0 1-1.36.997V8.279a.52.52 0 0 0-.276-.445m1.36-2.015-.097-.057-3.226-1.855a.53.53 0 0 0-.53 0L6.249 6.153V4.598a.04.04 0 0 1 .019-.04L9.533 2.7a3.07 3.07 0 0 1 3.257.139c.474.325.843.778 1.066 1.303.223.526.289 1.103.191 1.664zM5.503 8.575 4.139 7.8a.05.05 0 0 1-.026-.037V4.049c0-.57.166-1.127.476-1.607s.752-.864 1.275-1.105a3.08 3.08 0 0 1 3.234.41l-.096.054-3.23 1.838a.53.53 0 0 0-.265.455zm.742-1.577 1.758-1 1.762 1v2l-1.755 1-1.762-1z"})})}function f({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 240 300",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M180 240H60V120H180V240Z",fill:"#CFCECD"}),(0,b.jsx)("path",{d:"M180 60H60V240H180V60ZM240 300H0V0H240V300Z",fill:"#211E1E"})]})}function g({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M8 2C5.5 2 3.5 4 3.5 6.5S5 10.5 6.5 11v1.5H8V11c.3.1.7.1 1 0v1.5h1.5V11c1.5-.5 3-2.5 3-4.5S10.5 2 8 2Z",fill:"#E8453A"}),(0,b.jsx)("path",{d:"M3.5 5.5C2 5 1 6 1.5 7s2 .5 2.2-.7",fill:"#FF6B5A"}),(0,b.jsx)("path",{d:"M12.5 5.5c1.5-.5 2.5.5 2 1.5s-2 .5-2.2-.7",fill:"#FF6B5A"}),(0,b.jsx)("path",{d:"M6.5 3Q5 1.2 4.3 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M9.5 3Q11 1.2 11.7 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,b.jsx)("circle",{cx:"6.2",cy:"5.2",r:"0.9",fill:"#050810"}),(0,b.jsx)("circle",{cx:"9.8",cy:"5.2",r:"0.9",fill:"#050810"}),(0,b.jsx)("circle",{cx:"6.4",cy:"5",r:"0.3",fill:"#00E5CC"}),(0,b.jsx)("circle",{cx:"10",cy:"5",r:"0.3",fill:"#00E5CC"})]})}function h({className:a}){return(0,b.jsx)("img",{src:"data:image/webp;base64,UklGRuYDAABXRUJQVlA4INoDAADQEwCdASowADAAPm0uk0ckIiGhKrqpWIANiWkAEyQea/fD8IewvGL5V7Nb3H8u/MA8G9rT+4flL+UfIe42/23GB8zPqF/o3E0UAP5h/h/+F6ZX+x5evnX/r+4T/K/67/u/zg7znogfrusMANZLkn1gvlY/vNsKubtj/9xLSzxTsLr7K9GLdFNs5rwtISRcPXvH4z57n2fg0XR3aQ2D+pPpycwyl7TwAAD+/2DbjivnePzfyHCsdOgJXKlUR/OgAkofD7K4AdmsPKyP5Ml4/4HBYmIm5/efn/H+X3IZtngyaUOvwbFuRS/1yODFYO3vf3qeXGgPdfgIROXd/EPT7K2jysfvY9N71+w6g2gBPs+P6lxYkPf6S9QfpvH/7Pp7i8xRh0nVDBTEQyczSz7V9hoqo4nDJuii+SfibZRR/d5zB+9jkcb1DNN7YnC5Y7+WfGrE3eseXt3hSm+NS5++m1MHbjsrd9z/Q4HPRP/C85Po41XObalGyIUcFUL2j2n3uI/Yh6U8r6trCUJFB4kT3fsv6+8ylX/d96y2hq869FCXLjq4YqEO8vs5BtT52sf7KyDxPAWkH/b06YbfVXf4/7y5THL6Sr/4mOrrY9P2LW81f05HHFN8n0jcyqKOH7AluMm0AHPgFyz8RVrfBdmnPiC2FLMQfNDte5yGFzGC3fMlDed/tS/PO3Q/hjsNLvAXUUjqHyCo3JeN69jyNgWjjf8iUqoBsXT+lJyp2r8p60ad1jxhNyTblyJwda8aWEw1hFDeGjpMGguDF66RL4c+ZO+PhculC6WxvCsZ7IPAsdD7/ywx3w3AowJ66hAAK7k+m6X2QV06OVOCwyIGERex/AUyuBbLUK93X58+M+Si7YfYjVYGpoJ7JvSgD8ExaA21z9OY+si+1wreacDanKnFDmhwBQC3t6MLeXCOGp3VURDKl10K7tdKHQcb4hr48ba+1x/MrMRwHfq3IQrDIXPYCg4b0OLnVN9JyXttKGM63B5imIdKuU0r6hhSslT10lGLjnIJuwO5WKR0RHs+BX5vs6H63y3K7IuuZ1eRN+Aczvbs4QuDs6ZRuzjJ/1DJ5R/3ZrFPrtxvMwT06vAXIgcbhLGNLhOQUYRPdUN5MgyCtL5NH71ArTPLRRkIjhGwoCYXKKqlqIKKT9NX3vwp/nlh4SX71dlYg/mPXbJ9bMeVugyjqFahjFTJ/rT3HtBCWG8h+OvvbOFDFKurCG9BOhO9B719OS7zsP0KPqoymnv7hVvoJyZp0iziCbBvaJpmF9Cvfs8/vWqWr7TUo616WfMW+X9nkgpuqtnfAAAAAA==",alt:"Hermes",className:`${a} rounded-sm`})}function i({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 800 800",fill:"none",className:a,children:[(0,b.jsx)("rect",{width:"800",height:"800",rx:"150",fill:"#09090b"}),(0,b.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z"}),(0,b.jsx)("path",{fill:"#fff",d:"M517.36 400H634.72V634.72H517.36Z"})]})}function j({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:a,children:(0,b.jsx)("path",{d:"M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"})})}function k({className:a}){return(0,b.jsxs)("svg",{viewBox:"600 300 400 400",fill:"none",className:a,children:[(0,b.jsx)("path",{fill:"#14120B",d:"M999.994 554.294C999.994 559.859 999.994 565.419 999.962 570.984C999.935 575.67 999.882 580.357 999.753 585.038C999.475 595.247 998.875 605.542 997.059 615.639C995.217 625.88 992.212 635.409 987.477 644.718C982.822 653.861 976.738 662.233 969.485 669.491C962.227 676.748 953.861 682.828 944.712 687.482C935.409 692.217 925.875 695.222 915.633 697.065C905.537 698.88 895.242 699.48 885.033 699.759C880.346 699.887 875.665 699.941 870.978 699.968C865.413 700.005 859.853 700 854.288 700H745.695C740.13 700 734.571 700 729.005 699.968C724.319 699.941 719.632 699.887 714.951 699.759C704.742 699.48 694.447 698.88 684.35 697.065C674.109 695.222 664.58 692.217 655.271 687.482C646.128 682.828 637.756 676.743 630.499 669.491C623.241 662.233 617.161 653.866 612.507 644.718C607.772 635.414 604.767 625.88 602.925 615.639C601.109 605.542 600.509 595.247 600.23 585.038C600.102 580.352 600.048 575.67 600.021 570.984C600 565.419 600 559.859 600 554.294V445.701C600 440.136 600 434.576 600.032 429.011C600.059 424.324 600.112 419.637 600.241 414.956C600.52 404.747 601.119 394.452 602.935 384.356C604.778 374.115 607.783 364.586 612.518 355.277C617.172 346.133 623.257 337.762 630.509 330.504C637.767 323.246 646.133 317.167 655.282 312.512C664.586 307.777 674.12 304.772 684.361 302.93C694.458 301.114 704.752 300.514 714.961 300.236C719.648 300.107 724.329 300.054 729.016 300.027C734.576 300 740.136 300 745.701 300H854.294C859.859 300 865.419 300 870.984 300.032C875.67 300.059 880.357 300.112 885.038 300.241C895.247 300.52 905.542 301.119 915.639 302.935C925.88 304.778 935.409 307.783 944.718 312.518C953.861 317.172 962.233 323.257 969.491 330.509C976.748 337.767 982.828 346.133 987.482 355.282C992.217 364.586 995.222 374.12 997.065 384.361C998.88 394.458 999.48 404.752 999.759 414.961C999.887 419.648 999.941 424.329 999.968 429.016C1000.01 434.581 1000 440.141 1000 445.706V554.299L999.994 554.294Z"}),(0,b.jsx)("path",{fill:"#72716D",d:"M800.004 500L923.821 571.486C923.061 572.804 921.957 573.929 920.591 574.716L804.863 641.531C801.858 643.266 798.151 643.266 795.146 641.531L679.417 574.716C678.052 573.929 676.948 572.804 676.188 571.486L800.004 500Z"}),(0,b.jsx)("path",{fill:"#55544F",d:"M800.005 357.168V500L676.188 571.486C675.427 570.168 675.004 568.647 675.004 567.072V432.928C675.004 429.774 676.686 426.865 679.418 425.285L795.141 358.47C796.646 357.602 798.323 357.168 799.999 357.168H800.005Z"}),(0,b.jsx)("path",{fill:"#43413C",d:"M923.815 428.515C923.055 427.197 921.951 426.072 920.586 425.285L804.857 358.47C803.357 357.602 801.68 357.168 800.004 357.168V500L923.821 571.486C924.581 570.168 925.005 568.647 925.005 567.072V432.928C925.005 431.348 924.587 429.838 923.821 428.515H923.815Z"}),(0,b.jsx)("path",{fill:"#D6D5D2",d:"M915.156 433.518C915.857 434.728 915.954 436.281 915.156 437.663L802.764 632.323C802.008 633.641 800 633.1 800 631.584V503.311C800 502.287 799.727 501.302 799.229 500.44L915.15 433.512H915.156V433.518Z"}),(0,b.jsx)("path",{fill:"white",d:"M915.155 433.518L799.233 500.445C798.741 499.588 798.023 498.86 797.134 498.345L686.049 434.209C684.731 433.453 685.272 431.445 686.788 431.445H911.566C913.162 431.445 914.459 432.307 915.155 433.518Z"})]})}function l({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M12 24C12 18.2 12 15.5 10.1 13.9C8.5 12 5.8 12 0 12C5.8 12 8.5 12 10.1 10.1C12 8.5 12 5.8 12 0C12 5.8 12 8.5 13.9 10.1C15.5 12 18.2 12 24 12C18.2 12 15.5 12 13.9 13.9C12 15.5 12 18.2 12 24Z",fill:"url(#gemini-gradient)"}),(0,b.jsx)("defs",{children:(0,b.jsxs)("linearGradient",{id:"gemini-gradient",x1:"0",y1:"0",x2:"24",y2:"24",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#4285F4"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#886FBF"})]})})]})}a.s(["ProviderLogo",0,function({provider:a,className:m="h-4 w-4"}){switch(a){case"claude":return(0,b.jsx)(d,{className:m});case"codex":return(0,b.jsx)(e,{className:m});case"opencode":return(0,b.jsx)(f,{className:m});case"openclaw":return(0,b.jsx)(g,{className:m});case"hermes":return(0,b.jsx)(h,{className:m});case"pi":return(0,b.jsx)(i,{className:m});case"copilot":return(0,b.jsx)(j,{className:m});case"cursor":return(0,b.jsx)(k,{className:m});case"gemini":return(0,b.jsx)(l,{className:m});default:return(0,b.jsx)(c.Monitor,{className:m})}}])},561101,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(556371),f=a.i(921584),g=a.i(75118);function h({step:a,completed:c}){return c?(0,b.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-emerald-500 text-white transition-all duration-300",children:(0,b.jsx)(e.Check,{className:"size-3",strokeWidth:3})}):(0,b.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-foreground text-background text-[10px] font-semibold",children:a})}a.s(["ConnectMachineSteps",0,function({generatedToken:a,generatingToken:e,onGenerateToken:i,registered:j}){let k=(0,c.useRef)(!1);(0,c.useEffect)(()=>{a||e||k.current||(k.current=!0,i())},[a,e,i]);let l=()=>{navigator.clipboard.writeText(`${g.CLI_CMD} register --token ${a}`),f.toast.success("Copied to clipboard")},m=`${g.CLI_CMD} daemon start`,n=()=>{navigator.clipboard.writeText(m),f.toast.success("Copied to clipboard")};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("p",{className:"text-xs font-medium flex items-center gap-2",children:[(0,b.jsx)(h,{step:1,completed:j}),"Register your CLI",j&&(0,b.jsx)("span",{className:"text-[10px] text-emerald-500 font-normal",children:"Done"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"Run this in your terminal to link your machine."}),e?(0,b.jsx)("div",{className:"pl-7",children:(0,b.jsx)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground animate-pulse",children:"Generating token..."})}):a?(0,b.jsxs)("div",{className:"pl-7 space-y-2",children:[(0,b.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors break-all",onClick:l,title:"Click to copy",children:[g.CLI_CMD," register --token"," ",(0,b.jsx)("span",{className:"text-foreground/70",children:a})]}),!j&&(0,b.jsx)(d.Button,{size:"sm",onClick:l,className:"w-full",children:"Copy Command"})]}):null]}),(0,b.jsxs)("div",{className:`space-y-2 transition-opacity duration-300 ${!j?"opacity-40 pointer-events-none":""}`,children:[(0,b.jsxs)("p",{className:"text-xs font-medium flex items-center gap-2",children:[(0,b.jsx)(h,{step:2,completed:!1}),"Start the daemon"]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"The daemon connects your local agents to Alook."}),(0,b.jsx)("div",{className:"ml-7 rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:n,title:"Click to copy",children:m}),j&&(0,b.jsx)("div",{className:"pl-7",children:(0,b.jsx)(d.Button,{size:"sm",onClick:n,className:"w-full",children:"Copy Command"})})]})]})}])},283291,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(207058),e=a.i(752792),f=a.i(732254),g=a.i(464830),h=a.i(439882),i=a.i(7455),j=a.i(22902),k=a.i(921584),l=a.i(25668),m=a.i(385539),n=a.i(911057);a.i(974936);var o=a.i(997445),p=a.i(75118),q=a.i(74414),r=a.i(588339),s=a.i(527779),t=a.i(461794),u=a.i(561101);a.s(["default",0,function(){let{agents:a,runtimes:v,loading:w,handleGenerateToken:x,handleDeleteMachine:y,subscribeWs:z,workspaceId:A}=(0,e.useAgentContext)(),B=(0,d.useSearchParams)(),C=(0,d.useRouter)(),D=(0,d.usePathname)(),[E,F]=(0,c.useState)(()=>B.has("connect")),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)(null),[O,P]=(0,c.useState)(new Set),[Q,R]=(0,c.useState)(new Set),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(""),[Y,Z]=(0,c.useState)("Remove"),[$,_]=(0,c.useState)(void 0),[aa,ab]=(0,c.useState)("destructive"),[ac,ad]=(0,c.useState)(!1),ae=(0,c.useRef)(null);(0,c.useEffect)(()=>{(0,r.fetchLatestCliVersion)().then(a=>N(a.version)).catch(()=>{})},[]),(0,c.useEffect)(()=>{B.has("connect")&&C.replace(D,{scroll:!1})},[B,C,D]);let af=(0,c.useRef)(E);(0,c.useEffect)(()=>{af.current=E},[E]);let ag=(0,c.useRef)(a);(0,c.useEffect)(()=>{ag.current=a},[a]),(0,c.useEffect)(()=>z(a=>{if(af.current&&("runtime.registered"===a.type&&a.workspaceId===A&&L(!0),"runtime.status"===a.type&&a.workspaceId===A&&"online"===a.status)&&(F(!1),H(""),L(!1),k.toast.success("Machine connected"),0===ag.current.length)){let a=D.split("/")[2];C.push(`/w/${a}/agents/new`)}}),[z,A,D,C]);let ah=(a,b,c,d)=>{V(a),X(b),Z(d?.label??"Remove"),_(d?.loadingLabel),ab(d?.variant??"destructive"),ae.current=c,T(!0)},ai=async()=>{if(ae.current){ad(!0);try{await ae.current()}finally{ad(!1),T(!1),ae.current=null}}},aj=(0,c.useCallback)(async()=>{J(!0);try{let a=await x();a&&H(a)}finally{J(!1)}},[x]),ak=async(a,b)=>{P(a=>new Set(a).add(b));try{await (0,r.triggerRuntimeUpdate)(a,A),k.toast.success("Update triggered")}catch{k.toast.error("Failed to trigger update"),P(a=>{let c=new Set(a);return c.delete(b),c})}},al=async(a,b)=>{R(a=>new Set(a).add(b));try{await (0,r.triggerRuntimeRescan)(a,A),k.toast.success("Rescan triggered — daemon will restart to detect runtimes")}catch{k.toast.error("Failed to trigger rescan"),R(a=>{let c=new Set(a);return c.delete(b),c})}},am=(0,c.useMemo)(()=>{if(0===O.size)return O;let a=new Set;for(let b of v){let c=b.daemon_id||b.id;O.has(c)&&b.pending_update_version&&a.add(c)}return a},[v,O]),an=(0,c.useMemo)(()=>{if(0===Q.size)return Q;let a=new Set;for(let b of v){let c=b.daemon_id||b.id;Q.has(c)&&b.pending_rescan&&a.add(c)}return a},[v,Q]),ao=new Map;for(let a of v){let b=a.daemon_id||a.id;if(!ao.has(b)){let c=a.metadata;ao.set(b,{deviceInfo:"string"==typeof a.device_info?a.device_info:"",status:a.status,lastSeenAt:a.last_seen_at,pendingUpdateVersion:a.pending_update_version??null,pendingRescan:!!a.pending_rescan,cliVersion:c?.cli_version??null,runtimes:[]})}ao.get(b).runtimes.push(a)}return w?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(l.Skeleton,{className:"h-4 w-16"}),(0,b.jsx)(l.Skeleton,{className:"h-3 w-52"})]}),(0,b.jsx)(l.Skeleton,{className:"h-8 w-29 rounded-md"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((a,c)=>(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(l.Skeleton,{className:"size-4 rounded"}),(0,b.jsx)(l.Skeleton,{className:"h-4 w-28"})]}),(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(l.Skeleton,{className:"h-3 w-20"}),(0,b.jsx)(l.Skeleton,{className:"h-3 w-28"})]}),(0,b.jsx)(l.Skeleton,{className:"h-5 w-14 rounded-full"})]})})]},c))})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("h1",{className:"text-sm font-medium",children:"Runtimes"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your machines and their agent runtimes."})]}),(0,b.jsxs)(f.Button,{size:"sm",variant:"outline",onClick:()=>{H(""),L(!1),F(!0)},disabled:I,children:[(0,b.jsx)(n.Plus,{className:"size-3.5"}),"New machine"]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:0===v.length?(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center min-h-[60vh]",children:(0,b.jsxs)("div",{className:"text-center animate-[fade-up_400ms_ease-out_both]",children:[(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:"Connect a machine to start running agents locally."}),(0,b.jsx)(f.Button,{size:"sm",className:"mt-4 glow-border",onClick:()=>{H(""),F(!0)},children:"Connect Machine"})]})}):(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from(ao.entries()).map(([a,c])=>{let d,e,i,j=c.deviceInfo||a;return(0,b.jsxs)(h.Card,{size:"sm",children:[(0,b.jsx)(h.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(m.Monitor,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)(h.CardTitle,{className:"truncate",children:j}),c.cliVersion&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:["v",c.cliVersion]}),(0,b.jsx)(g.Badge,{variant:"online"===c.status?"default":"outline",className:"shrink-0",children:c.status})]})}),(0,b.jsx)(h.CardContent,{children:(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:c.lastSeenAt?new Date(c.lastSeenAt).toLocaleString():"Never seen"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(d=!!c.pendingUpdateVersion||am.has(a),e=M&&(!c.cliVersion||!(0,o.semverGte)(c.cliVersion,M)),d?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(s.Loader2,{className:"size-3 animate-spin mr-1"}),"Updating..."]}):e?(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>ah("Update daemon",`This will update the daemon on "${j}" to the latest CLI version. The daemon will restart during the update.`,async()=>{await ak(c.runtimes[0].id,a)},{label:"Update",loadingLabel:"Updating...",variant:"default"}),children:"Update"}):null),(i=c.pendingRescan||an.has(a),"online"!==c.status?null:i?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(t.RefreshCw,{className:"size-3 animate-spin mr-1"}),"Rescanning..."]}):(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>ah("Rescan runtimes",`This will restart the daemon on "${j}" to re-detect available runtimes (Claude Code, Codex, OpenCode).`,async()=>{await al(c.runtimes[0].id,a)},{label:"Rescan",loadingLabel:"Triggering...",variant:"default"}),children:[(0,b.jsx)(t.RefreshCw,{className:"size-3 mr-1"}),"Rescan"]})),(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground h-6 px-2 hover:text-destructive",onClick:()=>{ah("Remove machine",`This will remove "${j}" and all its runtimes. Agents using these runtimes will be unlinked.`,async()=>{await y(a)})},children:"Remove"})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.runtimes.map(a=>(0,b.jsxs)(g.Badge,{variant:"secondary",className:"gap-1.5",children:[(0,b.jsx)(q.ProviderLogo,{provider:a.provider,className:"h-3.5 w-3.5"}),a.provider,a.metadata?.version?(0,b.jsx)("span",{className:"text-muted-foreground font-normal",children:String(a.metadata.version)}):null]},a.id))}),"online"!==c.status&&(0,b.jsxs)("div",{className:"pt-1.5 border-t border-border/50",children:[(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground mb-1.5",children:"Bring this machine online:"}),(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-md bg-muted px-2.5 py-1.5 font-mono text-[11px] text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:()=>{navigator.clipboard.writeText(`${p.CLI_CMD} daemon start`),k.toast.success("Copied to clipboard")},title:"Click to copy",children:[(0,b.jsx)("span",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2.5s_infinite] bg-linear-to-r from-transparent via-(--shimmer-peak) to-transparent"}),(0,b.jsxs)("span",{className:"relative",children:[p.CLI_CMD," daemon start"]})]})]})]})})]},a)})})}),(0,b.jsx)(i.Sheet,{open:E,onOpenChange:a=>{F(a),a||H("")},children:(0,b.jsxs)(i.SheetContent,{className:"data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:rounded-xl data-[side=right]:sm:border",children:[(0,b.jsxs)(i.SheetHeader,{children:[(0,b.jsx)(i.SheetTitle,{children:"Connect a machine"}),(0,b.jsx)(i.SheetDescription,{children:"Your machine runs AI agents locally using Claude Code, Codex, or OpenCode."})]}),(0,b.jsx)(i.SheetBody,{children:(0,b.jsx)(u.ConnectMachineSteps,{generatedToken:G,generatingToken:I,onGenerateToken:aj,registered:K})})]})}),(0,b.jsx)(j.ConfirmDialog,{open:S,onOpenChange:T,title:U,description:W,confirmLabel:Y,loadingLabel:$,confirmVariant:aa,loading:ac,onConfirm:ai})]})}])}];
|
|
1
|
+
module.exports=[527779,a=>{"use strict";let b=(0,a.i(790090).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",0,b],527779)},22902,a=>{"use strict";var b=a.i(749314),c=a.i(432340),d=a.i(732254);a.s(["ConfirmDialog",0,function({open:a,onOpenChange:e,title:f,description:g,confirmLabel:h="Remove",loadingLabel:i,confirmVariant:j="destructive",loading:k=!1,onConfirm:l}){return(0,b.jsx)(c.Dialog,{open:a,onOpenChange:e,children:(0,b.jsxs)(c.DialogContent,{showCloseButton:!1,children:[(0,b.jsxs)(c.DialogHeader,{children:[(0,b.jsx)(c.DialogTitle,{children:f}),(0,b.jsx)(c.DialogDescription,{children:g})]}),(0,b.jsxs)(c.DialogFooter,{children:[(0,b.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>e(!1),disabled:k,children:"Cancel"}),(0,b.jsx)(d.Button,{variant:j,size:"sm",onClick:l,disabled:k,children:k?i??`${h}...`:h})]})]})})}])},439882,a=>{"use strict";var b=a.i(749314),c=a.i(75118);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})},"CardAction",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-action",className:(0,c.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...d})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},74414,a=>{"use strict";var b=a.i(749314),c=a.i(385539);function d({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 16 16",fill:"#D97757",className:a,children:(0,b.jsx)("path",{d:"m3.127 10.604 3.135-1.76.053-.153-.053-.085H6.11l-.525-.032-1.791-.048-1.554-.065-1.505-.08-.38-.081L0 7.832l.036-.234.32-.214.455.04 1.009.069 1.513.105 1.097.064 1.626.17h.259l.036-.105-.089-.065-.068-.064-1.566-1.062-1.695-1.121-.887-.646-.48-.327-.243-.306-.104-.67.435-.48.585.04.15.04.593.456 1.267.981 1.654 1.218.242.202.097-.068.012-.049-.109-.181-.9-1.626-.96-1.655-.428-.686-.113-.411a2 2 0 0 1-.068-.484l.496-.674L4.446 0l.662.089.279.242.411.94.666 1.48 1.033 2.014.302.597.162.553.06.17h.105v-.097l.085-1.134.157-1.392.154-1.792.052-.504.25-.605.497-.327.387.186.319.456-.045.294-.19 1.23-.37 1.93-.243 1.29h.142l.161-.16.654-.868 1.097-1.372.484-.545.565-.601.363-.287h.686l.505.751-.226.775-.707.895-.585.759-.839 1.13-.524.904.048.072.125-.012 1.897-.403 1.024-.186 1.223-.21.553.258.06.263-.218.536-1.307.323-1.533.307-2.284.54-.028.02.032.04 1.029.098.44.024h1.077l2.005.15.525.346.315.424-.053.323-.807.411-3.631-.863-.872-.218h-.12v.073l.726.71 1.331 1.202 1.667 1.55.084.383-.214.302-.226-.032-1.464-1.101-.565-.497-1.28-1.077h-.084v.113l.295.432 1.557 2.34.08.718-.112.234-.404.141-.444-.08-.911-1.28-.94-1.44-.759-1.291-.093.053-.448 4.821-.21.246-.484.186-.403-.307-.214-.496.214-.98.258-1.28.21-1.016.19-1.263.112-.42-.008-.028-.092.012-.953 1.307-1.448 1.957-1.146 1.227-.274.109-.477-.247.045-.44.266-.39 1.586-2.018.956-1.25.617-.723-.004-.105h-.036l-4.212 2.736-.75.096-.324-.302.04-.496.154-.162 1.267-.871z"})})}function e({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:a,children:(0,b.jsx)("path",{d:"M14.949 6.547a3.94 3.94 0 0 0-.348-3.273 4.11 4.11 0 0 0-4.4-1.934A4.1 4.1 0 0 0 8.423.2 4.15 4.15 0 0 0 6.305.086a4.1 4.1 0 0 0-1.891.948 4.04 4.04 0 0 0-1.158 1.753 4.1 4.1 0 0 0-1.563.679A4 4 0 0 0 .554 4.72a3.99 3.99 0 0 0 .502 4.731 3.94 3.94 0 0 0 .346 3.274 4.11 4.11 0 0 0 4.402 1.933c.382.425.852.764 1.377.995.526.231 1.095.35 1.67.346 1.78.002 3.358-1.132 3.901-2.804a4.1 4.1 0 0 0 1.563-.68 4 4 0 0 0 1.14-1.253 3.99 3.99 0 0 0-.506-4.716m-6.097 8.406a3.05 3.05 0 0 1-1.945-.694l.096-.054 3.23-1.838a.53.53 0 0 0 .265-.455v-4.49l1.366.778q.02.011.025.035v3.722c-.003 1.653-1.361 2.992-3.037 2.996m-6.53-2.75a2.95 2.95 0 0 1-.36-2.01l.095.057L5.29 12.09a.53.53 0 0 0 .527 0l3.949-2.246v1.555a.05.05 0 0 1-.022.041L6.473 13.3c-1.454.826-3.311.335-4.15-1.098m-.85-6.94A3.02 3.02 0 0 1 3.07 3.949v3.785a.51.51 0 0 0 .262.451l3.93 2.237-1.366.779a.05.05 0 0 1-.048 0L2.585 9.342a2.98 2.98 0 0 1-1.113-4.094zm11.216 2.571L8.747 5.576l1.362-.776a.05.05 0 0 1 .048 0l3.265 1.86a3 3 0 0 1 1.173 1.207 2.96 2.96 0 0 1-.27 3.2 3.05 3.05 0 0 1-1.36.997V8.279a.52.52 0 0 0-.276-.445m1.36-2.015-.097-.057-3.226-1.855a.53.53 0 0 0-.53 0L6.249 6.153V4.598a.04.04 0 0 1 .019-.04L9.533 2.7a3.07 3.07 0 0 1 3.257.139c.474.325.843.778 1.066 1.303.223.526.289 1.103.191 1.664zM5.503 8.575 4.139 7.8a.05.05 0 0 1-.026-.037V4.049c0-.57.166-1.127.476-1.607s.752-.864 1.275-1.105a3.08 3.08 0 0 1 3.234.41l-.096.054-3.23 1.838a.53.53 0 0 0-.265.455zm.742-1.577 1.758-1 1.762 1v2l-1.755 1-1.762-1z"})})}function f({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 240 300",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M180 240H60V120H180V240Z",fill:"#CFCECD"}),(0,b.jsx)("path",{d:"M180 60H60V240H180V60ZM240 300H0V0H240V300Z",fill:"#211E1E"})]})}function g({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M8 2C5.5 2 3.5 4 3.5 6.5S5 10.5 6.5 11v1.5H8V11c.3.1.7.1 1 0v1.5h1.5V11c1.5-.5 3-2.5 3-4.5S10.5 2 8 2Z",fill:"#E8453A"}),(0,b.jsx)("path",{d:"M3.5 5.5C2 5 1 6 1.5 7s2 .5 2.2-.7",fill:"#FF6B5A"}),(0,b.jsx)("path",{d:"M12.5 5.5c1.5-.5 2.5.5 2 1.5s-2 .5-2.2-.7",fill:"#FF6B5A"}),(0,b.jsx)("path",{d:"M6.5 3Q5 1.2 4.3 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M9.5 3Q11 1.2 11.7 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,b.jsx)("circle",{cx:"6.2",cy:"5.2",r:"0.9",fill:"#050810"}),(0,b.jsx)("circle",{cx:"9.8",cy:"5.2",r:"0.9",fill:"#050810"}),(0,b.jsx)("circle",{cx:"6.4",cy:"5",r:"0.3",fill:"#00E5CC"}),(0,b.jsx)("circle",{cx:"10",cy:"5",r:"0.3",fill:"#00E5CC"})]})}function h({className:a}){return(0,b.jsx)("img",{src:"data:image/webp;base64,UklGRuYDAABXRUJQVlA4INoDAADQEwCdASowADAAPm0uk0ckIiGhKrqpWIANiWkAEyQea/fD8IewvGL5V7Nb3H8u/MA8G9rT+4flL+UfIe42/23GB8zPqF/o3E0UAP5h/h/+F6ZX+x5evnX/r+4T/K/67/u/zg7znogfrusMANZLkn1gvlY/vNsKubtj/9xLSzxTsLr7K9GLdFNs5rwtISRcPXvH4z57n2fg0XR3aQ2D+pPpycwyl7TwAAD+/2DbjivnePzfyHCsdOgJXKlUR/OgAkofD7K4AdmsPKyP5Ml4/4HBYmIm5/efn/H+X3IZtngyaUOvwbFuRS/1yODFYO3vf3qeXGgPdfgIROXd/EPT7K2jysfvY9N71+w6g2gBPs+P6lxYkPf6S9QfpvH/7Pp7i8xRh0nVDBTEQyczSz7V9hoqo4nDJuii+SfibZRR/d5zB+9jkcb1DNN7YnC5Y7+WfGrE3eseXt3hSm+NS5++m1MHbjsrd9z/Q4HPRP/C85Po41XObalGyIUcFUL2j2n3uI/Yh6U8r6trCUJFB4kT3fsv6+8ylX/d96y2hq869FCXLjq4YqEO8vs5BtT52sf7KyDxPAWkH/b06YbfVXf4/7y5THL6Sr/4mOrrY9P2LW81f05HHFN8n0jcyqKOH7AluMm0AHPgFyz8RVrfBdmnPiC2FLMQfNDte5yGFzGC3fMlDed/tS/PO3Q/hjsNLvAXUUjqHyCo3JeN69jyNgWjjf8iUqoBsXT+lJyp2r8p60ad1jxhNyTblyJwda8aWEw1hFDeGjpMGguDF66RL4c+ZO+PhculC6WxvCsZ7IPAsdD7/ywx3w3AowJ66hAAK7k+m6X2QV06OVOCwyIGERex/AUyuBbLUK93X58+M+Si7YfYjVYGpoJ7JvSgD8ExaA21z9OY+si+1wreacDanKnFDmhwBQC3t6MLeXCOGp3VURDKl10K7tdKHQcb4hr48ba+1x/MrMRwHfq3IQrDIXPYCg4b0OLnVN9JyXttKGM63B5imIdKuU0r6hhSslT10lGLjnIJuwO5WKR0RHs+BX5vs6H63y3K7IuuZ1eRN+Aczvbs4QuDs6ZRuzjJ/1DJ5R/3ZrFPrtxvMwT06vAXIgcbhLGNLhOQUYRPdUN5MgyCtL5NH71ArTPLRRkIjhGwoCYXKKqlqIKKT9NX3vwp/nlh4SX71dlYg/mPXbJ9bMeVugyjqFahjFTJ/rT3HtBCWG8h+OvvbOFDFKurCG9BOhO9B719OS7zsP0KPqoymnv7hVvoJyZp0iziCbBvaJpmF9Cvfs8/vWqWr7TUo616WfMW+X9nkgpuqtnfAAAAAA==",alt:"Hermes",className:`${a} rounded-sm`})}function i({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 800 800",fill:"none",className:a,children:[(0,b.jsx)("rect",{width:"800",height:"800",rx:"150",fill:"#09090b"}),(0,b.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z"}),(0,b.jsx)("path",{fill:"#fff",d:"M517.36 400H634.72V634.72H517.36Z"})]})}function j({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:a,children:(0,b.jsx)("path",{d:"M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"})})}function k({className:a}){return(0,b.jsxs)("svg",{viewBox:"600 300 400 400",fill:"none",className:a,children:[(0,b.jsx)("path",{fill:"#14120B",d:"M999.994 554.294C999.994 559.859 999.994 565.419 999.962 570.984C999.935 575.67 999.882 580.357 999.753 585.038C999.475 595.247 998.875 605.542 997.059 615.639C995.217 625.88 992.212 635.409 987.477 644.718C982.822 653.861 976.738 662.233 969.485 669.491C962.227 676.748 953.861 682.828 944.712 687.482C935.409 692.217 925.875 695.222 915.633 697.065C905.537 698.88 895.242 699.48 885.033 699.759C880.346 699.887 875.665 699.941 870.978 699.968C865.413 700.005 859.853 700 854.288 700H745.695C740.13 700 734.571 700 729.005 699.968C724.319 699.941 719.632 699.887 714.951 699.759C704.742 699.48 694.447 698.88 684.35 697.065C674.109 695.222 664.58 692.217 655.271 687.482C646.128 682.828 637.756 676.743 630.499 669.491C623.241 662.233 617.161 653.866 612.507 644.718C607.772 635.414 604.767 625.88 602.925 615.639C601.109 605.542 600.509 595.247 600.23 585.038C600.102 580.352 600.048 575.67 600.021 570.984C600 565.419 600 559.859 600 554.294V445.701C600 440.136 600 434.576 600.032 429.011C600.059 424.324 600.112 419.637 600.241 414.956C600.52 404.747 601.119 394.452 602.935 384.356C604.778 374.115 607.783 364.586 612.518 355.277C617.172 346.133 623.257 337.762 630.509 330.504C637.767 323.246 646.133 317.167 655.282 312.512C664.586 307.777 674.12 304.772 684.361 302.93C694.458 301.114 704.752 300.514 714.961 300.236C719.648 300.107 724.329 300.054 729.016 300.027C734.576 300 740.136 300 745.701 300H854.294C859.859 300 865.419 300 870.984 300.032C875.67 300.059 880.357 300.112 885.038 300.241C895.247 300.52 905.542 301.119 915.639 302.935C925.88 304.778 935.409 307.783 944.718 312.518C953.861 317.172 962.233 323.257 969.491 330.509C976.748 337.767 982.828 346.133 987.482 355.282C992.217 364.586 995.222 374.12 997.065 384.361C998.88 394.458 999.48 404.752 999.759 414.961C999.887 419.648 999.941 424.329 999.968 429.016C1000.01 434.581 1000 440.141 1000 445.706V554.299L999.994 554.294Z"}),(0,b.jsx)("path",{fill:"#72716D",d:"M800.004 500L923.821 571.486C923.061 572.804 921.957 573.929 920.591 574.716L804.863 641.531C801.858 643.266 798.151 643.266 795.146 641.531L679.417 574.716C678.052 573.929 676.948 572.804 676.188 571.486L800.004 500Z"}),(0,b.jsx)("path",{fill:"#55544F",d:"M800.005 357.168V500L676.188 571.486C675.427 570.168 675.004 568.647 675.004 567.072V432.928C675.004 429.774 676.686 426.865 679.418 425.285L795.141 358.47C796.646 357.602 798.323 357.168 799.999 357.168H800.005Z"}),(0,b.jsx)("path",{fill:"#43413C",d:"M923.815 428.515C923.055 427.197 921.951 426.072 920.586 425.285L804.857 358.47C803.357 357.602 801.68 357.168 800.004 357.168V500L923.821 571.486C924.581 570.168 925.005 568.647 925.005 567.072V432.928C925.005 431.348 924.587 429.838 923.821 428.515H923.815Z"}),(0,b.jsx)("path",{fill:"#D6D5D2",d:"M915.156 433.518C915.857 434.728 915.954 436.281 915.156 437.663L802.764 632.323C802.008 633.641 800 633.1 800 631.584V503.311C800 502.287 799.727 501.302 799.229 500.44L915.15 433.512H915.156V433.518Z"}),(0,b.jsx)("path",{fill:"white",d:"M915.155 433.518L799.233 500.445C798.741 499.588 798.023 498.86 797.134 498.345L686.049 434.209C684.731 433.453 685.272 431.445 686.788 431.445H911.566C913.162 431.445 914.459 432.307 915.155 433.518Z"})]})}function l({className:a}){return(0,b.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",className:a,children:[(0,b.jsx)("path",{d:"M12 24C12 18.2 12 15.5 10.1 13.9C8.5 12 5.8 12 0 12C5.8 12 8.5 12 10.1 10.1C12 8.5 12 5.8 12 0C12 5.8 12 8.5 13.9 10.1C15.5 12 18.2 12 24 12C18.2 12 15.5 12 13.9 13.9C12 15.5 12 18.2 12 24Z",fill:"url(#gemini-gradient)"}),(0,b.jsx)("defs",{children:(0,b.jsxs)("linearGradient",{id:"gemini-gradient",x1:"0",y1:"0",x2:"24",y2:"24",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#4285F4"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#886FBF"})]})})]})}a.s(["ProviderLogo",0,function({provider:a,className:m="h-4 w-4"}){switch(a){case"claude":return(0,b.jsx)(d,{className:m});case"codex":return(0,b.jsx)(e,{className:m});case"opencode":return(0,b.jsx)(f,{className:m});case"openclaw":return(0,b.jsx)(g,{className:m});case"hermes":return(0,b.jsx)(h,{className:m});case"pi":return(0,b.jsx)(i,{className:m});case"copilot":return(0,b.jsx)(j,{className:m});case"cursor":return(0,b.jsx)(k,{className:m});case"gemini":return(0,b.jsx)(l,{className:m});default:return(0,b.jsx)(c.Monitor,{className:m})}}])},561101,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(556371),f=a.i(921584),g=a.i(75118);function h({step:a,completed:c}){return c?(0,b.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-emerald-500 text-white transition-all duration-300",children:(0,b.jsx)(e.Check,{className:"size-3",strokeWidth:3})}):(0,b.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-foreground text-background text-xs font-semibold",children:a})}a.s(["ConnectMachineSteps",0,function({generatedToken:a,generatingToken:e,onGenerateToken:i,registered:j}){let k=(0,c.useRef)(!1);(0,c.useEffect)(()=>{a||e||k.current||(k.current=!0,i())},[a,e,i]);let l=()=>{navigator.clipboard.writeText(`${g.CLI_CMD} register --token ${a}`),f.toast.success("Copied to clipboard")},m=`${g.CLI_CMD} daemon start`,n=()=>{navigator.clipboard.writeText(m),f.toast.success("Copied to clipboard")};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,b.jsx)(h,{step:1,completed:j}),"Register your CLI",j&&(0,b.jsx)("span",{className:"text-xs text-emerald-500 font-normal",children:"Done"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"Run this in your terminal to link your machine."}),e?(0,b.jsx)("div",{className:"pl-7",children:(0,b.jsx)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground animate-pulse",children:"Generating token..."})}):a?(0,b.jsxs)("div",{className:"pl-7 space-y-2",children:[(0,b.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors break-all",onClick:l,title:"Click to copy",children:[g.CLI_CMD," register --token"," ",(0,b.jsx)("span",{className:"text-foreground/70",children:a})]}),!j&&(0,b.jsx)(d.Button,{size:"sm",onClick:l,className:"w-full",children:"Copy Command"})]}):null]}),(0,b.jsxs)("div",{className:`space-y-2 transition-opacity duration-300 ${!j?"opacity-40 pointer-events-none":""}`,children:[(0,b.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,b.jsx)(h,{step:2,completed:!1}),"Start the daemon"]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"The daemon connects your local agents to Alook."}),(0,b.jsx)("div",{className:"ml-7 rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:n,title:"Click to copy",children:m}),j&&(0,b.jsx)("div",{className:"pl-7",children:(0,b.jsx)(d.Button,{size:"sm",onClick:n,className:"w-full",children:"Copy Command"})})]})]})}])},283291,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(207058),e=a.i(752792),f=a.i(732254),g=a.i(464830),h=a.i(439882),i=a.i(7455),j=a.i(22902),k=a.i(921584),l=a.i(25668),m=a.i(385539),n=a.i(911057);a.i(974936);var o=a.i(997445),p=a.i(75118),q=a.i(74414),r=a.i(588339),s=a.i(527779),t=a.i(461794),u=a.i(561101);a.s(["default",0,function(){let{agents:a,runtimes:v,loading:w,handleGenerateToken:x,handleDeleteMachine:y,subscribeWs:z,workspaceId:A}=(0,e.useAgentContext)(),B=(0,d.useSearchParams)(),C=(0,d.useRouter)(),D=(0,d.usePathname)(),[E,F]=(0,c.useState)(()=>B.has("connect")),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)(null),[O,P]=(0,c.useState)(new Set),[Q,R]=(0,c.useState)(new Set),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(""),[Y,Z]=(0,c.useState)("Remove"),[$,_]=(0,c.useState)(void 0),[aa,ab]=(0,c.useState)("destructive"),[ac,ad]=(0,c.useState)(!1),ae=(0,c.useRef)(null);(0,c.useEffect)(()=>{(0,r.fetchLatestCliVersion)().then(a=>N(a.version)).catch(()=>{})},[]),(0,c.useEffect)(()=>{B.has("connect")&&C.replace(D,{scroll:!1})},[B,C,D]);let af=(0,c.useRef)(E);(0,c.useEffect)(()=>{af.current=E},[E]);let ag=(0,c.useRef)(a);(0,c.useEffect)(()=>{ag.current=a},[a]),(0,c.useEffect)(()=>z(a=>{if(af.current&&("runtime.registered"===a.type&&a.workspaceId===A&&L(!0),"runtime.status"===a.type&&a.workspaceId===A&&"online"===a.status)&&(F(!1),H(""),L(!1),k.toast.success("Machine connected"),0===ag.current.length)){let a=D.split("/")[2];C.push(`/w/${a}/agents/new`)}}),[z,A,D,C]);let ah=(a,b,c,d)=>{V(a),X(b),Z(d?.label??"Remove"),_(d?.loadingLabel),ab(d?.variant??"destructive"),ae.current=c,T(!0)},ai=async()=>{if(ae.current){ad(!0);try{await ae.current()}finally{ad(!1),T(!1),ae.current=null}}},aj=(0,c.useCallback)(async()=>{J(!0);try{let a=await x();a&&H(a)}finally{J(!1)}},[x]),ak=async(a,b)=>{P(a=>new Set(a).add(b));try{await (0,r.triggerRuntimeUpdate)(a,A),k.toast.success("Update triggered")}catch{k.toast.error("Failed to trigger update"),P(a=>{let c=new Set(a);return c.delete(b),c})}},al=async(a,b)=>{R(a=>new Set(a).add(b));try{await (0,r.triggerRuntimeRescan)(a,A),k.toast.success("Rescan triggered — daemon will restart to detect runtimes")}catch{k.toast.error("Failed to trigger rescan"),R(a=>{let c=new Set(a);return c.delete(b),c})}},am=(0,c.useMemo)(()=>{if(0===O.size)return O;let a=new Set;for(let b of v){let c=b.daemon_id||b.id;O.has(c)&&b.pending_update_version&&a.add(c)}return a},[v,O]),an=(0,c.useMemo)(()=>{if(0===Q.size)return Q;let a=new Set;for(let b of v){let c=b.daemon_id||b.id;Q.has(c)&&b.pending_rescan&&a.add(c)}return a},[v,Q]),ao=new Map;for(let a of v){let b=a.daemon_id||a.id;if(!ao.has(b)){let c=a.metadata;ao.set(b,{deviceInfo:"string"==typeof a.device_info?a.device_info:"",status:a.status,lastSeenAt:a.last_seen_at,pendingUpdateVersion:a.pending_update_version??null,pendingRescan:!!a.pending_rescan,cliVersion:c?.cli_version??null,runtimes:[]})}ao.get(b).runtimes.push(a)}return w?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(l.Skeleton,{className:"h-4 w-16"}),(0,b.jsx)(l.Skeleton,{className:"h-3 w-52"})]}),(0,b.jsx)(l.Skeleton,{className:"h-8 w-29 rounded-md"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((a,c)=>(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(l.Skeleton,{className:"size-4 rounded"}),(0,b.jsx)(l.Skeleton,{className:"h-4 w-28"})]}),(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(l.Skeleton,{className:"h-3 w-20"}),(0,b.jsx)(l.Skeleton,{className:"h-3 w-28"})]}),(0,b.jsx)(l.Skeleton,{className:"h-5 w-14 rounded-full"})]})})]},c))})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("h1",{className:"text-sm font-medium",children:"Runtimes"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your machines and their agent runtimes."})]}),(0,b.jsxs)(f.Button,{size:"sm",variant:"outline",onClick:()=>{H(""),L(!1),F(!0)},disabled:I,children:[(0,b.jsx)(n.Plus,{className:"size-3.5"}),"New machine"]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:0===v.length?(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center min-h-[60vh]",children:(0,b.jsxs)("div",{className:"text-center animate-[fade-up_400ms_ease-out_both]",children:[(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:"Connect a machine to start running agents locally."}),(0,b.jsx)(f.Button,{size:"sm",className:"mt-4 glow-border",onClick:()=>{H(""),F(!0)},children:"Connect Machine"})]})}):(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from(ao.entries()).map(([a,c])=>{let d,e,i,j=c.deviceInfo||a;return(0,b.jsxs)(h.Card,{size:"sm",children:[(0,b.jsx)(h.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(m.Monitor,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)(h.CardTitle,{className:"truncate",children:j}),c.cliVersion&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:["v",c.cliVersion]}),(0,b.jsx)(g.Badge,{variant:"online"===c.status?"default":"outline",className:"shrink-0",children:c.status})]})}),(0,b.jsx)(h.CardContent,{children:(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:c.lastSeenAt?new Date(c.lastSeenAt).toLocaleString():"Never seen"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(d=!!c.pendingUpdateVersion||am.has(a),e=M&&(!c.cliVersion||!(0,o.semverGte)(c.cliVersion,M)),d?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(s.Loader2,{className:"size-3 animate-spin mr-1"}),"Updating..."]}):e?(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>ah("Update daemon",`This will update the daemon on "${j}" to the latest CLI version. The daemon will restart during the update.`,async()=>{await ak(c.runtimes[0].id,a)},{label:"Update",loadingLabel:"Updating...",variant:"default"}),children:"Update"}):null),(i=c.pendingRescan||an.has(a),"online"!==c.status?null:i?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(t.RefreshCw,{className:"size-3 animate-spin mr-1"}),"Rescanning..."]}):(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>ah("Rescan runtimes",`This will restart the daemon on "${j}" to re-detect available runtimes (Claude Code, Codex, OpenCode).`,async()=>{await al(c.runtimes[0].id,a)},{label:"Rescan",loadingLabel:"Triggering...",variant:"default"}),children:[(0,b.jsx)(t.RefreshCw,{className:"size-3 mr-1"}),"Rescan"]})),(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground h-6 px-2 hover:text-destructive",onClick:()=>{ah("Remove machine",`This will remove "${j}" and all its runtimes. Agents using these runtimes will be unlinked.`,async()=>{await y(a)})},children:"Remove"})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.runtimes.map(a=>(0,b.jsxs)(g.Badge,{variant:"secondary",className:"gap-1.5",children:[(0,b.jsx)(q.ProviderLogo,{provider:a.provider,className:"h-3.5 w-3.5"}),a.provider,a.metadata?.version?(0,b.jsx)("span",{className:"text-muted-foreground font-normal",children:String(a.metadata.version)}):null]},a.id))}),"online"!==c.status&&(0,b.jsxs)("div",{className:"pt-1.5 border-t border-border/50",children:[(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground mb-1.5",children:"Bring this machine online:"}),(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-md bg-muted px-2.5 py-1.5 font-mono text-[11px] text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:()=>{navigator.clipboard.writeText(`${p.CLI_CMD} daemon start`),k.toast.success("Copied to clipboard")},title:"Click to copy",children:[(0,b.jsx)("span",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2.5s_infinite] bg-linear-to-r from-transparent via-(--shimmer-peak) to-transparent"}),(0,b.jsxs)("span",{className:"relative",children:[p.CLI_CMD," daemon start"]})]})]})]})})]},a)})})}),(0,b.jsx)(i.Sheet,{open:E,onOpenChange:a=>{F(a),a||H("")},children:(0,b.jsxs)(i.SheetContent,{className:"data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:rounded-xl data-[side=right]:sm:border",children:[(0,b.jsxs)(i.SheetHeader,{children:[(0,b.jsx)(i.SheetTitle,{children:"Connect a machine"}),(0,b.jsx)(i.SheetDescription,{children:"Your machine runs AI agents locally using Claude Code, Codex, or OpenCode."})]}),(0,b.jsx)(i.SheetBody,{children:(0,b.jsx)(u.ConnectMachineSteps,{generatedToken:G,generatingToken:I,onGenerateToken:aj,registered:K})})]})}),(0,b.jsx)(j.ConfirmDialog,{open:S,onOpenChange:T,title:U,description:W,confirmLabel:Y,loadingLabel:$,confirmVariant:aa,loading:ac,onConfirm:ai})]})}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0yeokgf._.js.map
|
|
@@ -198,7 +198,7 @@ Specifically stop when:
|
|
|
198
198
|
- The task requires architectural decisions with multiple valid approaches
|
|
199
199
|
- You need to understand code beyond what was provided
|
|
200
200
|
- You feel uncertain about whether your approach is correct
|
|
201
|
-
- The task involves changes the request didn't anticipate`,E=[{id:"software-dev",label:"Software Development",description:"Build and ship code with a coordinated dev
|
|
201
|
+
- The task involves changes the request didn't anticipate`,E=[{id:"software-dev",label:"Software Development",description:"Build and ship code with a coordinated dev company",icon:"🖥",members:[{role:"leader",description:"Coordinates work, summarizes results, and replies to you",instructions:z},{role:"engineer",description:"Writes code, runs tests, and verifies implementations",instructions:D},{role:"researcher",description:"Reads code, explores APIs, and gathers technical context",instructions:A}]},{id:"content-research",label:"Content & Research",description:"Research topics, write content, and manage publishing",icon:"📝",members:[{role:"leader",description:"Coordinates work, shapes content direction, and delivers output",instructions:z},{role:"researcher",description:"Finds sources, verifies facts, and organizes references",instructions:B},{role:"assistant",description:"Handles formatting, publishing workflows, and follow-ups",instructions:`You are the content operations specialist. You handle formatting, publishing workflows, follow-ups with editors/platforms, and keep the content pipeline moving.
|
|
202
202
|
|
|
203
203
|
## Core Principle
|
|
204
204
|
Content gets published on time, in the right format, to the right channels. You are the team's production memory.
|
|
@@ -231,7 +231,7 @@ Report additionally:
|
|
|
231
231
|
- Don't guess at platform credentials or publishing settings — ask.
|
|
232
232
|
- Don't make editorial decisions (tone, angle, headline) — that's the leader's or researcher's domain.
|
|
233
233
|
|
|
234
|
-
${y}`}]},{id:"productivity",label:"General Productivity",description:"A lean
|
|
234
|
+
${y}`}]},{id:"productivity",label:"General Productivity",description:"A lean company for everyday tasks and communications",icon:"🏢",members:[{role:"leader",description:"Handles tasks, coordinates work, and replies to you",instructions:z},{role:"assistant",description:"Manages follow-ups, reminders, and administrative work",instructions:`You are the operations specialist. You handle email follow-ups, reminders, scheduling, and administrative tasks that keep things running smoothly.
|
|
235
235
|
|
|
236
236
|
## Core Principle
|
|
237
237
|
Nothing falls through the cracks. You are the team's operational memory — tracking what needs to happen, when, and following up until it's done.
|
|
@@ -270,7 +270,7 @@ Report additionally:
|
|
|
270
270
|
- Don't draft emails longer than necessary.
|
|
271
271
|
- Don't guess at recipient addresses or details — ask if unsure.
|
|
272
272
|
|
|
273
|
-
${y}`}]},{id:"full-team",label:"Full
|
|
273
|
+
${y}`}]},{id:"full-team",label:"Full Company",description:"All roles covered — dev, research, and operations",icon:"🚀",members:[{role:"leader",description:"Coordinates the team and communicates with you",instructions:z},{role:"researcher",description:"Gathers context, reads docs, and organizes findings",instructions:C},{role:"engineer",description:"Writes code, runs tests, and checks implementations",instructions:D},{role:"assistant",description:"Handles follow-ups, reminders, and task tracking",instructions:`You are the operations specialist. You handle email follow-ups, reminders, scheduling, and administrative tasks that keep the team running smoothly.
|
|
274
274
|
|
|
275
275
|
## Core Principle
|
|
276
276
|
Nothing falls through the cracks. You are the team's operational memory — tracking what needs to happen, when, and following up until it's done.
|
|
@@ -309,6 +309,6 @@ Report additionally:
|
|
|
309
309
|
- Don't draft emails longer than necessary.
|
|
310
310
|
- Don't guess at recipient addresses or details — ask if unsure.
|
|
311
311
|
|
|
312
|
-
${y}`}]},{id:"custom",label:"Custom",description:"Choose your own team size and roles",icon:"⚙️",members:[{role:"leader",description:"Coordinates work and replies to you",instructions:z}]}];function F(a){let b=new Set,c=[];for(let d=0;d<a;d++){let a,d=0;do a=u({dictionaries:[v],length:1,style:"capital"}),d++;while(b.has(a)&&d<100)b.add(a),c.push({name:a,avatarUrl:(0,w.serializeAvatarConfig)((0,w.randomConfig)())})}return c}function G({selected:a,onSelect:c,onBrowseTemplates:d}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-sm font-medium",children:"What will your studio focus on?"}),d&&(0,b.jsx)("button",{type:"button",onClick:d,className:"text-[11px] text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2",children:"Browse templates"})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:E.map((d,e)=>(0,b.jsxs)("button",{onClick:()=>c(d.id),className:(0,q.cn)("flex flex-col items-start gap-1 rounded-lg border p-4 text-left transition-all hover:border-foreground/30",a===d.id?"border-foreground/50 bg-muted/50":"border-border",e===E.length-1&&E.length%2!=0&&"sm:col-span-2"),children:[(0,b.jsx)("span",{className:"text-lg",children:d.icon}),(0,b.jsx)("span",{className:"text-sm font-medium",children:d.label}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-tight",children:d.description}),(0,b.jsxs)("span",{className:"text-[10px] text-muted-foreground/70 mt-1",children:[d.members.length," teammate",d.members.length>1?"s":""]})]},d.id))})]})}var H=a.i(439882),I=a.i(461794),J=a.i(354498),K=a.i(74414);let L={leader:"Lead",researcher:"Researcher",engineer:"Engineer",assistant:"Assistant"};function M({members:a,runtimes:c,onShuffle:d,onAssignRuntime:f}){let g=c.length>1&&f;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-sm font-medium",children:"Your team"}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",onClick:d,className:"h-7 text-xs gap-1.5",children:[(0,b.jsx)(I.RefreshCw,{className:"size-3"}),"Shuffle"]})]}),(0,b.jsx)("div",{className:(0,q.cn)("grid gap-3 grid-cols-1",2===a.length&&"sm:grid-cols-2",3===a.length&&"sm:grid-cols-2 md:grid-cols-3",a.length>=4&&"sm:grid-cols-2 md:grid-cols-4"),children:a.map((a,d)=>{let e,h=a.avatarUrl?(0,w.parseAvatarUrl)(a.avatarUrl):null;return(0,b.jsxs)(H.Card,{size:"sm",className:"flex flex-col px-3 py-4 gap-2 h-full",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[h?(0,b.jsx)(w.AvatarRenderer,{config:h,size:36,className:"rounded-xl shrink-0"}):(0,b.jsx)("div",{className:"size-9 rounded-xl bg-muted flex items-center justify-center text-sm font-semibold shrink-0",children:a.name.charAt(0)}),(0,b.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground bg-muted/60 px-1.5 py-0.5 rounded",children:L[a.role]})]})]}),(0,b.jsxs)("p",{className:"text-[10px] text-muted-foreground/70 font-mono truncate",children:[a.emailHandle||a.name.toLowerCase(),"@alook.ai"]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug flex-1",children:a.description}),g&&(e=c.find(b=>b.id===a.runtimeId),(0,b.jsx)("div",{className:"mt-1",children:(0,b.jsxs)(J.Select,{value:a.runtimeId,onValueChange:a=>{a&&f(d,a)},children:[(0,b.jsx)(J.SelectTrigger,{className:"h-7 text-[11px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5 truncate",children:[e&&(0,b.jsx)(K.ProviderLogo,{provider:e.provider||"",className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:e?.provider||e?.runtime_mode||"Select"})]})}),(0,b.jsx)(J.SelectPopup,{children:c.map(a=>(0,b.jsx)(J.SelectItem,{value:a.id,children:a.provider||a.runtime_mode},a.id))})]})}))]},d)})})]})}var N=a.i(588339),O=a.i(881503);a.s(["StudioOnboardingClient",0,function({workspaceId:a,workspaceSlug:i,workspaceName:q,initialTemplate:r}){let s=(0,d.useRouter)(),t=!a,[u,v]=(0,c.useState)(a),w=(0,c.useRef)(u);(0,c.useEffect)(()=>{w.current=u},[u]);let[x,y]=(0,c.useState)([]),[z,A]=(0,c.useState)(!!a),[B,C]=(0,c.useState)(r?r.baseScenario:null),[D,H]=(0,c.useState)(t||"Personal"===q?"":q),[I,J]=(0,c.useState)(null),[K,L]=(0,c.useState)(!1),[P,Q]=(0,c.useState)([]),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)(""),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(!1),[Z,$]=(0,c.useState)(!1),_=x.filter(a=>"online"===a.status),aa=_.length>0,ab=new Set(_.map(a=>a.daemon_id).filter(Boolean)).size;(0,c.useEffect)(()=>{u&&(0,N.listRuntimes)(u).then(y).catch(()=>{}).finally(()=>A(!1))},[u]);let ac=(0,c.useCallback)(a=>{let b=w.current;if("runtime.registered"===a.type){Y(!0);let c=a.workspaceId;c&&!b?(v(c),(0,N.listRuntimes)(c).then(y).catch(()=>{})):b&&(0,N.listRuntimes)(b).then(y).catch(()=>{})}else if("runtime.status"===a.type&&a.payload?.status==="online"){Y(!0);let a=w.current;a&&(0,N.listRuntimes)(a).then(y).catch(()=>{})}},[]);(0,O.useUserWs)(ac),(0,c.useEffect)(()=>{let a=_[0]?.id;a&&Q(b=>0!==b.length&&b.some(a=>!a.runtimeId)?b.map(b=>b.runtimeId?b:{...b,runtimeId:a}):b)},[_]);let ad=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/studios/check-handles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:a})});if(!b.ok)return null;return await b.json()}catch{return null}},[]);(0,c.useEffect)(()=>{if(!r||z||P.length>0)return;let a=F(r.members.length),b=_[0]?.id||"",c=r.members.map((c,d)=>({name:a[d].name,role:c.role,description:c.description,instructions:c.instructions,avatarUrl:a[d].avatarUrl,runtimeId:b}));Q(c),ad(c.map(a=>a.name)).then(a=>{a&&Q(b=>b.map(b=>{let c=a.find(a=>a.name===b.name);return c?{...b,emailHandle:c.handle}:b}))})},[r,z]);let ae=async a=>{C(a);let b=E.find(b=>b.id===a),c=F(b.members.length),d=_[0]?.id||"",e=b.members.map((a,b)=>({name:c[b].name,role:a.role,description:a.description,instructions:a.instructions,avatarUrl:c[b].avatarUrl,runtimeId:d}));Q(e);let f=await ad(e.map(a=>a.name));f&&Q(a=>a.map(a=>{let b=f.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},af=async()=>{let a=F(P.length),b=P.map((b,c)=>({...b,name:a[c].name,avatarUrl:a[c].avatarUrl,emailHandle:void 0}));Q(b);let c=await ad(b.map(a=>a.name));c&&Q(a=>a.map(a=>{let b=c.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},ag=async()=>{if(D.trim()){L(!0),J(null);try{let a=u?`/api/studios/check-name?name=${encodeURIComponent(D.trim())}&workspace_id=${u}`:`/api/studios/check-name?name=${encodeURIComponent(D.trim())}`,b=await fetch(a),c=await b.json();J(c.available)}catch{J(null),n.toast.error("Failed to check name availability")}finally{L(!1)}}},ah=(0,c.useCallback)(async()=>{W(!0);try{let a=await (0,N.createMachineToken)("cli",u||void 0);U(a.token)}catch{n.toast.error("Failed to generate token")}finally{W(!1)}},[u]),ai=async()=>{S(!0);try{if(!u){n.toast.error("Please connect a computer first"),S(!1);return}let a=await fetch("/api/studios",{method:"POST",headers:{"Content-Type":"application/json","X-Workspace-ID":u},body:JSON.stringify({name:D.trim()||void 0,scenario:B,members:P.map(a=>({name:a.name,role:a.role,runtime_id:a.runtimeId,description:a.description,instructions:a.instructions,avatar_url:a.avatarUrl||null,email_handle:a.emailHandle||void 0}))})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to create studio")}let b=await a.json();n.toast.success("Studio created!"),s.push(`/w/${b.workspace.slug}/agents/${b.leader_agent_id}`)}catch(a){n.toast.error(a instanceof Error?a.message:"Failed to create studio"),S(!1)}},aj=t?D.trim()&&!0===I:!1!==I,ak=B&&P.length>0&&P.every(a=>a.runtimeId)&&aj&&(aa||X);return B?(0,b.jsxs)("div",{className:"relative flex min-h-dvh flex-col items-center p-6",children:[(0,b.jsxs)("div",{className:"absolute top-4 left-4 flex items-center gap-1",children:[(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>s.push("/workspaces"),children:[(0,b.jsx)(m,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,b.jsx)("span",{className:"text-muted-foreground/40",children:"/"}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>C(null),children:[(0,b.jsx)(l.ArrowLeft,{className:"size-3 mr-1.5"}),"Back"]})]}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 right-4 text-xs text-muted-foreground",onClick:()=>(0,o.signOut)({fetchOptions:{onSuccess:()=>s.push("/sign-in")}}),children:[(0,b.jsx)(k.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),(0,b.jsxs)("div",{className:"w-full max-w-3xl space-y-8 py-12",children:[(0,b.jsxs)("div",{className:"text-center space-y-1",children:[(0,b.jsx)("h1",{className:"text-lg font-semibold",children:t?"Create a new studio":"Set up your AI team"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Name your team, connect a machine, and start working."})]}),z?(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("h2",{className:"text-sm font-medium",children:"Studio name"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(f.Input,{value:D,onChange:a=>{H(a.target.value),J(null)},placeholder:"e.g. Atlas Lab",className:"text-sm"}),(0,b.jsx)(e.Button,{variant:"outline",size:"sm",onClick:ag,disabled:!D.trim()||K,className:"shrink-0",children:K?(0,b.jsx)(g.Loader2,{className:"size-3 animate-spin"}):"Check"})]}),!1===I&&(0,b.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,b.jsx)(j,{className:"size-3"})," Name is taken, try another"]}),(0,b.jsxs)("p",{className:"text-[10px] text-muted-foreground flex items-center gap-1.5",children:[!0===I&&(0,b.jsxs)("span",{className:"text-emerald-600 flex items-center gap-0.5",children:[(0,b.jsx)(h.CheckCircle2,{className:"size-3"})," Available"]}),!0===I&&(0,b.jsx)("span",{children:"·"}),t?(0,b.jsx)("span",{children:"Required — pick a name for your new studio."}):(0,b.jsx)("span",{children:"Optional — you can always rename later."})]})]}),(0,b.jsx)(M,{members:P,runtimes:_,onShuffle:af,onAssignRuntime:(a,b)=>{Q(c=>c.map((c,d)=>d===a?{...c,runtimeId:b}:c))}}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("h2",{className:"text-sm font-medium",children:"Connect a computer"}),aa?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("p",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[(0,b.jsx)(h.CheckCircle2,{className:"size-3"})," ",ab," computer",ab>1?"s":""," connected"]}),(0,b.jsx)("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>$(a=>!a),children:"Register another computer"})]}),Z&&(0,b.jsx)(p.ConnectMachineSteps,{generatedToken:T,generatingToken:V,onGenerateToken:ah,registered:X})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your studio needs a connected computer to run tasks."}),(0,b.jsx)(p.ConnectMachineSteps,{generatedToken:T,generatingToken:V,onGenerateToken:ah,registered:X})]})]}),(0,b.jsx)(e.Button,{onClick:ai,disabled:!ak||R,className:"w-full",children:R?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Loader2,{className:"size-4 animate-spin mr-2"}),"Creating studio..."]}):t&&D.trim()&&!0!==I?"Check studio name first":"Create studio"})]})]})]}):(0,b.jsxs)("div",{className:"relative flex min-h-dvh flex-col items-center justify-center p-6",children:[(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 left-4 text-xs text-muted-foreground",onClick:()=>s.push("/workspaces"),children:[(0,b.jsx)(m,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 right-4 text-xs text-muted-foreground",onClick:()=>(0,o.signOut)({fetchOptions:{onSuccess:()=>s.push("/sign-in")}}),children:[(0,b.jsx)(k.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),(0,b.jsxs)("div",{className:"w-full max-w-3xl space-y-8",children:[(0,b.jsx)("div",{className:"text-center",children:(0,b.jsx)("h1",{className:"text-lg font-semibold",children:"Pick a scenario to get started"})}),(0,b.jsx)(G,{selected:B,onSelect:ae,onBrowseTemplates:()=>s.push(u?`/templates?workspace_id=${u}`:"/templates")}),u&&(0,b.jsx)("div",{className:"flex justify-center pt-2",children:(0,b.jsx)("button",{type:"button",onClick:()=>{document.cookie=`skip_init=${u};path=/;max-age=86400`,s.push(`/w/${i}/home`)},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip"})})]})]})}],927981)}];
|
|
312
|
+
${y}`}]},{id:"custom",label:"Custom",description:"Choose your own company size and roles",icon:"⚙️",members:[{role:"leader",description:"Coordinates work and replies to you",instructions:z}]}];function F(a){let b=new Set,c=[];for(let d=0;d<a;d++){let a,d=0;do a=u({dictionaries:[v],length:1,style:"capital"}),d++;while(b.has(a)&&d<100)b.add(a),c.push({name:a,avatarUrl:(0,w.serializeAvatarConfig)((0,w.randomConfig)())})}return c}function G({selected:a,onSelect:c,onBrowseTemplates:d}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"What will your company focus on?"}),d&&(0,b.jsx)("button",{type:"button",onClick:d,className:"text-[11px] text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2",children:"Browse templates"})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:E.map((d,e)=>(0,b.jsxs)("button",{onClick:()=>c(d.id),className:(0,q.cn)("flex flex-col items-start gap-1 rounded-lg border p-4 text-left transition-all hover:border-foreground/30",a===d.id?"border-foreground/50 bg-muted/50":"border-border",e===E.length-1&&E.length%2!=0&&"sm:col-span-2"),children:[(0,b.jsx)("span",{className:"text-lg",children:d.icon}),(0,b.jsx)("span",{className:"text-sm font-medium",children:d.label}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-tight",children:d.description}),(0,b.jsxs)("span",{className:"text-[10px] text-muted-foreground/70 mt-1",children:[d.members.length," agent",d.members.length>1?"s":""]})]},d.id))})]})}var H=a.i(439882),I=a.i(461794),J=a.i(354498),K=a.i(74414);let L={leader:"Lead",researcher:"Researcher",engineer:"Engineer",assistant:"Assistant"};function M({members:a,runtimes:c,onShuffle:d,onAssignRuntime:f}){let g=c.length>1&&f;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Your company"}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",onClick:d,className:"h-7 text-xs gap-1.5",children:[(0,b.jsx)(I.RefreshCw,{className:"size-3"}),"Shuffle"]})]}),(0,b.jsx)("div",{className:(0,q.cn)("grid gap-3 grid-cols-1",2===a.length&&"sm:grid-cols-2",3===a.length&&"sm:grid-cols-2 md:grid-cols-3",a.length>=4&&"sm:grid-cols-2 md:grid-cols-4"),children:a.map((a,d)=>{let e,h=a.avatarUrl?(0,w.parseAvatarUrl)(a.avatarUrl):null;return(0,b.jsxs)(H.Card,{size:"sm",className:"flex flex-col px-3 py-4 gap-2 h-full",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[h?(0,b.jsx)(w.AvatarRenderer,{config:h,size:36,className:"rounded-xl shrink-0"}):(0,b.jsx)("div",{className:"size-9 rounded-xl bg-muted flex items-center justify-center text-sm font-semibold shrink-0",children:a.name.charAt(0)}),(0,b.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground bg-muted/60 px-1.5 py-0.5 rounded",children:L[a.role]})]})]}),(0,b.jsxs)("p",{className:"text-[10px] text-muted-foreground/70 font-mono truncate",children:[a.emailHandle||a.name.toLowerCase(),"@alook.ai"]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug flex-1",children:a.description}),g&&(e=c.find(b=>b.id===a.runtimeId),(0,b.jsx)("div",{className:"mt-1",children:(0,b.jsxs)(J.Select,{value:a.runtimeId,onValueChange:a=>{a&&f(d,a)},children:[(0,b.jsx)(J.SelectTrigger,{className:"h-7 text-[11px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5 truncate",children:[e&&(0,b.jsx)(K.ProviderLogo,{provider:e.provider||"",className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:e?.provider||e?.runtime_mode||"Select"})]})}),(0,b.jsx)(J.SelectPopup,{children:c.map(a=>(0,b.jsx)(J.SelectItem,{value:a.id,children:a.provider||a.runtime_mode},a.id))})]})}))]},d)})})]})}var N=a.i(588339),O=a.i(881503);a.s(["StudioOnboardingClient",0,function({workspaceId:a,workspaceSlug:i,workspaceName:q,initialTemplate:r}){let s=(0,d.useRouter)(),t=!a,[u,v]=(0,c.useState)(a),w=(0,c.useRef)(u);(0,c.useEffect)(()=>{w.current=u},[u]);let[x,y]=(0,c.useState)([]),[z,A]=(0,c.useState)(!!a),[B,C]=(0,c.useState)(r?r.baseScenario:null),[D,H]=(0,c.useState)(t||"Personal"===q?"":q),[I,J]=(0,c.useState)(null),[K,L]=(0,c.useState)(!1),[P,Q]=(0,c.useState)([]),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)(""),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(!1),[Z,$]=(0,c.useState)(!1),_=x.filter(a=>"online"===a.status),aa=_.length>0,ab=new Set(_.map(a=>a.daemon_id).filter(Boolean)).size;(0,c.useEffect)(()=>{u&&(0,N.listRuntimes)(u).then(y).catch(()=>{}).finally(()=>A(!1))},[u]);let ac=(0,c.useCallback)(a=>{let b=w.current;if("runtime.registered"===a.type){Y(!0);let c=a.workspaceId;c&&!b?(v(c),(0,N.listRuntimes)(c).then(y).catch(()=>{})):b&&(0,N.listRuntimes)(b).then(y).catch(()=>{})}else if("runtime.status"===a.type&&a.payload?.status==="online"){Y(!0);let a=w.current;a&&(0,N.listRuntimes)(a).then(y).catch(()=>{})}},[]);(0,O.useUserWs)(ac),(0,c.useEffect)(()=>{let a=_[0]?.id;a&&Q(b=>0!==b.length&&b.some(a=>!a.runtimeId)?b.map(b=>b.runtimeId?b:{...b,runtimeId:a}):b)},[_]);let ad=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/studios/check-handles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:a})});if(!b.ok)return null;return await b.json()}catch{return null}},[]);(0,c.useEffect)(()=>{if(!r||z||P.length>0)return;let a=F(r.members.length),b=_[0]?.id||"",c=r.members.map((c,d)=>({name:a[d].name,role:c.role,description:c.description,instructions:c.instructions,avatarUrl:a[d].avatarUrl,runtimeId:b}));Q(c),ad(c.map(a=>a.name)).then(a=>{a&&Q(b=>b.map(b=>{let c=a.find(a=>a.name===b.name);return c?{...b,emailHandle:c.handle}:b}))})},[r,z]);let ae=async a=>{C(a);let b=E.find(b=>b.id===a),c=F(b.members.length),d=_[0]?.id||"",e=b.members.map((a,b)=>({name:c[b].name,role:a.role,description:a.description,instructions:a.instructions,avatarUrl:c[b].avatarUrl,runtimeId:d}));Q(e);let f=await ad(e.map(a=>a.name));f&&Q(a=>a.map(a=>{let b=f.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},af=async()=>{let a=F(P.length),b=P.map((b,c)=>({...b,name:a[c].name,avatarUrl:a[c].avatarUrl,emailHandle:void 0}));Q(b);let c=await ad(b.map(a=>a.name));c&&Q(a=>a.map(a=>{let b=c.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},ag=async()=>{if(D.trim()){L(!0),J(null);try{let a=u?`/api/studios/check-name?name=${encodeURIComponent(D.trim())}&workspace_id=${u}`:`/api/studios/check-name?name=${encodeURIComponent(D.trim())}`,b=await fetch(a),c=await b.json();J(c.available)}catch{J(null),n.toast.error("Failed to check name availability")}finally{L(!1)}}},ah=(0,c.useCallback)(async()=>{W(!0);try{let a=await (0,N.createMachineToken)("cli",u||void 0);U(a.token)}catch{n.toast.error("Failed to generate token")}finally{W(!1)}},[u]),ai=async()=>{S(!0);try{if(!u){n.toast.error("Please connect a computer first"),S(!1);return}let a=await fetch("/api/studios",{method:"POST",headers:{"Content-Type":"application/json","X-Workspace-ID":u},body:JSON.stringify({name:D.trim()||void 0,scenario:B,members:P.map(a=>({name:a.name,role:a.role,runtime_id:a.runtimeId,description:a.description,instructions:a.instructions,avatar_url:a.avatarUrl||null,email_handle:a.emailHandle||void 0}))})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to create company")}let b=await a.json();n.toast.success("Company created!"),s.push(`/w/${b.workspace.slug}/agents/${b.leader_agent_id}`)}catch(a){n.toast.error(a instanceof Error?a.message:"Failed to create company"),S(!1)}},aj=t?D.trim()&&!0===I:!1!==I,ak=B&&P.length>0&&P.every(a=>a.runtimeId)&&aj&&(aa||X);return B?(0,b.jsxs)("div",{className:"relative flex min-h-dvh flex-col items-center p-6",children:[(0,b.jsxs)("div",{className:"absolute top-4 left-4 flex items-center gap-1",children:[(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>s.push("/workspaces"),children:[(0,b.jsx)(m,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,b.jsx)("span",{className:"text-muted-foreground/40",children:"/"}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>C(null),children:[(0,b.jsx)(l.ArrowLeft,{className:"size-3 mr-1.5"}),"Back"]})]}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 right-4 text-xs text-muted-foreground",onClick:()=>(0,o.signOut)({fetchOptions:{onSuccess:()=>s.push("/sign-in")}}),children:[(0,b.jsx)(k.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),(0,b.jsxs)("div",{className:"w-full max-w-3xl space-y-10 py-14",children:[(0,b.jsx)("div",{className:"text-center",children:(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"Build your company"})}),z?(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Company name"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(f.Input,{value:D,onChange:a=>{H(a.target.value),J(null)},placeholder:"e.g. Atlas Lab",className:"text-sm"}),(0,b.jsx)(e.Button,{variant:"outline",size:"sm",onClick:ag,disabled:!D.trim()||K,className:"shrink-0",children:K?(0,b.jsx)(g.Loader2,{className:"size-3 animate-spin"}):"Check"})]}),!1===I&&(0,b.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,b.jsx)(j,{className:"size-3"})," Name is taken, try another"]}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[!0===I&&(0,b.jsxs)("span",{className:"text-emerald-600 flex items-center gap-0.5",children:[(0,b.jsx)(h.CheckCircle2,{className:"size-3"})," Available"]}),!0===I&&(0,b.jsx)("span",{children:"·"}),t?(0,b.jsx)("span",{children:"Required — pick a name for your company."}):(0,b.jsx)("span",{children:"Optional — you can always rename later."})]})]}),(0,b.jsx)(M,{members:P,runtimes:_,onShuffle:af,onAssignRuntime:(a,b)=>{Q(c=>c.map((c,d)=>d===a?{...c,runtimeId:b}:c))}}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Connect a computer"}),aa?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("p",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[(0,b.jsx)(h.CheckCircle2,{className:"size-3"})," ",ab," computer",ab>1?"s":""," connected"]}),(0,b.jsx)("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>$(a=>!a),children:"Register another"})]}),Z&&(0,b.jsx)("div",{className:"rounded-xl bg-muted/40 p-5",children:(0,b.jsx)(p.ConnectMachineSteps,{generatedToken:T,generatingToken:V,onGenerateToken:ah,registered:X})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your company needs a connected computer to run tasks."}),(0,b.jsx)("div",{className:"rounded-xl bg-muted/40 p-5",children:(0,b.jsx)(p.ConnectMachineSteps,{generatedToken:T,generatingToken:V,onGenerateToken:ah,registered:X})})]})]}),(0,b.jsx)(e.Button,{onClick:ai,disabled:!ak||R,className:"w-full",size:"lg",children:R?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Loader2,{className:"size-4 animate-spin mr-2"}),"Launching..."]}):t&&D.trim()&&!0!==I?"Check company name first":"Launch company"})]})]})]}):(0,b.jsxs)("div",{className:"relative flex min-h-dvh flex-col items-center justify-center p-6",children:[(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 left-4 text-xs text-muted-foreground",onClick:()=>s.push("/workspaces"),children:[(0,b.jsx)(m,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,b.jsxs)(e.Button,{variant:"ghost",size:"sm",className:"absolute top-4 right-4 text-xs text-muted-foreground",onClick:()=>(0,o.signOut)({fetchOptions:{onSuccess:()=>s.push("/sign-in")}}),children:[(0,b.jsx)(k.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),(0,b.jsxs)("div",{className:"w-full max-w-3xl space-y-8",children:[(0,b.jsxs)("div",{className:"text-center space-y-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"What will your company do?"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Pick a focus area. You can always add more agents later."})]}),(0,b.jsx)(G,{selected:B,onSelect:ae,onBrowseTemplates:()=>s.push(u?`/templates?workspace_id=${u}`:"/templates")}),u&&(0,b.jsx)("div",{className:"flex justify-center pt-2",children:(0,b.jsx)("button",{type:"button",onClick:()=>{document.cookie=`skip_init=${u};path=/;max-age=86400`,s.push(`/w/${i}/home`)},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip for now"})})]})]})}],927981)}];
|
|
313
313
|
|
|
314
314
|
//# sourceMappingURL=src_web_src_app_%28app%29_studio_new_client_tsx_0zandi2._.js.map
|