@mndrk/agx 2.0.47 → 2.0.49
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/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +13 -7
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +14 -6
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +13 -5
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +4 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/folders/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/folders.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__015d40a6._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a300f072._.js → [root-of-the-server]__02a4a323._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__05dedbe1._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4ce74056._.js → [root-of-the-server]__05f0bfbf._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c22dd3a6._.js → [root-of-the-server]__08c82fe8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__3fae531a._.js → [root-of-the-server]__09e37b59._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1a1f66b1._.js → [root-of-the-server]__0e83aabc._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__27da58f0._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9ffa67b7._.js → [root-of-the-server]__2ae8b938._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2cfd21b8._.js +108 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__37844df7._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d9f2041b._.js → [root-of-the-server]__3a93931b._.js} +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f9f7f2df._.js → [root-of-the-server]__3c1403f2._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__143fdf69._.js → [root-of-the-server]__40e9e2e8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42e602eb._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a7b2350e._.js → [root-of-the-server]__456840d0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5c2848bb._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__667c658f._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6a92b882._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c9baa7c._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c21747df._.js → [root-of-the-server]__719eddc2._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__36d15de5._.js → [root-of-the-server]__7ee3dfe1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d324f8a1._.js → [root-of-the-server]__80964fad._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__bab85495._.js → [root-of-the-server]__862cf77d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a280fa63._.js → [root-of-the-server]__8b5b9860._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__3170b7bf._.js → [root-of-the-server]__8d475640._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__958dded3._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ab655b9f._.js → [root-of-the-server]__96c424d5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5c55f67a._.js → [root-of-the-server]__976ebe46._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__179cb224._.js → [root-of-the-server]__a1cab8fe._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__20a2cb22._.js → [root-of-the-server]__a31dd756._.js} +9 -9
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a3955224._.js → [root-of-the-server]__ad53dc3f._.js} +17 -17
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ac6326b6._.js → [root-of-the-server]__b8eeb177._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__fcfa3690._.js → [root-of-the-server]__c10e827d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e58e9f91._.js → [root-of-the-server]__c11e0040._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c40b6f69._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c7d3c7ab._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cdc52544._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8cbd8c56._.js → [root-of-the-server]__d1c698b6._.js} +12 -12
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9ea98bd._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ef27f8cd._.js → [root-of-the-server]__df886e3c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ca4987eb._.js → [root-of-the-server]__e0b6f424._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c8890cd6._.js → [root-of-the-server]__f43ecbc2._.js} +13 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f51c7b72._.js +5 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f662fd1e._.js +20 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__538b0bdd._.js → [root-of-the-server]__f961230c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b627cb83._.js → [root-of-the-server]__feec5b54._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d16caed5._.js → [root-of-the-server]__ff6ce4b1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9ce15e._.js +5 -0
- package/cloud-runtime/standalone/.next/server/chunks/_26ffc857._.js +121 -0
- package/cloud-runtime/standalone/.next/server/chunks/_4d07f8db._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_66d0cf73._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_9b10087f._.js +3 -2
- package/cloud-runtime/standalone/.next/server/chunks/_a13c0bef._.js +121 -0
- package/cloud-runtime/standalone/.next/server/chunks/{lib_98ae187c._.js → lib_2cd3429c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/lib_a2a83df5._.js +55 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_a658c9ef._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_ba38ea08._.js +55 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +27 -29
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +6 -102
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_schedule-runner_ts_43a13c69._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b2a2b86._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__32546242._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ff9ead4._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f2c3b7ab._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f59f0dc7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d96bb3b5._.js → [root-of-the-server]__fbe1ab4a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1e9b9b1e._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_24fe6213._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_36a0c486._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_3b21d3b2._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_3eeac8f9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_48db42b7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_59f30a73._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7d3b0032._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_916950b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_b598ae8a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cc8c8302._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_d972a4e1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_dd7bb6fb._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_dd9880fb._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f02d786a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fd8cafe9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +15 -12
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_54bf563f._.js +3 -0
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/04c135686161dbb1.js +40 -0
- package/cloud-runtime/standalone/.next/static/chunks/0d63db0c39c0a3b2.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/136ed07d84b14632.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/18866ed04ed3a063.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{ccaf68956da192f8.js → 1bb38e61d891453c.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/2c7c8259c2b56bf5.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2da1f13d50dc4e54.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5545da2ad239c0b6.js +3 -0
- package/cloud-runtime/standalone/.next/static/chunks/{41c518743656a291.js → 5f33b52d582b0bb4.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{97c11137cd6fc860.js → 64c2961edd3a3b13.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{db131a0b6350e416.js → 692ce04abdbb3970.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/83be8569d298c6b0.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/87b3afe828c8cc52.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{4343e7fe5bf5f34a.js → 9328740727c6456d.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/95d47e285ae9c031.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b9bf5d3ee92a1313.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/ea35fb870141bcff.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f59722264449b61c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f727d2c8f039511d.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{31fe4e36a00fd7b5.js → f8706212baa8ec67.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/fd823c9d1381335d.js +1 -0
- package/cloud-runtime/standalone/app/api/chat/route.ts +5 -163
- package/cloud-runtime/standalone/app/api/schedules/route.ts +11 -2
- package/cloud-runtime/standalone/app/automations/page.tsx +11 -1
- package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +11 -1
- package/cloud-runtime/standalone/components/LinearBoard.tsx +118 -21
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +10 -13
- package/cloud-runtime/standalone/components/linear/RunScriptManager.tsx +356 -0
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +35 -0
- package/cloud-runtime/standalone/hooks/useLinearRunScripts.ts +115 -0
- package/cloud-runtime/standalone/lib/chat/project-context.ts +169 -0
- package/cloud-runtime/standalone/lib/linear-client.ts +33 -3
- package/cloud-runtime/standalone/lib/linear-execution-prompt.ts +92 -15
- package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +2 -0
- package/cloud-runtime/standalone/lib/orchestrator/schedule-runtime.ts +76 -0
- package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +201 -16
- package/cloud-runtime/standalone/src/graph/work-dispatcher.ts +128 -35
- package/cloud-runtime/standalone/state/automations/.state/c4300b01-1203-40fe-b3a9-b9fb9ec0c5cc.json +8 -0
- package/cloud-runtime/standalone/state/automations/active/c4300b01-1203-40fe-b3a9-b9fb9ec0c5cc.md +15 -0
- package/cloud-runtime/standalone/state/linearRunScripts.test.ts +99 -0
- package/cloud-runtime/standalone/state/linearRunScripts.ts +132 -0
- package/cloud-runtime/standalone/state/windowState.ts +21 -0
- package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -1
- package/cloud-runtime/standalone/vault/agx/issues/ESO-327/design-doc.md +202 -0
- package/cloud-runtime/standalone/worker/index.js +34516 -1717
- package/cloud-runtime/standalone/worker/index.ts +3 -0
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1154e5b3._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__152b2000._.js +0 -61
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__33865410._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c53437e._.js +0 -110
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6dbe939c._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7012e83d._.js +0 -66
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__da645a5e._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f4b3df16._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_2a5aeb76._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_4689976f._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_682c9d81._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_6e7f0ae4._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_a32a5cdd._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_af7bd752._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_fe32a267._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +0 -55
- package/cloud-runtime/standalone/.next/server/chunks/lib_3c080873._.js +0 -34
- package/cloud-runtime/standalone/.next/server/chunks/lib_9f439b27._.js +0 -70
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_12d46a92._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__21a9eaef._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__69887882._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__9ad05ace._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bb149a22._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_11ce4c04._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1d949e96._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_32a156b6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_43c091dc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_45175f47._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_4f0c544d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_69164b06._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7f7a828a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_97f6a18e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a511a014._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_c3a3a829._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cee3cf86._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e8bdedc5._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/14fff3c493ea9c54.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/2a9c83f8211196e0.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5405540470146645.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/69f2db4b9996b9c1.js +0 -37
- package/cloud-runtime/standalone/.next/static/chunks/8aeb69ceb497ad85.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/a9da98f883ac833b.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/b2127dc67c5ade9f.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/baf5d39d089efb87.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/bf2a2fafb710e63c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/c78969fde5798275.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/d3dc6fadb96ab3a2.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/fdadad2379039dce.js +0 -3
- package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +0 -8
- package/cloud-runtime/standalone/state/automations/active/24a6a5db-3b14-49c4-841f-29f10f015fbb.md +0 -17
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/1d8496cecfe9a523.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--ZkFZnP5h74O7GgdHudXgH--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/1d8496cecfe9a523.js"/><script src="/_next/static/chunks/de271f8f22d293b4.js" async=""></script><script src="/_next/static/chunks/961311cbebbffb6d.js" async=""></script><script src="/_next/static/chunks/2375e3fd2a9b8844.js" async=""></script><script src="/_next/static/chunks/797fcb0710da3be2.js" async=""></script><script src="/_next/static/chunks/turbopack-0ace1f53f3e3cf46.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/73e3194f06db260e.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/1d8496cecfe9a523.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"ZkFZnP5h74O7GgdHudXgH\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/d96012bcfc98706a.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/73e3194f06db260e.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"nFPvPLk4pxLuto4LienyONhmh0GOF2nzD0yHQLwr8IQ=\"\n}"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515247,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(618566),a=e.i(274049),n=e.i(770703),i=e.i(643531),o=e.i(664659),l=e.i(503116),d=e.i(178583),c=e.i(475254);let u=(0,c.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var m=e.i(431343),p=e.i(16715),x=e.i(555436),g=e.i(239616),f=e.i(284614);let h="agx-linear:runScripts",v={activeScriptId:null,scripts:[]};function b(){return void 0!==window.localStorage}function j(e){if(!e||"object"!=typeof e)return{...v};let t=Array.isArray(e.scripts)?[...e.scripts.map(e=>(function(e){if(!e||"object"!=typeof e)return null;let t="string"==typeof e.id?e.id.trim():"",r="string"==typeof e.name?e.name.trim():"",s="string"==typeof e.prompt?e.prompt.trim():"",a="string"==typeof e.createdAt&&e.createdAt.trim()?e.createdAt.trim():"",n="string"==typeof e.updatedAt&&e.updatedAt.trim()?e.updatedAt.trim():a;return t&&r&&s&&a&&n?{id:t,name:r,prompt:s,createdAt:a,updatedAt:n}:null})(e)).filter(e=>!!e)].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)):[],r="string"==typeof e.activeScriptId&&e.activeScriptId.trim()?e.activeScriptId.trim():null;return{activeScriptId:r&&t.some(e=>e.id===r)?r:null,scripts:t}}function y(e){let t=String(e??"").trim().toLowerCase();return t?`${h}:${t}`:`${h}:global`}var w=e.i(430520),k=e.i(650030),N=e.i(514065),S=e.i(107233);let I=(0,c.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var C=e.i(727612),E=e.i(355733),$=e.i(687990);function R({projectSlug:e,scripts:s,activeScriptId:a,onSetActiveScriptId:n,onSaveScript:o,onDeleteScript:l}){let d=(0,r.useMemo)(()=>s.find(e=>e.id===a)??null,[a,s]),[c,u]=(0,r.useState)(()=>a?{type:"edit",scriptId:a}:{type:"new"}),[m,p]=(0,r.useState)(""),[x,g]=(0,r.useState)(""),[f,h]=(0,r.useState)(null),[v,b]=(0,r.useState)(null),j="edit"===c.type?c.scriptId:null;(0,r.useEffect)(()=>{if("edit"===c.type){let e=s.find(e=>e.id===c.scriptId);if(e){p(e.name),g(e.prompt);return}}if(d&&"new"!==c.type){("edit"!==c.type||c.scriptId!==d.id)&&u({type:"edit",scriptId:d.id}),p(d.name),g(d.prompt);return}0===s.length&&"new"!==c.type&&(u({type:"new"}),p(""),g(""))},[d,j,c,s]);let y=()=>{u({type:"new"}),p(""),g(""),h(null)},w=()=>{try{let e=o({name:m,prompt:x});u({type:"edit",scriptId:e.id}),h(null)}catch(e){h(e instanceof Error?e.message:"Failed to save run script.")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Run Scripts"}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-[var(--muted-foreground)]",children:["Save reusable execution prompts for the ",String(e??"").trim()||"global Linear board",". These scripts are stored locally on this device and layered on top of the built-in ticket context when you run a Linear task."]})]}),(0,t.jsxs)("div",{className:"grid gap-5 md:grid-cols-[240px_minmax(0,1fr)]",children:[(0,t.jsxs)("aside",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-3",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--muted-foreground)]",children:"Library"}),(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-md border border-[var(--card-border)] px-2 py-1 text-[11px] font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--background)]",onClick:y,children:[(0,t.jsx)(S.Plus,{size:12}),"New"]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${null===a?"bg-[var(--background)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>n(null),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${null===a?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:null===a?(0,t.jsx)(i.Check,{size:10}):null}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:"AGX default"})]}),0===s.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed border-[var(--card-border)] px-3 py-4 text-xs leading-relaxed text-[var(--muted-foreground)]",children:"No saved scripts yet. Create one to reuse your preferred Linear execution prompt."}):s.map(e=>{let r=e.id===a,s="edit"===c.type&&c.scriptId===e.id;return(0,t.jsx)("button",{type:"button",className:`rounded-lg border px-3 py-2 text-left transition-colors ${s?"border-blue-500/50 bg-[var(--background)]":"border-transparent hover:border-[var(--card-border)] hover:bg-[var(--background)]"}`,onClick:()=>{u({type:"edit",scriptId:e.id}),p(e.name),g(e.prompt),h(null),n(e.id)},children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${r?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:r?(0,t.jsx)(i.Check,{size:10}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate text-xs font-medium text-[var(--foreground)]",children:e.name}),(0,t.jsx)("div",{className:"mt-1 line-clamp-2 text-[11px] leading-relaxed text-[var(--muted-foreground)]",children:e.prompt}),(0,t.jsxs)("div",{className:"mt-2 text-[10px] uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:["Updated ",function(e){try{return new Date(e).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}(e.updatedAt)]})]})]})},e.id)})]})]}),(0,t.jsxs)("section",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-4",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-semibold text-[var(--foreground)]",children:"edit"===c.type?"Edit Run Script":"New Run Script"}),(0,t.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-[var(--muted-foreground)]",children:["Use placeholders like ",(0,t.jsx)("code",{children:"{{ticket.identifier}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.title}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.status}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.assignee}}"}),", ",(0,t.jsx)("code",{children:"{{project.slug}}"}),", ",(0,t.jsx)("code",{children:"{{knowledge_base.root}}"}),", ",(0,t.jsx)("code",{children:"{{knowledge_base.issue_path}}"}),", and ",(0,t.jsx)("code",{children:"{{worktree.path}}"}),"."]})]}),d?(0,t.jsxs)("span",{className:"rounded-full border border-blue-500/30 bg-blue-500/10 px-2.5 py-1 text-[11px] font-medium text-blue-400",children:["Active: ",d.name]}):(0,t.jsx)("span",{className:"rounded-full border border-[var(--card-border)] px-2.5 py-1 text-[11px] font-medium text-[var(--muted-foreground)]",children:"Active: AGX default"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:"Name"}),(0,t.jsx)("input",{type:"text",className:"rounded-lg border border-[var(--card-border)] bg-[var(--background)] px-3 py-2 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-blue-500",placeholder:"Investigation-first",value:m,onChange:e=>p(e.target.value)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:"Prompt"}),(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-[var(--card-border)] bg-[var(--background)] transition-colors focus-within:border-blue-500 [&_.rich-text-editor_.ProseMirror]:min-h-[220px]",children:(0,t.jsx)($.default,{content:x,onChange:g,placeholder:"Read {{ticket.identifier}} and the full comment thread in Linear before changing code.\nWrite your investigation to {{knowledge_base.issue_path}} and stop after posting a plan unless the issue is already approved for implementation."})})]}),f?(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:f}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-600",onClick:w,children:[(0,t.jsx)(I,{size:14}),"Save as new"]}),"edit"===c.type?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--card-border)] px-3 py-2 text-sm font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--background)]",onClick:()=>{if("edit"!==c.type)return void w();try{let e=o({id:c.scriptId,name:m,prompt:x});u({type:"edit",scriptId:e.id}),h(null)}catch(e){h(e instanceof Error?e.message:"Failed to update run script.")}},children:[(0,t.jsx)(I,{size:14}),"Update"]}):null,"edit"===c.type?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-red-500/30 px-3 py-2 text-sm font-medium text-red-300 transition-colors hover:bg-red-500/10",onClick:()=>{b(s.find(e=>e.id===c.scriptId)??null)},children:[(0,t.jsx)(C.Trash2,{size:14}),"Delete"]}):null,(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--card-border)] px-3 py-2 text-sm font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)] hover:text-[var(--foreground)]",onClick:y,children:[(0,t.jsx)(S.Plus,{size:14}),"Clear editor"]})]})]})]})]}),(0,t.jsx)(E.default,{isOpen:!!v,title:"Delete run script?",message:"This removes the saved script from this device for the current project.",preview:v?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{v&&(l(v.id),"edit"===c.type&&c.scriptId===v.id&&(u({type:"new"}),p(""),g("")),b(null),h(null))},onCancel:()=>b(null)})]})}var L=e.i(829415);let A="agx-linear:boardFilters",P={search:"",assigneeIds:[],statuses:[],teamId:"",cycleId:""};function M(){return void 0!==window.localStorage}function T(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>"string"==typeof e?e.trim():"").filter(Boolean))):[]}function z(e){let t=String(e??"").trim().toLowerCase();return t?`${A}:${t}`:`${A}:global`}var U=e.i(815273),O=e.i(286476);function F(e,t){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function D(e){var t;let r=_(e),s=r.issue.identifier,a=r.issue.title,n=r.issue.status,i=r.issue.assignee,o=r.runtime.knowledgeBaseRoot,l=r.runtime.issueKnowledgePath,d=r.runtime.isolatedWorktreePath,c=`LINEAR TASK EXECUTION
|
|
2
|
+
|
|
3
|
+
You are an engineer working through a single Linear ticket. Work like a careful teammate: continue existing work when present, investigate before coding, present a plan before implementation, ask clarifying questions when requirements are ambiguous, and stop cleanly when blocked instead of guessing.
|
|
4
|
+
|
|
5
|
+
INJECTED CONTEXT
|
|
6
|
+
- Ticket: ${s}
|
|
7
|
+
- Title: ${a}
|
|
8
|
+
- Current status: ${n}
|
|
9
|
+
- Current assignee: ${i}
|
|
10
|
+
- Project: ${r.project.label}
|
|
11
|
+
- Knowledge base root: ${o}
|
|
12
|
+
- Issue knowledge path: ${l}
|
|
13
|
+
- Suggested isolated worktree: ${d}
|
|
14
|
+
- Additional project resources such as repo knowledge, project memory, and project variables are injected separately by the active project context.
|
|
15
|
+
|
|
16
|
+
SOURCE REPOSITORIES
|
|
17
|
+
${!(t=r.project.repos)||0===t.length?"- Use the active project context to discover the right repository or workspace; do not hardcode paths.":t.map(e=>{let t=[e.name.trim()||"repository"],r=String(e.path??"").trim(),s=String(e.notes??"").trim();return r&&t.push(`path: ${r}`),s&&t.push(`notes: ${s}`),`- ${t.join(" | ")}`}).join("\n")}
|
|
18
|
+
|
|
19
|
+
WORKFLOW
|
|
20
|
+
1. Read the full Linear issue and comment thread before acting. Use Linear MCP for issue details, comments, state changes, and follow-up.
|
|
21
|
+
2. Prefer resuming existing work: existing knowledge-base notes, branches, PRs, or prior discussion.
|
|
22
|
+
3. If requirements are unclear, ask specific clarifying questions in Linear and stop.
|
|
23
|
+
4. If the ticket is fresh, investigate first, capture findings in the knowledge base, write a plan, and share the plan before implementation.
|
|
24
|
+
5. If a reviewed plan already exists or the ticket is explicitly ready for implementation, implement in an isolated worktree or equivalent isolated workspace rather than a shared checkout.
|
|
25
|
+
6. Validate with the appropriate tests, linting, type checks, and manual verification for the change.
|
|
26
|
+
7. Keep Linear accurate: comments, links, statuses, blockers, and PR references should match reality.
|
|
27
|
+
8. Keep the knowledge base current with what you learned, what changed, and what remains.
|
|
28
|
+
9. Work on exactly this ticket during this session.
|
|
29
|
+
|
|
30
|
+
RULES
|
|
31
|
+
- Use the injected project context instead of hardcoded repo-specific paths or conventions.
|
|
32
|
+
- Use knowledge base terminology; the filesystem path above is the storage location.
|
|
33
|
+
- If a PR already exists, focus on CI failures, reviewer feedback, merge status, or ticket follow-up instead of starting over.
|
|
34
|
+
- Leave the ticket and the knowledge base in a resumable state at the end of the session. Clean up temporary worktrees or session claims if your workflow created them.
|
|
35
|
+
|
|
36
|
+
`;return{prompt:`Work on this Linear ticket: ${s} - ${a}`,promptPrefix:c}}function _(e){var t;let r,s,a=e.issue.identifier.trim()||"TICKET-ID",n=e.issue.title.trim()||"Untitled ticket",i=String(e.issue.status??"").trim()||"Unknown",o=String(e.issue.assignee??"").trim()||"Unassigned",l=function(e){let t=String(e?.slug??"").trim();if(t)return F(t,"project");let r=String(e?.name??"").trim();return r?F(r,"project"):"project"}(e.project),d=String(e.project?.name??"").trim()||l,c=String(e.runtime?.knowledgeBaseRoot??"").trim()||`~/.agx/vault/${l}`,u=String(e.runtime?.issueKnowledgePath??"").trim()||`${c}/issues/${a}/`,m=String(e.runtime?.isolatedWorktreePath??"").trim()||`/tmp/agx-${F(a,"ticket")}`;return{issue:{identifier:a,title:n,status:i,assignee:o},project:{name:d,slug:l,label:(t=e.project,r=String(t?.name??"").trim(),s=String(t?.slug??"").trim(),r&&s?`${r} (${s})`:r||s||"current project"),repos:e.project?.repos?[...e.project.repos]:[]},runtime:{knowledgeBaseRoot:c,issueKnowledgePath:u,isolatedWorktreePath:m}}}var q=e.i(778917),W=e.i(531278);let K=[{id:"claude",label:"Claude Code",icon:"🟣"},{id:"codex",label:"Codex",icon:"⚫"},{id:"gemini",label:"Gemini CLI",icon:"🔵"}];function J({connected:e,user:s,clis:a,mcpConfigured:n,onConnect:o,onConnectWithKey:l,onDisconnect:d,onConfigureMcp:c,onContinue:u}){let[m,p]=(0,r.useState)(""),[x,g]=(0,r.useState)(null),[f,h]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),w=async()=>{if(!m.trim())return;h(!0),g(null);let e=await l(m.trim());h(!1),e.ok||g(e.error||"Failed to connect")},k=async e=>{b(e),y(null);let t=await c(e);b(null),t.ok||y(t.error||"Failed to configure")},N=K.filter(e=>a[e.id]).some(e=>n[e.id]);return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsxs)("div",{className:"w-full max-w-md space-y-6 px-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e&&(0,t.jsx)("div",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-green-500/20",children:(0,t.jsx)(i.Check,{size:10,className:"text-green-500"})}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Connect to Linear"})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Connect your workspace to browse tickets and execute them with agents."}),(0,t.jsx)("div",{className:"mt-3 space-y-3",children:e?(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2",children:[(0,t.jsxs)("div",{className:"text-xs text-[var(--foreground)]",children:["Connected as"," ",(0,t.jsx)("span",{className:"font-medium",children:s?.name})]}),(0,t.jsx)("button",{type:"button",onClick:d,className:"text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Disconnect"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:o,className:"w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:"Connect with Linear"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-[var(--muted-foreground)]",children:[(0,t.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"}),"or",(0,t.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[10px] text-[var(--muted-foreground)] block mb-1",children:"Personal API key"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"password",value:m,onChange:e=>{p(e.target.value),g(null)},onKeyDown:e=>{"Enter"===e.key&&w()},placeholder:"lin_api_...",className:"flex-1 rounded-md border border-[var(--card-border)] bg-transparent px-3 py-1.5 text-xs text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-1 focus:ring-[var(--foreground)]"}),(0,t.jsx)("button",{type:"button",onClick:w,disabled:!m.trim()||f,className:"rounded-md border border-[var(--card-border)] px-3 py-1.5 text-xs text-[var(--foreground)] transition-colors hover:bg-[var(--card-border)] disabled:opacity-40",children:f?"...":"Save"})]}),x&&(0,t.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:x}),(0,t.jsxs)("a",{href:"https://linear.app/settings/api",target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Generate at linear.app/settings/api",(0,t.jsx)(q.ExternalLink,{size:8})]})]})]})})]}),e&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Configure MCP"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Add the Linear MCP server to your AI tools so agents can read and update tickets during execution."}),(0,t.jsxs)("div",{className:"mt-3 space-y-1",children:[K.map(e=>{let r=a[e.id],s=n[e.id],o=v===e.id;return(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2 ${!r?"opacity-40":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{children:e.icon}),(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:e.label})]}),r?s?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-green-500",children:[(0,t.jsx)(i.Check,{size:10}),"Configured"]}):(0,t.jsx)("button",{type:"button",onClick:()=>k(e.id),disabled:o,className:"flex items-center gap-1 rounded px-2 py-0.5 text-[10px] text-[var(--foreground)] border border-[var(--card-border)] hover:bg-[var(--card-border)] transition-colors disabled:opacity-50",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.Loader2,{size:10,className:"animate-spin"}),"Configuring..."]}):"Configure"}):(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Not installed"})]},e.id)}),j&&(0,t.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:j})]}),(0,t.jsx)("button",{type:"button",onClick:u,className:"mt-4 w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:N?"Continue":"Skip for now"})]})]})})}let B=(0,n.default)(()=>e.A(711760).then(e=>e.Composer),{loadableGenerated:{modules:[895214]},ssr:!1});function G({onResize:e}){let s=(0,r.useRef)(!1),a=(0,r.useRef)(0);return(0,r.useEffect)(()=>{if(!s.current)return;let t=t=>{let r=t.clientX-a.current;a.current=t.clientX,e(r)},r=()=>{s.current=!1,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",r)};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",r),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",r)}}),(0,t.jsx)("div",{className:"group relative z-10 w-0 shrink-0 cursor-col-resize",onMouseDown:e=>{e.preventDefault(),s.current=!0,a.current=e.clientX,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},children:(0,t.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function X(e,t,r=20){let s=t?t.replace("#",""):"e2e8f0";return`https://api.dicebear.com/9.x/bottts-neutral/svg?seed=${encodeURIComponent(e)}&size=${r}&backgroundColor=${s}`}function H(e){switch(e){case"queued":return"queued";case"running":return"running";case"success":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return e}}let V={"In Progress":"In Prog","In Review":"Review",Backlog:"Backlog",Todo:"Todo",Done:"Done",Cancelled:"Cancl."},Y={queued:"bg-amber-500/10 border-amber-500/20 text-amber-400",running:"bg-yellow-500/10 border-yellow-500/20 text-yellow-400",success:"bg-emerald-500/10 border-emerald-500/20 text-emerald-400",failed:"bg-red-500/10 border-red-500/20 text-red-400",cancelled:"bg-zinc-500/10 border-zinc-500/20 text-zinc-400"},Z={queued:"bg-amber-400",running:"bg-yellow-400",success:"bg-emerald-400",failed:"bg-red-400",cancelled:"bg-zinc-400"};function Q({label:e,value:r,options:s,activeClasses:a,onChange:n}){let i=r.trim().length>0;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("select",{"aria-label":e,className:`max-w-[160px] appearance-none rounded-full border bg-transparent px-2.5 py-0.5 pr-6 text-[11px] font-medium outline-none transition-colors ${i?a:"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,value:r,onChange:e=>n(e.target.value),children:s.map(r=>(0,t.jsx)("option",{value:r.value,children:r.label},`${e}-${r.value||"all"}`))}),(0,t.jsx)(o.ChevronDown,{size:12,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-current"})]})}function ee({label:e,values:s,options:a,activeClasses:n,onChange:l,emptyLabel:d}){let[c,u]=(0,r.useState)(!1),m=(0,r.useRef)(null),p=a.filter(e=>e.value&&s.includes(e.value)),x=p.length>0,g=(()=>{if(0===p.length||p.length===a.length)return d??e;if(1===p.length)return p[0]?.label??d??e;let t=e.toLowerCase();return`${p.length} ${t}${t.endsWith("s")?"es":"s"}`})();(0,r.useEffect)(()=>{if(!c)return;let e=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c]);let f=(0,r.useCallback)(e=>{e?l(s.includes(e)?s.filter(t=>t!==e):[...s,e]):l([])},[l,s]);return(0,t.jsxs)("div",{className:"relative",ref:m,children:[(0,t.jsxs)("button",{type:"button","aria-label":e,"aria-haspopup":"listbox","aria-expanded":c,className:`flex max-w-[180px] items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-medium transition-colors ${x?n:"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,onClick:()=>u(e=>!e),children:[(0,t.jsx)("span",{className:"max-w-[132px] truncate",children:g}),(0,t.jsx)(o.ChevronDown,{size:12,className:`shrink-0 transition-transform ${c?"rotate-180":""}`})]}),c?(0,t.jsxs)("div",{role:"listbox","aria-label":`${e} options`,"aria-multiselectable":"true",className:"absolute left-0 top-full z-50 mt-1 min-w-[240px] overflow-hidden rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!x,className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${!x?"bg-[var(--background)] font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>l([]),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${!x?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:x?null:(0,t.jsx)(i.Check,{size:10})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:d??e})]}),p.length>0?(0,t.jsx)("div",{className:"px-3 pb-1 pt-2 text-[10px] font-medium uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Selected"}):null,a.filter(e=>e.value).map(r=>{let a=s.includes(r.value);return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a,className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${a?"bg-[var(--background)] font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>f(r.value),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded border ${a?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:a?(0,t.jsx)(i.Check,{size:10}):null}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r.label})]},`${e}-${r.value}`)})]}):null]})}function et({issue:e,participants:s,projectId:a,projectSlug:n,createRun:i,updateRun:o,onRunCreated:l}){let d=s[0],c=(0,r.useRef)(crypto.randomUUID()),{messages:u,setMessages:m,sendMessage:p,chatRuns:x}=(0,w.useGroupChat)(c.current),{processes:g,streaming:h}=(0,k.useProcessPolling)({workspaceId:c.current},{messages:u,setMessages:m}),v=new Set(["queued","running","awaiting_user","blocked"]),b=x.some(e=>v.has(e.status))||g.some(e=>"spawning"===e.state||"running"===e.state)?x.some(e=>"queued"===e.status)?"queued":"working":"ready",j=(0,r.useMemo)(()=>new Map(s.map(e=>[e.id,e])),[s]),y=(0,r.useRef)(!1),S=(0,r.useCallback)(async(t,r,c,u,m,p,x)=>{if(y.current)return;y.current=!0;let g=(m?s.find(e=>e.id===m):null)??d;if(g)try{let{promptPrefix:r}=D({issue:{identifier:e.identifier,title:e.title,status:e.status,assignee:e.assignee},project:n?{slug:n}:null}),s=r+(p?`
|
|
37
|
+
${p}`:""),d=await i({projectId:a??null,projectSlug:n??null,issueId:e.id,issueIdentifier:e.identifier,issueTitle:e.title,issueStatus:e.status,issueAssignee:e.assignee??null,agentId:g.id,agentName:g.name}),c=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:t,promptPrefix:s,threadId:d.threadId,activeParticipantIds:[g.id],projectSlug:n??void 0,routing:x})}),u=await c.json().catch(()=>({}));if(!c.ok||!u.chatRunId||!u.userMessageId)throw Error(u.error||"Failed to start chat session");await o(d.id,{chatRunId:u.chatRunId,rootMessageId:u.userMessageId}),l(d.id)}catch(e){console.error("Failed to create chat session:",e),y.current=!1,e instanceof Error&&window.alert(e.message)}},[e,s,d,a,n,i,o,l]);return(0,t.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:e.identifier}),(0,t.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:e.title})]}),(0,t.jsx)("span",{className:"shrink-0 rounded-md border border-[var(--card-border)] px-2 py-0.5 text-xs text-[var(--muted-foreground)]",children:e.status})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===u.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-[var(--muted-foreground)]",children:[(0,t.jsx)("span",{className:"text-sm",children:"Chat about this ticket"}),(0,t.jsx)("span",{className:"text-xs",children:"Your message will start a new session"})]}):(0,t.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[u.map(e=>{let r=e.participantId?j.get(e.participantId):null,s=(0,L.stripMarkers)(e.content);return s.trim()?(0,t.jsxs)("div",{className:"flex gap-3",children:["user"===e.role?(0,t.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,t.jsx)(f.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,t.jsx)("img",{src:X(e.participantId??"",r?.color),alt:r?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"user"===e.role?"You":r?.name??"Agent"}),(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,t.jsx)(N.Markdown,{content:s,isUser:"user"===e.role})})]})]},e.id):null}),Object.entries(h).map(([e])=>{let r=j.get(e);return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("img",{src:X(e,r?.color),alt:r?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),r?.name??"Agent"," is thinking..."]},`stream-${e}`)})]})}),(0,t.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:(0,t.jsx)(B,{onSend:S,onStop:()=>{},participants:s,projectSlug:n??void 0,loading:"ready"!==b,commands:[],activityStatus:b,placeholder:`Ask about ${e.identifier}...`,initialPinnedParticipantId:d?.id})})]})}function er({run:e,participants:s}){let{messages:a,setMessages:n,sendMessage:i,loadHistory:o,stop:d}=(0,w.useGroupChat)(e.threadId),{processes:c,streaming:u,chatRuns:m}=(0,k.useProcessPolling)(e.rootMessageId?{workspaceId:e.threadId,threadId:e.rootMessageId}:{workspaceId:e.threadId},{messages:a,setMessages:n});(0,r.useEffect)(()=>{o()},[o,e.threadId]);let p=(0,r.useMemo)(()=>new Map(s.map(e=>[e.id,e])),[s]),x=new Set(["queued","running","awaiting_user","blocked"]),g=m.some(e=>x.has(e.status))||c.some(e=>"spawning"===e.state||"running"===e.state)?m.some(e=>"queued"===e.status)?"queued":"working":"ready",h=(0,r.useCallback)((t,r,a,n,o,l,d)=>{e.rootMessageId&&i(t,r,void 0,e.rootMessageId,a,void 0,(0,O.orderParticipantIds)(s.map(e=>e.id),o),e.projectSlug??void 0,l,d)},[s,e.projectSlug,e.rootMessageId,i]);return(0,t.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:e.issueIdentifier}),(0,t.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:e.issueTitle??""})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-4",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 rounded-md border px-2.5 py-1 ${Y[e.status]}`,children:[(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${Z[e.status]}`}),(0,t.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:H(e.status)})]}),null!=e.durationMs&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)(l.Clock,{size:14}),(0,t.jsxs)("span",{children:[(e.durationMs/1e3).toFixed(1),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-[var(--card-border)] bg-[var(--card-bg)] px-2 py-1",children:[(0,t.jsx)("img",{src:X(e.agentId,p.get(e.agentId)?.color),alt:e.agentName,className:"h-5 w-5 rounded-full object-cover"}),(0,t.jsx)("span",{className:"pr-1 text-xs font-medium",children:e.agentName})]})]})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===a.length?(0,t.jsx)("div",{className:"py-8 text-center text-xs text-[var(--muted-foreground)]",children:"queued"===e.status||"running"===e.status?"Starting run...":"No thread messages yet."}):(0,t.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[a.map(r=>{let s=r.participantId?p.get(r.participantId):null,a=(0,L.stripMarkers)(r.content);if(!a.trim())return null;let n=r.participantId??e.agentId;return(0,t.jsxs)("div",{className:"flex gap-3",children:["user"===r.role?(0,t.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,t.jsx)(f.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,t.jsx)("img",{src:X(n,s?.color),alt:s?.name??e.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:"user"===r.role?(0,t.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"You"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:s?.color??"var(--foreground)"},children:s?.name??e.agentName}),(0,t.jsx)("span",{className:"rounded bg-[var(--card-bg)] px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Agent"})]})}),(0,t.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:new Date(r.timestamp).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),"user"===r.role?(0,t.jsx)("div",{className:"w-fit max-w-[85%] rounded-xl rounded-tl-sm border border-[var(--card-border)] bg-[var(--card-bg)] px-4 py-3 text-sm text-[var(--foreground)]",children:(0,t.jsx)(N.Markdown,{content:a,isUser:!0})}):(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,t.jsx)(N.Markdown,{content:a,isUser:!1})})]})]},r.id)}),Object.entries(u).filter(([,t])=>!e.rootMessageId||t.rootMessageId===e.rootMessageId).map(([r])=>{let s=p.get(r);return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("img",{src:X(r,s?.color),alt:s?.name??e.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),s?.name??e.agentName," is thinking..."]},`stream-${r}`)})]})}),(0,t.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:e.rootMessageId?(0,t.jsx)(B,{onSend:h,onStop:d,participants:s,projectSlug:e.projectSlug??void 0,loading:"ready"!==g,commands:[],activityStatus:g,placeholder:"Steer this run...",initialPinnedParticipantId:e.agentId}):(0,t.jsx)("div",{className:"px-2 py-1 text-xs text-[var(--muted-foreground)]",children:"Waiting for the run to start..."})})]})}function es({issue:e,selected:s,onSelect:a,onExecute:n}){let[o,l]=(0,r.useState)(!1),d=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>{d.current&&window.clearTimeout(d.current)},[]);let c=(0,r.useCallback)(async t=>{if(t.stopPropagation(),e.url)try{await navigator.clipboard.writeText(e.url),l(!0),d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{l(!1)},1500)}catch(e){console.error("Failed to copy Linear issue URL:",e),l(!1)}},[e.url]),p=V[e.status]??e.status.slice(0,6);return(0,t.jsxs)("div",{className:`group relative flex cursor-pointer items-center gap-3 px-4 py-2.5 text-sm transition-colors ${s?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]/50"}`,onClick:a,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),a())},children:[s&&(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[3px] rounded-r-full bg-blue-500"}),(0,t.jsx)("span",{className:"w-24 shrink-0 whitespace-nowrap font-mono text-xs text-[var(--muted-foreground)]",children:e.identifier}),(0,t.jsx)("span",{className:`min-w-0 flex-1 truncate text-xs ${s?"font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:e.title}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-[var(--muted-foreground)]",children:p}),(0,t.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${s?"opacity-100":"opacity-0 group-hover:opacity-100"} ${e.url?"":"cursor-not-allowed opacity-40 hover:bg-transparent hover:text-[var(--muted-foreground)]"}`,onClick:e=>{c(e)},title:o?"Copied ticket URL":"Copy ticket URL","aria-label":o?"Copied ticket URL":"Copy ticket URL",disabled:!e.url,children:o?(0,t.jsx)(i.Check,{size:10,className:"text-emerald-400"}):(0,t.jsx)(u,{size:10})}),(0,t.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${s?"opacity-100":"opacity-0 group-hover:opacity-100"}`,onClick:t=>{t.stopPropagation(),n(e,t)},title:"Execute with agent",children:(0,t.jsx)(m.Play,{size:10,className:"ml-0.5"})})]})}function ea({projectId:e,projectSlug:s,initialShowSettings:a}){let{connected:n,loading:i,user:o,clis:l,mcpConfigured:c,connect:u,connectWithKey:f,disconnect:h,configureMcp:w}=function(){let[e,t]=(0,r.useState)(!1),[s,a]=(0,r.useState)(!0),[n,i]=(0,r.useState)(null),[o,l]=(0,r.useState)({claude:!1,codex:!1,gemini:!1}),[d,c]=(0,r.useState)({}),u=(0,r.useRef)(null),m=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/linear/mcp-setup"),t=await e.json();c(t.configured??{})}catch{}},[]),p=(0,r.useCallback)(async()=>{try{let[e,r]=await Promise.all([fetch("/api/linear/status"),fetch("/api/linear/mcp-setup")]),s=await e.json(),a=await r.json();return t(s.connected),i(s.user??null),l(s.clis??{claude:!1,codex:!1,gemini:!1}),c(a.configured??{}),s.connected}catch{return t(!1),!1}finally{a(!1)}},[]);(0,r.useEffect)(()=>(p(),()=>{u.current&&clearInterval(u.current)}),[p]);let x=(0,r.useCallback)(()=>{window.open("/api/linear/auth","_blank","noopener"),u.current&&clearInterval(u.current),u.current=setInterval(async()=>{await p()&&u.current&&(clearInterval(u.current),u.current=null)},2e3)},[p]),g=(0,r.useCallback)(async e=>{try{let t=await fetch("/api/linear/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:e})});if(!t.ok){let e=await t.json().catch(()=>({}));return{ok:!1,error:e.error||"Failed to save token"}}return await p(),{ok:!0}}catch{return{ok:!1,error:"Failed to connect"}}},[p]);return{connected:e,loading:s,user:n,clis:o,mcpConfigured:d,connect:x,connectWithKey:g,disconnect:(0,r.useCallback)(async()=>{await fetch("/api/linear/status",{method:"DELETE"}),t(!1),i(null)},[]),configureMcp:(0,r.useCallback)(async e=>{try{let t=await fetch("/api/linear/mcp-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cli:e})});if(!t.ok){let e=await t.json().catch(()=>({}));return{ok:!1,error:e.error||"Failed to configure MCP"}}return await m(),{ok:!0}}catch{return{ok:!1,error:"Failed to configure MCP"}}},[m]),refresh:p}}(),[k,N]=(0,r.useState)(!1),[S,I]=(0,r.useState)(a??!1),[C,E]=(0,r.useState)(!1),[$,L]=(0,r.useState)(()=>(0,U.loadLinearTicketPanelWidth)()||576),[A,O]=(0,r.useState)(()=>(0,U.loadLinearRunsPanelWidth)()||224),[F,q]=(0,r.useState)(""),[W,K]=(0,r.useState)(""),[B,V]=(0,r.useState)(!1),[Y,Z]=(0,r.useState)([]),[ea,en]=(0,r.useState)([]),[ei,eo]=(0,r.useState)([]),[el,ed]=(0,r.useState)([]),[ec,eu]=(0,r.useState)([]),[em,ep]=(0,r.useState)([]),[ex,eg]=(0,r.useState)(""),[ef,eh]=(0,r.useState)(""),[ev,eb]=(0,r.useState)(null),[ej,ey]=(0,r.useState)(null),[ew,ek]=(0,r.useState)([]),[eN,eS]=(0,r.useState)(null),[eI,eC]=(0,r.useState)(null),eE=(0,r.useRef)(null),e$=(0,r.useRef)(!0),eR=(0,r.useRef)(null),eL=(0,r.useRef)(null),eA=(0,r.useCallback)(e=>{q(e),eE.current&&clearTimeout(eE.current),eE.current=setTimeout(()=>K(e),300)},[]);(0,r.useEffect)(()=>()=>{eE.current&&clearTimeout(eE.current)},[]),(0,r.useEffect)(()=>{let e=function(e){if(!M())return{...P};let t=window.localStorage.getItem(z(e));if(!t)return{...P};try{let e=JSON.parse(t);return{search:"string"==typeof e.search?e.search:P.search,assigneeIds:T(e.assigneeIds),statuses:T(e.statuses),teamId:"string"==typeof e.teamId?e.teamId:P.teamId,cycleId:"string"==typeof e.cycleId?e.cycleId:P.cycleId}}catch{return{...P}}}(s);e$.current=!0,q(e.search),K(e.search),ed(e.assigneeIds),eu(e.statuses),eh(e.teamId),eg(e.cycleId)},[s]),(0,r.useEffect)(()=>{if(e$.current){e$.current=!1;return}var e=F,t=el,r=ec,a=ef,n=ex;if(M())try{window.localStorage.setItem(z(s),JSON.stringify({search:e,assigneeIds:T(t),statuses:T(r),teamId:String(a||""),cycleId:String(n||"")}))}catch{}},[s,F,el,ec,ef,ex]),(0,r.useEffect)(()=>{if(!n)return;let e=!1;V(!1);let t=new URLSearchParams;return s&&t.set("projectSlug",s),fetch(t.size>0?`/api/linear/options?${t.toString()}`:"/api/linear/options").then(e=>e.json()).then(t=>{e||(Z(Array.isArray(t.assignees)?t.assignees:[]),en(Array.isArray(t.statuses)?t.statuses:[]),eo(Array.isArray(t.teams)?t.teams:[]),ep(Array.isArray(t.cycles)?t.cycles:[]),V(!0))}).catch(()=>{e||(Z([]),en([]),eo([]),ep([]),V(!0))}),()=>{e=!0}},[n,s]),(0,r.useEffect)(()=>{if(!B)return;let e=el.filter(e=>Y.some(t=>t.id===e));e.length!==el.length&&ed(e)},[Y,B,el]),(0,r.useEffect)(()=>{if(!B)return;let e=ec.filter(e=>ea.includes(e));e.length!==ec.length&&eu(e)},[B,ec,ea]),(0,r.useEffect)(()=>{if(B){if(ei.length<=1&&ef)return void eh("");ef&&!ei.some(e=>e.id===ef)&&eh("")}},[B,ef,ei]),(0,r.useEffect)(()=>{B&&ex&&!em.some(e=>e.id===ex)&&eg("")},[em,B,ex]);let{issues:eP,loading:eM,hasMore:eT,loadMore:ez,refresh:eU}=function(e,t=!0,s={}){let[a,n]=(0,r.useState)([]),[i,o]=(0,r.useState)(!0),[l,d]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),m=(0,r.useRef)(l),p=(0,r.useRef)(!1);m.current=l,(0,r.useEffect)(()=>{p.current=!1},[s.projectSlug]);let x=(0,r.useCallback)(async(r,a=!1)=>{if(t){o(!0);try{let t=new URLSearchParams;if(e.teamId&&t.set("teamId",e.teamId),e.statuses?.length)for(let r of e.statuses)t.append("status",r);if(e.search&&t.set("search",e.search),e.assigneeIds?.length)for(let r of e.assigneeIds)t.append("assigneeId",r);else e.assignedToMe&&t.set("assignedToMe","true");e.cycleId&&t.set("cycleId",e.cycleId),r&&m.current&&t.set("cursor",m.current),s.projectSlug&&t.set("projectSlug",s.projectSlug),s.limit&&t.set("limit",String(s.limit)),a&&t.set("refresh","true");let i=await fetch(`/api/linear/issues?${t.toString()}`),o=await i.json(),l=o.issues??[];n(e=>r?[...e,...l]:l),d(o.pageInfo?.endCursor??null),u(o.pageInfo?.hasNextPage??!1),p.current=!0}catch{r||n([])}finally{o(!1)}}},[e.teamId,e.statuses,e.search,e.assigneeIds,e.assignedToMe,e.cycleId,t,s.projectSlug,s.limit]);return(0,r.useEffect)(()=>{d(null),x(!1,!p.current)},[x]),{issues:a,loading:i,hasMore:c,loadMore:(0,r.useCallback)(()=>x(!0),[x]),refresh:(0,r.useCallback)(()=>(d(null),x(!1,!0)),[x])}}((0,r.useMemo)(()=>({search:W||void 0,statuses:ec.length>0&&ec.length<ea.length?ec:void 0,assigneeIds:el.length>0?el:void 0,teamId:ef||void 0,cycleId:ex||void 0}),[W,el,ex,ec,ef,ea.length]),n,{projectSlug:s}),{runs:eO,loading:eF,createRun:eD,updateRun:e_}=function(e,t){let[s,a]=(0,r.useState)([]),[n,i]=(0,r.useState)(!1),o=(0,r.useRef)(e??null);o.current=e??null;let l=(0,r.useCallback)(async()=>{let e=o.current?.trim();if(!e)return a([]),[];i(!0);try{let r=new URLSearchParams({issueId:e});t&&r.set("projectId",t);let s=await fetch(`/api/linear/runs?${r.toString()}`);if(!s.ok)throw Error(`Failed to fetch Linear runs: ${s.status}`);let n=await s.json(),i=Array.isArray(n.runs)?n.runs:[];return a(i),i}finally{i(!1)}},[t]);return(0,r.useEffect)(()=>{a([]),l()},[l,e]),(0,r.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>{l()},3e3);return()=>window.clearInterval(t)},[e,l]),{runs:s,loading:n,refresh:l,createRun:(0,r.useCallback)(async e=>{let t=await fetch("/api/linear/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||`Failed to create Linear run: ${t.status}`);let r=(await t.json()).run;return a(e=>[r,...e.filter(e=>e.id!==r.id)]),r},[]),updateRun:(0,r.useCallback)(async(e,t)=>{let r=await fetch(`/api/linear/runs/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok)throw Error((await r.json().catch(()=>({}))).error||`Failed to update Linear run: ${r.status}`);let s=(await r.json()).run;return a(e=>e.map(e=>e.id===s.id?s:e)),s},[])}}(ev?.id,e??null),{scripts:eq,activeScriptId:eW,activeScript:eK,setActiveScriptId:eJ,saveScript:eB,deleteScript:eG}=function(e){let[t,s]=(0,r.useState)([]),[a,n]=(0,r.useState)(null);(0,r.useEffect)(()=>{let t=function(e){if(!b())return{...v};let t=window.localStorage.getItem(y(e));if(!t)return{...v};try{return j(JSON.parse(t))}catch{return{...v}}}(e);s(t.scripts),n(t.activeScriptId)},[e]);let i=(0,r.useCallback)((t,r)=>{s(t),n(r);if(b())try{let s=j({scripts:t,activeScriptId:r});window.localStorage.setItem(y(e),JSON.stringify(s))}catch{}},[e]),o=(0,r.useCallback)(e=>{let r=e&&t.some(t=>t.id===e)?e:null;i(t,r)},[i,t]),l=(0,r.useCallback)(e=>{let r=new Date().toISOString(),s=e.name.trim(),a=e.prompt.trim();if(!s||!a)throw Error("Run script name and prompt are required.");let n=e.id?t.find(t=>t.id===e.id):null,o=n?{...n,name:s,prompt:a,updatedAt:r}:{id:crypto.randomUUID(),name:s,prompt:a,createdAt:r,updatedAt:r};return i([...n?t.map(e=>e.id===n.id?o:e):[o,...t]].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),o.id),o},[i,t]),d=(0,r.useCallback)(e=>{i(t.filter(t=>t.id!==e),a===e?null:a)},[a,i,t]),c=(0,r.useMemo)(()=>t.find(e=>e.id===a)??null,[a,t]);return{scripts:t,activeScriptId:a,activeScript:c,setActiveScriptId:o,saveScript:l,deleteScript:d}}(s),eX=eO.find(e=>e.id===ej)??null,eH=(0,r.useMemo)(()=>Y.map(e=>({value:e.id,label:e.name})),[Y]),eV=(0,r.useMemo)(()=>ea.map(e=>({value:e,label:e})),[ea]),eY=(0,r.useMemo)(()=>[{value:"",label:"Workspace"},...ei.map(e=>({value:e.id,label:e.name}))],[ei]),eZ=(0,r.useMemo)(()=>[{value:"",label:"Cycle"},...em.map(e=>({value:e.id,label:e.name||`Cycle ${e.number}`}))],[em]),eQ=eV.length>0,e0=eZ.length>1,e1=eY.length>2,e5=eK?.name??"AGX default";(0,r.useEffect)(()=>{0===eP.length?eb(null):eb(e=>e&&eP.some(t=>t.id===e.id)?eP.find(t=>t.id===e.id)??e:eP[0]??null)},[eP]),(0,r.useEffect)(()=>{0===eO.length?ey(null):ej&&eO.some(e=>e.id===ej)||ey(eO[0]?.id??null)},[eO,ej]),(0,r.useEffect)(()=>{let t=!1;return async function(){try{let r=await fetch("/api/participants"),s=r.ok?await r.json():[];if(!e){t||ek(s);return}let a=await fetch(`/api/projects/${encodeURIComponent(e)}/agents`);if(!a.ok){t||ek(s);return}let n=await a.json(),i=Array.isArray(n.agents)?n.agents.map(e=>e.agent_id).filter(e=>"string"==typeof e&&e.trim().length>0):[],o=new Map(i.map((e,t)=>[e,t])),l=s.filter(e=>o.has(e.id)).sort((e,t)=>(o.get(e.id)??Number.MAX_SAFE_INTEGER)-(o.get(t.id)??Number.MAX_SAFE_INTEGER));t||ek(l)}catch{t||ek([])}}(),()=>{t=!0}},[e]),(0,r.useEffect)(()=>{if(!C)return;let e=e=>{let t=e.target;eL.current?.contains(t)||eR.current?.contains(t)||E(!1)},t=e=>{"Escape"===e.key&&E(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[C]);let e2=(0,r.useCallback)((e,t)=>{if(E(!1),0===ew.length)return void window.alert("Add at least one agent to this project before running a Linear ticket.");if(1===ew.length)return void e3(e,ew[0]);let r=t?.currentTarget?.getBoundingClientRect();eS(e),eC(r?{top:r.bottom+4,left:r.left}:{top:200,left:200})},[ew]),e3=(0,r.useCallback)(async(t,r)=>{eS(null),eC(null);let a=null;try{var n;let i,o;eb(t),a=await eD({projectId:e??null,projectSlug:s??null,issueId:t.id,issueIdentifier:t.identifier,issueTitle:t.title,issueStatus:t.status,issueAssignee:t.assignee,agentId:r.id,agentName:r.name}),ey(a.id);let l={issue:{identifier:t.identifier,title:t.title,status:t.status,assignee:t.assignee},project:s?{slug:s}:null},{prompt:d,promptPrefix:c}=D(l),u=eK&&(n=eK.prompt,o={"ticket.identifier":(i=_(l)).issue.identifier,"ticket.title":i.issue.title,"ticket.status":i.issue.status,"ticket.assignee":i.issue.assignee,"project.name":i.project.name,"project.slug":i.project.slug,"project.label":i.project.label,"knowledge_base.root":i.runtime.knowledgeBaseRoot,"knowledge_base.issue_path":i.runtime.issueKnowledgePath,"worktree.path":i.runtime.isolatedWorktreePath},n.replace(/\{\{\s*([a-zA-Z0-9._-]+)\s*\}\}/g,(e,t)=>o[t]??"")).trim()||d,m=eK?`${c}ACTIVE RUN SCRIPT
|
|
38
|
+
- Name: ${eK.name}
|
|
39
|
+
|
|
40
|
+
`:c,p=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:u,promptPrefix:m,threadId:a.threadId,activeParticipantIds:[r.id],projectSlug:s??void 0})}),x=await p.json().catch(()=>({}));if(!p.ok||!x.chatRunId||!x.userMessageId)throw Error(x.error||"Failed to start Linear run");await e_(a.id,{chatRunId:x.chatRunId,rootMessageId:x.userMessageId})}catch(e){console.error("Failed to execute Linear ticket:",e),a&&await e_(a.id,{status:"failed",error:e instanceof Error?e.message:String(e)}),e instanceof Error&&window.alert(e.message)}},[eK,eD,e,s,e_]),e4=(0,r.useRef)(null);if((0,r.useEffect)(()=>{let e=e4.current;if(!e||!eT)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&ez()},{threshold:.1});return t.observe(e),()=>t.disconnect()},[eT,ez]),i)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Loading..."});let e7=n&&!k&&!Object.values(c).some(Boolean);return!n||e7?(0,t.jsx)(J,{connected:n,user:o,clis:l,mcpConfigured:c,onConnect:u,onConnectWithKey:f,onDisconnect:h,onConfigureMcp:w,onContinue:()=>N(!0)}):(0,t.jsxs)("div",{className:"relative flex h-full overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:$},children:[(0,t.jsxs)("div",{className:"shrink-0 border-b border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"flex h-12 items-center gap-2 px-3",children:[(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-2 rounded-md border border-[var(--card-border)] bg-[var(--background)] px-2.5 py-1.5 transition-all focus-within:border-[var(--muted-foreground)] focus-within:ring-1 focus-within:ring-[var(--muted-foreground)]",children:[(0,t.jsx)(x.Search,{size:14,className:"shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("input",{type:"text",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--muted-foreground)]",placeholder:"Search tickets...",value:F,onChange:e=>eA(e.target.value)})]}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>void eU(),title:"Refresh tickets","aria-label":"Refresh tickets",disabled:eM,children:(0,t.jsx)(p.RefreshCw,{size:16,className:eM?"animate-spin":void 0})}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>{E(!1),I(!0)},title:"Linear settings",children:(0,t.jsx)(g.Settings,{size:16})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 pb-2",children:[eQ?(0,t.jsx)(ee,{label:"Status",values:ec,options:eV,activeClasses:"border-amber-500/30 bg-amber-500/10 text-amber-300",onChange:eu,emptyLabel:"All statuses"}):null,(0,t.jsx)(ee,{label:"Assignee",values:el,options:eH,activeClasses:"border-blue-500/30 bg-blue-500/10 text-blue-400",onChange:ed,emptyLabel:"All assignees"}),e1?(0,t.jsx)(Q,{label:"Workspace",value:ef,options:eY,activeClasses:"border-emerald-500/30 bg-emerald-500/10 text-emerald-400",onChange:eh}):null,e0?(0,t.jsx)(Q,{label:"Cycle",value:ex,options:eZ,activeClasses:"border-purple-500/30 bg-purple-500/10 text-purple-400",onChange:eg}):null]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:eM&&0===eP.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading tickets..."}):0===eP.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No tickets found."}):(0,t.jsxs)(t.Fragment,{children:[eP.map(e=>(0,t.jsx)(es,{issue:e,selected:ev?.id===e.id,onSelect:()=>eb(e),onExecute:e2},e.id)),eT?(0,t.jsx)("div",{ref:e4,className:"py-2 text-center text-xs text-[var(--muted-foreground)]",children:eM?"Loading...":"Load more"}):null]})})]}),(0,t.jsx)(G,{onResize:e=>L(t=>{let r=Math.max(180,Math.min(600,t+e));return(0,U.persistLinearTicketPanelWidth)(r),r})}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:A},children:[(0,t.jsxs)("div",{className:"relative flex items-center justify-between border-b border-[var(--card-border)] px-3 py-2",children:[(0,t.jsx)("h3",{className:"text-xs font-semibold text-[var(--foreground)]",children:"Runs"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)("button",{ref:eR,type:"button",className:`flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-colors ${C?"bg-[var(--card-bg)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]"}`,onClick:()=>E(e=>!e),title:`Run script: ${e5}`,children:[(0,t.jsx)(d.FileText,{size:10}),(0,t.jsx)("span",{className:"max-w-[88px] truncate",children:e5})]}),ev&&(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:e=>e2(ev,e),title:"Run agent on selected ticket",children:[(0,t.jsx)(m.Play,{size:10}),(0,t.jsx)("span",{children:"Run now"})]})]}),C?(0,t.jsx)("div",{ref:eL,className:"absolute right-3 top-full z-20 mt-2 max-h-[80vh] overflow-y-auto rounded-2xl border border-[var(--card-border)] bg-[var(--background)] p-4 shadow-2xl",style:{width:"min(760px, calc(100vw - 32px))"},children:(0,t.jsx)(R,{projectSlug:s,scripts:eq,activeScriptId:eW,onSetActiveScriptId:eJ,onSaveScript:eB,onDeleteScript:eG})}):null]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:ev?eF&&0===eO.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading runs..."}):0===eO.length?(0,t.jsxs)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:["No runs yet. Click ",(0,t.jsx)(m.Play,{size:10,className:"inline"})," to execute."]}):eO.map(e=>(0,t.jsxs)("button",{type:"button",className:`w-full px-3 py-2 text-left text-xs transition-colors ${eX?.id===e.id?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]"}`,onClick:()=>ey(e.id),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,t.jsx)("span",{className:`font-medium ${{queued:"text-amber-500",running:"text-yellow-500",success:"text-green-500",failed:"text-red-500",cancelled:"text-[var(--muted-foreground)]"}[e.status]}`,children:H(e.status)}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(e.startedAt).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),(0,t.jsx)("div",{className:"mt-0.5 truncate text-[10px] text-[var(--muted-foreground)]",children:e.agentName}),null!=e.durationMs?(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null]},e.id)):(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Select a ticket to see runs."})})]}),(0,t.jsx)(G,{onResize:e=>O(t=>{let r=Math.max(140,Math.min(500,t+e));return(0,U.persistLinearRunsPanelWidth)(r),r})}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:eX?(0,t.jsx)(er,{run:eX,participants:ew}):ev&&ew.length>0?(0,t.jsx)(et,{issue:ev,participants:ew,projectId:e,projectSlug:s,createRun:eD,updateRun:e_,onRunCreated:e=>ey(e)},ev.id):(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:ev?"Add at least one agent to this project to chat.":"Select a ticket from the list."})}),S&&(0,t.jsx)("div",{className:"absolute inset-0 z-30 flex items-center justify-center bg-black/50",children:(0,t.jsxs)("div",{className:"relative w-full max-w-lg rounded-lg border border-[var(--card-border)] bg-[var(--background)] shadow-xl",children:[(0,t.jsx)("button",{type:"button",className:"absolute right-3 top-3 rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>I(!1),children:"×"}),(0,t.jsx)("div",{className:"max-h-[80vh] overflow-y-auto p-6",children:(0,t.jsx)(J,{connected:n,user:o,clis:l,mcpConfigured:c,onConnect:u,onConnectWithKey:f,onDisconnect:h,onConfigureMcp:w,onContinue:()=>I(!1)})})]})}),eN&&eI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>{eS(null),eC(null)}}),(0,t.jsxs)("div",{className:"fixed z-50 min-w-[180px] rounded border border-[var(--card-border)] bg-[var(--card-bg)] py-1 shadow-lg",style:{top:eI.top,left:eI.left},children:[(0,t.jsx)("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Pick an agent"}),ew.map(e=>(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors hover:bg-[var(--card-bg)]",onClick:()=>void e3(eN,e),children:[(0,t.jsx)("img",{src:X(e.id,e.color,20),alt:"",className:"h-5 w-5 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:e.name}),e.title?(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:e.title}):null]})]},e.id))]})]})]})}function en({params:e}){let{slug:n}=(0,r.use)(e),i=(0,s.useSearchParams)(),{projects:o}=(0,a.useProjects)(),l=o.find(e=>e.slug===n),d="true"===i.get("settings");return(0,t.jsx)(ea,{projectId:l?.id,projectSlug:l?.slug??n,initialShowSettings:d})}e.s(["default",()=>en],515247)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63209,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},761911,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",()=>t],761911)},686311,e=>{"use strict";let t=(0,e.i(475254).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],686311)},895214,e=>{e.n(e.i(391560))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,555436,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],555436)},778917,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],778917)},239616,815273,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>t],239616);let r="agx:windowState",a={workspaceWidth:260,logPanelHeight:200,workspaceVisible:!0,logPanelVisible:!1,linearTicketPanelWidth:576,linearRunsPanelWidth:224},s={lastThreadId:null,lastWorkspaceId:null},o={bounds:null,sidebar:a,scroll:s};function i(){return void 0!==window.localStorage}function n(){if(!i())return{...o};let e=window.localStorage.getItem(r);if(!e)return{...o};try{let t=JSON.parse(e);return{bounds:t.bounds||null,sidebar:{...a,...t.sidebar||{}},scroll:{...s,...t.scroll||{}}}}catch{return{...o}}}function l(){return n().sidebar}function d(e){let t=n();t.sidebar={...t.sidebar,...e};if(i())try{window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function c(){return l().workspaceWidth}function p(e){d({workspaceWidth:e})}function u(){return l().linearTicketPanelWidth}function m(e){d({linearTicketPanelWidth:e})}function h(){return l().linearRunsPanelWidth}function x(e){d({linearRunsPanelWidth:e})}e.s(["loadLinearRunsPanelWidth",()=>h,"loadLinearTicketPanelWidth",()=>u,"loadWorkspaceWidth",()=>c,"persistLinearRunsPanelWidth",()=>x,"persistLinearTicketPanelWidth",()=>m,"persistWorkspaceWidth",()=>p],815273)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},274049,e=>{"use strict";var t=e.i(271645);function r(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!1),[o,i]=(0,t.useState)(null),n=(0,t.useCallback)(async()=>{s(!0);try{let e=await fetch("/api/projects");if(!e.ok)throw Error("Failed to fetch projects");let t=await e.json();r(t.projects??[]),i(null)}catch(e){i(e instanceof Error?e:Error("Unknown error"))}finally{s(!1)}},[]);(0,t.useEffect)(()=>{n()},[n]);let l=(0,t.useCallback)(async e=>{let t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to create project");let a=(await t.json()).project;return r(e=>[a,...e]),a},[]);return{projects:e,isLoading:a,error:o,refetch:n,createProject:l,updateProject:(0,t.useCallback)(async(e,t)=>{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to update project");let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?s:t)),s},[]),deleteProject:(0,t.useCallback)(async e=>{let t=await fetch(`/api/projects/${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to delete project");r(t=>t.filter(t=>t.id!==e))},[])}}function a(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!0),o=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/projects");if(!e.ok)return;let{projects:t}=await e.json(),a=await Promise.all((t??[]).map(async e=>{let t=[],r=[];try{let[a,s]=await Promise.all([fetch(`/api/projects/${e.id}/agents`),fetch(`/api/projects/${e.id}/threads`)]);a.ok&&(t=(await a.json()).agents??[]),s.ok&&(r=((await s.json()).threads??[]).map(e=>e.thread_id))}catch{}return{...e,repos:e.repos??[],agents:t.map(t=>({project_id:e.id,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at})),thread_ids:r,workspace_ids:r}}));r(a)}catch{}finally{s(!1)}},[]);(0,t.useEffect)(()=>{o()},[o]);let i=(0,t.useCallback)(async(e,t)=>{try{let a="string"==typeof e?{name:e}:e,s=a.name.trim(),o=(a.slug||s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")).trim(),i=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,name:s,slug:o})});if(!i.ok)return null;let{project:n}=await i.json(),l=Array.isArray(t)?t:t?[t]:[];for(let e of l)await fetch(`/api/projects/${n.id}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e})}).catch(()=>{});let d={...n,repos:n.repos??[],agents:[],thread_ids:l,workspace_ids:l};return r(e=>[...e,d].sort((e,t)=>e.name.localeCompare(t.name))),d}catch{return null}},[]),n=(0,t.useCallback)(async(e,t)=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})})).ok)return;r(r=>r.map(r=>r.id===e?{...r,name:t}:r).sort((e,t)=>e.name.localeCompare(t.name)))}catch{}},[]),l=(0,t.useCallback)(async e=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"DELETE"})).ok)return;r(t=>t.filter(t=>t.id!==e))}catch{}},[]),d=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||"Failed to update project")}let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?{...t,...s,repos:s.repos??t.repos}:t)),s}catch{return null}},[]),c=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),p=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents?agentId=${t}`,{method:"DELETE"});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]);return{projects:e,isLoading:a,createProject:i,updateProject:d,renameProject:n,deleteProject:l,addAgent:c,removeAgent:p,reorderAgents:(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedAgentIds:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),moveAgent:(0,t.useCallback)(async(e,t,r)=>{try{await fetch(`/api/projects/${t}/agents?agentId=${e}`,{method:"DELETE"}),await fetch(`/api/projects/${r}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e})}),await o()}catch{}},[o]),refresh:o}}e.s(["useProjects",()=>r,"useProjectsWithAgents",()=>a])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],727612)},690272,e=>{"use strict";let t=(0,e.i(475254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],690272)},327025,e=>{"use strict";let t=(0,e.i(475254).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",()=>t],327025)},869014,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a({initialPath:e,onSelect:a,onCancel:s}){let[o,i]=(0,r.useState)(e||""),[n,l]=(0,r.useState)(null),[d,c]=(0,r.useState)(!1),[p,u]=(0,r.useState)(null),m=(0,r.useRef)(null),h=(0,r.useCallback)(async e=>{c(!0),u(null);try{let t=e?`?path=${encodeURIComponent(e)}`:"",r=await fetch(`/api/filesystem/browse${t}`),a=await r.json();if(!r.ok)return void u(a.error||"Failed to browse");l(a),i(a.current),m.current?.scrollTo(0,0)}catch{u("Failed to connect")}finally{c(!1)}},[]);return(0,r.useEffect)(()=>{h(e||"")},[]),(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] overflow-hidden shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,t.jsx)("input",{value:o,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&h(o)},className:"input text-xs flex-1 py-1",placeholder:"Enter path..."}),(0,t.jsx)("button",{type:"button",onClick:()=>h(o),className:"text-[10px] font-bold uppercase tracking-wider text-[var(--primary)] hover:underline px-2 py-1 shrink-0",children:"Go"})]}),(0,t.jsxs)("div",{ref:m,className:"max-h-48 overflow-y-auto",children:[d&&(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)] text-center",children:"Loading..."}),p&&(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--destructive)] text-center",children:p}),!d&&n&&(0,t.jsxs)("div",{className:"py-1",children:[n.parent&&(0,t.jsxs)("button",{type:"button",onClick:()=>h(n.parent),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"↑"}),(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:".."})]}),0===n.dirs.length&&!n.parent&&(0,t.jsx)("div",{className:"px-3 py-3 text-xs text-[var(--muted-foreground)] text-center",children:"No subdirectories"}),n.dirs.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>h(e.path),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"📁"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.path))]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] truncate max-w-[60%]",children:n?.current||o}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs font-medium text-[var(--muted-foreground)] hover:underline px-2 py-1",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>a(n?.current||o),className:"text-xs font-bold text-[var(--primary)] hover:underline px-2 py-1",children:"Select"})]})]})]})}e.s(["default",()=>a])},268542,154238,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(174080),s=e.i(664659),o=e.i(463059),i=e.i(88081),n=e.i(39312),l=e.i(327025),d=e.i(690272);let c=(0,e.i(475254).default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var p=e.i(788699),u=e.i(107233),m=e.i(555436),h=e.i(727612),x=e.i(37727),g=e.i(778917),f=e.i(239616),b=e.i(522016),v=e.i(325459),j=e.i(811132);function y({threads:e,participants:y=[],activeThreadId:w,isLoading:k,isCreating:N,onSelectThread:_,onCreateThread:C,onRenameThread:S,onDeleteThread:P,deletingThreadId:I=null,renamingThreadId:E=null,activeParticipantIds:T=[],onToggleParticipantActive:$,visible:z=!1,isRestoringActiveThread:A=!1,onToggle:F,onSearch:L,projects:D=[],onCreateProject:M,onUpdateProject:W,onDeleteProject:O,onAddAgentToProject:R,onRemoveAgentFromProject:K,onAddAgentViaForm:V,onReorderProjectAgents:B,onUpdateParticipant:H,onSelectProject:J,activeProjectId:U=null,activeProjectView:q=null,width:X,onWidthChange:G}){let Y,Z,Q=(0,r.useRef)(!1);(0,r.useRef)(0);let ee=(0,r.useRef)(null),[et,er]=(0,r.useState)(!1),[ea,es]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{if(ea.size>0||!D?.length)return;let e=D.find(e=>window.location.pathname.includes(`/projects/${e.slug}`));es(new Set([e?.id??D[0].id]))},[D]);let[eo,ei]=(0,r.useState)(null),[en,el]=(0,r.useState)(new Set),[ed,ec]=(0,r.useState)(!1),[ep,eu]=(0,r.useState)(null),[em,eh]=(0,r.useState)(null),ex=(0,j.useProjectFormState)(),[eg,ef]=(0,r.useState)(null),eb=(0,r.useCallback)(e=>{e&&(e.focus(),e.select())},[]),[ev,ej]=(0,r.useState)(null),[ey,ew]=(0,r.useState)(null),ek=ey?y.find(e=>e.id===ey)??null:null,[eN,e_]=(0,r.useState)(null),[eC,eS]=(0,r.useState)(null),eP=async()=>{if(!ep&&!em)return;if(!ex.form.name.trim())return void ex.setFormError("Project name is required");let e=ex.repos.find(e=>e.name.trim()&&!e.path.trim());if(e)return void ex.setFormError(`Local path is required for folder "${e.name}"`);ex.setFormError(null),ex.setIsSubmitting(!0);let t=(0,j.createProjectPayload)(ex.form,ex.repos);em?await W?.(em.id,t):await M?.(t,ep?.threadId),ex.setIsSubmitting(!1),eu(null),eh(null)},eI=async e=>{ex.resetForm();try{let t=await fetch(`/api/projects/${e}`);if(!t.ok)throw Error("Failed to load project");let r=(await t.json()).project;eh(r),ex.hydrateFromProject(r)}catch(e){console.error("Failed to load project settings",e)}};(0,r.useEffect)(()=>{er(!0)},[]),(0,r.useEffect)(()=>{let e=!1;async function t(){if(eN?.repoId)try{let t=await fetch(`/api/knowledge-notes?scope=repo&subjectId=${encodeURIComponent(eN.repoId)}`),r=(t.ok?await t.json():{note:null}).note;e||e_(e=>e&&e.repoId===eN.repoId?{...e,generatedKnowledge:r?.content?[{id:r.id,content:r.content,created_at:r.updatedAt??r.createdAt}]:[],isLoadingKnowledge:!1}:e)}catch{e||e_(e=>e&&e.repoId===eN.repoId?{...e,generatedKnowledge:[],isLoadingKnowledge:!1}:e)}}return eN?.repoId&&t(),()=>{e=!0}},[eN?.repoId]);let eE=e=>{V?V(e):(el(new Set),ei({projectId:e}))},eT=eo?D.find(e=>e.id===eo.projectId):null,e$=new Set(eT?.agents.map(e=>e.agent_id)??[]),ez=eo?y.filter(e=>!e$.has(e.id)):[],eA=e.length>0,eF=!!z,eL=[...e].sort((e,t)=>(e.title??"").localeCompare(t.title??"")),eD=new Map(e.map(e=>[e.id,e])),eM=D.filter(e=>!e.is_default),eW=eL.filter(e=>!eM.some(t=>t.thread_ids?.includes(e.id)));!function({focusTarget:e,shouldFocus:t}){(0,r.useEffect)(()=>{if(!t||"u"<typeof document)return;let r=e.current;if(!r||r instanceof HTMLButtonElement&&r.disabled)return;let a=document.activeElement;if(!(a&&(r===a||r.contains(a))))try{r.focus({preventScroll:!0})}catch{r.focus()}},[e,t])}({focusTarget:ee,shouldFocus:eF&&!(k&&!eA||A&&eA)&&!eA&&!N});let eO=()=>{ef({title:"Create chat",placeholder:"Chat title",defaultValue:"",onSubmit:e=>void C({title:e})})};return eF?(0,t.jsxs)("aside",{id:"workspace-sidebar",className:"workspace-sidebar","aria-label":"Workspace sidebar","aria-busy":k?"true":void 0,style:X?{width:`${X}px`,minWidth:`${X}px`}:void 0,children:[(0,t.jsxs)("div",{className:"workspace-sidebar__brand",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__brand-content flex items-center gap-2 px-1",children:[(0,t.jsx)("div",{className:"workspace-sidebar__brand-icon","aria-hidden":"true",children:(0,t.jsx)("span",{className:"text-[10px]",children:"AGX"})}),(0,t.jsx)("span",{className:"workspace-sidebar__brand-title",children:"Workspace"})]}),F&&(0,t.jsx)("button",{type:"button",onClick:F,"aria-label":"Hide chats",title:"Hide chats",className:"workspace-sidebar__brand-toggle ml-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--app-shell-soft-text)] transition-all hover:bg-[var(--app-shell-subtle)] hover:text-[var(--foreground)]",children:(0,t.jsx)(c,{className:"h-4 w-4",strokeWidth:1.75})})]}),(0,t.jsxs)("div",{className:"workspace-sidebar__content",children:[L&&(0,t.jsx)("div",{className:"px-3 pt-2 pb-1",children:(0,t.jsxs)("button",{type:"button",onClick:L,className:"flex h-8 w-full items-center gap-2 rounded-lg border border-[var(--app-shell-border)] bg-[var(--app-shell-elevated)] px-2.5 text-xs text-[var(--app-shell-soft-text)] transition-all hover:border-[var(--app-shell-border-strong)] hover:text-[var(--app-shell-muted)]",children:[(0,t.jsx)(m.Search,{className:"h-3.5 w-3.5 shrink-0",strokeWidth:1.75}),(0,t.jsx)("span",{children:"Search..."}),(0,t.jsx)("kbd",{className:"ml-auto rounded border border-[var(--app-shell-border)] bg-[var(--app-shell-subtle)] px-1 py-0.5 font-sans text-[10px] font-medium text-[var(--app-shell-soft-text)]",children:"⌘K"})]})}),(0,t.jsxs)("nav",{className:"workspace-sidebar__section",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__section-header group/projects-header",children:[(0,t.jsx)("p",{className:"workspace-sidebar__section-label",children:"Projects"}),(0,t.jsx)("div",{className:"workspace-sidebar__header-actions",children:(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/projects-header:opacity-100",onClick:()=>{ex.resetForm(),eh(null),eu({})},"aria-label":"Create project",title:"Create project",children:(0,t.jsx)(u.Plus,{size:14})})})]}),eM.map(e=>{let r=ea.has(e.id),a=eL.filter(t=>e.thread_ids?.includes(t.id)),c=e.id===U,m=e.thread_ids?.find(e=>eD.has(e))??e.thread_ids?.[0]??a[0]?.id??null,x=c&&"thread"===q&&m===w,j=c&&"automations"===q,k=c&&"linear"===q;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-item group",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__nav-item workspace-sidebar__workspace-nav-item",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex items-center justify-center rounded-sm text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",onClick:()=>{var t;return t=e.id,void es(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},"aria-label":r?`Collapse ${e.name}`:`Expand ${e.name}`,title:r?"Collapse project":"Expand project",children:r?(0,t.jsx)(s.ChevronDown,{size:14,className:"flex-shrink-0"}):(0,t.jsx)(o.ChevronRight,{size:14,className:"flex-shrink-0"})}),(0,t.jsx)(l.Folder,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title",children:e.name})]}),(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-actions",children:[(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__workspace-action",onClick:()=>void eI(e.id),"aria-label":`Open project settings for ${e.name}`,title:"Project settings",children:(0,t.jsx)(p.Pencil,{size:12})}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__workspace-action workspace-sidebar__workspace-action--delete",onClick:()=>{var t;let r;return t=e.id,r=D.find(e=>e.id===t),void ej({title:"Delete project",message:`Delete "${r?.name??"project"}"? Its agents will move to the Default project.`,onConfirm:()=>void O?.(t)})},"aria-label":`Delete project ${e.name}`,title:`Delete project ${e.name}`,children:(0,t.jsx)(h.Trash2,{size:12})})]})]}),r&&(0,t.jsxs)("div",{className:"ml-4 my-1 flex flex-col gap-0.5 border-l border-[var(--app-shell-border)] pl-3",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-item group/linear flex items-center",children:[(0,t.jsxs)(b.default,{href:`/projects/${e.slug}/linear`,className:`workspace-sidebar__nav-item flex-1 ${k?"workspace-sidebar__nav-item--active":""}`,"aria-current":k?"page":void 0,children:[(0,t.jsx)(g.ExternalLink,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Linear"})]}),(0,t.jsx)(b.default,{href:`/projects/${e.slug}/linear?settings=true`,className:"flex h-5 w-5 items-center justify-center rounded opacity-0 group-hover/linear:opacity-100 hover:bg-[var(--sidebar-hover)] transition-opacity",title:"Linear settings",children:(0,t.jsx)(f.Settings,{size:11,className:"text-[var(--muted-foreground)]"})})]}),(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,t.jsxs)(b.default,{href:`/projects/${e.slug}/automations`,className:`workspace-sidebar__nav-item ${j?"workspace-sidebar__nav-item--active":""}`,"aria-current":j?"page":void 0,children:[(0,t.jsx)(n.Zap,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Scheduled Tasks"})]})}),(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:m?(0,t.jsxs)("button",{type:"button",className:`workspace-sidebar__nav-item ${x?"workspace-sidebar__nav-item--active":""}`,onClick:()=>_(m),"aria-current":x?"page":void 0,children:[(0,t.jsx)(i.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Chat"})]}):(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item",onClick:eO,children:[(0,t.jsx)(i.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Chat"})]})}),(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsxs)("div",{className:"group/repos-header flex items-center justify-between px-3 py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Folders"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(b.default,{href:"/folders",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/repos-header:opacity-100 text-[var(--muted-foreground)] hover:text-white","aria-label":"Manage folders",title:"Manage folders",children:(0,t.jsx)(f.Settings,{size:12})}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/repos-header:opacity-100 text-[var(--muted-foreground)] hover:text-white",onClick:()=>e_({projectId:e.id,projectName:e.name,repoId:null,name:"",path:"",gitUrl:"",notes:"",generatedKnowledge:[],isLoadingKnowledge:!1,isSaving:!1,error:null}),"aria-label":"Add folder",title:"Add folder",children:(0,t.jsx)(u.Plus,{size:12})})]})]}),e.repos.length>0?e.repos.map(r=>(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-item group/repo flex items-center",children:[(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item min-w-0 flex-1 text-left",onClick:()=>e_({projectId:e.id,projectName:e.name,repoId:r.id,name:r.name,path:r.path||"",gitUrl:r.git_url||"",notes:r.notes||"",generatedKnowledge:[],isLoadingKnowledge:!0,isSaving:!1,error:null}),children:[(0,t.jsx)(d.FolderGit2,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)] ml-2"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs truncate",children:r.name})]}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 group-hover/repo:opacity-100 transition-opacity flex-shrink-0 text-[var(--muted-foreground)] hover:text-red-400",onClick:async t=>{t.stopPropagation();let a=e.repos.filter(e=>e.id!==r.id).map(e=>({id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes}));await W?.(e.id,{repos:a})},"aria-label":"Delete folder",title:"Delete folder",children:(0,t.jsx)(h.Trash2,{size:12})})]},`${e.id}:${r.name}:${r.path??""}`)):(0,t.jsx)("p",{className:"px-3 py-1 text-[11px] text-[var(--muted-foreground)]",children:"No folders"})]}),(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsxs)("div",{className:"group/agents-header flex items-center justify-between px-3 py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Agents"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(b.default,{href:"/agents",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/agents-header:opacity-100 text-[var(--muted-foreground)] hover:text-white","aria-label":"Manage agents",title:"Manage agents",children:(0,t.jsx)(f.Settings,{size:12})}),e.agents.length>0&&(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/agents-header:opacity-100 text-[var(--muted-foreground)] hover:text-white",onClick:()=>eE(e.id),"aria-label":"Add agents",title:"Add agents",children:(0,t.jsx)(u.Plus,{size:12})})]})]}),e.agents.length>0?(0,t.jsx)(t.Fragment,{children:e.agents.map((r,a)=>{let s=y.find(e=>e.id===r.agent_id),o=eC?.projectId===e.id&&eC?.agentId===r.agent_id,i=eC?.projectId===e.id&&eC?.overIndex===a&&!o;return(0,t.jsx)("div",{draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed="move",eS({projectId:e.id,agentId:r.agent_id,overIndex:a})},onDragOver:t=>{t.preventDefault(),eC&&eC.projectId===e.id&&eS(e=>e?{...e,overIndex:a}:null)},onDragEnd:()=>{if(eC&&eC.projectId===e.id&&B){let t=e.agents.map(e=>e.agent_id),r=t.indexOf(eC.agentId),a=eC.overIndex;if(-1!==r&&r!==a){let s=[...t],[o]=s.splice(r,1);s.splice(a,0,o),B(e.id,s)}}eS(null)},className:`group/agent flex items-center ${i?"border-t-2 border-[var(--border)]":"border-t-2 border-transparent"} ${o?"opacity-40":""}`,children:(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item flex-1 min-w-0 !py-1",onClick:()=>ew(r.agent_id),children:[(0,t.jsx)("span",{className:`cursor-grab text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)] flex-shrink-0 mr-0.5 transition-opacity ${0===a?"opacity-100":"opacity-0 group-hover/agent:opacity-100"}`,title:"Drag to reorder",children:"⠿"}),(0,t.jsx)("img",{src:(0,v.agentAvatarUrl)(r.agent_id,16,s?.color),alt:"",className:"w-4 h-4 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs truncate",children:s?.name??r.agent_id}),0===a&&(0,t.jsx)("span",{className:"ml-auto text-[9px] text-[var(--muted-foreground)] font-medium flex-shrink-0",title:"Default responder (top agent responds first)",children:"DEFAULT"})]})},r.agent_id)})}):(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 px-3 py-1 text-[11px] font-medium text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",onClick:()=>eE(e.id),children:[(0,t.jsx)(u.Plus,{size:10}),(0,t.jsx)("span",{children:"Add agents"})]})]})]})]},e.id)}),eW.length>0&&(0,t.jsxs)("div",{className:"pt-3",children:[(0,t.jsx)("p",{className:"px-1 py-1 text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Unassigned Threads"}),eW.map(e=>{let r=e.id===w,a=e.title?.trim()||"Untitled thread";return(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item group",children:(0,t.jsxs)("button",{type:"button",className:`workspace-sidebar__nav-item workspace-sidebar__workspace-nav-item ${r?"workspace-sidebar__nav-item--active workspace-sidebar__workspace-nav-item--active":""}`,onClick:()=>_(e.id),"aria-current":r?"page":void 0,children:[(0,t.jsx)(i.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title",children:a})]})},e.id)})]})]})]}),(0,t.jsx)("div",{className:"mt-auto px-3 pb-3",children:(0,t.jsxs)("a",{href:"https://discord.gg/G9afUYKKY3",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-white text-sm font-medium transition-colors",style:{backgroundColor:"#5865F2"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#4752C4",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#5865F2",children:[(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M60.1 4.9A58.5 58.5 0 0045.4.2a.2.2 0 00-.2.1 40.8 40.8 0 00-1.8 3.7 54 54 0 00-16.2 0A37.4 37.4 0 0025.4.3a.2.2 0 00-.2-.1A58.4 58.4 0 0010.5 4.9a.2.2 0 00-.1.1C1.5 18.7-.9 32.2.3 45.5v.1a58.8 58.8 0 0017.7 9a.2.2 0 00.3-.1 42 42 0 003.6-5.9.2.2 0 00-.1-.3 38.8 38.8 0 01-5.5-2.6.2.2 0 01 0-.4l1.1-.9a.2.2 0 01.2 0 42 42 0 0035.6 0 .2.2 0 01.2 0l1.1.9a.2.2 0 010 .4 36.4 36.4 0 01-5.5 2.6.2.2 0 00-.1.3 47.2 47.2 0 003.6 5.9.2.2 0 00.3.1 58.6 58.6 0 0017.7-9v-.1c1.4-15.2-2.4-28.4-10-40.1a.2.2 0 00-.1-.1zM23.7 37.3c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7zm23.3 0c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7z"})}),"Join Discord"]})}),et&&eN&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-4",onClick:()=>{eN.isSaving||e_(null)},children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-[var(--border)] px-5 py-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:eN.projectName}),(0,t.jsx)("h3",{className:"truncate text-base font-semibold text-[var(--foreground)]",children:eN.repoId?eN.name||"Folder":"Add Folder"})]}),(0,t.jsx)("button",{type:"button",className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--muted-foreground)]",onClick:()=>{eN.isSaving||e_(null)},"aria-label":"Close folder details",disabled:eN.isSaving,children:(0,t.jsx)(x.X,{size:16})})]}),(0,t.jsxs)("div",{className:"space-y-4 px-5 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Name"}),(0,t.jsx)("input",{value:eN.name,onChange:e=>e_(t=>t?{...t,name:e.target.value,error:null}:t),className:"w-full rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-sm text-[var(--foreground)]",disabled:eN.isSaving,placeholder:"e.g. Frontend, API Docs, Design System"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Path"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{value:eN.path,onChange:e=>e_(t=>t?{...t,path:e.target.value,error:null}:t),className:"flex-1 rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 font-mono text-xs text-[var(--foreground)]",disabled:eN.isSaving,placeholder:"Local path to folder"}),(0,t.jsx)("button",{type:"button",className:"rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]",disabled:eN.isSaving,onClick:async()=>{try{let e=await fetch("/api/filesystem/pick-folder",{method:"POST"}),t=await e.json();t.path&&e_(e=>e?{...e,path:t.path,error:null}:e)}catch{}},children:"Browse"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Notes"}),(0,t.jsx)("textarea",{value:eN.notes,onChange:e=>e_(t=>t?{...t,notes:e.target.value,error:null}:t),className:"min-h-28 w-full rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-3 text-sm text-[var(--foreground)] whitespace-pre-wrap",disabled:eN.isSaving,placeholder:"Coding conventions, deploy steps, doc standards, ownership rules..."})]}),eN.repoId?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Living Note"}),eN.isLoadingKnowledge?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading note…"}):eN.generatedKnowledge.length>0?(0,t.jsx)("div",{className:"space-y-2",children:eN.generatedKnowledge.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-sm text-[var(--foreground)]",children:[(0,t.jsx)("div",{children:e.content}),e.created_at?(0,t.jsx)("div",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:new Date(e.created_at).toLocaleString()}):null]},e.id))}):(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No note yet."})]}):null,eN.error?(0,t.jsx)("p",{className:"text-xs text-red-600",children:eN.error}):null,(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] pt-4",children:[(0,t.jsx)("button",{type:"button",className:"rounded-lg px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]",onClick:()=>e_(null),disabled:eN.isSaving,children:"Cancel"}),(0,t.jsx)("button",{type:"button",className:"rounded-lg bg-[var(--foreground)] px-3 py-2 text-sm font-medium text-[var(--card-bg)] transition-colors hover:bg-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-60",disabled:eN.isSaving||!W,onClick:async()=>{let e=D.find(e=>e.id===eN.projectId);if(!e)return void e_(e=>e?{...e,error:"Project not found."}:e);let t=eN.name.trim(),r=eN.path.trim();if(!t)return void e_(e=>e?{...e,error:"Folder name is required."}:e);if(!r)return void e_(e=>e?{...e,error:"Folder path is required."}:e);e_(e=>e?{...e,isSaving:!0,error:null}:e);try{let a=eN.repoId?e.repos.map(e=>e.id===eN.repoId?{id:e.id,name:t,path:r,git_url:eN.gitUrl.trim()||void 0,notes:eN.notes.trim()||void 0}:{id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes}):[...e.repos.map(e=>({id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes})),{name:t,path:r,git_url:eN.gitUrl.trim()||void 0,notes:eN.notes.trim()||void 0}];await W?.(e.id,{repos:a}),e_(null)}catch(e){e_(t=>t?{...t,isSaving:!1,error:e instanceof Error?e.message:"Failed to save folder details."}:t)}},children:eN.isSaving?"Saving...":eN.repoId?"Save":"Add Folder"})]})]})]})}),document.body),et&&eo&&!ed&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ei(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 max-h-[70vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:["Add to ",eT?.name??"project"]}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>ei(null),children:(0,t.jsx)(x.X,{size:16})})]}),(0,t.jsxs)("div",{className:"overflow-y-auto py-1 flex-1",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-[var(--foreground)] hover:bg-[var(--app-shell-subtle)] transition-colors border-b border-[var(--border)]",onClick:()=>ec(!0),children:[(0,t.jsx)(u.Plus,{size:14,className:"text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Create new agent"})]}),0===ez.length?(0,t.jsx)("p",{className:"px-4 py-6 text-xs text-[var(--muted-foreground)] text-center",children:"All agents are already in this project"}):ez.map(e=>{let r=en.has(e.id);return(0,t.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${r?"bg-[var(--muted)] text-[var(--foreground)]":"text-[var(--foreground)] hover:bg-[var(--app-shell-subtle)]"}`,onClick:()=>{el(t=>{let r=new Set(t);return r.has(e.id)?r.delete(e.id):r.add(e.id),r})},children:[(0,t.jsx)("div",{className:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center ${r?"bg-[var(--foreground)] border-[var(--foreground)]":"border-[var(--border)]"}`,children:r&&(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,t.jsx)("path",{d:"M2 5l2 2 4-4",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsx)("img",{src:(0,v.agentAvatarUrl)(e.id,24,e.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate font-medium text-xs",children:e.name}),(0,t.jsx)("div",{className:"truncate text-[11px] text-[var(--muted-foreground)]",children:e.model})]})]},e.id)})]}),ez.length>0&&(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-[var(--border)] flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>ei(null),children:"Cancel"}),(0,t.jsxs)("button",{type:"button",disabled:0===en.size,className:"px-3 py-1.5 text-xs font-medium text-[var(--card-bg)] bg-[var(--foreground)] rounded-lg hover:bg-[var(--foreground)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>{for(let e of en)R?.(eo.projectId,e);ei(null)},children:["Add ",en.size>0?`(${en.size})`:""]})]})]})}),document.body),et&&ed&&(0,a.createPortal)((0,t.jsx)(v.AgentForm,{title:"Create new agent",initial:{name:"",provider:"claude",model:"",identity:"",skills:[],skillBindings:[]},submitLabel:"Create & Add",projects:D?.filter(e=>!e.is_default).map(t=>{let r=(t.thread_ids??[]).map(t=>e.find(e=>e.id===t)?.title?.trim()).filter(Boolean).join(", ")||"No chat";return{id:t.id,name:t.name,label:`${r} › ${t.name}`}}),initialProjectIds:eo?[eo.projectId]:[],onSubmit:async(e,t)=>{let r=["#D97706","#2563EB","#059669","#DC2626","#7C3AED","#DB2777","#0891B2"],a=r[y.length%r.length],s=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),o=t?.[0],i=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:s,name:e.name,provider:e.provider,model:e.model,color:e.color??a,...e.title?{title:e.title}:{},...e.identity?{identity:e.identity}:{},skills:e.skills??[],skillBindings:e.skillBindings??[],...o?{projectId:o}:{}})});if(i.ok){let e=await i.json().catch(()=>({})),r="string"==typeof e?.id&&e.id.trim()?e.id.trim():s;for(let e of(t??[]).slice(1))R?.(e,r);ec(!1),ei(null)}},onCancel:()=>{ec(!1)}}),document.body),et&&eg&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ef(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:eg.title}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>ef(null),children:(0,t.jsx)(x.X,{size:16})})]}),(0,t.jsxs)("form",{className:"px-4 py-4 flex flex-col gap-3",onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget),r=t.get("value")?.trim();r&&(eg.onSubmit(r),ef(null))},children:[(0,t.jsx)("input",{ref:eb,name:"value",type:"text",defaultValue:eg.defaultValue,placeholder:eg.placeholder,className:"w-full px-3 py-2 text-sm border border-[var(--border)] rounded-lg outline-none focus:border-[var(--border)] focus:ring-1 focus:ring-[var(--border)] transition-all"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>ef(null),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:"px-3 py-1.5 text-xs font-medium text-[var(--card-bg)] bg-[var(--foreground)] rounded-lg hover:bg-[var(--foreground)] transition-colors",children:eg.defaultValue?"Save":"Create"})]})]})]})}),document.body),et&&ev&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ej(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:ev.title}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>ej(null),children:(0,t.jsx)(x.X,{size:16})})]}),(0,t.jsxs)("div",{className:"px-4 py-4 flex flex-col gap-4",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:ev.message}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>ej(null),children:"Cancel"}),(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs font-medium text-white bg-red-600 rounded-lg hover:bg-red-700 transition-colors",onClick:()=>{ev.onConfirm(),ej(null)},children:"Delete"})]})]})]})}),document.body),et&&(ep||em)&&(0,a.createPortal)((0,t.jsx)(j.default,{isOpen:!0,onClose:()=>{ex.resetForm(),eu(null),eh(null)},onSubmit:()=>void eP(),editingProject:em,form:ex.form,repos:ex.repos,isSubmitting:ex.isSubmitting,formError:ex.formError,onFieldChange:(e,t)=>ex.setForm(r=>({...r,[e]:t})),onRepoChange:ex.handleRepoChange,onAddRepo:ex.addRepo,onRemoveRepo:ex.removeRepo}),document.body),et&&ek&&(0,a.createPortal)((Y=D.filter(e=>e.agents.some(e=>e.agent_id===ek.id)),Z=D.filter(e=>!e.agents.some(e=>e.agent_id===ek.id)),(0,t.jsx)(v.AgentForm,{title:"Edit agent",initial:{name:ek.name,title:ek.title||"",provider:ek.provider,model:ek.model||"",identity:ek.identity||"",color:ek.color,skills:ek.skills||[],skillBindings:ek.skillBindings||[]},agentId:ek.id,submitLabel:"Save",projectMemberships:{current:Y.map(e=>({id:e.id,name:e.name,is_default:!!e.is_default})),available:Z.map(e=>({id:e.id,name:e.name}))},onAddToProject:R?e=>R(e,ek.id):void 0,onRemoveFromProject:K?e=>K(e,ek.id):void 0,onSubmit:async e=>{H&&await H({...ek,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,color:e.color??ek.color,...e.identity?{identity:e.identity}:{},skills:e.skills??[],skillBindings:e.skillBindings??[]}),ew(null)},onCancel:()=>ew(null)})),document.body),G&&(0,t.jsx)("div",{className:"absolute right-0 top-0 bottom-0 z-20 w-1 cursor-col-resize group",onMouseDown:e=>{e.preventDefault(),Q.current=!0;let t=e.clientX,r=X??368;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let a=e=>{G(Math.max(200,Math.min(600,r+e.clientX-t)))},s=()=>{Q.current=!1,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",a),window.addEventListener("mouseup",s)},children:(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 w-1 transition-colors hover:bg-[var(--primary)]/40 group-hover:bg-[var(--primary)]/40"})})]}):(0,t.jsxs)("aside",{id:"workspace-sidebar",className:"workspace-sidebar workspace-sidebar--collapsed","aria-label":"Workspace sidebar",children:[(0,t.jsx)("div",{className:"workspace-sidebar__brand",children:(0,t.jsx)("button",{type:"button",onClick:F,className:"workspace-sidebar__brand-icon border-none outline-none cursor-pointer","aria-label":"Show chats",title:"Show chats",children:(0,t.jsx)("span",{className:"text-[10px]",children:"AGX"})})}),(0,t.jsx)("div",{className:"mt-auto p-2",children:(0,t.jsx)("a",{href:"https://discord.gg/G9afUYKKY3",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-lg text-white transition-colors",style:{backgroundColor:"#5865F2"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#4752C4",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#5865F2",title:"Join Discord",children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M60.1 4.9A58.5 58.5 0 0045.4.2a.2.2 0 00-.2.1 40.8 40.8 0 00-1.8 3.7 54 54 0 00-16.2 0A37.4 37.4 0 0025.4.3a.2.2 0 00-.2-.1A58.4 58.4 0 0010.5 4.9a.2.2 0 00-.1.1C1.5 18.7-.9 32.2.3 45.5v.1a58.8 58.8 0 0017.7 9a.2.2 0 00.3-.1 42 42 0 003.6-5.9.2.2 0 00-.1-.3 38.8 38.8 0 01-5.5-2.6.2.2 0 01 0-.4l1.1-.9a.2.2 0 01.2 0 42 42 0 0035.6 0 .2.2 0 01.2 0l1.1.9a.2.2 0 010 .4 36.4 36.4 0 01-5.5 2.6.2.2 0 00-.1.3 47.2 47.2 0 003.6 5.9.2.2 0 00.3.1 58.6 58.6 0 0017.7-9v-.1c1.4-15.2-2.4-28.4-10-40.1a.2.2 0 00-.1-.1zM23.7 37.3c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7zm23.3 0c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7z"})})})})]})}e.s(["WorkspaceSidebar",()=>y],268542);let w="agx-chat:uiSettings",k={threadSidebarVisible:!1};function N(){return void 0!==window.localStorage}function _(){if(!N())return{...k};let e=window.localStorage.getItem(w);if(!e)return{...k};try{let t=JSON.parse(e);return{...k,threadSidebarVisible:"boolean"==typeof t.threadSidebarVisible&&t.threadSidebarVisible}}catch{return{...k}}}function C(){return _().threadSidebarVisible}function S(e){var t={..._(),threadSidebarVisible:e};if(N())try{window.localStorage.setItem(w,JSON.stringify(t))}catch{}}e.s(["loadWorkspaceSidebarVisible",()=>C,"persistWorkspaceSidebarVisible",()=>S],154238)}]);
|