@shepai/cli 1.106.2 → 1.106.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
  2. package/dist/tsconfig.build.tsbuildinfo +1 -1
  3. package/package.json +1 -1
  4. package/web/.next/BUILD_ID +1 -1
  5. package/web/.next/build-manifest.json +2 -2
  6. package/web/.next/fallback-build-manifest.json +2 -2
  7. package/web/.next/prerender-manifest.json +3 -3
  8. package/web/.next/required-server-files.js +2 -2
  9. package/web/.next/required-server-files.json +2 -2
  10. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
  11. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  13. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +25 -25
  14. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +25 -25
  17. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  20. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
  23. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +25 -25
  26. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +25 -25
  29. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
  32. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  35. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/_global-error.html +2 -2
  38. package/web/.next/server/app/_global-error.rsc +1 -1
  39. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  40. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  41. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  42. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  43. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  44. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  45. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  47. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  48. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  50. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  52. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  54. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/chunks/[root-of-the-server]__f47bb8a5._.js +1 -1
  56. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  57. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  58. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js +1 -1
  59. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js.map +1 -1
  60. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js +1 -1
  61. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js.map +1 -1
  62. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  63. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  64. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  65. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  66. package/web/.next/server/chunks/ssr/[root-of-the-server]__51fc98b0._.js +1 -1
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__51fc98b0._.js.map +1 -1
  68. package/web/.next/server/chunks/ssr/[root-of-the-server]__57f37786._.js +1 -1
  69. package/web/.next/server/chunks/ssr/[root-of-the-server]__57f37786._.js.map +1 -1
  70. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  71. package/web/.next/server/chunks/ssr/[root-of-the-server]__708dcad1._.js +1 -1
  72. package/web/.next/server/chunks/ssr/[root-of-the-server]__708dcad1._.js.map +1 -1
  73. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js +1 -1
  74. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
  75. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e002910._.js +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e002910._.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  82. package/web/.next/server/chunks/ssr/{_52bb01a9._.js → _025a2fa0._.js} +2 -2
  83. package/web/.next/server/chunks/ssr/{_52bb01a9._.js.map → _025a2fa0._.js.map} +1 -1
  84. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  85. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/{_949f04ba._.js → _1f9b7ad3._.js} +2 -2
  87. package/web/.next/server/chunks/ssr/{_949f04ba._.js.map → _1f9b7ad3._.js.map} +1 -1
  88. package/web/.next/server/chunks/ssr/{_bec233fd._.js → _8afac0ca._.js} +2 -2
  89. package/web/.next/server/chunks/ssr/{_bec233fd._.js.map → _8afac0ca._.js.map} +1 -1
  90. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  91. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  93. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  95. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/src_presentation_web_7275ce5d._.js +2 -2
  97. package/web/.next/server/chunks/ssr/src_presentation_web_7275ce5d._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/src_presentation_web_758dfa10._.js +2 -2
  99. package/web/.next/server/chunks/ssr/src_presentation_web_758dfa10._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js +1 -1
  101. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  103. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  105. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  107. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  108. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  109. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  110. package/web/.next/server/pages/500.html +2 -2
  111. package/web/.next/server/server-reference-manifest.js +1 -1
  112. package/web/.next/server/server-reference-manifest.json +30 -30
  113. package/web/.next/static/chunks/{9ca0d675bf5d98c2.js → 29c29800f5a2acc6.js} +1 -1
  114. package/web/.next/static/chunks/{76814cd97c0a92de.js → 77ae4e64052864f9.js} +2 -2
  115. package/web/.next/static/chunks/79474459eb409359.js +1 -0
  116. package/web/.next/static/chunks/{900aedf6e293c4ac.js → 8c0f3126502dea0a.js} +1 -1
  117. package/web/.next/static/chunks/8c3a1b4dd386fb21.js +1 -0
  118. package/web/.next/static/chunks/{1942195f7ab34047.js → b1eadf24106c53ce.js} +1 -1
  119. package/web/.next/static/chunks/{36ae564826a3fd31.js → b2b65ee0666a829a.js} +1 -1
  120. package/web/.next/static/chunks/{aee0323baf10b478.js → c750d771701b9b97.js} +1 -1
  121. package/web/.next/static/chunks/{012863314e48986d.js → d4ee1f8f03cee0aa.js} +1 -1
  122. package/web/.next/static/chunks/{da47c9075566521a.js → ea320f314a210a70.js} +2 -2
  123. package/web/.next/static/chunks/2cdf7a22c07f9d92.js +0 -1
  124. package/web/.next/static/chunks/dae2a000b44bad21.js +0 -1
  125. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_buildManifest.js +0 -0
  126. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_clientMiddlewareManifest.json +0 -0
  127. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_ssgManifest.js +0 -0
@@ -1,5 +1,5 @@
1
- module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00dfbe8f3c8032396254b93573a08ca66e83c73930",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{description:b,repositoryPath:d,attachments:e,sessionId:f,approvalGates:g,push:h,openPr:i,parentId:j,fast:k,agentType:l,model:m}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let n=function(a,b){if(!b||0===b.length)return a;let c=b.map(a=>`@${a.path}`).join(" ");return`${a}
1
+ module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00c48d00fb4232ffa1dd643781670eeb4082b11716",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{description:b,repositoryPath:d,attachments:e,sessionId:f,approvalGates:g,push:h,openPr:i,parentId:j,fast:k,agentType:l,model:m}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let n=function(a,b){if(!b||0===b.length)return a;let c=b.map(a=>`@${a.path}`).join(" ");return`${a}
2
2
 
