@alook/app 0.0.109 → 0.0.111
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 +60 -24
- package/bundled/web/.open-next/.build/durable-objects/queue.js +5 -5
- package/bundled/web/.open-next/assets/BUILD_ID +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0t3u2c6n51rlj.js → 01apep3k2lhu1.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/05k5yq2079y4m.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0y4~yxd1iyiue.js → 06_jx3ncn42qx.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{032abedppun95.js → 07n8~bkabw8tk.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{09_5h3duged1-.js → 0c5ce61j3ps45.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{13g3lr47fmukl.js → 0feon~hbkd1t8.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0kjdnm3_zoplm.js +63 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0l7699a2nu_ob.css +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0sb6j-6nlwzlz.js +3 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0s~-o9703a6o~.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0~tcqxgka2xol.js → 0tw05tsn2c~1m.js} +15 -15
- package/bundled/web/.open-next/assets/_next/static/chunks/0wnbo93.rhzuf.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0xvr_746pz3cv.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0fkuoe3g9qc_4.js → 0yv.twub1_eip.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0aiuwip8_7r1i.js → 13bvgms2h_9ud.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/13ogh4gvbsvjk.js +62 -0
- package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/_global-error.cache +1 -1
- package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/_not-found.cache +1 -1
- package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/device.cache +1 -1
- package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/privacy.cache +1 -1
- package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/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 +12 -5
- 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/prerender-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]/flags/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/api/agent-links/[id]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agent-links/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/access/[userId]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/access/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/active-tasks/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/activity/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/chat-init/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/conversation/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/conversations/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/sync/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/test/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/approve/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/stop/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/pin/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/skills/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/whitelist/[whitelistId]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/whitelist/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/workspace/browse/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/active-task-counts/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/active-tasks/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/pins/reorder/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/pins/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/recruit/route.js +9 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/route.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/sidebar/reorder/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/[id]/content/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/[id]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/upload/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/auth/[...all]/route.js +6 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/calendar/[id]/route.js +8 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/calendar/route.js +8 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/[id]/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/reorder/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/cli/latest-version/route.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/config/min-version/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/config/model-options/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/active-task/route.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/buffered-messages/[messageId]/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/buffered-messages/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/init/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/messages/route.js +7 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/check-fresh/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/deregister/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/heartbeat/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/register/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/skills/sync/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/sweep/route.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/complete/route.js +10 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/fail/route.js +10 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/messages/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/progress/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/start/route.js +10 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/status/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/supersede/route.js +10 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/poll/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/workspace/report/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/attachment/[index]/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/body/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/raw/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/thread/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/notify/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/send/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/upload/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/[messageId]/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/count/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/count/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/read/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/read-all/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/invite/[token]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/[id]/comments/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/[id]/route.js +9 -8
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/route.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/[id]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/activate/route.js +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/me/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/meeting/callback/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/members/me/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/[runtimeId]/rescan/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/[runtimeId]/update/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/machine/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/check-handles/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/check-name/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/route.js +10 -9
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/messages/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/retry/route.js +8 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/traces/[traceId]/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/traces/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/invites/[inviteId]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/invites/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/members/[memberId]/route.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/members/route.js +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/overview/route.js +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/route.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/ws/token/route.js +6 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/device/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/onboard.md/route.js +2 -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/privacy/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/[root-of-the-server]__0-tysll._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0-w8cvr._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0.-ex.r._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__00kdrdq._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__00t-lv7._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__01pm5bg._.js +101 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__03xk-80._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__04-aiih._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__04ibu3u._.js +19 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__05y4ji4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__061r~5n._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__063bu6a._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__06kj~8s._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__088o0os._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__096a7~5._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0_52q3p._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0_a1bfb._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0a3~vl5._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ae.~ic._.js +19 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0auk5r9._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0bj0jcs._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0bzc7r~._.js +81 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0c3-~q~._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0d0_qit._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0eafbpy._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ee3fyc._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ejdw~f._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0eusp4j._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0f6g-yw._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0fg5lyo._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0fveomh._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0g0wi2~._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0hcjev6._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0hd86qt._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0i0ukpl._.js +101 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0intft0._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0j5fdu2._.js +101 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0l5zxrt._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0n42~r6._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0o7orcx._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0oj5al3._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0oj8ury._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0phdbto._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0qhsr9q._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0qrw9-l._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0rg~ky_._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0rkhrs3._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0sc6-vs._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0sf_9ve._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0tciisw._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0tgz16m._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0u0~aqt._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0uqtpq.._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0x.v~yr._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0xp0-1_._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0xtab4g._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0y4l-ox._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0yd9_c4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0zhaznf._.js +19 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0zv9j_e._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0~a64yc._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0~otgta._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__10x0i39._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__116npth._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__11cl4~p._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__07_2txj._.js → [root-of-the-server]__11ury1h._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__122~iy7._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__12ju08.._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__13mvgdw._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +117 -113
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_00_9pus._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_02.f31i._.js +5 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_025fm6r._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_02~mjb4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_03ju0js._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_06imn.m._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_07hpwgw._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_08xh_f8._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_08y2ta9._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_09ivzvb._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0_jw-5d._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0_kfe3c._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0ahwrti._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0b4pq8.._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0d6rwbr._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0fhlxv6._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_089u_am._.js → _0fj.mo3._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0h-fa04._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0il0z_b._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_0es3xrw._.js → _0jj44iu._.js} +3 -19
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0l1rr.g._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_0d5xg0u._.js → _0m4uqwa._.js} +3 -19
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_0r~swxs._.js → _0mibx4k._.js} +3 -19
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_07n_1wf._.js → _0oewl7j._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0ozui8c._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0p_10om._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0r04wj_._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0r0h9so._.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0r4pg7i._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0ri6_n4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0zk1_mu._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_00clbi5._.js → _0zt3sdk._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_102qunz._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_12i.jt7._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_13lep.0._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_web_src_lib_services_0yvxfxt._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0_vmy~.._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0a.f58h._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0i8fzgr._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0tv~geg._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +117 -113
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0orn3gz._.js → _0.wd8xr._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_07m_9fn._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0_.06ux._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0amp3a1._.js → _0a0h6kk._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0gbiien._.js +65 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0goqyet._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0h.i9j.._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0mo4bbn._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0p44d2o._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0r_ppn9._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0r_z7cy._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0ryz7_7._.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0sby7nn._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0.bg4hm._.js → _0t50c_j._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0v378m.._.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0viys_q._.js → _0y7yqet._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0zgwjzh._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_10lo-_p._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0zbzypo._.js → _11jpe7z._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0~23g-y._.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_agents_[id]_email_page_tsx_09mq1-g._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_agents_[id]_layout_tsx_0juu2um._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_00xgo_-._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_0nj0euq._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{src_web_src_components_avatar_04z95~4._.js → src_web_src_components_avatar_0a0h8en._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_issues_issue-sheet_tsx_02fma1.._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_typewriter-visual_tsx_0lk-33~._.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 +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +180 -273
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +1276 -1143
- package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +3 -3
- package/bundled/ws-do/index.js +25 -8
- package/dist/cli/index.js +465 -313
- package/dist/cli/meeting-runner.js +1 -2
- package/dist/cli/session-runner.js +365 -308
- package/dist/index.js +9 -1
- package/package.json +5 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/0-cq0qfayk62j.js +0 -63
- package/bundled/web/.open-next/assets/_next/static/chunks/0a6mn4mlzqm5w.js +0 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/0c4uhxm3-drto.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0eih9s5qcj60s.js +0 -62
- package/bundled/web/.open-next/assets/_next/static/chunks/0or~sn2q6u39-.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0puh0qew5ubn-.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0q.6r1w8fuz_c.css +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/15gzq7biqnfyu.js +0 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0-857yf._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0-f7f94._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0-x_e2-._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0-y0x05._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0.i~n9k._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__00-t~84._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__01m8-42._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__027birg._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__027mioa._.js +0 -85
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__042daks._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__04d5vn8._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__04ga0fm._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__04lf9dm._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__05.i~p4._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__05j4uuj._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__06-~y~n._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__06h.0.p._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__06jx2r6._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__07kynzq._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__09c2eii._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__09p6viv._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0afyujp._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ai~o9t._.js +0 -85
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0blgkro._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0bm22_4._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0d6ebrz._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0e50pyj._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0f1ifkk._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0foyyii._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0g2f8es._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0hfok0d._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0i2~~cu._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ibt4_b._.js +0 -85
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ii4sxa._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0l7bqz8._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0lc6d3p._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ltc6gj._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0mcp7fl._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0oui7hy._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ov0u8s._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0pafdaa._.js +0 -71
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0pld4w5._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0q.1vjc._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0q7ub2s._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0q_9ucm._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0rum9mg._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0s0x1gw._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0sef7j.._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0te6cra._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0tgnaho._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0u_.xg8._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0v6cx19._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0vry3o4._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0w1jro_._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0w8pipz._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0w~qukv._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0ycrc-4._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0yslih5._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0z1srcf._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0zp3bvl._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0~qx7w~._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__10ygwwj._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__11~a0kb._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1254c58._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__13bx1-9._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__13cfxr-._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__13l5e82._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_027kyge._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0422iyn._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_064~~s0._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_09yl_9p._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0a3hhbw._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0f2yj1_._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0fjzb27._.js +0 -115
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0iiaqss._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0j22j5s._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0j5oga0._.js +0 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0kfs6gu._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0ow_nxn._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0p8t2cq._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0qh5atg._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0r7d~ex._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0t1vdvk._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0v78k7n._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0xfvf8p._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0xjhix2._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0y1jmbv._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0zhu~h5._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_11wu9fj._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_13sefqw._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_0yrpg8t._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0.zvpt1._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0z8-n4g._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__13_rzu8._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_06glull._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0ac_em-._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0hjt5jw._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0llmkdo._.js +0 -65
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0plb9rd._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_124ub0f._.js +0 -3
- /package/bundled/web/.open-next/assets/_next/static/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/_buildManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/_clientMiddlewareManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/_ssgManifest.js +0 -0
- /package/bundled/web/.open-next/cache/{D0l5_gYQbpiti-m3eg3cw → 4_2dzY3LBARVOK6aelp7E}/robots.txt.cache +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[224226,984078,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(334235),f=a.i(76592),g=a.i(354498),h=a.i(432340),i=a.i(74414);function j({value:a,onValueChange:c,runtimes:d,disabled:e,triggerProps:f}){let h=function(a){let b=new Map;for(let c of a){let a=c.daemon_id||c.id;b.has(a)||b.set(a,{label:("string"==typeof c.device_info?c.device_info:"")||a,runtimes:[]}),b.get(a).runtimes.push(c)}return b}(d),k=e||0===d.length||d.every(a=>"online"!==a.status);return(0,b.jsxs)(g.Select,{value:a,onValueChange:a=>{a&&c(a)},disabled:k,items:d.map(a=>{let b=("string"==typeof a.device_info?a.device_info:"")||"",c=b?`${a.provider} (${b})`:a.provider;return{value:a.id,label:c}}),children:[(0,b.jsx)(g.SelectTrigger,{...f,children:(0,b.jsx)(g.SelectValue,{placeholder:0===d.length?"No runtimes — start a daemon first":d.every(a=>"online"!==a.status)?"All runtimes offline":"Select a runtime"})}),(0,b.jsx)(g.SelectContent,{children:Array.from(h.entries()).map(([a,c])=>(0,b.jsxs)(g.SelectGroup,{children:[(0,b.jsx)(g.SelectLabel,{className:"truncate",children:c.label}),c.runtimes.map(a=>(0,b.jsx)(g.SelectItem,{value:a.id,disabled:"online"!==a.status,children:(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.ProviderLogo,{provider:a.provider,className:"h-4 w-4"}),(0,b.jsx)("span",{children:a.provider}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:["(",a.status,")"]})]})},a.id))]},a))})]})}a.s(["RuntimeSelect",0,j],984078),a.i(974936),process.env.ALOOK_DOMAIN;let k=/^[a-zA-Z0-9-]{3,}$/,l=new Set(["no-reply","noreply","admin","support","help","info","postmaster","abuse","security","mailer-daemon","root","webmaster","hostmaster","system","alook"]);function m(a){return k.test(a)&&!l.has(a.toLowerCase())}var n=a.i(75118),o=a.i(647651);let p=(0,o.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var q=a.i(73270);let r=(0,o.default)("dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);var s=a.i(28429),t=a.i(506180),u=a.i(588339);a.i(752792);var v=a.i(446827),w=a.i(921584),x=a.i(973111),y=a.i(27647);function z({children:a}){let[d,e]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"pt-1",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>e(!d),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(s.ChevronDown,{className:(0,n.cn)("size-3.5 transition-transform",d&&"rotate-180")}),"Advanced"]}),d&&(0,b.jsx)("div",{className:"mt-3 space-y-4",children:a})]})}a.s(["AgentAccessTab",0,function({agentId:e,ownerId:f}){let{workspaceId:i}=(0,t.useWorkspace)(),[j,k]=(0,c.useState)("private"),[l,m]=(0,c.useState)(!1),[n,o]=(0,c.useState)([]),[p,r]=(0,c.useState)([]),[s,y]=(0,c.useState)(!0),[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(""),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!0);(0,c.useEffect)(()=>{let a=!1;return y(!0),Promise.all([(0,u.listAgentAccess)(i,e),(0,u.listMembers)(i)]).then(([b,c])=>{a||(o(b),r(c))}).catch(b=>{a||(b instanceof v.ApiError&&403===b.status?A(b.message):A("Failed to load access list"))}).finally(()=>{a||y(!1)}),()=>{a=!0}},[i,e]),(0,c.useEffect)(()=>{a.A(81396).then(({listAgents:a})=>{a(i).then(a=>{let b=a.find(a=>a.id===e);b&&k(b.visibility??"private")}).catch(()=>{})})},[i,e]);let J=async a=>{k(a),m(!0);try{await (0,u.updateAgent)(e,{visibility:a},i),w.toast.success("public"===a?"Agent is now public":"Agent is now private")}catch{k(j),w.toast.error("Failed to update visibility")}finally{m(!1)}},K=p.find(a=>a.user_id===f),L=new Set(n.map(a=>a.user_id)),M=p.filter(a=>!L.has(a.user_id)&&a.user_id!==f),N=async a=>{if(a&&!D){E(!0),A(null);try{await (0,u.grantAgentAccess)(i,e,a);let b=p.find(b=>b.user_id===a);b&&o(c=>[...c,{id:a,user_id:b.user_id,name:b.name,email:b.email,created_at:new Date().toISOString()}]),C(""),w.toast.success("Access granted")}catch(a){A(a instanceof Error?a.message:"Failed to grant access")}finally{E(!1)}}},O=async()=>{if(F){o(a=>a.filter(a=>a.user_id!==F.user_id)),G(null),A(null);try{await (0,u.revokeAgentAccess)(i,e,F.user_id,H),w.toast.success(H?"Access revoked and removed from whitelist":"Access revoked")}catch{o(n),A("Failed to revoke access")}}};return(0,b.jsxs)("div",{className:"mx-auto max-w-md space-y-6",children:[(0,b.jsx)("div",{className:"space-y-4 rounded-lg border border-border/50 p-4",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Visibility"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"public"===j?"All workspace members can use this agent":"Only authorized members can use this agent"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:l?"Saving…":"public"===j?"Public":"Private"}),(0,b.jsx)(x.Switch,{checked:"public"===j,onCheckedChange:a=>J(a?"public":"private"),disabled:l})]})]})}),"private"===j&&(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Authorized Members"}),z&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:z}),s?(0,b.jsx)("div",{className:"space-y-2",children:[1,2].map(a=>(0,b.jsx)("span",{className:"block h-10 animate-pulse rounded-md bg-muted"},a))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[K&&(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-medium truncate",children:K.name||K.email}),K.name&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:K.email})]}),(0,b.jsx)("span",{className:"ml-2 shrink-0 text-xs text-muted-foreground",children:"Owner"})]}),n.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-medium truncate",children:a.name||a.email}),a.name&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:a.email})]}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;let c;return b=a.user_id,void((c=n.find(a=>a.user_id===b))&&(G(c),I(!0)))},className:"ml-2 shrink-0 rounded-full p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors",children:(0,b.jsx)(q.XIcon,{className:"size-3.5"})})]},a.user_id))]}),M.length>0?(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsxs)(g.Select,{value:B,onValueChange:a=>{a&&(C(a),N(a))},children:[(0,b.jsx)(g.SelectTrigger,{className:"flex-1 text-xs",children:(0,b.jsx)(g.SelectValue,{placeholder:"Add a member..."})}),(0,b.jsx)(g.SelectContent,{children:M.map(a=>(0,b.jsx)(g.SelectItem,{value:a.user_id,children:a.name||a.email},a.user_id))})]})}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"All workspace members have been added. Invite new members from workspace settings."})]})]}),(0,b.jsx)(h.Dialog,{open:!!F,onOpenChange:a=>{a||G(null)},children:(0,b.jsxs)(h.DialogContent,{children:[(0,b.jsxs)(h.DialogHeader,{children:[(0,b.jsx)(h.DialogTitle,{children:"Remove Member Access"}),(0,b.jsxs)(h.DialogDescription,{children:["Remove"," ",(0,b.jsx)("span",{className:"font-medium text-foreground",children:F?.name||F?.email})," ","from this agent?"]})]}),(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer px-1",children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),className:"size-4 rounded border-border accent-primary"}),(0,b.jsx)("span",{className:"text-sm",children:"Also remove from email whitelist"})]}),(0,b.jsxs)(h.DialogFooter,{children:[(0,b.jsx)(h.DialogClose,{render:(0,b.jsx)(d.Button,{variant:"outline",size:"sm"}),children:"Cancel"}),(0,b.jsx)(d.Button,{size:"sm",variant:"destructive",onClick:O,children:"Remove"})]})]})})]})},"AllowedSendersTab",0,function({agentId:a}){let{workspaceId:f}=(0,t.useWorkspace)(),[g,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(!0),[m,n]=(0,c.useState)(!1),[o,r]=(0,c.useState)(null),[s,v]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let b=!1;return l(!0),(0,u.listWhitelist)(a,f).then(a=>{b||h(a)}).catch(()=>{b||r("Failed to load whitelist")}).finally(()=>{b||l(!1)}),()=>{b=!0}},[a,f]),(0,c.useEffect)(()=>{let b=!1;return(0,u.listAgents)(f).then(c=>{b||v(c.filter(b=>b.id!==a&&b.email_handle).length>0)}).catch(()=>{}),()=>{b=!0}},[a,f]);let w=i.includes("@")&&i.trim().length>0,x=async()=>{if(w&&!m){n(!0),r(null);try{let b=await (0,u.addWhitelistEmail)(a,i.toLowerCase(),f);h(a=>[...a,b]),j("")}catch(a){r(a instanceof Error?a.message:"Failed to add email")}finally{n(!1)}}},y=async b=>{h(a=>a.filter(a=>a.id!==b)),r(null);try{await (0,u.removeWhitelistEmail)(a,b,f)}catch{h(g),r("Failed to remove email")}};return(0,b.jsxs)("div",{className:"mx-auto max-w-md space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Allowed Senders"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Only emails from these addresses will trigger this agent. Applies to all configured email addresses (alook.ai handle and custom email)."}),s&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground/70 mt-1.5 flex items-center gap-1",children:[(0,b.jsx)(p,{className:"size-3 shrink-0"}),"Agents in this workspace can already email each other — no whitelist entry needed."]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Input,{value:i,onChange:a=>j(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),x())},placeholder:"user@example.com",type:"email",className:"flex-1"}),(0,b.jsx)(d.Button,{type:"button",size:"sm",variant:"secondary",disabled:!w||m,onClick:x,children:m?"Adding...":"Add"})]}),o&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:o}),k?(0,b.jsx)("div",{className:"space-y-2",children:[1,2,3].map(a=>(0,b.jsx)("span",{className:"block h-8 animate-pulse rounded-md bg-muted"},a))}):0===g.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No allowed senders — all inbound emails will be rejected."}):(0,b.jsx)("div",{className:"space-y-1.5",children:g.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsx)("span",{className:"text-sm",children:a.email}),(0,b.jsx)("button",{type:"button",onClick:()=>y(a.id),className:"rounded-full p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors",children:(0,b.jsx)(q.XIcon,{className:"size-3.5"})})]},a.id))})]})},"EmailHandleField",0,function({emailHandle:a,setEmailHandle:c,derivedHandle:d}){let e=a||d,g=e&&!m(e)?"Must be 3+ characters, letters/numbers/hyphens only":"";return(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Email"}),(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)("input",{id:"agent-handle",value:a,onChange:a=>c(a.target.value.toLowerCase()),placeholder:d||"my-agent",className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),(0,b.jsx)("span",{className:"shrink-0 text-sm text-muted-foreground/70",children:"@alook.ai"})]}),g&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:g})]})},"GeneralFields",0,function({name:a,setName:c,description:d,setDescription:e,instructions:g,setInstructions:h,model:k,setModel:l,runtimeId:m,setRuntimeId:o,runtimes:p,providerModels:q,errors:s,runtimeAsRadio:t=!1,onShuffle:u,emailHandleSlot:v,advancedSection:w}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{id:"agent-name",value:a,onChange:a=>c(a.target.value),placeholder:"Agent name",required:!0,autoFocus:!0,"aria-invalid":!!s?.name,"aria-describedby":s?.name?"agent-name-error":void 0,className:"w-full border-0 bg-transparent px-0 py-1 text-2xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:text-muted-foreground/40 placeholder:font-normal focus-visible:ring-0"}),u&&(0,b.jsx)("button",{type:"button",onClick:u,"aria-label":"Randomize name",className:"absolute right-0 top-1/2 -translate-y-1/2 rounded p-1.5 text-muted-foreground/50 hover:text-foreground hover:bg-accent transition-colors",children:(0,b.jsx)(r,{className:"size-4"})})]}),s?.name&&(0,b.jsx)("p",{id:"agent-name-error",className:"text-xs text-destructive mt-1",children:s.name})]}),(0,b.jsx)(y.AutoResizeTextarea,{id:"agent-description",value:d,onChange:a=>e(a.target.value),placeholder:"Add a description…",rows:1,className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),v,(t||p.length>0)&&(0,b.jsxs)("div",{id:"agent-runtime-select",className:"space-y-1.5",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Runtime"}),t?(0,b.jsx)("div",{className:"space-y-1.5",role:"radiogroup","aria-label":"Runtime",children:0===p.length?(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"No runtimes — start a daemon first"}):p.map(a=>{let c="online"===a.status,d=m===a.id,e="string"==typeof a.device_info?a.device_info:"";return(0,b.jsxs)("label",{className:(0,n.cn)("flex items-center gap-2.5 rounded-lg border p-2.5 cursor-pointer transition-colors",d?"border-primary bg-primary/5":"border-border/50 hover:border-foreground/20",!c&&"opacity-40 pointer-events-none"),children:[(0,b.jsx)("input",{type:"radio",name:"runtime",value:a.id,checked:d,disabled:!c,onChange:()=>{let b=p.find(a=>a.id===m)?.provider,c=a.provider;o(a.id),b&&b!==c&&l("")},className:"accent-primary size-3.5"}),(0,b.jsx)(i.ProviderLogo,{provider:a.provider,className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"text-sm",children:a.provider}),e&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:e}),!c&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:"offline"})]},a.id)})}):(0,b.jsx)(j,{value:m,onValueChange:a=>{let b=p.find(a=>a.id===m)?.provider,c=p.find(b=>b.id===a)?.provider;o(a),b&&b!==c&&l("")},runtimes:p,triggerProps:{"aria-invalid":!!s?.runtimeId,"aria-describedby":s?.runtimeId?"agent-runtime-error":void 0}}),s?.runtimeId&&(0,b.jsx)("p",{id:"agent-runtime-error",className:"text-xs text-destructive",children:s.runtimeId})]}),(h||w)&&(0,b.jsxs)(z,{children:[h&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Instructions"}),(0,b.jsx)(y.AutoResizeTextarea,{id:"agent-instructions",value:g??"",onChange:a=>h(a.target.value),placeholder:"System prompt or instructions...",rows:3,className:"w-full border-0 bg-transparent px-0 py-1 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Model"}),(0,b.jsx)("input",{id:"agent-model",value:k,onChange:a=>l(a.target.value),placeholder:"Default (runtime model)",list:"agent-model-options",className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),q.length>0&&(0,b.jsx)("datalist",{id:"agent-model-options",children:q.map(a=>(0,b.jsx)("option",{value:a},a))})]}),w]})]})},"getHandleError",0,function(a){return a&&!m(a)?"Must be 3+ characters, letters/numbers/hyphens only":""},"nameToHandle",0,function(a){return a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-|-$/g,"")}],224226)},137993,370085,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(334235),f=a.i(76592),g=a.i(7455),h=a.i(525132),i=a.i(75118),j=a.i(588339),k=a.i(16831),l=a.i(606896),m=a.i(877014),n=a.i(123047),o=a.i(940723),p=a.i(143984),q=a.i(73270);let r=(0,a.i(647651).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);a.s(["CircleHelp",0,r],370085);var s=a.i(921584),t=a.i(506180),u=a.i(390248);let v={Gmail:{imapHost:"imap.gmail.com",imapPort:993,smtpHost:"smtp.gmail.com",smtpPort:587},Outlook:{imapHost:"outlook.office365.com",imapPort:993,smtpHost:"smtp.office365.com",smtpPort:587},Yahoo:{imapHost:"imap.mail.yahoo.com",imapPort:993,smtpHost:"smtp.mail.yahoo.com",smtpPort:587}};function w({fields:a,applyPreset:c,errors:g,onClearError:h}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"flex gap-1.5",children:Object.keys(v).map(a=>(0,b.jsx)(d.Button,{type:"button",variant:"outline",size:"sm",className:"h-6 text-[10px] px-2",onClick:()=>c(a),children:a},a))}),(0,b.jsxs)("div",{className:"grid gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(f.Label,{className:"text-xs",children:"Email Address *"}),(0,b.jsx)(e.Input,{placeholder:"you@gmail.com",value:a.emailAddress,onChange:b=>{a.setEmailAddress(b.target.value),b.target.value.trim()&&h("emailAddress")},"aria-invalid":!!g.emailAddress,"aria-describedby":g.emailAddress?"custom-email-address-error":void 0,className:"h-8 text-sm"}),g.emailAddress&&(0,b.jsx)("p",{id:"custom-email-address-error",className:"mt-1 text-xs text-destructive",children:g.emailAddress})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(f.Label,{className:"text-xs",children:"Display Name"}),(0,b.jsx)(e.Input,{placeholder:"My Agent",value:a.displayName,onChange:b=>a.setDisplayName(b.target.value),className:"h-8 text-sm"})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(f.Label,{className:"text-xs font-medium",children:"IMAP (Receive)"}),(0,b.jsx)(e.Input,{placeholder:"imap.gmail.com",value:a.imapHost,onChange:b=>{a.setImapHost(b.target.value),b.target.value.trim()&&h("imapHost")},"aria-invalid":!!g.imapHost,"aria-describedby":g.imapHost?"custom-email-imap-host-error":void 0,className:"h-8 text-sm"}),g.imapHost&&(0,b.jsx)("p",{id:"custom-email-imap-host-error",className:"text-xs text-destructive",children:g.imapHost}),(0,b.jsx)(e.Input,{type:"number",placeholder:"993",value:a.imapPort,onChange:b=>a.setImapPort(Number(b.target.value)),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{placeholder:a.emailAddress||"Username (defaults to email)",value:a.imapUsername,onChange:b=>a.setImapUsername(b.target.value),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{type:"password",placeholder:"App Password",value:a.imapPassword,onChange:b=>{a.setImapPassword(b.target.value),b.target.value.trim()&&h("imapPassword")},"aria-invalid":!!g.imapPassword,"aria-describedby":g.imapPassword?"custom-email-imap-password-error":void 0,className:"h-8 text-sm"}),g.imapPassword&&(0,b.jsx)("p",{id:"custom-email-imap-password-error",className:"text-xs text-destructive",children:g.imapPassword})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(f.Label,{className:"text-xs font-medium",children:"SMTP (Send)"}),(0,b.jsx)(e.Input,{placeholder:"smtp.gmail.com",value:a.smtpHost,onChange:b=>{a.setSmtpHost(b.target.value),b.target.value.trim()&&h("smtpHost")},"aria-invalid":!!g.smtpHost,"aria-describedby":g.smtpHost?"custom-email-smtp-host-error":void 0,className:"h-8 text-sm"}),g.smtpHost&&(0,b.jsx)("p",{id:"custom-email-smtp-host-error",className:"text-xs text-destructive",children:g.smtpHost}),(0,b.jsx)(e.Input,{type:"number",placeholder:"587",value:a.smtpPort,onChange:b=>a.setSmtpPort(Number(b.target.value)),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{placeholder:a.emailAddress||"Username (defaults to email)",value:a.smtpUsername,onChange:b=>a.setSmtpUsername(b.target.value),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{type:"password",placeholder:"App Password",value:a.smtpPassword,onChange:b=>{a.setSmtpPassword(b.target.value),b.target.value.trim()&&h("smtpPassword")},"aria-invalid":!!g.smtpPassword,"aria-describedby":g.smtpPassword?"custom-email-smtp-password-error":void 0,className:"h-8 text-sm"}),g.smtpPassword&&(0,b.jsx)("p",{id:"custom-email-smtp-password-error",className:"text-xs text-destructive",children:g.smtpPassword})]})]})]})}a.s(["CustomEmailForm",0,function({agentId:a,workspaceId:e,onDataChange:f,getDataRef:x}){let{slug:y}=(0,t.useWorkspace)(),z=!a,[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]),[E,F]=(0,c.useState)(!z),[G,H]=(0,c.useState)(!1),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)({}),{fields:O,applyPreset:P,buildData:Q}=function(){let[a,b]=(0,c.useState)(""),[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(993),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(587),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(""),w=j||a,x=r||a;return{fields:{emailAddress:a,setEmailAddress:b,displayName:d,setDisplayName:e,imapHost:f,setImapHost:g,imapPort:h,setImapPort:i,imapUsername:j,setImapUsername:k,imapPassword:l,setImapPassword:m,smtpHost:n,setSmtpHost:o,smtpPort:p,setSmtpPort:q,smtpUsername:r,setSmtpUsername:s,smtpPassword:t,setSmtpPassword:u},applyPreset:function(a){let b=v[a];b&&(g(b.imapHost),i(b.imapPort),o(b.smtpHost),q(b.smtpPort))},buildData:function(){return a&&f&&w&&l&&n&&x&&t?{emailAddress:a,displayName:d,imapHost:f,imapPort:h,imapUsername:w,imapPassword:l,imapTls:!0,smtpHost:n,smtpPort:p,smtpUsername:x,smtpPassword:t,smtpTls:1,pollIntervalSeconds:60}:null}}}(),R=O.imapUsername||O.emailAddress,S=O.smtpUsername||O.emailAddress,T=(0,c.useCallback)(a=>{N(b=>({...b,[a]:void 0}))},[]);(0,c.useEffect)(()=>{x&&(x.current=Q)}),(0,c.useEffect)(()=>{z&&f?.(Q())},[z,Q,f,O.emailAddress,O.displayName,O.imapHost,O.imapPort,O.imapUsername,O.imapPassword,O.smtpHost,O.smtpPort,O.smtpUsername,O.smtpPassword]);let U=(0,c.useCallback)(async()=>{if(!z)try{let b=await (0,j.listEmailAccounts)(a,e);D(b)}catch{}finally{F(!1)}},[a,e,z]);(0,c.useEffect)(()=>{U()},[U]);let V=C[0]??null;async function W(){let b=(0,u.validateCustomEmailFields)({emailAddress:O.emailAddress,imapHost:O.imapHost,imapUsername:R,imapPassword:O.imapPassword,smtpHost:O.smtpHost,smtpUsername:S,smtpPassword:O.smtpPassword});if(N(b),(0,u.hasCustomEmailErrors)(b))return;let c=Q();if(c&&a){H(!0);try{await (0,j.createEmailAccount)(a,c,e),s.toast.success("Custom email configured"),B(!1),await U()}catch(a){s.toast.error(a instanceof Error?a.message:"Failed to save")}finally{H(!1)}}}async function X(){if(V&&a){L(!0);try{await (0,j.deleteEmailAccount)(a,V.id,e),s.toast.success("Custom email removed"),D([])}catch(a){s.toast.error(a instanceof Error?a.message:"Failed to remove")}finally{L(!1)}}}async function Y(){if(V&&a){J(!0);try{await (0,j.syncEmailAccount)(a,V.id,e),s.toast.success("Sync triggered"),setTimeout(()=>U(),2e3)}catch(a){s.toast.error(a instanceof Error?a.message:"Sync failed")}finally{J(!1)}}}let Z=z?O.emailAddress?O.emailAddress:"Connect your own mailbox via IMAP/SMTP":E?"Loading...":V?V.email_address:"Connect your own mailbox via IMAP/SMTP";return(0,b.jsxs)(g.Sheet,{open:A,onOpenChange:B,children:[(0,b.jsxs)(g.SheetTrigger,{render:(0,b.jsx)("button",{type:"button",className:"flex w-full items-center justify-between rounded-lg border border-border/50 bg-muted/30 px-4 py-3 text-left transition-colors hover:bg-muted/50"}),children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:"Custom Email"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:Z})]}),!z&&V?(0,b.jsxs)("span",{className:(0,i.cn)("inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium shrink-0","active"===V.status?"bg-green-500/10 text-green-600":"error"===V.status?"bg-red-500/10 text-red-600":"bg-yellow-500/10 text-yellow-600"),children:["active"===V.status?(0,b.jsx)(o.CheckCircle2,{className:"size-2.5"}):"error"===V.status?(0,b.jsx)(n.AlertCircle,{className:"size-2.5"}):null,V.status]}):(0,b.jsx)(p.ChevronRight,{className:"size-4 text-muted-foreground shrink-0"})]}),(0,b.jsxs)(g.SheetContent,{side:"right",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.jsx)(g.SheetTitle,{className:"sr-only",children:"Custom Email"}),(0,b.jsx)(g.SheetBody,{className:"px-8 pt-10 pb-6",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"font-heading text-lg font-semibold",children:"Custom Email"}),(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)("a",{href:`/w/${y}/help/email-setup`,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors"}),children:(0,b.jsx)(r,{className:"size-4"})}),(0,b.jsx)(h.TooltipContent,{children:"How to get IMAP/SMTP credentials"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Connect your own mailbox to send and receive email as your identity."})]}),!z&&V?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(l.Mail,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-sm truncate",children:V.email_address})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)(d.Button,{variant:"ghost",size:"icon-xs",onClick:Y,disabled:I,className:"rounded-full text-muted-foreground"}),children:(0,b.jsx)(m.RefreshCw,{className:(0,i.cn)("size-3.5",I&&"animate-spin")})}),(0,b.jsx)(h.TooltipContent,{children:"Sync now"})]}),(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)(d.Button,{variant:"ghost",size:"icon-xs",onClick:X,disabled:K,className:"rounded-full text-muted-foreground hover:bg-destructive/10 hover:text-destructive"}),children:K?(0,b.jsx)(k.Loader2,{className:"size-3.5 animate-spin"}):(0,b.jsx)(q.XIcon,{className:"size-3.5"})}),(0,b.jsx)(h.TooltipContent,{children:"Remove"})]})]})]}),V.error_message&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:V.error_message}),V.last_synced_at&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last synced: ",new Date(V.last_synced_at).toLocaleString()]}),(0,b.jsxs)("div",{className:"rounded-md border border-border/50 px-3 py-2 text-xs text-muted-foreground space-y-1",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"IMAP"}),(0,b.jsxs)("span",{children:[V.imap_host,":",V.imap_port]})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"SMTP"}),(0,b.jsxs)("span",{children:[V.smtp_host,":",V.smtp_port]})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Poll interval"}),(0,b.jsxs)("span",{children:[V.poll_interval_seconds,"s"]})]})]})]}):(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(w,{fields:O,applyPreset:P,errors:M,onClearError:T}),!z&&(0,b.jsxs)(d.Button,{type:"button",size:"sm",className:"w-full",onClick:W,disabled:G,children:[G&&(0,b.jsx)(k.Loader2,{className:"size-3 animate-spin mr-1"}),"Save & Connect"]}),z&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Will be connected after creating the agent."})]})]})})]})]})}],137993)}];
|
|
1
|
+
module.exports=[224226,984078,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(334235),f=a.i(76592),g=a.i(354498),h=a.i(432340),i=a.i(74414);function j({value:a,onValueChange:c,runtimes:d,disabled:e,triggerProps:f}){let h=function(a){let b=new Map;for(let c of a){let a=c.daemon_id||c.id;b.has(a)||b.set(a,{label:("string"==typeof c.device_info?c.device_info:"")||a,runtimes:[]}),b.get(a).runtimes.push(c)}return b}(d),k=e||0===d.length||d.every(a=>"online"!==a.status);return(0,b.jsxs)(g.Select,{value:a,onValueChange:a=>{a&&c(a)},disabled:k,items:d.map(a=>{let b=("string"==typeof a.device_info?a.device_info:"")||"",c=b?`${a.provider} (${b})`:a.provider;return{value:a.id,label:c}}),children:[(0,b.jsx)(g.SelectTrigger,{...f,children:(0,b.jsx)(g.SelectValue,{placeholder:0===d.length?"No runtimes — start a daemon first":d.every(a=>"online"!==a.status)?"All runtimes offline":"Select a runtime"})}),(0,b.jsx)(g.SelectContent,{children:Array.from(h.entries()).map(([a,c])=>(0,b.jsxs)(g.SelectGroup,{children:[(0,b.jsx)(g.SelectLabel,{className:"truncate",children:c.label}),c.runtimes.map(a=>(0,b.jsx)(g.SelectItem,{value:a.id,disabled:"online"!==a.status,children:(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.ProviderLogo,{provider:a.provider,className:"h-4 w-4"}),(0,b.jsx)("span",{children:a.provider}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:["(",a.status,")"]})]})},a.id))]},a))})]})}a.s(["RuntimeSelect",0,j],984078),a.i(974936);var k=a.i(911509),l=a.i(75118),m=a.i(647651);let n=(0,m.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var o=a.i(73270);let p=(0,m.default)("dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);var q=a.i(28429),r=a.i(506180),s=a.i(588339),t=a.i(446827),u=a.i(921584),v=a.i(973111),w=a.i(27647);function x({children:a}){let[d,e]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"pt-1",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>e(!d),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(q.ChevronDown,{className:(0,l.cn)("size-3.5 transition-transform",d&&"rotate-180")}),"Advanced"]}),d&&(0,b.jsx)("div",{className:"mt-3 space-y-4",children:a})]})}a.s(["AgentAccessTab",0,function({agentId:e,ownerId:f}){let{workspaceId:i}=(0,r.useWorkspace)(),[j,k]=(0,c.useState)("private"),[l,m]=(0,c.useState)(!1),[n,p]=(0,c.useState)([]),[q,w]=(0,c.useState)([]),[x,y]=(0,c.useState)(!0),[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(""),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!0);(0,c.useEffect)(()=>{let a=!1;return y(!0),Promise.all([(0,s.listAgentAccess)(i,e),(0,s.listMembers)(i)]).then(([b,c])=>{a||(p(b),w(c))}).catch(b=>{a||(b instanceof t.ApiError&&403===b.status?A(b.message):A("Failed to load access list"))}).finally(()=>{a||y(!1)}),()=>{a=!0}},[i,e]),(0,c.useEffect)(()=>{a.A(81396).then(({listAgents:a})=>{a(i).then(a=>{let b=a.find(a=>a.id===e);b&&k(b.visibility??"private")}).catch(()=>{})})},[i,e]);let J=async a=>{k(a),m(!0);try{await (0,s.updateAgent)(e,{visibility:a},i),u.toast.success("public"===a?"Agent is now public":"Agent is now private")}catch{k(j),u.toast.error("Failed to update visibility")}finally{m(!1)}},K=q.find(a=>a.user_id===f),L=new Set(n.map(a=>a.user_id)),M=q.filter(a=>!L.has(a.user_id)&&a.user_id!==f),N=async a=>{if(a&&!D){E(!0),A(null);try{await (0,s.grantAgentAccess)(i,e,a);let b=q.find(b=>b.user_id===a);b&&p(c=>[...c,{id:a,user_id:b.user_id,name:b.name,email:b.email,created_at:new Date().toISOString()}]),C(""),u.toast.success("Access granted")}catch(a){A(a instanceof Error?a.message:"Failed to grant access")}finally{E(!1)}}},O=async()=>{if(F){p(a=>a.filter(a=>a.user_id!==F.user_id)),G(null),A(null);try{await (0,s.revokeAgentAccess)(i,e,F.user_id,H),u.toast.success(H?"Access revoked and removed from whitelist":"Access revoked")}catch{p(n),A("Failed to revoke access")}}};return(0,b.jsxs)("div",{className:"mx-auto max-w-md space-y-6",children:[(0,b.jsx)("div",{className:"space-y-4 rounded-lg border border-border/50 p-4",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Visibility"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"public"===j?"All workspace members can use this agent":"Only authorized members can use this agent"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:l?"Saving…":"public"===j?"Public":"Private"}),(0,b.jsx)(v.Switch,{checked:"public"===j,onCheckedChange:a=>J(a?"public":"private"),disabled:l})]})]})}),"private"===j&&(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Authorized Members"}),z&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:z}),x?(0,b.jsx)("div",{className:"space-y-2",children:[1,2].map(a=>(0,b.jsx)("span",{className:"block h-10 animate-pulse rounded-md bg-muted"},a))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[K&&(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-medium truncate",children:K.name||K.email}),K.name&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:K.email})]}),(0,b.jsx)("span",{className:"ml-2 shrink-0 text-xs text-muted-foreground",children:"Owner"})]}),n.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-medium truncate",children:a.name||a.email}),a.name&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:a.email})]}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;let c;return b=a.user_id,void((c=n.find(a=>a.user_id===b))&&(G(c),I(!0)))},className:"ml-2 shrink-0 rounded-full p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors",children:(0,b.jsx)(o.XIcon,{className:"size-3.5"})})]},a.user_id))]}),M.length>0?(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsxs)(g.Select,{value:B,onValueChange:a=>{a&&(C(a),N(a))},children:[(0,b.jsx)(g.SelectTrigger,{className:"flex-1 text-xs",children:(0,b.jsx)(g.SelectValue,{placeholder:"Add a member..."})}),(0,b.jsx)(g.SelectContent,{children:M.map(a=>(0,b.jsx)(g.SelectItem,{value:a.user_id,children:a.name||a.email},a.user_id))})]})}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"All workspace members have been added. Invite new members from workspace settings."})]})]}),(0,b.jsx)(h.Dialog,{open:!!F,onOpenChange:a=>{a||G(null)},children:(0,b.jsxs)(h.DialogContent,{children:[(0,b.jsxs)(h.DialogHeader,{children:[(0,b.jsx)(h.DialogTitle,{children:"Remove Member Access"}),(0,b.jsxs)(h.DialogDescription,{children:["Remove"," ",(0,b.jsx)("span",{className:"font-medium text-foreground",children:F?.name||F?.email})," ","from this agent?"]})]}),(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer px-1",children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),className:"size-4 rounded border-border accent-primary"}),(0,b.jsx)("span",{className:"text-sm",children:"Also remove from email whitelist"})]}),(0,b.jsxs)(h.DialogFooter,{children:[(0,b.jsx)(h.DialogClose,{render:(0,b.jsx)(d.Button,{variant:"outline",size:"sm"}),children:"Cancel"}),(0,b.jsx)(d.Button,{size:"sm",variant:"destructive",onClick:O,children:"Remove"})]})]})})]})},"AllowedSendersTab",0,function({agentId:a}){let{workspaceId:f}=(0,r.useWorkspace)(),[g,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(!0),[m,p]=(0,c.useState)(!1),[q,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let b=!1;return l(!0),(0,s.listWhitelist)(a,f).then(a=>{b||h(a)}).catch(()=>{b||t("Failed to load whitelist")}).finally(()=>{b||l(!1)}),()=>{b=!0}},[a,f]),(0,c.useEffect)(()=>{let b=!1;return(0,s.listAgents)(f).then(c=>{b||v(c.filter(b=>b.id!==a&&b.email_handle).length>0)}).catch(()=>{}),()=>{b=!0}},[a,f]);let w=i.includes("@")&&i.trim().length>0,x=async()=>{if(w&&!m){p(!0),t(null);try{let b=await (0,s.addWhitelistEmail)(a,i.toLowerCase(),f);h(a=>[...a,b]),j("")}catch(a){t(a instanceof Error?a.message:"Failed to add email")}finally{p(!1)}}},y=async b=>{h(a=>a.filter(a=>a.id!==b)),t(null);try{await (0,s.removeWhitelistEmail)(a,b,f)}catch{h(g),t("Failed to remove email")}};return(0,b.jsxs)("div",{className:"mx-auto max-w-md space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:"Allowed Senders"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Only emails from these addresses will trigger this agent. Applies to all configured email addresses (alook.ai handle and custom email)."}),u&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground/70 mt-1.5 flex items-center gap-1",children:[(0,b.jsx)(n,{className:"size-3 shrink-0"}),"Agents in this workspace can already email each other — no whitelist entry needed."]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Input,{value:i,onChange:a=>j(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),x())},placeholder:"user@example.com",type:"email",className:"flex-1"}),(0,b.jsx)(d.Button,{type:"button",size:"sm",variant:"secondary",disabled:!w||m,onClick:x,children:m?"Adding...":"Add"})]}),q&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:q}),k?(0,b.jsx)("div",{className:"space-y-2",children:[1,2,3].map(a=>(0,b.jsx)("span",{className:"block h-8 animate-pulse rounded-md bg-muted"},a))}):0===g.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No allowed senders — all inbound emails will be rejected."}):(0,b.jsx)("div",{className:"space-y-1.5",children:g.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2",children:[(0,b.jsx)("span",{className:"text-sm",children:a.email}),(0,b.jsx)("button",{type:"button",onClick:()=>y(a.id),className:"rounded-full p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors",children:(0,b.jsx)(o.XIcon,{className:"size-3.5"})})]},a.id))})]})},"EmailHandleField",0,function({emailHandle:a,setEmailHandle:c,derivedHandle:d}){let e=a||d,g=e&&!(0,k.isValidHandle)(e)?"Must be 3+ characters, letters/numbers/hyphens only":"";return(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Email"}),(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)("input",{id:"agent-handle",value:a,onChange:a=>c(a.target.value.toLowerCase()),placeholder:d||"my-agent",className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),(0,b.jsx)("span",{className:"shrink-0 text-sm text-muted-foreground/70",children:"@alook.ai"})]}),g&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:g})]})},"GeneralFields",0,function({name:a,setName:c,description:d,setDescription:e,instructions:g,setInstructions:h,model:k,setModel:m,runtimeId:n,setRuntimeId:o,runtimes:q,providerModels:r,errors:s,runtimeAsRadio:t=!1,onShuffle:u,emailHandleSlot:v,advancedSection:y}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{id:"agent-name",value:a,onChange:a=>c(a.target.value),placeholder:"Agent name",required:!0,autoFocus:!0,"aria-invalid":!!s?.name,"aria-describedby":s?.name?"agent-name-error":void 0,className:"w-full border-0 bg-transparent px-0 py-1 text-2xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:text-muted-foreground/40 placeholder:font-normal focus-visible:ring-0"}),u&&(0,b.jsx)("button",{type:"button",onClick:u,"aria-label":"Randomize name",className:"absolute right-0 top-1/2 -translate-y-1/2 rounded p-1.5 text-muted-foreground/50 hover:text-foreground hover:bg-accent transition-colors",children:(0,b.jsx)(p,{className:"size-4"})})]}),s?.name&&(0,b.jsx)("p",{id:"agent-name-error",className:"text-xs text-destructive mt-1",children:s.name})]}),(0,b.jsx)(w.AutoResizeTextarea,{id:"agent-description",value:d,onChange:a=>e(a.target.value),placeholder:"Add a description…",rows:1,className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),v,(t||q.length>0)&&(0,b.jsxs)("div",{id:"agent-runtime-select",className:"space-y-1.5",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Runtime"}),t?(0,b.jsx)("div",{className:"space-y-1.5",role:"radiogroup","aria-label":"Runtime",children:0===q.length?(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"No runtimes — start a daemon first"}):q.map(a=>{let c="online"===a.status,d=n===a.id,e="string"==typeof a.device_info?a.device_info:"";return(0,b.jsxs)("label",{className:(0,l.cn)("flex items-center gap-2.5 rounded-lg border p-2.5 cursor-pointer transition-colors",d?"border-primary bg-primary/5":"border-border/50 hover:border-foreground/20",!c&&"opacity-40 pointer-events-none"),children:[(0,b.jsx)("input",{type:"radio",name:"runtime",value:a.id,checked:d,disabled:!c,onChange:()=>{let b=q.find(a=>a.id===n)?.provider,c=a.provider;o(a.id),b&&b!==c&&m("")},className:"accent-primary size-3.5"}),(0,b.jsx)(i.ProviderLogo,{provider:a.provider,className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"text-sm",children:a.provider}),e&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:e}),!c&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:"offline"})]},a.id)})}):(0,b.jsx)(j,{value:n,onValueChange:a=>{let b=q.find(a=>a.id===n)?.provider,c=q.find(b=>b.id===a)?.provider;o(a),b&&b!==c&&m("")},runtimes:q,triggerProps:{"aria-invalid":!!s?.runtimeId,"aria-describedby":s?.runtimeId?"agent-runtime-error":void 0}}),s?.runtimeId&&(0,b.jsx)("p",{id:"agent-runtime-error",className:"text-xs text-destructive",children:s.runtimeId})]}),(h||y)&&(0,b.jsxs)(x,{children:[h&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Instructions"}),(0,b.jsx)(w.AutoResizeTextarea,{id:"agent-instructions",value:g??"",onChange:a=>h(a.target.value),placeholder:"System prompt or instructions...",rows:3,className:"w-full border-0 bg-transparent px-0 py-1 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(f.Label,{className:"text-xs text-muted-foreground",children:"Model"}),(0,b.jsx)("input",{id:"agent-model",value:k,onChange:a=>m(a.target.value),placeholder:"Default (runtime model)",list:"agent-model-options",className:"w-full border-0 bg-transparent px-0 py-0.5 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"}),r.length>0&&(0,b.jsx)("datalist",{id:"agent-model-options",children:r.map(a=>(0,b.jsx)("option",{value:a},a))})]}),y]})]})},"getHandleError",0,function(a){return a&&!(0,k.isValidHandle)(a)?"Must be 3+ characters, letters/numbers/hyphens only":""},"nameToHandle",0,function(a){return a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-|-$/g,"")}],224226)},137993,370085,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(732254),e=a.i(334235),f=a.i(76592),g=a.i(7455),h=a.i(525132),i=a.i(75118),j=a.i(588339),k=a.i(16831),l=a.i(606896),m=a.i(877014),n=a.i(123047),o=a.i(940723),p=a.i(143984),q=a.i(73270);let r=(0,a.i(647651).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);a.s(["CircleHelp",0,r],370085);var s=a.i(921584),t=a.i(506180),u=a.i(390248);let v={Gmail:{imapHost:"imap.gmail.com",imapPort:993,smtpHost:"smtp.gmail.com",smtpPort:587},Outlook:{imapHost:"outlook.office365.com",imapPort:993,smtpHost:"smtp.office365.com",smtpPort:587},Yahoo:{imapHost:"imap.mail.yahoo.com",imapPort:993,smtpHost:"smtp.mail.yahoo.com",smtpPort:587}};function w({fields:a,applyPreset:c,errors:g,onClearError:h}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"flex gap-1.5",children:Object.keys(v).map(a=>(0,b.jsx)(d.Button,{type:"button",variant:"outline",size:"sm",className:"h-6 text-[10px] px-2",onClick:()=>c(a),children:a},a))}),(0,b.jsxs)("div",{className:"grid gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(f.Label,{className:"text-xs",children:"Email Address *"}),(0,b.jsx)(e.Input,{placeholder:"you@gmail.com",value:a.emailAddress,onChange:b=>{a.setEmailAddress(b.target.value),b.target.value.trim()&&h("emailAddress")},"aria-invalid":!!g.emailAddress,"aria-describedby":g.emailAddress?"custom-email-address-error":void 0,className:"h-8 text-sm"}),g.emailAddress&&(0,b.jsx)("p",{id:"custom-email-address-error",className:"mt-1 text-xs text-destructive",children:g.emailAddress})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(f.Label,{className:"text-xs",children:"Display Name"}),(0,b.jsx)(e.Input,{placeholder:"My Agent",value:a.displayName,onChange:b=>a.setDisplayName(b.target.value),className:"h-8 text-sm"})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(f.Label,{className:"text-xs font-medium",children:"IMAP (Receive)"}),(0,b.jsx)(e.Input,{placeholder:"imap.gmail.com",value:a.imapHost,onChange:b=>{a.setImapHost(b.target.value),b.target.value.trim()&&h("imapHost")},"aria-invalid":!!g.imapHost,"aria-describedby":g.imapHost?"custom-email-imap-host-error":void 0,className:"h-8 text-sm"}),g.imapHost&&(0,b.jsx)("p",{id:"custom-email-imap-host-error",className:"text-xs text-destructive",children:g.imapHost}),(0,b.jsx)(e.Input,{type:"number",placeholder:"993",value:a.imapPort,onChange:b=>a.setImapPort(Number(b.target.value)),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{placeholder:a.emailAddress||"Username (defaults to email)",value:a.imapUsername,onChange:b=>a.setImapUsername(b.target.value),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{type:"password",placeholder:"App Password",value:a.imapPassword,onChange:b=>{a.setImapPassword(b.target.value),b.target.value.trim()&&h("imapPassword")},"aria-invalid":!!g.imapPassword,"aria-describedby":g.imapPassword?"custom-email-imap-password-error":void 0,className:"h-8 text-sm"}),g.imapPassword&&(0,b.jsx)("p",{id:"custom-email-imap-password-error",className:"text-xs text-destructive",children:g.imapPassword})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(f.Label,{className:"text-xs font-medium",children:"SMTP (Send)"}),(0,b.jsx)(e.Input,{placeholder:"smtp.gmail.com",value:a.smtpHost,onChange:b=>{a.setSmtpHost(b.target.value),b.target.value.trim()&&h("smtpHost")},"aria-invalid":!!g.smtpHost,"aria-describedby":g.smtpHost?"custom-email-smtp-host-error":void 0,className:"h-8 text-sm"}),g.smtpHost&&(0,b.jsx)("p",{id:"custom-email-smtp-host-error",className:"text-xs text-destructive",children:g.smtpHost}),(0,b.jsx)(e.Input,{type:"number",placeholder:"587",value:a.smtpPort,onChange:b=>a.setSmtpPort(Number(b.target.value)),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{placeholder:a.emailAddress||"Username (defaults to email)",value:a.smtpUsername,onChange:b=>a.setSmtpUsername(b.target.value),className:"h-8 text-sm"}),(0,b.jsx)(e.Input,{type:"password",placeholder:"App Password",value:a.smtpPassword,onChange:b=>{a.setSmtpPassword(b.target.value),b.target.value.trim()&&h("smtpPassword")},"aria-invalid":!!g.smtpPassword,"aria-describedby":g.smtpPassword?"custom-email-smtp-password-error":void 0,className:"h-8 text-sm"}),g.smtpPassword&&(0,b.jsx)("p",{id:"custom-email-smtp-password-error",className:"text-xs text-destructive",children:g.smtpPassword})]})]})]})}a.s(["CustomEmailForm",0,function({agentId:a,workspaceId:e,onDataChange:f,getDataRef:x}){let{slug:y}=(0,t.useWorkspace)(),z=!a,[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]),[E,F]=(0,c.useState)(!z),[G,H]=(0,c.useState)(!1),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)({}),{fields:O,applyPreset:P,buildData:Q}=function(){let[a,b]=(0,c.useState)(""),[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(993),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(587),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(""),w=j||a,x=r||a;return{fields:{emailAddress:a,setEmailAddress:b,displayName:d,setDisplayName:e,imapHost:f,setImapHost:g,imapPort:h,setImapPort:i,imapUsername:j,setImapUsername:k,imapPassword:l,setImapPassword:m,smtpHost:n,setSmtpHost:o,smtpPort:p,setSmtpPort:q,smtpUsername:r,setSmtpUsername:s,smtpPassword:t,setSmtpPassword:u},applyPreset:function(a){let b=v[a];b&&(g(b.imapHost),i(b.imapPort),o(b.smtpHost),q(b.smtpPort))},buildData:function(){return a&&f&&w&&l&&n&&x&&t?{emailAddress:a,displayName:d,imapHost:f,imapPort:h,imapUsername:w,imapPassword:l,imapTls:!0,smtpHost:n,smtpPort:p,smtpUsername:x,smtpPassword:t,smtpTls:1,pollIntervalSeconds:60}:null}}}(),R=O.imapUsername||O.emailAddress,S=O.smtpUsername||O.emailAddress,T=(0,c.useCallback)(a=>{N(b=>({...b,[a]:void 0}))},[]);(0,c.useEffect)(()=>{x&&(x.current=Q)}),(0,c.useEffect)(()=>{z&&f?.(Q())},[z,Q,f,O.emailAddress,O.displayName,O.imapHost,O.imapPort,O.imapUsername,O.imapPassword,O.smtpHost,O.smtpPort,O.smtpUsername,O.smtpPassword]);let U=(0,c.useCallback)(async()=>{if(!z)try{let b=await (0,j.listEmailAccounts)(a,e);D(b)}catch{}finally{F(!1)}},[a,e,z]);(0,c.useEffect)(()=>{U()},[U]);let V=C[0]??null;async function W(){let b=(0,u.validateCustomEmailFields)({emailAddress:O.emailAddress,imapHost:O.imapHost,imapUsername:R,imapPassword:O.imapPassword,smtpHost:O.smtpHost,smtpUsername:S,smtpPassword:O.smtpPassword});if(N(b),(0,u.hasCustomEmailErrors)(b))return;let c=Q();if(c&&a){H(!0);try{await (0,j.createEmailAccount)(a,c,e),s.toast.success("Custom email configured"),B(!1),await U()}catch(a){s.toast.error(a instanceof Error?a.message:"Failed to save")}finally{H(!1)}}}async function X(){if(V&&a){L(!0);try{await (0,j.deleteEmailAccount)(a,V.id,e),s.toast.success("Custom email removed"),D([])}catch(a){s.toast.error(a instanceof Error?a.message:"Failed to remove")}finally{L(!1)}}}async function Y(){if(V&&a){J(!0);try{await (0,j.syncEmailAccount)(a,V.id,e),s.toast.success("Sync triggered"),setTimeout(()=>U(),2e3)}catch(a){s.toast.error(a instanceof Error?a.message:"Sync failed")}finally{J(!1)}}}let Z=z?O.emailAddress?O.emailAddress:"Connect your own mailbox via IMAP/SMTP":E?"Loading...":V?V.email_address:"Connect your own mailbox via IMAP/SMTP";return(0,b.jsxs)(g.Sheet,{open:A,onOpenChange:B,children:[(0,b.jsxs)(g.SheetTrigger,{render:(0,b.jsx)("button",{type:"button",className:"flex w-full items-center justify-between rounded-lg border border-border/50 bg-muted/30 px-4 py-3 text-left transition-colors hover:bg-muted/50"}),children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:"Custom Email"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:Z})]}),!z&&V?(0,b.jsxs)("span",{className:(0,i.cn)("inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium shrink-0","active"===V.status?"bg-green-500/10 text-green-600":"error"===V.status?"bg-red-500/10 text-red-600":"bg-yellow-500/10 text-yellow-600"),children:["active"===V.status?(0,b.jsx)(o.CheckCircle2,{className:"size-2.5"}):"error"===V.status?(0,b.jsx)(n.AlertCircle,{className:"size-2.5"}):null,V.status]}):(0,b.jsx)(p.ChevronRight,{className:"size-4 text-muted-foreground shrink-0"})]}),(0,b.jsxs)(g.SheetContent,{side:"right",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.jsx)(g.SheetTitle,{className:"sr-only",children:"Custom Email"}),(0,b.jsx)(g.SheetBody,{className:"px-8 pt-10 pb-6",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"font-heading text-lg font-semibold",children:"Custom Email"}),(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)("a",{href:`/w/${y}/help/email-setup`,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors"}),children:(0,b.jsx)(r,{className:"size-4"})}),(0,b.jsx)(h.TooltipContent,{children:"How to get IMAP/SMTP credentials"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Connect your own mailbox to send and receive email as your identity."})]}),!z&&V?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border/50 px-3 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(l.Mail,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-sm truncate",children:V.email_address})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)(d.Button,{variant:"ghost",size:"icon-xs",onClick:Y,disabled:I,className:"rounded-full text-muted-foreground"}),children:(0,b.jsx)(m.RefreshCw,{className:(0,i.cn)("size-3.5",I&&"animate-spin")})}),(0,b.jsx)(h.TooltipContent,{children:"Sync now"})]}),(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)(d.Button,{variant:"ghost",size:"icon-xs",onClick:X,disabled:K,className:"rounded-full text-muted-foreground hover:bg-destructive/10 hover:text-destructive"}),children:K?(0,b.jsx)(k.Loader2,{className:"size-3.5 animate-spin"}):(0,b.jsx)(q.XIcon,{className:"size-3.5"})}),(0,b.jsx)(h.TooltipContent,{children:"Remove"})]})]})]}),V.error_message&&(0,b.jsx)("p",{className:"text-xs text-destructive",children:V.error_message}),V.last_synced_at&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last synced: ",new Date(V.last_synced_at).toLocaleString()]}),(0,b.jsxs)("div",{className:"rounded-md border border-border/50 px-3 py-2 text-xs text-muted-foreground space-y-1",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"IMAP"}),(0,b.jsxs)("span",{children:[V.imap_host,":",V.imap_port]})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"SMTP"}),(0,b.jsxs)("span",{children:[V.smtp_host,":",V.smtp_port]})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Poll interval"}),(0,b.jsxs)("span",{children:[V.poll_interval_seconds,"s"]})]})]})]}):(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(w,{fields:O,applyPreset:P,errors:M,onClearError:T}),!z&&(0,b.jsxs)(d.Button,{type:"button",size:"sm",className:"w-full",onClick:W,disabled:G,children:[G&&(0,b.jsx)(k.Loader2,{className:"size-3 animate-spin mr-1"}),"Save & Connect"]}),z&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Will be connected after creating the agent."})]})]})})]})]})}],137993)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_web_src_components_0nj0euq._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[325848,a=>{"use strict";var b=a.i(749314),c=a.i(437199);let d="#27272a",e={fill:"rgba(255,255,255,0.92)",stroke:"rgba(255,255,255,0.95)",strokeWidth:3.5},f=[{name:"Purple",value:"#a855f7",gradient:["#c084fc","#a855f7","#7c3aed"],faceColor:"#2e1065"},{name:"Teal",value:"#14b8a6",gradient:["#5eead4","#14b8a6","#0d9488"],faceColor:"#134e4a"},{name:"Orange",value:"#f97316",gradient:["#fdba74","#f97316","#c2410c"],faceColor:"#7c2d12"},{name:"Blue",value:"#3b82f6",gradient:["#93c5fd","#3b82f6","#1d4ed8"],faceColor:"#1e3a5f"},{name:"Pink",value:"#f472b6",gradient:["#fda4af","#f472b6","#be185d"],faceColor:"#831843"},{name:"Yellow",value:"#eab308",gradient:["#fde047","#eab308","#a16207"],faceColor:"#713f12"},{name:"Green",value:"#22c55e",gradient:["#86efac","#22c55e","#15803d"],faceColor:"#14532d"},{name:"Beige",value:"#d6ccb8",gradient:["#e8e0d4","#d6ccb8","#b8a990"],faceColor:"#57534e"},{name:"Red",value:"#ef4444",gradient:["#fca5a5","#ef4444","#991b1b"],faceColor:"#7f1d1d"},{name:"Lake Blue",value:"#6366f1",gradient:["#a5b4fc","#6366f1","#3730a3"],faceColor:"#312e81"},{name:"Gray",value:"#9ca3af",gradient:["#d4d4d8","#9ca3af","#6b7280"],faceColor:"#374151"},{name:"Deep Purple",value:"#8b5cf6",gradient:["#c4b5fd","#8b5cf6","#5b21b6"],faceColor:"#3b0764"}],g={circle:{name:"Circle",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("circle",{cx:"100",cy:"100",r:"66",...e})},rounded:{name:"Rounded",face:{cx:100,cy:100,w:90},render:()=>(0,b.jsx)("rect",{x:"30",y:"30",width:"140",height:"140",rx:"32",...e})},hexagon:{name:"Hexagon",face:{cx:100,cy:100,w:86},render:()=>(0,b.jsx)("path",{d:"M100 32 C108 32 114 35 120 39 L155 60 C161 64 165 70 165 78 L165 122 C165 130 161 136 155 140 L120 161 C114 165 108 168 100 168 C92 168 86 165 80 161 L45 140 C39 136 35 130 35 122 L35 78 C35 70 39 64 45 60 L80 39 C86 35 92 32 100 32 Z",...e})},task:{name:"Task",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("rect",{x:"34",y:"34",width:"132",height:"132",rx:"24",...e})},book:{name:"Book",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("path",{d:"M42 162 L42 88 C42 54 68 34 100 34 C132 34 158 54 158 88 L158 162 C158 166 154 170 150 170 L50 170 C46 170 42 166 42 162 Z",...e})},mail:{name:"Mail",face:{cx:100,cy:100,w:86},render:()=>(0,b.jsx)("rect",{x:"28",y:"54",width:"144",height:"92",rx:"46",...e})},calendar:{name:"Calendar",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("path",{d:"M100 34 C138 34 166 52 166 80 C166 94 158 106 158 118 C158 148 138 166 100 166 C62 166 42 148 42 118 C42 106 34 94 34 80 C34 52 62 34 100 34 Z",...e})},bulb:{name:"Bulb",face:{cx:100,cy:104,w:76},render:()=>(0,b.jsx)("ellipse",{cx:"100",cy:"104",rx:"58",ry:"66",...e})},folder:{name:"Folder",face:{cx:102,cy:108,w:80},render:()=>(0,b.jsx)("path",{d:"M62 144 C40 144 32 128 36 116 C32 104 40 90 54 88 C56 72 70 60 88 62 C100 50 118 50 132 58 C144 52 162 60 162 76 C172 82 174 98 166 108 C172 120 164 136 150 140 Z",...e})},mountain:{name:"Mountain",face:{cx:100,cy:100,w:76},render:()=>(0,b.jsx)("path",{d:"M92 36 C120 32 156 48 164 78 C172 108 156 148 124 160 C92 172 48 156 38 124 C28 92 62 40 92 36 Z",...e})}},h=Object.keys(g),i={dot:{name:"Dot",render:(a=d)=>(0,b.jsx)("circle",{cx:"0",cy:"0",r:"4.5",fill:a})},dash:{name:"Dash",render:(a=d)=>(0,b.jsx)("line",{x1:"-10",y1:"0",x2:"10",y2:"0",stroke:a,strokeWidth:"5",strokeLinecap:"round"})},hookL:{name:"Hook",render:(a=d)=>(0,b.jsx)("path",{d:"M-11 0 Q-5.5 7 0 1.5 Q5.5 7 11 0",fill:"none",stroke:a,strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})},smile:{name:"Smile",render:(a=d)=>(0,b.jsx)("path",{d:"M-11 0 Q0 11 11 0",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"})},caret:{name:"Caret",render:(a=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("path",{d:"M-10 0 Q0 8 10 0",fill:"none",stroke:a,strokeWidth:"4.5",strokeLinecap:"round"}),(0,b.jsx)("ellipse",{cx:"3",cy:"6",rx:"4",ry:"4.5",fill:"#f472b6"})]})},arrow:{name:"Arrow",render:(a=d)=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"6",ry:"7.5",fill:a})},oh:{name:"o",render:(a=d)=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"7",ry:"7.5",fill:"none",stroke:a,strokeWidth:"4.5"})}},j=Object.keys(i),k=(a,c)=>{let e=c??a,f=(c,f=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("g",{transform:`translate(${-c}, 0)`,children:a(f)}),(0,b.jsx)("g",{transform:`translate(${c}, 0)`,children:e(f)})]});return f.displayName="EyePair",f},l={dots:{name:"Dots",render:k(a=>(0,b.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:a}))},big:{name:"Big",render:k(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:"0",cy:"0",r:"10",fill:a}),(0,b.jsx)("circle",{cx:"2.5",cy:"-3",r:"3.5",fill:"rgba(255,255,255,0.9)"})]}))},rings:{name:"Rings",render:k(a=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:"none",stroke:a,strokeWidth:"4.5"}))},arches:{name:"Arches",render:k(a=>(0,b.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},lines:{name:"Lines",render:k(a=>(0,b.jsx)("path",{d:"M-10 0 Q0 -6 10 0",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},happy:{name:"Happy",render:k(a=>(0,b.jsx)("path",{d:"M-10 5 Q0 -11 10 5",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},sleepy:{name:"Sleepy",render:k(a=>(0,b.jsx)("path",{d:"M-10 -2 Q0 8 10 -2",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},shy:{name:"Shy",render:k(a=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:a}))},wink:{name:"Wink",render:(a,c=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("g",{transform:`translate(${-a}, 0)`,children:(0,b.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:c})}),(0,b.jsx)("g",{transform:`translate(${a}, 0)`,children:(0,b.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:c,strokeWidth:"5",strokeLinecap:"round"})})]})}},m=Object.keys(l),n={shape:"book",eye:"happy",nose:"dash",bg:1};function o(a){return a[Math.floor(Math.random()*a.length)]}let p="avatar:";a.s(["AvatarRenderer",0,function({config:a,size:d=200,className:e}){let h=(0,c.useId)().replace(/:/g,""),j=g[a.shape]??g.book,k=l[a.eye],m=i[a.nose],n=f[a.bg]??f[0],[o,p,q]=n.gradient,r=n.faceColor,{cx:s,cy:t,w:u}=j.face,v=Math.max(13,.24*u),w=t-Math.max(12,.16*u);return(0,b.jsxs)("svg",{viewBox:"0 0 200 200",width:d,height:d,className:e,style:{display:"block"},children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:`bg-${h}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:o}),(0,b.jsx)("stop",{offset:"50%",stopColor:p}),(0,b.jsx)("stop",{offset:"100%",stopColor:q})]}),(0,b.jsxs)("radialGradient",{id:`gl-${h}`,cx:"30%",cy:"25%",r:"60%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:"rgba(255,255,255,0.32)"}),(0,b.jsx)("stop",{offset:"100%",stopColor:"rgba(255,255,255,0)"})]}),(0,b.jsx)("filter",{id:`sh-${h}`,x:"-10%",y:"-5%",width:"120%",height:"130%",children:(0,b.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"4",floodColor:"rgba(0,0,0,0.18)"})})]}),(0,b.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#bg-${h})`}),(0,b.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#gl-${h})`}),(0,b.jsxs)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:[(0,b.jsx)("g",{"data-avatar-shape":"",filter:`url(#sh-${h})`,children:j.render()}),k&&(0,b.jsx)("g",{transform:`translate(${s}, ${w})`,children:(0,b.jsx)("g",{"data-avatar-eyes":"",children:k.render(v,r)})}),m&&(0,b.jsx)("g",{transform:`translate(${s}, ${t+7})`,children:(0,b.jsx)("g",{"data-avatar-nose":"",children:m.render(r)})})]})]})},"BG_COLORS",0,f,"DEFAULT_CONFIG",0,n,"EYE_KEYS",0,m,"Eyes",0,l,"NOSE_KEYS",0,j,"Noses",0,i,"PRESETS",0,[{name:"Task",config:{shape:"task",nose:"dot",eye:"dots",bg:0}},{name:"Notes",config:{shape:"book",nose:"dash",eye:"happy",bg:1}},{name:"Mail",config:{shape:"mail",nose:"smile",eye:"dots",bg:3}},{name:"Schedule",config:{shape:"calendar",nose:"dot",eye:"dots",bg:4}},{name:"Idea",config:{shape:"bulb",nose:"oh",eye:"rings",bg:5}},{name:"Project",config:{shape:"folder",nose:"dash",eye:"lines",bg:7}},{name:"Goal",config:{shape:"mountain",nose:"caret",eye:"arches",bg:8}},{name:"Dream",config:{shape:"circle",nose:"smile",eye:"shy",bg:11}},{name:"Organize",config:{shape:"rounded",nose:"dot",eye:"sleepy",bg:6}},{name:"Explore",config:{shape:"hexagon",nose:"hookL",eye:"wink",bg:9}},{name:"Focus",config:{shape:"task",nose:"caret",eye:"lines",bg:2}},{name:"Collect",config:{shape:"book",nose:"oh",eye:"rings",bg:10}}],"SHAPE_KEYS",0,h,"Shapes",0,g,"parseAvatarUrl",0,function(a){if(!a||!a.startsWith(p))return null;try{let b=JSON.parse(a.slice(p.length));if("object"==typeof b&&null!==b&&"string"==typeof b.shape&&"string"==typeof b.eye&&"string"==typeof b.nose&&"number"==typeof b.bg)return b;if("object"==typeof b&&null!==b&&"outline"in b)return n;return null}catch{return null}},"randomConfig",0,function(){return{shape:o(h),eye:o(m),nose:o(j),bg:Math.floor(Math.random()*f.length)}},"serializeAvatarConfig",0,function(a){return p+JSON.stringify(a)}])},253260,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(325848);let e=["avatar-anim-shape-bounce","avatar-anim-head-tilt","avatar-anim-shake","avatar-anim-wobble","avatar-anim-pulse","avatar-anim-spin","avatar-anim-jelly","avatar-anim-float","avatar-anim-nod"];a.s(["AnimatedAvatar",0,function({config:a,size:f,className:g,isHovered:h,isWorking:i}){let[j,k]=(0,c.useState)(null),l=(0,c.useRef)(-1);function m(){let a=Math.floor(Math.random()*e.length);return a===l.current&&(a=(a+1)%e.length),l.current=a,e[a]}return(0,c.useEffect)(()=>{h?k(m()):i||k(null)},[h,i]),(0,c.useEffect)(()=>{if(!i){h||k(null);return}k(m());let a=setInterval(()=>{k(m())},4e3);return()=>clearInterval(a)},[h,i]),(0,b.jsx)("div",{className:j??void 0,children:(0,b.jsx)(d.AvatarRenderer,{config:a,size:f,className:g})})}])},690287,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(325848),e=a.i(75118),f=a.i(655795),g=a.i(525132);function h({label:a,keys:c,value:d,onChange:f,renderThumb:g,mobile:i=!1}){let j=c.indexOf(d),k=a=>f(c[(j+a+c.length)%c.length]),l=c[(j-1+c.length)%c.length],m=c[(j+1)%c.length];return(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-12 text-xs font-medium text-muted-foreground shrink-0",children:a}),(0,b.jsx)("button",{type:"button",onClick:()=>k(-1),className:(0,e.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",i?"size-10":"size-7"),children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,b.jsx)("path",{d:"M15 5 L8 12 L15 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,b.jsxs)("div",{className:"flex items-center gap-1 flex-1 justify-center",children:[(0,b.jsx)("button",{type:"button",onClick:()=>k(-1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:g(l)}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:"border-2 border-primary rounded-lg p-0.5",children:g(d)}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:g(m)})]}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:(0,e.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",i?"size-10":"size-7"),children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,b.jsx)("path",{d:"M9 5 L16 12 L9 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}a.s(["AvatarGenerator",0,function({config:a,onChange:i,layout:j="vertical",mobile:k=!1}){let[l,m]=(0,c.useState)("presets"),n=(0,c.useCallback)((b,c)=>{i({...a,[b]:c})},[a,i]),[o,p]=(0,c.useState)(!1),q=(0,c.useRef)(a);(0,c.useEffect)(()=>{if(q.current.shape!==a.shape||q.current.eye!==a.eye||q.current.nose!==a.nose||q.current.bg!==a.bg){p(!0);let b=setTimeout(()=>p(!1),450);return q.current=a,()=>clearTimeout(b)}},[a]),(0,c.useEffect)(()=>{if("horizontal"!==j)return;let a=a=>{"Space"===a.code&&a.target===document.body&&(a.preventDefault(),i((0,d.randomConfig)()))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[j,i]);let r="horizontal"===j,s=r?220:k?120:160,t=(0,b.jsxs)("div",{className:(0,e.cn)("flex flex-col items-center gap-3 rounded-2xl bg-muted/30",k?"p-3":"p-4",r?"w-70 shrink-0 justify-center":""),children:[(0,b.jsx)("div",{className:(0,e.cn)("rounded-2xl",o&&"animate-[shake_0.45s_cubic-bezier(.36,.07,.19,.97)]"),children:(0,b.jsx)(d.AvatarRenderer,{config:a,size:s})}),(0,b.jsxs)("button",{type:"button",onClick:()=>i((0,d.randomConfig)()),className:"inline-flex items-center gap-2 rounded-full bg-foreground px-4 py-1.5 text-sm font-medium text-background hover:bg-foreground/80 transition-colors",children:[(0,b.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"3"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"16",cy:"8",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"8",cy:"16",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"16",cy:"16",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"})]}),"Random",r&&(0,b.jsx)(f.Kbd,{className:"ml-1 bg-background/20 text-[10px] text-inherit",children:"Space"})]})]}),u=(0,b.jsxs)("div",{className:(0,e.cn)("flex flex-col gap-3 flex-1 min-w-0",r&&"rounded-2xl bg-muted/30 p-4 h-95"),children:[(0,b.jsxs)("div",{className:"flex border-b border-border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>m("presets"),className:(0,e.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","presets"===l?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"★ Presets"}),(0,b.jsx)("button",{type:"button",onClick:()=>m("custom"),className:(0,e.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","custom"===l?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"⚙ Custom"})]}),(0,b.jsxs)("div",{className:(0,e.cn)("flex-1 min-h-0",r&&"overflow-y-auto thin-scrollbar"),children:["presets"===l&&(0,b.jsx)("div",{className:(0,e.cn)("grid gap-2",k?"grid-cols-3":"grid-cols-4"),children:d.PRESETS.map(c=>{let f=c.config.shape===a.shape&&c.config.eye===a.eye&&c.config.nose===a.nose&&c.config.bg===a.bg;return(0,b.jsx)("button",{type:"button",onClick:()=>i(c.config),className:(0,e.cn)("flex items-center justify-center rounded-xl border p-2 transition-all",f?"border-primary border-2 bg-primary/5 shadow-sm":"border-border bg-background hover:border-primary/40"),children:(0,b.jsx)(d.AvatarRenderer,{config:c.config,size:56})},c.name)})}),"custom"===l&&(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsx)(h,{label:"Shape",keys:d.SHAPE_KEYS,value:a.shape,onChange:a=>n("shape",a),renderThumb:a=>(0,b.jsxs)("svg",{viewBox:"0 0 200 200",width:"40",height:"40",children:[(0,b.jsx)("rect",{width:"200",height:"200",rx:"56",fill:"hsl(var(--muted))"}),(0,b.jsx)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:d.Shapes[a]?.render()})]}),mobile:k}),(0,b.jsx)(h,{label:"Nose",keys:d.NOSE_KEYS,value:a.nose,onChange:a=>n("nose",a),renderThumb:a=>(0,b.jsx)("svg",{viewBox:"-14 -10 28 20",width:"36",height:"24",children:d.Noses[a]?.render("currentColor")}),mobile:k}),(0,b.jsx)(h,{label:"Eyes",keys:d.EYE_KEYS,value:a.eye,onChange:a=>n("eye",a),renderThumb:a=>(0,b.jsx)("svg",{viewBox:"-18 -10 36 20",width:"44",height:"24",children:d.Eyes[a]?.render(8,"currentColor")}),mobile:k}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Color"}),(0,b.jsx)("div",{className:(0,e.cn)("flex flex-wrap p-1",k?"gap-3":"gap-2"),children:d.BG_COLORS.map((c,d)=>(0,b.jsxs)(g.Tooltip,{children:[(0,b.jsx)(g.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:()=>n("bg",d),className:(0,e.cn)("rounded-full transition-shadow",k?"size-8":"size-7",a.bg===d?"ring-2 ring-primary ring-offset-2":"ring-1 ring-border"),style:{background:`linear-gradient(135deg, ${c.gradient[0]}, ${c.gradient[1]}, ${c.gradient[2]})`}})}),(0,b.jsx)(g.TooltipContent,{children:c.name})]},c.value))})]})]})]})]});return r?(0,b.jsxs)("div",{className:"flex gap-4",children:[t,u]}):(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[t,u]})}])},628508,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(432340),e=a.i(325848),f=a.i(690287),g=a.i(586220);a.s(["AvatarPickerDialog",0,function({config:a,onChange:h}){let[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(a),m=(0,g.useIsMobile)();return(0,b.jsxs)(d.Dialog,{open:i,onOpenChange:b=>{b&&l(a),j(b)},children:[(0,b.jsx)("div",{className:"flex justify-center",children:(0,b.jsx)(d.DialogTrigger,{render:(0,b.jsx)("button",{type:"button",className:"rounded-2xl bg-background p-1.5 shadow-sm border border-border hover:border-primary/40 transition-colors cursor-pointer"}),children:(0,b.jsx)(e.AvatarRenderer,{config:a,size:80})})}),(0,b.jsxs)(d.DialogContent,{className:m?"top-auto left-0 translate-x-0 translate-y-0 bottom-0 max-w-full sm:max-w-full w-full rounded-b-none rounded-t-xl max-h-[85dvh] overflow-y-auto pb-[env(safe-area-inset-bottom)]":"sm:max-w-180",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:"Choose Avatar"})}),(0,b.jsx)(f.AvatarGenerator,{config:k,layout:m?"vertical":"horizontal",onChange:a=>{l(a),h(a)},mobile:m}),m&&(0,b.jsx)("button",{type:"button",onClick:()=>j(!1),className:"w-full rounded-xl bg-primary py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:"Done"})]})]})}])},949409,a=>{"use strict";var b=a.i(749314),c=a.i(325848);a.s(["AgentAvatar",0,function({name:a,avatarUrl:d,size:e=32}){let f=(0,c.parseAvatarUrl)(d);return f?(0,b.jsx)(c.AvatarRenderer,{config:f,size:e,className:"rounded-full shrink-0"}):(0,b.jsx)("span",{className:"flex items-center justify-center rounded-full bg-secondary text-xs font-medium shrink-0",style:{width:e,height:e},children:(a??"?").charAt(0).toUpperCase()})}])}];
|
|
1
|
+
module.exports=[325848,a=>{"use strict";var b=a.i(749314),c=a.i(437199);let d="#27272a",e={fill:"rgba(255,255,255,0.92)",stroke:"rgba(255,255,255,0.95)",strokeWidth:3.5},f=[{name:"Purple",value:"#a855f7",gradient:["#c084fc","#a855f7","#7c3aed"],faceColor:"#2e1065"},{name:"Teal",value:"#14b8a6",gradient:["#5eead4","#14b8a6","#0d9488"],faceColor:"#134e4a"},{name:"Orange",value:"#f97316",gradient:["#fdba74","#f97316","#c2410c"],faceColor:"#7c2d12"},{name:"Blue",value:"#3b82f6",gradient:["#93c5fd","#3b82f6","#1d4ed8"],faceColor:"#1e3a5f"},{name:"Pink",value:"#f472b6",gradient:["#fda4af","#f472b6","#be185d"],faceColor:"#831843"},{name:"Yellow",value:"#eab308",gradient:["#fde047","#eab308","#a16207"],faceColor:"#713f12"},{name:"Green",value:"#22c55e",gradient:["#86efac","#22c55e","#15803d"],faceColor:"#14532d"},{name:"Beige",value:"#d6ccb8",gradient:["#e8e0d4","#d6ccb8","#b8a990"],faceColor:"#57534e"},{name:"Red",value:"#ef4444",gradient:["#fca5a5","#ef4444","#991b1b"],faceColor:"#7f1d1d"},{name:"Lake Blue",value:"#6366f1",gradient:["#a5b4fc","#6366f1","#3730a3"],faceColor:"#312e81"},{name:"Gray",value:"#9ca3af",gradient:["#d4d4d8","#9ca3af","#6b7280"],faceColor:"#374151"},{name:"Deep Purple",value:"#8b5cf6",gradient:["#c4b5fd","#8b5cf6","#5b21b6"],faceColor:"#3b0764"}],g={circle:{name:"Circle",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("circle",{cx:"100",cy:"100",r:"66",...e})},rounded:{name:"Rounded",face:{cx:100,cy:100,w:90},render:()=>(0,b.jsx)("rect",{x:"30",y:"30",width:"140",height:"140",rx:"32",...e})},hexagon:{name:"Hexagon",face:{cx:100,cy:100,w:86},render:()=>(0,b.jsx)("path",{d:"M100 32 C108 32 114 35 120 39 L155 60 C161 64 165 70 165 78 L165 122 C165 130 161 136 155 140 L120 161 C114 165 108 168 100 168 C92 168 86 165 80 161 L45 140 C39 136 35 130 35 122 L35 78 C35 70 39 64 45 60 L80 39 C86 35 92 32 100 32 Z",...e})},task:{name:"Task",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("rect",{x:"34",y:"34",width:"132",height:"132",rx:"24",...e})},book:{name:"Book",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("path",{d:"M42 162 L42 88 C42 54 68 34 100 34 C132 34 158 54 158 88 L158 162 C158 166 154 170 150 170 L50 170 C46 170 42 166 42 162 Z",...e})},mail:{name:"Mail",face:{cx:100,cy:100,w:86},render:()=>(0,b.jsx)("rect",{x:"28",y:"54",width:"144",height:"92",rx:"46",...e})},calendar:{name:"Calendar",face:{cx:100,cy:100,w:80},render:()=>(0,b.jsx)("path",{d:"M100 34 C138 34 166 52 166 80 C166 94 158 106 158 118 C158 148 138 166 100 166 C62 166 42 148 42 118 C42 106 34 94 34 80 C34 52 62 34 100 34 Z",...e})},bulb:{name:"Bulb",face:{cx:100,cy:104,w:76},render:()=>(0,b.jsx)("ellipse",{cx:"100",cy:"104",rx:"58",ry:"66",...e})},folder:{name:"Folder",face:{cx:102,cy:108,w:80},render:()=>(0,b.jsx)("path",{d:"M62 144 C40 144 32 128 36 116 C32 104 40 90 54 88 C56 72 70 60 88 62 C100 50 118 50 132 58 C144 52 162 60 162 76 C172 82 174 98 166 108 C172 120 164 136 150 140 Z",...e})},mountain:{name:"Mountain",face:{cx:100,cy:100,w:76},render:()=>(0,b.jsx)("path",{d:"M92 36 C120 32 156 48 164 78 C172 108 156 148 124 160 C92 172 48 156 38 124 C28 92 62 40 92 36 Z",...e})}},h=Object.keys(g),i={dot:{name:"Dot",render:(a=d)=>(0,b.jsx)("circle",{cx:"0",cy:"0",r:"4.5",fill:a})},dash:{name:"Dash",render:(a=d)=>(0,b.jsx)("line",{x1:"-10",y1:"0",x2:"10",y2:"0",stroke:a,strokeWidth:"5",strokeLinecap:"round"})},hookL:{name:"Hook",render:(a=d)=>(0,b.jsx)("path",{d:"M-11 0 Q-5.5 7 0 1.5 Q5.5 7 11 0",fill:"none",stroke:a,strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})},smile:{name:"Smile",render:(a=d)=>(0,b.jsx)("path",{d:"M-11 0 Q0 11 11 0",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"})},caret:{name:"Caret",render:(a=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("path",{d:"M-10 0 Q0 8 10 0",fill:"none",stroke:a,strokeWidth:"4.5",strokeLinecap:"round"}),(0,b.jsx)("ellipse",{cx:"3",cy:"6",rx:"4",ry:"4.5",fill:"#f472b6"})]})},arrow:{name:"Arrow",render:(a=d)=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"6",ry:"7.5",fill:a})},oh:{name:"o",render:(a=d)=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"7",ry:"7.5",fill:"none",stroke:a,strokeWidth:"4.5"})}},j=Object.keys(i),k=(a,c)=>{let e=c??a,f=(c,f=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("g",{transform:`translate(${-c}, 0)`,children:a(f)}),(0,b.jsx)("g",{transform:`translate(${c}, 0)`,children:e(f)})]});return f.displayName="EyePair",f},l={dots:{name:"Dots",render:k(a=>(0,b.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:a}))},big:{name:"Big",render:k(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:"0",cy:"0",r:"10",fill:a}),(0,b.jsx)("circle",{cx:"2.5",cy:"-3",r:"3.5",fill:"rgba(255,255,255,0.9)"})]}))},rings:{name:"Rings",render:k(a=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:"none",stroke:a,strokeWidth:"4.5"}))},arches:{name:"Arches",render:k(a=>(0,b.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},lines:{name:"Lines",render:k(a=>(0,b.jsx)("path",{d:"M-10 0 Q0 -6 10 0",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},happy:{name:"Happy",render:k(a=>(0,b.jsx)("path",{d:"M-10 5 Q0 -11 10 5",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},sleepy:{name:"Sleepy",render:k(a=>(0,b.jsx)("path",{d:"M-10 -2 Q0 8 10 -2",fill:"none",stroke:a,strokeWidth:"5",strokeLinecap:"round"}))},shy:{name:"Shy",render:k(a=>(0,b.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:a}))},wink:{name:"Wink",render:(a,c=d)=>(0,b.jsxs)("g",{children:[(0,b.jsx)("g",{transform:`translate(${-a}, 0)`,children:(0,b.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:c})}),(0,b.jsx)("g",{transform:`translate(${a}, 0)`,children:(0,b.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:c,strokeWidth:"5",strokeLinecap:"round"})})]})}},m=Object.keys(l),n={shape:"book",eye:"happy",nose:"dash",bg:1};function o(a){return a[Math.floor(Math.random()*a.length)]}let p="avatar:";a.s(["AvatarRenderer",0,function({config:a,size:d=200,className:e}){let h=(0,c.useId)().replace(/:/g,""),j=g[a.shape]??g.book,k=l[a.eye],m=i[a.nose],n=f[a.bg]??f[0],[o,p,q]=n.gradient,r=n.faceColor,{cx:s,cy:t,w:u}=j.face,v=Math.max(13,.24*u),w=t-Math.max(12,.16*u);return(0,b.jsxs)("svg",{viewBox:"0 0 200 200",width:d,height:d,className:e,style:{display:"block"},children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:`bg-${h}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:o}),(0,b.jsx)("stop",{offset:"50%",stopColor:p}),(0,b.jsx)("stop",{offset:"100%",stopColor:q})]}),(0,b.jsxs)("radialGradient",{id:`gl-${h}`,cx:"30%",cy:"25%",r:"60%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:"rgba(255,255,255,0.32)"}),(0,b.jsx)("stop",{offset:"100%",stopColor:"rgba(255,255,255,0)"})]}),(0,b.jsx)("filter",{id:`sh-${h}`,x:"-10%",y:"-5%",width:"120%",height:"130%",children:(0,b.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"4",floodColor:"rgba(0,0,0,0.18)"})})]}),(0,b.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#bg-${h})`}),(0,b.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#gl-${h})`}),(0,b.jsxs)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:[(0,b.jsx)("g",{"data-avatar-shape":"",filter:`url(#sh-${h})`,children:j.render()}),k&&(0,b.jsx)("g",{transform:`translate(${s}, ${w})`,children:(0,b.jsx)("g",{"data-avatar-eyes":"",children:k.render(v,r)})}),m&&(0,b.jsx)("g",{transform:`translate(${s}, ${t+7})`,children:(0,b.jsx)("g",{"data-avatar-nose":"",children:m.render(r)})})]})]})},"BG_COLORS",0,f,"DEFAULT_CONFIG",0,n,"EYE_KEYS",0,m,"Eyes",0,l,"NOSE_KEYS",0,j,"Noses",0,i,"PRESETS",0,[{name:"Task",config:{shape:"task",nose:"dot",eye:"dots",bg:0}},{name:"Notes",config:{shape:"book",nose:"dash",eye:"happy",bg:1}},{name:"Mail",config:{shape:"mail",nose:"smile",eye:"dots",bg:3}},{name:"Schedule",config:{shape:"calendar",nose:"dot",eye:"dots",bg:4}},{name:"Idea",config:{shape:"bulb",nose:"oh",eye:"rings",bg:5}},{name:"Project",config:{shape:"folder",nose:"dash",eye:"lines",bg:7}},{name:"Goal",config:{shape:"mountain",nose:"caret",eye:"arches",bg:8}},{name:"Dream",config:{shape:"circle",nose:"smile",eye:"shy",bg:11}},{name:"Organize",config:{shape:"rounded",nose:"dot",eye:"sleepy",bg:6}},{name:"Explore",config:{shape:"hexagon",nose:"hookL",eye:"wink",bg:9}},{name:"Focus",config:{shape:"task",nose:"caret",eye:"lines",bg:2}},{name:"Collect",config:{shape:"book",nose:"oh",eye:"rings",bg:10}}],"SHAPE_KEYS",0,h,"Shapes",0,g,"parseAvatarUrl",0,function(a){if(!a||!a.startsWith(p))return null;try{let b=JSON.parse(a.slice(p.length));if("object"==typeof b&&null!==b&&"string"==typeof b.shape&&"string"==typeof b.eye&&"string"==typeof b.nose&&"number"==typeof b.bg)return b;if("object"==typeof b&&null!==b&&"outline"in b)return n;return null}catch{return null}},"randomConfig",0,function(){return{shape:o(h),eye:o(m),nose:o(j),bg:Math.floor(Math.random()*f.length)}},"serializeAvatarConfig",0,function(a){return p+JSON.stringify(a)}])},253260,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(325848);let e=["avatar-anim-shape-bounce","avatar-anim-head-tilt","avatar-anim-shake","avatar-anim-wobble","avatar-anim-pulse","avatar-anim-spin","avatar-anim-jelly","avatar-anim-float","avatar-anim-nod"];a.s(["AnimatedAvatar",0,function({config:a,size:f,className:g,isHovered:h,isWorking:i}){let[j,k]=(0,c.useState)(null),l=(0,c.useRef)(-1);function m(){let a=Math.floor(Math.random()*e.length);return a===l.current&&(a=(a+1)%e.length),l.current=a,e[a]}return(0,c.useEffect)(()=>{h?k(m()):i||k(null)},[h,i]),(0,c.useEffect)(()=>{if(!i){h||k(null);return}k(m());let a=setInterval(()=>{k(m())},4e3);return()=>clearInterval(a)},[h,i]),(0,b.jsx)("div",{className:j??void 0,children:(0,b.jsx)(d.AvatarRenderer,{config:a,size:f,className:g})})}])},628508,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(432340),e=a.i(325848),f=a.i(75118),g=a.i(655795),h=a.i(525132);function i({label:a,keys:c,value:d,onChange:e,renderThumb:g,mobile:h=!1}){let j=c.indexOf(d),k=a=>e(c[(j+a+c.length)%c.length]),l=c[(j-1+c.length)%c.length],m=c[(j+1)%c.length];return(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-12 text-xs font-medium text-muted-foreground shrink-0",children:a}),(0,b.jsx)("button",{type:"button",onClick:()=>k(-1),className:(0,f.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",h?"size-10":"size-7"),children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,b.jsx)("path",{d:"M15 5 L8 12 L15 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,b.jsxs)("div",{className:"flex items-center gap-1 flex-1 justify-center",children:[(0,b.jsx)("button",{type:"button",onClick:()=>k(-1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:g(l)}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:"border-2 border-primary rounded-lg p-0.5",children:g(d)}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:g(m)})]}),(0,b.jsx)("button",{type:"button",onClick:()=>k(1),className:(0,f.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",h?"size-10":"size-7"),children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,b.jsx)("path",{d:"M9 5 L16 12 L9 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function j({config:a,onChange:d,layout:k="vertical",mobile:l=!1}){let[m,n]=(0,c.useState)("presets"),o=(0,c.useCallback)((b,c)=>{d({...a,[b]:c})},[a,d]),[p,q]=(0,c.useState)(!1),r=(0,c.useRef)(a);(0,c.useEffect)(()=>{if(r.current.shape!==a.shape||r.current.eye!==a.eye||r.current.nose!==a.nose||r.current.bg!==a.bg){q(!0);let b=setTimeout(()=>q(!1),450);return r.current=a,()=>clearTimeout(b)}},[a]),(0,c.useEffect)(()=>{if("horizontal"!==k)return;let a=a=>{"Space"===a.code&&a.target===document.body&&(a.preventDefault(),d((0,e.randomConfig)()))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[k,d]);let s="horizontal"===k,t=s?220:l?120:160,u=(0,b.jsxs)("div",{className:(0,f.cn)("flex flex-col items-center gap-3 rounded-2xl bg-muted/30",l?"p-3":"p-4",s?"w-70 shrink-0 justify-center":""),children:[(0,b.jsx)("div",{className:(0,f.cn)("rounded-2xl",p&&"animate-[shake_0.45s_cubic-bezier(.36,.07,.19,.97)]"),children:(0,b.jsx)(e.AvatarRenderer,{config:a,size:t})}),(0,b.jsxs)("button",{type:"button",onClick:()=>d((0,e.randomConfig)()),className:"inline-flex items-center gap-2 rounded-full bg-foreground px-4 py-1.5 text-sm font-medium text-background hover:bg-foreground/80 transition-colors",children:[(0,b.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"3"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"16",cy:"8",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"8",cy:"16",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"16",cy:"16",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"})]}),"Random",s&&(0,b.jsx)(g.Kbd,{className:"ml-1 bg-background/20 text-[10px] text-inherit",children:"Space"})]})]}),v=(0,b.jsxs)("div",{className:(0,f.cn)("flex flex-col gap-3 flex-1 min-w-0",s&&"rounded-2xl bg-muted/30 p-4 h-95"),children:[(0,b.jsxs)("div",{className:"flex border-b border-border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>n("presets"),className:(0,f.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","presets"===m?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"★ Presets"}),(0,b.jsx)("button",{type:"button",onClick:()=>n("custom"),className:(0,f.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","custom"===m?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"⚙ Custom"})]}),(0,b.jsxs)("div",{className:(0,f.cn)("flex-1 min-h-0",s&&"overflow-y-auto thin-scrollbar"),children:["presets"===m&&(0,b.jsx)("div",{className:(0,f.cn)("grid gap-2",l?"grid-cols-3":"grid-cols-4"),children:e.PRESETS.map(c=>{let g=c.config.shape===a.shape&&c.config.eye===a.eye&&c.config.nose===a.nose&&c.config.bg===a.bg;return(0,b.jsx)("button",{type:"button",onClick:()=>d(c.config),className:(0,f.cn)("flex items-center justify-center rounded-xl border p-2 transition-all",g?"border-primary border-2 bg-primary/5 shadow-sm":"border-border bg-background hover:border-primary/40"),children:(0,b.jsx)(e.AvatarRenderer,{config:c.config,size:56})},c.name)})}),"custom"===m&&(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsx)(i,{label:"Shape",keys:e.SHAPE_KEYS,value:a.shape,onChange:a=>o("shape",a),renderThumb:a=>(0,b.jsxs)("svg",{viewBox:"0 0 200 200",width:"40",height:"40",children:[(0,b.jsx)("rect",{width:"200",height:"200",rx:"56",fill:"hsl(var(--muted))"}),(0,b.jsx)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:e.Shapes[a]?.render()})]}),mobile:l}),(0,b.jsx)(i,{label:"Nose",keys:e.NOSE_KEYS,value:a.nose,onChange:a=>o("nose",a),renderThumb:a=>(0,b.jsx)("svg",{viewBox:"-14 -10 28 20",width:"36",height:"24",children:e.Noses[a]?.render("currentColor")}),mobile:l}),(0,b.jsx)(i,{label:"Eyes",keys:e.EYE_KEYS,value:a.eye,onChange:a=>o("eye",a),renderThumb:a=>(0,b.jsx)("svg",{viewBox:"-18 -10 36 20",width:"44",height:"24",children:e.Eyes[a]?.render(8,"currentColor")}),mobile:l}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Color"}),(0,b.jsx)("div",{className:(0,f.cn)("flex flex-wrap p-1",l?"gap-3":"gap-2"),children:e.BG_COLORS.map((c,d)=>(0,b.jsxs)(h.Tooltip,{children:[(0,b.jsx)(h.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:()=>o("bg",d),className:(0,f.cn)("rounded-full transition-shadow",l?"size-8":"size-7",a.bg===d?"ring-2 ring-primary ring-offset-2":"ring-1 ring-border"),style:{background:`linear-gradient(135deg, ${c.gradient[0]}, ${c.gradient[1]}, ${c.gradient[2]})`}})}),(0,b.jsx)(h.TooltipContent,{children:c.name})]},c.value))})]})]})]})]});return s?(0,b.jsxs)("div",{className:"flex gap-4",children:[u,v]}):(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[u,v]})}var k=a.i(586220);a.s(["AvatarPickerDialog",0,function({config:a,onChange:f}){let[g,h]=(0,c.useState)(!1),[i,l]=(0,c.useState)(a),m=(0,k.useIsMobile)();return(0,b.jsxs)(d.Dialog,{open:g,onOpenChange:b=>{b&&l(a),h(b)},children:[(0,b.jsx)("div",{className:"flex justify-center",children:(0,b.jsx)(d.DialogTrigger,{render:(0,b.jsx)("button",{type:"button",className:"rounded-2xl bg-background p-1.5 shadow-sm border border-border hover:border-primary/40 transition-colors cursor-pointer"}),children:(0,b.jsx)(e.AvatarRenderer,{config:a,size:80})})}),(0,b.jsxs)(d.DialogContent,{className:m?"top-auto left-0 translate-x-0 translate-y-0 bottom-0 max-w-full sm:max-w-full w-full rounded-b-none rounded-t-xl max-h-[85dvh] overflow-y-auto pb-[env(safe-area-inset-bottom)]":"sm:max-w-180",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:"Choose Avatar"})}),(0,b.jsx)(j,{config:i,layout:m?"vertical":"horizontal",onChange:a=>{l(a),f(a)},mobile:m}),m&&(0,b.jsx)("button",{type:"button",onClick:()=>h(!1),className:"w-full rounded-xl bg-primary py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:"Done"})]})]})}],628508)},949409,a=>{"use strict";var b=a.i(749314),c=a.i(325848);a.s(["AgentAvatar",0,function({name:a,avatarUrl:d,size:e=32}){let f=(0,c.parseAvatarUrl)(d);return f?(0,b.jsx)(c.AvatarRenderer,{config:f,size:e,className:"rounded-full shrink-0"}):(0,b.jsx)("span",{className:"flex items-center justify-center rounded-full bg-secondary text-xs font-medium shrink-0",style:{width:e,height:e},children:(a??"?").charAt(0).toUpperCase()})}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=src_web_src_components_avatar_0a0h8en._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[963744,540858,698824,207461,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(7455),e=a.i(732254),f=a.i(889624),g=a.i(25668),h=a.i(596174),i=a.i(722393),j=a.i(354498),k=a.i(647651);let l=(0,k.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,l],540858);var m=a.i(549931),n=a.i(307992),o=a.i(390759),p=a.i(858767),q=a.i(16831),r=a.i(113010),s=a.i(463295),t=a.i(73270),u=a.i(26822),v=a.i(75118),w=a.i(921584);a.i(343563);var x=a.i(347788),y=a.i(588339);let z=(0,k.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),A=new Set(["application/json","application/xml","application/javascript","application/typescript","application/x-yaml","application/toml","application/sql"]);function B(a){return!!(a.startsWith("text/")||A.has(a))}function C(a){return a.startsWith("text/html")}function D(a){return a.startsWith("image/")}function E(a){return B(a.content_type)||D(a.content_type)}function F(a,b,c){let d=new URLSearchParams({workspace_id:b});return c&&d.set("download","1"),`/api/artifacts/${a}/content?${d}`}function G({artifact:a,workspaceId:d}){let[e,f]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),i=F(a.id,d);if((0,c.useEffect)(()=>{B(a.content_type)&&!C(a.content_type)&&(h(!0),f(null),(0,y.getArtifactContent)(a.id,d).then(f).catch(()=>f("(failed to load content)")).finally(()=>h(!1)))},[a.id,a.content_type,d]),g)return(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(q.Loader2,{className:"size-5 animate-spin text-muted-foreground"})});if(D(a.content_type))return(0,b.jsx)("div",{className:"flex justify-center",children:(0,b.jsx)("img",{src:i,alt:a.filename,className:"max-w-full rounded-md"})});if(C(a.content_type))return(0,b.jsx)(H,{url:i,title:a.filename});if(B(a.content_type)){var j;return(j=a.filename,/\.md$/i.test(j))?(0,b.jsx)("div",{className:"markdown text-sm",children:(0,b.jsx)(x.Streamdown,{children:e??""})}):(0,b.jsx)("pre",{className:"whitespace-pre-wrap text-sm font-mono text-foreground",children:e})}return(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file type cannot be previewed."}),(0,b.jsxs)("a",{href:F(a.id,d,!0),download:a.filename,className:"inline-flex items-center gap-1.5 rounded-md border border-input bg-background px-3 py-1.5 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors",children:[(0,b.jsx)(z,{className:"size-3.5"}),"Download"]})]})}function H({url:a,title:c}){return(0,b.jsx)("iframe",{src:a,sandbox:"allow-same-origin",className:"w-full h-full rounded-b-xl overflow-hidden",style:{border:"none",display:"block"},title:c})}a.s(["ArtifactContentRenderer",0,G,"computeArtifactVersions",0,function(a){let b=new Map;for(let c of a){let a=b.get(c.filename)||[];a.push(c),b.set(c.filename,a)}let c=new Map,d=new Set;for(let[a,e]of b)e.sort((a,b)=>a.created_at.localeCompare(b.created_at)),e.length>1&&d.add(a),e.forEach((a,b)=>c.set(a.id,b+1));return{versionMap:c,duplicateFilenames:d}},"getArtifactUrl",0,F,"isHtmlType",0,C,"isPreviewable",0,E],698824);var I=a.i(510698),J=a.i(321932);function K(a){return a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}a.s(["ArtifactSheet",0,function({open:a,onOpenChange:f,artifacts:g,workspaceId:i,initialArtifact:j=null,versionMap:k,duplicateFilenames:l}){let[m,n]=(0,c.useState)(null),{width:o,onPointerDown:p,onPointerMove:q,onPointerUp:r}=(0,h.useSheetResize)({defaultWidth:448,minWidth:320,maxWidthRatio:.8});(0,c.useEffect)(()=>{a&&j&&n(j)},[a,j]);let s=a=>{f(a),a||setTimeout(()=>n(null),300)};return(0,b.jsx)(d.Sheet,{open:a,onOpenChange:s,children:(0,b.jsxs)(d.SheetContent,{side:"right",showCloseButton:!1,style:{width:`min(${o}px, 100vw)`,maxWidth:"none"},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.jsx)(h.SheetResizeHandle,{onPointerDown:p,onPointerMove:q,onPointerUp:r}),m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SheetHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0 sm:hidden",onClick:()=>{g.length>1?n(null):s(!1)},children:(0,b.jsx)(J.ArrowLeft,{className:"size-4"})}),(0,b.jsxs)(d.SheetTitle,{className:"truncate flex-1",children:[m.filename,l.has(m.filename)&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground bg-muted rounded-full px-1.5 py-0.5 font-normal",children:["v",k.get(m.id)??1]})]}),(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:()=>window.open(F(m.id,i,!0),"_blank"),children:(0,b.jsx)(z,{className:"size-4"})})]})}),(0,b.jsx)(d.SheetBody,{className:(0,v.cn)("thin-scrollbar",C(m.content_type)&&"p-0! overflow-hidden!"),children:(0,b.jsx)(G,{artifact:m,workspaceId:i})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SheetHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0 sm:hidden",onClick:()=>s(!1),children:(0,b.jsx)(J.ArrowLeft,{className:"size-4"})}),(0,b.jsx)(d.SheetTitle,{className:"flex-1",children:"Artifacts"})]})}),(0,b.jsx)(d.SheetBody,{className:"thin-scrollbar",children:0===g.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No artifacts uploaded yet."}):(0,b.jsx)("div",{className:"space-y-1",children:g.map(a=>(0,b.jsxs)("button",{onClick:()=>n(a),className:"flex items-center gap-3 w-full rounded-lg px-3 py-2.5 text-left hover:bg-muted/50 transition-colors",children:[(0,b.jsx)(I.FileText,{className:"size-4 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("p",{className:"text-sm font-medium truncate",children:[a.filename,l.has(a.filename)&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground bg-muted rounded-full px-1.5 py-0.5 font-normal",children:["v",k.get(a.id)??1]})]}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[K(a.size)," · ",new Date(a.created_at).toLocaleString()]})]})]},a.id))})})]})]})})},"formatSize",0,K],207461),a.i(974936);var L=a.i(988024);a.i(735132);var M=a.i(325848),N=a.i(22902),O=a.i(655795),P=a.i(27647);let Q="h-7 border-0 bg-transparent px-1.5 text-xs text-foreground hover:bg-accent transition-colors -ml-1.5",R=["todo","in_progress","review","done"];function S(a){return"done"===a?"Complete":a.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function T({agent:a,size:c=24}){let d=(0,M.parseAvatarUrl)(a?.avatar_url);return d?(0,b.jsx)(M.AvatarRenderer,{config:d,size:c,className:"shrink-0 rounded-full"}):(0,b.jsx)("span",{className:"flex shrink-0 items-center justify-center rounded-full border border-border bg-muted text-[11px] font-medium text-muted-foreground",style:{width:c,height:c},children:(a?.name??"?").slice(0,1).toUpperCase()})}function U({agent:a,size:c=24}){let d=a.email_handle?`${a.email_handle}@alook.ai`:"";return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(T,{agent:a,size:c}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[(0,b.jsx)("div",{className:"truncate text-xs font-medium",children:a.name}),d?(0,b.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:d}):null]})]})}function V({icon:a,children:c}){return(0,b.jsxs)("div",{className:"group flex items-center gap-2",children:[(0,b.jsx)("span",{className:"inline-flex size-6 shrink-0 items-center justify-center text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:c})]})}function W({message:a}){return"event"===a.role?(0,b.jsx)("div",{className:"rounded-md border bg-muted/50 text-muted-foreground text-xs px-3 py-2",children:a.content}):(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-background/55 p-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"capitalize",children:a.role}),(0,b.jsx)("span",{children:new Date(a.created_at).toLocaleString()})]}),(0,b.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm wrap-break-word",children:(0,b.jsx)(x.Streamdown,{children:a.content})})]})}function X({comment:a,agents:c}){let d="agent"===a.author_type?c.find(b=>b.id===a.author_id)?.name??"Agent":"You";return(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-background p-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium",children:d}),(0,b.jsx)("span",{children:new Date(a.created_at).toLocaleString()})]}),(0,b.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm wrap-break-word",children:(0,b.jsx)(x.Streamdown,{children:a.content})})]})}function Y({artifacts:a,workspaceId:c,onArtifactClick:d}){if(0===a.length)return null;let e="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent";return(0,b.jsx)("div",{className:"space-y-1",children:a.map(a=>{let f=d&&E(a),g=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.File,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.filename}),(0,b.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:K(a.size)})]});return f?(0,b.jsx)("button",{type:"button",onClick:()=>d(a),className:(0,v.cn)(e,"w-full text-left"),children:g},a.id):(0,b.jsx)("a",{href:F(a.id,c,!0),target:"_blank",rel:"noopener noreferrer",className:e,children:g},a.id)})})}a.s(["IssueSheet",0,function({open:a,onOpenChange:k,agents:o,issue:x,detail:z,detailLoading:A,activeTask:B,traceTasks:C,submitting:D,defaultAgentId:E,slug:F,workspaceId:G,draft:H,onDraftChange:I,onCreate:J,onUpdate:K,onStatusChange:M,onCommented:Z,onDispatched:$,onArtifactClick:_}){let aa,ab,ac=x?"detail":"create",[ad,ae]=(0,c.useState)(""),[af,ag]=(0,c.useState)(""),[ah,ai]=(0,c.useState)(E??""),[aj,ak]=(0,c.useState)(!1),[al,am]=(0,c.useState)(""),[an,ao]=(0,c.useState)(!1),[ap,aq]=(0,c.useState)(null),[ar,as]=(0,c.useState)(!1),at=(0,c.useRef)(null),au=(0,c.useRef)(null),av=B&&!["completed","failed","cancelled","superseded"].includes(B.status),aw=C?.some(a=>["queued","dispatched","running"].includes(a.status))??!1;(0,c.useEffect)(()=>{a&&(x?(ae(x.title),ag(x.description??"")):(ae(H?.title??""),ag(H?.description??""),ai(H?.agentId||E||"")))},[a,x?.id]),(0,c.useEffect)(()=>{"create"===ac&&a&&I?.({title:ad,description:af,agentId:ah})},[ad,af,ah,ac,a]),(0,c.useEffect)(()=>{au.current&&(au.current.scrollTop=au.current.scrollHeight)},[z?.messages?.length,z?.comments?.length,C?.length]);let ax=(0,c.useRef)(null),ay=(0,c.useRef)(K);(0,c.useEffect)(()=>{ay.current=K},[K]);let az=(0,c.useRef)(ad);(0,c.useEffect)(()=>{az.current=ad},[ad]);let aA=(0,c.useRef)(af);(0,c.useEffect)(()=>{aA.current=af},[af]);let aB=(0,c.useRef)(x);(0,c.useEffect)(()=>{aB.current=x},[x]);let aC=(0,c.useCallback)(()=>{ax.current&&clearTimeout(ax.current),ax.current=null;let a=aB.current;if(!a)return;let b=az.current!==a.title,c=aA.current!==(a.description??"");if(!b&&!c||!az.current.trim())return;let d={};b&&(d.title=az.current.trim()),c&&(d.description=aA.current.trim()),ay.current?.(a.id,d)},[]);(0,c.useEffect)(()=>{if("detail"!==ac||!x||!a)return;let b=ad!==x.title,c=af!==(x.description??"");if((b||c)&&ad.trim())return ax.current&&clearTimeout(ax.current),ax.current=setTimeout(aC,500),()=>{ax.current&&clearTimeout(ax.current)}},[ad,af,ac,x,a,aC]);let aD=(0,c.useRef)(a);(0,c.useEffect)(()=>{aD.current&&!a&&"detail"===ac&&aC(),aD.current=a},[a,ac,aC]);let{width:aE,onPointerDown:aF,onPointerMove:aG,onPointerUp:aH}=(0,h.useSheetResize)({defaultWidth:448,minWidth:320,maxWidthRatio:.8}),aI=async()=>{ad.trim()&&!D&&await J?.({agent_id:ah||void 0,title:ad.trim(),description:af.trim()})},aJ=async()=>{if(al.trim()&&!an&&x){ao(!0);try{if(!(await fetch(`/api/issues/${x.id}/comments?workspace_id=${G}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:al.trim()})})).ok)throw Error("Failed to send comment");am(""),Z?.()}catch{w.toast.error("Failed to send comment")}finally{ao(!1)}}},aK=(0,c.useRef)(null),aL=(0,c.useCallback)(a=>{"Enter"===a.key&&a.shiftKey&&"create"===ac&&(aK.current&&aK.current.contains(a.target)||(a.preventDefault(),a.stopPropagation(),aI()))},[ac,ad,af,ah,D]),aM="detail"===ac&&x?.status==="todo",aN=o.find(a=>a.id===ah)??null,aO=x?.agent_id?o.find(a=>a.id===x.agent_id)??null:null,[aP,aQ]=(0,c.useState)("issue");(0,c.useEffect)(()=>{aQ("issue")},[x?.id,ac]);let aR=(0,b.jsx)(b.Fragment,{children:A?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(g.Skeleton,{className:"h-12"}),(0,b.jsx)(g.Skeleton,{className:"h-8"}),(0,b.jsx)(g.Skeleton,{className:"h-12"})]}):0!==(ab=[...(z?.messages??[]).filter(a=>"event"===a.role).map(a=>({kind:"event",id:a.id,created_at:a.created_at,data:a})),...(z?.comments??[]).map(a=>({kind:"comment",id:a.id,created_at:a.created_at,data:a}))].sort((a,b)=>new Date(a.created_at).getTime()-new Date(b.created_at).getTime())).length||av?(0,b.jsxs)("div",{className:"relative pl-4",children:[(0,b.jsx)("div",{className:"absolute left-[4.5px] top-2 bottom-2 w-px bg-border"}),(0,b.jsxs)("div",{className:"space-y-3",children:[ab.map(a=>(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:"absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background bg-muted-foreground/40"}),"event"===a.kind?(0,b.jsx)(W,{message:a.data}):(0,b.jsx)(X,{comment:a.data,agents:o})]},a.id)),(av||aw)&&((aa=C?.filter(a=>["queued","dispatched","running"].includes(a.status)))&&aa.length>0?aa.map(a=>{let c="running"===a.status;return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:(0,v.cn)("absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background",c?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),(0,b.jsx)("div",{className:(0,v.cn)("rounded-md border px-3 py-2.5",c?"border-emerald-500/30 bg-emerald-500/10":"border-border/60 bg-muted/30"),children:(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[a.agent&&(0,b.jsx)(T,{agent:{avatar_url:a.agent.avatarUrl,name:a.agent.name},size:16}),(0,b.jsxs)("span",{className:c?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground",children:[a.agent?.name??"Agent"," ",c?"is working":"— queued"]})]})})]},a.id)}):(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:"absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background bg-emerald-500 animate-pulse"}),(0,b.jsx)("div",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/10 px-3 py-2.5",children:(0,b.jsx)("div",{className:"flex items-center gap-2 text-xs text-emerald-600 dark:text-emerald-400",children:"Working"})})]}))]})]}):(0,b.jsx)("div",{className:"text-xs text-muted-foreground",children:"No activity yet."})}),aS="detail"!==ac||!x||aM||av||(0,L.isTerminalIssueStatus)(x.status)?null:(0,b.jsxs)("div",{className:"flex flex-col rounded-xl border bg-background/60 transition-colors duration-200 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50",children:[(0,b.jsx)("textarea",{ref:aK,placeholder:"Leave a comment...",value:al,onChange:a=>am(a.target.value),className:"w-full resize-none bg-transparent px-3.5 py-2.5 text-sm leading-relaxed outline-none placeholder:text-muted-foreground field-sizing-content min-h-15 max-h-32 thin-scrollbar overflow-y-auto",onKeyDown:a=>{"Enter"===a.key&&a.shiftKey&&(a.preventDefault(),aJ())}}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-2.5 pb-2 pt-0.5",children:[(0,b.jsx)(O.Kbd,{className:"text-[11px] text-muted-foreground/50",children:"⇧↵"}),(0,b.jsx)(e.Button,{size:"icon-sm",onClick:aJ,disabled:!al.trim()||an,className:(0,v.cn)("rounded-lg transition-opacity duration-200",!al.trim()&&!an&&"opacity-40"),children:an?(0,b.jsx)(q.Loader2,{className:"size-3.5 animate-spin"}):(0,b.jsx)(l,{className:"size-3.5"})})]})]}),aT=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"shrink-0 px-2 sm:px-3 pt-5 pb-1",children:(0,b.jsx)(P.AutoResizeTextarea,{value:ad,onChange:a=>ae(a.target.value),onKeyDown:a=>{if("Enter"===a.key&&!a.shiftKey){a.preventDefault();let b=at.current?.querySelector('[contenteditable="true"]');b?.focus()}},placeholder:"create"===ac?"New issue":"Untitled",autoFocus:"create"===ac,rows:1,className:"w-full rounded-none border-0 bg-transparent px-0 py-1 font-news text-2xl md:text-3xl font-medium leading-[1.2] tracking-tight shadow-none outline-none focus-visible:border-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground/40 placeholder:font-normal"})}),(0,b.jsxs)("div",{className:"shrink-0 space-y-1.5 px-2 sm:px-3 py-2",children:[(0,b.jsx)(V,{icon:(0,b.jsx)(s.User,{className:"size-3.5"}),children:"create"===ac||aM?(0,b.jsxs)(i.Popover,{open:aj,onOpenChange:ak,children:[(0,b.jsx)(i.PopoverTrigger,{render:(0,b.jsx)("button",{type:"button",disabled:D||ar,className:(0,v.cn)(Q,"flex items-center gap-1.5 rounded-md")}),children:aN?(0,b.jsx)("span",{className:"truncate",children:aN.name}):(0,b.jsx)("span",{className:"text-muted-foreground/70",children:"Unassigned"})}),(0,b.jsxs)(i.PopoverContent,{align:"start",className:"max-h-64 w-72 overflow-y-auto thin-scrollbar p-1",children:[!aM&&(0,b.jsxs)("button",{type:"button",onClick:()=>{ai(""),ak(!1)},className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"None (unassigned)"}),ah?null:(0,b.jsx)(m.Check,{className:"size-3.5 shrink-0"})]}),o.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>{aM?aq(a):ai(a.id),ak(!1)},className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)(U,{agent:a,size:18}),ah===a.id?(0,b.jsx)(m.Check,{className:"size-3.5 shrink-0"}):null]},a.id))]})]}):(0,b.jsx)("span",{className:"text-xs truncate",children:aO?aO.name:(0,b.jsx)("span",{className:"text-muted-foreground/70",children:"Unassigned"})})}),"detail"===ac&&x&&(0,b.jsx)(V,{icon:(0,b.jsx)(n.CircleDot,{className:"size-3.5"}),children:(0,b.jsxs)(j.Select,{value:x.status,onValueChange:a=>{a&&x&&a!==x.status&&M?.(x.id,a)},items:(aM?["todo","done"]:R).map(a=>({value:a,label:S(a)})),children:[(0,b.jsx)(j.SelectTrigger,{className:"h-7 w-auto border-none bg-transparent px-1.5 shadow-none text-xs text-foreground hover:bg-accent transition-colors rounded-md",children:(0,b.jsx)(j.SelectValue,{})}),(0,b.jsx)(j.SelectContent,{children:(aM?["todo","done"]:R).map(a=>(0,b.jsx)(j.SelectItem,{value:a,children:S(a)},a))})]})}),"detail"===ac&&x?.agent_id&&x?.conversation_id&&(0,b.jsx)(V,{icon:(0,b.jsx)(r.MessageSquare,{className:"size-3.5"}),children:(0,b.jsx)(u.default,{href:`/w/${F}/agents/${x.agent_id}?conv=${x.conversation_id}${x.latest_task_id?`&task=${x.latest_task_id}`:""}`,className:(0,v.cn)(Q,"inline-flex items-center rounded-md"),children:"Chat"})}),"detail"===ac&&z?.traceId&&(0,b.jsx)(V,{icon:(0,b.jsx)(p.GitBranch,{className:"size-3.5"}),children:(0,b.jsx)(u.default,{href:`/w/${F}/threads/${z.traceId}`,className:(0,v.cn)(Q,"inline-flex items-center rounded-md"),children:"Thread"})})]}),(0,b.jsx)("div",{className:(0,v.cn)("px-2 sm:px-3 py-2 flex-1 min-h-0 overflow-y-auto thin-scrollbar"),ref:at,children:(0,b.jsx)(f.MarkdownEditor,{value:af,onChange:ag,placeholder:"Describe the issue...",minHeight:"create"===ac?"10rem":"4rem",variant:"seamless",contentType:"markdown",agents:o},x?.id??"new")}),"detail"===ac&&z?.artifacts&&z.artifacts.length>0&&(0,b.jsx)("div",{className:"shrink-0 px-2 sm:px-3 py-2",children:(0,b.jsx)(Y,{artifacts:z.artifacts,workspaceId:G,onArtifactClick:_})})]});return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:k,children:[(0,b.jsxs)(d.SheetContent,{side:"right",showCloseButton:!1,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 overflow-visible",style:{width:`min(${aE}px, 100vw)`,maxWidth:"none"},children:[(0,b.jsx)(h.SheetResizeHandle,{onPointerDown:aF,onPointerMove:aG,onPointerUp:aH}),(0,b.jsxs)(d.SheetClose,{render:(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm"}),className:"absolute top-3 right-3 z-10 sm:hidden",children:[(0,b.jsx)(t.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]}),"detail"===ac&&!aM&&(0,b.jsxs)("div",{className:"hidden lg:flex absolute right-full top-0 bottom-0 mr-2 w-90 flex-col rounded-xl border bg-background shadow-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"shrink-0 flex items-center border-b px-4 py-2.5",children:(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Activity"})}),(0,b.jsx)("div",{ref:au,className:"flex-1 min-h-0 overflow-y-auto thin-scrollbar px-4 py-4 space-y-3",children:aR}),aS&&(0,b.jsx)("div",{className:"shrink-0 border-t px-4 py-3",children:aS})]}),(0,b.jsx)(d.SheetTitle,{className:"sr-only",children:"create"===ac?"New Issue":x?.title??"Issue"}),(0,b.jsxs)("div",{className:"flex flex-1 min-h-0 flex-col",onKeyDownCapture:aL,children:["detail"===ac&&!aM&&(0,b.jsxs)("div",{className:"shrink-0 flex items-center gap-1 border-b px-2 py-1.5 lg:hidden",children:[(0,b.jsx)("button",{type:"button",onClick:()=>aQ("issue"),className:(0,v.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors","issue"===aP?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:"Issue"}),(0,b.jsx)("button",{type:"button",onClick:()=>aQ("activity"),className:(0,v.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors","activity"===aP?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:"Activity"})]}),(0,b.jsxs)(d.SheetBody,{className:"flex flex-col gap-0 p-0 overflow-hidden",children:[(0,b.jsx)("div",{className:(0,v.cn)("flex flex-col flex-1 min-h-0","detail"===ac&&"activity"===aP&&"hidden lg:flex"),children:aT}),"detail"===ac&&!aM&&"activity"===aP&&(0,b.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 lg:hidden",children:[(0,b.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto thin-scrollbar px-3 py-4 space-y-3",children:aR}),aS&&(0,b.jsx)("div",{className:"shrink-0 border-t px-3 py-3",children:aS})]})]}),"create"===ac&&(0,b.jsxs)(d.SheetFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",size:"sm",onClick:()=>k(!1),disabled:D,children:"Cancel"}),(0,b.jsxs)(e.Button,{size:"sm",onClick:aI,disabled:!ad.trim()||D,children:[D&&(0,b.jsx)(q.Loader2,{className:"mr-1.5 size-3.5 animate-spin"}),(0,b.jsx)(O.Kbd,{className:"mr-1 hidden sm:inline-flex bg-background/20 text-inherit opacity-60",children:"⇧ + ⏎"}),"Create"]})]})]})]}),(0,b.jsx)(N.ConfirmDialog,{open:!!ap,onOpenChange:a=>{a||aq(null)},title:"Run issue?",description:`This issue will be assigned to ${ap?.name??"the agent"} and start running immediately.`,confirmLabel:"Run",loadingLabel:"Running...",confirmVariant:"default",loading:ar,onConfirm:async()=>{if(ap&&x){as(!0);try{await (0,y.updateIssue)(G,x.id,{agent_id:ap.id}),aq(null),$?.(x.id)}catch(a){w.toast.error(a instanceof Error?a.message:"Failed to dispatch issue"),aq(null)}finally{as(!1)}}}})]})}],963744)}];
|
|
1
|
+
module.exports=[963744,540858,698824,207461,a=>{"use strict";var b=a.i(749314),c=a.i(437199),d=a.i(7455),e=a.i(732254),f=a.i(889624),g=a.i(25668),h=a.i(596174),i=a.i(722393),j=a.i(354498),k=a.i(647651);let l=(0,k.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,l],540858);var m=a.i(549931),n=a.i(307992),o=a.i(390759),p=a.i(858767),q=a.i(16831),r=a.i(113010),s=a.i(463295),t=a.i(73270),u=a.i(26822),v=a.i(75118),w=a.i(921584);a.i(343563);var x=a.i(347788),y=a.i(588339);let z=(0,k.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),A=new Set(["application/json","application/xml","application/javascript","application/typescript","application/x-yaml","application/toml","application/sql"]);function B(a){return!!(a.startsWith("text/")||A.has(a))}function C(a){return a.startsWith("text/html")}function D(a){return a.startsWith("image/")}function E(a){return B(a.content_type)||D(a.content_type)}function F(a,b,c){let d=new URLSearchParams({workspace_id:b});return c&&d.set("download","1"),`/api/artifacts/${a}/content?${d}`}function G({artifact:a,workspaceId:d}){let[e,f]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),i=F(a.id,d);if((0,c.useEffect)(()=>{B(a.content_type)&&!C(a.content_type)&&(h(!0),f(null),(0,y.getArtifactContent)(a.id,d).then(f).catch(()=>f("(failed to load content)")).finally(()=>h(!1)))},[a.id,a.content_type,d]),g)return(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(q.Loader2,{className:"size-5 animate-spin text-muted-foreground"})});if(D(a.content_type))return(0,b.jsx)("div",{className:"flex justify-center",children:(0,b.jsx)("img",{src:i,alt:a.filename,className:"max-w-full rounded-md"})});if(C(a.content_type))return(0,b.jsx)(H,{url:i,title:a.filename});if(B(a.content_type)){var j;return(j=a.filename,/\.md$/i.test(j))?(0,b.jsx)("div",{className:"markdown text-sm",children:(0,b.jsx)(x.Streamdown,{children:e??""})}):(0,b.jsx)("pre",{className:"whitespace-pre-wrap text-sm font-mono text-foreground",children:e})}return(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"This file type cannot be previewed."}),(0,b.jsxs)("a",{href:F(a.id,d,!0),download:a.filename,className:"inline-flex items-center gap-1.5 rounded-md border border-input bg-background px-3 py-1.5 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-colors",children:[(0,b.jsx)(z,{className:"size-3.5"}),"Download"]})]})}function H({url:a,title:c}){return(0,b.jsx)("iframe",{src:a,sandbox:"allow-same-origin",className:"w-full h-full rounded-b-xl overflow-hidden",style:{border:"none",display:"block"},title:c})}a.s(["ArtifactContentRenderer",0,G,"computeArtifactVersions",0,function(a){let b=new Map;for(let c of a){let a=b.get(c.filename)||[];a.push(c),b.set(c.filename,a)}let c=new Map,d=new Set;for(let[a,e]of b)e.sort((a,b)=>a.created_at.localeCompare(b.created_at)),e.length>1&&d.add(a),e.forEach((a,b)=>c.set(a.id,b+1));return{versionMap:c,duplicateFilenames:d}},"getArtifactUrl",0,F,"isHtmlType",0,C,"isPreviewable",0,E],698824);var I=a.i(510698),J=a.i(321932);function K(a){return a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}a.s(["ArtifactSheet",0,function({open:a,onOpenChange:f,artifacts:g,workspaceId:i,initialArtifact:j=null,versionMap:k,duplicateFilenames:l}){let[m,n]=(0,c.useState)(null),{width:o,onPointerDown:p,onPointerMove:q,onPointerUp:r}=(0,h.useSheetResize)({defaultWidth:448,minWidth:320,maxWidthRatio:.8});(0,c.useEffect)(()=>{a&&j&&n(j)},[a,j]);let s=a=>{f(a),a||setTimeout(()=>n(null),300)};return(0,b.jsx)(d.Sheet,{open:a,onOpenChange:s,children:(0,b.jsxs)(d.SheetContent,{side:"right",showCloseButton:!1,style:{width:`min(${o}px, 100vw)`,maxWidth:"none"},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.jsx)(h.SheetResizeHandle,{onPointerDown:p,onPointerMove:q,onPointerUp:r}),m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SheetHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0 sm:hidden",onClick:()=>s(!1),children:(0,b.jsx)(J.ArrowLeft,{className:"size-4"})}),(0,b.jsxs)(d.SheetTitle,{className:"truncate flex-1",children:[m.filename,l.has(m.filename)&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground bg-muted rounded-full px-1.5 py-0.5 font-normal",children:["v",k.get(m.id)??1]})]}),(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:()=>window.open(F(m.id,i,!0),"_blank"),children:(0,b.jsx)(z,{className:"size-4"})})]})}),(0,b.jsx)(d.SheetBody,{className:(0,v.cn)("thin-scrollbar",C(m.content_type)&&"p-0! overflow-hidden!"),children:(0,b.jsx)(G,{artifact:m,workspaceId:i})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SheetHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0 sm:hidden",onClick:()=>s(!1),children:(0,b.jsx)(J.ArrowLeft,{className:"size-4"})}),(0,b.jsx)(d.SheetTitle,{className:"flex-1",children:"Artifacts"})]})}),(0,b.jsx)(d.SheetBody,{className:"thin-scrollbar",children:0===g.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No artifacts uploaded yet."}):(0,b.jsx)("div",{className:"space-y-1",children:g.map(a=>(0,b.jsxs)("button",{onClick:()=>n(a),className:"flex items-center gap-3 w-full rounded-lg px-3 py-2.5 text-left hover:bg-muted/50 transition-colors",children:[(0,b.jsx)(I.FileText,{className:"size-4 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("p",{className:"text-sm font-medium truncate",children:[a.filename,l.has(a.filename)&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground bg-muted rounded-full px-1.5 py-0.5 font-normal",children:["v",k.get(a.id)??1]})]}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[K(a.size)," · ",new Date(a.created_at).toLocaleString()]})]})]},a.id))})})]})]})})},"formatSize",0,K],207461),a.i(974936);var L=a.i(988024),M=a.i(911509);a.i(735132);var N=a.i(325848),O=a.i(22902),P=a.i(655795),Q=a.i(27647);let R="h-7 border-0 bg-transparent px-1.5 text-xs text-foreground hover:bg-accent transition-colors -ml-1.5",S=["todo","in_progress","review","done"];function T(a){return"done"===a?"Complete":a.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function U({agent:a,size:c=24}){let d=(0,N.parseAvatarUrl)(a?.avatar_url);return d?(0,b.jsx)(N.AvatarRenderer,{config:d,size:c,className:"shrink-0 rounded-full"}):(0,b.jsx)("span",{className:"flex shrink-0 items-center justify-center rounded-full border border-border bg-muted text-[11px] font-medium text-muted-foreground",style:{width:c,height:c},children:(a?.name??"?").slice(0,1).toUpperCase()})}function V({agent:a,size:c=24}){let d=a.email_handle?(0,M.toAlookAddress)(a.email_handle):"";return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(U,{agent:a,size:c}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[(0,b.jsx)("div",{className:"truncate text-xs font-medium",children:a.name}),d?(0,b.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:d}):null]})]})}function W({icon:a,children:c}){return(0,b.jsxs)("div",{className:"group flex items-center gap-2",children:[(0,b.jsx)("span",{className:"inline-flex size-6 shrink-0 items-center justify-center text-muted-foreground",children:a}),(0,b.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:c})]})}function X({message:a}){return"event"===a.role?(0,b.jsx)("div",{className:"rounded-md border bg-muted/50 text-muted-foreground text-xs px-3 py-2",children:a.content}):(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-background/55 p-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"capitalize",children:a.role}),(0,b.jsx)("span",{children:new Date(a.created_at).toLocaleString()})]}),(0,b.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm wrap-break-word",children:(0,b.jsx)(x.Streamdown,{children:a.content})})]})}function Y({comment:a,agents:c}){let d="agent"===a.author_type?c.find(b=>b.id===a.author_id)?.name??"Agent":"You";return(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-background p-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium",children:d}),(0,b.jsx)("span",{children:new Date(a.created_at).toLocaleString()})]}),(0,b.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm wrap-break-word",children:(0,b.jsx)(x.Streamdown,{children:a.content})})]})}function Z({artifacts:a,workspaceId:c,onArtifactClick:d}){if(0===a.length)return null;let e="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent";return(0,b.jsx)("div",{className:"space-y-1",children:a.map(a=>{let f=d&&E(a),g=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.File,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.filename}),(0,b.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:K(a.size)})]});return f?(0,b.jsx)("button",{type:"button",onClick:()=>d(a),className:(0,v.cn)(e,"w-full text-left"),children:g},a.id):(0,b.jsx)("a",{href:F(a.id,c,!0),target:"_blank",rel:"noopener noreferrer",className:e,children:g},a.id)})})}a.s(["IssueSheet",0,function({open:a,onOpenChange:k,agents:o,issue:x,detail:z,detailLoading:A,activeTask:B,traceTasks:C,submitting:D,defaultAgentId:E,slug:F,workspaceId:G,draft:H,onDraftChange:I,onCreate:J,onUpdate:K,onStatusChange:M,onCommented:N,onDispatched:$,onArtifactClick:_}){let aa,ab,ac=x?"detail":"create",[ad,ae]=(0,c.useState)(""),[af,ag]=(0,c.useState)(""),[ah,ai]=(0,c.useState)(E??""),[aj,ak]=(0,c.useState)(!1),[al,am]=(0,c.useState)(""),[an,ao]=(0,c.useState)(!1),[ap,aq]=(0,c.useState)(null),[ar,as]=(0,c.useState)(!1),at=(0,c.useRef)(null),au=(0,c.useRef)(null),av=B&&!["completed","failed","cancelled","superseded"].includes(B.status),aw=C?.some(a=>["queued","dispatched","running"].includes(a.status))??!1;(0,c.useEffect)(()=>{a&&(x?(ae(x.title),ag(x.description??"")):(ae(H?.title??""),ag(H?.description??""),ai(H?.agentId||E||"")))},[a,x?.id]),(0,c.useEffect)(()=>{"create"===ac&&a&&I?.({title:ad,description:af,agentId:ah})},[ad,af,ah,ac,a]),(0,c.useEffect)(()=>{au.current&&(au.current.scrollTop=au.current.scrollHeight)},[z?.messages?.length,z?.comments?.length,C?.length]);let ax=(0,c.useRef)(null),ay=(0,c.useRef)(K);(0,c.useEffect)(()=>{ay.current=K},[K]);let az=(0,c.useRef)(ad);(0,c.useEffect)(()=>{az.current=ad},[ad]);let aA=(0,c.useRef)(af);(0,c.useEffect)(()=>{aA.current=af},[af]);let aB=(0,c.useRef)(x);(0,c.useEffect)(()=>{aB.current=x},[x]);let aC=(0,c.useCallback)(()=>{ax.current&&clearTimeout(ax.current),ax.current=null;let a=aB.current;if(!a)return;let b=az.current!==a.title,c=aA.current!==(a.description??"");if(!b&&!c||!az.current.trim())return;let d={};b&&(d.title=az.current.trim()),c&&(d.description=aA.current.trim()),ay.current?.(a.id,d)},[]);(0,c.useEffect)(()=>{if("detail"!==ac||!x||!a)return;let b=ad!==x.title,c=af!==(x.description??"");if((b||c)&&ad.trim())return ax.current&&clearTimeout(ax.current),ax.current=setTimeout(aC,500),()=>{ax.current&&clearTimeout(ax.current)}},[ad,af,ac,x,a,aC]);let aD=(0,c.useRef)(a);(0,c.useEffect)(()=>{aD.current&&!a&&"detail"===ac&&aC(),aD.current=a},[a,ac,aC]);let{width:aE,onPointerDown:aF,onPointerMove:aG,onPointerUp:aH}=(0,h.useSheetResize)({defaultWidth:448,minWidth:320,maxWidthRatio:.8}),aI=async()=>{ad.trim()&&!D&&await J?.({agent_id:ah||void 0,title:ad.trim(),description:af.trim()})},aJ=async()=>{if(al.trim()&&!an&&x){ao(!0);try{if(!(await fetch(`/api/issues/${x.id}/comments?workspace_id=${G}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:al.trim()})})).ok)throw Error("Failed to send comment");am(""),N?.()}catch{w.toast.error("Failed to send comment")}finally{ao(!1)}}},aK=(0,c.useRef)(null),aL=(0,c.useCallback)(a=>{"Enter"===a.key&&a.shiftKey&&"create"===ac&&(aK.current&&aK.current.contains(a.target)||(a.preventDefault(),a.stopPropagation(),aI()))},[ac,ad,af,ah,D]),aM="detail"===ac&&x?.status==="todo",aN=o.find(a=>a.id===ah)??null,aO=x?.agent_id?o.find(a=>a.id===x.agent_id)??null:null,[aP,aQ]=(0,c.useState)("issue");(0,c.useEffect)(()=>{aQ("issue")},[x?.id,ac]);let aR=(0,b.jsx)(b.Fragment,{children:A?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(g.Skeleton,{className:"h-12"}),(0,b.jsx)(g.Skeleton,{className:"h-8"}),(0,b.jsx)(g.Skeleton,{className:"h-12"})]}):0!==(ab=[...(z?.messages??[]).filter(a=>"event"===a.role).map(a=>({kind:"event",id:a.id,created_at:a.created_at,data:a})),...(z?.comments??[]).map(a=>({kind:"comment",id:a.id,created_at:a.created_at,data:a}))].sort((a,b)=>new Date(a.created_at).getTime()-new Date(b.created_at).getTime())).length||av?(0,b.jsxs)("div",{className:"relative pl-4",children:[(0,b.jsx)("div",{className:"absolute left-[4.5px] top-2 bottom-2 w-px bg-border"}),(0,b.jsxs)("div",{className:"space-y-3",children:[ab.map(a=>(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:"absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background bg-muted-foreground/40"}),"event"===a.kind?(0,b.jsx)(X,{message:a.data}):(0,b.jsx)(Y,{comment:a.data,agents:o})]},a.id)),(av||aw)&&((aa=C?.filter(a=>["queued","dispatched","running"].includes(a.status)))&&aa.length>0?aa.map(a=>{let c="running"===a.status;return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:(0,v.cn)("absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background",c?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),(0,b.jsx)("div",{className:(0,v.cn)("rounded-md border px-3 py-2.5",c?"border-emerald-500/30 bg-emerald-500/10":"border-border/60 bg-muted/30"),children:(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[a.agent&&(0,b.jsx)(U,{agent:{avatar_url:a.agent.avatarUrl,name:a.agent.name},size:16}),(0,b.jsxs)("span",{className:c?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground",children:[a.agent?.name??"Agent"," ",c?"is working":"— queued"]})]})})]},a.id)}):(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:"absolute -left-4 top-2.5 size-2.5 rounded-full border-2 border-background bg-emerald-500 animate-pulse"}),(0,b.jsx)("div",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/10 px-3 py-2.5",children:(0,b.jsx)("div",{className:"flex items-center gap-2 text-xs text-emerald-600 dark:text-emerald-400",children:"Working"})})]}))]})]}):(0,b.jsx)("div",{className:"text-xs text-muted-foreground",children:"No activity yet."})}),aS="detail"!==ac||!x||aM||av||(0,L.isTerminalIssueStatus)(x.status)?null:(0,b.jsxs)("div",{className:"flex flex-col rounded-xl border bg-background/60 transition-colors duration-200 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50",children:[(0,b.jsx)("textarea",{ref:aK,placeholder:"Leave a comment...",value:al,onChange:a=>am(a.target.value),className:"w-full resize-none bg-transparent px-3.5 py-2.5 text-sm leading-relaxed outline-none placeholder:text-muted-foreground field-sizing-content min-h-15 max-h-32 thin-scrollbar overflow-y-auto",onKeyDown:a=>{"Enter"===a.key&&a.shiftKey&&(a.preventDefault(),aJ())}}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-2.5 pb-2 pt-0.5",children:[(0,b.jsx)(P.Kbd,{className:"text-[11px] text-muted-foreground/50",children:"⇧↵"}),(0,b.jsx)(e.Button,{size:"icon-sm",onClick:aJ,disabled:!al.trim()||an,className:(0,v.cn)("rounded-lg transition-opacity duration-200",!al.trim()&&!an&&"opacity-40"),children:an?(0,b.jsx)(q.Loader2,{className:"size-3.5 animate-spin"}):(0,b.jsx)(l,{className:"size-3.5"})})]})]}),aT=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"shrink-0 px-2 sm:px-3 pt-5 pb-1",children:(0,b.jsx)(Q.AutoResizeTextarea,{value:ad,onChange:a=>ae(a.target.value),onKeyDown:a=>{if("Enter"===a.key&&!a.shiftKey){a.preventDefault();let b=at.current?.querySelector('[contenteditable="true"]');b?.focus()}},placeholder:"create"===ac?"New issue":"Untitled",autoFocus:"create"===ac,rows:1,className:"w-full rounded-none border-0 bg-transparent px-0 py-1 font-news text-2xl md:text-3xl font-medium leading-[1.2] tracking-tight shadow-none outline-none focus-visible:border-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground/40 placeholder:font-normal"})}),(0,b.jsxs)("div",{className:"shrink-0 space-y-1.5 px-2 sm:px-3 py-2",children:[(0,b.jsx)(W,{icon:(0,b.jsx)(s.User,{className:"size-3.5"}),children:"create"===ac||aM?(0,b.jsxs)(i.Popover,{open:aj,onOpenChange:ak,children:[(0,b.jsx)(i.PopoverTrigger,{render:(0,b.jsx)("button",{type:"button",disabled:D||ar,className:(0,v.cn)(R,"flex items-center gap-1.5 rounded-md")}),children:aN?(0,b.jsx)("span",{className:"truncate",children:aN.name}):(0,b.jsx)("span",{className:"text-muted-foreground/70",children:"Unassigned"})}),(0,b.jsxs)(i.PopoverContent,{align:"start",className:"max-h-64 w-72 overflow-y-auto thin-scrollbar p-1",children:[!aM&&(0,b.jsxs)("button",{type:"button",onClick:()=>{ai(""),ak(!1)},className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"None (unassigned)"}),ah?null:(0,b.jsx)(m.Check,{className:"size-3.5 shrink-0"})]}),o.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>{aM?aq(a):ai(a.id),ak(!1)},className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)(V,{agent:a,size:18}),ah===a.id?(0,b.jsx)(m.Check,{className:"size-3.5 shrink-0"}):null]},a.id))]})]}):(0,b.jsx)("span",{className:"text-xs truncate",children:aO?aO.name:(0,b.jsx)("span",{className:"text-muted-foreground/70",children:"Unassigned"})})}),"detail"===ac&&x&&(0,b.jsx)(W,{icon:(0,b.jsx)(n.CircleDot,{className:"size-3.5"}),children:(0,b.jsxs)(j.Select,{value:x.status,onValueChange:a=>{a&&x&&a!==x.status&&M?.(x.id,a)},items:(aM?["todo","done"]:S).map(a=>({value:a,label:T(a)})),children:[(0,b.jsx)(j.SelectTrigger,{className:"h-7 w-auto border-none bg-transparent px-1.5 shadow-none text-xs text-foreground hover:bg-accent transition-colors rounded-md",children:(0,b.jsx)(j.SelectValue,{})}),(0,b.jsx)(j.SelectContent,{children:(aM?["todo","done"]:S).map(a=>(0,b.jsx)(j.SelectItem,{value:a,children:T(a)},a))})]})}),"detail"===ac&&x?.agent_id&&x?.conversation_id&&(0,b.jsx)(W,{icon:(0,b.jsx)(r.MessageSquare,{className:"size-3.5"}),children:(0,b.jsx)(u.default,{href:`/w/${F}/agents/${x.agent_id}?conv=${x.conversation_id}${x.latest_task_id?`&task=${x.latest_task_id}`:""}`,className:(0,v.cn)(R,"inline-flex items-center rounded-md"),children:"Chat"})}),"detail"===ac&&z?.traceId&&(0,b.jsx)(W,{icon:(0,b.jsx)(p.GitBranch,{className:"size-3.5"}),children:(0,b.jsx)(u.default,{href:`/w/${F}/threads/${z.traceId}`,className:(0,v.cn)(R,"inline-flex items-center rounded-md"),children:"Thread"})})]}),(0,b.jsx)("div",{className:(0,v.cn)("px-2 sm:px-3 py-2 flex-1 min-h-0 overflow-y-auto thin-scrollbar"),ref:at,children:(0,b.jsx)(f.MarkdownEditor,{value:af,onChange:ag,placeholder:"Describe the issue...",minHeight:"create"===ac?"10rem":"4rem",variant:"seamless",contentType:"markdown",agents:o},x?.id??"new")}),"detail"===ac&&z?.artifacts&&z.artifacts.length>0&&(0,b.jsx)("div",{className:"shrink-0 px-2 sm:px-3 py-2",children:(0,b.jsx)(Z,{artifacts:z.artifacts,workspaceId:G,onArtifactClick:_})})]});return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:k,children:[(0,b.jsxs)(d.SheetContent,{side:"right",showCloseButton:!1,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 overflow-visible",style:{width:`min(${aE}px, 100vw)`,maxWidth:"none"},children:[(0,b.jsx)(h.SheetResizeHandle,{onPointerDown:aF,onPointerMove:aG,onPointerUp:aH}),(0,b.jsxs)(d.SheetClose,{render:(0,b.jsx)(e.Button,{variant:"ghost",size:"icon-sm"}),className:"absolute top-3 right-3 z-10 sm:hidden",children:[(0,b.jsx)(t.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]}),"detail"===ac&&!aM&&(0,b.jsxs)("div",{className:"hidden lg:flex absolute right-full top-0 bottom-0 mr-2 w-90 flex-col rounded-xl border bg-background shadow-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"shrink-0 flex items-center border-b px-4 py-2.5",children:(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Activity"})}),(0,b.jsx)("div",{ref:au,className:"flex-1 min-h-0 overflow-y-auto thin-scrollbar px-4 py-4 space-y-3",children:aR}),aS&&(0,b.jsx)("div",{className:"shrink-0 border-t px-4 py-3",children:aS})]}),(0,b.jsx)(d.SheetTitle,{className:"sr-only",children:"create"===ac?"New Issue":x?.title??"Issue"}),(0,b.jsxs)("div",{className:"flex flex-1 min-h-0 flex-col",onKeyDownCapture:aL,children:["detail"===ac&&!aM&&(0,b.jsxs)("div",{className:"shrink-0 flex items-center gap-1 border-b px-2 py-1.5 lg:hidden",children:[(0,b.jsx)("button",{type:"button",onClick:()=>aQ("issue"),className:(0,v.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors","issue"===aP?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:"Issue"}),(0,b.jsx)("button",{type:"button",onClick:()=>aQ("activity"),className:(0,v.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors","activity"===aP?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:"Activity"})]}),(0,b.jsxs)(d.SheetBody,{className:"flex flex-col gap-0 p-0 overflow-hidden",children:[(0,b.jsx)("div",{className:(0,v.cn)("flex flex-col flex-1 min-h-0","detail"===ac&&"activity"===aP&&"hidden lg:flex"),children:aT}),"detail"===ac&&!aM&&"activity"===aP&&(0,b.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 lg:hidden",children:[(0,b.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto thin-scrollbar px-3 py-4 space-y-3",children:aR}),aS&&(0,b.jsx)("div",{className:"shrink-0 border-t px-3 py-3",children:aS})]})]}),"create"===ac&&(0,b.jsxs)(d.SheetFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",size:"sm",onClick:()=>k(!1),disabled:D,children:"Cancel"}),(0,b.jsxs)(e.Button,{size:"sm",onClick:aI,disabled:!ad.trim()||D,children:[D&&(0,b.jsx)(q.Loader2,{className:"mr-1.5 size-3.5 animate-spin"}),(0,b.jsx)(P.Kbd,{className:"mr-1 hidden sm:inline-flex bg-background/20 text-inherit opacity-60",children:"⇧ + ⏎"}),"Create"]})]})]})]}),(0,b.jsx)(O.ConfirmDialog,{open:!!ap,onOpenChange:a=>{a||aq(null)},title:"Run issue?",description:`This issue will be assigned to ${ap?.name??"the agent"} and start running immediately.`,confirmLabel:"Run",loadingLabel:"Running...",confirmVariant:"default",loading:ar,onConfirm:async()=>{if(ap&&x){as(!0);try{await (0,y.updateIssue)(G,x.id,{agent_id:ap.id}),aq(null),$?.(x.id)}catch(a){w.toast.error(a instanceof Error?a.message:"Failed to dispatch issue"),aq(null)}finally{as(!1)}}}})]})}],963744)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_web_src_components_issues_issue-sheet_tsx_02fma1.._.js.map
|