commandmate 0.11.4 → 0.12.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 +395 -303
- package/.next/app-path-routes-manifest.json +31 -22
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +12 -12
- package/.next/react-loadable-manifest.json +8 -6
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +66 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/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/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/hooks/claude-done/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/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_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/[id]/todos/[todoId]/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +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_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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/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.js +1 -0
- package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +1 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/slash-commands/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/todos/route.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +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]/interrupt/route_client-reference-manifest.js +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.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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +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_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_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_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]/install/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/route.js +23 -0
- package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.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.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.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.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]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/chat/page.js +2 -2
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page.js +2 -2
- package/.next/server/app/more/page.js.nft.json +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page.js.nft.json +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page.js +1 -1
- package/.next/server/app/repositories/page.js.nft.json +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js +1 -1
- package/.next/server/app/review/page.js.nft.json +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.js +2 -0
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -0
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/skills/page.js +2 -0
- package/.next/server/app/skills/page.js.nft.json +1 -0
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -0
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +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 +9 -9
- 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.js +3 -3
- package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +31 -22
- package/.next/server/chunks/1117.js +1 -1
- package/.next/server/chunks/120.js +1 -0
- package/.next/server/chunks/1808.js +1 -0
- package/.next/server/chunks/186.js +1 -0
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/22.js +1 -0
- package/.next/server/chunks/2328.js +1 -0
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/3042.js +2 -0
- package/.next/server/chunks/3543.js +1 -1
- package/.next/server/chunks/3708.js +1 -0
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/5064.js +1 -0
- package/.next/server/chunks/5226.js +28 -0
- package/.next/server/chunks/5306.js +2 -0
- package/.next/server/chunks/5312.js +1 -0
- package/.next/server/chunks/5326.js +1 -0
- package/.next/server/chunks/5381.js +1 -1
- package/.next/server/chunks/5456.js +1 -0
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/5959.js +2 -2
- package/.next/server/chunks/6065.js +1 -0
- package/.next/server/chunks/6130.js +1 -0
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/646.js +6 -6
- package/.next/server/chunks/{9968.js → 7587.js} +1 -1
- package/.next/server/chunks/8584.js +1 -0
- package/.next/server/chunks/8681.js +1 -1
- package/.next/server/chunks/8807.js +950 -804
- package/.next/server/chunks/9123.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/D-aoE4gWfuCUN0GqEPIX3/_buildManifest.js +1 -0
- package/.next/static/chunks/1668-7484081c45a44f89.js +1 -0
- package/.next/static/chunks/3418-7e47651340d940b0.js +1 -0
- package/.next/static/chunks/4027-0c529b322be7d4d8.js +1 -0
- package/.next/static/chunks/{4560-64b1461fd996127a.js → 4560-04e5aebcab96bfa1.js} +1 -1
- package/.next/static/chunks/6007-de36119357dcd418.js +1 -0
- package/.next/static/chunks/{6488-76295bf0184b101f.js → 6488-e257111ca7389d05.js} +1 -1
- package/.next/static/chunks/{8965-872d8de254196cec.js → 6497-dc26c6c6b0b15adf.js} +1 -1
- package/.next/static/chunks/790-d8e6acd26e03679c.js +1 -0
- package/.next/static/chunks/8361.4bf062be2d2962f4.js +1 -0
- package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/chat/{page-9ed2ffd98eb4ae18.js → page-9cf4ba62e21d9074.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/more/{page-a496425bba427b48.js → page-082d4ae496f9a36e.js} +1 -1
- package/.next/static/chunks/app/{page-15bfd76bcf65842d.js → page-af457ca5876ed616.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +1 -0
- package/.next/static/chunks/app/repositories/{page-d214522ab8792ce7.js → page-75f0d70452c6b6c0.js} +1 -1
- package/.next/static/chunks/app/review/{page-1dadf0b5d7129598.js → page-f431d630097c2e85.js} +1 -1
- package/.next/static/chunks/app/sessions/{page-96f007d986c5f327.js → page-20f07a99db64d2ca.js} +1 -1
- package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +1 -0
- package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-bf811e793052c917.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-a75fe180a7233b2b.js +1 -0
- package/.next/static/chunks/webpack-0f9275e279c058eb.js +1 -0
- package/.next/static/css/b4bdb1f3457fe9a7.css +1 -0
- package/.next/trace +11 -10
- package/.next/types/app/api/skills/[id]/route.ts +347 -0
- package/.next/types/app/api/skills/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/install/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/plan/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/skills/route.ts +347 -0
- package/.next/types/app/skills/[skillId]/page.ts +84 -0
- package/.next/types/app/skills/page.ts +84 -0
- package/.next/types/routes.d.ts +11 -2
- package/.next/types/validator.ts +81 -0
- package/dist/cli/commands/skill-format.d.ts +28 -0
- package/dist/cli/commands/skill-format.d.ts.map +1 -0
- package/dist/cli/commands/skill-format.js +163 -0
- package/dist/cli/commands/skill-guards.d.ts +53 -0
- package/dist/cli/commands/skill-guards.d.ts.map +1 -0
- package/dist/cli/commands/skill-guards.js +188 -0
- package/dist/cli/commands/skill.d.ts +24 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +365 -0
- 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 +36 -0
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +11 -0
- package/dist/cli/types/api-responses.d.ts +215 -0
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/types/index.d.ts +60 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/types/index.js +23 -1
- package/dist/cli/utils/api-client.d.ts +19 -1
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +41 -4
- package/dist/server/server.js +57 -0
- package/dist/server/src/config/activity-bar-config.js +2 -0
- package/dist/server/src/config/git-status-config.js +83 -0
- package/dist/server/src/config/skill-security-config.js +139 -0
- package/dist/server/src/lib/db/migrations/index.js +8 -0
- package/dist/server/src/lib/db/migrations/runner.js +1 -1
- package/dist/server/src/lib/db/migrations/v44-skill-operations.js +81 -0
- package/dist/server/src/lib/db/migrations/v45-skill-installations.js +59 -0
- package/dist/server/src/lib/db/migrations/v46-skill-installations-cascade.js +107 -0
- package/dist/server/src/lib/db/migrations/v47-skill-installations-roots.js +70 -0
- package/dist/server/src/lib/db/worktree-db.js +9 -4
- package/dist/server/src/lib/git/git-errors.js +336 -0
- package/dist/server/src/lib/git/git-exec.js +285 -0
- package/dist/server/src/lib/skills/compatibility.js +194 -0
- package/dist/server/src/lib/skills/constants.js +252 -0
- package/dist/server/src/lib/skills/errors.js +82 -0
- package/dist/server/src/lib/skills/index.js +91 -0
- package/dist/server/src/lib/skills/install-apply.js +670 -0
- package/dist/server/src/lib/skills/install-plan.js +582 -0
- package/dist/server/src/lib/skills/installed-state.js +127 -0
- package/dist/server/src/lib/skills/integrity.js +225 -0
- package/dist/server/src/lib/skills/json-schema.js +365 -0
- package/dist/server/src/lib/skills/operation-audit.js +120 -0
- package/dist/server/src/lib/skills/operation-journal.js +286 -0
- package/dist/server/src/lib/skills/operation-lock.js +339 -0
- package/dist/server/src/lib/skills/operation-reconciler.js +107 -0
- package/dist/server/src/lib/skills/operation-store.js +153 -0
- package/dist/server/src/lib/skills/package-reader.js +495 -0
- package/dist/server/src/lib/skills/package-validator.js +451 -0
- package/dist/server/src/lib/skills/preview-diff.js +627 -0
- package/dist/server/src/lib/skills/safe-yaml.js +593 -0
- package/dist/server/src/lib/skills/schema.js +1248 -0
- package/dist/server/src/lib/skills/semver.js +193 -0
- package/dist/server/src/lib/skills/snapshot-store.js +334 -0
- package/dist/server/src/lib/skills/startup-reconcile.js +138 -0
- package/dist/server/src/lib/skills/uninstall-apply.js +495 -0
- package/dist/server/src/lib/skills/uninstall-plan.js +479 -0
- package/dist/server/src/types/skills.js +17 -0
- package/package.json +1 -1
- package/.next/server/chunks/129.js +0 -1
- package/.next/server/chunks/2478.js +0 -1
- package/.next/server/chunks/9886.js +0 -1
- package/.next/static/0_lnKsT0DH-MnHhnV5n-l/_buildManifest.js +0 -1
- package/.next/static/chunks/3165-87bf884f7f3d15cf.js +0 -1
- package/.next/static/chunks/6416.6756b7ad06dd96f7.js +0 -1
- package/.next/static/chunks/8676.57260a06f6554e7e.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/templates/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-7536041a7a89616d.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-9a4ce51e697baac6.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-ed4590b024edd8d6.js +0 -1
- package/.next/static/chunks/webpack-2e3739a831868daa.js +0 -1
- package/.next/static/css/d7e2e8d1b8d69d36.css +0 -1
- /package/.next/static/{0_lnKsT0DH-MnHhnV5n-l → D-aoE4gWfuCUN0GqEPIX3}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4560],{4560:(e,t,r)=>{r.d(t,{GV:()=>tt});var n=r(95155),s=r(12115),a=r(20063),i=r(52619),o=r.n(i),l=r(89275);let c=(0,s.forwardRef)(function(e,t){let{href:r,onClick:s,target:i,...c}=e,d=(0,a.usePathname)(),u=(0,l.Hq)();return(0,n.jsx)(o(),{ref:t,href:r,target:i,onClick:e=>{var t;null==s||s(e),e.defaultPrevented||0!==(t=e).button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||void 0!==i&&"_self"!==i||/^([a-z][a-z0-9+.-]*:)?\/\//i.test(r)||/^(mailto:|tel:)/i.test(r)||(e.preventDefault(),r!==d&&u.push(r))},...c})});var d=r(18955),u=r(59847),m=r(86651),f=r(94684),h=r(34681),p=r(5379),x=r(59427),g=r(37494);function b(){let{theme:e,setTheme:t}=(0,p.D)(),[r,a]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{a(!0)},[]),!r)return(0,n.jsx)("div",{"data-testid":"theme-toggle-placeholder",className:"w-8 h-8","aria-hidden":"true"});let i="dark"===e;return(0,n.jsx)("button",{"data-testid":"theme-toggle",onClick:()=>t(i?"light":"dark"),className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus:outline-none focus:ring-2 focus:ring-ring","aria-label":i?"Switch to light mode":"Switch to dark mode",title:i?"Switch to light mode":"Switch to dark mode",children:i?(0,n.jsx)(x.A,{className:"w-5 h-5","data-testid":"theme-icon-sun"}):(0,n.jsx)(g.A,{className:"w-5 h-5","data-testid":"theme-icon-moon"})})}var v=r(63365);function y(){let{status:e}=(0,v.xM)(),t=(0,d.c)("common");if("connected"===e)return null;let r="connecting"===e,s=t(r?"connection.reconnecting":"connection.offline");return(0,n.jsxs)("span",{"data-testid":"connection-status-indicator",role:"status","aria-live":"polite",title:t(r?"connection.reconnectingTooltip":"connection.offlineTooltip"),className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-0.5 text-xs text-muted-foreground",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:["w-1.5 h-1.5 rounded-full",r?"bg-warning motion-safe:animate-pulse":"bg-muted-foreground"].join(" ")}),s]})}var j=r(79651),w=r(92614);let k=[{labelKey:"nav.home",href:"/",isActive:e=>"/"===e},{labelKey:"nav.chat",href:"/chat",isActive:e=>e.startsWith("/chat")},{labelKey:"nav.sessions",href:"/sessions",isActive:e=>e.startsWith("/sessions")},{labelKey:"nav.repositoriesShort",href:"/repositories",isActive:e=>e.startsWith("/repositories")},{labelKey:"nav.reviewReport",href:"/review",isActive:e=>e.startsWith("/review")},{labelKey:"nav.more",href:"/more",isActive:e=>e.startsWith("/more")}];function N(e){let{title:t="CommandMate"}=e,r=(0,a.usePathname)(),i=(0,d.c)("commandPalette"),o=(0,d.c)("common"),{setOpen:l}=(0,w.C)(),[p,x]=s.useState(null);return s.useEffect(()=>{x("undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform||"")?"⌘":"Ctrl")},[]),(0,n.jsx)("header",{className:"sticky top-0 z-50 border-b border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md",children:(0,n.jsx)("div",{className:"container-custom",children:(0,n.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,n.jsx)("div",{className:"flex items-center space-x-4",children:(0,n.jsxs)(c,{href:"/",className:"flex items-center space-x-2 hover:opacity-80 transition-opacity",children:[(0,n.jsx)("div",{className:"w-8 h-8 bg-accent-600 rounded-lg flex items-center justify-center",children:(0,n.jsx)(u.A,{size:20,strokeWidth:2,className:"text-white","aria-hidden":"true"})}),(0,n.jsx)("h1",{className:"text-xl font-bold text-foreground",children:t})]})}),(0,n.jsxs)("nav",{className:"flex items-center space-x-6",role:"navigation",children:[k.map(e=>{let t=e.isActive(r);return(0,n.jsx)(c,{href:e.href,"aria-current":t?"page":void 0,className:"relative py-1 text-sm font-medium transition-colors after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-accent-600 dark:after:bg-accent-400 after:origin-center motion-safe:after:transition-transform after:duration-200 after:ease-[var(--motion-ease-out)] ".concat(t?"text-accent-600 dark:text-accent-400 after:scale-x-100":"text-muted-foreground hover:text-foreground after:scale-x-0"),children:o(e.labelKey)},e.href)}),(0,n.jsxs)("button",{type:"button","data-testid":"header-command-palette-trigger",onClick:()=>l(!0),"aria-label":i("mobileTrigger"),className:"hidden md:inline-flex items-center gap-2 rounded-md border border-border bg-surface px-2.5 py-1.5 text-sm text-muted-foreground hover:bg-surface-2 transition-colors",children:[(0,n.jsx)(m.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0"}),(0,n.jsx)("span",{children:i("searchAction")}),p&&(0,n.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(j.u,{children:p}),(0,n.jsx)(j.u,{children:"K"})]})]}),(0,n.jsx)(y,{}),(0,n.jsx)(h.g,{}),(0,n.jsx)(b,{}),(0,n.jsxs)("a",{href:"https://github.com/kewton/MyCodeBranchDesk",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors flex items-center space-x-1",children:[(0,n.jsx)(f.A,{size:20,strokeWidth:2,"aria-hidden":"true"}),(0,n.jsx)("span",{children:"GitHub"})]})]})]})})})}var S=r(32916),C=r(38218);let A={showSidebar:!0,showGlobalNav:!0,showLocalNav:!1,autoCollapseSidebar:!1},M=[{prefix:"/worktrees/",config:{showGlobalNav:!1,showLocalNav:!0}},{prefix:"/sessions",config:{autoCollapseSidebar:!0}}];var E=r(22592),L=r(85710),R=r(17787),z=r(49027),B=r(27587),D=r(39649),T=r(47650),W=r(55142),P=r(48481);let K=(0,s.memo)(function(e){let{status:t,label:r}=e;return(0,n.jsx)(P.m,{"data-testid":"status-indicator",status:t,label:r,size:"lg"})});function I(e,t,r){let n=r-8-t;return n<=8?8:Math.min(Math.max(e,8),n)}function _(e){let{id:t,branch:r,isVisible:a,anchorRef:i}=e,[o,l]=(0,s.useState)({top:-9999,left:-9999}),c=(0,s.useRef)(null);if((0,s.useEffect)(()=>{var e,t,r;if(!a||!i.current)return;let n=i.current.getBoundingClientRect(),s=null==(e=c.current)?void 0:e.getBoundingClientRect(),o=null!=(t=null==s?void 0:s.width)?t:0,d=null!=(r=null==s?void 0:s.height)?r:0,u=window.innerWidth,m=window.innerHeight,f=n.right+8;if(f+o>u-8){let e=n.left-8-o;e>=8&&(f=e)}l({top:I(n.top,d,m),left:I(f,o,u)})},[a,i]),"undefined"==typeof document||!a)return null;let d=Math.min(384,Math.max(0,window.innerWidth-16));return T.createPortal((0,n.jsxs)("div",{ref:c,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:o.top,left:o.left,maxWidth:d},children:[(0,n.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:r.name}),(0,n.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:r.repositoryName}),(0,n.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",r.status]}),r.worktreePath&&(0,n.jsx)("p",{className:"text-sidebar-muted truncate",children:r.worktreePath}),r.description&&(0,n.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:r.description})]}),document.body)}let O=0,F=(0,s.memo)(function(e){let{branch:t,isSelected:r,onClick:a,showRepositoryName:i=!0}=e,o=(0,d.c)("common"),l="tooltip-".concat(t.id),c=(0,s.useRef)(null),[u,m]=(0,s.useState)(!1),f=(0,s.useRef)(null),h=(0,s.useCallback)(()=>{null!==f.current&&(clearTimeout(f.current),f.current=null)},[]);(0,s.useEffect)(()=>()=>h(),[h]);let p=u&&!r;return(0,s.useEffect)(()=>{r&&m(!1)},[r]),(0,s.useEffect)(()=>{if(!u)return;let e=()=>m(!1);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[u]),(0,n.jsxs)("button",{ref:c,"data-testid":"branch-list-item",onClick:()=>{h(),O=Date.now()+400,m(!1),a()},onMouseEnter:()=>{h(),Date.now()>=O&&(f.current=setTimeout(()=>{m(!0)},150))},onMouseLeave:()=>{h(),m(!1)},onFocus:e=>{h(),e.target.matches(":focus-visible")&&(f.current=setTimeout(()=>{m(!0)},150))},onBlur:()=>{h(),m(!1)},"aria-current":r?"true":void 0,"aria-describedby":p?l:void 0,"aria-label":i?void 0:"".concat(t.name," - ").concat(t.repositoryName),className:"\n group relative w-full px-4 py-3 flex flex-col gap-1\n hover:bg-sidebar-hover transition-colors\n focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring\n ".concat(r?"bg-sidebar-hover border-l-2 border-accent-500":"border-l-2 border-transparent","\n "),children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[t.cliStatus&&Object.keys(t.cliStatus).length>0&&(0,n.jsx)("div",{className:"flex items-center justify-center flex-shrink-0 w-4","aria-label":o("branchItem.cliToolStatus"),children:(0,n.jsx)(K,{status:(0,W.A7)(t.cliStatus),label:(0,W.dw)(t.cliStatus,t.cliStatusLabels)})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-sidebar-foreground truncate",children:t.name}),i&&(0,n.jsx)("p",{className:"text-xs text-sidebar-muted truncate",children:t.repositoryName})]}),t.hasUnread&&(0,n.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-accent-500 flex-shrink-0","aria-label":o("branchItem.hasUnread")})]}),t.description&&(0,n.jsx)("div",{"data-testid":"branch-description",className:"pl-6 pr-2 mt-1 text-left",children:(0,n.jsx)("p",{className:"text-xs text-sidebar-muted line-clamp-2",children:t.description})}),(0,n.jsx)(_,{id:l,branch:t,isVisible:p,anchorRef:c})]})});var V=r(41898);function H(e,t,r){if(t<=0||r<=0)return 0;let n=e+t+8-r;return n>0?-Math.min(n,Math.max(0,e-8)):e<8?8-e:0}let G=(0,s.memo)(function(e){var t;let{sortKey:r,sortDirection:a,onSortKeyChange:i,onSortDirectionChange:o,options:l,defaultDirections:c,compact:u,tooltip:m,iconClassName:f="w-3 h-3"}=e,h=(0,d.c)("common"),[p,x]=(0,s.useState)(!1),g=(0,s.useRef)(null),b=(0,s.useRef)(null),v=(0,s.useRef)({x:0,y:0}),[y,j]=(0,s.useState)({x:0,y:0});(0,s.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&x(!1)}if(p)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]),(0,s.useEffect)(()=>{function e(e){"Escape"===e.key&&x(!1)}if(p)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p]),(0,s.useLayoutEffect)(()=>{let e=e=>{v.current=e,j(t=>t.x===e.x&&t.y===e.y?t:e)};if(!p)return void e({x:0,y:0});let t=b.current;if(!t)return;let r=t.getBoundingClientRect();e({x:H(r.left-v.current.x,r.width,window.innerWidth),y:H(r.top-v.current.y,r.height,window.innerHeight)})},[p]);let w=(0,s.useCallback)(()=>{x(e=>!e)},[]),k=(0,s.useCallback)(e=>{if(e===r)o("asc"===a?"desc":"asc");else{var t;i(e),o(null!=(t=null==c?void 0:c[e])?t:"asc")}x(!1)},[r,a,i,o,c]),N=(0,s.useCallback)(()=>{o("asc"===a?"desc":"asc")},[a,o]),S=(null==(t=l.find(e=>e.key===r))?void 0:t.label)||"Sort",C=(0,n.jsxs)("button",{type:"button",onClick:w,"aria-expanded":p,"aria-haspopup":"listbox","aria-label":"Sort by ".concat(S),className:" flex items-center gap-1 px-2 py-1 rounded text-xs text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:[(0,n.jsx)(J,{className:f}),(0,n.jsx)("span",{className:u?"hidden":"hidden sm:inline",children:S})]});return(0,n.jsxs)("div",{ref:g,className:"relative","data-testid":"sort-selector-base",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[m?(0,n.jsx)(V.m_,{content:m,placement:"bottom",children:C}):C,(0,n.jsx)("button",{type:"button",onClick:N,"aria-label":"asc"===a?"Sort ascending":"Sort descending",className:" p-1 rounded text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:"asc"===a?(0,n.jsx)(X,{className:f}):(0,n.jsx)(U,{className:f})})]}),p&&(0,n.jsx)("div",{ref:b,role:"listbox","aria-label":h("sort.options"),className:" absolute right-0 top-full mt-1 z-50 min-w-[140px] py-1 rounded-md shadow-lg bg-sidebar border border-sidebar-border ",style:0!==y.x||0!==y.y?{transform:"translate(".concat(y.x,"px, ").concat(y.y,"px)")}:void 0,children:l.map(e=>(0,n.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.key,onClick:()=>k(e.key),className:"\n w-full px-3 py-2 text-left text-sm\n flex items-center justify-between\n hover:bg-sidebar-hover transition-colors\n ".concat(r===e.key?"text-accent-700 dark:text-accent-400":"text-sidebar-muted","\n "),children:[(0,n.jsx)("span",{children:e.label}),r===e.key&&(0,n.jsx)("span",{className:"text-xs",children:"asc"===a?"ASC":"DESC"})]},e.key))})]})});function J(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}function X(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}function U(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}let q=[{key:"updatedAt",labelKey:"sort.updatedAt"},{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"branchName",labelKey:"sort.branchName"},{key:"status",labelKey:"sort.status"}],Z={updatedAt:"desc"},$=(0,s.memo)(function(){let{sortKey:e,sortDirection:t,setSortKey:r,setSortDirection:a}=(0,S.VF)(),i=(0,d.c)("common"),o=(0,s.useMemo)(()=>q.map(e=>{let{key:t,labelKey:r}=e;return{key:t,label:i(r)}}),[i]);return(0,n.jsx)(G,{sortKey:e,sortDirection:t,onSortKeyChange:r,onSortDirectionChange:a,options:o,defaultDirections:Z,compact:!0,tooltip:i("tooltips.sort"),iconClassName:"w-4 h-4"})});var Q=r(744),Y=r(30061),ee=r(36809);let et=["en","ja"],er={en:"English",ja:"日本語"};function en(){return{currentLocale:(0,ee.Ym)(),switchLocale:e=>{if(et.includes(e)){let t="https:"===window.location.protocol;document.cookie="".concat("locale","=").concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax").concat(t?";Secure":""),localStorage.setItem("locale",e),window.location.reload()}}}}function es(){let{currentLocale:e,switchLocale:t}=en(),r=(0,d.c)("common");return(0,n.jsx)("select",{value:e,onChange:e=>t(e.target.value),"data-testid":"locale-switcher","aria-label":r("language"),className:" w-full px-3 py-2 rounded-md bg-sidebar text-sidebar-foreground border border-sidebar-border focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent text-sm ",children:et.map(e=>(0,n.jsx)("option",{value:e,children:er[e]},e))})}var ea=r(65380);function ei(){let e=(0,d.c)("auth"),t=(0,ea.H)(),[r,a]=(0,s.useState)(!1);if(!t)return null;async function i(){a(!0);try{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"}catch(e){window.location.href="/login"}}return(0,n.jsx)("button",{type:"button",onClick:i,disabled:r,"data-testid":"logout-button",className:" w-full px-3 py-2 text-sm text-left rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 transition-colors ",children:r?"...":e("logout.button")})}var eo=r(94442),el=r(80344),ec=r(7636);let ed="mcbd-sidebar-group-collapsed",eu="mcbd-sidebar-scroll-top",em="mcbd-sidebar-group-order-cache",ef="w-4 h-4",eh=0;function ep(){try{let e=localStorage.getItem(em);if(!e)return[];let t=function(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e).slice(0,500)}catch(e){return[]}}(e);return t.length,t}catch(e){return[]}}function ex(e){try{localStorage.setItem(em,JSON.stringify(e))}catch(e){}}let eg=(0,s.memo)(function(){var e,t;let r=(0,l.Hq)(),{worktrees:a,repositories:i,selectedWorktreeId:c,selectWorktree:u,refreshWorktrees:m}=(0,D.$f)(),{closeMobileDrawer:f,sortKey:h,sortDirection:p,viewMode:x,setViewMode:g}=(0,S.VF)(),v=(0,d.c)("common"),[y,j]=(0,s.useState)(""),w=(0,s.useRef)(null),[k,N]=(0,s.useState)(()=>{try{let e=localStorage.getItem(ed);return e?function(e){try{let t=JSON.parse(e);if("object"!=typeof t||null===t||Array.isArray(t))return{};let r={},n=0;for(let[e,s]of Object.entries(t))if(!ev.has(e)&&"boolean"==typeof s){if(++n>100)break;r[e]=s}return r}catch(e){return{}}}(e):{}}catch(e){return{}}}),[C,A]=(0,s.useState)(ep),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{M.current||(M.current=!0,fetch("/api/sidebar/group-order").then(e=>e.json()).then(e=>{e.success&&Array.isArray(e.order)&&(A(e.order),ex(e.order))}).catch(()=>{}))},[]);let E=(0,s.useMemo)(()=>(0,ec.UZ)(i),[i]),B=(0,s.useMemo)(()=>(0,ec.s6)(a,E),[a,E]),T=(0,s.useMemo)(()=>B.map(W.XK),[B]),P=(0,s.useDeferredValue)(T),K=(0,s.useRef)(null),I=(0,s.useRef)(null);(0,s.useEffect)(()=>()=>{null!==I.current&&clearTimeout(I.current)},[]);let _=(0,s.useMemo)(()=>{let e=K.current;return!e||Date.now()>=e.expiresAt?P:e.items},[P]),O=(0,s.useRef)(_);(0,s.useLayoutEffect)(()=>{O.current=_});let H=(0,s.useCallback)(()=>{null!==I.current&&(clearTimeout(I.current),I.current=null);let e=K.current;if(e&&Date.now()<e.expiresAt){K.current={...e,expiresAt:1/0};return}K.current={items:O.current,expiresAt:1/0}},[]),G=(0,s.useCallback)(()=>{K.current&&(K.current={...K.current,expiresAt:Date.now()+1e3},null!==I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{K.current=null},1e3))},[]),{sortedItems:J,groupedItems:X}=function(e){let{items:t,sortKey:r,sortDirection:n,viewMode:a,filterText:i}=e,o=(0,s.useMemo)(()=>{if(!i)return t;let e=i.toLowerCase();return t.filter(t=>t.name.toLowerCase().includes(e)||t.repositoryName.toLowerCase().includes(e))},[t,i]);return{sortedItems:(0,s.useMemo)(()=>(0,ec.Xn)(o,r,n),[o,r,n]),groupedItems:(0,s.useMemo)(()=>"grouped"===a?(0,ec._s)(o,r,n):[],[o,r,n,a])}}({items:_,sortKey:h,sortDirection:p,viewMode:x,filterText:y}),U=(0,s.useMemo)(()=>{if("grouped"!==x||!X)return null;if(y.trim()||0===C.length)return X;let e=new Map(C.map((e,t)=>[e,t]));return[...X].sort((t,r)=>{let n=e.has(t.repositoryName)?e.get(t.repositoryName):1/0,s=e.has(r.repositoryName)?e.get(r.repositoryName):1/0;return n===s?t.repositoryName.localeCompare(r.repositoryName):n-s})},[x,X,C,y]),q="grouped"===x?U:null;(0,s.useEffect)(()=>{try{localStorage.setItem(ed,JSON.stringify(k))}catch(e){}},[k]);let Z=(0,s.useCallback)(e=>{N(t=>({...t,[e]:!t[e]}))},[]),Y=(0,s.useCallback)(()=>{var e,t,r=null!=(t=null==(e=w.current)?void 0:e.scrollTop)?t:0;let n=Number.isFinite(r)&&r>0?r:0;eh=n;try{localStorage.setItem(eu,String(n))}catch(e){}},[]),ee=J.length>0||(null!=(e=null==q?void 0:q.length)?e:0)>0;(0,s.useEffect)(()=>{let e=w.current;if(!e)return;let t=window.requestAnimationFrame(()=>{e.scrollTop=function(){try{let e=localStorage.getItem(eu);if(!e)return eh=0,0;let t=Number(e);Number.isFinite(t)&&t>=0&&(eh=t)}catch(e){}return eh}()});return()=>{window.cancelAnimationFrame(t)}},[ee,x]);let et=(0,s.useCallback)(e=>{Y(),u(e),r.push("/worktrees/".concat(e)),f()},[Y,u,r,f]),er=(0,R.FR)((0,R.MS)(R.AN,{activationConstraint:{distance:8}})),en=(0,s.useCallback)(e=>{let{active:t,over:r}=e;if(!r||t.id===r.id||!q)return;let n=q.map(e=>e.repositoryName),s=n.indexOf(String(t.id)),a=n.indexOf(String(r.id));if(-1===s||-1===a)return;let i=(0,z.be)(n,s,a);A(i),ex(i),fetch("/api/sidebar/group-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:i})}).catch(()=>{A(n),ex(n)})},[q]),ea="flat"===x?0===J.length:(null!=(t=null==q?void 0:q.length)?t:0)===0;return(0,n.jsxs)("nav",{"data-testid":"sidebar","aria-label":v("sidebar.branchNavigation"),className:"h-full flex flex-col bg-sidebar text-sidebar-foreground",role:"navigation",children:[(0,n.jsx)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 px-4 py-4 border-b border-sidebar-border",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[(0,n.jsx)("h2",{className:"min-w-0 truncate text-lg font-semibold text-sidebar-foreground",children:v("sidebar.branches")}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,n.jsx)(ej,{viewMode:x,onToggle:g}),(0,n.jsx)($,{}),(0,n.jsx)(eA,{refreshWorktrees:m}),(0,n.jsx)(V.m_,{content:v("tooltips.repositories"),placement:"bottom",children:(0,n.jsx)(o(),{href:"/repositories","aria-label":v("nav.repositories"),className:"p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors inline-flex items-center",children:(0,n.jsx)(L.A,{className:ef,"aria-hidden":"true"})})})]})]})}),(0,n.jsx)("div",{className:"flex-shrink-0 px-4 py-3 border-b border-sidebar-border",children:(0,n.jsx)(Q.pd,{type:"text",placeholder:v("sidebar.searchBranches"),value:y,onChange:e=>j(e.target.value),className:"bg-background shadow-none"})}),(0,n.jsx)("div",{ref:w,"data-testid":"branch-list",onScroll:Y,onMouseEnter:H,onMouseLeave:G,className:"flex-1 overflow-y-auto overflow-x-hidden",children:ea?(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sidebar-muted",children:v(y?"sidebar.noBranchesFound":"sidebar.noBranchesAvailable")}):"grouped"===x&&q?(0,n.jsx)(R.Mp,{sensors:er,collisionDetection:R.fp,onDragEnd:en,children:(0,n.jsx)(z.gB,{items:q.map(e=>e.repositoryName),strategy:z._G,children:q.map(e=>{let t=!k[e.repositoryName]||!!y.trim();return(0,n.jsx)(eb,{group:e,isExpanded:t,selectedWorktreeId:c,onToggle:()=>Z(e.repositoryName),onBranchClick:et,isDragDisabled:!!y.trim()},e.repositoryName)})})}):J.map(e=>(0,n.jsx)(F,{branch:e,isSelected:e.id===c,onClick:()=>et(e.id)},e.id))}),(0,n.jsxs)("div",{className:"flex-shrink-0 px-4 py-3 border-t border-sidebar-border space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(es,{})}),(0,n.jsx)(b,{})]}),(0,n.jsx)(ei,{})]})]})});function eb(e){let{group:t,isExpanded:r,selectedWorktreeId:s,onToggle:a,onBranchClick:i,isDragDisabled:o}=e,{attributes:l,listeners:c,setNodeRef:d,setActivatorNodeRef:u,transform:m,transition:f,isDragging:h}=(0,z.gl)({id:t.repositoryName,disabled:o}),p={transform:B.Ks.Transform.toString(m),transition:f,opacity:h?.5:1};return(0,n.jsxs)("div",{ref:d,style:p,className:"w-full min-w-0",children:[(0,n.jsx)(ey,{repositoryName:t.repositoryName,branchCount:t.branches.length,isExpanded:r,onClick:a,dragHandleRef:u,dragHandleListeners:o?void 0:c,dragHandleAttributes:o?void 0:l}),r&&t.branches.map(e=>(0,n.jsx)(F,{branch:e,isSelected:e.id===s,onClick:()=>i(e.id),showRepositoryName:!1},e.id))]})}let ev=new Set(["__proto__","constructor","prototype"]);function ey(e){let{repositoryName:t,branchCount:r,isExpanded:s,onClick:a,dragHandleRef:i,dragHandleListeners:o,dragHandleAttributes:l}=e,c=(0,d.c)("common");return(0,n.jsxs)("div",{className:"flex items-center w-full",children:[o&&(0,n.jsx)("div",{ref:i,...o,...l,"aria-label":c("sidebar.dragToReorderGroup"),className:" flex-shrink-0 flex items-center justify-center w-6 h-full pl-2 cursor-grab active:cursor-grabbing text-sidebar-muted hover:text-sidebar-foreground transition-colors ",children:(0,n.jsx)(eS,{})}),(0,n.jsxs)("button",{"data-testid":"group-header",type:"button",onClick:a,"aria-expanded":s,className:" flex-1 min-w-0 flex items-center gap-2 px-2 py-2 text-xs font-semibold text-sidebar-muted uppercase tracking-wider focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring transition-colors ",children:[(0,n.jsx)(ew,{isExpanded:s}),(0,n.jsx)(ek,{color:(0,ec.LV)(t)}),(0,n.jsx)(Y.nR,{content:t,className:"flex-1 min-w-0 text-left truncate",children:t}),(0,n.jsx)("span",{className:"text-sidebar-muted font-normal tabular-nums pr-2",children:r})]})]})}function ej(e){let{viewMode:t,onToggle:r}=e,s=(0,d.c)("common");return(0,n.jsx)(V.m_,{content:s("tooltips.viewMode"),placement:"bottom",children:(0,n.jsx)("button",{"data-testid":"view-mode-toggle",type:"button",onClick:()=>{r("grouped"===t?"flat":"grouped")},"aria-label":s("grouped"===t?"sidebar.switchToFlatView":"sidebar.switchToGroupedView"),className:" p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:"grouped"===t?(0,n.jsx)(eN,{className:ef}):(0,n.jsx)(ek,{className:ef})})})}function ew(e){let{isExpanded:t}=e;return(0,n.jsx)("svg",{className:"w-3 h-3 flex-shrink-0 transition-transform ".concat(t?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function ek(e){let{className:t="w-3.5 h-3.5",color:r}=e;return(0,n.jsx)("svg",{className:"".concat(t," flex-shrink-0"),viewBox:"0 0 24 24",fill:null!=r?r:"none",stroke:r?"none":"currentColor",strokeWidth:2*!r,"aria-hidden":"true",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function eN(e){let{className:t="w-3 h-3"}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}function eS(){return(0,n.jsxs)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"9",cy:"5",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"5",r:"1.5"}),(0,n.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,n.jsx)("circle",{cx:"9",cy:"19",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"19",r:"1.5"})]})}function eC(e){let{className:t=""}=e;return(0,n.jsx)("svg",{className:"".concat(ef," ").concat(t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L4 4m16 16l-1.64-1.64A9 9 0 014.51 15"})})}let eA=(0,s.memo)(function(e){let{refreshWorktrees:t}=e,[r,a]=(0,s.useState)(!1),i=(0,s.useRef)(!1),{showToast:o}=(0,eo.dj)(),l=(0,d.c)("common"),c=(0,s.useCallback)(async()=>{if(!i.current){i.current=!0,a(!0);try{let e=await el.Rx.sync();await t(),o(l("syncSuccess",{count:e.worktreeCount}),"success",3e3)}catch(e){e instanceof el.hD&&401===e.status?o(l("syncAuthError"),"error",5e3):o(l("syncError"),"error",5e3)}finally{i.current=!1,a(!1)}}},[t,o,l]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(V.m_,{content:l("tooltips.sync"),placement:"bottom",children:(0,n.jsx)("button",{type:"button",onClick:c,disabled:r,"aria-label":l("syncButtonLabel"),className:"p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:(0,n.jsx)(eC,{className:r?"animate-spin":""})})})})});var eM=r(65993),eE=r(37586),eL=r(66685),eR=r(61362),ez=r(37772);let eB=[{labelKey:"nav.home",href:"/",isActive:e=>"/"===e,icon:(0,n.jsx)(eM.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.chat",href:"/chat",isActive:e=>e.startsWith("/chat"),icon:(0,n.jsx)(eE.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.sessions",href:"/sessions",isActive:e=>e.startsWith("/sessions"),icon:(0,n.jsx)(eL.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.review",href:"/review",isActive:e=>e.startsWith("/review"),icon:(0,n.jsx)(eR.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.more",href:"/more",isActive:e=>e.startsWith("/more"),icon:(0,n.jsx)(ez.A,{size:20,"aria-hidden":"true"})}];function eD(){let e=(0,a.usePathname)(),{setOpen:t}=(0,w.C)(),r=(0,d.c)("commandPalette"),s=(0,d.c)("common");return(0,n.jsx)("nav",{"data-testid":"global-mobile-nav",className:"fixed bottom-0 left-0 right-0 z-50 border-t border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md pb-safe",children:(0,n.jsxs)("div",{className:"flex items-center justify-around h-14",children:[eB.map(t=>{let r=t.isActive(e);return(0,n.jsxs)(c,{href:t.href,className:"flex flex-col items-center justify-center flex-1 h-full text-xs transition-colors ".concat(r?"text-accent-600 dark:text-accent-400":"text-muted-foreground hover:text-foreground"),children:[t.icon,(0,n.jsx)("span",{className:"mt-1 whitespace-nowrap",children:s(t.labelKey)})]},t.href)}),(0,n.jsxs)("button",{type:"button","data-testid":"mobile-command-palette-trigger",onClick:()=>t(!0),"aria-label":r("mobileTrigger"),className:"flex flex-col items-center justify-center flex-1 h-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,n.jsx)(m.A,{size:20,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"mt-1 whitespace-nowrap",children:r("mobileLabel")})]})]})})}var eT=r(79698),eW=r(24533),eP=r(79451),eK=r(89559),eI=r(97470),e_=r(76482),eO=r(39332),eF=r(87531),eV=r(59854),eH=r(70628),eG=r(66966),eJ=r(68704);let eX=[{key:"home",href:"/"},{key:"chat",href:"/chat"},{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"more",href:"/more"}],eU={home:eM.A,chat:eE.A,sessions:eL.A,repositories:eW.A,review:eR.A,more:ez.A},eq="cm.palette.recents";function eZ(e){if(!e||"object"!=typeof e)return!1;let{kind:t,id:r}=e;return("nav"===t||"worktree"===t||"action"===t)&&"string"==typeof r}function e$(e){return e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isSessionRunning?"ready":"idle"}function eQ(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 eY=(0,eF.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"),e0="shrink-0 text-muted-foreground";function e1(){var e,t,r;let{open:i,setOpen:o}=(0,w.C)(),{setOpen:l}=(0,eH.K)(),c=(0,a.useRouter)(),u=(0,d.c)("commandPalette"),h=(0,d.c)("common"),{theme:b,setTheme:v}=(0,p.D)(),{setSize:y,isMobile:k}=(0,E.Ps)(),{currentLocale:N,switchLocale:S}=en(),C=(0,eG.rC)(),{showToast:A}=(0,eo.dj)(),[M,L]=(0,s.useState)(!1),[R,z]=(0,s.useState)(""),[B,D]=(0,s.useState)([]),W=(0,s.useRef)(null),K=(0,s.useRef)(null),I=(0,s.useRef)(i);(0,s.useEffect)(()=>{I.current=i},[i]),(0,s.useEffect)(()=>{L(!0)},[]),(0,s.useEffect)(()=>{function e(e){if(("k"===e.key||"K"===e.key)&&(e.metaKey||e.ctrlKey)){if(I.current){e.preventDefault(),e.stopPropagation(),o(!1);return}if(eQ(e.target))return;e.preventDefault(),o(!0);return}"Escape"===e.key&&I.current&&(e.preventDefault(),e.stopPropagation(),o(!1))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o]),(0,s.useEffect)(()=>{var e,t,r,n;i?(K.current=null!=(t=document.activeElement)?t:null,null==(e=W.current)||e.focus(),z(""),D(function(){try{let e=localStorage.getItem(eq);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(eZ).slice(0,8)}catch(e){return[]}}())):K.current&&(null==(r=(n=K.current).focus)||r.call(n),K.current=null)},[i]);let _=(0,s.useCallback)((e,t)=>{t&&D(e=>(function(e,t){let r=e.filter(e=>e.kind!==t.kind||e.id!==t.id),n=[t,...r].slice(0,8);try{localStorage.setItem(eq,JSON.stringify(n))}catch(e){}return n})(e,t)),o(!1),e()},[o]),O=(0,s.useCallback)(async()=>{try{var e;await el.Rx.sync(),await (null==C||null==(e=C.refresh)?void 0:e.call(C)),A(u("actions.syncSuccess"),"success")}catch(e){A(u("actions.syncError"),"error")}},[C,A,u]),F="dark"===b,V=""===R.trim(),H=null!=(e=null==C?void 0:C.error)?e:null,G=null!=(t=null==C?void 0:C.isLoading)&&t,J=H?[]:null!=(r=null==C?void 0:C.worktrees)?r:[],X=J.length>0,U=!H&&G&&0===J.length,q=[...J].sort((e,t)=>{let r=+!!e.isSessionRunning,n=+!!t.isSessionRunning;if(r!==n)return n-r;let s=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-s}),Z=V?q.slice(0,8):q,$=[{id:"theme",label:F?u("actions.toLight"):u("actions.toDark"),icon:F?x.A:g.A,run:()=>v(F?"light":"dark")},...k?[]:eJ.Uf.map(e=>({id:"displaysize:".concat(e),label:"".concat(u("actions.displaySizePrefix"),": ").concat(h("displaySize.".concat(e))),icon:eP.A,run:()=>y(e)})),{id:"sync",label:u("actions.syncRepositories"),icon:eK.A,run:()=>{O()}},{id:"locale",label:u("actions.switchLanguage"),icon:eI.A,run:()=>S("ja"===N?"en":"ja")},{id:"github",label:u("actions.openGitHub"),icon:f.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:u("actions.keyboardShortcuts"),icon:e_.A,run:()=>l(!0)}],Q=V?B.map(e=>{if("nav"===e.kind){let t=eX.find(t=>t.key===e.id);if(!t)return null;let r=eU[t.key],s=h("nav.".concat(t.key));return{id:"nav-".concat(t.key),value:"recent nav ".concat(t.key),node:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(r,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:s})]}),onSelect:()=>_(()=>c.push(t.href),{kind:"nav",id:t.key})}}if("worktree"===e.kind){let t=J.find(t=>t.id===e.id);if(!t)return null;let r=t.repositoryDisplayName||t.repositoryName||"",s=t.branch||t.name;return{id:"worktree-".concat(t.id),value:"recent worktree ".concat(t.id),node:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eO.A,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:s}),r&&(0,n.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:r}),(0,n.jsx)(P.m,{status:e$(t),size:"sm",className:r?"ml-2":"ml-auto"})]}),onSelect:()=>_(()=>c.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id})}}let t=$.find(t=>t.id===e.id);if(!t)return null;let r=t.icon;return{id:"action-".concat(t.id),value:"recent action ".concat(t.id),node:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:t.label})]}),onSelect:()=>_(t.run,{kind:"action",id:t.id})}}).filter(e=>null!==e):[];return M?(0,T.createPortal)((0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:eV.M.MODAL},"data-testid":"command-palette",children:[(0,n.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:()=>o(!1)}),(0,n.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,n.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,eF.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,n.jsxs)(eT.uB,{label:u("title"),className:(0,eF.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,n.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,n.jsx)(m.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,n.jsx)(eT.uB.Input,{ref:W,value:R,onValueChange:z,placeholder:u("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,n.jsxs)(eT.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,n.jsx)(eT.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:u("empty")}),U&&(0,n.jsx)(eT.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:u("loading")}),Q.length>0&&(0,n.jsx)(eT.uB.Group,{heading:u("groups.recent"),children:Q.map(e=>(0,n.jsx)(eT.uB.Item,{value:e.value,onSelect:e.onSelect,className:eY,children:e.node},e.id))}),(0,n.jsx)(eT.uB.Group,{heading:u("groups.navigation"),children:eX.map(e=>{let t=h("nav.".concat(e.key)),r=eU[e.key];return(0,n.jsxs)(eT.uB.Item,{value:"nav ".concat(t," ").concat(e.href),onSelect:()=>_(()=>c.push(e.href),{kind:"nav",id:e.key}),className:eY,children:[r&&(0,n.jsx)(r,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:t})]},e.key)})}),X&&(0,n.jsx)(eT.uB.Group,{heading:u("groups.worktrees"),children:Z.map(e=>{let t=e.repositoryDisplayName||e.repositoryName||"",r=e.branch||e.name;return(0,n.jsxs)(eT.uB.Item,{value:"worktree ".concat(t," ").concat(r," ").concat(e.name," ").concat(e.id),onSelect:()=>_(()=>c.push("/worktrees/".concat(e.id)),{kind:"worktree",id:e.id}),className:eY,children:[(0,n.jsx)(eO.A,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:r}),t&&(0,n.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:t}),(0,n.jsx)(P.m,{status:e$(e),size:"sm",className:t?"ml-2":"ml-auto"})]},e.id)})}),(0,n.jsx)(eT.uB.Group,{heading:u("groups.actions"),children:$.map(e=>{let t=e.icon;return(0,n.jsxs)(eT.uB.Item,{value:"action ".concat(e.id," ").concat(e.label),onSelect:()=>_(e.run,{kind:"action",id:e.id}),className:eY,children:[(0,n.jsx)(t,{size:16,className:e0,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:e.label})]},e.id)})})]}),(0,n.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,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"↑"}),(0,n.jsx)(j.u,{children:"↓"}),u("footer.navigate")]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"↵"}),u("footer.select")]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"esc"}),u("footer.close")]})]})]})})})]})}),document.body):null}var e2=r(94465);let e4=["global","terminal","composer"],e5=[{id:"commandPalette",keys:["MOD","K"],scope:"global"},{id:"keyboardHelp",keys:["?"],scope:"global"},{id:"closeOverlay",keys:["Esc"],scope:"global"},{id:"navigateList",keys:["↑","↓"],scope:"global"},{id:"terminalSearch",keys:["MOD","F"],scope:"terminal"},{id:"sendMessage",keys:["↵"],scope:"composer"},{id:"composerNewline",keys:["Shift","↵"],scope:"composer"}];function e9(){let{open:e,setOpen:t}=(0,eH.K)(),{open:r}=(0,w.C)(),a=(0,d.c)("keyboardShortcuts"),[i,o]=(0,s.useState)(!1);(0,s.useEffect)(()=>o(function(){if("undefined"==typeof navigator)return!1;let e=navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)}()),[]);let l=(0,s.useRef)(e);(0,s.useEffect)(()=>{l.current=e},[e]);let c=(0,s.useRef)(r);(0,s.useEffect)(()=>{c.current=r},[r]),(0,s.useEffect)(()=>{function e(e){"?"!==e.key||e.isComposing||229===e.keyCode||eQ(e.target)||c.current||l.current||(e.preventDefault(),t(!0))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e5;return e4.map(t=>({scope:t,shortcuts:e.filter(e=>e.scope===t)})).filter(e=>e.shortcuts.length>0)}();return(0,n.jsx)(e2.a,{isOpen:e,onClose:()=>t(!1),title:a("title"),size:"md",children:(0,n.jsx)("div",{"data-testid":"keyboard-shortcuts-overlay",className:"space-y-6",children:u.map(e=>{let{scope:t,shortcuts:r}=e;return(0,n.jsxs)("section",{"data-testid":"keyboard-shortcuts-scope-".concat(t),children:[(0,n.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:a("scopes.".concat(t))}),(0,n.jsx)("ul",{className:"divide-y divide-border",children:r.map(e=>(0,n.jsxs)("li",{"data-testid":"keyboard-shortcut-".concat(e.id),className:"flex items-center justify-between gap-4 py-2",children:[(0,n.jsx)("span",{className:"text-sm text-foreground",children:a("shortcuts.".concat(e.id))}),(0,n.jsx)("span",{className:"flex flex-shrink-0 items-center gap-1",children:e.keys.map((e,t)=>(0,n.jsx)(j.u,{children:"MOD"===e?i?"⌘":"Ctrl":e},t))})]},e.id))})]},t)})})})}var e6=r(52056),e3=r(65229),e8=r(52703);function e7(){let e=(0,d.c)("common"),[t,r]=(0,s.useState)(null),[a,i]=(0,s.useState)(null),o=(0,s.useCallback)(e=>{if(e.type!==e8.Oo)return;let{serverVersion:t,clientVersion:n}=e;"string"==typeof t&&"string"==typeof n&&t&&n&&t!==a&&r({serverVersion:t,clientVersion:n})},[a]);(0,v.T3)(o);let l=(0,s.useCallback)(()=>{window.location.reload()},[]),c=(0,s.useCallback)(()=>{r(e=>(e&&i(e.serverVersion),null))},[]);return t?(0,n.jsxs)("div",{"data-testid":"version-mismatch-banner",role:"alert","aria-live":"assertive",className:"fixed top-3 left-1/2 -translate-x-1/2 flex items-start gap-3 max-w-[92vw] rounded-lg border border-warning-border bg-warning-subtle px-4 py-3 text-warning-foreground shadow-lg",style:{zIndex:eV.M.TOAST},children:[(0,n.jsx)(e6.A,{className:"h-5 w-5 shrink-0 mt-0.5","aria-hidden":"true"}),(0,n.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm",children:[(0,n.jsx)("span",{className:"font-semibold",children:e("versionMismatch.title")}),(0,n.jsx)("span",{children:e("versionMismatch.description",{serverVersion:t.serverVersion,clientVersion:t.clientVersion})})]}),(0,n.jsxs)("button",{type:"button","data-testid":"version-mismatch-reload",onClick:l,className:"shrink-0 inline-flex items-center gap-1.5 rounded-md border border-warning-border px-3 py-1.5 text-sm font-medium hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-offset-2",children:[(0,n.jsx)(eK.A,{className:"h-4 w-4","aria-hidden":"true"}),e("versionMismatch.reload")]}),(0,n.jsx)("button",{type:"button","data-testid":"version-mismatch-dismiss",onClick:c,"aria-label":e("versionMismatch.dismiss"),className:"shrink-0 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2",children:(0,n.jsx)(e3.A,{className:"h-4 w-4","aria-hidden":"true"})})]}):null}let te="transform transition-transform duration-300 ease-out",tt=(0,s.memo)(function(e){let{children:t}=e,{isOpen:r,isMobileDrawerOpen:i,closeMobileDrawer:o,width:l,setWidth:c}=(0,S.VF)(),d=(0,C.a)(),{showSidebar:u,showGlobalNav:m}=function(){var e=(0,a.usePathname)();for(let t of M)if(e.startsWith(t.prefix))return{...A,...t.config};return{...A}}(),{factor:f}=(0,E.Ps)(),h=Math.round(160*f),p=Math.round(480*f),x=Math.round(Math.min(p,Math.max(h,l*f))),g=(0,s.useRef)(null),b=(0,s.useRef)(null),v=(0,s.useCallback)(e=>{c(Math.round(e/f))},[c,f]);return d?(0,n.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[i&&(0,n.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:o,"aria-hidden":"true"}),u&&(0,n.jsx)("aside",{"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full w-72 z-50\n ".concat(te,"\n ").concat(i?"translate-x-0":"-translate-x-full","\n "),role:"complementary",children:(0,n.jsx)(eg,{})}),(0,n.jsx)("main",{className:"flex-1 min-h-0 overflow-hidden ".concat(m?"pb-14":""),role:"main","data-view-transition":"content",children:t}),m&&(0,n.jsx)(eD,{}),(0,n.jsx)(e1,{}),(0,n.jsx)(e9,{}),(0,n.jsx)(e7,{})]}):(0,n.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[m&&(0,n.jsx)(N,{}),(0,n.jsxs)("div",{className:"flex flex-1 min-h-0",children:[u&&(0,n.jsxs)("aside",{ref:g,"data-testid":"sidebar-container",className:"\n fixed left-0\n ".concat(m?"top-16 h-[calc(100vh-4rem)]":"top-0 h-full","\n border-r border-border\n ").concat(te,"\n ").concat(r?"translate-x-0":"-translate-x-full","\n "),style:{width:"".concat(x,"px"),zIndex:eV.M.SIDEBAR},role:"complementary","aria-hidden":!r,children:[(0,n.jsx)(eg,{}),(0,n.jsx)(tr,{currentWidth:x,minWidth:h,maxWidth:p,sidebarRef:g,mainRef:b,onWidthChange:v})]}),(0,n.jsx)("main",{ref:b,className:"flex-1 min-w-0 h-full overflow-hidden transition-[padding] duration-300 ease-out",style:{paddingLeft:u&&r?"".concat(x,"px"):0},role:"main","data-view-transition":"content",children:t})]}),(0,n.jsx)(e1,{}),(0,n.jsx)(e9,{}),(0,n.jsx)(e7,{})]})});function tr(e){let{currentWidth:t,minWidth:r,maxWidth:s,sidebarRef:a,mainRef:i,onWidthChange:o}=e;return(0,n.jsx)("div",{"data-testid":"sidebar-resize-handle","aria-hidden":"true",onMouseDown:e=>{e.preventDefault();let n=e.clientX,l=t;i.current&&(i.current.style.transition="none");let c=e=>{l=Math.max(r,Math.min(s,t+(e.clientX-n))),a.current&&(a.current.style.width="".concat(l,"px")),i.current&&(i.current.style.paddingLeft="".concat(l,"px"))},d=()=>{document.body.style.cursor="",document.body.style.userSelect="",i.current&&(i.current.style.transition=""),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),o(l)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",c),document.addEventListener("mouseup",d)},className:"absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-accent-500/40 transition-colors"})}},30061:(e,t,r)=>{r.d(t,{nR:()=>i});var n=r(95155),s=r(12115),a=r(47650);function i(e){let{content:t,delay:r=200,className:i,children:o,metadata:l}=e,c=(0,s.useRef)(null),d=(0,s.useRef)(null),u=(0,s.useRef)(null),m=(0,s.useRef)(null),[f,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)({top:-9999,left:-9999}),g=(0,s.useCallback)(()=>{null!==u.current&&(clearTimeout(u.current),u.current=null)},[]),b=(0,s.useCallback)(()=>{let e=c.current;e&&(e.scrollWidth>e.clientWidth||l)&&(g(),u.current=setTimeout(()=>{let t=e.getBoundingClientRect(),r=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,r)}),h(!0),u.current=null},r))},[g,r,l]);(0,s.useLayoutEffect)(()=>{if(!f)return;let e=d.current,t=m.current;if(!e||!t)return;let{height:r}=e.getBoundingClientRect();if(r<=0)return;let n=window.innerHeight;if(t.bottom+4+r+4<=n)return;let s=t.top-4-r,a=s>=4?s:Math.max(4,n-r-4);x(e=>e.top===a?e:{...e,top:a})},[f]);let v=(0,s.useCallback)(()=>{g(),h(!1)},[g]);return(0,s.useEffect)(()=>()=>g(),[g]),(0,n.jsxs)("span",{ref:c,className:i,onMouseEnter:b,onMouseLeave:v,children:[null!=o?o:t,f&&"undefined"!=typeof document&&(0,a.createPortal)((0,n.jsxs)("span",{ref:d,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:p.top,left:p.left},children:[(0,n.jsx)("span",{className:"block break-all",children:t}),l&&(0,n.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:l})]}),document.body)]})}},34681:(e,t,r)=>{r.d(t,{g:()=>o});var n=r(95155);r(12115);var s=r(18955),a=r(22592),i=r(68704);function o(){let{size:e,setSize:t,isMobile:r}=(0,a.Ps)(),o=(0,s.c)("common");if(r)return null;let l=o("displaySize.ariaLabel");return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("label",{htmlFor:"pc-display-size",className:"sr-only",children:l}),(0,n.jsx)("select",{id:"pc-display-size","data-testid":"pc-display-size-select","aria-label":l,value:e,onChange:e=>{let r=e.target.value;(0,i.fM)(r)&&t(r)},className:"text-sm bg-transparent text-foreground border border-input rounded-md px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.Uf.map(e=>(0,n.jsx)("option",{value:e,children:o("displaySize.".concat(e))},e))})]})}},41898:(e,t,r)=>{r.d(t,{m_:()=>l});var n=r(95155),s=r(12115),a=r(47650);function i(e,t,r){return Math.min(Math.max(e,4),Math.max(4,r-t-4))}let o={top:-9999,left:-9999};function l(e){let{content:t,placement:r="right",delay:l=100,children:c}=e,[d,u]=(0,s.useState)(!1),[m,f]=(0,s.useState)(null),h=(0,s.useRef)(null),p=(0,s.useRef)(null),x=(0,s.useRef)(null),g=(0,s.useCallback)(()=>{null!==x.current&&(clearTimeout(x.current),x.current=null)},[]),b=(0,s.useCallback)(()=>{g(),x.current=setTimeout(()=>{u(!0),x.current=null},l)},[l,g]),v=(0,s.useCallback)(()=>{g(),u(!1),f(null)},[g]),y=(0,s.useCallback)(()=>{let e=h.current,t=p.current;if(!e||!t)return;let n=e.getBoundingClientRect(),s=t.getBoundingClientRect();f(function(e,t,r,n){let s,a,o=t.left+t.width/2-r.width/2,l=t.top+t.height/2-r.height/2;switch(e){case"top":s=t.top-r.height-8,a=o;break;case"bottom":s=t.top+t.height+8,a=o;break;case"left":s=l,a=t.left-r.width-8;break;default:s=l,a=t.left+t.width+8}return{top:i(s,r.height,n.height),left:i(a,r.width,n.width)}}(r,{top:n.top,left:n.left,width:n.width,height:n.height},{width:s.width,height:s.height},{width:window.innerWidth,height:window.innerHeight}))},[r]);return(0,s.useLayoutEffect)(()=>{if(d)return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[d,y]),(0,s.useEffect)(()=>()=>{g()},[g]),(0,n.jsxs)("span",{ref:h,"data-testid":"tooltip-wrapper",className:"relative inline-flex",tabIndex:-1,onMouseEnter:b,onMouseLeave:v,children:[c,d&&"undefined"!=typeof document&&(0,a.createPortal)((0,n.jsx)("span",{ref:p,role:"tooltip","aria-hidden":"true","data-placement":r,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!=m?m:o,children:t}),document.body)]})}},54014:(e,t,r)=>{r.d(t,{Ab:()=>s,NL:()=>x,O6:()=>f,XH:()=>n,f_:()=>u,hR:()=>c,lu:()=>h,n6:()=>o,oo:()=>d,pQ:()=>a,sw:()=>m,vz:()=>p});let n=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity"],s=10,a=50,i=/^[a-zA-Z0-9_-]+$/;function o(e){return"string"==typeof e&&e.length>0&&e.length<=64&&i.test(e)}let l={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity"};function c(e){return n.includes(e)}function d(e){var t;return null!=(t=l[e])?t:e}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assistant";return e&&c(e)?d(e):t}function m(e){let t=e.alias;return"string"==typeof t&&t.trim().length>0?t:d(e.cliTool)}function f(e,t,r){let n=e.find(e=>e.id===t);return n?m(n):d(r)}function h(e){return e.map((e,t)=>({id:e,cliTool:e,alias:d(e),order:t}))}let p=128,x=2097152},55142:(e,t,r)=>{r.d(t,{A7:()=>i,XK:()=>l,dw:()=>o,kA:()=>a});var n=r(54014),s=r(63001);function a(e){return e?e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isRunning?"ready":"idle":"idle"}function i(e){if(!e)return"idle";let t=Object.values(e).filter(e=>void 0!==e);return 0===t.length?"idle":t.includes("waiting")?"waiting":t.includes("running")?"running":t.includes("generating")?"generating":t.includes("ready")?"ready":"idle"}function o(e,t){return e?Object.entries(e).map(e=>{var r;let[s,a]=e;return"".concat(null!=(r=null==t?void 0:t[s])?r:(0,n.f_)(s,s),": ").concat(null!=a?a:"idle")}).join(", "):""}function l(e){var t,r,i,o;let l=a(void 0!==e.isSessionRunning?{isRunning:null!=(t=e.isSessionRunning)&&t,isWaitingForResponse:null!=(r=e.isWaitingForResponse)&&r,isProcessing:null!=(i=e.isProcessing)&&i}:void 0),c=!!e.lastAssistantMessageAt&&(!e.lastViewedAt||new Date(e.lastAssistantMessageAt)>new Date(e.lastViewedAt)),{cliStatus:d,cliStatusLabels:u}=function(e){var t,r,i;let o={},l={},c=e.sessionStatusByInstance;if(!c){for(let i of null!=(t=e.selectedAgents)?t:s.fJ)o[i]=a(null==(r=e.sessionStatusByCli)?void 0:r[i]),l[i]=(0,n.oo)(i);return{cliStatus:o,cliStatusLabels:l}}let d=e.agentInstances&&e.agentInstances.length>0?e.agentInstances:(0,n.lu)(null!=(i=e.selectedAgents)?i:s.fJ),u=new Set;for(let e of d)u.add(e.id),o[e.id]=a(c[e.id]),l[e.id]=(0,n.sw)(e);for(let[e,t]of Object.entries(c)){if(u.has(e))continue;let r=a(t);"idle"!==r&&(o[e]=r,l[e]=function(e){let t=n.XH.find(t=>e.startsWith("".concat(t,"-")));if(t){let r=e.slice(t.length+1);return"".concat((0,n.oo)(t)," ").concat(r)}return(0,n.f_)(e,e)}(e))}return{cliStatus:o,cliStatusLabels:l}}(e);return{id:e.id,name:e.name,repositoryName:null!=(o=e.repositoryDisplayName)?o:e.repositoryName,status:l,hasUnread:c,lastActivity:e.updatedAt,description:e.description,cliStatus:d,cliStatusLabels:u,worktreePath:e.path}}},63001:(e,t,r)=>{r.d(t,{fJ:()=>n}),r(54014);let n=["claude","codex","gemini","opencode","copilot","antigravity"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4560],{4560:(e,t,r)=>{r.d(t,{GV:()=>tr});var n=r(95155),s=r(12115),a=r(20063),i=r(52619),o=r.n(i),l=r(89275);let c=(0,s.forwardRef)(function(e,t){let{href:r,onClick:s,target:i,...c}=e,d=(0,a.usePathname)(),u=(0,l.Hq)();return(0,n.jsx)(o(),{ref:t,href:r,target:i,onClick:e=>{var t;null==s||s(e),e.defaultPrevented||0!==(t=e).button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||void 0!==i&&"_self"!==i||/^([a-z][a-z0-9+.-]*:)?\/\//i.test(r)||/^(mailto:|tel:)/i.test(r)||(e.preventDefault(),r!==d&&u.push(r))},...c})});var d=r(18955),u=r(59847),m=r(86651),f=r(94684),h=r(34681),p=r(5379),x=r(59427),g=r(37494);function b(){let{theme:e,setTheme:t}=(0,p.D)(),[r,a]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{a(!0)},[]),!r)return(0,n.jsx)("div",{"data-testid":"theme-toggle-placeholder",className:"w-8 h-8","aria-hidden":"true"});let i="dark"===e;return(0,n.jsx)("button",{"data-testid":"theme-toggle",onClick:()=>t(i?"light":"dark"),className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus:outline-none focus:ring-2 focus:ring-ring","aria-label":i?"Switch to light mode":"Switch to dark mode",title:i?"Switch to light mode":"Switch to dark mode",children:i?(0,n.jsx)(x.A,{className:"w-5 h-5","data-testid":"theme-icon-sun"}):(0,n.jsx)(g.A,{className:"w-5 h-5","data-testid":"theme-icon-moon"})})}var v=r(63365);function y(){let{status:e}=(0,v.xM)(),t=(0,d.c)("common");if("connected"===e)return null;let r="connecting"===e,s=t(r?"connection.reconnecting":"connection.offline");return(0,n.jsxs)("span",{"data-testid":"connection-status-indicator",role:"status","aria-live":"polite",title:t(r?"connection.reconnectingTooltip":"connection.offlineTooltip"),className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-0.5 text-xs text-muted-foreground",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:["w-1.5 h-1.5 rounded-full",r?"bg-warning motion-safe:animate-pulse":"bg-muted-foreground"].join(" ")}),s]})}var j=r(79651),w=r(92614);let k=[{labelKey:"nav.home",href:"/",isActive:e=>"/"===e},{labelKey:"nav.chat",href:"/chat",isActive:e=>e.startsWith("/chat")},{labelKey:"nav.sessions",href:"/sessions",isActive:e=>e.startsWith("/sessions")},{labelKey:"nav.repositoriesShort",href:"/repositories",isActive:e=>e.startsWith("/repositories")},{labelKey:"nav.reviewReport",href:"/review",isActive:e=>e.startsWith("/review")},{labelKey:"nav.more",href:"/more",isActive:e=>e.startsWith("/more")}];function N(e){let{title:t="CommandMate"}=e,r=(0,a.usePathname)(),i=(0,d.c)("commandPalette"),o=(0,d.c)("common"),{setOpen:l}=(0,w.C)(),[p,x]=s.useState(null);return s.useEffect(()=>{x("undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform||"")?"⌘":"Ctrl")},[]),(0,n.jsx)("header",{className:"sticky top-0 z-50 border-b border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md",children:(0,n.jsx)("div",{className:"container-custom",children:(0,n.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,n.jsx)("div",{className:"flex items-center space-x-4",children:(0,n.jsxs)(c,{href:"/",className:"flex items-center space-x-2 hover:opacity-80 transition-opacity",children:[(0,n.jsx)("div",{className:"w-8 h-8 bg-accent-600 rounded-lg flex items-center justify-center",children:(0,n.jsx)(u.A,{size:20,strokeWidth:2,className:"text-white","aria-hidden":"true"})}),(0,n.jsx)("h1",{className:"text-xl font-bold text-foreground",children:t})]})}),(0,n.jsxs)("nav",{className:"flex items-center space-x-6",role:"navigation",children:[k.map(e=>{let t=e.isActive(r);return(0,n.jsx)(c,{href:e.href,"aria-current":t?"page":void 0,className:"relative py-1 text-sm font-medium transition-colors after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-accent-600 dark:after:bg-accent-400 after:origin-center motion-safe:after:transition-transform after:duration-200 after:ease-[var(--motion-ease-out)] ".concat(t?"text-accent-600 dark:text-accent-400 after:scale-x-100":"text-muted-foreground hover:text-foreground after:scale-x-0"),children:o(e.labelKey)},e.href)}),(0,n.jsxs)("button",{type:"button","data-testid":"header-command-palette-trigger",onClick:()=>l(!0),"aria-label":i("mobileTrigger"),className:"hidden md:inline-flex items-center gap-2 rounded-md border border-border bg-surface px-2.5 py-1.5 text-sm text-muted-foreground hover:bg-surface-2 transition-colors",children:[(0,n.jsx)(m.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0"}),(0,n.jsx)("span",{children:i("searchAction")}),p&&(0,n.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(j.u,{children:p}),(0,n.jsx)(j.u,{children:"K"})]})]}),(0,n.jsx)(y,{}),(0,n.jsx)(h.g,{}),(0,n.jsx)(b,{}),(0,n.jsxs)("a",{href:"https://github.com/kewton/MyCodeBranchDesk",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors flex items-center space-x-1",children:[(0,n.jsx)(f.A,{size:20,strokeWidth:2,"aria-hidden":"true"}),(0,n.jsx)("span",{children:"GitHub"})]})]})]})})})}var S=r(32916),C=r(38218);let A={showSidebar:!0,showGlobalNav:!0,showLocalNav:!1,autoCollapseSidebar:!1},M=[{prefix:"/worktrees/",config:{showGlobalNav:!1,showLocalNav:!0}},{prefix:"/sessions",config:{autoCollapseSidebar:!0}}];var E=r(22592),L=r(85710),R=r(17787),z=r(49027),B=r(27587),D=r(39649),T=r(47650),W=r(55142),P=r(48481);let K=(0,s.memo)(function(e){let{status:t,label:r}=e;return(0,n.jsx)(P.m,{"data-testid":"status-indicator",status:t,label:r,size:"lg"})});function I(e,t,r){let n=r-8-t;return n<=8?8:Math.min(Math.max(e,8),n)}function _(e){let{id:t,branch:r,isVisible:a,anchorRef:i}=e,[o,l]=(0,s.useState)({top:-9999,left:-9999}),c=(0,s.useRef)(null);if((0,s.useEffect)(()=>{var e,t,r;if(!a||!i.current)return;let n=i.current.getBoundingClientRect(),s=null==(e=c.current)?void 0:e.getBoundingClientRect(),o=null!=(t=null==s?void 0:s.width)?t:0,d=null!=(r=null==s?void 0:s.height)?r:0,u=window.innerWidth,m=window.innerHeight,f=n.right+8;if(f+o>u-8){let e=n.left-8-o;e>=8&&(f=e)}l({top:I(n.top,d,m),left:I(f,o,u)})},[a,i]),"undefined"==typeof document||!a)return null;let d=Math.min(384,Math.max(0,window.innerWidth-16));return T.createPortal((0,n.jsxs)("div",{ref:c,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:o.top,left:o.left,maxWidth:d},children:[(0,n.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:r.name}),(0,n.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:r.repositoryName}),(0,n.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",r.status]}),r.worktreePath&&(0,n.jsx)("p",{className:"text-sidebar-muted truncate",children:r.worktreePath}),r.description&&(0,n.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:r.description})]}),document.body)}let O=0,F=(0,s.memo)(function(e){let{branch:t,isSelected:r,onClick:a,showRepositoryName:i=!0}=e,o=(0,d.c)("common"),l="tooltip-".concat(t.id),c=(0,s.useRef)(null),[u,m]=(0,s.useState)(!1),f=(0,s.useRef)(null),h=(0,s.useCallback)(()=>{null!==f.current&&(clearTimeout(f.current),f.current=null)},[]);(0,s.useEffect)(()=>()=>h(),[h]);let p=u&&!r;return(0,s.useEffect)(()=>{r&&m(!1)},[r]),(0,s.useEffect)(()=>{if(!u)return;let e=()=>m(!1);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[u]),(0,n.jsxs)("button",{ref:c,"data-testid":"branch-list-item",onClick:()=>{h(),O=Date.now()+400,m(!1),a()},onMouseEnter:()=>{h(),Date.now()>=O&&(f.current=setTimeout(()=>{m(!0)},150))},onMouseLeave:()=>{h(),m(!1)},onFocus:e=>{h(),e.target.matches(":focus-visible")&&(f.current=setTimeout(()=>{m(!0)},150))},onBlur:()=>{h(),m(!1)},"aria-current":r?"true":void 0,"aria-describedby":p?l:void 0,"aria-label":i?void 0:"".concat(t.name," - ").concat(t.repositoryName),className:"\n group relative w-full px-4 py-3 flex flex-col gap-1\n hover:bg-sidebar-hover transition-colors\n focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring\n ".concat(r?"bg-sidebar-hover border-l-2 border-accent-500":"border-l-2 border-transparent","\n "),children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[t.cliStatus&&Object.keys(t.cliStatus).length>0&&(0,n.jsx)("div",{className:"flex items-center justify-center flex-shrink-0 w-4","aria-label":o("branchItem.cliToolStatus"),children:(0,n.jsx)(K,{status:(0,W.A7)(t.cliStatus),label:(0,W.dw)(t.cliStatus,t.cliStatusLabels)})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-sidebar-foreground truncate",children:t.name}),i&&(0,n.jsx)("p",{className:"text-xs text-sidebar-muted truncate",children:t.repositoryName})]}),t.hasUnread&&(0,n.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-accent-500 flex-shrink-0","aria-label":o("branchItem.hasUnread")})]}),t.description&&(0,n.jsx)("div",{"data-testid":"branch-description",className:"pl-6 pr-2 mt-1 text-left",children:(0,n.jsx)("p",{className:"text-xs text-sidebar-muted line-clamp-2",children:t.description})}),(0,n.jsx)(_,{id:l,branch:t,isVisible:p,anchorRef:c})]})});var V=r(41898);function H(e,t,r){if(t<=0||r<=0)return 0;let n=e+t+8-r;return n>0?-Math.min(n,Math.max(0,e-8)):e<8?8-e:0}let G=(0,s.memo)(function(e){var t;let{sortKey:r,sortDirection:a,onSortKeyChange:i,onSortDirectionChange:o,options:l,defaultDirections:c,compact:u,tooltip:m,iconClassName:f="w-3 h-3"}=e,h=(0,d.c)("common"),[p,x]=(0,s.useState)(!1),g=(0,s.useRef)(null),b=(0,s.useRef)(null),v=(0,s.useRef)({x:0,y:0}),[y,j]=(0,s.useState)({x:0,y:0});(0,s.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&x(!1)}if(p)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]),(0,s.useEffect)(()=>{function e(e){"Escape"===e.key&&x(!1)}if(p)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p]),(0,s.useLayoutEffect)(()=>{let e=e=>{v.current=e,j(t=>t.x===e.x&&t.y===e.y?t:e)};if(!p)return void e({x:0,y:0});let t=b.current;if(!t)return;let r=t.getBoundingClientRect();e({x:H(r.left-v.current.x,r.width,window.innerWidth),y:H(r.top-v.current.y,r.height,window.innerHeight)})},[p]);let w=(0,s.useCallback)(()=>{x(e=>!e)},[]),k=(0,s.useCallback)(e=>{if(e===r)o("asc"===a?"desc":"asc");else{var t;i(e),o(null!=(t=null==c?void 0:c[e])?t:"asc")}x(!1)},[r,a,i,o,c]),N=(0,s.useCallback)(()=>{o("asc"===a?"desc":"asc")},[a,o]),S=(null==(t=l.find(e=>e.key===r))?void 0:t.label)||"Sort",C=(0,n.jsxs)("button",{type:"button",onClick:w,"aria-expanded":p,"aria-haspopup":"listbox","aria-label":"Sort by ".concat(S),className:" flex items-center gap-1 px-2 py-1 rounded text-xs text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:[(0,n.jsx)(J,{className:f}),(0,n.jsx)("span",{className:u?"hidden":"hidden sm:inline",children:S})]});return(0,n.jsxs)("div",{ref:g,className:"relative","data-testid":"sort-selector-base",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[m?(0,n.jsx)(V.m_,{content:m,placement:"bottom",children:C}):C,(0,n.jsx)("button",{type:"button",onClick:N,"aria-label":"asc"===a?"Sort ascending":"Sort descending",className:" p-1 rounded text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:"asc"===a?(0,n.jsx)(X,{className:f}):(0,n.jsx)(U,{className:f})})]}),p&&(0,n.jsx)("div",{ref:b,role:"listbox","aria-label":h("sort.options"),className:" absolute right-0 top-full mt-1 z-50 min-w-[140px] py-1 rounded-md shadow-lg bg-sidebar border border-sidebar-border ",style:0!==y.x||0!==y.y?{transform:"translate(".concat(y.x,"px, ").concat(y.y,"px)")}:void 0,children:l.map(e=>(0,n.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.key,onClick:()=>k(e.key),className:"\n w-full px-3 py-2 text-left text-sm\n flex items-center justify-between\n hover:bg-sidebar-hover transition-colors\n ".concat(r===e.key?"text-accent-700 dark:text-accent-400":"text-sidebar-muted","\n "),children:[(0,n.jsx)("span",{children:e.label}),r===e.key&&(0,n.jsx)("span",{className:"text-xs",children:"asc"===a?"ASC":"DESC"})]},e.key))})]})});function J(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}function X(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}function U(e){let{className:t}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}let q=[{key:"updatedAt",labelKey:"sort.updatedAt"},{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"branchName",labelKey:"sort.branchName"},{key:"status",labelKey:"sort.status"}],Z={updatedAt:"desc"},$=(0,s.memo)(function(){let{sortKey:e,sortDirection:t,setSortKey:r,setSortDirection:a}=(0,S.VF)(),i=(0,d.c)("common"),o=(0,s.useMemo)(()=>q.map(e=>{let{key:t,labelKey:r}=e;return{key:t,label:i(r)}}),[i]);return(0,n.jsx)(G,{sortKey:e,sortDirection:t,onSortKeyChange:r,onSortDirectionChange:a,options:o,defaultDirections:Z,compact:!0,tooltip:i("tooltips.sort"),iconClassName:"w-4 h-4"})});var Q=r(744),Y=r(30061),ee=r(36809);let et=["en","ja"],er={en:"English",ja:"日本語"};function en(){return{currentLocale:(0,ee.Ym)(),switchLocale:e=>{if(et.includes(e)){let t="https:"===window.location.protocol;document.cookie="".concat("locale","=").concat(e,";path=/;max-age=").concat(31536e3,";SameSite=Lax").concat(t?";Secure":""),localStorage.setItem("locale",e),window.location.reload()}}}}function es(){let{currentLocale:e,switchLocale:t}=en(),r=(0,d.c)("common");return(0,n.jsx)("select",{value:e,onChange:e=>t(e.target.value),"data-testid":"locale-switcher","aria-label":r("language"),className:" w-full px-3 py-2 rounded-md bg-sidebar text-sidebar-foreground border border-sidebar-border focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent text-sm ",children:et.map(e=>(0,n.jsx)("option",{value:e,children:er[e]},e))})}var ea=r(65380);function ei(){let e=(0,d.c)("auth"),t=(0,ea.H)(),[r,a]=(0,s.useState)(!1);if(!t)return null;async function i(){a(!0);try{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"}catch(e){window.location.href="/login"}}return(0,n.jsx)("button",{type:"button",onClick:i,disabled:r,"data-testid":"logout-button",className:" w-full px-3 py-2 text-sm text-left rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 transition-colors ",children:r?"...":e("logout.button")})}var eo=r(94442),el=r(80344),ec=r(7636);let ed="mcbd-sidebar-group-collapsed",eu="mcbd-sidebar-scroll-top",em="mcbd-sidebar-group-order-cache",ef="w-4 h-4",eh=0;function ep(){try{let e=localStorage.getItem(em);if(!e)return[];let t=function(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e).slice(0,500)}catch(e){return[]}}(e);return t.length,t}catch(e){return[]}}function ex(e){try{localStorage.setItem(em,JSON.stringify(e))}catch(e){}}let eg=(0,s.memo)(function(){var e,t;let r=(0,l.Hq)(),{worktrees:a,repositories:i,selectedWorktreeId:c,selectWorktree:u,refreshWorktrees:m}=(0,D.$f)(),{closeMobileDrawer:f,sortKey:h,sortDirection:p,viewMode:x,setViewMode:g}=(0,S.VF)(),v=(0,d.c)("common"),[y,j]=(0,s.useState)(""),w=(0,s.useRef)(null),[k,N]=(0,s.useState)(()=>{try{let e=localStorage.getItem(ed);return e?function(e){try{let t=JSON.parse(e);if("object"!=typeof t||null===t||Array.isArray(t))return{};let r={},n=0;for(let[e,s]of Object.entries(t))if(!ev.has(e)&&"boolean"==typeof s){if(++n>100)break;r[e]=s}return r}catch(e){return{}}}(e):{}}catch(e){return{}}}),[C,A]=(0,s.useState)(ep),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{M.current||(M.current=!0,fetch("/api/sidebar/group-order").then(e=>e.json()).then(e=>{e.success&&Array.isArray(e.order)&&(A(e.order),ex(e.order))}).catch(()=>{}))},[]);let E=(0,s.useMemo)(()=>(0,ec.UZ)(i),[i]),B=(0,s.useMemo)(()=>(0,ec.s6)(a,E),[a,E]),T=(0,s.useMemo)(()=>B.map(W.XK),[B]),P=(0,s.useDeferredValue)(T),K=(0,s.useRef)(null),I=(0,s.useRef)(null);(0,s.useEffect)(()=>()=>{null!==I.current&&clearTimeout(I.current)},[]);let _=(0,s.useMemo)(()=>{let e=K.current;return!e||Date.now()>=e.expiresAt?P:e.items},[P]),O=(0,s.useRef)(_);(0,s.useLayoutEffect)(()=>{O.current=_});let H=(0,s.useCallback)(()=>{null!==I.current&&(clearTimeout(I.current),I.current=null);let e=K.current;if(e&&Date.now()<e.expiresAt){K.current={...e,expiresAt:1/0};return}K.current={items:O.current,expiresAt:1/0}},[]),G=(0,s.useCallback)(()=>{K.current&&(K.current={...K.current,expiresAt:Date.now()+1e3},null!==I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{K.current=null},1e3))},[]),{sortedItems:J,groupedItems:X}=function(e){let{items:t,sortKey:r,sortDirection:n,viewMode:a,filterText:i}=e,o=(0,s.useMemo)(()=>{if(!i)return t;let e=i.toLowerCase();return t.filter(t=>t.name.toLowerCase().includes(e)||t.repositoryName.toLowerCase().includes(e))},[t,i]);return{sortedItems:(0,s.useMemo)(()=>(0,ec.Xn)(o,r,n),[o,r,n]),groupedItems:(0,s.useMemo)(()=>"grouped"===a?(0,ec._s)(o,r,n):[],[o,r,n,a])}}({items:_,sortKey:h,sortDirection:p,viewMode:x,filterText:y}),U=(0,s.useMemo)(()=>{if("grouped"!==x||!X)return null;if(y.trim()||0===C.length)return X;let e=new Map(C.map((e,t)=>[e,t]));return[...X].sort((t,r)=>{let n=e.has(t.repositoryName)?e.get(t.repositoryName):1/0,s=e.has(r.repositoryName)?e.get(r.repositoryName):1/0;return n===s?t.repositoryName.localeCompare(r.repositoryName):n-s})},[x,X,C,y]),q="grouped"===x?U:null;(0,s.useEffect)(()=>{try{localStorage.setItem(ed,JSON.stringify(k))}catch(e){}},[k]);let Z=(0,s.useCallback)(e=>{N(t=>({...t,[e]:!t[e]}))},[]),Y=(0,s.useCallback)(()=>{var e,t,r=null!=(t=null==(e=w.current)?void 0:e.scrollTop)?t:0;let n=Number.isFinite(r)&&r>0?r:0;eh=n;try{localStorage.setItem(eu,String(n))}catch(e){}},[]),ee=J.length>0||(null!=(e=null==q?void 0:q.length)?e:0)>0;(0,s.useEffect)(()=>{let e=w.current;if(!e)return;let t=window.requestAnimationFrame(()=>{e.scrollTop=function(){try{let e=localStorage.getItem(eu);if(!e)return eh=0,0;let t=Number(e);Number.isFinite(t)&&t>=0&&(eh=t)}catch(e){}return eh}()});return()=>{window.cancelAnimationFrame(t)}},[ee,x]);let et=(0,s.useCallback)(e=>{Y(),u(e),r.push("/worktrees/".concat(e)),f()},[Y,u,r,f]),er=(0,R.FR)((0,R.MS)(R.AN,{activationConstraint:{distance:8}})),en=(0,s.useCallback)(e=>{let{active:t,over:r}=e;if(!r||t.id===r.id||!q)return;let n=q.map(e=>e.repositoryName),s=n.indexOf(String(t.id)),a=n.indexOf(String(r.id));if(-1===s||-1===a)return;let i=(0,z.be)(n,s,a);A(i),ex(i),fetch("/api/sidebar/group-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:i})}).catch(()=>{A(n),ex(n)})},[q]),ea="flat"===x?0===J.length:(null!=(t=null==q?void 0:q.length)?t:0)===0;return(0,n.jsxs)("nav",{"data-testid":"sidebar","aria-label":v("sidebar.branchNavigation"),className:"h-full flex flex-col bg-sidebar text-sidebar-foreground",role:"navigation",children:[(0,n.jsx)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 px-4 py-4 border-b border-sidebar-border",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[(0,n.jsx)("h2",{className:"min-w-0 truncate text-lg font-semibold text-sidebar-foreground",children:v("sidebar.branches")}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,n.jsx)(ej,{viewMode:x,onToggle:g}),(0,n.jsx)($,{}),(0,n.jsx)(eA,{refreshWorktrees:m}),(0,n.jsx)(V.m_,{content:v("tooltips.repositories"),placement:"bottom",children:(0,n.jsx)(o(),{href:"/repositories","aria-label":v("nav.repositories"),className:"p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors inline-flex items-center",children:(0,n.jsx)(L.A,{className:ef,"aria-hidden":"true"})})})]})]})}),(0,n.jsx)("div",{className:"flex-shrink-0 px-4 py-3 border-b border-sidebar-border",children:(0,n.jsx)(Q.pd,{type:"text",placeholder:v("sidebar.searchBranches"),value:y,onChange:e=>j(e.target.value),className:"bg-background shadow-none"})}),(0,n.jsx)("div",{ref:w,"data-testid":"branch-list",onScroll:Y,onMouseEnter:H,onMouseLeave:G,className:"flex-1 overflow-y-auto overflow-x-hidden",children:ea?(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sidebar-muted",children:v(y?"sidebar.noBranchesFound":"sidebar.noBranchesAvailable")}):"grouped"===x&&q?(0,n.jsx)(R.Mp,{sensors:er,collisionDetection:R.fp,onDragEnd:en,children:(0,n.jsx)(z.gB,{items:q.map(e=>e.repositoryName),strategy:z._G,children:q.map(e=>{let t=!k[e.repositoryName]||!!y.trim();return(0,n.jsx)(eb,{group:e,isExpanded:t,selectedWorktreeId:c,onToggle:()=>Z(e.repositoryName),onBranchClick:et,isDragDisabled:!!y.trim()},e.repositoryName)})})}):J.map(e=>(0,n.jsx)(F,{branch:e,isSelected:e.id===c,onClick:()=>et(e.id)},e.id))}),(0,n.jsxs)("div",{className:"flex-shrink-0 px-4 py-3 border-t border-sidebar-border space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(es,{})}),(0,n.jsx)(b,{})]}),(0,n.jsx)(ei,{})]})]})});function eb(e){let{group:t,isExpanded:r,selectedWorktreeId:s,onToggle:a,onBranchClick:i,isDragDisabled:o}=e,{attributes:l,listeners:c,setNodeRef:d,setActivatorNodeRef:u,transform:m,transition:f,isDragging:h}=(0,z.gl)({id:t.repositoryName,disabled:o}),p={transform:B.Ks.Transform.toString(m),transition:f,opacity:h?.5:1};return(0,n.jsxs)("div",{ref:d,style:p,className:"w-full min-w-0",children:[(0,n.jsx)(ey,{repositoryName:t.repositoryName,branchCount:t.branches.length,isExpanded:r,onClick:a,dragHandleRef:u,dragHandleListeners:o?void 0:c,dragHandleAttributes:o?void 0:l}),r&&t.branches.map(e=>(0,n.jsx)(F,{branch:e,isSelected:e.id===s,onClick:()=>i(e.id),showRepositoryName:!1},e.id))]})}let ev=new Set(["__proto__","constructor","prototype"]);function ey(e){let{repositoryName:t,branchCount:r,isExpanded:s,onClick:a,dragHandleRef:i,dragHandleListeners:o,dragHandleAttributes:l}=e,c=(0,d.c)("common");return(0,n.jsxs)("div",{className:"flex items-center w-full",children:[o&&(0,n.jsx)("div",{ref:i,...o,...l,"aria-label":c("sidebar.dragToReorderGroup"),className:" flex-shrink-0 flex items-center justify-center w-6 h-full pl-2 cursor-grab active:cursor-grabbing text-sidebar-muted hover:text-sidebar-foreground transition-colors ",children:(0,n.jsx)(eS,{})}),(0,n.jsxs)("button",{"data-testid":"group-header",type:"button",onClick:a,"aria-expanded":s,className:" flex-1 min-w-0 flex items-center gap-2 px-2 py-2 text-xs font-semibold text-sidebar-muted uppercase tracking-wider focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring transition-colors ",children:[(0,n.jsx)(ew,{isExpanded:s}),(0,n.jsx)(ek,{color:(0,ec.LV)(t)}),(0,n.jsx)(Y.nR,{content:t,className:"flex-1 min-w-0 text-left truncate",children:t}),(0,n.jsx)("span",{className:"text-sidebar-muted font-normal tabular-nums pr-2",children:r})]})]})}function ej(e){let{viewMode:t,onToggle:r}=e,s=(0,d.c)("common");return(0,n.jsx)(V.m_,{content:s("tooltips.viewMode"),placement:"bottom",children:(0,n.jsx)("button",{"data-testid":"view-mode-toggle",type:"button",onClick:()=>{r("grouped"===t?"flat":"grouped")},"aria-label":s("grouped"===t?"sidebar.switchToFlatView":"sidebar.switchToGroupedView"),className:" p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors ",children:"grouped"===t?(0,n.jsx)(eN,{className:ef}):(0,n.jsx)(ek,{className:ef})})})}function ew(e){let{isExpanded:t}=e;return(0,n.jsx)("svg",{className:"w-3 h-3 flex-shrink-0 transition-transform ".concat(t?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function ek(e){let{className:t="w-3.5 h-3.5",color:r}=e;return(0,n.jsx)("svg",{className:"".concat(t," flex-shrink-0"),viewBox:"0 0 24 24",fill:null!=r?r:"none",stroke:r?"none":"currentColor",strokeWidth:2*!r,"aria-hidden":"true",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function eN(e){let{className:t="w-3 h-3"}=e;return(0,n.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}function eS(){return(0,n.jsxs)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"9",cy:"5",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"5",r:"1.5"}),(0,n.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,n.jsx)("circle",{cx:"9",cy:"19",r:"1.5"}),(0,n.jsx)("circle",{cx:"15",cy:"19",r:"1.5"})]})}function eC(e){let{className:t=""}=e;return(0,n.jsx)("svg",{className:"".concat(ef," ").concat(t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L4 4m16 16l-1.64-1.64A9 9 0 014.51 15"})})}let eA=(0,s.memo)(function(e){let{refreshWorktrees:t}=e,[r,a]=(0,s.useState)(!1),i=(0,s.useRef)(!1),{showToast:o}=(0,eo.dj)(),l=(0,d.c)("common"),c=(0,s.useCallback)(async()=>{if(!i.current){i.current=!0,a(!0);try{let e=await el.Rx.sync();await t(),o(l("syncSuccess",{count:e.worktreeCount}),"success",3e3)}catch(e){e instanceof el.hD&&401===e.status?o(l("syncAuthError"),"error",5e3):o(l("syncError"),"error",5e3)}finally{i.current=!1,a(!1)}}},[t,o,l]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(V.m_,{content:l("tooltips.sync"),placement:"bottom",children:(0,n.jsx)("button",{type:"button",onClick:c,disabled:r,"aria-label":l("syncButtonLabel"),className:"p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:(0,n.jsx)(eC,{className:r?"animate-spin":""})})})})});var eM=r(65993),eE=r(37586),eL=r(66685),eR=r(61362),ez=r(37772);let eB=[{labelKey:"nav.home",href:"/",isActive:e=>"/"===e,icon:(0,n.jsx)(eM.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.chat",href:"/chat",isActive:e=>e.startsWith("/chat"),icon:(0,n.jsx)(eE.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.sessions",href:"/sessions",isActive:e=>e.startsWith("/sessions"),icon:(0,n.jsx)(eL.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.review",href:"/review",isActive:e=>e.startsWith("/review"),icon:(0,n.jsx)(eR.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.more",href:"/more",isActive:e=>e.startsWith("/more"),icon:(0,n.jsx)(ez.A,{size:20,"aria-hidden":"true"})}];function eD(){let e=(0,a.usePathname)(),{setOpen:t}=(0,w.C)(),r=(0,d.c)("commandPalette"),s=(0,d.c)("common");return(0,n.jsx)("nav",{"data-testid":"global-mobile-nav",className:"fixed bottom-0 left-0 right-0 z-50 border-t border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md pb-safe",children:(0,n.jsxs)("div",{className:"flex items-center justify-around h-14",children:[eB.map(t=>{let r=t.isActive(e);return(0,n.jsxs)(c,{href:t.href,className:"flex flex-col items-center justify-center flex-1 h-full text-xs transition-colors ".concat(r?"text-accent-600 dark:text-accent-400":"text-muted-foreground hover:text-foreground"),children:[t.icon,(0,n.jsx)("span",{className:"mt-1 whitespace-nowrap",children:s(t.labelKey)})]},t.href)}),(0,n.jsxs)("button",{type:"button","data-testid":"mobile-command-palette-trigger",onClick:()=>t(!0),"aria-label":r("mobileTrigger"),className:"flex flex-col items-center justify-center flex-1 h-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,n.jsx)(m.A,{size:20,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"mt-1 whitespace-nowrap",children:r("mobileLabel")})]})]})})}var eT=r(79698),eW=r(24533),eP=r(95740),eK=r(79451),eI=r(89559),e_=r(97470),eO=r(76482),eF=r(39332),eV=r(87531),eH=r(59854),eG=r(70628),eJ=r(66966),eX=r(68704);let eU=[{key:"home",href:"/"},{key:"chat",href:"/chat"},{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"skills",href:"/skills"},{key:"more",href:"/more"}],eq={home:eM.A,chat:eE.A,sessions:eL.A,repositories:eW.A,review:eR.A,skills:eP.A,more:ez.A},eZ="cm.palette.recents";function e$(e){if(!e||"object"!=typeof e)return!1;let{kind:t,id:r}=e;return("nav"===t||"worktree"===t||"action"===t)&&"string"==typeof r}function eQ(e){return e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isSessionRunning?"ready":"idle"}function eY(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 e0=(0,eV.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"),e1="shrink-0 text-muted-foreground";function e2(){var e,t,r;let{open:i,setOpen:o}=(0,w.C)(),{setOpen:l}=(0,eG.K)(),c=(0,a.useRouter)(),u=(0,d.c)("commandPalette"),h=(0,d.c)("common"),{theme:b,setTheme:v}=(0,p.D)(),{setSize:y,isMobile:k}=(0,E.Ps)(),{currentLocale:N,switchLocale:S}=en(),C=(0,eJ.rC)(),{showToast:A}=(0,eo.dj)(),[M,L]=(0,s.useState)(!1),[R,z]=(0,s.useState)(""),[B,D]=(0,s.useState)([]),W=(0,s.useRef)(null),K=(0,s.useRef)(null),I=(0,s.useRef)(i);(0,s.useEffect)(()=>{I.current=i},[i]),(0,s.useEffect)(()=>{L(!0)},[]),(0,s.useEffect)(()=>{function e(e){if(("k"===e.key||"K"===e.key)&&(e.metaKey||e.ctrlKey)){if(I.current){e.preventDefault(),e.stopPropagation(),o(!1);return}if(eY(e.target))return;e.preventDefault(),o(!0);return}"Escape"===e.key&&I.current&&(e.preventDefault(),e.stopPropagation(),o(!1))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o]),(0,s.useEffect)(()=>{var e,t,r,n;i?(K.current=null!=(t=document.activeElement)?t:null,null==(e=W.current)||e.focus(),z(""),D(function(){try{let e=localStorage.getItem(eZ);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e$).slice(0,8)}catch(e){return[]}}())):K.current&&(null==(r=(n=K.current).focus)||r.call(n),K.current=null)},[i]);let _=(0,s.useCallback)((e,t)=>{t&&D(e=>(function(e,t){let r=e.filter(e=>e.kind!==t.kind||e.id!==t.id),n=[t,...r].slice(0,8);try{localStorage.setItem(eZ,JSON.stringify(n))}catch(e){}return n})(e,t)),o(!1),e()},[o]),O=(0,s.useCallback)(async()=>{try{var e;await el.Rx.sync(),await (null==C||null==(e=C.refresh)?void 0:e.call(C)),A(u("actions.syncSuccess"),"success")}catch(e){A(u("actions.syncError"),"error")}},[C,A,u]),F="dark"===b,V=""===R.trim(),H=null!=(e=null==C?void 0:C.error)?e:null,G=null!=(t=null==C?void 0:C.isLoading)&&t,J=H?[]:null!=(r=null==C?void 0:C.worktrees)?r:[],X=J.length>0,U=!H&&G&&0===J.length,q=[...J].sort((e,t)=>{let r=+!!e.isSessionRunning,n=+!!t.isSessionRunning;if(r!==n)return n-r;let s=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-s}),Z=V?q.slice(0,8):q,$=[{id:"theme",label:F?u("actions.toLight"):u("actions.toDark"),icon:F?x.A:g.A,run:()=>v(F?"light":"dark")},...k?[]:eX.Uf.map(e=>({id:"displaysize:".concat(e),label:"".concat(u("actions.displaySizePrefix"),": ").concat(h("displaySize.".concat(e))),icon:eK.A,run:()=>y(e)})),{id:"sync",label:u("actions.syncRepositories"),icon:eI.A,run:()=>{O()}},{id:"locale",label:u("actions.switchLanguage"),icon:e_.A,run:()=>S("ja"===N?"en":"ja")},{id:"github",label:u("actions.openGitHub"),icon:f.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:u("actions.keyboardShortcuts"),icon:eO.A,run:()=>l(!0)}],Q=V?B.map(e=>{if("nav"===e.kind){let t=eU.find(t=>t.key===e.id);if(!t)return null;let r=eq[t.key],s=h("nav.".concat(t.key));return{id:"nav-".concat(t.key),value:"recent nav ".concat(t.key),node:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(r,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:s})]}),onSelect:()=>_(()=>c.push(t.href),{kind:"nav",id:t.key})}}if("worktree"===e.kind){let t=J.find(t=>t.id===e.id);if(!t)return null;let r=t.repositoryDisplayName||t.repositoryName||"",s=t.branch||t.name;return{id:"worktree-".concat(t.id),value:"recent worktree ".concat(t.id),node:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eF.A,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:s}),r&&(0,n.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:r}),(0,n.jsx)(P.m,{status:eQ(t),size:"sm",className:r?"ml-2":"ml-auto"})]}),onSelect:()=>_(()=>c.push("/worktrees/".concat(t.id)),{kind:"worktree",id:t.id})}}let t=$.find(t=>t.id===e.id);if(!t)return null;let r=t.icon;return{id:"action-".concat(t.id),value:"recent action ".concat(t.id),node:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:t.label})]}),onSelect:()=>_(t.run,{kind:"action",id:t.id})}}).filter(e=>null!==e):[];return M?(0,T.createPortal)((0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:eH.M.MODAL},"data-testid":"command-palette",children:[(0,n.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:()=>o(!1)}),(0,n.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,n.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,eV.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,n.jsxs)(eT.uB,{label:u("title"),className:(0,eV.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,n.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,n.jsx)(m.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,n.jsx)(eT.uB.Input,{ref:W,value:R,onValueChange:z,placeholder:u("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,n.jsxs)(eT.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,n.jsx)(eT.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:u("empty")}),U&&(0,n.jsx)(eT.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:u("loading")}),Q.length>0&&(0,n.jsx)(eT.uB.Group,{heading:u("groups.recent"),children:Q.map(e=>(0,n.jsx)(eT.uB.Item,{value:e.value,onSelect:e.onSelect,className:e0,children:e.node},e.id))}),(0,n.jsx)(eT.uB.Group,{heading:u("groups.navigation"),children:eU.map(e=>{let t=h("nav.".concat(e.key)),r=eq[e.key];return(0,n.jsxs)(eT.uB.Item,{value:"nav ".concat(t," ").concat(e.href),onSelect:()=>_(()=>c.push(e.href),{kind:"nav",id:e.key}),className:e0,children:[r&&(0,n.jsx)(r,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:t})]},e.key)})}),X&&(0,n.jsx)(eT.uB.Group,{heading:u("groups.worktrees"),children:Z.map(e=>{let t=e.repositoryDisplayName||e.repositoryName||"",r=e.branch||e.name;return(0,n.jsxs)(eT.uB.Item,{value:"worktree ".concat(t," ").concat(r," ").concat(e.name," ").concat(e.id),onSelect:()=>_(()=>c.push("/worktrees/".concat(e.id)),{kind:"worktree",id:e.id}),className:e0,children:[(0,n.jsx)(eF.A,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:r}),t&&(0,n.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:t}),(0,n.jsx)(P.m,{status:eQ(e),size:"sm",className:t?"ml-2":"ml-auto"})]},e.id)})}),(0,n.jsx)(eT.uB.Group,{heading:u("groups.actions"),children:$.map(e=>{let t=e.icon;return(0,n.jsxs)(eT.uB.Item,{value:"action ".concat(e.id," ").concat(e.label),onSelect:()=>_(e.run,{kind:"action",id:e.id}),className:e0,children:[(0,n.jsx)(t,{size:16,className:e1,"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:e.label})]},e.id)})})]}),(0,n.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,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"↑"}),(0,n.jsx)(j.u,{children:"↓"}),u("footer.navigate")]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"↵"}),u("footer.select")]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(j.u,{children:"esc"}),u("footer.close")]})]})]})})})]})}),document.body):null}var e4=r(94465);let e5=["global","terminal","composer"],e9=[{id:"commandPalette",keys:["MOD","K"],scope:"global"},{id:"keyboardHelp",keys:["?"],scope:"global"},{id:"closeOverlay",keys:["Esc"],scope:"global"},{id:"navigateList",keys:["↑","↓"],scope:"global"},{id:"terminalSearch",keys:["MOD","F"],scope:"terminal"},{id:"sendMessage",keys:["↵"],scope:"composer"},{id:"composerNewline",keys:["Shift","↵"],scope:"composer"}];function e6(){let{open:e,setOpen:t}=(0,eG.K)(),{open:r}=(0,w.C)(),a=(0,d.c)("keyboardShortcuts"),[i,o]=(0,s.useState)(!1);(0,s.useEffect)(()=>o(function(){if("undefined"==typeof navigator)return!1;let e=navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)}()),[]);let l=(0,s.useRef)(e);(0,s.useEffect)(()=>{l.current=e},[e]);let c=(0,s.useRef)(r);(0,s.useEffect)(()=>{c.current=r},[r]),(0,s.useEffect)(()=>{function e(e){"?"!==e.key||e.isComposing||229===e.keyCode||eY(e.target)||c.current||l.current||(e.preventDefault(),t(!0))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e9;return e5.map(t=>({scope:t,shortcuts:e.filter(e=>e.scope===t)})).filter(e=>e.shortcuts.length>0)}();return(0,n.jsx)(e4.a,{isOpen:e,onClose:()=>t(!1),title:a("title"),size:"md",children:(0,n.jsx)("div",{"data-testid":"keyboard-shortcuts-overlay",className:"space-y-6",children:u.map(e=>{let{scope:t,shortcuts:r}=e;return(0,n.jsxs)("section",{"data-testid":"keyboard-shortcuts-scope-".concat(t),children:[(0,n.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:a("scopes.".concat(t))}),(0,n.jsx)("ul",{className:"divide-y divide-border",children:r.map(e=>(0,n.jsxs)("li",{"data-testid":"keyboard-shortcut-".concat(e.id),className:"flex items-center justify-between gap-4 py-2",children:[(0,n.jsx)("span",{className:"text-sm text-foreground",children:a("shortcuts.".concat(e.id))}),(0,n.jsx)("span",{className:"flex flex-shrink-0 items-center gap-1",children:e.keys.map((e,t)=>(0,n.jsx)(j.u,{children:"MOD"===e?i?"⌘":"Ctrl":e},t))})]},e.id))})]},t)})})})}var e3=r(52056),e8=r(65229),e7=r(52703);function te(){let e=(0,d.c)("common"),[t,r]=(0,s.useState)(null),[a,i]=(0,s.useState)(null),o=(0,s.useCallback)(e=>{if(e.type!==e7.Oo)return;let{serverVersion:t,clientVersion:n}=e;"string"==typeof t&&"string"==typeof n&&t&&n&&t!==a&&r({serverVersion:t,clientVersion:n})},[a]);(0,v.T3)(o);let l=(0,s.useCallback)(()=>{window.location.reload()},[]),c=(0,s.useCallback)(()=>{r(e=>(e&&i(e.serverVersion),null))},[]);return t?(0,n.jsxs)("div",{"data-testid":"version-mismatch-banner",role:"alert","aria-live":"assertive",className:"fixed top-3 left-1/2 -translate-x-1/2 flex items-start gap-3 max-w-[92vw] rounded-lg border border-warning-border bg-warning-subtle px-4 py-3 text-warning-foreground shadow-lg",style:{zIndex:eH.M.TOAST},children:[(0,n.jsx)(e3.A,{className:"h-5 w-5 shrink-0 mt-0.5","aria-hidden":"true"}),(0,n.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm",children:[(0,n.jsx)("span",{className:"font-semibold",children:e("versionMismatch.title")}),(0,n.jsx)("span",{children:e("versionMismatch.description",{serverVersion:t.serverVersion,clientVersion:t.clientVersion})})]}),(0,n.jsxs)("button",{type:"button","data-testid":"version-mismatch-reload",onClick:l,className:"shrink-0 inline-flex items-center gap-1.5 rounded-md border border-warning-border px-3 py-1.5 text-sm font-medium hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-offset-2",children:[(0,n.jsx)(eI.A,{className:"h-4 w-4","aria-hidden":"true"}),e("versionMismatch.reload")]}),(0,n.jsx)("button",{type:"button","data-testid":"version-mismatch-dismiss",onClick:c,"aria-label":e("versionMismatch.dismiss"),className:"shrink-0 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2",children:(0,n.jsx)(e8.A,{className:"h-4 w-4","aria-hidden":"true"})})]}):null}let tt="transform transition-transform duration-300 ease-out",tr=(0,s.memo)(function(e){let{children:t}=e,{isOpen:r,isMobileDrawerOpen:i,closeMobileDrawer:o,width:l,setWidth:c}=(0,S.VF)(),d=(0,C.a)(),{showSidebar:u,showGlobalNav:m}=function(){var e=(0,a.usePathname)();for(let t of M)if(e.startsWith(t.prefix))return{...A,...t.config};return{...A}}(),{factor:f}=(0,E.Ps)(),h=Math.round(160*f),p=Math.round(480*f),x=Math.round(Math.min(p,Math.max(h,l*f))),g=(0,s.useRef)(null),b=(0,s.useRef)(null),v=(0,s.useCallback)(e=>{c(Math.round(e/f))},[c,f]);return d?(0,n.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[i&&(0,n.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:o,"aria-hidden":"true"}),u&&(0,n.jsx)("aside",{"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full w-72 z-50\n ".concat(tt,"\n ").concat(i?"translate-x-0":"-translate-x-full","\n "),role:"complementary",children:(0,n.jsx)(eg,{})}),(0,n.jsx)("main",{className:"flex-1 min-h-0 overflow-hidden ".concat(m?"pb-14":""),role:"main","data-view-transition":"content",children:t}),m&&(0,n.jsx)(eD,{}),(0,n.jsx)(e2,{}),(0,n.jsx)(e6,{}),(0,n.jsx)(te,{})]}):(0,n.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[m&&(0,n.jsx)(N,{}),(0,n.jsxs)("div",{className:"flex flex-1 min-h-0",children:[u&&(0,n.jsxs)("aside",{ref:g,"data-testid":"sidebar-container",className:"\n fixed left-0\n ".concat(m?"top-16 h-[calc(100vh-4rem)]":"top-0 h-full","\n border-r border-border\n ").concat(tt,"\n ").concat(r?"translate-x-0":"-translate-x-full","\n "),style:{width:"".concat(x,"px"),zIndex:eH.M.SIDEBAR},role:"complementary","aria-hidden":!r,children:[(0,n.jsx)(eg,{}),(0,n.jsx)(tn,{currentWidth:x,minWidth:h,maxWidth:p,sidebarRef:g,mainRef:b,onWidthChange:v})]}),(0,n.jsx)("main",{ref:b,className:"flex-1 min-w-0 h-full overflow-hidden transition-[padding] duration-300 ease-out",style:{paddingLeft:u&&r?"".concat(x,"px"):0},role:"main","data-view-transition":"content",children:t})]}),(0,n.jsx)(e2,{}),(0,n.jsx)(e6,{}),(0,n.jsx)(te,{})]})});function tn(e){let{currentWidth:t,minWidth:r,maxWidth:s,sidebarRef:a,mainRef:i,onWidthChange:o}=e;return(0,n.jsx)("div",{"data-testid":"sidebar-resize-handle","aria-hidden":"true",onMouseDown:e=>{e.preventDefault();let n=e.clientX,l=t;i.current&&(i.current.style.transition="none");let c=e=>{l=Math.max(r,Math.min(s,t+(e.clientX-n))),a.current&&(a.current.style.width="".concat(l,"px")),i.current&&(i.current.style.paddingLeft="".concat(l,"px"))},d=()=>{document.body.style.cursor="",document.body.style.userSelect="",i.current&&(i.current.style.transition=""),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),o(l)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",c),document.addEventListener("mouseup",d)},className:"absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-accent-500/40 transition-colors"})}},30061:(e,t,r)=>{r.d(t,{nR:()=>i});var n=r(95155),s=r(12115),a=r(47650);function i(e){let{content:t,delay:r=200,className:i,children:o,metadata:l}=e,c=(0,s.useRef)(null),d=(0,s.useRef)(null),u=(0,s.useRef)(null),m=(0,s.useRef)(null),[f,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)({top:-9999,left:-9999}),g=(0,s.useCallback)(()=>{null!==u.current&&(clearTimeout(u.current),u.current=null)},[]),b=(0,s.useCallback)(()=>{let e=c.current;e&&(e.scrollWidth>e.clientWidth||l)&&(g(),u.current=setTimeout(()=>{let t=e.getBoundingClientRect(),r=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,r)}),h(!0),u.current=null},r))},[g,r,l]);(0,s.useLayoutEffect)(()=>{if(!f)return;let e=d.current,t=m.current;if(!e||!t)return;let{height:r}=e.getBoundingClientRect();if(r<=0)return;let n=window.innerHeight;if(t.bottom+4+r+4<=n)return;let s=t.top-4-r,a=s>=4?s:Math.max(4,n-r-4);x(e=>e.top===a?e:{...e,top:a})},[f]);let v=(0,s.useCallback)(()=>{g(),h(!1)},[g]);return(0,s.useEffect)(()=>()=>g(),[g]),(0,n.jsxs)("span",{ref:c,className:i,onMouseEnter:b,onMouseLeave:v,children:[null!=o?o:t,f&&"undefined"!=typeof document&&(0,a.createPortal)((0,n.jsxs)("span",{ref:d,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:p.top,left:p.left},children:[(0,n.jsx)("span",{className:"block break-all",children:t}),l&&(0,n.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:l})]}),document.body)]})}},34681:(e,t,r)=>{r.d(t,{g:()=>o});var n=r(95155);r(12115);var s=r(18955),a=r(22592),i=r(68704);function o(){let{size:e,setSize:t,isMobile:r}=(0,a.Ps)(),o=(0,s.c)("common");if(r)return null;let l=o("displaySize.ariaLabel");return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("label",{htmlFor:"pc-display-size",className:"sr-only",children:l}),(0,n.jsx)("select",{id:"pc-display-size","data-testid":"pc-display-size-select","aria-label":l,value:e,onChange:e=>{let r=e.target.value;(0,i.fM)(r)&&t(r)},className:"text-sm bg-transparent text-foreground border border-input rounded-md px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.Uf.map(e=>(0,n.jsx)("option",{value:e,children:o("displaySize.".concat(e))},e))})]})}},41898:(e,t,r)=>{r.d(t,{m_:()=>l});var n=r(95155),s=r(12115),a=r(47650);function i(e,t,r){return Math.min(Math.max(e,4),Math.max(4,r-t-4))}let o={top:-9999,left:-9999};function l(e){let{content:t,placement:r="right",delay:l=100,children:c}=e,[d,u]=(0,s.useState)(!1),[m,f]=(0,s.useState)(null),h=(0,s.useRef)(null),p=(0,s.useRef)(null),x=(0,s.useRef)(null),g=(0,s.useCallback)(()=>{null!==x.current&&(clearTimeout(x.current),x.current=null)},[]),b=(0,s.useCallback)(()=>{g(),x.current=setTimeout(()=>{u(!0),x.current=null},l)},[l,g]),v=(0,s.useCallback)(()=>{g(),u(!1),f(null)},[g]),y=(0,s.useCallback)(()=>{let e=h.current,t=p.current;if(!e||!t)return;let n=e.getBoundingClientRect(),s=t.getBoundingClientRect();f(function(e,t,r,n){let s,a,o=t.left+t.width/2-r.width/2,l=t.top+t.height/2-r.height/2;switch(e){case"top":s=t.top-r.height-8,a=o;break;case"bottom":s=t.top+t.height+8,a=o;break;case"left":s=l,a=t.left-r.width-8;break;default:s=l,a=t.left+t.width+8}return{top:i(s,r.height,n.height),left:i(a,r.width,n.width)}}(r,{top:n.top,left:n.left,width:n.width,height:n.height},{width:s.width,height:s.height},{width:window.innerWidth,height:window.innerHeight}))},[r]);return(0,s.useLayoutEffect)(()=>{if(d)return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[d,y]),(0,s.useEffect)(()=>()=>{g()},[g]),(0,n.jsxs)("span",{ref:h,"data-testid":"tooltip-wrapper",className:"relative inline-flex",tabIndex:-1,onMouseEnter:b,onMouseLeave:v,children:[c,d&&"undefined"!=typeof document&&(0,a.createPortal)((0,n.jsx)("span",{ref:p,role:"tooltip","aria-hidden":"true","data-placement":r,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!=m?m:o,children:t}),document.body)]})}},54014:(e,t,r)=>{r.d(t,{Ab:()=>s,NL:()=>x,O6:()=>f,XH:()=>n,f_:()=>u,hR:()=>c,lu:()=>h,n6:()=>o,oo:()=>d,pQ:()=>a,sw:()=>m,vz:()=>p});let n=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity"],s=10,a=50,i=/^[a-zA-Z0-9_-]+$/;function o(e){return"string"==typeof e&&e.length>0&&e.length<=64&&i.test(e)}let l={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity"};function c(e){return n.includes(e)}function d(e){var t;return null!=(t=l[e])?t:e}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assistant";return e&&c(e)?d(e):t}function m(e){let t=e.alias;return"string"==typeof t&&t.trim().length>0?t:d(e.cliTool)}function f(e,t,r){let n=e.find(e=>e.id===t);return n?m(n):d(r)}function h(e){return e.map((e,t)=>({id:e,cliTool:e,alias:d(e),order:t}))}let p=128,x=2097152},55142:(e,t,r)=>{r.d(t,{A7:()=>i,XK:()=>l,dw:()=>o,kA:()=>a});var n=r(54014),s=r(63001);function a(e){return e?e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isRunning?"ready":"idle":"idle"}function i(e){if(!e)return"idle";let t=Object.values(e).filter(e=>void 0!==e);return 0===t.length?"idle":t.includes("waiting")?"waiting":t.includes("running")?"running":t.includes("generating")?"generating":t.includes("ready")?"ready":"idle"}function o(e,t){return e?Object.entries(e).map(e=>{var r;let[s,a]=e;return"".concat(null!=(r=null==t?void 0:t[s])?r:(0,n.f_)(s,s),": ").concat(null!=a?a:"idle")}).join(", "):""}function l(e){var t,r,i,o;let l=a(void 0!==e.isSessionRunning?{isRunning:null!=(t=e.isSessionRunning)&&t,isWaitingForResponse:null!=(r=e.isWaitingForResponse)&&r,isProcessing:null!=(i=e.isProcessing)&&i}:void 0),c=!!e.lastAssistantMessageAt&&(!e.lastViewedAt||new Date(e.lastAssistantMessageAt)>new Date(e.lastViewedAt)),{cliStatus:d,cliStatusLabels:u}=function(e){var t,r,i;let o={},l={},c=e.sessionStatusByInstance;if(!c){for(let i of null!=(t=e.selectedAgents)?t:s.fJ)o[i]=a(null==(r=e.sessionStatusByCli)?void 0:r[i]),l[i]=(0,n.oo)(i);return{cliStatus:o,cliStatusLabels:l}}let d=e.agentInstances&&e.agentInstances.length>0?e.agentInstances:(0,n.lu)(null!=(i=e.selectedAgents)?i:s.fJ),u=new Set;for(let e of d)u.add(e.id),o[e.id]=a(c[e.id]),l[e.id]=(0,n.sw)(e);for(let[e,t]of Object.entries(c)){if(u.has(e))continue;let r=a(t);"idle"!==r&&(o[e]=r,l[e]=function(e){let t=n.XH.find(t=>e.startsWith("".concat(t,"-")));if(t){let r=e.slice(t.length+1);return"".concat((0,n.oo)(t)," ").concat(r)}return(0,n.f_)(e,e)}(e))}return{cliStatus:o,cliStatusLabels:l}}(e);return{id:e.id,name:e.name,repositoryName:null!=(o=e.repositoryDisplayName)?o:e.repositoryName,status:l,hasUnread:c,lastActivity:e.updatedAt,description:e.description,cliStatus:d,cliStatusLabels:u,worktreePath:e.path}}},63001:(e,t,r)=>{r.d(t,{fJ:()=>n}),r(54014);let n=["claude","codex","gemini","opencode","copilot","antigravity"]}}]);
|