@shepai/cli 1.149.0 → 1.149.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +4 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +6 -3
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +0 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -3
- package/web/.next/required-server-files.json +2 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__25f23d5d._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__25f23d5d._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__26565141._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__26565141._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js +3 -3
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_5022e2b1._.js → _2b873e3b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_5022e2b1._.js.map → _2b873e3b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ee80b25c._.js +3 -0
- package/web/.next/server/chunks/ssr/{_458e9a64._.js.map → _ee80b25c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_35159458._.js → src_presentation_web_91545e86._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_35159458._.js.map → src_presentation_web_91545e86._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +44 -44
- package/web/.next/static/chunks/{d3df6e6434e16519.js → 213bc4d2c2c7885a.js} +1 -1
- package/web/.next/static/chunks/42a1e8928c2a8b1e.js +1 -0
- package/web/.next/static/chunks/{75834e430247b325.js → 6b7b66ce14353296.js} +1 -1
- package/web/.next/static/chunks/70917246e2079de0.js +1 -0
- package/web/.next/static/chunks/{fe5d48f8ca483935.js → 932fdc72f19fba16.js} +1 -1
- package/web/.next/static/chunks/{3e7a130816229439.js → 9522b3e38757bf73.js} +1 -1
- package/web/.next/static/chunks/{a6363f73e05ccf47.js → c8c503403d49f600.js} +1 -1
- package/web/.next/static/chunks/{3f1b33498b472b00.js → d3e9784c18cc85e9.js} +1 -1
- package/web/.next/static/chunks/{4ef564fb1174e497.js → e23f0c8da44fe4ca.js} +1 -1
- package/web/.next/static/chunks/{eaca60cc3ab0bf9f.js → ee210d2383098e91.js} +1 -1
- package/web/.next/static/chunks/faf6b0ec1cf9125c.js +5 -0
- package/web/.next/static/chunks/{b7126c0b3a97e77e.js → fbf933fea8dd21f4.js} +1 -1
- package/web/.next/server/chunks/ssr/_458e9a64._.js +0 -3
- package/web/.next/static/chunks/24b1c1e60fd3b7b5.js +0 -5
- package/web/.next/static/chunks/79dc2e2f1c2ff519.js +0 -1
- package/web/.next/static/chunks/a086f8dfef2c3325.js +0 -1
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_buildManifest.js +0 -0
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{1CQHYZVn3VajyhdvnsCaw → 0-b0NgavBiu5Fo1rzdeX2}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[80646,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(51473),i=a.i(59675),j=a.i(5472),k=a.i(75988),l=a.i(80930),m=a.i(14272),n=a.i(66873),o=a.i(90986),p=a.i(17329),q=a.i(16164),r=a.i(45291),s="Popover",[t,u]=(0,f.createContextScope)(s,[k.createPopperScope]),v=(0,k.createPopperScope)(),[w,x]=t(s),y=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,l=v(d),m=c.useRef(null),[n,o]=c.useState(!1),[q,r]=(0,p.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:s});return(0,b.jsx)(k.Root,{...l,children:(0,b.jsx)(w,{scope:d,contentId:(0,j.useId)(),triggerRef:m,open:q,onOpenChange:r,onOpenToggle:c.useCallback(()=>r(a=>!a),[r]),hasCustomAnchor:n,onCustomAnchorAdd:c.useCallback(()=>o(!0),[]),onCustomAnchorRemove:c.useCallback(()=>o(!1),[]),modal:i,children:e})})};y.displayName=s;var z="PopoverAnchor",A=c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=x(z,e),h=v(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(k.Anchor,{...h,...f,ref:d})});A.displayName=z;var B="PopoverTrigger",C=c.forwardRef((a,c)=>{let{__scopePopover:f,...g}=a,h=x(B,f),i=v(f),j=(0,e.useComposedRefs)(c,h.triggerRef),l=(0,b.jsx)(n.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":h.open,"aria-controls":h.contentId,"data-state":Q(h.open),...g,ref:j,onClick:(0,d.composeEventHandlers)(a.onClick,h.onOpenToggle)});return h.hasCustomAnchor?l:(0,b.jsx)(k.Anchor,{asChild:!0,...i,children:l})});C.displayName=B;var D="PopoverPortal",[E,F]=t(D,{forceMount:void 0}),G=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=x(D,c);return(0,b.jsx)(E,{scope:c,forceMount:d,children:(0,b.jsx)(m.Presence,{present:d||g.open,children:(0,b.jsx)(l.Portal,{asChild:!0,container:f,children:e})})})};G.displayName=D;var H="PopoverContent",I=c.forwardRef((a,c)=>{let d=F(H,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=x(H,a.__scopePopover);return(0,b.jsx)(m.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(K,{...f,ref:c}):(0,b.jsx)(L,{...f,ref:c})})});I.displayName=H;var J=(0,o.createSlot)("PopoverContent.RemoveScroll"),K=c.forwardRef((a,f)=>{let g=x(H,a.__scopePopover),h=c.useRef(null),i=(0,e.useComposedRefs)(f,h),j=c.useRef(!1);return c.useEffect(()=>{let a=h.current;if(a)return(0,q.hideOthers)(a)},[]),(0,b.jsx)(r.RemoveScroll,{as:J,allowPinchZoom:!0,children:(0,b.jsx)(M,{...a,ref:i,trapFocus:g.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,d.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),j.current||g.triggerRef.current?.focus()}),onPointerDownOutside:(0,d.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;j.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,d.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=c.forwardRef((a,d)=>{let e=x(H,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(M,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),M=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:j,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:p,...q}=a,r=x(H,d),s=v(d);return(0,h.useFocusGuards)(),(0,b.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:j,children:(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onDismiss:()=>r.onOpenChange(!1),children:(0,b.jsx)(k.Content,{"data-state":Q(r.open),role:"dialog",id:r.contentId,...s,...q,ref:c,style:{...q.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N="PopoverClose",O=c.forwardRef((a,c)=>{let{__scopePopover:e,...f}=a,g=x(N,e);return(0,b.jsx)(n.Primitive.button,{type:"button",...f,ref:c,onClick:(0,d.composeEventHandlers)(a.onClick,()=>g.onOpenChange(!1))})});O.displayName=N;var P=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=v(d);return(0,b.jsx)(k.Arrow,{...f,...e,ref:c})});function Q(a){return a?"open":"closed"}P.displayName="PopoverArrow",a.s(["Anchor",()=>A,"Arrow",()=>P,"Close",()=>O,"Content",()=>I,"Popover",()=>y,"PopoverAnchor",()=>A,"PopoverArrow",()=>P,"PopoverClose",()=>O,"PopoverContent",()=>I,"PopoverPortal",()=>G,"PopoverTrigger",()=>C,"Portal",()=>G,"Root",()=>y,"Trigger",()=>C,"createPopoverScope",()=>u],61452);var R=a.i(61452),R=R,S=a.i(85536);let T=R.Root,U=R.Trigger;R.Anchor;let V=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(R.Portal,{children:(0,b.jsx)(R.Content,{ref:f,align:c,sideOffset:d,className:(0,S.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",a),...e})}));V.displayName=R.Content.displayName,a.s(["Popover",()=>T,"PopoverContent",()=>V,"PopoverTrigger",()=>U],80646)},58236,62583,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("0022c168d9c2149bfa68de818c8056f41c4e9df818",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],58236);let d=(0,b.createServerReference)("60d308093d3cdb304e3ef50aeb1aa36d623c436fa0",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],62583)},96867,61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(17329),h=a.i(64005),i=a.i(74432),j=a.i(66873),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:l,defaultChecked:m,required:o,disabled:p,value:q="on",onCheckedChange:r,form:u,...v}=a,[w,x]=c.useState(null),y=(0,e.useComposedRefs)(f,a=>x(a)),z=c.useRef(!1),A=!w||u||!!w.closest("form"),[B,C]=(0,g.useControllableState)({prop:l,defaultProp:m??!1,onChange:r,caller:k});return(0,b.jsxs)(n,{scope:h,checked:B,disabled:p,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":B,"aria-required":o,"data-state":t(B),"data-disabled":p?"":void 0,disabled:p,value:q,...v,ref:y,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,b.jsx)(s,{control:w,bubbles:!z.current,name:i,value:q,checked:B,required:o,disabled:p,form:u,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=c.forwardRef(({__scopeSwitch:a,control:d,checked:f,bubbles:g=!0,...j},k)=>{let l=c.useRef(null),m=(0,e.useComposedRefs)(l,k),n=(0,h.usePrevious)(f),o=(0,i.useSize)(d);return c.useEffect(()=>{let a=l.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==f&&b){let c=new Event("click",{bubbles:g});b.call(a,f),a.dispatchEvent(c)}},[n,f,g]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:f,...j,tabIndex:-1,ref:m,style:{...j.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function t(a){return a?"checked":"unchecked"}s.displayName="SwitchBubbleInput",a.s(["Root",()=>p,"Switch",()=>p,"SwitchThumb",()=>r,"Thumb",()=>r,"createSwitchScope",()=>m],91918);var u=a.i(91918),u=u,v=a.i(85536);function w({className:a,size:c="default",...d}){return(0,b.jsx)(u.Root,{"data-slot":"switch","data-size":c,className:(0,v.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",a),...d,children:(0,b.jsx)(u.Thumb,{"data-slot":"switch-thumb",className:(0,v.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}a.s(["Switch",()=>w],96867);var x=a.i(72016),y=a.i(94132),z=a.i(3410),A=a.i(58236),B=a.i(62583),C=a.i(17606),D=a.i(83852),E=a.i(18948),F=a.i(80646);function G({initialAgentType:a,initialModel:d,onAgentModelChange:e,disabled:f,className:g,mode:h}){let[i,j]=c.useState(!1),[k,l]=c.useState([]),[m,n]=c.useState(!0),[o,p]=c.useState(a),[q,r]=c.useState(d),[s,t]=c.useState(null),[u,w]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,A.getAllAgentModels)().then(l).finally(()=>n(!1))},[]),c.useEffect(()=>{if(!i){let a=setTimeout(()=>{w(0),H(null)},150);return()=>clearTimeout(a)}},[i]);let I=async(a,b)=>{if(j(!1),a!==o||b!==q){if("override"===h){p(a),r(b),e?.(a,b);return}p(a),r(b),e?.(a,b),t(null);try{let c=await (0,B.updateAgentAndModel)(a,b||null);c.ok||(p(o),r(q),e?.(o,q),t(c.error??"Failed to save"))}catch{p(o),r(q),e?.(o,q),t("Failed to save")}}},J=(0,C.getAgentTypeIcon)(o),K=k.find(a=>a.agentType===o)?.label??o,L=q?(0,D.getModelMeta)(q).displayName||q:null,M=G?k.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,v.cn)("flex flex-col gap-1",g),children:[(0,b.jsxs)(F.Popover,{open:i,onOpenChange:j,children:[(0,b.jsx)(F.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(E.Button,{variant:"outline",role:"combobox","aria-expanded":i,disabled:(f??!1)||m,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,b.jsx)(J,{className:"h-4 w-4 shrink-0"}),m?"Loading…":(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K}),L?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,b.jsx)(F.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,b.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===u?"-50%":"0%"})`,width:"200%"},children:[(0,b.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,b.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(a=>{let c=(0,C.getAgentTypeIcon)(a.agentType),d=o===a.agentType,e=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",d&&"bg-accent/50"),onClick:()=>{e?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):I(a.agentType,"")},children:[(0,b.jsx)(c,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"flex-1 text-left",children:a.label}),d&&!e?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,e?(0,b.jsx)(z.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},a.agentType)})]}),(0,b.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(y.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=o===M.agentType&&q===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",c&&"bg-accent/50"),onClick:()=>I(M.agentType,a.id),children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.displayName}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description})]}),c?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!s&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:s})]})}a.s(["AgentModelPicker",()=>G],61781)}];
|
|
1
|
+
module.exports=[80646,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(51473),i=a.i(59675),j=a.i(5472),k=a.i(75988),l=a.i(80930),m=a.i(14272),n=a.i(66873),o=a.i(90986),p=a.i(17329),q=a.i(16164),r=a.i(45291),s="Popover",[t,u]=(0,f.createContextScope)(s,[k.createPopperScope]),v=(0,k.createPopperScope)(),[w,x]=t(s),y=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,l=v(d),m=c.useRef(null),[n,o]=c.useState(!1),[q,r]=(0,p.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:s});return(0,b.jsx)(k.Root,{...l,children:(0,b.jsx)(w,{scope:d,contentId:(0,j.useId)(),triggerRef:m,open:q,onOpenChange:r,onOpenToggle:c.useCallback(()=>r(a=>!a),[r]),hasCustomAnchor:n,onCustomAnchorAdd:c.useCallback(()=>o(!0),[]),onCustomAnchorRemove:c.useCallback(()=>o(!1),[]),modal:i,children:e})})};y.displayName=s;var z="PopoverAnchor",A=c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=x(z,e),h=v(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(k.Anchor,{...h,...f,ref:d})});A.displayName=z;var B="PopoverTrigger",C=c.forwardRef((a,c)=>{let{__scopePopover:f,...g}=a,h=x(B,f),i=v(f),j=(0,e.useComposedRefs)(c,h.triggerRef),l=(0,b.jsx)(n.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":h.open,"aria-controls":h.contentId,"data-state":Q(h.open),...g,ref:j,onClick:(0,d.composeEventHandlers)(a.onClick,h.onOpenToggle)});return h.hasCustomAnchor?l:(0,b.jsx)(k.Anchor,{asChild:!0,...i,children:l})});C.displayName=B;var D="PopoverPortal",[E,F]=t(D,{forceMount:void 0}),G=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=x(D,c);return(0,b.jsx)(E,{scope:c,forceMount:d,children:(0,b.jsx)(m.Presence,{present:d||g.open,children:(0,b.jsx)(l.Portal,{asChild:!0,container:f,children:e})})})};G.displayName=D;var H="PopoverContent",I=c.forwardRef((a,c)=>{let d=F(H,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=x(H,a.__scopePopover);return(0,b.jsx)(m.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(K,{...f,ref:c}):(0,b.jsx)(L,{...f,ref:c})})});I.displayName=H;var J=(0,o.createSlot)("PopoverContent.RemoveScroll"),K=c.forwardRef((a,f)=>{let g=x(H,a.__scopePopover),h=c.useRef(null),i=(0,e.useComposedRefs)(f,h),j=c.useRef(!1);return c.useEffect(()=>{let a=h.current;if(a)return(0,q.hideOthers)(a)},[]),(0,b.jsx)(r.RemoveScroll,{as:J,allowPinchZoom:!0,children:(0,b.jsx)(M,{...a,ref:i,trapFocus:g.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,d.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),j.current||g.triggerRef.current?.focus()}),onPointerDownOutside:(0,d.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;j.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,d.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=c.forwardRef((a,d)=>{let e=x(H,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(M,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),M=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:j,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:p,...q}=a,r=x(H,d),s=v(d);return(0,h.useFocusGuards)(),(0,b.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:j,children:(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onDismiss:()=>r.onOpenChange(!1),children:(0,b.jsx)(k.Content,{"data-state":Q(r.open),role:"dialog",id:r.contentId,...s,...q,ref:c,style:{...q.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N="PopoverClose",O=c.forwardRef((a,c)=>{let{__scopePopover:e,...f}=a,g=x(N,e);return(0,b.jsx)(n.Primitive.button,{type:"button",...f,ref:c,onClick:(0,d.composeEventHandlers)(a.onClick,()=>g.onOpenChange(!1))})});O.displayName=N;var P=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=v(d);return(0,b.jsx)(k.Arrow,{...f,...e,ref:c})});function Q(a){return a?"open":"closed"}P.displayName="PopoverArrow",a.s(["Anchor",()=>A,"Arrow",()=>P,"Close",()=>O,"Content",()=>I,"Popover",()=>y,"PopoverAnchor",()=>A,"PopoverArrow",()=>P,"PopoverClose",()=>O,"PopoverContent",()=>I,"PopoverPortal",()=>G,"PopoverTrigger",()=>C,"Portal",()=>G,"Root",()=>y,"Trigger",()=>C,"createPopoverScope",()=>u],61452);var R=a.i(61452),R=R,S=a.i(85536);let T=R.Root,U=R.Trigger;R.Anchor;let V=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(R.Portal,{children:(0,b.jsx)(R.Content,{ref:f,align:c,sideOffset:d,className:(0,S.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",a),...e})}));V.displayName=R.Content.displayName,a.s(["Popover",()=>T,"PopoverContent",()=>V,"PopoverTrigger",()=>U],80646)},44150,91342,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("0001f34dea2e675c30b23f1d050458255a9a89209b",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],44150);let d=(0,b.createServerReference)("60a34fd4711c73f4db132cb8f6e817f342359c4a78",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],91342)},96867,61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(17329),h=a.i(64005),i=a.i(74432),j=a.i(66873),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:l,defaultChecked:m,required:o,disabled:p,value:q="on",onCheckedChange:r,form:u,...v}=a,[w,x]=c.useState(null),y=(0,e.useComposedRefs)(f,a=>x(a)),z=c.useRef(!1),A=!w||u||!!w.closest("form"),[B,C]=(0,g.useControllableState)({prop:l,defaultProp:m??!1,onChange:r,caller:k});return(0,b.jsxs)(n,{scope:h,checked:B,disabled:p,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":B,"aria-required":o,"data-state":t(B),"data-disabled":p?"":void 0,disabled:p,value:q,...v,ref:y,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,b.jsx)(s,{control:w,bubbles:!z.current,name:i,value:q,checked:B,required:o,disabled:p,form:u,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=c.forwardRef(({__scopeSwitch:a,control:d,checked:f,bubbles:g=!0,...j},k)=>{let l=c.useRef(null),m=(0,e.useComposedRefs)(l,k),n=(0,h.usePrevious)(f),o=(0,i.useSize)(d);return c.useEffect(()=>{let a=l.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==f&&b){let c=new Event("click",{bubbles:g});b.call(a,f),a.dispatchEvent(c)}},[n,f,g]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:f,...j,tabIndex:-1,ref:m,style:{...j.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function t(a){return a?"checked":"unchecked"}s.displayName="SwitchBubbleInput",a.s(["Root",()=>p,"Switch",()=>p,"SwitchThumb",()=>r,"Thumb",()=>r,"createSwitchScope",()=>m],91918);var u=a.i(91918),u=u,v=a.i(85536);function w({className:a,size:c="default",...d}){return(0,b.jsx)(u.Root,{"data-slot":"switch","data-size":c,className:(0,v.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",a),...d,children:(0,b.jsx)(u.Thumb,{"data-slot":"switch-thumb",className:(0,v.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}a.s(["Switch",()=>w],96867);var x=a.i(72016),y=a.i(94132),z=a.i(3410),A=a.i(44150),B=a.i(91342),C=a.i(17606),D=a.i(83852),E=a.i(18948),F=a.i(80646);function G({initialAgentType:a,initialModel:d,onAgentModelChange:e,disabled:f,className:g,mode:h}){let[i,j]=c.useState(!1),[k,l]=c.useState([]),[m,n]=c.useState(!0),[o,p]=c.useState(a),[q,r]=c.useState(d),[s,t]=c.useState(null),[u,w]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,A.getAllAgentModels)().then(l).finally(()=>n(!1))},[]),c.useEffect(()=>{if(!i){let a=setTimeout(()=>{w(0),H(null)},150);return()=>clearTimeout(a)}},[i]);let I=async(a,b)=>{if(j(!1),a!==o||b!==q){if("override"===h){p(a),r(b),e?.(a,b);return}p(a),r(b),e?.(a,b),t(null);try{let c=await (0,B.updateAgentAndModel)(a,b||null);c.ok||(p(o),r(q),e?.(o,q),t(c.error??"Failed to save"))}catch{p(o),r(q),e?.(o,q),t("Failed to save")}}},J=(0,C.getAgentTypeIcon)(o),K=k.find(a=>a.agentType===o)?.label??o,L=q?(0,D.getModelMeta)(q).displayName||q:null,M=G?k.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,v.cn)("flex flex-col gap-1",g),children:[(0,b.jsxs)(F.Popover,{open:i,onOpenChange:j,children:[(0,b.jsx)(F.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(E.Button,{variant:"outline",role:"combobox","aria-expanded":i,disabled:(f??!1)||m,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,b.jsx)(J,{className:"h-4 w-4 shrink-0"}),m?"Loading…":(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K}),L?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,b.jsx)(F.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,b.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===u?"-50%":"0%"})`,width:"200%"},children:[(0,b.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,b.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(a=>{let c=(0,C.getAgentTypeIcon)(a.agentType),d=o===a.agentType,e=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",d&&"bg-accent/50"),onClick:()=>{e?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):I(a.agentType,"")},children:[(0,b.jsx)(c,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"flex-1 text-left",children:a.label}),d&&!e?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,e?(0,b.jsx)(z.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},a.agentType)})]}),(0,b.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(y.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=o===M.agentType&&q===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",c&&"bg-accent/50"),onClick:()=>I(M.agentType,a.id),children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.displayName}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description})]}),c?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!s&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:s})]})}a.s(["AgentModelPicker",()=>G],61781)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=src_presentation_web_91545e86._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-popover%401.1.15_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Brea_6845413866e39bfed03c608b19c71ed1/node_modules/%40radix-ui/react-popover/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/popover.tsx","../../../../../../../src/presentation/web/app/actions/data%3A8cd68e%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A967c63%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-switch%401.2.6_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact_82f001e3bde9922eaefd6f7b0722a9bb/node_modules/%40radix-ui/react-switch/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/switch.tsx","../../../../../../../src/presentation/web/components/features/settings/AgentModelPicker/index.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","/* __next_internal_action_entry_do_not_use__ [{\"0022c168d9c2149bfa68de818c8056f41c4e9df818\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0022c168d9c2149bfa68de818c8056f41c4e9df818\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"60d308093d3cdb304e3ef50aeb1aa36d623c436fa0\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60d308093d3cdb304e3ef50aeb1aa36d623c436fa0\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","\"use client\";\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction Switch({\n className,\n size = 'default',\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n 'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n","'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { getAllAgentModels } from '@/app/actions/get-all-agent-models';\nimport type { AgentModelGroup } from '@/app/actions/get-all-agent-models';\nimport { updateAgentAndModel } from '@/app/actions/update-agent-and-model';\nimport { getAgentTypeIcon } from '@/components/common/feature-node/agent-type-icons';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\n\nexport interface AgentModelPickerProps {\n initialAgentType: string;\n initialModel: string;\n onAgentModelChange?: (agentType: string, model: string) => void;\n disabled?: boolean;\n className?: string;\n /** 'settings' persists to DB; 'override' only calls onAgentModelChange */\n mode: 'settings' | 'override';\n}\n\nexport function AgentModelPicker({\n initialAgentType,\n initialModel,\n onAgentModelChange,\n disabled,\n className,\n mode,\n}: AgentModelPickerProps) {\n const [open, setOpen] = React.useState(false);\n const [groups, setGroups] = React.useState<AgentModelGroup[]>([]);\n const [loading, setLoading] = React.useState(true);\n const [agentType, setAgentType] = React.useState(initialAgentType);\n const [model, setModel] = React.useState(initialModel);\n const [error, setError] = React.useState<string | null>(null);\n\n // 0 = agent list visible, 1 = model list visible\n const [level, setLevel] = React.useState(0);\n // Which agent's models to show (kept separate from level for animation)\n const [drillAgent, setDrillAgent] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n getAllAgentModels()\n .then(setGroups)\n .finally(() => setLoading(false));\n }, []);\n\n // Reset drill-down when popover closes\n React.useEffect(() => {\n if (!open) {\n const t = setTimeout(() => {\n setLevel(0);\n setDrillAgent(null);\n }, 150);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n const drillInto = (agent: string) => {\n setDrillAgent(agent);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => setLevel(1));\n });\n };\n\n const drillBack = () => {\n setLevel(0);\n setTimeout(() => setDrillAgent(null), 220);\n };\n\n const handleSelect = async (newAgentType: string, newModel: string) => {\n setOpen(false);\n\n if (newAgentType === agentType && newModel === model) return;\n\n if (mode === 'override') {\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n return;\n }\n\n // mode === 'settings' — optimistically update, then persist\n const prevAgent = agentType;\n const prevModel = model;\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n\n setError(null);\n try {\n const result = await updateAgentAndModel(newAgentType, newModel || null);\n if (!result.ok) {\n // Revert on failure\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError(result.error ?? 'Failed to save');\n }\n } catch {\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError('Failed to save');\n }\n };\n\n const isDisabled = (disabled ?? false) || loading;\n\n const AgentIcon = getAgentTypeIcon(agentType);\n const agentLabel = groups.find((g) => g.agentType === agentType)?.label ?? agentType;\n const modelName = model ? getModelMeta(model).displayName || model : null;\n\n const activeGroup = drillAgent ? groups.find((g) => g.agentType === drillAgent) : null;\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={isDisabled}\n className=\"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30\"\n >\n <span className=\"flex items-center gap-2 truncate\">\n <AgentIcon className=\"h-4 w-4 shrink-0\" />\n {loading ? (\n 'Loading…'\n ) : (\n <span className=\"flex items-center gap-1\">\n <span className=\"text-muted-foreground text-xs\">{agentLabel}</span>\n {modelName ? (\n <>\n <span className=\"text-muted-foreground/50 text-xs\">·</span>\n <span className=\"text-xs font-medium\">{modelName}</span>\n </>\n ) : null}\n </span>\n )}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-(--radix-popover-trigger-width) overflow-hidden p-0\"\n align=\"start\"\n >\n {/* Sliding container — both panels side by side, translateX controlled by level */}\n <div\n className=\"flex transition-transform duration-200 ease-in-out\"\n style={{ transform: `translateX(${level === 1 ? '-50%' : '0%'})`, width: '200%' }}\n >\n {/* ── Level 1: Agent list ── */}\n <div className=\"w-1/2 shrink-0\">\n <div className=\"text-muted-foreground border-b px-3 py-2 text-xs font-medium\">\n Select agent\n </div>\n {groups.map((group) => {\n const GroupIcon = getAgentTypeIcon(group.agentType);\n const isActive = agentType === group.agentType;\n const hasModels = group.models.length > 0;\n\n return (\n <button\n key={group.agentType}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isActive && 'bg-accent/50'\n )}\n onClick={() => {\n if (hasModels) {\n drillInto(group.agentType);\n } else {\n handleSelect(group.agentType, '');\n }\n }}\n >\n <GroupIcon className=\"h-4 w-4 shrink-0\" />\n <span className=\"flex-1 text-left\">{group.label}</span>\n {isActive && !hasModels ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n {hasModels ? (\n <ChevronRight className=\"text-muted-foreground h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </div>\n\n {/* ── Level 2: Model list for selected agent ── */}\n <div className=\"w-1/2 shrink-0\">\n {activeGroup ? (\n <>\n {/* Back header */}\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors\"\n onClick={drillBack}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n {activeGroup.label}\n </button>\n\n {/* Model items */}\n {activeGroup.models.map((m) => {\n const isSelected = agentType === activeGroup.agentType && model === m.id;\n return (\n <button\n key={m.id}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isSelected && 'bg-accent/50'\n )}\n onClick={() => handleSelect(activeGroup.agentType, m.id)}\n >\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-xs font-medium\">{m.displayName}</span>\n <span className=\"text-muted-foreground text-xs\">{m.description}</span>\n </div>\n {isSelected ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </>\n ) : null}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {Boolean(error) && <p className=\"text-destructive text-sm\">{error}</p>}\n </div>\n );\n}\n"],"names":[],"mappings":"wDCEA,EAAA,EAAA,CAAA,CAAA,ODEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEI,EAAe,UACf,CAAC,EAAsB,EAAmB,CAAG,CAAA,EAAA,EAAA,kBAAA,AAAkB,EAAC,EA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AkBf,MAEA,gBAKX,CAAQ,GAAU,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,oCAA4B,MAGlE","ignoreList":[0,4]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-popover%401.1.15_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Brea_6845413866e39bfed03c608b19c71ed1/node_modules/%40radix-ui/react-popover/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/popover.tsx","../../../../../../../src/presentation/web/app/actions/data%3Ad05051%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A1a417e%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-switch%401.2.6_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact_82f001e3bde9922eaefd6f7b0722a9bb/node_modules/%40radix-ui/react-switch/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/switch.tsx","../../../../../../../src/presentation/web/components/features/settings/AgentModelPicker/index.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","/* __next_internal_action_entry_do_not_use__ [{\"0001f34dea2e675c30b23f1d050458255a9a89209b\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0001f34dea2e675c30b23f1d050458255a9a89209b\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"60a34fd4711c73f4db132cb8f6e817f342359c4a78\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60a34fd4711c73f4db132cb8f6e817f342359c4a78\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","\"use client\";\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction Switch({\n className,\n size = 'default',\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n 'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n","'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { getAllAgentModels } from '@/app/actions/get-all-agent-models';\nimport type { AgentModelGroup } from '@/app/actions/get-all-agent-models';\nimport { updateAgentAndModel } from '@/app/actions/update-agent-and-model';\nimport { getAgentTypeIcon } from '@/components/common/feature-node/agent-type-icons';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\n\nexport interface AgentModelPickerProps {\n initialAgentType: string;\n initialModel: string;\n onAgentModelChange?: (agentType: string, model: string) => void;\n disabled?: boolean;\n className?: string;\n /** 'settings' persists to DB; 'override' only calls onAgentModelChange */\n mode: 'settings' | 'override';\n}\n\nexport function AgentModelPicker({\n initialAgentType,\n initialModel,\n onAgentModelChange,\n disabled,\n className,\n mode,\n}: AgentModelPickerProps) {\n const [open, setOpen] = React.useState(false);\n const [groups, setGroups] = React.useState<AgentModelGroup[]>([]);\n const [loading, setLoading] = React.useState(true);\n const [agentType, setAgentType] = React.useState(initialAgentType);\n const [model, setModel] = React.useState(initialModel);\n const [error, setError] = React.useState<string | null>(null);\n\n // 0 = agent list visible, 1 = model list visible\n const [level, setLevel] = React.useState(0);\n // Which agent's models to show (kept separate from level for animation)\n const [drillAgent, setDrillAgent] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n getAllAgentModels()\n .then(setGroups)\n .finally(() => setLoading(false));\n }, []);\n\n // Reset drill-down when popover closes\n React.useEffect(() => {\n if (!open) {\n const t = setTimeout(() => {\n setLevel(0);\n setDrillAgent(null);\n }, 150);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n const drillInto = (agent: string) => {\n setDrillAgent(agent);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => setLevel(1));\n });\n };\n\n const drillBack = () => {\n setLevel(0);\n setTimeout(() => setDrillAgent(null), 220);\n };\n\n const handleSelect = async (newAgentType: string, newModel: string) => {\n setOpen(false);\n\n if (newAgentType === agentType && newModel === model) return;\n\n if (mode === 'override') {\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n return;\n }\n\n // mode === 'settings' — optimistically update, then persist\n const prevAgent = agentType;\n const prevModel = model;\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n\n setError(null);\n try {\n const result = await updateAgentAndModel(newAgentType, newModel || null);\n if (!result.ok) {\n // Revert on failure\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError(result.error ?? 'Failed to save');\n }\n } catch {\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError('Failed to save');\n }\n };\n\n const isDisabled = (disabled ?? false) || loading;\n\n const AgentIcon = getAgentTypeIcon(agentType);\n const agentLabel = groups.find((g) => g.agentType === agentType)?.label ?? agentType;\n const modelName = model ? getModelMeta(model).displayName || model : null;\n\n const activeGroup = drillAgent ? groups.find((g) => g.agentType === drillAgent) : null;\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={isDisabled}\n className=\"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30\"\n >\n <span className=\"flex items-center gap-2 truncate\">\n <AgentIcon className=\"h-4 w-4 shrink-0\" />\n {loading ? (\n 'Loading…'\n ) : (\n <span className=\"flex items-center gap-1\">\n <span className=\"text-muted-foreground text-xs\">{agentLabel}</span>\n {modelName ? (\n <>\n <span className=\"text-muted-foreground/50 text-xs\">·</span>\n <span className=\"text-xs font-medium\">{modelName}</span>\n </>\n ) : null}\n </span>\n )}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-(--radix-popover-trigger-width) overflow-hidden p-0\"\n align=\"start\"\n >\n {/* Sliding container — both panels side by side, translateX controlled by level */}\n <div\n className=\"flex transition-transform duration-200 ease-in-out\"\n style={{ transform: `translateX(${level === 1 ? '-50%' : '0%'})`, width: '200%' }}\n >\n {/* ── Level 1: Agent list ── */}\n <div className=\"w-1/2 shrink-0\">\n <div className=\"text-muted-foreground border-b px-3 py-2 text-xs font-medium\">\n Select agent\n </div>\n {groups.map((group) => {\n const GroupIcon = getAgentTypeIcon(group.agentType);\n const isActive = agentType === group.agentType;\n const hasModels = group.models.length > 0;\n\n return (\n <button\n key={group.agentType}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isActive && 'bg-accent/50'\n )}\n onClick={() => {\n if (hasModels) {\n drillInto(group.agentType);\n } else {\n handleSelect(group.agentType, '');\n }\n }}\n >\n <GroupIcon className=\"h-4 w-4 shrink-0\" />\n <span className=\"flex-1 text-left\">{group.label}</span>\n {isActive && !hasModels ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n {hasModels ? (\n <ChevronRight className=\"text-muted-foreground h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </div>\n\n {/* ── Level 2: Model list for selected agent ── */}\n <div className=\"w-1/2 shrink-0\">\n {activeGroup ? (\n <>\n {/* Back header */}\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors\"\n onClick={drillBack}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n {activeGroup.label}\n </button>\n\n {/* Model items */}\n {activeGroup.models.map((m) => {\n const isSelected = agentType === activeGroup.agentType && model === m.id;\n return (\n <button\n key={m.id}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isSelected && 'bg-accent/50'\n )}\n onClick={() => handleSelect(activeGroup.agentType, m.id)}\n >\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-xs font-medium\">{m.displayName}</span>\n <span className=\"text-muted-foreground text-xs\">{m.description}</span>\n </div>\n {isSelected ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </>\n ) : null}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {Boolean(error) && <p className=\"text-destructive text-sm\">{error}</p>}\n </div>\n );\n}\n"],"names":[],"mappings":"wDCEA,EAAA,EAAA,CAAA,CAAA,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,EAAY,SAAS,EAAI,IAAU,EAAE,EAAE,CACxE,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,SAAA,CAEC,KAAK,SACL,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EACX,sFACA,+CACA,GAAc,gBAEhB,QAAS,IAAM,EAAa,EAAY,SAAS,CAAE,EAAE,EAAE,YAEvD,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,yCACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,+BAAuB,EAAE,WAAW,GACpD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,yCAAiC,EAAE,WAAW,MAE/D,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,KAAK,CAAA,CAAC,UAAU,sCACf,OAfC,EAAE,EAAE,CAkBf,MAEA,gBAKX,CAAQ,GAAU,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,oCAA4B,MAGlE","ignoreList":[0,4]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[30174,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],81053),a.i(81053),a.s(["
|
|
1
|
+
module.exports=[30174,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],81053),a.i(81053),a.s(["0046e8f186c74a36823191705af66dd576aa8fbcd7",()=>b.pickFolder,"405e4f63caafd651753d8de2085d01446e18eac3cf",()=>h.stopDeployment,"406a0933b8ac4b2564253d68d0b2b7ac6b85d56e6f",()=>d.importGitHubRepository,"406d37f7474a36895d093d426b5390121b439dbfa4",()=>c.listGitHubRepositories,"4083fbceff325ab7e846ff7431866fc6780cf9a05d",()=>e.getDeploymentLogs,"40ba0f5182bfeb1b5b5697f03508d83fe63252c033",()=>i.getDeploymentStatus,"40d3d58937247d1787979177a82dfa9a4c522e169c",()=>g.deployRepository,"40f165e790c3e61fe244708a722928c870e129d424",()=>f.deployFeature],30174)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0046e8f186c74a36823191705af66dd576aa8fbcd7'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '406d37f7474a36895d093d426b5390121b439dbfa4'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '406a0933b8ac4b2564253d68d0b2b7ac6b85d56e6f'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4083fbceff325ab7e846ff7431866fc6780cf9a05d'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40f165e790c3e61fe244708a722928c870e129d424'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40d3d58937247d1787979177a82dfa9a4c522e169c'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '405e4f63caafd651753d8de2085d01446e18eac3cf'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40ba0f5182bfeb1b5b5697f03508d83fe63252c033'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[27435,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],10119),a.i(10119),a.s(["
|
|
1
|
+
module.exports=[27435,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],10119),a.i(10119),a.s(["0046e8f186c74a36823191705af66dd576aa8fbcd7",()=>b.pickFolder,"405e4f63caafd651753d8de2085d01446e18eac3cf",()=>h.stopDeployment,"406a0933b8ac4b2564253d68d0b2b7ac6b85d56e6f",()=>d.importGitHubRepository,"406d37f7474a36895d093d426b5390121b439dbfa4",()=>c.listGitHubRepositories,"4083fbceff325ab7e846ff7431866fc6780cf9a05d",()=>e.getDeploymentLogs,"40ba0f5182bfeb1b5b5697f03508d83fe63252c033",()=>i.getDeploymentStatus,"40d3d58937247d1787979177a82dfa9a4c522e169c",()=>g.deployRepository,"40f165e790c3e61fe244708a722928c870e129d424",()=>f.deployFeature],27435)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/tools/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/tools/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0046e8f186c74a36823191705af66dd576aa8fbcd7'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '406d37f7474a36895d093d426b5390121b439dbfa4'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '406a0933b8ac4b2564253d68d0b2b7ac6b85d56e6f'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4083fbceff325ab7e846ff7431866fc6780cf9a05d'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40f165e790c3e61fe244708a722928c870e129d424'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40d3d58937247d1787979177a82dfa9a4c522e169c'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '405e4f63caafd651753d8de2085d01446e18eac3cf'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40ba0f5182bfeb1b5b5697f03508d83fe63252c033'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
|
package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[84095,56799,80496,93225,41872,9959,79124,10528,50845,26604,54723,18942,42886,49560,39353,29207,a=>{"use strict";var b=a.i(92658),c=a.i(50227),d=a.i(33244),e=a.i(96380),f=a.i(12581);async function g(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};let g=(0,d.getSettings)().environment.defaultEditor,h=(0,e.resolve)("LaunchIdeUseCase"),i=await h.execute({editorId:g,repositoryPath:b,branch:f,checkAvailability:!0});return i.ok?{success:!0,editor:i.editorName,path:i.worktreePath}:{success:!1,error:i.message}}(0,f.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"40e3f9bbeda7d42a0c3c76aba5144311e849b02cab",null),a.s(["openIde",()=>g],84095);var h=a.i(2157),i=a.i(60526),j=a.i(74533),k=a.i(29918);let l={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]},win32:{cmd:"cmd.exe",args:a=>["/c","start","powershell","-NoExit","-Command",`Set-Location "${a}"`]}};async function m(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,d.getSettings)(),c=a.environment.shellPreference,g=a.environment.terminalPreference??"system",m=f?(0,k.computeWorktreePath)(b,f):b;if(!(0,h.existsSync)(m))return{success:!1,error:`Path does not exist: ${m}`};if("system"!==g)try{let a=(0,e.resolve)("IToolInstallerService").getTerminalOpenConfig(g);if(a?.openDirectory.includes("{dir}")){let b=a.openDirectory.replace("{dir}",m);if(a.shell){let a=(0,j.spawn)(b,[],{detached:!0,stdio:"ignore",shell:!0});a.on("error",()=>void 0),a.unref()}else{let[a,...c]=b.split(/\s+/),d=(0,j.spawn)(a,c,{detached:!0,stdio:"ignore"});d.on("error",()=>void 0),d.unref()}return{success:!0,path:m,shell:c}}}catch{}let n=l[(0,i.platform)()];if(!n)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let o=(0,j.spawn)(n.cmd,n.args(m),{detached:!0,stdio:"ignore"});return o.on("error",()=>void 0),o.unref(),{success:!0,path:m,shell:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,f.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"40552ba137c04058016166e1d510370819a5110a33",null),a.s(["openShell",()=>m],56799);let n={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]},win32:{cmd:"explorer",args:a=>[a]}};async function o(a){if(!a||!(0,c.isAbsolute)(a))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,h.existsSync)(a))return{success:!1,error:"Directory not found"};let b=n[(0,i.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let c=(0,j.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function p(a){if(!a?.trim())return{success:!1,error:"Repository id is required"};try{let b=(0,e.resolve)("SyncRepositoryMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to sync repository"}}}async function q(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"40a44f15ea018af4060b0da42ab50d9b36357e4b7e",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40c77f510e8b9a0dc757983b690974dfa9c0655747",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"001b40d616af59443690542ee2b0e9539f1a575e72",null),a.s(["isAgentSetupComplete",()=>q],41872);var r=a.i(76437);let s={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},t={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},u={"claude-code":"claude",cursor:"cursor-agent","gemini-cli":"gemini"};async function v(){var a;let b;try{b=(0,d.getSettings)().agent.type}catch{return{agentType:"unknown",installed:!1,authenticated:!1,label:"Unknown",binaryName:null,installCommand:null,authCommand:null}}let f=s[b]??b,g=t[b]??null,k=u[b]??null;if(!g)return{agentType:b,installed:!0,authenticated:!0,label:f,binaryName:null,installCommand:null,authCommand:null};let l=!1,m=null;try{let a=(0,e.resolve)("ListToolsUseCase"),b=(await a.execute()).find(a=>a.id===g);l=b?.status.status==="available",m=b?.installCommand??null}catch{l=!1}if(!l)return{agentType:b,installed:!1,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k?`Install ${f} first`:null};if(!function(a){let b=(0,i.homedir)();switch(a){case"claude-code":{if(process.env.ANTHROPIC_API_KEY||process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.CLAUDE_CODE_OAUTH_TOKEN)return!0;let a=(0,c.join)(b,".claude",".credentials.json");return(0,h.existsSync)(a)}case"cursor":{if(process.env.CURSOR_API_KEY)return!0;let a=(0,c.join)(b,".cursor");return(0,h.existsSync)(a)}case"gemini-cli":{if(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY||process.env.GOOGLE_APPLICATION_CREDENTIALS)return!0;let a=(0,c.join)(b,".gemini","google_accounts.json");return(0,h.existsSync)(a)}default:return!0}}(b))return{agentType:b,installed:!0,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k};let n=!0;return k&&(n=await (a=b,new Promise(b=>{let c,d;switch(a){case"claude-code":c=k,d=["auth","status"];break;case"cursor":c=k,d=["status"];break;default:b(!0);return}try{let a=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(c,d,a,a=>{b(!a)})}catch{b(!1)}}))),{agentType:b,installed:!0,authenticated:n,label:f,binaryName:k,installCommand:m,authCommand:n?null:k}}function w(a,b){return new Promise(c=>{try{let d=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(a,b,d,(a,b)=>{if(a)return void c({installed:!1,version:null});let d=b.match(/(\d+\.\d+(?:\.\d+)?)/);c({installed:!0,version:d?.[1]??null})})}catch{c({installed:!1,version:null})}})}async function x(){let[a,b,c]=await Promise.all([w("git",["--version"]),w("gh",["--version"]),(async()=>{try{let a=(0,e.resolve)("ListToolsUseCase");return await a.execute()}catch{return[]}})()]),d=c.find(a=>"git"===a.id),f=c.find(a=>"gh"===a.id);return{git:{...a,installCommand:d?.installCommand??null,installUrl:d?.website??"https://git-scm.com"},gh:{...b,installCommand:f?.installCommand??null,installUrl:f?.website??"https://cli.github.com"}}}async function y(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("ArchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to archive feature"}}}async function z(a,b,c,d){if(!a?.trim())return{error:"id is required"};try{let f=(0,e.resolve)("DeleteFeatureUseCase"),g={};return void 0!==b&&(g.cleanup=b),void 0!==c&&(g.cascadeDelete=c),void 0!==d&&(g.closePr=d),{feature:Object.keys(g).length>0?await f.execute(a,g):await f.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function A(a){if(!a.trim())return{resumed:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("ResumeFeatureUseCase");return await b.execute(a),{resumed:!0}}catch(a){return{resumed:!1,error:a instanceof Error?a.message:"Failed to resume feature"}}}async function B(a){if(!a.trim())return{started:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("StartFeatureUseCase");return await b.execute(a),{started:!0}}catch(a){return{started:!1,error:a instanceof Error?a.message:"Failed to start feature"}}}async function C(a){if(!a.trim())return{stopped:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("IAgentRunRepository"),c=(await b.list()).find(b=>b.featureId===a&&"completed"!==b.status&&"failed"!==b.status&&"interrupted"!==b.status&&"cancelled"!==b.status);if(!c)return{stopped:!1,error:"No active agent run found for this feature"};let d=(0,e.resolve)("StopAgentRunUseCase"),f=await d.execute(c.id);if(!f.stopped)return{stopped:!1,error:f.reason};return{stopped:!0}}catch(a){return{stopped:!1,error:a instanceof Error?a.message:"Failed to stop agent"}}}async function D(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("UnarchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to unarchive feature"}}}async function E(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,e.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function F(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,e.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function G(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"0000ea920ab8f4943ddb5b45a114d8353ae5db0de9",null),a.s(["checkAgentAuth",()=>v],9959),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"008ff93f7db16b101678d692c55ec013bcefe6ebf1",null),a.s(["checkToolStatus",()=>x],79124),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"40750bb2a6e04d6c4ca38263b47cef8d672484d38c",null),a.s(["archiveFeature",()=>y],10528),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"784f71b2657acc2fd1763d79a3ea38066c47f9b721",null),a.s(["deleteFeature",()=>z],50845),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"4062cd20aa728a6608d62468cbdf928efb089043c1",null),a.s(["resumeFeature",()=>A],26604),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"40522e6be5bf72773e33c5a93c86d4a2462fa3ef68",null),a.s(["startFeature",()=>B],54723),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"40f17ef2523b9dda4381e78ce0c727742ad6243c2b",null),a.s(["stopFeature",()=>C],18942),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"4014beceb7934dbfd7a463dd6fb822f2b7bba4123d",null),a.s(["unarchiveFeature",()=>D],42886),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"400900dce1a0e8536176f5c48597606cf9a28fe43e",null),a.s(["addRepository",()=>E],49560),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"40a0788825fd1281ab6017196494ead311fe74464f",null),a.s(["deleteRepository",()=>F],39353),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"409025a84e2b7a541afb95013109cbb821e9b7ff3e",null),a.s(["getFeatureMetadata",()=>G],29207)}];
|
|
1
|
+
module.exports=[84095,56799,80496,93225,41872,9959,79124,10528,50845,26604,54723,18942,42886,49560,39353,29207,a=>{"use strict";var b=a.i(92658),c=a.i(50227),d=a.i(33244),e=a.i(96380),f=a.i(12581);async function g(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};let g=(0,d.getSettings)().environment.defaultEditor,h=(0,e.resolve)("LaunchIdeUseCase"),i=await h.execute({editorId:g,repositoryPath:b,branch:f,checkAvailability:!0});return i.ok?{success:!0,editor:i.editorName,path:i.worktreePath}:{success:!1,error:i.message}}(0,f.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"40559f03043ad566343220ff50d1ea593175b7fcf3",null),a.s(["openIde",()=>g],84095);var h=a.i(2157),i=a.i(60526),j=a.i(74533),k=a.i(29918);let l={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]},win32:{cmd:"cmd.exe",args:a=>["/c","start","powershell","-NoExit","-Command",`Set-Location "${a}"`]}};async function m(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,d.getSettings)(),c=a.environment.shellPreference,g=a.environment.terminalPreference??"system",m=f?(0,k.computeWorktreePath)(b,f):b;if(!(0,h.existsSync)(m))return{success:!1,error:`Path does not exist: ${m}`};if("system"!==g)try{let a=(0,e.resolve)("IToolInstallerService").getTerminalOpenConfig(g);if(a?.openDirectory.includes("{dir}")){let b=a.openDirectory.replace("{dir}",m);if(a.shell){let a=(0,j.spawn)(b,[],{detached:!0,stdio:"ignore",shell:!0});a.on("error",()=>void 0),a.unref()}else{let[a,...c]=b.split(/\s+/),d=(0,j.spawn)(a,c,{detached:!0,stdio:"ignore"});d.on("error",()=>void 0),d.unref()}return{success:!0,path:m,shell:c}}}catch{}let n=l[(0,i.platform)()];if(!n)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let o=(0,j.spawn)(n.cmd,n.args(m),{detached:!0,stdio:"ignore"});return o.on("error",()=>void 0),o.unref(),{success:!0,path:m,shell:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,f.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"40fe030ea56369d606b00f10b0984f597b99f6dafb",null),a.s(["openShell",()=>m],56799);let n={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]},win32:{cmd:"explorer",args:a=>[a]}};async function o(a){if(!a||!(0,c.isAbsolute)(a))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,h.existsSync)(a))return{success:!1,error:"Directory not found"};let b=n[(0,i.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let c=(0,j.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function p(a){if(!a?.trim())return{success:!1,error:"Repository id is required"};try{let b=(0,e.resolve)("SyncRepositoryMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to sync repository"}}}async function q(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"409685969f666b42b5e7f436379314c1c54ad607b5",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"409d87ef1d95d22f1dde7f5bf261bd4d7639cf34ac",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"00a59c3b047073a9fd8a6c3af43f67a377f2bc8737",null),a.s(["isAgentSetupComplete",()=>q],41872);var r=a.i(76437);let s={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},t={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},u={"claude-code":"claude",cursor:"cursor-agent","gemini-cli":"gemini"};async function v(){var a;let b;try{b=(0,d.getSettings)().agent.type}catch{return{agentType:"unknown",installed:!1,authenticated:!1,label:"Unknown",binaryName:null,installCommand:null,authCommand:null}}let f=s[b]??b,g=t[b]??null,k=u[b]??null;if(!g)return{agentType:b,installed:!0,authenticated:!0,label:f,binaryName:null,installCommand:null,authCommand:null};let l=!1,m=null;try{let a=(0,e.resolve)("ListToolsUseCase"),b=(await a.execute()).find(a=>a.id===g);l=b?.status.status==="available",m=b?.installCommand??null}catch{l=!1}if(!l)return{agentType:b,installed:!1,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k?`Install ${f} first`:null};if(!function(a){let b=(0,i.homedir)();switch(a){case"claude-code":{if(process.env.ANTHROPIC_API_KEY||process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.CLAUDE_CODE_OAUTH_TOKEN)return!0;let a=(0,c.join)(b,".claude",".credentials.json");return(0,h.existsSync)(a)}case"cursor":{if(process.env.CURSOR_API_KEY)return!0;let a=(0,c.join)(b,".cursor");return(0,h.existsSync)(a)}case"gemini-cli":{if(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY||process.env.GOOGLE_APPLICATION_CREDENTIALS)return!0;let a=(0,c.join)(b,".gemini","google_accounts.json");return(0,h.existsSync)(a)}default:return!0}}(b))return{agentType:b,installed:!0,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k};let n=!0;return k&&(n=await (a=b,new Promise(b=>{let c,d;switch(a){case"claude-code":c=k,d=["auth","status"];break;case"cursor":c=k,d=["status"];break;default:b(!0);return}try{let a=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(c,d,a,a=>{b(!a)})}catch{b(!1)}}))),{agentType:b,installed:!0,authenticated:n,label:f,binaryName:k,installCommand:m,authCommand:n?null:k}}function w(a,b){return new Promise(c=>{try{let d=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(a,b,d,(a,b)=>{if(a)return void c({installed:!1,version:null});let d=b.match(/(\d+\.\d+(?:\.\d+)?)/);c({installed:!0,version:d?.[1]??null})})}catch{c({installed:!1,version:null})}})}async function x(){let[a,b,c]=await Promise.all([w("git",["--version"]),w("gh",["--version"]),(async()=>{try{let a=(0,e.resolve)("ListToolsUseCase");return await a.execute()}catch{return[]}})()]),d=c.find(a=>"git"===a.id),f=c.find(a=>"gh"===a.id);return{git:{...a,installCommand:d?.installCommand??null,installUrl:d?.website??"https://git-scm.com"},gh:{...b,installCommand:f?.installCommand??null,installUrl:f?.website??"https://cli.github.com"}}}async function y(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("ArchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to archive feature"}}}async function z(a,b,c,d){if(!a?.trim())return{error:"id is required"};try{let f=(0,e.resolve)("DeleteFeatureUseCase"),g={};return void 0!==b&&(g.cleanup=b),void 0!==c&&(g.cascadeDelete=c),void 0!==d&&(g.closePr=d),{feature:Object.keys(g).length>0?await f.execute(a,g):await f.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function A(a){if(!a.trim())return{resumed:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("ResumeFeatureUseCase");return await b.execute(a),{resumed:!0}}catch(a){return{resumed:!1,error:a instanceof Error?a.message:"Failed to resume feature"}}}async function B(a){if(!a.trim())return{started:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("StartFeatureUseCase");return await b.execute(a),{started:!0}}catch(a){return{started:!1,error:a instanceof Error?a.message:"Failed to start feature"}}}async function C(a){if(!a.trim())return{stopped:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("IAgentRunRepository"),c=(await b.list()).find(b=>b.featureId===a&&"completed"!==b.status&&"failed"!==b.status&&"interrupted"!==b.status&&"cancelled"!==b.status);if(!c)return{stopped:!1,error:"No active agent run found for this feature"};let d=(0,e.resolve)("StopAgentRunUseCase"),f=await d.execute(c.id);if(!f.stopped)return{stopped:!1,error:f.reason};return{stopped:!0}}catch(a){return{stopped:!1,error:a instanceof Error?a.message:"Failed to stop agent"}}}async function D(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("UnarchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to unarchive feature"}}}async function E(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,e.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function F(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,e.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function G(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"00e90b767e042009e536001dd79cc687a8a532fc07",null),a.s(["checkAgentAuth",()=>v],9959),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"000ece53f459a553485285682a4ed818941abe8660",null),a.s(["checkToolStatus",()=>x],79124),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"40893b3c66acb01297c049fcda6c4f4b44fdda83ef",null),a.s(["archiveFeature",()=>y],10528),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"7899900261b225ea7699f03536c3e6295995dcc030",null),a.s(["deleteFeature",()=>z],50845),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"40732ca7b492dd1909a064254551f03ebc5206d162",null),a.s(["resumeFeature",()=>A],26604),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"4088b76904923a43d1ce547178de9057c773bb4386",null),a.s(["startFeature",()=>B],54723),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"401c0491c068559ef2be7092e827b0853f12851e2a",null),a.s(["stopFeature",()=>C],18942),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"40df55e5f4befbf6fe3198075dbf2695b7d78fff2d",null),a.s(["unarchiveFeature",()=>D],42886),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"4037f3cb20aaa180a9cf9fcb00cf89d83ec3ff2c1a",null),a.s(["addRepository",()=>E],49560),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"40aab15017d3763314c4330dc955816a725c9c1fcb",null),a.s(["deleteRepository",()=>F],39353),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"40fa83bdc1951fc287881ba72a0186925cc37d906c",null),a.s(["getFeatureMetadata",()=>G],29207)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map
|