@shepai/cli 1.123.0 → 1.124.0

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 (135) hide show
  1. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  2. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +14 -6
  3. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +1 -0
  4. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
  5. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +16 -0
  6. package/dist/tsconfig.build.tsbuildinfo +1 -1
  7. package/package.json +1 -1
  8. package/web/.next/BUILD_ID +1 -1
  9. package/web/.next/build-manifest.json +2 -2
  10. package/web/.next/fallback-build-manifest.json +2 -2
  11. package/web/.next/prerender-manifest.json +3 -3
  12. package/web/.next/required-server-files.js +2 -2
  13. package/web/.next/required-server-files.json +2 -2
  14. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  15. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  17. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  24. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  25. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  26. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  27. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  28. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  29. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  30. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  33. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  36. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  37. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  38. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  39. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  40. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/_global-error.html +2 -2
  42. package/web/.next/server/app/_global-error.rsc +1 -1
  43. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  44. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  45. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  46. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  47. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  48. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  49. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  50. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  51. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  52. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  54. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  56. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  58. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  60. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  61. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  62. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  63. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  64. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  65. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  66. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js +2 -2
  68. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
  69. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
  70. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  71. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  72. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  73. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  74. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js +1 -1
  75. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js.map +1 -1
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -1
  84. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +1 -1
  85. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  87. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  89. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  90. package/web/.next/server/chunks/ssr/_b89059c0._.js +3 -0
  91. package/web/.next/server/chunks/ssr/{_fd4c574b._.js.map → _b89059c0._.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/_e9703421._.js +1 -1
  95. package/web/.next/server/chunks/ssr/_e9703421._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/{_960ceb5d._.js → _f84c16ab._.js} +2 -2
  97. package/web/.next/server/chunks/ssr/{_960ceb5d._.js.map → _f84c16ab._.js.map} +1 -1
  98. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  99. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/src_presentation_web_164fa933._.js +3 -0
  101. package/web/.next/server/chunks/ssr/{src_presentation_web_db779ef4._.js.map → src_presentation_web_164fa933._.js.map} +1 -1
  102. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  103. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  105. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  107. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  109. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  111. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  113. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  115. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  117. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  118. package/web/.next/server/pages/500.html +2 -2
  119. package/web/.next/server/server-reference-manifest.js +1 -1
  120. package/web/.next/server/server-reference-manifest.json +34 -34
  121. package/web/.next/static/chunks/{3f6c44cbad751310.js → 0dc102ef519487f5.js} +1 -1
  122. package/web/.next/static/chunks/{9821072252ddb89a.js → 10fc8c2e5ff44bb2.js} +1 -1
  123. package/web/.next/static/chunks/{310be54600c8ce20.js → 5b7726ff31c25338.js} +2 -2
  124. package/web/.next/static/chunks/{878643f90bc6360f.js → 74fa59dbd04fdfcb.js} +2 -2
  125. package/web/.next/static/chunks/{f0dfeedb263eb906.js → 76c038a9d55ca717.js} +1 -1
  126. package/web/.next/static/chunks/{64d063449c3be0ec.js → 9d7e0bb6dc2f88ae.js} +1 -1
  127. package/web/.next/static/chunks/{94af5be1ccf8842e.js → 9db7f24ddea15a4c.js} +1 -1
  128. package/web/.next/static/chunks/{e418898e8e02f50a.js → ad076c0b68dd9971.js} +1 -1
  129. package/web/.next/static/chunks/{694718e5449b3150.js → d72044b2826292fe.js} +1 -1
  130. package/web/.next/static/chunks/{373e10090c6410c4.js → eaeabda870a35a9a.js} +1 -1
  131. package/web/.next/server/chunks/ssr/_fd4c574b._.js +0 -3
  132. package/web/.next/server/chunks/ssr/src_presentation_web_db779ef4._.js +0 -3
  133. /package/web/.next/static/{gBTe97SiNDA2hbG9dbfpb → Ap_0BUaFHzD8WxrlWsbMg}/_buildManifest.js +0 -0
  134. /package/web/.next/static/{gBTe97SiNDA2hbG9dbfpb → Ap_0BUaFHzD8WxrlWsbMg}/_clientMiddlewareManifest.json +0 -0
  135. /package/web/.next/static/{gBTe97SiNDA2hbG9dbfpb → Ap_0BUaFHzD8WxrlWsbMg}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[38702,16223,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}a.s(["EmptyState",()=>d],16223),a.s([],38702)},76072,582,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],76072);let d=(0,b.createServerReference)("605ecbde7dd00ad406a43c24e8c27ffe541197a961",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],582)},52319,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("403efbed2f4429cd3188122115f3bc07f940095818",b.callServer,void 0,b.findSourceMapURL,"addRepository");a.s(["addRepository",()=>c])},55628,a=>{"use strict";var b=a.i(96960),c=a.i(10764),d=a.i(35479),e=a.i(40581);function f(a){let[f,g]=(0,b.useState)(!1),[h,i]=(0,b.useState)(!1),[j,k]=(0,b.useState)(!1),[l,m]=(0,b.useState)(null),[n,o]=(0,b.useState)(null),[p,q]=(0,b.useState)(null),r=(0,b.useRef)(null),s=(0,b.useRef)(null),t=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),s.current&&clearTimeout(s.current),t.current&&clearTimeout(t.current)},[]);let u=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>u(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),g,m,r,f),[u,f,a]),openInShell:(0,b.useCallback)(()=>u(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),i,o,s,h),[u,h,a]),openFolder:(0,b.useCallback)(()=>u(()=>(0,e.openFolder)(a.repositoryPath),k,q,t,j),[u,j,a]),ideLoading:f,shellLoading:h,folderLoading:j,ideError:l,shellError:n,folderError:p}}a.s(["useRepositoryActions",()=>f])}];
