commandmate 0.46.1 → 0.47.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 +223 -216
- package/.next/app-path-routes-manifest.json +19 -18
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +9 -9
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +8 -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.js +4 -2
- 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 +2 -2
- 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 -7
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -7
- 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/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_client-reference-manifest.js +1 -1
- 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_client-reference-manifest.js +1 -1
- 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_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_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_client-reference-manifest.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_client-reference-manifest.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 +1 -1
- 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_client-reference-manifest.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 +1 -1
- 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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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]/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 +1 -1
- 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_client-reference-manifest.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_client-reference-manifest.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 -0
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -0
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
- 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_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_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_client-reference-manifest.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_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_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_client-reference-manifest.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.js.nft.json +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.js.nft.json +1 -1
- 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 -18
- package/.next/server/chunks/1210.js +1 -1
- package/.next/server/chunks/1559.js +1 -1
- package/.next/server/chunks/1601.js +7 -0
- package/.next/server/chunks/1836.js +1 -0
- package/.next/server/chunks/1945.js +14 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2422.js +1 -0
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2460.js +1 -1
- package/.next/server/chunks/2534.js +1 -1
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/{3077.js → 4194.js} +12 -12
- package/.next/server/chunks/4207.js +1 -1
- package/.next/server/chunks/4248.js +1 -1
- package/.next/server/chunks/5209.js +1 -1
- package/.next/server/chunks/5292.js +1 -1
- package/.next/server/chunks/5595.js +1 -1
- package/.next/server/chunks/5845.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/{2283.js → 6486.js} +7 -7
- package/.next/server/chunks/6722.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/6793.js +2 -2
- package/.next/server/chunks/7166.js +19 -0
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8581.js +10 -10
- package/.next/server/chunks/8728.js +2 -2
- package/.next/server/chunks/8791.js +1 -1
- package/.next/server/chunks/8918.js +4 -4
- package/.next/server/chunks/9199.js +1 -0
- package/.next/server/chunks/936.js +1 -0
- package/.next/server/chunks/9390.js +1 -1
- package/.next/server/chunks/9540.js +1 -0
- package/.next/server/chunks/9627.js +1 -1
- package/.next/server/chunks/9731.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2407-9703c569370b8a9d.js → 2407-b2f524f99f7fc353.js} +1 -1
- package/.next/static/chunks/5371-a549a0d2c2044d41.js +1 -0
- package/.next/static/chunks/{5794-4eee51ff1e878aa6.js → 5794-80ac3f06f098ea29.js} +1 -1
- package/.next/static/chunks/602-1c1488959215e140.js +1 -0
- package/.next/static/chunks/9079-24f9fa549ed298f1.js +1 -0
- package/.next/static/chunks/app/api/agents/update/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/agents/versions/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/app/release-notes/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/app/update/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/{route-0468c3c4baa46028.js → route-c81284a9d8b35304.js} +1 -1
- package/.next/static/chunks/app/api/auth/login/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/relays/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/remote/pair/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/settings/default-agents/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/skills/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/templates/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/layout-419eaf7de340f4ab.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/proxy/[...path]/route-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/sessions/page-e02f1adb1d1c1ccc.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/layout-c81284a9d8b35304.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-45294052ee3032f1.js +1 -0
- package/.next/trace +13 -13
- package/.next/types/app/api/worktrees/[id]/prompt-response/strict/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/cli/commands/auto-yes.d.ts +19 -0
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +45 -0
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +23 -18
- package/dist/cli/commands/ls.d.ts +15 -1
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +39 -3
- package/dist/cli/commands/prompt.d.ts +42 -0
- package/dist/cli/commands/prompt.d.ts.map +1 -0
- package/dist/cli/commands/prompt.js +211 -0
- package/dist/cli/commands/relays.d.ts.map +1 -1
- package/dist/cli/commands/relays.js +13 -1
- package/dist/cli/commands/respond-strict.d.ts +31 -0
- package/dist/cli/commands/respond-strict.d.ts.map +1 -0
- package/dist/cli/commands/respond-strict.js +214 -0
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +38 -0
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +41 -5
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +2 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +18 -0
- package/dist/cli/commands/wait.d.ts +21 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +108 -12
- 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 +63 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +6 -2
- 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 +30 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +12 -1
- package/dist/cli/utils/api-client.d.ts +13 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +10 -2
- package/dist/cli/utils/daemon-factory.d.ts.map +1 -1
- package/dist/cli/utils/daemon-factory.js +3 -1
- package/dist/cli/utils/daemon.d.ts +38 -1
- package/dist/cli/utils/daemon.d.ts.map +1 -1
- package/dist/cli/utils/daemon.js +161 -8
- package/dist/cli/utils/paths.d.ts +12 -0
- package/dist/cli/utils/paths.d.ts.map +1 -1
- package/dist/cli/utils/paths.js +17 -0
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts +43 -1
- package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
- package/dist/lib/polling/auto-yes-suppression-reason.js +18 -1
- package/dist/lib/prompt-observation/kinds.d.ts +101 -0
- package/dist/lib/prompt-observation/kinds.d.ts.map +1 -0
- package/dist/lib/prompt-observation/kinds.js +123 -0
- package/dist/lib/prompt-observation/types.d.ts +271 -0
- package/dist/lib/prompt-observation/types.d.ts.map +1 -0
- package/dist/lib/prompt-observation/types.js +14 -0
- package/dist/lib/session/send-attempt-types.d.ts +66 -0
- package/dist/lib/session/send-attempt-types.d.ts.map +1 -0
- package/dist/lib/session/send-attempt-types.js +17 -0
- package/dist/server/locales/en/worktree.json +4 -0
- package/dist/server/locales/ja/worktree.json +4 -0
- package/dist/server/server.js +20 -1
- package/dist/server/src/config/auto-yes-config.js +11 -0
- package/dist/server/src/lib/auto-yes-lifecycle.js +28 -2
- package/dist/server/src/lib/auto-yes-poller.js +345 -28
- package/dist/server/src/lib/auto-yes-shutdown-record.js +257 -0
- package/dist/server/src/lib/auto-yes-state.js +197 -4
- package/dist/server/src/lib/cli-tools/antigravity-startup-trust.js +135 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +162 -29
- package/dist/server/src/lib/cli-tools/command-code.js +10 -2
- package/dist/server/src/lib/cli-tools/copilot.js +21 -10
- package/dist/server/src/lib/cli-tools/gemini.js +60 -13
- package/dist/server/src/lib/cli-tools/launch-dialog.js +203 -0
- package/dist/server/src/lib/cli-tools/launch-window.js +96 -0
- package/dist/server/src/lib/detection/selection-shape.js +35 -1
- package/dist/server/src/lib/detection/tools/antigravity/detect.js +38 -9
- package/dist/server/src/lib/detection/tools/antigravity/dialog.js +88 -1
- package/dist/server/src/lib/detection/tools/antigravity/patterns.js +41 -1
- package/dist/server/src/lib/detection/tools/claude/detect.js +60 -0
- package/dist/server/src/lib/detection/tools/command-code/selection-shape.js +63 -13
- package/dist/server/src/lib/detection/tools/copilot/patterns.js +7 -1
- package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +11 -2
- package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +5 -3
- package/dist/server/src/lib/polling/antigravity-permission-receipts.js +15 -0
- package/dist/server/src/lib/polling/antigravity-receipt-episodes.js +281 -0
- package/dist/server/src/lib/polling/auto-yes-confirm-page.js +56 -0
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +8 -1
- package/dist/server/src/lib/polling/auto-yes-policy.js +61 -7
- package/dist/server/src/lib/polling/auto-yes-poller-stop-reason.js +50 -0
- package/dist/server/src/lib/polling/auto-yes-prompt-suppression.js +220 -5
- package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +18 -1
- package/dist/server/src/lib/polling/auto-yes-suppression-state.js +10 -0
- package/dist/server/src/lib/polling/response-checker-dialog-gate.js +2 -2
- package/dist/server/src/lib/polling/response-checker.js +9 -0
- package/dist/server/src/lib/polling/response-poller-core.js +136 -104
- package/dist/server/src/lib/prompt-observation/kinds.js +123 -0
- package/dist/server/src/lib/prompt-observation/types.js +14 -0
- package/dist/server/src/lib/push/prompt-push-gate.js +195 -3
- package/dist/server/src/lib/push/waiting-push-notifier.js +74 -7
- package/dist/server/src/lib/relay/relay-delivery-claims.js +46 -0
- package/dist/server/src/lib/relay/relay-delivery.js +76 -30
- package/dist/server/src/lib/schedule-manager.js +28 -0
- package/dist/server/src/lib/session/cli-session.js +38 -3
- package/dist/server/src/lib/session/send-attempt-state.js +155 -0
- package/dist/server/src/lib/session/send-attempt-types.js +17 -0
- package/dist/server/src/lib/session/send-user-message.js +46 -0
- package/dist/server/src/lib/session/worktree-session-reconcile.js +2 -1
- package/dist/server/src/lib/tmux/session-created-signal.js +76 -0
- package/dist/server/src/lib/tmux/tmux-capture-cache.js +58 -6
- package/dist/server/src/lib/tmux/tmux.js +4 -0
- package/dist/server/src/lib/verification/scope-gate-format.js +100 -0
- package/dist/server/src/lib/verification/scope-gate-glob.js +185 -0
- package/dist/server/src/lib/verification/scope-gate.js +19 -271
- package/dist/server/src/lib/ws-server.js +48 -6
- package/docs/en/user-guide/cli-setup-guide.md +12 -1
- package/docs/en/user-guide/webapp-guide.md +2 -0
- package/package.json +1 -1
- package/release-notes/0.47.0.json +118 -0
- package/.next/server/chunks/1789.js +0 -1
- package/.next/server/chunks/2908.js +0 -1
- package/.next/server/chunks/2984.js +0 -25
- package/.next/server/chunks/3718.js +0 -1
- package/.next/server/chunks/4837.js +0 -14
- package/.next/server/chunks/611.js +0 -1
- package/.next/server/chunks/850.js +0 -1
- package/.next/static/chunks/3201-c01f1feed69020e6.js +0 -1
- package/.next/static/chunks/5371-0dc947683e46e78c.js +0 -1
- package/.next/static/chunks/602-25e45a2422d2a3ea.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/capabilities/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/relays/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/remote/pair/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/settings/default-agents/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/settings/default-surface-mode/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/skills/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/templates/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/layout-3e357690446cd2da.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/sessions/page-9859ed61e93e6890.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-0468c3c4baa46028.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-effbf0796881dd5a.js +0 -1
- /package/.next/static/{QxDf7lm-JJkWoj-TyWiSB → b5BiQC9F6r_XFPdA9cuSj}/_buildManifest.js +0 -0
- /package/.next/static/{QxDf7lm-JJkWoj-TyWiSB → b5BiQC9F6r_XFPdA9cuSj}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5794],{12906:(e,t,n)=>{n.d(t,{Iz:()=>P,W2:()=>I,gM:()=>N,oW:()=>_,vP:()=>D,zX:()=>R});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(22592),m=n(89275),p=n(46615),f=n(86815),h=n(17848),x=n(48481),b=n(98873),g=n(38606),w=n(7636),v=n(76471),y=n(46892),k=n(59854),j=n(77873);function N(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(f.K,"]")))}function S(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 E(e,t,n){return Math.max(0,Math.min(t,Math.floor(n-8-(e+4)-2)))}function C(){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 M="commandmate:repository-branch-list-open";function T(e){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(M,{detail:e}))}function I(e,t){let n=(0,a.useId)();(0,a.useEffect)(()=>{e&&T(n)},[e,n]),(0,a.useEffect)(()=>{if(!e||"undefined"==typeof document)return;let r=e=>{e.detail!==n&&t()};return document.addEventListener(M,r),()=>document.removeEventListener(M,r)},[e,n,t])}function R(){let{selectWorktree:e}=(0,u.$f)(),t=(0,m.Hq)();return(0,a.useCallback)(n=>{T(null),e(n),t.push("/worktrees/".concat(n))},[e,t])}function O(e){var t;null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest",inline:"nearest"})}function P(e){let{worktrees:t,repositories:n,sortKey:r,sortDirection:i,repositoryOrder:s}=e,o=(0,a.useMemo)(()=>(0,w.UZ)(null!=n?n:[]),[n]),l=(0,a.useMemo)(()=>(0,w.s6)(null!=t?t:[],o),[t,o]),c=(0,a.useMemo)(()=>l.map(g.XK),[l]),{groupedItems:u}=(0,b.D)({items:c,sortKey:r,sortDirection:i,viewMode:"grouped"});return(0,a.useMemo)(()=>(0,w.Ew)(u,s),[u,s])}let D=(0,a.memo)(function(){var e;let t=(0,o.c)("common"),n=(0,s.usePathname)(),i=R(),{sortKey:m,sortDirection:p,repositoryOrder:f}=(0,c.VF)(),{worktrees:h,repositories:x,selectedWorktreeId:b}=(0,u.$f)(),{factor:g}=(0,d.Ps)(),v=P({worktrees:h,repositories:x,sortKey:m,sortDirection:p,repositoryOrder:f}),y=(0,w.jn)(n,b),k=(0,a.useMemo)(()=>{var e,t;return null!=(t=null==(e=v.find(e=>e.branches.some(e=>e.id===y)))?void 0:e.repositoryName)?t:null},[v,y]),[S,E]=(0,a.useState)(null),[C,M]=(0,a.useState)(null),[T,D]=(0,a.useState)(!1),B=(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),D(!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),D(!1)},[]),H=(0,a.useCallback)(e=>{if(S===e)return void V();F(e)},[S,V,F]),[G,q]=(0,a.useState)(!1),[U,Y]=(0,a.useState)(0),J=(0,a.useCallback)(()=>{let e=B.current;e&&(q(e.scrollWidth>e.clientWidth+1),Y(e.clientWidth))},[]);(0,a.useLayoutEffect)(()=>{J()},[J,v.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(B.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!==S||T;I($,V),(0,a.useEffect)(()=>{if(!$)return;let e=e=>{var t,n;let r=e.target;!(!r||(null==(t=B.current)?void 0:t.contains(r))||(null==(n=z.current)?void 0:n.contains(r)))&&(N(r)||V())},t=e=>{if(!(0,j.V$)(e))return;let t=S?K.current.get(S):z.current;V(),null==t||t.focus()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[$,S,V]),(0,a.useEffect)(()=>{V()},[n,V]),(0,a.useLayoutEffect)(()=>{k&&O(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);O(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===v.length)return null;let en=Math.round(32*g),er=null!=(e=v.find(e=>e.repositoryName===S))?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:v.map(e=>(0,r.jsx)(L,{group:e,isActive:e.repositoryName===k,isOpen:e.repositoryName===S,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":T,"aria-label":t("repoTabBar.overflow"),title:t("repoTabBar.overflow"),onClick:()=>{E(null),M(null),D(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)(_,{group:er,anchor:C,factor:g,activeWorktreeId:y,onBranchClick:Q}),T&&(0,r.jsx)(A,{groups:v,anchorRef:z,activeRepositoryName:k,onSelect:ee})]})}),L=(0,a.memo)(function(e){let{group:t,isActive:n,isOpen:a,registerTab:i,onToggle:s}=e,l=(0,o.c)("common"),c=(0,w.zD)(t.branches),u=(0,v.Mq)(c,(0,w.El)(t.branches)),d=(0,w.j)(t.branches),m=l(u?v.rH:y.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)(h.n,{className:"h-3.5 w-3.5",color:(0,w.LV)(t.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 truncate",children:t.repositoryName}),(0,r.jsx)(x.m,{status:c,size:"sm",label:m,className:u?v.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 _(e){let{group:t,anchor:n,factor:s,activeWorktreeId:l,onBranchClick:c}=e,u=(0,o.c)("common"),d=(0,a.useRef)(null),m=C();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 f=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:S(n,f,h),width:f,zIndex:k.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(E(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)(p.yP,{branch:e,isSelected:e.id===l,onClick:()=>c(e.id),showRepositoryName:!1},e.id))})}),document.body)}function A(e){var t;let{groups:n,anchorRef:a,activeRepositoryName:s,onSelect:l}=e,c=(0,o.c)("common"),u=C(),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:S({left:d.left,right:d.right,bottom:d.bottom},300,m),width:300,zIndex:k.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-overflow-list",className:"overflow-y-auto py-1",style:{maxHeight:"".concat(E(d.bottom,520,u),"px")},children:n.map(e=>{let t=(0,w.zD)(e.branches),n=(0,v.Mq)(t,(0,w.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)(h.n,{className:"h-3.5 w-3.5",color:(0,w.LV)(e.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.repositoryName}),(0,r.jsx)(x.m,{status:t,size:"sm",label:c(n?v.rH:y.PL[t].labelKey),className:n?v.Jd:void 0}),(0,r.jsx)("span",{className:"tabular-nums text-xs text-sidebar-muted",children:e.branches.length})]},e.repositoryName)})})}),document.body)}},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),T=(0,a.useRef)(null),I=(0,a.useCallback)(()=>{null!==T.current&&(clearTimeout(T.current),T.current=null)},[]),R=(0,a.useCallback)(()=>{I(),T.current=setTimeout(()=>{w(!0),T.current=null},d)},[d,I]),O=(0,a.useCallback)(()=>{I(),w(!1)},[I]),P=(0,a.useCallback)(()=>{y(!0)},[]),D=(0,a.useCallback)(()=>{y(!1)},[]),L=(0,a.useCallback)(()=>{I(),w(!1),y(!1)},[I]),_=(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)(()=>()=>{I()},[I]),(0,r.jsxs)("span",{ref:C,"data-testid":"tooltip-wrapper",className:h?"relative inline-flex ".concat(h):"relative inline-flex",tabIndex:-1,onMouseEnter:R,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),T=n(59854),I=n(92614),R=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,I.C)(),{setOpen:f}=(0,R.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:[],eT=eM.length>0,eI=!eE&&eC&&0===eM.length,eR=!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:T.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")}),eI&&(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)})}),eT&&(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)),eR.length>0&&(0,r.jsx)(d.uB.Group,{heading:eO.heading,children:eR.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})},46615:(e,t,n)=>{n.d(t,{Fy:()=>f,R8:()=>h,Xd:()=>x,yP:()=>v});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(94442),m=n(66966),p=n(39970);let f=(0,a.createContext)(!0),h="px-2";function x(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 b(e,t,n){let r=n-8-t;return r<=8?8:Math.min(Math.max(e,8),r)}function g(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:b(r.top,l,u),left:b(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 w=0,v=(0,a.memo)(function(e){var t,n;let{branch:i,isSelected:b,onClick:v,showRepositoryName:y=!0}=e,k=(0,s.c)("common"),j=(0,s.c)("worktree"),N="tooltip-".concat(i.id),S=(0,a.useRef)(null),[E,C]=(0,a.useState)(!1),M=(0,a.useRef)(null),T=(0,a.useCallback)(()=>{null!==M.current&&(clearTimeout(M.current),M.current=null)},[]);(0,a.useEffect)(()=>()=>T(),[T]);let I=(0,l.A7)(i.cliStatus),R="waiting"===I,O=!0===i.awaitingInstruction,P=i.nextActionKey?j(i.nextActionKey):null,D=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=i.exitedInstanceIds)?e:[])},[i.exitedInstanceIds]),L=(0,a.useMemo)(()=>{var e;return new Set(null!=(e=i.unclassifiedInstanceIds)?e:[])},[i.unclassifiedInstanceIds]),_=(0,l.Pn)(i.cliStatus,i.unclassifiedInstanceIds),A=(R||O)&&null!==P,B=null!==P&&(A||b),z=E&&!b,[K,W]=(0,a.useState)(!1),[V,F]=(0,a.useState)(!1),[H,G]=(0,a.useState)(!1),q=b||K||V||H,{showToast:U}=(0,d.dj)(),Y=null==(t=(0,m.rC)())?void 0:t.refresh,[J,X]=(0,a.useState)(void 0),Z=(0,a.useRef)(0),$=(0,a.useRef)(0),Q=(0,a.useRef)(null),ee=(0,a.useRef)(null),et=(0,a.useRef)(null),en=null!=(n=i.worktreeStatus)?n:null,er=void 0!==J?J:en;ee.current=en;let ea=(0,a.useContext)(f);(0,a.useEffect)(()=>{if(Z.current!==$.current)return;let e=et.current;(null===e||(0,p.FI)(e))&&(et.current=null,X(void 0))},[en]);let ei=(0,a.useCallback)(async e=>{let t=++Z.current;Q.current=ee.current,et.current=null,X(e);try{await (0,p.V9)(i.id,e)}catch(e){if(t!==Z.current)return;$.current=t,X(void 0),U(k("branchItem.statusChangeFailed"),"error");return}let n=(0,p.Xg)();try{await (null==Y?void 0:Y())}finally{t===Z.current&&($.current=t,Y?(et.current=n,(0,p.FI)(n)&&ee.current!==Q.current&&(et.current=null,X(void 0))):ee.current!==Q.current&&X(void 0))}},[i.id,Y,U,k]);return(0,a.useEffect)(()=>{b&&C(!1)},[b]),(0,a.useEffect)(()=>{if(!E)return;let e=()=>C(!1);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[E]),(0,r.jsxs)("div",{"data-testid":"branch-list-row",className:"relative w-full min-w-0 ".concat(h),onPointerEnter:()=>W(!0),onPointerLeave:()=>W(!1),onFocus:e=>{e.target.matches(":focus-visible")&&F(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||F(!1)},children:[(0,r.jsxs)("button",{ref:S,"data-testid":"branch-list-item",onClick:()=>{T(),w=Date.now()+400,C(!1),v()},onMouseEnter:()=>{T(),Date.now()>=w&&(M.current=setTimeout(()=>{C(!0)},150))},onMouseLeave:()=>{T(),C(!1)},onFocus:e=>{T(),e.target.matches(":focus-visible")&&(M.current=setTimeout(()=>{C(!0)},150))},onBlur:()=>{T(),C(!1)},"aria-current":b?"true":void 0,"aria-describedby":z?N:void 0,"aria-label":y?void 0:"".concat(i.name," - ").concat(i.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(q?b?"pr-9":"pr-9 [@media(hover:none)]:pr-3":"pr-3","\n ").concat(x(b),"\n "),children:[(0,r.jsxs)("div",{className:"@container flex items-center gap-2 w-full min-w-0",children:[i.cliStatus&&Object.keys(i.cliStatus).length>0&&(0,r.jsx)("div",{className:"flex items-center justify-center flex-shrink-0 w-4","aria-label":k("branchItem.cliToolStatus"),children:(0,r.jsx)(c.Ej,{status:I,label:(0,l.dw)(i.cliStatus,i.cliStatusLabels,D.size>0?e=>D.has(e)?k("branchItem.agentExited"):null:void 0,L),waitingKind:i.waitingKind,unclassified:_})}),(0,r.jsx)("p",{className:"flex-1 min-w-0 text-left text-sm text-sidebar-foreground truncate",children:i.name}),y&&(0,r.jsx)("p",{className:"flex-shrink min-w-0 max-w-[40%] text-xs text-sidebar-muted truncate",children:i.repositoryName}),ea&&er&&(0,r.jsxs)("span",{"data-testid":"branch-worktree-status","data-status":er,className:"flex-shrink-0 inline-flex items-center",title:j((0,p.Zh)(er)),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(p.mq[er])}),(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(p.SE[er]),children:j((0,p.Zh)(er))})]}),O&&(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:j("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:j("awaitingInstruction.badge")})]}),i.hasUnread&&(0,r.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-accent-500 flex-shrink-0","aria-label":k("branchItem.hasUnread")})]}),B&&(0,r.jsx)("p",{"data-testid":"branch-next-action",className:"pl-6 text-left text-xs font-medium truncate ".concat(b?"block":"hidden [@media(hover:none)]:block"," ").concat(R?"text-warning-foreground":O?"text-success-foreground":"text-sidebar-muted"),children:P}),b&&i.description&&(0,r.jsx)("p",{"data-testid":"branch-description",className:"pl-6 text-left text-xs text-sidebar-muted truncate",children:i.description}),(0,r.jsx)(g,{id:N,branch:i,isVisible:z,anchorRef:S,nextActionLabel:P,unclassified:_,awaitingInstructionLabel:O?j("awaitingInstruction.badge"):null})]}),q&&(0,r.jsx)(u.m,{branch:i,isSelected:b,onOpenChange:G,worktreeStatus:er,onWorktreeStatusChange:ei})]})})},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 T=(null==f?void 0:f.installType)==="global"||(null==f?void 0:f.installType)==="npx",I=(0,a.useCallback)(()=>{C&&T&&w(e=>"idle"===e?"confirming":e)},[C,T]),R=(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:T,state:g,logPath:v,errorKey:k,openConfirm:I,cancel:R,confirm:O}),[f,x,C,M,T,g,v,k,I,R,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:R})]})}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}}},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:()=>P,W2:()=>I,gM:()=>N,oW:()=>_,vP:()=>D,zX:()=>R});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(22592),m=n(89275),p=n(69858),f=n(86815),h=n(17848),x=n(48481),b=n(98873),g=n(38606),w=n(7636),v=n(76471),y=n(46892),k=n(59854),j=n(77873);function N(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(f.K,"]")))}function S(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 E(e,t,n){return Math.max(0,Math.min(t,Math.floor(n-8-(e+4)-2)))}function C(){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 M="commandmate:repository-branch-list-open";function T(e){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(M,{detail:e}))}function I(e,t){let n=(0,a.useId)();(0,a.useEffect)(()=>{e&&T(n)},[e,n]),(0,a.useEffect)(()=>{if(!e||"undefined"==typeof document)return;let r=e=>{e.detail!==n&&t()};return document.addEventListener(M,r),()=>document.removeEventListener(M,r)},[e,n,t])}function R(){let{selectWorktree:e}=(0,u.$f)(),t=(0,m.Hq)();return(0,a.useCallback)(n=>{T(null),e(n),t.push("/worktrees/".concat(n))},[e,t])}function O(e){var t;null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest",inline:"nearest"})}function P(e){let{worktrees:t,repositories:n,sortKey:r,sortDirection:i,repositoryOrder:s}=e,o=(0,a.useMemo)(()=>(0,w.UZ)(null!=n?n:[]),[n]),l=(0,a.useMemo)(()=>(0,w.s6)(null!=t?t:[],o),[t,o]),c=(0,a.useMemo)(()=>l.map(g.XK),[l]),{groupedItems:u}=(0,b.D)({items:c,sortKey:r,sortDirection:i,viewMode:"grouped"});return(0,a.useMemo)(()=>(0,w.Ew)(u,s),[u,s])}let D=(0,a.memo)(function(){var e;let t=(0,o.c)("common"),n=(0,s.usePathname)(),i=R(),{sortKey:m,sortDirection:p,repositoryOrder:f}=(0,c.VF)(),{worktrees:h,repositories:x,selectedWorktreeId:b}=(0,u.$f)(),{factor:g}=(0,d.Ps)(),v=P({worktrees:h,repositories:x,sortKey:m,sortDirection:p,repositoryOrder:f}),y=(0,w.jn)(n,b),k=(0,a.useMemo)(()=>{var e,t;return null!=(t=null==(e=v.find(e=>e.branches.some(e=>e.id===y)))?void 0:e.repositoryName)?t:null},[v,y]),[S,E]=(0,a.useState)(null),[C,M]=(0,a.useState)(null),[T,D]=(0,a.useState)(!1),B=(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),D(!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),D(!1)},[]),H=(0,a.useCallback)(e=>{if(S===e)return void V();F(e)},[S,V,F]),[G,q]=(0,a.useState)(!1),[U,Y]=(0,a.useState)(0),J=(0,a.useCallback)(()=>{let e=B.current;e&&(q(e.scrollWidth>e.clientWidth+1),Y(e.clientWidth))},[]);(0,a.useLayoutEffect)(()=>{J()},[J,v.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(B.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!==S||T;I($,V),(0,a.useEffect)(()=>{if(!$)return;let e=e=>{var t,n;let r=e.target;!(!r||(null==(t=B.current)?void 0:t.contains(r))||(null==(n=z.current)?void 0:n.contains(r)))&&(N(r)||V())},t=e=>{if(!(0,j.V$)(e))return;let t=S?K.current.get(S):z.current;V(),null==t||t.focus()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[$,S,V]),(0,a.useEffect)(()=>{V()},[n,V]),(0,a.useLayoutEffect)(()=>{k&&O(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);O(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===v.length)return null;let en=Math.round(32*g),er=null!=(e=v.find(e=>e.repositoryName===S))?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:v.map(e=>(0,r.jsx)(L,{group:e,isActive:e.repositoryName===k,isOpen:e.repositoryName===S,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":T,"aria-label":t("repoTabBar.overflow"),title:t("repoTabBar.overflow"),onClick:()=>{E(null),M(null),D(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)(_,{group:er,anchor:C,factor:g,activeWorktreeId:y,onBranchClick:Q}),T&&(0,r.jsx)(A,{groups:v,anchorRef:z,activeRepositoryName:k,onSelect:ee})]})}),L=(0,a.memo)(function(e){let{group:t,isActive:n,isOpen:a,registerTab:i,onToggle:s}=e,l=(0,o.c)("common"),c=(0,w.zD)(t.branches),u=(0,v.Mq)(c,(0,w.El)(t.branches)),d=(0,w.j)(t.branches),m=l(u?v.rH:y.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)(h.n,{className:"h-3.5 w-3.5",color:(0,w.LV)(t.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 truncate",children:t.repositoryName}),(0,r.jsx)(x.m,{status:c,size:"sm",label:m,className:u?v.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 _(e){let{group:t,anchor:n,factor:s,activeWorktreeId:l,onBranchClick:c}=e,u=(0,o.c)("common"),d=(0,a.useRef)(null),m=C();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 f=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:S(n,f,h),width:f,zIndex:k.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(E(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)(p.yP,{branch:e,isSelected:e.id===l,onClick:()=>c(e.id),showRepositoryName:!1},e.id))})}),document.body)}function A(e){var t;let{groups:n,anchorRef:a,activeRepositoryName:s,onSelect:l}=e,c=(0,o.c)("common"),u=C(),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:S({left:d.left,right:d.right,bottom:d.bottom},300,m),width:300,zIndex:k.M.POPOVER},children:(0,r.jsx)("div",{"data-testid":"repository-tab-overflow-list",className:"overflow-y-auto py-1",style:{maxHeight:"".concat(E(d.bottom,520,u),"px")},children:n.map(e=>{let t=(0,w.zD)(e.branches),n=(0,v.Mq)(t,(0,w.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)(h.n,{className:"h-3.5 w-3.5",color:(0,w.LV)(e.repositoryName)}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.repositoryName}),(0,r.jsx)(x.m,{status:t,size:"sm",label:c(n?v.rH:y.PL[t].labelKey),className:n?v.Jd:void 0}),(0,r.jsx)("span",{className:"tabular-nums text-xs text-sidebar-muted",children:e.branches.length})]},e.repositoryName)})})}),document.body)}},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),T=(0,a.useRef)(null),I=(0,a.useCallback)(()=>{null!==T.current&&(clearTimeout(T.current),T.current=null)},[]),R=(0,a.useCallback)(()=>{I(),T.current=setTimeout(()=>{w(!0),T.current=null},d)},[d,I]),O=(0,a.useCallback)(()=>{I(),w(!1)},[I]),P=(0,a.useCallback)(()=>{y(!0)},[]),D=(0,a.useCallback)(()=>{y(!1)},[]),L=(0,a.useCallback)(()=>{I(),w(!1),y(!1)},[I]),_=(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)(()=>()=>{I()},[I]),(0,r.jsxs)("span",{ref:C,"data-testid":"tooltip-wrapper",className:h?"relative inline-flex ".concat(h):"relative inline-flex",tabIndex:-1,onMouseEnter:R,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),T=n(59854),I=n(92614),R=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,I.C)(),{setOpen:f}=(0,R.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:[],eT=eM.length>0,eI=!eE&&eC&&0===eM.length,eR=!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:T.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")}),eI&&(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)})}),eT&&(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)),eR.length>0&&(0,r.jsx)(d.uB.Group,{heading:eO.heading,children:eR.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 T=(null==f?void 0:f.installType)==="global"||(null==f?void 0:f.installType)==="npx",I=(0,a.useCallback)(()=>{C&&T&&w(e=>"idle"===e?"confirming":e)},[C,T]),R=(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:T,state:g,logPath:v,errorKey:k,openConfirm:I,cancel:R,confirm:O}),[f,x,C,M,T,g,v,k,I,R,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:R})]})}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),T="waiting"===M,I=!0===t.awaitingInstruction,R=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=(T||I)&&null!==R,_=null!==R&&(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}),I&&(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(T?"text-warning-foreground":I?"text-success-foreground":"text-sidebar-muted"),children:R}),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:R,unclassified:D,awaitingInstructionLabel:I?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])}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[602],{38218:(t,e,r)=>{r.d(e,{D:()=>o,a:()=>u});var n=r(12115);let a=n.useLayoutEffect,o=768;function u(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{breakpoint:e=o}=t,[r,u]=(0,n.useState)(!1);return a(()=>{let t=window.matchMedia("(max-width: ".concat(e-1,"px)"));u(t.matches);let r=t=>{u(t.matches)};return t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),r}},76351:(t,e,r)=>{r.d(e,{z9:()=>o,$s:()=>i,t6:()=>u,Ni:()=>s,eJ:()=>h,$B:()=>f,dR:()=>c,S9:()=>d,P0:()=>l});var n=r(82912),a=r.n(n);r(95704);let o=[36e5,108e5,288e5],u=36e5,s={36e5:"autoYes.durations.1h",108e5:"autoYes.durations.3h",288e5:"autoYes.durations.8h"};function c(t){return"number"==typeof t&&o.includes(t)}let i=1e3;function d(t){return(null==t?void 0:t.enabled)!==!0&&(null==t?void 0:t.stopReason)==="server-restart"}function l(t){if(t.length>500)return{valid:!1,error:"Pattern must be ".concat(500," characters or less")};if(!a()(t))return{valid:!1,error:"Pattern may cause performance issues (catastrophic backtracking detected)"};try{return new RegExp(t),{valid:!0}}catch(t){return{valid:!1,error:"Invalid regular expression syntax"}}}function h(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{return t.test(e)}catch(t){return null}}function f(t){let e=Math.max(0,t-Date.now()),r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%6e4/1e3);return r>0?"".concat(r,":").concat(n.toString().padStart(2,"0"),":").concat(a.toString().padStart(2,"0")):"".concat(n.toString().padStart(2,"0"),":").concat(a.toString().padStart(2,"0"))}},76471:(t,e,r)=>{r.d(e,{Ej:()=>d,Jd:()=>s,Mq:()=>i,rH:()=>c});var n=r(95155),a=r(12115),o=r(18955),u=r(48481);let s="bg-transparent border-2 border-muted-foreground",c="status.unknown";function i(t,e){return!0===e&&"ready"===t}let d=(0,a.memo)(function(t){let{status:e,label:r,waitingKind:a,unclassified:d}=t,l=(0,o.c)("common"),h=i(e,d);return(0,n.jsx)(u.m,{"data-testid":"status-indicator",status:e,label:h?null!=r?r:l(c):r,waitingKind:a,size:"sm",className:h?s:void 0,"data-unclassified":h?"true":void 0})})}}]);
|