commandmate 0.49.3 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +454 -408
- package/.next/app-path-routes-manifest.json +19 -13
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +32 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/capabilities/route.js +1 -1
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route.js +1 -1
- package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js +1 -1
- package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +1 -103
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +2 -2
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route.js +1 -1
- package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/relays/route.js +1 -1
- package/.next/server/app/api/relays/route.js.nft.json +1 -1
- package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route.js +2 -2
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/role-defaults/route.js +1 -0
- package/.next/server/app/api/repositories/[id]/role-defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/repositories/[id]/role-defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roles/[id]/route.js +1 -0
- package/.next/server/app/api/roles/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/roles/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roles/route.js +1 -0
- package/.next/server/app/api/roles/route.js.nft.json +1 -0
- package/.next/server/app/api/roles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route.js +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/agent-role-defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/default-agents/route.js +1 -1
- package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/instances/roles/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -104
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
- package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +2 -2
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +11 -11
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +19 -13
- package/.next/server/chunks/1184.js +5 -0
- package/.next/server/chunks/1501.js +5 -5
- package/.next/server/chunks/1656.js +2 -2
- package/.next/server/chunks/1957.js +2 -2
- package/.next/server/chunks/1990.js +103 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2819.js +1 -0
- package/.next/server/chunks/2897.js +1 -1
- package/.next/server/chunks/3042.js +2 -0
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3294.js +3 -0
- package/.next/server/chunks/3417.js +1 -1
- package/.next/server/chunks/3480.js +1 -1
- package/.next/server/chunks/3505.js +2 -6
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3801.js +2 -2
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/454.js +1 -0
- package/.next/server/chunks/4645.js +1 -0
- package/.next/server/chunks/4911.js +1 -1
- package/.next/server/chunks/5350.js +6 -2
- package/.next/server/chunks/5354.js +1 -1
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/6009.js +12 -0
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6486.js +2 -2
- package/.next/server/chunks/6569.js +1 -0
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6793.js +4 -4
- package/.next/server/chunks/696.js +3 -0
- package/.next/server/chunks/7023.js +3 -3
- package/.next/server/chunks/{9702.js → 7083.js} +1 -1
- package/.next/server/chunks/741.js +1 -0
- package/.next/server/chunks/7662.js +1 -0
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8143.js +33 -0
- package/.next/server/chunks/8581.js +6 -6
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8782.js +1 -1
- package/.next/server/chunks/8807.js +97 -10
- package/.next/server/chunks/8918.js +3 -105
- package/.next/server/chunks/8955.js +1 -0
- package/.next/server/chunks/923.js +1 -0
- package/.next/server/chunks/9390.js +2 -2
- package/.next/server/chunks/9627.js +5 -5
- package/.next/server/chunks/973.js +1 -0
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/2314-2c9d587a27e8f731.js +1 -0
- package/.next/static/chunks/2407-ee881c99e218975b.js +1 -0
- package/.next/static/chunks/3931-24d7e245a93feb25.js +1 -0
- package/.next/static/chunks/4548-9afa02fd18afa6c7.js +1 -0
- package/.next/static/chunks/{5794-7975b8e51e731b19.js → 5794-38b3b504b3d97e04.js} +1 -1
- package/.next/static/chunks/{6966-d8dc6032410ffaba.js → 6966-dbfa4a43397f8c6d.js} +1 -1
- package/.next/static/chunks/7090-28e83f5a0efdb3b4.js +1 -0
- package/.next/static/chunks/7229.016d007c467a3600.js +1 -0
- package/.next/static/chunks/{8407-35bbfc84793d7004.js → 8407-dd6a8062fc449899.js} +1 -1
- package/.next/static/chunks/app/api/agents/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/agents/versions/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/release-notes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/relays/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/role-defaults/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/roles/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/roles/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/agent-role-defaults/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/skills/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/templates/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/settle/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/layout-7bf800fcc5e025b1.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/more/{page-ff5af5ca48774c89.js → page-e8f5780f6e4fb657.js} +1 -1
- package/.next/static/chunks/app/{page-b4863bfe0452e09d.js → page-869f353a4ac4e15b.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/repositories/page-bedb505687010f18.js +1 -0
- package/.next/static/chunks/app/review/page-87c4a9b0de50fa80.js +1 -0
- package/.next/static/chunks/app/sessions/{page-c6eb7c02db2f4c80.js → page-82ca46793789fce4.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-476063c3571b81dd.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-570eb79fbbd1a934.js +1 -0
- package/.next/static/chunks/{webpack-838df0273b03af19.js → webpack-16b1a3143fa42ca0.js} +1 -1
- package/.next/static/css/d4f2c9522cf1b449.css +1 -0
- package/.next/static/z4d8-5MaLkoD-4EhueZwk/_buildManifest.js +1 -0
- package/.next/trace +14 -13
- package/.next/types/app/api/repositories/[id]/role-defaults/route.ts +347 -0
- package/.next/types/app/api/roles/[id]/route.ts +347 -0
- package/.next/types/app/api/roles/route.ts +347 -0
- package/.next/types/app/api/settings/agent-role-defaults/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/instances/roles/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/instances/roles/settle/route.ts +347 -0
- package/.next/types/routes.d.ts +7 -1
- package/.next/types/validator.ts +54 -0
- package/dist/cli/commands/instances.d.ts +1 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +290 -33
- package/dist/cli/commands/message-dispatch.d.ts +25 -3
- package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
- package/dist/cli/commands/message-dispatch.js +26 -6
- package/dist/cli/commands/relays.d.ts +5 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +37 -1
- package/dist/cli/commands/roles.d.ts +11 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +392 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +526 -38
- package/dist/cli/docs/agent-operations.d.ts +1 -1
- package/dist/cli/docs/agent-operations.d.ts.map +1 -1
- package/dist/cli/docs/agent-operations.js +91 -3
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -0
- package/dist/cli/types/api-responses.d.ts +54 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +38 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +15 -1
- package/dist/cli/utils/agent-instances.d.ts +29 -1
- package/dist/cli/utils/agent-instances.d.ts.map +1 -1
- package/dist/cli/utils/agent-instances.js +67 -7
- package/dist/cli/utils/agent-roles.d.ts +75 -0
- package/dist/cli/utils/agent-roles.d.ts.map +1 -0
- package/dist/cli/utils/agent-roles.js +238 -0
- package/dist/cli/utils/api-client-errors.d.ts +23 -1
- package/dist/cli/utils/api-client-errors.d.ts.map +1 -1
- package/dist/cli/utils/api-client-errors.js +14 -2
- package/dist/cli/utils/api-client.d.ts +8 -0
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +13 -1
- package/dist/cli/utils/role-failure.d.ts +31 -0
- package/dist/cli/utils/role-failure.d.ts.map +1 -0
- package/dist/cli/utils/role-failure.js +90 -0
- package/dist/cli/utils/role-input.d.ts +16 -0
- package/dist/cli/utils/role-input.d.ts.map +1 -0
- package/dist/cli/utils/role-input.js +78 -0
- package/dist/cli/utils/security-logger.d.ts +17 -0
- package/dist/cli/utils/security-logger.d.ts.map +1 -1
- package/dist/cli/utils/security-logger.js +44 -5
- package/dist/lib/detection/tools/verified-against.d.ts +16 -0
- package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
- package/dist/lib/detection/tools/verified-against.js +16 -0
- package/dist/lib/session/send-attempt-types.d.ts +4 -0
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
- package/dist/lib/verification/verify-config.d.ts +22 -0
- package/dist/lib/verification/verify-config.d.ts.map +1 -1
- package/dist/lib/verification/verify-config.js +32 -2
- package/dist/server/locales/en/worktree.json +25 -6
- package/dist/server/locales/ja/worktree.json +25 -6
- package/dist/server/src/config/safe-directory.js +30 -0
- package/dist/server/src/lib/agent-roles/adapters.js +174 -0
- package/dist/server/src/lib/agent-roles/artifacts.js +638 -0
- package/dist/server/src/lib/agent-roles/composition.js +222 -0
- package/dist/server/src/lib/agent-roles/fingerprint.js +21 -0
- package/dist/server/src/lib/agent-roles/jsonc.js +85 -0
- package/dist/server/src/lib/agent-roles/launch-errors.js +58 -0
- package/dist/server/src/lib/agent-roles/pane-env.js +63 -0
- package/dist/server/src/lib/agent-roles/resolve.js +375 -0
- package/dist/server/src/lib/agent-roles/toml-basic.js +140 -0
- package/dist/server/src/lib/agent-roles/unicode.js +16 -0
- package/dist/server/src/lib/agent-roles/validation.js +61 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +39 -6
- package/dist/server/src/lib/cli-tools/base.js +63 -5
- package/dist/server/src/lib/cli-tools/claude-auto-default-nudge.js +141 -0
- package/dist/server/src/lib/cli-tools/claude.js +7 -1
- package/dist/server/src/lib/cli-tools/codex.js +134 -21
- package/dist/server/src/lib/cli-tools/command-code.js +24 -1
- package/dist/server/src/lib/cli-tools/copilot.js +36 -7
- package/dist/server/src/lib/cli-tools/gemini.js +37 -3
- package/dist/server/src/lib/cli-tools/launch-answer-skips.js +76 -0
- package/dist/server/src/lib/cli-tools/opencode-v2.js +10 -0
- package/dist/server/src/lib/cli-tools/opencode.js +58 -7
- package/dist/server/src/lib/cli-tools/submit-composer-read.js +24 -4
- package/dist/server/src/lib/cli-tools/vibe-local.js +25 -1
- package/dist/server/src/lib/db/agent-instances-db.js +53 -0
- package/dist/server/src/lib/db/agent-roles-db.js +409 -0
- package/dist/server/src/lib/db/agent-session-cost-sampler.js +3 -2
- package/dist/server/src/lib/db/db-instance.js +7 -37
- package/dist/server/src/lib/db/migrations/index.js +4 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v64-agent-roles.js +123 -0
- package/dist/server/src/lib/db/migrations/v65-agent-instance-creation-keys.js +42 -0
- package/dist/server/src/lib/db/relay-db.js +35 -0
- package/dist/server/src/lib/detection/cli-patterns.js +13 -3
- package/dist/server/src/lib/detection/model-info-extractor.js +1 -1
- package/dist/server/src/lib/detection/tools/claude/patterns.js +76 -0
- package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +5 -0
- package/dist/server/src/lib/detection/tools/codex/detect.js +5 -1
- package/dist/server/src/lib/detection/tools/codex/patterns.js +52 -2
- package/dist/server/src/lib/detection/tools/codex/prompt.js +23 -3
- package/dist/server/src/lib/detection/tools/opencode/detect.js +30 -15
- package/dist/server/src/lib/detection/tools/opencode/patterns.js +268 -7
- package/dist/server/src/lib/detection/tools/opencode/readiness.js +16 -7
- package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +51 -15
- package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +195 -11
- package/dist/server/src/lib/detection/tools/run-detection.js +5 -2
- package/dist/server/src/lib/detection/tools/verified-against.js +16 -0
- package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +22 -0
- package/dist/server/src/lib/git/git-common-dir.js +192 -0
- package/dist/server/src/lib/hooks/hook-settings-generator.js +8 -2
- package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +31 -1
- package/dist/server/src/lib/hooks/sources/launch-command.js +31 -8
- package/dist/server/src/lib/hooks/sources/opencode/client.js +20 -0
- package/dist/server/src/lib/hooks/sources/opencode-v2/client.js +24 -0
- package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +208 -35
- package/dist/server/src/lib/hooks/sources/opencode-v2/secrets.js +7 -1
- package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +117 -2
- package/dist/server/src/lib/job-executor.js +18 -1
- package/dist/server/src/lib/polling/response-checker-extraction-steps.js +58 -4
- package/dist/server/src/lib/polling/response-checker.js +32 -7
- package/dist/server/src/lib/relay/relay-delivery-block.js +150 -0
- package/dist/server/src/lib/relay/relay-delivery.js +59 -2
- package/dist/server/src/lib/response-cleaner.js +13 -3
- package/dist/server/src/lib/response-extractor.js +38 -3
- package/dist/server/src/lib/session/agent-session-lifecycle.js +9 -1
- package/dist/server/src/lib/session/claude-executor.js +13 -1
- package/dist/server/src/lib/session/claude-session.js +109 -13
- package/dist/server/src/lib/session/instance-input-lock.js +93 -4
- package/dist/server/src/lib/session/role-launch.js +722 -0
- package/dist/server/src/lib/session/send-attempt-state.js +7 -0
- package/dist/server/src/lib/session/send-user-message.js +6 -0
- package/dist/server/src/lib/session/session-generation-archive.js +7 -8
- package/dist/server/src/lib/session/session-launch-flight.js +33 -1
- package/dist/server/src/lib/session/worktree-session-reconcile.js +5 -0
- package/dist/server/src/lib/test-run-detection.js +53 -0
- package/dist/server/src/lib/tmux/read-mode.js +4 -0
- package/dist/server/src/lib/tmux/session-hook-scripts.js +36 -4
- package/dist/server/src/lib/tui-accumulator.js +14 -5
- package/dist/server/src/lib/verification/env-clean-gate.js +117 -12
- package/dist/server/src/lib/verification/gate-runner.js +9 -8
- package/dist/server/src/lib/verification/verify-config.js +32 -2
- package/dist/server/src/types/agent-roles.js +56 -0
- package/dist/types/agent-roles.d.ts +351 -0
- package/dist/types/agent-roles.d.ts.map +1 -0
- package/dist/types/agent-roles.js +56 -0
- package/docs/en/user-guide/webapp-guide.md +16 -0
- package/package.json +2 -1
- package/release-notes/0.50.0.json +113 -0
- package/.next/server/chunks/1308.js +0 -1
- package/.next/server/chunks/4490.js +0 -1
- package/.next/server/chunks/4936.js +0 -1
- package/.next/server/chunks/610.js +0 -1
- package/.next/server/chunks/6119.js +0 -1
- package/.next/server/chunks/7491.js +0 -3
- package/.next/server/chunks/7926.js +0 -1
- package/.next/server/chunks/9360.js +0 -2
- package/.next/server/chunks/9584.js +0 -1
- package/.next/static/LNfVZiq6FZwKsV7L9Mi6M/_buildManifest.js +0 -1
- package/.next/static/chunks/2407-87ec01332344ec2b.js +0 -1
- package/.next/static/chunks/344-e1cefd00787060e4.js +0 -1
- package/.next/static/chunks/3931-3ef48b8d97357282.js +0 -1
- package/.next/static/chunks/7229.7f0f5a7032b612b4.js +0 -1
- package/.next/static/chunks/8165-263172c17ae8e8c3.js +0 -1
- package/.next/static/chunks/app/api/agents/update/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/agents/versions/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/app/release-notes/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/relays/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/skills/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/templates/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/layout-b9d8aef70e4f17b2.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/repositories/page-71f5a5ac29b0370d.js +0 -1
- package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-96fc12d400b49b13.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-f6a151304860b549.js +0 -1
- package/.next/static/css/c1e307d05daf93b6.css +0 -1
- /package/.next/static/{LNfVZiq6FZwKsV7L9Mi6M → z4d8-5MaLkoD-4EhueZwk}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4548],{14548:(e,t,n)=>{n.d(t,{hD:()=>s,GQ:()=>k,O0:()=>l,xd:()=>u,E:()=>h,gC:()=>v,hS:()=>S,$T:()=>T,Rx:()=>b,y:()=>g});var o=n(56936),r=n(52407);let a=["json","text","arrayBuffer","blob","formData","bytes"];function i(e){return"function"==typeof Response&&e instanceof Response&&null!==e.body&&!e.bodyUsed&&!e.body.locked}class s extends Error{constructor(e,t,n,o){super(e),this.status=t,this.data=n,this.name="ApiError",this.kind=null!=o?o:t>0?"http":"network"}}async function c(e,t,n){if(!(e.headers.get("content-type")||"").includes("application/json"))return t;try{return await e.json()}catch(e){return t}}function l(e){var t;return e.redirected&&(null!=(t=e.url)?t:"").includes("/login")?new s("Authentication required",401):null}function u(e){return e.headers?(e.headers.get("content-type")||"").includes("application/json")?null:new s("Unexpected response format",e.status):null}let d=null;function p(e){let t=Date.now();null!==d&&d.reachable===e&&t-d.at<o.T2||(d={reachable:e,at:t},(0,r.nG)(e))}function f(e){if(e instanceof s)return e;let t=e instanceof Error?e.name:"";return"AbortError"===t||"TimeoutError"===t?new s("Request aborted",0,e,"aborted"):new s(e instanceof Error?e.message:"Unknown error",0,e,"network")}async function y(e,t,n){var o;let r=null!=(o=t.signal)?o:void 0;if(null==r?void 0:r.aborted)throw new s("Request aborted",0,void 0,"aborted");if(n<=0||"function"!=typeof AbortController)return fetch(e,t);let c=new AbortController,l=!1,u=setTimeout(()=>{l=!0,c.abort()},n),d=()=>c.abort();null==r||r.addEventListener("abort",d);try{let o=await fetch(e,{...t,signal:c.signal});if(!i(o))return o;let l=function(e,t){let n,{stallMs:o,callerSignal:r,abortConnection:a,stallError:i,abortedError:s,transportError:c}=t,l=e.getReader(),u=new Set,d=!1,p=!1,f=!1,y=null,m=()=>{let e=[...u].some(e=>null!==e.release);d&&!f&&e?null!=n||(n=setTimeout(()=>w(i()),o)):(clearTimeout(n),n=void 0)},h=()=>{f=!0,m(),null==r||r.removeEventListener("abort",g)},w=e=>{if(!f){for(let n of(h(),y=e,u)){var t;n.controller.error(e),null==(t=n.release)||t.call(n)}a(),l.cancel(e).catch(()=>{})}};function g(){w(s())}let b=async()=>{if(!d&&!f){d=!0,m();try{let{done:e,value:t}=await l.read();if(d=!1,f)return;if(e){for(let e of(p=!0,h(),u))e.release&&(e.controller.close(),e.release());return}for(let e of u)e.release?(e.controller.enqueue(t),e.release()):e.queue.push(t);m()}catch(e){d=!1,w(c(e))}}};return null==r||r.addEventListener("abort",g),{openBranch:e=>{let t,n=[...e];return{stream:new ReadableStream({start(e){t={queue:n,controller:e,release:null},y?e.error(y):u.add(t)},pull(e){let n=t.queue.shift();return n?void e.enqueue(n):p?void e.close():new Promise(e=>{t.release=()=>{t.release=null,e()},m(),b()})},cancel(e){var n;if(null==(n=t.release)||n.call(t),u.delete(t),m(),!(u.size>0)&&!f)return h(),l.cancel(e)}},{highWaterMark:0}),queue:n}},failure:()=>y}}(o.body,{stallMs:n,callerSignal:r,abortConnection:()=>c.abort(),stallError:()=>new s("Request timed out after ".concat(n,"ms"),0,void 0,"timeout"),abortedError:()=>new s("Request aborted",0,void 0,"aborted"),transportError:f});return function e(t,n,o,r){let i=new Response(o.stream,{status:t.status,statusText:t.statusText,headers:r});for(let r of(Object.defineProperties(i,{url:{value:t.url},redirected:{value:t.redirected},type:{value:t.type},clone:{value:()=>{if(i.bodyUsed||o.stream.locked)throw TypeError("Failed to clone: the response body is already used");return e(t,n,n.openBranch(o.queue),i.headers)}}}),a)){let e=i[r];"function"==typeof e&&Object.defineProperty(i,r,{value:()=>e.call(i).catch(e=>{var t;throw null!=(t=n.failure())?t:e})})}return i}(o,l,l.openBranch([]),o.headers)}catch(e){if(null==r?void 0:r.aborted)throw new s("Request aborted",0,e,"aborted");if(l)throw new s("Request timed out after ".concat(n,"ms"),0,e,"timeout");throw e}finally{clearTimeout(u),null==r||r.removeEventListener("abort",d)}}function m(e){return new Promise(t=>setTimeout(t,e))}async function h(e,t){var n;let{timeoutMs:r,retries:a,...c}=null!=t?t:{},l=(null!=(n=c.method)?n:"GET").toUpperCase(),u=(0,o.nk)(l)?Math.max(0,null!=a?a:o.SR):0,d=void 0===r?(0,o.Z3)(l):null!=r?r:o.Hi,h=Date.now(),w=e=>e<u&&Date.now()-h<o.Ct;for(let t=0;;t++){if("undefined"!=typeof navigator&&!1===navigator.onLine)throw new s("No network connection",0,void 0,"offline");try{let n=await y(e,c,d);if(p(!0),(0,o.PS)(n.status)&&w(t)){i(n)&&n.body.cancel().catch(()=>{}),await m((0,o.BV)(t));continue}return n}catch(n){let e=f(n);if("aborted"===e.kind||(p(!1),!w(t)))throw e;await m((0,o.BV)(t))}}}async function w(e,t){try{let n=new Headers(null==t?void 0:t.headers);n.set("Content-Type","application/json");let o=await h(e,{...t,headers:n}),r=l(o);if(r)throw r;if(!o.ok){let e=await c(o,{},"error-body");throw new s(e.error||"HTTP error ".concat(o.status),o.status,e)}let a=u(o);if(a)throw a;return o.json()}catch(e){if(e instanceof s)throw e;throw new s(e instanceof Error?e.message:"Unknown error",0,e)}}let g={getAll:async()=>w("/api/worktrees"),getById:async e=>w("/api/worktrees/".concat(e)),updateDescription:async(e,t)=>w("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({description:t})}),updateLink:async(e,t)=>w("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({link:t})}),toggleFavorite:async(e,t)=>w("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({favorite:t})}),updateStatus:async(e,t)=>w("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({status:t})}),updateCliTool:async(e,t)=>w("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({cliToolId:t})}),markAsViewed:async e=>w("/api/worktrees/".concat(e,"/viewed"),{method:"PATCH"}),async getMessages(e,t,n,o){let r=new URLSearchParams;return t&&r.append("cliTool",t),n&&r.append("includeArchived","true"),"number"==typeof o&&Number.isFinite(o)&&r.append("limit",String(o)),w("/api/worktrees/".concat(e,"/messages").concat(r.toString()?"?".concat(r.toString()):""))},async sendMessage(e,t,n){var r;let a={content:t};return(null==n?void 0:n.cliToolId)&&(a.cliToolId=n.cliToolId),(null==n?void 0:n.instanceId)&&(a.instanceId=n.instanceId),(null==n?void 0:n.imagePath)&&(a.imagePath=n.imagePath),null===(r=await w("/api/worktrees/".concat(e,"/send"),{method:"POST",body:JSON.stringify(a),timeoutMs:(0,o.SE)()}))||"object"!=typeof r||r.timestamp instanceof Date?r:{...r,timestamp:new Date(r.timestamp)}},async uploadImageFile(e,t){let n=Date.now(),o="".concat(n,"-").concat(t.name),r=".commandmate/attachments",a=new FormData;a.append("file",new File([t],o,{type:t.type}));let i=await fetch("/api/worktrees/".concat(e,"/upload/").concat(r),{method:"POST",body:a});if(!i.ok){var s;let e=await c(i,{},"error-body");throw Error((null==e||null==(s=e.error)?void 0:s.message)||"Upload failed (HTTP ".concat(i.status,")"))}return{path:(await c(i,{},"response-body")).path||"".concat(r,"/").concat(o)}},getLogs:async e=>w("/api/worktrees/".concat(e,"/logs")),async getLogFile(e,t,n){let o=(null==n?void 0:n.sanitize)?"?sanitize=true":"";return w("/api/worktrees/".concat(e,"/logs/").concat(t).concat(o))},async killSession(e,t,n){let o=new URLSearchParams;t&&o.set("cliTool",t),n&&o.set("instance",n);let r=o.toString();return w("/api/worktrees/".concat(e,"/kill-session").concat(r?"?".concat(r):""),{method:"POST"})}},b={scan:async e=>w("/api/repositories/scan",{method:"POST",body:JSON.stringify({repositoryPath:e})}),sync:async()=>w("/api/repositories/sync",{method:"POST"}),delete:async e=>w("/api/repositories",{method:"DELETE",body:JSON.stringify({repositoryPath:e})}),async clone(e,t){var n;return w("/api/repositories/clone",{method:"POST",body:JSON.stringify({cloneUrl:e,fork:null!=(n=null==t?void 0:t.fork)&&n})})},getCloneStatus:async e=>w("/api/repositories/clone/".concat(e)),getExcluded:async()=>w("/api/repositories/excluded"),restore:async e=>w("/api/repositories/restore",{method:"PUT",body:JSON.stringify({repositoryPath:e})}),list:async()=>w("/api/repositories"),updateDisplayName:async(e,t)=>w("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({displayName:t})}),updateVisibility:async(e,t)=>w("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({visible:t})}),updateEnabled:async(e,t)=>w("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({enabled:t})}),validatePath:async e=>w("/api/repositories/validate-path",{method:"POST",body:JSON.stringify({repositoryPath:e})})},v={async browse(e){let t=e?"?path=".concat(encodeURIComponent(e)):"";return w("/api/fs/browse".concat(t))},addRecentPath:async e=>w("/api/fs/recent-paths",{method:"POST",body:JSON.stringify({path:e})})},T={getAll:async e=>(await w("/api/worktrees/".concat(e,"/memos"))).memos,create:async(e,t)=>(await w("/api/worktrees/".concat(e,"/memos"),{method:"POST",body:JSON.stringify(t||{})})).memo,update:async(e,t,n)=>(await w("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"PUT",body:JSON.stringify(n)})).memo,delete:async(e,t)=>w("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"DELETE"}),async reorder(e,t){await w("/api/worktrees/".concat(e,"/memos"),{method:"PATCH",body:JSON.stringify({memoIds:t})})}};function S(e){return e instanceof s||e instanceof Error?e.message:"An unknown error occurred"}let k={checkForUpdate:async()=>w("/api/app/update-check",{method:"GET"}),startUpdate:async()=>w("/api/app/update",{method:"POST"}),async ping(){try{return(await fetch("/api/auth/status",{cache:"no-store"})).ok}catch(e){return!1}},async getReleaseNotes(e,t){let n=new URLSearchParams({from:e,to:t});return w("/api/app/release-notes?".concat(n.toString()),{method:"GET"})}}},54014:(e,t,n)=>{n.d(t,{Ab:()=>r,NL:()=>h,O6:()=>f,XH:()=>o,f_:()=>d,hR:()=>l,lu:()=>y,n6:()=>s,oo:()=>u,pQ:()=>a,sw:()=>p,vz:()=>m});let o=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity","command-code","opencode-v2"],r=10,a=50,i=/^[a-zA-Z0-9_-]+$/;function s(e){return"string"==typeof e&&e.length>0&&e.length<=64&&i.test(e)}let c={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity","command-code":"Command Code","opencode-v2":"OpenCode V2"};function l(e){return o.includes(e)}function u(e){var t;return null!=(t=c[e])?t:e}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assistant";return e&&l(e)?u(e):t}function p(e){let t=e.alias;return"string"==typeof t&&t.trim().length>0?t:u(e.cliTool)}function f(e,t,n){let o=e.find(e=>e.id===t);return o?p(o):u(n)}function y(e){return e.map((e,t)=>({id:e,cliTool:e,alias:u(e),order:t}))}let m=128,h=2097152},56936:(e,t,n)=>{n.d(t,{BV:()=>m,Ct:()=>c,Hi:()=>r,K3:()=>i,PS:()=>f,SE:()=>a,SR:()=>s,T2:()=>d,Z3:()=>y,nk:()=>p});var o=n(93025);let r=0;function a(){return(0,o.v8)()+3e4}let i=8e3,s=2,c=2e4,l=[408,425,429,500,502,503,504],u=["GET","HEAD","OPTIONS"],d=3e4;function p(e){let t=(null!=e?e:"GET").toUpperCase();return u.includes(t)}function f(e){return l.includes(e)}function y(e){return p(e)?1e4:3e4}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random(),n=Number.isFinite(e)&&e>0?Math.floor(e):0,o=Math.min(500*2**n,4e3);return Math.max(0,Math.round(o+.25*o*(2*t-1)))}},93025:(e,t,n)=>{n.d(t,{Up:()=>s,v8:()=>i});var o=n(54014);let r={claude:6e4};function a(e){var t;return(null!=(t=r[e])?t:3e4)+5e3}function i(){return Math.max(...o.XH.map(a))}let s=5e3}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5794],{12906:(e,t,n)=>{n.d(t,{Iz:()=>D,W2:()=>T,gM:()=>S,oW:()=>A,vP:()=>L,zX:()=>O});var r=n(95155),a=n(12115),i=n(47650),s=n(20063),o=n(18955),l=n(37772),c=n(32916),u=n(39649),d=n(17653),m=n(22592),p=n(89275),f=n(69858),h=n(86815),x=n(17848),b=n(48481),g=n(98873),w=n(38606),v=n(7636),y=n(76471),k=n(46892),j=n(59854),N=n(77873);function S(e){var t,n,r;return!!(null!=(r=null==(t=e.closest)?void 0:t.call(e,"[data-repository-tab-panel]"))?r:null==(n=e.closest)?void 0:n.call(e,"[".concat(h.K,"]")))}function E(e,t,n){let r=n-8-t;return r<=8?8:Math.min(Math.max(e.left+t>n-8?e.right-t:e.left,8),r)}function C(e,t,n){return Math.max(0,Math.min(t,Math.floor(n-8-(e+4)-2)))}function M(){let[e,t]=(0,a.useState)(()=>window.innerHeight);return(0,a.useEffect)(()=>{let e=()=>t(window.innerHeight);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let I="commandmate:repository-branch-list-open";function R(e){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(I,{detail:e}))}function T(e,t){let n=(0,a.useId)();(0,a.useEffect)(()=>{e&&R(n)},[e,n]),(0,a.useEffect)(()=>{if(!e||"undefined"==typeof document)return;let r=e=>{e.detail!==n&&t()};return document.addEventListener(I,r),()=>document.removeEventListener(I,r)},[e,n,t])}function O(){let{selectWorktree:e,worktrees:t}=(0,u.$f)(),n=(0,p.Hq)();return(0,a.useCallback)(r=>{R(null),e(r);let a=null==t?void 0:t.find(e=>e.id===r);n.push(a?(0,d.f)(a):"/worktrees/".concat(r))},[e,t,n])}function P(e){var t;null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest",inline:"nearest"})}function D(e){let{worktrees:t,repositories:n,sortKey:r,sortDirection:i,repositoryOrder:s}=e,o=(0,a.useMemo)(()=>(0,v.UZ)(null!=n?n:[]),[n]),l=(0,a.useMemo)(()=>(0,v.s6)(null!=t?t:[],o),[t,o]),c=(0,a.useMemo)(()=>l.map(w.XK),[l]),{groupedItems:u}=(0,g.D)({items:c,sortKey:r,sortDirection:i,viewMode:"grouped"});return(0,a.useMemo)(()=>(0,v.Ew)(u,s),[u,s])}let L=(0,a.memo)(function(){var e;let t=(0,o.c)("common"),n=(0,s.usePathname)(),i=O(),{sortKey:d,sortDirection:p,repositoryOrder:f}=(0,c.VF)(),{worktrees:h,repositories:x,selectedWorktreeId:b}=(0,u.$f)(),{factor:g}=(0,m.Ps)(),w=D({worktrees:h,repositories:x,sortKey:d,sortDirection:p,repositoryOrder:f}),y=(0,v.jn)(n,b),k=(0,a.useMemo)(()=>{var e,t;return null!=(t=null==(e=w.find(e=>e.branches.some(e=>e.id===y)))?void 0:e.repositoryName)?t:null},[w,y]),[j,E]=(0,a.useState)(null),[C,M]=(0,a.useState)(null),[I,R]=(0,a.useState)(!1),L=(0,a.useRef)(null),z=(0,a.useRef)(null),K=(0,a.useRef)(new Map),W=(0,a.useCallback)((e,t)=>{t?K.current.set(e,t):K.current.delete(e)},[]),V=(0,a.useCallback)(()=>{E(null),M(null),R(!1)},[]),F=(0,a.useCallback)(e=>{let t=K.current.get(e);if(!t)return;let n=t.getBoundingClientRect();M({left:n.left,right:n.right,bottom:n.bottom}),E(e),R(!1)},[]),H=(0,a.useCallback)(e=>{if(j===e)return void V();F(e)},[j,V,F]),[G,q]=(0,a.useState)(!1),[U,Y]=(0,a.useState)(0),J=(0,a.useCallback)(()=>{let e=L.current;e&&(q(e.scrollWidth>e.clientWidth+1),Y(e.clientWidth))},[]);(0,a.useLayoutEffect)(()=>{J()},[J,w.length,g]),(0,a.useEffect)(()=>(window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)),[J]);let X=(0,a.useRef)(null),Z=(0,a.useCallback)(e=>{var t;if(L.current=e,null==(t=X.current)||t.disconnect(),X.current=null,!e||"undefined"==typeof ResizeObserver)return;let n=new ResizeObserver(()=>J());n.observe(e),X.current=n},[J]),$=null!==j||I;T($,V),(0,a.useEffect)(()=>{if(!$)return;let e=e=>{var t,n;let r=e.target;!(!r||(null==(t=L.current)?void 0:t.contains(r))||(null==(n=z.current)?void 0:n.contains(r)))&&(S(r)||V())},t=e=>{if(!(0,N.V$)(e))return;let t=j?K.current.get(j):z.current;V(),null==t||t.focus()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[$,j,V]),(0,a.useEffect)(()=>{V()},[n,V]),(0,a.useLayoutEffect)(()=>{k&&P(K.current.get(k))},[k,n,G,U]);let Q=(0,a.useCallback)(e=>{V(),i(e)},[V,i]),ee=(0,a.useCallback)(e=>{let t=K.current.get(e);P(t),F(e),null==t||t.focus()},[F]),et=(0,a.useCallback)(e=>{var t;let n=e.currentTarget,r=(t=n.clientWidth,e.ctrlKey||e.shiftKey||Math.abs(e.deltaY)<=Math.abs(e.deltaX)?0:1===e.deltaMode?40*e.deltaY:2===e.deltaMode?e.deltaY*t:e.deltaY);0!==r&&(n.scrollLeft+=r)},[]);if(0===w.length)return null;let en=Math.round(32*g),er=null!=(e=w.find(e=>e.repositoryName===j))?e:null;return(0,r.jsxs)("div",{"data-testid":"repository-tab-bar",className:"relative flex-shrink-0 flex items-stretch border-b border-border bg-sidebar text-sidebar-foreground",style:{height:"".concat(en,"px")},children:[(0,r.jsx)("nav",{ref:Z,"data-testid":"repository-tab-strip","aria-label":t("nav.repositories"),onWheel:et,className:"flex min-w-0 flex-1 flex-nowrap items-stretch overflow-x-auto overflow-y-hidden scrollbar-hide",children:w.map(e=>(0,r.jsx)(_,{group:e,isActive:e.repositoryName===k,isOpen:e.repositoryName===j,registerTab:W,onToggle:H},e.repositoryName))}),G&&(0,r.jsx)("button",{ref:z,type:"button","data-testid":"repository-tab-overflow","aria-haspopup":"menu","aria-expanded":I,"aria-label":t("repoTabBar.overflow"),title:t("repoTabBar.overflow"),onClick:()=>{E(null),M(null),R(e=>!e)},className:"flex-shrink-0 flex items-center border-l border-sidebar-border px-2 text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:(0,r.jsx)(l.A,{size:16,strokeWidth:2,"aria-hidden":"true"})}),er&&C&&(0,r.jsx)(A,{group:er,anchor:C,factor:g,activeWorktreeId:y,onBranchClick:Q}),I&&(0,r.jsx)(B,{groups:w,anchorRef:z,activeRepositoryName:k,onSelect:ee})]})}),_=(0,a.memo)(function(e){let{group:t,isActive:n,isOpen:a,registerTab:i,onToggle:s}=e,l=(0,o.c)("common"),c=(0,v.zD)(t.branches),u=(0,y.Mq)(c,(0,v.El)(t.branches)),d=(0,v.j)(t.branches),m=l(u?y.rH:k.PL[c].labelKey);return(0,r.jsx)("button",{ref:e=>i(t.repositoryName,e),type:"button","data-testid":"repository-tab","data-repository":t.repositoryName,"aria-haspopup":"menu","aria-expanded":a,"aria-current":n?"true":void 0,title:"".concat(t.repositoryName," — ").concat(m),onClick:()=>s(t.repositoryName),onKeyDown:e=>{"ArrowDown"===e.key&&(e.preventDefault(),a||s(t.repositoryName))},className:"group/tab flex-shrink-0 flex max-w-[14rem] items-stretch px-0.5 py-1 text-xs font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:(0,r.jsxs)("span",{"data-testid":"repository-tab-chip",className:"flex min-w-0 items-center gap-1.5 rounded-md px-2 transition-colors ".concat(n?"bg-background text-foreground shadow-sm":"text-sidebar-muted group-hover/tab:bg-sidebar-hover group-hover/tab:text-sidebar-foreground"),children:[(0,r.jsx)(x.n,{className:"h-3.5 w-3.5",color:(0,v.LV)(t.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 truncate",children:t.repositoryName}),(0,r.jsx)(b.m,{status:c,size:"sm",label:m,className:u?y.Jd:void 0,"data-testid":"repository-tab-status"}),d>0&&(0,r.jsx)("span",{"data-testid":"repository-tab-attention-count","aria-label":l("attention.badgeLabel",{count:d}),className:"flex-shrink-0 rounded-full bg-warning-subtle px-1.5 text-[10px] font-semibold leading-4 tabular-nums text-warning-foreground",children:d})]})})});function A(e){let{group:t,anchor:n,factor:s,activeWorktreeId:l,onBranchClick:c}=e,u=(0,o.c)("common"),d=(0,a.useRef)(null),m=M();if((0,a.useEffect)(()=>{var e;let t=null==(e=d.current)?void 0:e.querySelector("button");null==t||t.focus()},[t.repositoryName]),"undefined"==typeof document)return null;let p=Math.round(300*s),h=window.innerWidth;return i.createPortal((0,r.jsx)("div",{ref:d,"data-repository-tab-panel":"","data-testid":"repository-tab-popover","data-repository":t.repositoryName,role:"menu","aria-label":u("sidebar.branchNavigation"),className:"fixed rounded-md border border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg",style:{top:n.bottom+4,left:E(n,p,h),width:p,zIndex:j.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-popover-list",className:"overflow-y-auto overflow-x-hidden py-1",style:{maxHeight:"".concat(C(n.bottom,Math.round(520*s),m),"px")},children:0===t.branches.length?(0,r.jsx)("p",{className:"px-4 py-6 text-center text-sm text-sidebar-muted",children:u("sidebar.noBranchesAvailable")}):t.branches.map(e=>(0,r.jsx)(f.yP,{branch:e,isSelected:e.id===l,onClick:()=>c(e.id),showRepositoryName:!1},e.id))})}),document.body)}function B(e){var t;let{groups:n,anchorRef:a,activeRepositoryName:s,onSelect:l}=e,c=(0,o.c)("common"),u=M(),d=null==(t=a.current)?void 0:t.getBoundingClientRect();if("undefined"==typeof document||!d)return null;let m=window.innerWidth;return i.createPortal((0,r.jsx)("div",{"data-repository-tab-panel":"","data-testid":"repository-tab-overflow-menu",role:"menu","aria-label":c("nav.repositories"),className:"fixed rounded-md border border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg",style:{top:d.bottom+4,left:E({left:d.left,right:d.right,bottom:d.bottom},300,m),width:300,zIndex:j.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-overflow-list",className:"overflow-y-auto py-1",style:{maxHeight:"".concat(C(d.bottom,520,u),"px")},children:n.map(e=>{let t=(0,v.zD)(e.branches),n=(0,y.Mq)(t,(0,v.El)(e.branches));return(0,r.jsxs)("button",{type:"button",role:"menuitem","data-testid":"repository-tab-overflow-item","data-repository":e.repositoryName,"aria-current":e.repositoryName===s?"true":void 0,onClick:()=>l(e.repositoryName),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[(0,r.jsx)(x.n,{className:"h-3.5 w-3.5",color:(0,v.LV)(e.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.repositoryName}),(0,r.jsx)(b.m,{status:t,size:"sm",label:c(n?y.rH:k.PL[t].labelKey),className:n?y.Jd:void 0}),(0,r.jsx)("span",{className:"tabular-nums text-xs text-sidebar-muted",children:e.branches.length})]},e.repositoryName)})})}),document.body)}},17653:(e,t,n)=>{n.d(t,{f:()=>o});var r=n(54014),a=n(55449),i=n(38606),s=n(7636);function o(e){let t=function(e){var t;let n=e.sessionStatusByInstance;if(!n)return null;let s=(e.agentInstances&&e.agentInstances.length>0?e.agentInstances:(0,r.lu)(null!=(t=e.selectedAgents)?t:(0,a.sA)())).map((e,t)=>({instance:e,index:t})).sort((e,t)=>{var n,r;return(null!=(n=e.instance.order)?n:0)-(null!=(r=t.instance.order)?r:0)||e.index-t.index}).map(e=>{let{instance:t}=e;return t}).flatMap((e,t)=>{let r=n[e.id];return(null==r?void 0:r.isWaitingForResponse)?[{id:e.id,index:t,entry:r}]:[]});if(0===s.length)return null;let{waitingKind:o}=(0,i.f_)(e),l=o?s.filter(e=>e.entry.waitingKind===o):[],c=(l.length>0?l:s).flatMap(e=>{let t=e.entry.waitingSince;return"number"==typeof t&&Number.isFinite(t)?[{...e,since:t}]:[]});return 0===c.length?null:(c.sort((e,t)=>e.since-t.since||e.index-t.index),c[0].id)}(e);return null===t?"/worktrees/".concat(e.id):(0,s.Ii)({worktreeId:e.id,instanceId:t})}},18848:(e,t,n)=>{n.d(t,{Bz:()=>i,kj:()=>a,wx:()=>r}),n(95704);let r=["send","wait","capture","respond"];function a(e){let{binary:t,worktreeId:n,instanceId:r,messagePlaceholder:a}=e,i=null!=e.portPrefix&&3e3!==e.portPrefix?"CM_PORT=".concat(e.portPrefix," "):"",s="--instance ".concat(r),o="".concat(i).concat(t);return{send:"".concat(o," send ").concat(n,' "').concat(a,'" ').concat(s),wait:"".concat(o," wait ").concat(n," ").concat(s," --on-prompt human"),capture:"".concat(o," capture ").concat(n," ").concat(s),respond:"".concat(o," respond ").concat(n,' "').concat("1",'" ').concat(s)}}function i(e){let{binary:t,worktreeId:n,instanceId:r,instanceLabel:a,toolLabel:i}=e,s=null!=e.portPrefix&&3e3!==e.portPrefix?"CM_PORT=".concat(e.portPrefix," "):"",o="".concat(s).concat(t),l="--instance ".concat(r),c="ja"===e.locale?"ja":"en",u="".concat(o," capture ").concat(n," ").concat(l," --pane --tail ").concat(60),d="".concat(o," ask ").concat(n," ").concat(l,' "<request>" --async');if("ja"===c){let e="".concat(o," ask ").concat(n," ").concat(l,' "<依頼文>" --timeout ').concat(1800);return["## 別セッション「".concat(a,"」への委任"),"- 宛先: worktree `".concat(n,"` / instance `").concat(r,"`(").concat(i,")"),"- 依頼: ".concat(e)," - exit 0: 標準出力が返答本文\n - exit 10: 相手が確認待ち。標準出力のprompt JSONを私に報告して止まる(自分で答えない)\n - exit 124: タイムアウト。captureで状況を見て報告","- 待たない依頼: ".concat(d)," - 即座に relay id を返して exit 0。完了時に `[from ...]` 付きで返答が私のコンポーザーに届く"," - 状況確認: ".concat(o," relays / 取り消し: ").concat(o," relays cancel <relay-id>"),"- 進捗確認: ".concat(u),"- 禁止: respondで相手のプロンプトに答える / auto-yesを有効化する"].join("\n")}let m="".concat(o," ask ").concat(n," ").concat(l,' "<request>" --timeout ').concat(1800);return['## Delegating to session "'.concat(a,'"'),"- Target: worktree `".concat(n,"` / instance `").concat(r,"` (").concat(i,")"),"- Ask: ".concat(m)," - exit 0: stdout is the reply body\n - exit 10: they are waiting on a confirmation. Report the prompt JSON on stdout back to me and stop (do not answer it yourself)\n - exit 124: timed out. Look with capture and report what you see","- Ask without waiting: ".concat(d)," - exits 0 with a relay id on stdout; the reply lands in my composer prefixed `[from ...]` when the turn ends"," - Outstanding: ".concat(o," relays / withdraw: ").concat(o," relays cancel <relay-id>"),"- Progress: ".concat(u),"- Do not: answer their prompt with respond / turn auto-yes on"].join("\n")}},22592:(e,t,n)=>{n.d(t,{Ps:()=>d,W5:()=>u});var r=n(95155),a=n(12115),i=n(38218),s=n(68704);let o="data-pc-size",l={size:s.r5,setSize:()=>{},isMobile:!1,factor:s.d8[s.r5].factor,isAvailable:!1},c=(0,a.createContext)(l);function u(e){let{children:t}=e,{size:n,setSize:l,isAvailable:u}=(0,s.of)(),d=(0,i.a)();(0,a.useEffect)(()=>{if("undefined"==typeof document)return;let e=document.documentElement;return d?void e.removeAttribute(o):(e.setAttribute(o,n),()=>{e.removeAttribute(o)})},[n,d]);let m=(0,a.useMemo)(()=>({size:n,setSize:l,isMobile:d,factor:s.d8[n].factor,isAvailable:u}),[n,l,d,u]);return(0,r.jsx)(c.Provider,{value:m,children:t})}function d(){return(0,a.useContext)(c)}},26020:(e,t,n)=>{n.d(t,{Xn:()=>a,d9:()=>o,dI:()=>r,gB:()=>i,vK:()=>s});let r=["en","ja"],a="en",i="locale",s={en:"English",ja:"日本語"};function o(e){return"string"==typeof e&&r.includes(e)}},30061:(e,t,n)=>{n.d(t,{nR:()=>s});var r=n(95155),a=n(12115),i=n(47650);function s(e){let{content:t,delay:n=200,className:s,children:o,metadata:l}=e,c=(0,a.useRef)(null),u=(0,a.useRef)(null),d=(0,a.useRef)(null),m=(0,a.useRef)(null),[p,f]=(0,a.useState)(!1),[h,x]=(0,a.useState)({top:-9999,left:-9999}),b=(0,a.useCallback)(()=>{null!==d.current&&(clearTimeout(d.current),d.current=null)},[]),g=(0,a.useCallback)(()=>{let e=c.current;e&&(e.scrollWidth>e.clientWidth||l)&&(b(),d.current=setTimeout(()=>{let t=e.getBoundingClientRect(),n=Math.max(4,window.innerWidth-384-4);m.current={top:t.top,bottom:t.bottom},x({top:t.bottom+4,left:Math.min(t.left,n)}),f(!0),d.current=null},n))},[b,n,l]);(0,a.useLayoutEffect)(()=>{if(!p)return;let e=u.current,t=m.current;if(!e||!t)return;let{height:n}=e.getBoundingClientRect();if(n<=0)return;let r=window.innerHeight;if(t.bottom+4+n+4<=r)return;let a=t.top-4-n,i=a>=4?a:Math.max(4,r-n-4);x(e=>e.top===i?e:{...e,top:i})},[p]);let w=(0,a.useCallback)(()=>{b(),f(!1)},[b]);return(0,a.useEffect)(()=>()=>b(),[b]),(0,r.jsxs)("span",{ref:c,className:s,onMouseEnter:g,onMouseLeave:w,children:[null!=o?o:t,p&&"undefined"!=typeof document&&(0,i.createPortal)((0,r.jsxs)("span",{ref:u,role:"tooltip","aria-hidden":"true",className:"fixed z-[9999] max-w-md px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{top:h.top,left:h.left},children:[(0,r.jsx)("span",{className:"block break-all",children:t}),l&&(0,r.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:l})]}),document.body)]})}},32916:(e,t,n)=>{n.d(t,{GB:()=>m,P0:()=>s,RA:()=>o,VF:()=>p,e8:()=>l,pT:()=>f});var r=n(95155),a=n(12115),i=n(7636);let s="updatedAt",o="desc",l="grouped",c=(0,a.createContext)(null);function u(e,t,n,r){let i=(0,a.useRef)(!0);(0,a.useEffect)(()=>{try{let t=localStorage.getItem(e);t&&r(t)}catch(e){}},[]),(0,a.useEffect)(()=>{if(i.current){i.current=!1;return}try{localStorage.setItem(e,n())}catch(e){}},[t])}function d(e,t){switch(t.type){case"TOGGLE":return{...e,isOpen:!e.isOpen};case"SET_WIDTH":return{...e,width:t.width};case"OPEN_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!0};case"CLOSE_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!1};case"SET_SORT_KEY":return{...e,sortKey:t.sortKey};case"SET_SORT_DIRECTION":return{...e,sortDirection:t.sortDirection};case"LOAD_SORT_SETTINGS":return{...e,sortKey:t.sortKey,sortDirection:t.sortDirection};case"SET_VIEW_MODE":return{...e,viewMode:t.viewMode};case"SET_OPEN":return e.isOpen===t.isOpen?e:{...e,isOpen:t.isOpen};case"SET_REPOSITORY_ORDER":return{...e,repositoryOrder:t.repositoryOrder};case"SET_REPO_TAB_BAR_MODE":return{...e,repoTabBarMode:t.repoTabBarMode};default:return e}}function m(e){let{children:t,initialOpen:n=!0,initialWidth:m=224}=e,[p,f]=(0,a.useReducer)(d,{isOpen:n,width:m,isMobileDrawerOpen:!1,sortKey:s,sortDirection:o,viewMode:l,repositoryOrder:(0,i.ZD)(),repoTabBarMode:i.PB});u("mcbd-sidebar-sort","".concat(p.sortKey,":").concat(p.sortDirection),()=>JSON.stringify({sortKey:p.sortKey,sortDirection:p.sortDirection}),e=>{try{let t=JSON.parse(e),n=t.sortDirection,r=(0,i.Si)(t.sortKey)?t.sortKey:s;r&&("asc"===n||"desc"===n)&&f({type:"LOAD_SORT_SETTINGS",sortKey:r,sortDirection:n})}catch(e){}}),u("mcbd-sidebar-view-mode",p.viewMode,()=>p.viewMode,e=>{(0,i.$m)(e)&&f({type:"SET_VIEW_MODE",viewMode:e})}),u("mcbd-sidebar-width",p.width,()=>String(p.width),e=>{let t=Number(e);!isNaN(t)&&t>0&&f({type:"SET_WIDTH",width:288===t?224:t})}),u("mcbd-sidebar-open",p.isOpen,()=>String(p.isOpen),e=>{("true"===e||"false"===e)&&f({type:"SET_OPEN",isOpen:"true"===e})}),u("mcbd-repo-tab-bar-mode",p.repoTabBarMode,()=>p.repoTabBarMode,e=>{(0,i.m3)(e)&&f({type:"SET_REPO_TAB_BAR_MODE",repoTabBarMode:e})});let h=(0,a.useCallback)(()=>{f({type:"TOGGLE"})},[]),x=(0,a.useCallback)(e=>{f({type:"SET_WIDTH",width:e})},[]),b=(0,a.useCallback)(()=>{f({type:"OPEN_MOBILE_DRAWER"})},[]),g=(0,a.useCallback)(()=>{f({type:"CLOSE_MOBILE_DRAWER"})},[]),w=(0,a.useCallback)(e=>{f({type:"SET_SORT_KEY",sortKey:e})},[]),v=(0,a.useCallback)(e=>{f({type:"SET_SORT_DIRECTION",sortDirection:e})},[]),y=(0,a.useCallback)(e=>{f({type:"SET_VIEW_MODE",viewMode:e})},[]),k=(0,a.useCallback)(e=>{f({type:"SET_REPOSITORY_ORDER",repositoryOrder:e}),(0,i.ZC)(e)},[]),j=(0,a.useCallback)(e=>{f({type:"SET_REPO_TAB_BAR_MODE",repoTabBarMode:e})},[]),N=(0,a.useMemo)(()=>({isOpen:p.isOpen,width:p.width,isMobileDrawerOpen:p.isMobileDrawerOpen,sortKey:p.sortKey,sortDirection:p.sortDirection,toggle:h,setWidth:x,openMobileDrawer:b,closeMobileDrawer:g,setSortKey:w,setSortDirection:v,viewMode:p.viewMode,setViewMode:y,repositoryOrder:p.repositoryOrder,setRepositoryOrder:k,repoTabBarMode:p.repoTabBarMode,setRepoTabBarMode:j}),[p.isOpen,p.width,p.isMobileDrawerOpen,p.sortKey,p.sortDirection,p.viewMode,p.repositoryOrder,p.repoTabBarMode,h,x,b,g,w,v,y,k,j]);return(0,r.jsx)(c.Provider,{value:N,children:t})}function p(){let e=(0,a.useContext)(c);if(!e)throw Error("useSidebarContext must be used within a SidebarProvider");return e}function f(){return(0,a.useContext)(c)}},41898:(e,t,n)=>{n.d(t,{m_:()=>f});var r=n(95155),a=n(12115),i=n(47650),s=n(77873);function o(e,t,n){return Math.min(Math.max(e,4),Math.max(4,n-t-4))}function l(e,t,n,r){switch(e){case"top":return t.top-n.height-8<4;case"bottom":return t.top+t.height+8+n.height>r.height-4;case"left":return t.left-n.width-8<4;default:return t.left+t.width+8+n.width>r.width-4}}function c(e,t,n){switch(e){case"top":return Math.max(0,t.top-8-4);case"bottom":return Math.max(0,n.height-4-(t.top+t.height+8));case"left":return Math.max(0,t.left-8-4);default:return Math.max(0,n.width-4-(t.left+t.width+8))}}function u(e){return{maxWidth:"".concat(e,"px"),whiteSpace:"normal",overflowWrap:"anywhere"}}let d={maxWidth:"max-width",whiteSpace:"white-space",overflowWrap:"overflow-wrap"};function m(e,t){let n=null===t?null:u(t);for(let[t,r]of Object.entries(d))null===n?e.style.removeProperty(r):e.style.setProperty(r,n[t])}let p={top:-9999,left:-9999};function f(e){let{content:t,placement:n="right",delay:d=100,children:f,className:h,zIndex:x,fallbackPlacement:b}=e,[g,w]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),k=g||v,[j,N]=(0,a.useState)(null),[S,E]=(0,a.useState)(null),C=(0,a.useRef)(null),M=(0,a.useRef)(null),I=(0,a.useRef)(null),R=(0,a.useCallback)(()=>{null!==I.current&&(clearTimeout(I.current),I.current=null)},[]),T=(0,a.useCallback)(()=>{R(),I.current=setTimeout(()=>{w(!0),I.current=null},d)},[d,R]),O=(0,a.useCallback)(()=>{R(),w(!1)},[R]),P=(0,a.useCallback)(()=>{y(!0)},[]),D=(0,a.useCallback)(()=>{y(!1)},[]),L=(0,a.useCallback)(()=>{R(),w(!1),y(!1)},[R]),_=(0,a.useCallback)(()=>{let e=C.current,t=M.current;if(!e||!t)return;let r=e.getBoundingClientRect(),a={top:r.top,left:r.left,width:r.width,height:r.height},i={width:window.innerWidth,height:window.innerHeight};m(t,null);let s=t.getBoundingClientRect(),u=function(e,t,n,r,a){let i=e=>"left"===e||"right"===e;if(void 0===a||a===e||!i(e)||!i(a)||!l(e,t,n,r)||!l(a,t,n,r))return null;let s=c(e,t,r),o=c(a,t,r),u=o>s?a:e,d=Math.floor(Math.max(s,o));return d>=80?{placement:u,maxWidth:d}:null}(n,a,{width:s.width,height:s.height},i,b);u&&(m(t,u.maxWidth),s=t.getBoundingClientRect()),E(u?u.maxWidth:null),N(function e(t,n,r,a,i){let s,c;if(void 0!==i&&i!==t&&l(t,n,r,a)&&!l(i,n,r,a))return e(i,n,r,a);let u=n.left+n.width/2-r.width/2,d=n.top+n.height/2-r.height/2;switch(t){case"top":s=n.top-r.height-8,c=u;break;case"bottom":s=n.top+n.height+8,c=u;break;case"left":s=d,c=n.left-r.width-8;break;default:s=d,c=n.left+n.width+8}return{top:o(s,r.height,a.height),left:o(c,r.width,a.width)}}(u?u.placement:n,a,{width:s.width,height:s.height},i,u?void 0:b))},[n,b]);return(0,a.useLayoutEffect)(()=>{if(!k){N(null),E(null);return}return _(),window.addEventListener("resize",_),window.addEventListener("scroll",_,!0),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_,!0)}},[k,_]),(0,a.useEffect)(()=>{if(!k)return;let e=e=>{(0,s.V$)(e)&&L()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[k,L]),(0,a.useEffect)(()=>()=>{R()},[R]),(0,r.jsxs)("span",{ref:C,"data-testid":"tooltip-wrapper",className:h?"relative inline-flex ".concat(h):"relative inline-flex",tabIndex:-1,onMouseEnter:T,onMouseLeave:O,onFocus:P,onBlur:D,children:[f,k&&"undefined"!=typeof document&&(0,i.createPortal)((0,r.jsx)("span",{ref:M,role:"tooltip","aria-hidden":"true","data-placement":n,className:"fixed z-40 whitespace-nowrap px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{...null!=j?j:p,...void 0===x?{}:{zIndex:x},...null===S?{}:u(S)},children:t}),document.body)]})}},45195:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(36809),a=n(26020);function i(){return{currentLocale:(0,r.Ym)(),switchLocale:e=>{if(a.dI.includes(e)){let t="https:"===window.location.protocol;document.cookie="".concat(a.gB,"=").concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax").concat(t?";Secure":""),localStorage.setItem("locale",e),window.location.reload()}}}}},45573:(e,t,n)=>{n.d(t,{P0:()=>en,oQ:()=>et,tJ:()=>Z,xk:()=>ee,xq:()=>ea,yW:()=>er});var r=n(95155),a=n(12115),i=n(47650),s=n(20063),o=n(89275),l=n(18955),c=n(36809),u=n(5379),d=n(79698),m=n(66685),p=n(24533),f=n(61362),h=n(95740),x=n(37772),b=n(11010),g=n(59427),w=n(37494),v=n(79451),y=n(89559),k=n(97470),j=n(94684),N=n(76482),S=n(39332),E=n(86651),C=n(18085),M=n(87531),I=n(59854),R=n(92614),T=n(70628),O=n(51743),P=n(22592),D=n(66966),L=n(68704),_=n(45195),A=n(80344),B=n(48481),z=n(76471),K=n(38606),W=n(79651),V=n(46365),F=n(94442),H=n(18848),G=n(54014);let q=[{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"skills",href:"/skills"},{key:"more",href:"/more"}],U={sessions:m.A,repositories:p.A,review:f.A,skills:h.A,more:x.A},Y="cm.palette.recents";function J(e){if(!e||"object"!=typeof e)return!1;let{kind:t,id:n}=e;return("nav"===t||"worktree"===t||"action"===t)&&"string"==typeof n}function X(e){var t;let{worktree:n,className:a}=e,i=(0,l.c)("common"),s=n.isWaitingForResponse?"waiting":n.isProcessing?"running":n.isSessionRunning?"ready":"idle",o=(0,z.Mq)(s,Object.values(null!=(t=n.sessionStatusByCli)?t:{}).some(e=>(0,K.px)(e)));return(0,r.jsx)(B.m,{status:s,size:"sm",label:o?i(z.rH):void 0,className:(0,M.cn)(a,o&&z.Jd),"data-unclassified":o?"true":void 0})}function Z(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return!!("INPUT"===t||"TEXTAREA"===t||"SELECT"===t||e.isContentEditable||e.closest('[role="log"]'))}let $=(0,M.cn)("flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm","text-foreground","data-[selected=true]:bg-accent-500/15 data-[selected=true]:text-accent-700","dark:data-[selected=true]:text-accent-300"),Q="shrink-0 text-muted-foreground";function ee(){var e;if("undefined"==typeof document)return null;let t=document.querySelector("[data-instance-id]");return(null==t||null==(e=t.getAttribute("data-instance-id"))?void 0:e.trim())||null}function et(e){var t,n;if("undefined"==typeof document)return!1;let r=Array.from(document.querySelectorAll('[data-testid="message-input-textarea"]'));if(0===r.length)return!1;let a=document.activeElement,i=null!=(n=r.find(e=>e===a))?n:r[0],s=i.value,o=""===s.trim()?e:"".concat(s,"\n\n").concat(e),l=null==(t=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value"))?void 0:t.set;return l?l.call(i,o):i.value=o,i.dispatchEvent(new Event("input",{bubbles:!0})),i.focus(),i.setSelectionRange(o.length,o.length),!0}async function en(e,t,n){try{let[r,a]=await Promise.all([fetch("/api/worktrees/".concat(e,"/cli-reference")),fetch("/api/worktrees/".concat(e,"/resolve-target?instance=").concat(encodeURIComponent(t.id)))]);if(!r.ok||!a.ok)return null;let[i,s]=await Promise.all([r.json(),a.json()]);return(0,H.Bz)({binary:i.binary,worktreeId:i.worktreeId,instanceId:s.instanceId,instanceLabel:t.alias,toolLabel:(0,G.oo)(s.cliToolId),portPrefix:i.portPrefix,locale:n})}catch(e){return null}}let er={ja:{heading:"委任 (/delegate)",menuItem:"委任方法をコンポーザーに挿入",inserted:"委任方法をコンポーザーに挿入しました",self:"自分自身には委任できません",noComposer:"コンポーザーが見つかりません。worktree 画面を開いてから実行してください",failed:"委任方法を作成できませんでした"},en:{heading:"Delegate (/delegate)",menuItem:"Insert delegation brief into the composer",inserted:"Delegation brief inserted into the composer",self:"That is this session — nothing to delegate to",noComposer:"No composer on screen. Open a worktree screen and try again",failed:"Could not build the delegation brief"}};function ea(){var e,t,n;let{open:m,setOpen:p}=(0,R.C)(),{setOpen:f}=(0,T.K)(),{openNewTask:h}=(0,O.hX)(),x=(0,o.Hq)(),B=(0,s.usePathname)(),z=(0,c.Ym)(),K=(0,l.c)("commandPalette"),H=(0,l.c)("common"),{theme:ea,setTheme:ei}=(0,u.D)(),{setSize:es,isMobile:eo}=(0,P.Ps)(),{currentLocale:el,switchLocale:ec}=(0,_.g)(),eu=(0,D.rC)(),{showToast:ed}=(0,F.dj)(),[em,ep]=(0,a.useState)(!1),[ef,eh]=(0,a.useState)(""),[ex,eb]=(0,a.useState)([]),eg=(0,a.useRef)(null),ew=(0,a.useRef)(null),ev=(0,a.useRef)(m);(0,a.useEffect)(()=>{ev.current=m},[m]),(0,a.useEffect)(()=>{ep(!0)},[]),(0,a.useEffect)(()=>{function e(e){if(("k"===e.key||"K"===e.key)&&(e.metaKey||e.ctrlKey)){if(ev.current){e.preventDefault(),e.stopPropagation(),p(!1);return}if(Z(e.target)||(0,V.Sj)())return;e.preventDefault(),p(!0);return}"Escape"===e.key&&ev.current&&(e.preventDefault(),e.stopPropagation(),p(!1))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p]),(0,a.useEffect)(()=>{var e,t,n,r;m?(ew.current=null!=(t=document.activeElement)?t:null,null==(e=eg.current)||e.focus(),eh(""),eb(function(){try{let e=localStorage.getItem(Y);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(J).slice(0,8)}catch(e){return[]}}())):ew.current&&(null==(n=(r=ew.current).focus)||n.call(r),ew.current=null)},[m]);let ey=(0,a.useCallback)((e,t)=>{t&&eb(e=>(function(e,t){let n=e.filter(e=>e.kind!==t.kind||e.id!==t.id),r=[t,...n].slice(0,8);try{localStorage.setItem(Y,JSON.stringify(r))}catch(e){}return r})(e,t)),p(!1),e()},[p]),ek=(0,a.useCallback)(async e=>{let t=er["ja"===z?"ja":"en"];if(function(e){let t=/^\/worktrees\/([^/?#]+)/.exec(null!=e?e:"");return t?decodeURIComponent(t[1]):null}(B)===e.worktree.id&&ee()===e.instance.id)return void ed(t.self,"info");let n=await en(e.worktree.id,e.instance,z);if(null===n)return void ed(t.failed,"error");let r=et(n);ed(r?t.inserted:t.noComposer,r?"success":"error")},[z,B,ed]),ej=(0,a.useCallback)(async()=>{try{var e;await A.Rx.sync(),await (null==eu||null==(e=eu.refresh)?void 0:e.call(eu)),ed(K("actions.syncSuccess"),"success")}catch(e){ed(K("actions.syncError"),"error")}},[eu,ed,K]),eN="dark"===ea,eS=""===ef.trim(),eE=null!=(e=null==eu?void 0:eu.error)?e:null,eC=null!=(t=null==eu?void 0:eu.isLoading)&&t,eM=eE?[]:null!=(n=null==eu?void 0:eu.worktrees)?n:[],eI=eM.length>0,eR=!eE&&eC&&0===eM.length,eT=!function(e){let t=e.trim().toLowerCase();return""!==t&&(t.startsWith("/")||t.includes("delegate"))}(ef)?[]:function(e){let t=[];for(let r of e){var n;for(let e of(null==(n=r.agentInstances)?void 0:n.length)?r.agentInstances:r.cliToolId?[{id:r.cliToolId,cliTool:r.cliToolId,alias:(0,G.oo)(r.cliToolId),order:0}]:[])t.push({worktree:r,instance:e})}return t}(eM),eO=er["ja"===z?"ja":"en"],eP=[...eM].sort((e,t)=>{let n=+!!e.isSessionRunning,r=+!!t.isSessionRunning;if(n!==r)return r-n;let a=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-a}),eD=eS?eP.slice(0,8):eP,eL=[{id:"newTask",label:K("actions.newTask"),icon:b.A,run:()=>queueMicrotask(()=>h())},{id:"theme",label:eN?K("actions.toLight"):K("actions.toDark"),icon:eN?g.A:w.A,run:()=>ei(eN?"light":"dark")},...eo?[]:L.Uf.map(e=>({id:"displaysize:".concat(e),label:"".concat(K("actions.displaySizePrefix"),": ").concat(H("displaySize.".concat(e))),icon:v.A,run:()=>es(e)})),{id:"sync",label:K("actions.syncRepositories"),icon:y.A,run:()=>{ej()}},{id:"locale",label:K("actions.switchLanguage"),icon:k.A,run:()=>ec("ja"===el?"en":"ja")},{id:"github",label:K("actions.openGitHub"),icon:j.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:K("actions.keyboardShortcuts"),icon:N.A,run:()=>f(!0)}],e_=eS?ex.map(e=>{if("nav"===e.kind){let t=q.find(t=>t.key===e.id);if(!t)return null;let n=U[t.key],a=H("nav.".concat(t.key));return{id:"nav-".concat(t.key),value:"recent nav ".concat(t.key),node:(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:a})]}),onSelect:()=>ey(()=>x.push(t.href),{kind:"nav",id:t.key})}}if("worktree"===e.kind){let t=eM.find(t=>t.id===e.id);if(!t)return null;let n=t.repositoryDisplayName||t.repositoryName||"",a=t.branch||t.name;return{id:"worktree-".concat(t.id),value:"recent worktree ".concat(t.id),node:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:a}),n&&(0,r.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:n}),(0,r.jsx)(X,{worktree:t,className:n?"ml-2":"ml-auto"})]}),onSelect:()=>ey(()=>x.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id})}}let t=eL.find(t=>t.id===e.id);if(!t)return null;let n=t.icon;return{id:"action-".concat(t.id),value:"recent action ".concat(t.id),node:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:t.label})]}),onSelect:()=>ey(t.run,{kind:"action",id:t.id})}}).filter(e=>null!==e):[];return em?(0,i.createPortal)((0,r.jsx)(r.Fragment,{children:m&&(0,r.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:I.M.MODAL},"data-testid":"command-palette",children:[(0,r.jsx)("div",{"data-state":"open","aria-hidden":"true",className:"fixed inset-0 bg-black/40 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",onClick:()=>p(!1)}),(0,r.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,r.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,M.cn)("relative w-full max-w-lg overflow-hidden rounded-xl bg-surface/95 shadow-2xl ring-1 ring-border backdrop-blur-xl","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-200"),children:(0,r.jsxs)(d.uB,{label:K("title"),className:(0,M.cn)("flex flex-col","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,r.jsx)(E.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,r.jsx)(d.uB.Input,{ref:eg,value:ef,onValueChange:eh,placeholder:K("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,r.jsxs)(d.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,r.jsx)(d.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:K("empty")}),eR&&(0,r.jsx)(d.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:K("loading")}),e_.length>0&&(0,r.jsx)(d.uB.Group,{heading:K("groups.recent"),children:e_.map(e=>(0,r.jsx)(d.uB.Item,{value:e.value,onSelect:e.onSelect,className:$,children:e.node},e.id))}),(0,r.jsx)(d.uB.Group,{heading:K("groups.navigation"),children:q.map(e=>{let t=H("nav.".concat(e.key)),n=U[e.key];return(0,r.jsxs)(d.uB.Item,{value:"nav ".concat(t," ").concat(e.href),onSelect:()=>ey(()=>x.push(e.href),{kind:"nav",id:e.key}),className:$,children:[n&&(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:t})]},e.key)})}),eI&&(function(e){let t=new Map;for(let n of e){let e=n.repositoryDisplayName||n.repositoryName||"",r=e||"\0unnamed",a=t.get(r);a?a.worktrees.push(n):t.set(r,{key:r,repository:e,worktrees:[n]})}return[...t.values()]})(eD).map(e=>(0,r.jsx)(d.uB.Group,{heading:e.repository||K("groups.worktrees"),children:e.worktrees.map(t=>{let n=t.branch||t.name;return(0,r.jsxs)(d.uB.Item,{value:"worktree ".concat(e.repository," ").concat(n," ").concat(t.name," ").concat(t.id),onSelect:()=>ey(()=>x.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id}),className:$,children:[(0,r.jsx)(S.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:n}),(0,r.jsx)(X,{worktree:t,className:"ml-auto"})]},t.id)})},e.key)),eT.length>0&&(0,r.jsx)(d.uB.Group,{heading:eO.heading,children:eT.map(e=>{let t=e.worktree.branch||e.worktree.name;return(0,r.jsxs)(d.uB.Item,{"data-testid":"palette-delegate-".concat(e.worktree.id,"-").concat(e.instance.id),value:"/delegate ".concat(e.worktree.id," ").concat(e.instance.id," ").concat(e.instance.alias," ").concat(t),onSelect:()=>ey(()=>{ek(e)}),className:$,children:[(0,r.jsx)(C.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:e.instance.alias}),(0,r.jsxs)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:[t," / ",e.instance.id]})]},"".concat(e.worktree.id,":").concat(e.instance.id))})}),(0,r.jsx)(d.uB.Group,{heading:K("groups.actions"),children:eL.map(e=>{let t=e.icon;return(0,r.jsxs)(d.uB.Item,{value:"action ".concat(e.id," ").concat(e.label),onSelect:()=>ey(e.run,{kind:"action",id:e.id}),className:$,children:[(0,r.jsx)(t,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:e.label})]},e.id)})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 border-t border-border bg-surface-2 px-3 py-2 text-[11px] text-muted-foreground",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"↑"}),(0,r.jsx)(W.u,{children:"↓"}),K("footer.navigate")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"↵"}),K("footer.select")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"esc"}),K("footer.close")]})]})]})})})]})}),document.body):null}},46365:(e,t,n)=>{function r(e){let t=e.ownerDocument.defaultView;for(let n=e;n;n=n.parentElement)if(n instanceof HTMLElement&&n.hidden||t&&"none"===t.getComputedStyle(n).display)return!1;return!0}function a(){return"undefined"!=typeof document&&Array.from(document.querySelectorAll("".concat('[role="dialog"][aria-modal="true"]:not([data-state="closed"]):not([data-testid="prompt-panel"])',", ").concat('[role="menu"][data-state="open"]'))).some(r)}n.d(t,{Sj:()=>a})},46892:(e,t,n)=>{n.d(t,{PL:()=>a,sb:()=>i});let r={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},a={idle:{className:r.idle,labelKey:"status.idle",type:"dot"},ready:{className:r.ready,labelKey:"status.ready",type:"dot"},running:{className:r.spinner,labelKey:"status.running",type:"spinner"},waiting:{className:r.waiting,labelKey:"status.waiting",type:"dot"},generating:{className:r.spinner,labelKey:"status.generating",type:"spinner"}},i={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},51743:(e,t,n)=>{n.d(t,{Zg:()=>c,hX:()=>u,uH:()=>d});var r=n(95155),a=n(12115),i=n(46365);let s=()=>{},o=(0,a.createContext)({isOpen:!1,requestedTarget:null,screenTarget:null,openNewTask:s,closeNewTask:s,setCloseLocked:s}),l=(0,a.createContext)(s);function c(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),p=(0,a.useRef)(!1),f=(0,a.useCallback)(e=>{(0,i.Sj)()||(u(null!=e?e:null),s(!0))},[]),h=(0,a.useCallback)(()=>{p.current||s(!1)},[]),x=(0,a.useCallback)(e=>{p.current=e},[]),b=(0,a.useCallback)(e=>{m(t=>null===t&&null===e||t&&e&&t.worktreeId===e.worktreeId&&t.instanceId===e.instanceId?t:e)},[]),g=(0,a.useMemo)(()=>({isOpen:n,requestedTarget:c,screenTarget:d,openNewTask:f,closeNewTask:h,setCloseLocked:x}),[n,c,d,f,h,x]);return(0,r.jsx)(l.Provider,{value:b,children:(0,r.jsx)(o.Provider,{value:g,children:t})})}function u(){return(0,a.useContext)(o)}function d(){return(0,a.useContext)(l)}},55756:(e,t,n)=>{n.d(t,{Bl:()=>i,cv:()=>a});let r="data-mobile-drawer-opener",a={[r]:""};function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.querySelector("[".concat(r,"]"));return!!t&&(t.focus(),!0)}},63470:(e,t,n)=>{n.d(t,{Y:()=>m,y2:()=>d});var r=n(95155),a=n(12115),i=n(18955),s=n(80344),o=n(36402),l=n(94442);let c=()=>{},u=(0,a.createContext)({updateInfo:null,checking:!1,hasUpdate:!1,pendingVersion:null,canSelfUpdate:!1,state:"idle",logPath:null,errorKey:null,openConfirm:c,cancel:c,confirm:async()=>{}});function d(e){var t,n;let{children:c,enabled:d=!0}=e,m=(0,i.c)("worktree"),{showToast:p}=(0,l.dj)(),[f,h]=(0,a.useState)(null),[x,b]=(0,a.useState)(!0),[g,w]=(0,a.useState)("idle"),[v,y]=(0,a.useState)(null),[k,j]=(0,a.useState)(null),N=(0,a.useRef)("idle");(0,a.useEffect)(()=>{N.current=g},[g]);let S=(0,a.useRef)(!1),E=(0,a.useRef)(async()=>{});(0,a.useEffect)(()=>{if(!d)return;let e=!1,t=async()=>{if("idle"===N.current)try{let t=await s.GQ.checkForUpdate();if(e)return;h(e=>"degraded"===t.status&&null!==e?e:t)}catch(e){}finally{e||b(!1)}};E.current=t,t();let n=setInterval(()=>{t()},36e5);return()=>{e=!0,E.current=async()=>{},clearInterval(n)}},[d]);let C=(null==f?void 0:f.hasUpdate)===!0,M=C?null:null!=(t=null==f?void 0:f.pendingVersion)?t:null;(0,a.useEffect)(()=>{if(!M)return;let e=setInterval(()=>{E.current()},3e5);return()=>clearInterval(e)},[M]);let I=(null==f?void 0:f.installType)==="global"||(null==f?void 0:f.installType)==="npx",R=(0,a.useCallback)(()=>{C&&I&&w(e=>"idle"===e?"confirming":e)},[C,I]),T=(0,a.useCallback)(()=>{w(e=>"confirming"===e?"idle":e)},[]),O=(0,a.useCallback)(async()=>{if("confirming"===N.current){N.current="starting",w("starting");try{let e=await s.GQ.startUpdate();y(e.logPath),w(e.willRestart?"updating":"no-restart")}catch(t){var e;if(t instanceof s.hD&&409===t.status&&(null==(e=t.data)?void 0:e.code)==="not_yet_published"){p(m("update.notYetPublished"),"info"),N.current="idle",w("idle"),E.current();return}t instanceof s.hD&&400===t.status?j("update.errorNotGlobal"):t instanceof s.hD&&409===t.status?j("update.errorInProgress"):j("update.errorGeneric"),w("error")}}},[p,m]);(0,a.useEffect)(()=>{if("updating"!==g)return;let e=!1,t=Date.now();S.current=!1;let n=setInterval(async()=>{if(e)return;if(Date.now()-t>3e5)return void w("timeout");let n=await s.GQ.ping();if(!e){if(!n){S.current=!0;return}S.current&&window.location.reload()}},2e3);return()=>{e=!0,clearInterval(n)}},[g]);let P=(0,a.useMemo)(()=>({updateInfo:f,checking:x,hasUpdate:C,pendingVersion:M,canSelfUpdate:I,state:g,logPath:v,errorKey:k,openConfirm:R,cancel:T,confirm:O}),[f,x,C,M,I,g,v,k,R,T,O]);return(0,r.jsxs)(u.Provider,{value:P,children:[c,(0,r.jsx)(o.TM,{isOpen:"confirming"===g,title:m("update.confirmTitle"),description:m("update.confirmDescription",{version:null!=(n=null==f?void 0:f.latestVersion)?n:""}),confirmLabel:m("update.confirmButton"),onConfirm:()=>{O()},onCancel:T})]})}function m(){return(0,a.useContext)(u)}},68704:(e,t,n)=>{n.d(t,{Uf:()=>i,d8:()=>s,fM:()=>o,of:()=>c,r5:()=>a,rq:()=>l});var r=n(2317);let a="medium",i=["large","medium","small","xsmall"],s={large:{value:"large",rootFontSizePx:18,factor:1.125,terminalFontSize:16},medium:{value:"medium",rootFontSizePx:16,factor:1,terminalFontSize:14},small:{value:"small",rootFontSizePx:14,factor:.875,terminalFontSize:12},xsmall:{value:"xsmall",rootFontSizePx:12.5,factor:.78,terminalFontSize:11}};function o(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(s,e)}function l(e){return s[e].terminalFontSize}function c(){let{value:e,setValue:t,isAvailable:n}=(0,r.V)({key:"mcbd-pc-display-size",defaultValue:a,validate:o});return{size:e,setSize:t,isAvailable:n}}},69858:(e,t,n)=>{n.d(t,{yP:()=>y,Fy:()=>m,R8:()=>x,Xd:()=>b});var r=n(95155),a=n(12115),i=n(47650),s=n(18955),o=n(5917),l=n(38606),c=n(76471),u=n(86815),d=n(39970);let m=(0,a.createContext)(!0);function p(e){let{worktreeStatus:t}=e,n=(0,s.c)("worktree");return(0,a.useContext)(m)&&t?(0,r.jsxs)("span",{"data-testid":"branch-worktree-status","data-status":t,className:"flex-shrink-0 inline-flex items-center",title:n((0,d.Zh)(t)),children:[(0,r.jsx)("span",{"data-testid":"branch-worktree-status-dot","aria-hidden":"true",className:"h-1.5 w-1.5 rounded-full @min-[17rem]:hidden ".concat(d.mq[t])}),(0,r.jsx)("span",{"data-testid":"branch-worktree-status-label",className:"sr-only @min-[17rem]:not-sr-only @min-[17rem]:max-w-[5.5rem] @min-[17rem]:truncate\n @min-[17rem]:rounded-full @min-[17rem]:px-1.5 @min-[17rem]:text-[10px] @min-[17rem]:font-medium\n @min-[17rem]:leading-4 ".concat(d.SE[t]),children:n((0,d.Zh)(t))})]}):null}var f=n(94442),h=n(66966);let x="px-2";function b(e){return"rounded-[10px] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring ".concat(e?"bg-sidebar-border":"hover:bg-sidebar-hover")}function g(e,t,n){let r=n-8-t;return r<=8?8:Math.min(Math.max(e,8),r)}function w(e){let{id:t,branch:n,isVisible:s,anchorRef:o,nextActionLabel:c,unclassified:u,awaitingInstructionLabel:d}=e,[m,p]=(0,a.useState)({top:-9999,left:-9999}),f=(0,a.useRef)(null);if((0,a.useEffect)(()=>{var e,t,n;if(!s||!o.current)return;let r=o.current.getBoundingClientRect(),a=null==(e=f.current)?void 0:e.getBoundingClientRect(),i=null!=(t=null==a?void 0:a.width)?t:0,l=null!=(n=null==a?void 0:a.height)?n:0,c=window.innerWidth,u=window.innerHeight,d=r.right+8;if(d+i>c-8){let e=r.left-8-i;e>=8&&(d=e)}p({top:g(r.top,l,u),left:g(d,i,c)})},[s,o]),"undefined"==typeof document||!s)return null;let h=Math.min(384,Math.max(0,window.innerWidth-16));return i.createPortal((0,r.jsxs)("div",{ref:f,id:t,role:"tooltip",className:" fixed z-[9999] px-3 py-2 rounded-md shadow-lg bg-sidebar text-xs text-sidebar-foreground border border-sidebar-border pointer-events-none max-w-sm transition-opacity duration-150 ",style:{top:m.top,left:m.left,maxWidth:h},children:[(0,r.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:n.name}),(0,r.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:n.repositoryName}),(0,r.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",u?l.pu:n.status]}),n.worktreePath&&(0,r.jsx)("p",{className:"text-sidebar-muted truncate",children:n.worktreePath}),c&&(0,r.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Next: ",c]}),d&&(0,r.jsx)("p",{className:"text-success-foreground whitespace-nowrap",children:d}),n.description&&(0,r.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:n.description})]}),document.body)}let v=0,y=(0,a.memo)(function(e){let{branch:t,isSelected:n,onClick:i,showRepositoryName:m=!0}=e,g=(0,s.c)("common"),y=(0,s.c)("worktree"),k="tooltip-".concat(t.id),j=(0,a.useRef)(null),[N,S]=(0,a.useState)(!1),E=(0,a.useRef)(null),C=(0,a.useCallback)(()=>{null!==E.current&&(clearTimeout(E.current),E.current=null)},[]);(0,a.useEffect)(()=>()=>C(),[C]);let M=(0,l.A7)(t.cliStatus),I="waiting"===M,R=!0===t.awaitingInstruction,T=t.nextActionKey?y(t.nextActionKey):null,O=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=t.exitedInstanceIds)?e:[])},[t.exitedInstanceIds]),P=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=t.unclassifiedInstanceIds)?e:[])},[t.unclassifiedInstanceIds]),D=(0,l.Pn)(t.cliStatus,t.unclassifiedInstanceIds),L=(I||R)&&null!==T,_=null!==T&&(L||n),A=N&&!n,[B,z]=(0,a.useState)(!1),[K,W]=(0,a.useState)(!1),[V,F]=(0,a.useState)(!1),H=n||B||K||V,{worktreeStatus:G,handleWorktreeStatusChange:q}=function(e,t,n){var r;let{showToast:i}=(0,f.dj)(),s=null==(r=(0,h.rC)())?void 0:r.refresh,[o,l]=(0,a.useState)(void 0),c=(0,a.useRef)(0),u=(0,a.useRef)(0),m=(0,a.useRef)(null),p=(0,a.useRef)(null),x=(0,a.useRef)(null),b=null!=t?t:null,g=void 0!==o?o:b;return p.current=b,(0,a.useEffect)(()=>{if(c.current!==u.current)return;let e=x.current;(null===e||(0,d.FI)(e))&&(x.current=null,l(void 0))},[b]),{worktreeStatus:g,handleWorktreeStatusChange:(0,a.useCallback)(async t=>{let r=++c.current;m.current=p.current,x.current=null,l(t);try{await (0,d.V9)(e,t)}catch(e){if(r!==c.current)return;u.current=r,l(void 0),i(n("branchItem.statusChangeFailed"),"error");return}let a=(0,d.Xg)();try{await (null==s?void 0:s())}finally{r===c.current&&(u.current=r,s?(x.current=a,(0,d.FI)(a)&&p.current!==m.current&&(x.current=null,l(void 0))):p.current!==m.current&&l(void 0))}},[e,s,i,n])}}(t.id,t.worktreeStatus,g);return(0,a.useEffect)(()=>{n&&S(!1)},[n]),(0,a.useEffect)(()=>{if(!N)return;let e=()=>S(!1);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[N]),(0,r.jsxs)("div",{"data-testid":"branch-list-row",className:"relative w-full min-w-0 ".concat(x),onPointerEnter:()=>z(!0),onPointerLeave:()=>z(!1),onFocus:e=>{e.target.matches(":focus-visible")&&W(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||W(!1)},children:[(0,r.jsxs)("button",{ref:j,"data-testid":"branch-list-item",onClick:()=>{C(),v=Date.now()+400,S(!1),i()},onMouseEnter:()=>{C(),Date.now()>=v&&(E.current=setTimeout(()=>{S(!0)},150))},onMouseLeave:()=>{C(),S(!1)},onFocus:e=>{C(),e.target.matches(":focus-visible")&&(E.current=setTimeout(()=>{S(!0)},150))},onBlur:()=>{C(),S(!1)},"aria-current":n?"true":void 0,"aria-describedby":A?k:void 0,"aria-label":m?void 0:"".concat(t.name," - ").concat(t.repositoryName),className:"\n group relative w-full min-h-[34px] pl-3 py-1.5 flex flex-col justify-center gap-0.5\n ".concat(H?n?"pr-9":"pr-9 [@media(hover:none)]:pr-3":"pr-3","\n ").concat(b(n),"\n "),children:[(0,r.jsxs)("div",{className:"@container flex items-center gap-2 w-full min-w-0",children:[t.cliStatus&&Object.keys(t.cliStatus).length>0&&(0,r.jsx)("div",{className:"flex items-center justify-center flex-shrink-0 w-4","aria-label":g("branchItem.cliToolStatus"),children:(0,r.jsx)(c.Ej,{status:M,label:(0,l.dw)(t.cliStatus,t.cliStatusLabels,O.size>0?e=>O.has(e)?g("branchItem.agentExited"):null:void 0,P),waitingKind:t.waitingKind,unclassified:D})}),(0,r.jsx)("p",{className:"flex-1 min-w-0 text-left text-sm text-sidebar-foreground truncate",children:t.name}),m&&(0,r.jsx)("p",{className:"flex-shrink min-w-0 max-w-[40%] text-xs text-sidebar-muted truncate",children:t.repositoryName}),(0,r.jsx)(p,{worktreeStatus:G}),R&&(0,r.jsxs)("span",{"data-testid":"awaiting-instruction-badge",className:"flex-shrink-0 inline-flex h-4 w-4 items-center justify-center rounded-full bg-success-subtle text-success-foreground",title:y("awaitingInstruction.label"),children:[(0,r.jsx)(o.A,{className:"h-3 w-3",strokeWidth:3,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"sr-only",children:y("awaitingInstruction.badge")})]}),t.hasUnread&&(0,r.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-accent-500 flex-shrink-0","aria-label":g("branchItem.hasUnread")})]}),_&&(0,r.jsx)("p",{"data-testid":"branch-next-action",className:"pl-6 text-left text-xs font-medium truncate ".concat(n?"block":"hidden [@media(hover:none)]:block"," ").concat(I?"text-warning-foreground":R?"text-success-foreground":"text-sidebar-muted"),children:T}),n&&t.description&&(0,r.jsx)("p",{"data-testid":"branch-description",className:"pl-6 text-left text-xs text-sidebar-muted truncate",children:t.description}),(0,r.jsx)(w,{id:k,branch:t,isVisible:A,anchorRef:j,nextActionLabel:T,unclassified:D,awaitingInstructionLabel:R?y("awaitingInstruction.badge"):null})]}),H&&(0,r.jsx)(u.m,{branch:t,isSelected:n,onOpenChange:F,worktreeStatus:G,onWorktreeStatusChange:q})]})})},70628:(e,t,n)=>{n.d(t,{K:()=>o,S:()=>s});var r=n(95155),a=n(12115);let i=(0,a.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>s(e=>!e),[]),l=(0,a.useMemo)(()=>({open:n,setOpen:s,toggle:o}),[n,o]);return(0,r.jsx)(i.Provider,{value:l,children:t})}function o(){return(0,a.useContext)(i)}},72137:(e,t,n)=>{n.d(t,{H:()=>m});var r=n(95155),a=n(12115),i=n(18955),s=n(68695),o=n(31166),l=n(94465),c=n(79361),u=n(63470),d=n(38218);function m(){var e,t;let n=(0,i.c)("worktree"),m=(0,d.a)(),{updateInfo:p,hasUpdate:f,pendingVersion:h,canSelfUpdate:x,state:b,openConfirm:g}=(0,u.Y)(),[w,v]=(0,a.useState)(!1),y=null!=(e=null==p?void 0:p.latestVersion)?e:null;if(m||!y)return null;if("idle"===b&&!f&&h){let e=n("update.pendingDescription",{version:h});return(0,r.jsxs)(o.$,{type:"button",variant:"secondary",size:"sm",disabled:!0,className:"flex-shrink-0 gap-1.5 whitespace-nowrap",title:e,"aria-label":e,"data-testid":"app-update-button","data-state":"pending",children:[(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:n("update.pendingLabel",{version:h})})]})}if("idle"===b&&!f)return null;let k="starting"===b||"updating"===b,j="no-restart"===b||"timeout"===b||"error"===b,N=n("update.buttonLabel",{version:y});return x||k||j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.$,{type:"button",variant:"primary",size:"sm",loading:k,onClick:j?()=>v(!0):g,className:"flex-shrink-0 gap-1.5 whitespace-nowrap","aria-label":k?n("update.buttonUpdating"):n("update.buttonAriaLabel",{version:y}),"aria-haspopup":"dialog","aria-busy":k,"data-testid":"app-update-button","data-state":b,children:[!k&&(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:k?n("update.buttonUpdating"):N})]}),j&&(0,r.jsx)(l.a,{isOpen:w,onClose:()=>v(!1),title:n("update.statusDialogTitle"),size:"sm",children:(0,r.jsx)(c.V,{})})]}):(0,r.jsxs)("a",{href:null!=(t=null==p?void 0:p.releaseUrl)?t:"https://github.com/Kewton/CommandMate/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"inline-flex flex-shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium bg-accent-600 dark:bg-accent-500 text-white hover:bg-accent-700 dark:hover:bg-accent-600 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":n("update.buttonReleaseAriaLabel",{version:y}),"data-testid":"app-update-button",children:[(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:N})]})}},79361:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(95155),a=n(18955),i=n(63470),s=n(31166),o=n(3005);function l(){let e=(0,a.c)("worktree"),{updateInfo:t,hasUpdate:n,canSelfUpdate:l,state:c,logPath:u,errorKey:d,openConfirm:m}=(0,i.Y)();if(!t||!n&&"idle"===c)return null;let{latestVersion:p,releaseUrl:f,updateCommand:h,installType:x}=t,b="npx"===x,g=b?"npx commandmate@latest":"commandmate update";return(0,r.jsxs)("div",{className:"bg-accent-50 border border-accent-200 rounded-lg p-3 mt-2",role:"status","aria-label":e("update.available"),"data-testid":"update-notification-banner",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800 mb-1",children:e("update.available")}),p&&(0,r.jsx)("p",{className:"text-sm text-accent-700 mb-2",children:e("update.latestVersion",{version:p})}),l&&"idle"===c&&(0,r.jsx)(s.$,{variant:"primary",size:"sm",className:"mb-2",onClick:m,"data-testid":"update-now-button",children:e("update.updateNow")}),b&&"idle"===c&&(0,r.jsx)("p",{className:"text-xs text-accent-600 mb-2","data-testid":"update-npx-notice",children:e("update.npxRestartNotice")}),("starting"===c||"updating"===c)&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-progress",children:[(0,r.jsxs)("p",{className:"flex items-center text-sm text-accent-800",children:[(0,r.jsx)(o.y,{size:"sm",className:"mr-2"}),e("starting"===c?"update.starting":"update.updating")]}),"updating"===c&&(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.updatingHint")})]}),"no-restart"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-no-restart",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.noRestartTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.noRestartDescription")})]}),"timeout"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-timeout",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.timeoutTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.timeoutDescription")}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 mt-1 text-xs text-accent-900 font-mono",children:g})]}),"error"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-error",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.errorTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:d?e(d):null}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 mt-1 text-xs text-accent-900 font-mono",children:g})]}),u&&("no-restart"===c||"timeout"===c)&&(0,r.jsx)("p",{className:"text-xs text-accent-500 mb-2","data-testid":"update-log-hint",children:e("update.logHint",{path:u})}),h&&"global"===x&&"idle"===c&&(0,r.jsxs)("div",{className:"mb-2",children:[(0,r.jsx)("p",{className:"text-xs text-accent-600 mb-1",children:e("update.updateCommand")}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 text-xs text-accent-900 font-mono",children:h})]}),f&&(0,r.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-accent-600 hover:text-accent-800 underline",children:[e("update.viewRelease"),(0,r.jsx)("span",{className:"ml-1","aria-hidden":"true",children:"→"})]}),(0,r.jsx)("p",{className:"text-xs text-accent-500 mt-2",children:e("update.dataPreserved")})]})}},86815:(e,t,n)=>{n.d(t,{K:()=>f,m:()=>h});var r=n(95155),a=n(12115),i=n(18955),s=n(37772),o=n(27937),l=n(47971),c=n(26232),u=n(94442),d=n(60322),m=n(59854),p=n(39970);let f="data-branch-row-actions",h=(0,a.memo)(function(e){let{branch:t,isSelected:n,onOpenChange:h,worktreeStatus:x=null,onWorktreeStatusChange:b}=e,g=(0,i.c)("common"),w=(0,i.c)("worktree"),{showToast:v}=(0,u.dj)(),y=(0,a.useCallback)(async e=>{try{await (0,d.l)(e),v(g("branchItem.copied"),"success")}catch(e){v(g("branchItem.copyFailed"),"error")}},[v,g]);return(0,r.jsxs)(c.rI,{onOpenChange:h,children:[(0,r.jsx)(c.ty,{asChild:!0,children:(0,r.jsx)("button",{type:"button","data-testid":"branch-row-actions","aria-label":g("branchItem.actions",{name:t.name}),title:g("branchItem.actions",{name:t.name}),className:"absolute right-3 top-[5px] flex h-6 w-6 items-center justify-center rounded-md\n text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground\n focus:outline-none focus-visible:ring-2 focus-visible:ring-ring\n data-[state=open]:text-sidebar-foreground ".concat(n?"":"[@media(hover:none)]:hidden"),children:(0,r.jsx)(s.A,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,r.jsxs)(c.SQ,{align:"end",[f]:"",onEscapeKeyDown:e=>e.stopPropagation(),children:[(0,r.jsx)(c._2,{asChild:!0,children:(0,r.jsx)("a",{href:"/worktrees/".concat(t.id),target:"_blank",rel:"noopener noreferrer",children:g("branchItem.openInNewTab")})}),(0,r.jsx)(c._2,{onSelect:()=>void y(t.name),children:g("branchItem.copyBranchName")}),t.worktreePath&&(0,r.jsx)(c._2,{onSelect:()=>{var e;y(null!=(e=t.worktreePath)?e:"")},children:g("branchItem.copyPath")}),b&&(0,r.jsxs)(l.Pb,{children:[(0,r.jsxs)(l.ZP,{"data-testid":"branch-row-status",className:"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-muted data-[state=open]:bg-muted",children:[(0,r.jsx)("span",{className:"flex-1",children:g("branchItem.status")}),(0,r.jsx)("span",{"data-testid":"branch-row-status-current",className:"text-xs text-muted-foreground",children:w((0,p.Zh)(x))}),(0,r.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground","aria-hidden":"true"})]}),(0,r.jsx)(l.ZL,{children:(0,r.jsx)(l.G5,{[f]:"",sideOffset:4,collisionPadding:8,style:{zIndex:m.M.POPOVER},className:"min-w-[9rem] overflow-hidden rounded-md border border-border bg-surface p-1 text-surface-foreground shadow-lg",onEscapeKeyDown:e=>e.stopPropagation(),children:(0,r.jsx)(c.Hr,{value:null!=x?x:"",onValueChange:e=>{let t=""===e?null:e;t!==x&&b(t)},children:p.m9.map(e=>{var t;return(0,r.jsx)(c.Ht,{value:null!=(t=e.value)?t:"",children:w(e.labelKey)},e.labelKey)})})})})]})]})]})})},89275:(e,t,n)=>{n.d(t,{Bo:()=>u,Hq:()=>l});var r=n(95155),a=n(12115),i=n(20063);let s={startTransition:e=>e()},o=(0,a.createContext)(null);function l(){var e;let t=(0,i.useRouter)(),{startTransition:n}=null!=(e=(0,a.useContext)(o))?e:s;return(0,a.useMemo)(()=>({push:e=>n(()=>t.push(e)),replace:e=>n(()=>t.replace(e))}),[t,n])}function c(e){let{onCommit:t}=e,n=(0,i.usePathname)(),r=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!r.current){r.current=!0;return}t()},[n,t]),null}function u(e){let{children:t}=e,n=(0,a.useRef)(null),i=(0,a.useCallback)(()=>{var e;null==(e=n.current)||e.call(n)},[]),s=(0,a.useCallback)(e=>{var t;t=()=>new Promise(t=>{let r=!1,a=()=>{r||(r=!0,t())};n.current=a,e(),window.setTimeout(a,500)}),"undefined"==typeof document||"function"!=typeof document.startViewTransition||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?t():document.startViewTransition(t)},[]),l=(0,a.useMemo)(()=>({startTransition:s}),[s]);return(0,r.jsxs)(o.Provider,{value:l,children:[(0,r.jsx)(c,{onCommit:i}),t]})}},92614:(e,t,n)=>{n.d(t,{C:()=>o,E:()=>s});var r=n(95155),a=n(12115);let i=(0,a.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>s(e=>!e),[]),l=(0,a.useMemo)(()=>({open:n,setOpen:s,toggle:o}),[n,o]);return(0,r.jsx)(i.Provider,{value:l,children:t})}function o(){return(0,a.useContext)(i)}},98873:(e,t,n)=>{n.d(t,{D:()=>i});var r=n(12115),a=n(7636);function i(e){let{items:t,sortKey:n,sortDirection:i,viewMode:s,filterText:o}=e,l=(0,r.useMemo)(()=>{if(!o)return t;let e=o.toLowerCase();return t.filter(t=>t.name.toLowerCase().includes(e)||t.repositoryName.toLowerCase().includes(e))},[t,o]);return{sortedItems:(0,r.useMemo)(()=>(0,a.Xn)(l,n,i),[l,n,i]),groupedItems:(0,r.useMemo)(()=>"grouped"===s?(0,a._s)(l,n,i):[],[l,n,i,s])}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5794],{12906:(e,t,n)=>{n.d(t,{Iz:()=>D,W2:()=>T,gM:()=>S,oW:()=>A,vP:()=>L,zX:()=>O});var r=n(95155),a=n(12115),i=n(47650),s=n(20063),o=n(18955),l=n(37772),c=n(32916),u=n(39649),d=n(17653),m=n(22592),p=n(89275),f=n(69858),h=n(86815),x=n(17848),b=n(48481),g=n(98873),w=n(38606),v=n(7636),y=n(76471),k=n(46892),j=n(59854),N=n(77873);function S(e){var t,n,r;return!!(null!=(r=null==(t=e.closest)?void 0:t.call(e,"[data-repository-tab-panel]"))?r:null==(n=e.closest)?void 0:n.call(e,"[".concat(h.K,"]")))}function E(e,t,n){let r=n-8-t;return r<=8?8:Math.min(Math.max(e.left+t>n-8?e.right-t:e.left,8),r)}function C(e,t,n){return Math.max(0,Math.min(t,Math.floor(n-8-(e+4)-2)))}function M(){let[e,t]=(0,a.useState)(()=>window.innerHeight);return(0,a.useEffect)(()=>{let e=()=>t(window.innerHeight);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let I="commandmate:repository-branch-list-open";function R(e){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(I,{detail:e}))}function T(e,t){let n=(0,a.useId)();(0,a.useEffect)(()=>{e&&R(n)},[e,n]),(0,a.useEffect)(()=>{if(!e||"undefined"==typeof document)return;let r=e=>{e.detail!==n&&t()};return document.addEventListener(I,r),()=>document.removeEventListener(I,r)},[e,n,t])}function O(){let{selectWorktree:e,worktrees:t}=(0,u.$f)(),n=(0,p.Hq)();return(0,a.useCallback)(r=>{R(null),e(r);let a=null==t?void 0:t.find(e=>e.id===r);n.push(a?(0,d.f)(a):"/worktrees/".concat(r))},[e,t,n])}function P(e){var t;null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest",inline:"nearest"})}function D(e){let{worktrees:t,repositories:n,sortKey:r,sortDirection:i,repositoryOrder:s}=e,o=(0,a.useMemo)(()=>(0,v.UZ)(null!=n?n:[]),[n]),l=(0,a.useMemo)(()=>(0,v.s6)(null!=t?t:[],o),[t,o]),c=(0,a.useMemo)(()=>l.map(w.XK),[l]),{groupedItems:u}=(0,g.D)({items:c,sortKey:r,sortDirection:i,viewMode:"grouped"});return(0,a.useMemo)(()=>(0,v.Ew)(u,s),[u,s])}let L=(0,a.memo)(function(){var e;let t=(0,o.c)("common"),n=(0,s.usePathname)(),i=O(),{sortKey:d,sortDirection:p,repositoryOrder:f}=(0,c.VF)(),{worktrees:h,repositories:x,selectedWorktreeId:b}=(0,u.$f)(),{factor:g}=(0,m.Ps)(),w=D({worktrees:h,repositories:x,sortKey:d,sortDirection:p,repositoryOrder:f}),y=(0,v.jn)(n,b),k=(0,a.useMemo)(()=>{var e,t;return null!=(t=null==(e=w.find(e=>e.branches.some(e=>e.id===y)))?void 0:e.repositoryName)?t:null},[w,y]),[j,E]=(0,a.useState)(null),[C,M]=(0,a.useState)(null),[I,R]=(0,a.useState)(!1),L=(0,a.useRef)(null),z=(0,a.useRef)(null),K=(0,a.useRef)(new Map),W=(0,a.useCallback)((e,t)=>{t?K.current.set(e,t):K.current.delete(e)},[]),V=(0,a.useCallback)(()=>{E(null),M(null),R(!1)},[]),F=(0,a.useCallback)(e=>{let t=K.current.get(e);if(!t)return;let n=t.getBoundingClientRect();M({left:n.left,right:n.right,bottom:n.bottom}),E(e),R(!1)},[]),H=(0,a.useCallback)(e=>{if(j===e)return void V();F(e)},[j,V,F]),[G,q]=(0,a.useState)(!1),[U,Y]=(0,a.useState)(0),J=(0,a.useCallback)(()=>{let e=L.current;e&&(q(e.scrollWidth>e.clientWidth+1),Y(e.clientWidth))},[]);(0,a.useLayoutEffect)(()=>{J()},[J,w.length,g]),(0,a.useEffect)(()=>(window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)),[J]);let X=(0,a.useRef)(null),Z=(0,a.useCallback)(e=>{var t;if(L.current=e,null==(t=X.current)||t.disconnect(),X.current=null,!e||"undefined"==typeof ResizeObserver)return;let n=new ResizeObserver(()=>J());n.observe(e),X.current=n},[J]),$=null!==j||I;T($,V),(0,a.useEffect)(()=>{if(!$)return;let e=e=>{var t,n;let r=e.target;!(!r||(null==(t=L.current)?void 0:t.contains(r))||(null==(n=z.current)?void 0:n.contains(r)))&&(S(r)||V())},t=e=>{if(!(0,N.V$)(e))return;let t=j?K.current.get(j):z.current;V(),null==t||t.focus()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[$,j,V]),(0,a.useEffect)(()=>{V()},[n,V]),(0,a.useLayoutEffect)(()=>{k&&P(K.current.get(k))},[k,n,G,U]);let Q=(0,a.useCallback)(e=>{V(),i(e)},[V,i]),ee=(0,a.useCallback)(e=>{let t=K.current.get(e);P(t),F(e),null==t||t.focus()},[F]),et=(0,a.useCallback)(e=>{var t;let n=e.currentTarget,r=(t=n.clientWidth,e.ctrlKey||e.shiftKey||Math.abs(e.deltaY)<=Math.abs(e.deltaX)?0:1===e.deltaMode?40*e.deltaY:2===e.deltaMode?e.deltaY*t:e.deltaY);0!==r&&(n.scrollLeft+=r)},[]);if(0===w.length)return null;let en=Math.round(32*g),er=null!=(e=w.find(e=>e.repositoryName===j))?e:null;return(0,r.jsxs)("div",{"data-testid":"repository-tab-bar",className:"relative flex-shrink-0 flex items-stretch border-b border-border bg-sidebar text-sidebar-foreground",style:{height:"".concat(en,"px")},children:[(0,r.jsx)("nav",{ref:Z,"data-testid":"repository-tab-strip","aria-label":t("nav.repositories"),onWheel:et,className:"flex min-w-0 flex-1 flex-nowrap items-stretch overflow-x-auto overflow-y-hidden scrollbar-hide",children:w.map(e=>(0,r.jsx)(_,{group:e,isActive:e.repositoryName===k,isOpen:e.repositoryName===j,registerTab:W,onToggle:H},e.repositoryName))}),G&&(0,r.jsx)("button",{ref:z,type:"button","data-testid":"repository-tab-overflow","aria-haspopup":"menu","aria-expanded":I,"aria-label":t("repoTabBar.overflow"),title:t("repoTabBar.overflow"),onClick:()=>{E(null),M(null),R(e=>!e)},className:"flex-shrink-0 flex items-center border-l border-sidebar-border px-2 text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:(0,r.jsx)(l.A,{size:16,strokeWidth:2,"aria-hidden":"true"})}),er&&C&&(0,r.jsx)(A,{group:er,anchor:C,factor:g,activeWorktreeId:y,onBranchClick:Q}),I&&(0,r.jsx)(B,{groups:w,anchorRef:z,activeRepositoryName:k,onSelect:ee})]})}),_=(0,a.memo)(function(e){let{group:t,isActive:n,isOpen:a,registerTab:i,onToggle:s}=e,l=(0,o.c)("common"),c=(0,v.zD)(t.branches),u=(0,y.Mq)(c,(0,v.El)(t.branches)),d=(0,v.j)(t.branches),m=l(u?y.rH:k.PL[c].labelKey);return(0,r.jsx)("button",{ref:e=>i(t.repositoryName,e),type:"button","data-testid":"repository-tab","data-repository":t.repositoryName,"aria-haspopup":"menu","aria-expanded":a,"aria-current":n?"true":void 0,title:"".concat(t.repositoryName," — ").concat(m),onClick:()=>s(t.repositoryName),onKeyDown:e=>{"ArrowDown"===e.key&&(e.preventDefault(),a||s(t.repositoryName))},className:"group/tab flex-shrink-0 flex max-w-[14rem] items-stretch px-0.5 py-1 text-xs font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:(0,r.jsxs)("span",{"data-testid":"repository-tab-chip",className:"flex min-w-0 items-center gap-1.5 rounded-md px-2 transition-colors ".concat(n?"bg-background text-foreground shadow-sm":"text-sidebar-muted group-hover/tab:bg-sidebar-hover group-hover/tab:text-sidebar-foreground"),children:[(0,r.jsx)(x.n,{className:"h-3.5 w-3.5",color:(0,v.LV)(t.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 truncate",children:t.repositoryName}),(0,r.jsx)(b.m,{status:c,size:"sm",label:m,className:u?y.Jd:void 0,"data-testid":"repository-tab-status"}),d>0&&(0,r.jsx)("span",{"data-testid":"repository-tab-attention-count","aria-label":l("attention.badgeLabel",{count:d}),className:"flex-shrink-0 rounded-full bg-warning-subtle px-1.5 text-[10px] font-semibold leading-4 tabular-nums text-warning-foreground",children:d})]})})});function A(e){let{group:t,anchor:n,factor:s,activeWorktreeId:l,onBranchClick:c}=e,u=(0,o.c)("common"),d=(0,a.useRef)(null),m=M();if((0,a.useEffect)(()=>{var e;let t=null==(e=d.current)?void 0:e.querySelector("button");null==t||t.focus()},[t.repositoryName]),"undefined"==typeof document)return null;let p=Math.round(300*s),h=window.innerWidth;return i.createPortal((0,r.jsx)("div",{ref:d,"data-repository-tab-panel":"","data-testid":"repository-tab-popover","data-repository":t.repositoryName,role:"menu","aria-label":u("sidebar.branchNavigation"),className:"fixed rounded-md border border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg",style:{top:n.bottom+4,left:E(n,p,h),width:p,zIndex:j.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-popover-list",className:"overflow-y-auto overflow-x-hidden py-1",style:{maxHeight:"".concat(C(n.bottom,Math.round(520*s),m),"px")},children:0===t.branches.length?(0,r.jsx)("p",{className:"px-4 py-6 text-center text-sm text-sidebar-muted",children:u("sidebar.noBranchesAvailable")}):t.branches.map(e=>(0,r.jsx)(f.yP,{branch:e,isSelected:e.id===l,onClick:()=>c(e.id),showRepositoryName:!1},e.id))})}),document.body)}function B(e){var t;let{groups:n,anchorRef:a,activeRepositoryName:s,onSelect:l}=e,c=(0,o.c)("common"),u=M(),d=null==(t=a.current)?void 0:t.getBoundingClientRect();if("undefined"==typeof document||!d)return null;let m=window.innerWidth;return i.createPortal((0,r.jsx)("div",{"data-repository-tab-panel":"","data-testid":"repository-tab-overflow-menu",role:"menu","aria-label":c("nav.repositories"),className:"fixed rounded-md border border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg",style:{top:d.bottom+4,left:E({left:d.left,right:d.right,bottom:d.bottom},300,m),width:300,zIndex:j.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-overflow-list",className:"overflow-y-auto py-1",style:{maxHeight:"".concat(C(d.bottom,520,u),"px")},children:n.map(e=>{let t=(0,v.zD)(e.branches),n=(0,y.Mq)(t,(0,v.El)(e.branches));return(0,r.jsxs)("button",{type:"button",role:"menuitem","data-testid":"repository-tab-overflow-item","data-repository":e.repositoryName,"aria-current":e.repositoryName===s?"true":void 0,onClick:()=>l(e.repositoryName),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[(0,r.jsx)(x.n,{className:"h-3.5 w-3.5",color:(0,v.LV)(e.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.repositoryName}),(0,r.jsx)(b.m,{status:t,size:"sm",label:c(n?y.rH:k.PL[t].labelKey),className:n?y.Jd:void 0}),(0,r.jsx)("span",{className:"tabular-nums text-xs text-sidebar-muted",children:e.branches.length})]},e.repositoryName)})})}),document.body)}},17653:(e,t,n)=>{n.d(t,{f:()=>o});var r=n(54014),a=n(55449),i=n(38606),s=n(7636);function o(e){let t=function(e){var t;let n=e.sessionStatusByInstance;if(!n)return null;let s=(e.agentInstances&&e.agentInstances.length>0?e.agentInstances:(0,r.lu)(null!=(t=e.selectedAgents)?t:(0,a.sA)())).map((e,t)=>({instance:e,index:t})).sort((e,t)=>{var n,r;return(null!=(n=e.instance.order)?n:0)-(null!=(r=t.instance.order)?r:0)||e.index-t.index}).map(e=>{let{instance:t}=e;return t}).flatMap((e,t)=>{let r=n[e.id];return(null==r?void 0:r.isWaitingForResponse)?[{id:e.id,index:t,entry:r}]:[]});if(0===s.length)return null;let{waitingKind:o}=(0,i.f_)(e),l=o?s.filter(e=>e.entry.waitingKind===o):[],c=(l.length>0?l:s).flatMap(e=>{let t=e.entry.waitingSince;return"number"==typeof t&&Number.isFinite(t)?[{...e,since:t}]:[]});return 0===c.length?null:(c.sort((e,t)=>e.since-t.since||e.index-t.index),c[0].id)}(e);return null===t?"/worktrees/".concat(e.id):(0,s.Ii)({worktreeId:e.id,instanceId:t})}},18848:(e,t,n)=>{n.d(t,{Bz:()=>i,kj:()=>a,wx:()=>r}),n(95704);let r=["send","wait","capture","respond"];function a(e){let{binary:t,worktreeId:n,instanceId:r,messagePlaceholder:a}=e,i=null!=e.portPrefix&&3e3!==e.portPrefix?"CM_PORT=".concat(e.portPrefix," "):"",s="--instance ".concat(r),o="".concat(i).concat(t);return{send:"".concat(o," send ").concat(n,' "').concat(a,'" ').concat(s),wait:"".concat(o," wait ").concat(n," ").concat(s," --on-prompt human"),capture:"".concat(o," capture ").concat(n," ").concat(s),respond:"".concat(o," respond ").concat(n,' "').concat("1",'" ').concat(s)}}function i(e){let{binary:t,worktreeId:n,instanceId:r,instanceLabel:a,toolLabel:i}=e,s=null!=e.portPrefix&&3e3!==e.portPrefix?"CM_PORT=".concat(e.portPrefix," "):"",o="".concat(s).concat(t),l="--instance ".concat(r),c="ja"===e.locale?"ja":"en",u="".concat(o," capture ").concat(n," ").concat(l," --pane --tail ").concat(60),d="".concat(o," ask ").concat(n," ").concat(l,' "<request>" --async');if("ja"===c){let e="".concat(o," ask ").concat(n," ").concat(l,' "<依頼文>" --timeout ').concat(1800);return["## 別セッション「".concat(a,"」への委任"),"- 宛先: worktree `".concat(n,"` / instance `").concat(r,"`(").concat(i,")"),"- 依頼: ".concat(e)," - exit 0: 標準出力が返答本文\n - exit 10: 相手が確認待ち。標準出力のprompt JSONを私に報告して止まる(自分で答えない)\n - exit 124: タイムアウト。captureで状況を見て報告","- 待たない依頼: ".concat(d)," - 即座に relay id を返して exit 0。完了時に `[from ...]` 付きで返答が私のコンポーザーに届く"," - 状況確認: ".concat(o," relays / 取り消し: ").concat(o," relays cancel <relay-id>"),"- 進捗確認: ".concat(u),"- 禁止: respondで相手のプロンプトに答える / auto-yesを有効化する"].join("\n")}let m="".concat(o," ask ").concat(n," ").concat(l,' "<request>" --timeout ').concat(1800);return['## Delegating to session "'.concat(a,'"'),"- Target: worktree `".concat(n,"` / instance `").concat(r,"` (").concat(i,")"),"- Ask: ".concat(m)," - exit 0: stdout is the reply body\n - exit 10: they are waiting on a confirmation. Report the prompt JSON on stdout back to me and stop (do not answer it yourself)\n - exit 124: timed out. Look with capture and report what you see","- Ask without waiting: ".concat(d)," - exits 0 with a relay id on stdout; the reply lands in my composer prefixed `[from ...]` when the turn ends"," - Outstanding: ".concat(o," relays / withdraw: ").concat(o," relays cancel <relay-id>"),"- Progress: ".concat(u),"- Do not: answer their prompt with respond / turn auto-yes on"].join("\n")}},22592:(e,t,n)=>{n.d(t,{Ps:()=>d,W5:()=>u});var r=n(95155),a=n(12115),i=n(38218),s=n(68704);let o="data-pc-size",l={size:s.r5,setSize:()=>{},isMobile:!1,factor:s.d8[s.r5].factor,isAvailable:!1},c=(0,a.createContext)(l);function u(e){let{children:t}=e,{size:n,setSize:l,isAvailable:u}=(0,s.of)(),d=(0,i.a)();(0,a.useEffect)(()=>{if("undefined"==typeof document)return;let e=document.documentElement;return d?void e.removeAttribute(o):(e.setAttribute(o,n),()=>{e.removeAttribute(o)})},[n,d]);let m=(0,a.useMemo)(()=>({size:n,setSize:l,isMobile:d,factor:s.d8[n].factor,isAvailable:u}),[n,l,d,u]);return(0,r.jsx)(c.Provider,{value:m,children:t})}function d(){return(0,a.useContext)(c)}},26020:(e,t,n)=>{n.d(t,{Xn:()=>a,d9:()=>o,dI:()=>r,gB:()=>i,vK:()=>s});let r=["en","ja"],a="en",i="locale",s={en:"English",ja:"日本語"};function o(e){return"string"==typeof e&&r.includes(e)}},30061:(e,t,n)=>{n.d(t,{nR:()=>s});var r=n(95155),a=n(12115),i=n(47650);function s(e){let{content:t,delay:n=200,className:s,children:o,metadata:l}=e,c=(0,a.useRef)(null),u=(0,a.useRef)(null),d=(0,a.useRef)(null),m=(0,a.useRef)(null),[p,f]=(0,a.useState)(!1),[h,x]=(0,a.useState)({top:-9999,left:-9999}),b=(0,a.useCallback)(()=>{null!==d.current&&(clearTimeout(d.current),d.current=null)},[]),g=(0,a.useCallback)(()=>{let e=c.current;e&&(e.scrollWidth>e.clientWidth||l)&&(b(),d.current=setTimeout(()=>{let t=e.getBoundingClientRect(),n=Math.max(4,window.innerWidth-384-4);m.current={top:t.top,bottom:t.bottom},x({top:t.bottom+4,left:Math.min(t.left,n)}),f(!0),d.current=null},n))},[b,n,l]);(0,a.useLayoutEffect)(()=>{if(!p)return;let e=u.current,t=m.current;if(!e||!t)return;let{height:n}=e.getBoundingClientRect();if(n<=0)return;let r=window.innerHeight;if(t.bottom+4+n+4<=r)return;let a=t.top-4-n,i=a>=4?a:Math.max(4,r-n-4);x(e=>e.top===i?e:{...e,top:i})},[p]);let w=(0,a.useCallback)(()=>{b(),f(!1)},[b]);return(0,a.useEffect)(()=>()=>b(),[b]),(0,r.jsxs)("span",{ref:c,className:s,onMouseEnter:g,onMouseLeave:w,children:[null!=o?o:t,p&&"undefined"!=typeof document&&(0,i.createPortal)((0,r.jsxs)("span",{ref:u,role:"tooltip","aria-hidden":"true",className:"fixed z-[9999] max-w-md px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{top:h.top,left:h.left},children:[(0,r.jsx)("span",{className:"block break-all",children:t}),l&&(0,r.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:l})]}),document.body)]})}},32916:(e,t,n)=>{n.d(t,{GB:()=>m,P0:()=>s,RA:()=>o,VF:()=>p,e8:()=>l,pT:()=>f});var r=n(95155),a=n(12115),i=n(7636);let s="updatedAt",o="desc",l="grouped",c=(0,a.createContext)(null);function u(e,t,n,r){let i=(0,a.useRef)(!0);(0,a.useEffect)(()=>{try{let t=localStorage.getItem(e);t&&r(t)}catch(e){}},[]),(0,a.useEffect)(()=>{if(i.current){i.current=!1;return}try{localStorage.setItem(e,n())}catch(e){}},[t])}function d(e,t){switch(t.type){case"TOGGLE":return{...e,isOpen:!e.isOpen};case"SET_WIDTH":return{...e,width:t.width};case"OPEN_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!0};case"CLOSE_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!1};case"SET_SORT_KEY":return{...e,sortKey:t.sortKey};case"SET_SORT_DIRECTION":return{...e,sortDirection:t.sortDirection};case"LOAD_SORT_SETTINGS":return{...e,sortKey:t.sortKey,sortDirection:t.sortDirection};case"SET_VIEW_MODE":return{...e,viewMode:t.viewMode};case"SET_OPEN":return e.isOpen===t.isOpen?e:{...e,isOpen:t.isOpen};case"SET_REPOSITORY_ORDER":return{...e,repositoryOrder:t.repositoryOrder};case"SET_REPO_TAB_BAR_MODE":return{...e,repoTabBarMode:t.repoTabBarMode};default:return e}}function m(e){let{children:t,initialOpen:n=!0,initialWidth:m=224}=e,[p,f]=(0,a.useReducer)(d,{isOpen:n,width:m,isMobileDrawerOpen:!1,sortKey:s,sortDirection:o,viewMode:l,repositoryOrder:(0,i.ZD)(),repoTabBarMode:i.PB});u("mcbd-sidebar-sort","".concat(p.sortKey,":").concat(p.sortDirection),()=>JSON.stringify({sortKey:p.sortKey,sortDirection:p.sortDirection}),e=>{try{let t=JSON.parse(e),n=t.sortDirection,r=(0,i.Si)(t.sortKey)?t.sortKey:s;r&&("asc"===n||"desc"===n)&&f({type:"LOAD_SORT_SETTINGS",sortKey:r,sortDirection:n})}catch(e){}}),u("mcbd-sidebar-view-mode",p.viewMode,()=>p.viewMode,e=>{(0,i.$m)(e)&&f({type:"SET_VIEW_MODE",viewMode:e})}),u("mcbd-sidebar-width",p.width,()=>String(p.width),e=>{let t=Number(e);!isNaN(t)&&t>0&&f({type:"SET_WIDTH",width:288===t?224:t})}),u("mcbd-sidebar-open",p.isOpen,()=>String(p.isOpen),e=>{("true"===e||"false"===e)&&f({type:"SET_OPEN",isOpen:"true"===e})}),u("mcbd-repo-tab-bar-mode",p.repoTabBarMode,()=>p.repoTabBarMode,e=>{(0,i.m3)(e)&&f({type:"SET_REPO_TAB_BAR_MODE",repoTabBarMode:e})});let h=(0,a.useCallback)(()=>{f({type:"TOGGLE"})},[]),x=(0,a.useCallback)(e=>{f({type:"SET_WIDTH",width:e})},[]),b=(0,a.useCallback)(()=>{f({type:"OPEN_MOBILE_DRAWER"})},[]),g=(0,a.useCallback)(()=>{f({type:"CLOSE_MOBILE_DRAWER"})},[]),w=(0,a.useCallback)(e=>{f({type:"SET_SORT_KEY",sortKey:e})},[]),v=(0,a.useCallback)(e=>{f({type:"SET_SORT_DIRECTION",sortDirection:e})},[]),y=(0,a.useCallback)(e=>{f({type:"SET_VIEW_MODE",viewMode:e})},[]),k=(0,a.useCallback)(e=>{f({type:"SET_REPOSITORY_ORDER",repositoryOrder:e}),(0,i.ZC)(e)},[]),j=(0,a.useCallback)(e=>{f({type:"SET_REPO_TAB_BAR_MODE",repoTabBarMode:e})},[]),N=(0,a.useMemo)(()=>({isOpen:p.isOpen,width:p.width,isMobileDrawerOpen:p.isMobileDrawerOpen,sortKey:p.sortKey,sortDirection:p.sortDirection,toggle:h,setWidth:x,openMobileDrawer:b,closeMobileDrawer:g,setSortKey:w,setSortDirection:v,viewMode:p.viewMode,setViewMode:y,repositoryOrder:p.repositoryOrder,setRepositoryOrder:k,repoTabBarMode:p.repoTabBarMode,setRepoTabBarMode:j}),[p.isOpen,p.width,p.isMobileDrawerOpen,p.sortKey,p.sortDirection,p.viewMode,p.repositoryOrder,p.repoTabBarMode,h,x,b,g,w,v,y,k,j]);return(0,r.jsx)(c.Provider,{value:N,children:t})}function p(){let e=(0,a.useContext)(c);if(!e)throw Error("useSidebarContext must be used within a SidebarProvider");return e}function f(){return(0,a.useContext)(c)}},41898:(e,t,n)=>{n.d(t,{m_:()=>f});var r=n(95155),a=n(12115),i=n(47650),s=n(77873);function o(e,t,n){return Math.min(Math.max(e,4),Math.max(4,n-t-4))}function l(e,t,n,r){switch(e){case"top":return t.top-n.height-8<4;case"bottom":return t.top+t.height+8+n.height>r.height-4;case"left":return t.left-n.width-8<4;default:return t.left+t.width+8+n.width>r.width-4}}function c(e,t,n){switch(e){case"top":return Math.max(0,t.top-8-4);case"bottom":return Math.max(0,n.height-4-(t.top+t.height+8));case"left":return Math.max(0,t.left-8-4);default:return Math.max(0,n.width-4-(t.left+t.width+8))}}function u(e){return{maxWidth:"".concat(e,"px"),whiteSpace:"normal",overflowWrap:"anywhere"}}let d={maxWidth:"max-width",whiteSpace:"white-space",overflowWrap:"overflow-wrap"};function m(e,t){let n=null===t?null:u(t);for(let[t,r]of Object.entries(d))null===n?e.style.removeProperty(r):e.style.setProperty(r,n[t])}let p={top:-9999,left:-9999};function f(e){let{content:t,placement:n="right",delay:d=100,children:f,className:h,zIndex:x,fallbackPlacement:b}=e,[g,w]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),k=g||v,[j,N]=(0,a.useState)(null),[S,E]=(0,a.useState)(null),C=(0,a.useRef)(null),M=(0,a.useRef)(null),I=(0,a.useRef)(null),R=(0,a.useCallback)(()=>{null!==I.current&&(clearTimeout(I.current),I.current=null)},[]),T=(0,a.useCallback)(()=>{R(),I.current=setTimeout(()=>{w(!0),I.current=null},d)},[d,R]),O=(0,a.useCallback)(()=>{R(),w(!1)},[R]),P=(0,a.useCallback)(()=>{y(!0)},[]),D=(0,a.useCallback)(()=>{y(!1)},[]),L=(0,a.useCallback)(()=>{R(),w(!1),y(!1)},[R]),_=(0,a.useCallback)(()=>{let e=C.current,t=M.current;if(!e||!t)return;let r=e.getBoundingClientRect(),a={top:r.top,left:r.left,width:r.width,height:r.height},i={width:window.innerWidth,height:window.innerHeight};m(t,null);let s=t.getBoundingClientRect(),u=function(e,t,n,r,a){let i=e=>"left"===e||"right"===e;if(void 0===a||a===e||!i(e)||!i(a)||!l(e,t,n,r)||!l(a,t,n,r))return null;let s=c(e,t,r),o=c(a,t,r),u=o>s?a:e,d=Math.floor(Math.max(s,o));return d>=80?{placement:u,maxWidth:d}:null}(n,a,{width:s.width,height:s.height},i,b);u&&(m(t,u.maxWidth),s=t.getBoundingClientRect()),E(u?u.maxWidth:null),N(function e(t,n,r,a,i){let s,c;if(void 0!==i&&i!==t&&l(t,n,r,a)&&!l(i,n,r,a))return e(i,n,r,a);let u=n.left+n.width/2-r.width/2,d=n.top+n.height/2-r.height/2;switch(t){case"top":s=n.top-r.height-8,c=u;break;case"bottom":s=n.top+n.height+8,c=u;break;case"left":s=d,c=n.left-r.width-8;break;default:s=d,c=n.left+n.width+8}return{top:o(s,r.height,a.height),left:o(c,r.width,a.width)}}(u?u.placement:n,a,{width:s.width,height:s.height},i,u?void 0:b))},[n,b]);return(0,a.useLayoutEffect)(()=>{if(!k){N(null),E(null);return}return _(),window.addEventListener("resize",_),window.addEventListener("scroll",_,!0),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_,!0)}},[k,_]),(0,a.useEffect)(()=>{if(!k)return;let e=e=>{(0,s.V$)(e)&&L()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[k,L]),(0,a.useEffect)(()=>()=>{R()},[R]),(0,r.jsxs)("span",{ref:C,"data-testid":"tooltip-wrapper",className:h?"relative inline-flex ".concat(h):"relative inline-flex",tabIndex:-1,onMouseEnter:T,onMouseLeave:O,onFocus:P,onBlur:D,children:[f,k&&"undefined"!=typeof document&&(0,i.createPortal)((0,r.jsx)("span",{ref:M,role:"tooltip","aria-hidden":"true","data-placement":n,className:"fixed z-40 whitespace-nowrap px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{...null!=j?j:p,...void 0===x?{}:{zIndex:x},...null===S?{}:u(S)},children:t}),document.body)]})}},45195:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(36809),a=n(26020);function i(){return{currentLocale:(0,r.Ym)(),switchLocale:e=>{if(a.dI.includes(e)){let t="https:"===window.location.protocol;document.cookie="".concat(a.gB,"=").concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax").concat(t?";Secure":""),localStorage.setItem("locale",e),window.location.reload()}}}}},45573:(e,t,n)=>{n.d(t,{P0:()=>en,oQ:()=>et,tJ:()=>Z,xk:()=>ee,xq:()=>ea,yW:()=>er});var r=n(95155),a=n(12115),i=n(47650),s=n(20063),o=n(89275),l=n(18955),c=n(36809),u=n(5379),d=n(79698),m=n(66685),p=n(24533),f=n(61362),h=n(95740),x=n(37772),b=n(11010),g=n(59427),w=n(37494),v=n(79451),y=n(89559),k=n(97470),j=n(94684),N=n(76482),S=n(39332),E=n(86651),C=n(18085),M=n(87531),I=n(59854),R=n(92614),T=n(70628),O=n(51743),P=n(22592),D=n(66966),L=n(68704),_=n(45195),A=n(14548),B=n(48481),z=n(76471),K=n(38606),W=n(79651),V=n(46365),F=n(94442),H=n(18848),G=n(54014);let q=[{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"skills",href:"/skills"},{key:"more",href:"/more"}],U={sessions:m.A,repositories:p.A,review:f.A,skills:h.A,more:x.A},Y="cm.palette.recents";function J(e){if(!e||"object"!=typeof e)return!1;let{kind:t,id:n}=e;return("nav"===t||"worktree"===t||"action"===t)&&"string"==typeof n}function X(e){var t;let{worktree:n,className:a}=e,i=(0,l.c)("common"),s=n.isWaitingForResponse?"waiting":n.isProcessing?"running":n.isSessionRunning?"ready":"idle",o=(0,z.Mq)(s,Object.values(null!=(t=n.sessionStatusByCli)?t:{}).some(e=>(0,K.px)(e)));return(0,r.jsx)(B.m,{status:s,size:"sm",label:o?i(z.rH):void 0,className:(0,M.cn)(a,o&&z.Jd),"data-unclassified":o?"true":void 0})}function Z(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return!!("INPUT"===t||"TEXTAREA"===t||"SELECT"===t||e.isContentEditable||e.closest('[role="log"]'))}let $=(0,M.cn)("flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm","text-foreground","data-[selected=true]:bg-accent-500/15 data-[selected=true]:text-accent-700","dark:data-[selected=true]:text-accent-300"),Q="shrink-0 text-muted-foreground";function ee(){var e;if("undefined"==typeof document)return null;let t=document.querySelector("[data-instance-id]");return(null==t||null==(e=t.getAttribute("data-instance-id"))?void 0:e.trim())||null}function et(e){var t,n;if("undefined"==typeof document)return!1;let r=Array.from(document.querySelectorAll('[data-testid="message-input-textarea"]'));if(0===r.length)return!1;let a=document.activeElement,i=null!=(n=r.find(e=>e===a))?n:r[0],s=i.value,o=""===s.trim()?e:"".concat(s,"\n\n").concat(e),l=null==(t=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value"))?void 0:t.set;return l?l.call(i,o):i.value=o,i.dispatchEvent(new Event("input",{bubbles:!0})),i.focus(),i.setSelectionRange(o.length,o.length),!0}async function en(e,t,n){try{let[r,a]=await Promise.all([fetch("/api/worktrees/".concat(e,"/cli-reference")),fetch("/api/worktrees/".concat(e,"/resolve-target?instance=").concat(encodeURIComponent(t.id)))]);if(!r.ok||!a.ok)return null;let[i,s]=await Promise.all([r.json(),a.json()]);return(0,H.Bz)({binary:i.binary,worktreeId:i.worktreeId,instanceId:s.instanceId,instanceLabel:t.alias,toolLabel:(0,G.oo)(s.cliToolId),portPrefix:i.portPrefix,locale:n})}catch(e){return null}}let er={ja:{heading:"委任 (/delegate)",menuItem:"委任方法をコンポーザーに挿入",inserted:"委任方法をコンポーザーに挿入しました",self:"自分自身には委任できません",noComposer:"コンポーザーが見つかりません。worktree 画面を開いてから実行してください",failed:"委任方法を作成できませんでした"},en:{heading:"Delegate (/delegate)",menuItem:"Insert delegation brief into the composer",inserted:"Delegation brief inserted into the composer",self:"That is this session — nothing to delegate to",noComposer:"No composer on screen. Open a worktree screen and try again",failed:"Could not build the delegation brief"}};function ea(){var e,t,n;let{open:m,setOpen:p}=(0,R.C)(),{setOpen:f}=(0,T.K)(),{openNewTask:h}=(0,O.hX)(),x=(0,o.Hq)(),B=(0,s.usePathname)(),z=(0,c.Ym)(),K=(0,l.c)("commandPalette"),H=(0,l.c)("common"),{theme:ea,setTheme:ei}=(0,u.D)(),{setSize:es,isMobile:eo}=(0,P.Ps)(),{currentLocale:el,switchLocale:ec}=(0,_.g)(),eu=(0,D.rC)(),{showToast:ed}=(0,F.dj)(),[em,ep]=(0,a.useState)(!1),[ef,eh]=(0,a.useState)(""),[ex,eb]=(0,a.useState)([]),eg=(0,a.useRef)(null),ew=(0,a.useRef)(null),ev=(0,a.useRef)(m);(0,a.useEffect)(()=>{ev.current=m},[m]),(0,a.useEffect)(()=>{ep(!0)},[]),(0,a.useEffect)(()=>{function e(e){if(("k"===e.key||"K"===e.key)&&(e.metaKey||e.ctrlKey)){if(ev.current){e.preventDefault(),e.stopPropagation(),p(!1);return}if(Z(e.target)||(0,V.Sj)())return;e.preventDefault(),p(!0);return}"Escape"===e.key&&ev.current&&(e.preventDefault(),e.stopPropagation(),p(!1))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p]),(0,a.useEffect)(()=>{var e,t,n,r;m?(ew.current=null!=(t=document.activeElement)?t:null,null==(e=eg.current)||e.focus(),eh(""),eb(function(){try{let e=localStorage.getItem(Y);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(J).slice(0,8)}catch(e){return[]}}())):ew.current&&(null==(n=(r=ew.current).focus)||n.call(r),ew.current=null)},[m]);let ey=(0,a.useCallback)((e,t)=>{t&&eb(e=>(function(e,t){let n=e.filter(e=>e.kind!==t.kind||e.id!==t.id),r=[t,...n].slice(0,8);try{localStorage.setItem(Y,JSON.stringify(r))}catch(e){}return r})(e,t)),p(!1),e()},[p]),ek=(0,a.useCallback)(async e=>{let t=er["ja"===z?"ja":"en"];if(function(e){let t=/^\/worktrees\/([^/?#]+)/.exec(null!=e?e:"");return t?decodeURIComponent(t[1]):null}(B)===e.worktree.id&&ee()===e.instance.id)return void ed(t.self,"info");let n=await en(e.worktree.id,e.instance,z);if(null===n)return void ed(t.failed,"error");let r=et(n);ed(r?t.inserted:t.noComposer,r?"success":"error")},[z,B,ed]),ej=(0,a.useCallback)(async()=>{try{var e;await A.Rx.sync(),await (null==eu||null==(e=eu.refresh)?void 0:e.call(eu)),ed(K("actions.syncSuccess"),"success")}catch(e){ed(K("actions.syncError"),"error")}},[eu,ed,K]),eN="dark"===ea,eS=""===ef.trim(),eE=null!=(e=null==eu?void 0:eu.error)?e:null,eC=null!=(t=null==eu?void 0:eu.isLoading)&&t,eM=eE?[]:null!=(n=null==eu?void 0:eu.worktrees)?n:[],eI=eM.length>0,eR=!eE&&eC&&0===eM.length,eT=!function(e){let t=e.trim().toLowerCase();return""!==t&&(t.startsWith("/")||t.includes("delegate"))}(ef)?[]:function(e){let t=[];for(let r of e){var n;for(let e of(null==(n=r.agentInstances)?void 0:n.length)?r.agentInstances:r.cliToolId?[{id:r.cliToolId,cliTool:r.cliToolId,alias:(0,G.oo)(r.cliToolId),order:0}]:[])t.push({worktree:r,instance:e})}return t}(eM),eO=er["ja"===z?"ja":"en"],eP=[...eM].sort((e,t)=>{let n=+!!e.isSessionRunning,r=+!!t.isSessionRunning;if(n!==r)return r-n;let a=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-a}),eD=eS?eP.slice(0,8):eP,eL=[{id:"newTask",label:K("actions.newTask"),icon:b.A,run:()=>queueMicrotask(()=>h())},{id:"theme",label:eN?K("actions.toLight"):K("actions.toDark"),icon:eN?g.A:w.A,run:()=>ei(eN?"light":"dark")},...eo?[]:L.Uf.map(e=>({id:"displaysize:".concat(e),label:"".concat(K("actions.displaySizePrefix"),": ").concat(H("displaySize.".concat(e))),icon:v.A,run:()=>es(e)})),{id:"sync",label:K("actions.syncRepositories"),icon:y.A,run:()=>{ej()}},{id:"locale",label:K("actions.switchLanguage"),icon:k.A,run:()=>ec("ja"===el?"en":"ja")},{id:"github",label:K("actions.openGitHub"),icon:j.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:K("actions.keyboardShortcuts"),icon:N.A,run:()=>f(!0)}],e_=eS?ex.map(e=>{if("nav"===e.kind){let t=q.find(t=>t.key===e.id);if(!t)return null;let n=U[t.key],a=H("nav.".concat(t.key));return{id:"nav-".concat(t.key),value:"recent nav ".concat(t.key),node:(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:a})]}),onSelect:()=>ey(()=>x.push(t.href),{kind:"nav",id:t.key})}}if("worktree"===e.kind){let t=eM.find(t=>t.id===e.id);if(!t)return null;let n=t.repositoryDisplayName||t.repositoryName||"",a=t.branch||t.name;return{id:"worktree-".concat(t.id),value:"recent worktree ".concat(t.id),node:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:a}),n&&(0,r.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:n}),(0,r.jsx)(X,{worktree:t,className:n?"ml-2":"ml-auto"})]}),onSelect:()=>ey(()=>x.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id})}}let t=eL.find(t=>t.id===e.id);if(!t)return null;let n=t.icon;return{id:"action-".concat(t.id),value:"recent action ".concat(t.id),node:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:t.label})]}),onSelect:()=>ey(t.run,{kind:"action",id:t.id})}}).filter(e=>null!==e):[];return em?(0,i.createPortal)((0,r.jsx)(r.Fragment,{children:m&&(0,r.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:I.M.MODAL},"data-testid":"command-palette",children:[(0,r.jsx)("div",{"data-state":"open","aria-hidden":"true",className:"fixed inset-0 bg-black/40 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",onClick:()=>p(!1)}),(0,r.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,r.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,M.cn)("relative w-full max-w-lg overflow-hidden rounded-xl bg-surface/95 shadow-2xl ring-1 ring-border backdrop-blur-xl","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-200"),children:(0,r.jsxs)(d.uB,{label:K("title"),className:(0,M.cn)("flex flex-col","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,r.jsx)(E.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,r.jsx)(d.uB.Input,{ref:eg,value:ef,onValueChange:eh,placeholder:K("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,r.jsxs)(d.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,r.jsx)(d.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:K("empty")}),eR&&(0,r.jsx)(d.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:K("loading")}),e_.length>0&&(0,r.jsx)(d.uB.Group,{heading:K("groups.recent"),children:e_.map(e=>(0,r.jsx)(d.uB.Item,{value:e.value,onSelect:e.onSelect,className:$,children:e.node},e.id))}),(0,r.jsx)(d.uB.Group,{heading:K("groups.navigation"),children:q.map(e=>{let t=H("nav.".concat(e.key)),n=U[e.key];return(0,r.jsxs)(d.uB.Item,{value:"nav ".concat(t," ").concat(e.href),onSelect:()=>ey(()=>x.push(e.href),{kind:"nav",id:e.key}),className:$,children:[n&&(0,r.jsx)(n,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:t})]},e.key)})}),eI&&(function(e){let t=new Map;for(let n of e){let e=n.repositoryDisplayName||n.repositoryName||"",r=e||"\0unnamed",a=t.get(r);a?a.worktrees.push(n):t.set(r,{key:r,repository:e,worktrees:[n]})}return[...t.values()]})(eD).map(e=>(0,r.jsx)(d.uB.Group,{heading:e.repository||K("groups.worktrees"),children:e.worktrees.map(t=>{let n=t.branch||t.name;return(0,r.jsxs)(d.uB.Item,{value:"worktree ".concat(e.repository," ").concat(n," ").concat(t.name," ").concat(t.id),onSelect:()=>ey(()=>x.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id}),className:$,children:[(0,r.jsx)(S.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:n}),(0,r.jsx)(X,{worktree:t,className:"ml-auto"})]},t.id)})},e.key)),eT.length>0&&(0,r.jsx)(d.uB.Group,{heading:eO.heading,children:eT.map(e=>{let t=e.worktree.branch||e.worktree.name;return(0,r.jsxs)(d.uB.Item,{"data-testid":"palette-delegate-".concat(e.worktree.id,"-").concat(e.instance.id),value:"/delegate ".concat(e.worktree.id," ").concat(e.instance.id," ").concat(e.instance.alias," ").concat(t),onSelect:()=>ey(()=>{ek(e)}),className:$,children:[(0,r.jsx)(C.A,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:e.instance.alias}),(0,r.jsxs)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:[t," / ",e.instance.id]})]},"".concat(e.worktree.id,":").concat(e.instance.id))})}),(0,r.jsx)(d.uB.Group,{heading:K("groups.actions"),children:eL.map(e=>{let t=e.icon;return(0,r.jsxs)(d.uB.Item,{value:"action ".concat(e.id," ").concat(e.label),onSelect:()=>ey(e.run,{kind:"action",id:e.id}),className:$,children:[(0,r.jsx)(t,{size:16,className:Q,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:e.label})]},e.id)})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 border-t border-border bg-surface-2 px-3 py-2 text-[11px] text-muted-foreground",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"↑"}),(0,r.jsx)(W.u,{children:"↓"}),K("footer.navigate")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"↵"}),K("footer.select")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(W.u,{children:"esc"}),K("footer.close")]})]})]})})})]})}),document.body):null}},46365:(e,t,n)=>{function r(e){let t=e.ownerDocument.defaultView;for(let n=e;n;n=n.parentElement)if(n instanceof HTMLElement&&n.hidden||t&&"none"===t.getComputedStyle(n).display)return!1;return!0}function a(){return"undefined"!=typeof document&&Array.from(document.querySelectorAll("".concat('[role="dialog"][aria-modal="true"]:not([data-state="closed"]):not([data-testid="prompt-panel"])',", ").concat('[role="menu"][data-state="open"]'))).some(r)}n.d(t,{Sj:()=>a})},46892:(e,t,n)=>{n.d(t,{PL:()=>a,sb:()=>i});let r={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},a={idle:{className:r.idle,labelKey:"status.idle",type:"dot"},ready:{className:r.ready,labelKey:"status.ready",type:"dot"},running:{className:r.spinner,labelKey:"status.running",type:"spinner"},waiting:{className:r.waiting,labelKey:"status.waiting",type:"dot"},generating:{className:r.spinner,labelKey:"status.generating",type:"spinner"}},i={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},51743:(e,t,n)=>{n.d(t,{Zg:()=>c,hX:()=>u,uH:()=>d});var r=n(95155),a=n(12115),i=n(46365);let s=()=>{},o=(0,a.createContext)({isOpen:!1,requestedTarget:null,screenTarget:null,openNewTask:s,closeNewTask:s,setCloseLocked:s}),l=(0,a.createContext)(s);function c(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),p=(0,a.useRef)(!1),f=(0,a.useCallback)(e=>{(0,i.Sj)()||(u(null!=e?e:null),s(!0))},[]),h=(0,a.useCallback)(()=>{p.current||s(!1)},[]),x=(0,a.useCallback)(e=>{p.current=e},[]),b=(0,a.useCallback)(e=>{m(t=>null===t&&null===e||t&&e&&t.worktreeId===e.worktreeId&&t.instanceId===e.instanceId?t:e)},[]),g=(0,a.useMemo)(()=>({isOpen:n,requestedTarget:c,screenTarget:d,openNewTask:f,closeNewTask:h,setCloseLocked:x}),[n,c,d,f,h,x]);return(0,r.jsx)(l.Provider,{value:b,children:(0,r.jsx)(o.Provider,{value:g,children:t})})}function u(){return(0,a.useContext)(o)}function d(){return(0,a.useContext)(l)}},55756:(e,t,n)=>{n.d(t,{Bl:()=>i,cv:()=>a});let r="data-mobile-drawer-opener",a={[r]:""};function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.querySelector("[".concat(r,"]"));return!!t&&(t.focus(),!0)}},63470:(e,t,n)=>{n.d(t,{Y:()=>m,y2:()=>d});var r=n(95155),a=n(12115),i=n(18955),s=n(14548),o=n(36402),l=n(94442);let c=()=>{},u=(0,a.createContext)({updateInfo:null,checking:!1,hasUpdate:!1,pendingVersion:null,canSelfUpdate:!1,state:"idle",logPath:null,errorKey:null,openConfirm:c,cancel:c,confirm:async()=>{}});function d(e){var t,n;let{children:c,enabled:d=!0}=e,m=(0,i.c)("worktree"),{showToast:p}=(0,l.dj)(),[f,h]=(0,a.useState)(null),[x,b]=(0,a.useState)(!0),[g,w]=(0,a.useState)("idle"),[v,y]=(0,a.useState)(null),[k,j]=(0,a.useState)(null),N=(0,a.useRef)("idle");(0,a.useEffect)(()=>{N.current=g},[g]);let S=(0,a.useRef)(!1),E=(0,a.useRef)(async()=>{});(0,a.useEffect)(()=>{if(!d)return;let e=!1,t=async()=>{if("idle"===N.current)try{let t=await s.GQ.checkForUpdate();if(e)return;h(e=>"degraded"===t.status&&null!==e?e:t)}catch(e){}finally{e||b(!1)}};E.current=t,t();let n=setInterval(()=>{t()},36e5);return()=>{e=!0,E.current=async()=>{},clearInterval(n)}},[d]);let C=(null==f?void 0:f.hasUpdate)===!0,M=C?null:null!=(t=null==f?void 0:f.pendingVersion)?t:null;(0,a.useEffect)(()=>{if(!M)return;let e=setInterval(()=>{E.current()},3e5);return()=>clearInterval(e)},[M]);let I=(null==f?void 0:f.installType)==="global"||(null==f?void 0:f.installType)==="npx",R=(0,a.useCallback)(()=>{C&&I&&w(e=>"idle"===e?"confirming":e)},[C,I]),T=(0,a.useCallback)(()=>{w(e=>"confirming"===e?"idle":e)},[]),O=(0,a.useCallback)(async()=>{if("confirming"===N.current){N.current="starting",w("starting");try{let e=await s.GQ.startUpdate();y(e.logPath),w(e.willRestart?"updating":"no-restart")}catch(t){var e;if(t instanceof s.hD&&409===t.status&&(null==(e=t.data)?void 0:e.code)==="not_yet_published"){p(m("update.notYetPublished"),"info"),N.current="idle",w("idle"),E.current();return}t instanceof s.hD&&400===t.status?j("update.errorNotGlobal"):t instanceof s.hD&&409===t.status?j("update.errorInProgress"):j("update.errorGeneric"),w("error")}}},[p,m]);(0,a.useEffect)(()=>{if("updating"!==g)return;let e=!1,t=Date.now();S.current=!1;let n=setInterval(async()=>{if(e)return;if(Date.now()-t>3e5)return void w("timeout");let n=await s.GQ.ping();if(!e){if(!n){S.current=!0;return}S.current&&window.location.reload()}},2e3);return()=>{e=!0,clearInterval(n)}},[g]);let P=(0,a.useMemo)(()=>({updateInfo:f,checking:x,hasUpdate:C,pendingVersion:M,canSelfUpdate:I,state:g,logPath:v,errorKey:k,openConfirm:R,cancel:T,confirm:O}),[f,x,C,M,I,g,v,k,R,T,O]);return(0,r.jsxs)(u.Provider,{value:P,children:[c,(0,r.jsx)(o.TM,{isOpen:"confirming"===g,title:m("update.confirmTitle"),description:m("update.confirmDescription",{version:null!=(n=null==f?void 0:f.latestVersion)?n:""}),confirmLabel:m("update.confirmButton"),onConfirm:()=>{O()},onCancel:T})]})}function m(){return(0,a.useContext)(u)}},68704:(e,t,n)=>{n.d(t,{Uf:()=>i,d8:()=>s,fM:()=>o,of:()=>c,r5:()=>a,rq:()=>l});var r=n(2317);let a="medium",i=["large","medium","small","xsmall"],s={large:{value:"large",rootFontSizePx:18,factor:1.125,terminalFontSize:16},medium:{value:"medium",rootFontSizePx:16,factor:1,terminalFontSize:14},small:{value:"small",rootFontSizePx:14,factor:.875,terminalFontSize:12},xsmall:{value:"xsmall",rootFontSizePx:12.5,factor:.78,terminalFontSize:11}};function o(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(s,e)}function l(e){return s[e].terminalFontSize}function c(){let{value:e,setValue:t,isAvailable:n}=(0,r.V)({key:"mcbd-pc-display-size",defaultValue:a,validate:o});return{size:e,setSize:t,isAvailable:n}}},69858:(e,t,n)=>{n.d(t,{yP:()=>y,Fy:()=>m,R8:()=>x,Xd:()=>b});var r=n(95155),a=n(12115),i=n(47650),s=n(18955),o=n(5917),l=n(38606),c=n(76471),u=n(86815),d=n(39970);let m=(0,a.createContext)(!0);function p(e){let{worktreeStatus:t}=e,n=(0,s.c)("worktree");return(0,a.useContext)(m)&&t?(0,r.jsxs)("span",{"data-testid":"branch-worktree-status","data-status":t,className:"flex-shrink-0 inline-flex items-center",title:n((0,d.Zh)(t)),children:[(0,r.jsx)("span",{"data-testid":"branch-worktree-status-dot","aria-hidden":"true",className:"h-1.5 w-1.5 rounded-full @min-[17rem]:hidden ".concat(d.mq[t])}),(0,r.jsx)("span",{"data-testid":"branch-worktree-status-label",className:"sr-only @min-[17rem]:not-sr-only @min-[17rem]:max-w-[5.5rem] @min-[17rem]:truncate\n @min-[17rem]:rounded-full @min-[17rem]:px-1.5 @min-[17rem]:text-[10px] @min-[17rem]:font-medium\n @min-[17rem]:leading-4 ".concat(d.SE[t]),children:n((0,d.Zh)(t))})]}):null}var f=n(94442),h=n(66966);let x="px-2";function b(e){return"rounded-[10px] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring ".concat(e?"bg-sidebar-border":"hover:bg-sidebar-hover")}function g(e,t,n){let r=n-8-t;return r<=8?8:Math.min(Math.max(e,8),r)}function w(e){let{id:t,branch:n,isVisible:s,anchorRef:o,nextActionLabel:c,unclassified:u,awaitingInstructionLabel:d}=e,[m,p]=(0,a.useState)({top:-9999,left:-9999}),f=(0,a.useRef)(null);if((0,a.useEffect)(()=>{var e,t,n;if(!s||!o.current)return;let r=o.current.getBoundingClientRect(),a=null==(e=f.current)?void 0:e.getBoundingClientRect(),i=null!=(t=null==a?void 0:a.width)?t:0,l=null!=(n=null==a?void 0:a.height)?n:0,c=window.innerWidth,u=window.innerHeight,d=r.right+8;if(d+i>c-8){let e=r.left-8-i;e>=8&&(d=e)}p({top:g(r.top,l,u),left:g(d,i,c)})},[s,o]),"undefined"==typeof document||!s)return null;let h=Math.min(384,Math.max(0,window.innerWidth-16));return i.createPortal((0,r.jsxs)("div",{ref:f,id:t,role:"tooltip",className:" fixed z-[9999] px-3 py-2 rounded-md shadow-lg bg-sidebar text-xs text-sidebar-foreground border border-sidebar-border pointer-events-none max-w-sm transition-opacity duration-150 ",style:{top:m.top,left:m.left,maxWidth:h},children:[(0,r.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:n.name}),(0,r.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:n.repositoryName}),(0,r.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",u?l.pu:n.status]}),n.worktreePath&&(0,r.jsx)("p",{className:"text-sidebar-muted truncate",children:n.worktreePath}),c&&(0,r.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Next: ",c]}),d&&(0,r.jsx)("p",{className:"text-success-foreground whitespace-nowrap",children:d}),n.description&&(0,r.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:n.description})]}),document.body)}let v=0,y=(0,a.memo)(function(e){let{branch:t,isSelected:n,onClick:i,showRepositoryName:m=!0}=e,g=(0,s.c)("common"),y=(0,s.c)("worktree"),k="tooltip-".concat(t.id),j=(0,a.useRef)(null),[N,S]=(0,a.useState)(!1),E=(0,a.useRef)(null),C=(0,a.useCallback)(()=>{null!==E.current&&(clearTimeout(E.current),E.current=null)},[]);(0,a.useEffect)(()=>()=>C(),[C]);let M=(0,l.A7)(t.cliStatus),I="waiting"===M,R=!0===t.awaitingInstruction,T=t.nextActionKey?y(t.nextActionKey):null,O=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=t.exitedInstanceIds)?e:[])},[t.exitedInstanceIds]),P=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=t.unclassifiedInstanceIds)?e:[])},[t.unclassifiedInstanceIds]),D=(0,l.Pn)(t.cliStatus,t.unclassifiedInstanceIds),L=(I||R)&&null!==T,_=null!==T&&(L||n),A=N&&!n,[B,z]=(0,a.useState)(!1),[K,W]=(0,a.useState)(!1),[V,F]=(0,a.useState)(!1),H=n||B||K||V,{worktreeStatus:G,handleWorktreeStatusChange:q}=function(e,t,n){var r;let{showToast:i}=(0,f.dj)(),s=null==(r=(0,h.rC)())?void 0:r.refresh,[o,l]=(0,a.useState)(void 0),c=(0,a.useRef)(0),u=(0,a.useRef)(0),m=(0,a.useRef)(null),p=(0,a.useRef)(null),x=(0,a.useRef)(null),b=null!=t?t:null,g=void 0!==o?o:b;return p.current=b,(0,a.useEffect)(()=>{if(c.current!==u.current)return;let e=x.current;(null===e||(0,d.FI)(e))&&(x.current=null,l(void 0))},[b]),{worktreeStatus:g,handleWorktreeStatusChange:(0,a.useCallback)(async t=>{let r=++c.current;m.current=p.current,x.current=null,l(t);try{await (0,d.V9)(e,t)}catch(e){if(r!==c.current)return;u.current=r,l(void 0),i(n("branchItem.statusChangeFailed"),"error");return}let a=(0,d.Xg)();try{await (null==s?void 0:s())}finally{r===c.current&&(u.current=r,s?(x.current=a,(0,d.FI)(a)&&p.current!==m.current&&(x.current=null,l(void 0))):p.current!==m.current&&l(void 0))}},[e,s,i,n])}}(t.id,t.worktreeStatus,g);return(0,a.useEffect)(()=>{n&&S(!1)},[n]),(0,a.useEffect)(()=>{if(!N)return;let e=()=>S(!1);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[N]),(0,r.jsxs)("div",{"data-testid":"branch-list-row",className:"relative w-full min-w-0 ".concat(x),onPointerEnter:()=>z(!0),onPointerLeave:()=>z(!1),onFocus:e=>{e.target.matches(":focus-visible")&&W(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||W(!1)},children:[(0,r.jsxs)("button",{ref:j,"data-testid":"branch-list-item",onClick:()=>{C(),v=Date.now()+400,S(!1),i()},onMouseEnter:()=>{C(),Date.now()>=v&&(E.current=setTimeout(()=>{S(!0)},150))},onMouseLeave:()=>{C(),S(!1)},onFocus:e=>{C(),e.target.matches(":focus-visible")&&(E.current=setTimeout(()=>{S(!0)},150))},onBlur:()=>{C(),S(!1)},"aria-current":n?"true":void 0,"aria-describedby":A?k:void 0,"aria-label":m?void 0:"".concat(t.name," - ").concat(t.repositoryName),className:"\n group relative w-full min-h-[34px] pl-3 py-1.5 flex flex-col justify-center gap-0.5\n ".concat(H?n?"pr-9":"pr-9 [@media(hover:none)]:pr-3":"pr-3","\n ").concat(b(n),"\n "),children:[(0,r.jsxs)("div",{className:"@container flex items-center gap-2 w-full min-w-0",children:[t.cliStatus&&Object.keys(t.cliStatus).length>0&&(0,r.jsx)("div",{className:"flex items-center justify-center flex-shrink-0 w-4","aria-label":g("branchItem.cliToolStatus"),children:(0,r.jsx)(c.Ej,{status:M,label:(0,l.dw)(t.cliStatus,t.cliStatusLabels,O.size>0?e=>O.has(e)?g("branchItem.agentExited"):null:void 0,P),waitingKind:t.waitingKind,unclassified:D})}),(0,r.jsx)("p",{className:"flex-1 min-w-0 text-left text-sm text-sidebar-foreground truncate",children:t.name}),m&&(0,r.jsx)("p",{className:"flex-shrink min-w-0 max-w-[40%] text-xs text-sidebar-muted truncate",children:t.repositoryName}),(0,r.jsx)(p,{worktreeStatus:G}),R&&(0,r.jsxs)("span",{"data-testid":"awaiting-instruction-badge",className:"flex-shrink-0 inline-flex h-4 w-4 items-center justify-center rounded-full bg-success-subtle text-success-foreground",title:y("awaitingInstruction.label"),children:[(0,r.jsx)(o.A,{className:"h-3 w-3",strokeWidth:3,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"sr-only",children:y("awaitingInstruction.badge")})]}),t.hasUnread&&(0,r.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-accent-500 flex-shrink-0","aria-label":g("branchItem.hasUnread")})]}),_&&(0,r.jsx)("p",{"data-testid":"branch-next-action",className:"pl-6 text-left text-xs font-medium truncate ".concat(n?"block":"hidden [@media(hover:none)]:block"," ").concat(I?"text-warning-foreground":R?"text-success-foreground":"text-sidebar-muted"),children:T}),n&&t.description&&(0,r.jsx)("p",{"data-testid":"branch-description",className:"pl-6 text-left text-xs text-sidebar-muted truncate",children:t.description}),(0,r.jsx)(w,{id:k,branch:t,isVisible:A,anchorRef:j,nextActionLabel:T,unclassified:D,awaitingInstructionLabel:R?y("awaitingInstruction.badge"):null})]}),H&&(0,r.jsx)(u.m,{branch:t,isSelected:n,onOpenChange:F,worktreeStatus:G,onWorktreeStatusChange:q})]})})},70628:(e,t,n)=>{n.d(t,{K:()=>o,S:()=>s});var r=n(95155),a=n(12115);let i=(0,a.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>s(e=>!e),[]),l=(0,a.useMemo)(()=>({open:n,setOpen:s,toggle:o}),[n,o]);return(0,r.jsx)(i.Provider,{value:l,children:t})}function o(){return(0,a.useContext)(i)}},72137:(e,t,n)=>{n.d(t,{H:()=>m});var r=n(95155),a=n(12115),i=n(18955),s=n(68695),o=n(31166),l=n(94465),c=n(79361),u=n(63470),d=n(38218);function m(){var e,t;let n=(0,i.c)("worktree"),m=(0,d.a)(),{updateInfo:p,hasUpdate:f,pendingVersion:h,canSelfUpdate:x,state:b,openConfirm:g}=(0,u.Y)(),[w,v]=(0,a.useState)(!1),y=null!=(e=null==p?void 0:p.latestVersion)?e:null;if(m||!y)return null;if("idle"===b&&!f&&h){let e=n("update.pendingDescription",{version:h});return(0,r.jsxs)(o.$,{type:"button",variant:"secondary",size:"sm",disabled:!0,className:"flex-shrink-0 gap-1.5 whitespace-nowrap",title:e,"aria-label":e,"data-testid":"app-update-button","data-state":"pending",children:[(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:n("update.pendingLabel",{version:h})})]})}if("idle"===b&&!f)return null;let k="starting"===b||"updating"===b,j="no-restart"===b||"timeout"===b||"error"===b,N=n("update.buttonLabel",{version:y});return x||k||j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.$,{type:"button",variant:"primary",size:"sm",loading:k,onClick:j?()=>v(!0):g,className:"flex-shrink-0 gap-1.5 whitespace-nowrap","aria-label":k?n("update.buttonUpdating"):n("update.buttonAriaLabel",{version:y}),"aria-haspopup":"dialog","aria-busy":k,"data-testid":"app-update-button","data-state":b,children:[!k&&(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:k?n("update.buttonUpdating"):N})]}),j&&(0,r.jsx)(l.a,{isOpen:w,onClose:()=>v(!1),title:n("update.statusDialogTitle"),size:"sm",children:(0,r.jsx)(c.V,{})})]}):(0,r.jsxs)("a",{href:null!=(t=null==p?void 0:p.releaseUrl)?t:"https://github.com/Kewton/CommandMate/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"inline-flex flex-shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium bg-accent-600 dark:bg-accent-500 text-white hover:bg-accent-700 dark:hover:bg-accent-600 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":n("update.buttonReleaseAriaLabel",{version:y}),"data-testid":"app-update-button",children:[(0,r.jsx)(s.A,{size:16,"aria-hidden":"true"}),(0,r.jsx)("span",{children:N})]})}},79361:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(95155),a=n(18955),i=n(63470),s=n(31166),o=n(3005);function l(){let e=(0,a.c)("worktree"),{updateInfo:t,hasUpdate:n,canSelfUpdate:l,state:c,logPath:u,errorKey:d,openConfirm:m}=(0,i.Y)();if(!t||!n&&"idle"===c)return null;let{latestVersion:p,releaseUrl:f,updateCommand:h,installType:x}=t,b="npx"===x,g=b?"npx commandmate@latest":"commandmate update";return(0,r.jsxs)("div",{className:"bg-accent-50 border border-accent-200 rounded-lg p-3 mt-2",role:"status","aria-label":e("update.available"),"data-testid":"update-notification-banner",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800 mb-1",children:e("update.available")}),p&&(0,r.jsx)("p",{className:"text-sm text-accent-700 mb-2",children:e("update.latestVersion",{version:p})}),l&&"idle"===c&&(0,r.jsx)(s.$,{variant:"primary",size:"sm",className:"mb-2",onClick:m,"data-testid":"update-now-button",children:e("update.updateNow")}),b&&"idle"===c&&(0,r.jsx)("p",{className:"text-xs text-accent-600 mb-2","data-testid":"update-npx-notice",children:e("update.npxRestartNotice")}),("starting"===c||"updating"===c)&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-progress",children:[(0,r.jsxs)("p",{className:"flex items-center text-sm text-accent-800",children:[(0,r.jsx)(o.y,{size:"sm",className:"mr-2"}),e("starting"===c?"update.starting":"update.updating")]}),"updating"===c&&(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.updatingHint")})]}),"no-restart"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-no-restart",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.noRestartTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.noRestartDescription")})]}),"timeout"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-timeout",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.timeoutTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:e("update.timeoutDescription")}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 mt-1 text-xs text-accent-900 font-mono",children:g})]}),"error"===c&&(0,r.jsxs)("div",{className:"mb-2","data-testid":"update-error",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-accent-800",children:e("update.errorTitle")}),(0,r.jsx)("p",{className:"text-xs text-accent-600 mt-1",children:d?e(d):null}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 mt-1 text-xs text-accent-900 font-mono",children:g})]}),u&&("no-restart"===c||"timeout"===c)&&(0,r.jsx)("p",{className:"text-xs text-accent-500 mb-2","data-testid":"update-log-hint",children:e("update.logHint",{path:u})}),h&&"global"===x&&"idle"===c&&(0,r.jsxs)("div",{className:"mb-2",children:[(0,r.jsx)("p",{className:"text-xs text-accent-600 mb-1",children:e("update.updateCommand")}),(0,r.jsx)("code",{className:"block bg-accent-100 rounded px-2 py-1 text-xs text-accent-900 font-mono",children:h})]}),f&&(0,r.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-accent-600 hover:text-accent-800 underline",children:[e("update.viewRelease"),(0,r.jsx)("span",{className:"ml-1","aria-hidden":"true",children:"→"})]}),(0,r.jsx)("p",{className:"text-xs text-accent-500 mt-2",children:e("update.dataPreserved")})]})}},86815:(e,t,n)=>{n.d(t,{K:()=>f,m:()=>h});var r=n(95155),a=n(12115),i=n(18955),s=n(37772),o=n(27937),l=n(47971),c=n(26232),u=n(94442),d=n(60322),m=n(59854),p=n(39970);let f="data-branch-row-actions",h=(0,a.memo)(function(e){let{branch:t,isSelected:n,onOpenChange:h,worktreeStatus:x=null,onWorktreeStatusChange:b}=e,g=(0,i.c)("common"),w=(0,i.c)("worktree"),{showToast:v}=(0,u.dj)(),y=(0,a.useCallback)(async e=>{try{await (0,d.l)(e),v(g("branchItem.copied"),"success")}catch(e){v(g("branchItem.copyFailed"),"error")}},[v,g]);return(0,r.jsxs)(c.rI,{onOpenChange:h,children:[(0,r.jsx)(c.ty,{asChild:!0,children:(0,r.jsx)("button",{type:"button","data-testid":"branch-row-actions","aria-label":g("branchItem.actions",{name:t.name}),title:g("branchItem.actions",{name:t.name}),className:"absolute right-3 top-[5px] flex h-6 w-6 items-center justify-center rounded-md\n text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground\n focus:outline-none focus-visible:ring-2 focus-visible:ring-ring\n data-[state=open]:text-sidebar-foreground ".concat(n?"":"[@media(hover:none)]:hidden"),children:(0,r.jsx)(s.A,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,r.jsxs)(c.SQ,{align:"end",[f]:"",onEscapeKeyDown:e=>e.stopPropagation(),children:[(0,r.jsx)(c._2,{asChild:!0,children:(0,r.jsx)("a",{href:"/worktrees/".concat(t.id),target:"_blank",rel:"noopener noreferrer",children:g("branchItem.openInNewTab")})}),(0,r.jsx)(c._2,{onSelect:()=>void y(t.name),children:g("branchItem.copyBranchName")}),t.worktreePath&&(0,r.jsx)(c._2,{onSelect:()=>{var e;y(null!=(e=t.worktreePath)?e:"")},children:g("branchItem.copyPath")}),b&&(0,r.jsxs)(l.Pb,{children:[(0,r.jsxs)(l.ZP,{"data-testid":"branch-row-status",className:"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-muted data-[state=open]:bg-muted",children:[(0,r.jsx)("span",{className:"flex-1",children:g("branchItem.status")}),(0,r.jsx)("span",{"data-testid":"branch-row-status-current",className:"text-xs text-muted-foreground",children:w((0,p.Zh)(x))}),(0,r.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground","aria-hidden":"true"})]}),(0,r.jsx)(l.ZL,{children:(0,r.jsx)(l.G5,{[f]:"",sideOffset:4,collisionPadding:8,style:{zIndex:m.M.POPOVER},className:"min-w-[9rem] overflow-hidden rounded-md border border-border bg-surface p-1 text-surface-foreground shadow-lg",onEscapeKeyDown:e=>e.stopPropagation(),children:(0,r.jsx)(c.Hr,{value:null!=x?x:"",onValueChange:e=>{let t=""===e?null:e;t!==x&&b(t)},children:p.m9.map(e=>{var t;return(0,r.jsx)(c.Ht,{value:null!=(t=e.value)?t:"",children:w(e.labelKey)},e.labelKey)})})})})]})]})]})})},89275:(e,t,n)=>{n.d(t,{Bo:()=>u,Hq:()=>l});var r=n(95155),a=n(12115),i=n(20063);let s={startTransition:e=>e()},o=(0,a.createContext)(null);function l(){var e;let t=(0,i.useRouter)(),{startTransition:n}=null!=(e=(0,a.useContext)(o))?e:s;return(0,a.useMemo)(()=>({push:e=>n(()=>t.push(e)),replace:e=>n(()=>t.replace(e))}),[t,n])}function c(e){let{onCommit:t}=e,n=(0,i.usePathname)(),r=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!r.current){r.current=!0;return}t()},[n,t]),null}function u(e){let{children:t}=e,n=(0,a.useRef)(null),i=(0,a.useCallback)(()=>{var e;null==(e=n.current)||e.call(n)},[]),s=(0,a.useCallback)(e=>{var t;t=()=>new Promise(t=>{let r=!1,a=()=>{r||(r=!0,t())};n.current=a,e(),window.setTimeout(a,500)}),"undefined"==typeof document||"function"!=typeof document.startViewTransition||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?t():document.startViewTransition(t)},[]),l=(0,a.useMemo)(()=>({startTransition:s}),[s]);return(0,r.jsxs)(o.Provider,{value:l,children:[(0,r.jsx)(c,{onCommit:i}),t]})}},92614:(e,t,n)=>{n.d(t,{C:()=>o,E:()=>s});var r=n(95155),a=n(12115);let i=(0,a.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>s(e=>!e),[]),l=(0,a.useMemo)(()=>({open:n,setOpen:s,toggle:o}),[n,o]);return(0,r.jsx)(i.Provider,{value:l,children:t})}function o(){return(0,a.useContext)(i)}},98873:(e,t,n)=>{n.d(t,{D:()=>i});var r=n(12115),a=n(7636);function i(e){let{items:t,sortKey:n,sortDirection:i,viewMode:s,filterText:o}=e,l=(0,r.useMemo)(()=>{if(!o)return t;let e=o.toLowerCase();return t.filter(t=>t.name.toLowerCase().includes(e)||t.repositoryName.toLowerCase().includes(e))},[t,o]);return{sortedItems:(0,r.useMemo)(()=>(0,a.Xn)(l,n,i),[l,n,i]),groupedItems:(0,r.useMemo)(()=>"grouped"===s?(0,a._s)(l,n,i):[],[l,n,i,s])}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6966],{39649:(e,t,r)=>{r.d(t,{$f:()=>f,H8:()=>d});var n=r(95155),s=r(12115),i=r(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6966],{39649:(e,t,r)=>{r.d(t,{$f:()=>f,H8:()=>d});var n=r(95155),s=r(12115),i=r(14548),o=r(39970);let l={PROCESSING:2e3,SESSION_RUNNING:5e3,IDLE:1e4},u=(0,s.createContext)(null),a={selectedWorktreeId:null,worktrees:[],repositories:[],selectedWorktreeDetail:null,isLoading:!0,isLoadingDetail:!1,error:null};function c(e,t){switch(t.type){case"SET_WORKTREES":return{...e,worktrees:t.worktrees,isLoading:!1};case"SET_REPOSITORIES":return{...e,repositories:t.repositories};case"SELECT_WORKTREE":{var r;let n=null!=(r=e.worktrees.find(e=>e.id===t.id))?r:null;return{...e,selectedWorktreeId:t.id,selectedWorktreeDetail:null!=n?n:e.selectedWorktreeDetail,isLoadingDetail:null===n}}case"SET_WORKTREE_DETAIL":return{...e,selectedWorktreeDetail:t.detail};case"SET_LOADING":return{...e,isLoading:t.isLoading};case"SET_LOADING_DETAIL":return{...e,isLoadingDetail:t.isLoadingDetail};case"SET_ERROR":return{...e,error:t.error,isLoading:!1};default:return e}}function d(e){let{children:t,externalWorktrees:r,externalRepositories:d,externalIsLoading:f,externalError:E,externalRefresh:g}=e,S=void 0!==r,[R,k]=(0,s.useReducer)(c,a);(0,s.useEffect)(()=>{S&&r&&k({type:"SET_WORKTREES",worktrees:r})},[S,r]),(0,s.useEffect)(()=>{S&&d&&k({type:"SET_REPOSITORIES",repositories:d})},[S,d]);let w=(0,s.useCallback)(async()=>{if(!S){k({type:"SET_LOADING",isLoading:!0}),k({type:"SET_ERROR",error:null});try{var e;let t=(0,o.Xg)(),r=await i.y.getAll();k({type:"SET_WORKTREES",worktrees:(0,o.Th)(r.worktrees,t)}),k({type:"SET_REPOSITORIES",repositories:null!=(e=r.repositories)?e:[]})}catch(e){k({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktrees"})}}},[S]),p=(0,s.useCallback)(async e=>{k({type:"SELECT_WORKTREE",id:e}),k({type:"SET_ERROR",error:null});try{i.y.markAsViewed(e).catch(e=>{console.warn("[WorktreeSelectionContext] Failed to mark as viewed:",e)});let t=(0,o.Xg)(),r=await i.y.getById(e);k({type:"SET_WORKTREE_DETAIL",detail:(0,o.Dj)(r,t)})}catch(e){k({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktree detail"})}finally{k({type:"SET_LOADING_DETAIL",isLoadingDetail:!1})}},[]),y=(0,s.useCallback)(async()=>{if(S&&g)return void await g();await w()},[S,g,w]);(0,s.useEffect)(()=>{S||w()},[w,S]),(0,s.useEffect)(()=>{if(S)return;let e=null,t=!0,r=async()=>{if(t)try{var n,s;let u=(0,o.Xg)(),a=await i.y.getAll();k({type:"SET_WORKTREES",worktrees:(0,o.Th)(a.worktrees,u)}),k({type:"SET_REPOSITORIES",repositories:null!=(n=a.repositories)?n:[]});let c=(s=a.worktrees).some(e=>e.isProcessing||e.isWaitingForResponse)?l.PROCESSING:s.some(e=>e.isSessionRunning)?l.SESSION_RUNNING:l.IDLE;t&&(e=setTimeout(r,c))}catch(n){if(n instanceof i.hD&&401===n.status)return;console.error("[WorktreeSelectionContext] Polling error:",n),t&&(e=setTimeout(r,l.SESSION_RUNNING))}};return r(),()=>{t=!1,e&&clearTimeout(e)}},[S]);let h=S&&void 0!==f?f:R.isLoading,T=S&&E?E.message:null,v={selectedWorktreeId:R.selectedWorktreeId,worktrees:R.worktrees,repositories:R.repositories,selectedWorktreeDetail:R.selectedWorktreeDetail,isLoading:h,isLoadingDetail:R.isLoadingDetail,error:null!=T?T:R.error,selectWorktree:p,refreshWorktrees:y};return(0,n.jsx)(u.Provider,{value:v,children:t})}function f(){let e=(0,s.useContext)(u);if(!e)throw Error("useWorktreeSelection must be used within a WorktreeSelectionProvider");return e}},39970:(e,t,r)=>{r.d(t,{Dj:()=>g,FI:()=>p,LP:()=>f,PX:()=>E,SE:()=>i,Th:()=>S,V9:()=>R,WZ:()=>w,Xg:()=>d,Zh:()=>s,m9:()=>n,mq:()=>o});let n=[{value:null,labelKey:"worktreeStatus.notSet"},{value:"ready",labelKey:"worktreeStatus.ready"},{value:"in_progress",labelKey:"worktreeStatus.inProgress"},{value:"in_review",labelKey:"worktreeStatus.inReview"},{value:"done",labelKey:"worktreeStatus.done"}];function s(e){var t,r;return null!=(r=null==(t=n.find(t=>t.value===(null!=e?e:null)))?void 0:t.labelKey)?r:"worktreeStatus.notSet"}let i={ready:"bg-muted text-muted-foreground",in_progress:"bg-accent-100 dark:bg-accent-900/30 text-accent-700 dark:text-accent-400",in_review:"bg-info-subtle text-info-foreground",done:"bg-success-subtle text-success-foreground"},o={ready:"bg-muted-foreground",in_progress:"bg-accent-500",in_review:"bg-info",done:"bg-success"};async function l(e,t){let r=await fetch("/api/worktrees/".concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:t})});if(!r.ok)throw Error("Failed to update worktree status: HTTP ".concat(r.status));return await r.json()}let u=0,a=new Map,c=new Map;function d(){return u}function f(){return u+=1}function E(e,t,r,n){let s=a.get(e),i=r,o=t;return s&&s.generation>i&&(i=s.generation,o=s.status),n&&void 0!==n.status&&n.at>i&&(o=n.status),o}function g(e,t){let r=function(e,t,r){let n=a.get(e);return n&&n.generation>r?n.status:t}(e.id,e.status,t);return r===e.status?e:{...e,status:r}}function S(e,t){let r=!1,n=e.map(e=>{let n=g(e,t);return n!==e&&(r=!0),n});return r?n:e}function R(e,t){var r;let n=(null!=(r=c.get(e))?r:Promise.resolve()).catch(()=>void 0).then(()=>l(e,t)).then(r=>(u+=1,a.set(e,{generation:u,status:t}),r)),s=n.catch(()=>void 0);return c.set(e,s),s.then(()=>{c.get(e)===s&&c.delete(e)}),n}let k=-1;function w(e){e>k&&(k=e)}function p(e){return k>=e}},66966:(e,t,r)=>{r.d(t,{g7:()=>d,rC:()=>E,Fn:()=>f});var n=r(95155),s=r(12115),i=r(14548),o=r(60199),l=r(39970);let u=[2e3,5e3,1e4];var a=r(39649);let c=(0,s.createContext)(null);function d(e){let{children:t,enabled:r=!0}=e,{worktrees:d,repositories:f,isLoading:E,error:g,refresh:S}=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,r]=(0,s.useState)([]),[n,a]=(0,s.useState)([]),[c,d]=(0,s.useState)(!0),[f,E]=(0,s.useState)(null),g=(0,s.useRef)(null),S=(0,s.useRef)([]),R=(0,s.useRef)(null),k=(0,s.useRef)(0),w=(0,s.useRef)(0),p=(0,s.useRef)(null),y=(0,s.useRef)(!1),h=(0,s.useRef)(async()=>{}),T=(0,s.useCallback)(()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},[]),{connected:v,subscribe:I,unsubscribe:_,addListener:m}=(0,o.xM)(),b=(0,s.useRef)(v);b.current=v;let W=(0,s.useCallback)(async()=>{let e=++w.current;try{var t,n;E(null),y.current&&0===S.current.length&&d(!0);let o=(0,l.Xg)(),u=await fetch("/api/worktrees"),c=(0,i.O0)(u);if(c)throw c;if(!u.ok)throw Error("Failed to fetch worktrees: ".concat(u.status));let f=(0,i.xd)(u);if(f)throw f;let g=await u.json();if(e!==w.current)return;let R=(0,l.Th)(null!=(t=g.worktrees)?t:[],o),p=null!=(n=g.repositories)?n:[];(0,s.startTransition)(()=>{r(R),a(p),d(!1)}),S.current=R,(0,l.WZ)(o),y.current=!1,k.current=0,T()}catch(n){if(e!==w.current)return;let t=n instanceof Error?n:Error(String(n));console.error("[useWorktreesCache] Failed to fetch worktrees:",t),y.current=!0,E(t),d(!1);let r=k.current;0===S.current.length&&r<u.length&&(k.current=r+1,T(),p.current=setTimeout(()=>{p.current=null,h.current()},u[r]))}},[T]);h.current=W,(0,s.useEffect)(()=>{e&&W()},[e,W]),(0,s.useEffect)(()=>T,[T]),(0,s.useEffect)(()=>()=>{w.current+=1},[]);let O=(0,s.useCallback)(()=>S.current.some(e=>!0===e.isSessionRunning),[]),L=(0,s.useCallback)(()=>{let e=O();return b.current?e?2e4:6e4:e?5e3:3e4},[O]),C=(0,s.useCallback)(()=>{null!==g.current&&(clearInterval(g.current),g.current=null),R.current=null},[]),D=(0,s.useCallback)(()=>{C();let e=L();R.current=e,g.current=setInterval(()=>{W()},e)},[L,W,C]);(0,s.useEffect)(()=>{if(!e)return;let t=()=>{document.hidden?C():(W(),D())},r=setTimeout(()=>{document.hidden||D()},0);return document.addEventListener("visibilitychange",t),()=>{clearTimeout(r),C(),document.removeEventListener("visibilitychange",t)}},[e,W,D,C]),(0,s.useEffect)(()=>{if(S.current=t,"undefined"!=typeof document&&document.hidden||null===R.current)return;let e=L();R.current!==e&&D()},[t,v,L,D]);let x=t.map(e=>e.id).sort().join(" ");return(0,s.useEffect)(()=>{let e=x.length>0?x.split(" "):[];return e.forEach(e=>I(e)),()=>{e.forEach(e=>_(e))}},[x,I,_]),(0,s.useEffect)(()=>m(e=>{if("session_status_changed"===e.type&&"string"==typeof e.worktreeId){let i=e.worktreeId,o=e.isWaitingForResponse;if("boolean"==typeof o){var t,n;let l=null!=(t=e.instance)?t:null,u=null!=(n=e.waitingKind)?n:null;(0,s.startTransition)(()=>{r(e=>{let t=!1,r=e.map(e=>{if(e.id!==i)return e;let r=function(e,t){var r,n,s;let i,o=null!=(n=t.instance)?n:null,l=o?null==(r=e.sessionStatusByInstance)?void 0:r[o]:void 0,u=e.sessionStatusByInstance;if(o&&l&&l.isWaitingForResponse!==t.waiting&&(u={...e.sessionStatusByInstance,[o]:{...l,isWaitingForResponse:t.waiting,waitingKind:null!=(s=t.waitingKind)?s:null}}),t.waiting)i=!0;else{let e=u?Object.values(u):[];i=e.length>0&&e.some(e=>(null==e?void 0:e.isWaitingForResponse)===!0)}return u===e.sessionStatusByInstance&&i===e.isWaitingForResponse?e:{...e,sessionStatusByInstance:u,isWaitingForResponse:i}}(e,{waiting:o,instance:l,waitingKind:u});return r!==e&&(t=!0),r});return t?r:e})});return}let l=e.isRunning;if("boolean"==typeof l){if((null!=e.cliTool||null!=e.instance)&&!1===l)return void W();(0,s.startTransition)(()=>{r(e=>{let t=!1,r=e.map(e=>e.id===i&&e.isSessionRunning!==l?(t=!0,{...e,isSessionRunning:l}):e);return t?r:e})})}}else("message"===e.type||"message_updated"===e.type)&&W()}),[m,W]),{worktrees:t,repositories:n,isLoading:c,error:f,refresh:W}}({enabled:r}),R=(0,s.useMemo)(()=>({worktrees:d,repositories:f,isLoading:E,error:g,refresh:S}),[d,f,E,g,S]);return(0,n.jsx)(c.Provider,{value:R,children:(0,n.jsx)(a.H8,{externalWorktrees:d,externalRepositories:f,externalIsLoading:E,externalError:g,externalRefresh:S,children:t})})}function f(){let e=(0,s.useContext)(c);if(null===e)throw Error("useWorktreesCacheContext must be used within a WorktreesCacheProvider");return e}function E(){return(0,s.useContext)(c)}}}]);
|