2
+
3
+ //# sourceMappingURL=src_presentation_web_164fa933._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/components/common/empty-state/empty-state.tsx","../../../../../../../src/presentation/web/app/actions/data%3A73b891%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A39bc1b%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A351005%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/repository-node/use-repository-actions.ts"],"sourcesContent":["import type { ReactNode, HTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n ...props\n}: EmptyStateProps) {\n return (\n <div\n className={cn('flex flex-col items-center gap-4 px-4 py-12 text-center', className)}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {description ? <p className=\"text-muted-foreground max-w-md text-sm\">{description}</p> : null}\n {action ? <div className=\"mt-2\">{action}</div> : null}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"0042a3af29ce2e8895853217dfb05bc5d8e3af35d4\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0042a3af29ce2e8895853217dfb05bc5d8e3af35d4\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","/* __next_internal_action_entry_do_not_use__ [{\"40841626f89a4207ce07b5c0b52eb9ea583ab684a3\":\"addRepository\"},\"src/presentation/web/app/actions/add-repository.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40841626f89a4207ce07b5c0b52eb9ea583ab684a3\",callServer,void 0,findSourceMapURL,\"addRepository\");export{$$RSC_SERVER_ACTION_0 as addRepository};","'use client';\n\nimport { useState, useCallback, useRef, useEffect } from 'react';\nimport { openIde } from '@/app/actions/open-ide';\nimport { openShell } from '@/app/actions/open-shell';\nimport { openFolder } from '@/app/actions/open-folder';\n\nexport interface RepositoryActionsInput {\n repositoryPath: string;\n}\n\nexport interface RepositoryActionsState {\n openInIde: () => Promise<void>;\n openInShell: () => Promise<void>;\n openFolder: () => Promise<void>;\n ideLoading: boolean;\n shellLoading: boolean;\n folderLoading: boolean;\n ideError: string | null;\n shellError: string | null;\n folderError: string | null;\n}\n\nconst ERROR_CLEAR_DELAY = 5000;\n\nexport function useRepositoryActions(input: RepositoryActionsInput | null): RepositoryActionsState {\n const [ideLoading, setIdeLoading] = useState(false);\n const [shellLoading, setShellLoading] = useState(false);\n const [folderLoading, setFolderLoading] = useState(false);\n const [ideError, setIdeError] = useState<string | null>(null);\n const [shellError, setShellError] = useState<string | null>(null);\n const [folderError, setFolderError] = useState<string | null>(null);\n\n const ideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const shellTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const folderTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Clear timers on unmount\n useEffect(() => {\n const ideRef = ideTimerRef;\n const shellRef = shellTimerRef;\n const folderRef = folderTimerRef;\n return () => {\n if (ideRef.current) clearTimeout(ideRef.current);\n if (shellRef.current) clearTimeout(shellRef.current);\n if (folderRef.current) clearTimeout(folderRef.current);\n };\n }, []);\n\n const performAction = useCallback(\n async (\n action: () => Promise<{ success: boolean; error?: string }>,\n setLoading: (v: boolean) => void,\n setError: (v: string | null) => void,\n timerRef: React.RefObject<ReturnType<typeof setTimeout> | null>,\n isLoading: boolean\n ) => {\n if (!input || isLoading) return;\n\n if (timerRef.current) clearTimeout(timerRef.current);\n\n setLoading(true);\n setError(null);\n\n try {\n const result = await action();\n\n if (!result.success) {\n const errorMessage = result.error ?? 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n }\n } catch (err: unknown) {\n const errorMessage = err instanceof Error ? err.message : 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n } finally {\n setLoading(false);\n }\n },\n [input]\n );\n\n const handleOpenIde = useCallback(\n () =>\n performAction(\n () => openIde({ repositoryPath: input!.repositoryPath }),\n setIdeLoading,\n setIdeError,\n ideTimerRef,\n ideLoading\n ),\n [performAction, ideLoading, input]\n );\n\n const handleOpenShell = useCallback(\n () =>\n performAction(\n () => openShell({ repositoryPath: input!.repositoryPath }),\n setShellLoading,\n setShellError,\n shellTimerRef,\n shellLoading\n ),\n [performAction, shellLoading, input]\n );\n\n const handleOpenFolder = useCallback(\n () =>\n performAction(\n () => openFolder(input!.repositoryPath),\n setFolderLoading,\n setFolderError,\n folderTimerRef,\n folderLoading\n ),\n [performAction, folderLoading, input]\n );\n\n return {\n openInIde: handleOpenIde,\n openInShell: handleOpenShell,\n openFolder: handleOpenFolder,\n ideLoading,\n shellLoading,\n folderLoading,\n ideError,\n shellError,\n folderError,\n };\n}\n"],"names":[],"mappings":"8DACA,EAAA,EAAA,CAAA,CAAA,OASO,SAAS,EAAW,MACzB,CAAI,OACJ,CAAK,aACL,CAAW,QACX,CAAM,WACN,CAAS,CACT,GAAG,EACa,EAChB,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CACC,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAAC,0DAA2D,GACxE,GAAG,CAAK,WAER,EAAO,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,iCAAyB,IAAc,KAC9D,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,iCAAyB,IACtC,EAAc,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,kDAA0C,IAAmB,KACxF,EAAS,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,gBAAQ,IAAgB,OAGvD,6EC7BkN,IAAA,EAAA,EAAA,CAAA,CAAA,OAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,4DCA3I,IAAM,E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L,IAAM,EAAgB,CAAA,EAAA,EAAA,WAAW,AAAX,EACpB,MACE,EACA,EACA,EACA,EACA,KAEA,GAAI,AAAC,IAAS,GAEV,EAAS,MAFY,CAEL,EAAE,aAAa,EAAS,OAAO,EAEnD,GAAW,GACX,EAAS,MAET,GAAI,CACF,IAAM,EAAS,MAAM,IAErB,GAAI,CAAC,EAAO,OAAO,CAAE,CACnB,IAAM,EAAe,EAAO,KAAK,EAAI,+BACrC,EAAS,GACT,EAAS,OAAO,CAAG,WAAW,IAAM,EAAS,OAAO,GACtD,CACF,CAAE,MAAO,EAAc,CAErB,EADqB,OACZ,MAD2B,MAAQ,EAAI,OAAO,CAAG,gCAE1D,EAAS,OAAO,CAAG,WAAW,IAAM,EAAS,MApD3B,CAoDkC,GACtD,QAAU,CACR,GAAW,EACb,EACF,EACA,CAAC,EAAM,EAuCT,MAAO,CACL,UArCoB,CAAA,AAqCT,EArCS,EAAA,WAAA,AAAW,EAC/B,IACE,EACE,IAAM,CAAA,EAAA,EAAA,OAAA,AAAO,EAAC,CAAE,eAAgB,EAAO,cAAc,AAAC,GACtD,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAY,EAAM,EA6BlC,YA1BsB,CAAA,AA0BT,EA1BS,EAAA,WAAA,AAAW,EACjC,IACE,EACE,IAAM,CAAA,EAAA,EAAA,SAAA,AAAS,EAAC,CAAE,eAAgB,EAAO,cAAc,AAAC,GACxD,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAc,EAAM,EAkBpC,WAfuB,CAAA,AAeX,EAfW,EAAA,WAAA,AAAW,EAClC,IACE,EACE,IAAM,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,EAAO,cAAc,EACtC,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAe,EAAM,aAOrC,eACA,gBACA,EACA,sBACA,cACA,CACF,CACF"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/components/common/empty-state/empty-state.tsx","../../../../../../../src/presentation/web/app/actions/data%3Ac9098e%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Aa21f07%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A772391%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/repository-node/use-repository-actions.ts"],"sourcesContent":["import type { ReactNode, HTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n ...props\n}: EmptyStateProps) {\n return (\n <div\n className={cn('flex flex-col items-center gap-4 px-4 py-12 text-center', className)}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {description ? <p className=\"text-muted-foreground max-w-md text-sm\">{description}</p> : null}\n {action ? <div className=\"mt-2\">{action}</div> : null}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"605ecbde7dd00ad406a43c24e8c27ffe541197a961\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"605ecbde7dd00ad406a43c24e8c27ffe541197a961\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","/* __next_internal_action_entry_do_not_use__ [{\"403efbed2f4429cd3188122115f3bc07f940095818\":\"addRepository\"},\"src/presentation/web/app/actions/add-repository.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"403efbed2f4429cd3188122115f3bc07f940095818\",callServer,void 0,findSourceMapURL,\"addRepository\");export{$$RSC_SERVER_ACTION_0 as addRepository};","'use client';\n\nimport { useState, useCallback, useRef, useEffect } from 'react';\nimport { openIde } from '@/app/actions/open-ide';\nimport { openShell } from '@/app/actions/open-shell';\nimport { openFolder } from '@/app/actions/open-folder';\n\nexport interface RepositoryActionsInput {\n repositoryPath: string;\n}\n\nexport interface RepositoryActionsState {\n openInIde: () => Promise<void>;\n openInShell: () => Promise<void>;\n openFolder: () => Promise<void>;\n ideLoading: boolean;\n shellLoading: boolean;\n folderLoading: boolean;\n ideError: string | null;\n shellError: string | null;\n folderError: string | null;\n}\n\nconst ERROR_CLEAR_DELAY = 5000;\n\nexport function useRepositoryActions(input: RepositoryActionsInput | null): RepositoryActionsState {\n const [ideLoading, setIdeLoading] = useState(false);\n const [shellLoading, setShellLoading] = useState(false);\n const [folderLoading, setFolderLoading] = useState(false);\n const [ideError, setIdeError] = useState<string | null>(null);\n const [shellError, setShellError] = useState<string | null>(null);\n const [folderError, setFolderError] = useState<string | null>(null);\n\n const ideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const shellTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const folderTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Clear timers on unmount\n useEffect(() => {\n const ideRef = ideTimerRef;\n const shellRef = shellTimerRef;\n const folderRef = folderTimerRef;\n return () => {\n if (ideRef.current) clearTimeout(ideRef.current);\n if (shellRef.current) clearTimeout(shellRef.current);\n if (folderRef.current) clearTimeout(folderRef.current);\n };\n }, []);\n\n const performAction = useCallback(\n async (\n action: () => Promise<{ success: boolean; error?: string }>,\n setLoading: (v: boolean) => void,\n setError: (v: string | null) => void,\n timerRef: React.RefObject<ReturnType<typeof setTimeout> | null>,\n isLoading: boolean\n ) => {\n if (!input || isLoading) return;\n\n if (timerRef.current) clearTimeout(timerRef.current);\n\n setLoading(true);\n setError(null);\n\n try {\n const result = await action();\n\n if (!result.success) {\n const errorMessage = result.error ?? 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n }\n } catch (err: unknown) {\n const errorMessage = err instanceof Error ? err.message : 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n } finally {\n setLoading(false);\n }\n },\n [input]\n );\n\n const handleOpenIde = useCallback(\n () =>\n performAction(\n () => openIde({ repositoryPath: input!.repositoryPath }),\n setIdeLoading,\n setIdeError,\n ideTimerRef,\n ideLoading\n ),\n [performAction, ideLoading, input]\n );\n\n const handleOpenShell = useCallback(\n () =>\n performAction(\n () => openShell({ repositoryPath: input!.repositoryPath }),\n setShellLoading,\n setShellError,\n shellTimerRef,\n shellLoading\n ),\n [performAction, shellLoading, input]\n );\n\n const handleOpenFolder = useCallback(\n () =>\n performAction(\n () => openFolder(input!.repositoryPath),\n setFolderLoading,\n setFolderError,\n folderTimerRef,\n folderLoading\n ),\n [performAction, folderLoading, input]\n );\n\n return {\n openInIde: handleOpenIde,\n openInShell: handleOpenShell,\n openFolder: handleOpenFolder,\n ideLoading,\n shellLoading,\n folderLoading,\n ideError,\n shellError,\n folderError,\n };\n}\n"],"names":[],"mappings":"8DACA,EAAA,EAAA,CAAA,CAAA,OASO,SAAS,EAAW,MACzB,CAAI,OACJ,CAAK,aACL,CAAW,QACX,CAAM,WACN,CAAS,CACT,GAAG,EACa,EAChB,MACE,CAAA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AC,CAAE,eAAgB,EAAO,cAAc,AAAC,GACtD,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAY,EAAM,EA6BlC,YA1BsB,CAAA,AA0BT,EA1BS,EAAA,WAAA,AAAW,EACjC,IACE,EACE,IAAM,CAAA,EAAA,EAAA,SAAA,AAAS,EAAC,CAAE,eAAgB,EAAO,cAAc,AAAC,GACxD,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAc,EAAM,EAkBpC,WAfuB,CAAA,AAeX,EAfW,EAAA,WAAA,AAAW,EAClC,IACE,EACE,IAAM,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,EAAO,cAAc,EACtC,EACA,EACA,EACA,GAEJ,CAAC,EAAe,EAAe,EAAM,aAOrC,eACA,gBACA,EACA,sBACA,cACA,CACF,CACF"}
@@ -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,ciWatchEnabled:a.ciWatchEnabled,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00b045bbbbc13856cc8bd8ec39a101ba5b826386aa",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,pending:l,agentType:m,model:n}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let o=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,ciWatchEnabled:a.ciWatchEnabled,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38",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,pending:l,agentType:m,model:n}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let o=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),p={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:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{}});return a.initializeAndSpawn(e,{userInput:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{},...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,"4075a082db11244f324640576b2dbf0f92c9cef9a5",null),a.s(["createFeature",()=>d],77605)},78575,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207),v=a.i(24860),w=a.i(77605);a.s([],59050),a.i(59050),a.s(["002c6aebad1ac1f1c3eea2412064ca5e24ef030eec",()=>k.isAgentSetupComplete,"00325058d83d8caaa34793b3df8e89e120cac79927",()=>b.pickFolder,"0042a3af29ce2e8895853217dfb05bc5d8e3af35d4",()=>m.getAllAgentModels,"00b045bbbbc13856cc8bd8ec39a101ba5b826386aa",()=>v.getWorkflowDefaults,"00f0701ccfd669dad18ef4568f7ae8948573002acf",()=>l.checkAgentAuth,"401be3f4bc768244687f3e4a196719b52490bb9345",()=>f.stopDeployment,"401fc119b2405e2b4547298765e0b53e1dbe9ed8d5",()=>h.openIde,"402c8dc6f411de40af72d880fbd869f2246fe52fae",()=>c.getDeploymentLogs,"4032193b3cb6ebe17532f513a3a7813fa576e646cd",()=>u.getFeatureMetadata,"4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4",()=>d.deployFeature,"405b8db039e5aee9915a668bbc40b4fb34fa0e9a95",()=>i.openShell,"406668da49834ee1fcac3357deed824609de254299",()=>r.stopFeature,"4075a082db11244f324640576b2dbf0f92c9cef9a5",()=>w.createFeature,"40841626f89a4207ce07b5c0b52eb9ea583ab684a3",()=>s.addRepository,"409f483ad0234c955ff4c43593b81cb0d24ebb3714",()=>j.openFolder,"40ba702db3985a3994b8efed5599b66d2cd4d7d179",()=>p.resumeFeature,"40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8",()=>t.deleteRepository,"40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00",()=>g.getDeploymentStatus,"40f3a80c3fb362bcc5ad31504777ac20b19ae98651",()=>q.startFeature,"40f45389124f2a2d0af12f9f62f65a88398143bd8f",()=>e.deployRepository,"608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc",()=>n.updateAgentAndModel,"70b39e022705ab7f7857c3767a2677721fc3d0fb4e",()=>o.deleteFeature],78575)}];
3
+ ${c}`}(b,e),p={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:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{}});return a.initializeAndSpawn(e,{userInput:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{},...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,"402c6eebcee9191f10700c4a1b10e4c085abc4e1b5",null),a.s(["createFeature",()=>d],77605)},78575,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207),v=a.i(24860),w=a.i(77605);a.s([],59050),a.i(59050),a.s(["00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2",()=>m.getAllAgentModels,"004709c522bee7678d429bd4accbfa0c686e0c5f6c",()=>b.pickFolder,"0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e",()=>l.checkAgentAuth,"0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38",()=>v.getWorkflowDefaults,"00e69fe522c390953dd8a17596af109ff192e5ad43",()=>k.isAgentSetupComplete,"400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff",()=>j.openFolder,"4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c",()=>i.openShell,"4026ac3cbd83504185d8db7bb26654f6b49b934b6f",()=>r.stopFeature,"402c6eebcee9191f10700c4a1b10e4c085abc4e1b5",()=>w.createFeature,"402d4104ec421d10ba7535015df07be0ad91affd73",()=>f.stopDeployment,"403efbed2f4429cd3188122115f3bc07f940095818",()=>s.addRepository,"4048157fdf7fdc56295539dab888209fe94e763c34",()=>g.getDeploymentStatus,"405a07cb86b599ff39a8711c89f361419ddb31dc10",()=>c.getDeploymentLogs,"407ee2689a32406de4f6668d53210ac6ed7737fe81",()=>d.deployFeature,"407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9",()=>q.startFeature,"408650cfef71246260ca078a892eaa9fa89a3c4612",()=>h.openIde,"408d3a2545d01cd068a93f0d30d2fec44efcfedadc",()=>u.getFeatureMetadata,"40a7221f25d01f099a68fd5bf7a222ddabaf427b0a",()=>e.deployRepository,"40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a",()=>p.resumeFeature,"40d979b3f29add5f3af9a210be7e90d43b6593cef4",()=>t.deleteRepository,"605ecbde7dd00ad406a43c24e8c27ffe541197a961",()=>n.updateAgentAndModel,"7021304b8effc3ade99767a20cbfdea2ac1e0266f9",()=>o.deleteFeature],78575)}];
4
4
 
5
5
  //# sourceMappingURL=src_presentation_web_5f039db1._.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 ciWatchEnabled: 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 ciWatchEnabled: workflow.ciWatchEnabled,\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 /** When true, create the feature in pending state (no agent spawned). */\n pending?: 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 pending,\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 ...(pending ? { pending } : {}),\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 ...(pending ? { pending } : {}),\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 '00325058d83d8caaa34793b3df8e89e120cac79927'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '402c8dc6f411de40af72d880fbd869f2246fe52fae'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40f45389124f2a2d0af12f9f62f65a88398143bd8f'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '401be3f4bc768244687f3e4a196719b52490bb9345'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00'} from 'ACTIONS_MODULE5'\nexport {openIde as '401fc119b2405e2b4547298765e0b53e1dbe9ed8d5'} from 'ACTIONS_MODULE6'\nexport {openShell as '405b8db039e5aee9915a668bbc40b4fb34fa0e9a95'} from 'ACTIONS_MODULE7'\nexport {openFolder as '409f483ad0234c955ff4c43593b81cb0d24ebb3714'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '002c6aebad1ac1f1c3eea2412064ca5e24ef030eec'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f0701ccfd669dad18ef4568f7ae8948573002acf'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '0042a3af29ce2e8895853217dfb05bc5d8e3af35d4'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '70b39e022705ab7f7857c3767a2677721fc3d0fb4e'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40ba702db3985a3994b8efed5599b66d2cd4d7d179'} from 'ACTIONS_MODULE14'\nexport {startFeature as '40f3a80c3fb362bcc5ad31504777ac20b19ae98651'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '406668da49834ee1fcac3357deed824609de254299'} from 'ACTIONS_MODULE16'\nexport {addRepository as '40841626f89a4207ce07b5c0b52eb9ea583ab684a3'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '4032193b3cb6ebe17532f513a3a7813fa576e646cd'} from 'ACTIONS_MODULE19'\nexport {getWorkflowDefaults as '00b045bbbbc13856cc8bd8ec39a101ba5b826386aa'} from 'ACTIONS_MODULE20'\nexport {createFeature as '4075a082db11244f324640576b2dbf0f92c9cef9a5'} from 'ACTIONS_MODULE21'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAeO,eAAe,IAEpB,GAAM,UAAE,CAAQ,CAAE,CADD,CAAA,CACI,CADJ,EAAA,WAAA,AAAW,IAG5B,MAAO,CACL,cAAe,CACb,SAAU,EAAS,oBAAoB,CAAC,QAAQ,CAChD,UAAW,EAAS,oBAAoB,CAAC,SAAS,CAClD,WAAY,EAAS,oBAAoB,CAAC,UAAU,AACtD,EACA,KAAM,EAAS,oBAAoB,CAAC,4BAA4B,CAChE,OAAQ,EAAS,8BAA8B,CAC/C,eAAgB,EAAS,cAAc,CACvC,eAAgB,EAAS,cAAc,CACvC,eAAgB,EAAS,cAAc,AACzC,CACF,0CAhBsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,kFCftB,EAAA,EAAA,CAAA,CAAA,OAuCO,eAAe,EACpB,CAAyB,EAEzB,GAAM,aACJ,CAAW,gBACX,CAAc,aACd,CAAW,WACX,CAAS,CACT,eAAa,MACb,CAAI,CACJ,QAAM,UACN,CAAQ,MACR,CAAI,SACJ,CAAO,WACP,CAAS,CACT,OAAK,CACN,CAAG,EAEJ,GAAI,CAAC,GAAa,OAChB,CADwB,KACjB,CAAE,MAAO,yBAA0B,EAG5C,GAAI,CAAC,GAAgB,OACnB,CAD2B,KACpB,CAAE,MAAO,4BAA6B,EAG/C,IAAM,EAAY,AC9Db,SAAS,AACd,CAAmB,CACnB,CAAqC,EAErC,GAAI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AK,CAAC,6CAA8C,EAC9D,GAEK,SAAE,CAAQ,CACnB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,0BACjC,CAC1B,CACF,0CAjFsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,iEEzCtB,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,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/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 ciWatchEnabled: 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 ciWatchEnabled: workflow.ciWatchEnabled,\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 /** When true, create the feature in pending state (no agent spawned). */\n pending?: 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 pending,\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 ...(pending ? { pending } : {}),\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 ...(pending ? { pending } : {}),\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 '004709c522bee7678d429bd4accbfa0c686e0c5f6c'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '405a07cb86b599ff39a8711c89f361419ddb31dc10'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '407ee2689a32406de4f6668d53210ac6ed7737fe81'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40a7221f25d01f099a68fd5bf7a222ddabaf427b0a'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402d4104ec421d10ba7535015df07be0ad91affd73'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '4048157fdf7fdc56295539dab888209fe94e763c34'} from 'ACTIONS_MODULE5'\nexport {openIde as '408650cfef71246260ca078a892eaa9fa89a3c4612'} from 'ACTIONS_MODULE6'\nexport {openShell as '4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00e69fe522c390953dd8a17596af109ff192e5ad43'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605ecbde7dd00ad406a43c24e8c27ffe541197a961'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '7021304b8effc3ade99767a20cbfdea2ac1e0266f9'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a'} from 'ACTIONS_MODULE14'\nexport {startFeature as '407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '4026ac3cbd83504185d8db7bb26654f6b49b934b6f'} from 'ACTIONS_MODULE16'\nexport {addRepository as '403efbed2f4429cd3188122115f3bc07f940095818'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d979b3f29add5f3af9a210be7e90d43b6593cef4'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '408d3a2545d01cd068a93f0d30d2fec44efcfedadc'} from 'ACTIONS_MODULE19'\nexport {getWorkflowDefaults as '0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38'} from 'ACTIONS_MODULE20'\nexport {createFeature as '402c6eebcee9191f10700c4a1b10e4c085abc4e1b5'} from 'ACTIONS_MODULE21'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAeO,eAAe,IAEpB,GAAM,UAAE,CAAQ,CAAE,CADD,CAAA,CACI,CADJ,EAAA,WAAA,AAAW,IAG5B,MAAO,CACL,cAAe,CACb,SAAU,EAAS,oBAAoB,CAAC,QAAQ,CAChD,UAAW,EAAS,oBAAoB,CAAC,SAAS,CAClD,WAAY,EAAS,oBAAoB,CAAC,UAAU,AACtD,EACA,KAAM,EAAS,oBAAoB,CAAC,4BAA4B,CAChE,OAAQ,EAAS,8BAA8B,CAC/C,eAAgB,EAAS,cAAc,CACvC,eAAgB,EAAS,cAAc,CACvC,eAAgB,EAAS,cAAc,AACzC,CACF,0CAhBsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,kFCftB,EAAA,EAAA,CAAA,CAAA,OAuCO,eAAe,EACpB,CAAyB,EAEzB,GAAM,aACJ,CAAW,gBACX,CAAc,aACd,CAAW,WACX,CAAS,CACT,eAAa,MACb,CAAI,CACJ,QAAM,UACN,CAAQ,MACR,CAAI,SACJ,CAAO,WACP,CAAS,CACT,OAAK,CACN,CAAG,EAEJ,GAAI,CAAC,GAAa,OAChB,CADwB,KACjB,CAAE,MAAO,yBAA0B,EAG5C,GAAI,CAAC,GAAgB,OACnB,CAD2B,KACpB,CAAE,MAAO,4BAA6B,EAG/C,IAAM,EAAY,AC9Db,SAAS,AACd,CAAmB,CACnB,CAAqC,EAErC,GAAI,CAAC,GAAsC,GAAG,CAA1B,EAAY,MAAM,CACpC,OAAO,EAGT,IAAM,EAAO,EAAY,GAAG,CAAC,AAAC,GAAM,CAAC,CAAC,EAAE,EAAE,IAAI,CAAA,CAAE,EAAE,IAAI,CAAC,KACvD,MAAO,CAAA,EAAG,YA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AA,EAAA,EAAA,6CAAA,iEEzCtB,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,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=[21755,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207);a.s([],69324),a.i(69324),a.s(["002c6aebad1ac1f1c3eea2412064ca5e24ef030eec",()=>k.isAgentSetupComplete,"00325058d83d8caaa34793b3df8e89e120cac79927",()=>b.pickFolder,"0042a3af29ce2e8895853217dfb05bc5d8e3af35d4",()=>m.getAllAgentModels,"00f0701ccfd669dad18ef4568f7ae8948573002acf",()=>l.checkAgentAuth,"401be3f4bc768244687f3e4a196719b52490bb9345",()=>f.stopDeployment,"401fc119b2405e2b4547298765e0b53e1dbe9ed8d5",()=>h.openIde,"402c8dc6f411de40af72d880fbd869f2246fe52fae",()=>c.getDeploymentLogs,"4032193b3cb6ebe17532f513a3a7813fa576e646cd",()=>u.getFeatureMetadata,"4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4",()=>d.deployFeature,"405b8db039e5aee9915a668bbc40b4fb34fa0e9a95",()=>i.openShell,"406668da49834ee1fcac3357deed824609de254299",()=>r.stopFeature,"40841626f89a4207ce07b5c0b52eb9ea583ab684a3",()=>s.addRepository,"409f483ad0234c955ff4c43593b81cb0d24ebb3714",()=>j.openFolder,"40ba702db3985a3994b8efed5599b66d2cd4d7d179",()=>p.resumeFeature,"40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8",()=>t.deleteRepository,"40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00",()=>g.getDeploymentStatus,"40f3a80c3fb362bcc5ad31504777ac20b19ae98651",()=>q.startFeature,"40f45389124f2a2d0af12f9f62f65a88398143bd8f",()=>e.deployRepository,"608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc",()=>n.updateAgentAndModel,"70b39e022705ab7f7857c3767a2677721fc3d0fb4e",()=>o.deleteFeature],21755)}];
1
+ module.exports=[21755,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207);a.s([],69324),a.i(69324),a.s(["00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2",()=>m.getAllAgentModels,"004709c522bee7678d429bd4accbfa0c686e0c5f6c",()=>b.pickFolder,"0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e",()=>l.checkAgentAuth,"00e69fe522c390953dd8a17596af109ff192e5ad43",()=>k.isAgentSetupComplete,"400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff",()=>j.openFolder,"4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c",()=>i.openShell,"4026ac3cbd83504185d8db7bb26654f6b49b934b6f",()=>r.stopFeature,"402d4104ec421d10ba7535015df07be0ad91affd73",()=>f.stopDeployment,"403efbed2f4429cd3188122115f3bc07f940095818",()=>s.addRepository,"4048157fdf7fdc56295539dab888209fe94e763c34",()=>g.getDeploymentStatus,"405a07cb86b599ff39a8711c89f361419ddb31dc10",()=>c.getDeploymentLogs,"407ee2689a32406de4f6668d53210ac6ed7737fe81",()=>d.deployFeature,"407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9",()=>q.startFeature,"408650cfef71246260ca078a892eaa9fa89a3c4612",()=>h.openIde,"408d3a2545d01cd068a93f0d30d2fec44efcfedadc",()=>u.getFeatureMetadata,"40a7221f25d01f099a68fd5bf7a222ddabaf427b0a",()=>e.deployRepository,"40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a",()=>p.resumeFeature,"40d979b3f29add5f3af9a210be7e90d43b6593cef4",()=>t.deleteRepository,"605ecbde7dd00ad406a43c24e8c27ffe541197a961",()=>n.updateAgentAndModel,"7021304b8effc3ade99767a20cbfdea2ac1e0266f9",()=>o.deleteFeature],21755)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_%28dashboard%29_page_actions_2a52b697.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 '00325058d83d8caaa34793b3df8e89e120cac79927'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '402c8dc6f411de40af72d880fbd869f2246fe52fae'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40f45389124f2a2d0af12f9f62f65a88398143bd8f'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '401be3f4bc768244687f3e4a196719b52490bb9345'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00'} from 'ACTIONS_MODULE5'\nexport {openIde as '401fc119b2405e2b4547298765e0b53e1dbe9ed8d5'} from 'ACTIONS_MODULE6'\nexport {openShell as '405b8db039e5aee9915a668bbc40b4fb34fa0e9a95'} from 'ACTIONS_MODULE7'\nexport {openFolder as '409f483ad0234c955ff4c43593b81cb0d24ebb3714'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '002c6aebad1ac1f1c3eea2412064ca5e24ef030eec'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f0701ccfd669dad18ef4568f7ae8948573002acf'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '0042a3af29ce2e8895853217dfb05bc5d8e3af35d4'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '70b39e022705ab7f7857c3767a2677721fc3d0fb4e'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40ba702db3985a3994b8efed5599b66d2cd4d7d179'} from 'ACTIONS_MODULE14'\nexport {startFeature as '40f3a80c3fb362bcc5ad31504777ac20b19ae98651'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '406668da49834ee1fcac3357deed824609de254299'} from 'ACTIONS_MODULE16'\nexport {addRepository as '40841626f89a4207ce07b5c0b52eb9ea583ab684a3'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '4032193b3cb6ebe17532f513a3a7813fa576e646cd'} from 'ACTIONS_MODULE19'\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,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 '004709c522bee7678d429bd4accbfa0c686e0c5f6c'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '405a07cb86b599ff39a8711c89f361419ddb31dc10'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '407ee2689a32406de4f6668d53210ac6ed7737fe81'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40a7221f25d01f099a68fd5bf7a222ddabaf427b0a'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402d4104ec421d10ba7535015df07be0ad91affd73'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '4048157fdf7fdc56295539dab888209fe94e763c34'} from 'ACTIONS_MODULE5'\nexport {openIde as '408650cfef71246260ca078a892eaa9fa89a3c4612'} from 'ACTIONS_MODULE6'\nexport {openShell as '4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00e69fe522c390953dd8a17596af109ff192e5ad43'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605ecbde7dd00ad406a43c24e8c27ffe541197a961'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '7021304b8effc3ade99767a20cbfdea2ac1e0266f9'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a'} from 'ACTIONS_MODULE14'\nexport {startFeature as '407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '4026ac3cbd83504185d8db7bb26654f6b49b934b6f'} from 'ACTIONS_MODULE16'\nexport {addRepository as '403efbed2f4429cd3188122115f3bc07f940095818'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d979b3f29add5f3af9a210be7e90d43b6593cef4'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '408d3a2545d01cd068a93f0d30d2fec44efcfedadc'} from 'ACTIONS_MODULE19'\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,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(["00325058d83d8caaa34793b3df8e89e120cac79927",()=>b.pickFolder,"401be3f4bc768244687f3e4a196719b52490bb9345",()=>f.stopDeployment,"402c8dc6f411de40af72d880fbd869f2246fe52fae",()=>c.getDeploymentLogs,"4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4",()=>d.deployFeature,"40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00",()=>g.getDeploymentStatus,"40f45389124f2a2d0af12f9f62f65a88398143bd8f",()=>e.deployRepository],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(["004709c522bee7678d429bd4accbfa0c686e0c5f6c",()=>b.pickFolder,"402d4104ec421d10ba7535015df07be0ad91affd73",()=>f.stopDeployment,"4048157fdf7fdc56295539dab888209fe94e763c34",()=>g.getDeploymentStatus,"405a07cb86b599ff39a8711c89f361419ddb31dc10",()=>c.getDeploymentLogs,"407ee2689a32406de4f6668d53210ac6ed7737fe81",()=>d.deployFeature,"40a7221f25d01f099a68fd5bf7a222ddabaf427b0a",()=>e.deployRepository],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 '00325058d83d8caaa34793b3df8e89e120cac79927'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '402c8dc6f411de40af72d880fbd869f2246fe52fae'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40f45389124f2a2d0af12f9f62f65a88398143bd8f'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '401be3f4bc768244687f3e4a196719b52490bb9345'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00'} 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 '004709c522bee7678d429bd4accbfa0c686e0c5f6c'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '405a07cb86b599ff39a8711c89f361419ddb31dc10'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '407ee2689a32406de4f6668d53210ac6ed7737fe81'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40a7221f25d01f099a68fd5bf7a222ddabaf427b0a'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402d4104ec421d10ba7535015df07be0ad91affd73'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '4048157fdf7fdc56295539dab888209fe94e763c34'} 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(["00325058d83d8caaa34793b3df8e89e120cac79927",()=>b.pickFolder,"401be3f4bc768244687f3e4a196719b52490bb9345",()=>f.stopDeployment,"402c8dc6f411de40af72d880fbd869f2246fe52fae",()=>c.getDeploymentLogs,"4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4",()=>d.deployFeature,"40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00",()=>g.getDeploymentStatus,"40f45389124f2a2d0af12f9f62f65a88398143bd8f",()=>e.deployRepository],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(["004709c522bee7678d429bd4accbfa0c686e0c5f6c",()=>b.pickFolder,"402d4104ec421d10ba7535015df07be0ad91affd73",()=>f.stopDeployment,"4048157fdf7fdc56295539dab888209fe94e763c34",()=>g.getDeploymentStatus,"405a07cb86b599ff39a8711c89f361419ddb31dc10",()=>c.getDeploymentLogs,"407ee2689a32406de4f6668d53210ac6ed7737fe81",()=>d.deployFeature,"40a7221f25d01f099a68fd5bf7a222ddabaf427b0a",()=>e.deployRepository],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 '00325058d83d8caaa34793b3df8e89e120cac79927'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '402c8dc6f411de40af72d880fbd869f2246fe52fae'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40f45389124f2a2d0af12f9f62f65a88398143bd8f'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '401be3f4bc768244687f3e4a196719b52490bb9345'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00'} 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 '004709c522bee7678d429bd4accbfa0c686e0c5f6c'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '405a07cb86b599ff39a8711c89f361419ddb31dc10'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '407ee2689a32406de4f6668d53210ac6ed7737fe81'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40a7221f25d01f099a68fd5bf7a222ddabaf427b0a'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402d4104ec421d10ba7535015df07be0ad91affd73'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '4048157fdf7fdc56295539dab888209fe94e763c34'} 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,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,ciWatchEnabled:a.ciWatchEnabled,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"00b045bbbbc13856cc8bd8ec39a101ba5b826386aa",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,pending:l,agentType:m,model:n}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let o=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,ciWatchEnabled:a.ciWatchEnabled,enableEvidence:a.enableEvidence,commitEvidence:a.commitEvidence}}(0,a.i(12581).ensureServerEntryExports)([d]),(0,b.registerServerReference)(d,"0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38",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,pending:l,agentType:m,model:n}=a;if(!b?.trim())return{error:"description is required"};if(!d?.trim())return{error:"repositoryPath is required"};let o=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),p={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:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{}});return a.initializeAndSpawn(e,{userInput:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{},...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,"4075a082db11244f324640576b2dbf0f92c9cef9a5",null),a.s(["createFeature",()=>d],77605)},36765,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207),v=a.i(24860),w=a.i(77605);a.s([],21974),a.i(21974),a.s(["002c6aebad1ac1f1c3eea2412064ca5e24ef030eec",()=>k.isAgentSetupComplete,"00325058d83d8caaa34793b3df8e89e120cac79927",()=>b.pickFolder,"0042a3af29ce2e8895853217dfb05bc5d8e3af35d4",()=>m.getAllAgentModels,"00b045bbbbc13856cc8bd8ec39a101ba5b826386aa",()=>v.getWorkflowDefaults,"00f0701ccfd669dad18ef4568f7ae8948573002acf",()=>l.checkAgentAuth,"401be3f4bc768244687f3e4a196719b52490bb9345",()=>f.stopDeployment,"401fc119b2405e2b4547298765e0b53e1dbe9ed8d5",()=>h.openIde,"402c8dc6f411de40af72d880fbd869f2246fe52fae",()=>c.getDeploymentLogs,"4032193b3cb6ebe17532f513a3a7813fa576e646cd",()=>u.getFeatureMetadata,"4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4",()=>d.deployFeature,"405b8db039e5aee9915a668bbc40b4fb34fa0e9a95",()=>i.openShell,"406668da49834ee1fcac3357deed824609de254299",()=>r.stopFeature,"4075a082db11244f324640576b2dbf0f92c9cef9a5",()=>w.createFeature,"40841626f89a4207ce07b5c0b52eb9ea583ab684a3",()=>s.addRepository,"409f483ad0234c955ff4c43593b81cb0d24ebb3714",()=>j.openFolder,"40ba702db3985a3994b8efed5599b66d2cd4d7d179",()=>p.resumeFeature,"40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8",()=>t.deleteRepository,"40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00",()=>g.getDeploymentStatus,"40f3a80c3fb362bcc5ad31504777ac20b19ae98651",()=>q.startFeature,"40f45389124f2a2d0af12f9f62f65a88398143bd8f",()=>e.deployRepository,"608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc",()=>n.updateAgentAndModel,"70b39e022705ab7f7857c3767a2677721fc3d0fb4e",()=>o.deleteFeature],36765)}];
3
+ ${c}`}(b,e),p={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:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},description:b,...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{}});return a.initializeAndSpawn(e,{userInput:o,repositoryPath:d,approvalGates:p,push:h??!1,openPr:i??!1,...j?{parentId:j}:{},...k?{fast:k}:{},...l?{pending:l}:{},...m?{agentType:m}:{},...n?{model:n}:{},...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,"402c6eebcee9191f10700c4a1b10e4c085abc4e1b5",null),a.s(["createFeature",()=>d],77605)},36765,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(26604),q=a.i(54723),r=a.i(18942),s=a.i(49560),t=a.i(39353),u=a.i(29207),v=a.i(24860),w=a.i(77605);a.s([],21974),a.i(21974),a.s(["00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2",()=>m.getAllAgentModels,"004709c522bee7678d429bd4accbfa0c686e0c5f6c",()=>b.pickFolder,"0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e",()=>l.checkAgentAuth,"0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38",()=>v.getWorkflowDefaults,"00e69fe522c390953dd8a17596af109ff192e5ad43",()=>k.isAgentSetupComplete,"400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff",()=>j.openFolder,"4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c",()=>i.openShell,"4026ac3cbd83504185d8db7bb26654f6b49b934b6f",()=>r.stopFeature,"402c6eebcee9191f10700c4a1b10e4c085abc4e1b5",()=>w.createFeature,"402d4104ec421d10ba7535015df07be0ad91affd73",()=>f.stopDeployment,"403efbed2f4429cd3188122115f3bc07f940095818",()=>s.addRepository,"4048157fdf7fdc56295539dab888209fe94e763c34",()=>g.getDeploymentStatus,"405a07cb86b599ff39a8711c89f361419ddb31dc10",()=>c.getDeploymentLogs,"407ee2689a32406de4f6668d53210ac6ed7737fe81",()=>d.deployFeature,"407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9",()=>q.startFeature,"408650cfef71246260ca078a892eaa9fa89a3c4612",()=>h.openIde,"408d3a2545d01cd068a93f0d30d2fec44efcfedadc",()=>u.getFeatureMetadata,"40a7221f25d01f099a68fd5bf7a222ddabaf427b0a",()=>e.deployRepository,"40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a",()=>p.resumeFeature,"40d979b3f29add5f3af9a210be7e90d43b6593cef4",()=>t.deleteRepository,"605ecbde7dd00ad406a43c24e8c27ffe541197a961",()=>n.updateAgentAndModel,"7021304b8effc3ade99767a20cbfdea2ac1e0266f9",()=>o.deleteFeature],36765)}];
4
4
 