3
- ${c}`}(b,e),o={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase"),{feature:e,shouldSpawn:g}=await a.createRecord({userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{}});return a.initializeAndSpawn(e,{userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{},...f?{sessionId:f}:{}},g).catch(a=>{console.error("[createFeature] initializeAndSpawn failed:",a)}),{feature:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"409ac7b7c128b4b23442d4b7f98e88822352e7fc9d",null),a.s(["createFeature",()=>d],77605)},71547,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075),t=a.i(24860),u=a.i(77605);a.s([],96307),a.i(96307),a.s(["0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83",()=>b.pickFolder,"007cd112b20a906d657455d48f346809c5b826d417",()=>m.getAllAgentModels,"00b55ab058c537a18dcc0bb720cb4325987794805a",()=>k.isAgentSetupComplete,"00c38f0a47805ae900f67b613e65887a9b55f88c68",()=>s.fetchGraphData,"00dfbe8f3c8032396254b93573a08ca66e83c73930",()=>t.getWorkflowDefaults,"00f8149f84d5ada7f7a82c55ef3143147a68a850ec",()=>l.checkAgentAuth,"401027601dda5efbab127c707395f14fe647fa02e4",()=>i.openShell,"4024fe9e76e01afe485b4e6f5ce8dcff689c90663b",()=>p.addRepository,"404632e1bb87b9fde759794ad8e9ae79a21f22995b",()=>e.deployRepository,"405602ec00a68bb4c2c2dda5323673425dbeca094e",()=>r.getFeatureMetadata,"4080cb853e1e233401a395dfdfe262b0f589a28db4",()=>f.stopDeployment,"40835d1da6e683219c64a4f17d368c4606336a256e",()=>d.deployFeature,"408aec8909f7eda2602f4e6059239510e25cdcae49",()=>h.openIde,"409ac7b7c128b4b23442d4b7f98e88822352e7fc9d",()=>u.createFeature,"40b3771e7a445eb654ed021001e69af3d4802ae617",()=>c.getDeploymentLogs,"40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7",()=>g.getDeploymentStatus,"40ecd678a83ddfe26d9226f9e40876e7457912649c",()=>q.deleteRepository,"40f6f50f976c574fc2af24c1d8b225dd4120a62f5f",()=>j.openFolder,"6056402870f6a268cf5a10016bcaf8b246179a603e",()=>o.deleteFeature,"605fbe995b4f54295082956f36744dc55e37440778",()=>n.updateAgentAndModel],71547)}];
3
+ ${c}`}(b,e),o={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase"),{feature:e,shouldSpawn:g}=await a.createRecord({userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{}});return a.initializeAndSpawn(e,{userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{},...f?{sessionId:f}:{}},g).catch(a=>{console.error("[createFeature] initializeAndSpawn failed:",a)}),{feature:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"400c3c16e3592c2e9292cf95da39599468d721beee",null),a.s(["createFeature",()=>d],77605)},71547,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075),t=a.i(24860),u=a.i(77605);a.s([],96307),a.i(96307),a.s(["0004805c5fe588c64c791cede95178f4db386c8b66",()=>b.pickFolder,"0023f23a32f070f09c3fb5cbfd26a13f5206804e07",()=>l.checkAgentAuth,"003451b6fba043c85030351d32f9e3dfb8fe89c925",()=>k.isAgentSetupComplete,"00a51d2cbf97894916cf38262023a5db5dd6ac4f2d",()=>m.getAllAgentModels,"00c48d00fb4232ffa1dd643781670eeb4082b11716",()=>t.getWorkflowDefaults,"00dc6e950a94082ce6811be529111810e5f24957db",()=>s.fetchGraphData,"40008a51c62dfc8c84a60e4ef9a5c99593f354faf1",()=>h.openIde,"400c3c16e3592c2e9292cf95da39599468d721beee",()=>u.createFeature,"400c82a35abeef5efe6fcc53ee18fdc6d593f9a284",()=>d.deployFeature,"400f5ae6a6639cc75bc73cba0964c4e30e00fac5da",()=>q.deleteRepository,"401d1867f017055bef281ab4366f6c9d437b049bbb",()=>j.openFolder,"40350574cbb46962093996037e5a84e1455d515033",()=>e.deployRepository,"403934861c1e9745c722204887d4dfe4ede329a97d",()=>p.addRepository,"404f39fc95a318d461965ab249065d7d52c89dfe7c",()=>r.getFeatureMetadata,"407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4",()=>f.stopDeployment,"407c233697de2c082762d5159f769caed3c15598c9",()=>g.getDeploymentStatus,"409b03913f580f44263dc7c4e0c57d564571c28678",()=>i.openShell,"40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56",()=>c.getDeploymentLogs,"604a4aaa1623a9b72522642db65c6bbb6ca6b45278",()=>n.updateAgentAndModel,"604af635ea1b916d769bd0be29a4b1f5daeb5e421b",()=>o.deleteFeature],71547)}];
4
4
 
5
5
  //# sourceMappingURL=src_presentation_web_7275ce5d._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/app/actions/compose-user-input.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/%40drawer/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n enableEvidence: boolean;\n commitEvidence: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\nimport { composeUserInput } from './compose-user-input';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n description: string;\n repositoryPath: string;\n attachments?: Attachment[];\n sessionId?: string;\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast?: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model identifier for this feature run */\n model?: string;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const {\n description,\n repositoryPath,\n attachments,\n sessionId,\n approvalGates,\n push,\n openPr,\n parentId,\n fast,\n agentType,\n model,\n } = input;\n\n if (!description?.trim()) {\n return { error: 'description is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n\n // Phase 1 (fast): create DB record with real UUID — returns immediately\n const { feature, shouldSpawn } = await createFeatureUseCase.createRecord({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n description,\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n });\n\n // Phase 2 (background): metadata generation, worktree, spec, agent spawn\n // Fire-and-forget — the UI gets the real feature ID immediately\n createFeatureUseCase\n .initializeAndSpawn(\n feature,\n {\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n ...(sessionId ? { sessionId } : {}),\n },\n shouldSpawn\n )\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console\n console.error('[createFeature] initializeAndSpawn failed:', err);\n });\n\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","interface Attachment {\n path: string;\n name: string;\n}\n\nexport function composeUserInput(\n description: string,\n attachments: Attachment[] | undefined\n): string {\n if (!attachments || attachments.length === 0) {\n return description;\n }\n\n const refs = attachments.map((a) => `@${a.path}`).join(' ');\n return `${description}\\n\\n${refs}`;\n}\n","export {pickFolder as '0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40b3771e7a445eb654ed021001e69af3d4802ae617'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40835d1da6e683219c64a4f17d368c4606336a256e'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '404632e1bb87b9fde759794ad8e9ae79a21f22995b'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '4080cb853e1e233401a395dfdfe262b0f589a28db4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7'} from 'ACTIONS_MODULE5'\nexport {openIde as '408aec8909f7eda2602f4e6059239510e25cdcae49'} from 'ACTIONS_MODULE6'\nexport {openShell as '401027601dda5efbab127c707395f14fe647fa02e4'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40f6f50f976c574fc2af24c1d8b225dd4120a62f5f'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00b55ab058c537a18dcc0bb720cb4325987794805a'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f8149f84d5ada7f7a82c55ef3143147a68a850ec'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '007cd112b20a906d657455d48f346809c5b826d417'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605fbe995b4f54295082956f36744dc55e37440778'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '6056402870f6a268cf5a10016bcaf8b246179a603e'} from 'ACTIONS_MODULE13'\nexport {addRepository as '4024fe9e76e01afe485b4e6f5ce8dcff689c90663b'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '40ecd678a83ddfe26d9226f9e40876e7457912649c'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '405602ec00a68bb4c2c2dda5323673425dbeca094e'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00c38f0a47805ae900f67b613e65887a9b55f88c68'} from 'ACTIONS_MODULE17'\nexport {getWorkflowDefaults as '00dfbe8f3c8032396254b93573a08ca66e83c73930'} from 'ACTIONS_MODULE18'\nexport {createFeature as '409ac7b7c128b4b23442d4b7f98e88822352e7fc9d'} from 'ACTIONS_MODULE19'\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/app/actions/compose-user-input.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/%40drawer/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n enableEvidence: boolean;\n commitEvidence: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\nimport { composeUserInput } from './compose-user-input';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n description: string;\n repositoryPath: string;\n attachments?: Attachment[];\n sessionId?: string;\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast?: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model identifier for this feature run */\n model?: string;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const {\n description,\n repositoryPath,\n attachments,\n sessionId,\n approvalGates,\n push,\n openPr,\n parentId,\n fast,\n agentType,\n model,\n } = input;\n\n if (!description?.trim()) {\n return { error: 'description is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n\n // Phase 1 (fast): create DB record with real UUID — returns immediately\n const { feature, shouldSpawn } = await createFeatureUseCase.createRecord({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n description,\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n });\n\n // Phase 2 (background): metadata generation, worktree, spec, agent spawn\n // Fire-and-forget — the UI gets the real feature ID immediately\n createFeatureUseCase\n .initializeAndSpawn(\n feature,\n {\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n ...(sessionId ? { sessionId } : {}),\n },\n shouldSpawn\n )\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console\n console.error('[createFeature] initializeAndSpawn failed:', err);\n });\n\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","interface Attachment {\n path: string;\n name: string;\n}\n\nexport function composeUserInput(\n description: string,\n attachments: Attachment[] | undefined\n): string {\n if (!attachments || attachments.length === 0) {\n return description;\n }\n\n const refs = attachments.map((a) => `@${a.path}`).join(' ');\n return `${description}\\n\\n${refs}`;\n}\n","export {pickFolder as '0004805c5fe588c64c791cede95178f4db386c8b66'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400c82a35abeef5efe6fcc53ee18fdc6d593f9a284'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40350574cbb46962093996037e5a84e1455d515033'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '407c233697de2c082762d5159f769caed3c15598c9'} from 'ACTIONS_MODULE5'\nexport {openIde as '40008a51c62dfc8c84a60e4ef9a5c99593f354faf1'} from 'ACTIONS_MODULE6'\nexport {openShell as '409b03913f580f44263dc7c4e0c57d564571c28678'} from 'ACTIONS_MODULE7'\nexport {openFolder as '401d1867f017055bef281ab4366f6c9d437b049bbb'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '003451b6fba043c85030351d32f9e3dfb8fe89c925'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0023f23a32f070f09c3fb5cbfd26a13f5206804e07'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00a51d2cbf97894916cf38262023a5db5dd6ac4f2d'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '604a4aaa1623a9b72522642db65c6bbb6ca6b45278'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '604af635ea1b916d769bd0be29a4b1f5daeb5e421b'} from 'ACTIONS_MODULE13'\nexport {addRepository as '403934861c1e9745c722204887d4dfe4ede329a97d'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '400f5ae6a6639cc75bc73cba0964c4e30e00fac5da'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '404f39fc95a318d461965ab249065d7d52c89dfe7c'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00dc6e950a94082ce6811be529111810e5f24957db'} from 'ACTIONS_MODULE17'\nexport {getWorkflowDefaults as '00c48d00fb4232ffa1dd643781670eeb4082b11716'} from 'ACTIONS_MODULE18'\nexport {createFeature as '400c3c16e3592c2e9292cf95da39599468d721beee'} from 'ACTIONS_MODULE19'\n"],"names":[],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00dfbe8f3c8032396254b93573a08ca66e83c73930",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{description:b,repositoryPath:d,attachments:e,sessionId:f,approvalGates:g,push:h,openPr:i,parentId:j,fast:k,agentType:l,model:m}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let n=function(a,b){if(!b||0===b.length)return a;let c=b.map(a=>`@${a.path}`).join(" ");return`${a}
1
+ module.exports=[24860,a=>{"use strict";var b=a.i(92658),c=a.i(33244);async function d(){let{workflow:a}=(0,c.getSettings)();return{approvalGates:{allowPrd:a.approvalGateDefaults.allowPrd,allowPlan:a.approvalGateDefaults.allowPlan,allowMerge:a.approvalGateDefaults.allowMerge},push:a.approvalGateDefaults.pushOnImplementationComplete,openPr:a.openPrOnImplementationComplete,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00c48d00fb4232ffa1dd643781670eeb4082b11716",null),a.s(["getWorkflowDefaults",()=>d])},77605,a=>{"use strict";var b=a.i(92658),c=a.i(96380);async function d(a){let{description:b,repositoryPath:d,attachments:e,sessionId:f,approvalGates:g,push:h,openPr:i,parentId:j,fast:k,agentType:l,model:m}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let n=function(a,b){if(!b||0===b.length)return a;let c=b.map(a=>`@${a.path}`).join(" ");return`${a}
2
2
 
3
- ${c}`}(b,e),o={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase"),{feature:e,shouldSpawn:g}=await a.createRecord({userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{}});return a.initializeAndSpawn(e,{userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{},...f?{sessionId:f}:{}},g).catch(a=>{console.error("[createFeature] initializeAndSpawn failed:",a)}),{feature:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"409ac7b7c128b4b23442d4b7f98e88822352e7fc9d",null),a.s(["createFeature",()=>d],77605)},83778,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075),t=a.i(24860),u=a.i(77605);a.s([],2070),a.i(2070),a.s(["0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83",()=>b.pickFolder,"007cd112b20a906d657455d48f346809c5b826d417",()=>m.getAllAgentModels,"00b55ab058c537a18dcc0bb720cb4325987794805a",()=>k.isAgentSetupComplete,"00c38f0a47805ae900f67b613e65887a9b55f88c68",()=>s.fetchGraphData,"00dfbe8f3c8032396254b93573a08ca66e83c73930",()=>t.getWorkflowDefaults,"00f8149f84d5ada7f7a82c55ef3143147a68a850ec",()=>l.checkAgentAuth,"401027601dda5efbab127c707395f14fe647fa02e4",()=>i.openShell,"4024fe9e76e01afe485b4e6f5ce8dcff689c90663b",()=>p.addRepository,"404632e1bb87b9fde759794ad8e9ae79a21f22995b",()=>e.deployRepository,"405602ec00a68bb4c2c2dda5323673425dbeca094e",()=>r.getFeatureMetadata,"4080cb853e1e233401a395dfdfe262b0f589a28db4",()=>f.stopDeployment,"40835d1da6e683219c64a4f17d368c4606336a256e",()=>d.deployFeature,"408aec8909f7eda2602f4e6059239510e25cdcae49",()=>h.openIde,"409ac7b7c128b4b23442d4b7f98e88822352e7fc9d",()=>u.createFeature,"40b3771e7a445eb654ed021001e69af3d4802ae617",()=>c.getDeploymentLogs,"40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7",()=>g.getDeploymentStatus,"40ecd678a83ddfe26d9226f9e40876e7457912649c",()=>q.deleteRepository,"40f6f50f976c574fc2af24c1d8b225dd4120a62f5f",()=>j.openFolder,"6056402870f6a268cf5a10016bcaf8b246179a603e",()=>o.deleteFeature,"605fbe995b4f54295082956f36744dc55e37440778",()=>n.updateAgentAndModel],83778)}];
3
+ ${c}`}(b,e),o={allowPrd:g?.allowPrd??!1,allowPlan:g?.allowPlan??!1,allowMerge:g?.allowMerge??!1};try{let a=(0,c.resolve)("CreateFeatureUseCase"),{feature:e,shouldSpawn:g}=await a.createRecord({userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{}});return a.initializeAndSpawn(e,{userInput:n,repositoryPath:d,approvalGates:o,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{agentType:l}:{},...m?{model:m}:{},...f?{sessionId:f}:{}},g).catch(a=>{console.error("[createFeature] initializeAndSpawn failed:",a)}),{feature:e}}catch(a){return{error:a instanceof Error?a.message:"Failed to create feature"}}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"400c3c16e3592c2e9292cf95da39599468d721beee",null),a.s(["createFeature",()=>d],77605)},83778,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075),t=a.i(24860),u=a.i(77605);a.s([],2070),a.i(2070),a.s(["0004805c5fe588c64c791cede95178f4db386c8b66",()=>b.pickFolder,"0023f23a32f070f09c3fb5cbfd26a13f5206804e07",()=>l.checkAgentAuth,"003451b6fba043c85030351d32f9e3dfb8fe89c925",()=>k.isAgentSetupComplete,"00a51d2cbf97894916cf38262023a5db5dd6ac4f2d",()=>m.getAllAgentModels,"00c48d00fb4232ffa1dd643781670eeb4082b11716",()=>t.getWorkflowDefaults,"00dc6e950a94082ce6811be529111810e5f24957db",()=>s.fetchGraphData,"40008a51c62dfc8c84a60e4ef9a5c99593f354faf1",()=>h.openIde,"400c3c16e3592c2e9292cf95da39599468d721beee",()=>u.createFeature,"400c82a35abeef5efe6fcc53ee18fdc6d593f9a284",()=>d.deployFeature,"400f5ae6a6639cc75bc73cba0964c4e30e00fac5da",()=>q.deleteRepository,"401d1867f017055bef281ab4366f6c9d437b049bbb",()=>j.openFolder,"40350574cbb46962093996037e5a84e1455d515033",()=>e.deployRepository,"403934861c1e9745c722204887d4dfe4ede329a97d",()=>p.addRepository,"404f39fc95a318d461965ab249065d7d52c89dfe7c",()=>r.getFeatureMetadata,"407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4",()=>f.stopDeployment,"407c233697de2c082762d5159f769caed3c15598c9",()=>g.getDeploymentStatus,"409b03913f580f44263dc7c4e0c57d564571c28678",()=>i.openShell,"40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56",()=>c.getDeploymentLogs,"604a4aaa1623a9b72522642db65c6bbb6ca6b45278",()=>n.updateAgentAndModel,"604af635ea1b916d769bd0be29a4b1f5daeb5e421b",()=>o.deleteFeature],83778)}];
4
4
 
