chorus-codes 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +13 -14
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +6 -0
- package/.next/required-server-files.js +2 -0
- package/.next/required-server-files.json +2 -0
- package/.next/server/app/_global-error/page.js +32 -10
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.meta +2 -1
- package/.next/server/app/_global-error.rsc +8 -9
- package/.next/server/app/_global-error.segments/_full.segment.rsc +8 -9
- package/.next/server/app/_global-error.segments/{__PAGE__.segment.rsc → _global-error/__PAGE__.segment.rsc} +2 -2
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +3 -4
- package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -13
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -3
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +12 -10
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -10
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/api/daemon/[...path]/route.js +1 -7
- package/.next/server/app/api/daemon/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/daemon/[...path]/route_client-reference-manifest.js +1 -3
- package/.next/server/app/api/run-artifacts/[chatId]/route.js +1 -6
- package/.next/server/app/api/run-artifacts/[chatId]/route.js.nft.json +1 -1
- package/.next/server/app/api/run-artifacts/[chatId]/route_client-reference-manifest.js +1 -3
- package/.next/server/app/connect/page.js +2 -15
- package/.next/server/app/connect/page.js.nft.json +1 -1
- package/.next/server/app/connect/page_client-reference-manifest.js +1 -3
- package/.next/server/app/favicon.ico/route.js +1 -8
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg/route.js +1 -7
- package/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/.next/server/app/new/page.js +2 -14
- package/.next/server/app/new/page.js.nft.json +1 -1
- package/.next/server/app/new/page_client-reference-manifest.js +1 -3
- package/.next/server/app/new.html +1 -1
- package/.next/server/app/new.rsc +14 -14
- package/.next/server/app/new.segments/_full.segment.rsc +14 -14
- package/.next/server/app/new.segments/_head.segment.rsc +4 -4
- package/.next/server/app/new.segments/_index.segment.rsc +4 -4
- package/.next/server/app/new.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/new.segments/new/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/new.segments/new.segment.rsc +3 -3
- package/.next/server/app/onboarding/page.js +2 -14
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -3
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +14 -14
- package/.next/server/app/onboarding.segments/_full.segment.rsc +14 -14
- package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_index.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/server/app/page.js +2 -17
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -3
- package/.next/server/app/personas/page.js +2 -14
- package/.next/server/app/personas/page.js.nft.json +1 -1
- package/.next/server/app/personas/page_client-reference-manifest.js +1 -3
- package/.next/server/app/personas.html +1 -1
- package/.next/server/app/personas.rsc +14 -14
- package/.next/server/app/personas.segments/_full.segment.rsc +14 -14
- package/.next/server/app/personas.segments/_head.segment.rsc +4 -4
- package/.next/server/app/personas.segments/_index.segment.rsc +4 -4
- package/.next/server/app/personas.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/personas.segments/personas/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/personas.segments/personas.segment.rsc +3 -3
- package/.next/server/app/runs/[runId]/page.js +2 -16
- package/.next/server/app/runs/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/runs/[runId]/page_client-reference-manifest.js +1 -3
- package/.next/server/app/runs/page.js +2 -15
- package/.next/server/app/runs/page.js.nft.json +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -3
- package/.next/server/app/settings/page.js +26 -14
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -3
- package/.next/server/app/settings/permissions/page.js +2 -14
- package/.next/server/app/settings/permissions/page.js.nft.json +1 -1
- package/.next/server/app/settings/permissions/page_client-reference-manifest.js +1 -3
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +14 -14
- package/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/templates/page.js +2 -14
- package/.next/server/app/templates/page.js.nft.json +1 -1
- package/.next/server/app/templates/page_client-reference-manifest.js +1 -3
- package/.next/server/app/templates.html +1 -1
- package/.next/server/app/templates.rsc +14 -14
- package/.next/server/app/templates.segments/_full.segment.rsc +14 -14
- package/.next/server/app/templates.segments/_head.segment.rsc +4 -4
- package/.next/server/app/templates.segments/_index.segment.rsc +4 -4
- package/.next/server/app/templates.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/templates.segments/templates/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/templates.segments/templates.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/144.js +25 -0
- package/.next/server/chunks/332.js +18 -0
- package/.next/server/chunks/418.js +1 -0
- package/.next/server/chunks/429.js +1 -0
- package/.next/server/chunks/451.js +45 -0
- package/.next/server/chunks/498.js +1 -0
- package/.next/server/chunks/504.js +1 -0
- package/.next/server/chunks/557.js +5 -0
- package/.next/server/chunks/668.js +25 -0
- package/.next/server/chunks/681.js +1 -0
- package/.next/server/chunks/946.js +1 -0
- package/.next/server/chunks/95.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -21
- package/.next/server/middleware-manifest.json +2 -2
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -51
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -5
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/116-0372d11bc2a9ac4d.js +25 -0
- package/.next/static/chunks/128-a5d059bf5b2e5090.js +32 -0
- package/.next/static/chunks/15-d438a2b057302bed.js +1 -0
- package/.next/static/chunks/344-1f06059a92faa936.js +1 -0
- package/.next/static/chunks/720-9732eeb760e004e3.js +5 -0
- package/.next/static/chunks/744-2b89d96d64610581.js +1 -0
- package/.next/static/chunks/app/_global-error/page-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/app/_not-found/page-715bac6dc7f3427d.js +1 -0
- package/.next/static/chunks/app/api/daemon/[...path]/route-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/app/api/run-artifacts/[chatId]/route-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/app/connect/page-c09d9fb410c468b7.js +1 -0
- package/.next/static/chunks/app/layout-df8acd5bd06cbe45.js +1 -0
- package/.next/static/chunks/app/new/page-e4923b87c7a7b6ae.js +1 -0
- package/.next/static/chunks/app/onboarding/page-4c87427335371aaa.js +1 -0
- package/.next/static/chunks/app/page-3c0d23c063b036eb.js +1 -0
- package/.next/static/chunks/app/personas/page-a130cd11d8cbd832.js +1 -0
- package/.next/static/chunks/app/runs/[runId]/page-aa118bfeb6508779.js +1 -0
- package/.next/static/chunks/app/runs/page-503439d57f433574.js +1 -0
- package/.next/static/chunks/app/settings/page-64d7d48d2413a18b.js +25 -0
- package/.next/static/chunks/app/settings/permissions/page-18bf0e6d84be8fad.js +1 -0
- package/.next/static/chunks/app/templates/page-db5165c6311bf6e1.js +1 -0
- package/.next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js +1 -0
- package/.next/static/chunks/framework-dc9b726cfb42e402.js +1 -0
- package/.next/static/chunks/main-2088f7ac0f762d6a.js +5 -0
- package/.next/static/chunks/main-app-e9f7985e32dc8a63.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-538b25894f1d36d8.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c01ad9f9473ce080.js +1 -0
- package/.next/static/chunks/webpack-87142ab87b87c8fb.js +1 -0
- package/.next/static/css/a552ff3997000a18.css +3 -0
- package/.next/static/fRcji-LCH-qqfsUepgR1t/_buildManifest.js +1 -0
- package/.next/trace +19 -1
- package/.next/trace-build +1 -1
- package/.next/types/app/api/daemon/[...path]/route.ts +351 -0
- package/.next/types/app/api/run-artifacts/[chatId]/route.ts +351 -0
- package/.next/types/app/connect/page.ts +87 -0
- package/.next/types/app/layout.ts +87 -0
- package/.next/types/app/new/page.ts +87 -0
- package/.next/types/app/onboarding/page.ts +87 -0
- package/.next/types/app/page.ts +87 -0
- package/.next/types/app/personas/page.ts +87 -0
- package/.next/types/app/runs/[runId]/page.ts +87 -0
- package/.next/types/app/runs/page.ts +87 -0
- package/.next/types/app/settings/page.ts +87 -0
- package/.next/types/app/settings/permissions/page.ts +87 -0
- package/.next/types/app/templates/page.ts +87 -0
- package/.next/types/package.json +1 -0
- package/dist/cli/commands/start.js +38 -4
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/port-utils.js +143 -7
- package/dist/cli/port-utils.js.map +1 -1
- package/dist/daemon/index.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/package.json +2 -2
- package/.next/build/chunks/[root-of-the-server]__0d-m0h0._.js +0 -206
- package/.next/build/chunks/[root-of-the-server]__0d-m0h0._.js.map +0 -8
- package/.next/build/chunks/[root-of-the-server]__0ubbtyl._.js +0 -500
- package/.next/build/chunks/[root-of-the-server]__0ubbtyl._.js.map +0 -11
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js +0 -13
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js.map +0 -5
- package/.next/build/chunks/[turbopack]_runtime.js +0 -890
- package/.next/build/chunks/[turbopack]_runtime.js.map +0 -11
- package/.next/build/chunks/node_modules__pnpm_0e-dfa2._.js +0 -6681
- package/.next/build/chunks/node_modules__pnpm_0e-dfa2._.js.map +0 -47
- package/.next/build/package.json +0 -1
- package/.next/build/postcss.js +0 -6
- package/.next/build/postcss.js.map +0 -5
- package/.next/diagnostics/route-bundle-stats.json +0 -176
- package/.next/fallback-build-manifest.json +0 -13
- package/.next/server/app/_global-error/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_global-error/page/build-manifest.json +0 -17
- package/.next/server/app/_global-error/page/next-font-manifest.json +0 -6
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_global-error/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_global-error/page.js.map +0 -5
- package/.next/server/app/_not-found/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_not-found/page/build-manifest.json +0 -17
- package/.next/server/app/_not-found/page/next-font-manifest.json +0 -11
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_not-found/page.js.map +0 -5
- package/.next/server/app/api/daemon/[...path]/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/daemon/[...path]/route/build-manifest.json +0 -9
- package/.next/server/app/api/daemon/[...path]/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/daemon/[...path]/route.js.map +0 -5
- package/.next/server/app/api/run-artifacts/[chatId]/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/run-artifacts/[chatId]/route/build-manifest.json +0 -9
- package/.next/server/app/api/run-artifacts/[chatId]/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/run-artifacts/[chatId]/route.js.map +0 -5
- package/.next/server/app/connect/page/app-paths-manifest.json +0 -3
- package/.next/server/app/connect/page/build-manifest.json +0 -17
- package/.next/server/app/connect/page/next-font-manifest.json +0 -11
- package/.next/server/app/connect/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/connect/page/server-reference-manifest.json +0 -4
- package/.next/server/app/connect/page.js.map +0 -5
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +0 -3
- package/.next/server/app/favicon.ico/route/build-manifest.json +0 -9
- package/.next/server/app/favicon.ico/route.js.map +0 -5
- package/.next/server/app/icon.svg/route/app-paths-manifest.json +0 -3
- package/.next/server/app/icon.svg/route/build-manifest.json +0 -9
- package/.next/server/app/icon.svg/route.js.map +0 -5
- package/.next/server/app/new/page/app-paths-manifest.json +0 -3
- package/.next/server/app/new/page/build-manifest.json +0 -17
- package/.next/server/app/new/page/next-font-manifest.json +0 -11
- package/.next/server/app/new/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/new/page/server-reference-manifest.json +0 -4
- package/.next/server/app/new/page.js.map +0 -5
- package/.next/server/app/onboarding/page/app-paths-manifest.json +0 -3
- package/.next/server/app/onboarding/page/build-manifest.json +0 -17
- package/.next/server/app/onboarding/page/next-font-manifest.json +0 -11
- package/.next/server/app/onboarding/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/onboarding/page/server-reference-manifest.json +0 -4
- package/.next/server/app/onboarding/page.js.map +0 -5
- package/.next/server/app/page/app-paths-manifest.json +0 -3
- package/.next/server/app/page/build-manifest.json +0 -17
- package/.next/server/app/page/next-font-manifest.json +0 -11
- package/.next/server/app/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/page/server-reference-manifest.json +0 -4
- package/.next/server/app/page.js.map +0 -5
- package/.next/server/app/personas/page/app-paths-manifest.json +0 -3
- package/.next/server/app/personas/page/build-manifest.json +0 -17
- package/.next/server/app/personas/page/next-font-manifest.json +0 -11
- package/.next/server/app/personas/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/personas/page/server-reference-manifest.json +0 -4
- package/.next/server/app/personas/page.js.map +0 -5
- package/.next/server/app/runs/[runId]/page/app-paths-manifest.json +0 -3
- package/.next/server/app/runs/[runId]/page/build-manifest.json +0 -17
- package/.next/server/app/runs/[runId]/page/next-font-manifest.json +0 -11
- package/.next/server/app/runs/[runId]/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/runs/[runId]/page/server-reference-manifest.json +0 -4
- package/.next/server/app/runs/[runId]/page.js.map +0 -5
- package/.next/server/app/runs/page/app-paths-manifest.json +0 -3
- package/.next/server/app/runs/page/build-manifest.json +0 -17
- package/.next/server/app/runs/page/next-font-manifest.json +0 -11
- package/.next/server/app/runs/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/runs/page/server-reference-manifest.json +0 -4
- package/.next/server/app/runs/page.js.map +0 -5
- package/.next/server/app/settings/page/app-paths-manifest.json +0 -3
- package/.next/server/app/settings/page/build-manifest.json +0 -17
- package/.next/server/app/settings/page/next-font-manifest.json +0 -11
- package/.next/server/app/settings/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/settings/page/server-reference-manifest.json +0 -4
- package/.next/server/app/settings/page.js.map +0 -5
- package/.next/server/app/settings/permissions/page/app-paths-manifest.json +0 -3
- package/.next/server/app/settings/permissions/page/build-manifest.json +0 -17
- package/.next/server/app/settings/permissions/page/next-font-manifest.json +0 -11
- package/.next/server/app/settings/permissions/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/settings/permissions/page/server-reference-manifest.json +0 -4
- package/.next/server/app/settings/permissions/page.js.map +0 -5
- package/.next/server/app/templates/page/app-paths-manifest.json +0 -3
- package/.next/server/app/templates/page/build-manifest.json +0 -17
- package/.next/server/app/templates/page/next-font-manifest.json +0 -11
- package/.next/server/app/templates/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/templates/page/server-reference-manifest.json +0 -4
- package/.next/server/app/templates/page.js.map +0 -5
- package/.next/server/chunks/05w9_next_0xdex7s._.js +0 -13
- package/.next/server/chunks/05w9_next_0xdex7s._.js.map +0 -1
- package/.next/server/chunks/05w9_next_dist_esm_build_templates_app-route_0.73kst.js +0 -3
- package/.next/server/chunks/05w9_next_dist_esm_build_templates_app-route_0.73kst.js.map +0 -1
- package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js +0 -3
- package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__02xvj_h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02xvj_h._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0i7ddmr._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0i7ddmr._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0sxhm1i._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0sxhm1i._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__12xxby8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12xxby8._.js.map +0 -1
- package/.next/server/chunks/[turbopack]_runtime.js +0 -903
- package/.next/server/chunks/[turbopack]_runtime.js.map +0 -11
- package/.next/server/chunks/_next-internal_server_app_api_daemon_[___path]_route_actions_0a5g-ar.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_daemon_[___path]_route_actions_0a5g-ar.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_run-artifacts_[chatId]_route_actions_07e2ul1.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_run-artifacts_[chatId]_route_actions_07e2ul1.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_0-0ehc~.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_0-0ehc~.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_0q4woef._.js +0 -3
- package/.next/server/chunks/ssr/05w9_next_dist_0q4woef._.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_0ybpwn1._.js +0 -6
- package/.next/server/chunks/ssr/05w9_next_dist_0ybpwn1._.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_0~859ji._.js +0 -6
- package/.next/server/chunks/ssr/05w9_next_dist_0~859ji._.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_12u3mib._.js +0 -3
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_12u3mib._.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_forbidden_04fbe_..js +0 -3
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_forbidden_04fbe_..js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_global-error_0brpl_..js +0 -3
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_global-error_0brpl_..js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_unauthorized_0~2g66g.js +0 -3
- package/.next/server/chunks/ssr/05w9_next_dist_client_components_builtin_unauthorized_0~2g66g.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0-f~6r1.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0-f~6r1.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_00czn99.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_00czn99.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_01nm1_6.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_01nm1_6.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0jcydv7.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0jcydv7.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0km.hvi.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0km.hvi.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0ln8_qt.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0ln8_qt.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0n3h-j1.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0n3h-j1.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0nc~v.o.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0nc~v.o.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0o6nct3.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0o6nct3.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0veve6-.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0veve6-.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0wh5tpo.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_0wh5tpo.js.map +0 -1
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_10~fsfu.js +0 -4
- package/.next/server/chunks/ssr/05w9_next_dist_esm_build_templates_app-page_10~fsfu.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0-7oo8o._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0-7oo8o._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__01t9qm2._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__01t9qm2._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__076~t6~._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__076~t6~._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_tow-j._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0_tow-j._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0bsym8v._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0bsym8v._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0bwjwxi._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0bwjwxi._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0c2e5js._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0c2e5js._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0d_59pi._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0d_59pi._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0dxp2sg._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0dxp2sg._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0e58.k_._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0e58.k_._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ek20dj._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0ek20dj._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0h2o43u._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0h2o43u._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hn95cc._.js +0 -33
- package/.next/server/chunks/ssr/[root-of-the-server]__0hn95cc._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ic.~tw._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0ic.~tw._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0jltd-t._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0jltd-t._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0k_96yx._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0k_96yx._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0l5ko41._.js +0 -19
- package/.next/server/chunks/ssr/[root-of-the-server]__0l5ko41._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0p~21w8._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0p~21w8._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0tc4gl8._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0tc4gl8._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0we1ana._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0we1ana._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0xlzjhk._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0xlzjhk._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ygksjc._.js +0 -33
- package/.next/server/chunks/ssr/[root-of-the-server]__0ygksjc._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0yhjl35._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0yhjl35._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0~cqs-9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0~cqs-9._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__109.1j0._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__109.1j0._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__10gepjv._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10gepjv._.js.map +0 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -903
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -11
- package/.next/server/chunks/ssr/_01t~nag._.js +0 -30
- package/.next/server/chunks/ssr/_01t~nag._.js.map +0 -1
- package/.next/server/chunks/ssr/_097xk3e._.js +0 -3
- package/.next/server/chunks/ssr/_097xk3e._.js.map +0 -1
- package/.next/server/chunks/ssr/_0bxoss0._.js +0 -30
- package/.next/server/chunks/ssr/_0bxoss0._.js.map +0 -1
- package/.next/server/chunks/ssr/_0ck1n8_._.js +0 -7
- package/.next/server/chunks/ssr/_0ck1n8_._.js.map +0 -1
- package/.next/server/chunks/ssr/_0d-304b._.js +0 -30
- package/.next/server/chunks/ssr/_0d-304b._.js.map +0 -1
- package/.next/server/chunks/ssr/_0p-_ahq._.js +0 -30
- package/.next/server/chunks/ssr/_0p-_ahq._.js.map +0 -1
- package/.next/server/chunks/ssr/_0qlx_85._.js +0 -7
- package/.next/server/chunks/ssr/_0qlx_85._.js.map +0 -1
- package/.next/server/chunks/ssr/_0y43gyn._.js +0 -27
- package/.next/server/chunks/ssr/_0y43gyn._.js.map +0 -1
- package/.next/server/chunks/ssr/_11i54x9._.js +0 -30
- package/.next/server/chunks/ssr/_11i54x9._.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_connect_page_actions_0vb8s6u.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_connect_page_actions_0vb8s6u.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_new_page_actions_08q6mx5.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_new_page_actions_08q6mx5.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_onboarding_page_actions_0qdby58.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_onboarding_page_actions_0qdby58.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_personas_page_actions_08fq21v.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_personas_page_actions_08fq21v.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_runs_[runId]_page_actions_0z6r2tz.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_runs_[runId]_page_actions_0z6r2tz.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_runs_page_actions_04_e1xr.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_runs_page_actions_04_e1xr.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_0mr68ai.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_0mr68ai.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_permissions_page_actions_0cr.qtc.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_permissions_page_actions_0cr.qtc.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_templates_page_actions_0n8gow3.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_templates_page_actions_0n8gow3.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_0~j0k.e._.js +0 -33
- package/.next/server/chunks/ssr/node_modules__pnpm_0~j0k.e._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_new_page_tsx_0av4n2k._.js +0 -3
- package/.next/server/chunks/ssr/src_app_new_page_tsx_0av4n2k._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +0 -3
- package/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_personas_page_tsx_0jx9vyh._.js +0 -3
- package/.next/server/chunks/ssr/src_app_personas_page_tsx_0jx9vyh._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +0 -27
- package/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_templates_page_tsx_0tml2wg._.js +0 -3
- package/.next/server/chunks/ssr/src_app_templates_page_tsx_0tml2wg._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_0j77o23._.js +0 -3
- package/.next/server/chunks/ssr/src_components_0j77o23._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_0lc2g58._.js +0 -3
- package/.next/server/chunks/ssr/src_components_0lc2g58._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_live-run-real_index_tsx_0zzsdt9._.js +0 -3
- package/.next/server/chunks/ssr/src_components_live-run-real_index_tsx_0zzsdt9._.js.map +0 -1
- package/.next/static/9cD3yIOGe_Aqr17uJHTQS/_buildManifest.js +0 -11
- package/.next/static/9cD3yIOGe_Aqr17uJHTQS/_clientMiddlewareManifest.js +0 -1
- package/.next/static/chunks/0-xxtuzaqzyzy.css +0 -3
- package/.next/static/chunks/0.dctgbd3j_xg.js +0 -2
- package/.next/static/chunks/0.~gqf.-9g-fh.js +0 -1
- package/.next/static/chunks/01as9r5n5k.xo.js +0 -1
- package/.next/static/chunks/034b~pjm7y20e.js +0 -1
- package/.next/static/chunks/05o4oa_9xfaun.js +0 -1
- package/.next/static/chunks/08dnw-0gzytmy.js +0 -5
- package/.next/static/chunks/08f2b7tuf53ep.js +0 -1
- package/.next/static/chunks/0a_u3vdu6tc~f.js +0 -1
- package/.next/static/chunks/0am72irwq2bx0.js +0 -5
- package/.next/static/chunks/0c-d1bhb8byrx.js +0 -1
- package/.next/static/chunks/0s4~w2~is76y1.js +0 -1
- package/.next/static/chunks/0ue4qcctkv016.js +0 -4
- package/.next/static/chunks/0uok5~eqi6zku.js +0 -1
- package/.next/static/chunks/0v3lyuj75aq50.js +0 -1
- package/.next/static/chunks/0whnu9t5k-ij7.js +0 -1
- package/.next/static/chunks/0x00t3du13-u4.js +0 -25
- package/.next/static/chunks/0xs3ktzdh4rw4.js +0 -1
- package/.next/static/chunks/0~8r6nhrrl~f9.js +0 -1
- package/.next/static/chunks/10jdu00ksgu69.js +0 -1
- package/.next/static/chunks/10ld26~0f71ye.js +0 -25
- package/.next/static/chunks/11k2wbc04r__f.js +0 -25
- package/.next/static/chunks/13-.xgv2t5u6m.js +0 -31
- package/.next/static/chunks/152ec.u3_e~ya.js +0 -25
- package/.next/static/chunks/172tpttbumwi1.js +0 -25
- package/.next/static/chunks/turbopack-0-al833jv3to~.js +0 -1
- package/.next/static/media/favicon.0i~66t__91s97.ico +0 -0
- package/.next/static/media/icon.15.86wme~cdlv.svg +0 -6
- package/.next/turbopack +0 -0
- /package/.next/static/chunks/{03~yq9q893hmn.js → polyfills-42372ed130431b0a.js} +0 -0
- /package/.next/static/{9cD3yIOGe_Aqr17uJHTQS → fRcji-LCH-qqfsUepgR1t}/_ssgManifest.js +0 -0
- /package/.next/static/media/{caa3a2e1cccd8315-s.p.16t1db8_9y2o~.woff2 → 4cf2300e9c8272f7-s.p.woff2} +0 -0
- /package/.next/static/media/{bbc41e54d2fcbd21-s.0gw~uztddq1df.woff2 → 747892c23ea88013-s.woff2} +0 -0
- /package/.next/static/media/{8a480f0b521d4e75-s.06d3mdzz5bre_.woff2 → 8d697b304b401681-s.woff2} +0 -0
- /package/.next/static/media/{797e433ab948586e-s.p.0.q-h669a_dqa.woff2 → 93f479601ee12b01-s.p.woff2} +0 -0
- /package/.next/static/media/{4fa387ec64143e14-s.0q3udbd2bu5yp.woff2 → 9610d9e46709d722-s.woff2} +0 -0
- /package/.next/static/media/{7178b3e590c64307-s.11.cyxs5p-0z~.woff2 → ba015fad6dcf6784-s.woff2} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[566],{63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>i});var n=r(9442);r(6074);var a=r(7362);function i({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},1749:(e,t,r)=>{"use strict";r.d(t,{$:()=>d});var n=r(9442);r(6074);var a=r(9056),i=r(8113),s=r(7362);let o=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:t="default",size:r="default",asChild:a=!1,...l}){let c=a?i.bL:"button";return(0,n.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,s.cn)(o({variant:t,size:r,className:e})),...l})}},1993:(e,t,r)=>{"use strict";r.d(t,{K7:()=>d,UT:()=>i,dW:()=>s,qI:()=>o});var n=r(4411);function a(e){return{id:e.id,label:e.label,one_liner:e.one_liner,system_prompt:e.system_prompt,recommended_lineage:e.recommended_lineage,builtin:!!e.builtin,forked_from:e.forked_from??null,created_at:e.created_at,updated_at:e.updated_at}}async function i(){return(await (0,n.T)("/personas")).items.map(a)}async function s(e){return a(await (0,n.T)(`/personas/${encodeURIComponent(e)}`))}async function o(e){return a(await (0,n.T)("/personas",{method:"POST",body:JSON.stringify(e)}))}async function d(e){await (0,n.T)(`/personas/${encodeURIComponent(e)}`,{method:"DELETE"})}},1996:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>L});var n=r(9442),a=r(3149),i=r(6289),s=r(5902),o=r(6074),d=r(4284),l=r(1749),c=r(6441),u=r(8141),m=r(7847),p=r(63),g=r(7362);function h({className:e,type:t,...r}){return(0,n.jsx)("input",{type:t,"data-slot":"input",className:(0,g.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...r})}var x=r(2545),f=r(9707),b=r(4030),y=r(2881);let v=["anthropic/claude-sonnet-4.5","openai/gpt-5","google/gemini-2.5-pro","deepseek/deepseek-chat-v3.1","moonshotai/kimi-k2"];function w({apiKeys:e,updateApiKey:t}){let r=e.openrouter??"",[i,s]=(0,o.useState)({kind:"idle"}),[d,l]=(0,o.useState)(null),[c,u]=(0,o.useState)(new Set(v)),[m,k]=(0,o.useState)(!1),[j,N]=(0,o.useState)(null);async function S(){if(0!==r.trim().length&&"saving"!==i.kind){s({kind:"saving"});try{let e=await (0,y.M5)(r.trim());if(!e.valid)return void s({kind:"invalid",message:e.error??"OpenRouter rejected this key."});await C()}catch(e){s({kind:"invalid",message:e instanceof Error?e.message:String(e)})}}}async function C(){s({kind:"loading_catalog"});try{let{models:e}=await (0,y.Y8)();e.sort((e,t)=>e.id.localeCompare(t.id)),l(e),s({kind:"valid",modelCount:e.length})}catch(e){s({kind:"catalog_failed",message:e instanceof Error?e.message:String(e)})}}async function T(){if(0!==c.size&&!m){k(!0),N(null);try{let e=await (0,y.Eu)(Array.from(c)),t=e.added.length,r=e.skipped.length;N(`Added ${t} voice${1===t?"":"s"}`+(r>0?` \xb7 skipped ${r} (unknown id)`:""))}catch(e){N(`Couldn't add voices: ${e instanceof Error?e.message:String(e)}`)}finally{k(!1)}}}return(0,n.jsxs)("section",{className:"mb-8",children:[(0,n.jsxs)("h2",{className:"mb-3 flex flex-wrap items-baseline gap-x-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,n.jsx)("span",{children:"API access"}),(0,n.jsx)("span",{className:"font-normal normal-case text-muted-foreground/70",children:"optional — gives you any model on OpenRouter as a chorus voice"})]}),(0,n.jsxs)(p.Zp,{className:"space-y-3 bg-card p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("label",{htmlFor:"apikey-openrouter",className:"text-sm font-medium",children:"OpenRouter API key"}),(0,n.jsxs)("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground",children:["Get a key ",(0,n.jsx)(x.A,{className:"h-2.5 w-2.5"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h,{id:"apikey-openrouter",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"sk-or-v1-…",value:r,onChange:e=>{t("openrouter",e.target.value),"idle"!==i.kind&&s({kind:"idle"}),l(null)},className:"flex-1 font-mono text-xs",disabled:"saving"===i.kind||"loading_catalog"===i.kind}),(0,n.jsxs)("button",{type:"button",onClick:S,disabled:0===r.trim().length||"saving"===i.kind||"loading_catalog"===i.kind||"valid"===i.kind,className:(0,g.cn)("inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-[11px] font-medium transition disabled:cursor-not-allowed disabled:opacity-50","valid"===i.kind?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),children:[("saving"===i.kind||"loading_catalog"===i.kind)&&(0,n.jsx)(a.A,{className:"h-3 w-3 animate-spin"}),"valid"===i.kind&&(0,n.jsx)(f.A,{className:"h-3 w-3"}),"saving"===i.kind?"Validating…":"loading_catalog"===i.kind?"Loading models…":"valid"===i.kind?"Validated":"Validate & save"]})]}),"invalid"===i.kind&&(0,n.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,n.jsx)(b.A,{className:"h-3 w-3"}),i.message]}),"catalog_failed"===i.kind&&(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-amber-500/40 bg-amber-500/5 px-3 py-2",children:[(0,n.jsxs)("p",{className:"flex items-start gap-1.5 text-xs text-amber-100",children:[(0,n.jsx)(b.A,{className:"mt-0.5 h-3 w-3 shrink-0"}),(0,n.jsxs)("span",{children:["Key saved, but couldn't load the model catalog:"," ",i.message]})]}),(0,n.jsx)("button",{type:"button",onClick:C,className:"shrink-0 rounded-md border border-amber-500/40 bg-amber-500/10 px-2.5 py-1 text-[11px] font-medium text-amber-100 hover:bg-amber-500/20",children:"Reload models"})]}),"valid"===i.kind&&d&&(0,n.jsxs)("div",{className:"space-y-2 rounded-md border border-emerald-500/20 bg-emerald-500/5 p-3",children:[(0,n.jsxs)("p",{className:"text-[11px] text-emerald-300",children:["✓ Key valid \xb7 ",i.modelCount," models available. Pick a starter set now or browse the full catalog on the Connect page later."]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:v.filter(e=>d.some(t=>t.id===e)).map(e=>{let t=c.has(e),r=d.find(t=>t.id===e);return(0,n.jsxs)("label",{className:(0,g.cn)("flex cursor-pointer items-center gap-2 rounded border px-2 py-1.5 text-[11px] transition",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("input",{type:"checkbox",checked:t,onChange:t=>{u(r=>{let n=new Set(r);return t.target.checked?n.add(e):n.delete(e),n})},className:"h-3 w-3 shrink-0"}),(0,n.jsx)("span",{className:"truncate font-mono",children:r?.id??e})]},e)})}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("button",{type:"button",onClick:T,disabled:0===c.size||m,className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-2.5 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[m?(0,n.jsx)(a.A,{className:"h-3 w-3 animate-spin"}):null,"Add ",c.size>0?c.size:""," voice",1===c.size?"":"s"]}),j&&(0,n.jsx)("p",{className:"text-[11px] text-emerald-300",children:j})]})]}),(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/80",children:["Stored locally in ",(0,n.jsx)("code",{children:"~/.chorus/chorus.db"}),". Used only to call OpenRouter on your behalf. Direct API support for other providers (Anthropic, OpenAI, Google, xAI) is on the roadmap — today, route those models via OpenRouter."]})]})]})}var k=r(3734);let j=[{id:"claude-code",provider:"anthropic",label:"Claude Code",hint:"Anthropic — uses your existing Claude login"},{id:"codex-cli",provider:"openai",label:"Codex CLI",hint:"OpenAI — ChatGPT Plus/Pro subscription"},{id:"gemini-cli",provider:"google",label:"Gemini CLI",hint:"Google — uses your gcloud auth"},{id:"opencode-cli",provider:"opencode",label:"OpenCode",hint:"OpenCode Go — routes Kimi, DeepSeek, Grok"},{id:"kimi-cli",provider:"moonshot",label:"Kimi CLI",hint:"MoonshotAI — kimi-k2 plan"},{id:"cursor",provider:"cursor",label:"Cursor",hint:"Cursor IDE — invoke chorus from inside it"},{id:"windsurf",provider:"windsurf",label:"Windsurf",hint:"Windsurf IDE — invoke chorus from inside it"}],N={"claude-code":"claude","codex-cli":"codex","gemini-cli":"gemini","opencode-cli":"opencode","kimi-cli":"kimi"},S={"claude-code":"claude-code","codex-cli":"codex-cli","gemini-cli":"gemini-cli","opencode-cli":"opencode-cli","kimi-cli":"kimi-cli"},C={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"},T=j.filter(e=>"cursor"!==e.id&&"windsurf"!==e.id);function A(e){return(0,n.jsxs)("section",{className:"mb-8",children:[(0,n.jsx)("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"CLI subscriptions"}),(0,n.jsx)("div",{className:"grid grid-cols-1 items-start gap-2 lg:grid-cols-2",children:T.map(t=>{let r=e.selectedClis.has(t.id),i=e.detection[t.id],s=i?.found===!0,o=e.detecting&&!i,d=!s&&!o&&e.manualOpen.has(t.id),l=e.manualBusy.has(t.id),c=s?k.r2[N[t.id]]??C:C;return(0,n.jsxs)("div",{className:(0,g.cn)("flex h-72 flex-col rounded-lg border transition",s?"border-border":"border-border/60 opacity-70",c.gradient),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>s&&e.toggleCli(t.id),disabled:!s,className:(0,g.cn)("flex shrink-0 items-center gap-3 px-4 py-3 text-left transition",s?"hover:bg-card/30":"cursor-not-allowed"),children:[(0,n.jsx)("div",{className:(0,g.cn)("grid h-5 w-5 shrink-0 place-items-center rounded border transition",!s&&"opacity-50",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,n.jsx)(f.A,{className:"h-3 w-3"})}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,g.cn)("h-2 w-2 shrink-0 rounded-full",c.dot)}),(0,n.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:t.label}),s?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-emerald-300",children:[(0,n.jsx)(f.A,{className:"h-3 w-3"})," Installed"]}):o?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:[(0,n.jsx)(a.A,{className:"h-3 w-3 animate-spin"})," Searching…"]}):(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not found"})]})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-2 overflow-y-auto border-t border-border bg-card/30 p-4",children:[(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:s&&i.path?(0,n.jsx)("code",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono",children:i.path}):o?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[(0,n.jsx)(a.A,{className:"h-3 w-3 animate-spin"}),"Probing PATH and known install dirs…"]}):t.hint}),!s&&!o&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>e.toggleManual(t.id),className:"text-[11px] text-muted-foreground transition hover:text-foreground",children:d?"Cancel":"Don't see it? Set path manually →"}),d&&(0,n.jsx)(P,{cliId:t.id,value:e.manualPath[t.id]??"",onChange:r=>e.setManualPath(e=>({...e,[t.id]:r})),error:e.manualError[t.id],busy:l,onSubmit:()=>e.submitManualPath(t.id)})]}),s&&"opencode-cli"===t.id&&r&&(0,n.jsx)(O,{loading:e.opencodeModelsLoading,error:e.opencodeModelsError,models:e.opencodeModels,selected:e.selectedOpencodeModels,onToggle:e.toggleOpencodeModel}),s&&"opencode-cli"!==t.id&&r&&(0,n.jsx)(_,{cliId:t.id,voices:e.cliVoices,savingVoiceIds:e.savingVoiceIds,saveError:e.voiceSaveError,onToggle:e.toggleVoice})]})]},t.id)})}),(0,n.jsx)("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"Cursor and Windsurf are IDEs that invoke chorus, not voices — wire them up on the Connect page after onboarding."})]})}function _({cliId:e,voices:t,savingVoiceIds:r,saveError:a,onToggle:i}){let s=S[e],o=t.filter(e=>e.provider===s).slice().sort((e,t)=>e.id===s?-1:t.id===s?1:e.model_id.localeCompare(t.model_id));if(0===o.length)return(0,n.jsx)("p",{className:"text-[11px] italic text-muted-foreground/70",children:"Models will populate after the daemon finishes seeding (refresh in a few seconds)."});let d=o.filter(e=>e.enabled).length;return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),(0,n.jsxs)("p",{className:"text-[11px] text-muted-foreground/70",children:[d,"/",o.length," enabled"]})]}),a&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:a}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1",children:o.map(e=>{let t=e.enabled,a=e.id===s;return(0,n.jsxs)("button",{type:"button",disabled:r.has(e.id),onClick:()=>i(e),title:e.model_id,className:(0,g.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,g.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",t?"border-primary bg-primary text-primary-foreground":"border-border"),children:t&&(0,n.jsx)(f.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e.model_id}),a&&(0,n.jsx)("span",{className:"shrink-0 rounded-full bg-emerald-500/10 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider text-emerald-300",children:"current"})]},e.id)})})]})}function O({loading:e,error:t,models:r,selected:i,onToggle:s}){return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Pick models to enable"}),(0,n.jsxs)("p",{className:"text-[11px] text-muted-foreground/70",children:[i.size," selected"]})]}),e&&(0,n.jsxs)("p",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,n.jsx)(a.A,{className:"h-3 w-3 animate-spin"}),"Listing models from"," ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:"opencode models"}),"…"]}),t&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:t}),r&&(0,n.jsxs)("div",{className:"space-y-2",children:[Object.entries(r.gateways).filter(([e])=>e.startsWith("opencode")).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1",children:t.map(t=>{let r=i.has(t);return(0,n.jsxs)("button",{type:"button",onClick:()=>s(t),title:t,className:(0,g.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,g.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,n.jsx)(f.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:t.slice(e.length+1)})]},t)})})]},e)),(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:["Pre-selected: ",r.defaultPicks.join(", ")||"none",". Change anytime in ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:"Settings"}),"."]})]})]})}function P({cliId:e,value:t,onChange:r,error:i,busy:s,onSubmit:o}){let d=function(e){switch(e){case"claude-code":return"claude";case"codex-cli":return"codex";case"gemini-cli":return"gemini";case"opencode-cli":return"opencode";default:return"kimi"}}(e);return(0,n.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-card/50 p-3",children:[(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:["Paste the full path to the"," ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:d})," binary. Run"," ",(0,n.jsxs)("code",{className:"rounded bg-muted px-1",children:["which ",d]})," (macOS / Linux) or ",(0,n.jsxs)("code",{className:"rounded bg-muted px-1",children:["where ",d]})," ","(Windows) to find it. The daemon will run"," ",(0,n.jsxs)("code",{className:"rounded bg-muted px-1",children:[d," --version"]})," with a 2s timeout to confirm the binary works and identifies as the"," ",d," CLI."]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(h,{value:t,onChange:e=>r(e.target.value),placeholder:`/full/path/to/${d}`,className:"flex-1 font-mono text-xs",spellCheck:!1,autoComplete:"off"}),(0,n.jsx)(l.$,{type:"button",variant:"secondary",disabled:s,onClick:o,children:s?(0,n.jsx)(a.A,{className:"h-4 w-4 animate-spin"}):"Verify"})]}),i&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:i})]})}let I=[{id:"strict",label:"Strict",hint:"Read-only. Reviewers can inspect code but can't write files, exec shell, or hit the network."},{id:"workspace",label:"Workspace (recommended)",hint:"Read+write inside the chat dir, scoped shell, no network. Default for most teams."},{id:"full",label:"Full access",hint:"No sandbox at all. Only on a personal machine you fully trust."}];function $({sandboxProfile:e,setSandboxProfile:t,autoApprovePrompts:r,setAutoApprovePrompts:a,networkAccess:i,setNetworkAccess:s}){return(0,n.jsxs)("section",{className:"mb-8",children:[(0,n.jsx)("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Permissions & sandbox"}),(0,n.jsx)("p",{className:"mb-4 text-xs leading-relaxed text-muted-foreground",children:"Controls what reviewers can do on your machine. You can change this anytime in Settings → Permissions."}),(0,n.jsx)("div",{className:"space-y-2",children:I.map(r=>{let a=e===r.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>t(r.id),className:(0,g.cn)("flex w-full items-start gap-3 rounded-lg border p-4 text-left transition",a?"border-primary/50 bg-primary/10":"border-border bg-card hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,g.cn)("mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full border transition",a?"border-primary bg-primary text-primary-foreground":"border-border"),children:a&&(0,n.jsx)(f.A,{className:"h-3 w-3"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:r.label}),(0,n.jsx)("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r.hint})]})]},r.id)})}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,n.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-3",children:[(0,n.jsx)("input",{type:"checkbox",checked:r,onChange:e=>a(e.target.checked),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 text-xs leading-relaxed",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:"Skip in-CLI permission prompts"}),(0,n.jsxs)("div",{className:"mt-0.5 text-muted-foreground",children:["Passes ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:"--afk"})," /"," ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:"auto_edit"}),"to spawned reviewers so they don't hang on per-tool prompts. Off = every action requires explicit consent in the CLI's TUI."]})]})]}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-3",children:[(0,n.jsx)("input",{type:"checkbox",checked:i,onChange:e=>s(e.target.checked),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 text-xs leading-relaxed",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:"Allow outbound network from reviewers"}),(0,n.jsx)("div",{className:"mt-0.5 text-muted-foreground",children:"Off by default. Templates that explicitly need network override per phase."})]})]})]})]})}var M=r(6185);async function E(e){for(let t of e.selectedClis){let e=j.find(e=>e.id===t);e&&await (0,M.WH)(e.provider,{kind:"cli_subscription",value:e.id,updatedAt:Date.now()})}for(let[t,r]of Object.entries(e.apiKeys)){let e=r.trim();e&&await (0,M.WH)(t,{kind:"api_key",value:e,updatedAt:Date.now()})}await (0,c.Ep)({sandboxProfile:e.sandboxProfile,autoApprovePrompts:e.autoApprovePrompts,networkAccess:e.networkAccess}),e.selectedClis.has("opencode-cli")&&e.opencodeModels&&await z(e),await (0,M.Xx)({onboarded:!0})}async function z(e){let{listVoices:t,updateVoice:n,createVoice:a}=await Promise.resolve().then(r.bind(r,7847)),i=new Map((await t({provider:"opencode-cli"}).catch(()=>[])).map(e=>[e.id,e])),s=e.opencodeModels;s&&await Promise.all(s.flat.map(async t=>{let r=`opencode-cli:${t}`,s=e.selectedOpencodeModels.has(t),o=i.get(r);try{if(o)o.enabled!==s&&await n(r,{enabled:s});else{let e,r,{lineage:n,vendor_family:i}=(r=((e=t.indexOf("/"))>=0?t.slice(e+1):t).toLowerCase()).includes("kimi")?{lineage:"moonshot",vendor_family:null}:r.includes("claude")?{lineage:"anthropic",vendor_family:null}:r.includes("gpt")||/(?:^|[^a-z])o[1-9](?:$|[^a-z0-9])/.test(r)?{lineage:"openai",vendor_family:null}:r.includes("gemini")?{lineage:"google",vendor_family:null}:r.includes("deepseek")?{lineage:"opencode",vendor_family:"deepseek"}:r.includes("llama")||r.includes("meta")?{lineage:"opencode",vendor_family:"meta"}:r.includes("mistral")||r.includes("mixtral")?{lineage:"opencode",vendor_family:"mistral"}:r.includes("grok")||r.includes("xai")?{lineage:"opencode",vendor_family:"xai"}:{lineage:"opencode",vendor_family:null};await a({provider:"opencode-cli",model_id:t,label:t,source:"cli",lineage:n,vendor_family:i,enabled:s})}}catch{}}))}function L(){let e=(0,s.useRouter)(),[t,r]=(0,o.useTransition)(),[p,g]=(0,o.useState)(null),[h,x]=(0,o.useState)(new Set),[f,b]=(0,o.useState)([]),[y,v]=(0,o.useState)(new Set),[k,j]=(0,o.useState)(null),[N,S]=(0,o.useState)({}),[C,T]=(0,o.useState)("workspace"),[_,O]=(0,o.useState)(!0),[P,I]=(0,o.useState)(!1),[z,L]=(0,o.useState)({}),[U,R]=(0,o.useState)(!0),[V,W]=(0,o.useState)(new Set),[D,J]=(0,o.useState)({}),[K,G]=(0,o.useState)({}),[q,H]=(0,o.useState)(new Set),[F,B]=(0,o.useState)(null),[Y,X]=(0,o.useState)(null),[Q,Z]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(new Set);(0,o.useEffect)(()=>{let e=!1;return(0,c.fk)().then(t=>{if(e)return;let r={},n=new Set;for(let e of t)r[e.id]=e,e.found&&n.add(e.id);L(r),n.size>0&&x(n)}).catch(()=>{}).finally(()=>{e||R(!1)}),(0,m.listVoices)({source:"cli"}).then(t=>{e||b(t)}).catch(()=>{}),()=>{e=!0}},[]);let er=async e=>{v(t=>new Set(t).add(e.id)),j(null);try{let t=await (0,m.updateVoice)(e.id,{enabled:!e.enabled});b(e=>e.map(e=>e.id===t.id?t:e))}catch(e){j(e instanceof Error?e.message:"Couldn't save voice toggle.")}finally{v(t=>{let r=new Set(t);return r.delete(e.id),r})}};(0,o.useEffect)(()=>{!h.has("opencode-cli")||!z["opencode-cli"]?.found||F||Q||Y||(Z(!0),X(null),(0,u.Ay)().then(e=>{B(e),et(t=>t.size>0?t:new Set(e.defaultPicks))}).catch(e=>{X(e instanceof Error?e.message:"Couldn't list OpenCode models. Is the CLI authed (run `opencode auth login`)?")}).finally(()=>Z(!1)))},[h,z,F,Q,Y]);let en=async e=>{let t=(D[e]||"").trim();if(!t)return void G(t=>({...t,[e]:"Enter the full path to the CLI program (e.g. /usr/local/bin/claude)."}));H(t=>new Set(t).add(e)),G(t=>({...t,[e]:""}));try{let r=await (0,c.iW)(e,t);if(r.found){try{await (0,c.Df)(e,r.path??t)}catch(t){G(r=>({...r,[e]:`Validation passed but save failed: ${t instanceof Error?t.message:"unknown error"}. Try again, or paste the path again.`}));return}L(t=>({...t,[e]:r})),x(t=>new Set(t).add(e)),(0,m.listVoices)({source:"cli"}).then(b).catch(()=>{}),W(t=>{let r=new Set(t);return r.delete(e),r})}else{let t=r.reason??"couldn't run that path";G(r=>({...r,[e]:`Validation failed: ${t}.`}))}}catch{G(t=>({...t,[e]:"Validation failed. Is the daemon running?"}))}finally{H(t=>{let r=new Set(t);return r.delete(e),r})}},ea=h.size+Object.values(N).filter(e=>e.trim().length>0).length;return(0,n.jsx)("main",{className:"min-h-screen bg-background text-foreground",children:(0,n.jsxs)("div",{className:"mx-auto w-full max-w-5xl px-4 py-10 sm:px-6 sm:py-14",children:[(0,n.jsxs)("div",{className:"mb-8 flex items-center gap-3",children:[(0,n.jsx)("div",{className:"grid h-10 w-10 place-items-center rounded-md bg-primary/15 text-primary",children:(0,n.jsx)(d.U,{className:"h-6 w-6"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Welcome to Chorus"}),(0,n.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Connect at least one model to begin"})]})]}),(0,n.jsx)("p",{className:"mb-8 text-sm leading-relaxed text-muted-foreground",children:"Chorus runs your prompt past 2–4 LLMs of different lineages and synthesises consensus. Pick the CLI subscriptions you already have, or paste API keys. You can change these later in Settings."}),(0,n.jsx)(A,{selectedClis:h,toggleCli:e=>{x(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},detection:z,detecting:U,cliVoices:f,savingVoiceIds:y,voiceSaveError:k,toggleVoice:er,manualOpen:V,toggleManual:e=>{W(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}),G(t=>({...t,[e]:""}))},manualPath:D,setManualPath:J,manualError:K,manualBusy:q,submitManualPath:en,opencodeModels:F,opencodeModelsError:Y,opencodeModelsLoading:Q,selectedOpencodeModels:ee,toggleOpencodeModel:e=>{et(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})}}),(0,n.jsx)(w,{apiKeys:N,updateApiKey:(e,t)=>{S(r=>({...r,[e]:t}))}}),(0,n.jsx)($,{sandboxProfile:C,setSandboxProfile:T,autoApprovePrompts:_,setAutoApprovePrompts:O,networkAccess:P,setNetworkAccess:I}),p&&(0,n.jsx)("div",{className:"mb-6 rounded-md border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:p}),(0,n.jsxs)("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:0===ea?"Pick at least one to continue.":`${ea} ${1===ea?"credential":"credentials"} ready to save.`}),(0,n.jsx)(l.$,{onClick:()=>{(g(null),0===ea)?g("Pick at least one CLI or paste at least one API key to continue."):r(async()=>{try{await E({selectedClis:h,apiKeys:N,sandboxProfile:C,autoApprovePrompts:_,networkAccess:P,opencodeModels:F,selectedOpencodeModels:ee}),e.push("/"),e.refresh()}catch(e){g(e instanceof M.$v?e.message:"Could not save. Is the Chorus daemon running?")}})},disabled:t||0===ea,className:"w-full sm:w-auto",children:t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{className:"mr-1 h-4 w-4 animate-spin"}),"Saving…"]}):(0,n.jsxs)(n.Fragment,{children:["Get started",(0,n.jsx)(i.A,{className:"ml-1 h-4 w-4"})]})})]})]})})}},2545:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2881:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,M5:()=>a,Y8:()=>i});var n=r(4411);async function a(e){return(0,n.T)("/openrouter/save-key",{method:"POST",body:JSON.stringify({apiKey:e})})}async function i(){return(0,n.T)("/openrouter/models")}async function s(e,t){return(0,n.T)("/openrouter/voices",{method:"POST",body:JSON.stringify(t?{modelIds:e,apiKey:t}:{modelIds:e})})}},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>i,VW:()=>s,YM:()=>m,m_:()=>o,r2:()=>p,u5:()=>l,x0:()=>u,ze:()=>n});let n={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},a={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function i(e){return e?n[e]??e:""}function s(e){return e?a[e]??"bg-muted":"bg-muted"}let o={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},d={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?o[e]??e:""}function c(e){return e?d[e]??"bg-muted":"bg-muted"}let u={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function m(e){if(e)return u[e]}let p={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4284:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});var n=r(9442);function a({className:e}){return(0,n.jsxs)("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:e,fill:"currentColor",children:[(0,n.jsx)("circle",{cx:"11",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,n.jsx)("circle",{cx:"21",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,n.jsx)("circle",{cx:"16",cy:"11",r:"3.2"})]})}},4411:(e,t,r)=>{"use strict";r.d(t,{$:()=>a,T:()=>i}),r(9298).env.CHORUS_DAEMON_URL;let n="/api/v1";class a extends Error{constructor(e,t,r,n){super(r),this.code=e,this.statusCode=t,this.details=n,this.name="DaemonError"}}async function i(e,t={}){let r=new URL("/api/daemon",window.location.origin).toString(),s=e.startsWith("/")?e:`/${e}`,o=s===n||s.startsWith(`${n}/`)?s:`${n}${s}`,d=`${r.replace(/\/$/,"")}${o}`;try{let e=await fetch(d,{...t,headers:{"Content-Type":"application/json",...t.headers}}),r=await e.json().catch(()=>({ok:!1,error:{code:"parse_error",message:"Failed to parse response"}}));if(!r.ok)throw new a(r.error?.code||"unknown",e.status,r.error?.message||"Unknown error",r.error?.details);return r.data}catch(e){if(e instanceof a)throw e;if(e instanceof TypeError&&e.message.includes("fetch"))throw new a("connection_failed",0,"Failed to connect to Chorus daemon. Is it running?");throw new a("unknown",0,e instanceof Error?e.message:"Unknown error")}}},6185:(e,t,r)=>{"use strict";r.d(t,{$v:()=>n.$,jb:()=>f.jb,RL:()=>s,K7:()=>b.K7,I7:()=>h,dW:()=>b.dW,Ih:()=>i,UT:()=>b.UT,eG:()=>p,qI:()=>b.qI,AI:()=>g,Xx:()=>x.Xx,WH:()=>x.WH});var n=r(4411);function a(e){let t;if(e.attached_files)try{let r=JSON.parse(e.attached_files);Array.isArray(r)&&(t=r)}catch{}return{id:e.id,slug:e.slug??void 0,work:e.work,templateId:e.template_id,status:e.status,currentPhaseIdx:e.current_phase_idx??0,yolo:!!e.yolo,attachedFiles:t,repoPath:e.repo_path??void 0,prUrl:e.pr_url??void 0,shipError:e.ship_error??void 0,artifact:e.artifact??void 0,verdict:e.verdict??void 0,createdAt:e.created_at,updatedAt:e.updated_at,finishedAt:e.finished_at??void 0}}async function i(e){let t=new URLSearchParams;e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString()),e?.status&&t.append("status",e.status);let r=t.toString();return(await (0,n.T)(`/chats${r?`?${r}`:""}`)).items.map(a)}async function s(e){return a(await (0,n.T)("/chats",{method:"POST",body:JSON.stringify(e)}))}var o=r(599);let d=new Set(["anthropic","openai","google","opencode","moonshot","any","xai"]),l={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",any:"claude",xai:"opencode"};function c(e){return e?l[e]??"claude":"claude"}function u(e){let t=e.kind??"review";return{id:e.id??"phase",name:e.title??e.name??e.id??"Phase",description:e.description??"",kind:t,gate:"auto",doer:{lineage:c(e.doer?.lineage),models:e.doer?.models??[],...e.doer?.persona?{persona:e.doer.persona}:{}},reviewer:{require:e.reviewer?.require??1,crossLineage:e.reviewer?.crossLineage??!0,candidates:(e.reviewer?.candidates??[]).map(e=>c(e.lineage)).filter(e=>d.has(Object.keys(l).find(t=>l[t]===e)??"")),candidatesWithModels:(e.reviewer?.candidates??[]).map(e=>({lineage:c(e.lineage),models:e.models??[],...e.persona?{persona:e.persona}:{}}))},inputs:{include:e.inputs?.include??[],exclude:e.inputs?.exclude??[]},iterate:{max:e.iterate?.maxRounds??2,onMax:"ask-user"},blindSpots:[],execution:"parallel",builtin:!0,..."review_only"===t?{artifact:{label:e.artifact?.label??"Artifact to review",hint:e.artifact?.hint??"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:e.artifact?.maxBytes??1048576}}:{}}}function m(e){let t={};try{t=o.Ay.parse(e.yaml)??{}}catch{}let r="majority";"number"==typeof t.agreementThreshold?r=t.agreementThreshold>=.99?"unanimous":t.agreementThreshold>=.5?"majority":"any":"string"==typeof t.agreementThreshold&&(r=t.agreementThreshold);let n=(t.phases??[]).map(u);return{id:e.id,name:t.name??e.id,description:t.description??"",category:function(e,t){if(e.category)return e.category;let r=t.toLowerCase();return r.includes("bug")||r.includes("debug")||r.includes("diagnose")?"debug":r.includes("plan")||r.includes("architect")?"plan":r.includes("decide")||r.includes("decision")?"decide":"review"}(t,e.id),phases:n,agreementThreshold:r,onThresholdMet:"auto-finalize"===t.onThresholdMet?"auto-finalize":"ask-user",maxRounds:t.maxRounds??3,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:t.yoloDefault??!1,estimatedBaselineTokens:t.estimatedBaselineTokens,onError:"ask-user",notify:"dashboard-only",yaml:e.yaml,authorHandle:t.author??"chorus",forks:0,popularity:0,source:e.source}}async function p(){return(await (0,n.T)("/templates")).items.map(m)}async function g(e){return m(await (0,n.T)("/templates",{method:"POST",body:JSON.stringify(e)}))}async function h(e){await (0,n.T)(`/templates/${encodeURIComponent(e)}`,{method:"DELETE"})}var x=r(6441),f=r(8141),b=r(1993);r(7847)},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6441:(e,t,r)=>{"use strict";r.d(t,{A1:()=>m,Ci:()=>p,Df:()=>s,Dl:()=>u,Ep:()=>o,WH:()=>h,WK:()=>g,Xx:()=>d,fk:()=>a,iW:()=>i,nr:()=>c,oD:()=>l});var n=r(4411);async function a(){return(await (0,n.T)("/onboard/detect-clis")).items}async function i(e,t){return(0,n.T)("/onboard/validate-cli-path",{method:"POST",body:JSON.stringify({id:e,path:t})})}async function s(e,t){return(0,n.T)("/onboard/save-cli-path",{method:"POST",body:JSON.stringify({id:e,path:t})})}async function o(e){return(0,n.T)("/settings/permissions",{method:"PUT",body:JSON.stringify(e)})}async function d(e){return(0,n.T)("/settings",{method:"PUT",body:JSON.stringify(e)})}async function l(){return(0,n.T)("/settings/transport")}async function c(e){return(0,n.T)("/settings/transport",{method:"PUT",body:JSON.stringify(e)})}async function u(){return(0,n.T)("/settings/billing")}async function m(e){return(0,n.T)("/settings/billing",{method:"PUT",body:JSON.stringify(e)})}async function p(){return(0,n.T)("/settings/telemetry")}async function g(e){return(0,n.T)("/settings/telemetry",{method:"PUT",body:JSON.stringify({enabled:e})})}async function h(e,t){return(0,n.T)(`/secrets/${e}`,{method:"PUT",body:JSON.stringify(t)})}},7362:(e,t,r)=>{"use strict";r.d(t,{cn:()=>i});var n=r(142),a=r(9317);function i(...e){return(0,a.QP)((0,n.$)(e))}},7847:(e,t,r)=>{"use strict";r.d(t,{createVoice:()=>s,listVoices:()=>a,updateVoice:()=>i});var n=r(4411);async function a(e){return(await (0,n.T)(`/voices${function(e){if(!e)return"";let t=[];return e.lineage&&t.push(`lineage=${encodeURIComponent(e.lineage)}`),e.source&&t.push(`source=${encodeURIComponent(e.source)}`),e.provider&&t.push(`provider=${encodeURIComponent(e.provider)}`),void 0!==e.enabled&&t.push(`enabled=${e.enabled?"true":"false"}`),0===t.length?"":`?${t.join("&")}`}(e)}`)).items}async function i(e,t){return(0,n.T)(`/voices/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function s(e){return(0,n.T)("/voices",{method:"POST",body:JSON.stringify(e)})}},8141:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>i,jb:()=>a});var n=r(4411);async function a(e){return(0,n.T)(`/orchestrators/${e}/connect`,{method:"POST"})}async function i(){return(0,n.T)("/orchestrators/opencode/models")}},8600:(e,t,r)=>{Promise.resolve().then(r.bind(r,1996))},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=n.$,s=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return i(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:s,defaultVariants:o}=t,d=Object.keys(s).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let i=a(t)||a(n);return s[e][i]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return i(e,d,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...l}[t]):({...o,...l})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}},e=>{e.O(0,[116,506,128,358],()=>e(e.s=8600)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{1195:(e,t,r)=>{"use strict";r.d(t,{OpencodeFleetCard:()=>x});var s=r(9442),n=r(6074),d=r(5445),a=r(9707),i=r(4030),o=r(2956),l=r(3734),c=r(7847),m=r(4411),u=r(7362);function x({health:e,voices:t}){let[r,i]=(0,n.useState)(!1),[o,g]=(0,n.useState)(t),[h,b]=(0,n.useState)(null),[f,v]=(0,n.useState)(null);async function y(e){v(e.id),b(null);try{let t=await (0,c.updateVoice)(e.id,{enabled:!e.enabled});g(e=>e.map(e=>e.id===t.id?t:e))}catch(e){b(e instanceof m.$?e.message:"Couldn't save. Is the daemon running?")}finally{v(null)}}let N=new Map;for(let e of o){let t=e.model_id.indexOf("/"),r=t>0?e.model_id.slice(0,t):"other",s=N.get(r)??[];s.push(e),N.set(r,s)}let j=Array.from(N.keys()).sort(),k=o.filter(e=>e.enabled).length;return(0,s.jsxs)("div",{className:(0,u.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",l.r2.opencode.gradient),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,s.jsx)("span",{className:(0,u.cn)("h-2 w-2 shrink-0 rounded-full",l.r2.opencode.dot)}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"OpenCode"}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[(0,s.jsx)(p,{status:e.status}),(0,s.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[k," model",1===k?"":"s"," enabled"]})]})]}),(0,s.jsx)(d.A,{className:(0,u.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",r&&"rotate-180")})]}),r&&(0,s.jsxs)("div",{className:"space-y-3 border-t border-border bg-card/50 p-3",children:[h&&(0,s.jsx)("p",{className:"text-[11px] text-destructive",children:h}),0===o.length?(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["No OpenCode voices detected yet. Run ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"opencode models"})," ","and restart the daemon."]}):(0,s.jsxs)("div",{className:"space-y-3",children:[j.map(e=>{let t=N.get(e)??[];return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("p",{className:"text-[11px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(t=>{let r=t.enabled,n=t.model_id.slice(e.length+1);return(0,s.jsxs)("button",{type:"button",disabled:f===t.id,onClick:()=>y(t),title:t.model_id,className:(0,u.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,s.jsx)("div",{className:(0,u.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,s.jsx)(a.A,{className:"h-2 w-2"})}),(0,s.jsx)("span",{className:"truncate font-mono",children:n})]},t.id)})})]},e)}),(0,s.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Toggles save automatically. Templates and the New Chat dialog will only offer models you've enabled here."})]})]})]})}function p({status:e}){switch(e){case"auth_invalid":case"quota_exhausted":case"rate_limited":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,s.jsx)(i.A,{className:"h-3 w-3"}),"auth_invalid"===e?"Auth broken":"quota_exhausted"===e?"Quota out":"Rate-limited"]});default:return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"}),"Connected"]})}}},2956:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>d,VW:()=>a,YM:()=>u,m_:()=>i,r2:()=>x,u5:()=>l,x0:()=>m,ze:()=>s});let s={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},n={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function d(e){return e?s[e]??e:""}function a(e){return e?n[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},o={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?o[e]??"bg-muted":"bg-muted"}let m={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function u(e){if(e)return m[e]}let x={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},3761:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},5445:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},5626:(e,t,r)=>{Promise.resolve().then(r.bind(r,6501)),Promise.resolve().then(r.t.bind(r,2573,23)),Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,9823)),Promise.resolve().then(r.bind(r,8344)),Promise.resolve().then(r.bind(r,1195)),Promise.resolve().then(r.bind(r,8359))},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},8359:(e,t,r)=>{"use strict";r.d(t,{OpenRouterFleetCard:()=>b});var s=r(9442),n=r(6074),d=r(2573),a=r.n(d),i=r(5445),o=r(4030),l=r(6289),c=r(9707),m=r(3761),u=r(2956),x=r(3734),p=r(7847),g=r(4411),h=r(7362);function b({voices:e,health:t}){let r=t?.status==="auth_invalid",[d,f]=(0,n.useState)(r),[v,y]=(0,n.useState)(e),[N,j]=(0,n.useState)(null),[k,w]=(0,n.useState)(null);async function A(e){w(e.id),j(null);try{let t=await (0,p.updateVoice)(e.id,{enabled:!e.enabled});y(e=>e.map(e=>e.id===t.id?t:e))}catch(e){j(e instanceof g.$?e.message:"Couldn't save. Is the daemon running?")}finally{w(null)}}let C=v.filter(e=>e.enabled).length;return(0,s.jsxs)("div",{className:(0,h.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",x.r2.openrouter.gradient),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,s.jsx)("span",{className:(0,h.cn)("h-2 w-2 shrink-0 rounded-full",x.r2.openrouter.dot)}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"OpenRouter"}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[function(e){switch(e){case"quota_exhausted":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"}),"Credits out"]});case"auth_invalid":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"}),"Auth broken"]});case"rate_limited":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:[(0,s.jsx)(m.A,{className:"h-3 w-3"}),"Rate-limited"]});default:return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,s.jsx)(u.A,{className:"h-3 w-3"}),"Configured"]})}}(t?.status??"healthy"),(0,s.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[C," model",1===C?"":"s"," enabled"]})]})]}),(0,s.jsx)(i.A,{className:(0,h.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",d&&"rotate-180")})]}),d&&(0,s.jsxs)("div",{className:"space-y-2 border-t border-border bg-card/50 p-3",children:[r&&(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-2.5",children:[(0,s.jsx)(o.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-destructive"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,s.jsxs)("p",{className:"text-[11px] leading-relaxed text-destructive",children:["OpenRouter rejected the saved API key",t?.message?`: ${t.message}`:"."]}),(0,s.jsxs)(a(),{href:"/connect",className:"inline-flex items-center gap-1 rounded border border-destructive/50 bg-destructive/10 px-2 py-1 text-[11px] font-medium text-destructive transition hover:bg-destructive/20",children:["Fix on Connect",(0,s.jsx)(l.A,{className:"h-3 w-3"})]})]})]}),N&&(0,s.jsx)("p",{className:"text-[11px] text-destructive",children:N}),0===v.length?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No OpenRouter voices yet. Add some on the Connect page."}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1",children:v.map(e=>(0,s.jsxs)("button",{type:"button",disabled:k===e.id,onClick:()=>A(e),title:e.model_id,className:(0,h.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",e.enabled?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,s.jsx)("div",{className:(0,h.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",e.enabled?"border-primary bg-primary text-primary-foreground":"border-border"),children:e.enabled&&(0,s.jsx)(c.A,{className:"h-2 w-2"})}),(0,s.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id))}),!r&&(0,s.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Add or replace your API key on Connect. Toggles save automatically."})]})]})}},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9823:(e,t,r)=>{"use strict";r.d(t,{LineageFleetCard:()=>h});var s=r(9442),n=r(6074),d=r(5445),a=r(9707),i=r(4030),o=r(3761),l=r(2956),c=r(3734),m=r(7847),u=r(4411),x=r(7362);let p={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi"},g={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"};function h({lineage:e,label:t,voices:r,health:i}){let o,[l,f]=(0,n.useState)(!1),[v,y]=(0,n.useState)(r),[N,j]=(0,n.useState)(null),[k,w]=(0,n.useState)(null);async function A(e){w(e.id),j(null);try{let t=await (0,m.updateVoice)(e.id,{enabled:!e.enabled});y(e=>e.map(e=>e.id===t.id?t:e))}catch(e){j(e instanceof u.$?e.message:"Couldn't save. Is the daemon running?")}finally{w(null)}}let C=v.filter(e=>e.enabled).length,_=(o=p[e])?c.r2[o]:g;return(0,s.jsxs)("div",{className:(0,x.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",_.gradient),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,s.jsx)("span",{className:(0,x.cn)("h-2 w-2 shrink-0 rounded-full",_.dot)}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:t}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[(0,s.jsx)(b,{status:i.status}),(0,s.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[C," model",1===C?"":"s"," enabled"]})]})]}),(0,s.jsx)(d.A,{className:(0,x.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",l&&"rotate-180")})]}),l&&(0,s.jsxs)("div",{className:"space-y-2 border-t border-border bg-card/50 p-3",children:[N&&(0,s.jsx)("p",{className:"text-[11px] text-destructive",children:N}),0===v.length?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No voices detected for this provider yet."}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1",children:v.map(e=>{let t=e.enabled;return(0,s.jsxs)("button",{type:"button",disabled:k===e.id,onClick:()=>A(e),title:e.model_id,className:(0,x.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,s.jsx)("div",{className:(0,x.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",t?"border-primary bg-primary text-primary-foreground":"border-border"),children:t&&(0,s.jsx)(a.A,{className:"h-2 w-2"})}),(0,s.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id)})}),(0,s.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Toggles save automatically. Voice list is curated per chorus release — new models appear after upgrades."})]})]})}function b({status:e}){switch(e){case"auth_invalid":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,s.jsx)(i.A,{className:"h-3 w-3"}),"Auth broken"]});case"quota_exhausted":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,s.jsx)(i.A,{className:"h-3 w-3"}),"Quota out"]});case"rate_limited":return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"}),"Rate-limited"]});default:return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"}),"Connected"]})}}}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=5626)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[406],{2956:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4052:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},4696:(e,t,r)=>{Promise.resolve().then(r.bind(r,5921))},5921:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var s=r(9442),n=r(6074),a=r(3149);let l=(0,r(3884).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var i=r(8420),d=r(4052),o=r(4372),c=r(63),u=r(5702),m=r(6457),p=r(8191),x=r(9315),h=r(6458),b=r(6891),f=r(1853),g=r(6185),v=r(4030),y=r(7362),j=r(3734);let w=/^[a-z0-9][a-z0-9-]{1,63}$/,N=[{value:"",label:"No preference"},{value:"anthropic",label:j.ze.anthropic},{value:"openai",label:j.ze.openai},{value:"google",label:j.ze.google},{value:"opencode",label:j.ze.opencode},{value:"moonshot",label:j.ze.moonshot}],k={id:"",label:"",one_liner:"",recommended_lineage:"",system_prompt:"# Worldview\n\nDescribe the lens this persona uses to read code and findings.\n\n# What you look for\n\n- ...\n- ...\n\n# Tone\n\nHow the persona writes — terse, exhaustive, contrarian, etc.\n"};function _(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)}function C({label:e,hint:t,issue:r,span2:n,children:a}){return(0,s.jsxs)("label",{className:(0,y.cn)("flex flex-col gap-1",n&&"sm:col-span-2"),children:[(0,s.jsxs)("span",{className:"flex items-baseline justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),t&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground/70",children:t})]}),a,r&&(0,s.jsx)("span",{className:"text-[10px] text-destructive",children:r.message})]})}function S({form:e,setField:t,setIdDirty:r,isEdit:n,isBuiltin:a,issues:l}){return(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:[n&&a&&(0,s.jsx)("div",{className:"mb-4 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-200",children:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(v.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("div",{children:"Built-in persona. Saving demotes it to a user copy so the boot-time seed leaves it alone — you'll no longer receive upstream updates for this id."})]})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,s.jsx)(C,{label:"Label",hint:"Human-friendly name shown in the picker",issue:l.find(e=>"label"===e.field),children:(0,s.jsx)("input",{type:"text",value:e.label,onChange:e=>t("label",e.target.value),placeholder:"Security Skeptic",className:"h-9 w-full rounded-md border border-border bg-background px-3 text-sm outline-none transition focus:border-primary/60"})}),(0,s.jsx)(C,{label:"ID",hint:n?"Locked once created":"Lowercase, dashes — auto-derived from label",issue:l.find(e=>"id"===e.field),children:(0,s.jsx)("input",{type:"text",value:e.id,disabled:n,onChange:e=>{r(!0),t("id",e.target.value)},placeholder:"security-skeptic",className:(0,y.cn)("h-9 w-full rounded-md border border-border bg-background px-3 font-mono text-sm outline-none transition focus:border-primary/60",n&&"cursor-not-allowed opacity-60")})}),(0,s.jsx)(C,{label:"One-liner",hint:"Shown under the label in the persona list",issue:l.find(e=>"one_liner"===e.field),span2:!0,children:(0,s.jsx)("input",{type:"text",value:e.one_liner,onChange:e=>t("one_liner",e.target.value),placeholder:"Reads every diff like an attacker.",className:"h-9 w-full rounded-md border border-border bg-background px-3 text-sm outline-none transition focus:border-primary/60"})}),(0,s.jsx)(C,{label:"Recommended lineage",hint:"Optional — pickers can default to this CLI",span2:!0,children:(0,s.jsx)("select",{value:e.recommended_lineage,onChange:e=>t("recommended_lineage",e.target.value),className:"h-9 w-full rounded-md border border-border bg-background px-3 text-sm outline-none transition focus:border-primary/60",children:N.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),(0,s.jsx)("div",{className:"mt-5",children:(0,s.jsx)(C,{label:"System prompt",hint:"Prepended to the doer / reviewer ask at run time. Markdown.",issue:l.find(e=>"system_prompt"===e.field),children:(0,s.jsx)("textarea",{value:e.system_prompt,onChange:e=>t("system_prompt",e.target.value),spellCheck:!1,className:"min-h-[280px] w-full rounded-md border border-border bg-background px-3 py-2 font-mono text-[12px] leading-relaxed outline-none transition focus:border-primary/60"})})})]})}var A=r(2956);function $({saveError:e,issues:t,valid:r,saving:n,deleting:l,confirmingDelete:d,canSave:o,isEdit:c,isBuiltin:u,onCancel:m,onSave:p,onDelete:x}){return(0,s.jsxs)("div",{className:"flex flex-col gap-2 border-t border-border bg-card/40 px-6 py-3",children:[e&&(0,s.jsx)("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-[11px] text-destructive",children:(0,s.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,s.jsx)(v.A,{className:"mt-0.5 h-3 w-3 shrink-0"}),(0,s.jsx)("div",{className:"flex-1 leading-snug",children:e})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.A,{className:"h-3 w-3 text-emerald-400"}),(0,s.jsx)("span",{children:"Ready to save"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v.A,{className:"h-3 w-3 text-destructive/80"}),(0,s.jsxs)("span",{children:[t.length," ",1===t.length?"issue":"issues"," to resolve"]})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[c&&!u&&(0,s.jsxs)("button",{type:"button",onClick:x,disabled:l||n,className:(0,y.cn)("inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-sm font-medium transition",d?"border-destructive bg-destructive/15 text-destructive hover:bg-destructive/25":"border-border bg-card text-muted-foreground hover:border-destructive/50 hover:text-destructive"),children:[l?(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(i.A,{className:"h-3.5 w-3.5"}),l?"Deleting…":d?"Click again to confirm":"Delete"]}),(0,s.jsx)("button",{type:"button",onClick:m,className:"h-9 rounded-md border border-border bg-card px-4 text-sm font-medium text-muted-foreground transition hover:border-muted-foreground/30 hover:text-foreground",children:"Cancel"}),(0,s.jsxs)("button",{type:"button",disabled:!o,onClick:p,className:(0,y.cn)("inline-flex h-9 items-center gap-1.5 rounded-md px-4 text-sm font-medium shadow-sm transition",o?"bg-primary text-primary-foreground hover:bg-primary/90":"cursor-not-allowed bg-muted text-muted-foreground/60 shadow-none"),children:[n&&(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 animate-spin"}),n?"Saving…":c?"Save changes":"Save persona"]})]})]})]})}function E({editing:e,trigger:t,onSaved:r,onDeleted:a,defaultOpen:l}){let[i,o]=(0,n.useState)(!!l),c=!!e,u=!!e?.builtin,m=(0,n.useMemo)(()=>e?{id:e.id,label:e.label,one_liner:e.one_liner,recommended_lineage:e.recommended_lineage??"",system_prompt:e.system_prompt??""}:k,[e?.id,e?.updated_at]),[p,v]=(0,n.useState)(m),[y,j]=(0,n.useState)(!1),[N,C]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[z,M]=(0,n.useState)(null),[q,I]=(0,n.useState)(c);(0,n.useEffect)(()=>{v(m),M(null),D(!1),I(c)},[m,c]);let O=(0,n.useRef)(m);(0,n.useEffect)(()=>{O.current=m});let L=(0,n.useMemo)(()=>{let e,t;return e=[],(t=c?p.id:p.id||_(p.label))?w.test(t)||e.push({field:"id",message:"id must be lowercase letters, numbers, dashes (2–64 chars)"}):e.push({field:"id",message:"id is required"}),p.label.trim()||e.push({field:"label",message:"label is required"}),p.one_liner.trim()||e.push({field:"one_liner",message:"one-liner is required"}),p.system_prompt.trim()||e.push({field:"system_prompt",message:"system prompt is required"}),e},[p,c]),F=0===L.length;function P(){v(O.current),j(!1),C(!1),M(null),D(!1),I(c)}function R(e){o(e),e||setTimeout(P,200)}async function T(){if(!F||y)return;let t=c?e.id:p.id||_(p.label);j(!0),M(null);try{let e=await (0,g.qI)({id:t,label:p.label.trim(),one_liner:p.one_liner.trim(),system_prompt:p.system_prompt,recommended_lineage:p.recommended_lineage||null});r?.(e.id),R(!1)}catch(e){M(e instanceof g.$v||e instanceof Error?e.message:"Save failed (unknown error)")}finally{j(!1)}}async function V(){if(e&&!u&&!N){if(!A){D(!0),setTimeout(()=>D(e=>!e&&e),8e3);return}C(!0),M(null);try{await (0,g.K7)(e.id),a?.(e.id),R(!1)}catch(e){M(e instanceof g.$v||e instanceof Error?e.message:"Delete failed (unknown error)"),D(!1)}finally{C(!1)}}}let W=F&&!y&&!N,B=t??(c?(0,s.jsx)("button",{type:"button","aria-label":`Edit persona ${e.label}`,className:"grid h-7 w-7 place-items-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-muted-foreground/40 hover:bg-accent/60 hover:text-foreground",children:(0,s.jsx)(d.A,{className:"h-3.5 w-3.5"})}):(0,s.jsxs)("button",{type:"button","aria-label":"New persona",className:"inline-flex shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground shadow-sm transition hover:bg-primary/90",children:[(0,s.jsx)(x.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"New persona"})]})),K=c?`Edit persona — ${e.label}`:"New persona",Z=c?u?"Saving promotes this built-in to a user-owned row at the same id so your edits survive daemon restarts.":"Edit the worldview, recommended lineage, and system prompt.":"Personas are reusable worldviews that prepend to a doer or reviewer's prompt.";return(0,s.jsxs)(f.lG,{open:i,onOpenChange:R,children:[(0,s.jsx)(f.zM,{asChild:!0,children:B}),(0,s.jsxs)(f.Cf,{showCloseButton:!1,className:"flex max-h-[85vh] w-[min(96vw,720px)] flex-col gap-0 overflow-hidden border-border bg-card p-0 shadow-2xl sm:max-w-none",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-6 py-4",children:[(0,s.jsx)("div",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-md bg-primary/15 text-primary ring-1 ring-primary/20",children:(0,s.jsx)(h.A,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)(f.L3,{className:"text-[15px] font-semibold leading-tight tracking-tight",children:K}),(0,s.jsx)(f.rr,{className:"mt-0.5 text-xs text-muted-foreground",children:Z})]}),(0,s.jsx)("button",{type:"button",onClick:()=>R(!1),className:"grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition hover:bg-accent hover:text-foreground","aria-label":"Close",children:(0,s.jsx)(b.A,{className:"h-4 w-4"})})]}),(0,s.jsx)(S,{form:p,setField:function(e,t){v(r=>{let s={...r,[e]:t};return"label"!==e||q||c||(s.id=_(String(t))),s})},setIdDirty:I,isEdit:c,isBuiltin:u,issues:L}),(0,s.jsx)($,{saveError:z,issues:L,valid:F,saving:y,deleting:N,confirmingDelete:A,canSave:W,isEdit:c,isBuiltin:u,onCancel:()=>R(!1),onSave:T,onDelete:V})]})]})}function D(){let[e,t]=(0,n.useState)([]),[r,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(""),[f,v]=(0,n.useState)(null),[y,w]=(0,n.useState)(!1),[N,k]=(0,n.useState)(0),[_,C]=(0,n.useState)(null),[S,A]=(0,n.useState)(null),[$,D]=(0,n.useState)(null),[z,M]=(0,n.useState)(null),[q,I]=(0,n.useState)(null),[O,L]=(0,n.useState)(null),F=(0,n.useCallback)(async e=>{try{let r=[...await (0,g.UT)()].sort((e,t)=>e.builtin!==t.builtin?e.builtin?-1:1:e.label.localeCompare(t.label));t(r),e&&r.find(t=>t.id===e)?b(e):r.length>0?b(e=>r.find(t=>t.id===e)?e:r[0].id):b(""),k(e=>e+1)}catch(e){x(e instanceof g.$v?e.message:"Failed to load personas")}},[]);async function P(e){if(!q&&!e.builtin){if(z!==e.id){M(e.id),L(null),setTimeout(()=>{M(t=>t===e.id?null:t)},8e3);return}I(e.id),L(null);try{await (0,g.K7)(e.id),M(null),await F()}catch(e){L(e instanceof g.$v||e instanceof Error?e.message:"Delete failed (unknown error)"),M(null)}finally{I(null)}}}async function R(t){if(!S){A(t.id),D(null);try{let r=t.system_prompt&&t.system_prompt.length>0?t:await (0,g.dW)(t.id),s=new Set(e.map(e=>e.id)),n=function({sourceId:e,taken:t,maxAttempts:r=100,uniqueSuffix:s=Date.now}){let n=`${e}-copy`;if(!t.has(n))return n;for(let e=2;e<r;e++){let r=`${n}-${e}`;if(!t.has(r))return r}return`${n}-${s()}`}({sourceId:t.id,taken:s}),a=await (0,g.qI)({id:n,label:`${r.label} (copy)`,one_liner:r.one_liner,system_prompt:r.system_prompt??"",recommended_lineage:r.recommended_lineage??null,forked_from:r.forked_from??r.id});C(a.id),await F(a.id)}catch(e){D(e instanceof g.$v||e instanceof Error?e.message:"Duplicate failed (unknown error)")}finally{A(null)}}}return((0,n.useEffect)(()=>{F()},[F]),(0,n.useEffect)(()=>{if(!h)return void v(null);let e=!1;return w(!0),(0,g.dW)(h).then(t=>{e||v(t)}).catch(()=>{e||v(null)}).finally(()=>{e||w(!1)}),()=>{e=!0}},[h,N]),r)?(0,s.jsx)(o.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:"Error loading personas"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r})]})})}):(0,s.jsx)(o.G,{children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:[(0,s.jsx)(m.z,{eyebrow:"Personas",title:"Reviewer worldviews",subtitle:(0,s.jsxs)(s.Fragment,{children:["Each persona is a set of instructions that teaches the same model to look for different things. Same Claude or Codex, different worldview, wildly different findings. Use any of them via the"," ",(0,s.jsx)("code",{className:"font-mono text-foreground/80",children:"invoke_persona"})," MCP tool from inside Claude Code, Cursor, Codex, or any editor with chorus wired up."]}),action:(0,s.jsx)(E,{onSaved:e=>F(e)})}),$&&(0,s.jsxs)("div",{className:"mb-4 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:["Duplicate failed: ",$]}),O&&(0,s.jsxs)("div",{className:"mb-4 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:["Delete failed: ",O]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[1fr_1.2fr]",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[e.map(e=>{let t=e.id===h;return(0,s.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>b(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),b(e.id))},className:`group relative cursor-pointer rounded-xl text-left transition focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60 ${t?"ring-2 ring-primary/60 ring-offset-2 ring-offset-background":""}`,children:[(0,s.jsx)(c.Zp,{className:"bg-card p-4 transition group-hover:border-muted-foreground/30",children:(0,s.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold",children:e.label}),e.builtin?(0,s.jsx)(u.E,{variant:"outline",className:"border-border text-[10px]",children:"built-in"}):(0,s.jsx)(u.E,{className:"bg-primary/15 text-[10px] text-primary",children:"user"}),e.recommended_lineage&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,j.VW)(e.recommended_lineage)}`}),(0,j.QJ)(e.recommended_lineage)]})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:e.one_liner}),(0,s.jsxs)("p",{className:"mt-1 font-mono text-[10px] text-muted-foreground/70",children:["id: ",e.id]})]})})}),(0,s.jsxs)("div",{className:`absolute bottom-3 right-3 flex items-center gap-1.5 transition ${t?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,onClick:t=>{t.stopPropagation(),b(e.id)},onKeyDown:e=>e.stopPropagation(),children:[(0,s.jsx)("button",{type:"button","aria-label":`Duplicate persona ${e.label}`,title:"Duplicate",disabled:S===e.id,onClick:()=>R(e),className:"grid h-7 w-7 place-items-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-muted-foreground/40 hover:bg-accent/60 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",children:S===e.id?(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l,{className:"h-3.5 w-3.5"})}),!e.builtin&&(0,s.jsx)("button",{type:"button","aria-label":z===e.id?`Confirm delete persona ${e.label}`:`Delete persona ${e.label}`,title:z===e.id?"Click again to confirm":"Delete",disabled:q===e.id,onClick:()=>P(e),className:`grid h-7 w-7 place-items-center rounded-md border transition disabled:cursor-not-allowed disabled:opacity-50 ${z===e.id?"border-destructive bg-destructive/15 text-destructive":"border-border bg-card text-muted-foreground hover:border-destructive/50 hover:text-destructive"}`,children:q===e.id?(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(i.A,{className:"h-3.5 w-3.5"})}),f&&f.id===e.id?(0,s.jsx)(E,{editing:f,defaultOpen:_===e.id,onSaved:t=>{_===e.id&&C(null),F(t)},onDeleted:()=>{_===e.id&&C(null),F()}},`${e.id}:${_===e.id?"auto":"manual"}`):(0,s.jsx)("button",{type:"button","aria-label":`Edit persona ${e.label}`,title:"Edit",onClick:()=>{b(e.id),C(e.id)},className:"grid h-7 w-7 place-items-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-muted-foreground/40 hover:bg-accent/60 hover:text-foreground",children:(0,s.jsx)(d.A,{className:"h-3.5 w-3.5"})})]})]},e.id)}),0===e.length&&(0,s.jsx)(c.Zp,{className:"bg-card p-4 text-center text-sm text-muted-foreground",children:"No personas yet. Daemon may still be seeding — refresh in a second."})]}),f?(0,s.jsx)(p.N,{filename:`${f.id}.md`,charCount:f.system_prompt?.length??0,footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{children:["Invoke via"," ",(0,s.jsxs)("code",{className:"rounded bg-muted/40 px-1 font-mono text-[10px] text-foreground/80",children:["invoke_persona(",`{ personaId: "${f.id}" }`,")"]})]}),f.builtin&&(0,s.jsxs)("span",{children:["edit at"," ",(0,s.jsxs)("code",{className:"font-mono text-[10px]",children:["prompts/personas/",f.id,".md"]})]})]}),children:f.system_prompt??""}):y?(0,s.jsx)(c.Zp,{className:"bg-card p-4 text-center text-muted-foreground",children:(0,s.jsx)("p",{className:"text-sm",children:"Loading persona…"})}):(0,s.jsx)(c.Zp,{className:"bg-card p-4 text-center text-muted-foreground",children:(0,s.jsx)("p",{className:"text-sm",children:"Select a persona to view its prompt."})})]})]})})}},6458:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},8420:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var s=r(142);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.$,l=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,d=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let a=n(t)||n(s);return l[e][a]}),o=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,d,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...o}[t]):({...i,...o})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},9208:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])}},e=>{e.O(0,[116,720,344,744,506,128,358],()=>e(e.s=4696)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[308],{52:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},862:(e,t,r)=>{"use strict";function a(e){return!!e&&e.phases[0]?.kind==="review_only"}r.d(t,{$:()=>a})},2116:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},2865:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]])},2956:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>n,VW:()=>d,YM:()=>m,m_:()=>i,r2:()=>u,u5:()=>l,x0:()=>p,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},s={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function n(e){return e?a[e]??e:""}function d(e){return e?s[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},o={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?o[e]??"bg-muted":"bg-muted"}let p={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function m(e){if(e)return p[e]}let u={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4579:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("git-pull-request",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]])},4608:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]])},4720:(e,t,r)=>{Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,5358)),Promise.resolve().then(r.bind(r,8344))},5358:(e,t,r)=>{"use strict";r.d(t,{LiveRunReal:()=>Y});var a=r(9442),s=r(2573),n=r.n(s),d=r(3884);let i=(0,d.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var o=r(6074),l=r(862),c=r(7296);function p({work:e}){let[t,r]=(0,o.useState)(!1),s=(0,c.t)(e),n=e.trim()!==s.trim()||e.length>100;return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("button",{type:"button",onClick:n?()=>r(e=>!e):void 0,title:n?t?"Hide full brief":"Click to show full brief":s,disabled:!n,className:"block w-full min-w-0 text-left disabled:cursor-default",children:(0,a.jsx)("h1",{className:"truncate text-sm font-medium tracking-tight",children:s})}),n&&t&&(0,a.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90",children:e})]})}var m=r(6891),u=r(4608),h=r(6289),x=r(4030),g=r(3734);let f=Object.fromEntries(Object.entries(g.r2).map(([e,t])=>[e,t.gradient]));var b=r(2956),y=r(3149);function w({state:e}){switch(e){case"done":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-400",children:[(0,a.jsx)(b.A,{className:"h-3 w-3"})," DONE"]});case"errored":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium text-destructive",children:[(0,a.jsx)(x.A,{className:"h-3 w-3"})," ERRORED"]});case"working":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:[(0,a.jsx)(y.A,{className:"h-3 w-3 animate-spin"})," WORKING"]});case"pending":return(0,a.jsx)("span",{className:"flex items-center gap-1 rounded-md bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/80",children:"QUEUED"});default:return(0,a.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:"IDLE"})}}function v({participant:e,isActive:t,liveTail:r,chatTerminal:s,chatId:n,reviewOnly:d,swaps:i}){var l,c;let p,b,[y,j]=(0,o.useState)(!1),N=function(e){let t;if(!e)return null;let r=e.trimStart();if(!/^##\s+(?:REVIEWER|DOER)\s+FAILED/i.test(r))return null;let a=r.match(/\*\*Kind:\*\*\s*(.+?)(?:\n|$)/),s=a?a[1].trim():"failed",n=r.match(/\*\*Resets:\*\*\s*(.+?)(?:\n|$)/);if(n){let e=Date.parse(n[1].trim());Number.isFinite(e)&&(t=e)}let d=r.search(/\n\n[^*]/),i=d>=0?r.slice(d+2).trim():"",o=i.length>0?i:"(no error message reported)",l=function(e){switch(e){case"quota_exhausted":return"Check your subscription dashboard or swap the account in CHORUS_CODEX_HOME / chorus settings.";case"stream_failure":return"Subprocess died mid-stream — check disk space and CLI version.";case"cli_failed":case"cli_error":return"Re-auth the CLI (codex/gemini/opencode login) and retry.";default:return}}(s);return{kind:s,message:o,...l?{cta:l}:{},...t?{resetAt:t}:{}}}(e.answer),A=e.pending?"pending":e.hasAnswer?"done":N||s?"errored":"working",$="opencode-cli"===e.binaryUsed?"opencode":e.lineage;return(0,a.jsxs)("div",{className:`flex h-[320px] flex-col overflow-hidden rounded-lg border transition-[opacity,border-color,box-shadow] duration-300 ${f[$]??"bg-card"} ${"done"===A?"border-emerald-500/30":"working"===A?"border-primary/60 shadow-[0_0_0_1px_rgba(124,58,237,0.25),0_0_24px_-6px_rgba(124,58,237,0.45)] animate-pulse-soft":"errored"===A?"border-destructive/40":"pending"===A?"border-border/40 opacity-50 grayscale-[0.6]":"border-border"}`,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-card/60 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-xs leading-none",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,g.JR)($)} ${"working"===A?"animate-pulse-soft":""}`}),(0,a.jsx)("span",{className:"font-medium capitalize text-foreground",children:e.role}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,a.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,g.u5)($)}),(e.modelUsed??e.model)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,a.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:e.modelUsed??e.model})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:["working"===A&&n&&(0,a.jsx)("button",{type:"button",disabled:y,onClick:async()=>{if(!y){j(!0);try{let t=await fetch(`/api/daemon/chats/${n}/participants/${encodeURIComponent(e.participant)}/cancel`,{method:"POST"});if(!t.ok)return void j(!1);let r=await t.json();if(!r.ok){window.alert(`Couldn't cancel: ${r.error?.message??"unknown error"}`),j(!1);return}setTimeout(()=>j(!1),15e3)}catch{j(!1)}}},"aria-label":"Cancel this reviewer",title:"Cancel this reviewer (chat continues with others)",className:"grid h-6 w-6 shrink-0 place-items-center rounded-md border border-border bg-card/40 text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)(m.A,{className:"h-3 w-3"})}),(0,a.jsx)(w,{state:A})]})]}),i&&i.length>0&&(b=i.slice().sort((e,t)=>e.fallbackIdx-t.fallbackIdx),(0,a.jsx)("div",{className:"space-y-1.5 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px]",children:b.map((e,t)=>{let r="lineage_fallback"===e.reason,s=t===b.length-1;return(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(u.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-300"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:r?"Cross-lineage fallback":"Model fallback"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-amber-100/90",children:[(0,a.jsxs)("span",{className:"text-amber-100/60 line-through",children:[e.fromLineage,"/",e.fromModel]}),(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0 text-amber-300"}),(0,a.jsxs)("span",{className:s?"font-medium text-amber-100":"text-amber-100/60 line-through",children:[e.toLineage,"/",e.toModel]}),s&&(0,a.jsx)("span",{className:"rounded bg-amber-500/15 px-1 py-0.5 font-mono text-[9px] text-amber-200",children:"actually ran"})]})]})]},`${e.fromLineage}-${e.fromModel}-${t}`)})})),e.warnings&&e.warnings.length>0&&(0,a.jsx)("div",{className:"space-y-1 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px] text-amber-200/90",children:e.warnings.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,a.jsx)(x.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-400"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:e.kind}),(0,a.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11px] leading-snug text-amber-100/85",children:e.message})]})]},t))}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-3 font-mono text-xs leading-relaxed text-muted-foreground",children:e.findingsPreview&&e.findingsPreview.length>0?e.findingsPreview.map((e,t)=>(0,a.jsx)("div",{className:"py-0.5 text-foreground/90",children:e},t)):"working"===A&&r&&r.length>0?(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col-reverse overflow-y-auto",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:r})}):"working"===A?(0,a.jsx)("div",{className:"text-muted-foreground",children:"Thinking…"}):"pending"===A?(0,a.jsx)("div",{className:"text-muted-foreground/70",children:d?"Queued — waiting for an open slot.":"Queued — runs after the doer."}):"errored"===A?N?(0,a.jsxs)("div",{className:"space-y-1.5 text-destructive/90",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider",children:N.kind}),N.resetAt&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:["Resets ",function(e){let t=e-Date.now();if(t<=0)return"now";let r=Math.round(t/1e3);if(r<60)return`in ${r}s`;let a=Math.round(r/60);if(a<60)return`in ${a}m`;let s=Math.round(a/60);if(s<24){let t=new Date(e);return`at ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}let n=Math.round(s/24);return`in ${n}d`}(N.resetAt)]})]}),(0,a.jsx)("div",{className:"whitespace-pre-wrap break-words text-foreground/85",children:N.message}),N.cta&&(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground/80",children:N.cta})]}):(0,a.jsx)("div",{className:"text-destructive/80",children:"The program finished but didn't produce any output."}):"done"===A&&e.answer?(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:e.answer})}):(0,a.jsx)("div",{className:"text-muted-foreground/70",children:"No output yet."})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-border bg-card/60 px-4 py-2 font-mono text-[10px] text-muted-foreground",children:[(0,a.jsx)("span",{className:"truncate",children:e.binaryUsed??e.agentName}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[void 0!==e.durationMs&&(0,a.jsx)("span",{title:"Wall-clock time the CLI took to finish.",children:function(e){if(e<1e3)return`${e} ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=Math.floor(t/60),a=Math.round(t-60*r);return`${r}m${a.toString().padStart(2,"0")}s`}(e.durationMs)}),e.usage?.costUsd!==void 0&&(0,a.jsx)("span",{title:"USD cost reported by the CLI for this run.",children:(l=e.usage.costUsd)<=0?"$0.00":l<.01?"<$0.01":l<1?`$${l.toFixed(3)}`:`$${l.toFixed(2)}`}),e.usage&&k(e.usage)&&(0,a.jsx)("span",{title:(c=e.usage,p=[],void 0!==c.inputTokens&&p.push(`in ${c.inputTokens.toLocaleString()}`),void 0!==c.outputTokens&&p.push(`out ${c.outputTokens.toLocaleString()}`),void 0!==c.cachedInputTokens&&p.push(`cached ${c.cachedInputTokens.toLocaleString()}`),p.join(" \xb7 ")),children:k(e.usage)}),(0,a.jsx)("span",{children:e.hasAnswer?`${(e.answer?.length??0).toLocaleString()} B`:"—"})]})]})]})}function k(e){let t=(e.inputTokens??0)+(e.outputTokens??0);return t<=0?null:t<1e3?`${t} tok`:`${(t/1e3).toFixed(1)}k tok`}function j({round:e,isLatest:t,activeFor:r,liveTails:s,chatTerminal:n,reviewOnly:d,chatId:i,swaps:o}){let l=d?e.participants.filter(e=>"doer"!==e.role):e.participants,c=(o??[]).filter(t=>t.round===e.round);return(0,a.jsxs)("section",{children:[!d&&(0,a.jsxs)("h2",{className:"mb-3 text-xs uppercase tracking-wider text-muted-foreground",children:["Round ",e.round,t&&(0,a.jsx)("span",{className:"ml-2 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"current"})]}),(0,a.jsx)("div",{className:"grid items-start gap-4 sm:grid-cols-2 xl:grid-cols-3",children:l.map(e=>{let t;return(0,a.jsx)(v,{participant:e,isActive:r(e),liveTail:s[e.participant],chatTerminal:n,chatId:i,reviewOnly:d,swaps:(t=e.participant.replace(/^(reviewer-|doer-)/,""),c.filter(e=>e.agent===t))},e.participant)})})]})}let N={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli",openrouter:"openrouter"},A={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi"},$={drafting:{text:"DRAFTING \xb7 doer working",color:"primary"},reviewing:{text:"REVIEWING \xb7 cross-lineage check",color:"primary"},approved:{text:"APPROVED",color:"emerald"},merged:{text:"PR OPENED",color:"emerald"},blocked:{text:"BLOCKED \xb7 ship error",color:"amber"},no_review:{text:"NO REVIEW \xb7 reviewers unavailable",color:"amber"},failed:{text:"FAILED",color:"destructive"},cancelled:{text:"CANCELLED",color:"muted"}},M={primary:"bg-primary",emerald:"bg-emerald-400",amber:"bg-amber-400",destructive:"bg-destructive",muted:"bg-muted-foreground"},E=["approved","merged","blocked","failed","cancelled","no_review"];function C(e,t){return t&&t.startsWith("openrouter:")?"openrouter":A[e]??e}let S=(0,d.A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),_=(0,d.A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var R=r(8420),I=r(5902);function T({chatId:e,status:t,isTerminal:r,template:s,onCancel:d}){let i=(0,I.useRouter)(),[l,c]=(0,o.useState)(!1),[p,u]=(0,o.useState)(!1),h=async()=>{c(!0);try{let t=await fetch(`/api/daemon/chats/${e}/rerun`,{method:"POST"});if(!t.ok){window.alert("Couldn't start a new run — Chorus didn't respond. Try restarting it from your terminal: chorus start"),c(!1);return}let r=await t.json();if(!r.ok){let e=r.error?.message??"Unknown error from Chorus.";window.alert(`Couldn't start a new run: ${e}`),c(!1);return}let a=r.data?.slug??r.data?.id;a?(i.push(`/runs/${a}`),i.refresh()):(window.alert("Chorus accepted the retry but didn't return a chat id. Refresh and try again."),c(!1))}catch{window.alert("Retry failed. Network error."),c(!1)}},x=async()=>{if(window.confirm("Delete this chat permanently? This removes all reviewer output and history. You cannot undo this.")){u(!0);try{(await fetch(`/api/daemon/chats/${e}`,{method:"DELETE"})).ok?(i.push("/runs"),i.refresh()):(window.alert("Couldn't delete this chat — Chorus didn't respond. Try restarting it from your terminal: chorus start"),u(!1))}catch{window.alert("Delete failed. Network error."),u(!1)}}};return(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:["cancelled"===t||"failed"===t?(0,a.jsxs)("button",{type:"button",disabled:l,onClick:h,className:"flex items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary transition hover:border-primary hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(S,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),l?"Restarting…":"Retry"]}):(0,a.jsxs)("button",{type:"button",disabled:r,onClick:async()=>{await fetch(`/api/daemon/chats/${e}/cancel`,{method:"POST"}),d()},className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(m.A,{className:"h-3.5 w-3.5"}),"Cancel"]}),r&&s&&(0,a.jsxs)(n(),{href:`/new?template=${encodeURIComponent(s.id)}`,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)(_,{className:"h-3.5 w-3.5"}),"Run again"]}),(0,a.jsxs)("button",{type:"button",disabled:p,onClick:x,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(R.A,{className:"h-3.5 w-3.5"}),p?"Deleting…":"Delete"]})]})}var L=r(52),D=r(2116),O=r(2865),P=r(9410),U=r(9208),z=r(7618),V=r(4579),F=r(9812),H=r(9707);let W={review:L.A,review_only:L.A,plan:D.A,spec:O.A,tests:P.A,implement:U.A,verify:z.A,pr:V.A,divergence:u.A,recon:F.A},q={pending:"bg-muted-foreground/20 text-muted-foreground",active:"bg-primary/20 text-primary ring-2 ring-primary/40 ring-offset-2 ring-offset-background",done:"bg-emerald-500/20 text-emerald-300",blocked:"bg-amber-500/20 text-amber-300",skipped:"bg-muted-foreground/10 text-muted-foreground/50 line-through"},G={pending:"queued",active:"active",done:"done",blocked:"blocked",skipped:"skipped"};function K({phases:e,activeIndex:t,states:r,onSelect:s}){return(0,a.jsx)("div",{className:"flex items-center gap-0 overflow-x-auto pb-1",children:e.map((n,d)=>{let i=r[d]??"pending",o=W[n.kind],l=s&&("done"===i||"active"===i);return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("button",{type:"button",disabled:!l,onClick:()=>l&&s?.(d),className:`group flex items-center gap-2 rounded-md border px-3 py-1.5 text-left transition ${d===t?"border-primary/40 bg-primary/5":"done"===i?"border-emerald-500/30 bg-emerald-500/5":"blocked"===i?"border-amber-500/40 bg-amber-500/5":"border-border bg-card/30"} ${l?"hover:border-foreground/30":"cursor-default"}`,children:[(0,a.jsx)("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-md ${q[i]}`,children:"done"===i?(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}):"active"===i?(0,a.jsx)(y.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(o,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)("span",{className:"flex flex-col leading-tight",children:[(0,a.jsxs)("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[String(d+1).padStart(2,"0")," \xb7 ",G[i]]}),(0,a.jsx)("span",{className:`text-xs font-medium ${"skipped"===i?"text-muted-foreground/50":"text-foreground"}`,children:n.name})]})]}),d<e.length-1&&(0,a.jsx)("span",{className:`mx-1.5 h-px w-6 ${"done"===r[d]?"bg-emerald-500/40":"bg-border"}`})]},n.id)})})}function Q({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:d,prUrl:i,shipError:o}){return(0,a.jsx)("div",{className:"border-b border-border bg-card/20 px-4 py-3 sm:px-8",children:(0,a.jsxs)("div",{className:"mx-auto flex w-full flex-col gap-3",children:[i&&(0,a.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-300",children:[(0,a.jsx)(b.A,{className:"h-4 w-4"}),"Pull request opened"]}),(0,a.jsx)("a",{href:i,target:"_blank",rel:"noreferrer",className:"rounded-md border border-emerald-500/40 bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-300 transition hover:bg-emerald-500/20",children:"View PR →"})]}),(0,a.jsx)("p",{className:"mt-1 break-all font-mono text-[11px] text-emerald-200/70",children:i})]}),o&&!i&&(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300",children:[(0,a.jsx)(x.A,{className:"h-4 w-4"}),"Ship phase blocked"]}),(0,a.jsx)("p",{className:"mt-1 break-words font-mono text-[11px] text-amber-200/80",children:o}),(0,a.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-muted-foreground",children:"The reviewers approved the doer's output, but chorus couldn't open a PR. Resolve the issue above and re-run."})]}),e?.phases&&e.phases.length>0&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(K,{phases:e.phases,activeIndex:Math.min(s,r-1),states:e.phases.map((e,r)=>"approved"===t?"done":"no_review"===t?r<s?"done":"blocked":"failed"===t||"cancelled"===t?r<s?"done":"skipped":r<s?"done":r===s?"active":"pending")})}),(0,a.jsx)(J,{template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:d})]})})}function J({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:d}){let i=e?.maxRounds??1,o="approved"===t||"merged"===t||"no_review"===t||"blocked"===t||"failed"===t||"cancelled"===t,l=r>1,c=!l&&i>1,p=d[d.length-1],m=p?.participants.filter(e=>"reviewer"===e.role)??[],u=m.length,h=m.filter(e=>e.hasAnswer).length;if(!l&&!c&&!(!l&&!c&&u>1))return null;let x=l?r:c?i:u,g=l?Math.min(s,r):c?Math.min(Math.max(n.length,1),i):h,f=l&&o?x:g,b=l?`${f} / ${x} phases`:c?`Round ${f} / ${x}`:`${f} / ${x} complete`;return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-xs items-center gap-2",children:[(0,a.jsx)("div",{className:"flex h-1 flex-1 overflow-hidden rounded-full bg-muted",children:(0,a.jsx)("div",{className:`transition-[width] duration-700 ease-out ${"approved"===t?"bg-emerald-400":"bg-primary"}`,style:{width:`${f/x*100}%`}})}),(0,a.jsx)("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground",children:b})]})}function Y({chatId:e,initialStatus:t,initialRounds:r,templateId:s,template:d,work:c,projectName:m,initialPrUrl:u,initialShipError:h,initialVerdict:x,demoDataSource:f}){var b,y;let[w,v]=(0,o.useState)(t),[k,A]=(0,o.useState)(x),[S,_]=(0,o.useState)(r),[R,I]=(0,o.useState)(new Set),[L,D]=(0,o.useState)(u),[O,P]=(0,o.useState)(h),[U,z]=(0,o.useState)({}),[V,F]=(0,o.useState)(-1),[H,W]=(0,o.useState)({}),[q,G]=(0,o.useState)([]),K=e=>`${e.round}:${e.phaseId}:${e.role}:${e.agent}:${e.fromLineage}:${e.fromModel}`,J=e=>{G(t=>{let r=new Set(t.map(K)),a=[...t];for(let t of e){let e=K(t);r.has(e)||(r.add(e),a.push(t))}return a})},B=E.includes(w);(0,o.useEffect)(()=>{if(B||f)return;let t=setInterval(async()=>{try{let t=await fetch(`/api/run-artifacts/${e}`);if(!t.ok)return;let r=await t.json();_(r.rounds),Array.isArray(r.swaps)&&r.swaps.length>0&&J(r.swaps)}catch{}},8e3);return()=>clearInterval(t)},[e,B,f]),(0,o.useEffect)(()=>{if(B)return;let t=f?f.createEventSource():new EventSource(`/api/daemon/chats/${e}/stream`);return t.onmessage=r=>{try{let a=JSON.parse(r.data),s=a.payload.role,n=a.payload.agent,d=a.payload.phaseId;if("phase_start"===a.type&&s&&n&&d&&(I(e=>{let t=new Set(e);return t.add(`${s}-${n}-${d}`),t}),f)){let e=f.fetchArtifacts();_(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}if("phase_progress"===a.type&&s&&n){let e=a.payload.output;if("string"==typeof e&&e.length>0){let t=`${s}-${n}`;z(r=>({...r,[t]:e}))}}if(("phase_done"===a.type||"phase_failed"===a.type)&&(I(new Set),"phase_done"===a.type)){let e=a.payload?.phaseIdx??-1;Number.isInteger(e)&&e>=0&&F(t=>e>t?e:t)}if("cli_warning"===a.type&&n&&s){let e="doer"===s?`doer-${n}`:`reviewer-${n}`,t=a.payload.reason??void 0,r=t??a.payload.kind??"warning",d=a.payload.message??"(no detail)";if(W(t=>{let s={...t},n=s[e]??[];return n.some(e=>e.kind===r&&e.message===d)?t:(s[e]=[...n,{kind:r,message:d,ts:a.ts??Date.now()}],s)}),("lineage_fallback"===t||"model_fallback"===t)&&"string"==typeof a.payload.fromLineage&&"string"==typeof a.payload.toLineage){let e=a.payload.round??1,r=a.payload.phaseId??"",d=a.payload.fromModel??"(default)",i=a.payload.toModel??"(default)",o=a.payload.fallbackIdx??0,l={round:e,phaseId:r,role:s,agent:n,reason:t,fromLineage:a.payload.fromLineage,toLineage:a.payload.toLineage,fromModel:d,toModel:i,fallbackIdx:o,ts:a.ts??Date.now()};G(e=>{let t=K(l);return e.some(e=>K(e)===t)?e:[...e,l]})}}if("participant_done"===a.type)if(f){let e=f.fetchArtifacts();_(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}else fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{e&&(_(e.rounds),Array.isArray(e.swaps)&&J(e.swaps))}).catch(()=>{});if("chat_done"===a.type){let r=a.payload.status;"merged"===r?v("merged"):"blocked"===r?v("blocked"):"no_review"===r?v("no_review"):"failed"===r?v("failed"):"cancelled"===r?v("cancelled"):v("approved");let s=a.payload.verdict;"string"==typeof s&&s.length>0&&A(s);let n=a.payload.prUrl;"string"==typeof n&&n.length>0&&D(n);let d=a.payload.shipError;if("string"==typeof d&&d.length>0&&P(d),t.close(),f){let e=f.fetchArtifacts();_(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}else fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{e&&(_(e.rounds),Array.isArray(e.swaps)&&J(e.swaps))}).catch(()=>{})}}catch{}},()=>t.close()},[e,B,f]),(0,o.useEffect)(()=>{if(f)return;let t=!1;return fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{!t&&e&&Array.isArray(e.swaps)&&J(e.swaps)}).catch(()=>{}),()=>{t=!0}},[e,f]);let X=(b=w,y=k,"approved"===b&&y&&"approved"!==y?"request_changes"===y?{text:"REVIEW \xb7 CHANGES REQUESTED",color:"amber"}:{text:`REVIEW \xb7 ${y.toUpperCase()}`,color:"amber"}:$[b]??{text:b.toUpperCase(),color:"muted"}),Z=d?.phases?.length??1,ee=(0,o.useMemo)(()=>"approved"===w||"merged"===w||"no_review"===w||"blocked"===w?Z:"failed"===w||"cancelled"===w?0:Math.min(Math.max(0,V+1),Z),[w,Z,V]),et=(0,o.useMemo)(()=>(0,l.$)(d),[d]),er=(0,o.useMemo)(()=>(function(e,t,r){if(!t?.phases?.length)return e;let a=(0,l.$)(t),s=function(e,t){let r=e.phases[0],a=(e,t)=>t?.[0]??(0,g.YM)(e),s=[];if(!t){let e=r.doer.models?.[0],t=C(r.doer.lineage,e);s.push({role:"doer",lineage:t,model:e??a(t,r.doer.models)})}for(let[e,t]of(r.reviewer?.candidatesWithModels??[]).entries()){let r=t.models?.[0],n=C(t.lineage,r);s.push({role:"reviewer",lineage:n,model:r??a(n,t.models),reviewerIdx:e})}return s}(t,a);return e.map(e=>{let t=[],a=new Set;for(let n of s){let s="doer"===n.role?`doer-${n.lineage}`:`reviewer-${n.lineage}-${n.reviewerIdx}`,d=e.participants.find(e=>"doer"===n.role?"doer"===e.role&&e.lineage===n.lineage:"reviewer"===e.role&&e.lineage===n.lineage&&parseInt(e.participant.match(/-(\d+)$/)?.[1]??"0",10)===n.reviewerIdx);d?(t.push({...d,model:n.model,...r[d.participant]?{warnings:r[d.participant]}:{}}),a.add(d.participant)):t.push({participant:s,role:n.role,agentName:N[n.lineage]??n.lineage,lineage:n.lineage,hasAnswer:!1,model:n.model,pending:!0,...r[s]?{warnings:r[s]}:{}})}for(let s of e.participants)a.has(s.participant)||t.push({...s,...r[s.participant]?{warnings:r[s.participant]}:{}});return{...e,participants:t}})})(S,d,H),[S,d,H]),ea=er[er.length-1],es=er.slice(0,-1);return(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-20 border-b border-border bg-card/80 backdrop-blur-sm px-4 py-3 sm:px-8",children:[(0,a.jsxs)("div",{className:"mb-2 flex w-full items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsxs)(n(),{href:"/runs",className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",children:[(0,a.jsx)(i,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:m??"Runs"})]}),(0,a.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,a.jsxs)("span",{title:X.text,className:"inline-flex shrink-0 items-center gap-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${M[X.color]} ${B?"":"animate-pulse-soft"}`}),w]}),(d||s)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,a.jsxs)(n(),{href:`/templates${d?`#${encodeURIComponent(d.id)}`:""}`,title:d?`Template: ${d.name}`:`Template (deleted): ${s}`,className:"inline-flex min-w-0 shrink items-center gap-1.5 text-[11px] text-muted-foreground transition hover:text-primary",children:[(0,a.jsx)("span",{className:"font-mono uppercase tracking-wider",children:"tpl"}),(0,a.jsx)("span",{className:"truncate font-medium text-foreground",children:d?.name??s})]})]})]}),(0,a.jsx)(T,{chatId:e,status:w,isTerminal:B,template:d,onCancel:()=>v("cancelled")})]}),(0,a.jsx)("div",{className:"min-w-0",children:(0,a.jsx)(p,{work:c})})]}),(0,a.jsx)(Q,{template:d,status:w,totalPhases:Z,completedPhaseCount:ee,rounds:S,enrichedRounds:er,prUrl:L,shipError:O}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-6 sm:px-8",children:(0,a.jsxs)("div",{className:"mx-auto w-full space-y-8",children:[0===S.length&&(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:"Waiting for first phase to start…"}),ea&&(0,a.jsx)(j,{round:ea,isLatest:!0,activeFor:e=>{let t=`${e.participant}-`;for(let e of R)if(e.startsWith(t))return!0;return!1},liveTails:U,chatTerminal:B,reviewOnly:et,chatId:e,swaps:q}),!et&&es.length>0&&(0,a.jsxs)("details",{className:"rounded-lg border border-border bg-card",children:[(0,a.jsxs)("summary",{className:"cursor-pointer px-4 py-3 text-xs uppercase tracking-wider text-muted-foreground hover:text-foreground",children:["Earlier rounds (",es.length,")"]}),(0,a.jsx)("div",{className:"space-y-6 border-t border-border p-4",children:es.slice().reverse().map(e=>(0,a.jsx)(j,{round:e,activeFor:()=>!1,liveTails:{},chatTerminal:B,swaps:q},e.round))})]})]})})]})}},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},7618:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},8420:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},9208:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},9410:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("test-tube-diagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]])},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9812:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=4720)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[529],{1240:(e,r,t)=>{Promise.resolve().then(t.bind(t,821)),Promise.resolve().then(t.bind(t,8344)),Promise.resolve().then(t.bind(t,2897))},2897:(e,r,t)=>{"use strict";t.d(r,{RunsTable:()=>c});var s=t(9442),a=t(9812),n=t(6891),o=t(2573),l=t.n(o),d=t(6074),i=t(5702),u=t(7296);function c({chats:e}){let[r,t]=(0,d.useState)(""),[o,m]=(0,d.useState)(""),[x,b]=(0,d.useState)(""),v=(0,d.useMemo)(()=>{let r=new Set;for(let t of e)r.add(t.templateId);return Array.from(r).sort()},[e]),g=(0,d.useMemo)(()=>{let r=new Set;for(let t of e)r.add(t.status);return Array.from(r).sort()},[e]),h=(0,d.useMemo)(()=>{let t=r.trim().toLowerCase();return e.filter(e=>(!o||e.templateId===o)&&(!x||e.status===x)&&(!t||(0,u.t)(e.work).toLowerCase().includes(t)||e.work.toLowerCase().includes(t)||e.id.toLowerCase().includes(t)||(e.slug??"").toLowerCase().includes(t)))},[e,r,o,x]),f=!!(r||o||x);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsxs)("div",{className:"relative flex-1",children:[(0,s.jsx)(a.A,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)("input",{type:"search",value:r,onChange:e=>t(e.target.value),placeholder:"Search by title, work, chat id, or slug…",className:"w-full rounded-md border border-border bg-card py-2 pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary/40 focus:outline-none"})]}),(0,s.jsxs)("select",{value:o,onChange:e=>m(e.target.value),className:"rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-primary/40 focus:outline-none","aria-label":"Filter by template",children:[(0,s.jsx)("option",{value:"",children:"All templates"}),v.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}),(0,s.jsxs)("select",{value:x,onChange:e=>b(e.target.value),className:"rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-primary/40 focus:outline-none","aria-label":"Filter by status",children:[(0,s.jsx)("option",{value:"",children:"All statuses"}),g.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}),f&&(0,s.jsxs)("button",{type:"button",onClick:()=>{t(""),m(""),b("")},className:"flex items-center gap-1 rounded-md border border-border bg-card px-3 py-2 text-xs text-muted-foreground transition hover:border-destructive/40 hover:text-destructive",children:[(0,s.jsx)(n.A,{className:"h-3 w-3"}),"Clear"]})]}),(0,s.jsx)("p",{className:"mb-3 text-xs text-muted-foreground",children:h.length===e.length?`${e.length} chat${1===e.length?"":"s"}`:`${h.length} of ${e.length} chat${1===e.length?"":"s"}`}),(0,s.jsx)("div",{className:"space-y-2",children:0===h.length?(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card/30 p-8 text-center",children:(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:f?"No chats match these filters.":"No chats yet. Start a new one!"})}):h.map(e=>(0,s.jsx)(l(),{href:`/runs/${e.slug||e.id}`,className:"group flex items-start justify-between gap-4 rounded-lg border border-border bg-card p-4 transition hover:border-muted-foreground/30 hover:bg-card/80",children:(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:e.status}),(0,s.jsx)(i.E,{variant:"outline",className:"border-border font-mono text-[10px]",children:e.templateId})]}),(0,s.jsx)("h3",{className:"line-clamp-1 text-sm font-medium text-foreground",children:(0,u.t)(e.work)}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]})},e.id))})]})}},5702:(e,r,t)=>{"use strict";t.d(r,{E:()=>d});var s=t(9442);t(6074);var a=t(9056),n=t(8113),o=t(7362);let l=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function d({className:e,variant:r="default",asChild:t=!1,...a}){let i=t?n.bL:"span";return(0,s.jsx)(i,{"data-slot":"badge","data-variant":r,className:(0,o.cn)(l({variant:r}),e),...a})}},9056:(e,r,t)=>{"use strict";t.d(r,{F:()=>o});var s=t(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,o=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return n(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:o,defaultVariants:l}=r,d=Object.keys(o).map(e=>{let r=null==t?void 0:t[e],s=null==l?void 0:l[e];if(null===r)return null;let n=a(r)||a(s);return o[e][n]}),i=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return n(e,d,null==r||null==(s=r.compoundVariants)?void 0:s.reduce((e,r)=>{let{class:t,className:s,...a}=r;return Object.entries(a).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...l,...i}[r]):({...l,...i})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}},9812:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(3884).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=1240)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{52:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>o});var s=r(9442);r(6074);var a=r(7362);function o({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},2471:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3761:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},3810:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Z});var s=r(9442),a=r(6074),o=r(3884);let n=(0,o.A)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var d=r(9208),l=r(4372),i=r(6457);let c=(0,o.A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var u=r(3761);let m=(0,o.A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var x=r(6441),h=r(5702),p=r(63),f=r(9707),b=r(2471);let g=[{id:"read",name:"Read files",description:"cat, less, head, file open"},{id:"list",name:"List & search",description:"ls, grep, find, ripgrep"},{id:"write",name:"Write files",description:"Edit, Write inside allowed dirs"},{id:"exec",name:"Run commands",description:"Bash, npm, pnpm, python, go"},{id:"net",name:"Network access",description:"curl, fetch, package install"},{id:"outside-cwd",name:"Writes outside working dir",description:"Anything outside the allowed paths below"}],y={read:"auto",list:"auto",write:"ask",exec:"ask",net:"ask","outside-cwd":"block"},v={read:"auto",list:"auto",write:"block",exec:"ask",net:"ask","outside-cwd":"block"},j={auto:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",ask:"bg-amber-500/15 text-amber-300 border-amber-500/30",block:"bg-rose-500/15 text-rose-300 border-rose-500/30"};function w(e){return"auto"===e?"ask":"ask"===e?"block":"auto"}function k({id:e,icon:t,title:r,subtitle:a,children:o}){return(0,s.jsxs)(p.Zp,{id:e,className:"mt-6 scroll-mt-20 bg-card p-5",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,s.jsx)("span",{className:"rounded-md border border-border bg-card/60 p-1.5 text-foreground/70",children:t}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h2",{className:"text-sm font-medium text-foreground",children:r}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a})]})]}),o]})}function N({label:e,children:t}){return(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-1.5 block text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:e}),t]})}function C({policy:e,onCycle:t,role:r}){return(0,s.jsx)("button",{type:"button",onClick:t,className:`justify-self-end rounded-md border px-2.5 py-1 font-mono text-[10px] uppercase tracking-wider transition hover:scale-105 ${j[e]}`,title:`${r}: cycle policy`,children:e})}function A({kind:e,current:t,onSelect:r,icon:a,title:o,tagline:n,features:d,tradeoff:l}){let i=e===t;return(0,s.jsxs)("button",{type:"button",onClick:r,className:`flex w-full items-start gap-3 rounded-lg border p-3.5 text-left transition ${i?"border-primary/40 bg-primary/5 ring-2 ring-primary/30 ring-offset-2 ring-offset-background":"border-border bg-card/40 hover:border-foreground/30"}`,children:[(0,s.jsx)("span",{className:`mt-0.5 grid h-7 w-7 shrink-0 place-items-center rounded-md ${i?"bg-primary/20 text-primary":"bg-card text-muted-foreground"}`,children:a}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-foreground",children:o}),(0,s.jsx)(h.E,{variant:"outline",className:"border-border font-mono text-[10px]",children:n})]}),(0,s.jsx)("ul",{className:"mt-1.5 space-y-0.5 text-[11px] text-muted-foreground",children:d.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,s.jsx)(f.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-400/60"}),(0,s.jsx)("span",{children:e})]},e))}),(0,s.jsxs)("div",{className:"mt-2 flex items-start gap-1.5 text-[10px] text-muted-foreground",children:[(0,s.jsx)(b.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-muted-foreground/60"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-medium text-foreground/80",children:"Trade-off:"})," ",l]})]})]}),i&&(0,s.jsx)(f.A,{className:"mt-1 h-4 w-4 shrink-0 text-primary"})]})}function S(){let[e,t]=(0,a.useState)(null),[r,o]=(0,a.useState)(void 0),[n,d]=(0,a.useState)(null),[l,i]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let e=!1;return(0,x.Dl)().then(r=>{e||(t(r.mode),o(r.descriptions))}).catch(t=>{e||i(t instanceof Error?t.message:"Could not load billing mode.")}),()=>{e=!0}},[]),(0,s.jsxs)(k,{icon:(0,s.jsx)(m,{className:"h-4 w-4"}),title:"Billing mode",subtitle:"How you pay for the AI CLIs chorus drives. Affects what the cost preview shows on the new-chat page — defaults to API rates so the number stays honest until you tell us otherwise.",children:[l&&(0,s.jsx)("div",{className:"mb-3 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:l}),(0,s.jsx)("div",{className:"grid gap-2",children:["api","subscription","mixed"].map(a=>{let o=e===a,l=n===a,c=r?.[a];return(0,s.jsxs)("button",{type:"button",onClick:()=>{e===a||n||(d(a),i(null),(0,x.A1)({mode:a}).then(e=>t(e.mode)).catch(e=>{i(e instanceof Error?e.message:"Save failed.")}).finally(()=>d(null)))},disabled:null!==n||null===e,className:`flex flex-col gap-1 rounded-lg border p-3 text-left transition ${o?"border-primary/50 bg-primary/10":"border-border bg-card hover:border-muted-foreground/30"} ${null!==n?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:c?.label??a}),o&&(0,s.jsx)("span",{className:"rounded bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-primary",children:l?"saving…":"active"})]}),(0,s.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:c?.description??""})]},a)})})]})}let T=(0,o.A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var M=r(6527),D=r(4030),E=r(6891),$=r(9315),P=r(7978);let _=(0,o.A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),O=(0,o.A)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),R=(0,o.A)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),U=(0,o.A)("webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]),L=(0,o.A)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var z=r(3149);let I=(0,o.A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);function W(e){return(0,s.jsxs)("div",{className:"mt-2 select-none opacity-60 [&_*]:pointer-events-none","aria-disabled":"true",children:[(0,s.jsxs)(k,{icon:(0,s.jsx)(T,{className:"h-4 w-4"}),title:"Concurrency",subtitle:"How many chats Chorus runs in parallel. Overflow waits in a queue.",children:[(0,s.jsxs)("div",{className:"flex items-center gap-6",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("input",{type:"range",min:1,max:10,step:1,value:e.maxConcurrent,onChange:t=>e.setMaxConcurrent(parseInt(t.target.value,10)),disabled:!0,className:"w-full accent-primary"}),(0,s.jsxs)("div",{className:"mt-1.5 flex justify-between text-[10px] font-mono text-muted-foreground",children:[(0,s.jsx)("span",{children:"1"}),(0,s.jsx)("span",{children:"5"}),(0,s.jsx)("span",{children:"10"})]})]}),(0,s.jsxs)("div",{className:"rounded-md border border-border bg-card px-4 py-2 font-mono text-sm",children:[e.maxConcurrent," concurrent"]})]}),(0,s.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground",children:["Each chat reserves one tmux session + ",3*e.maxConcurrent," reviewer panes. Above this limit new chats land in a FIFO queue."]})]}),(0,s.jsxs)(k,{icon:(0,s.jsx)(M.A,{className:"h-4 w-4"}),title:"Per-tool auto-approve",subtitle:"Drivers write code; reviewers don't. Defaults reflect that. Click any chip to cycle auto / ask / block.",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_120px_120px] gap-3 border-b border-border pb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[(0,s.jsx)("span",{children:"Tool"}),(0,s.jsxs)("span",{className:"flex items-center justify-end gap-1.5",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),"Driver"]}),(0,s.jsxs)("span",{className:"flex items-center justify-end gap-1.5",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-400"}),"Reviewer"]})]}),(0,s.jsx)("div",{className:"mt-1 divide-y divide-border opacity-70",children:g.map(t=>(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_120px_120px] items-center gap-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm text-foreground",children:t.name}),(0,s.jsx)("span",{className:"text-[11px] text-muted-foreground",children:t.description})]}),(0,s.jsx)(C,{policy:e.driverPolicies[t.id],onCycle:()=>e.cyclePolicy("driver",t.id),role:"driver"}),(0,s.jsx)(C,{policy:e.reviewerPolicies[t.id],onCycle:()=>e.cyclePolicy("reviewer",t.id),role:"reviewer"})]},t.id))}),(0,s.jsxs)("p",{className:"mt-3 flex items-start gap-2 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-xs text-amber-100",children:[(0,s.jsx)(D.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-semibold",children:"When wired:"})," ",(0,s.jsx)("code",{className:"rounded bg-amber-400/10 px-1 font-mono text-amber-200",children:"ask"})," ","prompts will appear as cards in the chat — you click"," ",(0,s.jsx)("span",{className:"font-semibold",children:"Approve"})," /"," ",(0,s.jsx)("span",{className:"font-semibold",children:"Deny"})," instead of the agent stalling."]})]})]}),(0,s.jsxs)(k,{icon:(0,s.jsx)(M.A,{className:"h-4 w-4"}),title:"Working directories",subtitle:"Each tmux session is started inside one of these paths. Writes outside are blocked.",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.allowedDirs.map(t=>(0,s.jsxs)("span",{className:"group inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 font-mono text-[11px] text-foreground",children:[t,(0,s.jsx)("button",{type:"button",onClick:()=>e.setAllowedDirs(e.allowedDirs.filter(e=>e!==t)),className:"text-muted-foreground/50 transition hover:text-rose-400","aria-label":`Remove ${t}`,children:(0,s.jsx)(E.A,{className:"h-3 w-3"})})]},t))}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:e.newDir,onChange:t=>e.setNewDir(t.target.value),onKeyDown:t=>"Enter"===t.key&&e.addDir(),placeholder:"~/code/another-project",className:"flex-1 rounded-md border border-border bg-card px-3 py-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),(0,s.jsxs)("button",{type:"button",onClick:e.addDir,className:"flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground transition hover:bg-primary/90",children:[(0,s.jsx)($.A,{className:"h-3.5 w-3.5"}),"Add path"]})]})]}),(0,s.jsx)(k,{icon:(0,s.jsx)(P.A,{className:"h-4 w-4"}),title:"Template defaults",subtitle:"Applied to new templates and one-off chats. Per-template values override these.",children:(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,s.jsx)(N,{label:"Default driver",children:(0,s.jsxs)("select",{value:e.defaultDriver,onChange:t=>e.setDefaultDriver(t.target.value),className:"w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[(0,s.jsx)("option",{value:"claude-code",children:"claude-code"}),(0,s.jsx)("option",{value:"cursor",children:"cursor"}),(0,s.jsx)("option",{value:"codex-cli",children:"codex-cli"}),(0,s.jsx)("option",{value:"windsurf",children:"windsurf"}),(0,s.jsx)("option",{value:"external",children:"external (ask each run)"})]})}),(0,s.jsx)(N,{label:"Default agreement threshold",children:(0,s.jsxs)("select",{value:e.defaultThreshold,onChange:t=>e.setDefaultThreshold(t.target.value),className:"w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[(0,s.jsx)("option",{value:"unanimous",children:"unanimous"}),(0,s.jsx)("option",{value:"majority",children:"majority"}),(0,s.jsx)("option",{value:"any",children:"any"})]})}),(0,s.jsx)(N,{label:"Default cost cap (USD per chat)",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-sm text-muted-foreground",children:"$"}),(0,s.jsx)("input",{type:"number",step:"0.10",min:0,value:e.defaultCostCap,onChange:t=>e.setDefaultCostCap(t.target.value),className:"w-full rounded-md border border-border bg-card px-3 py-2 font-mono text-sm text-foreground focus:border-foreground/30 focus:outline-none"})]})}),(0,s.jsx)(N,{label:"On model error",children:(0,s.jsxs)("select",{defaultValue:"fallback",className:"w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[(0,s.jsx)("option",{value:"fallback",children:"try next fallback model"}),(0,s.jsx)("option",{value:"fail",children:"mark chat failed"}),(0,s.jsx)("option",{value:"ask-user",children:"surface to me"})]})})]})}),(0,s.jsx)(k,{icon:(0,s.jsx)(c,{className:"h-4 w-4"}),title:"Privacy & data path",subtitle:"How prompts and code reach each LLM. Affects what leaves your machine.",children:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(A,{current:e.privacyTier,kind:"local",onSelect:()=>e.setPrivacyTier("local"),icon:(0,s.jsx)(_,{className:"h-4 w-4"}),title:"Local-only (BYO CLIs)",tagline:"Strictest",features:["Daemon runs on your machine; CLIs run on your machine.","Prompts go directly from your machine to each provider.","Chorus sees nothing — not even chat IDs."],tradeoff:"No cloud dashboard, no team sharing, no fallback when a CLI is down."}),(0,s.jsx)(A,{current:e.privacyTier,kind:"proxied",onSelect:()=>e.setPrivacyTier("proxied"),icon:(0,s.jsx)(O,{className:"h-4 w-4"}),title:"Proxied credits",tagline:"Recommended for credits",features:["Stateless edge proxy: prompts transit, never persist.","Stripe-pattern: same payload-handling discipline.","Used only when you spend credits to try a model you don't have."],tradeoff:"One extra hop between you and the provider."}),(0,s.jsx)(A,{current:e.privacyTier,kind:"cloud",onSelect:()=>e.setPrivacyTier("cloud"),icon:(0,s.jsx)(R,{className:"h-4 w-4"}),title:"Cloud workspace",tagline:"Team / multi-machine",features:["Code is cloned into Chorus's cloud workspace.","Transcripts + verdicts kept for audit & retro.","Encrypted at rest; SOC 2 in progress."],tradeoff:"Your code lives on our infra. Read the privacy whitepaper before flipping this on."})]})}),(0,s.jsx)(k,{icon:(0,s.jsx)(U,{className:"h-4 w-4"}),title:"Notifications & MCP",subtitle:"How outer orchestrators (your main Claude / Cursor session) get pinged when a chat finishes or blocks.",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>e.setMcpEnabled(!e.mcpEnabled),className:"flex w-full items-center justify-between rounded-md border border-border bg-card/50 px-3 py-3 text-left transition hover:border-foreground/20",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(L,{className:"mt-0.5 h-4 w-4 text-primary"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm text-foreground",children:"Chorus MCP server"}),(0,s.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["Exposes ",(0,s.jsx)("span",{className:"font-mono",children:"mm.create_chat"}),","," ",(0,s.jsx)("span",{className:"font-mono",children:"mm.update_settings"}),","," ",(0,s.jsx)("span",{className:"font-mono",children:"mm.create_template"})," and 9 other tools. Outer Claude / Cursor / Codex can configure Chorus for you."]})]})]}),(0,s.jsx)("span",{className:`flex h-5 w-9 items-center rounded-full border p-0.5 transition ${e.mcpEnabled?"border-emerald-500/40 bg-emerald-500/20":"border-border bg-card"}`,children:(0,s.jsx)("span",{className:`h-3.5 w-3.5 rounded-full transition-transform ${e.mcpEnabled?"translate-x-4 bg-emerald-400":"bg-muted-foreground/50"}`})})]}),(0,s.jsxs)(N,{label:"Webhook URL (optional)",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"url",value:e.webhookUrl,onChange:t=>e.setWebhookUrl(t.target.value),placeholder:"https://hooks.example.com/chorus",className:"flex-1 rounded-md border border-border bg-card px-3 py-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),(0,s.jsxs)("button",{type:"button",onClick:e.testWebhook,disabled:!e.webhookUrl||"running"===e.webhookTestState,className:`flex items-center gap-1.5 rounded-md border px-3 py-2 text-xs font-medium transition ${"ok"===e.webhookTestState?"border-emerald-500/30 bg-emerald-500/10 text-emerald-300":"fail"===e.webhookTestState?"border-rose-500/30 bg-rose-500/10 text-rose-300":"border-border bg-card text-muted-foreground hover:text-foreground"} disabled:cursor-not-allowed disabled:opacity-50`,children:["running"===e.webhookTestState?(0,s.jsx)(z.A,{className:"h-3.5 w-3.5 animate-spin"}):"ok"===e.webhookTestState?(0,s.jsx)(f.A,{className:"h-3.5 w-3.5"}):"fail"===e.webhookTestState?(0,s.jsx)(D.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(I,{className:"h-3.5 w-3.5"}),"ok"===e.webhookTestState?"204 OK":"fail"===e.webhookTestState?"Failed":"running"===e.webhookTestState?"Posting…":"Test"]})]}),(0,s.jsx)("p",{className:"mt-1.5 text-[11px] text-muted-foreground",children:"Posted on chat finished / blocked / errored. Payload includes chat_id, status, synthesis."})]})]})})]})}var H=r(52);function q(){let[e,t]=(0,a.useState)(null),[r,o]=(0,a.useState)(!1),[n,d]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=!1;return(0,x.Ci)().then(r=>{e||t(r)}).catch(t=>{e||d(t instanceof Error?t.message:"Could not load telemetry status.")}),()=>{e=!0}},[]);let l=e?.envOverride||e?.fileOverride;return(0,s.jsxs)(k,{icon:(0,s.jsx)(H.A,{className:"h-4 w-4"}),title:"Anonymous telemetry",subtitle:"A small heartbeat sent to chorus.codes once per boot + every 24h. Helps us see what versions / OSes are in the wild. No code, no prompts, no chat content.",children:[n&&(0,s.jsx)("div",{className:"mb-3 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:n}),(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card p-3",children:(0,s.jsxs)("label",{className:"flex items-start gap-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:e?.enabled??!1,onChange:s=>{var a;return a=s.target.checked,void(!r&&e&&!l&&(o(!0),d(null),(0,x.WK)(a).then(t).catch(e=>{d(e instanceof Error?e.message:"Save failed.")}).finally(()=>o(!1))))},disabled:r||!e||l,className:"mt-1 h-4 w-4 cursor-pointer accent-primary disabled:cursor-not-allowed"}),(0,s.jsxs)("span",{className:"flex-1",children:[(0,s.jsxs)("span",{className:"block text-sm font-medium",children:["Send anonymous heartbeat",r&&(0,s.jsx)("span",{className:"ml-2 rounded bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-primary",children:"saving…"})]}),(0,s.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:"Sends: install UUID, chorus version, OS, arch, node major, daemon uptime, count of chats in the last 24h. That's it."})]})]})}),l&&(0,s.jsxs)("div",{className:"mt-3 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-100",children:["Telemetry is currently disabled by"," ",e?.envOverride&&(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"CHORUS_TELEMETRY"}),e?.envOverride&&e?.fileOverride&&" and ",e?.fileOverride&&(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"~/.chorus/no-telemetry"}),". The toggle above won't take effect until you remove the override."]}),(0,s.jsxs)("details",{className:"mt-3 text-xs text-muted-foreground",children:[(0,s.jsx)("summary",{className:"cursor-pointer hover:text-foreground",children:"Other ways to opt out"}),(0,s.jsxs)("ul",{className:"mt-2 list-inside list-disc space-y-1 leading-relaxed",children:[(0,s.jsxs)("li",{children:["Set ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"CHORUS_TELEMETRY=0"})," ","in your shell — also accepts ",(0,s.jsx)("code",{children:"false"}),", ",(0,s.jsx)("code",{children:"no"}),","," ",(0,s.jsx)("code",{children:"off"}),"."]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"touch ~/.chorus/no-telemetry"})," ","(cargo / brew convention)."]}),(0,s.jsxs)("li",{children:["Reset your install ID:"," ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"rm ~/.chorus/install-id"})," ","— a fresh UUID is minted on the next heartbeat."]})]}),e?.endpoint&&(0,s.jsxs)("p",{className:"mt-2 leading-relaxed",children:["Endpoint: ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:e.endpoint})]})]})]})}let F=(0,o.A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);function V(){let[e,t]=(0,a.useState)(null),[r,o]=(0,a.useState)(void 0),[n,d]=(0,a.useState)(!0),[l,i]=(0,a.useState)(null),[c,u]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let e=!1;return(0,x.oD)().then(r=>{e||(t(r.transport),o(r.descriptions),d(!1!==r.tmuxAvailable))}).catch(t=>{e||u(t instanceof Error?t.message:"Could not load transport setting.")}),()=>{e=!0}},[]),(0,s.jsxs)(k,{id:"transport",icon:(0,s.jsx)(F,{className:"h-4 w-4"}),title:"Run mode (headless / tmux)",subtitle:"How chorus runs each CLI. Default is headless (faster, lower RAM). Switch to tmux if you want to attach to a live voice and take over mid-run (debug + handoff).",children:[c&&(0,s.jsx)("div",{className:"mb-3 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:c}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:["headless","tmux"].map(a=>{let o=e===a,d=l===a,c=r?.[a],m="tmux"===a&&!n;return(0,s.jsxs)("button",{type:"button",onClick:()=>{e===a||l||(i(a),u(null),(0,x.nr)({transport:a}).then(e=>{t(e.transport)}).catch(e=>{u(e instanceof Error?e.message:"Save failed.")}).finally(()=>i(null)))},disabled:null!==l||null===e||m,title:m?"tmux is not installed on this host. Install it (brew/apt/dnf) then restart the daemon.":void 0,className:`flex flex-col gap-1 rounded-lg border p-3 text-left transition ${o?"border-primary/50 bg-primary/10":"border-border bg-card hover:border-muted-foreground/30"} ${null!==l||m?"opacity-60 cursor-not-allowed":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:c?.label??("headless"===a?"Headless":"Tmux")}),o?(0,s.jsx)("span",{className:"rounded bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-primary",children:d?"saving…":"active"}):m?(0,s.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"not installed"}):null]}),(0,s.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:c?.description??("headless"===a?"Subprocess per call. Lower RAM, faster cold start, no permission dialogs.":"Persistent terminal sessions you can attach to for visual debug.")}),m&&(0,s.jsxs)("p",{className:"mt-1 text-[10px] leading-relaxed text-amber-300/80",children:["Install: macOS ",(0,s.jsx)("code",{children:"brew install tmux"})," \xb7 Ubuntu ",(0,s.jsx)("code",{children:"apt install tmux"})," \xb7 Fedora ",(0,s.jsx)("code",{children:"dnf install tmux"}),". Restart the daemon afterwards."]})]},a)})}),(0,s.jsxs)("p",{className:"mt-3 text-[11px] text-muted-foreground",children:["Tip: set ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"CHORUS_TRANSPORT=tmux"})," in your environment to override per-shell without changing this setting."]})]})}function Y(e){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{icon:(0,s.jsx)(c,{className:"h-4 w-4"}),title:"Sandbox & first-call permissions",subtitle:"What can chorus-spawned reviewers do on this machine? Pick a profile, toggle prompt auto-approval, choose whether to allow outbound network.",children:(0,s.jsxs)("a",{href:"/settings/permissions",className:"inline-flex items-center gap-2 rounded-md border border-primary/40 bg-primary/5 px-3 py-2 text-sm font-medium text-primary transition hover:bg-primary/10",children:["Open Permissions page",(0,s.jsx)("span",{"aria-hidden":!0,children:"→"})]})}),(0,s.jsx)(V,{}),(0,s.jsx)(S,{}),(0,s.jsx)(q,{}),(0,s.jsxs)("div",{className:"mt-12 flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 py-3 text-sm text-amber-100",role:"note",children:[(0,s.jsx)(u.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-400"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold",children:"Coming in v0.8 — preview only"}),(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-amber-100/80",children:"The sections below show planned controls. They're not wired to the daemon yet — interaction is disabled. The YAML toggle at the top of the page already exposes the schema if you're curious."})]})]}),(0,s.jsx)(W,{...e})]})}function B({yaml:e}){return(0,s.jsxs)(p.Zp,{className:"overflow-hidden bg-card p-0",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.A,{className:"h-3.5 w-3.5 text-primary"}),(0,s.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground",children:"settings.yaml"}),(0,s.jsx)(h.E,{variant:"outline",className:"border-border font-mono text-[10px]",children:"~/.chorus/settings.yaml"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,s.jsx)(H.A,{className:"h-3 w-3"}),"live-rendered from form state"]})]}),(0,s.jsx)("textarea",{value:e,readOnly:!0,spellCheck:!1,className:"block min-h-[520px] w-full resize-none border-0 bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90 focus:outline-none"}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border px-4 py-2.5 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:["Same shape that"," ",(0,s.jsx)("span",{className:"font-mono text-foreground/80",children:"mm.update_settings"})," ","accepts as a patch."]}),(0,s.jsx)("button",{type:"button",className:"rounded-md border border-border bg-card px-2 py-1 text-[10px] text-muted-foreground transition hover:text-foreground",children:"Copy"})]})]})}function Z(){let[e,t]=(0,a.useState)("form"),[r,o]=(0,a.useState)(3),[c,u]=(0,a.useState)(y),[m,x]=(0,a.useState)(v),[h,p]=(0,a.useState)(["~/dev","~/work","/tmp/chorus-sandbox"]),[f,b]=(0,a.useState)(""),[j,k]=(0,a.useState)("claude-code"),[N,C]=(0,a.useState)("2.00"),[A,S]=(0,a.useState)("unanimous"),[T,M]=(0,a.useState)(""),[D,E]=(0,a.useState)(!0),[$,P]=(0,a.useState)("local"),[_,O]=(0,a.useState)("idle"),R=(0,a.useMemo)(()=>{var e;let t,s,a;return t=(e={maxConcurrent:r,driverPolicies:c,reviewerPolicies:m,allowedDirs:h,defaultDriver:j,defaultCostCap:N,defaultThreshold:A,mcpEnabled:D,webhookUrl:T}).allowedDirs.map(e=>` - ${e}`).join("\n"),s=g.map(t=>` ${t.id.replace("-","_")}: ${e.driverPolicies[t.id]}`).join("\n"),a=g.map(t=>` ${t.id.replace("-","_")}: ${e.reviewerPolicies[t.id]}`).join("\n"),`# Chorus workspace settings
|
|
2
|
+
# Edit here, or via the Form tab, or via mm.update_settings from any MCP client.
|
|
3
|
+
|
|
4
|
+
concurrency:
|
|
5
|
+
max_concurrent_chats: ${e.maxConcurrent}
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
driver:
|
|
9
|
+
${s}
|
|
10
|
+
reviewer:
|
|
11
|
+
${a}
|
|
12
|
+
|
|
13
|
+
allowed_directories:
|
|
14
|
+
${t}
|
|
15
|
+
|
|
16
|
+
defaults:
|
|
17
|
+
driver: ${e.defaultDriver}
|
|
18
|
+
agreement_threshold: ${e.defaultThreshold}
|
|
19
|
+
cost_cap_usd: ${e.defaultCostCap}
|
|
20
|
+
on_error: fallback
|
|
21
|
+
|
|
22
|
+
notifications:
|
|
23
|
+
mcp_enabled: ${e.mcpEnabled}
|
|
24
|
+
webhook_url: ${e.webhookUrl?`"${e.webhookUrl}"`:'""'}
|
|
25
|
+
`},[r,c,m,h,j,N,A,D,T]);return(0,s.jsx)(l.G,{children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:[(0,s.jsx)(i.z,{eyebrow:"Settings",title:"Workspace",subtitle:"Defaults applied to every chat. Templates can override these per-run. The MCP server can read & patch this config — your main Claude can configure Chorus for you.",action:(0,s.jsxs)("div",{className:"flex rounded-md border border-border bg-card p-0.5",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>t("form"),className:`flex items-center gap-1.5 rounded-sm px-3 py-1.5 text-xs font-medium transition ${"form"===e?"bg-primary/15 text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,s.jsx)(n,{className:"h-3.5 w-3.5"}),"Form"]}),(0,s.jsxs)("button",{type:"button",onClick:()=>t("yaml"),className:`flex items-center gap-1.5 rounded-sm px-3 py-1.5 text-xs font-medium transition ${"yaml"===e?"bg-primary/15 text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,s.jsx)(d.A,{className:"h-3.5 w-3.5"}),"YAML"]})]})}),"yaml"===e?(0,s.jsx)(B,{yaml:R}):(0,s.jsx)(Y,{maxConcurrent:r,setMaxConcurrent:o,driverPolicies:c,reviewerPolicies:m,cyclePolicy:function(e,t){"driver"===e?u(e=>({...e,[t]:w(e[t])})):x(e=>({...e,[t]:w(e[t])}))},allowedDirs:h,setAllowedDirs:p,newDir:f,setNewDir:b,addDir:function(){let e=f.trim();!e||h.includes(e)||(p(t=>[...t,e]),b(""))},defaultDriver:j,setDefaultDriver:k,defaultCostCap:N,setDefaultCostCap:C,defaultThreshold:A,setDefaultThreshold:S,webhookUrl:T,setWebhookUrl:M,mcpEnabled:D,setMcpEnabled:E,privacyTier:$,setPrivacyTier:P,webhookTestState:_,testWebhook:function(){"running"!==_&&(O("running"),setTimeout(()=>{O(T.startsWith("https://")?"ok":"fail"),setTimeout(()=>O("idle"),2200)},1100))}})]})})}},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4372:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});var s=r(9442),a=r(821),o=r(8344);function n({children:e}){return(0,s.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,s.jsx)(a.AppSidebar,{}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsx)(o.MobileTopBar,{}),(0,s.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5702:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var s=r(9442);r(6074);var a=r(9056),o=r(8113),n=r(7362);let d=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t="default",asChild:r=!1,...a}){let i=r?o.bL:"span";return(0,s.jsx)(i,{"data-slot":"badge","data-variant":t,className:(0,n.cn)(d({variant:t}),e),...a})}},6457:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var s=r(9442);function a({eyebrow:e,title:t,subtitle:r,action:o}){return(0,s.jsxs)("header",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e}),(0,s.jsx)("h1",{className:"mt-1 text-2xl font-semibold tracking-tight",children:t}),r&&(0,s.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:r})]}),o&&(0,s.jsx)("div",{className:"shrink-0 self-start sm:self-auto",children:o})]})}},6527:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("folder-lock",[["rect",{width:"8",height:"5",x:"14",y:"17",rx:"1",key:"19aais"}],["path",{d:"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5",key:"1w6v7t"}],["path",{d:"M20 17v-2a2 2 0 1 0-4 0v2",key:"pwaxnr"}]])},6624:(e,t,r)=>{Promise.resolve().then(r.bind(r,3810))},7978:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]])},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});var s=r(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=s.$,n=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return o(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:n,defaultVariants:d}=t,l=Object.keys(n).map(e=>{let t=null==r?void 0:r[e],s=null==d?void 0:d[e];if(null===t)return null;let o=a(t)||a(s);return n[e][o]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return o(e,l,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...d,...i}[t]):({...d,...i})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},9208:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=6624)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[873],{3149:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},4030:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(3884).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4400:(e,s,t)=>{"use strict";t.d(s,{PermissionsForm:()=>b});var a=t(9442),r=t(6074),l=t(3884);let i=(0,l.A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var c=t(6527);let n=(0,l.A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var d=t(9707),o=t(3149),m=t(4030),p=t(6441),x=t(6185);let h=["strict","workspace","full"],u={strict:i,workspace:c.A,full:n};function b({initial:e}){let[s,t]=(0,r.useState)(e),[l,i]=(0,r.useState)(!1),[c,n]=(0,r.useState)(null),[f,g]=(0,r.useState)(null),y=s.profileDescriptions??e.profileDescriptions??{strict:{label:"Strict",description:""},workspace:{label:"Workspace",description:""},full:{label:"Full access",description:""}},k=(0,r.useCallback)(async e=>{i(!0),n(null);try{let s=await (0,p.Ep)(e);t(s),g(Date.now())}catch(e){n(e instanceof x.$v?e.message:"Failed to save — is the daemon running?")}finally{i(!1)}},[]);return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Sandbox profile"}),(0,a.jsx)("div",{className:"grid gap-3",children:h.map(e=>{let t=u[e],r=y[e]??{label:e,description:""},i=s.sandboxProfile===e;return(0,a.jsxs)("button",{type:"button",disabled:l,onClick:()=>k({sandboxProfile:e}),className:`group flex items-start gap-3 rounded-lg border p-4 text-left transition disabled:cursor-not-allowed ${i?"border-primary bg-primary/5":"border-border bg-card hover:border-primary/50"}`,children:[(0,a.jsx)(t,{className:`mt-0.5 h-5 w-5 shrink-0 ${i?"text-primary":"text-muted-foreground"}`}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:r.label}),i&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"})," Active"]})]}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r.description})]})]},e)})})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Auto-approve prompts"}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-4",children:[(0,a.jsx)("input",{type:"checkbox",checked:s.autoApprovePrompts,disabled:l,onChange:e=>k({autoApprovePrompts:e.target.checked}),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Skip permission prompts inside the spawned CLI"}),(0,a.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:["When on, chorus passes ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"--afk"})," to kimi, ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"--approval-mode auto_edit"}),"to gemini, and equivalent flags to other CLIs so reviewers don't hang on per-tool permission prompts. Turn off if you want every action to require an explicit “yes” inside the CLI's TUI (slower, but fully observable)."]})]})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Network access"}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-4",children:[(0,a.jsx)("input",{type:"checkbox",checked:s.networkAccess,disabled:l,onChange:e=>k({networkAccess:e.target.checked}),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Allow outbound network from reviewers"}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"Off by default. Reviewers can't curl, npm install, or call external APIs. Templates that explicitly need network (e.g. fetching docs, gh CLI) override this per phase. Enable globally only if you trust every template you run."})]})]})]}),(0,a.jsxs)("div",{className:"flex h-6 items-center text-xs",children:[l&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[(0,a.jsx)(o.A,{className:"h-3 w-3 animate-spin"})," Saving…"]}),!l&&c&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-destructive",children:[(0,a.jsx)(m.A,{className:"h-3 w-3"})," ",c]}),!l&&!c&&f&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-emerald-400",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"})," Saved"]})]})]})}},6527:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(3884).A)("folder-lock",[["rect",{width:"8",height:"5",x:"14",y:"17",rx:"1",key:"19aais"}],["path",{d:"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5",key:"1w6v7t"}],["path",{d:"M20 17v-2a2 2 0 1 0-4 0v2",key:"pwaxnr"}]])},9230:(e,s,t)=>{Promise.resolve().then(t.bind(t,4400)),Promise.resolve().then(t.bind(t,821)),Promise.resolve().then(t.bind(t,8344))},9707:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=9230)),_N_E=e.O()}]);
|