5
5
  //# sourceMappingURL=src_presentation_web_c4337169._.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 ciWatchEnabled: 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 ciWatchEnabled: workflow.ciWatchEnabled,\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 /** When true, create the feature in pending state (no agent spawned). */\n pending?: 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 pending,\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 ...(pending ? { pending } : {}),\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 ...(pending ? { pending } : {}),\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 '00325058d83d8caaa34793b3df8e89e120cac79927'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '402c8dc6f411de40af72d880fbd869f2246fe52fae'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '4052fd3c6b6a1b8a789490bdc12f392d79922f9aa4'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40f45389124f2a2d0af12f9f62f65a88398143bd8f'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '401be3f4bc768244687f3e4a196719b52490bb9345'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40dbb53cff26b8ada94f8ff0ce7cc8623f72d38a00'} from 'ACTIONS_MODULE5'\nexport {openIde as '401fc119b2405e2b4547298765e0b53e1dbe9ed8d5'} from 'ACTIONS_MODULE6'\nexport {openShell as '405b8db039e5aee9915a668bbc40b4fb34fa0e9a95'} from 'ACTIONS_MODULE7'\nexport {openFolder as '409f483ad0234c955ff4c43593b81cb0d24ebb3714'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '002c6aebad1ac1f1c3eea2412064ca5e24ef030eec'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '00f0701ccfd669dad18ef4568f7ae8948573002acf'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '0042a3af29ce2e8895853217dfb05bc5d8e3af35d4'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '608e6d7bf5d7c0b144ffad7c44bf5a7d91bc0c2ffc'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '70b39e022705ab7f7857c3767a2677721fc3d0fb4e'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40ba702db3985a3994b8efed5599b66d2cd4d7d179'} from 'ACTIONS_MODULE14'\nexport {startFeature as '40f3a80c3fb362bcc5ad31504777ac20b19ae98651'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '406668da49834ee1fcac3357deed824609de254299'} from 'ACTIONS_MODULE16'\nexport {addRepository as '40841626f89a4207ce07b5c0b52eb9ea583ab684a3'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d1b3273f7de8b2c7aa6eeb1482dbe74c477253f8'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '4032193b3cb6ebe17532f513a3a7813fa576e646cd'} from 'ACTIONS_MODULE19'\nexport {getWorkflowDefaults as '00b045bbbbc13856cc8bd8ec39a101ba5b826386aa'} from 'ACTIONS_MODULE20'\nexport {createFeature as '4075a082db11244f324640576b2dbf0f92c9cef9a5'} from 'ACTIONS_MODULE21'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAeO,eAAe,IAEpB,GAAM,UAAE,CAAQ,CAAE,CADD,CAAA,CACI,CADJ,EAAA,WAAA,AAAW,IAG5B,MAAO,CACL,cAAe,CACb,SAAU,EAAS,oBAAoB,CAAC,QAAQ,CAChD,UAAW,EAAS,o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,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,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/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 ciWatchEnabled: 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 ciWatchEnabled: workflow.ciWatchEnabled,\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 /** When true, create the feature in pending state (no agent spawned). */\n pending?: 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 pending,\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 ...(pending ? { pending } : {}),\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 ...(pending ? { pending } : {}),\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 '004709c522bee7678d429bd4accbfa0c686e0c5f6c'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '405a07cb86b599ff39a8711c89f361419ddb31dc10'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '407ee2689a32406de4f6668d53210ac6ed7737fe81'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '40a7221f25d01f099a68fd5bf7a222ddabaf427b0a'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402d4104ec421d10ba7535015df07be0ad91affd73'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '4048157fdf7fdc56295539dab888209fe94e763c34'} from 'ACTIONS_MODULE5'\nexport {openIde as '408650cfef71246260ca078a892eaa9fa89a3c4612'} from 'ACTIONS_MODULE6'\nexport {openShell as '4021ce8dbc137e3abf9c1e3c1a73d5752e3be0014c'} from 'ACTIONS_MODULE7'\nexport {openFolder as '400588ea7bfe6e878624e1ce4d8d0f4ded424e99ff'} from 'ACTIONS_MODULE8'\nexport {isAgentSetupComplete as '00e69fe522c390953dd8a17596af109ff192e5ad43'} from 'ACTIONS_MODULE9'\nexport {checkAgentAuth as '0050bc5de0686dd7cad4d2b11f6f4dc246963bb50e'} from 'ACTIONS_MODULE10'\nexport {getAllAgentModels as '00455b171fd7ccabc56e57ed7a5c68444a1cfd66a2'} from 'ACTIONS_MODULE11'\nexport {updateAgentAndModel as '605ecbde7dd00ad406a43c24e8c27ffe541197a961'} from 'ACTIONS_MODULE12'\nexport {deleteFeature as '7021304b8effc3ade99767a20cbfdea2ac1e0266f9'} from 'ACTIONS_MODULE13'\nexport {resumeFeature as '40bd6c11b303abdb7cb9cb04eeeb9f5bedc4d6d35a'} from 'ACTIONS_MODULE14'\nexport {startFeature as '407f6e4c47cc0df88aef2dd9399be423af1ef2b4e9'} from 'ACTIONS_MODULE15'\nexport {stopFeature as '4026ac3cbd83504185d8db7bb26654f6b49b934b6f'} from 'ACTIONS_MODULE16'\nexport {addRepository as '403efbed2f4429cd3188122115f3bc07f940095818'} from 'ACTIONS_MODULE17'\nexport {deleteRepository as '40d979b3f29add5f3af9a210be7e90d43b6593cef4'} from 'ACTIONS_MODULE18'\nexport {getFeatureMetadata as '408d3a2545d01cd068a93f0d30d2fec44efcfedadc'} from 'ACTIONS_MODULE19'\nexport {getWorkflowDefaults as '0057f847d9c5d01551ce82a4ecc1cc5aa99cc3da38'} from 'ACTIONS_MODULE20'\nexport {createFeature as '402c6eebcee9191f10700c4a1b10e4c085abc4e1b5'} from 'ACTIONS_MODULE21'\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAeO,eAAe,IAEpB,GAAM,UAAE,CAAQ,CAAE,CADD,CAAA,CACI,CADJ,EAAA,WAAA,AAAW,IAG5B,MAAO,CACL,cAAe,CACb,SAAU,EAAS,oBAAoB,CAAC,QAAQ,CAChD,UAAW,EAAS,oBAAoB,CAAC,SAAS,CAClD,WAAY,EAAS,oBAAoB,CAAC,UAAU,AACtD,EACA,KAAM,EAAS,oBAAoB,CAAC,4BAA4B,CAChE,OAAQ,EAAS,8BAA8B,CAC/C,eAAgB,EAAS,cAAc,CACvC,eAAgB,EAAS,cA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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(26216),h=a.i(57560),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(76072),h=a.i(582),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