commandmate 0.14.0 → 0.14.1
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 +279 -279
- package/.next/app-path-routes-manifest.json +30 -30
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +9 -9
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route_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/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_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/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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_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/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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +10 -10
- 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 +30 -30
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/5959.js +3 -3
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/chunks/6283.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{4027-0c529b322be7d4d8.js → 4027-000402aee1e3520b.js} +1 -1
- package/.next/static/chunks/{6488-1a37ccee1d444c10.js → 6488-74d2f443e43c07b7.js} +1 -1
- package/.next/static/chunks/{6497-dc26c6c6b0b15adf.js → 6497-ea466b22a6c1ae89.js} +1 -1
- package/.next/static/chunks/{8566-b8bbcfd837cc338b.js → 8566-9da32e46c9d3fd54.js} +1 -1
- package/.next/static/chunks/app/chat/{page-9cf4ba62e21d9074.js → page-623f5cb9040de639.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/{page-9ff4d065483cdfe9.js → page-6a45f3744da50d95.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-983a80ece6289026.js +1 -0
- package/.next/static/chunks/webpack-e655374fed175528.js +1 -0
- package/.next/trace +11 -11
- package/dist/server/src/lib/cli-tools/submit-verified-sender.js +120 -34
- package/dist/server/src/lib/detection/cli-patterns.js +27 -3
- package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +19 -0
- package/dist/server/src/lib/session/current-output-builder.js +10 -1
- package/dist/server/src/lib/tmux/tmux.js +26 -0
- package/package.json +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-f2801662a721faab.js +0 -1
- package/.next/static/chunks/webpack-0f9275e279c058eb.js +0 -1
- /package/.next/static/{Etea8LidpB8eWOTac-R8b → 1WyelLMRgPnhvA2HmhZmm}/_buildManifest.js +0 -0
- /package/.next/static/{Etea8LidpB8eWOTac-R8b → 1WyelLMRgPnhvA2HmhZmm}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__REACT_LOADABLE_MANIFEST='{"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/architecture-PBZL5I3N.mjs":{"id":43389,"files":["static/chunks/3389.ba28c369d5fd285d.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/gitGraph-HDMCJU4V.mjs":{"id":51394,"files":["static/chunks/1394.ee511cecae812ccb.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/info-3K5VOQVL.mjs":{"id":65202,"files":["static/chunks/5202.7d64195cbab813a6.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/packet-RMMSAZCW.mjs":{"id":59775,"files":["static/chunks/9775.a8d4731819f32478.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/pie-UPGHQEXC.mjs":{"id":27968,"files":["static/chunks/7968.b3d37fbbecf5664e.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/radar-KQ55EAFF.mjs":{"id":90577,"files":["static/chunks/577.0af2b2fa2b043810.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/treemap-KZPCXAKY.mjs":{"id":12466,"files":["static/chunks/2466.813e7474cc702f5c.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-7R4GIKGN.mjs -> katex":{"id":84739,"files":["static/chunks/d3ac728e.5f6e6d9311df141b.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-GLR3WWYH.mjs -> ./cose-bilkent-S5V4N54A.mjs":{"id":51345,"files":["static/chunks/90542734.c2386877103b1d80.js","static/chunks/1345.7503fa6b29b871de.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-GLR3WWYH.mjs -> ./dagre-KLK3FWXG.mjs":{"id":80282,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5951.616956b6aa5df63f.js","static/chunks/282.6b6f2e31a96674dd.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/architectureDiagram-2XIMDMQ5.mjs":{"id":80070,"files":["static/chunks/90542734.c2386877103b1d80.js","static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/70.1b01cf72ef152ebb.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs":{"id":75222,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5222.305dc0ebba9c0784.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/c4Diagram-IC4MRINW.mjs":{"id":64378,"files":["static/chunks/4378.30a4e65db2d8c71b.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/classDiagram-VBA2DB6C.mjs":{"id":54384,"files":["static/chunks/6690.a55d53ee0693a21a.js","static/chunks/4384.0454992d5b8c885f.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/classDiagram-v2-RAHNMMFH.mjs":{"id":57528,"files":["static/chunks/6690.a55d53ee0693a21a.js","static/chunks/7528.a4b80119f4aa37c7.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-E7M64L7V.mjs":{"id":15146,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/5146.e5666bf9cd8ace31.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-IFDJBPK2.mjs":{"id":7318,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/7318.ca42d44599533a47.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-P4PSJMXO.mjs":{"id":28871,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/8871.5b1a67427b25ab0c.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/erDiagram-INFDFZHY.mjs":{"id":18923,"files":["static/chunks/8923.a9bfb5c9dae0a653.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/flowDiagram-PKNHOUZH.mjs":{"id":34943,"files":["static/chunks/4943.1300b9bbd8ca6846.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/ganttDiagram-A5KZAMGK.mjs":{"id":64489,"files":["static/chunks/4489.b5d699c8c24e75f9.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/gitGraphDiagram-K3NZZRJ6.mjs":{"id":77318,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/4937.4bc1a01e597e4966.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/infoDiagram-LFFYTUFH.mjs":{"id":75142,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/5142.1305911c3f99a90d.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/ishikawaDiagram-PHBUUO56.mjs":{"id":67295,"files":["static/chunks/7295.6e760de741e69d78.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/journeyDiagram-4ABVD52K.mjs":{"id":32311,"files":["static/chunks/2311.db2c5912f71d40fb.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/kanban-definition-K7BYSVSG.mjs":{"id":65694,"files":["static/chunks/5694.dda65070757534df.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/mindmap-definition-YRQLILUH.mjs":{"id":22601,"files":["static/chunks/2601.17b50928bf38c193.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/pieDiagram-SKSYHLDU.mjs":{"id":62935,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/2935.c6f0bf2fa2767553.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/quadrantDiagram-337W2JSQ.mjs":{"id":37732,"files":["static/chunks/7732.ba6419e9f3d62177.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/requirementDiagram-Z7DCOOCP.mjs":{"id":3862,"files":["static/chunks/3862.4bbe8bd40d770a1d.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/sankeyDiagram-WA2Y5GQK.mjs":{"id":22789,"files":["static/chunks/2789.d4f15555df3ca5b6.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/sequenceDiagram-2WXFIKYE.mjs":{"id":60886,"files":["static/chunks/2ff9d716.fcad4dc87234c8d8.js","static/chunks/8706.108a69de11de19c7.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/stateDiagram-RAJIS63D.mjs":{"id":97095,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5951.616956b6aa5df63f.js","static/chunks/9076.d3e3a7f356a416ba.js","static/chunks/7095.8c869e553133a40e.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/stateDiagram-v2-FVOUBMTO.mjs":{"id":6596,"files":["static/chunks/9076.d3e3a7f356a416ba.js","static/chunks/6596.78e45c31f50e3e5c.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/timeline-definition-YZTLITO2.mjs":{"id":79775,"files":["static/chunks/2156.f667232f18272330.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/vennDiagram-LZ73GAT5.mjs":{"id":38339,"files":["static/chunks/8339.855133c9f5c0be46.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/xychartDiagram-JWTSCODW.mjs":{"id":52918,"files":["static/chunks/2918.cfd6cee82abd3c55.js"]},"app/login/page.tsx -> @/components/auth/QrCodeGenerator":{"id":6271,"files":["static/chunks/6271.295ced91b6335f18.js"]},"app/worktrees/[id]/terminal/page.tsx -> @/components/Terminal":{"id":27229,"files":["static/css/6ef2fa08dd043252.css","static/chunks/30d07d85.85dcdd0af8338499.js","static/chunks/7229.edb331fb9fbafa27.js"]},"components/worktree/FilePanelContent.tsx -> @/components/worktree/HtmlPreview":{"id":530,"files":["static/chunks/530.e377b0f1a7a89620.js"]},"components/worktree/FilePanelContent.tsx -> @/components/worktree/MarkdownEditor":{"id":48361,"files":["static/chunks/8566-
|
|
1
|
+
self.__REACT_LOADABLE_MANIFEST='{"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/architecture-PBZL5I3N.mjs":{"id":43389,"files":["static/chunks/3389.ba28c369d5fd285d.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/gitGraph-HDMCJU4V.mjs":{"id":51394,"files":["static/chunks/1394.ee511cecae812ccb.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/info-3K5VOQVL.mjs":{"id":65202,"files":["static/chunks/5202.7d64195cbab813a6.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/packet-RMMSAZCW.mjs":{"id":59775,"files":["static/chunks/9775.a8d4731819f32478.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/pie-UPGHQEXC.mjs":{"id":27968,"files":["static/chunks/7968.b3d37fbbecf5664e.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/radar-KQ55EAFF.mjs":{"id":90577,"files":["static/chunks/577.0af2b2fa2b043810.js"]},"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs -> ./chunks/mermaid-parser.core/treemap-KZPCXAKY.mjs":{"id":12466,"files":["static/chunks/2466.813e7474cc702f5c.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-7R4GIKGN.mjs -> katex":{"id":84739,"files":["static/chunks/d3ac728e.5f6e6d9311df141b.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-GLR3WWYH.mjs -> ./cose-bilkent-S5V4N54A.mjs":{"id":51345,"files":["static/chunks/90542734.c2386877103b1d80.js","static/chunks/1345.7503fa6b29b871de.js"]},"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-GLR3WWYH.mjs -> ./dagre-KLK3FWXG.mjs":{"id":80282,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5951.616956b6aa5df63f.js","static/chunks/282.6b6f2e31a96674dd.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/architectureDiagram-2XIMDMQ5.mjs":{"id":80070,"files":["static/chunks/90542734.c2386877103b1d80.js","static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/70.1b01cf72ef152ebb.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs":{"id":75222,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5222.305dc0ebba9c0784.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/c4Diagram-IC4MRINW.mjs":{"id":64378,"files":["static/chunks/4378.30a4e65db2d8c71b.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/classDiagram-VBA2DB6C.mjs":{"id":54384,"files":["static/chunks/6690.a55d53ee0693a21a.js","static/chunks/4384.0454992d5b8c885f.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/classDiagram-v2-RAHNMMFH.mjs":{"id":57528,"files":["static/chunks/6690.a55d53ee0693a21a.js","static/chunks/7528.a4b80119f4aa37c7.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-E7M64L7V.mjs":{"id":15146,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/5146.e5666bf9cd8ace31.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-IFDJBPK2.mjs":{"id":7318,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/7318.ca42d44599533a47.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/diagram-P4PSJMXO.mjs":{"id":28871,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/8871.5b1a67427b25ab0c.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/erDiagram-INFDFZHY.mjs":{"id":18923,"files":["static/chunks/8923.a9bfb5c9dae0a653.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/flowDiagram-PKNHOUZH.mjs":{"id":34943,"files":["static/chunks/4943.1300b9bbd8ca6846.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/ganttDiagram-A5KZAMGK.mjs":{"id":64489,"files":["static/chunks/4489.b5d699c8c24e75f9.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/gitGraphDiagram-K3NZZRJ6.mjs":{"id":77318,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/4937.4bc1a01e597e4966.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/infoDiagram-LFFYTUFH.mjs":{"id":75142,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/5142.1305911c3f99a90d.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/ishikawaDiagram-PHBUUO56.mjs":{"id":67295,"files":["static/chunks/7295.6e760de741e69d78.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/journeyDiagram-4ABVD52K.mjs":{"id":32311,"files":["static/chunks/2311.db2c5912f71d40fb.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/kanban-definition-K7BYSVSG.mjs":{"id":65694,"files":["static/chunks/5694.dda65070757534df.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/mindmap-definition-YRQLILUH.mjs":{"id":22601,"files":["static/chunks/2601.17b50928bf38c193.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/pieDiagram-SKSYHLDU.mjs":{"id":62935,"files":["static/chunks/4459.03172449db395039.js","static/chunks/4290.6cf86f68d73b6e77.js","static/chunks/2935.c6f0bf2fa2767553.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/quadrantDiagram-337W2JSQ.mjs":{"id":37732,"files":["static/chunks/7732.ba6419e9f3d62177.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/requirementDiagram-Z7DCOOCP.mjs":{"id":3862,"files":["static/chunks/3862.4bbe8bd40d770a1d.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/sankeyDiagram-WA2Y5GQK.mjs":{"id":22789,"files":["static/chunks/2789.d4f15555df3ca5b6.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/sequenceDiagram-2WXFIKYE.mjs":{"id":60886,"files":["static/chunks/2ff9d716.fcad4dc87234c8d8.js","static/chunks/8706.108a69de11de19c7.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/stateDiagram-RAJIS63D.mjs":{"id":97095,"files":["static/chunks/4459.03172449db395039.js","static/chunks/9856.15463dd58437e2ac.js","static/chunks/5951.616956b6aa5df63f.js","static/chunks/9076.d3e3a7f356a416ba.js","static/chunks/7095.8c869e553133a40e.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/stateDiagram-v2-FVOUBMTO.mjs":{"id":6596,"files":["static/chunks/9076.d3e3a7f356a416ba.js","static/chunks/6596.78e45c31f50e3e5c.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/timeline-definition-YZTLITO2.mjs":{"id":79775,"files":["static/chunks/2156.f667232f18272330.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/vennDiagram-LZ73GAT5.mjs":{"id":38339,"files":["static/chunks/8339.855133c9f5c0be46.js"]},"../node_modules/mermaid/dist/mermaid.core.mjs -> ./chunks/mermaid.core/xychartDiagram-JWTSCODW.mjs":{"id":52918,"files":["static/chunks/2918.cfd6cee82abd3c55.js"]},"app/login/page.tsx -> @/components/auth/QrCodeGenerator":{"id":6271,"files":["static/chunks/6271.295ced91b6335f18.js"]},"app/worktrees/[id]/terminal/page.tsx -> @/components/Terminal":{"id":27229,"files":["static/css/6ef2fa08dd043252.css","static/chunks/30d07d85.85dcdd0af8338499.js","static/chunks/7229.edb331fb9fbafa27.js"]},"components/worktree/FilePanelContent.tsx -> @/components/worktree/HtmlPreview":{"id":530,"files":["static/chunks/530.e377b0f1a7a89620.js"]},"components/worktree/FilePanelContent.tsx -> @/components/worktree/MarkdownEditor":{"id":48361,"files":["static/chunks/8566-9da32e46c9d3fd54.js","static/chunks/934-a37509667baa86ee.js","static/chunks/6007-de36119357dcd418.js","static/chunks/4027-000402aee1e3520b.js","static/chunks/8361.4bf062be2d2962f4.js"]},"components/worktree/FilePanelContent.tsx -> @/components/worktree/PdfPreview":{"id":27307,"files":[]},"components/worktree/MermaidCodeBlock.tsx -> ./MermaidDiagram":{"id":90953,"files":["static/chunks/af7f6608.a62718fb6038c35a.js","static/chunks/7485.43871aedf3dbb980.js","static/chunks/953.19e4c8178c9eac4c.js"]},"components/worktree/WorktreeDetailRefactored.tsx -> @/components/worktree/MarkdownEditor":{"id":48361,"files":["static/chunks/8566-9da32e46c9d3fd54.js","static/chunks/934-a37509667baa86ee.js","static/chunks/6007-de36119357dcd418.js","static/chunks/4027-000402aee1e3520b.js","static/chunks/8361.4bf062be2d2962f4.js"]}}';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e655374fed175528.js" defer=""></script><script src="/_next/static/chunks/framework-eaf13c96191cb608.js" defer=""></script><script src="/_next/static/chunks/main-6092074a0dc78280.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c970d8b55ace1b48.js" defer=""></script><script src="/_next/static/1WyelLMRgPnhvA2HmhZmm/_buildManifest.js" defer=""></script><script src="/_next/static/1WyelLMRgPnhvA2HmhZmm/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"1WyelLMRgPnhvA2HmhZmm","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"ou4y0GmuEVWIupbU/5x5Qm2zm9SptuqB60VY2BlCWcE="}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4027],{24027:(e,t,r)=>{r.d(t,{Uc:()=>C,G8:()=>N,OJ:()=>W,RF:()=>A});var n=r(95155),i=r(12115),l=r(18955),a=r(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4027],{24027:(e,t,r)=>{r.d(t,{Uc:()=>C,G8:()=>N,OJ:()=>W,RF:()=>A});var n=r(95155),i=r(12115),l=r(18955),a=r(51238),s=r(22133),o=r(89451),c=r(10934),d=r(92254),u=r(5225);r(1226);var m=r(89715),h=r(57828),f=r(52056),p=r(65229),x=r(67909),g=r(3005);let w=(0,x.default)(()=>Promise.all([r.e(221),r.e(7485),r.e(953)]).then(r.bind(r,90953)).then(e=>({default:e.MermaidDiagram})),{loadableGenerated:{webpack:()=>[90953]},ssr:!1,loading:function(){let e=(0,l.c)("worktree");return(0,n.jsxs)("div",{className:"mermaid-loading flex items-center gap-2 text-muted-foreground p-4",children:[(0,n.jsx)(g.y,{size:"sm"}),(0,n.jsx)("span",{children:e("mermaid.loading")})]})}});function b(e){let{className:t,children:r}=e;if(t&&t.split(" ").includes("language-mermaid")){let e=null==r?"":"string"==typeof r?r:Array.isArray(r)?r.map(e=>"string"==typeof e?e:"").join(""):String(r);return(0,n.jsx)(w,{code:e})}return(0,n.jsx)("code",{className:t,children:r})}var j=r(50666),k=r(69352),v=r(76246);function y(e){let{apiUrl:t,alt:r,width:a,height:s}=e,o=(0,l.c)("worktree"),[c,d]=(0,i.useState)(null);return((0,i.useEffect)(()=>{let e=!1;return fetch(t).then(e=>e.ok?e.json():null).then(t=>{!e&&(null==t?void 0:t.content)&&d(t.content)}).catch(()=>{}),()=>{e=!0}},[t]),c)?(0,n.jsx)("img",{src:c,alt:r,width:a,height:s,style:{maxWidth:a||"100%"}}):(0,n.jsx)("span",{style:{color:"#999"},children:o("markdownPreview.loadingImage")})}let N=(0,i.memo)(function(e){let{content:t,onOpenFile:r,currentFilePath:l,worktreeId:m}=e,h=(0,i.useRef)(r);h.current=r;let f=(0,i.useRef)(l);f.current=l;let p=(0,i.useRef)(m);p.current=m;let x=(0,i.useCallback)((e,t)=>{let r=(0,k.d3)(t);if(r)switch((0,k.dj)(r)){case"anchor":break;case"external":e.preventDefault(),window.open(r,"_blank","noopener,noreferrer");break;case"relative":{e.preventDefault();let t=f.current,n=h.current;if(t&&n){let e=(0,k.WU)(t,r);e&&n(e)}}}},[]),g=(0,i.useMemo)(()=>({code:b,pre:e=>{let{children:t}=e;return!function(e){let t=i.Children.toArray(e)[0];if(!i.isValidElement(t))return!1;let r=t.props.className;return"string"==typeof r&&r.split(" ").includes("language-mermaid")}(t)?(0,n.jsx)(j.Ck,{children:(0,n.jsx)("pre",{className:"overflow-x-auto",children:t})}):(0,n.jsx)("pre",{children:t})},img:e=>{var t,r,i,l;let{src:a,alt:s,width:o,height:c,...d}=e,u=null!=o?o:null==(r=d.node)||null==(t=r.properties)?void 0:t.width,m=null!=c?c:null==(l=d.node)||null==(i=l.properties)?void 0:i.height;if("string"==typeof a&&!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("data:")){let e=f.current,t=p.current;if(e&&t){let r=(0,k.WU)(e,a);if(r){let e="/api/worktrees/".concat(t,"/files/").concat((0,v.o)(r));return(0,n.jsx)(y,{apiUrl:e,alt:null!=s?s:"",width:u,height:m})}}}return(0,n.jsx)("img",{src:a,alt:null!=s?s:"",width:u,height:m,style:{maxWidth:u||"100%"}})},a:e=>{let{href:t,children:r,...i}=e;return t?(0,n.jsx)("a",{...i,href:t,onClick:e=>x(e,t),children:r}):(0,n.jsx)("a",{...i,children:r})}}),[x]),w=(0,i.useMemo)(()=>[s.A],[]),N=(0,i.useMemo)(()=>[o.A,[c.A,k.uO],d.A,u.A],[]);return(0,n.jsx)(a.oz,{remarkPlugins:w,rehypePlugins:N,components:g,children:t})}),A=(0,i.memo)(function(e){let{mobileTab:t,onTabChange:r}=e,i=(0,l.c)("worktree");return(0,n.jsxs)("div",{className:"flex border-b border-border",children:[(0,n.jsxs)("button",{"data-testid":"mobile-tab-editor",onClick:()=>r("editor"),className:"flex-1 py-2 text-sm font-medium ".concat("editor"===t?"text-accent-600 dark:text-accent-400 border-b-2 border-accent-600 dark:border-accent-400":"text-muted-foreground"),children:[(0,n.jsx)(m.A,{className:"h-4 w-4 inline-block mr-1"}),i("markdownPreview.editor")]}),(0,n.jsxs)("button",{"data-testid":"mobile-tab-preview",onClick:()=>r("preview"),className:"flex-1 py-2 text-sm font-medium ".concat("preview"===t?"text-accent-600 dark:text-accent-400 border-b-2 border-accent-600 dark:border-accent-400":"text-muted-foreground"),children:[(0,n.jsx)(h.A,{className:"h-4 w-4 inline-block mr-1"}),i("markdownPreview.preview")]})]})}),W=(0,i.memo)(function(e){let{isMobile:t}=e,r=(0,l.c)("worktree");return(0,n.jsxs)("div",{"data-testid":"maximize-hint",className:"flex items-center justify-center px-4 py-1 bg-muted text-muted-foreground text-xs",children:[r("markdownPreview.exitFullscreenHint")," ",t&&r("markdownPreview.exitFullscreenHintSwipe")]})}),C=(0,i.memo)(function(e){let{onDismiss:t}=e,r=(0,l.c)("worktree");return(0,n.jsxs)("div",{"data-testid":"large-file-warning",className:"flex items-center gap-2 px-4 py-2 bg-warning-subtle border-b border-warning-border text-warning-foreground text-sm",children:[(0,n.jsx)(f.A,{className:"h-4 w-4"}),r("markdownPreview.largeFileWarning"),(0,n.jsx)("button",{onClick:t,className:"ml-auto text-warning hover:text-warning",children:(0,n.jsx)(p.A,{className:"h-4 w-4"})})]})})},50666:(e,t,r)=>{r.d(t,{Ck:()=>a});var n=r(95155),i=r(12115),l=r(53482);function a(e){let{children:t,as:r="div",className:a=""}=e,s=function e(t){return null==t||"boolean"==typeof t?"":"string"==typeof t?t:"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):i.isValidElement(t)?e(t.props.children):""}(t);if(!s||0===s.trim().length)return(0,n.jsx)(r,{className:a||void 0,children:t});let o="relative group ".concat("span"===r?"block ":"").concat(a).trim();return(0,n.jsxs)(r,{className:o,"data-testid":"code-block-with-copy",children:[t,(0,n.jsx)(l.i,{text:s,className:"absolute right-2 top-2 z-10 opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 focus:opacity-100"})]})}},69352:(e,t,r)=>{r.d(t,{WU:()=>c,d3:()=>d,dj:()=>o,uO:()=>u});var n,i,l,a,s=r(9567);function o(e){return e.startsWith("#")?"anchor":e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:")?"external":"relative"}function c(e,t){if(!t)return null;let r=e.substring(0,e.lastIndexOf("/")+1);try{let e=new URL(r,"file:///"),n=new URL(t,e),i=decodeURIComponent(n.pathname);if(i.startsWith("/")){let e=i.substring(1);if(e.length>0)return e}}catch(e){}return null}function d(e){return!e||0===e.length||e.length>2048||/[\x00-\x1f\x7f]/.test(e)?null:e}let u={...s.j,attributes:{...s.j.attributes,a:[...(null!=(l=null==(n=s.j.attributes)?void 0:n.a)?l:[]).filter(e=>"href"!==e),["href",/^(?:#|mailto:|tel:|https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/]],img:[...(null!=(a=null==(i=s.j.attributes)?void 0:i.img)?a:[]).filter(e=>"src"!==e),["src",/^(?:https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/],"alt","width","height"]}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6488],{2317:(e,t,r)=>{r.d(t,{V:()=>a});var n=r(12115);function o(){try{let e="__localStorage_test__";return window.localStorage.setItem(e,"test"),window.localStorage.removeItem(e),!0}catch(e){return!1}}function a(e){let{key:t,defaultValue:r,validate:a,serialize:s=JSON.stringify,deserialize:i=JSON.parse}=e,c=(0,n.useRef)(r),l=(0,n.useRef)(a),u=(0,n.useRef)(s),d=(0,n.useRef)(i);c.current=r,l.current=a,u.current=s,d.current=i;let[f,p]=(0,n.useState)(!1),[y,m]=(0,n.useState)(r),w=(0,n.useCallback)(()=>{if(!o())return c.current;try{let e=window.localStorage.getItem(t);if(null===e)return c.current;let r=d.current(e);if(l.current)return l.current(r)?r:c.current;return r}catch(e){return c.current}},[t]),g=(0,n.useCallback)(e=>{if(o())try{let r=u.current(e);window.localStorage.setItem(t,r)}catch(e){}},[t]),h=(0,n.useCallback)(e=>{m(t=>{let r="function"==typeof e?e(t):e;return g(r),r})},[g]),S=(0,n.useCallback)(()=>{if(o())try{window.localStorage.removeItem(t)}catch(e){}m(c.current)},[t]);return(0,n.useEffect)(()=>{p(o()),m(w())},[w]),{value:y,setValue:h,removeValue:S,isAvailable:f}}},7636:(e,t,r)=>{r.d(t,{LV:()=>c,Si:()=>o,UZ:()=>s,Xn:()=>u,_s:()=>d,nO:()=>l,s6:()=>i});let n=["updatedAt","repositoryName","branchName","status","lastSent"],o=e=>n.includes(e),a={waiting:0,ready:1,running:2,generating:3,idle:4};function s(e){let t=new Set;for(let r of e)!1===r.visible&&t.add(r.path);return t}function i(e,t){return 0===t.size?e.slice():e.filter(e=>{let r=e.repositoryPath;return!r||!t.has(r)})}function c(e){let t=function(e){let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r)|0;return Math.abs(t)}(e)%360;return"hsl(".concat(t,", ").concat(65,"%, ").concat(60,"%)")}function l(e,t){if(!e&&!t)return 0;if(!e)return 1;if(!t)return -1;let r=e instanceof Date?e.getTime():new Date(e).getTime();return(t instanceof Date?t.getTime():new Date(t).getTime())-r}function u(e,t,r){let n=[...e];return n.sort((e,n)=>{let o=0;switch(t){case"updatedAt":{let t=e=>e?e instanceof Date?e.getTime():new Date(e).getTime():0,r=t(e.lastActivity);o=t(n.lastActivity)-r;break}case"repositoryName":{let t=e.repositoryName.toLowerCase(),r=n.repositoryName.toLowerCase();o=t.localeCompare(r);break}case"branchName":{let t=e.name.toLowerCase(),r=n.name.toLowerCase();o=t.localeCompare(r);break}case"status":o=a[e.status]-a[n.status];break;case"lastSent":{let t=l(e.lastActivity,n.lastActivity);if(!e.lastActivity&&!n.lastActivity){o=0;break}if(!e.lastActivity)return 1;if(!n.lastActivity)return -1;o=t;break}default:o=0}return("updatedAt"===t||"lastSent"===t?"desc"===r:"asc"===r)?o:-o}),n}function d(e,t,r){let n=new Map;for(let t of e){let e=t.repositoryName;n.has(e)||n.set(e,[]),n.get(e).push(t)}return[...n.keys()].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase())).map(e=>({repositoryName:e,branches:u(n.get(e),t,r)}))}},22592:(e,t,r)=>{r.d(t,{Ps:()=>d,W5:()=>u});var n=r(95155),o=r(12115),a=r(38218),s=r(68704);let i="data-pc-size",c={size:s.r5,setSize:()=>{},isMobile:!1,factor:s.d8[s.r5].factor,isAvailable:!1},l=(0,o.createContext)(c);function u(e){let{children:t}=e,{size:r,setSize:c,isAvailable:u}=(0,s.of)(),d=(0,a.a)();(0,o.useEffect)(()=>{if("undefined"==typeof document)return;let e=document.documentElement;return d?void e.removeAttribute(i):(e.setAttribute(i,r),()=>{e.removeAttribute(i)})},[r,d]);let f=(0,o.useMemo)(()=>({size:r,setSize:c,isMobile:d,factor:s.d8[r].factor,isAvailable:u}),[r,c,d,u]);return(0,n.jsx)(l.Provider,{value:f,children:t})}function d(){return(0,o.useContext)(l)}},32916:(e,t,r)=>{r.d(t,{GB:()=>u,VF:()=>d});var n=r(95155),o=r(12115),a=r(7636);let s="updatedAt",i=(0,o.createContext)(null);function c(e,t,r,n){let a=(0,o.useRef)(!0);(0,o.useEffect)(()=>{try{let t=localStorage.getItem(e);t&&n(t)}catch(e){}},[]),(0,o.useEffect)(()=>{if(a.current){a.current=!1;return}try{localStorage.setItem(e,r())}catch(e){}},[t])}function l(e,t){switch(t.type){case"TOGGLE":return{...e,isOpen:!e.isOpen};case"SET_WIDTH":return{...e,width:t.width};case"OPEN_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!0};case"CLOSE_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!1};case"SET_SORT_KEY":return{...e,sortKey:t.sortKey};case"SET_SORT_DIRECTION":return{...e,sortDirection:t.sortDirection};case"LOAD_SORT_SETTINGS":return{...e,sortKey:t.sortKey,sortDirection:t.sortDirection};case"SET_VIEW_MODE":return{...e,viewMode:t.viewMode};default:return e}}function u(e){let{children:t,initialOpen:r=!0,initialWidth:u=224}=e,[d,f]=(0,o.useReducer)(l,{isOpen:r,width:u,isMobileDrawerOpen:!1,sortKey:s,sortDirection:"desc",viewMode:"grouped"});c("mcbd-sidebar-sort","".concat(d.sortKey,":").concat(d.sortDirection),()=>JSON.stringify({sortKey:d.sortKey,sortDirection:d.sortDirection}),e=>{try{let t=JSON.parse(e),r=t.sortDirection,n=(0,a.Si)(t.sortKey)?t.sortKey:s;n&&("asc"===r||"desc"===r)&&f({type:"LOAD_SORT_SETTINGS",sortKey:n,sortDirection:r})}catch(e){}}),c("mcbd-sidebar-view-mode",d.viewMode,()=>d.viewMode,e=>{("grouped"===e||"flat"===e)&&f({type:"SET_VIEW_MODE",viewMode:e})}),c("mcbd-sidebar-width",d.width,()=>String(d.width),e=>{let t=Number(e);!isNaN(t)&&t>0&&f({type:"SET_WIDTH",width:288===t?224:t})});let p=(0,o.useCallback)(()=>{f({type:"TOGGLE"})},[]),y=(0,o.useCallback)(e=>{f({type:"SET_WIDTH",width:e})},[]),m=(0,o.useCallback)(()=>{f({type:"OPEN_MOBILE_DRAWER"})},[]),w=(0,o.useCallback)(()=>{f({type:"CLOSE_MOBILE_DRAWER"})},[]),g=(0,o.useCallback)(e=>{f({type:"SET_SORT_KEY",sortKey:e})},[]),h=(0,o.useCallback)(e=>{f({type:"SET_SORT_DIRECTION",sortDirection:e})},[]),S=(0,o.useCallback)(e=>{f({type:"SET_VIEW_MODE",viewMode:e})},[]),b=(0,o.useMemo)(()=>({isOpen:d.isOpen,width:d.width,isMobileDrawerOpen:d.isMobileDrawerOpen,sortKey:d.sortKey,sortDirection:d.sortDirection,toggle:p,setWidth:y,openMobileDrawer:m,closeMobileDrawer:w,setSortKey:g,setSortDirection:h,viewMode:d.viewMode,setViewMode:S}),[d.isOpen,d.width,d.isMobileDrawerOpen,d.sortKey,d.sortDirection,d.viewMode,p,y,m,w,g,h,S]);return(0,n.jsx)(i.Provider,{value:b,children:t})}function d(){let e=(0,o.useContext)(i);if(!e)throw Error("useSidebarContext must be used within a SidebarProvider");return e}},38218:(e,t,r)=>{r.d(t,{D:()=>a,a:()=>s});var n=r(12115);let o=n.useLayoutEffect,a=768;function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{breakpoint:t=a}=e,[r,s]=(0,n.useState)(!1);return o(()=>{let e=window.matchMedia("(max-width: ".concat(t-1,"px)"));s(e.matches);let r=e=>{s(e.matches)};return e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}},[t]),r}},39649:(e,t,r)=>{r.d(t,{$f:()=>d,H8:()=>u});var n=r(95155),o=r(12115),a=r(80344);let s={PROCESSING:2e3,SESSION_RUNNING:5e3,IDLE:1e4},i=(0,o.createContext)(null),c={selectedWorktreeId:null,worktrees:[],repositories:[],selectedWorktreeDetail:null,isLoading:!0,isLoadingDetail:!1,error:null};function l(e,t){switch(t.type){case"SET_WORKTREES":return{...e,worktrees:t.worktrees,isLoading:!1};case"SET_REPOSITORIES":return{...e,repositories:t.repositories};case"SELECT_WORKTREE":{var r;let n=null!=(r=e.worktrees.find(e=>e.id===t.id))?r:null;return{...e,selectedWorktreeId:t.id,selectedWorktreeDetail:null!=n?n:e.selectedWorktreeDetail,isLoadingDetail:null===n}}case"SET_WORKTREE_DETAIL":return{...e,selectedWorktreeDetail:t.detail};case"SET_LOADING":return{...e,isLoading:t.isLoading};case"SET_LOADING_DETAIL":return{...e,isLoadingDetail:t.isLoadingDetail};case"SET_ERROR":return{...e,error:t.error,isLoading:!1};default:return e}}function u(e){let{children:t,externalWorktrees:r,externalRepositories:u}=e,d=void 0!==r,[f,p]=(0,o.useReducer)(l,c);(0,o.useEffect)(()=>{d&&r&&p({type:"SET_WORKTREES",worktrees:r})},[d,r]),(0,o.useEffect)(()=>{d&&u&&p({type:"SET_REPOSITORIES",repositories:u})},[d,u]);let y=(0,o.useCallback)(async()=>{if(!d){p({type:"SET_LOADING",isLoading:!0}),p({type:"SET_ERROR",error:null});try{var e;let t=await a.y.getAll();p({type:"SET_WORKTREES",worktrees:t.worktrees}),p({type:"SET_REPOSITORIES",repositories:null!=(e=t.repositories)?e:[]})}catch(e){p({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktrees"})}}},[d]),m=(0,o.useCallback)(async e=>{p({type:"SELECT_WORKTREE",id:e}),p({type:"SET_ERROR",error:null});try{a.y.markAsViewed(e).catch(e=>{console.warn("[WorktreeSelectionContext] Failed to mark as viewed:",e)});let t=await a.y.getById(e);p({type:"SET_WORKTREE_DETAIL",detail:t})}catch(e){p({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktree detail"})}finally{p({type:"SET_LOADING_DETAIL",isLoadingDetail:!1})}},[]),w=(0,o.useCallback)(async()=>{await y()},[y]);(0,o.useEffect)(()=>{d||y()},[y,d]),(0,o.useEffect)(()=>{if(d)return;let e=null,t=!0,r=async()=>{if(t)try{var n,o;let i=await a.y.getAll();p({type:"SET_WORKTREES",worktrees:i.worktrees}),p({type:"SET_REPOSITORIES",repositories:null!=(n=i.repositories)?n:[]});let c=(o=i.worktrees).some(e=>e.isProcessing||e.isWaitingForResponse)?s.PROCESSING:o.some(e=>e.isSessionRunning)?s.SESSION_RUNNING:s.IDLE;t&&(e=setTimeout(r,c))}catch(n){if(n instanceof a.hD&&401===n.status)return;console.error("[WorktreeSelectionContext] Polling error:",n),t&&(e=setTimeout(r,s.SESSION_RUNNING))}};return r(),()=>{t=!1,e&&clearTimeout(e)}},[d]);let g={selectedWorktreeId:f.selectedWorktreeId,worktrees:f.worktrees,repositories:f.repositories,selectedWorktreeDetail:f.selectedWorktreeDetail,isLoadingDetail:f.isLoadingDetail,error:f.error,selectWorktree:m,refreshWorktrees:w};return(0,n.jsx)(i.Provider,{value:g,children:t})}function d(){let e=(0,o.useContext)(i);if(!e)throw Error("useWorktreeSelection must be used within a WorktreeSelectionProvider");return e}},52703:(e,t,r)=>{r.d(t,{Oo:()=>o,ST:()=>n,zS:()=>a});let n="client_version",o="version_mismatch";function a(e){let t;try{t=JSON.parse(e)}catch(e){return null}if(!t||"object"!=typeof t)return null;let r=t;if("broadcast"===r.type){let e=r.data;return e&&"object"==typeof e?"string"!=typeof e.type?null:(void 0===e.worktreeId&&"string"==typeof r.worktreeId&&(e.worktreeId=r.worktreeId),e):null}return"string"==typeof r.type?r:null}},63365:(e,t,r)=>{r.d(t,{tS:()=>u,xM:()=>d,T3:()=>f});var n=r(95155),o=r(12115),a=r(52703);function s(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.WebSocket?globalThis.WebSocket:null}let i=()=>{},c={status:"disconnected",connected:!1,subscribe:i,unsubscribe:i,addListener:()=>i},l=(0,o.createContext)(null);function u(e){let{children:t,enabled:r=!0}=e,i=(0,o.useRef)(new Set),c=(0,o.useRef)(new Map),{status:u,subscribe:d,unsubscribe:f}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onEvent:t,onStatusChange:r,autoReconnect:n=!0,reconnectBaseDelay:i=1e3,reconnectMaxDelay:c=3e4,enabled:l=!0}=e,[u,d]=(0,o.useState)("disconnected"),f=(0,o.useRef)(null),p=(0,o.useRef)(null),y=(0,o.useRef)(0),m=(0,o.useRef)(new Set),w=(0,o.useRef)(!1),g=(0,o.useRef)(t);g.current=t;let h=(0,o.useRef)(r);h.current=r;let S=(0,o.useCallback)(e=>{var t;d(e),null==(t=h.current)||t.call(h,e)},[]),b=(0,o.useCallback)(()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},[]),E=(0,o.useCallback)(()=>{if(!l)return;let e=s();if(!e||f.current&&(f.current.readyState===e.OPEN||f.current.readyState===e.CONNECTING))return;b(),w.current=!1,S("connecting");let t="https:"===window.location.protocol?"wss:":"ws:",r=new e("".concat(t,"//").concat(window.location.host));f.current=r,r.onopen=()=>{y.current=0,S("connected");try{r.send(JSON.stringify({type:a.ST,version:"0.14.0"}))}catch(e){}m.current.forEach(e=>{try{r.send(JSON.stringify({type:"subscribe",worktreeId:e}))}catch(e){}})},r.onmessage=e=>{var t;let r="string"==typeof e.data?e.data:String(e.data),n=(0,a.zS)(r);n&&(null==(t=g.current)||t.call(g,n))},r.onerror=()=>{S("error")},r.onclose=()=>{var e;if(f.current=null,S("disconnected"),w.current||!n||"undefined"!=typeof document&&"hidden"===document.visibilityState)return;let t=(e=y.current,Math.min(i*2**Math.max(0,e),c));y.current+=1,p.current=setTimeout(()=>{p.current=null,E()},t)}},[l,n,i,c,S,b]),T=(0,o.useCallback)(()=>{if(b(),w.current=!0,f.current){try{f.current.close(1e3,"Client disconnect")}catch(e){}f.current=null}},[b]),k=(0,o.useCallback)(e=>{let t=f.current,r=s();if(t&&r&&t.readyState===r.OPEN)try{t.send(JSON.stringify(e))}catch(e){}},[]),C=(0,o.useCallback)(e=>{m.current.has(e)||(m.current.add(e),k({type:"subscribe",worktreeId:e}))},[k]),v=(0,o.useCallback)(e=>{m.current.has(e)&&(m.current.delete(e),k({type:"unsubscribe",worktreeId:e}))},[k]);return(0,o.useEffect)(()=>{if(l)return E(),()=>{T()}},[l,E,T]),(0,o.useEffect)(()=>{if(!l||"undefined"==typeof document)return;let e=()=>{"visible"===document.visibilityState&&(f.current||(y.current=0,E()))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[l,E]),{status:u,subscribe:C,unsubscribe:v,send:k}}({enabled:r,onEvent:(0,o.useCallback)(e=>{i.current.forEach(t=>{try{t(e)}catch(e){}})},[])}),p=(0,o.useCallback)(e=>{var t;let r=c.current,n=null!=(t=r.get(e))?t:0;r.set(e,n+1),0===n&&d(e)},[d]),y=(0,o.useCallback)(e=>{var t;let r=c.current,n=null!=(t=r.get(e))?t:0;n<=1?(r.delete(e),f(e)):r.set(e,n-1)},[f]),m=(0,o.useCallback)(e=>(i.current.add(e),()=>{i.current.delete(e)}),[]),w=(0,o.useMemo)(()=>({status:u,connected:"connected"===u,subscribe:p,unsubscribe:y,addListener:m}),[u,p,y,m]);return(0,n.jsx)(l.Provider,{value:w,children:t})}function d(){var e;return null!=(e=(0,o.useContext)(l))?e:c}function f(e){let{addListener:t}=d(),r=(0,o.useRef)(e);r.current=e,(0,o.useEffect)(()=>t(e=>r.current(e)),[t])}},65380:(e,t,r)=>{r.d(t,{H:()=>i,O:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)(!1);function s(e){let{children:t,authEnabled:r}=e;return(0,n.jsx)(a.Provider,{value:r,children:t})}function i(){return(0,o.useContext)(a)}},66966:(e,t,r)=>{r.d(t,{g7:()=>c,rC:()=>u,Fn:()=>l});var n=r(95155),o=r(12115),a=r(63365),s=r(39649);let i=(0,o.createContext)(null);function c(e){let{children:t}=e,{worktrees:r,repositories:c,isLoading:l,error:u,refresh:d}=function(){let[e,t]=(0,o.useState)([]),[r,n]=(0,o.useState)([]),[s,i]=(0,o.useState)(!0),[c,l]=(0,o.useState)(null),u=(0,o.useRef)(null),d=(0,o.useRef)([]),f=(0,o.useRef)(null),{connected:p,subscribe:y,unsubscribe:m,addListener:w}=(0,a.xM)(),g=(0,o.useRef)(p);g.current=p;let h=(0,o.useCallback)(async()=>{try{var e,r;l(null);let a=await fetch("/api/worktrees");if(!a.ok)throw Error("Failed to fetch worktrees: ".concat(a.status));let s=await a.json(),i=null!=(e=s.worktrees)?e:[],c=null!=(r=s.repositories)?r:[];(0,o.startTransition)(()=>{t(i),n(c)}),d.current=i}catch(e){l(e instanceof Error?e:Error(String(e)))}finally{i(!1)}},[]);(0,o.useEffect)(()=>{h()},[h]);let S=(0,o.useCallback)(()=>d.current.some(e=>!0===e.isSessionRunning),[]),b=(0,o.useCallback)(()=>{let e=S();return g.current?e?2e4:6e4:e?5e3:3e4},[S]),E=(0,o.useCallback)(()=>{null!==u.current&&(clearInterval(u.current),u.current=null),f.current=null},[]),T=(0,o.useCallback)(()=>{E();let e=b();f.current=e,u.current=setInterval(()=>{h()},e)},[b,h,E]);(0,o.useEffect)(()=>{let e=()=>{document.hidden?E():(h(),T())},t=setTimeout(()=>{T()},0);return document.addEventListener("visibilitychange",e),()=>{clearTimeout(t),E(),document.removeEventListener("visibilitychange",e)}},[h,T,E]),(0,o.useEffect)(()=>{if(d.current=e,"undefined"!=typeof document&&document.hidden||null===f.current)return;let t=b();f.current!==t&&T()},[e,p,b,T]);let k=e.map(e=>e.id).sort().join(" ");return(0,o.useEffect)(()=>{let e=k.length>0?k.split(" "):[];return e.forEach(e=>y(e)),()=>{e.forEach(e=>m(e))}},[k,y,m]),(0,o.useEffect)(()=>w(e=>{if("session_status_changed"===e.type&&"string"==typeof e.worktreeId){let r=e.worktreeId,n=e.isRunning;if("boolean"==typeof n){if((null!=e.cliTool||null!=e.instance)&&!1===n)return void h();(0,o.startTransition)(()=>{t(e=>{let t=!1,o=e.map(e=>e.id===r&&e.isSessionRunning!==n?(t=!0,{...e,isSessionRunning:n}):e);return t?o:e})})}}else("message"===e.type||"message_updated"===e.type)&&h()}),[w,h]),{worktrees:e,repositories:r,isLoading:s,error:c,refresh:h}}(),f=(0,o.useMemo)(()=>({worktrees:r,repositories:c,isLoading:l,error:u,refresh:d}),[r,c,l,u,d]);return(0,n.jsx)(i.Provider,{value:f,children:(0,n.jsx)(s.H8,{externalWorktrees:r,externalRepositories:c,children:t})})}function l(){let e=(0,o.useContext)(i);if(null===e)throw Error("useWorktreesCacheContext must be used within a WorktreesCacheProvider");return e}function u(){return(0,o.useContext)(i)}},68704:(e,t,r)=>{r.d(t,{Uf:()=>a,d8:()=>s,fM:()=>i,of:()=>l,r5:()=>o,rq:()=>c});var n=r(2317);let o="medium",a=["large","medium","small","xsmall"],s={large:{value:"large",rootFontSizePx:18,factor:1.125,terminalFontSize:16},medium:{value:"medium",rootFontSizePx:16,factor:1,terminalFontSize:14},small:{value:"small",rootFontSizePx:14,factor:.875,terminalFontSize:12},xsmall:{value:"xsmall",rootFontSizePx:12.5,factor:.78,terminalFontSize:11}};function i(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(s,e)}function c(e){return s[e].terminalFontSize}function l(){let{value:e,setValue:t,isAvailable:r}=(0,n.V)({key:"mcbd-pc-display-size",defaultValue:o,validate:i});return{size:e,setSize:t,isAvailable:r}}},70628:(e,t,r)=>{r.d(t,{K:()=>i,S:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[r,s]=(0,o.useState)(!1),i=(0,o.useCallback)(()=>s(e=>!e),[]),c=(0,o.useMemo)(()=>({open:r,setOpen:s,toggle:i}),[r,i]);return(0,n.jsx)(a.Provider,{value:c,children:t})}function i(){return(0,o.useContext)(a)}},80344:(e,t,r)=>{r.d(t,{$T:()=>c,GQ:()=>u,Rx:()=>i,hD:()=>n,hS:()=>l,y:()=>s});class n extends Error{constructor(e,t,r){super(e),this.status=t,this.data=r,this.name="ApiError"}}async function o(e,t,r){if(!(e.headers.get("content-type")||"").includes("application/json"))return t;try{return await e.json()}catch(e){return t}}async function a(e,t){try{let r=new Headers(null==t?void 0:t.headers);r.set("Content-Type","application/json");let a=await fetch(e,{...t,headers:r}),s=a.headers.get("content-type")||"";if(a.redirected&&a.url.includes("/login"))throw new n("Authentication required",401);if(!a.ok){let e=await o(a,{},"error-body");throw new n(e.error||"HTTP error ".concat(a.status),a.status,e)}if(!s.includes("application/json"))throw new n("Unexpected response format",a.status);return a.json()}catch(e){if(e instanceof n)throw e;throw new n(e instanceof Error?e.message:"Unknown error",0,e)}}let s={getAll:async()=>a("/api/worktrees"),getById:async e=>a("/api/worktrees/".concat(e)),updateDescription:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({description:t})}),updateLink:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({link:t})}),toggleFavorite:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({favorite:t})}),updateStatus:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({status:t})}),updateCliTool:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({cliToolId:t})}),markAsViewed:async e=>a("/api/worktrees/".concat(e,"/viewed"),{method:"PATCH"}),async getMessages(e,t,r,n){let o=new URLSearchParams;return t&&o.append("cliTool",t),r&&o.append("includeArchived","true"),"number"==typeof n&&Number.isFinite(n)&&o.append("limit",String(n)),a("/api/worktrees/".concat(e,"/messages").concat(o.toString()?"?".concat(o.toString()):""))},async sendMessage(e,t,r){let n={content:t};return(null==r?void 0:r.cliToolId)&&(n.cliToolId=r.cliToolId),(null==r?void 0:r.instanceId)&&(n.instanceId=r.instanceId),(null==r?void 0:r.imagePath)&&(n.imagePath=r.imagePath),a("/api/worktrees/".concat(e,"/send"),{method:"POST",body:JSON.stringify(n)})},async uploadImageFile(e,t){let r=Date.now(),n="".concat(r,"-").concat(t.name),a=".commandmate/attachments",s=new FormData;s.append("file",new File([t],n,{type:t.type}));let i=await fetch("/api/worktrees/".concat(e,"/upload/").concat(a),{method:"POST",body:s});if(!i.ok){var c;let e=await o(i,{},"error-body");throw Error((null==e||null==(c=e.error)?void 0:c.message)||"Upload failed (HTTP ".concat(i.status,")"))}return{path:(await o(i,{},"response-body")).path||"".concat(a,"/").concat(n)}},getLogs:async e=>a("/api/worktrees/".concat(e,"/logs")),async getLogFile(e,t,r){let n=(null==r?void 0:r.sanitize)?"?sanitize=true":"";return a("/api/worktrees/".concat(e,"/logs/").concat(t).concat(n))},async killSession(e,t,r){let n=new URLSearchParams;t&&n.set("cliTool",t),r&&n.set("instance",r);let o=n.toString();return a("/api/worktrees/".concat(e,"/kill-session").concat(o?"?".concat(o):""),{method:"POST"})}},i={scan:async e=>a("/api/repositories/scan",{method:"POST",body:JSON.stringify({repositoryPath:e})}),sync:async()=>a("/api/repositories/sync",{method:"POST"}),delete:async e=>a("/api/repositories",{method:"DELETE",body:JSON.stringify({repositoryPath:e})}),async clone(e,t){var r;return a("/api/repositories/clone",{method:"POST",body:JSON.stringify({cloneUrl:e,fork:null!=(r=null==t?void 0:t.fork)&&r})})},getCloneStatus:async e=>a("/api/repositories/clone/".concat(e)),getExcluded:async()=>a("/api/repositories/excluded"),restore:async e=>a("/api/repositories/restore",{method:"PUT",body:JSON.stringify({repositoryPath:e})}),list:async()=>a("/api/repositories"),updateDisplayName:async(e,t)=>a("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({displayName:t})}),updateVisibility:async(e,t)=>a("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({visible:t})})},c={getAll:async e=>(await a("/api/worktrees/".concat(e,"/memos"))).memos,create:async(e,t)=>(await a("/api/worktrees/".concat(e,"/memos"),{method:"POST",body:JSON.stringify(t||{})})).memo,update:async(e,t,r)=>(await a("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"PUT",body:JSON.stringify(r)})).memo,delete:async(e,t)=>a("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"DELETE"}),async reorder(e,t){await a("/api/worktrees/".concat(e,"/memos"),{method:"PATCH",body:JSON.stringify({memoIds:t})})}};function l(e){return e instanceof n||e instanceof Error?e.message:"An unknown error occurred"}let u={checkForUpdate:async()=>a("/api/app/update-check",{method:"GET"}),startUpdate:async()=>a("/api/app/update",{method:"POST"}),async ping(){try{return(await fetch("/api/auth/status",{cache:"no-store"})).ok}catch(e){return!1}}}},89275:(e,t,r)=>{r.d(t,{Bo:()=>u,Hq:()=>c});var n=r(95155),o=r(12115),a=r(20063);let s={startTransition:e=>e()},i=(0,o.createContext)(null);function c(){var e;let t=(0,a.useRouter)(),{startTransition:r}=null!=(e=(0,o.useContext)(i))?e:s;return(0,o.useMemo)(()=>({push:e=>r(()=>t.push(e)),replace:e=>r(()=>t.replace(e))}),[t,r])}function l(e){let{onCommit:t}=e,r=(0,a.usePathname)(),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{if(!n.current){n.current=!0;return}t()},[r,t]),null}function u(e){let{children:t}=e,r=(0,o.useRef)(null),a=(0,o.useCallback)(()=>{var e;null==(e=r.current)||e.call(r)},[]),s=(0,o.useCallback)(e=>{var t;t=()=>new Promise(t=>{let n=!1,o=()=>{n||(n=!0,t())};r.current=o,e(),window.setTimeout(o,500)}),"undefined"==typeof document||"function"!=typeof document.startViewTransition||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?t():document.startViewTransition(t)},[]),c=(0,o.useMemo)(()=>({startTransition:s}),[s]);return(0,n.jsxs)(i.Provider,{value:c,children:[(0,n.jsx)(l,{onCommit:a}),t]})}},92614:(e,t,r)=>{r.d(t,{C:()=>i,E:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[r,s]=(0,o.useState)(!1),i=(0,o.useCallback)(()=>s(e=>!e),[]),c=(0,o.useMemo)(()=>({open:r,setOpen:s,toggle:i}),[r,i]);return(0,n.jsx)(a.Provider,{value:c,children:t})}function i(){return(0,o.useContext)(a)}},94442:(e,t,r)=>{r.d(t,{dj:()=>E,tE:()=>b});var n=r(95155),o=r(12115),a=r(47650),s=r(18955),i=r(42529),c=r(78874),l=r(52056),u=r(23327),d=r(65229),f=r(59854),p=r(9900),y=r(9286);function m(e){let{type:t,iconColor:r}=e,o="h-5 w-5 ".concat(r);switch(t){case"success":return(0,n.jsx)(i.A,{className:o,"data-testid":"toast-icon-success"});case"error":return(0,n.jsx)(c.A,{className:o,"data-testid":"toast-icon-error"});case"warning":return(0,n.jsx)(l.A,{className:o,"data-testid":"toast-icon-warning"});default:return(0,n.jsx)(u.A,{className:o,"data-testid":"toast-icon-info"})}}function w(e){let{id:t,message:r,type:a,onClose:i,duration:c=3e3}=e,l=(0,s.c)("common"),u=(0,o.useRef)(null),f=function(e){switch(e){case"success":return{bgColor:"bg-success-subtle",borderColor:"border-success-border",textColor:"text-success-foreground",iconColor:"text-success-foreground"};case"error":return{bgColor:"bg-danger-subtle",borderColor:"border-danger-border",textColor:"text-danger-foreground",iconColor:"text-danger-foreground"};case"warning":return{bgColor:"bg-warning-subtle",borderColor:"border-warning-border",textColor:"text-warning-foreground",iconColor:"text-warning-foreground"};default:return{bgColor:"bg-info-subtle",borderColor:"border-info-border",textColor:"text-info-foreground",iconColor:"text-info-foreground"}}}(a),[w,g]=(0,o.useState)(!0),{shouldRender:h,isExiting:S}=(0,y.O)(w,p.Ys),b=(0,o.useRef)(i);b.current=i,(0,o.useEffect)(()=>{h||b.current(t)},[h,t]),(0,o.useEffect)(()=>(c>0&&(u.current=setTimeout(()=>{g(!1)},c)),()=>{u.current&&clearTimeout(u.current)}),[c]);let E=(0,o.useCallback)(()=>{u.current&&clearTimeout(u.current),g(!1)},[]);return(0,n.jsxs)("div",{"data-testid":"toast-".concat(t),role:"alert",className:"\n ".concat(f.bgColor,"\n ").concat(f.borderColor,"\n ").concat(f.textColor,"\n border rounded-lg shadow-lg p-4 min-w-[300px] max-w-[400px]\n flex items-start gap-3\n ").concat(S?"animate-out fade-out-0 slide-out-to-right-full duration-200 fill-mode-forwards pointer-events-none":"animate-slide-in","\n "),children:[(0,n.jsx)(m,{type:a,iconColor:f.iconColor}),(0,n.jsx)("p",{className:"flex-1 text-sm font-medium",children:r}),(0,n.jsx)("button",{"data-testid":"toast-close-button",onClick:E,"aria-label":l("closeNotification"),className:"\n ".concat(f.textColor,"\n hover:opacity-70\n focus:outline-none focus:ring-2 focus:ring-offset-2\n transition-opacity\n "),children:(0,n.jsx)(d.A,{className:"h-4 w-4"})})]})}function g(e){let{toasts:t,onClose:r}=e,[s,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{i(!0)},[]);let c=(0,n.jsx)("div",{"data-testid":"toast-container","aria-live":"polite",className:"fixed bottom-4 right-4 flex flex-col gap-2",style:{zIndex:f.M.TOAST},children:t.map(e=>(0,n.jsx)(w,{id:e.id,message:e.message,type:e.type,onClose:r,duration:e.duration},e.id))});return s?(0,a.createPortal)(c,document.body):null}function h(){let[e,t]=(0,o.useState)([]),r=(0,o.useRef)(0),n=(0,o.useCallback)(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,a="toast-".concat(++r.current,"-").concat(Date.now()),s={id:a,message:e,type:n,duration:o};return t(e=>[...e,s]),a},[]),a=(0,o.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),s=(0,o.useCallback)(()=>{t([])},[]);return(0,o.useMemo)(()=>({toasts:e,showToast:n,removeToast:a,clearToasts:s}),[e,n,a,s])}let S=(0,o.createContext)(null);function b(e){let{children:t}=e,r=h();return(0,n.jsxs)(S.Provider,{value:r,children:[t,(0,n.jsx)(g,{toasts:r.toasts,onClose:r.removeToast})]})}function E(){let e=(0,o.useContext)(S),t=h();return null!=e?e:t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6488],{2317:(e,t,r)=>{r.d(t,{V:()=>a});var n=r(12115);function o(){try{let e="__localStorage_test__";return window.localStorage.setItem(e,"test"),window.localStorage.removeItem(e),!0}catch(e){return!1}}function a(e){let{key:t,defaultValue:r,validate:a,serialize:s=JSON.stringify,deserialize:i=JSON.parse}=e,c=(0,n.useRef)(r),l=(0,n.useRef)(a),u=(0,n.useRef)(s),d=(0,n.useRef)(i);c.current=r,l.current=a,u.current=s,d.current=i;let[f,p]=(0,n.useState)(!1),[y,m]=(0,n.useState)(r),w=(0,n.useCallback)(()=>{if(!o())return c.current;try{let e=window.localStorage.getItem(t);if(null===e)return c.current;let r=d.current(e);if(l.current)return l.current(r)?r:c.current;return r}catch(e){return c.current}},[t]),g=(0,n.useCallback)(e=>{if(o())try{let r=u.current(e);window.localStorage.setItem(t,r)}catch(e){}},[t]),h=(0,n.useCallback)(e=>{m(t=>{let r="function"==typeof e?e(t):e;return g(r),r})},[g]),S=(0,n.useCallback)(()=>{if(o())try{window.localStorage.removeItem(t)}catch(e){}m(c.current)},[t]);return(0,n.useEffect)(()=>{p(o()),m(w())},[w]),{value:y,setValue:h,removeValue:S,isAvailable:f}}},7636:(e,t,r)=>{r.d(t,{LV:()=>c,Si:()=>o,UZ:()=>s,Xn:()=>u,_s:()=>d,nO:()=>l,s6:()=>i});let n=["updatedAt","repositoryName","branchName","status","lastSent"],o=e=>n.includes(e),a={waiting:0,ready:1,running:2,generating:3,idle:4};function s(e){let t=new Set;for(let r of e)!1===r.visible&&t.add(r.path);return t}function i(e,t){return 0===t.size?e.slice():e.filter(e=>{let r=e.repositoryPath;return!r||!t.has(r)})}function c(e){let t=function(e){let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r)|0;return Math.abs(t)}(e)%360;return"hsl(".concat(t,", ").concat(65,"%, ").concat(60,"%)")}function l(e,t){if(!e&&!t)return 0;if(!e)return 1;if(!t)return -1;let r=e instanceof Date?e.getTime():new Date(e).getTime();return(t instanceof Date?t.getTime():new Date(t).getTime())-r}function u(e,t,r){let n=[...e];return n.sort((e,n)=>{let o=0;switch(t){case"updatedAt":{let t=e=>e?e instanceof Date?e.getTime():new Date(e).getTime():0,r=t(e.lastActivity);o=t(n.lastActivity)-r;break}case"repositoryName":{let t=e.repositoryName.toLowerCase(),r=n.repositoryName.toLowerCase();o=t.localeCompare(r);break}case"branchName":{let t=e.name.toLowerCase(),r=n.name.toLowerCase();o=t.localeCompare(r);break}case"status":o=a[e.status]-a[n.status];break;case"lastSent":{let t=l(e.lastActivity,n.lastActivity);if(!e.lastActivity&&!n.lastActivity){o=0;break}if(!e.lastActivity)return 1;if(!n.lastActivity)return -1;o=t;break}default:o=0}return("updatedAt"===t||"lastSent"===t?"desc"===r:"asc"===r)?o:-o}),n}function d(e,t,r){let n=new Map;for(let t of e){let e=t.repositoryName;n.has(e)||n.set(e,[]),n.get(e).push(t)}return[...n.keys()].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase())).map(e=>({repositoryName:e,branches:u(n.get(e),t,r)}))}},22592:(e,t,r)=>{r.d(t,{Ps:()=>d,W5:()=>u});var n=r(95155),o=r(12115),a=r(38218),s=r(68704);let i="data-pc-size",c={size:s.r5,setSize:()=>{},isMobile:!1,factor:s.d8[s.r5].factor,isAvailable:!1},l=(0,o.createContext)(c);function u(e){let{children:t}=e,{size:r,setSize:c,isAvailable:u}=(0,s.of)(),d=(0,a.a)();(0,o.useEffect)(()=>{if("undefined"==typeof document)return;let e=document.documentElement;return d?void e.removeAttribute(i):(e.setAttribute(i,r),()=>{e.removeAttribute(i)})},[r,d]);let f=(0,o.useMemo)(()=>({size:r,setSize:c,isMobile:d,factor:s.d8[r].factor,isAvailable:u}),[r,c,d,u]);return(0,n.jsx)(l.Provider,{value:f,children:t})}function d(){return(0,o.useContext)(l)}},32916:(e,t,r)=>{r.d(t,{GB:()=>u,VF:()=>d});var n=r(95155),o=r(12115),a=r(7636);let s="updatedAt",i=(0,o.createContext)(null);function c(e,t,r,n){let a=(0,o.useRef)(!0);(0,o.useEffect)(()=>{try{let t=localStorage.getItem(e);t&&n(t)}catch(e){}},[]),(0,o.useEffect)(()=>{if(a.current){a.current=!1;return}try{localStorage.setItem(e,r())}catch(e){}},[t])}function l(e,t){switch(t.type){case"TOGGLE":return{...e,isOpen:!e.isOpen};case"SET_WIDTH":return{...e,width:t.width};case"OPEN_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!0};case"CLOSE_MOBILE_DRAWER":return{...e,isMobileDrawerOpen:!1};case"SET_SORT_KEY":return{...e,sortKey:t.sortKey};case"SET_SORT_DIRECTION":return{...e,sortDirection:t.sortDirection};case"LOAD_SORT_SETTINGS":return{...e,sortKey:t.sortKey,sortDirection:t.sortDirection};case"SET_VIEW_MODE":return{...e,viewMode:t.viewMode};default:return e}}function u(e){let{children:t,initialOpen:r=!0,initialWidth:u=224}=e,[d,f]=(0,o.useReducer)(l,{isOpen:r,width:u,isMobileDrawerOpen:!1,sortKey:s,sortDirection:"desc",viewMode:"grouped"});c("mcbd-sidebar-sort","".concat(d.sortKey,":").concat(d.sortDirection),()=>JSON.stringify({sortKey:d.sortKey,sortDirection:d.sortDirection}),e=>{try{let t=JSON.parse(e),r=t.sortDirection,n=(0,a.Si)(t.sortKey)?t.sortKey:s;n&&("asc"===r||"desc"===r)&&f({type:"LOAD_SORT_SETTINGS",sortKey:n,sortDirection:r})}catch(e){}}),c("mcbd-sidebar-view-mode",d.viewMode,()=>d.viewMode,e=>{("grouped"===e||"flat"===e)&&f({type:"SET_VIEW_MODE",viewMode:e})}),c("mcbd-sidebar-width",d.width,()=>String(d.width),e=>{let t=Number(e);!isNaN(t)&&t>0&&f({type:"SET_WIDTH",width:288===t?224:t})});let p=(0,o.useCallback)(()=>{f({type:"TOGGLE"})},[]),y=(0,o.useCallback)(e=>{f({type:"SET_WIDTH",width:e})},[]),m=(0,o.useCallback)(()=>{f({type:"OPEN_MOBILE_DRAWER"})},[]),w=(0,o.useCallback)(()=>{f({type:"CLOSE_MOBILE_DRAWER"})},[]),g=(0,o.useCallback)(e=>{f({type:"SET_SORT_KEY",sortKey:e})},[]),h=(0,o.useCallback)(e=>{f({type:"SET_SORT_DIRECTION",sortDirection:e})},[]),S=(0,o.useCallback)(e=>{f({type:"SET_VIEW_MODE",viewMode:e})},[]),b=(0,o.useMemo)(()=>({isOpen:d.isOpen,width:d.width,isMobileDrawerOpen:d.isMobileDrawerOpen,sortKey:d.sortKey,sortDirection:d.sortDirection,toggle:p,setWidth:y,openMobileDrawer:m,closeMobileDrawer:w,setSortKey:g,setSortDirection:h,viewMode:d.viewMode,setViewMode:S}),[d.isOpen,d.width,d.isMobileDrawerOpen,d.sortKey,d.sortDirection,d.viewMode,p,y,m,w,g,h,S]);return(0,n.jsx)(i.Provider,{value:b,children:t})}function d(){let e=(0,o.useContext)(i);if(!e)throw Error("useSidebarContext must be used within a SidebarProvider");return e}},38218:(e,t,r)=>{r.d(t,{D:()=>a,a:()=>s});var n=r(12115);let o=n.useLayoutEffect,a=768;function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{breakpoint:t=a}=e,[r,s]=(0,n.useState)(!1);return o(()=>{let e=window.matchMedia("(max-width: ".concat(t-1,"px)"));s(e.matches);let r=e=>{s(e.matches)};return e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}},[t]),r}},39649:(e,t,r)=>{r.d(t,{$f:()=>d,H8:()=>u});var n=r(95155),o=r(12115),a=r(80344);let s={PROCESSING:2e3,SESSION_RUNNING:5e3,IDLE:1e4},i=(0,o.createContext)(null),c={selectedWorktreeId:null,worktrees:[],repositories:[],selectedWorktreeDetail:null,isLoading:!0,isLoadingDetail:!1,error:null};function l(e,t){switch(t.type){case"SET_WORKTREES":return{...e,worktrees:t.worktrees,isLoading:!1};case"SET_REPOSITORIES":return{...e,repositories:t.repositories};case"SELECT_WORKTREE":{var r;let n=null!=(r=e.worktrees.find(e=>e.id===t.id))?r:null;return{...e,selectedWorktreeId:t.id,selectedWorktreeDetail:null!=n?n:e.selectedWorktreeDetail,isLoadingDetail:null===n}}case"SET_WORKTREE_DETAIL":return{...e,selectedWorktreeDetail:t.detail};case"SET_LOADING":return{...e,isLoading:t.isLoading};case"SET_LOADING_DETAIL":return{...e,isLoadingDetail:t.isLoadingDetail};case"SET_ERROR":return{...e,error:t.error,isLoading:!1};default:return e}}function u(e){let{children:t,externalWorktrees:r,externalRepositories:u}=e,d=void 0!==r,[f,p]=(0,o.useReducer)(l,c);(0,o.useEffect)(()=>{d&&r&&p({type:"SET_WORKTREES",worktrees:r})},[d,r]),(0,o.useEffect)(()=>{d&&u&&p({type:"SET_REPOSITORIES",repositories:u})},[d,u]);let y=(0,o.useCallback)(async()=>{if(!d){p({type:"SET_LOADING",isLoading:!0}),p({type:"SET_ERROR",error:null});try{var e;let t=await a.y.getAll();p({type:"SET_WORKTREES",worktrees:t.worktrees}),p({type:"SET_REPOSITORIES",repositories:null!=(e=t.repositories)?e:[]})}catch(e){p({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktrees"})}}},[d]),m=(0,o.useCallback)(async e=>{p({type:"SELECT_WORKTREE",id:e}),p({type:"SET_ERROR",error:null});try{a.y.markAsViewed(e).catch(e=>{console.warn("[WorktreeSelectionContext] Failed to mark as viewed:",e)});let t=await a.y.getById(e);p({type:"SET_WORKTREE_DETAIL",detail:t})}catch(e){p({type:"SET_ERROR",error:e instanceof Error?e.message:"Failed to fetch worktree detail"})}finally{p({type:"SET_LOADING_DETAIL",isLoadingDetail:!1})}},[]),w=(0,o.useCallback)(async()=>{await y()},[y]);(0,o.useEffect)(()=>{d||y()},[y,d]),(0,o.useEffect)(()=>{if(d)return;let e=null,t=!0,r=async()=>{if(t)try{var n,o;let i=await a.y.getAll();p({type:"SET_WORKTREES",worktrees:i.worktrees}),p({type:"SET_REPOSITORIES",repositories:null!=(n=i.repositories)?n:[]});let c=(o=i.worktrees).some(e=>e.isProcessing||e.isWaitingForResponse)?s.PROCESSING:o.some(e=>e.isSessionRunning)?s.SESSION_RUNNING:s.IDLE;t&&(e=setTimeout(r,c))}catch(n){if(n instanceof a.hD&&401===n.status)return;console.error("[WorktreeSelectionContext] Polling error:",n),t&&(e=setTimeout(r,s.SESSION_RUNNING))}};return r(),()=>{t=!1,e&&clearTimeout(e)}},[d]);let g={selectedWorktreeId:f.selectedWorktreeId,worktrees:f.worktrees,repositories:f.repositories,selectedWorktreeDetail:f.selectedWorktreeDetail,isLoadingDetail:f.isLoadingDetail,error:f.error,selectWorktree:m,refreshWorktrees:w};return(0,n.jsx)(i.Provider,{value:g,children:t})}function d(){let e=(0,o.useContext)(i);if(!e)throw Error("useWorktreeSelection must be used within a WorktreeSelectionProvider");return e}},52703:(e,t,r)=>{r.d(t,{Oo:()=>o,ST:()=>n,zS:()=>a});let n="client_version",o="version_mismatch";function a(e){let t;try{t=JSON.parse(e)}catch(e){return null}if(!t||"object"!=typeof t)return null;let r=t;if("broadcast"===r.type){let e=r.data;return e&&"object"==typeof e?"string"!=typeof e.type?null:(void 0===e.worktreeId&&"string"==typeof r.worktreeId&&(e.worktreeId=r.worktreeId),e):null}return"string"==typeof r.type?r:null}},63365:(e,t,r)=>{r.d(t,{tS:()=>u,xM:()=>d,T3:()=>f});var n=r(95155),o=r(12115),a=r(52703);function s(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.WebSocket?globalThis.WebSocket:null}let i=()=>{},c={status:"disconnected",connected:!1,subscribe:i,unsubscribe:i,addListener:()=>i},l=(0,o.createContext)(null);function u(e){let{children:t,enabled:r=!0}=e,i=(0,o.useRef)(new Set),c=(0,o.useRef)(new Map),{status:u,subscribe:d,unsubscribe:f}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onEvent:t,onStatusChange:r,autoReconnect:n=!0,reconnectBaseDelay:i=1e3,reconnectMaxDelay:c=3e4,enabled:l=!0}=e,[u,d]=(0,o.useState)("disconnected"),f=(0,o.useRef)(null),p=(0,o.useRef)(null),y=(0,o.useRef)(0),m=(0,o.useRef)(new Set),w=(0,o.useRef)(!1),g=(0,o.useRef)(t);g.current=t;let h=(0,o.useRef)(r);h.current=r;let S=(0,o.useCallback)(e=>{var t;d(e),null==(t=h.current)||t.call(h,e)},[]),b=(0,o.useCallback)(()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},[]),E=(0,o.useCallback)(()=>{if(!l)return;let e=s();if(!e||f.current&&(f.current.readyState===e.OPEN||f.current.readyState===e.CONNECTING))return;b(),w.current=!1,S("connecting");let t="https:"===window.location.protocol?"wss:":"ws:",r=new e("".concat(t,"//").concat(window.location.host));f.current=r,r.onopen=()=>{y.current=0,S("connected");try{r.send(JSON.stringify({type:a.ST,version:"0.14.1"}))}catch(e){}m.current.forEach(e=>{try{r.send(JSON.stringify({type:"subscribe",worktreeId:e}))}catch(e){}})},r.onmessage=e=>{var t;let r="string"==typeof e.data?e.data:String(e.data),n=(0,a.zS)(r);n&&(null==(t=g.current)||t.call(g,n))},r.onerror=()=>{S("error")},r.onclose=()=>{var e;if(f.current=null,S("disconnected"),w.current||!n||"undefined"!=typeof document&&"hidden"===document.visibilityState)return;let t=(e=y.current,Math.min(i*2**Math.max(0,e),c));y.current+=1,p.current=setTimeout(()=>{p.current=null,E()},t)}},[l,n,i,c,S,b]),T=(0,o.useCallback)(()=>{if(b(),w.current=!0,f.current){try{f.current.close(1e3,"Client disconnect")}catch(e){}f.current=null}},[b]),k=(0,o.useCallback)(e=>{let t=f.current,r=s();if(t&&r&&t.readyState===r.OPEN)try{t.send(JSON.stringify(e))}catch(e){}},[]),C=(0,o.useCallback)(e=>{m.current.has(e)||(m.current.add(e),k({type:"subscribe",worktreeId:e}))},[k]),v=(0,o.useCallback)(e=>{m.current.has(e)&&(m.current.delete(e),k({type:"unsubscribe",worktreeId:e}))},[k]);return(0,o.useEffect)(()=>{if(l)return E(),()=>{T()}},[l,E,T]),(0,o.useEffect)(()=>{if(!l||"undefined"==typeof document)return;let e=()=>{"visible"===document.visibilityState&&(f.current||(y.current=0,E()))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[l,E]),{status:u,subscribe:C,unsubscribe:v,send:k}}({enabled:r,onEvent:(0,o.useCallback)(e=>{i.current.forEach(t=>{try{t(e)}catch(e){}})},[])}),p=(0,o.useCallback)(e=>{var t;let r=c.current,n=null!=(t=r.get(e))?t:0;r.set(e,n+1),0===n&&d(e)},[d]),y=(0,o.useCallback)(e=>{var t;let r=c.current,n=null!=(t=r.get(e))?t:0;n<=1?(r.delete(e),f(e)):r.set(e,n-1)},[f]),m=(0,o.useCallback)(e=>(i.current.add(e),()=>{i.current.delete(e)}),[]),w=(0,o.useMemo)(()=>({status:u,connected:"connected"===u,subscribe:p,unsubscribe:y,addListener:m}),[u,p,y,m]);return(0,n.jsx)(l.Provider,{value:w,children:t})}function d(){var e;return null!=(e=(0,o.useContext)(l))?e:c}function f(e){let{addListener:t}=d(),r=(0,o.useRef)(e);r.current=e,(0,o.useEffect)(()=>t(e=>r.current(e)),[t])}},65380:(e,t,r)=>{r.d(t,{H:()=>i,O:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)(!1);function s(e){let{children:t,authEnabled:r}=e;return(0,n.jsx)(a.Provider,{value:r,children:t})}function i(){return(0,o.useContext)(a)}},66966:(e,t,r)=>{r.d(t,{g7:()=>c,rC:()=>u,Fn:()=>l});var n=r(95155),o=r(12115),a=r(63365),s=r(39649);let i=(0,o.createContext)(null);function c(e){let{children:t}=e,{worktrees:r,repositories:c,isLoading:l,error:u,refresh:d}=function(){let[e,t]=(0,o.useState)([]),[r,n]=(0,o.useState)([]),[s,i]=(0,o.useState)(!0),[c,l]=(0,o.useState)(null),u=(0,o.useRef)(null),d=(0,o.useRef)([]),f=(0,o.useRef)(null),{connected:p,subscribe:y,unsubscribe:m,addListener:w}=(0,a.xM)(),g=(0,o.useRef)(p);g.current=p;let h=(0,o.useCallback)(async()=>{try{var e,r;l(null);let a=await fetch("/api/worktrees");if(!a.ok)throw Error("Failed to fetch worktrees: ".concat(a.status));let s=await a.json(),i=null!=(e=s.worktrees)?e:[],c=null!=(r=s.repositories)?r:[];(0,o.startTransition)(()=>{t(i),n(c)}),d.current=i}catch(e){l(e instanceof Error?e:Error(String(e)))}finally{i(!1)}},[]);(0,o.useEffect)(()=>{h()},[h]);let S=(0,o.useCallback)(()=>d.current.some(e=>!0===e.isSessionRunning),[]),b=(0,o.useCallback)(()=>{let e=S();return g.current?e?2e4:6e4:e?5e3:3e4},[S]),E=(0,o.useCallback)(()=>{null!==u.current&&(clearInterval(u.current),u.current=null),f.current=null},[]),T=(0,o.useCallback)(()=>{E();let e=b();f.current=e,u.current=setInterval(()=>{h()},e)},[b,h,E]);(0,o.useEffect)(()=>{let e=()=>{document.hidden?E():(h(),T())},t=setTimeout(()=>{T()},0);return document.addEventListener("visibilitychange",e),()=>{clearTimeout(t),E(),document.removeEventListener("visibilitychange",e)}},[h,T,E]),(0,o.useEffect)(()=>{if(d.current=e,"undefined"!=typeof document&&document.hidden||null===f.current)return;let t=b();f.current!==t&&T()},[e,p,b,T]);let k=e.map(e=>e.id).sort().join(" ");return(0,o.useEffect)(()=>{let e=k.length>0?k.split(" "):[];return e.forEach(e=>y(e)),()=>{e.forEach(e=>m(e))}},[k,y,m]),(0,o.useEffect)(()=>w(e=>{if("session_status_changed"===e.type&&"string"==typeof e.worktreeId){let r=e.worktreeId,n=e.isRunning;if("boolean"==typeof n){if((null!=e.cliTool||null!=e.instance)&&!1===n)return void h();(0,o.startTransition)(()=>{t(e=>{let t=!1,o=e.map(e=>e.id===r&&e.isSessionRunning!==n?(t=!0,{...e,isSessionRunning:n}):e);return t?o:e})})}}else("message"===e.type||"message_updated"===e.type)&&h()}),[w,h]),{worktrees:e,repositories:r,isLoading:s,error:c,refresh:h}}(),f=(0,o.useMemo)(()=>({worktrees:r,repositories:c,isLoading:l,error:u,refresh:d}),[r,c,l,u,d]);return(0,n.jsx)(i.Provider,{value:f,children:(0,n.jsx)(s.H8,{externalWorktrees:r,externalRepositories:c,children:t})})}function l(){let e=(0,o.useContext)(i);if(null===e)throw Error("useWorktreesCacheContext must be used within a WorktreesCacheProvider");return e}function u(){return(0,o.useContext)(i)}},68704:(e,t,r)=>{r.d(t,{Uf:()=>a,d8:()=>s,fM:()=>i,of:()=>l,r5:()=>o,rq:()=>c});var n=r(2317);let o="medium",a=["large","medium","small","xsmall"],s={large:{value:"large",rootFontSizePx:18,factor:1.125,terminalFontSize:16},medium:{value:"medium",rootFontSizePx:16,factor:1,terminalFontSize:14},small:{value:"small",rootFontSizePx:14,factor:.875,terminalFontSize:12},xsmall:{value:"xsmall",rootFontSizePx:12.5,factor:.78,terminalFontSize:11}};function i(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(s,e)}function c(e){return s[e].terminalFontSize}function l(){let{value:e,setValue:t,isAvailable:r}=(0,n.V)({key:"mcbd-pc-display-size",defaultValue:o,validate:i});return{size:e,setSize:t,isAvailable:r}}},70628:(e,t,r)=>{r.d(t,{K:()=>i,S:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[r,s]=(0,o.useState)(!1),i=(0,o.useCallback)(()=>s(e=>!e),[]),c=(0,o.useMemo)(()=>({open:r,setOpen:s,toggle:i}),[r,i]);return(0,n.jsx)(a.Provider,{value:c,children:t})}function i(){return(0,o.useContext)(a)}},80344:(e,t,r)=>{r.d(t,{$T:()=>c,GQ:()=>u,Rx:()=>i,hD:()=>n,hS:()=>l,y:()=>s});class n extends Error{constructor(e,t,r){super(e),this.status=t,this.data=r,this.name="ApiError"}}async function o(e,t,r){if(!(e.headers.get("content-type")||"").includes("application/json"))return t;try{return await e.json()}catch(e){return t}}async function a(e,t){try{let r=new Headers(null==t?void 0:t.headers);r.set("Content-Type","application/json");let a=await fetch(e,{...t,headers:r}),s=a.headers.get("content-type")||"";if(a.redirected&&a.url.includes("/login"))throw new n("Authentication required",401);if(!a.ok){let e=await o(a,{},"error-body");throw new n(e.error||"HTTP error ".concat(a.status),a.status,e)}if(!s.includes("application/json"))throw new n("Unexpected response format",a.status);return a.json()}catch(e){if(e instanceof n)throw e;throw new n(e instanceof Error?e.message:"Unknown error",0,e)}}let s={getAll:async()=>a("/api/worktrees"),getById:async e=>a("/api/worktrees/".concat(e)),updateDescription:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({description:t})}),updateLink:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({link:t})}),toggleFavorite:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({favorite:t})}),updateStatus:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({status:t})}),updateCliTool:async(e,t)=>a("/api/worktrees/".concat(e),{method:"PATCH",body:JSON.stringify({cliToolId:t})}),markAsViewed:async e=>a("/api/worktrees/".concat(e,"/viewed"),{method:"PATCH"}),async getMessages(e,t,r,n){let o=new URLSearchParams;return t&&o.append("cliTool",t),r&&o.append("includeArchived","true"),"number"==typeof n&&Number.isFinite(n)&&o.append("limit",String(n)),a("/api/worktrees/".concat(e,"/messages").concat(o.toString()?"?".concat(o.toString()):""))},async sendMessage(e,t,r){let n={content:t};return(null==r?void 0:r.cliToolId)&&(n.cliToolId=r.cliToolId),(null==r?void 0:r.instanceId)&&(n.instanceId=r.instanceId),(null==r?void 0:r.imagePath)&&(n.imagePath=r.imagePath),a("/api/worktrees/".concat(e,"/send"),{method:"POST",body:JSON.stringify(n)})},async uploadImageFile(e,t){let r=Date.now(),n="".concat(r,"-").concat(t.name),a=".commandmate/attachments",s=new FormData;s.append("file",new File([t],n,{type:t.type}));let i=await fetch("/api/worktrees/".concat(e,"/upload/").concat(a),{method:"POST",body:s});if(!i.ok){var c;let e=await o(i,{},"error-body");throw Error((null==e||null==(c=e.error)?void 0:c.message)||"Upload failed (HTTP ".concat(i.status,")"))}return{path:(await o(i,{},"response-body")).path||"".concat(a,"/").concat(n)}},getLogs:async e=>a("/api/worktrees/".concat(e,"/logs")),async getLogFile(e,t,r){let n=(null==r?void 0:r.sanitize)?"?sanitize=true":"";return a("/api/worktrees/".concat(e,"/logs/").concat(t).concat(n))},async killSession(e,t,r){let n=new URLSearchParams;t&&n.set("cliTool",t),r&&n.set("instance",r);let o=n.toString();return a("/api/worktrees/".concat(e,"/kill-session").concat(o?"?".concat(o):""),{method:"POST"})}},i={scan:async e=>a("/api/repositories/scan",{method:"POST",body:JSON.stringify({repositoryPath:e})}),sync:async()=>a("/api/repositories/sync",{method:"POST"}),delete:async e=>a("/api/repositories",{method:"DELETE",body:JSON.stringify({repositoryPath:e})}),async clone(e,t){var r;return a("/api/repositories/clone",{method:"POST",body:JSON.stringify({cloneUrl:e,fork:null!=(r=null==t?void 0:t.fork)&&r})})},getCloneStatus:async e=>a("/api/repositories/clone/".concat(e)),getExcluded:async()=>a("/api/repositories/excluded"),restore:async e=>a("/api/repositories/restore",{method:"PUT",body:JSON.stringify({repositoryPath:e})}),list:async()=>a("/api/repositories"),updateDisplayName:async(e,t)=>a("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({displayName:t})}),updateVisibility:async(e,t)=>a("/api/repositories/".concat(encodeURIComponent(e)),{method:"PUT",body:JSON.stringify({visible:t})})},c={getAll:async e=>(await a("/api/worktrees/".concat(e,"/memos"))).memos,create:async(e,t)=>(await a("/api/worktrees/".concat(e,"/memos"),{method:"POST",body:JSON.stringify(t||{})})).memo,update:async(e,t,r)=>(await a("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"PUT",body:JSON.stringify(r)})).memo,delete:async(e,t)=>a("/api/worktrees/".concat(e,"/memos/").concat(t),{method:"DELETE"}),async reorder(e,t){await a("/api/worktrees/".concat(e,"/memos"),{method:"PATCH",body:JSON.stringify({memoIds:t})})}};function l(e){return e instanceof n||e instanceof Error?e.message:"An unknown error occurred"}let u={checkForUpdate:async()=>a("/api/app/update-check",{method:"GET"}),startUpdate:async()=>a("/api/app/update",{method:"POST"}),async ping(){try{return(await fetch("/api/auth/status",{cache:"no-store"})).ok}catch(e){return!1}}}},89275:(e,t,r)=>{r.d(t,{Bo:()=>u,Hq:()=>c});var n=r(95155),o=r(12115),a=r(20063);let s={startTransition:e=>e()},i=(0,o.createContext)(null);function c(){var e;let t=(0,a.useRouter)(),{startTransition:r}=null!=(e=(0,o.useContext)(i))?e:s;return(0,o.useMemo)(()=>({push:e=>r(()=>t.push(e)),replace:e=>r(()=>t.replace(e))}),[t,r])}function l(e){let{onCommit:t}=e,r=(0,a.usePathname)(),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{if(!n.current){n.current=!0;return}t()},[r,t]),null}function u(e){let{children:t}=e,r=(0,o.useRef)(null),a=(0,o.useCallback)(()=>{var e;null==(e=r.current)||e.call(r)},[]),s=(0,o.useCallback)(e=>{var t;t=()=>new Promise(t=>{let n=!1,o=()=>{n||(n=!0,t())};r.current=o,e(),window.setTimeout(o,500)}),"undefined"==typeof document||"function"!=typeof document.startViewTransition||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?t():document.startViewTransition(t)},[]),c=(0,o.useMemo)(()=>({startTransition:s}),[s]);return(0,n.jsxs)(i.Provider,{value:c,children:[(0,n.jsx)(l,{onCommit:a}),t]})}},92614:(e,t,r)=>{r.d(t,{C:()=>i,E:()=>s});var n=r(95155),o=r(12115);let a=(0,o.createContext)({open:!1,setOpen:()=>{},toggle:()=>{}});function s(e){let{children:t}=e,[r,s]=(0,o.useState)(!1),i=(0,o.useCallback)(()=>s(e=>!e),[]),c=(0,o.useMemo)(()=>({open:r,setOpen:s,toggle:i}),[r,i]);return(0,n.jsx)(a.Provider,{value:c,children:t})}function i(){return(0,o.useContext)(a)}},94442:(e,t,r)=>{r.d(t,{dj:()=>E,tE:()=>b});var n=r(95155),o=r(12115),a=r(47650),s=r(18955),i=r(42529),c=r(78874),l=r(52056),u=r(23327),d=r(65229),f=r(59854),p=r(9900),y=r(9286);function m(e){let{type:t,iconColor:r}=e,o="h-5 w-5 ".concat(r);switch(t){case"success":return(0,n.jsx)(i.A,{className:o,"data-testid":"toast-icon-success"});case"error":return(0,n.jsx)(c.A,{className:o,"data-testid":"toast-icon-error"});case"warning":return(0,n.jsx)(l.A,{className:o,"data-testid":"toast-icon-warning"});default:return(0,n.jsx)(u.A,{className:o,"data-testid":"toast-icon-info"})}}function w(e){let{id:t,message:r,type:a,onClose:i,duration:c=3e3}=e,l=(0,s.c)("common"),u=(0,o.useRef)(null),f=function(e){switch(e){case"success":return{bgColor:"bg-success-subtle",borderColor:"border-success-border",textColor:"text-success-foreground",iconColor:"text-success-foreground"};case"error":return{bgColor:"bg-danger-subtle",borderColor:"border-danger-border",textColor:"text-danger-foreground",iconColor:"text-danger-foreground"};case"warning":return{bgColor:"bg-warning-subtle",borderColor:"border-warning-border",textColor:"text-warning-foreground",iconColor:"text-warning-foreground"};default:return{bgColor:"bg-info-subtle",borderColor:"border-info-border",textColor:"text-info-foreground",iconColor:"text-info-foreground"}}}(a),[w,g]=(0,o.useState)(!0),{shouldRender:h,isExiting:S}=(0,y.O)(w,p.Ys),b=(0,o.useRef)(i);b.current=i,(0,o.useEffect)(()=>{h||b.current(t)},[h,t]),(0,o.useEffect)(()=>(c>0&&(u.current=setTimeout(()=>{g(!1)},c)),()=>{u.current&&clearTimeout(u.current)}),[c]);let E=(0,o.useCallback)(()=>{u.current&&clearTimeout(u.current),g(!1)},[]);return(0,n.jsxs)("div",{"data-testid":"toast-".concat(t),role:"alert",className:"\n ".concat(f.bgColor,"\n ").concat(f.borderColor,"\n ").concat(f.textColor,"\n border rounded-lg shadow-lg p-4 min-w-[300px] max-w-[400px]\n flex items-start gap-3\n ").concat(S?"animate-out fade-out-0 slide-out-to-right-full duration-200 fill-mode-forwards pointer-events-none":"animate-slide-in","\n "),children:[(0,n.jsx)(m,{type:a,iconColor:f.iconColor}),(0,n.jsx)("p",{className:"flex-1 text-sm font-medium",children:r}),(0,n.jsx)("button",{"data-testid":"toast-close-button",onClick:E,"aria-label":l("closeNotification"),className:"\n ".concat(f.textColor,"\n hover:opacity-70\n focus:outline-none focus:ring-2 focus:ring-offset-2\n transition-opacity\n "),children:(0,n.jsx)(d.A,{className:"h-4 w-4"})})]})}function g(e){let{toasts:t,onClose:r}=e,[s,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{i(!0)},[]);let c=(0,n.jsx)("div",{"data-testid":"toast-container","aria-live":"polite",className:"fixed bottom-4 right-4 flex flex-col gap-2",style:{zIndex:f.M.TOAST},children:t.map(e=>(0,n.jsx)(w,{id:e.id,message:e.message,type:e.type,onClose:r,duration:e.duration},e.id))});return s?(0,a.createPortal)(c,document.body):null}function h(){let[e,t]=(0,o.useState)([]),r=(0,o.useRef)(0),n=(0,o.useCallback)(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,a="toast-".concat(++r.current,"-").concat(Date.now()),s={id:a,message:e,type:n,duration:o};return t(e=>[...e,s]),a},[]),a=(0,o.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),s=(0,o.useCallback)(()=>{t([])},[]);return(0,o.useMemo)(()=>({toasts:e,showToast:n,removeToast:a,clearToasts:s}),[e,n,a,s])}let S=(0,o.createContext)(null);function b(e){let{children:t}=e,r=h();return(0,n.jsxs)(S.Provider,{value:r,children:[t,(0,n.jsx)(g,{toasts:r.toasts,onClose:r.removeToast})]})}function E(){let e=(0,o.useContext)(S),t=h();return null!=e?e:t}}}]);
|