@chorus-aidlc/chorus 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +213 -213
- package/.next/standalone/.next/app-path-routes-manifest.json +38 -38
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +42 -42
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
- package/.next/standalone/.next/server/app/admin/companies/new.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies.html +2 -2
- package/.next/standalone/.next/server/app/admin/companies.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin.html +2 -2
- package/.next/standalone/.next/server/app/admin.rsc +1 -1
- package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/access-preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/members/[userUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/members/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/access-preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/group/preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/members/[userUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/members/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +2 -2
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/admin.html +2 -2
- package/.next/standalone/.next/server/app/login/admin.rsc +1 -1
- package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/callback.html +2 -2
- package/.next/standalone/.next/server/app/login/callback.rsc +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
- package/.next/standalone/.next/server/app/login/pick-workspace.rsc +1 -1
- package/.next/standalone/.next/server/app/login.html +2 -2
- package/.next/standalone/.next/server/app/login.rsc +1 -1
- package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +2 -2
- package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +2 -2
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +2 -2
- package/.next/standalone/.next/server/app/settings.rsc +3 -3
- package/.next/standalone/.next/server/app-paths-manifest.json +38 -38
- package/.next/standalone/.next/server/chunks/1855.js +2 -2
- package/.next/standalone/.next/server/chunks/2689.js +2 -2
- package/.next/standalone/.next/server/chunks/5212.js +1 -1
- package/.next/standalone/.next/server/chunks/5281.js +2 -2
- package/.next/standalone/.next/server/chunks/5647.js +1 -1
- package/.next/standalone/.next/server/chunks/5764.js +2 -2
- package/.next/standalone/.next/server/chunks/6493.js +1 -1
- package/.next/standalone/.next/server/chunks/6991.js +2 -2
- package/.next/standalone/.next/server/chunks/{9894.js → 7138.js} +1 -1
- package/.next/standalone/.next/server/chunks/{9583.js → 7169.js} +3 -3
- package/.next/standalone/.next/server/chunks/7425.js +1 -0
- package/.next/standalone/.next/server/chunks/7839.js +1 -1
- package/.next/standalone/.next/server/chunks/8692.js +1 -0
- package/.next/standalone/.next/server/chunks/87.js +1 -0
- package/.next/standalone/.next/server/chunks/8849.js +2 -2
- package/.next/standalone/.next/server/chunks/911.js +1 -0
- package/.next/standalone/.next/server/chunks/9295.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/15638-e8566f8551988a0b.js +1 -0
- package/.next/standalone/.next/static/chunks/30187-8406d0b0e7582b4e.js +1 -0
- package/.next/standalone/.next/static/chunks/59480-03e05915e0f0f1e4.js +1 -0
- package/.next/standalone/.next/static/chunks/65833-d0a8d9023febc1ce.js +1 -0
- package/.next/standalone/.next/static/chunks/75844-ab7e24827a4875a0.js +1 -0
- package/.next/standalone/.next/static/chunks/88277-9563bd5857edfb08.js +1 -0
- package/.next/standalone/.next/static/chunks/91202-a6809360a6c58c9a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-9a0a7266bbc1498f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-670eeb1a8007a20c.js → page-26aef423473209b6.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-deb0615a19598fe6.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-cb20e73952b1d4ee.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-ed5fbcae30e875d1.js → page-c8af650e39ff3eac.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-6bc33e1fb5e252dc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-e622257cf6a2fe0c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/{page-49b02e795c5b279c.js → page-2085f55b6cbd4d82.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-f26cad3e8406ac07.js → page-2b9e6239037f79d5.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-04a3fbabc7542960.js → page-7afc11846cb7aefc.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/{page-d0c217c1e9a18433.js → page-406dbd7ae784ec2b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/page-bb641e258e90d08b.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
- package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/research/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/spec-lite/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-research/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-spec-lite/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/cli/init/contracts.mjs +3 -0
- package/cli/init/install-methods.mjs +24 -113
- package/cli/init/pi-compatibility.mjs +5 -0
- package/cli/init/pi-mcp-backend.mjs +160 -0
- package/cli/init/pi-mcp-config.mjs +48 -64
- package/cli/init/registry.mjs +3 -2
- package/cli/init/run-command.mjs +3 -1
- package/cli/init/steps/codex-restart.mjs +95 -0
- package/cli/init/steps/credential-seed.mjs +18 -17
- package/cli/init.mjs +2 -2
- package/cli/upgrade-plugins.mjs +10 -45
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/1443.js +0 -1
- package/.next/standalone/.next/server/chunks/2701.js +0 -1
- package/.next/standalone/.next/server/chunks/6666.js +0 -1
- package/.next/standalone/.next/server/chunks/7329.js +0 -1
- package/.next/standalone/.next/static/chunks/14891-8a7485231cdaf105.js +0 -1
- package/.next/standalone/.next/static/chunks/30187-12e26e880f7b6da7.js +0 -1
- package/.next/standalone/.next/static/chunks/36244-82317cfd58345146.js +0 -1
- package/.next/standalone/.next/static/chunks/40309-bedb6f19876265b4.js +0 -1
- package/.next/standalone/.next/static/chunks/56161-5d2f255f25dba375.js +0 -1
- package/.next/standalone/.next/static/chunks/6497-36958930c3e35070.js +0 -1
- package/.next/standalone/.next/static/chunks/70762-18006a86c770d908.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-2f843ed9eb3944e4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-ed4d5692eac763c4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-48b79f200d9f086c.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-91e61264f483701b.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-cf90d562352224ec.js +0 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/page-87d43a00d0a7b209.js +0 -1
- /package/.next/standalone/.next/static/{q_ngNQiWgbMewMxZKkQzM → -QBMDLYHMUleR_Nbp3gXV}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{q_ngNQiWgbMewMxZKkQzM → -QBMDLYHMUleR_Nbp3gXV}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30187],{30187:(e,s,t)=>{Promise.resolve().then(t.bind(t,94659))},30782:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(73326).A)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},88749:(e,s,t)=>{"use strict";t.d(s,{a:()=>r});var a=t(81476);function r(){let[e,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)");s(e.matches);let t=e=>s(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),e}},94659:(e,s,t)=>{"use strict";t.d(s,{TaskViewToggle:()=>em});var a=t(60200),r=t(81476),n=t(45719),d=t(25588),i=t(86461),l=t(30782),o=t(34382),c=t(26657),u=t(40058),x=t(75507),m=t(16272),p=t(88749),g=t(74315),h=t(32022),f=t(80513),b=t(57080),j=t(71507),k=t(5535),v=t(49417),y=t(2137),N=t(91069);function w(e){let{projectUuid:s}=e,t=(0,d.c)("tasks"),i=(0,h.r)(),l=(0,n.usePathname)(),o=(0,n.useSearchParams)(),[c,m]=(0,r.useState)(!1),[p,g]=(0,r.useState)([]),[w,F]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{let e=o.get("proposalUuids");e?F(new Set(e.split(",").filter(Boolean))):F(new Set)},[o]),(0,r.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/projects/".concat(s,"/proposals/summary"));if(!t.ok)return;let a=await t.json();!e&&a.success&&g(a.data)}catch(e){}}(),()=>{e=!0}},[s]);let C=(0,r.useCallback)(e=>{let s=new URLSearchParams(o.toString());e.size>0?s.set("proposalUuids",Array.from(e).join(",")):s.delete("proposalUuids");let t=s.toString();i.replace("".concat(l).concat(t?"?".concat(t):""),{scroll:!1})},[i,l,o]),A=(0,r.useCallback)(e=>{F(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),C(t),t})},[C]),E=(0,r.useCallback)(()=>{F(new Set),C(new Set)},[C]),S=w.size>0;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground shrink-0",children:[(0,a.jsx)(f.A,{className:"size-4"}),(0,a.jsxs)("span",{children:[t("proposalFilter.label"),":"]})]}),(0,a.jsxs)(y.AM,{open:c,onOpenChange:m,children:[(0,a.jsx)(y.Wv,{asChild:!0,children:(0,a.jsxs)(u.$,{variant:"outline",size:"sm",role:"combobox","aria-expanded":c,className:(0,v.cn)("justify-between gap-1 min-w-[120px] max-w-[200px] md:min-w-[160px] md:max-w-none",S&&"border-primary bg-[#FFF8F4] dark:bg-[#2a2016]"),children:[(0,a.jsx)("span",{className:"truncate",children:S?t("proposalFilter.filtered",{filtered:w.size,total:p.length}):t("proposalFilter.allProposals")}),(0,a.jsx)(b.A,{className:"size-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(y.hl,{className:"w-[300px] p-0",align:"start",children:(0,a.jsxs)(N.uB,{children:[(0,a.jsx)(N.G7,{placeholder:t("proposalFilter.search")}),(0,a.jsxs)(N.oI,{children:[(0,a.jsx)(N.xL,{children:t("proposalFilter.noResults")}),(0,a.jsx)(N.L$,{children:p.map(e=>{let s=w.has(e.uuid);return(0,a.jsxs)(N.h_,{value:e.title,onSelect:()=>A(e.uuid),className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:(0,v.cn)("flex size-4 shrink-0 items-center justify-center rounded-sm border",s?"border-primary bg-primary text-white":"border-muted-foreground/30"),children:s&&(0,a.jsx)(j.A,{className:"size-3"})}),(0,a.jsx)("span",{className:"truncate",children:e.title})]}),(0,a.jsx)(x.E,{variant:"secondary",className:"ml-2 shrink-0",children:t("proposalFilter.taskCount",{count:e.taskCount})})]},e.uuid)})})]})]})})]}),S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-full",children:p.filter(e=>w.has(e.uuid)).map(e=>(0,a.jsxs)(x.E,{variant:"outline",className:"gap-1 border-primary bg-[#FFF8F4] dark:bg-[#2a2016] text-primary",children:[e.title,(0,a.jsx)("button",{type:"button",className:"ml-0.5 rounded-full hover:bg-primary/20",onClick:()=>A(e.uuid),children:(0,a.jsx)(k.A,{className:"size-3"})})]},e.uuid))}),(0,a.jsx)(u.$,{variant:"ghost",size:"xs",onClick:E,className:"text-muted-foreground",children:t("proposalFilter.clear")})]})]})}var F=t(9827),C=t(7685),A=t(95726),E=t(32814),S=t(6565),U=t(16198),D=t(26185),_=t(83564),P=t(57054);let B=(0,r.createContext)(null);var L=t(7029),z=t(93894);let M=e=>!e.isLayoutDirty&&e.willUpdate(!1),T=e=>{let{children:s,id:t,inherit:n=!0}=e,d=(0,r.useContext)(P.L),i=(0,r.useContext)(B),[l,o]=function(){let e=function(){let e=(0,r.useRef)(!1);return(0,z.E)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[s,t]=(0,r.useState)(0),a=(0,r.useCallback)(()=>{e.current&&t(s+1)},[s]);return[(0,r.useCallback)(()=>L.Gt.postRender(a),[a]),s]}(),c=(0,r.useRef)(null),u=d.id||i;null===c.current&&((e=>!0==(!0===e)||"id"===e)(n)&&u&&(t=t?u+"-"+t:u),c.current={id:t,group:!0===n&&d.group||function(){let e=new Set,s=new WeakMap,t=()=>e.forEach(M);return{add:a=>{e.add(a),s.set(a,a.addEventListener("willUpdate",t))},remove:a=>{e.delete(a);let r=s.get(a);r&&(r(),s.delete(a)),t()},dirty:t}}()});let x=(0,r.useMemo)(()=>({...c.current,forceRender:l}),[o]);return(0,a.jsx)(P.L.Provider,{value:x,children:s})};var R=t(25452),K=t(8330),O=t(67566),V=t(42885);let $=(0,V.createServerReference)("40b2702039ecebb433f424c7323805e654ed7f005a",V.callServer,void 0,V.findSourceMapURL,"fetchTasksAction"),q=(0,V.createServerReference)("701a303612174f31eb77ecbd8b97de7d2b067ecf57",V.callServer,void 0,V.findSourceMapURL,"moveTaskToColumnAction"),I=(0,V.createServerReference)("604c26e64472a6134bfd958adc75605c4f2c1b37fa",V.callServer,void 0,V.findSourceMapURL,"forceMoveTaskToColumnAction");var W=t(43664),G=t(34709),H=t(5438),Z=t(38060),Y=t(69189);let J={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},Q={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},X={in_progress:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E]",open:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",to_verify:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1565C0] dark:text-[#5AA9F0]"},ee=[{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}];function es(e){let{projectUuid:s,initialTasks:t,currentUserUuid:n,selectedTaskUuid:i,onTaskSelect:l,onPanelClose:o,proposalUuidFilter:c}=e,p=(0,d.c)(),g=(0,Y.F7)(),[h,f]=(0,r.useState)(t),[b,j]=(0,r.useState)({}),[k,v]=(0,r.useState)(!1),[y,N]=(0,r.useState)(null),[w,P]=(0,r.useState)([]),[B,L]=(0,r.useState)(!1),[z,M]=(0,r.useState)([]),[V,es]=(0,r.useState)(!1),[et,ea]=(0,r.useState)(!1),er=(0,r.useCallback)(async()=>{let e=await $(s);if(e.success){let s=c?e.data.filter(e=>e.proposalUuid&&c.has(e.proposalUuid)):e.data;f(s);let t=await (0,H.h)(s.map(e=>e.uuid));t.success&&t.data&&j(t.data)}},[s,c]);(0,Z.eV)("task",er);let en=(0,r.useRef)(c);(0,r.useEffect)(()=>{en.current!==c&&(en.current=c,er())},[c,er]),(0,r.useEffect)(()=>{0!==t.length&&(0,H.h)(t.map(e=>e.uuid)).then(e=>{e.success&&e.data&&j(e.data)})},[t]);let ed=(0,r.useMemo)(()=>{var e;return i&&null!=(e=h.find(e=>e.uuid===i))?e:null},[i,h]),ei=e=>h.filter(s=>e.includes(s.status)),el=e=>ei(e).reduce((e,s)=>e+(s.storyPoints||0),0),eo=async e=>{let t;ea(!1);let{destination:a,source:r,draggableId:n}=e;if(!a||a.droppableId===r.droppableId&&a.index===r.index)return;let d=a.droppableId;r.droppableId;let i=h.find(e=>e.uuid===n);if(!i)return;if(ee.find(e=>e.id===d),"todo"===d)t="assigned"===i.status?"assigned":"open";else if("in_progress"===d)t="in_progress";else if("to_verify"===d)t="to_verify";else{if("done"!==d)return;t="to_verify"===i.status?"done":"to_verify"}f(e=>e.map(e=>e.uuid===n?{...e,status:t}:e));let l=await q(n,d,s);if(l.success)er();else{if("blocked"in l&&l.blocked&&"blockers"in l){f(e=>e.map(e=>e.uuid===n?{...e,status:i.status}:e)),N(i),P(l.blockers),v(!0);return}f(e=>e.map(e=>e.uuid===n?{...e,status:i.status}:e)),"gateBlocked"in l&&l.gateBlocked&&(M("unresolvedCriteria"in l&&Array.isArray(l.unresolvedCriteria)?l.unresolvedCriteria:[]),L(!0))}},ec=async()=>{if(y){es(!0);try{let e=await I(y.uuid,"in_progress");e.success?(v(!1),N(null),P([]),er()):W.q.error("Failed to force move task:",e.error)}finally{es(!1)}}},eu=()=>{v(!1),N(null),P([])};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F.JY,{onDragStart:()=>{ea(!0)},onDragEnd:eo,children:(0,a.jsx)(T,{children:(0,a.jsx)("div",{className:"flex flex-1 gap-4 overflow-x-auto pb-4",children:ee.map(e=>{let s=ei(e.statuses);return(0,a.jsxs)("div",{className:"flex w-[300px] flex-shrink-0 flex-col rounded-xl bg-secondary p-4",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-foreground",children:p("status.".concat(e.labelKey))}),(0,a.jsx)("span",{className:"rounded-full bg-card px-2 py-0.5 text-xs font-medium text-muted-foreground",children:s.length})]}),el(e.statuses)>0&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-[#9A9A9A]",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),el(e.statuses),"h"]})]}),(0,a.jsx)(F.gL,{droppableId:e.id,children:(e,t)=>(0,a.jsxs)("div",{ref:e.innerRef,...e.droppableProps,className:"flex-1 space-y-3 overflow-y-auto min-h-[100px] rounded-lg pt-3 pr-3 transition-colors ".concat(t.isDraggingOver?"bg-border":""),children:[0!==s.length||t.isDraggingOver?s.map((e,s)=>{let t=!!e.dependsOn&&0!==e.dependsOn.length&&e.dependsOn.some(e=>"done"!==e.status&&"closed"!==e.status),r=(t?!e.dependsOn?[]:e.dependsOn.filter(e=>"done"!==e.status&&"closed"!==e.status):[]).map(e=>e.title).join(", ");return(0,a.jsx)(F.sx,{draggableId:e.uuid,index:s,isDragDisabled:!g,children:(s,n)=>(0,a.jsx)("div",{ref:s.innerRef,...s.draggableProps,...s.dragHandleProps,onClick:()=>{n.isDragging||l(e.uuid)},style:s.draggableProps.style,children:(0,a.jsxs)(R.P.div,{className:"relative",layoutId:et?void 0:"task-card-".concat(e.uuid),transition:K.Yv.spring,children:[b[e.uuid]>0&&(0,a.jsx)("div",{className:"absolute -top-3 -right-3 z-10 flex h-11 w-11 items-center justify-center rounded-full border-2 border-green-400 bg-card shadow-sm",children:(0,a.jsx)("img",{src:"/typing-animation.gif",alt:"",className:"h-8 w-8"})}),(0,a.jsx)(C.D,{entityType:"task",entityUuid:e.uuid,children:(0,a.jsxs)(m.Zp,{className:"cursor-pointer p-4 transition-all ".concat(t?"border-dashed border-[#D1D1D1] dark:border-[#3a3a40] opacity-60":"border-border hover:border-primary"," bg-card hover:shadow-sm ").concat(n.isDragging?"shadow-lg rotate-2":""),children:[(0,a.jsxs)("div",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsx)(x.E,{className:J[e.status]||"",children:p("status.".concat(Q[e.status]||e.status))}),(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:e.storyPoints&&(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-xs font-medium text-[#E65100] dark:text-[#F0A050]",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),e.storyPoints,"h"]})})]}),(0,a.jsx)("h4",{className:"mb-1 font-medium text-foreground",children:e.title}),e.description&&(0,a.jsx)("p",{className:"mb-2 line-clamp-2 text-sm text-muted-foreground",children:e.description}),t&&(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 rounded-md bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-1",children:[(0,a.jsx)(A.A,{className:"h-3 w-3 shrink-0 text-[#E65100] dark:text-[#F0A050]"}),(0,a.jsx)("span",{className:"text-[9px] font-medium leading-tight text-[#E65100] dark:text-[#F0A050] line-clamp-1",children:p("tasks.blockedBy",{tasks:r})})]}),(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 text-xs text-[#9A9A9A]",children:[e.assignee?(0,a.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_.bB)(e.assignee)?(0,a.jsx)(D.AgentAvatar,{name:e.assignee.name,size:16,className:"shrink-0 rounded-full"}):(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3 shrink-0",children:[(0,a.jsx)("path",{d:"M12 8V4H8"}),(0,a.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"})]}),(0,a.jsx)("span",{className:"truncate",children:e.assignee.name})]}),"agent_instance"===e.assignee.type&&e.assignee.instance&&(0,a.jsx)(U.jQ,{cwd:e.assignee.instance.cwd,host:e.assignee.instance.host,showHost:!1,className:"pl-4"})]}):"open"===e.status&&g?(0,a.jsx)("span",{className:"text-primary",children:p("common.assign")}):(0,a.jsx)("span",{children:p("common.unassigned")}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[b[e.uuid]>0&&(0,a.jsxs)(x.E,{variant:"outline",className:"h-4 gap-1 border-green-300 dark:border-[#2a4a34] px-1.5 text-[10px] text-green-700 dark:text-[#6FD19A]",children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-500"}),p("sessions.workerCount",{count:b[e.uuid]})]}),e.acceptanceSummary&&e.acceptanceSummary.total>0&&(()=>{let s=e.acceptanceSummary,t="to_verify"===e.status,r=s.requiredPassed===s.required&&s.required>0,n=s.requiredFailed>0,d="bg-secondary text-muted-foreground";return t&&(d=r?"bg-green-50 text-green-700 dark:bg-[#14281a] dark:text-[#6FD19A]":n?"bg-red-50 text-[#C4574C] dark:bg-[#331619] dark:text-[#F0897E]":"bg-amber-50 text-[#D97706] dark:bg-[#332a12] dark:text-[#E0B44E]"),(0,a.jsxs)(x.E,{className:"h-4 gap-1 border-0 px-1.5 text-[9px] ".concat(d),children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2.5 w-2.5",children:[(0,a.jsx)("path",{d:"M9 11l3 3L22 4"}),(0,a.jsx)("path",{d:"M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"})]}),s.passed,"/",s.total]})})()]})]})]})})]})})},e.uuid)}):(0,a.jsx)("div",{className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-border text-sm text-[#9A9A9A]",children:p("tasks.noTasks")}),e.placeholder]})})]},e.id)})})})}),ed&&(0,a.jsx)(G.v,{task:ed,projectUuid:s,currentUserUuid:n,onClose:o}),(0,a.jsx)(O.lG,{open:k,onOpenChange:e=>{e||eu()},children:(0,a.jsxs)(O.Cf,{className:"max-w-md rounded-2xl",children:[(0,a.jsxs)(O.c7,{children:[(0,a.jsxs)(O.L3,{className:"flex items-center gap-2",children:[(0,a.jsx)(E.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"}),p("tasks.dependencyBlocked")]}),(0,a.jsx)(O.rr,{children:p("tasks.dependencyBlockedDescription")})]}),(0,a.jsxs)("div",{className:"rounded-lg bg-background p-3",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:p("tasks.blockerList")}),(0,a.jsx)("div",{className:"space-y-2",children:w.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-card p-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[e.assignee&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_.bB)(e.assignee)&&(0,a.jsx)(D.AgentAvatar,{name:e.assignee.name,size:16,className:"shrink-0 rounded-full"}),e.assignee.name]}),e.sessionCheckin&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(S.A,{className:"h-3 w-3"}),e.sessionCheckin.sessionName]})]})]}),(0,a.jsx)(x.E,{className:"shrink-0 ".concat(X[e.status]||"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"),children:p("status.".concat(Q[e.status]||e.status))})]},e.uuid))})]}),(0,a.jsxs)(O.Es,{className:"gap-2 sm:gap-0",children:[(0,a.jsx)(u.$,{variant:"outline",onClick:eu,children:p("common.cancel")}),(0,a.jsx)(u.$,{className:"bg-[#E65100] hover:bg-[#BF4400] text-white",onClick:ec,disabled:V,children:V?p("common.processing"):p("tasks.forceMove")})]})]})}),(0,a.jsx)(O.lG,{open:B,onOpenChange:L,children:(0,a.jsxs)(O.Cf,{className:"max-w-[520px] rounded-2xl p-0 gap-0",children:[(0,a.jsxs)(O.c7,{className:"px-6 pt-6 pb-4",children:[(0,a.jsxs)(O.L3,{className:"flex items-center gap-2.5",children:[(0,a.jsx)(E.A,{className:"h-5 w-5 text-[#C4574C] dark:text-[#F0897E]"}),p("acceptanceCriteria.title")]}),(0,a.jsx)(O.rr,{className:"text-[13px] leading-relaxed text-muted-foreground",children:p("acceptanceCriteria.gateBlocked",{count:z.filter(e=>e.required&&"passed"!==e.status).length})})]}),(0,a.jsxs)("div",{className:"px-6 pb-4 space-y-3",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold text-[#9A9A9A] uppercase tracking-wide",children:p("acceptanceCriteria.title")}),z.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border p-3 space-y-2 ".concat("failed"===e.status?"border-red-200 dark:border-[#5a2a2e] bg-card":"border-border bg-card"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full shrink-0 ".concat("failed"===e.status?"bg-[#C4574C]":"bg-[#F59E0B]")}),(0,a.jsx)("span",{className:"text-xs font-semibold text-foreground",children:e.description})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,a.jsx)(x.E,{className:"text-[10px] border-0 ".concat("failed"===e.status?"bg-red-50 text-[#C4574C] dark:bg-[#331619] dark:text-[#F0897E]":"bg-amber-50 text-[#D97706] dark:bg-[#332a12] dark:text-[#E0B44E]"),children:p("acceptanceCriteria.status.".concat(e.status))}),(0,a.jsx)(x.E,{className:"text-[10px] border-0 bg-background text-muted-foreground",children:e.required?p("acceptanceCriteria.required"):p("acceptanceCriteria.optional")}),!e.evidence&&(0,a.jsx)("span",{className:"text-[10px] italic text-muted-foreground",children:p("acceptanceCriteria.noEvidence")})]}),e.evidence&&(0,a.jsxs)("div",{className:"rounded-md bg-red-50 dark:bg-[#331619] p-2 ml-4",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground",children:p("acceptanceCriteria.verifyEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:e.evidence})]})]},e.uuid))]}),(0,a.jsx)(O.Es,{className:"border-t border-[#E5E2DC] dark:border-[#2a2a2e] px-6 py-4",children:(0,a.jsx)(u.$,{className:"rounded-lg bg-[#C4574C] hover:bg-[#A3433A] text-white",onClick:()=>L(!1),children:p("acceptanceCriteria.dismiss")})})]})})]})}var et=t(24546);t(19768);var ea=t(28201),er=t(9258),en=t(55033);let ed=(0,V.createServerReference)("402b873b24f5b6bc2b15bbb8fc330b26b4ee5e57c3",V.callServer,void 0,V.findSourceMapURL,"getProjectDependenciesAction");var ei=t(5452);function el(e){let{projectUuid:s,onTaskSelect:t,refreshKey:i}=e,l=(0,d.c)(),o=(0,er.W)(),c=(0,n.useSearchParams)(),[x,m,p]=(0,et.ck)([]),[g,h,f]=(0,et.fM)([]),[b,j]=(0,r.useState)(!0),[v,y]=(0,r.useState)(null),N=(0,Y.F7)(),w=(0,r.useMemo)(()=>{let e=c.get("proposalUuids");if(!e)return null;let s=e.split(",").filter(Boolean);return s.length>0?new Set(s):null},[c]),F=(0,r.useCallback)(async()=>{j(!0);let e=await ed(s),t=e.nodes,a=e.edges;if(w){let s=new Set((t=e.nodes.filter(e=>null!==e.proposalUuid&&w.has(e.proposalUuid))).map(e=>e.uuid));a=e.edges.filter(e=>s.has(e.from)&&s.has(e.to))}let r=t.map(e=>({id:e.uuid,type:"taskNode",position:{x:0,y:0},data:{title:e.title,status:e.status,priority:e.priority,proposalUuid:e.proposalUuid}})),n=a.map((e,s)=>({id:"e-".concat(s),source:e.to,target:e.from,...en.qK})),{nodes:d,edges:i}=(0,en.nF)(r,n);m(d),h(i),j(!1)},[s,w,m,h]);(0,r.useEffect)(()=>{F()},[F,i]);let C=(0,r.useCallback)(async e=>{if(!e.source||!e.target)return;y(null);let s=e.target,t=e.source,a=await (0,ei.w)(s,t);if(!a.success)return void y(a.error||l("tasks.failedToAddDep"));await F()},[F]),A=(0,r.useCallback)((e,s)=>{t(s.id)},[t]);return b?(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,a.jsx)(ea.A,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===x.length?(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:l("tasks.noTasksToDisplay")}):(0,a.jsxs)("div",{className:"flex-1 rounded-xl border border-border bg-[#FAFAF8] dark:bg-[#1e1e1c] relative",children:[v&&(0,a.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-10 rounded-lg bg-red-50 dark:bg-[#331619] border border-red-200 dark:border-[#5a2a2e] px-4 py-2 text-xs text-red-700 dark:text-[#F08078] shadow-sm",children:[v,(0,a.jsx)(u.$,{variant:"ghost",size:"icon",className:"ml-2 h-5 w-5 font-medium hover:text-red-900 dark:hover:text-[#F0A0A0]",onClick:()=>y(null),children:(0,a.jsx)(k.A,{className:"h-3 w-3"})})]}),(0,a.jsxs)(et.Gc,{colorMode:o?"dark":"light",nodes:x,edges:g,onNodesChange:p,onEdgesChange:f,onConnect:N?C:void 0,nodesConnectable:N,deleteKeyCode:N?void 0:null,onNodeClick:A,nodeTypes:en.c_,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},zoomOnScroll:!0,zoomOnPinch:!0,panOnDrag:!0,children:[(0,a.jsx)(et.VS,{color:o?"#40392f":"#E5E0D8",gap:20}),(0,a.jsx)(et.H2,{className:"[&>button]:border-border [&>button]:bg-card [&>button]:text-foreground [&>button:hover]:bg-background"})]})]})}let eo={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},ec={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},eu=[{id:"all",labelKey:"allStatuses",statuses:[]},{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}],ex={high:"bg-red-100 text-red-700",medium:"bg-yellow-100 text-yellow-700",low:"bg-blue-100 text-blue-700"};function em(e){let{projectUuid:s,initialTasks:t,currentUserUuid:h,initialSelectedTaskUuid:f}=e,b=(0,d.c)(),j=(0,Y.F7)(),k=(0,p.a)(),v=(0,n.useSearchParams)(),[y,N]=(0,r.useState)("kanban"),F="/projects/".concat(s,"/tasks"),{selectedId:C,openPanel:A,closePanel:E}=(0,g.T)(F,f),S=(0,r.useMemo)(()=>{let e=v.get("proposalUuids");if(!e)return null;let s=e.split(",").filter(Boolean);return s.length>0?new Set(s):null},[v]);(0,r.useEffect)(()=>{k&&"kanban"===y&&N("list")},[k]);let[U,P]=(0,r.useState)(!1),[B,L]=(0,r.useState)(0),[z,M]=(0,r.useState)("all"),T=(0,r.useMemo)(()=>{var e;return C&&null!=(e=t.find(e=>e.uuid===C))?e:null},[C,t]),K=(0,r.useCallback)(()=>{L(e=>e+1)},[]),O=(0,r.useMemo)(()=>S?t.filter(e=>e.proposalUuid&&S.has(e.proposalUuid)):t,[t,S]),V=(0,r.useMemo)(()=>{let e=eu.find(e=>e.id===z);return e&&0!==e.statuses.length?O.filter(s=>e.statuses.includes(s.status)):O},[O,z]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 overflow-x-auto",children:(0,a.jsx)(w,{projectUuid:s})}),(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-secondary p-1 w-fit",children:[k&&(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("list"===y?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>N("list"),children:[(0,a.jsx)(i.A,{className:"h-3.5 w-3.5"}),b("tasks.listView")]}),!k&&(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("kanban"===y?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>N("kanban"),children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"}),b("tasks.kanbanView")]}),(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("dag"===y?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>N("dag"),children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5"}),b("tasks.dagView")]})]}),j&&(0,a.jsxs)(u.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{E(),P(!0)},children:[(0,a.jsx)(c.A,{className:"mr-2 h-4 w-4"}),b("tasks.newTask")]})]}),"list"===y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 flex gap-1 overflow-x-auto border-b border-border pb-2",children:eu.map(e=>{let s=0===e.statuses.length?O.length:O.filter(s=>e.statuses.includes(s.status)).length;return(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 shrink-0 rounded-md px-3 text-xs ".concat(z===e.id?"bg-secondary text-foreground font-medium":"text-muted-foreground hover:text-foreground"),onClick:()=>M(e.id),children:["all"===e.id?b("tasks.".concat(e.labelKey)):b("status.".concat(e.labelKey)),(0,a.jsx)("span",{className:"ml-1.5 rounded-full bg-card px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:s})]},e.id)})}),(0,a.jsx)("div",{className:"flex-1 space-y-2 overflow-y-auto",children:0===V.length?(0,a.jsx)(R.P.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.2,ease:[0,0,.2,1]},className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-border text-sm text-[#9A9A9A]",children:b("tasks.noTasks")}):V.map(e=>(0,a.jsxs)(m.Zp,{className:"cursor-pointer border-border bg-card p-4 transition-all hover:border-primary hover:shadow-sm",onClick:()=>A(e.uuid),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h4",{className:"font-medium text-foreground truncate",children:e.title}),e.description&&(0,a.jsx)("p",{className:"mt-1 line-clamp-1 text-sm text-muted-foreground",children:e.description})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[null!=e.storyPoints&&e.storyPoints>0&&(0,a.jsxs)("span",{className:"rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-xs font-medium text-[#E65100] dark:text-[#F0A050]",children:[e.storyPoints,"h"]}),(0,a.jsx)(x.E,{className:ex[e.priority]||"",children:b("priority.".concat(e.priority))}),(0,a.jsx)(x.E,{className:eo[e.status]||"",children:b("status.".concat(ec[e.status]||e.status))})]})]}),e.assignee&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-[#9A9A9A]",children:[(0,_.bB)(e.assignee)&&(0,a.jsx)(D.AgentAvatar,{name:e.assignee.name,size:16,className:"shrink-0 rounded-full"}),(0,a.jsx)("span",{className:"truncate",children:e.assignee.name})]})]},e.uuid))}),T&&(0,a.jsx)(G.v,{task:T,projectUuid:s,currentUserUuid:h,onClose:E,onDependencyChange:K})]}):"kanban"===y?(0,a.jsx)(es,{projectUuid:s,initialTasks:O,currentUserUuid:h,selectedTaskUuid:C,onTaskSelect:A,onPanelClose:E,proposalUuidFilter:S}):(0,a.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,a.jsx)(el,{projectUuid:s,onTaskSelect:e=>A(e),refreshKey:B}),T&&(0,a.jsx)(G.v,{task:T,projectUuid:s,currentUserUuid:h,onClose:E,onDependencyChange:K})]}),U&&!T&&(0,a.jsx)(G.v,{task:null,projectUuid:s,currentUserUuid:h,onClose:()=>P(!1),onCreated:()=>P(!1)})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59480],{5438:(e,s,t)=>{t.d(s,{h:()=>r});var a=t(42885);let r=(0,a.createServerReference)("408a8c5632cfee93d537e1ace0e555d2c326a074f0",a.callServer,void 0,a.findSourceMapURL,"getBatchWorkerCountsAction")},5452:(e,s,t)=>{t.d(s,{w:()=>r});var a=t(42885);let r=(0,a.createServerReference)("603a8f098a2b3fdc224480ab24a99d3aa421c6b689",a.callServer,void 0,a.findSourceMapURL,"addTaskDependencyAction")},34709:(e,s,t)=>{t.d(s,{v:()=>eF});var a=t(60200),r=t(81476),i=t(32022),n=t(25588),c=t(34382),l=t(5535),d=t(26657),o=t(60516),u=t(91560),m=t(80513),x=t(28201),p=t(56109),h=t(16832),g=t(28812),f=t(73326);let v=(0,f.A)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var b=t(32814),j=t(71507),N=t(43322),k=t(53511),A=t(58294);let y=(0,f.A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var w=t(14006),F=t(75507),C=t(16272),S=t(40058),E=t(30474),D=t(16852),_=t(45200),R=t(90993),T=t(21558),U=t(2745),q=t(62925),M=t(26185),B=t(16198),L=t(83564),P=t(42885);let z=(0,P.createServerReference)("60db07a009ef775b859d85ef5a1be85b62aa72fbac",P.callServer,void 0,P.findSourceMapURL,"updateTaskStatusAction"),I=(0,P.createServerReference)("404c4ba836b3bc50964dbf6133f19907804a4c7bd2",P.callServer,void 0,P.findSourceMapURL,"createTaskAction"),$=(0,P.createServerReference)("4059a7d3acfda56ca1e86b4d2a91463e737ea8e37f",P.callServer,void 0,P.findSourceMapURL,"updateTaskFieldsAction"),V=(0,P.createServerReference)("603b139b9ef8d35449184d624cada1f101a8626a56",P.callServer,void 0,P.findSourceMapURL,"deleteTaskAction"),W=(0,P.createServerReference)("601e9ba3fd5c22acd513eef6740feb08be94f00507",P.callServer,void 0,P.findSourceMapURL,"markCriteriaAction"),J=(0,P.createServerReference)("60f5f16ab82b1faec2742221d006abf6afd3523ff3",P.callServer,void 0,P.findSourceMapURL,"resetCriterionAction");var O=t(75844),H=t(3609);let G=(0,P.createServerReference)("405f4d600ef74c078730e58ef4829af64d0e12307c",P.callServer,void 0,P.findSourceMapURL,"getTaskActivitiesAction"),X=(0,P.createServerReference)("403ca4ce06ae765d5b31bef2177857041a49c6912f",P.callServer,void 0,P.findSourceMapURL,"getTaskSourceAction");var Z=t(64035),K=t(13796),Q=t(6153),Y=t(70250),ee=t(58105),es=t(63123),et=t(60404),ea=t(57378);let er=(0,P.createServerReference)("006a5efd7a142a335c9957c4fdfb11e5a90c65e17b",P.callServer,void 0,P.findSourceMapURL,"getDeveloperAgentsAction"),ei=(0,P.createServerReference)("60e92ee805cb0153646490ba4d89321b3f42b882e6",P.callServer,void 0,P.findSourceMapURL,"getAgentInstancesAction"),en=(0,P.createServerReference)("4045cf937d90c5c4676f0e67853d8a322c9ab5593a",P.callServer,void 0,P.findSourceMapURL,"claimTaskAction"),ec=(0,P.createServerReference)("70e7742bf4c147367acc13d3c8419bf6777579ceb6",P.callServer,void 0,P.findSourceMapURL,"claimTaskToAgentAction"),el=(0,P.createServerReference)("607535dab16c14fc8ed340798f2bf45cd80067d8a6",P.callServer,void 0,P.findSourceMapURL,"claimTaskToUserAction"),ed=(0,P.createServerReference)("405749b11328feec7400cd91ec776123cc28425544",P.callServer,void 0,P.findSourceMapURL,"releaseTaskAction");function eo(e){var s,t;let{task:c,projectUuid:l,currentUserUuid:d,onClose:o}=e,u=(0,n.c)(),m=(0,i.r)(),[p,h]=(0,r.useState)(!1),[g,f]=(0,r.useState)("self"),[v,b]=(0,r.useState)(""),[j,k]=(0,r.useState)(""),[A,y]=(0,r.useState)([]),[w,F]=(0,r.useState)([]),[C,E]=(0,r.useState)(!0),[D,R]=(0,r.useState)(null),[U,q]=(0,r.useState)([]),[B,L]=(0,r.useState)(!1),[P,z]=(0,r.useState)(null),[I,$]=(0,r.useState)(null),V=!!c.assignee;(0,r.useEffect)(()=>{!async function(){E(!0);let e=await er();y(e.agents||[]),F((e.users||[]).filter(e=>e.uuid!==d)),E(!1)}()},[d]),(0,r.useEffect)(()=>{if("agent"!==g||!v){q([]),$(null),z(null);return}let e=!1;return L(!0),$(null),ei(v,l).then(s=>{e||(q((0,es.C)(s.instances)),z(s.resolvedTarget))}).finally(()=>{e||L(!1)}),()=>{e=!0}},[l,g,v]);let W=null!=(t=U.find(e=>e.connectionUuid===I))?t:null,J=new Set(U.map(e=>e.host)).size>1,O=async()=>{let e;if(h(!0),R(null),"self"===g)e=await en(c.uuid);else if("agent"===g&&v){var s;e=await ec(c.uuid,v,null!=(s=null==W?void 0:W.agentInstanceUuid)?s:void 0)}else if("user"===g&&j)e=await el(c.uuid,j);else{if("release"!==g)return void h(!1);e=await ed(c.uuid)}h(!1),(null==e?void 0:e.success)?(o(),m.refresh()):(null==e?void 0:e.error)&&R(e.error)},H="self"===g||"agent"===g&&v||"user"===g&&j||"release"===g&&V;return(0,a.jsxs)(Y._8,{open:!0,onOpenChange:e=>{e||o()},className:"bg-card sm:max-w-[400px]",header:(0,a.jsx)(Y.AI,{className:"text-base font-semibold text-foreground",children:u("tasks.assignTask")}),footer:(0,a.jsxs)("div",{className:"flex w-full items-center justify-end gap-4",children:[(0,a.jsx)(S.$,{variant:"outline",onClick:o,disabled:p,className:"border-border",children:u("common.cancel")}),(0,a.jsx)(S.$,{onClick:O,disabled:p||!H,className:"bg-primary hover:bg-[#B56A42] text-white",children:p?(0,a.jsx)(x.A,{className:"h-4 w-4 animate-spin"}):"release"===g?u("common.release"):function(){if("agent"!==g||!W)return u("common.assign");let e=(0,et.kn)(W.cwd),s=e.isUnknown?u(e.label):e.label,t=(0,et.g9)(W.host),a=t.isUnknown?u(t.label):t.label;return J?u("assignInstance.assignToWithHost",{path:s,host:a}):u("assignInstance.assignTo",{path:s})}()})]}),bodyClassName:"space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg bg-background p-3",children:[(0,a.jsx)("p",{className:"text-[13px] font-medium text-foreground",children:c.title}),c.description&&(0,a.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground line-clamp-2",children:c.description})]}),V&&(0,a.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] dark:bg-[#13253a] p-3",children:(0,a.jsxs)("p",{className:"text-xs text-[#1976D2] dark:text-[#5AA9F0]",children:[u("common.currentAssignee"),": ",(0,a.jsx)("span",{className:"font-medium",children:null==(s=c.assignee)?void 0:s.name})]})}),D&&(0,a.jsx)("div",{className:"rounded-lg bg-[#FEE2E2] dark:bg-[#331619] p-3",children:(0,a.jsx)("p",{className:"text-xs text-[#D32F2F] dark:text-[#F08078]",children:D})}),(0,a.jsx)("p",{className:"text-[13px] text-muted-foreground",children:u("assign.selectAssignee")}),C?(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(x.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,a.jsxs)(ee.z,{value:g,onValueChange:e=>f(e),className:"space-y-3",children:[(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("self"===g?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"),onClick:()=>f("self"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(ee.C,{value:"self",id:"self",className:"border-primary text-primary"}),(0,a.jsx)(_.J,{htmlFor:"self",className:"text-sm font-medium text-foreground cursor-pointer",children:u("assign.assignToMyself")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:u("assign.assignToMyselfDesc")})]}),(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("agent"===g?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>f("agent"),children:[(0,a.jsx)(ee.C,{value:"agent",id:"agent",className:"border-primary text-primary"}),(0,a.jsx)(_.J,{htmlFor:"agent",className:"text-sm font-medium text-foreground cursor-pointer",children:u("assign.orAssignToAgent")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:u("tasks.onlySelectedAgentCanWork")}),"agent"===g&&(0,a.jsxs)("div",{className:"mt-3 ml-6 space-y-3",children:[(0,a.jsxs)(T.l6,{value:v,onValueChange:b,children:[(0,a.jsx)(T.bq,{className:"w-full border-border",children:(0,a.jsx)(T.yv,{placeholder:u("tasks.selectAgent")})}),(0,a.jsx)(T.gC,{className:"z-[120]",children:A.length>0?A.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(M.AgentAvatar,{name:e.name,size:16,className:"rounded-full"}),(0,a.jsx)("span",{children:e.name})]})},e.uuid)):(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:u("tasks.noAgentsAvailable")})})]}),v&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:u("assignInstance.workingDirectory")}),B?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-2 text-xs text-[#9A9A9A]",children:[(0,a.jsx)(x.A,{className:"h-3.5 w-3.5 animate-spin"}),u("assignInstance.loadingInstances")]}):(null==P?void 0:P.source)==="project_fixed"?(0,a.jsx)(ea.Y,{target:P}):0===U.length?(0,a.jsx)("p",{className:"rounded-lg bg-background p-2.5 text-[11px] leading-relaxed text-muted-foreground",children:u("assignInstance.noInstances")}):(0,a.jsx)(es.O,{instances:U,selectedConnectionUuid:I,onSelect:e=>$(e.connectionUuid),ariaLabel:u("assignInstance.workingDirectory")}),(null==P?void 0:P.source)!=="project_fixed"&&(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-[#9A8C7E]",children:[(0,a.jsx)(Q.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:u("assignInstance.pinNote")})]})]})]})]}),(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("user"===g?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>f("user"),children:[(0,a.jsx)(ee.C,{value:"user",id:"user",className:"border-primary text-primary"}),(0,a.jsx)(_.J,{htmlFor:"user",className:"text-sm font-medium text-foreground cursor-pointer",children:u("assign.orAssignToUser")})]}),"user"===g&&(0,a.jsx)("div",{className:"mt-3 ml-6",children:(0,a.jsxs)(T.l6,{value:j,onValueChange:k,children:[(0,a.jsx)(T.bq,{className:"w-full border-border",children:(0,a.jsx)(T.yv,{placeholder:u("tasks.selectUser")})}),(0,a.jsx)(T.gC,{className:"z-[120]",children:w.length>0?w.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(N.A,{className:"h-4 w-4 text-muted-foreground"}),(0,a.jsx)("span",{children:e.name||e.email})]})},e.uuid)):(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:u("tasks.noUsersAvailable")})})]})})]}),V&&(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("release"===g?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"),onClick:()=>f("release"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(ee.C,{value:"release",id:"release",className:"border-primary text-primary"}),(0,a.jsx)(_.J,{htmlFor:"release",className:"text-sm font-medium text-foreground cursor-pointer",children:u("assign.releaseAssignee")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:u("assign.releaseAssigneeDesc")})]})]})]})}let eu=(0,P.createServerReference)("40b4c8deef5b6a33519a04e823ea101d6a34f6e1d1",P.callServer,void 0,P.findSourceMapURL,"getTaskDependenciesAction"),em=(0,P.createServerReference)("40a09971aaa2f07fe612cdc81629931ff87d49ae06",P.callServer,void 0,P.findSourceMapURL,"getProjectTasksForDependencyAction");var ex=t(5452);let ep=(0,P.createServerReference)("60048b9527dd94dd051c5bde5a86a6f3cd03b5e83c",P.callServer,void 0,P.findSourceMapURL,"removeTaskDependencyAction"),eh=(0,P.createServerReference)("408f719c8157ea080ffc56db4b81fd0e4fb00243b2",P.callServer,void 0,P.findSourceMapURL,"getTaskSessionsAction");var eg=t(3562),ef=t(69189),ev=t(25452),eb=t(8330),ej=t(79099);let eN={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},ek={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},eA={low:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]",medium:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",high:"bg-[#FEE2E2] dark:bg-[#331619] text-[#D32F2F] dark:text-[#F08078]",critical:"bg-[#FFCDD2] dark:bg-[#3a181c] text-[#B71C1C] dark:text-[#F08078]"},ey={low:"lowPriority",medium:"mediumPriority",high:"highPriority",critical:"criticalPriority"};function ew(e,s){let t=new Date(e),a=new Date().getTime()-t.getTime(),r=Math.floor(a/6e4),i=Math.floor(a/36e5),n=Math.floor(a/864e5);return r<1?s("time.justNow"):r<60?s("time.minutesAgo",{minutes:r}):i<24?s("time.hoursAgo",{hours:i}):n<7?s("time.daysAgo",{days:n}):(0,eg.r)(t)}function eF(e){var s,t;let{task:f,projectUuid:P,currentUserUuid:Q,mode:Y="overlay",onClose:ee,onCreated:es,onDependencyChange:et,onBack:ea}=e,er=(0,n.c)(),ei=(0,i.r)(),en=(0,ef.F7)(),[ec,el]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=setTimeout(()=>el(!0),300);return()=>clearTimeout(e)},[]);let[ed,eF]=(0,r.useState)(!1),[eC,eS]=(0,r.useState)([]),[eE,eD]=(0,r.useState)(!0),[e_,eR]=(0,r.useState)(null),[eT,eU]=(0,r.useState)(!1),[eq,eM]=(0,r.useState)([]),[eB,eL]=(0,r.useState)([]),[eP,ez]=(0,r.useState)(!1),[eI,e$]=(0,r.useState)([]),[eV,eW]=(0,r.useState)(null),[eJ,eO]=(0,r.useState)([]),[eH,eG]=(0,r.useState)([]),eX=null===f,[eZ,eK]=(0,r.useState)(eX),[eQ,eY]=(0,r.useState)((null==f?void 0:f.title)||""),[e0,e1]=(0,r.useState)((null==f?void 0:f.description)||""),[e2,e5]=(0,r.useState)((null==f?void 0:f.priority)||"medium"),[e9,e3]=(0,r.useState)((null==f?void 0:f.storyPoints)!=null?String(f.storyPoints):""),[e4,e6]=(0,r.useState)((null!=(s=null==f?void 0:f.acceptanceCriteriaItems)?s:[]).map(e=>{var s;return{description:e.description,required:null==(s=e.required)||s}})),[e7,e8]=(0,r.useState)(!1),[se,ss]=(0,r.useState)(null),[st,sa]=(0,r.useState)(!1),sr=(0,L.RU)(null!=(t=null==f?void 0:f.assignee)?t:null,{type:"user",uuid:Q}),si=sr&&(null==f?void 0:f.status)==="assigned",sn=sr&&(null==f?void 0:f.status)==="in_progress",sc=(null==f?void 0:f.status)==="to_verify";(0,r.useEffect)(()=>{async function e(){eD(!0),eS((await G(f.uuid)).activities),eD(!1)}async function s(){f.proposalUuid&&eR(await X(f.proposalUuid))}async function t(){ez(!0);let[e,s]=await Promise.all([eu(f.uuid),em(P)]);eM(e.dependsOn),eL(e.dependedBy),e$(s.tasks),ez(!1)}async function a(){let e=await eh(f.uuid);e.success&&e.data&&eO(e.data)}f&&(e(),s(),t(),a())},[null==f?void 0:f.uuid,null==f?void 0:f.proposalUuid,P]),(0,r.useEffect)(()=>{eX&&e();async function e(){e$((await em(P)).tasks)}},[eX,P]),(0,r.useEffect)(()=>{if(f){var e;eK(!1),eY(f.title),e1(f.description||""),e5(f.priority),e3(null!=f.storyPoints?String(f.storyPoints):""),e6((null!=(e=f.acceptanceCriteriaItems)?e:[]).map(e=>{var s;return{description:e.description,required:null==(s=e.required)||s}})),ss(null)}},[null==f?void 0:f.uuid,null==f?void 0:f.title,null==f?void 0:f.description,null==f?void 0:f.priority,null==f?void 0:f.storyPoints,null==f?void 0:f.acceptanceCriteriaItems]);let sl=async e=>{if(!f)return;eF(!0);let s=await z(f.uuid,e);eF(!1),s.success&&(ee(),ei.refresh())},sd=()=>{if(eX)return void ee();if(eK(!1),f){var e;eY(f.title),e1(f.description||""),e5(f.priority),e3(null!=f.storyPoints?String(f.storyPoints):""),e6((null!=(e=f.acceptanceCriteriaItems)?e:[]).map(e=>{var s;return{description:e.description,required:null==(s=e.required)||s}}))}ss(null)},so=async()=>{if(!eQ.trim())return void ss(er("tasks.titleRequired"));e8(!0),ss(null);let e=e9.trim()?parseFloat(e9):null;if(eX){let s=await I({projectUuid:P,title:eQ.trim(),description:e0.trim()||void 0,priority:e2,storyPoints:e,acceptanceCriteria:null});e8(!1),s.success?(eH.length>0&&s.taskUuid&&(await Promise.all(eH.map(e=>(0,ex.w)(s.taskUuid,e.uuid))),null==et||et()),null==es||es(),ee(),ei.refresh()):ss(s.error||er("tasks.createFailed"))}else{var s;let t=(null!=(s=f.acceptanceCriteriaItems)?s:[]).map(e=>{var s;return{description:e.description,required:null==(s=e.required)||s}}),a=e4.filter(e=>e.description.trim().length>0),r=(0,K.K)(t,a);if(r&&0===a.length){e8(!1),ss(er("acceptanceCriteria.atLeastOneRequired"));return}let i=await $({taskUuid:f.uuid,projectUuid:P,title:eQ.trim(),description:e0.trim()||null,priority:e2,storyPoints:e,...r?{acceptanceCriteriaItems:a.map(e=>({description:e.description.trim(),required:e.required}))}:{}});e8(!1),i.success?(eK(!1),ei.refresh()):ss(i.error||er("tasks.updateFailed"))}},su=async()=>{if(!f)return;sa(!0);let e=await V(f.uuid,P);sa(!1),e.success&&(ee(),ei.refresh())},sm=async e=>{if(!f)return;eW(null);let s=await (0,ex.w)(f.uuid,e);if(s.success){let s=eI.find(s=>s.uuid===e);s&&eM(e=>[...e,s]),null==et||et()}else eW(s.error||er("tasks.failedToAddDep"))},sx=async e=>{if(!f)return;eW(null);let s=await ep(f.uuid,e);s.success?(eM(s=>s.filter(s=>s.uuid!==e)),null==et||et()):eW(s.error||er("tasks.failedToRemoveDep"))},sp=async e=>{if(!f)return;eW(null);let s=await ep(e,f.uuid);s.success?(eL(s=>s.filter(s=>s.uuid!==e)),null==et||et()):eW(s.error||er("tasks.failedToRemoveDep"))},sh=eI.filter(e=>e.uuid!==(null==f?void 0:f.uuid)&&!eq.some(s=>s.uuid===e.uuid)),sg=eI.filter(e=>!eH.some(s=>s.uuid===e.uuid)),sf="sidebyside"===Y;return(0,a.jsxs)(a.Fragment,{children:[!sf&&(0,a.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:ee}),(0,a.jsxs)("div",{className:"fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ".concat(sf?"z-40 ".concat(ec?"":"animate-in slide-in-from-right duration-300"):"z-50 right-0 ".concat(ec?"":"animate-in slide-in-from-right duration-300")),style:sf?{right:"".concat(ej.L8,"px")}:void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[ea&&(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:ea,children:(0,a.jsx)(o.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:eZ?(0,a.jsx)("h2",{className:"text-base font-semibold text-foreground",children:eX?er("tasks.createTaskTitle"):er("tasks.editTask")}):f?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:f.title}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,a.jsx)(F.E,{className:eN[f.status]||"",children:er("status.".concat(ek[f.status]||f.status))}),(0,a.jsx)(F.E,{className:eA[f.priority]||"",children:er("priority.".concat(ey[f.priority]||f.priority))}),f.storyPoints&&(0,a.jsxs)("span",{className:"rounded bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground",children:[f.storyPoints,"h"]})]})]}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[f&&!eZ&&en&&(0,a.jsxs)(S.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border text-foreground",onClick:()=>{var e;f&&(eY(f.title),e1(f.description||""),e5(f.priority),e3(null!=f.storyPoints?String(f.storyPoints):""),e6((null!=(e=f.acceptanceCriteriaItems)?e:[]).map(e=>{var s;return{description:e.description,required:null==(s=e.required)||s}})),ss(null),eK(!0))},children:[(0,a.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("span",{className:"text-xs",children:er("common.edit")})]}),(0,a.jsx)(S.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:eZ&&!eX?sd:ee,children:(0,a.jsx)(l.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),(0,a.jsx)(R.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,a.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:eZ?(0,a.jsxs)("div",{className:"space-y-5",children:[se&&(0,a.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:se}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:er("tasks.titleLabel")}),(0,a.jsx)(E.p,{id:"edit-title",value:eQ,onChange:e=>eY(e.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-description",className:"text-[13px] font-medium text-foreground",children:er("tasks.descriptionLabel")}),(0,a.jsx)(D.T,{id:"edit-description",value:e0,onChange:e=>e1(e.target.value),rows:4,className:"border-border text-sm resize-none focus-visible:ring-primary"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-priority",className:"text-[13px] font-medium text-foreground",children:er("tasks.priorityLabel")}),(0,a.jsxs)(T.l6,{value:e2,onValueChange:e5,children:[(0,a.jsx)(T.bq,{className:"border-border text-sm focus:ring-primary",children:(0,a.jsx)(T.yv,{})}),(0,a.jsxs)(T.gC,{children:[(0,a.jsx)(T.eb,{value:"low",children:er("priority.low")}),(0,a.jsx)(T.eb,{value:"medium",children:er("priority.medium")}),(0,a.jsx)(T.eb,{value:"high",children:er("priority.high")})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-story-points",className:"text-[13px] font-medium text-foreground",children:er("tasks.storyPointsLabel")}),(0,a.jsx)(E.p,{id:"edit-story-points",type:"number",min:"0",step:"0.5",value:e9,onChange:e=>e3(e.target.value),className:"border-border text-sm focus-visible:ring-primary"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{className:"text-[13px] font-medium text-foreground",children:er("acceptanceCriteria.title")}),(0,a.jsx)(K.C,{items:e4,onChange:e6})]}),eX&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{className:"text-[13px] font-medium text-foreground",children:er("tasks.dependencies")}),eH.length>0&&(0,a.jsx)("div",{className:"space-y-1.5",children:eH.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),(0,a.jsx)("span",{className:"text-xs text-foreground truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(eN[e.status]||""),children:er("status.".concat(ek[e.status]||e.status))})]}),(0,a.jsx)(S.$,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>eG(s=>s.filter(s=>s.uuid!==e.uuid)),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))}),sg.length>0&&(0,a.jsxs)(T.l6,{onValueChange:e=>{let s=eI.find(s=>s.uuid===e);s&&eG(e=>[...e,s])},children:[(0,a.jsx)(T.bq,{className:"h-8 border-border text-xs text-muted-foreground focus:ring-primary",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"}),(0,a.jsx)(T.yv,{placeholder:er("tasks.addDependency")})]})}),(0,a.jsx)(T.gC,{children:sg.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsx)("span",{className:"truncate",children:e.title})},e.uuid))})]},eH.length)]})]}):f?(0,a.jsxs)(ev.P.div,{variants:eb.qG,initial:"initial",animate:"animate",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("common.assignee")}),(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3",children:f.assignee?(0,a.jsxs)(a.Fragment,{children:[(0,L.bB)(f.assignee)?(0,a.jsx)(M.AgentAvatar,{name:f.assignee.name,size:28,className:"rounded-full"}):(0,a.jsx)(q.eu,{className:"h-7 w-7",children:(0,a.jsx)(q.q5,{className:"bg-border text-muted-foreground",children:f.assignee.name.charAt(0).toUpperCase()})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:f.assignee.name}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,L.bB)(f.assignee)?"".concat(er("common.agent")," • ").concat(f.assignee.assignedAt?(0,eg.r)(f.assignee.assignedAt):""):er("common.user")}),"agent_instance"===f.assignee.type&&f.assignee.instance&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsx)(B.jQ,{cwd:f.assignee.instance.cwd,host:f.assignee.instance.host})})]})]}):(0,a.jsx)("span",{className:"text-sm text-[#9A9A9A]",children:er("common.unassigned")})})]}),eJ.length>0&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("sessions.activeWorkers")}),(0,a.jsx)("div",{className:"mt-2 space-y-1.5",children:eJ.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg bg-background p-2.5",children:[(0,a.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,a.jsx)(M.AgentAvatar,{name:e.agentName,size:28,className:"rounded-full"}),(0,a.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 h-2 w-2 rounded-full bg-green-500 ring-2 ring-background"})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-foreground truncate",children:e.sessionName}),(0,a.jsxs)("div",{className:"text-[10px] text-[#9A9A9A]",children:[e.agentName," \xb7 ",ew(e.checkinAt,er)]})]})]},e.sessionUuid))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("common.description")}),(0,a.jsx)("div",{className:"mt-2",children:f.description?(0,a.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,a.jsx)(Z.MarkdownContent,{children:f.description})}):(0,a.jsx)("p",{className:"text-sm italic text-[#9A9A9A]",children:er("common.noDescription")})})]}),f.acceptanceCriteria&&!(f.acceptanceCriteriaItems&&f.acceptanceCriteriaItems.length>0)&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("tasks.acceptanceCriteria")}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,a.jsx)(Z.MarkdownContent,{children:f.acceptanceCriteria})})})]}),e_&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("common.source")}),(0,a.jsx)("a",{href:"/projects/".concat(P,"/proposals/").concat(e_.uuid),className:"mt-2 flex items-center justify-between rounded-lg bg-background p-3 hover:bg-[#F0EDE5] dark:hover:bg-[#26241f] transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(m.A,{className:"h-3.5 w-3.5 text-primary"}),(0,a.jsx)("span",{className:"text-xs text-foreground",children:e_.title})]})})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("tasks.dependencies")}),eV&&(0,a.jsx)("div",{className:"mt-2 rounded-lg bg-destructive/10 p-2.5 text-xs text-destructive",children:eV}),eP?(0,a.jsx)("div",{className:"mt-2 flex items-center justify-center py-4",children:(0,a.jsx)(x.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):(0,a.jsxs)(a.Fragment,{children:[eq.length>0&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.jsx)(p.A,{className:"h-3 w-3 text-[#9A9A9A]"}),(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("tasks.dependsOn")})]}),(0,a.jsx)("div",{className:"space-y-1.5",children:eq.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),(0,a.jsx)("span",{className:"text-xs text-foreground truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(eN[e.status]||""),children:er("status.".concat(ek[e.status]||e.status))})]}),en&&(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>sx(e.uuid),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))})]}),eB.length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.jsx)(p.A,{className:"h-3 w-3 rotate-180 text-[#9A9A9A]"}),(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("tasks.blockedByThis")})]}),(0,a.jsx)("div",{className:"space-y-1.5",children:eB.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-background p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"text-xs text-foreground truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(eN[e.status]||""),children:er("status.".concat(ek[e.status]||e.status))})]}),en&&(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>sp(e.uuid),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))})]}),0===eq.length&&0===eB.length&&(0,a.jsx)("p",{className:"mt-2 text-sm italic text-[#9A9A9A]",children:er("tasks.noDependencies")}),en&&sh.length>0&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(T.l6,{onValueChange:e=>sm(e),children:[(0,a.jsx)(T.bq,{className:"h-8 border-border text-xs text-muted-foreground focus:ring-primary",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"}),(0,a.jsx)(T.yv,{placeholder:er("tasks.addDependency")})]})}),(0,a.jsx)(T.gC,{children:sh.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsx)("span",{className:"truncate",children:e.title})},e.uuid))})]},eq.length)})]})]}),f&&f.acceptanceCriteriaItems&&f.acceptanceCriteriaItems.length>0&&(()=>{let e=f.acceptanceCriteriaItems,s=f.acceptanceSummary,t=e=>"passed"===e?(0,a.jsx)(h.A,{className:"h-4 w-4 text-green-600 dark:text-[#6FD19A]"}):"failed"===e?(0,a.jsx)(g.A,{className:"h-4 w-4 text-red-600 dark:text-[#F08078]"}):(0,a.jsx)(v,{className:"h-4 w-4 text-yellow-600 dark:text-[#E0B44E]"}),r=e=>"passed"===e?"bg-green-50 text-green-700 dark:bg-[#14281a] dark:text-[#6FD19A]":"failed"===e?"bg-red-50 text-red-700 dark:bg-[#331619] dark:text-[#F08078]":"bg-yellow-50 text-yellow-700 dark:bg-[#332a12] dark:text-[#E0B44E]",i=async(e,s)=>{(await W(f.uuid,[{uuid:e,status:s}])).success&&ei.refresh()};return(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("acceptanceCriteria.title")}),s&&(0,a.jsx)(F.E,{className:r(f.acceptanceStatus||"pending"),variant:"secondary",children:er("acceptanceCriteria.progress",{passed:s.passed,total:s.total})})]}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[e.map(e=>(0,a.jsx)(C.Zp,{className:"p-3",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"mt-0.5 shrink-0",children:t(e.status)}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"text-xs text-foreground",children:e.description}),(0,a.jsx)(F.E,{variant:"outline",className:"text-[10px] shrink-0",children:e.required?er("acceptanceCriteria.required"):er("acceptanceCriteria.optional")})]}),(0,a.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,a.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:er("acceptanceCriteria.devSelfCheck")}),(0,a.jsxs)(F.E,{className:"text-[10px] ".concat(r(e.devStatus)),variant:"secondary",children:[t(e.devStatus),(0,a.jsx)("span",{className:"ml-1",children:er("acceptanceCriteria.status.".concat(e.devStatus))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,a.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:er("acceptanceCriteria.verification")}),(0,a.jsxs)(F.E,{className:"text-[10px] ".concat(r(e.status)),variant:"secondary",children:[t(e.status),(0,a.jsx)("span",{className:"ml-1",children:er("acceptanceCriteria.status.".concat(e.status))})]})]})]}),e.devEvidence&&(0,a.jsxs)("div",{className:"mt-2 rounded bg-background p-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:er("acceptanceCriteria.devEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:e.devEvidence})]}),e.evidence&&(0,a.jsxs)("div",{className:"mt-2 rounded bg-background p-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:er("acceptanceCriteria.verifyEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:e.evidence})]}),en?"pending"===e.status?(0,a.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,a.jsxs)(S.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-green-700 dark:text-[#6FD19A] border-green-200 dark:border-[#2a4a34] hover:bg-green-50 dark:hover:bg-[#14281a]",onClick:()=>i(e.uuid,"passed"),children:[(0,a.jsx)(h.A,{className:"h-3.5 w-3.5 mr-1"}),er("acceptanceCriteria.pass")]}),(0,a.jsxs)(S.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-red-700 dark:text-[#F08078] border-red-200 dark:border-[#5a2a2e] hover:bg-red-50 dark:hover:bg-[#331619]",onClick:()=>i(e.uuid,"failed"),children:[(0,a.jsx)(g.A,{className:"h-3.5 w-3.5 mr-1"}),er("acceptanceCriteria.fail")]})]}):(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(S.$,{size:"sm",variant:"ghost",className:"h-7 min-h-[44px] sm:min-h-0 text-xs text-[#9A9A9A] hover:text-foreground",onClick:async()=>{(await J(f.uuid,e.uuid)).success&&ei.refresh()},children:er("acceptanceCriteria.undoVerification")})}):null]})]})},e.uuid)),s&&(s.requiredPending>0||s.requiredFailed>0)&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-yellow-50 dark:bg-[#332a12] p-3 mt-2",children:[(0,a.jsx)(b.A,{className:"h-4 w-4 text-yellow-600 dark:text-[#E0B44E] shrink-0"}),(0,a.jsx)("span",{className:"text-xs text-yellow-700 dark:text-[#E0B44E]",children:er("acceptanceCriteria.gateBlocked",{count:s.requiredPending+s.requiredFailed})})]}),s&&0===s.requiredPending&&0===s.requiredFailed&&s.required>0&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-green-50 dark:bg-[#14281a] p-3 mt-2",children:[(0,a.jsx)(h.A,{className:"h-4 w-4 text-green-600 dark:text-[#6FD19A] shrink-0"}),(0,a.jsx)("span",{className:"text-xs text-green-700 dark:text-[#6FD19A]",children:er("acceptanceCriteria.gateReady")})]})]})]})})(),(0,a.jsxs)("div",{className:"mt-5 flex-1",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("common.activity")}),(0,a.jsx)("div",{className:"mt-2 space-y-3",children:eE?(0,a.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,a.jsx)(x.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):0===eC.length?(0,a.jsx)("p",{className:"text-sm text-[#9A9A9A] italic",children:er("common.noActivity")}):eC.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-secondary",children:(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(function(e){switch(e){case"task_created":return"bg-primary";case"task_assigned":case"task_claimed":return"bg-[#1976D2]";case"task_started":return"bg-[#5A9E6F]";case"task_submitted":return"bg-[#7B1FA2]";case"task_completed":case"task_verified":return"bg-[#00796B]";case"task_released":return"bg-[#E65100]";default:return"bg-muted-foreground"}}(e.action))})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-foreground",children:function(e,s){let t=e.sessionName?"".concat(e.actorName," / ").concat(e.sessionName):e.actorName,{action:a}=e;switch(a){case"task_created":return s("activity.taskCreated",{actor:t});case"task_assigned":return s("activity.taskAssigned",{actor:t});case"task_claimed":return s("activity.taskClaimed",{actor:t});case"task_started":return s("activity.taskStarted",{actor:t});case"task_submitted":return s("activity.taskSubmitted",{actor:t});case"task_completed":case"task_verified":return s("activity.taskCompleted",{actor:t});case"task_released":return s("activity.taskReleased",{actor:t});case"task_status_changed":return s("activity.taskStatusChanged",{actor:t});default:return"".concat(t,": ").concat(a)}}(e,er)}),(0,a.jsx)("p",{className:"text-[10px] text-[#9A9A9A]",children:ew(e.createdAt,er)})]})]},e.uuid))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("references.title")}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(H.ReferencesSection,{targetType:"task",targetUuid:f.uuid,canWrite:!0,compact:!0})})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:er("comments.title")}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(O.$m,{targetType:"task",targetUuid:f.uuid,currentUserUuid:Q,compact:!0})})]})]}):null})}),(0,a.jsx)("div",{className:"border-t border-secondary px-6 py-4",children:(0,a.jsx)("div",{className:"flex items-center gap-3",children:eZ?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.$,{variant:"outline",className:"border-border",onClick:sd,disabled:e7,children:er("common.cancel")}),(0,a.jsx)(S.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:so,disabled:e7||!eQ.trim(),children:e7?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),er("common.saving")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.A,{className:"mr-2 h-4 w-4"}),eX?er("common.create"):er("tasks.saveChanges")]})})]}):f&&en?(0,a.jsxs)(a.Fragment,{children:["done"!==f.status&&"closed"!==f.status&&(0,a.jsxs)(S.$,{variant:"outline",className:"border-border",onClick:()=>eU(!0),disabled:ed,children:[(0,a.jsx)(N.A,{className:"mr-2 h-4 w-4"}),er("common.assign")]}),si&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#1976D2] hover:bg-[#1565C0] text-white",onClick:()=>sl("in_progress"),disabled:ed,children:[(0,a.jsx)(k.A,{className:"mr-2 h-4 w-4"}),er("tasks.startWork")]}),sn&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#7B1FA2] hover:bg-[#6A1B9A] text-white",onClick:()=>sl("to_verify"),disabled:ed,children:[(0,a.jsx)(A.A,{className:"mr-2 h-4 w-4"}),er("tasks.submitForReview")]}),sc&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#22C55E] hover:bg-[#16A34A] text-white",onClick:()=>sl("done"),disabled:ed,children:[(0,a.jsx)(y,{className:"mr-2 h-4 w-4"}),er("tasks.markAsVerified")]}),("done"===f.status||"closed"===f.status)&&(0,a.jsx)("div",{className:"text-sm text-[#9A9A9A] text-center w-full",children:er("tasks.taskCompleted")}),(0,a.jsx)("div",{className:"ml-auto",children:(0,a.jsxs)(U.Lt,{children:[(0,a.jsx)(U.tv,{asChild:!0,children:(0,a.jsx)(S.$,{variant:"outline",size:"icon",className:"h-9 w-9 border-border text-[#D32F2F] dark:text-[#F08078] hover:bg-[#FFEBEE] dark:hover:bg-[#331619] hover:text-[#D32F2F] hover:border-[#D32F2F]",children:(0,a.jsx)(w.A,{className:"h-4 w-4"})})}),(0,a.jsxs)(U.EO,{children:[(0,a.jsxs)(U.wd,{children:[(0,a.jsx)(U.r7,{children:er("tasks.deleteTask")}),(0,a.jsx)(U.$v,{children:er("tasks.deleteTaskConfirm",{title:f.title})})]}),(0,a.jsxs)(U.ck,{children:[(0,a.jsx)(U.Zr,{children:er("common.cancel")}),(0,a.jsx)(U.Rx,{variant:"destructive",onClick:su,disabled:st,children:st?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),er("common.delete")]}):er("common.delete")})]})]})]})})]}):null})})]}),f&&eT&&(0,a.jsx)(eo,{task:f,projectUuid:P,currentUserUuid:Q,onClose:()=>eU(!1)})]})}},55033:(e,s,t)=>{t.d(s,{_u:()=>A,c_:()=>f,nF:()=>k,qK:()=>j});var a=t(60200),r=t(81476),i=t(24546),n=t(59055);t(19768);var c=t(62116),l=t.n(c),d=t(25588),o=t(75507),u=t(9258);let m={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"},x={open:"#E65100",assigned:"#1976D2",in_progress:"#5A9E6F",to_verify:"#7B1FA2",done:"#00796B",closed:"#9A9A9A"},p={low:"priority.low",medium:"priority.medium",high:"priority.high",critical:"priority.critical"},h={open:"status.open",assigned:"status.assigned",in_progress:"status.inProgress",to_verify:"status.toVerify",done:"status.done",closed:"status.closed"},g={low:"bg-[#9A9A9A]",medium:"bg-[#E65100]",high:"bg-[#D32F2F]",critical:"bg-[#B71C1C]"},f={taskNode:function(e){let{data:s}=e,t=(0,d.c)();return(0,a.jsxs)("div",{className:"rounded-lg border-2 border-[#E5E2DC] dark:border-[#2a2a2e] bg-card px-4 py-3 shadow-sm min-w-[200px] max-w-[260px] cursor-pointer hover:border-primary transition-colors",children:[(0,a.jsx)(i.h7,{type:"target",position:n.yX.Top,className:"!bg-primary !w-2 !h-2"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)(o.E,{className:"text-[10px] ".concat(m[s.status]||""),children:t(h[s.status]||s.status)}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("div",{className:"h-1.5 w-1.5 rounded-full ".concat(g[s.priority]||"")}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground",children:t(p[s.priority]||s.priority)})]})]}),(0,a.jsx)("p",{className:"text-xs font-medium text-foreground leading-snug line-clamp-2",children:s.title}),(0,a.jsx)(i.h7,{type:"source",position:n.yX.Bottom,className:"!bg-primary !w-2 !h-2"})]})}},v={taskNode:function(e){let{data:s}=e,t=x[s.status]||"#E5E0D8";return(0,a.jsxs)("div",{className:"rounded-md border-[1.5px] bg-card px-2.5 py-1.5 shadow-sm",style:{borderColor:t,width:b},children:[(0,a.jsx)(i.h7,{type:"target",position:n.yX.Top,className:"!bg-primary !w-1.5 !h-1.5"}),(0,a.jsx)("p",{className:"text-[10px] font-medium text-foreground leading-tight line-clamp-2",children:s.title}),(0,a.jsx)(i.h7,{type:"source",position:n.yX.Bottom,className:"!bg-primary !w-1.5 !h-1.5"})]})}},b=150,j={animated:!0,style:{stroke:"#C67A52",strokeWidth:2},markerEnd:{type:"arrowclosed",color:"#C67A52"}},N={animated:!0,style:{stroke:"#C67A52",strokeWidth:1.5},markerEnd:{type:"arrowclosed",color:"#C67A52"}};function k(e,s,t){var a,r,i,n;let c=null!=(a=null==t?void 0:t.nodeWidth)?a:240,d=null!=(r=null==t?void 0:t.nodeHeight)?r:80,o=new(l()).graphlib.Graph;return o.setDefaultEdgeLabel(()=>({})),o.setGraph({rankdir:"TB",nodesep:null!=(i=null==t?void 0:t.nodesep)?i:50,ranksep:null!=(n=null==t?void 0:t.ranksep)?n:80}),e.forEach(e=>{o.setNode(e.id,{width:c,height:d})}),s.forEach(e=>{o.setEdge(e.source,e.target)}),l().layout(o),{nodes:e.map(e=>{let s=o.node(e.id);return{...e,position:{x:s.x-c/2,y:s.y-d/2}}}),edges:s}}function A(e){let{tasks:s,edges:t,readonly:n=!1,compact:c=!1,height:l,onNodeClick:o,className:m}=e,x=(0,d.c)(),p=(0,u.W)(),{layoutedNodes:h,layoutedEdges:g}=(0,r.useMemo)(()=>{let e=s.map(e=>{var s;return{id:e.uuid,type:"taskNode",position:{x:0,y:0},data:{title:e.title,status:e.status,priority:e.priority,proposalUuid:null!=(s=e.proposalUuid)?s:null}}}),a=k(e,t.map((e,s)=>({id:"e-".concat(s),source:e.to,target:e.from,...c?N:j})),c?{nodeWidth:b,nodeHeight:50,nodesep:20,ranksep:40}:void 0);return{layoutedNodes:a.nodes,layoutedEdges:a.edges}},[s,t,c]);return 0===s.length?(0,a.jsx)("div",{className:"flex items-center justify-center text-sm text-muted-foreground ".concat(m||""),style:l?{height:l}:void 0,children:x("tasks.noTasksToDisplay")}):(0,a.jsx)("div",{className:"rounded-[10px] border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] ".concat(m||""),style:l?{height:l}:void 0,children:(0,a.jsxs)(i.Gc,{colorMode:p?"dark":"light",nodes:h,edges:g,nodeTypes:c?v:f,onNodeClick:o?(e,s)=>o(s.id):void 0,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},nodesDraggable:!n,nodesConnectable:!n,elementsSelectable:!n,panOnDrag:!0,zoomOnScroll:!0,children:[(0,a.jsx)(i.VS,{color:p?"#40392f":"#E5E0D8",gap:20}),!n&&(0,a.jsx)(i.H2,{className:"[&>button]:border-border [&>button]:bg-card [&>button]:text-foreground [&>button:hover]:bg-background"})]})})}},58294:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(73326).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"}]])},60516:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(73326).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},74315:(e,s,t)=>{t.d(s,{T:()=>i});var a=t(81476),r=t(45719);function i(e,s){var t;let i=(0,r.useSearchParams)(),n=(0,a.useRef)(!1),c=!n.current;n.current=!0;let l=null!=(t=i.get("panel"))?t:c&&null!=s?s:null,d=i.get("tab"),o=(0,a.useCallback)((s,t)=>{let a=new URLSearchParams(window.location.search);s?a.set("panel",s):a.delete("panel"),t?a.set("tab",t):a.delete("tab");let r=a.toString();return r?"".concat(e,"?").concat(r):e},[e]),u=(0,a.useCallback)((e,s)=>{window.history.replaceState(null,"",o(e,s))},[o]),m=(0,a.useCallback)(()=>{window.history.replaceState(null,"",o(null))},[o]),x=(0,a.useCallback)(e=>{l&&window.history.replaceState(null,"",o(l,e))},[o,l]);return{selectedId:l,selectedTab:d,openPanel:u,closePanel:m,switchTab:x}}},79099:(e,s,t)=>{t.d(s,{Bj:()=>l,L8:()=>r,Wl:()=>d,_5:()=>c,eT:()=>i,fw:()=>n});var a=t(3562);let r=480;function i(e){switch(e){case"done":return"bg-[#00796B]";case"in_progress":return"bg-[#1976D2]";case"to_verify":return"bg-[#7B1FA2]";case"open":case"assigned":return"bg-[#E65100]";case"closed":return"bg-[#9A9A9A]";default:return"bg-[#D9D9D9]"}}function n(e,s){let t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4),n=Math.floor(r/36e5),c=Math.floor(r/864e5);return i<1?s("time.justNow"):i<60?s("time.minutesAgo",{minutes:i}):n<24?s("time.hoursAgo",{hours:n}):c<7?s("time.daysAgo",{days:c}):(0,a.r)(t)}let c={todo:"bg-[#FFF3E0] text-[#E65100] dark:bg-[#3a2a12] dark:text-[#F0A050]",in_progress:"bg-[#E3F2FD] text-[#1976D2] dark:bg-[#13253a] dark:text-[#5AA9F0]",human_conduct_required:"bg-[#F3E5F5] text-[#7B1FA2] dark:bg-[#281630] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] text-[#00796B] dark:bg-[#12292a] dark:text-[#4FD1C0]"},l={todo:"todo",in_progress:"inProgress",human_conduct_required:"humanConductRequired",done:"done"},d={open:"open",researching:"researching",answer_questions:"answerQuestions",planning:"planning",review_proposal:"reviewProposal",building:"building",verify_work:"verifyWork",done:"done"}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65833],{5184:(e,s,t)=>{"use strict";t.d(s,{Z:()=>d});var a=t(60200),n=t(25588),r=t(16272),i=t(65642),l=t(70246),o=t(50759),c=t(29638);function d(e){let{apiKey:s}=e,t=(0,n.c)("onboarding"),d=window.location.origin,m=s||"<YOUR_API_KEY>",u=(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.profileStep.title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_AGENT_PROFILE="<agent-uuid>"'}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.profileStep.desc")})]});return(0,a.jsx)(r.Zp,{className:"w-full",children:(0,a.jsx)(r.Wu,{className:"p-6",children:(0,a.jsxs)(i.tU,{defaultValue:"claude-code",className:"w-full",children:[(0,a.jsxs)(i.j7,{className:"w-full justify-start overflow-x-auto",children:[(0,a.jsx)(i.Xi,{value:"claude-code",className:"shrink-0",children:t("install.tabs.claudeCode")}),(0,a.jsx)(i.Xi,{value:"codex",className:"shrink-0",children:t("install.tabs.codex")}),(0,a.jsx)(i.Xi,{value:"kiro",className:"shrink-0",children:t("install.tabs.kiro")}),(0,a.jsx)(i.Xi,{value:"pi",className:"shrink-0",children:t("install.tabs.pi")}),(0,a.jsx)(i.Xi,{value:"dsh",className:"shrink-0",children:t("install.tabs.dsh")}),(0,a.jsx)(i.Xi,{value:"opencode",className:"shrink-0",children:t("install.tabs.opencode")}),(0,a.jsx)(i.Xi,{value:"openclaw",className:"shrink-0",children:t("install.tabs.openClaw")}),(0,a.jsx)(i.Xi,{value:"other",className:"shrink-0",children:t("install.tabs.other")})]}),(0,a.jsxs)(i.av,{value:"claude-code",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.claudeCode.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.claudeCode.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.claudeCode.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents claude"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.claudeCode.step2Tip")})]})]}),(0,a.jsxs)(i.av,{value:"codex",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.codex.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.codex.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.codex.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents codex"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.codex.step2Tip")})]})]}),(0,a.jsxs)(i.av,{value:"kiro",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.kiro.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.kiro.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.kiro.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents kiro"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.kiro.step2Tip")})]}),u]}),(0,a.jsxs)(i.av,{value:"pi",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.pi.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.pi.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.pi.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents pi"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.pi.step2Tip")})]}),u]}),(0,a.jsxs)(i.av,{value:"dsh",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.dsh.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.dsh.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.dsh.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"dsh plugin --profile <name> add @chorus-aidlc/chorus-dsh -w"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.dsh.step2Tip",{name:"<name>"})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.dsh.step3Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents dsh --dsh-profile <name>"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.dsh.step3Tip",{name:"<name>"})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.dsh.step4Title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t("install.dsh.step4Desc",{name:"<name>"})})]})]}),(0,a.jsxs)(i.av,{value:"opencode",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.opencode.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:'export CHORUS_URL="'.concat(d,'"\nexport CHORUS_API_KEY="').concat(m,'"')}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.opencode.step1Tip")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.opencode.step2Title")}),(0,a.jsx)(c.N,{language:"bash",code:"npm install -g @chorus-aidlc/chorus\nchorus agents add --agents opencode"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:t("install.opencode.step2Tip")})]}),u,(0,a.jsxs)(l.Nt,{children:[(0,a.jsxs)(l.R6,{className:"flex w-full items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[(0,a.jsx)(o.A,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-180"}),t("install.opencode.troubleshootingTitle")]}),(0,a.jsx)(l.Ke,{children:(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/20 bg-amber-500/5 p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:t("install.opencode.issueCache.title")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t("install.opencode.issueCache.fix")})]}),(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/20 bg-amber-500/5 p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:t("install.opencode.issueEnv.title")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t("install.opencode.issueEnv.fix")})]}),(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/20 bg-amber-500/5 p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:t("install.opencode.issueCheckin.title")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t("install.opencode.issueCheckin.fix")})]})]})})]})]}),(0,a.jsxs)(i.av,{value:"openclaw",className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.openClaw.step1Title")}),(0,a.jsx)(c.N,{language:"bash",code:"openclaw plugins install @chorus-aidlc/chorus-openclaw-plugin"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.openClaw.step2Title")}),(0,a.jsx)(c.N,{language:"json",code:'{\n "hooks": { "enabled": true, "token": "<your-token>" },\n "plugins": {\n "enabled": true,\n "entries": {\n "chorus-openclaw-plugin": {\n "enabled": true,\n "config": {\n "chorusUrl": "'.concat(d,'",\n "apiKey": "').concat(m,'",\n "autoStart": true\n }\n }\n }\n }\n}')})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium text-foreground",children:t("install.openClaw.step3Title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t("install.openClaw.step3Desc")})]}),(0,a.jsxs)(l.Nt,{children:[(0,a.jsxs)(l.R6,{className:"flex w-full items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[(0,a.jsx)(o.A,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-180"}),t("install.openClaw.troubleshootingTitle")]}),(0,a.jsx)(l.Ke,{children:(0,a.jsxs)("div",{className:"mt-2 rounded-md border border-amber-500/20 bg-amber-500/5 p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:t("install.openClaw.troubleshootingError")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t("install.openClaw.troubleshootingFix")})]})})]})]}),(0,a.jsxs)(i.av,{value:"other",className:"mt-4 space-y-4",children:[(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t("install.other.description")}),(0,a.jsx)(c.N,{code:"Please install and configure the Chorus AI-DLC collaboration platform.\n\nChorus URL: ".concat(d,"\nAPI Key: ").concat(m,"\n\nRead the setup instructions from:\n").concat(d,'/skill/chorus/SKILL.md\n\nFollow the "Setup" section to configure the MCP server,\nthen call chorus_checkin() to verify the connection.')})]})]})})})}},15272:(e,s,t)=>{var a={"./en.json":[99373,99373],"./ja.json":[11595,11595],"./ko.json":[33456,33456],"./zh.json":[4860,4860]};function n(e){if(!t.o(a,e))return Promise.resolve().then(()=>{var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s});var s=a[e],n=s[0];return t.e(s[1]).then(()=>t.t(n,19))}n.keys=()=>Object.keys(a),n.id=15272,e.exports=n},29638:(e,s,t)=>{"use strict";t.d(s,{N:()=>r});var a=t(60200),n=t(64035);function r(e){let{code:s,language:t}=e,r="```".concat(t||"","\n").concat(s,"\n```");return(0,a.jsx)(n.MarkdownContent,{children:r})}},35191:(e,s,t)=>{"use strict";t.d(s,{o:()=>a});let a={developer_agent:["idea:read","proposal:read","document:read","project:read","task:read","task:write"],pm_agent:["idea:read","idea:write","proposal:read","proposal:write","document:read","document:write","task:read","task:write","project:read","project:write"],admin_agent:["idea:read","idea:write","idea:admin","proposal:read","proposal:write","proposal:admin","document:read","document:write","document:admin","task:read","task:write","task:admin","project:read","project:write","project:admin"]}},45200:(e,s,t)=>{"use strict";t.d(s,{J:()=>i});var a=t(60200);t(81476);var n=t(14122),r=t(49417);function i(e){let{className:s,...t}=e;return(0,a.jsx)(n.Root,{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",s),...t})}},48658:(e,s,t)=>{"use strict";t.d(s,{I:()=>n});var a=t(42885);let n=(0,a.createServerReference)("403cb3c868b8a208f125fcdd0e248700b28c3d45f3",a.callServer,void 0,a.findSourceMapURL,"createAgentAndKeyAction")},48933:(e,s,t)=>{"use strict";t.d(s,{LocaleProvider:()=>m,Y:()=>d});var a=t(60200),n=t(81476),r=t(9360),i=t(76031),l=t(43664);let o="chorus-locale",c=(0,n.createContext)(null);function d(){let e=(0,n.useContext)(c);if(!e)throw Error("useLocale must be used within LocaleProvider");return e}function m(e){let{children:s}=e,[d,m]=(0,n.useState)(i.q),[u,x]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e,s=localStorage.getItem(o);s&&i.IB.includes(s)?e=s:(e=(0,i.AL)(),localStorage.setItem(o,e)),m(e),document.cookie="chorus-locale=".concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax"),h(!0)},[]),(0,n.useEffect)(()=>{p&&t(15272)("./".concat(d,".json")).then(e=>{x(e.default)}).catch(e=>{l.q.error("Failed to load messages for locale ".concat(d,":"),e),t(15272)("./".concat(i.q,".json")).then(e=>{x(e.default)})})},[d,p]);let g=(0,n.useCallback)(e=>{m(e),localStorage.setItem(o,e),document.cookie="chorus-locale=".concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax"),document.documentElement.lang=e},[]);return p&&u?(0,a.jsx)(c.Provider,{value:{locale:d,setLocale:g},children:(0,a.jsx)(r.A,{locale:d,messages:u,children:s})}):null}},65642:(e,s,t)=>{"use strict";t.d(s,{Xi:()=>o,av:()=>c,j7:()=>l,tU:()=>i});var a=t(60200);t(81476);var n=t(44188),r=t(49417);function i(e){let{className:s,...t}=e;return(0,a.jsx)(n.Root,{"data-slot":"tabs",className:(0,r.cn)("flex flex-col gap-2",s),...t})}function l(e){let{className:s,...t}=e;return(0,a.jsx)(n.List,{"data-slot":"tabs-list",className:(0,r.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",s),...t})}function o(e){let{className:s,...t}=e;return(0,a.jsx)(n.Trigger,{"data-slot":"tabs-trigger",className:(0,r.cn)("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...t})}function c(e){let{className:s,...t}=e;return(0,a.jsx)(n.Content,{"data-slot":"tabs-content",className:(0,r.cn)("flex-1 outline-none",s),...t})}},68433:(e,s,t)=>{"use strict";t.d(s,{m:()=>m});var a=t(60200),n=t(63002),r=t(38395),i=t(25588),l=t(40058),o=t(48933),c=t(49417);let d="https://doc.chorus-ai.dev";function m(e){let{variant:s="inline",className:t}=e,m=(0,i.c)("resourceLinks"),{locale:u}=(0,o.Y)(),x="en"===u?d:"".concat(d,"/").concat(u);return(0,a.jsxs)("div",{className:(0,c.cn)("flex flex-wrap items-center gap-2","footer"===s&&"justify-center gap-3",t),children:[(0,a.jsx)(l.$,{variant:"outline",size:"sm",asChild:!0,children:(0,a.jsxs)("a",{href:"https://github.com/Chorus-AIDLC/Chorus",target:"_blank",rel:"noopener noreferrer","aria-label":m("githubAria"),children:[(0,a.jsx)(n.A,{className:"h-4 w-4"}),m("github")]})}),(0,a.jsx)(l.$,{variant:"outline",size:"sm",asChild:!0,children:(0,a.jsxs)("a",{href:x,target:"_blank",rel:"noopener noreferrer","aria-label":m("docsAria"),children:[(0,a.jsx)(r.A,{className:"h-4 w-4"}),m("docs")]})})]})}},72450:(e,s,t)=>{"use strict";t.d(s,{eZ:()=>a,kl:()=>n,lp:()=>r});let a=["idea","proposal","document","task","project"],n=["read","write","admin"],r=a.flatMap(e=>n.map(s=>"".concat(e,":").concat(s)))},73190:(e,s,t)=>{"use strict";t.d(s,{Y:()=>u});var a=t(60200),n=t(81476),r=t(25588),i=t(40058),l=t(71507),o=t(5535),c=t(43664),d=t(81408),m=t(5184);function u(e){let{onAgentCreated:s,createAgentAndKey:t,onClose:u,embedded:x=!1,submitLabel:p,submittingLabel:h}=e,g=(0,r.c)(),[j,f]=(0,n.useState)(""),[b,v]=(0,n.useState)("admin_agent"),[N,k]=(0,n.useState)(["admin_agent"]),[y,w]=(0,n.useState)([]),[C,_]=(0,n.useState)(""),[S,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)(null),[L,U]=(0,n.useState)(!1),I=async e=>{if((e.preventDefault(),j)&&("custom"!==b||0!==y.length)){T(!0);try{let e=await t({name:j,roles:N,permissions:"custom"===b?y:[],persona:C||null});e.success&&e.key?(x||R(e.key),s({uuid:e.agentUuid||"",name:j,roles:N,permissions:"custom"===b?y:[]},e.key)):c.q.error("Failed to create API key:",e.error)}catch(e){c.q.error("Failed to create API key:",e)}finally{T(!1)}}},P=async e=>{try{await navigator.clipboard.writeText(e),U(!0),setTimeout(()=>U(!1),2e3)}catch(e){c.q.error("Failed to copy to clipboard:",e)}},E=()=>{f(""),v("admin_agent"),k(["admin_agent"]),w([]),_(""),R(null),null==u||u()};return A&&!x?(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-green-600",children:[(0,a.jsx)(l.A,{className:"h-5 w-5"}),(0,a.jsx)("span",{className:"font-medium",children:g("settings.apiKeyCreated")})]}),(0,a.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:g("settings.apiKeyCreatedDesc")}),(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 rounded bg-foreground px-3 py-2 font-mono text-sm text-background",children:A}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>P(A),children:g(L?"common.copied":"common.copy")})]}),(0,a.jsx)("p",{className:"mb-3 text-sm text-muted-foreground",children:g("settings.installGuideIntro")}),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(m.Z,{apiKey:A})}),(0,a.jsx)(i.$,{onClick:E,className:"w-full",children:g("common.done")})]}):(0,a.jsxs)("form",{onSubmit:I,children:[!x&&(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-6 py-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-foreground",children:g("settings.createApiKey")}),u&&(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"icon",onClick:E,className:"h-8 w-8",children:(0,a.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,a.jsx)("div",{className:x?void 0:"p-6",children:(0,a.jsx)(d.L,{name:j,onNameChange:f,preset:b,permissions:y,onPermissionsChange:function(e){v(e.preset),k(e.roles),w(e.permissions)},persona:C,onPersonaChange:_,nameInputId:"keyName",personaInputId:"create-agent-persona"})}),(0,a.jsxs)("div",{className:x?"flex justify-end gap-3 pt-2":"flex justify-end gap-3 border-t border-border px-6 py-4",children:[!x&&u&&(0,a.jsx)(i.$,{type:"button",variant:"outline",onClick:E,children:g("common.cancel")}),(0,a.jsx)(i.$,{type:"submit",disabled:!j||"custom"===b&&0===y.length||S,className:x?"w-full":void 0,size:x?"lg":"default",children:S?null!=h?h:g("settings.creating"):null!=p?p:g("settings.createApiKey")})]})]})}},75861:(e,s,t)=>{"use strict";t.d(s,{S:()=>l});var a=t(60200);t(81476);var n=t(71507),r=t(95957),i=t(49417);function l(e){let{className:s,...t}=e;return(0,a.jsx)(r.Root,{"data-slot":"checkbox",className:(0,i.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),...t,children:(0,a.jsx)(r.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,a.jsx)(n.A,{className:"size-3.5"})})})}},76031:(e,s,t)=>{"use strict";t.d(s,{AL:()=>i,IB:()=>a,L$:()=>r,q:()=>n});let a=["en","zh","ko","ja"],n="en",r={en:"English",zh:"中文",ko:"한국어",ja:"日本語"};function i(){if("undefined"==typeof navigator)return n;let e=navigator.language.split("-")[0];return a.includes(e)?e:n}},81408:(e,s,t)=>{"use strict";t.d(s,{L:()=>b});var a=t(60200),n=t(81476),r=t(25588),i=t(81106),l=t(26185),o=t(30474),c=t(45200),d=t(16852),m=t(75861),u=t(21558),x=t(35191),p=t(72450);let h={admin_agent:"agent.permissions.presetAdmin",pm_agent:"agent.permissions.presetPm",developer_agent:"agent.permissions.presetDev",custom:"agent.permissions.presetCustom"},g={admin_agent:"agent.permissions.help.admin",pm_agent:"agent.permissions.help.pm",developer_agent:"agent.permissions.help.dev",custom:"agent.permissions.help.custom"},j=["admin_agent","pm_agent","developer_agent","custom"];function f(e){let{preset:s,permissions:t,onChange:n,readOnly:i=!1}=e,l=(0,r.c)(),o=null!=s?s:"custom",d=new Set("custom"===o?t:x.o[o]);return(0,a.jsxs)("div",{"data-testid":"agent-permission-picker",className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(c.J,{className:"text-[13px] font-medium",children:l("agent.permissions.title")}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:l("agent.permissions.description")})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(c.J,{htmlFor:"agent-permission-preset",children:l("agent.permissions.presetLabel")}),(0,a.jsxs)(u.l6,{value:o,onValueChange:function(e){if("custom"===e)return void n({preset:"custom",roles:[],permissions:Array.from(d)});e in x.o&&n({preset:e,roles:[e],permissions:[]})},disabled:i,children:[(0,a.jsx)(u.bq,{id:"agent-permission-preset",className:"w-full","aria-label":l("agent.permissions.presetLabel"),children:(0,a.jsx)(u.yv,{placeholder:l(h[o]),children:l(h[o])})}),(0,a.jsx)(u.gC,{children:j.map(e=>(0,a.jsx)(u.eb,{value:e,textValue:l(h[e]),children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 py-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-semibold",children:l(h[e])}),(0,a.jsx)("span",{className:"text-muted-foreground text-xs",children:l(g[e])})]})},e))})]})]}),(0,a.jsxs)("div",{role:"grid","aria-label":l("agent.permissions.title"),className:"overflow-hidden rounded-md border",children:[(0,a.jsxs)("div",{role:"row",className:"bg-muted/50 text-muted-foreground grid grid-cols-[1.5fr_repeat(3,1fr)] items-center gap-2 px-4 py-2 text-xs font-medium",children:[(0,a.jsx)("div",{role:"columnheader",children:l("agent.permissions.resourceHeader")}),p.kl.map(e=>(0,a.jsx)("div",{role:"columnheader",className:"text-center",children:l("agent.permissions.actions.".concat(e))},e))]}),p.eZ.map(e=>(0,a.jsxs)("div",{role:"row",className:"border-t grid grid-cols-[1.5fr_repeat(3,1fr)] items-center gap-2 px-4 py-2 text-sm",children:[(0,a.jsx)("div",{role:"rowheader",className:"font-medium",children:l("agent.permissions.resources.".concat(e))}),p.kl.map(s=>{let t="".concat(e,":").concat(s),r="perm-".concat(e,"-").concat(s);return(0,a.jsx)("div",{role:"gridcell",className:"flex items-center justify-center",children:(0,a.jsx)(m.S,{id:r,checked:d.has(t),disabled:i,"aria-label":"".concat(l("agent.permissions.resources.".concat(e))," ").concat(l("agent.permissions.actions.".concat(s))),onCheckedChange:e=>{if(!i){let s=new Set(d);!0===e?s.add(t):s.delete(t),n({preset:"custom",roles:[],permissions:Array.from(s)})}}})},s)})]},e))]})]})]})}function b(e){let{name:s,onNameChange:t,preset:m,permissions:u,onPermissionsChange:p,persona:h,onPersonaChange:g,nameInputId:j="agent-form-name",personaInputId:b="agent-form-persona",readOnly:v=!1}=e,N=(0,r.c)(),k=(0,n.useMemo)(()=>"custom"===m?u:[...x.o[m]],[m,u]);return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[s.trim()?(0,a.jsx)(l.AgentAvatar,{name:s,size:56,className:"rounded-2xl"}):(0,a.jsx)("div",{"aria-hidden":!0,className:"flex size-14 items-center justify-center rounded-2xl bg-muted text-muted-foreground",children:(0,a.jsx)(i.A,{className:"size-7"})}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:N("settings.agentAvatarPreview")})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(c.J,{htmlFor:j,className:"text-[13px]",children:N("settings.name")}),(0,a.jsx)(o.p,{id:j,value:s,onChange:e=>t(e.target.value),placeholder:N("settings.namePlaceholder"),className:"border-border",required:!0,disabled:v})]}),(0,a.jsx)(f,{preset:m,permissions:k,onChange:p,readOnly:v}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(c.J,{htmlFor:b,className:"text-[13px]",children:N("settings.agentPersona")}),(0,a.jsx)(d.T,{id:b,value:h,onChange:e=>g(e.target.value),placeholder:N("settings.personaPlaceholder"),rows:4,disabled:v}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:N("settings.personaHint")})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[75844],{3562:(e,t,n)=>{function r(e){let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0");return"".concat(n,"-").concat(r,"-").concat(a," ").concat(o,":").concat(l)}function a(e,t){let n="string"==typeof e?new Date(e):e;return isNaN(n.getTime())?"":n.toLocaleDateString(t,{month:"short",day:"numeric"})}n.d(t,{r:()=>r,s:()=>a})},7685:(e,t,n)=>{n.d(t,{D:()=>i});var r=n(60200),a=n(48186),o=n(69351),l=n(26185);function i(e){let{entityType:t,entityUuid:n,subEntityType:l,subEntityUuid:i,children:c,badgeInside:u}=e,{getPresence:d}=(0,a.xQ)(),m=d(t,n,l,i),p=m.length>0,f=p&&m.some(e=>"mutate"===e.action),h=p?f?m.find(e=>"mutate"===e.action):m[m.length-1]:null,x=h?(0,o.j)(h.agentName):"transparent";return(0,r.jsxs)("div",{className:"relative",style:p?{outline:"2px ".concat(f?"solid":"dashed"," ").concat(x),outlineOffset:"-2px",borderRadius:"var(--radius)"}:void 0,children:[p&&(0,r.jsxs)("div",{className:"absolute flex gap-1 z-10 justify-end ".concat(u?"top-0.5 right-1.5 max-w-[70%]":"-top-2.5 right-2 max-w-[80%]"),children:[m.slice(0,3).map(e=>(0,r.jsx)(s,{entry:e},e.agentUuid)),m.length>3&&(0,r.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-medium text-white bg-gray-500 whitespace-nowrap",children:["+",m.length-3]})]}),c]})}function s(e){let{entry:t}=e,n=(0,o.j)(t.agentName);return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[10px] font-medium text-white whitespace-nowrap animate-in fade-in duration-300 ease-out sm:text-[11px] sm:px-2",style:{backgroundColor:n},children:[(0,r.jsx)(l.AgentAvatar,{name:t.agentName,size:14,className:"rounded-full"}),t.agentName]})}},38060:(e,t,n)=>{n.d(t,{S2:()=>u,eV:()=>c,l9:()=>s,tS:()=>i,w0:()=>d});var r=n(60200),a=n(81476);n(32022);var o=n(42790);let l=(0,a.createContext)(null);function i(e){let{projectUuid:t,children:n}=e,i=(0,o.jj)(),s=null==i?void 0:i.subscribe,c=null==i?void 0:i.openGeneration,u=(0,a.useRef)(new Set),d=(0,a.useRef)(new Set),m=(0,a.useRef)(new Set),p=(0,a.useRef)(new Set),f=(0,a.useCallback)(()=>{u.current.forEach(e=>e())},[]),h=(0,a.useCallback)(e=>{d.current.forEach(t=>t(e))},[]),x=(0,a.useCallback)(()=>{for(let e of(f(),["task","idea","proposal","document","project","project_group"]))h({companyUuid:"",projectUuid:"",entityType:e,entityUuid:"",action:"updated"})},[f,h]);(0,a.useEffect)(()=>{let e,n,r=null,a=!1,o=0,l={};function i(n){if("presence"===n.type){if(t&&n.projectUuid!==t)return;m.current.forEach(e=>e(n));return}if("execution"===n.type)return void p.current.forEach(e=>e(n));if("string"!=typeof n.entityType||"string"!=typeof n.entityUuid||"string"!=typeof n.action||t&&n.projectUuid!==t)return;clearTimeout(e);let r=Date.now(),a=r-o;a>=3e3?(o=r,f()):e=setTimeout(()=>{o=Date.now(),f()},Math.max(1e3,3e3-a));let i=n.entityType;clearTimeout(l[i]),l[i]=setTimeout(()=>{h(n)},300)}function c(){u(),(r=new EventSource(t?"/api/events?projectUuid=".concat(encodeURIComponent(t)):"/api/events")).onopen=()=>{a&&x(),a=!0},r.onmessage=e=>{let t=null;try{t=JSON.parse(e.data)}catch(e){return}t&&i(t)},r.onerror=()=>{}}function u(){r&&(r.close(),r=null)}function d(){"visible"===document.visibilityState&&(r&&r.readyState!==EventSource.CLOSED||c())}return s?n=s(i):(c(),document.addEventListener("visibilitychange",d)),()=>{for(let t in null==n||n(),u(),clearTimeout(e),l)clearTimeout(l[t]);document.removeEventListener("visibilitychange",d)}},[t,s,f,h,x]);let g=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(s&&c){if(null===g.current){g.current=c;return}c>g.current&&(g.current=c,x())}},[s,c,x]);let v=(0,a.useCallback)(e=>(u.current.add(e),()=>{u.current.delete(e)}),[]),w=(0,a.useCallback)(e=>(d.current.add(e),()=>{d.current.delete(e)}),[]),y=(0,a.useCallback)(e=>(m.current.add(e),()=>{m.current.delete(e)}),[]),b=(0,a.useCallback)(e=>(p.current.add(e),()=>{p.current.delete(e)}),[]),C=(0,a.useMemo)(()=>({subscribe:v,subscribeEntity:w,subscribePresence:y,subscribeExecution:b}),[v,w,y,b]);return(0,r.jsx)(l.Provider,{value:C,children:n})}function s(e){let t=(0,a.useContext)(l),n=(0,a.useRef)(e);n.current=e,(0,a.useEffect)(()=>{if(!t)return;let e=()=>n.current();return e(),t.subscribe(e)},[t])}function c(e,t){let n=(0,a.useContext)(l),r=(0,a.useRef)(t);r.current=t;let o=(0,a.useRef)(e);o.current=e,(0,a.useEffect)(()=>{if(n)return n.subscribeEntity(e=>{let t=o.current;(Array.isArray(t)?t.includes(e.entityType):e.entityType===t)&&r.current(e)})},[n])}function u(e){let t=(0,a.useContext)(l),n=(0,a.useRef)(e);n.current=e,(0,a.useEffect)(()=>{if(t)return t.subscribePresence(e=>n.current(e))},[t])}function d(e,t,n){let r=(0,a.useContext)(l),o=(0,a.useRef)(n);o.current=n,(0,a.useEffect)(()=>{if(r)return r.subscribeEntity(n=>{n.entityType===e&&n.entityUuid===t&&o.current(n)})},[r,e,t])}},48186:(e,t,n)=>{n.d(t,{fv:()=>h,xQ:()=>x});var r=n(81476),a=n(38060);let o=new Map,l=new Map,i=new Map,s=new Set,c=0;function u(e,t,n,r){return n?r?"".concat(e,":").concat(t,":").concat(n,":").concat(r):"".concat(e,":").concat(t,":").concat(n):"".concat(e,":").concat(t)}function d(){c++,s.forEach(e=>e())}function m(e){var t;let n=e.subEntityType,r=e.subEntityUuid,a=u(e.entityType,e.entityUuid,n,r),s=function(e,t,n,r,a){let o=u(e,t,r,a);return"".concat(o,":").concat(n)}(e.entityType,e.entityUuid,e.agentUuid,n,r),c=l.get(s);if(c&&Date.now()-c<3e3)return;l.set(s,Date.now());let m={agentUuid:e.agentUuid,agentName:e.agentName,action:e.action,timestamp:Date.now()},p=(null!=(t=o.get(a))?t:[]).filter(t=>t.agentUuid!==e.agentUuid);p.push(m),o.set(a,p);let f=i.get(s);f&&clearTimeout(f);let h=setTimeout(()=>{let t=o.get(a);if(t){let n=t.filter(t=>t.agentUuid!==e.agentUuid);0===n.length?o.delete(a):o.set(a,n)}l.delete(s),i.delete(s),d()},3e3);i.set(s,h),d()}function p(){return c}function f(e){return s.add(e),()=>{s.delete(e)}}function h(e){m({type:"presence",companyUuid:"",projectUuid:"",...e,timestamp:Date.now()})}function x(){return(0,r.useSyncExternalStore)(f,p,p),(0,a.S2)(m),{getPresence:(e,t,n,r)=>{if(n){var a;return null!=(a=o.get(u(e,t,n,r)))?a:[]}let l="".concat(e,":").concat(t),i=new Map;for(let[e,t]of o)if(e===l||e.startsWith(l+":"))for(let e of t){let t=i.get(e.agentUuid);(!t||e.timestamp>t.timestamp)&&i.set(e.agentUuid,e)}return[...i.values()]}}}},48869:(e,t,n)=>{n.d(t,{d:()=>a});var r=n(42885);let a=(0,r.createServerReference)("703f32b1bb8e38a0ced6f765d33b0339b7c920831e",r.callServer,void 0,r.findSourceMapURL,"getCommentsAction")},56791:(e,t,n)=>{n.d(t,{Hr:()=>f,Ht:()=>d,SQ:()=>c,_2:()=>u,lp:()=>m,mB:()=>p,rI:()=>i,ty:()=>s});var r=n(60200);n(81476);var a=n(76637),o=n(8575),l=n(49417);function i(e){let{...t}=e;return(0,r.jsx)(o.Root,{"data-slot":"dropdown-menu",...t})}function s(e){let{...t}=e;return(0,r.jsx)(o.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function c(e){let{className:t,sideOffset:n=4,...a}=e;return(0,r.jsx)(o.Portal,{children:(0,r.jsx)(o.Content,{"data-slot":"dropdown-menu-content",sideOffset:n,className:(0,l.cn)("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a})})}function u(e){let{className:t,inset:n,variant:a="default",...i}=e;return(0,r.jsx)(o.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:(0,l.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive","data-[inset]:pl-8 [&_svg]:size-4",t),...i})}function d(e){let{className:t,children:n,...i}=e;return(0,r.jsxs)(o.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,l.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",t),...i,children:[(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(o.ItemIndicator,{children:(0,r.jsx)(a.A,{className:"size-2 fill-current"})})}),n]})}function m(e){let{className:t,inset:n,...a}=e;return(0,r.jsx)(o.Label,{"data-slot":"dropdown-menu-label","data-inset":n,className:(0,l.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...a})}function p(e){let{className:t,...n}=e;return(0,r.jsx)(o.Separator,{"data-slot":"dropdown-menu-separator",className:(0,l.cn)("bg-border -mx-1 my-1 h-px",t),...n})}function f(e){let{...t}=e;return(0,r.jsx)(o.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...t})}},69189:(e,t,n)=>{n.d(t,{F7:()=>s,P6:()=>i,ProjectAccessProvider:()=>l});var r=n(60200),a=n(81476);let o=(0,a.createContext)("editor");function l(e){let{accessLevel:t,children:n}=e;return(0,r.jsx)(o.Provider,{value:t,children:n})}function i(){return(0,a.useContext)(o)}function s(){return"viewer"!==i()}},69351:(e,t,n)=>{n.d(t,{j:()=>a});let r=["#E06C75","#E5C07B","#98C379","#56B6C2","#61AFEF","#C678DD","#D19A66","#BE5046","#7EC8E3","#C3E88D","#F78C6C","#A9DC76"];function a(e){let t=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}(e)%r.length;return r[t]}},75844:(e,t,n)=>{n.d(t,{$m:()=>eo});var r=n(60200),a=n(81476),o=n(25588),l=n(43322),i=n(28201),s=n(20699),c=n(99226),u=n(29402),d=n(15291),m=n(14006),p=n(40058),f=n(62925),h=n(26185),x=n(73057),g=n(36974),v=n(74308),w=n(49417),y=n(43664),b=n(76753);function C(e){var t;if(!e)return{pinnedHost:null,pinnedCwd:null};let n=new URLSearchParams(e),r=n.has("cwd"),a=n.has("host");if(!r&&!a)return{pinnedHost:null,pinnedCwd:null};let o=null!=(t=n.get("cwd"))?t:"",l=n.get("host"),i={pinnedCwd:r&&""!==o?o:null,pinnedHost:a?null!=l?l:"":null};return"1"===n.get("runtime")&&(i.runtimeCwd=!0),i}function j(e,t,n,r,a){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return"@[".concat(e,"](").concat(t,":").concat(n).concat(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e&&null==t)return"";let r=e=>encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29"),a=[];return a.push("cwd=".concat(null==t?"":r(t))),null!=e&&a.push("host=".concat(r(e))),n&&a.push("runtime=1"),"?".concat(a.join("&"))}(r,a,o),")")}var N=n(63123),E=n(67566);let k=v.A.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),mentionType:{default:"user",parseHTML:e=>e.getAttribute("data-mention-type")||"user",renderHTML:e=>({"data-mention-type":e.mentionType||"user"})},pinnedHost:{default:null,parseHTML:e=>e.getAttribute("data-pinned-host"),renderHTML:e=>null==e.pinnedHost?{}:{"data-pinned-host":String(e.pinnedHost)}},pinnedCwd:{default:null,parseHTML:e=>e.getAttribute("data-pinned-cwd"),renderHTML:e=>null==e.pinnedCwd?{}:{"data-pinned-cwd":String(e.pinnedCwd)}},runtimeCwd:{default:!1,parseHTML:e=>"true"===e.getAttribute("data-runtime-cwd"),renderHTML:e=>e.runtimeCwd?{"data-runtime-cwd":"true"}:{}}}}});function A(e){let t=e.getJSON();return t.content?t.content.map(e=>(function e(t){if("mention"===t.type){let e=t.attrs;if(e){var n,r;return j(e.label||e.id,e.mentionType||"user",e.id,null!=(n=e.pinnedHost)?n:null,null!=(r=e.pinnedCwd)?r:null,!0===e.runtimeCwd)}return""}if("text"===t.type)return t.text||"";if("hardBreak"===t.type)return"\n";let a=t.content;return a?a.map(e).join(""):""})(e)).join("\n"):""}function R(e){if(!e)return{type:"doc",content:[{type:"paragraph"}]};let t=/@\[([^\]]+)\]\((user|agent):([a-f0-9-]+)(?:\?([^)]*))?\)/g;return{type:"doc",content:e.split("\n").map(e=>{let n,r=[],a=0,o=RegExp(t.source,"g");for(;null!==(n=o.exec(e));){n.index>a&&r.push({type:"text",text:e.slice(a,n.index)});let{pinnedHost:t,pinnedCwd:o,runtimeCwd:l}=C(n[4]);r.push({type:"mention",attrs:{id:n[3],label:n[1],mentionType:n[2],pinnedHost:t,pinnedCwd:o,runtimeCwd:!0===l}}),a=n.index+n[0].length}return a<e.length&&r.push({type:"text",text:e.slice(a)}),{type:"paragraph",content:r.length>0?r:void 0}})}}function S(e,t,n,r,a,o,l){if(a.innerHTML="",t){let e=document.createElement("div");e.className="flex items-center justify-center py-3 px-4",e.innerHTML='<div class="h-4 w-4 animate-spin rounded-full border-2 border-[#9A9A9A] border-t-transparent"></div>',a.appendChild(e);return}if(0===e.length){let e=document.createElement("div");e.className="py-2 px-3 text-xs text-muted-foreground",e.textContent="No results",a.appendChild(e);return}let i=document.createElement("div");i.className="py-1";let s=0,c=e=>{if(l)return void l(e,n);n({id:e.uuid,label:e.name,mentionType:e.type})},u=()=>{i.innerHTML="",e.forEach((e,t)=>{let n=document.createElement("button");n.type="button",n.className="flex w-full items-center gap-2.5 px-3 py-1.5 text-left text-sm transition-colors ".concat(t===s?"bg-background text-foreground":"text-muted-foreground hover:bg-background"),n.onclick=()=>c(e);let r=document.createElement("div");if(r.className="relative shrink-0","agent"===e.type){let t="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,n=(0,h.Pf)(e.name,t?"static":"animated");if(n){let t=document.createElement("div");t.className="h-6 w-6 overflow-hidden rounded-full bg-muted";let a=document.createElement("img");a.src=n,a.alt=e.name,a.draggable=!1,a.className="h-full w-full origin-top scale-[1.5] -translate-y-[10%]",t.appendChild(a),r.appendChild(t)}else{let e=document.createElement("div");e.className="flex h-6 w-6 items-center justify-center rounded-full bg-primary text-white",e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>',r.appendChild(e)}}else{let e=document.createElement("div");e.className="flex h-6 w-6 items-center justify-center rounded-full bg-border text-muted-foreground",e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',r.appendChild(e)}if("agent"===e.type&&e.online){let e=document.createElement("span");e.className="absolute -bottom-0.5 -right-0.5 h-2 w-2 rounded-full bg-[#22C55E] ring-2 ring-white",e.title=o.online,r.appendChild(e)}let a=document.createElement("div");a.className="min-w-0 flex-1";let l=document.createElement("div");if(l.className="truncate text-xs font-medium",l.textContent=e.name,a.appendChild(l),e.email){let t=document.createElement("div");t.className="truncate text-[10px] text-muted-foreground",t.textContent=e.email,a.appendChild(t)}if("agent"===e.type&&e.online){var u;let t=null!=(u=e.activeCount)?u:0,n=document.createElement("div");t>0?(n.className="mt-0.5 truncate text-[10px] font-medium text-[#15803D] dark:text-[#4FD07A]",n.textContent="▶ ".concat(o.activeCount(t))):(n.className="mt-0.5 truncate text-[10px] text-muted-foreground",n.textContent=o.idle),a.appendChild(n)}n.appendChild(r),n.appendChild(a),i.appendChild(n)})};u(),a.appendChild(i),r.current={onKeyDown:t=>{let{event:n}=t;return!(0,b.P)(n)&&("ArrowUp"===n.key?(s=s<=0?e.length-1:s-1,u(),!0):"ArrowDown"===n.key?(s=s>=e.length-1?0:s+1,u(),!0):"Enter"===n.key?(e[s]&&c(e[s]),!0):"Escape"===n.key)}}}function M(e){var t;let{open:n,agentName:l,instances:i,onConfirm:s,onCancel:c}=e,u=(0,o.c)("mentionInstance"),[d,m]=(0,a.useState)(null);(0,a.useEffect)(()=>{var e;n&&m(null!=(e=i[0])?e:null)},[n,i]);let f=new Set(i.map(e=>e.host)).size;return(0,r.jsx)(E.lG,{open:n,onOpenChange:e=>{e||c()},children:(0,r.jsxs)(E.Cf,{className:"z-[110] flex max-h-[85svh] flex-col gap-0 sm:max-w-md",overlayClassName:"z-[110]",children:[(0,r.jsxs)(E.c7,{className:"shrink-0",children:[(0,r.jsx)(E.L3,{children:u("title")}),(0,r.jsx)(E.rr,{children:u("subtitle",{name:l,count:i.length,hosts:f})})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto py-3",onKeyDown:e=>{!("Enter"!==e.key||(0,b.P)(e))&&d&&(e.preventDefault(),s(d))},children:(0,r.jsx)(N.O,{instances:i,selectedConnectionUuid:null!=(t=null==d?void 0:d.connectionUuid)?t:null,onSelect:m,ariaLabel:u("title")})}),(0,r.jsxs)(E.Es,{className:"shrink-0",children:[(0,r.jsx)(p.$,{variant:"ghost",onClick:c,children:u("cancel")}),(0,r.jsx)(p.$,{disabled:!d,onClick:()=>{d&&s(d)},children:u("confirm")})]})]})})}let T=(0,a.forwardRef)((e,t)=>{var n,l;let{value:i,onChange:s,placeholder:c,className:u,disabled:d,onSubmit:m,entityType:p,entityUuid:f}=e,h=(0,a.useRef)([]),v=(0,a.useRef)(!1),C=(0,a.useRef)(null),N=(0,a.useRef)(null),E=(0,a.useRef)(null),T=(0,a.useRef)(null),[,D]=(0,a.useState)(0),_=(0,a.useRef)(!1),U=(0,o.c)("mention"),H=(0,a.useRef)({online:"",offline:"",idle:"",activeCount:()=>""});H.current={online:U("online"),offline:U("offline"),idle:U("idle"),activeCount:e=>U("activeCount",{count:e})};let F=(0,a.useCallback)((e,t)=>{let n="/api/mentionables?q=".concat(encodeURIComponent(e),"&limit=").concat(t,"&withInstances=1");return p&&f&&(n+="&entityType=".concat(encodeURIComponent(p),"&entityUuid=").concat(encodeURIComponent(f))),n},[p,f]),L=function(e,t){let n=(0,a.useRef)(null),r=(0,a.useRef)(e);r.current=e;let o=(0,a.useCallback)(e=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>r.current(e),250)},[250]);return(0,a.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),o}((0,a.useCallback)(async e=>{v.current=!0,D(e=>e+1);try{let t=await fetch(F(e,10));if(t.ok){let e=await t.json();e.success&&(h.current=e.data)}}catch(e){h.current=[]}finally{v.current=!1,D(e=>e+1)}},[F]),250),[z,I]=(0,a.useState)(null),O=(0,a.useCallback)((e,t,n)=>{t({id:e.uuid,label:e.name,mentionType:e.type,pinnedHost:n?n.host:null,pinnedCwd:n?n.cwd:null,runtimeCwd:(null==n?void 0:n.runtimeCwd)===!0})},[]),$=(0,a.useRef)(()=>{});$.current=(e,t)=>{var n;let r=function(e){var t;if("agent"===e.type&&e.projectFixedCwd)return{kind:"insert",pin:{host:e.projectFixedCwd.host,cwd:e.projectFixedCwd.cwd,runtimeCwd:!0}};if(e.isIdeaAssignee&&e.ideaPin)return{kind:"insert",pin:{host:e.ideaPin.host,cwd:e.ideaPin.cwd}};let n="agent"===e.type?(null!=(t=e.instances)?t:[]).filter(e=>"online"===e.effectiveStatus):[];return n.length>=2?{kind:"pick",onlineInstances:n}:1===n.length?{kind:"insert",pin:n[0]}:{kind:"insert",pin:null}}(e);if("pick"===r.kind)return void I({item:e,onlineInstances:r.onlineInstances,command:t});O(e,t,null!=(n=r.pin)?n:void 0)};let P=(0,a.useCallback)((e,t)=>$.current(e,t),[]);(0,a.useEffect)(()=>{E.current&&T.current&&S(h.current,v.current,T.current,C,E.current,H.current,P)});let B=(0,x.hG)({immediatelyRender:!1,extensions:[g.A.configure({heading:!1,blockquote:!1,codeBlock:!1,bulletList:!1,orderedList:!1,listItem:!1,horizontalRule:!1}),k.configure({HTMLAttributes:{class:"text-blue-600 font-medium"},renderText(e){var t;let{node:n}=e;return"@".concat(null!=(t=n.attrs.label)?t:n.attrs.id)},suggestion:{char:"@",allowSpaces:!0,items:e=>{let{query:t}=e;return L(t),h.current},render:()=>({onStart:e=>{var t;let n=document.createElement("div");if(n.className="z-[100] rounded-md border border-border bg-card shadow-md min-w-[200px] max-w-[300px] overflow-hidden",E.current=n,T.current=e.command,e.clientRect){let t="function"==typeof e.clientRect?e.clientRect():e.clientRect;t&&(n.style.position="fixed",n.style.left="".concat(t.left,"px"),window.innerHeight-t.bottom<220?n.style.bottom="".concat(window.innerHeight-t.top+4,"px"):n.style.top="".concat(t.bottom+4,"px"))}(null!=(t=N.current)?t:document.body).appendChild(n),S(h.current,v.current,e.command,C,n,H.current,P)},onUpdate:e=>{if(T.current=e.command,E.current&&e.clientRect){let t="function"==typeof e.clientRect?e.clientRect():e.clientRect;t&&(E.current.style.left="".concat(t.left,"px"),window.innerHeight-t.bottom<220?(E.current.style.top="",E.current.style.bottom="".concat(window.innerHeight-t.top+4,"px")):(E.current.style.bottom="",E.current.style.top="".concat(t.bottom+4,"px")))}E.current&&S(h.current,v.current,e.command,C,E.current,H.current,P)},onKeyDown:e=>!!C.current&&C.current.onKeyDown(e),onExit:()=>{var e;null==(e=E.current)||e.remove(),E.current=null,T.current=null,h.current=[],v.current=!1}})}})],content:R(i),editable:!d,editorProps:{attributes:{class:(0,w.cn)("mobile-input-text","min-h-[36px] max-h-[120px] overflow-y-auto px-3 py-2 text-sm outline-none","prose prose-sm max-w-none [&_p]:my-0"),"data-placeholder":c||""},handleKeyDown:(e,t)=>!(0,b.P)(t)&&"Enter"===t.key&&!t.shiftKey&&!E.current&&!!m&&(t.preventDefault(),m(),!0)},onUpdate:e=>{let{editor:t}=e;_.current=!0,s(A(t))}});(0,a.useEffect)(()=>{if(!B||_.current){_.current=!1;return}A(B)!==i&&B.commands.setContent(R(i))},[i,B]),(0,a.useEffect)(()=>{B&&B.setEditable(!d)},[d,B]);let q=(0,a.useCallback)(e=>{var t;if(!B)return;let n=null!==e.pinnedHost||null!==e.pinnedCwd?{host:null!=(t=e.pinnedHost)?t:"",cwd:e.pinnedCwd,runtimeCwd:!0===e.runtimeCwd}:null,r=function(e,t){var n,r;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=t.type.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=t.uuid.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(RegExp("@\\[[^\\]]+\\]\\(".concat(o,":").concat(l,"(?:\\?[^)]*)?\\)\\s*$"),"i").test(e))return{value:e,appended:!1};let i=j(t.name,t.type,t.uuid,null!=(n=null==a?void 0:a.host)?n:null,null!=(r=null==a?void 0:a.cwd)?r:null,(null==a?void 0:a.runtimeCwd)===!0),s=e.length>0&&!/\s$/.test(e)?" ":"";return{value:"".concat(e).concat(s).concat(i," "),appended:!0}}(A(B),{type:e.mentionType,uuid:e.id,name:e.label},n);r.appended&&B.commands.setContent(R(r.value)),B.commands.focus("end")},[B]),G=(0,a.useCallback)(async e=>{let t=e;if("agent"===e.type){let n=await fetch(F(e.name,50));if(!n.ok)throw Error("Failed to load Agent mention routing");let r=await n.json();if(!r.success||!Array.isArray(r.data))throw Error("Invalid Agent mention routing response");t=function(e,t){let n=t.find(t=>t.type===e.type&&t.uuid===e.uuid);if(!n)throw Error("Reply author is unavailable for mention routing");return n}(e,r.data)}$.current(t,e=>{q(e)})},[F,q]);return(0,a.useImperativeHandle)(t,()=>({focus:()=>null==B?void 0:B.commands.focus(),clear:()=>{null==B||B.commands.clearContent(),s("")},replyToAuthor:G}),[B,s,G]),(0,r.jsxs)("div",{ref:N,className:(0,w.cn)("relative rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow]","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",d&&"cursor-not-allowed opacity-50",u),children:[(0,r.jsx)(x.$Z,{editor:B}),(0,r.jsx)(M,{open:null!==z,agentName:null!=(n=null==z?void 0:z.item.name)?n:"",instances:null!=(l=null==z?void 0:z.onlineInstances)?l:[],onConfirm:e=>{!function(e,t,n){n.close(),e&&n.defer(()=>{try{n.focusEditor(),n.insert(e,t)}catch(e){n.onError(e)}})}(z,e,{close:()=>I(null),insert:(e,t)=>O(e.item,e.command,t),defer:e=>requestAnimationFrame(e),focusEditor:()=>null==B?void 0:B.commands.focus(),onError:e=>y.q.error("MentionEditor: cwd-pinned mention insert failed",e)})},onCancel:()=>I(null)}),(0,r.jsx)("style",{children:"\n .tiptap p.is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n color: #9A9A9A;\n float: left;\n height: 0;\n pointer-events: none;\n }\n .tiptap .mention {\n color: #2563eb;\n font-weight: 500;\n }\n "})]})});T.displayName="MentionEditor";var D=n(48869),_=n(42885);let U=(0,_.createServerReference)("7099715b70777f1df773f52ed3537aea55b422d6d9",_.callServer,void 0,_.findSourceMapURL,"createCommentAction"),H=(0,_.createServerReference)("40e3ce30df7300b056201b7350f035eff5f8b665dd",_.callServer,void 0,_.findSourceMapURL,"deleteCommentAction");var F=n(64035);let L=/@\[([^\]]+)\]\((user|agent):([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\?([^)]*))?\)/gi,z=/\u200B\u200BMENTION_(\d+)\u200B\u200B/g,I="chorus-mention";function O(e){let{children:t,renderMention:n}=e;if(!t||"string"!=typeof t)return null;if(!new RegExp(L.source,L.flags.replace("g","")).test(t))return(0,r.jsx)("div",{className:"overflow-hidden [&_pre]:overflow-x-auto",children:(0,r.jsx)(F.MarkdownContent,{children:t})});if(n)return(0,r.jsx)($,{renderMention:n,children:t});let{processed:a,mentions:o}=function(e){let t=[],n=new RegExp(L.source,L.flags);return{processed:e.replace(n,(e,n,r,a,o)=>{let l=t.length,{pinnedHost:i,pinnedCwd:s,runtimeCwd:c}=C(o),u={displayName:n,type:r,uuid:a};return(null!==i||null!==s)&&(u.pinnedHost=i,u.pinnedCwd=s,c&&(u.runtimeCwd=!0)),t.push(u),"".concat("MENTION_").concat(l).concat("")}),mentions:t}}(t);return(0,r.jsx)(P,{mentions:o,children:(0,r.jsx)(F.MarkdownContent,{children:a})})}function $(e){let{children:t,renderMention:n}=e,{processed:o,mentions:l}=a.useMemo(()=>(function(e){let t=[],n=new RegExp(L.source,L.flags);return{processed:e.replace(n,(e,n,r,a,o)=>{let l=t.length,{pinnedHost:i,pinnedCwd:s,runtimeCwd:c}=C(o),u={type:r.toLowerCase(),uuid:a.toLowerCase(),displayName:n};(null!==i||null!==s)&&(u.pinnedHost=i,u.pinnedCwd=s,c&&(u.runtimeCwd=!0)),t.push(u);let d="@".concat(n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return"<".concat(I," ").concat("idx",'="').concat(l,'">').concat(d,"</").concat(I,">")}),mentions:t}})(t),[t]),i=a.useMemo(()=>({[I]:e=>{let{idx:t}=e,a=void 0===t?NaN:parseInt(t,10),o=Number.isInteger(a)?l[a]:void 0;return o?(0,r.jsx)(r.Fragment,{children:n({...o,index:a})}):null}}),[l,n]);return(0,r.jsx)("div",{className:"overflow-hidden [&_pre]:overflow-x-auto",children:(0,r.jsx)(F.MarkdownContent,{components:i,allowedTags:{[I]:["idx"]},literalTagContent:[I],children:o})})}function P(e){let{children:t,mentions:n}=e,o=a.useRef(null);return a.useEffect(()=>{let e;if(!o.current||0===n.length)return;let t=document.createTreeWalker(o.current,NodeFilter.SHOW_TEXT,null),r=[];for(;e=t.nextNode();)z.test(e.textContent||"")&&r.push(e),z.lastIndex=0;for(let e of r){var a;let t,r=e.textContent||"",o=document.createDocumentFragment(),l=0,i=RegExp(z.source,"g");for(;null!==(t=i.exec(r));){t.index>l&&o.appendChild(document.createTextNode(r.slice(l,t.index)));let e=n[parseInt(t[1],10)];if(e){let t=document.createElement("span");t.className="text-blue-600 font-medium",t.title="".concat(e.type,": ").concat(e.uuid),t.textContent="@".concat(e.displayName),o.appendChild(t)}else o.appendChild(document.createTextNode(t[0]));l=t.index+t[0].length}l<r.length&&o.appendChild(document.createTextNode(r.slice(l))),null==(a=e.parentNode)||a.replaceChild(o,e)}},[n]),(0,r.jsx)("div",{ref:o,className:"overflow-hidden [&_pre]:overflow-x-auto",children:t})}var B=n(16198),q=n(38060),G=n(69189),K=n(7685),Q=n(69351),W=n(3562),J=n(99736),V=n(56791),Z=n(42731),X=n(2745);let Y="(max-width: 639px)";function ee(e){var t;if(!window.matchMedia)return()=>{};let n=window.matchMedia(Y);return null==(t=n.addEventListener)||t.call(n,"change",e),()=>{var t;return null==(t=n.removeEventListener)?void 0:t.call(n,"change",e)}}function et(){var e,t;return!!(null==(e=(t=window).matchMedia)?void 0:e.call(t,Y).matches)}function en(e){return"agent"===e.type?(0,r.jsx)(B.Gm,{mention:e,displayName:e.displayName},e.index):(0,r.jsxs)("span",{className:"text-blue-600 font-medium",title:"".concat(e.type,": ").concat(e.uuid),children:["@",e.displayName]},e.index)}function er(e,t){let n=new Map;for(let t of e)n.set(t.uuid,t);for(let e of t)n.set(e.uuid,e);return[...n.values()].sort((e,t)=>e.createdAt!==t.createdAt?e.createdAt<t.createdAt?1:-1:e.uuid<t.uuid?1:-1)}async function ea(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=new Set(e.map(e=>e.uuid)),a=[],o=null,l=!1,i=0,s=!1,c=null,u=!1;for(let e=0;e<n;e++){let e=await t(o);if(!e)break;if(u=!0,i=e.total,a.push(...e.comments),s=e.hasMore,c=e.nextCursor,e.comments.some(e=>r.has(e.uuid))||!e.hasMore){l=!0;break}o=e.nextCursor}return u?l?{comments:er(e,a),total:i,contiguous:!0,resetOldestCursor:null,resetHasMore:!1}:{comments:er([],a),total:i,contiguous:!1,resetOldestCursor:c,resetHasMore:s}:null}function eo(e){let{targetType:t,targetUuid:n,currentUserUuid:u,onCountChange:d,compact:m=!1}=e,h=(0,o.c)(),x=(0,G.F7)(),[g,v]=(0,a.useState)(""),[w,y]=(0,a.useState)([]),[b,C]=(0,a.useState)(!0),[j,N]=(0,a.useState)(null),[E,k]=(0,a.useState)(!1),[A,R]=(0,a.useState)(!1),[S,M]=(0,a.useState)(null),[_,F]=(0,a.useState)(!1),[L,z]=(0,a.useState)(0),I=(0,a.useRef)(null),O=(0,a.useRef)(null),$=(0,a.useRef)(new Set),P=(0,a.useRef)(new Set),B=(0,a.useRef)(w);B.current=w;let Q=(0,a.useRef)(S);Q.current=S;let W=(0,a.useRef)(_);W.current=_;let V=(0,a.useRef)(E);V.current=E;let Z=(0,a.useRef)(b);Z.current=b;let X=m?"h-6 w-6":"h-[30px] w-[30px]",Y=m?"gap-2":"gap-2.5";(0,a.useEffect)(()=>{null==d||d(L)},[L,d]);let ee=(0,a.useCallback)(async()=>{C(!0),N(null);let e=await (0,D.d)(t,n,{limit:10});e.success?(y(e.comments),M(e.nextCursor),F(e.hasMore),z(e.total)):N(e.error),C(!1)},[t,n]);(0,a.useEffect)(()=>{ee()},[ee]);let et=(0,a.useCallback)(async()=>{if(V.current||Z.current||!W.current||!Q.current)return;k(!0);let e=await (0,D.d)(t,n,{cursor:Q.current,limit:10});e.success&&(y(t=>er(t,e.comments)),M(e.nextCursor),F(e.hasMore),z(e.total)),k(!1)},[t,n]);(0,a.useEffect)(()=>{let e=O.current;if(!e)return;let t=new IntersectionObserver(e=>{var t;(null==(t=e[0])?void 0:t.isIntersecting)&&et()},{rootMargin:"120px"});return t.observe(e),()=>t.disconnect()},[et,b]),(0,q.w0)(t,n,e=>{u&&e.actorUuid===u||ea(B.current,async e=>{let r=await (0,D.d)(t,n,{cursor:e,limit:10});return r.success?r:null}).then(e=>{e&&(y(e.comments),z(e.total),e.contiguous||(M(e.resetOldestCursor),F(e.resetHasMore)))})});let en=async()=>{if(!g.trim()||A)return;R(!0);let e=await U(t,n,g);if(R(!1),e.success){var r;let t=!B.current.some(t=>t.uuid===e.comment.uuid);y(t=>er(t,[e.comment])),t&&z(e=>e+1),v(""),null==(r=I.current)||r.clear()}else J.oR.error(e.error)},eo=(0,a.useCallback)(e=>{var t;null==(t=I.current)||t.replyToAuthor(e).catch(()=>{J.oR.error(h("comments.replyFailed"))})},[h]),el=(0,a.useCallback)(async e=>{if(P.current.has(e))return!0;if($.current.has(e))return!1;$.current.add(e);try{if(!(await H(e)).success)return J.oR.error(h("comments.deleteFailed")),!1;if(P.current.add(e),B.current.some(t=>t.uuid===e)){let t=B.current.filter(t=>t.uuid!==e);B.current=t,y(t),z(e=>Math.max(0,e-1))}return!0}finally{$.current.delete(e)}},[h]);return(0,r.jsx)(K.D,{entityType:t,entityUuid:n,subEntityType:"comment",children:(0,r.jsxs)("div",{className:"flex flex-col gap-0",children:[x?(0,r.jsxs)("div",{className:"flex items-center ".concat(Y," pb-3 border-b border-[#F0EDE8] dark:border-[#26241f]"),children:[(0,r.jsx)(f.eu,{className:"".concat(m?"h-6 w-6":"h-7 w-7"," shrink-0"),children:(0,r.jsx)(f.q5,{className:"bg-border text-muted-foreground",children:(0,r.jsx)(l.A,{className:"".concat(m?"h-3 w-3":"h-3.5 w-3.5")})})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:(0,r.jsx)(T,{ref:I,value:g,onChange:v,onSubmit:en,placeholder:h("comments.addComment"),className:"border border-border bg-card text-sm rounded-lg",disabled:A,entityType:t,entityUuid:n})}),(0,r.jsx)(p.$,{size:"sm",className:"shrink-0 gap-1 bg-[#E07A5F] text-white hover:bg-[#D06A4F]",disabled:!g.trim()||A,onClick:en,children:A?(0,r.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(s.A,{className:"h-3.5 w-3.5"})})]}):(0,r.jsx)("p",{"data-testid":"comments-read-only",className:"pb-3 text-xs text-muted-foreground border-b border-[#F0EDE8] dark:border-[#26241f]",children:h("projectAccess.commentsReadOnly")}),b?(0,r.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,r.jsx)(i.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):j?(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-sm text-muted-foreground",children:[(0,r.jsx)(c.A,{className:"h-4 w-4"}),(0,r.jsx)("p",{children:h("comments.loadError")}),(0,r.jsx)(p.$,{variant:"outline",size:"sm",onClick:ee,children:h("comments.retry")})]}):0===w.length?(0,r.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground italic",children:h("comments.noComments")}):(0,r.jsxs)("div",{children:[w.map(e=>(0,r.jsx)(ei,{comment:e,compact:m,avatarSize:X,gap:Y,t:h,currentUserUuid:u,canComment:x,onReply:eo,onDelete:el},e.uuid)),(0,r.jsx)("div",{ref:O,"aria-hidden":"true"}),E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(i.A,{className:"h-4 w-4 animate-spin text-muted-foreground"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:h("comments.loadingMore")})]}):!_&&(0,r.jsx)("p",{className:"py-4 text-center text-xs text-muted-foreground italic",children:h("comments.noMoreComments")})]})]})})}function el(e){let{author:t,canDelete:n,t:o,onReply:l,onDelete:s}=e,c=(0,a.useSyncExternalStore)(ee,et,()=>!1),[f,h]=(0,a.useState)(!1),[x,g]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),y=(0,a.useRef)(null),b=(0,a.useRef)(!1),C=e=>{if(e.preventDefault(),!b.current){var t;null==(t=y.current)||t.focus()}b.current=!1},j=e=>{b.current=!0,h(!1);let t=()=>e();"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,0)},N=(0,r.jsx)(p.$,{ref:y,type:"button",variant:"ghost",size:"icon",className:"relative -my-1 size-6 shrink-0 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground before:absolute before:-inset-2.5 before:content-[''] sm:before:hidden","aria-label":o("comments.actionsLabel",{name:t.name}),children:(0,r.jsx)(u.A,{className:"size-4","aria-hidden":!0})}),E=()=>j(l),k=()=>j(()=>g(!0));return(0,r.jsxs)(r.Fragment,{children:[c?(0,r.jsxs)(Z.cj,{open:f,onOpenChange:h,children:[(0,r.jsx)(Z.CG,{asChild:!0,children:N}),(0,r.jsxs)(Z.h,{side:"bottom","data-comment-actions-variant":"mobile",className:"max-h-[min(82svh,32rem)] gap-0 overflow-hidden rounded-t-2xl pb-[max(1rem,env(safe-area-inset-bottom))]",onCloseAutoFocus:C,children:[(0,r.jsx)("div",{className:"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-muted-foreground/25","aria-hidden":!0}),(0,r.jsxs)(Z.Fm,{className:"border-b px-4 pt-3 pb-3 text-left",children:[(0,r.jsx)(Z.qp,{children:o("comments.actionsTitle")}),(0,r.jsx)(Z.Qs,{children:o("comments.actionsDescription",{name:t.name})})]}),(0,r.jsxs)("div",{className:"overflow-y-auto overscroll-contain px-2 py-2",children:[(0,r.jsxs)(p.$,{type:"button",variant:"ghost",className:"min-h-11 w-full justify-start gap-3 rounded-lg px-3 text-sm",onClick:E,children:[(0,r.jsx)(d.A,{className:"size-5","aria-hidden":!0}),o("comments.reply")]}),n&&(0,r.jsx)("div",{className:"mt-1 border-t pt-1",children:(0,r.jsxs)(p.$,{type:"button",variant:"ghost",className:"min-h-11 w-full justify-start gap-3 rounded-lg px-3 text-sm text-destructive hover:bg-destructive/10 hover:text-destructive focus-visible:text-destructive",onClick:k,children:[(0,r.jsx)(m.A,{className:"size-5","aria-hidden":!0}),o("comments.delete")]})})]})]})]}):(0,r.jsxs)(V.rI,{open:f,onOpenChange:h,children:[(0,r.jsx)(V.ty,{asChild:!0,children:N}),(0,r.jsxs)(V.SQ,{align:"end","data-comment-actions-variant":"desktop",className:"z-[100] w-44",onCloseAutoFocus:C,children:[(0,r.jsxs)(V._2,{onSelect:E,children:[(0,r.jsx)(d.A,{"aria-hidden":!0}),o("comments.reply")]}),n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(V.mB,{}),(0,r.jsxs)(V._2,{variant:"destructive",onSelect:k,children:[(0,r.jsx)(m.A,{"aria-hidden":!0}),o("comments.delete")]})]})]})]}),(0,r.jsx)(X.Lt,{open:x,onOpenChange:e=>{v||g(e)},children:(0,r.jsxs)(X.EO,{className:"z-[120]",overlayClassName:"z-[120]",onCloseAutoFocus:e=>{var t;e.preventDefault(),null==(t=y.current)||t.focus()},children:[(0,r.jsxs)(X.wd,{children:[(0,r.jsx)(X.r7,{children:o("comments.deleteTitle")}),(0,r.jsx)(X.$v,{children:o("comments.deleteDescription")})]}),(0,r.jsxs)(X.ck,{children:[(0,r.jsx)(X.Zr,{disabled:v,children:o("common.cancel")}),(0,r.jsxs)(X.Rx,{variant:"destructive",disabled:v,onClick:async e=>{e.preventDefault(),w(!0);let t=await s();w(!1),t&&g(!1)},children:[v&&(0,r.jsx)(i.A,{className:"animate-spin","aria-hidden":!0}),o("comments.deleteConfirm")]})]})]})})]})}function ei(e){var t;let{comment:n,compact:o,avatarSize:l,gap:i,t:s,currentUserUuid:c,canComment:u=!0,onReply:d,onDelete:m}=e,[x,g]=(0,a.useState)(!1),v="agent"===n.author.type,w=!!c&&("user"===n.author.type&&n.author.uuid===c||"agent"===n.author.type&&(null==(t=n.author.owner)?void 0:t.uuid)===c),y=v?(0,Q.j)(n.author.name):null,b=n.content.length>200,C=y?"".concat(y,"18"):void 0;return(0,r.jsxs)("div",{className:"flex ".concat(i," py-3 border-b border-[#F0EDE8] dark:border-[#26241f] last:border-b-0"),children:[v?(0,r.jsx)(h.AgentAvatar,{name:n.author.name,size:o?24:30,className:"shrink-0 rounded-full"}):(0,r.jsx)(f.eu,{className:"".concat(l," shrink-0"),children:(0,r.jsx)(f.q5,{className:"bg-border text-muted-foreground text-[11px] font-medium",children:n.author.name.charAt(0).toUpperCase()})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"".concat(o?"text-xs":"text-[13px]"," font-semibold text-[#1A1A1A] dark:text-[#CFCFCF]"),children:n.author.name}),(0,r.jsx)("span",{style:v?{backgroundColor:C,color:null!=y?y:void 0}:void 0,className:"inline-flex items-center rounded px-1.5 py-px text-[9px] font-medium ".concat(v?"":"bg-[#F0EDE8] dark:bg-[#1f1e1c] text-muted-foreground"),children:s(v?"comments.roleAgent":"comments.roleHuman")}),(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground",children:function(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),a=Math.floor(r/6e4),o=Math.floor(r/36e5),l=Math.floor(r/864e5);return a<1?t("time.justNow"):a<60?t("time.minutesAgo",{minutes:a}):o<24?t("time.hoursAgo",{hours:o}):l<7?t("time.daysAgo",{days:l}):(0,W.r)(n)}(n.createdAt,s)})]}),u&&(0,r.jsx)(el,{author:{type:v?"agent":"user",uuid:n.author.uuid,name:n.author.name},canDelete:w,t:s,onReply:()=>d({type:v?"agent":"user",uuid:n.author.uuid,name:n.author.name}),onDelete:()=>m(n.uuid)})]}),v&&n.author.owner&&(0,r.jsx)("div",{className:"flex items-center gap-1 mt-0.5",children:(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground italic",children:s("comments.onBehalfOf",{name:n.author.owner.name})})}),(0,r.jsx)("div",{className:"mt-1 ".concat(o?"text-xs":"text-[13px]"," leading-relaxed text-[#3D3D3D] dark:text-[#d8d2ca] max-w-none [&_h1]:text-sm [&_h1]:font-semibold [&_h1]:mt-2 [&_h1]:mb-1 [&_h2]:text-[13px] [&_h2]:font-semibold [&_h2]:mt-2 [&_h2]:mb-1 [&_h3]:text-[13px] [&_h3]:font-semibold [&_h3]:mt-1.5 [&_h3]:mb-0.5 [&_p]:my-1 [&_ul]:my-1 [&_ol]:my-1 [&_li]:my-0.5 [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-primary [&_pre]:bg-secondary [&_pre]:text-foreground"),children:b&&!x?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O,{renderMention:en,children:n.content.slice(0,200)+"..."}),(0,r.jsx)(p.$,{variant:"link",size:"sm",onClick:()=>g(!0),className:"h-auto p-0 text-[#E07A5F] dark:text-[#F0A088] text-xs font-medium mt-1",children:s("comments.showMore")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O,{renderMention:en,children:n.content}),b&&(0,r.jsx)(p.$,{variant:"link",size:"sm",onClick:()=>g(!1),className:"h-auto p-0 text-[#E07A5F] dark:text-[#F0A088] text-xs font-medium mt-1",children:s("comments.showLess")})]})})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[88277],{1445:(e,t,r)=>{r.d(t,{e:()=>s});var n=r(42885);let s=(0,n.createServerReference)("40a059e3fb792cf89873178d801fa875b03eaa7276",n.callServer,void 0,n.findSourceMapURL,"verifyElaborationAction")},14954:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(42885);let s=(0,n.createServerReference)("60e173b801e465c2c323d8977d9f151d9f5a509297",n.callServer,void 0,n.findSourceMapURL,"deleteIdeaAction")},17036:(e,t,r)=>{r.d(t,{G_:()=>l,Q9:()=>s,r6:()=>a});let n=new Set(["done","closed"]);function s(e){var t,r;return e?"agent"===e.type?e.uuid:"agent_instance"===e.type&&null!=(r=null==(t=e.instance)?void 0:t.agentUuid)?r:null:null}function a(e){let{assignee:t,proposals:r,tasks:s}=e;return!!t&&("agent"===t.type||"agent_instance"===t.type)&&!!r&&!!r.some(e=>"approved"===e.status)&&!!s&&!!s.some(e=>!n.has(e.status))&&!0}function l(e){return a(e)&&e.agentOnline}},17523:(e,t,r)=>{r.d(t,{x:()=>s});var n=r(42885);let s=(0,n.createServerReference)("40778a29574538be70379af28ce234181bc044da5f",n.callServer,void 0,n.findSourceMapURL,"getIdeaActivitiesAction")},22977:(e,t,r)=>{r.d(t,{U:()=>s});var n=r(42885);let s=(0,n.createServerReference)("600e709ba4e37b2b32c7c89c70a6bbbd74ef726021",n.callServer,void 0,n.findSourceMapURL,"getProposalsForIdeaAction")},25268:(e,t,r)=>{r.d(t,{i:()=>S});var n=r(60200),s=r(81476),a=r(32022),l=r(25588),i=r(28201),o=r(6153),c=r(43322),d=r(40058),u=r(26185),x=r(70250),m=r(45200),f=r(58105),p=r(21558),g=r(63123),h=r(60404),v=r(57378),b=r(42885);let j=(0,b.createServerReference)("00a29b58b42bb40d4b7b4210777658e1c3f9dd7912",b.callServer,void 0,b.findSourceMapURL,"getPmAgentsAction"),N=(0,b.createServerReference)("605ea93d7b6e6bde4811ef9043a20e17b5f78b63d5",b.callServer,void 0,b.findSourceMapURL,"getAgentInstancesAction"),w=(0,b.createServerReference)("401ad7255a313e0da3566036a268b7b3f476f716c9",b.callServer,void 0,b.findSourceMapURL,"claimIdeaAction"),y=(0,b.createServerReference)("700cffde6c0cad69a84903080b8ab7059f899848f1",b.callServer,void 0,b.findSourceMapURL,"claimIdeaToAgentAction"),A=(0,b.createServerReference)("601045ae8caa487625886a805e32252538fa1ec252",b.callServer,void 0,b.findSourceMapURL,"claimIdeaToUserAction"),k=(0,b.createServerReference)("4009a1638b4360526c2c6596ca5855a608afa5c78e",b.callServer,void 0,b.findSourceMapURL,"releaseIdeaAction");function S(e){var t,r;let{idea:b,projectUuid:S,currentUserUuid:C,onClose:F}=e,U=(0,l.c)(),I=(0,a.r)(),[R,_]=(0,s.useState)(!1),[E,D]=(0,s.useState)("self"),[T,L]=(0,s.useState)(""),[M,q]=(0,s.useState)(""),[O,B]=(0,s.useState)([]),[P,$]=(0,s.useState)([]),[z,G]=(0,s.useState)(!0),[H,W]=(0,s.useState)(null),[J,K]=(0,s.useState)([]),[Q,V]=(0,s.useState)(!1),[Z,Y]=(0,s.useState)(null),[X,ee]=(0,s.useState)(null),et=!!b.assignee;(0,s.useEffect)(()=>{!async function(){G(!0);let e=await j();B(e.agents||[]),$((e.users||[]).filter(e=>e.uuid!==C)),G(!1)}()},[C]),(0,s.useEffect)(()=>{if("agent"!==E||!T){K([]),ee(null),Y(null);return}let e=!1;return V(!0),ee(null),N(T,S).then(t=>{e||(K((0,g.C)(t.instances)),Y(t.resolvedTarget))}).finally(()=>{e||V(!1)}),()=>{e=!0}},[S,E,T]);let er=null!=(r=J.find(e=>e.connectionUuid===X))?r:null,en=new Set(J.map(e=>e.host)).size>1,es=async()=>{let e;if(_(!0),W(null),"self"===E)e=await w(b.uuid);else if("agent"===E&&T){var t;e=await y(b.uuid,T,null!=(t=null==er?void 0:er.agentInstanceUuid)?t:void 0)}else if("user"===E&&M)e=await A(b.uuid,M);else{if("release"!==E)return void _(!1);e=await k(b.uuid)}_(!1),(null==e?void 0:e.success)?(I.refresh(),F()):(null==e?void 0:e.error)&&W(e.error)},ea="self"===E||"agent"===E&&T||"user"===E&&M||"release"===E&&et;return(0,n.jsxs)(x._8,{open:!0,onOpenChange:e=>{e||F()},className:"bg-card sm:max-w-[400px]",header:(0,n.jsx)(x.AI,{className:"text-base font-semibold text-foreground",children:U("ideas.assignIdea")}),footer:(0,n.jsxs)("div",{className:"flex w-full items-center justify-end gap-4",children:[(0,n.jsx)(d.$,{variant:"outline",onClick:F,disabled:R,className:"border-border",children:U("common.cancel")}),(0,n.jsx)(d.$,{onClick:es,disabled:R||!ea,className:"bg-primary hover:bg-[#B56A42] text-white",children:R?(0,n.jsx)(i.A,{className:"h-4 w-4 animate-spin"}):"release"===E?U("common.release"):function(){if("agent"!==E||!er)return U("common.assign");let e=(0,h.kn)(er.cwd),t=e.isUnknown?U(e.label):e.label,r=(0,h.g9)(er.host),n=r.isUnknown?U(r.label):r.label;return en?U("assignInstance.assignToWithHost",{path:t,host:n}):U("assignInstance.assignTo",{path:t})}()})]}),bodyClassName:"space-y-4",children:[et&&(0,n.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] dark:bg-[#13253a] p-3",children:(0,n.jsxs)("p",{className:"text-xs text-[#1976D2] dark:text-[#5AA9F0]",children:[U("common.currentAssignee"),": ",(0,n.jsx)("span",{className:"font-medium",children:null==(t=b.assignee)?void 0:t.name})]})}),H&&(0,n.jsx)("div",{className:"rounded-lg bg-[#FEE2E2] dark:bg-[#331619] p-3",children:(0,n.jsx)("p",{className:"text-xs text-[#D32F2F] dark:text-[#F08078]",children:H})}),(0,n.jsx)("p",{className:"text-[13px] text-muted-foreground",children:U("ideas.selectIdeaAssignee")}),z?(0,n.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,n.jsx)(i.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,n.jsxs)(f.z,{value:E,onValueChange:e=>D(e),className:"space-y-3",children:[(0,n.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("self"===E?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"),onClick:()=>D("self"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)(f.C,{value:"self",id:"idea-self",className:"border-primary text-primary"}),(0,n.jsx)(m.J,{htmlFor:"idea-self",className:"text-sm font-medium text-foreground cursor-pointer",children:U("assign.assignToMyself")})]}),(0,n.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:U("ideas.assignToMyselfIdeaDesc")})]}),(0,n.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("agent"===E?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>D("agent"),children:[(0,n.jsx)(f.C,{value:"agent",id:"idea-agent",className:"border-primary text-primary"}),(0,n.jsx)(m.J,{htmlFor:"idea-agent",className:"text-sm font-medium text-foreground cursor-pointer",children:U("ideas.orAssignToPmAgent")})]}),(0,n.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:U("ideas.onlySelectedPmAgentCanWork")}),"agent"===E&&(0,n.jsxs)("div",{className:"mt-3 ml-6 space-y-3",children:[(0,n.jsxs)(p.l6,{value:T,onValueChange:L,children:[(0,n.jsx)(p.bq,{className:"w-full border-border",children:(0,n.jsx)(p.yv,{placeholder:U("ideas.selectPmAgent")})}),(0,n.jsx)(p.gC,{className:"z-[120]",children:O.length>0?O.map(e=>(0,n.jsx)(p.eb,{value:e.uuid,children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(u.AgentAvatar,{name:e.name,size:16,className:"rounded-full"}),(0,n.jsx)("span",{children:e.name})]})},e.uuid)):(0,n.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:U("ideas.noPmAgentsAvailable")})})]}),T&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:U("assignInstance.workingDirectory")}),Q?(0,n.jsxs)("div",{className:"flex items-center gap-2 py-2 text-xs text-[#9A9A9A]",children:[(0,n.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin"}),U("assignInstance.loadingInstances")]}):(null==Z?void 0:Z.source)==="project_fixed"?(0,n.jsx)(v.Y,{target:Z}):0===J.length?(0,n.jsx)("p",{className:"rounded-lg bg-background p-2.5 text-[11px] leading-relaxed text-muted-foreground",children:U("assignInstance.noInstances")}):(0,n.jsx)(g.O,{instances:J,selectedConnectionUuid:X,onSelect:e=>ee(e.connectionUuid),ariaLabel:U("assignInstance.workingDirectory")}),(null==Z?void 0:Z.source)!=="project_fixed"&&(0,n.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-[#9A8C7E]",children:[(0,n.jsx)(o.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,n.jsx)("span",{children:U("assignInstance.ideaPinNote")})]})]})]})]}),(0,n.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("user"===E?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>D("user"),children:[(0,n.jsx)(f.C,{value:"user",id:"idea-user",className:"border-primary text-primary"}),(0,n.jsx)(m.J,{htmlFor:"idea-user",className:"text-sm font-medium text-foreground cursor-pointer",children:U("assign.orAssignToUser")})]}),"user"===E&&(0,n.jsx)("div",{className:"mt-3 ml-6",children:(0,n.jsxs)(p.l6,{value:M,onValueChange:q,children:[(0,n.jsx)(p.bq,{className:"w-full border-border",children:(0,n.jsx)(p.yv,{placeholder:U("tasks.selectUser")})}),(0,n.jsx)(p.gC,{className:"z-[120]",children:P.length>0?P.map(e=>(0,n.jsx)(p.eb,{value:e.uuid,children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(c.A,{className:"h-4 w-4 text-muted-foreground"}),(0,n.jsx)("span",{children:e.name||e.email})]})},e.uuid)):(0,n.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:U("tasks.noUsersAvailable")})})]})})]}),et&&(0,n.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("release"===E?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"),onClick:()=>D("release"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)(f.C,{value:"release",id:"idea-release",className:"border-primary text-primary"}),(0,n.jsx)(m.J,{htmlFor:"idea-release",className:"text-sm font-medium text-foreground cursor-pointer",children:U("assign.releaseAssignee")})]}),(0,n.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:U("ideas.releaseIdeaAssigneeDesc")})]})]})]})}},31012:(e,t,r)=>{r.d(t,{z:()=>s});var n=r(42885);let s=(0,n.createServerReference)("4023f99a7e2eac2f3679afeac49b4af5b1fb2ecfd1",n.callServer,void 0,n.findSourceMapURL,"getElaborationAction")},37352:(e,t,r)=>{r.d(t,{h:()=>y});var n=r(60200),s=r(81476),a=r(25588),l=r(32022),i=r(99736),o=r(28201),c=r(57080),d=r(71507),u=r(32814),x=r(40058),m=r(45200),f=r(67566),p=r(91069),g=r(2137),h=r(49417),v=r(42885);let b=(0,v.createServerReference)("0006578d5f5fc40ae3dc4351c33bd68cf61c421b67",v.callServer,void 0,v.findSourceMapURL,"getProjectsAndGroupsAction"),j=(0,v.createServerReference)("60178f7817769c180cb3c46000473885eef6850e26",v.callServer,void 0,v.findSourceMapURL,"moveIdeaPreviewAction"),N=(0,v.createServerReference)("60e52169043fbcc9c2842ff60651f51edfbc7e1a8d",v.callServer,void 0,v.findSourceMapURL,"moveIdeaAction");var w=r(43664);function y(e){let{open:t,onOpenChange:r,onCloseAutoFocus:v,ideaUuid:y,projectUuid:A,onMoved:k}=e,S=(0,a.c)("ideas"),C=(0,a.c)("common"),F=(0,l.r)(),[U,I]=(0,s.useState)([]),[R,_]=(0,s.useState)(!1),[E,D]=(0,s.useState)(null),[T,L]=(0,s.useState)(!1),M=(()=>{if(!E)return null;for(let e of U){let t=e.projects.find(e=>e.uuid===E);if(t)return t.name}return null})(),[q,O]=(0,s.useState)(null),[B,P]=(0,s.useState)(!1),[$,z]=(0,s.useState)(null),[G,H]=(0,s.useState)(!1),[W,J]=(0,s.useState)(null),K=(0,s.useRef)(0),Q=(0,s.useCallback)(e=>{e&&e.addEventListener("wheel",e=>e.stopPropagation(),{passive:!0})},[]),V=(0,s.useCallback)(async()=>{D(null),O(null),z(null),J(null),_(!0);try{let e=await b();if(e.success){let{projects:t,groups:r}=e.data,n=t.filter(e=>e.uuid!==A).map(e=>({uuid:e.uuid,name:e.name,groupUuid:e.groupUuid})),s=new Map;for(let e of r)s.set(e.uuid,e.name);let a=new Map,l=[];for(let e of n)e.groupUuid&&s.has(e.groupUuid)?(a.has(e.groupUuid)||a.set(e.groupUuid,{uuid:e.groupUuid,name:s.get(e.groupUuid),projects:[]}),a.get(e.groupUuid).projects.push({uuid:e.uuid,name:e.name})):l.push({uuid:e.uuid,name:e.name});let i=[...a.values()];l.length>0&&i.push({uuid:"ungrouped",name:S("ungrouped"),projects:l}),I(i)}}catch(e){w.q.error("Failed to load projects for move dialog:",e),I([])}_(!1)},[A,S]);(0,s.useEffect)(()=>{t&&V()},[t,V]),(0,s.useEffect)(()=>{if(!E){O(null),z(null);return}let e=++K.current;P(!0),z(null),O(null),j(y,E).then(t=>{e===K.current&&(t.success?O(t.moved):z(t.error||S("moveDialog.error",{message:""})))}).catch(t=>{e===K.current&&(w.q.error("Failed to fetch move preview:",t),z(S("moveDialog.error",{message:t instanceof Error?t.message:String(t)})))}).finally(()=>{e===K.current&&P(!1)})},[E,y,S]);let Z=async()=>{if(E&&q&&!G){H(!0),J(null);try{let e=await N(y,E);if(e.success){let t=e.moved;i.oR.success(S("moveDialog.successToast",{...t}),{action:{label:S("moveDialog.viewMovedIdea"),onClick:()=>{F.push("/projects/".concat(E,"/dashboard?panel=").concat(y,"&tab=overview"))}}}),r(!1),F.refresh(),k(t)}else J(S("moveDialog.error",{message:e.error||S("moveFailed")}))}catch(e){J(S("moveDialog.error",{message:e instanceof Error?e.message:S("moveFailed")}))}H(!1)}};return(0,n.jsx)(f.lG,{open:t,onOpenChange:r,children:(0,n.jsxs)(f.Cf,{onCloseAutoFocus:v,children:[(0,n.jsxs)(f.c7,{children:[(0,n.jsx)(f.L3,{children:S("moveDialog.title")}),(0,n.jsx)(f.rr,{children:S("moveDialog.description")})]}),(0,n.jsxs)("div",{className:"space-y-3 pt-1",children:[(0,n.jsx)(m.J,{htmlFor:"move-target-project",className:"text-[13px] font-medium text-foreground",children:S("moveDialog.targetProjectLabel")}),R?(0,n.jsx)("div",{className:"flex items-center justify-center h-10 border border-border rounded-md",children:(0,n.jsx)(o.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):(0,n.jsxs)(g.AM,{open:T,onOpenChange:L,children:[(0,n.jsx)(g.Wv,{asChild:!0,children:(0,n.jsxs)(x.$,{id:"move-target-project",variant:"outline",role:"combobox","aria-expanded":T,className:(0,h.cn)("w-full justify-between border-border font-normal",!M&&"text-muted-foreground"),children:[null!=M?M:S("moveDialog.targetProjectPlaceholder"),(0,n.jsx)(c.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(g.hl,{ref:Q,className:"w-[--radix-popover-trigger-width] p-0 pointer-events-auto",align:"start",children:(0,n.jsxs)(p.uB,{children:[(0,n.jsx)(p.G7,{placeholder:S("moveDialog.searchProjects")}),(0,n.jsxs)(p.oI,{children:[(0,n.jsx)(p.xL,{children:S("noProjectsFound")}),U.map(e=>(0,n.jsx)(p.L$,{heading:e.name,children:e.projects.map(t=>(0,n.jsxs)(p.h_,{value:"".concat(t.name," ").concat(e.name),onSelect:()=>{D(t.uuid),L(!1)},children:[(0,n.jsx)(d.A,{className:(0,h.cn)("mr-2 h-4 w-4",E===t.uuid?"opacity-100":"opacity-0")}),t.name]},t.uuid))},e.uuid))]})]})})]}),E&&(0,n.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-lg border border-border bg-background p-3 text-[13px] text-foreground",children:B?(0,n.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,n.jsx)(o.A,{className:"h-3.5 w-3.5 animate-spin"}),(0,n.jsx)("span",{children:S("moveDialog.previewLoading")})]}):$?(0,n.jsxs)("div",{className:"flex items-start gap-2 text-destructive",children:[(0,n.jsx)(u.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,n.jsx)("span",{children:$})]}):q?(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("p",{children:S("moveDialog.previewSummary",{...q})}),(0,n.jsx)("p",{className:"text-[12px] text-muted-foreground",children:S("moveDialog.previewWarning")})]}):null}),W&&(0,n.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:W})]}),(0,n.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,n.jsx)(x.$,{variant:"outline",className:"border-border",onClick:()=>r(!1),disabled:G,children:C("cancel")}),(0,n.jsx)(x.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:Z,disabled:!E||!q||G||B,children:G?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),S("moving")]}):S("moveDialog.confirm")})]})]})})}},48135:(e,t,r)=>{r.d(t,{Separator:()=>l});var n=r(60200);r(81476);var s=r(80688),a=r(49417);function l(e){let{className:t,orientation:r="horizontal",decorative:l=!0,...i}=e;return(0,n.jsx)(s.b,{"data-slot":"separator",decorative:l,orientation:r,className:(0,a.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...i})}},49858:(e,t,r)=>{r.d(t,{s:()=>w});var n=r(60200),s=r(81476),a=r(25588),l=r(99736),i=r(78837),o=r(28201),c=r(40058),d=r(2745),u=r(58851),x=r(55544);let m=new Set(["done","closed"]);function f(e){let{assignee:t,proposals:r,tasks:n}=e;return!!t&&("agent"===t.type||"agent_instance"===t.type)&&!(r&&r.some(e=>"approved"===e.status)&&n&&0!==n.length&&n.every(e=>m.has(e.status)))}var p=r(42885);let g=(0,p.createServerReference)("604834b0f82286c9047c201fa80357847f84e232e0",p.callServer,void 0,p.findSourceMapURL,"yoloRequestedAction");var h=r(84607),v=r(63145),b=r(65484);let j={unauthorized:"errorGeneric",not_human:"errorGeneric",idea_not_found:"errorGeneric",assignee_not_agent:"errorAssigneeNotAgent",agent_offline:"errorAgentOffline",instance_offline:"errorInstanceOffline",fixed_cwd_host_offline:"errorFixedCwdHostOffline",unknown:"errorGeneric"},N="bg-[#7F5AF0] hover:bg-[#6D48DE] dark:bg-[#6E56C8] dark:hover:bg-[#7C63D8] text-white";function w(e){var t,r,m,p,w,y;let{ideaUuid:A,assignee:k,assigneeName:S,proposals:C,tasks:F,onStarted:U,renderAction:I,disabledReason:R,onCloseAutoFocus:_}=e,E=(0,a.c)("yolo"),D=null!=(r=null==(t=(0,x.kz)())?void 0:t.connections)?r:[],[T,L]=(0,s.useState)(!1),[M,q]=(0,s.useState)(!1),[O,B]=(0,s.useState)(!1),{start:P,pickerState:$,confirmPick:z,confirmTemporary:G,cancelPick:H,isResolving:W}=(0,v.E)({reassignNoWake:h.U,previewIdeaUuid:A});(0,s.useEffect)(()=>{q(!1)},[A]),(0,s.useEffect)(()=>{if(!M)return;let e=setTimeout(()=>q(!1),3e4);return()=>clearTimeout(e)},[M]);let J=k?"agent"===k.type?k.uuid:"agent_instance"===k.type&&null!=(w=null==(p=k.instance)?void 0:p.agentUuid)?w:null:null,K=null!==J&&D.some(e=>e.agentUuid===J&&"online"===e.effectiveStatus),Q=f({assignee:k,proposals:C,tasks:F}),V=f(y={assignee:k,proposals:C,tasks:F,agentOnline:K})&&y.agentOnline;if(!I&&(!Q||M))return M?(0,n.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:E("startedHint")}):null;let Z=async e=>{L(!0);try{let r=e?await g(A,e):await g(A);if(r.success)q(!0),l.oR.success(E("startedHint")),null==U||U();else{var t;l.oR.error(E(j[null!=(t=r.errorCode)?t:"unknown"]))}}catch(e){l.oR.error(E("errorGeneric"))}finally{L(!1)}},Y=R||(T||W?E("starting"):M?E("startedHint"):J?Q?V?void 0:E("offlineHint"):E("completedHint"):E("errorAssigneeNotAgent"));return I||K?(0,n.jsxs)(n.Fragment,{children:[null==I?void 0:I({label:E("button"),disabledReason:Y,busy:T||W||null!==$||O,onSelect:()=>{Y||B(!0)}}),(0,n.jsxs)(d.Lt,{open:O,onOpenChange:B,children:[!I&&(0,n.jsx)(d.tv,{asChild:!0,children:(0,n.jsxs)(c.$,{className:N,disabled:!V||T||W,children:[(0,n.jsx)(i.A,{className:"mr-2 h-4 w-4"}),E("button")]})}),(0,n.jsxs)(d.EO,{onCloseAutoFocus:_,children:[(0,n.jsxs)(d.wd,{children:[(0,n.jsx)(d.r7,{children:E("confirmTitle")}),(0,n.jsx)(d.$v,{children:E("confirmDescription")})]}),(0,n.jsxs)(d.ck,{children:[(0,n.jsx)(d.Zr,{disabled:T,children:E("cancel")}),(0,n.jsx)(c.$,{className:N,onClick:()=>{Y||(B(!1),P({ideaUuid:A,wake:Z}))},disabled:!!Y,children:T?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),E("starting")]}):E("confirmCta")})]})]})]}),(0,n.jsx)(b.V,{open:null!==$,onCloseAutoFocus:_,agentName:null!=S?S:"",instances:null!=(m=null==$?void 0:$.instances)?m:[],agentUuid:null==$?void 0:$.agentUuid,onConfirm:z,onTemporaryConfirm:G,onCancel:H})]}):(0,n.jsx)(u.Bc,{delayDuration:300,children:(0,n.jsxs)(u.m_,{children:[(0,n.jsx)(u.k$,{asChild:!0,children:(0,n.jsx)("span",{tabIndex:0,className:"inline-flex",children:(0,n.jsxs)(c.$,{className:N,disabled:!0,children:[(0,n.jsx)(i.A,{className:"mr-2 h-4 w-4"}),E("button")]})})}),(0,n.jsx)(u.ZI,{children:E("offlineHint")})]})})}},60596:(e,t,r)=>{r.d(t,{w:()=>b});var n=r(60200),s=r(81476),a=r(25588),l=r(99736),i=r(28201),o=r(53511),c=r(40058),d=r(58851),u=r(55544),x=r(17036),m=r(42885);let f=(0,m.createServerReference)("602b92060f24a9a2c8e37e091495f9213b460d437d",m.callServer,void 0,m.findSourceMapURL,"startDevelopmentAction");var p=r(84607),g=r(63145),h=r(65484);let v={unauthorized:"errorGeneric",not_human:"errorGeneric",idea_not_found:"errorGeneric",assignee_not_agent:"errorAssigneeNotAgent",no_approved_proposal:"errorNoApprovedProposal",no_unfinished_tasks:"errorNoUnfinishedTasks",agent_offline:"errorAgentOffline",instance_offline:"errorInstanceOffline",fixed_cwd_host_offline:"errorFixedCwdHostOffline",unknown:"errorGeneric"};function b(e){var t,r,m;let{ideaUuid:b,assignee:j,assigneeName:N,proposals:w,tasks:y,onStarted:A,renderAction:k,disabledReason:S,onCloseAutoFocus:C}=e,F=(0,a.c)("startDevelopment"),U=null!=(r=null==(t=(0,u.kz)())?void 0:t.connections)?r:[],[I,R]=(0,s.useState)(!1),[_,E]=(0,s.useState)(!1),{start:D,pickerState:T,confirmPick:L,confirmTemporary:M,cancelPick:q,isResolving:O}=(0,g.E)({reassignNoWake:p.U,previewIdeaUuid:b});(0,s.useEffect)(()=>{E(!1)},[b]),(0,s.useEffect)(()=>{if(!_)return;let e=setTimeout(()=>E(!1),3e4);return()=>clearTimeout(e)},[_]);let B=(0,x.Q9)(j),P=null!==B&&U.some(e=>e.agentUuid===B&&"online"===e.effectiveStatus),$=(0,x.r6)({assignee:j,proposals:w,tasks:y}),z=(0,x.G_)({assignee:j,proposals:w,tasks:y,agentOnline:P});if(!k&&(!$||_))return _?(0,n.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:F("startedHint")}):null;let G=async e=>{R(!0);try{let r=e?await f(b,e):await f(b);if(r.success)E(!0),l.oR.success(F("startedHint")),null==A||A();else{var t;l.oR.error(F(v[null!=(t=r.errorCode)?t:"unknown"]))}}catch(e){l.oR.error(F("errorGeneric"))}finally{R(!1)}},H=S||(I||O?F("starting"):_?F("startedHint"):B?(null==w?void 0:w.some(e=>"approved"===e.status))?$?z?void 0:F("offlineHint"):F("errorNoUnfinishedTasks"):F("errorNoApprovedProposal"):F("errorAssigneeNotAgent")),W=()=>{H||D({ideaUuid:b,wake:G})},J=(0,n.jsx)(c.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:W,disabled:!z||I||O,children:I?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{className:"mr-2 h-4 w-4 animate-spin"}),F("starting")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4"}),F("button")]})});return k||P?(0,n.jsxs)(n.Fragment,{children:[k?k({label:F("button"),disabledReason:H,busy:I||O||null!==T,onSelect:W}):J,(0,n.jsx)(h.V,{open:null!==T,onCloseAutoFocus:C,agentName:null!=N?N:"",instances:null!=(m=null==T?void 0:T.instances)?m:[],agentUuid:null==T?void 0:T.agentUuid,onConfirm:L,onTemporaryConfirm:M,onCancel:q})]}):(0,n.jsx)(d.Bc,{delayDuration:300,children:(0,n.jsxs)(d.m_,{children:[(0,n.jsx)(d.k$,{asChild:!0,children:(0,n.jsx)("span",{tabIndex:0,className:"inline-flex",children:J})}),(0,n.jsx)(d.ZI,{children:F("offlineHint")})]})})}},63145:(e,t,r)=>{r.d(t,{E:()=>i});var n=r(81476),s=r(43664),a=r(63123);async function l(e){try{let t=await fetch("/api/ideas/".concat(encodeURIComponent(e),"/wake-preview"),{headers:{Accept:"application/json"}});if(!t.ok)return null;let r=await t.json();if(!r.success||!r.data)return null;return r.data}catch(e){return s.q.error("wake-target preview fetch failed",e),null}}function i(e){let{fetchPreview:t=l,reassignNoWake:r,previewIdeaUuid:i}=e,[o,c]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),[x,m]=(0,n.useState)(null),f=(0,n.useRef)("idle"),p=(0,n.useRef)(null),g=(0,n.useCallback)(()=>{f.current="idle",u(!1)},[]);(0,n.useEffect)(()=>{let e=!1;return i?(t(i).then(t=>{var r;e||m((null==t||null==(r=t.resolvedTarget)?void 0:r.source)==="project_fixed"?t.resolvedTarget:null)}),()=>{e=!0}):void m(null)},[t,i]);let h=(0,n.useCallback)(async(e,t,n)=>{try{let a=await r(e,t,n);a.success||s.q.debug("pin-then-wake reassign did not persist (continuing to wake)",a.error)}catch(e){s.q.error("pin-then-wake reassign threw (continuing to wake)",e)}},[r]),v=(0,n.useCallback)(async e=>{let{ideaUuid:r,wake:n}=e;if("idle"===f.current){f.current="running",u(!0);try{var s;let e=await t(r);if(m((null==e||null==(s=e.resolvedTarget)?void 0:s.source)==="project_fixed"?e.resolvedTarget:null),!e||!e.assigneeAgentUuid||"direct"===e.outcome)return void await n();let l=e.assigneeAgentUuid,i=(0,a.C)(e.onlineInstances);if("pick"===e.outcome){if(0===i.length)return void await n();let e={ideaUuid:r,agentUuid:l,instances:i};p.current={state:e,wake:n},f.current="picking",c(e);return}if("auto_pin"===e.outcome){let e=i[0];(null==e?void 0:e.agentInstanceUuid)&&await h(r,l,e.agentInstanceUuid),await n();return}}finally{"picking"!==f.current&&g()}}},[t,h,g]),b=(0,n.useCallback)(async e=>{if("picking"!==f.current||!p.current)return;let{state:t,wake:r}=p.current;f.current="running",p.current=null,c(null);try{e.agentInstanceUuid&&await h(t.ideaUuid,t.agentUuid,e.agentInstanceUuid),await r()}finally{g()}},[h,g]),j=(0,n.useCallback)(()=>{"picking"===f.current&&(p.current=null,c(null),g())},[g]);return{start:v,pickerState:o,confirmPick:b,confirmTemporary:(0,n.useCallback)(async e=>{if("picking"!==f.current||!p.current)return;let{wake:t}=p.current;f.current="running",p.current=null,c(null);try{await t(e)}finally{g()}},[g]),cancelPick:j,isResolving:d,fixedTarget:x}}},73386:(e,t,r)=>{r.d(t,{J:()=>s});var n=r(42885);let s=(0,n.createServerReference)("40d1e42ac0a4e4839fd393741194aed664ae216872",n.callServer,void 0,n.findSourceMapURL,"updateIdeaAction")},81145:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(73326).A)("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]])},82167:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(73326).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},84607:(e,t,r)=>{r.d(t,{U:()=>s});var n=r(42885);let s=(0,n.createServerReference)("702edd09b0fbfa7b60088e10fad16be2fd61e83459",n.callServer,void 0,n.findSourceMapURL,"reassignIdeaInstanceNoWakeAction")},91598:(e,t,r)=>{r.d(t,{o:()=>n});function n(e){let{ideaStatus:t,elaborationStatus:r,elaboration:n}=e;return!("elaborating"!==t||"resolved"===r||!n||0===n.rounds.length||n.rounds.some(e=>"pending_answers"===e.status))}},94696:(e,t,r)=>{r.d(t,{c:()=>s});var n=r(42885);let s=(0,n.createServerReference)("6038e673120868abb2573780b50a28c37393b728a0",n.callServer,void 0,n.findSourceMapURL,"getTasksForProposalAction")},97322:(e,t,r)=>{r.d(t,{R:()=>y});var n=r(60200),s=r(81476),a=r(32022),l=r(25588),i=r(50759),o=r(82167),c=r(17230),d=r(56109),u=r(91560),x=r(71507),m=r(28201),f=r(40058),p=r(30474),g=r(70246),h=r(69189),v=r(42885);let b=(0,v.createServerReference)("707042a9ef4563eabe4bf7b4d3308cf94494532d3f",v.callServer,void 0,v.findSourceMapURL,"submitElaborationAnswersAction");var j=r(76753);let N="__other__",w={functional:"functional",non_functional:"nonFunctional",business_context:"businessContext",technical_context:"technicalContext",user_scenario:"userScenario",scope:"scope"};function y(e){let{ideaUuid:t,elaboration:r,onRefresh:s}=e,i=(0,l.c)("elaboration"),o=(0,a.r)();if(!r||0===r.rounds.length)return null;let{summary:c,rounds:d}=r;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:i("title")}),(0,n.jsx)("span",{className:"text-xs font-medium text-primary",children:i("answeredCounter",{answered:c.answeredQuestions,total:c.totalQuestions})})]}),(0,n.jsx)("div",{className:"space-y-2.5",children:d.map(e=>(0,n.jsx)(A,{round:e,ideaUuid:t,onAnswered:async()=>{await (null==s?void 0:s()),o.refresh()}},e.uuid))})]})}function A(e){let{round:t,ideaUuid:r,onAnswered:a}=e,c=(0,l.c)("elaboration"),d=(0,l.c)("projectAccess"),u=(0,h.F7)(),x="pending_answers"===t.status,m="answered"===t.status||"validated"===t.status||"needs_followup"===t.status,[f,p]=(0,s.useState)(x);return(0,n.jsx)(g.Nt,{open:f,onOpenChange:p,children:(0,n.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:[(0,n.jsx)(g.R6,{asChild:!0,children:(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left transition-colors cursor-pointer hover:bg-background ".concat(f?"bg-[#F7F6F3] dark:bg-[#1e1d1b] border-b border-border":""),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[f?(0,n.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"}):(0,n.jsx)(o.A,{className:"h-4 w-4 text-muted-foreground"}),(0,n.jsx)("span",{className:"flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full text-[11px] font-semibold text-white ".concat(x?"bg-primary":"bg-[#888780]"),children:t.roundNumber}),(0,n.jsx)("span",{className:"text-[13px] font-semibold text-foreground",children:c("roundLabel",{number:t.roundNumber})}),t.isAppended&&(0,n.jsx)("span",{className:"rounded bg-[#EDE7F6] dark:bg-[#221833] px-2 py-0.5 text-[10px] font-medium text-[#6A4FB6] dark:text-[#A99FF0]",children:c("appendedBadge")}),!f&&(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:["\xb7 ",c("questionCount",{count:t.questions.length})]})]}),m?(0,n.jsx)("span",{className:"rounded bg-[#E8F5E9] dark:bg-[#14281a] px-2 py-0.5 text-[10px] font-medium text-[#2E7D32] dark:text-[#5FD07E]",children:c("statusAnswered")}):(0,n.jsx)("span",{className:"rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:c("pendingAnswers")})]})}),(0,n.jsx)(g.Ke,{children:x&&u?(0,n.jsx)(S,{round:t,ideaUuid:r,onAnswered:a}):x?(0,n.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:d("elaborationReadOnly")}),(0,n.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-sm text-foreground",children:t.questions.map(e=>(0,n.jsx)("li",{children:e.text},e.questionId))})]}):(0,n.jsx)(k,{round:t})})]})})}function k(e){let{round:t}=e,r=(0,l.c)("elaboration");return(0,n.jsx)("div",{className:"space-y-4 px-4 py-4",children:t.questions.map((e,s)=>{var a,l;let i=(null==(a=e.answer)?void 0:a.selectedOptionId)?e.options.find(t=>{var r;return t.id===(null==(r=e.answer)?void 0:r.selectedOptionId)}):null,o=(null==(l=e.answer)?void 0:l.customText)||(null==i?void 0:i.label)||r("noAnswer"),c=w[e.category]||e.category;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("span",{className:"text-xs leading-relaxed text-muted-foreground",children:["Q: ",e.text]}),(0,n.jsx)("span",{className:"shrink-0 text-[11px] italic text-[#B0B0B0]",children:r("category.".concat(c))})]}),(0,n.jsxs)("p",{className:"mt-1 text-xs font-medium leading-relaxed text-foreground",children:["A: ",o]}),s<t.questions.length-1&&(0,n.jsx)("div",{className:"mt-4 h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"})]},e.uuid)})})}function S(e){var t,r,a;let{round:i,ideaUuid:g,onAnswered:h}=e,v=(0,l.c)("elaboration"),[y,A]=(0,s.useState)(0),k=(0,s.useRef)(y),[S,C]=(0,s.useState)("right"),[F,U]=(0,s.useState)({}),[I,R]=(0,s.useState)(!1),[_,E]=(0,s.useState)(null);(0,s.useEffect)(()=>{k.current=y},[y]);let D=(0,s.useCallback)((e,t)=>{C("left"===t?"right":"left"),A(e)},[]),T=i.questions,L=T[y],M=w[L.category]||L.category,q=(0,s.useCallback)((e,t)=>{if(U(r=>{var n;return{...r,[e]:{questionId:e,selectedOptionId:t===N?null:t,customText:t===N?(null==(n=r[e])?void 0:n.customText)||"":null}}}),t!==N){let e=Math.min(T.length-1,k.current+1);e!==k.current&&setTimeout(()=>D(e,"left"),200)}},[T.length,D]),O=(0,s.useCallback)((e,t)=>{U(r=>({...r,[e]:{...r[e],questionId:e,selectedOptionId:null,customText:t}}))},[]),B=T.filter(e=>e.required).every(e=>{let t=F[e.questionId];return!!t&&!!(t.selectedOptionId||t.customText&&t.customText.trim())}),P=async()=>{R(!0),E(null);let e=Object.values(F),t=await b(g,i.uuid,e);t.success?(await h(),R(!1)):(R(!1),E(t.error||v("submitFailed")))},$=(e=>{let t=F[e];return t?null===t.selectedOptionId&&null!==t.customText&&void 0!==t.customText?N:t.selectedOptionId||null:null})(L.questionId),z=$===N,G=y===T.length-1,H=!!(null!=(a=null==(t=F[L.questionId])?void 0:t.customText)?a:"").trim();return(0,n.jsxs)("div",{className:"overflow-hidden p-3.5",children:[(0,n.jsxs)("div",{className:"right"===S?"animate-in slide-in-from-right-4 duration-200":"animate-in slide-in-from-left-4 duration-200",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:L.text}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,n.jsx)(f.$,{variant:"ghost",size:"icon",onClick:()=>D(y-1,"right"),disabled:0===y,className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,n.jsx)(c.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:v("navCounter",{current:y+1,total:T.length})}),(0,n.jsx)(f.$,{variant:"ghost",size:"icon",onClick:()=>D(y+1,"left"),disabled:y===T.length-1,className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,n.jsx)(o.A,{className:"h-4 w-4"})})]})]}),(0,n.jsxs)("div",{className:"mt-3",children:[L.options.map((e,t)=>{let r=$===e.id;return(0,n.jsxs)("div",{children:[(0,n.jsxs)(f.$,{variant:"ghost",onClick:()=>q(L.questionId,e.id),className:"flex w-full items-start justify-between gap-2.5 px-3.5 py-3 h-auto text-left transition-colors rounded-none ".concat(r?"bg-[#F7F6F3] dark:bg-[#1e1d1b]":"hover:bg-background"),children:[(0,n.jsxs)("span",{className:"flex flex-1 min-w-0 items-start gap-2.5",children:[(0,n.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-border text-xs font-medium text-foreground/80",children:t+1}),(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,n.jsx)("span",{className:"whitespace-normal [overflow-wrap:anywhere] text-[13px] text-foreground",children:e.label}),e.description&&(0,n.jsx)("span",{className:"whitespace-normal [overflow-wrap:anywhere] text-[11px] text-muted-foreground",children:e.description})]})]}),r&&(0,n.jsx)(d.A,{className:"mt-1 h-4 w-4 shrink-0 text-muted-foreground"})]}),t<L.options.length-1&&(0,n.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"})]},e.id)}),(0,n.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,n.jsxs)("div",{className:"flex w-full items-center gap-2.5 px-3.5 py-3 transition-colors ".concat(z?"bg-[#F7F6F3] dark:bg-[#1e1d1b]":"hover:bg-background"),children:[(0,n.jsx)("span",{className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md bg-border",onClick:()=>q(L.questionId,N),children:(0,n.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"})}),z?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.p,{type:"text",value:(null==(r=F[L.questionId])?void 0:r.customText)||"",onChange:e=>O(L.questionId,e.target.value),onKeyDown:e=>{if((0,j.P)(e)||"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),G||!H))return;let t=k.current+1;setTimeout(()=>D(t,"left"),200)},placeholder:v("somethingElse"),className:"flex-1 border-none bg-transparent text-[13px] text-foreground placeholder:italic placeholder:text-[#B4B2A9] shadow-none focus-visible:ring-0",autoFocus:!0}),!G&&(0,n.jsx)(f.$,{type:"button",variant:"ghost",size:"icon",onClick:()=>{if(G||!H)return;let e=k.current+1;setTimeout(()=>D(e,"left"),200)},disabled:!H,"aria-label":v("confirmAnswerAria"),className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,n.jsx)(x.A,{className:"h-4 w-4"})})]}):(0,n.jsx)(f.$,{variant:"ghost",onClick:()=>q(L.questionId,N),className:"flex-1 justify-start text-left text-[13px] italic text-muted-foreground h-auto p-0 hover:bg-transparent",children:v("somethingElse")})]})]})]},y),_&&(0,n.jsx)("div",{className:"mt-3 rounded-lg bg-destructive/10 p-2.5 text-[12px] text-destructive",children:_}),(0,n.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] text-[#B0B0B0]",children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-primary"}),v("category.".concat(M))]}),(0,n.jsx)(f.$,{onClick:P,disabled:!B||I,className:"bg-primary hover:bg-[#B56A42] text-white text-[13px]",children:I?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}),v("submitting")]}):v("submitAnswers")})]})]})}}}]);
|