5
5
  //# sourceMappingURL=src_presentation_web_758dfa10._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/app/actions/compose-user-input.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n enableEvidence: boolean;\n commitEvidence: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\nimport { composeUserInput } from './compose-user-input';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n description: string;\n repositoryPath: string;\n attachments?: Attachment[];\n sessionId?: string;\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast?: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model identifier for this feature run */\n model?: string;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const {\n description,\n repositoryPath,\n attachments,\n sessionId,\n approvalGates,\n push,\n openPr,\n parentId,\n fast,\n agentType,\n model,\n } = input;\n\n if (!description?.trim()) {\n return { error: 'description is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n\n // Phase 1 (fast): create DB record with real UUID — returns immediately\n const { feature, shouldSpawn } = await createFeatureUseCase.createRecord({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n description,\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n });\n\n // Phase 2 (background): metadata generation, worktree, spec, agent spawn\n // Fire-and-forget — the UI gets the real feature ID immediately\n createFeatureUseCase\n .initializeAndSpawn(\n feature,\n {\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n ...(sessionId ? { sessionId } : {}),\n },\n shouldSpawn\n )\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console\n console.error('[createFeature] initializeAndSpawn failed:', err);\n });\n\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","interface Attachment {\n path: string;\n name: string;\n}\n\nexport function composeUserInput(\n description: string,\n attachments: Attachment[] | undefined\n): string {\n if (!attachments || attachments.length === 0) {\n return description;\n }\n\n const refs = attachments.map((a) => `@${a.path}`).join(' ');\n return `${description}\\n\\n${refs}`;\n}\n","export {pickFolder as '0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40b3771e7a445eb654ed021001e69af3d4802ae617'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40835d1da6e683219c64a4f17d368c4606336a256e'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '404632e1bb87b9fde759794ad8e9ae79a21f22995b'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '4080cb853e1e233401a395dfdfe262b0f589a28db4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7'} from 'ACTIONS_MODULE5'\nexport {openIde as '408aec8909f7eda2602f4e6059239510e25cdcae49'} from 'ACTIONS_MODULE6'\nexport {openShell as '401027601dda5efbab127c707395f14fe647fa02e4'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40f6f50f976c574fc2af24c1d8b225dd4120a62f5f'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00b55ab058c537a18dcc0bb720cb4325987794805a'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f8149f84d5ada7f7a82c55ef3143147a68a850ec'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '007cd112b20a906d657455d48f346809c5b826d417'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605fbe995b4f54295082956f36744dc55e37440778'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '6056402870f6a268cf5a10016bcaf8b246179a603e'} from 'ACTIONS_MODULE13'\nexport {addRepository as '4024fe9e76e01afe485b4e6f5ce8dcff689c90663b'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '40ecd678a83ddfe26d9226f9e40876e7457912649c'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '405602ec00a68bb4c2c2dda5323673425dbeca094e'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00c38f0a47805ae900f67b613e65887a9b55f88c68'} from 'ACTIONS_MODULE17'\nexport {getWorkflowDefaults as '00dfbe8f3c8032396254b93573a08ca66e83c73930'} from 'ACTIONS_MODULE18'\nexport {createFeature as '409ac7b7c128b4b23442d4b7f98e88822352e7fc9d'} from 'ACTIONS_MODULE19'\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/app/actions/compose-user-input.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/create/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n enableEvidence: boolean;\n commitEvidence: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n enableEvidence: workflow.enableEvidence,\n commitEvidence: workflow.commitEvidence,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\nimport { composeUserInput } from './compose-user-input';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n description: string;\n repositoryPath: string;\n attachments?: Attachment[];\n sessionId?: string;\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast?: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model identifier for this feature run */\n model?: string;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const {\n description,\n repositoryPath,\n attachments,\n sessionId,\n approvalGates,\n push,\n openPr,\n parentId,\n fast,\n agentType,\n model,\n } = input;\n\n if (!description?.trim()) {\n return { error: 'description is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n\n // Phase 1 (fast): create DB record with real UUID — returns immediately\n const { feature, shouldSpawn } = await createFeatureUseCase.createRecord({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n description,\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n });\n\n // Phase 2 (background): metadata generation, worktree, spec, agent spawn\n // Fire-and-forget — the UI gets the real feature ID immediately\n createFeatureUseCase\n .initializeAndSpawn(\n feature,\n {\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n ...(fast ? { fast } : {}),\n ...(agentType ? { agentType } : {}),\n ...(model ? { model } : {}),\n ...(sessionId ? { sessionId } : {}),\n },\n shouldSpawn\n )\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console\n console.error('[createFeature] initializeAndSpawn failed:', err);\n });\n\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","interface Attachment {\n path: string;\n name: string;\n}\n\nexport function composeUserInput(\n description: string,\n attachments: Attachment[] | undefined\n): string {\n if (!attachments || attachments.length === 0) {\n return description;\n }\n\n const refs = attachments.map((a) => `@${a.path}`).join(' ');\n return `${description}\\n\\n${refs}`;\n}\n","export {pickFolder as '0004805c5fe588c64c791cede95178f4db386c8b66'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400c82a35abeef5efe6fcc53ee18fdc6d593f9a284'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40350574cbb46962093996037e5a84e1455d515033'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '407c233697de2c082762d5159f769caed3c15598c9'} from 'ACTIONS_MODULE5'\nexport {openIde as '40008a51c62dfc8c84a60e4ef9a5c99593f354faf1'} from 'ACTIONS_MODULE6'\nexport {openShell as '409b03913f580f44263dc7c4e0c57d564571c28678'} from 'ACTIONS_MODULE7'\nexport {openFolder as '401d1867f017055bef281ab4366f6c9d437b049bbb'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '003451b6fba043c85030351d32f9e3dfb8fe89c925'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0023f23a32f070f09c3fb5cbfd26a13f5206804e07'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00a51d2cbf97894916cf38262023a5db5dd6ac4f2d'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '604a4aaa1623a9b72522642db65c6bbb6ca6b45278'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '604af635ea1b916d769bd0be29a4b1f5daeb5e421b'} from 'ACTIONS_MODULE13'\nexport {addRepository as '403934861c1e9745c722204887d4dfe4ede329a97d'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '400f5ae6a6639cc75bc73cba0964c4e30e00fac5da'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '404f39fc95a318d461965ab249065d7d52c89dfe7c'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00dc6e950a94082ce6811be529111810e5f24957db'} from 'ACTIONS_MODULE17'\nexport {getWorkflowDefaults as '00c48d00fb4232ffa1dd643781670eeb4082b11716'} from 'ACTIONS_MODULE18'\nexport {createFeature as '400c3c16e3592c2e9292cf95da39599468d721beee'} from 'ACTIONS_MODULE19'\n"],"names":[],"mappings":"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"}
