commandmate 0.26.0 → 0.27.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 +431 -403
- package/.next/app-path-routes-manifest.json +26 -22
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +6 -6
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +24 -0
- 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.js +1 -1
- package/.next/server/app/api/assistant/conversation/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/assistant/current-output/route.js.nft.json +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.js +1 -1
- package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route.js +1 -1
- package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route.js +1 -1
- package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route.js +2 -2
- package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js +1 -1
- package/.next/server/app/api/assistant/tools/route.js.nft.json +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/capabilities/route.js +1 -0
- package/.next/server/app/api/capabilities/route.js.nft.json +1 -0
- package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route.js +2 -2
- package/.next/server/app/api/fs/browse/route.js.nft.json +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/recent-paths/route.js +2 -2
- package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -1
- package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js +1 -1
- package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route.js +19 -1
- package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js +1 -1
- package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
- package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/escalation/route.js +1 -1
- package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
- package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route.js +1 -1
- package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/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.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js +1 -1
- package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -1
- package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/verification/runs/route.js +1 -1
- package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -0
- 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.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +2 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/env/route.js +2 -0
- package/.next/server/app/api/worktrees/[id]/env/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -0
- 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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -0
- package/.next/server/app/api/worktrees/[id]/resolve-target/route.js.nft.json +1 -0
- package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -5
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -6
- package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +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 +3 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +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]/tasks/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js +3 -1
- package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/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 +2 -2
- 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_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 +2 -2
- 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 -2
- package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/installed/page.js +2 -2
- package/.next/server/app/skills/installed/page.js.nft.json +1 -1
- package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page.js +2 -2
- package/.next/server/app/skills/page.js.nft.json +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- 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 -7
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +26 -22
- package/.next/server/chunks/1029.js +1 -1
- package/.next/server/chunks/1068.js +3 -1
- package/.next/server/chunks/1296.js +1 -1
- package/.next/server/chunks/1538.js +7 -0
- package/.next/server/chunks/1601.js +2 -2
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +3 -2
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/2546.js +1 -1
- package/.next/server/chunks/2689.js +13 -0
- package/.next/server/chunks/2759.js +8 -0
- package/.next/server/chunks/2839.js +1 -0
- package/.next/server/chunks/3241.js +1 -1
- package/.next/server/chunks/3292.js +1 -0
- package/.next/server/chunks/3417.js +1 -1
- package/.next/server/chunks/3480.js +1 -17
- package/.next/server/chunks/4393.js +1 -1
- package/.next/server/chunks/4423.js +1 -0
- package/.next/server/chunks/4444.js +22 -8
- package/.next/server/chunks/4565.js +3 -0
- package/.next/server/chunks/467.js +1 -0
- package/.next/server/chunks/4905.js +5 -0
- package/.next/server/chunks/5017.js +1 -0
- package/.next/server/chunks/5089.js +1 -0
- package/.next/server/chunks/5164.js +1 -1
- package/.next/server/chunks/5220.js +1 -0
- package/.next/server/chunks/5354.js +1 -0
- package/.next/server/chunks/552.js +19 -0
- package/.next/server/chunks/5571.js +1 -1
- package/.next/server/chunks/5998.js +3 -3
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6274.js +11 -11
- package/.next/server/chunks/6285.js +1 -1
- package/.next/server/chunks/6401.js +1 -1
- package/.next/server/chunks/6781.js +1 -1
- package/.next/server/chunks/7472.js +1 -0
- package/.next/server/chunks/7506.js +1 -0
- package/.next/server/chunks/848.js +1 -1
- package/.next/server/chunks/8536.js +1 -1
- package/.next/server/chunks/880.js +1 -1
- package/.next/server/chunks/8807.js +5 -5
- package/.next/server/chunks/9067.js +1 -1
- package/.next/server/chunks/9284.js +1 -0
- package/.next/server/chunks/9358.js +1 -1
- package/.next/server/chunks/9508.js +1 -0
- package/.next/server/chunks/9938.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2053-dfac2d49227cc942.js → 2053-c0e931eb4391baa1.js} +1 -1
- package/.next/static/chunks/3361-5d6e93fba8a92bc1.js +1 -0
- package/.next/static/chunks/3922.0d2e64daf9f187da.js +1 -0
- package/.next/static/chunks/{5229-35f9acab97a553c5.js → 5229-1f5f19740a8d6c11.js} +1 -1
- package/.next/static/chunks/{6381-9303430933084b56.js → 6381-b7250e8ca7a44c6c.js} +1 -1
- package/.next/static/chunks/{8649-f551b0010dba4986.js → 8521-c43994fb58501d13.js} +1 -1
- package/.next/static/chunks/app/api/app/update/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/app/update-check/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/conversation/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/current-output/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/messages/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/session/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/start/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/terminal/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/assistant/tools/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/capabilities/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/daily-summary/status/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/external-apps/[id]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/external-apps/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/fs/browse/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/fs/recent-paths/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/hooks/agent-event/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/hooks/claude-done/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/hooks/permission-request/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/metrics/vibe/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/ollama/models/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/push/escalation/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/push/subscriptions/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/push/vapid/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/clone/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/excluded/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/restore/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/scan/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/sync/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/repositories/validate-path/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/sidebar/group-order/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/skills/[id]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/skills/installations/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/skills/operations/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/skills/reindex/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/skills/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/slash-commands/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/tasks/[taskId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/templates/[id]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/templates/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/todos/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/verification/runs/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/env/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/chat/{page-439b35c9cb90dbe0.js → page-231df45127e876c2.js} +1 -1
- package/.next/static/chunks/app/login/{page-eefd515d8c37e5ee.js → page-adc51f0f7cbb7ac6.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/more/{page-889b7546a8a553dc.js → page-3266dfa945972649.js} +1 -1
- package/.next/static/chunks/app/{page-a8d04ac0e3e4c9fc.js → page-0305431f43195431.js} +1 -1
- package/.next/static/chunks/app/proxy/[...path]/route-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/repositories/{page-f3c4d8839b1ca203.js → page-ae8fa55749976f79.js} +1 -1
- package/.next/static/chunks/app/review/{page-6dc88649fe88ac16.js → page-8f63aff862fee421.js} +1 -1
- package/.next/static/chunks/app/sessions/{page-2c9ed9e969097688.js → page-4d5382b257077c14.js} +1 -1
- package/.next/static/chunks/app/skills/[skillId]/{page-19beef6121c4c982.js → page-aaf0bcb1dfb558b9.js} +1 -1
- package/.next/static/chunks/app/skills/installed/{page-d5b9cef6d21fabda.js → page-dafc486410e839b7.js} +1 -1
- package/.next/static/chunks/app/skills/{page-06ef637e07dd9377.js → page-9e3c91da31514893.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/{page-5fed3984fafcd910.js → page-90f96977c741bbf8.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-6add0d88e2828c23.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-e4f28966b4fc0ce1.js +1 -0
- package/.next/static/chunks/{webpack-9d892a9ff07c289d.js → webpack-6a9668cf54a26eba.js} +1 -1
- package/.next/static/css/928e5a8830fbf997.css +1 -0
- package/.next/static/t0BoV4H46ZgKmTjSi7GIz/_buildManifest.js +1 -0
- package/.next/trace +13 -12
- package/.next/types/app/api/capabilities/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/clear-composer/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/env/route.ts +347 -0
- package/.next/types/app/api/worktrees/[id]/resolve-target/route.ts +347 -0
- package/.next/types/routes.d.ts +5 -1
- package/.next/types/validator.ts +36 -0
- package/dist/cli/commands/auto-yes.d.ts.map +1 -1
- package/dist/cli/commands/auto-yes.js +40 -2
- package/dist/cli/commands/capture.d.ts.map +1 -1
- package/dist/cli/commands/capture.js +28 -13
- package/dist/cli/commands/instances.d.ts +30 -18
- package/dist/cli/commands/instances.d.ts.map +1 -1
- package/dist/cli/commands/instances.js +32 -36
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +73 -1
- package/dist/cli/commands/respond.d.ts.map +1 -1
- package/dist/cli/commands/respond.js +18 -1
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +21 -15
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +38 -0
- package/dist/cli/commands/wait.d.ts +26 -0
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +390 -43
- package/dist/cli/config/cli-dependencies.d.ts.map +1 -1
- package/dist/cli/config/cli-dependencies.js +16 -0
- package/dist/cli/config/cli-tool-ids.d.ts +11 -0
- package/dist/cli/config/cli-tool-ids.d.ts.map +1 -1
- package/dist/cli/config/cli-tool-ids.js +12 -1
- package/dist/cli/types/api-responses.d.ts +443 -2
- package/dist/cli/types/api-responses.d.ts.map +1 -1
- package/dist/cli/utils/api-client.d.ts +18 -0
- package/dist/cli/utils/api-client.d.ts.map +1 -1
- package/dist/cli/utils/api-client.js +22 -0
- package/dist/cli/utils/server-capabilities.d.ts +56 -0
- package/dist/cli/utils/server-capabilities.d.ts.map +1 -0
- package/dist/cli/utils/server-capabilities.js +166 -0
- package/dist/cli/utils/session-target.d.ts +70 -0
- package/dist/cli/utils/session-target.d.ts.map +1 -0
- package/dist/cli/utils/session-target.js +118 -0
- package/dist/lib/cli-tools/copilot-executable.d.ts +79 -0
- package/dist/lib/cli-tools/copilot-executable.d.ts.map +1 -0
- package/dist/lib/cli-tools/copilot-executable.js +155 -0
- package/dist/lib/cli-tools/types.d.ts +61 -0
- package/dist/lib/cli-tools/types.d.ts.map +1 -1
- package/dist/lib/cli-tools/types.js +41 -0
- package/dist/lib/detection/ansi.d.ts +2 -1
- package/dist/lib/detection/ansi.d.ts.map +1 -1
- package/dist/lib/detection/ansi.js +3 -2
- package/dist/lib/detection/tools/verified-against.d.ts +84 -0
- package/dist/lib/detection/tools/verified-against.d.ts.map +1 -0
- package/dist/lib/detection/tools/verified-against.js +88 -0
- package/dist/lib/detection/version-probes.d.ts +207 -0
- package/dist/lib/detection/version-probes.d.ts.map +1 -0
- package/dist/lib/detection/version-probes.js +290 -0
- package/dist/lib/security/env-sanitizer.d.ts +198 -0
- package/dist/lib/security/env-sanitizer.d.ts.map +1 -0
- package/dist/lib/security/env-sanitizer.js +232 -0
- package/dist/server/locales/en/notifications.json +17 -6
- package/dist/server/locales/ja/notifications.json +17 -6
- package/dist/server/src/config/activity-bar-config.js +4 -0
- package/dist/server/src/config/cli-tool-timing-config.js +59 -2
- package/dist/server/src/config/copilot-constants.js +11 -1
- package/dist/server/src/config/detection-evidence-config.js +129 -0
- package/dist/server/src/config/schedule-config.js +56 -7
- package/dist/server/src/config/tmux-pane-config.js +18 -1
- package/dist/server/src/lib/auto-yes-poller.js +36 -0
- package/dist/server/src/lib/cli-tools/antigravity.js +4 -2
- package/dist/server/src/lib/cli-tools/base.js +131 -10
- package/dist/server/src/lib/cli-tools/capture-spec.js +56 -0
- package/dist/server/src/lib/cli-tools/claude.js +1 -1
- package/dist/server/src/lib/cli-tools/codex.js +6 -2
- package/dist/server/src/lib/cli-tools/composer-spec.js +96 -0
- package/dist/server/src/lib/cli-tools/copilot-executable.js +155 -0
- package/dist/server/src/lib/cli-tools/copilot.js +307 -81
- package/dist/server/src/lib/cli-tools/gemini.js +8 -6
- package/dist/server/src/lib/cli-tools/graceful-exit.js +181 -0
- package/dist/server/src/lib/cli-tools/index.js +11 -1
- package/dist/server/src/lib/cli-tools/manager.js +56 -4
- package/dist/server/src/lib/cli-tools/opencode-config.js +195 -24
- package/dist/server/src/lib/cli-tools/opencode.js +233 -30
- package/dist/server/src/lib/cli-tools/session-name.js +57 -0
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +213 -30
- package/dist/server/src/lib/cli-tools/types.js +41 -0
- package/dist/server/src/lib/cli-tools/vibe-local.js +7 -3
- package/dist/server/src/lib/cmate-cli-tool-parser.js +29 -1
- package/dist/server/src/lib/cmate-parser.js +12 -4
- package/dist/server/src/lib/db/db.js +5 -1
- package/dist/server/src/lib/db/migrations/v41-push-subscriptions.js +11 -0
- package/dist/server/src/lib/db/push-subscriptions-db.js +60 -3
- package/dist/server/src/lib/detection/ansi.js +3 -2
- package/dist/server/src/lib/detection/cli-patterns.js +901 -67
- package/dist/server/src/lib/detection/composer-text.js +455 -0
- package/dist/server/src/lib/detection/idle-evidence-observation.js +51 -0
- package/dist/server/src/lib/detection/model-info-extractor.js +195 -4
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +19 -0
- package/dist/server/src/lib/detection/status-detector.js +76 -675
- package/dist/server/src/lib/detection/status-reason.js +57 -0
- package/dist/server/src/lib/detection/tools/antigravity/detect.js +75 -0
- package/dist/server/src/lib/detection/tools/claude/detect.js +144 -0
- package/dist/server/src/lib/detection/tools/claude/patterns.js +98 -0
- package/dist/server/src/lib/detection/tools/claude/prompt.js +124 -0
- package/dist/server/src/lib/detection/tools/codex/detect.js +343 -0
- package/dist/server/src/lib/detection/tools/codex/prompt.js +104 -0
- package/dist/server/src/lib/detection/tools/copilot/detect.js +185 -0
- package/dist/server/src/lib/detection/tools/copilot/prompt.js +89 -0
- package/dist/server/src/lib/detection/tools/dialog-block.js +159 -0
- package/dist/server/src/lib/detection/tools/frame.js +47 -0
- package/dist/server/src/lib/detection/tools/opencode/detect.js +242 -0
- package/dist/server/src/lib/detection/tools/opencode/prompt.js +85 -0
- package/dist/server/src/lib/detection/tools/registry.js +58 -0
- package/dist/server/src/lib/detection/tools/run-detection.js +202 -0
- package/dist/server/src/lib/detection/tools/types.js +34 -0
- package/dist/server/src/lib/detection/tools/verified-against.js +88 -0
- package/dist/server/src/lib/hooks/agent-event-types.js +19 -1
- package/dist/server/src/lib/hooks/permission-adjudication.js +160 -0
- package/dist/server/src/lib/hooks/permission-decision-service.js +81 -14
- package/dist/server/src/lib/hooks/permission-decision-state.js +62 -0
- package/dist/server/src/lib/hooks/permission-request-payload.js +18 -1
- package/dist/server/src/lib/hooks/sources/antigravity/source.js +10 -0
- package/dist/server/src/lib/hooks/sources/claude/source.js +20 -0
- package/dist/server/src/lib/hooks/sources/codex/source.js +10 -0
- package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +403 -50
- package/dist/server/src/lib/hooks/sources/copilot/source.js +40 -4
- package/dist/server/src/lib/hooks/sources/define-source.js +23 -1
- package/dist/server/src/lib/hooks/sources/event-mapper.js +29 -1
- package/dist/server/src/lib/hooks/sources/gemini/source.js +10 -0
- package/dist/server/src/lib/hooks/sources/index.js +3 -1
- package/dist/server/src/lib/hooks/sources/launch-command.js +96 -1
- package/dist/server/src/lib/hooks/sources/legacy-relay.js +12 -0
- package/dist/server/src/lib/hooks/sources/opencode/client.js +295 -32
- package/dist/server/src/lib/hooks/sources/opencode/ingest.js +120 -42
- package/dist/server/src/lib/hooks/sources/opencode/mappers.js +95 -3
- package/dist/server/src/lib/hooks/sources/opencode/ports.js +70 -9
- package/dist/server/src/lib/hooks/sources/opencode/runtime.js +62 -4
- package/dist/server/src/lib/hooks/sources/opencode/source.js +54 -3
- package/dist/server/src/lib/hooks/sources/opencode/subscription.js +254 -26
- package/dist/server/src/lib/hooks/sources/opencode/turn-gate.js +119 -4
- package/dist/server/src/lib/hooks/sources/pending-decisions.js +40 -2
- package/dist/server/src/lib/hooks/tool-input-normalization-state.js +67 -0
- package/dist/server/src/lib/hooks/tool-input-normalization.js +157 -0
- package/dist/server/src/lib/job-executor.js +16 -4
- package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +184 -0
- package/dist/server/src/lib/polling/response-checker.js +243 -26
- package/dist/server/src/lib/push/failure-episode-state.js +127 -0
- package/dist/server/src/lib/push/failure-push-notifier.js +344 -0
- package/dist/server/src/lib/push/index.js +35 -1
- package/dist/server/src/lib/push/prompt-card-state.js +93 -0
- package/dist/server/src/lib/push/prompt-push-gate.js +130 -0
- package/dist/server/src/lib/push/push-sender.js +82 -7
- package/dist/server/src/lib/push/resolution-push-notifier.js +193 -0
- package/dist/server/src/lib/push/waiting-push-notifier.js +42 -0
- package/dist/server/src/lib/response-cleaner.js +93 -20
- package/dist/server/src/lib/response-extractor.js +98 -5
- package/dist/server/src/lib/security/env-sanitizer.js +179 -5
- package/dist/server/src/lib/session/agent-event-state.js +1038 -189
- package/dist/server/src/lib/session/agent-session-lifecycle.js +8 -0
- package/dist/server/src/lib/session/claude-executor.js +23 -3
- package/dist/server/src/lib/session/claude-session.js +11 -1
- package/dist/server/src/lib/session/composer-clear.js +95 -0
- package/dist/server/src/lib/session/current-output-builder.js +267 -25
- package/dist/server/src/lib/session/provisional-turn.js +310 -0
- package/dist/server/src/lib/session/resolve-session-target.js +156 -0
- package/dist/server/src/lib/session/send-user-message.js +14 -18
- package/dist/server/src/lib/session/session-start-error.js +53 -1
- package/dist/server/src/lib/session/status-evidence.js +217 -0
- package/dist/server/src/lib/session/structured-prompt.js +46 -4
- package/dist/server/src/lib/session/waiting-episode-state.js +24 -0
- package/dist/server/src/lib/tmux/key-sequence.js +120 -0
- package/dist/server/src/lib/tmux/tmux.js +91 -19
- package/dist/server/src/lib/tui-accumulator.js +68 -1
- package/dist/server/src/lib/verification/gate-runner.js +84 -1
- package/dist/server/src/lib/ws-server.js +8 -5
- package/dist/server/src/types/cli-tool-contracts.js +75 -0
- package/dist/server/src/types/terminal-keys.js +37 -0
- package/dist/types/cli-tool-contracts.d.ts +235 -0
- package/dist/types/cli-tool-contracts.d.ts.map +1 -0
- package/dist/types/cli-tool-contracts.js +75 -0
- package/package.json +3 -2
- package/public/sw.js +65 -2
- package/.next/server/chunks/1841.js +0 -1
- package/.next/server/chunks/233.js +0 -1
- package/.next/server/chunks/3022.js +0 -1
- package/.next/server/chunks/3270.js +0 -1
- package/.next/server/chunks/4455.js +0 -1
- package/.next/server/chunks/5959.js +0 -27
- package/.next/server/chunks/7458.js +0 -6
- package/.next/server/chunks/8730.js +0 -1
- package/.next/server/chunks/9058.js +0 -1
- package/.next/server/chunks/9687.js +0 -3
- package/.next/static/chunks/3898-ef488bfa804507d9.js +0 -1
- package/.next/static/chunks/9263.f2034ec525abcf72.js +0 -1
- package/.next/static/chunks/app/api/app/update/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/app/update-check/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/conversation/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/current-output/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/messages/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/session/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/start/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/terminal/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/assistant/tools/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/daily-summary/status/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/health/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/external-apps/[id]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/external-apps/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/fs/browse/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/fs/recent-paths/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/hooks/agent-event/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/hooks/claude-done/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/hooks/permission-request/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/metrics/vibe/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/ollama/models/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/push/escalation/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/push/subscriptions/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/push/vapid/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/[id]/todos/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/clone/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/excluded/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/restore/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/scan/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/sync/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/repositories/validate-path/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/sidebar/group-order/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/skills/[id]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/skills/installations/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/skills/operations/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/skills/reindex/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/skills/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/slash-commands/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/tasks/[taskId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/templates/[id]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/templates/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/todos/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/[runId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/verification/runs/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/capture/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/logs/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/memos/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/messages/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/respond/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/search/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/send/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/skills/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/timers/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/todos/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/tree/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/proxy/[...path]/route-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/layout-fae89f8d4cc3ff97.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-fbdf4621a2911ac1.js +0 -1
- package/.next/static/css/e865c4979a41aa03.css +0 -1
- package/.next/static/hNdNiFes2xLls68SWhAU9/_buildManifest.js +0 -1
- /package/.next/static/{hNdNiFes2xLls68SWhAU9 → t0BoV4H46ZgKmTjSi7GIz}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-6add0d88e2828c23.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[838],{38038:(e,t,s)=>{Promise.resolve().then(s.bind(s,60675))},53482:(e,t,s)=>{"use strict";s.d(t,{i:()=>c});var a=s(95155),n=s(12115),r=s(60322),i=s(9900);function o(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function l(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function c(e){let{text:t,className:s="",label:c="Copy"}=e,[d,u]=(0,n.useState)(!1),m=(0,n.useRef)(null);(0,n.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let p=(0,n.useCallback)(async()=>{try{await (0,r.l)(t),u(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>u(!1),i.s7)}catch(e){}},[t]);return(0,a.jsxs)("button",{type:"button",onClick:p,className:"inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted ".concat(s),"aria-label":d?"Copied":c,title:d?"Copied!":c,children:[d?(0,a.jsx)(l,{}):(0,a.jsx)(o,{}),(0,a.jsx)("span",{children:d?"Copied":c})]})}},60322:(e,t,s)=>{"use strict";s.d(t,{l:()=>n});let a=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function n(e){var t;if(!e||0===e.trim().length)return;let s=e.replace(a,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(s);return}catch(e){}let n=document.createElement("textarea");n.value=s,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}}},60675:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>I});var a=s(95155),n=s(15229),r=s(12115),i=s(18955),o=s(71360),l=s(13898),c=s(36402);let d=(0,r.memo)(function(e){let{onSend:t,disabled:s=!1,placeholder:n}=e,o=(0,i.c)("home"),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),x=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=x.current;e&&(c?(e.style.height="auto",e.style.height="".concat(Math.min(e.scrollHeight,120),"px")):e.style.height="24px")},[c]);let b=(0,r.useCallback)(async()=>{if(!p&&c.trim()&&!u&&!s)try{m(!0),await t(c.trim()),d("")}catch(e){}finally{m(!1)}},[p,c,u,s,t]),v=(0,r.useCallback)(async e=>{e.preventDefault(),await b()},[b]),y=(0,r.useCallback)(()=>{h(!0),g.current=!1,f.current&&clearTimeout(f.current)},[]),w=(0,r.useCallback)(()=>{h(!1),g.current=!0,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{g.current=!1},300)},[]),j=(0,r.useCallback)(e=>{let{keyCode:t}=e.nativeEvent;if(229!==t){if(g.current&&"Enter"===e.key){g.current=!1;return}"Enter"!==e.key||p||e.shiftKey||(e.preventDefault(),b())}},[p,b]);return(0,a.jsxs)("form",{onSubmit:v,className:"flex shrink-0 items-center gap-2 rounded-lg border border-input bg-surface dark:bg-surface-2 px-3 py-1.5 focus-within:border-accent-500 focus-within:ring-1 focus-within:ring-accent-500","data-testid":"assistant-message-input",children:[(0,a.jsx)("textarea",{ref:x,value:c,onChange:e=>d(e.target.value),onKeyDown:j,onCompositionStart:y,onCompositionEnd:w,placeholder:null!=n?n:o("assistant.input.defaultPlaceholder"),disabled:u||s,rows:1,className:"flex-1 outline-none bg-transparent resize-none overflow-y-auto scrollbar-thin text-sm",style:{minHeight:"24px",maxHeight:"120px",paddingTop:"4px",paddingBottom:"4px",lineHeight:"18px"},"data-testid":"assistant-message-textarea"}),(0,a.jsx)(l.$n,{type:"submit",variant:"ghost",disabled:!c.trim()||u||s,className:"flex-shrink-0 rounded-full p-1.5 text-accent-600 hover:bg-accent-50 dark:text-accent-400 dark:hover:bg-accent-900/30 disabled:text-muted-foreground disabled:hover:bg-transparent","aria-label":o("assistant.input.send"),"data-testid":"assistant-send-button",children:u?(0,a.jsx)(l.y$,{size:"sm"}):(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]})});var u=s(51238),m=s(22133),p=s(10934),h=s(5225);s(1226);var x=s(53482),f=s(3005);function g(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function b(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function v(e){let{message:t}=e;return(0,a.jsx)("div",{className:"text-center text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:(0,a.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-3 py-1",children:t.content})})}function y(e){let{message:t,canEdit:s,onEdit:n}=e,o=(0,i.c)("home"),[l,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(t.content),[m,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(null),v=t.deliveryStatus?"pending"===t.deliveryStatus?o("assistant.message.sending"):"failed"===t.deliveryStatus?o("assistant.message.failed"):o("assistant.message.sent"):null,y=(0,r.useCallback)(()=>{u(t.content),f(null),c(!0)},[t.content]),w=(0,r.useCallback)(()=>{c(!1),f(null)},[]),j=(0,r.useCallback)(async()=>{if(!n||m)return;let e=d.trim();if(!e||e===t.content.trim())return void c(!1);p(!0),f(null);try{await n(t,e),c(!1)}catch(e){f(e instanceof Error?e.message:o("assistant.errors.resubmitMessage"))}finally{p(!1)}},[d,t,n,m,o]);return(0,a.jsxs)("div",{className:"group ml-auto max-w-[88%] rounded-2xl border border-accent-500/40 bg-accent-500/10 px-4 py-3 text-foreground shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3 text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:[(0,a.jsx)("span",{children:o("assistant.message.you")}),(0,a.jsx)("span",{children:g(t.timestamp)})]}),l?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("textarea",{className:"w-full resize-y rounded border border-input bg-surface p-2 text-sm text-foreground focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring",value:d,onChange:e=>u(e.target.value),rows:Math.max(3,Math.min(12,d.split("\n").length+1)),disabled:m,"data-testid":"assistant-edit-textarea"}),h&&(0,a.jsx)("p",{className:"text-[11px] text-danger-foreground",children:h}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:w,disabled:m,className:"rounded border border-border bg-surface px-3 py-1 text-[11px] text-foreground transition-colors hover:bg-muted disabled:opacity-50",children:o("assistant.message.cancel")}),(0,a.jsx)("button",{type:"button",onClick:j,disabled:m||!d.trim(),className:"rounded bg-accent-600 px-3 py-1 text-[11px] font-medium text-white transition-colors hover:bg-accent-700 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-edit-save",children:m?o("assistant.message.resending"):o("assistant.message.saveAndResend")})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words text-sm leading-6",children:t.content}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium ".concat("failed"===t.deliveryStatus?"text-danger-foreground":"text-muted-foreground"),children:null!=v?v:""}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 opacity-60 transition-opacity group-hover:opacity-100",children:[(0,a.jsx)(x.i,{text:t.content}),s&&n&&(0,a.jsxs)("button",{type:"button",onClick:y,className:"inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted","aria-label":o("assistant.message.editMessage"),"data-testid":"assistant-edit-button",title:o("assistant.message.editAndResend"),children:[(0,a.jsx)(b,{}),(0,a.jsx)("span",{children:o("assistant.message.edit")})]})]})]})]})]})}function w(e){let{message:t,assistantLabel:s}=e;return(0,a.jsxs)("div",{className:"group mr-auto max-w-[88%] rounded-2xl border border-border bg-surface px-4 py-3 text-foreground shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3 text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:[(0,a.jsx)("span",{children:s}),(0,a.jsx)("span",{children:g(t.timestamp)})]}),(0,a.jsx)("div",{className:"assistant-md text-sm leading-6",children:(0,a.jsx)(u.oz,{remarkPlugins:[m.A],rehypePlugins:[p.A,h.A],children:t.content})}),(0,a.jsx)("div",{className:"mt-2 flex justify-end opacity-60 transition-opacity group-hover:opacity-100",children:(0,a.jsx)(x.i,{text:t.content})})]})}function j(e){let{messages:t,assistantLabel:s,sessionActive:n,waitingForResponse:o=!1,canEdit:l=!1,onEditMessage:c}=e,d=(0,i.c)("home"),u=(0,r.useRef)(null),m=(0,r.useRef)(!0),p=(0,r.useMemo)(()=>{var e;let s=t[t.length-1];return s?"".concat(t.length,":").concat(s.id,":").concat(null!=(e=s.deliveryStatus)?e:"",":").concat(s.content.length,":").concat(o?"waiting":"idle"):"empty:".concat(o?"waiting":"idle")},[t,o]);(0,r.useEffect)(()=>{u.current&&m.current&&(u.current.scrollTop=u.current.scrollHeight)},[p]);let h=(0,r.useMemo)(()=>{let e=t[t.length-1];return n&&e&&"user"===e.role&&"failed"!==e.deliveryStatus?d("assistant.working"):d("assistant.emptyState")},[t,n,d]);return(0,a.jsx)("div",{ref:u,className:"h-full min-h-0 overflow-y-scroll rounded-xl border border-border bg-surface-2 p-3",style:{scrollbarGutter:"stable"},onScroll:e=>{let t=e.currentTarget;m.current=t.scrollHeight-t.scrollTop-t.clientHeight<48},"data-testid":"assistant-message-list",children:0!==t.length||o?(0,a.jsxs)("div",{className:"space-y-3",children:[t.map(e=>"system"===e.role&&"session_boundary"===e.messageType?(0,a.jsx)(v,{message:e},e.id):"user"===e.role?(0,a.jsx)(y,{message:e,canEdit:l,onEdit:c},e.id):(0,a.jsx)(w,{message:e,assistantLabel:s},e.id)),o&&(0,a.jsxs)("div",{className:"mr-auto flex max-w-[88%] items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 shadow-sm","data-testid":"assistant-waiting-indicator","aria-live":"polite",children:[(0,a.jsx)(f.y,{size:"sm",variant:"accent"}),(0,a.jsx)("span",{className:"text-sm text-foreground",children:d("assistant.thinking",{label:s})})]})]}):(0,a.jsx)("div",{className:"flex h-full min-h-[160px] items-center justify-center text-sm text-muted-foreground",children:h})})}function k(e){return e?{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),lastStartedAt:e.lastStartedAt?new Date(e.lastStartedAt):void 0,lastStoppedAt:e.lastStoppedAt?new Date(e.lastStoppedAt):void 0,contextSentAt:e.contextSentAt?new Date(e.contextSentAt):void 0}:null}function N(e){return{...e,timestamp:new Date(e.timestamp)}}let C={async getConversation(e,t){let s=await fetch("/api/assistant/conversation?repositoryId=".concat(encodeURIComponent(e),"&cliToolId=").concat(encodeURIComponent(t)));if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to get conversation (".concat(s.status,")"));return k((await s.json()).conversation)},async getMessages(e){let t=await fetch("/api/assistant/messages?conversationId=".concat(encodeURIComponent(e)));if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to get messages (".concat(t.status,")"));return(await t.json()).messages.map(N)},async clearMessages(e,t){var s;let a=new URLSearchParams({conversationId:e});(null==t?void 0:t.fromMessageId)&&a.set("fromMessageId",t.fromMessageId);let n=await fetch("/api/assistant/messages?".concat(a.toString()),{method:"DELETE"});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error||"Failed to clear messages (".concat(n.status,")"));return{archivedCount:null!=(s=(await n.json()).archivedCount)?s:0}},async startSession(e,t){let s=await fetch("/api/assistant/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:e,repositoryId:t})});if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to start session (".concat(s.status,")"));let a=await s.json();return{...a,conversation:k(a.conversation)}},async sendCommand(e,t,s){let a=await fetch("/api/assistant/terminal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:e,conversationId:t,command:s})});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to send command (".concat(a.status,")"))},async getCurrentOutput(e,t){let s=await fetch("/api/assistant/current-output?cliToolId=".concat(encodeURIComponent(e),"&conversationId=").concat(encodeURIComponent(t)));if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to get output (".concat(s.status,")"));return s.json()},async stopSession(e,t){let s=await fetch("/api/assistant/session?cliToolId=".concat(encodeURIComponent(e),"&conversationId=").concat(encodeURIComponent(t)),{method:"DELETE"});if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to stop session (".concat(s.status,")"));return s.json()},async getInstalledTools(){var e;let t=await fetch("/api/assistant/tools");return t.ok&&null!=(e=(await t.json()).tools)?e:[]}},S="commandmate-assistant-cli-tool",E=["claude","codex","antigravity"];function M(e){return E.includes(e)}function A(){var e;let t=(0,i.c)("home"),s=(0,c.SC)(),[n,u]=(0,r.useState)([]),[m,p]=(0,r.useState)([]),[h,x]=(0,r.useState)(""),[f,g]=(0,r.useState)("claude"),[b,v]=(0,r.useState)(null),[y,w]=(0,r.useState)([]),[k,N]=(0,r.useState)(null),[E,A]=(0,r.useState)(!1),[I,T]=(0,r.useState)(!1),[R,L]=(0,r.useState)(!1),[H,D]=(0,r.useState)(!1),[P,_]=(0,r.useState)(null),z="".concat(h,":").concat(f),F=!H||""!==h&&P!==z,U=(0,r.useRef)(null),O=(null==b?void 0:b.status)==="ready"||(null==b?void 0:b.status)==="running",B=(null==b?void 0:b.status)==="running",W=(null==b?void 0:b.status)==="ready",$=n.find(e=>e.id===h),V=(0,r.useMemo)(()=>m.filter(e=>M(e.id)),[m]),G=V.find(e=>e.id===f),J=null!=(e=null==G?void 0:G.name)?e:f,K=(0,r.useCallback)(async e=>{w(await C.getMessages(e))},[]),Z=(0,r.useCallback)(async()=>{if(!h){v(null),w([]);return}let e=await C.getConversation(h,f);v(e),e?await K(e.id):w([])},[K,h,f]);(0,r.useEffect)(()=>{{let e=localStorage.getItem(S);e&&M(e)&&g(e)}},[]),(0,r.useEffect)(()=>{async function e(){let e=await C.getInstalledTools();p(e);let t=e.filter(e=>M(e.id)),s=t.find(e=>e.installed);s&&g(e=>{let a=t.find(t=>t.id===e);return(null==a?void 0:a.installed)?e:s.id})}(async function(){try{var e;let t=await fetch("/api/worktrees");if(!t.ok)return;let s=(null!=(e=(await t.json()).repositories)?e:[]).map(e=>({id:e.id,path:e.path,name:e.name,displayName:e.displayName}));u(s),s.length>0&&x(e=>e||s[0].id)}catch(e){}finally{D(!0)}})(),e()},[]),(0,r.useEffect)(()=>{if(!h)return;let e=!1;return(async()=>{try{let t=await C.getConversation(h,f);if(e)return;if(v(t),t){let s=await C.getMessages(t.id);e||w(s)}else w([])}catch(s){e||N(s instanceof Error?s.message:t("assistant.errors.loadConversation"))}finally{e||_("".concat(h,":").concat(f))}})(),()=>{e=!0}},[h,f,t]),(0,r.useEffect)(()=>{if(U.current&&(clearInterval(U.current),U.current=null),!b)return;let e=async()=>{try{await Z()}catch(e){}};return e(),U.current=setInterval(e,2e3),()=>{U.current&&(clearInterval(U.current),U.current=null)}},[null==b?void 0:b.id,Z,b]);let q=(0,r.useCallback)(e=>{M(e)&&(g(e),localStorage.setItem(S,e))},[]),Q=(0,r.useCallback)(async()=>{if(h&&!E){A(!0),N(null);try{let e=await C.startSession(f,h);v(e.conversation),await K(e.conversation.id)}catch(e){N(e instanceof Error?e.message:t("assistant.errors.startSession"))}finally{A(!1)}}},[K,h,f,E,t]),X=(0,r.useCallback)(async()=>{if(b&&!I){T(!0),N(null);try{await C.stopSession(f,b.id),await Z()}catch(e){N(e instanceof Error?e.message:t("assistant.errors.stopSession"))}finally{T(!1)}}},[b,Z,f,I,t]),Y=(0,r.useCallback)(async()=>{if(b&&!R&&!B&&await s({description:t("assistant.clearHistoryConfirm"),variant:"danger"})){L(!0),N(null);try{await C.clearMessages(b.id),await Z()}catch(e){N(e instanceof Error?e.message:t("assistant.errors.clearHistory"))}finally{L(!1)}}},[R,b,B,Z,s,t]),ee=(0,r.useCallback)(async e=>{if(b&&W){N(null);try{await C.sendCommand(f,b.id,e),v(e=>e?{...e,status:"running"}:e),await Promise.all([K(b.id),Z()])}catch(e){throw N(e instanceof Error?e.message:t("assistant.errors.sendMessage")),e}}},[W,b,Z,K,f,t]),et=(0,r.useCallback)(async(e,s)=>{if(!b||!W)throw Error(t("assistant.errors.notReadyToResend"));N(null),await C.clearMessages(b.id,{fromMessageId:e.id}),await C.sendCommand(f,b.id,s),v(e=>e?{...e,status:"running"}:e),await Promise.all([K(b.id),Z()])},[W,b,Z,K,f,t]),es=(0,r.useCallback)(async e=>{if(O){if(!await s({description:t("assistant.changeRepoConfirm")}))return;try{await C.stopSession(f,b.id)}catch(e){N(e instanceof Error?e.message:t("assistant.errors.stopSession"));return}}x(e),N(null)},[b,O,f,s,t]);return(0,a.jsx)(l.Zp,{variant:"elevated",padding:"none",className:"overflow-hidden rounded-xl shadow-lg","data-testid":"assistant-chat-panel",children:(0,a.jsxs)("div",{className:"flex h-[78vh] min-h-[34rem] max-h-[48rem] flex-col gap-4 overflow-hidden bg-gradient-to-br from-transparent to-accent-500/5 p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_auto]",children:[(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.16em] text-muted-foreground",children:t("assistant.repositoryLabel")}),(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.16em] text-muted-foreground",children:t("assistant.cliLabel")}),(0,a.jsx)("span",{className:"hidden md:block"})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_auto] md:items-center",children:[(0,a.jsxs)("select",{value:h,onChange:e=>void es(e.target.value),disabled:0===n.length,className:"w-full rounded-lg border border-input bg-surface px-3 py-2 text-sm text-foreground shadow-sm transition-colors focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-repo-select",children:[0===n.length&&(0,a.jsx)("option",{value:"",children:t("assistant.noRepositories")}),n.map(e=>(0,a.jsx)("option",{value:e.id,children:e.displayName||e.name},e.id))]}),(0,a.jsx)("select",{value:f,onChange:e=>q(e.target.value),disabled:O,className:"w-full rounded-lg border border-input bg-surface px-3 py-2 text-sm text-foreground shadow-sm transition-colors focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-tool-select",children:V.map(e=>(0,a.jsx)("option",{value:e.id,disabled:!e.installed,children:e.installed?e.name:t("assistant.toolNotInstalled",{name:e.name})},e.id))}),(0,a.jsx)("div",{children:O?(0,a.jsx)(l.$n,{variant:"danger",onClick:X,disabled:I,className:"w-full md:w-auto","data-testid":"assistant-stop-button",children:I?t("assistant.stopping"):t("assistant.stop")}):(0,a.jsx)(l.$n,{variant:"primary",onClick:Q,disabled:!h||E,className:"w-full md:w-auto","data-testid":"assistant-start-button",children:E?t("assistant.starting"):t("assistant.start")})})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:$?t("assistant.startDirectory",{repository:$.displayName||$.name,path:$.path}):t("assistant.startDirectoryHint")})]}),k&&(0,a.jsx)("div",{className:"rounded border border-danger/40 bg-danger/10 p-2 text-sm text-danger-foreground",children:k}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:t("assistant.history")}),(0,a.jsxs)(l.$n,{type:"button",variant:"ghost",size:"sm",onClick:Y,disabled:!b||R||B||0===y.length,className:"gap-1","data-testid":"assistant-clear-button",children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),R?t("assistant.clearing"):t("assistant.clearHistory")]})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:F&&0===y.length?(0,a.jsx)("div",{className:"h-full min-h-0 overflow-hidden rounded-xl border border-border bg-surface-2 p-3","data-testid":"assistant-chat-loading",role:"status","aria-label":t("assistant.loadingConversation"),children:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(l.EA,{className:"ml-auto h-10 w-3/5 rounded-2xl"}),(0,a.jsx)(l.EA,{className:"mr-auto h-16 w-4/5 rounded-2xl"}),(0,a.jsx)(l.EA,{className:"ml-auto h-10 w-2/5 rounded-2xl"})]})}):(0,a.jsx)(j,{messages:y,assistantLabel:J,sessionActive:O,waitingForResponse:B,canEdit:W,onEditMessage:et})}),(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(d,{onSend:ee,disabled:!W,placeholder:W?t("assistant.inputPlaceholder"):O?t("assistant.inputPlaceholderWaiting"):t("assistant.inputPlaceholderNoSession")})})]})]})})}function I(){return(0,a.jsx)(n.GV,{children:(0,a.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Assistant Chat"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Converse with a local CLI assistant (Claude or Codex) scoped to a selected repository."})]}),(0,a.jsx)(A,{})]})})}},71360:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(71847).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])}},e=>{e.O(0,[6481,6809,4909,2770,790,4974,8566,1191,6402,3898,6381,5229,8441,1255,7358],()=>e(e.s=38038)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[838],{38038:(e,t,s)=>{Promise.resolve().then(s.bind(s,60675))},53482:(e,t,s)=>{"use strict";s.d(t,{i:()=>c});var a=s(95155),n=s(12115),r=s(60322),i=s(9900);function o(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function l(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function c(e){let{text:t,className:s="",label:c="Copy"}=e,[d,u]=(0,n.useState)(!1),m=(0,n.useRef)(null);(0,n.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let p=(0,n.useCallback)(async()=>{try{await (0,r.l)(t),u(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>u(!1),i.s7)}catch(e){}},[t]);return(0,a.jsxs)("button",{type:"button",onClick:p,className:"inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted ".concat(s),"aria-label":d?"Copied":c,title:d?"Copied!":c,children:[d?(0,a.jsx)(l,{}):(0,a.jsx)(o,{}),(0,a.jsx)("span",{children:d?"Copied":c})]})}},60322:(e,t,s)=>{"use strict";s.d(t,{l:()=>n});let a=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function n(e){var t;if(!e||0===e.trim().length)return;let s=e.replace(a,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(s);return}catch(e){}let n=document.createElement("textarea");n.value=s,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}}},60675:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>I});var a=s(95155),n=s(15229),r=s(12115),i=s(18955),o=s(71360),l=s(43361),c=s(36402);let d=(0,r.memo)(function(e){let{onSend:t,disabled:s=!1,placeholder:n}=e,o=(0,i.c)("home"),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),x=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=x.current;e&&(c?(e.style.height="auto",e.style.height="".concat(Math.min(e.scrollHeight,120),"px")):e.style.height="24px")},[c]);let b=(0,r.useCallback)(async()=>{if(!p&&c.trim()&&!u&&!s)try{m(!0),await t(c.trim()),d("")}catch(e){}finally{m(!1)}},[p,c,u,s,t]),v=(0,r.useCallback)(async e=>{e.preventDefault(),await b()},[b]),y=(0,r.useCallback)(()=>{h(!0),g.current=!1,f.current&&clearTimeout(f.current)},[]),w=(0,r.useCallback)(()=>{h(!1),g.current=!0,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{g.current=!1},300)},[]),j=(0,r.useCallback)(e=>{let{keyCode:t}=e.nativeEvent;if(229!==t){if(g.current&&"Enter"===e.key){g.current=!1;return}"Enter"!==e.key||p||e.shiftKey||(e.preventDefault(),b())}},[p,b]);return(0,a.jsxs)("form",{onSubmit:v,className:"flex shrink-0 items-center gap-2 rounded-lg border border-input bg-surface dark:bg-surface-2 px-3 py-1.5 focus-within:border-accent-500 focus-within:ring-1 focus-within:ring-accent-500","data-testid":"assistant-message-input",children:[(0,a.jsx)("textarea",{ref:x,value:c,onChange:e=>d(e.target.value),onKeyDown:j,onCompositionStart:y,onCompositionEnd:w,placeholder:null!=n?n:o("assistant.input.defaultPlaceholder"),disabled:u||s,rows:1,className:"flex-1 outline-none bg-transparent resize-none overflow-y-auto scrollbar-thin text-sm",style:{minHeight:"24px",maxHeight:"120px",paddingTop:"4px",paddingBottom:"4px",lineHeight:"18px"},"data-testid":"assistant-message-textarea"}),(0,a.jsx)(l.$n,{type:"submit",variant:"ghost",disabled:!c.trim()||u||s,className:"flex-shrink-0 rounded-full p-1.5 text-accent-600 hover:bg-accent-50 dark:text-accent-400 dark:hover:bg-accent-900/30 disabled:text-muted-foreground disabled:hover:bg-transparent","aria-label":o("assistant.input.send"),"data-testid":"assistant-send-button",children:u?(0,a.jsx)(l.y$,{size:"sm"}):(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]})});var u=s(51238),m=s(22133),p=s(10934),h=s(5225);s(1226);var x=s(53482),f=s(3005);function g(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function b(){return(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function v(e){let{message:t}=e;return(0,a.jsx)("div",{className:"text-center text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:(0,a.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-3 py-1",children:t.content})})}function y(e){let{message:t,canEdit:s,onEdit:n}=e,o=(0,i.c)("home"),[l,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(t.content),[m,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(null),v=t.deliveryStatus?"pending"===t.deliveryStatus?o("assistant.message.sending"):"failed"===t.deliveryStatus?o("assistant.message.failed"):o("assistant.message.sent"):null,y=(0,r.useCallback)(()=>{u(t.content),f(null),c(!0)},[t.content]),w=(0,r.useCallback)(()=>{c(!1),f(null)},[]),j=(0,r.useCallback)(async()=>{if(!n||m)return;let e=d.trim();if(!e||e===t.content.trim())return void c(!1);p(!0),f(null);try{await n(t,e),c(!1)}catch(e){f(e instanceof Error?e.message:o("assistant.errors.resubmitMessage"))}finally{p(!1)}},[d,t,n,m,o]);return(0,a.jsxs)("div",{className:"group ml-auto max-w-[88%] rounded-2xl border border-accent-500/40 bg-accent-500/10 px-4 py-3 text-foreground shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3 text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:[(0,a.jsx)("span",{children:o("assistant.message.you")}),(0,a.jsx)("span",{children:g(t.timestamp)})]}),l?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("textarea",{className:"w-full resize-y rounded border border-input bg-surface p-2 text-sm text-foreground focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring",value:d,onChange:e=>u(e.target.value),rows:Math.max(3,Math.min(12,d.split("\n").length+1)),disabled:m,"data-testid":"assistant-edit-textarea"}),h&&(0,a.jsx)("p",{className:"text-[11px] text-danger-foreground",children:h}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:w,disabled:m,className:"rounded border border-border bg-surface px-3 py-1 text-[11px] text-foreground transition-colors hover:bg-muted disabled:opacity-50",children:o("assistant.message.cancel")}),(0,a.jsx)("button",{type:"button",onClick:j,disabled:m||!d.trim(),className:"rounded bg-accent-600 px-3 py-1 text-[11px] font-medium text-white transition-colors hover:bg-accent-700 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-edit-save",children:m?o("assistant.message.resending"):o("assistant.message.saveAndResend")})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words text-sm leading-6",children:t.content}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium ".concat("failed"===t.deliveryStatus?"text-danger-foreground":"text-muted-foreground"),children:null!=v?v:""}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 opacity-60 transition-opacity group-hover:opacity-100",children:[(0,a.jsx)(x.i,{text:t.content}),s&&n&&(0,a.jsxs)("button",{type:"button",onClick:y,className:"inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted","aria-label":o("assistant.message.editMessage"),"data-testid":"assistant-edit-button",title:o("assistant.message.editAndResend"),children:[(0,a.jsx)(b,{}),(0,a.jsx)("span",{children:o("assistant.message.edit")})]})]})]})]})]})}function w(e){let{message:t,assistantLabel:s}=e;return(0,a.jsxs)("div",{className:"group mr-auto max-w-[88%] rounded-2xl border border-border bg-surface px-4 py-3 text-foreground shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3 text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:[(0,a.jsx)("span",{children:s}),(0,a.jsx)("span",{children:g(t.timestamp)})]}),(0,a.jsx)("div",{className:"assistant-md text-sm leading-6",children:(0,a.jsx)(u.oz,{remarkPlugins:[m.A],rehypePlugins:[p.A,h.A],children:t.content})}),(0,a.jsx)("div",{className:"mt-2 flex justify-end opacity-60 transition-opacity group-hover:opacity-100",children:(0,a.jsx)(x.i,{text:t.content})})]})}function j(e){let{messages:t,assistantLabel:s,sessionActive:n,waitingForResponse:o=!1,canEdit:l=!1,onEditMessage:c}=e,d=(0,i.c)("home"),u=(0,r.useRef)(null),m=(0,r.useRef)(!0),p=(0,r.useMemo)(()=>{var e;let s=t[t.length-1];return s?"".concat(t.length,":").concat(s.id,":").concat(null!=(e=s.deliveryStatus)?e:"",":").concat(s.content.length,":").concat(o?"waiting":"idle"):"empty:".concat(o?"waiting":"idle")},[t,o]);(0,r.useEffect)(()=>{u.current&&m.current&&(u.current.scrollTop=u.current.scrollHeight)},[p]);let h=(0,r.useMemo)(()=>{let e=t[t.length-1];return n&&e&&"user"===e.role&&"failed"!==e.deliveryStatus?d("assistant.working"):d("assistant.emptyState")},[t,n,d]);return(0,a.jsx)("div",{ref:u,className:"h-full min-h-0 overflow-y-scroll rounded-xl border border-border bg-surface-2 p-3",style:{scrollbarGutter:"stable"},onScroll:e=>{let t=e.currentTarget;m.current=t.scrollHeight-t.scrollTop-t.clientHeight<48},"data-testid":"assistant-message-list",children:0!==t.length||o?(0,a.jsxs)("div",{className:"space-y-3",children:[t.map(e=>"system"===e.role&&"session_boundary"===e.messageType?(0,a.jsx)(v,{message:e},e.id):"user"===e.role?(0,a.jsx)(y,{message:e,canEdit:l,onEdit:c},e.id):(0,a.jsx)(w,{message:e,assistantLabel:s},e.id)),o&&(0,a.jsxs)("div",{className:"mr-auto flex max-w-[88%] items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 shadow-sm","data-testid":"assistant-waiting-indicator","aria-live":"polite",children:[(0,a.jsx)(f.y,{size:"sm",variant:"accent"}),(0,a.jsx)("span",{className:"text-sm text-foreground",children:d("assistant.thinking",{label:s})})]})]}):(0,a.jsx)("div",{className:"flex h-full min-h-[160px] items-center justify-center text-sm text-muted-foreground",children:h})})}function k(e){return e?{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),lastStartedAt:e.lastStartedAt?new Date(e.lastStartedAt):void 0,lastStoppedAt:e.lastStoppedAt?new Date(e.lastStoppedAt):void 0,contextSentAt:e.contextSentAt?new Date(e.contextSentAt):void 0}:null}function N(e){return{...e,timestamp:new Date(e.timestamp)}}let C={async getConversation(e,t){let s=await fetch("/api/assistant/conversation?repositoryId=".concat(encodeURIComponent(e),"&cliToolId=").concat(encodeURIComponent(t)));if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to get conversation (".concat(s.status,")"));return k((await s.json()).conversation)},async getMessages(e){let t=await fetch("/api/assistant/messages?conversationId=".concat(encodeURIComponent(e)));if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to get messages (".concat(t.status,")"));return(await t.json()).messages.map(N)},async clearMessages(e,t){var s;let a=new URLSearchParams({conversationId:e});(null==t?void 0:t.fromMessageId)&&a.set("fromMessageId",t.fromMessageId);let n=await fetch("/api/assistant/messages?".concat(a.toString()),{method:"DELETE"});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error||"Failed to clear messages (".concat(n.status,")"));return{archivedCount:null!=(s=(await n.json()).archivedCount)?s:0}},async startSession(e,t){let s=await fetch("/api/assistant/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:e,repositoryId:t})});if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to start session (".concat(s.status,")"));let a=await s.json();return{...a,conversation:k(a.conversation)}},async sendCommand(e,t,s){let a=await fetch("/api/assistant/terminal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:e,conversationId:t,command:s})});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to send command (".concat(a.status,")"))},async getCurrentOutput(e,t){let s=await fetch("/api/assistant/current-output?cliToolId=".concat(encodeURIComponent(e),"&conversationId=").concat(encodeURIComponent(t)));if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to get output (".concat(s.status,")"));return s.json()},async stopSession(e,t){let s=await fetch("/api/assistant/session?cliToolId=".concat(encodeURIComponent(e),"&conversationId=").concat(encodeURIComponent(t)),{method:"DELETE"});if(!s.ok)throw Error((await s.json().catch(()=>({}))).error||"Failed to stop session (".concat(s.status,")"));return s.json()},async getInstalledTools(){var e;let t=await fetch("/api/assistant/tools");return t.ok&&null!=(e=(await t.json()).tools)?e:[]}},S="commandmate-assistant-cli-tool",E=["claude","codex","antigravity"];function M(e){return E.includes(e)}function A(){var e;let t=(0,i.c)("home"),s=(0,c.SC)(),[n,u]=(0,r.useState)([]),[m,p]=(0,r.useState)([]),[h,x]=(0,r.useState)(""),[f,g]=(0,r.useState)("claude"),[b,v]=(0,r.useState)(null),[y,w]=(0,r.useState)([]),[k,N]=(0,r.useState)(null),[E,A]=(0,r.useState)(!1),[I,T]=(0,r.useState)(!1),[R,L]=(0,r.useState)(!1),[H,D]=(0,r.useState)(!1),[P,_]=(0,r.useState)(null),z="".concat(h,":").concat(f),F=!H||""!==h&&P!==z,U=(0,r.useRef)(null),O=(null==b?void 0:b.status)==="ready"||(null==b?void 0:b.status)==="running",B=(null==b?void 0:b.status)==="running",W=(null==b?void 0:b.status)==="ready",$=n.find(e=>e.id===h),V=(0,r.useMemo)(()=>m.filter(e=>M(e.id)),[m]),G=V.find(e=>e.id===f),J=null!=(e=null==G?void 0:G.name)?e:f,K=(0,r.useCallback)(async e=>{w(await C.getMessages(e))},[]),Z=(0,r.useCallback)(async()=>{if(!h){v(null),w([]);return}let e=await C.getConversation(h,f);v(e),e?await K(e.id):w([])},[K,h,f]);(0,r.useEffect)(()=>{{let e=localStorage.getItem(S);e&&M(e)&&g(e)}},[]),(0,r.useEffect)(()=>{async function e(){let e=await C.getInstalledTools();p(e);let t=e.filter(e=>M(e.id)),s=t.find(e=>e.installed);s&&g(e=>{let a=t.find(t=>t.id===e);return(null==a?void 0:a.installed)?e:s.id})}(async function(){try{var e;let t=await fetch("/api/worktrees");if(!t.ok)return;let s=(null!=(e=(await t.json()).repositories)?e:[]).map(e=>({id:e.id,path:e.path,name:e.name,displayName:e.displayName}));u(s),s.length>0&&x(e=>e||s[0].id)}catch(e){}finally{D(!0)}})(),e()},[]),(0,r.useEffect)(()=>{if(!h)return;let e=!1;return(async()=>{try{let t=await C.getConversation(h,f);if(e)return;if(v(t),t){let s=await C.getMessages(t.id);e||w(s)}else w([])}catch(s){e||N(s instanceof Error?s.message:t("assistant.errors.loadConversation"))}finally{e||_("".concat(h,":").concat(f))}})(),()=>{e=!0}},[h,f,t]),(0,r.useEffect)(()=>{if(U.current&&(clearInterval(U.current),U.current=null),!b)return;let e=async()=>{try{await Z()}catch(e){}};return e(),U.current=setInterval(e,2e3),()=>{U.current&&(clearInterval(U.current),U.current=null)}},[null==b?void 0:b.id,Z,b]);let q=(0,r.useCallback)(e=>{M(e)&&(g(e),localStorage.setItem(S,e))},[]),Q=(0,r.useCallback)(async()=>{if(h&&!E){A(!0),N(null);try{let e=await C.startSession(f,h);v(e.conversation),await K(e.conversation.id)}catch(e){N(e instanceof Error?e.message:t("assistant.errors.startSession"))}finally{A(!1)}}},[K,h,f,E,t]),X=(0,r.useCallback)(async()=>{if(b&&!I){T(!0),N(null);try{await C.stopSession(f,b.id),await Z()}catch(e){N(e instanceof Error?e.message:t("assistant.errors.stopSession"))}finally{T(!1)}}},[b,Z,f,I,t]),Y=(0,r.useCallback)(async()=>{if(b&&!R&&!B&&await s({description:t("assistant.clearHistoryConfirm"),variant:"danger"})){L(!0),N(null);try{await C.clearMessages(b.id),await Z()}catch(e){N(e instanceof Error?e.message:t("assistant.errors.clearHistory"))}finally{L(!1)}}},[R,b,B,Z,s,t]),ee=(0,r.useCallback)(async e=>{if(b&&W){N(null);try{await C.sendCommand(f,b.id,e),v(e=>e?{...e,status:"running"}:e),await Promise.all([K(b.id),Z()])}catch(e){throw N(e instanceof Error?e.message:t("assistant.errors.sendMessage")),e}}},[W,b,Z,K,f,t]),et=(0,r.useCallback)(async(e,s)=>{if(!b||!W)throw Error(t("assistant.errors.notReadyToResend"));N(null),await C.clearMessages(b.id,{fromMessageId:e.id}),await C.sendCommand(f,b.id,s),v(e=>e?{...e,status:"running"}:e),await Promise.all([K(b.id),Z()])},[W,b,Z,K,f,t]),es=(0,r.useCallback)(async e=>{if(O){if(!await s({description:t("assistant.changeRepoConfirm")}))return;try{await C.stopSession(f,b.id)}catch(e){N(e instanceof Error?e.message:t("assistant.errors.stopSession"));return}}x(e),N(null)},[b,O,f,s,t]);return(0,a.jsx)(l.Zp,{variant:"elevated",padding:"none",className:"overflow-hidden rounded-xl shadow-lg","data-testid":"assistant-chat-panel",children:(0,a.jsxs)("div",{className:"flex h-[78vh] min-h-[34rem] max-h-[48rem] flex-col gap-4 overflow-hidden bg-gradient-to-br from-transparent to-accent-500/5 p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_auto]",children:[(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.16em] text-muted-foreground",children:t("assistant.repositoryLabel")}),(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.16em] text-muted-foreground",children:t("assistant.cliLabel")}),(0,a.jsx)("span",{className:"hidden md:block"})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_auto] md:items-center",children:[(0,a.jsxs)("select",{value:h,onChange:e=>void es(e.target.value),disabled:0===n.length,className:"w-full rounded-lg border border-input bg-surface px-3 py-2 text-sm text-foreground shadow-sm transition-colors focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-repo-select",children:[0===n.length&&(0,a.jsx)("option",{value:"",children:t("assistant.noRepositories")}),n.map(e=>(0,a.jsx)("option",{value:e.id,children:e.displayName||e.name},e.id))]}),(0,a.jsx)("select",{value:f,onChange:e=>q(e.target.value),disabled:O,className:"w-full rounded-lg border border-input bg-surface px-3 py-2 text-sm text-foreground shadow-sm transition-colors focus:border-accent-500 focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground","data-testid":"assistant-tool-select",children:V.map(e=>(0,a.jsx)("option",{value:e.id,disabled:!e.installed,children:e.installed?e.name:t("assistant.toolNotInstalled",{name:e.name})},e.id))}),(0,a.jsx)("div",{children:O?(0,a.jsx)(l.$n,{variant:"danger",onClick:X,disabled:I,className:"w-full md:w-auto","data-testid":"assistant-stop-button",children:I?t("assistant.stopping"):t("assistant.stop")}):(0,a.jsx)(l.$n,{variant:"primary",onClick:Q,disabled:!h||E,className:"w-full md:w-auto","data-testid":"assistant-start-button",children:E?t("assistant.starting"):t("assistant.start")})})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:$?t("assistant.startDirectory",{repository:$.displayName||$.name,path:$.path}):t("assistant.startDirectoryHint")})]}),k&&(0,a.jsx)("div",{className:"rounded border border-danger/40 bg-danger/10 p-2 text-sm text-danger-foreground",children:k}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:t("assistant.history")}),(0,a.jsxs)(l.$n,{type:"button",variant:"ghost",size:"sm",onClick:Y,disabled:!b||R||B||0===y.length,className:"gap-1","data-testid":"assistant-clear-button",children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),R?t("assistant.clearing"):t("assistant.clearHistory")]})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:F&&0===y.length?(0,a.jsx)("div",{className:"h-full min-h-0 overflow-hidden rounded-xl border border-border bg-surface-2 p-3","data-testid":"assistant-chat-loading",role:"status","aria-label":t("assistant.loadingConversation"),children:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(l.EA,{className:"ml-auto h-10 w-3/5 rounded-2xl"}),(0,a.jsx)(l.EA,{className:"mr-auto h-16 w-4/5 rounded-2xl"}),(0,a.jsx)(l.EA,{className:"ml-auto h-10 w-2/5 rounded-2xl"})]})}):(0,a.jsx)(j,{messages:y,assistantLabel:J,sessionActive:O,waitingForResponse:B,canEdit:W,onEditMessage:et})}),(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(d,{onSend:ee,disabled:!W,placeholder:W?t("assistant.inputPlaceholder"):O?t("assistant.inputPlaceholderWaiting"):t("assistant.inputPlaceholderNoSession")})})]})]})})}function I(){return(0,a.jsx)(n.GV,{children:(0,a.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Assistant Chat"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Converse with a local CLI assistant (Claude or Codex) scoped to a selected repository."})]}),(0,a.jsx)(A,{})]})})}},71360:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(71847).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])}},e=>{e.O(0,[6481,6809,4909,2770,790,4974,8566,1191,6402,3361,6381,5229,8441,1255,7358],()=>e(e.s=38038)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{1150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),l=n(12115),o=n(24437);function a(e){return{default:e&&"default"in e?e.default:e}}n(36552);let u={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},i=function(e){let t={...u,...e},n=(0,l.lazy)(()=>t.loader().then(a)),i=t.loading;function s(e){let a=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,s=u?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(s,{...u?{fallback:a}:{},children:c})}return s.displayName="LoadableComponent",s}},8567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},24437:(e,t,n)=>{"use strict";function r(e){let{reason:t,children:n}=e;return n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(24553)},36552:(e,t,n)=>{"use strict";function r(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(8567),n(77278)},48935:(e,t,n)=>{Promise.resolve().then(n.bind(n,70462))},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u}});let n=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new r}function a(e){return l?l.bind(e):r.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},65380:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,O:()=>a});var r=n(95155),l=n(12115);let o=(0,l.createContext)(!1);function a(e){let{children:t,authEnabled:n}=e;return(0,r.jsx)(o.Provider,{value:n,children:t})}function u(){return(0,l.useContext)(o)}},67909:(e,t,n)=>{"use strict";n.d(t,{default:()=>l.a});var r=n(86278),l=n.n(r)},70462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(95155),l=n(12115),o=n(67909),a=n(18955),u=n(65380);let i=/(?:^|&)token=([^&]*)/;var s=n(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{1150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),l=n(12115),o=n(24437);function a(e){return{default:e&&"default"in e?e.default:e}}n(36552);let u={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},i=function(e){let t={...u,...e},n=(0,l.lazy)(()=>t.loader().then(a)),i=t.loading;function s(e){let a=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,s=u?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(s,{...u?{fallback:a}:{},children:c})}return s.displayName="LoadableComponent",s}},8567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},24437:(e,t,n)=>{"use strict";function r(e){let{reason:t,children:n}=e;return n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(24553)},36552:(e,t,n)=>{"use strict";function r(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(8567),n(77278)},48935:(e,t,n)=>{Promise.resolve().then(n.bind(n,70462))},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u}});let n=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new r}function a(e){return l?l.bind(e):r.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},65380:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,O:()=>a});var r=n(95155),l=n(12115);let o=(0,l.createContext)(!1);function a(e){let{children:t,authEnabled:n}=e;return(0,r.jsx)(o.Provider,{value:n,children:t})}function u(){return(0,l.useContext)(o)}},67909:(e,t,n)=>{"use strict";n.d(t,{default:()=>l.a});var r=n(86278),l=n.n(r)},70462:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(95155),l=n(12115),o=n(67909),a=n(18955),u=n(65380);let i=/(?:^|&)token=([^&]*)/;var s=n(43361);let c=(0,o.default)(()=>n.e(6271).then(n.bind(n,6271)).then(e=>({default:e.QrCodeGenerator})),{loadableGenerated:{webpack:()=>[6271]},ssr:!1});function d(){var e;let t=(0,a.c)("auth"),n=(0,u.H)(),[o,d]=(0,l.useState)(""),[f,h]=(0,l.useState)(null),[b,m]=(0,l.useState)(!1),[g,p]=(0,l.useState)(null),{autoLoginErrorKey:y,retryAfterSeconds:v,clearError:_}=function(e){let[t,n]=(0,l.useState)(null),[r,o]=(0,l.useState)(null),a=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{let t;if(!e||a.current)return;a.current=!0;let r=window.location.hash;if(!r)return;let l=(r.startsWith("#")?r.substring(1):r).match(i);if(l){history.replaceState(null,"","".concat(window.location.pathname).concat(window.location.search));try{t=decodeURIComponent(l[1])}catch(e){n("token_invalid");return}if(t=t.trim()){if(t.length>256)return void n("token_invalid");(async()=>{try{let e=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})});e.ok?window.location.href="/":401===e.status?n("token_invalid"):429===e.status?(o(function(e){if(!e)return null;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}(e.headers.get("Retry-After"))),n("rate_limited")):n("auto_login_failed")}catch(e){n("auto_login_failed")}})()}}},[e]),{autoLoginErrorKey:t,retryAfterSeconds:r,clearError:()=>{n(null),o(null)}}}(n),j={token_invalid:t("login.qr.tokenExpiredOrInvalid"),rate_limited:t("login.qr.rateLimited"),auto_login_failed:t("login.qr.autoLoginError")},x=y&&null!=(e=j[y])?e:null;async function w(e){e.preventDefault(),h(null),_(),m(!0);try{let e=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:o})});if(e.ok){window.location.href="/";return}if(429===e.status){let n=e.headers.get("Retry-After"),r=n?parseInt(n,10):900;p(r),h(t("error.lockedOut"));return}if(401===e.status)return void h(t("error.invalidToken"));h(t("error.unknownError"))}catch(e){h(t("error.unknownError"))}finally{m(!1)}}if((0,l.useEffect)(()=>{n||(window.location.href="/")},[n]),(0,l.useEffect)(()=>{null!==v&&p(v)},[v]),(0,l.useEffect)(()=>{if(null===g||g<=0)return;let e=setInterval(()=>{p(t=>null===t||t<=1?(clearInterval(e),null):t-1)},1e3);return()=>clearInterval(e)},[g]),!n)return null;let k=x||f;return(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,r.jsxs)("div",{className:"bg-surface p-8 rounded-lg shadow-md w-full max-w-md",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold mb-6 text-center text-foreground",children:t("login.title")}),(0,r.jsxs)("form",{onSubmit:w,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"token",className:"block text-sm font-medium text-foreground mb-1",children:t("login.tokenLabel")}),(0,r.jsx)(s.pd,{id:"token",type:"password",value:o,onChange:e=>d(e.target.value),placeholder:t("login.tokenPlaceholder"),autoFocus:!0,autoComplete:"off",disabled:null!==g&&g>0})]}),k&&(0,r.jsxs)("div",{className:"text-danger-foreground text-sm",children:[k,null!==g&&g>0&&(0,r.jsx)("div",{className:"mt-1",children:t("error.retryAfter",{minutes:Math.ceil(g/60)})})]}),(0,r.jsx)(s.$n,{type:"submit",fullWidth:!0,loading:b,disabled:!o||null!==g&&g>0,children:t("login.submitButton")})]}),(0,r.jsx)("div",{className:"hidden md:block",children:(0,r.jsx)(c,{})})]})})}},86278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let r=n(28140)._(n(1150));function l(e,t){var n;let l={};"function"==typeof e&&(l.loader=e);let o={...l,...t};return(0,r.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[6809,4909,2770,6402,3361,8441,1255,7358],()=>e(e.s=48935)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3310],{80867:(e,t,a)=>{Promise.resolve().then(a.bind(a,95775))},95775:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>T});var s=a(95155),r=a(52619),n=a.n(r),i=a(18955),l=a(15229),o=a(13898),d=a(12115);function c(e){var t;let{appId:a,pollInterval:r=3e4,showResponseTime:n=!1,compact:l=!1}=e,o=(0,i.c)("externalApps"),[c,m]=(0,d.useState)(null),[x,p]=(0,d.useState)(!0),u=(0,d.useCallback)(async()=>{try{let e=await fetch("/api/external-apps/".concat(a,"/health"));if(e.ok){let t=await e.json();m(t)}else m({id:a,healthy:!1,lastChecked:Date.now(),error:"Failed to check health"})}catch(e){m({id:a,healthy:!1,lastChecked:Date.now(),error:"Network error"})}finally{p(!1)}},[a]);if((0,d.useEffect)(()=>{u();let e=setInterval(u,r);return()=>clearInterval(e)},[u,r]),x)return(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-muted-foreground animate-pulse"}),!l&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:o("status.checking")})]});let h=null!=(t=null==c?void 0:c.healthy)&&t,f=h?"bg-success":"bg-muted-foreground",g=o(h?"status.running":"status.stopped");return l?(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(f),title:g}):(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(f)}),(0,s.jsx)("span",{className:"text-xs ".concat(h?"text-success-foreground":"text-muted-foreground"),children:g}),n&&(null==c?void 0:c.responseTime)!==void 0&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",c.responseTime,"ms)"]})]})}function m(e){var t;let{app:a,onEdit:r,onDelete:n}=e,l=(0,i.c)("externalApps"),m=(0,i.c)("common"),[x,p]=(0,d.useState)(!1),[u,h]=(0,d.useState)(!1),f=async()=>{h(!0);try{await n(a.id)}finally{h(!1),p(!1)}},g="/proxy/".concat(a.pathPrefix,"/");return(0,s.jsxs)(o.Zp,{padding:"md",className:"relative",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h4",{className:"text-base font-semibold text-foreground truncate",children:a.displayName}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 font-mono truncate",children:a.name})]}),(0,s.jsx)(o.Ex,{variant:{sveltekit:"warning",streamlit:"error",nextjs:"info",other:"gray"}[a.appType]||"gray",children:{sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"}[t=a.appType]||t})]}),(0,s.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.status")}),(0,s.jsx)(c,{appId:a.id,pollInterval:3e4})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.port")}),(0,s.jsxs)("span",{className:"text-sm font-mono text-foreground",children:[":",a.targetPort]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.path")}),(0,s.jsxs)("span",{className:"text-sm font-mono text-foreground truncate max-w-[150px]",children:["/proxy/",a.pathPrefix,"/"]})]}),a.websocketEnabled&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.websocket")}),(0,s.jsx)(o.Ex,{variant:"info",children:l("card.enabled")})]}),!a.enabled&&(0,s.jsx)("div",{className:"mt-2 py-1 px-2 bg-warning-subtle border border-warning-border rounded text-xs text-warning-foreground",children:l("card.disabledNotice")})]}),x?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:l("card.deleteConfirm",{name:a.displayName})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.$n,{variant:"danger",size:"sm",onClick:f,disabled:u,loading:u,children:l("card.delete")}),(0,s.jsx)(o.$n,{variant:"ghost",size:"sm",onClick:()=>p(!1),disabled:u,children:m("cancel")})]})]}):(0,s.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:()=>window.open(g,"_blank"),disabled:!a.enabled,children:l("card.open")}),(0,s.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:()=>r(a),children:l("card.settings")}),(0,s.jsx)(o.$n,{variant:"ghost",size:"sm",onClick:()=>p(!0),className:"text-danger-foreground hover:bg-danger-subtle",children:l("card.delete")})]})]})}var x=a(87531);let p={MIN:1024,MAX:65535},u=/^[a-zA-Z0-9-]+$/,h={sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"},f=["sveltekit","streamlit","nextjs","other"].map(e=>({value:e,label:h[e]}));function g(e){let{isOpen:t,onClose:a,editApp:r,onSave:n}=e,l=(0,i.c)("externalApps"),c=(0,i.c)("common"),m=!!r,[h,g]=(0,d.useState)(""),[b,j]=(0,d.useState)(""),[N,v]=(0,d.useState)(""),[y,k]=(0,d.useState)(""),[w,C]=(0,d.useState)(""),[S,P]=(0,d.useState)(!1),[T,A]=(0,d.useState)(""),[E,O]=(0,d.useState)(!0),[M,I]=(0,d.useState)({}),[F,$]=(0,d.useState)(!1),[D,z]=(0,d.useState)(null);(0,d.useEffect)(()=>{t&&(r?(g(r.displayName),j(r.name),v(r.pathPrefix),k(r.targetPort),C(r.appType),P(r.websocketEnabled),A(r.description||""),O(r.enabled)):(g(""),j(""),v(""),k(""),C(""),P(!1),A(""),O(!0)),I({}),z(null))},[t,r]);let Z=async e=>{e.preventDefault(),z(null);let t=function(e,t){var a,s,r,n;let i={};return((null==(a=e.displayName)?void 0:a.trim())||(i.displayName="Display name is required"),!t&&((null==(s=e.name)?void 0:s.trim())?u.test(e.name)||(i.name="Only alphanumeric characters and hyphens are allowed"):i.name="Identifier name is required",(null==(r=e.pathPrefix)?void 0:r.trim())?u.test(e.pathPrefix)||(i.pathPrefix="Only alphanumeric characters and hyphens are allowed"):i.pathPrefix="Path prefix is required"),e.targetPort)?"number"!=typeof e.targetPort||Number.isInteger(n=e.targetPort)&&n>=p.MIN&&n<=p.MAX||(i.targetPort="Port must be between ".concat(p.MIN," and ").concat(p.MAX)):i.targetPort="Port number is required",t||e.appType||(i.appType="App type is required"),i}({displayName:h,name:b,pathPrefix:N,targetPort:y,appType:w},m);if(Object.keys(t).length>0)return void I(t);I({}),$(!0);try{if(m&&r){let e=await fetch("/api/external-apps/".concat(r.id),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:h,description:T||void 0,targetPort:y||void 0,websocketEnabled:S,enabled:E})});if(!e.ok){let t=await e.json();throw Error(t.error||l("form.updateFailed"))}}else{let e=await fetch("/api/external-apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:h,name:b,pathPrefix:N,targetPort:y,appType:w,websocketEnabled:S,description:T||void 0})});if(!e.ok){let t=await e.json();throw Error(t.error||l("form.createFailed"))}}n(),a()}catch(e){z(e instanceof Error?e.message:l("form.genericError"))}finally{$(!1)}};return(0,s.jsx)(o.Jh,{isOpen:t,onClose:a,title:m?l("form.editTitle"):l("form.addTitle"),size:"md",children:(0,s.jsxs)("form",{onSubmit:Z,className:"space-y-4",children:[(0,s.jsx)("div",{className:"rounded-md bg-warning-subtle p-3 mb-4 border border-warning-border",children:(0,s.jsx)("p",{className:"text-sm text-warning-foreground",children:l("form.securityWarning")})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.displayName")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"displayName",type:"text",value:h,onChange:e=>g(e.target.value),className:M.displayName?"border-danger":"",placeholder:l("form.displayNamePlaceholder"),disabled:F}),M.displayName&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.displayName})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.identifierName")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"name",type:"text",value:b,onChange:e=>j(e.target.value),className:"font-mono ".concat(M.name?"border-danger":""),placeholder:l("form.identifierNamePlaceholder"),disabled:F}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.identifierNameHelp")}),M.name&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.name})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"pathPrefix",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.pathPrefix")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground mr-1",children:"/proxy/"}),(0,s.jsx)(o.pd,{id:"pathPrefix",type:"text",value:N,onChange:e=>v(e.target.value),className:"w-auto flex-1 font-mono ".concat(M.pathPrefix?"border-danger":""),placeholder:l("form.pathPrefixPlaceholder"),disabled:F}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground ml-1",children:"/"})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.pathPrefixHelp")}),M.pathPrefix&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.pathPrefix})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"targetPort",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.portNumber")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"targetPort",type:"number",value:y,onChange:e=>k(e.target.value?parseInt(e.target.value,10):""),className:"font-mono ".concat(M.targetPort?"border-danger":""),placeholder:l("form.portNumberPlaceholder"),min:p.MIN,max:p.MAX,disabled:F}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.portNumberHelp",{min:p.MIN,max:p.MAX})}),M.targetPort&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.targetPort})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"appType",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.appType")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsxs)("select",{id:"appType",value:w,onChange:e=>C(e.target.value),className:(0,x.cn)((0,o.j1)(),M.appType&&"border-danger"),disabled:F,children:[(0,s.jsx)("option",{value:"",children:l("form.appTypePlaceholder")}),f.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),M.appType&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.appType})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"description",className:"block text-sm font-medium text-foreground mb-1",children:l("form.description")}),(0,s.jsx)(o.k_,{id:"description",value:T,onChange:e=>A(e.target.value),placeholder:l("form.descriptionPlaceholder"),rows:2,disabled:F})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(o.dO,{id:"websocketEnabled",checked:S,onCheckedChange:P,disabled:F}),(0,s.jsx)("label",{htmlFor:"websocketEnabled",className:"text-sm text-foreground",children:l("form.websocketLabel")})]}),m&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(o.dO,{id:"enabled",checked:E,onCheckedChange:O,disabled:F}),(0,s.jsx)("label",{htmlFor:"enabled",className:"text-sm text-foreground",children:l("form.enabledLabel")})]}),D&&(0,s.jsx)("div",{className:"p-3 bg-danger-subtle border border-danger-border rounded text-sm text-danger-foreground",children:D}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t border-border",children:[(0,s.jsx)(o.$n,{type:"button",variant:"ghost",onClick:a,disabled:F,children:c("cancel")}),(0,s.jsx)(o.$n,{type:"submit",variant:"primary",loading:F,children:m?l("form.save"):l("form.add")})]})]})})}function b(){let e=(0,i.c)("externalApps"),t=(0,i.c)("common"),[a,r]=(0,d.useState)([]),[n,l]=(0,d.useState)(!0),[c,x]=(0,d.useState)(null),[p,u]=(0,d.useState)(!1),[h,f]=(0,d.useState)(null),b=(0,d.useCallback)(async()=>{try{x(null);let e=await fetch("/api/external-apps");if(!e.ok)throw Error("Failed to fetch external apps");let t=await e.json();r(t.apps||[])}catch(e){x(e instanceof Error?e.message:"An error occurred")}finally{l(!1)}},[]);(0,d.useEffect)(()=>{b();let e=setInterval(b,6e4);return()=>clearInterval(e)},[b]);let j=(0,d.useCallback)(e=>{f(e),u(!0)},[]),N=(0,d.useCallback)(()=>{f(null),u(!0)},[]),v=(0,d.useCallback)(async e=>{try{let t=await fetch("/api/external-apps/".concat(e),{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete app")}b()}catch(e){console.error("Failed to delete app:",e)}},[b]),y=(0,d.useCallback)(()=>{b()},[b]),k=(0,d.useCallback)(()=>{u(!1),f(null)},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:N,children:e("manager.addApp")})}),n?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,s.jsx)(o.y$,{size:"xl",variant:"accent"}),(0,s.jsx)("span",{className:"ml-3 text-muted-foreground",children:e("manager.loading")})]})}):c?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("p",{className:"text-danger-foreground mb-4",children:e("manager.loadError")}),(0,s.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:b,children:t("retry")})]})}):0===a.length?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-4",children:e("manager.empty")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:e("manager.emptyHelp")}),(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:N,children:e("manager.addFirst")})]})}):(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:a.map(e=>(0,s.jsx)(m,{app:e,onEdit:j,onDelete:v},e.id))}),(0,s.jsx)(g,{isOpen:p,onClose:k,editApp:h,onSave:y})]})}let j=(0,a(71847).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var N=a(94442),v=a(81978);function y(){return"undefined"!=typeof navigator&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}let k={enabled:!0,thresholdMinutes:10},w=[5,10,30,60];function C(){let e=(0,i.c)("notifications"),{showToast:t}=(0,N.dj)(),[a,r]=(0,d.useState)(!0),[n,l]=(0,d.useState)(!1),[c,m]=(0,d.useState)(!0),[x,p]=(0,d.useState)(!1),[u,h]=(0,d.useState)(null),[f,g]=(0,d.useState)(null),[b,v]=(0,d.useState)(!1),[k,w]=(0,d.useState)(null),[C,T]=(0,d.useState)({prompt:!0,completion:!0}),A=null!==k;(0,d.useEffect)(()=>{let e=!1;return(async()=>{let t=function(){var e,t;let a=y(),s="undefined"!=typeof navigator&&(!!/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!(null!=(e=(t=window).matchMedia)&&e.call(t,"(display-mode: standalone)").matches||!0===navigator.standalone);return{supported:a&&!s,iosNeedsInstall:s}}();e||(m(y()),p(t.iosNeedsInstall),"undefined"!=typeof Notification&&"denied"===Notification.permission&&v(!0));try{let t=await fetch("/api/push/vapid"),a=await t.json();e||(h(a.configured),g(a.publicKey))}catch(t){e||h(!1)}if(y())try{let t=await navigator.serviceWorker.getRegistration(),a=t?await t.pushManager.getSubscription():null;if(a&&!e){w(a.endpoint);let t=await fetch("/api/push/subscriptions?endpoint=".concat(encodeURIComponent(a.endpoint))),s=await t.json();s.subscribed&&s.subscription&&!e&&T(s.subscription.preferences)}}catch(e){}e||r(!1)})(),()=>{e=!0}},[]);let E=(0,d.useCallback)(async()=>{if(f){l(!0);try{var a;let s=await Notification.requestPermission();if("granted"!==s){v("denied"===s),t(e("toast.error"),"error");return}if(!await navigator.serviceWorker.getRegistration())return void t(e("toast.error"),"error");let r=await navigator.serviceWorker.ready,n=await r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),a=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),s=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);return s}(f)}),i=await fetch("/api/push/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subscription:n.toJSON(),deviceLabel:navigator.userAgent.slice(0,120)})});if(!i.ok)throw Error("subscribe request failed");let l=await i.json();w(n.endpoint),(null==(a=l.subscription)?void 0:a.preferences)&&T(l.subscription.preferences),v(!1),t(e("toast.enabled"),"success")}catch(a){t(e("toast.error"),"error")}finally{l(!1)}}},[f,t,e]),O=(0,d.useCallback)(async()=>{l(!0);try{var a;let s=await navigator.serviceWorker.getRegistration(),r=s?await s.pushManager.getSubscription():null,n=null!=(a=null==r?void 0:r.endpoint)?a:k;r&&await r.unsubscribe(),n&&await fetch("/api/push/subscriptions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:n})}),w(null),t(e("toast.disabled"),"info")}catch(a){t(e("toast.error"),"error")}finally{l(!1)}},[k,t,e]),M=(0,d.useCallback)(async(a,s)=>{if(!k)return;let r={...C,[a]:s};T(r);try{if(!(await fetch("/api/push/subscriptions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:k,preferences:r})})).ok)throw Error("update failed");t(e("toast.updated"),"success")}catch(a){T(C),t(e("toast.error"),"error")}},[k,C,t,e]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(o.Zp,{children:(0,s.jsx)(P,{})}),(0,s.jsx)(o.Zp,{children:a?(0,s.jsx)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:(0,s.jsx)(o.y$,{size:"sm"})}):c?x?(0,s.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"notifications-ios-guidance",children:e("ios.guidance")}):!1===u?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("notConfigured")}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")}),b&&(0,s.jsx)("p",{className:"text-sm text-danger-foreground","data-testid":"notifications-permission-denied",children:e("permission.denied")}),A?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:e("enabledOnThisDevice")}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("types.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("types.promptWaiting")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("types.promptWaitingDesc")})]}),(0,s.jsx)(o.dO,{checked:C.prompt,onCheckedChange:e=>M("prompt",e),disabled:n,"aria-label":e("types.promptWaiting"),"data-testid":"notifications-toggle-prompt"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("types.completion")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("types.completionDesc")})]}),(0,s.jsx)(o.dO,{checked:C.completion,onCheckedChange:e=>M("completion",e),disabled:n,"aria-label":e("types.completion"),"data-testid":"notifications-toggle-completion"})]})]}),(0,s.jsx)(o.$n,{variant:"secondary",onClick:O,disabled:n,"data-testid":"notifications-unsubscribe",children:e("unsubscribe")})]}):(0,s.jsxs)(o.$n,{variant:"primary",onClick:E,disabled:n||b||!f,"data-testid":"notifications-enable",children:[(0,s.jsx)(j,{className:"h-4 w-4"}),n?e("enabling"):e("enable")]})]}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("unsupported")})}),(0,s.jsx)(o.Zp,{children:(0,s.jsx)(S,{})})]})}function S(){let e=(0,i.c)("notifications"),{showToast:t}=(0,N.dj)(),[a,r]=(0,d.useState)(!0),[n,l]=(0,d.useState)(!1),[c,m]=(0,d.useState)(k),[x,p]=(0,d.useState)([...w]);(0,d.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/push/escalation"),a=await t.json();!e&&(a.settings&&m(a.settings),Array.isArray(a.choices)&&a.choices.length>0&&p(a.choices))}catch(e){}finally{e||r(!1)}})(),()=>{e=!0}},[]);let u=(0,d.useCallback)(async a=>{m(a),l(!0);try{if(!(await fetch("/api/push/escalation",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:a})})).ok)throw Error("update failed");t(e("toast.updated"),"success")}catch(a){m(c),t(e("toast.error"),"error")}finally{l(!1)}},[c,t,e]);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("escalation.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("escalation.toggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("escalation.toggleDesc")})]}),(0,s.jsx)(o.dO,{checked:c.enabled,onCheckedChange:e=>u({...c,enabled:e}),disabled:a||n,"aria-label":e("escalation.toggle"),"data-testid":"notifications-toggle-escalation"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-sm text-foreground",children:e("escalation.threshold")}),(0,s.jsx)("select",{className:"rounded-md border border-border bg-background px-2 py-1 text-sm text-foreground",value:String(c.thresholdMinutes),disabled:a||n||!c.enabled,"aria-label":e("escalation.threshold"),"data-testid":"notifications-escalation-threshold",onChange:e=>u({...c,thresholdMinutes:Number(e.target.value)}),children:x.map(t=>(0,s.jsx)("option",{value:String(t),children:e("escalation.minutes",{count:t})},t))})]})]})}function P(){let e=(0,i.c)("notifications"),{enabled:t,setEnabled:a}=(0,v.qG)(),{enabled:r,setEnabled:n}=(0,v.Ql)();return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("inApp.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("inApp.waitingToggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("inApp.waitingToggleDesc")})]}),(0,s.jsx)(o.dO,{checked:t,onCheckedChange:a,"aria-label":e("inApp.waitingToggle"),"data-testid":"notifications-toggle-inapp-waiting"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("inApp.soundToggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("inApp.soundToggleDesc")})]}),(0,s.jsx)(o.dO,{checked:r,onCheckedChange:n,"aria-label":e("inApp.soundToggle"),"data-testid":"notifications-toggle-inapp-sound"})]})]})}function T(){let e=(0,i.c)("notifications"),t=(0,i.c)("common"),a=(0,i.c)("skills");return(0,s.jsx)(l.GV,{children:(0,s.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"More"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Settings, external apps, and more."})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"Quick Links"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsx)(n(),{href:"/repositories",className:"block","data-testid":"more-link-repositories",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:"Repositories"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Manage repositories and worktrees"})]})}),(0,s.jsx)(n(),{href:"/skills",className:"block","data-testid":"more-link-skills",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:t("nav.skills")}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:a("page.description")})]})}),(0,s.jsx)(n(),{href:"/skills/installed",className:"block","data-testid":"more-link-skills-installed",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:a("dashboard.title")}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:a("dashboard.description")})]})})]})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:e("title")}),(0,s.jsx)(C,{})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"External Apps"}),(0,s.jsx)(b,{})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"About"}),(0,s.jsx)(o.Zp,{children:(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"CommandMate - A local control plane for agent CLIs."})})]})]})})}a(72604),a(95275),a(79832)}},e=>{e.O(0,[6809,4909,2770,790,4974,6402,3898,6381,5229,4322,8441,1255,7358],()=>e(e.s=80867)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3310],{80867:(e,t,a)=>{Promise.resolve().then(a.bind(a,95775))},95775:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>T});var s=a(95155),r=a(52619),n=a.n(r),i=a(18955),l=a(15229),o=a(43361),d=a(12115);function c(e){var t;let{appId:a,pollInterval:r=3e4,showResponseTime:n=!1,compact:l=!1}=e,o=(0,i.c)("externalApps"),[c,m]=(0,d.useState)(null),[x,p]=(0,d.useState)(!0),u=(0,d.useCallback)(async()=>{try{let e=await fetch("/api/external-apps/".concat(a,"/health"));if(e.ok){let t=await e.json();m(t)}else m({id:a,healthy:!1,lastChecked:Date.now(),error:"Failed to check health"})}catch(e){m({id:a,healthy:!1,lastChecked:Date.now(),error:"Network error"})}finally{p(!1)}},[a]);if((0,d.useEffect)(()=>{u();let e=setInterval(u,r);return()=>clearInterval(e)},[u,r]),x)return(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-muted-foreground animate-pulse"}),!l&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:o("status.checking")})]});let h=null!=(t=null==c?void 0:c.healthy)&&t,f=h?"bg-success":"bg-muted-foreground",g=o(h?"status.running":"status.stopped");return l?(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(f),title:g}):(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(f)}),(0,s.jsx)("span",{className:"text-xs ".concat(h?"text-success-foreground":"text-muted-foreground"),children:g}),n&&(null==c?void 0:c.responseTime)!==void 0&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",c.responseTime,"ms)"]})]})}function m(e){var t;let{app:a,onEdit:r,onDelete:n}=e,l=(0,i.c)("externalApps"),m=(0,i.c)("common"),[x,p]=(0,d.useState)(!1),[u,h]=(0,d.useState)(!1),f=async()=>{h(!0);try{await n(a.id)}finally{h(!1),p(!1)}},g="/proxy/".concat(a.pathPrefix,"/");return(0,s.jsxs)(o.Zp,{padding:"md",className:"relative",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h4",{className:"text-base font-semibold text-foreground truncate",children:a.displayName}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 font-mono truncate",children:a.name})]}),(0,s.jsx)(o.Ex,{variant:{sveltekit:"warning",streamlit:"error",nextjs:"info",other:"gray"}[a.appType]||"gray",children:{sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"}[t=a.appType]||t})]}),(0,s.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.status")}),(0,s.jsx)(c,{appId:a.id,pollInterval:3e4})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.port")}),(0,s.jsxs)("span",{className:"text-sm font-mono text-foreground",children:[":",a.targetPort]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.path")}),(0,s.jsxs)("span",{className:"text-sm font-mono text-foreground truncate max-w-[150px]",children:["/proxy/",a.pathPrefix,"/"]})]}),a.websocketEnabled&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:l("card.websocket")}),(0,s.jsx)(o.Ex,{variant:"info",children:l("card.enabled")})]}),!a.enabled&&(0,s.jsx)("div",{className:"mt-2 py-1 px-2 bg-warning-subtle border border-warning-border rounded text-xs text-warning-foreground",children:l("card.disabledNotice")})]}),x?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:l("card.deleteConfirm",{name:a.displayName})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.$n,{variant:"danger",size:"sm",onClick:f,disabled:u,loading:u,children:l("card.delete")}),(0,s.jsx)(o.$n,{variant:"ghost",size:"sm",onClick:()=>p(!1),disabled:u,children:m("cancel")})]})]}):(0,s.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:()=>window.open(g,"_blank"),disabled:!a.enabled,children:l("card.open")}),(0,s.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:()=>r(a),children:l("card.settings")}),(0,s.jsx)(o.$n,{variant:"ghost",size:"sm",onClick:()=>p(!0),className:"text-danger-foreground hover:bg-danger-subtle",children:l("card.delete")})]})]})}var x=a(87531);let p={MIN:1024,MAX:65535},u=/^[a-zA-Z0-9-]+$/,h={sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"},f=["sveltekit","streamlit","nextjs","other"].map(e=>({value:e,label:h[e]}));function g(e){let{isOpen:t,onClose:a,editApp:r,onSave:n}=e,l=(0,i.c)("externalApps"),c=(0,i.c)("common"),m=!!r,[h,g]=(0,d.useState)(""),[b,j]=(0,d.useState)(""),[N,v]=(0,d.useState)(""),[y,k]=(0,d.useState)(""),[w,C]=(0,d.useState)(""),[S,P]=(0,d.useState)(!1),[T,A]=(0,d.useState)(""),[E,O]=(0,d.useState)(!0),[M,I]=(0,d.useState)({}),[F,$]=(0,d.useState)(!1),[D,z]=(0,d.useState)(null);(0,d.useEffect)(()=>{t&&(r?(g(r.displayName),j(r.name),v(r.pathPrefix),k(r.targetPort),C(r.appType),P(r.websocketEnabled),A(r.description||""),O(r.enabled)):(g(""),j(""),v(""),k(""),C(""),P(!1),A(""),O(!0)),I({}),z(null))},[t,r]);let Z=async e=>{e.preventDefault(),z(null);let t=function(e,t){var a,s,r,n;let i={};return((null==(a=e.displayName)?void 0:a.trim())||(i.displayName="Display name is required"),!t&&((null==(s=e.name)?void 0:s.trim())?u.test(e.name)||(i.name="Only alphanumeric characters and hyphens are allowed"):i.name="Identifier name is required",(null==(r=e.pathPrefix)?void 0:r.trim())?u.test(e.pathPrefix)||(i.pathPrefix="Only alphanumeric characters and hyphens are allowed"):i.pathPrefix="Path prefix is required"),e.targetPort)?"number"!=typeof e.targetPort||Number.isInteger(n=e.targetPort)&&n>=p.MIN&&n<=p.MAX||(i.targetPort="Port must be between ".concat(p.MIN," and ").concat(p.MAX)):i.targetPort="Port number is required",t||e.appType||(i.appType="App type is required"),i}({displayName:h,name:b,pathPrefix:N,targetPort:y,appType:w},m);if(Object.keys(t).length>0)return void I(t);I({}),$(!0);try{if(m&&r){let e=await fetch("/api/external-apps/".concat(r.id),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:h,description:T||void 0,targetPort:y||void 0,websocketEnabled:S,enabled:E})});if(!e.ok){let t=await e.json();throw Error(t.error||l("form.updateFailed"))}}else{let e=await fetch("/api/external-apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:h,name:b,pathPrefix:N,targetPort:y,appType:w,websocketEnabled:S,description:T||void 0})});if(!e.ok){let t=await e.json();throw Error(t.error||l("form.createFailed"))}}n(),a()}catch(e){z(e instanceof Error?e.message:l("form.genericError"))}finally{$(!1)}};return(0,s.jsx)(o.Jh,{isOpen:t,onClose:a,title:m?l("form.editTitle"):l("form.addTitle"),size:"md",children:(0,s.jsxs)("form",{onSubmit:Z,className:"space-y-4",children:[(0,s.jsx)("div",{className:"rounded-md bg-warning-subtle p-3 mb-4 border border-warning-border",children:(0,s.jsx)("p",{className:"text-sm text-warning-foreground",children:l("form.securityWarning")})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.displayName")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"displayName",type:"text",value:h,onChange:e=>g(e.target.value),className:M.displayName?"border-danger":"",placeholder:l("form.displayNamePlaceholder"),disabled:F}),M.displayName&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.displayName})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.identifierName")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"name",type:"text",value:b,onChange:e=>j(e.target.value),className:"font-mono ".concat(M.name?"border-danger":""),placeholder:l("form.identifierNamePlaceholder"),disabled:F}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.identifierNameHelp")}),M.name&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.name})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"pathPrefix",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.pathPrefix")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground mr-1",children:"/proxy/"}),(0,s.jsx)(o.pd,{id:"pathPrefix",type:"text",value:N,onChange:e=>v(e.target.value),className:"w-auto flex-1 font-mono ".concat(M.pathPrefix?"border-danger":""),placeholder:l("form.pathPrefixPlaceholder"),disabled:F}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground ml-1",children:"/"})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.pathPrefixHelp")}),M.pathPrefix&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.pathPrefix})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"targetPort",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.portNumber")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(o.pd,{id:"targetPort",type:"number",value:y,onChange:e=>k(e.target.value?parseInt(e.target.value,10):""),className:"font-mono ".concat(M.targetPort?"border-danger":""),placeholder:l("form.portNumberPlaceholder"),min:p.MIN,max:p.MAX,disabled:F}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("form.portNumberHelp",{min:p.MIN,max:p.MAX})}),M.targetPort&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.targetPort})]}),!m&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"appType",className:"block text-sm font-medium text-foreground mb-1",children:[l("form.appType")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsxs)("select",{id:"appType",value:w,onChange:e=>C(e.target.value),className:(0,x.cn)((0,o.j1)(),M.appType&&"border-danger"),disabled:F,children:[(0,s.jsx)("option",{value:"",children:l("form.appTypePlaceholder")}),f.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),M.appType&&(0,s.jsx)("p",{className:"mt-1 text-xs text-danger",children:M.appType})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"description",className:"block text-sm font-medium text-foreground mb-1",children:l("form.description")}),(0,s.jsx)(o.k_,{id:"description",value:T,onChange:e=>A(e.target.value),placeholder:l("form.descriptionPlaceholder"),rows:2,disabled:F})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(o.dO,{id:"websocketEnabled",checked:S,onCheckedChange:P,disabled:F}),(0,s.jsx)("label",{htmlFor:"websocketEnabled",className:"text-sm text-foreground",children:l("form.websocketLabel")})]}),m&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(o.dO,{id:"enabled",checked:E,onCheckedChange:O,disabled:F}),(0,s.jsx)("label",{htmlFor:"enabled",className:"text-sm text-foreground",children:l("form.enabledLabel")})]}),D&&(0,s.jsx)("div",{className:"p-3 bg-danger-subtle border border-danger-border rounded text-sm text-danger-foreground",children:D}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t border-border",children:[(0,s.jsx)(o.$n,{type:"button",variant:"ghost",onClick:a,disabled:F,children:c("cancel")}),(0,s.jsx)(o.$n,{type:"submit",variant:"primary",loading:F,children:m?l("form.save"):l("form.add")})]})]})})}function b(){let e=(0,i.c)("externalApps"),t=(0,i.c)("common"),[a,r]=(0,d.useState)([]),[n,l]=(0,d.useState)(!0),[c,x]=(0,d.useState)(null),[p,u]=(0,d.useState)(!1),[h,f]=(0,d.useState)(null),b=(0,d.useCallback)(async()=>{try{x(null);let e=await fetch("/api/external-apps");if(!e.ok)throw Error("Failed to fetch external apps");let t=await e.json();r(t.apps||[])}catch(e){x(e instanceof Error?e.message:"An error occurred")}finally{l(!1)}},[]);(0,d.useEffect)(()=>{b();let e=setInterval(b,6e4);return()=>clearInterval(e)},[b]);let j=(0,d.useCallback)(e=>{f(e),u(!0)},[]),N=(0,d.useCallback)(()=>{f(null),u(!0)},[]),v=(0,d.useCallback)(async e=>{try{let t=await fetch("/api/external-apps/".concat(e),{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete app")}b()}catch(e){console.error("Failed to delete app:",e)}},[b]),y=(0,d.useCallback)(()=>{b()},[b]),k=(0,d.useCallback)(()=>{u(!1),f(null)},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:N,children:e("manager.addApp")})}),n?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,s.jsx)(o.y$,{size:"xl",variant:"accent"}),(0,s.jsx)("span",{className:"ml-3 text-muted-foreground",children:e("manager.loading")})]})}):c?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("p",{className:"text-danger-foreground mb-4",children:e("manager.loadError")}),(0,s.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:b,children:t("retry")})]})}):0===a.length?(0,s.jsx)(o.Zp,{padding:"lg",children:(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-4",children:e("manager.empty")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:e("manager.emptyHelp")}),(0,s.jsx)(o.$n,{variant:"primary",size:"sm",onClick:N,children:e("manager.addFirst")})]})}):(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:a.map(e=>(0,s.jsx)(m,{app:e,onEdit:j,onDelete:v},e.id))}),(0,s.jsx)(g,{isOpen:p,onClose:k,editApp:h,onSave:y})]})}let j=(0,a(71847).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var N=a(94442),v=a(81978);function y(){return"undefined"!=typeof navigator&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}let k={enabled:!0,thresholdMinutes:10},w=[5,10,30,60];function C(){let e=(0,i.c)("notifications"),{showToast:t}=(0,N.dj)(),[a,r]=(0,d.useState)(!0),[n,l]=(0,d.useState)(!1),[c,m]=(0,d.useState)(!0),[x,p]=(0,d.useState)(!1),[u,h]=(0,d.useState)(null),[f,g]=(0,d.useState)(null),[b,v]=(0,d.useState)(!1),[k,w]=(0,d.useState)(null),[C,T]=(0,d.useState)({prompt:!0,completion:!1}),A=null!==k;(0,d.useEffect)(()=>{let e=!1;return(async()=>{let t=function(){var e,t;let a=y(),s="undefined"!=typeof navigator&&(!!/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!(null!=(e=(t=window).matchMedia)&&e.call(t,"(display-mode: standalone)").matches||!0===navigator.standalone);return{supported:a&&!s,iosNeedsInstall:s}}();e||(m(y()),p(t.iosNeedsInstall),"undefined"!=typeof Notification&&"denied"===Notification.permission&&v(!0));try{let t=await fetch("/api/push/vapid"),a=await t.json();e||(h(a.configured),g(a.publicKey))}catch(t){e||h(!1)}if(y())try{let t=await navigator.serviceWorker.getRegistration(),a=t?await t.pushManager.getSubscription():null;if(a&&!e){w(a.endpoint);let t=await fetch("/api/push/subscriptions?endpoint=".concat(encodeURIComponent(a.endpoint))),s=await t.json();s.subscribed&&s.subscription&&!e&&T(s.subscription.preferences)}}catch(e){}e||r(!1)})(),()=>{e=!0}},[]);let E=(0,d.useCallback)(async()=>{if(f){l(!0);try{var a;let s=await Notification.requestPermission();if("granted"!==s){v("denied"===s),t(e("toast.error"),"error");return}if(!await navigator.serviceWorker.getRegistration())return void t(e("toast.error"),"error");let r=await navigator.serviceWorker.ready,n=await r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),a=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),s=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);return s}(f)}),i=await fetch("/api/push/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subscription:n.toJSON(),deviceLabel:navigator.userAgent.slice(0,120)})});if(!i.ok)throw Error("subscribe request failed");let l=await i.json();w(n.endpoint),(null==(a=l.subscription)?void 0:a.preferences)&&T(l.subscription.preferences),v(!1),t(e("toast.enabled"),"success")}catch(a){t(e("toast.error"),"error")}finally{l(!1)}}},[f,t,e]),O=(0,d.useCallback)(async()=>{l(!0);try{var a;let s=await navigator.serviceWorker.getRegistration(),r=s?await s.pushManager.getSubscription():null,n=null!=(a=null==r?void 0:r.endpoint)?a:k;r&&await r.unsubscribe(),n&&await fetch("/api/push/subscriptions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:n})}),w(null),t(e("toast.disabled"),"info")}catch(a){t(e("toast.error"),"error")}finally{l(!1)}},[k,t,e]),M=(0,d.useCallback)(async(a,s)=>{if(!k)return;let r={...C,[a]:s};T(r);try{if(!(await fetch("/api/push/subscriptions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:k,preferences:r})})).ok)throw Error("update failed");t(e("toast.updated"),"success")}catch(a){T(C),t(e("toast.error"),"error")}},[k,C,t,e]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(o.Zp,{children:(0,s.jsx)(P,{})}),(0,s.jsx)(o.Zp,{children:a?(0,s.jsx)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:(0,s.jsx)(o.y$,{size:"sm"})}):c?x?(0,s.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"notifications-ios-guidance",children:e("ios.guidance")}):!1===u?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("notConfigured")}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")}),b&&(0,s.jsx)("p",{className:"text-sm text-danger-foreground","data-testid":"notifications-permission-denied",children:e("permission.denied")}),A?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:e("enabledOnThisDevice")}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("types.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("types.promptWaiting")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("types.promptWaitingDesc")})]}),(0,s.jsx)(o.dO,{checked:C.prompt,onCheckedChange:e=>M("prompt",e),disabled:n,"aria-label":e("types.promptWaiting"),"data-testid":"notifications-toggle-prompt"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("types.completion")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("types.completionDesc")})]}),(0,s.jsx)(o.dO,{checked:C.completion,onCheckedChange:e=>M("completion",e),disabled:n,"aria-label":e("types.completion"),"data-testid":"notifications-toggle-completion"})]})]}),(0,s.jsx)(o.$n,{variant:"secondary",onClick:O,disabled:n,"data-testid":"notifications-unsubscribe",children:e("unsubscribe")})]}):(0,s.jsxs)(o.$n,{variant:"primary",onClick:E,disabled:n||b||!f,"data-testid":"notifications-enable",children:[(0,s.jsx)(j,{className:"h-4 w-4"}),n?e("enabling"):e("enable")]})]}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("unsupported")})}),(0,s.jsx)(o.Zp,{children:(0,s.jsx)(S,{})})]})}function S(){let e=(0,i.c)("notifications"),{showToast:t}=(0,N.dj)(),[a,r]=(0,d.useState)(!0),[n,l]=(0,d.useState)(!1),[c,m]=(0,d.useState)(k),[x,p]=(0,d.useState)([...w]);(0,d.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/push/escalation"),a=await t.json();!e&&(a.settings&&m(a.settings),Array.isArray(a.choices)&&a.choices.length>0&&p(a.choices))}catch(e){}finally{e||r(!1)}})(),()=>{e=!0}},[]);let u=(0,d.useCallback)(async a=>{m(a),l(!0);try{if(!(await fetch("/api/push/escalation",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:a})})).ok)throw Error("update failed");t(e("toast.updated"),"success")}catch(a){m(c),t(e("toast.error"),"error")}finally{l(!1)}},[c,t,e]);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("escalation.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("escalation.toggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("escalation.toggleDesc")})]}),(0,s.jsx)(o.dO,{checked:c.enabled,onCheckedChange:e=>u({...c,enabled:e}),disabled:a||n,"aria-label":e("escalation.toggle"),"data-testid":"notifications-toggle-escalation"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-sm text-foreground",children:e("escalation.threshold")}),(0,s.jsx)("select",{className:"rounded-md border border-border bg-background px-2 py-1 text-sm text-foreground",value:String(c.thresholdMinutes),disabled:a||n||!c.enabled,"aria-label":e("escalation.threshold"),"data-testid":"notifications-escalation-threshold",onChange:e=>u({...c,thresholdMinutes:Number(e.target.value)}),children:x.map(t=>(0,s.jsx)("option",{value:String(t),children:e("escalation.minutes",{count:t})},t))})]})]})}function P(){let e=(0,i.c)("notifications"),{enabled:t,setEnabled:a}=(0,v.qG)(),{enabled:r,setEnabled:n}=(0,v.Ql)();return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e("inApp.heading")}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("inApp.waitingToggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("inApp.waitingToggleDesc")})]}),(0,s.jsx)(o.dO,{checked:t,onCheckedChange:a,"aria-label":e("inApp.waitingToggle"),"data-testid":"notifications-toggle-inapp-waiting"})]}),(0,s.jsxs)("label",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e("inApp.soundToggle")}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e("inApp.soundToggleDesc")})]}),(0,s.jsx)(o.dO,{checked:r,onCheckedChange:n,"aria-label":e("inApp.soundToggle"),"data-testid":"notifications-toggle-inapp-sound"})]})]})}function T(){let e=(0,i.c)("notifications"),t=(0,i.c)("common"),a=(0,i.c)("skills");return(0,s.jsx)(l.GV,{children:(0,s.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"More"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Settings, external apps, and more."})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"Quick Links"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsx)(n(),{href:"/repositories",className:"block","data-testid":"more-link-repositories",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:"Repositories"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Manage repositories and worktrees"})]})}),(0,s.jsx)(n(),{href:"/skills",className:"block","data-testid":"more-link-skills",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:t("nav.skills")}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:a("page.description")})]})}),(0,s.jsx)(n(),{href:"/skills/installed",className:"block","data-testid":"more-link-skills-installed",children:(0,s.jsxs)(o.Zp,{hover:!0,className:"transition-colors hover:border-accent-300 dark:hover:border-accent-700",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-foreground",children:a("dashboard.title")}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:a("dashboard.description")})]})})]})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:e("title")}),(0,s.jsx)(C,{})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"External Apps"}),(0,s.jsx)(b,{})]}),(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4 text-foreground",children:"About"}),(0,s.jsx)(o.Zp,{children:(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"CommandMate - A local control plane for agent CLIs."})})]})]})})}a(72604),a(95275),a(79832)}},e=>{e.O(0,[6809,4909,2770,790,4974,6402,3361,6381,5229,4322,8441,1255,7358],()=>e(e.s=80867)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{6473:(e,t,s)=>{"use strict";s.d(t,{Lc:()=>a,qz:()=>n});let n="animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(Number.isFinite(e)&&!(e<=0)&&!(e>=s))return"".concat(e*t,"ms")}},53292:(e,t,s)=>{"use strict";s.d(t,{Ll:()=>n,bu:()=>a});let n=2e3,a=4e3},54799:(e,t,s)=>{Promise.resolve().then(s.bind(s,75590))},75590:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>K});var n=s(95155),a=s(15229),o=s(66966),i=s(12115),r=s(18955);function d(e){let{worktrees:t}=e,s=(0,r.c)("home"),{runningCount:a,waitingCount:o}=(0,i.useMemo)(()=>{let e=0,s=0;for(let n of t)n.isSessionRunning&&(e++,n.isWaitingForResponse&&s++);return{runningCount:e,waitingCount:s}},[t]);return(0,n.jsxs)("div",{className:"mb-8",children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:s("title")}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":"home-subline",children:[(0,n.jsx)("span",{className:"tabular-nums","data-testid":"subline-running",children:a})," ",s("running"),(0,n.jsx)("span",{"aria-hidden":"true",children:" \xb7 "}),(0,n.jsx)("span",{className:"tabular-nums","data-testid":"subline-waiting",children:o})," ",s("waiting")]})]})}var l=s(52619),c=s.n(l),m=s(65229),u=s(61362),h=s(99051),x=s(13898),g=s(2317);function f(e){return"boolean"==typeof e}let p=[{key:"registerRepository",href:"/repositories"},{key:"sendFirstMessage",href:"/sessions"}];function j(e){let{worktrees:t,repositories:s,isLoading:a=!1,error:o=null}=e,d=(0,r.c)("home"),{value:l,setValue:j}=(0,g.V)({key:"commandmate:onboarding-dismissed",defaultValue:!1,validate:f}),[b,v]=(0,i.useState)(!1);(0,i.useEffect)(()=>v(!0),[]);let y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{hasRepository:(null!=t?t:[]).length>0,hasSentMessage:(null!=e?e:[]).some(e=>!!e.lastUserMessageAt)}}(t,s),w=y.hasRepository&&y.hasSentMessage,N=b&&!a&&null===o;return((0,i.useEffect)(()=>{N&&w&&!l&&j(!0)},[N,w,l,j]),!N||w||l)?null:(0,n.jsx)("div",{className:"mb-8",children:(0,n.jsxs)(x.Zp,{variant:"elevated","data-testid":"onboarding-checklist",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:d("onboarding.title")}),(0,n.jsx)(x.$n,{variant:"ghost",size:"sm","aria-label":d("onboarding.dismiss"),"data-testid":"onboarding-dismiss",onClick:()=>j(!0),children:(0,n.jsx)(m.A,{size:16,"aria-hidden":"true"})})]}),(0,n.jsx)("ol",{className:"mt-3 space-y-3",children:p.map(e=>{let{key:t,href:s}=e,a="registerRepository"===t?y.hasRepository:y.hasSentMessage;return(0,n.jsxs)("li",{className:"flex items-center gap-3","data-testid":"onboarding-step-".concat(t),"data-complete":a,children:[a?(0,n.jsx)(u.A,{size:20,className:"shrink-0 text-success-foreground","aria-hidden":"true"}):(0,n.jsx)(h.A,{size:20,className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,n.jsx)("span",{className:"min-w-0 flex-1 text-sm ".concat(a?"text-muted-foreground line-through":"text-foreground"),children:d("onboarding.steps.".concat(t))}),!a&&(0,n.jsx)(c(),{href:s,"data-testid":"onboarding-action-".concat(t),className:"shrink-0 rounded-md bg-accent-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-accent-500 dark:hover:bg-accent-600",children:d("onboarding.actions.".concat(t))})]},t)})})]})})}var b=s(87531),v=s(44308),y=s(24373);function w(e){let{worktrees:t,isLoading:s=!1}=e,a=(0,r.c)("home"),o=(0,i.useMemo)(()=>t.filter(e=>e.isSessionRunning).length,[t]),d=(0,i.useMemo)(()=>(0,y.Kg)(t),[t]);return s?(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary-loading",role:"status","aria-label":a("sessionSummary.loading"),children:[0,1].map(e=>(0,n.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,n.jsx)("div",{className:"flex h-4 items-center",children:(0,n.jsx)(x.EA,{className:"h-3 w-16"})}),(0,n.jsx)("div",{className:"flex h-9 items-center",children:(0,n.jsx)(x.EA,{className:"h-7 w-10"})})]},e))}):(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,n.jsx)(x.md,{status:o>0?"running":"idle",size:"sm",label:a("sessionSummary.running")}),a("sessionSummary.running")]}),(0,n.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",o>0?"text-foreground":"text-muted-foreground"),"data-testid":"running-count",children:o})]}),(0,n.jsxs)(c(),{href:v.ks,"data-testid":"waiting-count-link","aria-label":a("sessionSummary.waitingLinkLabel",{count:d}),className:"block rounded-lg border border-border bg-surface-2 px-3 py-2 transition-colors hover:border-warning-border hover:bg-warning-subtle focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,n.jsx)(x.md,{status:d>0?"waiting":"idle",size:"sm",label:a("sessionSummary.waiting")}),a("sessionSummary.waiting")]}),(0,n.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",d>0?"text-foreground":"text-muted-foreground"),"data-testid":"waiting-count",children:d})]})]})}var N=s(48481),k=s(7636),C=s(83012),S=s(38606);function A(e){var t;return null!=(t=e.lastUserMessageAt)?t:e.updatedAt}function E(e){let{worktrees:t,limit:s=5,isLoading:a=!1}=e,o=(0,r.c)("home"),d=(0,i.useMemo)(()=>[...t].sort((e,t)=>(0,k.nO)(A(e),A(t))).slice(0,s),[t,s]);return a?(0,n.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions-loading",role:"status","aria-label":o("recentSessions.loading"),children:Array.from({length:s},(e,t)=>(0,n.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",children:[(0,n.jsx)(x.EA,{className:"h-2 w-2 shrink-0 rounded-full"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,n.jsx)(x.EA,{className:"h-4 w-2/5"}),(0,n.jsx)(x.EA,{className:"h-3 w-3/5"})]}),(0,n.jsx)(x.EA,{className:"h-3 w-8 shrink-0"})]},t))}):0===d.length?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"recent-sessions-empty",children:o("recentSessions.empty")}),(0,n.jsx)(c(),{href:"/repositories","data-testid":"recent-sessions-cta",className:"inline-block text-sm font-medium text-accent-600 transition-colors hover:text-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:text-accent-400 dark:hover:text-accent-300",children:o("recentSessions.cta")})]}):(0,n.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions",children:d.map(e=>{var t,s,a,o;let i=A(e),r=i?(0,C.Fx)(String(i)):"";return(0,n.jsx)("li",{children:(0,n.jsxs)(c(),{href:"/worktrees/".concat(e.id),"data-testid":"recent-session-".concat(e.id),className:"flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,n.jsx)(N.m,{"data-testid":"recent-status-dot-".concat(e.id),status:(0,S.kA)({isRunning:null!=(s=e.isSessionRunning)&&s,isWaitingForResponse:null!=(a=e.isWaitingForResponse)&&a,isProcessing:null!=(o=e.isProcessing)&&o}),waitingKind:(0,S.f_)(e).waitingKind,size:"sm"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:null!=(t=e.repositoryDisplayName)?t:e.repositoryName}),(0,n.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.name})]}),r&&(0,n.jsx)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:r})]})},e.id)})})}function R(e){let{worktrees:t,isLoading:s=!1}=e,a=(0,r.c)("home");return(0,n.jsxs)(x.Zp,{variant:"elevated",className:"h-full","data-testid":"session-overview-tile",children:[(0,n.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:a("sessionOverview.title")}),(0,n.jsx)(w,{worktrees:t,isLoading:s}),(0,n.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:a("sessionOverview.recentSessions")}),(0,n.jsx)(c(),{href:"/sessions",className:"text-xs text-accent-600 hover:underline dark:text-accent-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","data-testid":"session-overview-view-all",children:a("sessionOverview.viewAll")})]}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(E,{worktrees:t,isLoading:s})})]})}var M=s(36402),F=s(85872),I=s(53292);let L="commandmate-home-todo-repo";function T(e){var t;return(null==(t=e.repositoryDisplayName)?void 0:t.trim())||e.repositoryName||""}function z(){let e=(0,r.c)("home"),t=(0,r.c)("common"),s=(0,M.SC)(),[a,o]=(0,i.useState)([]),[d,l]=(0,i.useState)(""),[c,m]=(0,i.useState)([]),[u,h]=(0,i.useState)(""),[g,f]=(0,i.useState)(!1),[p,j]=(0,i.useState)(!1),[b,v]=(0,i.useState)(null),y=(0,i.useRef)(!1),w=(0,i.useMemo)(()=>c.filter(e=>!e.done).length,[c]);(0,i.useEffect)(()=>{!async function(){try{var e;let t=await fetch("/api/worktrees");if(!t.ok)return;let s=(null!=(e=(await t.json()).repositories)?e:[]).map(e=>({id:e.id,path:e.path,name:e.name,displayName:e.displayName}));if(o(s),s.length>0){let e=localStorage.getItem(L),t=e&&s.some(t=>t.id===e)?e:s[0].id;l(t)}}catch(e){}finally{y.current=!0}}()},[]);let N=(0,i.useCallback)(async()=>{f(!0),v(null);try{let e=await F.$C.listAll();m(e)}catch(t){v(t instanceof Error?t.message:e("todo.errors.load")),m([])}finally{f(!1)}},[e]);(0,i.useEffect)(()=>{N()},[N]),(0,i.useEffect)(()=>{d&&localStorage.setItem(L,d)},[d]);let k=(0,i.useCallback)(async()=>{let t=u.trim();if(t&&d&&!p){j(!0),v(null);try{await F.$C.create(d,t),h(""),await N()}catch(t){v(t instanceof Error?t.message:e("todo.errors.add"))}finally{j(!1)}}},[u,d,p,N,e]),C=(0,i.useCallback)(async t=>{m(e=>e.map(e=>e.id===t.id?{...e,done:!e.done}:e)),v(null);try{await F.$C.update(t.repositoryId,t.id,{done:!t.done})}catch(t){v(t instanceof Error?t.message:e("todo.errors.update")),N()}},[N,e]),S=(0,i.useCallback)(async n=>{if(await s({description:t("confirmDelete",{name:n.content}),variant:"danger"})){v(null);try{await F.$C.remove(n.repositoryId,n.id),m(e=>e.filter(e=>e.id!==n.id))}catch(t){v(t instanceof Error?t.message:e("todo.errors.delete"))}}},[e,s,t]),A=(0,i.useCallback)(e=>{"Enter"!==e.key||e.nativeEvent.isComposing||(e.preventDefault(),k())},[k]),E=a.length>0;return(0,n.jsxs)(x.Zp,{className:"h-full","data-testid":"home-todo-widget",children:[(0,n.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:e("todo.title")}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 mb-3 sm:flex-row sm:items-center sm:justify-between sm:gap-3","data-testid":"todo-selector-row",children:[(0,n.jsxs)("label",{className:"flex items-center gap-2 text-sm text-muted-foreground min-w-0",children:[(0,n.jsx)("span",{className:"shrink-0",children:e("todo.repository")}),(0,n.jsx)("select",{value:d,onChange:e=>l(e.target.value),disabled:!E,"data-testid":"todo-repo-select",className:"min-w-0 flex-1 truncate rounded-md border border-input bg-surface dark:bg-surface-2 px-2 py-1 text-sm text-surface-foreground disabled:opacity-50 sm:flex-initial sm:max-w-[16rem]",children:a.map(e=>{var t;return(0,n.jsx)("option",{value:e.id,children:(null==(t=e.displayName)?void 0:t.trim())||e.name},e.id)})})]}),E&&(0,n.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground","data-testid":"todo-remaining",children:e("todo.open",{count:w})})]}),E?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,n.jsx)(x.pd,{type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:A,maxLength:I.Ll,placeholder:e("todo.inputPlaceholder"),"data-testid":"todo-input",className:"w-auto flex-1 min-w-0"}),(0,n.jsx)(x.$n,{type:"button",variant:"primary",size:"sm",onClick:k,disabled:p||0===u.trim().length,"data-testid":"todo-add-button",className:"shrink-0",children:e("todo.add")})]}),b&&(0,n.jsx)("p",{className:"mb-2 text-xs text-danger-foreground","data-testid":"todo-error",children:b}),g&&0===c.length?(0,n.jsx)("ul",{className:"space-y-1","data-testid":"todo-loading",role:"status","aria-label":e("todo.loading"),children:[0,1,2].map(e=>(0,n.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-1 py-1",children:[(0,n.jsx)(x.EA,{className:"h-4 w-4 shrink-0 rounded"}),(0,n.jsx)(x.EA,{className:"h-4 ".concat(1===e?"w-2/3":"w-5/6")})]},e))}):0===c.length?(0,n.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"todo-empty",children:e("todo.empty")}):(0,n.jsx)("ul",{className:"space-y-1","data-testid":"todo-list",children:c.map(t=>(0,n.jsxs)("li",{className:"flex flex-col gap-1 rounded-md px-1 py-1 hover:bg-muted group sm:flex-row sm:items-center sm:gap-2","data-testid":"todo-item",children:[(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("label",{className:"shrink-0 inline-flex min-h-[44px] min-w-[44px] cursor-pointer items-center justify-center sm:min-h-0 sm:min-w-0",children:(0,n.jsx)(x.Sc,{checked:t.done,onCheckedChange:()=>C(t),"data-testid":"todo-checkbox","aria-label":t.done?e("todo.markAsNotDone"):e("todo.markAsDone")})}),(0,n.jsx)("span",{className:"min-w-0 flex-1 break-words text-sm ".concat(t.done?"line-through text-muted-foreground":"text-foreground"),children:t.content})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[T(t)&&(0,n.jsx)("span",{className:"shrink-0 max-w-[8rem] truncate rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground","data-testid":"todo-repo-badge",title:T(t),children:T(t)}),(0,n.jsx)("button",{type:"button",onClick:()=>S(t),"aria-label":e("todo.delete"),"data-testid":"todo-delete",className:"inline-flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center text-muted-foreground opacity-100 transition-opacity hover:text-danger-foreground sm:min-h-0 sm:min-w-0 sm:opacity-0 sm:group-hover:opacity-100",children:(0,n.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id))})]}):(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("todo.noRepositories")})]})}var U=s(37586),D=s(66685),O=s(24533),P=s(37772),$=s(6473);let _=[{key:"chat",href:"/chat",icon:(0,n.jsx)(U.A,{size:20,"aria-hidden":"true"})},{key:"sessions",href:"/sessions",icon:(0,n.jsx)(D.A,{size:20,"aria-hidden":"true"})},{key:"repositories",href:"/repositories",icon:(0,n.jsx)(O.A,{size:20,"aria-hidden":"true"})},{key:"review",href:"/review",icon:(0,n.jsx)(u.A,{size:20,"aria-hidden":"true"})},{key:"more",href:"/more",icon:(0,n.jsx)(P.A,{size:20,"aria-hidden":"true"})}];function J(){let e=(0,r.c)("common");return(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-5","data-testid":"home-quick-actions",children:_.map((t,s)=>{let a=e("nav.".concat(t.key));return(0,n.jsx)(c(),{href:t.href,"aria-label":a,className:"group block rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","data-testid":"quick-action-".concat(t.key),children:(0,n.jsxs)(x.Zp,{interactive:!0,padding:"sm",style:{animationDelay:(0,$.Lc)(s)},className:"flex h-full flex-col items-center justify-center gap-1.5 py-3 text-center hover:border-accent-300 dark:hover:border-accent-700 ".concat($.qz),children:[(0,n.jsx)("span",{className:"text-muted-foreground group-hover:text-accent-600 dark:group-hover:text-accent-400 transition-colors",children:t.icon}),(0,n.jsx)("span",{className:"text-xs font-medium text-foreground",children:a})]})},t.href)})})}function K(){let{worktrees:e,repositories:t,isLoading:s,error:i}=(0,o.Fn)(),r=s&&0===e.length;return(0,n.jsx)(a.GV,{children:(0,n.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,n.jsx)(d,{worktrees:e}),(0,n.jsx)(j,{worktrees:e,repositories:t,isLoading:r,error:i}),(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12","data-testid":"home-bento-grid",children:[(0,n.jsx)("div",{className:"md:col-span-8",children:(0,n.jsx)(R,{worktrees:e,isLoading:r})}),(0,n.jsx)("div",{className:"md:col-span-4",children:(0,n.jsx)(z,{})}),(0,n.jsx)("div",{className:"md:col-span-12",children:(0,n.jsx)(J,{})})]})]})})}},83012:(e,t,s)=>{"use strict";s.d(t,{Fx:()=>i,bg:()=>r,fw:()=>o});var n=s(53298),a=s(73683);function o(e,t){let s=new Date(e);return isNaN(s.getTime())?"":(0,n.m)(s,{addSuffix:!0,...t?{locale:t}:{}})}function i(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let s=Math.round((Date.now()-t.getTime())/1e3);if(s<45)return"now";let n=Math.round(s/60);if(n<60)return"".concat(n,"m ago");let a=Math.round(n/60);if(a<24)return"".concat(a,"h ago");let o=Math.round(a/24);return o<7?"".concat(o,"d ago"):o<30?"".concat(Math.round(o/7),"w ago"):o<365?"".concat(Math.round(o/30),"mo ago"):"".concat(Math.round(o/365),"y ago")}function r(e,t){return!(e instanceof Date)||isNaN(e.getTime())?"":(0,a.GP)(e,"PPp",t?{locale:t}:void 0)}},85872:(e,t,s)=>{"use strict";async function n(e,t){throw Error((await e.json().catch(()=>({}))).error||"".concat(t," (").concat(e.status,")"))}s.d(t,{$C:()=>a,Ar:()=>i,KG:()=>o});let a={async list(e){var t;let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:n(s,"Failed to load todos")},async listAll(){var e;let t=await fetch("/api/todos");return t.ok?null!=(e=(await t.json()).todos)?e:[]:n(t,"Failed to load todos")},async create(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});return s.ok?(await s.json()).todo:n(s,"Failed to create todo")},async update(e,t,s){let a=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return a.ok?(await a.json()).todo:n(a,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await n(s,"Failed to delete todo")}},o=["todo","doing","done"],i={async list(e){var t;let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:n(s,"Failed to load todos")},async create(e,t,s){let a=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(void 0!==s?{content:t,detail:s}:{content:t})});return a.ok?(await a.json()).todo:n(a,"Failed to create todo")},async update(e,t,s){let a=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return a.ok?(await a.json()).todo:n(a,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await n(s,"Failed to delete todo")},async reorder(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({todoIds:t})});s.ok||await n(s,"Failed to reorder todos")}}}},e=>{e.O(0,[6809,4909,2770,790,4974,9948,6402,3898,6381,5229,8441,1255,7358],()=>e(e.s=54799)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{6473:(e,t,s)=>{"use strict";s.d(t,{Lc:()=>a,qz:()=>n});let n="animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(Number.isFinite(e)&&!(e<=0)&&!(e>=s))return"".concat(e*t,"ms")}},53292:(e,t,s)=>{"use strict";s.d(t,{Ll:()=>n,bu:()=>a});let n=2e3,a=4e3},54799:(e,t,s)=>{Promise.resolve().then(s.bind(s,75590))},75590:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>K});var n=s(95155),a=s(15229),o=s(66966),i=s(12115),r=s(18955);function d(e){let{worktrees:t}=e,s=(0,r.c)("home"),{runningCount:a,waitingCount:o}=(0,i.useMemo)(()=>{let e=0,s=0;for(let n of t)n.isSessionRunning&&(e++,n.isWaitingForResponse&&s++);return{runningCount:e,waitingCount:s}},[t]);return(0,n.jsxs)("div",{className:"mb-8",children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:s("title")}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":"home-subline",children:[(0,n.jsx)("span",{className:"tabular-nums","data-testid":"subline-running",children:a})," ",s("running"),(0,n.jsx)("span",{"aria-hidden":"true",children:" \xb7 "}),(0,n.jsx)("span",{className:"tabular-nums","data-testid":"subline-waiting",children:o})," ",s("waiting")]})]})}var l=s(52619),c=s.n(l),m=s(65229),u=s(61362),h=s(99051),x=s(43361),g=s(2317);function f(e){return"boolean"==typeof e}let p=[{key:"registerRepository",href:"/repositories"},{key:"sendFirstMessage",href:"/sessions"}];function j(e){let{worktrees:t,repositories:s,isLoading:a=!1,error:o=null}=e,d=(0,r.c)("home"),{value:l,setValue:j}=(0,g.V)({key:"commandmate:onboarding-dismissed",defaultValue:!1,validate:f}),[b,v]=(0,i.useState)(!1);(0,i.useEffect)(()=>v(!0),[]);let y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{hasRepository:(null!=t?t:[]).length>0,hasSentMessage:(null!=e?e:[]).some(e=>!!e.lastUserMessageAt)}}(t,s),w=y.hasRepository&&y.hasSentMessage,N=b&&!a&&null===o;return((0,i.useEffect)(()=>{N&&w&&!l&&j(!0)},[N,w,l,j]),!N||w||l)?null:(0,n.jsx)("div",{className:"mb-8",children:(0,n.jsxs)(x.Zp,{variant:"elevated","data-testid":"onboarding-checklist",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:d("onboarding.title")}),(0,n.jsx)(x.$n,{variant:"ghost",size:"sm","aria-label":d("onboarding.dismiss"),"data-testid":"onboarding-dismiss",onClick:()=>j(!0),children:(0,n.jsx)(m.A,{size:16,"aria-hidden":"true"})})]}),(0,n.jsx)("ol",{className:"mt-3 space-y-3",children:p.map(e=>{let{key:t,href:s}=e,a="registerRepository"===t?y.hasRepository:y.hasSentMessage;return(0,n.jsxs)("li",{className:"flex items-center gap-3","data-testid":"onboarding-step-".concat(t),"data-complete":a,children:[a?(0,n.jsx)(u.A,{size:20,className:"shrink-0 text-success-foreground","aria-hidden":"true"}):(0,n.jsx)(h.A,{size:20,className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,n.jsx)("span",{className:"min-w-0 flex-1 text-sm ".concat(a?"text-muted-foreground line-through":"text-foreground"),children:d("onboarding.steps.".concat(t))}),!a&&(0,n.jsx)(c(),{href:s,"data-testid":"onboarding-action-".concat(t),className:"shrink-0 rounded-md bg-accent-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-accent-500 dark:hover:bg-accent-600",children:d("onboarding.actions.".concat(t))})]},t)})})]})})}var b=s(87531),v=s(44308),y=s(24373);function w(e){let{worktrees:t,isLoading:s=!1}=e,a=(0,r.c)("home"),o=(0,i.useMemo)(()=>t.filter(e=>e.isSessionRunning).length,[t]),d=(0,i.useMemo)(()=>(0,y.Kg)(t),[t]);return s?(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary-loading",role:"status","aria-label":a("sessionSummary.loading"),children:[0,1].map(e=>(0,n.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,n.jsx)("div",{className:"flex h-4 items-center",children:(0,n.jsx)(x.EA,{className:"h-3 w-16"})}),(0,n.jsx)("div",{className:"flex h-9 items-center",children:(0,n.jsx)(x.EA,{className:"h-7 w-10"})})]},e))}):(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,n.jsx)(x.md,{status:o>0?"running":"idle",size:"sm",label:a("sessionSummary.running")}),a("sessionSummary.running")]}),(0,n.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",o>0?"text-foreground":"text-muted-foreground"),"data-testid":"running-count",children:o})]}),(0,n.jsxs)(c(),{href:v.ks,"data-testid":"waiting-count-link","aria-label":a("sessionSummary.waitingLinkLabel",{count:d}),className:"block rounded-lg border border-border bg-surface-2 px-3 py-2 transition-colors hover:border-warning-border hover:bg-warning-subtle focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,n.jsx)(x.md,{status:d>0?"waiting":"idle",size:"sm",label:a("sessionSummary.waiting")}),a("sessionSummary.waiting")]}),(0,n.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",d>0?"text-foreground":"text-muted-foreground"),"data-testid":"waiting-count",children:d})]})]})}var N=s(48481),k=s(7636),C=s(83012),S=s(38606);function A(e){var t;return null!=(t=e.lastUserMessageAt)?t:e.updatedAt}function E(e){let{worktrees:t,limit:s=5,isLoading:a=!1}=e,o=(0,r.c)("home"),d=(0,i.useMemo)(()=>[...t].sort((e,t)=>(0,k.nO)(A(e),A(t))).slice(0,s),[t,s]);return a?(0,n.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions-loading",role:"status","aria-label":o("recentSessions.loading"),children:Array.from({length:s},(e,t)=>(0,n.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",children:[(0,n.jsx)(x.EA,{className:"h-2 w-2 shrink-0 rounded-full"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,n.jsx)(x.EA,{className:"h-4 w-2/5"}),(0,n.jsx)(x.EA,{className:"h-3 w-3/5"})]}),(0,n.jsx)(x.EA,{className:"h-3 w-8 shrink-0"})]},t))}):0===d.length?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"recent-sessions-empty",children:o("recentSessions.empty")}),(0,n.jsx)(c(),{href:"/repositories","data-testid":"recent-sessions-cta",className:"inline-block text-sm font-medium text-accent-600 transition-colors hover:text-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:text-accent-400 dark:hover:text-accent-300",children:o("recentSessions.cta")})]}):(0,n.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions",children:d.map(e=>{var t,s,a,o;let i=A(e),r=i?(0,C.Fx)(String(i)):"";return(0,n.jsx)("li",{children:(0,n.jsxs)(c(),{href:"/worktrees/".concat(e.id),"data-testid":"recent-session-".concat(e.id),className:"flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,n.jsx)(N.m,{"data-testid":"recent-status-dot-".concat(e.id),status:(0,S.kA)({isRunning:null!=(s=e.isSessionRunning)&&s,isWaitingForResponse:null!=(a=e.isWaitingForResponse)&&a,isProcessing:null!=(o=e.isProcessing)&&o}),waitingKind:(0,S.f_)(e).waitingKind,size:"sm"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:null!=(t=e.repositoryDisplayName)?t:e.repositoryName}),(0,n.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.name})]}),r&&(0,n.jsx)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:r})]})},e.id)})})}function R(e){let{worktrees:t,isLoading:s=!1}=e,a=(0,r.c)("home");return(0,n.jsxs)(x.Zp,{variant:"elevated",className:"h-full","data-testid":"session-overview-tile",children:[(0,n.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:a("sessionOverview.title")}),(0,n.jsx)(w,{worktrees:t,isLoading:s}),(0,n.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:a("sessionOverview.recentSessions")}),(0,n.jsx)(c(),{href:"/sessions",className:"text-xs text-accent-600 hover:underline dark:text-accent-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","data-testid":"session-overview-view-all",children:a("sessionOverview.viewAll")})]}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(E,{worktrees:t,isLoading:s})})]})}var M=s(36402),F=s(85872),I=s(53292);let L="commandmate-home-todo-repo";function T(e){var t;return(null==(t=e.repositoryDisplayName)?void 0:t.trim())||e.repositoryName||""}function z(){let e=(0,r.c)("home"),t=(0,r.c)("common"),s=(0,M.SC)(),[a,o]=(0,i.useState)([]),[d,l]=(0,i.useState)(""),[c,m]=(0,i.useState)([]),[u,h]=(0,i.useState)(""),[g,f]=(0,i.useState)(!1),[p,j]=(0,i.useState)(!1),[b,v]=(0,i.useState)(null),y=(0,i.useRef)(!1),w=(0,i.useMemo)(()=>c.filter(e=>!e.done).length,[c]);(0,i.useEffect)(()=>{!async function(){try{var e;let t=await fetch("/api/worktrees");if(!t.ok)return;let s=(null!=(e=(await t.json()).repositories)?e:[]).map(e=>({id:e.id,path:e.path,name:e.name,displayName:e.displayName}));if(o(s),s.length>0){let e=localStorage.getItem(L),t=e&&s.some(t=>t.id===e)?e:s[0].id;l(t)}}catch(e){}finally{y.current=!0}}()},[]);let N=(0,i.useCallback)(async()=>{f(!0),v(null);try{let e=await F.$C.listAll();m(e)}catch(t){v(t instanceof Error?t.message:e("todo.errors.load")),m([])}finally{f(!1)}},[e]);(0,i.useEffect)(()=>{N()},[N]),(0,i.useEffect)(()=>{d&&localStorage.setItem(L,d)},[d]);let k=(0,i.useCallback)(async()=>{let t=u.trim();if(t&&d&&!p){j(!0),v(null);try{await F.$C.create(d,t),h(""),await N()}catch(t){v(t instanceof Error?t.message:e("todo.errors.add"))}finally{j(!1)}}},[u,d,p,N,e]),C=(0,i.useCallback)(async t=>{m(e=>e.map(e=>e.id===t.id?{...e,done:!e.done}:e)),v(null);try{await F.$C.update(t.repositoryId,t.id,{done:!t.done})}catch(t){v(t instanceof Error?t.message:e("todo.errors.update")),N()}},[N,e]),S=(0,i.useCallback)(async n=>{if(await s({description:t("confirmDelete",{name:n.content}),variant:"danger"})){v(null);try{await F.$C.remove(n.repositoryId,n.id),m(e=>e.filter(e=>e.id!==n.id))}catch(t){v(t instanceof Error?t.message:e("todo.errors.delete"))}}},[e,s,t]),A=(0,i.useCallback)(e=>{"Enter"!==e.key||e.nativeEvent.isComposing||(e.preventDefault(),k())},[k]),E=a.length>0;return(0,n.jsxs)(x.Zp,{className:"h-full","data-testid":"home-todo-widget",children:[(0,n.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:e("todo.title")}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 mb-3 sm:flex-row sm:items-center sm:justify-between sm:gap-3","data-testid":"todo-selector-row",children:[(0,n.jsxs)("label",{className:"flex items-center gap-2 text-sm text-muted-foreground min-w-0",children:[(0,n.jsx)("span",{className:"shrink-0",children:e("todo.repository")}),(0,n.jsx)("select",{value:d,onChange:e=>l(e.target.value),disabled:!E,"data-testid":"todo-repo-select",className:"min-w-0 flex-1 truncate rounded-md border border-input bg-surface dark:bg-surface-2 px-2 py-1 text-sm text-surface-foreground disabled:opacity-50 sm:flex-initial sm:max-w-[16rem]",children:a.map(e=>{var t;return(0,n.jsx)("option",{value:e.id,children:(null==(t=e.displayName)?void 0:t.trim())||e.name},e.id)})})]}),E&&(0,n.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground","data-testid":"todo-remaining",children:e("todo.open",{count:w})})]}),E?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,n.jsx)(x.pd,{type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:A,maxLength:I.Ll,placeholder:e("todo.inputPlaceholder"),"data-testid":"todo-input",className:"w-auto flex-1 min-w-0"}),(0,n.jsx)(x.$n,{type:"button",variant:"primary",size:"sm",onClick:k,disabled:p||0===u.trim().length,"data-testid":"todo-add-button",className:"shrink-0",children:e("todo.add")})]}),b&&(0,n.jsx)("p",{className:"mb-2 text-xs text-danger-foreground","data-testid":"todo-error",children:b}),g&&0===c.length?(0,n.jsx)("ul",{className:"space-y-1","data-testid":"todo-loading",role:"status","aria-label":e("todo.loading"),children:[0,1,2].map(e=>(0,n.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-1 py-1",children:[(0,n.jsx)(x.EA,{className:"h-4 w-4 shrink-0 rounded"}),(0,n.jsx)(x.EA,{className:"h-4 ".concat(1===e?"w-2/3":"w-5/6")})]},e))}):0===c.length?(0,n.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"todo-empty",children:e("todo.empty")}):(0,n.jsx)("ul",{className:"space-y-1","data-testid":"todo-list",children:c.map(t=>(0,n.jsxs)("li",{className:"flex flex-col gap-1 rounded-md px-1 py-1 hover:bg-muted group sm:flex-row sm:items-center sm:gap-2","data-testid":"todo-item",children:[(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("label",{className:"shrink-0 inline-flex min-h-[44px] min-w-[44px] cursor-pointer items-center justify-center sm:min-h-0 sm:min-w-0",children:(0,n.jsx)(x.Sc,{checked:t.done,onCheckedChange:()=>C(t),"data-testid":"todo-checkbox","aria-label":t.done?e("todo.markAsNotDone"):e("todo.markAsDone")})}),(0,n.jsx)("span",{className:"min-w-0 flex-1 break-words text-sm ".concat(t.done?"line-through text-muted-foreground":"text-foreground"),children:t.content})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[T(t)&&(0,n.jsx)("span",{className:"shrink-0 max-w-[8rem] truncate rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground","data-testid":"todo-repo-badge",title:T(t),children:T(t)}),(0,n.jsx)("button",{type:"button",onClick:()=>S(t),"aria-label":e("todo.delete"),"data-testid":"todo-delete",className:"inline-flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center text-muted-foreground opacity-100 transition-opacity hover:text-danger-foreground sm:min-h-0 sm:min-w-0 sm:opacity-0 sm:group-hover:opacity-100",children:(0,n.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id))})]}):(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("todo.noRepositories")})]})}var U=s(37586),D=s(66685),O=s(24533),P=s(37772),$=s(6473);let _=[{key:"chat",href:"/chat",icon:(0,n.jsx)(U.A,{size:20,"aria-hidden":"true"})},{key:"sessions",href:"/sessions",icon:(0,n.jsx)(D.A,{size:20,"aria-hidden":"true"})},{key:"repositories",href:"/repositories",icon:(0,n.jsx)(O.A,{size:20,"aria-hidden":"true"})},{key:"review",href:"/review",icon:(0,n.jsx)(u.A,{size:20,"aria-hidden":"true"})},{key:"more",href:"/more",icon:(0,n.jsx)(P.A,{size:20,"aria-hidden":"true"})}];function J(){let e=(0,r.c)("common");return(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-5","data-testid":"home-quick-actions",children:_.map((t,s)=>{let a=e("nav.".concat(t.key));return(0,n.jsx)(c(),{href:t.href,"aria-label":a,className:"group block rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","data-testid":"quick-action-".concat(t.key),children:(0,n.jsxs)(x.Zp,{interactive:!0,padding:"sm",style:{animationDelay:(0,$.Lc)(s)},className:"flex h-full flex-col items-center justify-center gap-1.5 py-3 text-center hover:border-accent-300 dark:hover:border-accent-700 ".concat($.qz),children:[(0,n.jsx)("span",{className:"text-muted-foreground group-hover:text-accent-600 dark:group-hover:text-accent-400 transition-colors",children:t.icon}),(0,n.jsx)("span",{className:"text-xs font-medium text-foreground",children:a})]})},t.href)})})}function K(){let{worktrees:e,repositories:t,isLoading:s,error:i}=(0,o.Fn)(),r=s&&0===e.length;return(0,n.jsx)(a.GV,{children:(0,n.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,n.jsx)(d,{worktrees:e}),(0,n.jsx)(j,{worktrees:e,repositories:t,isLoading:r,error:i}),(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12","data-testid":"home-bento-grid",children:[(0,n.jsx)("div",{className:"md:col-span-8",children:(0,n.jsx)(R,{worktrees:e,isLoading:r})}),(0,n.jsx)("div",{className:"md:col-span-4",children:(0,n.jsx)(z,{})}),(0,n.jsx)("div",{className:"md:col-span-12",children:(0,n.jsx)(J,{})})]})]})})}},83012:(e,t,s)=>{"use strict";s.d(t,{Fx:()=>i,bg:()=>r,fw:()=>o});var n=s(53298),a=s(73683);function o(e,t){let s=new Date(e);return isNaN(s.getTime())?"":(0,n.m)(s,{addSuffix:!0,...t?{locale:t}:{}})}function i(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let s=Math.round((Date.now()-t.getTime())/1e3);if(s<45)return"now";let n=Math.round(s/60);if(n<60)return"".concat(n,"m ago");let a=Math.round(n/60);if(a<24)return"".concat(a,"h ago");let o=Math.round(a/24);return o<7?"".concat(o,"d ago"):o<30?"".concat(Math.round(o/7),"w ago"):o<365?"".concat(Math.round(o/30),"mo ago"):"".concat(Math.round(o/365),"y ago")}function r(e,t){return!(e instanceof Date)||isNaN(e.getTime())?"":(0,a.GP)(e,"PPp",t?{locale:t}:void 0)}},85872:(e,t,s)=>{"use strict";async function n(e,t){throw Error((await e.json().catch(()=>({}))).error||"".concat(t," (").concat(e.status,")"))}s.d(t,{$C:()=>a,Ar:()=>i,KG:()=>o});let a={async list(e){var t;let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:n(s,"Failed to load todos")},async listAll(){var e;let t=await fetch("/api/todos");return t.ok?null!=(e=(await t.json()).todos)?e:[]:n(t,"Failed to load todos")},async create(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});return s.ok?(await s.json()).todo:n(s,"Failed to create todo")},async update(e,t,s){let a=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return a.ok?(await a.json()).todo:n(a,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await n(s,"Failed to delete todo")}},o=["todo","doing","done"],i={async list(e){var t;let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:n(s,"Failed to load todos")},async create(e,t,s){let a=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(void 0!==s?{content:t,detail:s}:{content:t})});return a.ok?(await a.json()).todo:n(a,"Failed to create todo")},async update(e,t,s){let a=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return a.ok?(await a.json()).todo:n(a,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await n(s,"Failed to delete todo")},async reorder(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({todoIds:t})});s.ok||await n(s,"Failed to reorder todos")}}}},e=>{e.O(0,[6809,4909,2770,790,4974,9948,6402,3361,6381,5229,8441,1255,7358],()=>e(e.s=54799)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,543,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1421,1437,1490,1517,1523,1645,1652,1745,2046,2117,2132,2149,2260,2360,2464,2786,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5286,5332,5580,5657,5683,5832,6140,6194,6248,6393,6451,6564,6635,6680,6734,6824,6839,7e3,7238,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|