@@ -1,3 +1,3 @@
1
- module.exports=[65238,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075);a.s([],51999),a.i(51999),a.s(["0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83",()=>b.pickFolder,"007cd112b20a906d657455d48f346809c5b826d417",()=>m.getAllAgentModels,"00b55ab058c537a18dcc0bb720cb4325987794805a",()=>k.isAgentSetupComplete,"00c38f0a47805ae900f67b613e65887a9b55f88c68",()=>s.fetchGraphData,"00f8149f84d5ada7f7a82c55ef3143147a68a850ec",()=>l.checkAgentAuth,"401027601dda5efbab127c707395f14fe647fa02e4",()=>i.openShell,"4024fe9e76e01afe485b4e6f5ce8dcff689c90663b",()=>p.addRepository,"404632e1bb87b9fde759794ad8e9ae79a21f22995b",()=>e.deployRepository,"405602ec00a68bb4c2c2dda5323673425dbeca094e",()=>r.getFeatureMetadata,"4080cb853e1e233401a395dfdfe262b0f589a28db4",()=>f.stopDeployment,"40835d1da6e683219c64a4f17d368c4606336a256e",()=>d.deployFeature,"408aec8909f7eda2602f4e6059239510e25cdcae49",()=>h.openIde,"40b3771e7a445eb654ed021001e69af3d4802ae617",()=>c.getDeploymentLogs,"40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7",()=>g.getDeploymentStatus,"40ecd678a83ddfe26d9226f9e40876e7457912649c",()=>q.deleteRepository,"40f6f50f976c574fc2af24c1d8b225dd4120a62f5f",()=>j.openFolder,"6056402870f6a268cf5a10016bcaf8b246179a603e",()=>o.deleteFeature,"605fbe995b4f54295082956f36744dc55e37440778",()=>n.updateAgentAndModel],65238)}];
1
+ module.exports=[65238,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(41872),l=a.i(9959),m=a.i(23504),n=a.i(27900),o=a.i(50845),p=a.i(49560),q=a.i(39353),r=a.i(29207),s=a.i(31075);a.s([],51999),a.i(51999),a.s(["0004805c5fe588c64c791cede95178f4db386c8b66",()=>b.pickFolder,"0023f23a32f070f09c3fb5cbfd26a13f5206804e07",()=>l.checkAgentAuth,"003451b6fba043c85030351d32f9e3dfb8fe89c925",()=>k.isAgentSetupComplete,"00a51d2cbf97894916cf38262023a5db5dd6ac4f2d",()=>m.getAllAgentModels,"00dc6e950a94082ce6811be529111810e5f24957db",()=>s.fetchGraphData,"40008a51c62dfc8c84a60e4ef9a5c99593f354faf1",()=>h.openIde,"400c82a35abeef5efe6fcc53ee18fdc6d593f9a284",()=>d.deployFeature,"400f5ae6a6639cc75bc73cba0964c4e30e00fac5da",()=>q.deleteRepository,"401d1867f017055bef281ab4366f6c9d437b049bbb",()=>j.openFolder,"40350574cbb46962093996037e5a84e1455d515033",()=>e.deployRepository,"403934861c1e9745c722204887d4dfe4ede329a97d",()=>p.addRepository,"404f39fc95a318d461965ab249065d7d52c89dfe7c",()=>r.getFeatureMetadata,"407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4",()=>f.stopDeployment,"407c233697de2c082762d5159f769caed3c15598c9",()=>g.getDeploymentStatus,"409b03913f580f44263dc7c4e0c57d564571c28678",()=>i.openShell,"40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56",()=>c.getDeploymentLogs,"604a4aaa1623a9b72522642db65c6bbb6ca6b45278",()=>n.updateAgentAndModel,"604af635ea1b916d769bd0be29a4b1f5daeb5e421b",()=>o.deleteFeature],65238)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_%28dashboard%29_page_actions_84803221.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40b3771e7a445eb654ed021001e69af3d4802ae617'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40835d1da6e683219c64a4f17d368c4606336a256e'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '404632e1bb87b9fde759794ad8e9ae79a21f22995b'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '4080cb853e1e233401a395dfdfe262b0f589a28db4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7'} from 'ACTIONS_MODULE5'\nexport {openIde as '408aec8909f7eda2602f4e6059239510e25cdcae49'} from 'ACTIONS_MODULE6'\nexport {openShell as '401027601dda5efbab127c707395f14fe647fa02e4'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40f6f50f976c574fc2af24c1d8b225dd4120a62f5f'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00b55ab058c537a18dcc0bb720cb4325987794805a'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f8149f84d5ada7f7a82c55ef3143147a68a850ec'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '007cd112b20a906d657455d48f346809c5b826d417'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605fbe995b4f54295082956f36744dc55e37440778'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '6056402870f6a268cf5a10016bcaf8b246179a603e'} from 'ACTIONS_MODULE13'\nexport {addRepository as '4024fe9e76e01afe485b4e6f5ce8dcff689c90663b'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '40ecd678a83ddfe26d9226f9e40876e7457912649c'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '405602ec00a68bb4c2c2dda5323673425dbeca094e'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00c38f0a47805ae900f67b613e65887a9b55f88c68'} from 'ACTIONS_MODULE17'\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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,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
+ {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0004805c5fe588c64c791cede95178f4db386c8b66'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400c82a35abeef5efe6fcc53ee18fdc6d593f9a284'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40350574cbb46962093996037e5a84e1455d515033'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '407c233697de2c082762d5159f769caed3c15598c9'} from 'ACTIONS_MODULE5'\nexport {openIde as '40008a51c62dfc8c84a60e4ef9a5c99593f354faf1'} from 'ACTIONS_MODULE6'\nexport {openShell as '409b03913f580f44263dc7c4e0c57d564571c28678'} from 'ACTIONS_MODULE7'\nexport {openFolder as '401d1867f017055bef281ab4366f6c9d437b049bbb'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '003451b6fba043c85030351d32f9e3dfb8fe89c925'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0023f23a32f070f09c3fb5cbfd26a13f5206804e07'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00a51d2cbf97894916cf38262023a5db5dd6ac4f2d'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '604a4aaa1623a9b72522642db65c6bbb6ca6b45278'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '604af635ea1b916d769bd0be29a4b1f5daeb5e421b'} from 'ACTIONS_MODULE13'\nexport {addRepository as '403934861c1e9745c722204887d4dfe4ede329a97d'} from 'ACTIONS_MODULE14'\nexport {deleteRepository as '400f5ae6a6639cc75bc73cba0964c4e30e00fac5da'} from 'ACTIONS_MODULE15'\nexport {getFeatureMetadata as '404f39fc95a318d461965ab249065d7d52c89dfe7c'} from 'ACTIONS_MODULE16'\nexport {fetchGraphData as '00dc6e950a94082ce6811be529111810e5f24957db'} from 'ACTIONS_MODULE17'\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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,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=[87596,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321);a.s([],78455),a.i(78455),a.s(["0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83",()=>b.pickFolder,"404632e1bb87b9fde759794ad8e9ae79a21f22995b",()=>e.deployRepository,"4080cb853e1e233401a395dfdfe262b0f589a28db4",()=>f.stopDeployment,"40835d1da6e683219c64a4f17d368c4606336a256e",()=>d.deployFeature,"40b3771e7a445eb654ed021001e69af3d4802ae617",()=>c.getDeploymentLogs,"40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7",()=>g.getDeploymentStatus],87596)}];
1
+ module.exports=[87596,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321);a.s([],78455),a.i(78455),a.s(["0004805c5fe588c64c791cede95178f4db386c8b66",()=>b.pickFolder,"400c82a35abeef5efe6fcc53ee18fdc6d593f9a284",()=>d.deployFeature,"40350574cbb46962093996037e5a84e1455d515033",()=>e.deployRepository,"407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4",()=>f.stopDeployment,"407c233697de2c082762d5159f769caed3c15598c9",()=>g.getDeploymentStatus,"40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56",()=>c.getDeploymentLogs],87596)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.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 '0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40b3771e7a445eb654ed021001e69af3d4802ae617'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40835d1da6e683219c64a4f17d368c4606336a256e'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '404632e1bb87b9fde759794ad8e9ae79a21f22995b'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '4080cb853e1e233401a395dfdfe262b0f589a28db4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7'} from 'ACTIONS_MODULE5'\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"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0004805c5fe588c64c791cede95178f4db386c8b66'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400c82a35abeef5efe6fcc53ee18fdc6d593f9a284'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40350574cbb46962093996037e5a84e1455d515033'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '407c233697de2c082762d5159f769caed3c15598c9'} from 'ACTIONS_MODULE5'\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"}
@@ -1,3 +1,3 @@
1
- module.exports=[90322,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321);a.s([],9775),a.i(9775),a.s(["0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83",()=>b.pickFolder,"404632e1bb87b9fde759794ad8e9ae79a21f22995b",()=>e.deployRepository,"4080cb853e1e233401a395dfdfe262b0f589a28db4",()=>f.stopDeployment,"40835d1da6e683219c64a4f17d368c4606336a256e",()=>d.deployFeature,"40b3771e7a445eb654ed021001e69af3d4802ae617",()=>c.getDeploymentLogs,"40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7",()=>g.getDeploymentStatus],90322)}];
1
+ module.exports=[90322,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321);a.s([],9775),a.i(9775),a.s(["0004805c5fe588c64c791cede95178f4db386c8b66",()=>b.pickFolder,"400c82a35abeef5efe6fcc53ee18fdc6d593f9a284",()=>d.deployFeature,"40350574cbb46962093996037e5a84e1455d515033",()=>e.deployRepository,"407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4",()=>f.stopDeployment,"407c233697de2c082762d5159f769caed3c15598c9",()=>g.getDeploymentStatus,"40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56",()=>c.getDeploymentLogs],90322)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_tools_page_actions_24684200.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 '0021c28d8ed55e8c879fa7740f36b3e1a4243dcd83'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40b3771e7a445eb654ed021001e69af3d4802ae617'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '40835d1da6e683219c64a4f17d368c4606336a256e'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '404632e1bb87b9fde759794ad8e9ae79a21f22995b'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '4080cb853e1e233401a395dfdfe262b0f589a28db4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40be4d0c1ece69d2ffc05c04f0de8a49d65dd8cba7'} from 'ACTIONS_MODULE5'\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"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/tools/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0004805c5fe588c64c791cede95178f4db386c8b66'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40e74bce6be2c8c08ab32bac9c38b5c7bf1c597c56'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '400c82a35abeef5efe6fcc53ee18fdc6d593f9a284'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40350574cbb46962093996037e5a84e1455d515033'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '407bfb36cf8f9fadfb6d78e936fedcb1b09eb6f0f4'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '407c233697de2c082762d5159f769caed3c15598c9'} from 'ACTIONS_MODULE5'\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"}
@@ -1,3 +1,3 @@
1
- module.exports=[96867,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)},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)},61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(72016),e=a.i(94132),f=a.i(3410),g=a.i(75579),h=a.i(28534),i=a.i(17606),j=a.i(83852),k=a.i(18948),l=a.i(80646),m=a.i(85536);function n({initialAgentType:a,initialModel:n,onAgentModelChange:o,disabled:p,className:q,mode:r}){let[s,t]=c.useState(!1),[u,v]=c.useState([]),[w,x]=c.useState(!0),[y,z]=c.useState(a),[A,B]=c.useState(n),[C,D]=c.useState(null),[E,F]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,g.getAllAgentModels)().then(v).finally(()=>x(!1))},[]),c.useEffect(()=>{if(!s){let a=setTimeout(()=>{F(0),H(null)},150);return()=>clearTimeout(a)}},[s]);let I=async(a,b)=>{if(t(!1),a!==y||b!==A){if("override"===r){z(a),B(b),o?.(a,b);return}z(a),B(b),o?.(a,b),D(null);try{let c=await (0,h.updateAgentAndModel)(a,b||null);c.ok||(z(y),B(A),o?.(y,A),D(c.error??"Failed to save"))}catch{z(y),B(A),o?.(y,A),D("Failed to save")}}},J=(0,i.getAgentTypeIcon)(y),K=u.find(a=>a.agentType===y)?.label??y,L=A?(0,j.getModelMeta)(A).displayName||A:null,M=G?u.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,m.cn)("flex flex-col gap-1",q),children:[(0,b.jsxs)(l.Popover,{open:s,onOpenChange:t,children:[(0,b.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(k.Button,{variant:"outline",role:"combobox","aria-expanded":s,disabled:(p??!1)||w,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"}),w?"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)(l.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===E?"-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"}),u.map(a=>{let c=(0,i.getAgentTypeIcon)(a.agentType),e=y===a.agentType,g=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,m.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",e&&"bg-accent/50"),onClick:()=>{g?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(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}),e&&!g?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,g?(0,b.jsx)(f.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:()=>{F(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(e.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=y===M.agentType&&A===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,m.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)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!C&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:C})]})}a.s(["AgentModelPicker",()=>n])}];
1
+ module.exports=[96867,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)},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)},61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(72016),e=a.i(94132),f=a.i(3410),g=a.i(19308),h=a.i(13352),i=a.i(17606),j=a.i(83852),k=a.i(18948),l=a.i(80646),m=a.i(85536);function n({initialAgentType:a,initialModel:n,onAgentModelChange:o,disabled:p,className:q,mode:r}){let[s,t]=c.useState(!1),[u,v]=c.useState([]),[w,x]=c.useState(!0),[y,z]=c.useState(a),[A,B]=c.useState(n),[C,D]=c.useState(null),[E,F]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,g.getAllAgentModels)().then(v).finally(()=>x(!1))},[]),c.useEffect(()=>{if(!s){let a=setTimeout(()=>{F(0),H(null)},150);return()=>clearTimeout(a)}},[s]);let I=async(a,b)=>{if(t(!1),a!==y||b!==A){if("override"===r){z(a),B(b),o?.(a,b);return}z(a),B(b),o?.(a,b),D(null);try{let c=await (0,h.updateAgentAndModel)(a,b||null);c.ok||(z(y),B(A),o?.(y,A),D(c.error??"Failed to save"))}catch{z(y),B(A),o?.(y,A),D("Failed to save")}}},J=(0,i.getAgentTypeIcon)(y),K=u.find(a=>a.agentType===y)?.label??y,L=A?(0,j.getModelMeta)(A).displayName||A:null,M=G?u.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,m.cn)("flex flex-col gap-1",q),children:[(0,b.jsxs)(l.Popover,{open:s,onOpenChange:t,children:[(0,b.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(k.Button,{variant:"outline",role:"combobox","aria-expanded":s,disabled:(p??!1)||w,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"}),w?"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)(l.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===E?"-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"}),u.map(a=>{let c=(0,i.getAgentTypeIcon)(a.agentType),e=y===a.agentType,g=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,m.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",e&&"bg-accent/50"),onClick:()=>{g?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(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}),e&&!g?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,g?(0,b.jsx)(f.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:()=>{F(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(e.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=y===M.agentType&&A===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,m.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)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!C&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:C})]})}a.s(["AgentModelPicker",()=>n])}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_components_bf50c527._.js.map
@@ -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)},96867,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)},61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(72016),e=a.i(94132),f=a.i(3410),g=a.i(75579),h=a.i(28534),i=a.i(17606),j=a.i(83852),k=a.i(18948),l=a.i(80646),m=a.i(85536);function n({initialAgentType:a,initialModel:n,onAgentModelChange:o,disabled:p,className:q,mode:r}){let[s,t]=c.useState(!1),[u,v]=c.useState([]),[w,x]=c.useState(!0),[y,z]=c.useState(a),[A,B]=c.useState(n),[C,D]=c.useState(null),[E,F]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,g.getAllAgentModels)().then(v).finally(()=>x(!1))},[]),c.useEffect(()=>{if(!s){let a=setTimeout(()=>{F(0),H(null)},150);return()=>clearTimeout(a)}},[s]);let I=async(a,b)=>{if(t(!1),a!==y||b!==A){if("override"===r){z(a),B(b),o?.(a,b);return}z(a),B(b),o?.(a,b),D(null);try{let c=await (0,h.updateAgentAndModel)(a,b||null);c.ok||(z(y),B(A),o?.(y,A),D(c.error??"Failed to save"))}catch{z(y),B(A),o?.(y,A),D("Failed to save")}}},J=(0,i.getAgentTypeIcon)(y),K=u.find(a=>a.agentType===y)?.label??y,L=A?(0,j.getModelMeta)(A).displayName||A:null,M=G?u.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,m.cn)("flex flex-col gap-1",q),children:[(0,b.jsxs)(l.Popover,{open:s,onOpenChange:t,children:[(0,b.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(k.Button,{variant:"outline",role:"combobox","aria-expanded":s,disabled:(p??!1)||w,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"}),w?"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)(l.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===E?"-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"}),u.map(a=>{let c=(0,i.getAgentTypeIcon)(a.agentType),e=y===a.agentType,g=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,m.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",e&&"bg-accent/50"),onClick:()=>{g?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(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}),e&&!g?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,g?(0,b.jsx)(f.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:()=>{F(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(e.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=y===M.agentType&&A===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,m.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)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!C&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:C})]})}a.s(["AgentModelPicker",()=>n])}];
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)},96867,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)},61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(72016),e=a.i(94132),f=a.i(3410),g=a.i(19308),h=a.i(13352),i=a.i(17606),j=a.i(83852),k=a.i(18948),l=a.i(80646),m=a.i(85536);function n({initialAgentType:a,initialModel:n,onAgentModelChange:o,disabled:p,className:q,mode:r}){let[s,t]=c.useState(!1),[u,v]=c.useState([]),[w,x]=c.useState(!0),[y,z]=c.useState(a),[A,B]=c.useState(n),[C,D]=c.useState(null),[E,F]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,g.getAllAgentModels)().then(v).finally(()=>x(!1))},[]),c.useEffect(()=>{if(!s){let a=setTimeout(()=>{F(0),H(null)},150);return()=>clearTimeout(a)}},[s]);let I=async(a,b)=>{if(t(!1),a!==y||b!==A){if("override"===r){z(a),B(b),o?.(a,b);return}z(a),B(b),o?.(a,b),D(null);try{let c=await (0,h.updateAgentAndModel)(a,b||null);c.ok||(z(y),B(A),o?.(y,A),D(c.error??"Failed to save"))}catch{z(y),B(A),o?.(y,A),D("Failed to save")}}},J=(0,i.getAgentTypeIcon)(y),K=u.find(a=>a.agentType===y)?.label??y,L=A?(0,j.getModelMeta)(A).displayName||A:null,M=G?u.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,m.cn)("flex flex-col gap-1",q),children:[(0,b.jsxs)(l.Popover,{open:s,onOpenChange:t,children:[(0,b.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(k.Button,{variant:"outline",role:"combobox","aria-expanded":s,disabled:(p??!1)||w,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"}),w?"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)(l.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===E?"-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"}),u.map(a=>{let c=(0,i.getAgentTypeIcon)(a.agentType),e=y===a.agentType,g=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,m.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",e&&"bg-accent/50"),onClick:()=>{g?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(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}),e&&!g?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,g?(0,b.jsx)(f.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:()=>{F(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(e.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=y===M.agentType&&A===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,m.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)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!C&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:C})]})}a.s(["AgentModelPicker",()=>n])}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_components_de814675._.js.map