commandmate 0.3.3 → 0.3.4
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 +5 -5
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- 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-check/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/login/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.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 +4 -4
- 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 +8 -8
- package/.next/server/chunks/2314.js +1 -1
- package/.next/server/chunks/539.js +1 -1
- package/.next/server/chunks/6228.js +1 -1
- package/.next/server/chunks/7425.js +41 -35
- package/.next/server/chunks/9446.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{8091-274bc0716106e7fc.js → 8091-c0e955616dd86f82.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-9c0c64488c17db3c.js +1 -0
- package/.next/static/css/fa3df0e6f437f2ba.css +3 -0
- package/.next/trace +5 -5
- package/dist/server/src/lib/cli-tools/types.js +35 -1
- package/dist/server/src/lib/cli-tools/vibe-local.js +12 -3
- package/dist/server/src/lib/db-migrations.js +17 -1
- package/dist/server/src/lib/db.js +21 -2
- package/dist/server/src/lib/prompt-detector.js +23 -4
- package/dist/server/src/lib/response-poller.js +28 -12
- package/package.json +4 -4
- package/.next/static/chunks/app/worktrees/[id]/page-78580947c201d698.js +0 -1
- package/.next/static/css/e85de230ef5ddc40.css +0 -3
- /package/.next/static/{O7EDFfAYQNe_HRbORxQAC → BiyH3zkbySg7ZWTeZuXqj}/_buildManifest.js +0 -0
- /package/.next/static/{O7EDFfAYQNe_HRbORxQAC → BiyH3zkbySg7ZWTeZuXqj}/_ssgManifest.js +0 -0
- /package/.next/static/chunks/app/{page-060057e02b841125.js → page-9e523a8f415bc707.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"38991":{"*":{"id":"24146","name":"*","chunks":[],"async":false}},"40991":{"*":{"id":"27247","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/login/page.tsx":{"id":38991,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"38991":{"*":{"id":"24146","name":"*","chunks":[],"async":false}},"40991":{"*":{"id":"27247","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/login/page.tsx":{"id":38991,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-c0e955616dd86f82.js","1931","static/chunks/app/page-9e523a8f415bc707.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/files/[...path]/page.tsx":{"id":50653,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx":{"id":40991,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","9178","static/chunks/9178-88850a7c48deea07.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-c0e955616dd86f82.js","130","static/chunks/app/worktrees/%5Bid%5D/page-9c0c64488c17db3c.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page.tsx":{"id":41845,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/fa3df0e6f437f2ba.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page":["static/css/5eacd01f773eed7f.css"]}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/terminal/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"38991":{"*":{"id":"24146","name":"*","chunks":[],"async":false}},"40991":{"*":{"id":"27247","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/login/page.tsx":{"id":38991,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/terminal/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"38991":{"*":{"id":"24146","name":"*","chunks":[],"async":false}},"40991":{"*":{"id":"27247","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","3185","static/chunks/app/layout-9110f9a5e41c6bf4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/login/page.tsx":{"id":38991,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-c0e955616dd86f82.js","1931","static/chunks/app/page-9e523a8f415bc707.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/files/[...path]/page.tsx":{"id":50653,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx":{"id":40991,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","9178","static/chunks/9178-88850a7c48deea07.js","8528","static/chunks/8528-4d554d3b94d4cf9b.js","8091","static/chunks/8091-c0e955616dd86f82.js","130","static/chunks/app/worktrees/%5Bid%5D/page-9c0c64488c17db3c.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page.tsx":{"id":41845,"name":"*","chunks":["9838","static/chunks/30d07d85-393352a92199f695.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1224","static/chunks/app/worktrees/%5Bid%5D/terminal/page-5d85a7e508ce36d3.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/fa3df0e6f437f2ba.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page":["static/css/5eacd01f773eed7f.css"],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page":["static/css/85fa6dafca566008.css"]}}
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
"/api/ollama/models/route": "app/api/ollama/models/route.js",
|
|
7
7
|
"/api/repositories/clone/[jobId]/route": "app/api/repositories/clone/[jobId]/route.js",
|
|
8
8
|
"/api/repositories/clone/route": "app/api/repositories/clone/route.js",
|
|
9
|
-
"/api/repositories/excluded/route": "app/api/repositories/excluded/route.js",
|
|
10
|
-
"/api/repositories/restore/route": "app/api/repositories/restore/route.js",
|
|
11
9
|
"/api/repositories/route": "app/api/repositories/route.js",
|
|
10
|
+
"/api/repositories/excluded/route": "app/api/repositories/excluded/route.js",
|
|
12
11
|
"/api/repositories/scan/route": "app/api/repositories/scan/route.js",
|
|
12
|
+
"/api/repositories/restore/route": "app/api/repositories/restore/route.js",
|
|
13
13
|
"/api/repositories/sync/route": "app/api/repositories/sync/route.js",
|
|
14
14
|
"/api/slash-commands/route": "app/api/slash-commands/route.js",
|
|
15
15
|
"/api/worktrees/[id]/capture/route": "app/api/worktrees/[id]/capture/route.js",
|
|
16
|
+
"/api/worktrees/[id]/auto-yes/route": "app/api/worktrees/[id]/auto-yes/route.js",
|
|
16
17
|
"/api/worktrees/[id]/cli-tool/route": "app/api/worktrees/[id]/cli-tool/route.js",
|
|
17
18
|
"/api/worktrees/[id]/current-output/route": "app/api/worktrees/[id]/current-output/route.js",
|
|
18
19
|
"/api/worktrees/[id]/execution-logs/[logId]/route": "app/api/worktrees/[id]/execution-logs/[logId]/route.js",
|
|
19
|
-
"/api/worktrees/[id]/auto-yes/route": "app/api/worktrees/[id]/auto-yes/route.js",
|
|
20
20
|
"/api/worktrees/[id]/execution-logs/route": "app/api/worktrees/[id]/execution-logs/route.js",
|
|
21
21
|
"/api/worktrees/[id]/files/[...path]/route": "app/api/worktrees/[id]/files/[...path]/route.js",
|
|
22
22
|
"/api/worktrees/[id]/interrupt/route": "app/api/worktrees/[id]/interrupt/route.js",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"/api/worktrees/[id]/route": "app/api/worktrees/[id]/route.js",
|
|
30
30
|
"/api/worktrees/[id]/schedules/[scheduleId]/route": "app/api/worktrees/[id]/schedules/[scheduleId]/route.js",
|
|
31
31
|
"/api/worktrees/[id]/schedules/route": "app/api/worktrees/[id]/schedules/route.js",
|
|
32
|
-
"/api/worktrees/[id]/search/route": "app/api/worktrees/[id]/search/route.js",
|
|
33
32
|
"/api/worktrees/[id]/send/route": "app/api/worktrees/[id]/send/route.js",
|
|
34
|
-
"/api/worktrees/[id]/
|
|
33
|
+
"/api/worktrees/[id]/search/route": "app/api/worktrees/[id]/search/route.js",
|
|
35
34
|
"/api/worktrees/[id]/slash-commands/route": "app/api/worktrees/[id]/slash-commands/route.js",
|
|
36
|
-
"/api/worktrees/[id]/
|
|
35
|
+
"/api/worktrees/[id]/start-polling/route": "app/api/worktrees/[id]/start-polling/route.js",
|
|
37
36
|
"/api/worktrees/[id]/tree/[...path]/route": "app/api/worktrees/[id]/tree/[...path]/route.js",
|
|
37
|
+
"/api/worktrees/[id]/terminal/route": "app/api/worktrees/[id]/terminal/route.js",
|
|
38
38
|
"/api/worktrees/[id]/tree/route": "app/api/worktrees/[id]/tree/route.js",
|
|
39
39
|
"/api/worktrees/[id]/upload/[...path]/route": "app/api/worktrees/[id]/upload/[...path]/route.js",
|
|
40
40
|
"/api/worktrees/[id]/viewed/route": "app/api/worktrees/[id]/viewed/route.js",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"/worktrees/[id]/files/[...path]/page": "app/worktrees/[id]/files/[...path]/page.js",
|
|
46
46
|
"/worktrees/[id]/page": "app/worktrees/[id]/page.js",
|
|
47
47
|
"/worktrees/[id]/terminal/page": "app/worktrees/[id]/terminal/page.js",
|
|
48
|
-
"/api/auth/status/route": "app/api/auth/status/route.js",
|
|
49
48
|
"/api/app/update-check/route": "app/api/app/update-check/route.js",
|
|
49
|
+
"/api/auth/status/route": "app/api/auth/status/route.js",
|
|
50
50
|
"/api/external-apps/[id]/health/route": "app/api/external-apps/[id]/health/route.js",
|
|
51
51
|
"/api/external-apps/route": "app/api/external-apps/route.js",
|
|
52
52
|
"/api/external-apps/[id]/route": "app/api/external-apps/[id]/route.js",
|
|
53
|
-
"/api/worktrees/[id]/logs/route": "app/api/worktrees/[id]/logs/route.js",
|
|
54
53
|
"/api/worktrees/[id]/logs/[filename]/route": "app/api/worktrees/[id]/logs/[filename]/route.js",
|
|
54
|
+
"/api/worktrees/[id]/logs/route": "app/api/worktrees/[id]/logs/route.js",
|
|
55
55
|
"/api/worktrees/route": "app/api/worktrees/route.js",
|
|
56
56
|
"/proxy/[...path]/route": "app/proxy/[...path]/route.js"
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2314,exports.ids=[2314],exports.modules={82314:e=>{e.exports=JSON.parse('{"title":"スケジュール","executionLogs":"実行ログ","noSchedules":"スケジュールが設定されていません。CMATE.mdにSchedulesセクションを追加してください。","noSchedulesTitle":"スケジュールが設定されていません","noSchedulesStep1":"Files タブに切り替えてください","noSchedulesStep2":"ツールバーの CMATE ボタンをクリックして CMATE.md を作成","noSchedulesStep3":"Schedules テーブルを編集(Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"再度 CMATE をクリックしてバリデーション","noLogs":"実行ログはまだありません。","status":{"running":"実行中","completed":"完了","failed":"失敗","timeout":"タイムアウト","cancelled":"キャンセル"},"enabled":"有効","disabled":"無効","lastRun":"最終実行","cron":"Cron式","exitCode":"終了コード","noOutput":"(出力なし)","message":"メッセージ","response":"レスポンス","unknownSchedule":"(削除済みスケジュール)","retry":"再試行","loading":"読み込み中...","notes":"メモ","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"エージェント設定","selectAgents":"ターミナルヘッダーのタブに表示するエージェントを2つ選択してください。","agentSaveSuccess":"エージェント設定を保存しました。","agentSaveError":"エージェント設定の保存に失敗しました。","vibeLocalModel":"Ollamaモデル","vibeLocalModelDefault":"デフォルト","ollamaNotAvailable":"Ollamaが起動していません。モデルを選択するにはOllamaを起動してください。","cmateCreated":"CMATE.mdをテンプレートで作成しました。スケジュールを設定してください。","cmateValidation":{"noSchedulesSection":"CMATE.mdにSchedulesセクションがありません。","valid":"{count}件のスケジュールが正常に検証されました。","errors":"{errorCount}件の検証エラー: {details}","failed":"CMATE.mdの処理に失敗しました。"}}')}};
|
|
1
|
+
"use strict";exports.id=2314,exports.ids=[2314],exports.modules={82314:e=>{e.exports=JSON.parse('{"title":"スケジュール","executionLogs":"実行ログ","noSchedules":"スケジュールが設定されていません。CMATE.mdにSchedulesセクションを追加してください。","noSchedulesTitle":"スケジュールが設定されていません","noSchedulesStep1":"Files タブに切り替えてください","noSchedulesStep2":"ツールバーの CMATE ボタンをクリックして CMATE.md を作成","noSchedulesStep3":"Schedules テーブルを編集(Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"再度 CMATE をクリックしてバリデーション","noLogs":"実行ログはまだありません。","status":{"running":"実行中","completed":"完了","failed":"失敗","timeout":"タイムアウト","cancelled":"キャンセル"},"enabled":"有効","disabled":"無効","lastRun":"最終実行","cron":"Cron式","exitCode":"終了コード","noOutput":"(出力なし)","message":"メッセージ","response":"レスポンス","unknownSchedule":"(削除済みスケジュール)","retry":"再試行","loading":"読み込み中...","notes":"メモ","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"エージェント設定","selectAgents":"ターミナルヘッダーのタブに表示するエージェントを2つ選択してください。","agentSaveSuccess":"エージェント設定を保存しました。","agentSaveError":"エージェント設定の保存に失敗しました。","vibeLocalModel":"Ollamaモデル","vibeLocalModelDefault":"デフォルト","vibeLocalContextWindow":"コンテキストウィンドウ","vibeLocalContextWindowDefault":"デフォルト(自動)","ollamaNotAvailable":"Ollamaが起動していません。モデルを選択するにはOllamaを起動してください。","cmateCreated":"CMATE.mdをテンプレートで作成しました。スケジュールを設定してください。","cmateValidation":{"noSchedulesSection":"CMATE.mdにSchedulesセクションがありません。","valid":"{count}件のスケジュールが正常に検証されました。","errors":"{errorCount}件の検証エラー: {details}","failed":"CMATE.mdの処理に失敗しました。"}}')}};
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
flex-1 min-w-0 h-full overflow-hidden
|
|
33
33
|
transition-[padding] duration-300 ease-out
|
|
34
34
|
${t?"md:pl-72":"md:pl-0"}
|
|
35
|
-
`,role:"main",children:e})]})})},28676:(e,t,a)=>{a.d(t,{u:()=>o});var r=a(10326),s=a(17577),l=a(60962),n=a(22202);function o({isOpen:e,onClose:t,title:a,children:o,size:i="lg",showCloseButton:c=!0,disableClose:d=!1}){let u=(0,s.useRef)(null);return e?(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:n.k.MODAL},children:[r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:d?void 0:t}),r.jsx("div",{className:"relative flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,r.jsxs)("div",{ref:u,className:`relative w-full ${{sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[i]} max-h-[calc(100vh-1rem)] sm:max-h-[calc(100vh-2rem)] flex flex-col bg-white rounded-lg shadow-xl transform transition-all`,children:[(a||c)&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200 flex-shrink-0",children:[r.jsx("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 truncate pr-2",children:a}),c&&r.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0",children:r.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"px-4 sm:px-6 py-3 sm:py-4 overflow-y-auto flex-1 min-h-0",children:o})]})})]}),document.body):null}},77758:(e,t,a)=>{a.d(t,{Ct:()=>c,zx:()=>s,Zb:()=>l,aY:()=>i,Ol:()=>n,ll:()=>o,u_:()=>d.u});var r=a(10326);function s({variant:e="primary",size:t="md",fullWidth:a=!1,loading:s=!1,disabled:l,className:n="",children:o,...i}){let c=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[e],{sm:"btn-sm",md:"",lg:"btn-lg"}[t],a?"w-full":"",l||s?"opacity-50 cursor-not-allowed":"",n].filter(Boolean).join(" ");return(0,r.jsxs)("button",{className:c,disabled:l||s,...i,children:[s&&(0,r.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),o]})}function l({hover:e=!1,padding:t="md",className:a="",children:s,...l}){let n=["card",e?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[t],a].filter(Boolean).join(" ");return r.jsx("div",{className:n,...l,children:s})}function n({className:e="",children:t,...a}){return r.jsx("div",{className:`mb-3 ${e}`,...a,children:t})}function o({className:e="",children:t,...a}){return r.jsx("h3",{className:`text-lg font-semibold text-gray-900 ${e}`,...a,children:t})}function i({className:e="",children:t,...a}){return r.jsx("div",{className:e,...a,children:t})}function c({variant:e="gray",dot:t=!1,className:a="",children:s,...l}){let n=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[e],a].filter(Boolean).join(" ");return(0,r.jsxs)("span",{className:n,...l,children:[t&&r.jsx("span",{className:`mr-1.5 inline-block h-2 w-2 rounded-full ${{success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[e]}`,"aria-hidden":"true"}),s]})}a(17577);var d=a(28676)},11867:(e,t,a)=>{a.d(t,{n:()=>d});var r=a(10326),s=a(17577),l=a(77758),n=a(11865),o=a(73002),i=a(91515),c=a(51223);function d({worktreeId:e}){let[t,a]=(0,s.useState)([]),[d,u]=(0,s.useState)(null),[x,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(!0),[p,f]=(0,s.useState)(null),[b,y]=(0,s.useState)(""),[v,j]=(0,s.useState)(0),[w,N]=(0,s.useState)("all"),[k,C]=(0,s.useState)(!1),{toasts:S,showToast:L,removeToast:z}=(0,n.pm)(),$=(0,s.useMemo)(()=>"all"===w?t:t.filter(e=>e.toLowerCase().includes(w)),[t,w]),M=async t=>{try{g(!0),f(null);let a=await o.Iv.getLogFile(e,t);m(a.content),u(t),y(""),j(0)}catch(e){f((0,o.zG)(e))}finally{g(!1)}},E=(0,s.useCallback)(async()=>{if(d)try{C(!0);let t=await o.Iv.getLogFile(e,d,{sanitize:!0});await (0,i.v)(t.content),L("Log copied to clipboard (sanitized)","success")}catch(e){L(`Failed to export log: ${(0,o.zG)(e)}`,"error")}finally{C(!1)}},[e,d,L]),T=(0,s.useMemo)(()=>{let e;if(!b||!x)return[];let t=RegExp((0,c.hr)(b),"gi"),a=[];for(;null!==(e=t.exec(x));)a.push({index:e.index,length:e[0].length});return a},[b,x]),A=()=>{T.length>0&&j(e=>(e+1)%T.length)},D=()=>{T.length>0&&j(e=>(e-1+T.length)%T.length)},I=(0,s.useMemo)(()=>{if(!x||!b||0===T.length)return x;let e="",t=0;return T.forEach((a,r)=>{e+=(0,c.Xv)(x.substring(t,a.index));let s=x.substring(a.index,a.index+a.length),l=r===v;e+=`<mark class="${l?"bg-yellow-400 text-black":"bg-yellow-200 text-black"}" data-match-index="${r}">${(0,c.Xv)(s)}</mark>`,t=a.index+a.length}),e+=(0,c.Xv)(x.substring(t))},[x,b,T,v]);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(l.Zb,{padding:"md",children:[r.jsx(l.Ol,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx(l.ll,{children:"Log Files"}),r.jsx(l.Ct,{variant:"gray",children:$.length})]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsxs)(l.zx,{variant:"all"===w?"primary":"ghost",size:"sm",onClick:()=>N("all"),children:["All (",t.length,")"]}),(0,r.jsxs)(l.zx,{variant:"claude"===w?"primary":"ghost",size:"sm",onClick:()=>N("claude"),children:["Claude (",t.filter(e=>e.toLowerCase().includes("claude")).length,")"]}),(0,r.jsxs)(l.zx,{variant:"codex"===w?"primary":"ghost",size:"sm",onClick:()=>N("codex"),children:["Codex (",t.filter(e=>e.toLowerCase().includes("codex")).length,")"]}),(0,r.jsxs)(l.zx,{variant:"gemini"===w?"primary":"ghost",size:"sm",onClick:()=>N("gemini"),children:["Gemini (",t.filter(e=>e.toLowerCase().includes("gemini")).length,")"]})]})]})}),(0,r.jsxs)(l.aY,{children:[h&&0===t.length&&r.jsx("div",{className:"text-center py-4",children:r.jsx("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-4 border-gray-300 border-t-blue-600"})}),p&&r.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-sm text-red-800",children:p}),!h&&0===$.length&&!p&&r.jsx("p",{className:"text-sm text-gray-600 text-center py-4",children:"all"===w?"No log files found":`No ${w} log files found`}),$.length>0&&r.jsx("div",{className:"space-y-2",children:$.map(e=>r.jsx("button",{onClick:()=>M(e),className:`w-full text-left px-3 py-2 rounded text-sm font-mono transition-colors ${d===e?"bg-blue-50 text-blue-700 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:e},e))})]})]}),d&&(0,r.jsxs)(l.Zb,{padding:"md",children:[r.jsx(l.Ol,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx(l.ll,{className:"font-mono text-base",children:d}),(0,r.jsxs)("div",{className:"flex gap-2",children:[r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:E,disabled:!d||k,title:"Copy sanitized log to clipboard",children:k?"Exporting...":"Export"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:()=>{u(null),m(null),y(""),j(0)},children:"Close"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[r.jsx("input",{type:"text",value:b,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.shiftKey?D():A())},placeholder:"Search in log file...",className:"input w-full pr-20"}),T.length>0&&(0,r.jsxs)("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-gray-500",children:[v+1," / ",T.length]})]}),T.length>0&&(0,r.jsxs)("div",{className:"flex gap-1",children:[r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:D,disabled:0===T.length,title:"Previous match (Shift+Enter)",children:"↑"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:A,disabled:0===T.length,title:"Next match (Enter)",children:"↓"})]})]})]})}),(0,r.jsxs)(l.aY,{children:[h&&r.jsx("div",{className:"text-center py-8",children:r.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"})}),!h&&x&&r.jsx("div",{className:"bg-gray-900 text-gray-100 rounded p-4 overflow-x-auto max-h-[500px] scrollbar-thin",children:b&&T.length>0?r.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:I||""}}):r.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap",children:x})}),!h&&b&&0===T.length&&x&&(0,r.jsxs)("div",{className:"text-center py-4 text-sm text-gray-500",children:['No matches found for "',b,'"']})]})]}),r.jsx(n.Ix,{toasts:S,onClose:z})]})}},15470:(e,t,a)=>{a.d(t,{R:()=>x});var r=a(10326),s=a(17577),l=a(73002);function n(e,t){if(!t.trim())return e;let a=t.toLowerCase();return e.map(e=>({...e,commands:e.commands.filter(e=>{let t=e.name.toLowerCase().includes(a),r=e.description.toLowerCase().includes(a);return t||r})})).filter(e=>e.commands.length>0)}function o({groups:e,onSelect:t,highlightedIndex:a=-1,className:s=""}){let l=0;return 0===e.length?r.jsx("div",{className:`text-sm text-gray-500 p-4 text-center ${s}`,children:"No commands available"}):r.jsx("div",{className:`overflow-y-auto ${s}`,children:e.map(e=>(0,r.jsxs)("div",{className:"mb-2",children:[r.jsx("div",{className:"px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider bg-gray-50",children:e.label}),r.jsx("div",{children:e.commands.map(e=>{let s=l;l++;let n=s===a;return(0,r.jsxs)("button",{type:"button","data-command-item":!0,"data-highlighted":n,onClick:()=>t(e),className:`w-full px-3 py-2 text-left flex items-start gap-2 hover:bg-blue-50 transition-colors ${n?"bg-blue-100":""}`,children:[(0,r.jsxs)("span",{className:"text-blue-600 font-mono text-sm flex-shrink-0",children:["/",e.name]}),r.jsx("span",{className:"text-gray-600 text-sm truncate",children:e.description})]},e.name)})})]},e.category))})}function i({isOpen:e,groups:t,onSelect:a,onClose:l,isMobile:i=!1,position:c,onFreeInput:d}){let[u,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(0),g=(0,s.useRef)(null),p=(0,s.useMemo)(()=>n(t,u),[t,u]),f=(0,s.useMemo)(()=>p.flatMap(e=>e.commands),[p]),b=(0,s.useCallback)(e=>{a(e),l()},[a,l]);return((0,s.useCallback)(t=>{if(e)switch(t.key){case"Escape":t.preventDefault(),l();break;case"ArrowDown":t.preventDefault(),h(e=>Math.min(e+1,f.length-1));break;case"ArrowUp":t.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":t.preventDefault(),f[m]&&b(f[m])}},[e,f,m,l,b]),e)?i?(0,r.jsxs)(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:l,"aria-hidden":"true"}),(0,r.jsxs)("div",{"data-testid":"slash-command-bottom-sheet",className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-xl z-50 max-h-[70vh] flex flex-col shadow-xl",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[r.jsx("h2",{className:"text-lg font-semibold",children:"Commands"}),r.jsx("button",{type:"button",onClick:l,"aria-label":"Close",className:"p-2 rounded-full hover:bg-gray-100",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"px-4 py-2 border-b border-gray-100",children:r.jsx("input",{ref:g,type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})}),d&&(0,r.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:()=>d(u),className:"w-full px-4 py-3 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors",children:[r.jsx("span",{className:"text-blue-600",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r.jsx("span",{className:"text-gray-600",children:"Enter custom command..."})]}),r.jsx(o,{groups:p,onSelect:b,highlightedIndex:m,className:"flex-1 overflow-y-auto pb-20"})]})]}):(0,r.jsxs)("div",{role:"listbox",className:"absolute bg-white border border-gray-200 rounded-lg shadow-lg z-50 w-80 max-h-96 flex flex-col",style:c?{top:c.top,left:c.left}:{bottom:"100%",left:0,marginBottom:"4px"},children:[r.jsx("div",{className:"px-3 py-2 border-b border-gray-100",children:r.jsx("input",{ref:g,type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),d&&(0,r.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:()=>d(u),className:"w-full px-3 py-2 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors text-sm",children:[r.jsx("span",{className:"text-blue-600",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r.jsx("span",{className:"text-gray-600",children:"Enter custom command..."})]}),r.jsx(o,{groups:p,onSelect:b,highlightedIndex:m,className:"flex-1 overflow-y-auto"}),(0,r.jsxs)("div",{className:"px-3 py-1.5 border-t border-gray-100 text-xs text-gray-400 flex gap-3",children:[(0,r.jsxs)("span",{children:[r.jsx("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Enter"})," select"]}),(0,r.jsxs)("span",{children:[r.jsx("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Esc"})," close"]})]})]}):null}function c({worktreeId:e,cliToolId:t,disabled:a=!1,onInterrupt:l}){let[n,o]=(0,s.useState)(!1),i=(0,s.useRef)(0),c=(0,s.useCallback)(async()=>{let a=Date.now();if(!(a-i.current<1e3)){i.current=a,o(!0);try{let a=await fetch(`/api/worktrees/${e}/interrupt`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:t})});if(a.ok)l?.();else{let e=await a.json().catch(()=>({}));console.error("[InterruptButton] Failed to send interrupt:",e.error||a.statusText)}}catch(e){console.error("[InterruptButton] Error sending interrupt:",e)}finally{o(!1)}}},[e,t,l]);return r.jsx("button",{type:"button",onClick:c,disabled:a||n,className:"flex-shrink-0 p-2 text-orange-600 hover:bg-orange-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Stop processing","data-testid":"interrupt-button",children:n?(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):r.jsx(d,{})})}function d(){return r.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}var u=a(2982);function x({worktreeId:e,onMessageSent:t,cliToolId:a,isSessionRunning:o=!1}){let[d,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(!1),[g,p]=(0,s.useState)(null),[f,b]=(0,s.useState)(!1),[y,v]=(0,s.useState)(!1),[j,w]=(0,s.useState)(!1),N=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(!1),S=(0,s.useRef)(null),L=(0,u.d)(),{groups:z}=function(e,t){let[a,r]=(0,s.useState)([]),[o,i]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[u,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(t||"claude"),g=(0,s.useCallback)(async()=>{try{i(!0),d(null);let a=e?`/api/worktrees/${e}/slash-commands`:"/api/slash-commands";t&&(a+=`?cliTool=${t}`);let s=await fetch(a);if(!s.ok)throw Error(`HTTP error ${s.status}`);let l=await s.json();r(l.groups),h(l.cliTool||t||"claude")}catch(e){d((0,l.zG)(e)),r([])}finally{i(!1)}},[e,t]),p=(0,s.useMemo)(()=>a.flatMap(e=>e.commands),[a]),f=(0,s.useMemo)(()=>n(a,u),[a,u]);return{groups:a,filteredGroups:f,allCommands:p,loading:o,error:c,filter:u,setFilter:x,refresh:(0,s.useCallback)(()=>{g()},[g]),cliTool:m}}(e,a),$=async()=>{if(!f&&d.trim()&&!m)try{h(!0),p(null);let r=a||"claude";await l.Iv.sendMessage(e,d.trim(),r),x(""),w(!1),t?.(r)}catch(e){p((0,l.zG)(e))}finally{h(!1)}},M=async e=>{e.preventDefault(),await $()},E=()=>{v(!1),w(!1),N.current?.focus()};return(0,r.jsxs)("div",{ref:S,className:"space-y-2 relative",children:[g&&r.jsx("div",{className:"p-2 bg-red-50 border border-red-200 rounded text-sm text-red-800",children:g}),(0,r.jsxs)("form",{onSubmit:M,className:"flex items-end gap-2 bg-white border border-gray-300 rounded-lg px-4 py-2 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500",children:[L&&r.jsx("button",{type:"button",onClick:()=>{j&&w(!1),v(!0)},className:"flex-shrink-0 p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors","aria-label":"Show slash commands","data-testid":"mobile-command-button",children:r.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})})}),r.jsx("textarea",{ref:N,value:d,onChange:e=>{let t=e.target.value;if(x(t),""===t){w(!1),v(!1);return}j||("/"===t||t.startsWith("/")&&!t.includes(" ")?v(!0):v(!1))},onKeyDown:e=>{let{keyCode:t}=e.nativeEvent;if(229!==t){if("Escape"===e.key&&y){e.preventDefault(),E();return}if(C.current&&"Enter"===e.key){C.current=!1;return}if("Enter"===e.key&&!f&&(!y||j)){if(L)return;e.shiftKey||(e.preventDefault(),$())}}},onCompositionStart:()=>{b(!0),C.current=!1,k.current&&clearTimeout(k.current)},onCompositionEnd:()=>{b(!1),C.current=!0,k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{C.current=!1},300)},placeholder:L?"Type your message...":"Type your message... (/ for commands, Shift+Enter for line break)",disabled:m,rows:1,className:"flex-1 outline-none bg-transparent resize-none py-1 overflow-y-auto scrollbar-thin",style:{minHeight:"24px",maxHeight:"160px"}}),r.jsx(c,{worktreeId:e,cliToolId:a||"claude",disabled:!o}),r.jsx("button",{type:"submit",disabled:!d.trim()||m,className:"flex-shrink-0 p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Send message",children:m?(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):r.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]}),r.jsx(i,{isOpen:y,groups:z,onSelect:e=>{x(`/${e.name} `),v(!1),N.current?.focus()},onClose:E,isMobile:L,onFreeInput:e=>{v(!1),w(!0),x(e?`/${e}`:"/"),setTimeout(()=>{N.current?.focus()},50)}})]})}},61421:(e,t,a)=>{a.d(t,{F4:()=>s,Ie:()=>n,xh:()=>l});let r={idle:"bg-gray-500",ready:"bg-green-500",spinner:"border-blue-500",waiting:"bg-yellow-500",error:"bg-red-500"},s={idle:{className:r.idle,label:"Idle",type:"dot"},ready:{className:r.ready,label:"Ready",type:"dot"},running:{className:r.spinner,label:"Running",type:"spinner"},waiting:{className:r.waiting,label:"Waiting for response",type:"dot"},generating:{className:r.spinner,label:"Generating",type:"spinner"}},l={idle:{className:r.idle,label:"Idle",type:"dot"},ready:{className:r.ready,label:"Ready",type:"dot"},running:{className:r.spinner,label:"Running",type:"spinner"},waiting:{className:r.waiting,label:"Waiting for response",type:"dot"},error:{className:r.error,label:"Error",type:"dot"}},n={idle:{className:r.idle,label:"Idle - No active session",type:"dot"},ready:{className:r.ready,label:"Ready - Waiting for input",type:"dot"},running:{className:r.spinner,label:"Running - Processing",type:"spinner"},waiting:{className:r.waiting,label:"Waiting - User input required",type:"dot"},error:{className:r.error,label:"Error",type:"dot"}}},22202:(e,t,a)=>{a.d(t,{k:()=>r});let r={DROPDOWN:10,SIDEBAR:30,MODAL:50,MAXIMIZED_EDITOR:55,TOAST:60,CONTEXT_MENU:70}},2982:(e,t,a)=>{a.d(t,{G:()=>s,d:()=>l});var r=a(17577);let s=768;function l(e={}){let{breakpoint:t=s}=e,[a,l]=(0,r.useState)(!1);return a}},2491:(e,t,a)=>{a.d(t,{Ds:()=>l,tK:()=>r,ts:()=>n});let r=["claude","codex","gemini","vibe-local"],s={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local"};function l(e){return s[e]??e}function n(e,t="Assistant"){return e&&r.includes(e)?l(e):t}},91515:(e,t,a)=>{a.d(t,{v:()=>s});let r=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function s(e){if(!e||0===e.trim().length)return;let t=e.replace(r,"");await navigator.clipboard.writeText(t)}},41593:(e,t,a)=>{a.d(t,{G:()=>n});var r=a(27808),s=a(18811);let l={en:s._,ja:r.ja};function n(e){return l[e]??s._}},77465:(e,t,a)=>{a.d(t,{Fq:()=>r}),a(2491);let r=["claude","codex"]},51223:(e,t,a)=>{function r(e,t){let a=null;return(...r)=>{a&&clearTimeout(a),a=setTimeout(()=>{e(...r),a=null},t)}}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){let t=new Set;for(let a of e){t.add(a);let e=a.split("/"),r="";for(let a=0;a<e.length-1;a++)r=r?`${r}/${e[a]}`:e[a],t.add(r)}return t}function n(e,t=30){return e.length<=t?e:`${e.substring(0,t-3)}...`}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}a.d(t,{Ds:()=>r,Ps:()=>l,Xv:()=>o,aS:()=>n,hr:()=>s})},18421:(e,t,a)=>{a.d(t,{He:()=>s,I_:()=>l});var r=a(77465);function s(e){return e?e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isRunning?"ready":"idle":"idle"}function l(e){let t=!!e.lastAssistantMessageAt&&(!e.lastViewedAt||new Date(e.lastAssistantMessageAt)>new Date(e.lastViewedAt)),a=e.selectedAgents??r.Fq,l={};for(let t of a)l[t]=s(e.sessionStatusByCli?.[t]);return{id:e.id,name:e.name,repositoryName:e.repositoryName,status:"idle",hasUnread:t,lastActivity:e.updatedAt,description:e.description,cliStatus:l}}},63601:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var r=a(66621);let s=e=>[{type:"image/png",sizes:"180x180",url:(0,r.fillMetadataSegment)(".",e.params,"apple-icon.png")+"?31a89e65aa4ac65b"}]},71150:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var r=a(66621);let s=e=>[{type:"image/png",sizes:"32x32",url:(0,r.fillMetadataSegment)(".",e.params,"icon.png")+"?32d9127ba30ee286"}]}};
|
|
35
|
+
`,role:"main",children:e})]})})},28676:(e,t,a)=>{a.d(t,{u:()=>o});var r=a(10326),s=a(17577),l=a(60962),n=a(22202);function o({isOpen:e,onClose:t,title:a,children:o,size:i="lg",showCloseButton:c=!0,disableClose:d=!1}){let u=(0,s.useRef)(null);return e?(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:n.k.MODAL},children:[r.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:d?void 0:t}),r.jsx("div",{className:"relative flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,r.jsxs)("div",{ref:u,className:`relative w-full ${{sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[i]} max-h-[calc(100vh-1rem)] sm:max-h-[calc(100vh-2rem)] flex flex-col bg-white rounded-lg shadow-xl transform transition-all`,children:[(a||c)&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200 flex-shrink-0",children:[r.jsx("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 truncate pr-2",children:a}),c&&r.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0",children:r.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"px-4 sm:px-6 py-3 sm:py-4 overflow-y-auto flex-1 min-h-0",children:o})]})})]}),document.body):null}},77758:(e,t,a)=>{a.d(t,{Ct:()=>c,zx:()=>s,Zb:()=>l,aY:()=>i,Ol:()=>n,ll:()=>o,u_:()=>d.u});var r=a(10326);function s({variant:e="primary",size:t="md",fullWidth:a=!1,loading:s=!1,disabled:l,className:n="",children:o,...i}){let c=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[e],{sm:"btn-sm",md:"",lg:"btn-lg"}[t],a?"w-full":"",l||s?"opacity-50 cursor-not-allowed":"",n].filter(Boolean).join(" ");return(0,r.jsxs)("button",{className:c,disabled:l||s,...i,children:[s&&(0,r.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),o]})}function l({hover:e=!1,padding:t="md",className:a="",children:s,...l}){let n=["card",e?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[t],a].filter(Boolean).join(" ");return r.jsx("div",{className:n,...l,children:s})}function n({className:e="",children:t,...a}){return r.jsx("div",{className:`mb-3 ${e}`,...a,children:t})}function o({className:e="",children:t,...a}){return r.jsx("h3",{className:`text-lg font-semibold text-gray-900 ${e}`,...a,children:t})}function i({className:e="",children:t,...a}){return r.jsx("div",{className:e,...a,children:t})}function c({variant:e="gray",dot:t=!1,className:a="",children:s,...l}){let n=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[e],a].filter(Boolean).join(" ");return(0,r.jsxs)("span",{className:n,...l,children:[t&&r.jsx("span",{className:`mr-1.5 inline-block h-2 w-2 rounded-full ${{success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[e]}`,"aria-hidden":"true"}),s]})}a(17577);var d=a(28676)},11867:(e,t,a)=>{a.d(t,{n:()=>d});var r=a(10326),s=a(17577),l=a(77758),n=a(11865),o=a(73002),i=a(91515),c=a(51223);function d({worktreeId:e}){let[t,a]=(0,s.useState)([]),[d,u]=(0,s.useState)(null),[x,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(!0),[p,f]=(0,s.useState)(null),[b,y]=(0,s.useState)(""),[v,j]=(0,s.useState)(0),[w,N]=(0,s.useState)("all"),[k,C]=(0,s.useState)(!1),{toasts:S,showToast:L,removeToast:z}=(0,n.pm)(),$=(0,s.useMemo)(()=>"all"===w?t:t.filter(e=>e.toLowerCase().includes(w)),[t,w]),M=async t=>{try{g(!0),f(null);let a=await o.Iv.getLogFile(e,t);m(a.content),u(t),y(""),j(0)}catch(e){f((0,o.zG)(e))}finally{g(!1)}},E=(0,s.useCallback)(async()=>{if(d)try{C(!0);let t=await o.Iv.getLogFile(e,d,{sanitize:!0});await (0,i.v)(t.content),L("Log copied to clipboard (sanitized)","success")}catch(e){L(`Failed to export log: ${(0,o.zG)(e)}`,"error")}finally{C(!1)}},[e,d,L]),T=(0,s.useMemo)(()=>{let e;if(!b||!x)return[];let t=RegExp((0,c.hr)(b),"gi"),a=[];for(;null!==(e=t.exec(x));)a.push({index:e.index,length:e[0].length});return a},[b,x]),A=()=>{T.length>0&&j(e=>(e+1)%T.length)},D=()=>{T.length>0&&j(e=>(e-1+T.length)%T.length)},I=(0,s.useMemo)(()=>{if(!x||!b||0===T.length)return x;let e="",t=0;return T.forEach((a,r)=>{e+=(0,c.Xv)(x.substring(t,a.index));let s=x.substring(a.index,a.index+a.length),l=r===v;e+=`<mark class="${l?"bg-yellow-400 text-black":"bg-yellow-200 text-black"}" data-match-index="${r}">${(0,c.Xv)(s)}</mark>`,t=a.index+a.length}),e+=(0,c.Xv)(x.substring(t))},[x,b,T,v]);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(l.Zb,{padding:"md",children:[r.jsx(l.Ol,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx(l.ll,{children:"Log Files"}),r.jsx(l.Ct,{variant:"gray",children:$.length})]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsxs)(l.zx,{variant:"all"===w?"primary":"ghost",size:"sm",onClick:()=>N("all"),children:["All (",t.length,")"]}),(0,r.jsxs)(l.zx,{variant:"claude"===w?"primary":"ghost",size:"sm",onClick:()=>N("claude"),children:["Claude (",t.filter(e=>e.toLowerCase().includes("claude")).length,")"]}),(0,r.jsxs)(l.zx,{variant:"codex"===w?"primary":"ghost",size:"sm",onClick:()=>N("codex"),children:["Codex (",t.filter(e=>e.toLowerCase().includes("codex")).length,")"]}),(0,r.jsxs)(l.zx,{variant:"gemini"===w?"primary":"ghost",size:"sm",onClick:()=>N("gemini"),children:["Gemini (",t.filter(e=>e.toLowerCase().includes("gemini")).length,")"]})]})]})}),(0,r.jsxs)(l.aY,{children:[h&&0===t.length&&r.jsx("div",{className:"text-center py-4",children:r.jsx("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-4 border-gray-300 border-t-blue-600"})}),p&&r.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-sm text-red-800",children:p}),!h&&0===$.length&&!p&&r.jsx("p",{className:"text-sm text-gray-600 text-center py-4",children:"all"===w?"No log files found":`No ${w} log files found`}),$.length>0&&r.jsx("div",{className:"space-y-2",children:$.map(e=>r.jsx("button",{onClick:()=>M(e),className:`w-full text-left px-3 py-2 rounded text-sm font-mono transition-colors ${d===e?"bg-blue-50 text-blue-700 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:e},e))})]})]}),d&&(0,r.jsxs)(l.Zb,{padding:"md",children:[r.jsx(l.Ol,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx(l.ll,{className:"font-mono text-base",children:d}),(0,r.jsxs)("div",{className:"flex gap-2",children:[r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:E,disabled:!d||k,title:"Copy sanitized log to clipboard",children:k?"Exporting...":"Export"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:()=>{u(null),m(null),y(""),j(0)},children:"Close"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[r.jsx("input",{type:"text",value:b,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.shiftKey?D():A())},placeholder:"Search in log file...",className:"input w-full pr-20"}),T.length>0&&(0,r.jsxs)("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-gray-500",children:[v+1," / ",T.length]})]}),T.length>0&&(0,r.jsxs)("div",{className:"flex gap-1",children:[r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:D,disabled:0===T.length,title:"Previous match (Shift+Enter)",children:"↑"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:A,disabled:0===T.length,title:"Next match (Enter)",children:"↓"})]})]})]})}),(0,r.jsxs)(l.aY,{children:[h&&r.jsx("div",{className:"text-center py-8",children:r.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"})}),!h&&x&&r.jsx("div",{className:"bg-gray-900 text-gray-100 rounded p-4 overflow-x-auto max-h-[500px] scrollbar-thin",children:b&&T.length>0?r.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:I||""}}):r.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap",children:x})}),!h&&b&&0===T.length&&x&&(0,r.jsxs)("div",{className:"text-center py-4 text-sm text-gray-500",children:['No matches found for "',b,'"']})]})]}),r.jsx(n.Ix,{toasts:S,onClose:z})]})}},15470:(e,t,a)=>{a.d(t,{R:()=>x});var r=a(10326),s=a(17577),l=a(73002);function n(e,t){if(!t.trim())return e;let a=t.toLowerCase();return e.map(e=>({...e,commands:e.commands.filter(e=>{let t=e.name.toLowerCase().includes(a),r=e.description.toLowerCase().includes(a);return t||r})})).filter(e=>e.commands.length>0)}function o({groups:e,onSelect:t,highlightedIndex:a=-1,className:s=""}){let l=0;return 0===e.length?r.jsx("div",{className:`text-sm text-gray-500 p-4 text-center ${s}`,children:"No commands available"}):r.jsx("div",{className:`overflow-y-auto ${s}`,children:e.map(e=>(0,r.jsxs)("div",{className:"mb-2",children:[r.jsx("div",{className:"px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider bg-gray-50",children:e.label}),r.jsx("div",{children:e.commands.map(e=>{let s=l;l++;let n=s===a;return(0,r.jsxs)("button",{type:"button","data-command-item":!0,"data-highlighted":n,onClick:()=>t(e),className:`w-full px-3 py-2 text-left flex items-start gap-2 hover:bg-blue-50 transition-colors ${n?"bg-blue-100":""}`,children:[(0,r.jsxs)("span",{className:"text-blue-600 font-mono text-sm flex-shrink-0",children:["/",e.name]}),r.jsx("span",{className:"text-gray-600 text-sm truncate",children:e.description})]},e.name)})})]},e.category))})}function i({isOpen:e,groups:t,onSelect:a,onClose:l,isMobile:i=!1,position:c,onFreeInput:d}){let[u,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(0),g=(0,s.useRef)(null),p=(0,s.useMemo)(()=>n(t,u),[t,u]),f=(0,s.useMemo)(()=>p.flatMap(e=>e.commands),[p]),b=(0,s.useCallback)(e=>{a(e),l()},[a,l]);return((0,s.useCallback)(t=>{if(e)switch(t.key){case"Escape":t.preventDefault(),l();break;case"ArrowDown":t.preventDefault(),h(e=>Math.min(e+1,f.length-1));break;case"ArrowUp":t.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":t.preventDefault(),f[m]&&b(f[m])}},[e,f,m,l,b]),e)?i?(0,r.jsxs)(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:l,"aria-hidden":"true"}),(0,r.jsxs)("div",{"data-testid":"slash-command-bottom-sheet",className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-xl z-50 max-h-[70vh] flex flex-col shadow-xl",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[r.jsx("h2",{className:"text-lg font-semibold",children:"Commands"}),r.jsx("button",{type:"button",onClick:l,"aria-label":"Close",className:"p-2 rounded-full hover:bg-gray-100",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"px-4 py-2 border-b border-gray-100",children:r.jsx("input",{ref:g,type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})}),d&&(0,r.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:()=>d(u),className:"w-full px-4 py-3 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors",children:[r.jsx("span",{className:"text-blue-600",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r.jsx("span",{className:"text-gray-600",children:"Enter custom command..."})]}),r.jsx(o,{groups:p,onSelect:b,highlightedIndex:m,className:"flex-1 overflow-y-auto pb-20"})]})]}):(0,r.jsxs)("div",{role:"listbox",className:"absolute bg-white border border-gray-200 rounded-lg shadow-lg z-50 w-80 max-h-96 flex flex-col",style:c?{top:c.top,left:c.left}:{bottom:"100%",left:0,marginBottom:"4px"},children:[r.jsx("div",{className:"px-3 py-2 border-b border-gray-100",children:r.jsx("input",{ref:g,type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),d&&(0,r.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:()=>d(u),className:"w-full px-3 py-2 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors text-sm",children:[r.jsx("span",{className:"text-blue-600",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r.jsx("span",{className:"text-gray-600",children:"Enter custom command..."})]}),r.jsx(o,{groups:p,onSelect:b,highlightedIndex:m,className:"flex-1 overflow-y-auto"}),(0,r.jsxs)("div",{className:"px-3 py-1.5 border-t border-gray-100 text-xs text-gray-400 flex gap-3",children:[(0,r.jsxs)("span",{children:[r.jsx("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Enter"})," select"]}),(0,r.jsxs)("span",{children:[r.jsx("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Esc"})," close"]})]})]}):null}function c({worktreeId:e,cliToolId:t,disabled:a=!1,onInterrupt:l}){let[n,o]=(0,s.useState)(!1),i=(0,s.useRef)(0),c=(0,s.useCallback)(async()=>{let a=Date.now();if(!(a-i.current<1e3)){i.current=a,o(!0);try{let a=await fetch(`/api/worktrees/${e}/interrupt`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:t})});if(a.ok)l?.();else{let e=await a.json().catch(()=>({}));console.error("[InterruptButton] Failed to send interrupt:",e.error||a.statusText)}}catch(e){console.error("[InterruptButton] Error sending interrupt:",e)}finally{o(!1)}}},[e,t,l]);return r.jsx("button",{type:"button",onClick:c,disabled:a||n,className:"flex-shrink-0 p-2 text-orange-600 hover:bg-orange-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Stop processing","data-testid":"interrupt-button",children:n?(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):r.jsx(d,{})})}function d(){return r.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}var u=a(2982);function x({worktreeId:e,onMessageSent:t,cliToolId:a,isSessionRunning:o=!1}){let[d,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(!1),[g,p]=(0,s.useState)(null),[f,b]=(0,s.useState)(!1),[y,v]=(0,s.useState)(!1),[j,w]=(0,s.useState)(!1),N=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(!1),S=(0,s.useRef)(null),L=(0,u.d)(),{groups:z}=function(e,t){let[a,r]=(0,s.useState)([]),[o,i]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[u,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(t||"claude"),g=(0,s.useCallback)(async()=>{try{i(!0),d(null);let a=e?`/api/worktrees/${e}/slash-commands`:"/api/slash-commands";t&&(a+=`?cliTool=${t}`);let s=await fetch(a);if(!s.ok)throw Error(`HTTP error ${s.status}`);let l=await s.json();r(l.groups),h(l.cliTool||t||"claude")}catch(e){d((0,l.zG)(e)),r([])}finally{i(!1)}},[e,t]),p=(0,s.useMemo)(()=>a.flatMap(e=>e.commands),[a]),f=(0,s.useMemo)(()=>n(a,u),[a,u]);return{groups:a,filteredGroups:f,allCommands:p,loading:o,error:c,filter:u,setFilter:x,refresh:(0,s.useCallback)(()=>{g()},[g]),cliTool:m}}(e,a),$=async()=>{if(!f&&d.trim()&&!m)try{h(!0),p(null);let r=a||"claude";await l.Iv.sendMessage(e,d.trim(),r),x(""),w(!1),t?.(r)}catch(e){p((0,l.zG)(e))}finally{h(!1)}},M=async e=>{e.preventDefault(),await $()},E=()=>{v(!1),w(!1),N.current?.focus()};return(0,r.jsxs)("div",{ref:S,className:"space-y-2 relative",children:[g&&r.jsx("div",{className:"p-2 bg-red-50 border border-red-200 rounded text-sm text-red-800",children:g}),(0,r.jsxs)("form",{onSubmit:M,className:"flex items-end gap-2 bg-white border border-gray-300 rounded-lg px-4 py-2 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500",children:[L&&r.jsx("button",{type:"button",onClick:()=>{j&&w(!1),v(!0)},className:"flex-shrink-0 p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors","aria-label":"Show slash commands","data-testid":"mobile-command-button",children:r.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})})}),r.jsx("textarea",{ref:N,value:d,onChange:e=>{let t=e.target.value;if(x(t),""===t){w(!1),v(!1);return}j||("/"===t||t.startsWith("/")&&!t.includes(" ")?v(!0):v(!1))},onKeyDown:e=>{let{keyCode:t}=e.nativeEvent;if(229!==t){if("Escape"===e.key&&y){e.preventDefault(),E();return}if(C.current&&"Enter"===e.key){C.current=!1;return}if("Enter"===e.key&&!f&&(!y||j)){if(L)return;e.shiftKey||(e.preventDefault(),$())}}},onCompositionStart:()=>{b(!0),C.current=!1,k.current&&clearTimeout(k.current)},onCompositionEnd:()=>{b(!1),C.current=!0,k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{C.current=!1},300)},placeholder:L?"Type your message...":"Type your message... (/ for commands, Shift+Enter for line break)",disabled:m,rows:1,className:"flex-1 outline-none bg-transparent resize-none py-1 overflow-y-auto scrollbar-thin",style:{minHeight:"24px",maxHeight:"160px"}}),r.jsx(c,{worktreeId:e,cliToolId:a||"claude",disabled:!o}),r.jsx("button",{type:"submit",disabled:!d.trim()||m,className:"flex-shrink-0 p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Send message",children:m?(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):r.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]}),r.jsx(i,{isOpen:y,groups:z,onSelect:e=>{x(`/${e.name} `),v(!1),N.current?.focus()},onClose:E,isMobile:L,onFreeInput:e=>{v(!1),w(!0),x(e?`/${e}`:"/"),setTimeout(()=>{N.current?.focus()},50)}})]})}},61421:(e,t,a)=>{a.d(t,{F4:()=>s,Ie:()=>n,xh:()=>l});let r={idle:"bg-gray-500",ready:"bg-green-500",spinner:"border-blue-500",waiting:"bg-yellow-500",error:"bg-red-500"},s={idle:{className:r.idle,label:"Idle",type:"dot"},ready:{className:r.ready,label:"Ready",type:"dot"},running:{className:r.spinner,label:"Running",type:"spinner"},waiting:{className:r.waiting,label:"Waiting for response",type:"dot"},generating:{className:r.spinner,label:"Generating",type:"spinner"}},l={idle:{className:r.idle,label:"Idle",type:"dot"},ready:{className:r.ready,label:"Ready",type:"dot"},running:{className:r.spinner,label:"Running",type:"spinner"},waiting:{className:r.waiting,label:"Waiting for response",type:"dot"},error:{className:r.error,label:"Error",type:"dot"}},n={idle:{className:r.idle,label:"Idle - No active session",type:"dot"},ready:{className:r.ready,label:"Ready - Waiting for input",type:"dot"},running:{className:r.spinner,label:"Running - Processing",type:"spinner"},waiting:{className:r.waiting,label:"Waiting - User input required",type:"dot"},error:{className:r.error,label:"Error",type:"dot"}}},22202:(e,t,a)=>{a.d(t,{k:()=>r});let r={DROPDOWN:10,SIDEBAR:30,MODAL:50,MAXIMIZED_EDITOR:55,TOAST:60,CONTEXT_MENU:70}},2982:(e,t,a)=>{a.d(t,{G:()=>s,d:()=>l});var r=a(17577);let s=768;function l(e={}){let{breakpoint:t=s}=e,[a,l]=(0,r.useState)(!1);return a}},2491:(e,t,a)=>{a.d(t,{Ds:()=>l,Ho:()=>o,Ns:()=>i,tK:()=>r,ts:()=>n});let r=["claude","codex","gemini","vibe-local"],s={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local"};function l(e){return s[e]??e}function n(e,t="Assistant"){return e&&r.includes(e)?l(e):t}let o=128,i=2097152},91515:(e,t,a)=>{a.d(t,{v:()=>s});let r=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function s(e){if(!e||0===e.trim().length)return;let t=e.replace(r,"");await navigator.clipboard.writeText(t)}},41593:(e,t,a)=>{a.d(t,{G:()=>n});var r=a(27808),s=a(18811);let l={en:s._,ja:r.ja};function n(e){return l[e]??s._}},77465:(e,t,a)=>{a.d(t,{Fq:()=>r}),a(2491);let r=["claude","codex"]},51223:(e,t,a)=>{function r(e,t){let a=null;return(...r)=>{a&&clearTimeout(a),a=setTimeout(()=>{e(...r),a=null},t)}}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){let t=new Set;for(let a of e){t.add(a);let e=a.split("/"),r="";for(let a=0;a<e.length-1;a++)r=r?`${r}/${e[a]}`:e[a],t.add(r)}return t}function n(e,t=30){return e.length<=t?e:`${e.substring(0,t-3)}...`}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}a.d(t,{Ds:()=>r,Ps:()=>l,Xv:()=>o,aS:()=>n,hr:()=>s})},18421:(e,t,a)=>{a.d(t,{He:()=>s,I_:()=>l});var r=a(77465);function s(e){return e?e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isRunning?"ready":"idle":"idle"}function l(e){let t=!!e.lastAssistantMessageAt&&(!e.lastViewedAt||new Date(e.lastAssistantMessageAt)>new Date(e.lastViewedAt)),a=e.selectedAgents??r.Fq,l={};for(let t of a)l[t]=s(e.sessionStatusByCli?.[t]);return{id:e.id,name:e.name,repositoryName:e.repositoryName,status:"idle",hasUnread:t,lastActivity:e.updatedAt,description:e.description,cliStatus:l}}},63601:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var r=a(66621);let s=e=>[{type:"image/png",sizes:"180x180",url:(0,r.fillMetadataSegment)(".",e.params,"apple-icon.png")+"?31a89e65aa4ac65b"}]},71150:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var r=a(66621);let s=e=>[{type:"image/png",sizes:"32x32",url:(0,r.fillMetadataSegment)(".",e.params,"icon.png")+"?32d9127ba30ee286"}]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6228,exports.ids=[6228],exports.modules={86228:e=>{e.exports=JSON.parse('{"title":"Schedules","executionLogs":"Execution Logs","noSchedules":"No schedules configured. Add a CMATE.md with a Schedules section.","noSchedulesTitle":"No schedules configured","noSchedulesStep1":"Switch to the Files tab","noSchedulesStep2":"Click the CMATE button in the toolbar to create CMATE.md","noSchedulesStep3":"Edit the Schedules table (Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"Click CMATE again to validate","noLogs":"No execution logs yet.","status":{"running":"Running","completed":"Completed","failed":"Failed","timeout":"Timeout","cancelled":"Cancelled"},"enabled":"Enabled","disabled":"Disabled","lastRun":"Last run","cron":"Cron","exitCode":"Exit","noOutput":"(no output)","message":"Message","response":"Response","unknownSchedule":"(deleted schedule)","retry":"Retry","loading":"Loading...","notes":"Notes","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"Agent Settings","selectAgents":"Select 2 agents to display in the terminal header tabs.","agentSaveSuccess":"Agent settings saved.","agentSaveError":"Failed to save agent settings.","vibeLocalModel":"Ollama Model","vibeLocalModelDefault":"Default","ollamaNotAvailable":"Ollama is not running. Start Ollama to select a model.","cmateCreated":"CMATE.md created with template. Edit it to configure schedules.","cmateValidation":{"noSchedulesSection":"CMATE.md has no Schedules section.","valid":"{count} schedule(s) validated successfully.","errors":"{errorCount} validation error(s) found: {details}","failed":"Failed to process CMATE.md."}}')}};
|
|
1
|
+
"use strict";exports.id=6228,exports.ids=[6228],exports.modules={86228:e=>{e.exports=JSON.parse('{"title":"Schedules","executionLogs":"Execution Logs","noSchedules":"No schedules configured. Add a CMATE.md with a Schedules section.","noSchedulesTitle":"No schedules configured","noSchedulesStep1":"Switch to the Files tab","noSchedulesStep2":"Click the CMATE button in the toolbar to create CMATE.md","noSchedulesStep3":"Edit the Schedules table (Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"Click CMATE again to validate","noLogs":"No execution logs yet.","status":{"running":"Running","completed":"Completed","failed":"Failed","timeout":"Timeout","cancelled":"Cancelled"},"enabled":"Enabled","disabled":"Disabled","lastRun":"Last run","cron":"Cron","exitCode":"Exit","noOutput":"(no output)","message":"Message","response":"Response","unknownSchedule":"(deleted schedule)","retry":"Retry","loading":"Loading...","notes":"Notes","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"Agent Settings","selectAgents":"Select 2 agents to display in the terminal header tabs.","agentSaveSuccess":"Agent settings saved.","agentSaveError":"Failed to save agent settings.","vibeLocalModel":"Ollama Model","vibeLocalModelDefault":"Default","vibeLocalContextWindow":"Context Window","vibeLocalContextWindowDefault":"Default (auto)","ollamaNotAvailable":"Ollama is not running. Start Ollama to select a model.","cmateCreated":"CMATE.md created with template. Edit it to configure schedules.","cmateValidation":{"noSchedulesSection":"CMATE.md has no Schedules section.","valid":"{count} schedule(s) validated successfully.","errors":"{errorCount} validation error(s) found: {details}","failed":"Failed to process CMATE.md."}}')}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=7425,exports.ids=[7425],exports.modules={16672:(e,t,s)=>{s.d(t,{ZP:()=>
|
|
1
|
+
"use strict";exports.id=7425,exports.ids=[7425],exports.modules={16672:(e,t,s)=>{s.d(t,{ZP:()=>o}),s(92048);var r=s(55315);function o(){let e=(0,r.dirname)(__dirname);return e.includes("/lib/node_modules/")||e.includes("\\node_modules\\")||e.includes("/node_modules/commandmate")}s(19801)},43753:(e,t,s)=>{s.d(t,{F:()=>o});let r=["/etc","/usr","/bin","/sbin","/var","/tmp","/dev","/sys","/proc"];function o(e){return r.some(t=>e.startsWith(t))}},83513:(e,t,s)=>{s.d(t,{Ho:()=>a,Ns:()=>i,Y1:()=>l,ZP:()=>n,_7:()=>o,tK:()=>r});let r=["claude","codex","gemini","vibe-local"];function o(e){return r.includes(e)}let a=128,i=2097152;function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=a&&e<=i}let l=/^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$/},97425:(e,t,s)=>{s.r(t),s.d(t,{closeDbInstance:()=>p,getDbInstance:()=>c});var r=s(85890),o=s.n(r),a=s(55315),i=s.n(a),n=s(75748);let l=[{version:1,name:"initial-schema",up:e=>{(0,n.qZ)(e)},down:e=>{e.exec("DROP TABLE IF EXISTS session_states;"),e.exec("DROP TABLE IF EXISTS chat_messages;"),e.exec("DROP TABLE IF EXISTS worktrees;")}},{version:2,name:"add-multi-repo-and-memo-support",up:e=>{e.exec(`
|
|
2
2
|
ALTER TABLE worktrees ADD COLUMN repository_path TEXT;
|
|
3
3
|
ALTER TABLE worktrees ADD COLUMN repository_name TEXT;
|
|
4
4
|
ALTER TABLE worktrees ADD COLUMN memo TEXT;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
SET repository_path = ?,
|
|
13
13
|
repository_name = ?
|
|
14
14
|
WHERE id = ?
|
|
15
|
-
`);for(let e of t){let t=
|
|
15
|
+
`);for(let e of t){let t=_(e.path),r=i().basename(t);s.run(t,r,e.id)}let r=e.prepare(`
|
|
16
16
|
UPDATE worktrees
|
|
17
17
|
SET last_user_message = ?,
|
|
18
18
|
last_user_message_at = ?
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
SET repository_path = ?,
|
|
57
57
|
repository_name = ?
|
|
58
58
|
WHERE id = ?
|
|
59
|
-
`);for(let e of t){let t=
|
|
59
|
+
`);for(let e of t){let t=_(e.path),r=i().basename(t);s.run(t,r,e.id)}},down:()=>{console.log("No rollback needed for repository path fix")}},{version:4,name:"add-favorite-field",up:e=>{e.exec(`
|
|
60
60
|
ALTER TABLE worktrees ADD COLUMN favorite INTEGER DEFAULT 0;
|
|
61
61
|
`),e.exec(`
|
|
62
62
|
CREATE INDEX IF NOT EXISTS idx_worktrees_favorite
|
|
@@ -177,10 +177,10 @@
|
|
|
177
177
|
ON worktree_memos(worktree_id, position);
|
|
178
178
|
`);let{randomUUID:t}=s(84770),r=e.prepare(`
|
|
179
179
|
SELECT id, memo FROM worktrees WHERE memo IS NOT NULL AND memo != ''
|
|
180
|
-
`).all(),
|
|
180
|
+
`).all(),o=e.prepare(`
|
|
181
181
|
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
182
182
|
VALUES (?, ?, 'Memo', ?, 0, ?, ?)
|
|
183
|
-
`),
|
|
183
|
+
`),a=Date.now();for(let e of r)o.run(t(),e.id,e.memo,a,a);console.log(`✓ Created worktree_memos table`),console.log(`✓ Migrated ${r.length} existing memos to new table`)},down:e=>{e.exec("DROP TABLE IF EXISTS worktree_memos"),console.log("✓ Dropped worktree_memos table")}},{version:11,name:"add-viewed-tracking",up:e=>{e.exec(`
|
|
184
184
|
ALTER TABLE worktrees ADD COLUMN last_viewed_at TEXT;
|
|
185
185
|
`),e.exec(`
|
|
186
186
|
CREATE INDEX IF NOT EXISTS idx_chat_messages_assistant_latest
|
|
@@ -438,16 +438,18 @@
|
|
|
438
438
|
END;
|
|
439
439
|
`),console.log("✓ Added selected_agents column to worktrees table"),console.log("✓ Initialized selected_agents based on cli_tool_id")},down:()=>{console.log("No rollback for selected_agents column (SQLite limitation)")}},{version:19,name:"add-vibe-local-model-column",up:e=>{e.exec(`
|
|
440
440
|
ALTER TABLE worktrees ADD COLUMN vibe_local_model TEXT DEFAULT NULL;
|
|
441
|
-
`),console.log("✓ Added vibe_local_model column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_model column (SQLite limitation)")}}
|
|
441
|
+
`),console.log("✓ Added vibe_local_model column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_model column (SQLite limitation)")}},{version:20,name:"add-vibe-local-context-window-column",up:e=>{e.exec(`
|
|
442
|
+
ALTER TABLE worktrees ADD COLUMN vibe_local_context_window INTEGER DEFAULT NULL;
|
|
443
|
+
`),console.log("✓ Added vibe_local_context_window column to worktrees table")},down:()=>{console.log("No rollback for vibe_local_context_window column (SQLite limitation)")}}];function _(e){let t=s(92048),r=e;for(;r!==i().dirname(r);){let e=i().join(r,".git");if(t.existsSync(e)){let s=t.statSync(e);if(s.isDirectory())return r;if(s.isFile()){let s=t.readFileSync(e,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(s)return s[1].split("/.git/")[0]}}r=i().dirname(r)}return e}function E(e){try{let t=e.prepare("SELECT MAX(version) as version FROM schema_version").get();return t?.version??0}catch{return 0}}var d=s(98838);let T=null;function c(){if(!T){let e=(0,d.dU)().CM_DB_PATH,t=s(92048),r=i().dirname(e);t.existsSync(r)||t.mkdirSync(r,{recursive:!0,mode:448}),(T=new(o())(e)).pragma("foreign_keys = ON"),function(e){!function(e){e.exec(`
|
|
442
444
|
CREATE TABLE IF NOT EXISTS schema_version (
|
|
443
445
|
version INTEGER PRIMARY KEY,
|
|
444
446
|
name TEXT NOT NULL,
|
|
445
447
|
applied_at INTEGER NOT NULL
|
|
446
448
|
);
|
|
447
|
-
`)}(e);let t=
|
|
449
|
+
`)}(e);let t=E(e);console.log(`Current schema version: ${t}`);let s=l.filter(e=>e.version>t);if(0===s.length){console.log("✓ Schema is up to date");return}for(let t of(console.log(`Found ${s.length} pending migration(s)`),s)){console.log(`Applying migration ${t.version}: ${t.name}...`);try{e.transaction(()=>{t.up(e),e.prepare(`
|
|
448
450
|
INSERT INTO schema_version (version, name, applied_at)
|
|
449
451
|
VALUES (?, ?, ?)
|
|
450
|
-
`).run(t.version,t.name,Date.now())})(),console.log(`✓ Migration ${t.version} applied successfully`)}catch(s){let e=s instanceof Error?s.message:String(s);throw console.error(`✗ Migration ${t.version} failed:`,e),Error(`Migration ${t.version} (${t.name}) failed: ${e}`)}}console.log(`✓ All migrations completed. Current version: ${
|
|
452
|
+
`).run(t.version,t.name,Date.now())})(),console.log(`✓ Migration ${t.version} applied successfully`)}catch(s){let e=s instanceof Error?s.message:String(s);throw console.error(`✗ Migration ${t.version} failed:`,e),Error(`Migration ${t.version} (${t.name}) failed: ${e}`)}}console.log(`✓ All migrations completed. Current version: ${E(e)}`)}(T)}return T}function p(){T&&(T.close(),T=null)}},75748:(e,t,s)=>{s.d(t,{DF:()=>G,Db:()=>F,ER:()=>l,Ek:()=>P,GA:()=>D,GP:()=>S,GZ:()=>L,HE:()=>N,IH:()=>w,Mf:()=>g,Nf:()=>k,Nr:()=>y,OK:()=>A,Of:()=>c,Pv:()=>H,Q7:()=>B,R3:()=>x,S$:()=>O,VW:()=>C,Xv:()=>n,Yg:()=>U,ZI:()=>b,_U:()=>u,_e:()=>M,dD:()=>v,dl:()=>h,ey:()=>X,gU:()=>_,j8:()=>I,ly:()=>E,pM:()=>W,qZ:()=>i,tn:()=>p,vX:()=>m,xr:()=>d,y:()=>T,zl:()=>R});var r=s(84770),o=s(55483);function a(e){return{id:e.id,worktreeId:e.worktree_id,role:e.role,content:e.content,summary:e.summary||void 0,timestamp:new Date(e.timestamp),logFileName:e.log_file_name||void 0,requestId:e.request_id||void 0,messageType:e.message_type||"normal",promptData:e.prompt_data?JSON.parse(e.prompt_data):void 0,cliToolId:e.cli_tool_id??"claude"}}function i(e){e.exec(`
|
|
451
453
|
CREATE TABLE IF NOT EXISTS worktrees (
|
|
452
454
|
id TEXT PRIMARY KEY,
|
|
453
455
|
name TEXT NOT NULL,
|
|
@@ -500,11 +502,11 @@
|
|
|
500
502
|
w.id, w.name, w.path, w.repository_path, w.repository_name, w.description,
|
|
501
503
|
w.last_user_message, w.last_user_message_at, w.last_message_summary,
|
|
502
504
|
w.updated_at, w.favorite, w.status, w.link, w.cli_tool_id, w.last_viewed_at,
|
|
503
|
-
w.selected_agents, w.vibe_local_model,
|
|
505
|
+
w.selected_agents, w.vibe_local_model, w.vibe_local_context_window,
|
|
504
506
|
(SELECT MAX(timestamp) FROM chat_messages
|
|
505
507
|
WHERE worktree_id = w.id AND role = 'assistant') as last_assistant_message_at
|
|
506
508
|
FROM worktrees w
|
|
507
|
-
`,r=[];t&&(s+=" WHERE w.repository_path = ?",r.push(t)),s+=" ORDER BY w.updated_at DESC NULLS LAST";let
|
|
509
|
+
`,r=[];t&&(s+=" WHERE w.repository_path = ?",r.push(t)),s+=" ORDER BY w.updated_at DESC NULLS LAST";let a=e.prepare(s).all(...r),i=function(e,t){if(0===t.length)return new Map;let s=t.map(()=>"?").join(","),r=e.prepare(`
|
|
508
510
|
WITH ranked_messages AS (
|
|
509
511
|
SELECT
|
|
510
512
|
worktree_id,
|
|
@@ -521,7 +523,7 @@
|
|
|
521
523
|
SELECT worktree_id, cli_tool_id, content
|
|
522
524
|
FROM ranked_messages
|
|
523
525
|
WHERE rn = 1
|
|
524
|
-
`).all(...t),
|
|
526
|
+
`).all(...t),o=new Map;for(let e of t)o.set(e,{});for(let e of r){let t=o.get(e.worktree_id)||{};t[e.cli_tool_id]=e.content.substring(0,50),o.set(e.worktree_id,t)}return o}(e,a.map(e=>e.id));return a.map(e=>{let t=i.get(e.id)||{};return{id:e.id,name:e.name,path:e.path,repositoryPath:e.repository_path||"",repositoryName:e.repository_name||"",description:e.description||void 0,lastUserMessage:e.last_user_message||void 0,lastUserMessageAt:e.last_user_message_at?new Date(e.last_user_message_at):void 0,lastMessageSummary:e.last_message_summary||void 0,lastMessagesByCli:t,updatedAt:e.updated_at?new Date(e.updated_at):void 0,lastViewedAt:e.last_viewed_at?new Date(e.last_viewed_at):void 0,lastAssistantMessageAt:e.last_assistant_message_at?new Date(e.last_assistant_message_at):void 0,favorite:1===e.favorite,status:e.status||null,link:e.link||void 0,cliToolId:e.cli_tool_id??"claude",selectedAgents:(0,o.e7)(e.selected_agents),vibeLocalModel:e.vibe_local_model??null,vibeLocalContextWindow:e.vibe_local_context_window??null}})}function l(e){return e.prepare(`
|
|
525
527
|
SELECT
|
|
526
528
|
repository_path as path,
|
|
527
529
|
repository_name as name,
|
|
@@ -530,17 +532,17 @@
|
|
|
530
532
|
WHERE repository_path IS NOT NULL
|
|
531
533
|
GROUP BY repository_path, repository_name
|
|
532
534
|
ORDER BY repository_name ASC
|
|
533
|
-
`).all().map(e=>({path:e.path,name:e.name,worktreeCount:e.worktree_count}))}function
|
|
535
|
+
`).all().map(e=>({path:e.path,name:e.name,worktreeCount:e.worktree_count}))}function _(e,t){let s=e.prepare(`
|
|
534
536
|
SELECT
|
|
535
537
|
w.id, w.name, w.path, w.repository_path, w.repository_name, w.description,
|
|
536
538
|
w.last_user_message, w.last_user_message_at, w.last_message_summary,
|
|
537
539
|
w.updated_at, w.favorite, w.status, w.link, w.cli_tool_id, w.last_viewed_at,
|
|
538
|
-
w.selected_agents, w.vibe_local_model,
|
|
540
|
+
w.selected_agents, w.vibe_local_model, w.vibe_local_context_window,
|
|
539
541
|
(SELECT MAX(timestamp) FROM chat_messages
|
|
540
542
|
WHERE worktree_id = w.id AND role = 'assistant') as last_assistant_message_at
|
|
541
543
|
FROM worktrees w
|
|
542
544
|
WHERE w.id = ?
|
|
543
|
-
`).get(t);return s?{id:s.id,name:s.name,path:s.path,repositoryPath:s.repository_path||"",repositoryName:s.repository_name||"",description:s.description||void 0,lastUserMessage:s.last_user_message||void 0,lastUserMessageAt:s.last_user_message_at?new Date(s.last_user_message_at):void 0,lastMessageSummary:s.last_message_summary||void 0,updatedAt:s.updated_at?new Date(s.updated_at):void 0,lastViewedAt:s.last_viewed_at?new Date(s.last_viewed_at):void 0,lastAssistantMessageAt:s.last_assistant_message_at?new Date(s.last_assistant_message_at):void 0,favorite:1===s.favorite,status:s.status||null,link:s.link||void 0,cliToolId:s.cli_tool_id??"claude",selectedAgents:(0,
|
|
545
|
+
`).get(t);return s?{id:s.id,name:s.name,path:s.path,repositoryPath:s.repository_path||"",repositoryName:s.repository_name||"",description:s.description||void 0,lastUserMessage:s.last_user_message||void 0,lastUserMessageAt:s.last_user_message_at?new Date(s.last_user_message_at):void 0,lastMessageSummary:s.last_message_summary||void 0,updatedAt:s.updated_at?new Date(s.updated_at):void 0,lastViewedAt:s.last_viewed_at?new Date(s.last_viewed_at):void 0,lastAssistantMessageAt:s.last_assistant_message_at?new Date(s.last_assistant_message_at):void 0,favorite:1===s.favorite,status:s.status||null,link:s.link||void 0,cliToolId:s.cli_tool_id??"claude",selectedAgents:(0,o.e7)(s.selected_agents),vibeLocalModel:s.vibe_local_model??null,vibeLocalContextWindow:s.vibe_local_context_window??null}:null}function E(e,t){e.prepare("DELETE FROM worktrees WHERE path = ? AND id != ?").run(t.path,t.id),e.prepare(`
|
|
544
546
|
INSERT INTO worktrees (
|
|
545
547
|
id, name, path, repository_path, repository_name, description,
|
|
546
548
|
last_user_message, last_user_message_at, last_message_summary, updated_at, cli_tool_id
|
|
@@ -577,17 +579,17 @@
|
|
|
577
579
|
UPDATE worktrees
|
|
578
580
|
SET updated_at = ?
|
|
579
581
|
WHERE id = ?
|
|
580
|
-
`).run(s.getTime(),t)}(e,t.worktreeId,t.timestamp),"user"===t.role&&
|
|
582
|
+
`).run(s.getTime(),t)}(e,t.worktreeId,t.timestamp),"user"===t.role&&A(e,t.worktreeId,t.content,t.timestamp),{id:s,...t}}function u(e,t,s,r=50,o){let i=`
|
|
581
583
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
582
584
|
FROM chat_messages
|
|
583
585
|
WHERE worktree_id = ? AND (? IS NULL OR timestamp < ?)
|
|
584
|
-
`,n=[t,s?.getTime()||null,s?.getTime()||null];return
|
|
586
|
+
`,n=[t,s?.getTime()||null,s?.getTime()||null];return o&&(i+=" AND cli_tool_id = ?",n.push(o)),i+=" ORDER BY timestamp DESC LIMIT ?",n.push(r),e.prepare(i).all(...n).map(a)}function m(e,t){let s=e.prepare(`
|
|
585
587
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
586
588
|
FROM chat_messages
|
|
587
589
|
WHERE worktree_id = ? AND role = 'user'
|
|
588
590
|
ORDER BY timestamp DESC
|
|
589
591
|
LIMIT 1
|
|
590
|
-
`).get(t);return s?
|
|
592
|
+
`).get(t);return s?a(s):null}function N(e,t){e.prepare(`
|
|
591
593
|
DELETE FROM chat_messages
|
|
592
594
|
WHERE worktree_id = ?
|
|
593
595
|
`).run(t),console.log(`[deleteAllMessages] Deleted all messages for worktree: ${t}`)}function L(e,t,s){let r=e.prepare(`
|
|
@@ -613,16 +615,16 @@
|
|
|
613
615
|
`).run(t,s):e.prepare(`
|
|
614
616
|
DELETE FROM session_states
|
|
615
617
|
WHERE worktree_id = ?
|
|
616
|
-
`).run(t)}function
|
|
618
|
+
`).run(t)}function A(e,t,s,r){let o=e.prepare(`
|
|
617
619
|
UPDATE worktrees
|
|
618
620
|
SET last_user_message = ?,
|
|
619
621
|
last_user_message_at = ?
|
|
620
622
|
WHERE id = ?
|
|
621
|
-
`),
|
|
623
|
+
`),a=s.substring(0,200);o.run(a,r.getTime(),t)}function O(e,t){let s=e.prepare(`
|
|
622
624
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
623
625
|
FROM chat_messages
|
|
624
626
|
WHERE id = ?
|
|
625
|
-
`).get(t);return s?
|
|
627
|
+
`).get(t);return s?a(s):null}function D(e,t,s){e.prepare(`
|
|
626
628
|
UPDATE chat_messages
|
|
627
629
|
SET prompt_data = ?
|
|
628
630
|
WHERE id = ?
|
|
@@ -634,15 +636,15 @@
|
|
|
634
636
|
AND message_type = 'prompt'
|
|
635
637
|
AND json_extract(prompt_data, '$.status') = 'pending'
|
|
636
638
|
ORDER BY timestamp DESC
|
|
637
|
-
`).all(t,s);if(0===r.length)return 0;let
|
|
639
|
+
`).all(t,s);if(0===r.length)return 0;let o=e.prepare(`
|
|
638
640
|
UPDATE chat_messages
|
|
639
641
|
SET prompt_data = ?
|
|
640
642
|
WHERE id = ?
|
|
641
|
-
`),
|
|
643
|
+
`),a=0;for(let e of r)try{let t=JSON.parse(e.prompt_data);t.status="answered",t.answer="(answered via terminal)",t.answeredAt=new Date().toISOString(),o.run(JSON.stringify(t),e.id),a++}catch{}return a}function x(e,t,s){e.prepare(`
|
|
642
644
|
UPDATE worktrees
|
|
643
645
|
SET favorite = ?
|
|
644
646
|
WHERE id = ?
|
|
645
|
-
`).run(s?1:0,t)}function
|
|
647
|
+
`).run(s?1:0,t)}function k(e,t,s){e.prepare(`
|
|
646
648
|
UPDATE worktrees
|
|
647
649
|
SET status = ?
|
|
648
650
|
WHERE id = ?
|
|
@@ -658,37 +660,41 @@
|
|
|
658
660
|
UPDATE worktrees
|
|
659
661
|
SET vibe_local_model = ?
|
|
660
662
|
WHERE id = ?
|
|
661
|
-
`).run(s,t)}function U(e
|
|
663
|
+
`).run(s,t)}function U(e,t,s){e.prepare(`
|
|
664
|
+
UPDATE worktrees
|
|
665
|
+
SET vibe_local_context_window = ?
|
|
666
|
+
WHERE id = ?
|
|
667
|
+
`).run(s,t)}function f(e){return{id:e.id,worktreeId:e.worktree_id,title:e.title,content:e.content,position:e.position,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function F(e,t){return e.prepare(`
|
|
662
668
|
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
663
669
|
FROM worktree_memos
|
|
664
670
|
WHERE worktree_id = ?
|
|
665
671
|
ORDER BY position ASC
|
|
666
|
-
`).all(t).map(
|
|
672
|
+
`).all(t).map(f)}function b(e,t){let s=e.prepare(`
|
|
667
673
|
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
668
674
|
FROM worktree_memos
|
|
669
675
|
WHERE id = ?
|
|
670
|
-
`).get(t);return s?
|
|
676
|
+
`).get(t);return s?f(s):null}function v(e,t,s){let o=(0,r.randomUUID)(),a=Date.now(),i=s.title??"Memo",n=s.content??"";return e.prepare(`
|
|
671
677
|
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
672
678
|
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
673
|
-
`).run(
|
|
679
|
+
`).run(o,t,i,n,s.position,a,a),{id:o,worktreeId:t,title:i,content:n,position:s.position,createdAt:new Date(a),updatedAt:new Date(a)}}function y(e,t,s){let r=Date.now(),o=["updated_at = ?"],a=[r];void 0!==s.title&&(o.push("title = ?"),a.push(s.title)),void 0!==s.content&&(o.push("content = ?"),a.push(s.content)),a.push(t),e.prepare(`
|
|
674
680
|
UPDATE worktree_memos
|
|
675
|
-
SET ${
|
|
681
|
+
SET ${o.join(", ")}
|
|
676
682
|
WHERE id = ?
|
|
677
|
-
`).run(...
|
|
683
|
+
`).run(...a)}function M(e,t){e.prepare(`
|
|
678
684
|
DELETE FROM worktree_memos
|
|
679
685
|
WHERE id = ?
|
|
680
|
-
`).run(t)}function
|
|
686
|
+
`).run(t)}function P(e,t,s){e.prepare(`
|
|
681
687
|
UPDATE worktrees
|
|
682
688
|
SET initial_branch = ?
|
|
683
689
|
WHERE id = ?
|
|
684
|
-
`).run(s,t)}function
|
|
690
|
+
`).run(s,t)}function B(e,t){let s=e.prepare(`
|
|
685
691
|
SELECT initial_branch
|
|
686
692
|
FROM worktrees
|
|
687
693
|
WHERE id = ?
|
|
688
|
-
`).get(t);return s?.initial_branch??null}function
|
|
694
|
+
`).get(t);return s?.initial_branch??null}function H(e,t){return e.prepare(`
|
|
689
695
|
SELECT id FROM worktrees WHERE repository_path = ?
|
|
690
|
-
`).all(t).map(e=>e.id)}function
|
|
696
|
+
`).all(t).map(e=>e.id)}function G(e,t){return{deletedCount:e.prepare(`
|
|
691
697
|
DELETE FROM worktrees WHERE repository_path = ?
|
|
692
|
-
`).run(t).changes}}function
|
|
698
|
+
`).run(t).changes}}function W(e,t){if(0===t.length)return{deletedCount:0};let s=t.map(()=>"?").join(",");return{deletedCount:e.prepare(`
|
|
693
699
|
DELETE FROM worktrees WHERE id IN (${s})
|
|
694
|
-
`).run(...t).changes}}},98838:(e,t,s)=>{s.d(t,{dU:()=>u,Hb:()=>T,LI:()=>p});var r=s(55315),
|
|
700
|
+
`).run(...t).changes}}},98838:(e,t,s)=>{s.d(t,{dU:()=>u,Hb:()=>T,LI:()=>p});var r=s(55315),o=s.n(r),a=s(19801),i=s(16672),n=s(43753);function l(){return(0,i.ZP)()?o().join((0,a.homedir)(),".commandmate","data","cm.db"):o().resolve(process.cwd(),"data","cm.db")}function _(e){let t=o().resolve(e);if((0,i.ZP)()){let e=(0,a.homedir)();if(!t.startsWith(e))throw Error(`Security error: DB path must be within home directory: ${t}`)}else if((0,n.F)(t))throw Error(`Security error: DB path cannot be in system directory: ${t}`);return t}let E={CM_ROOT_DIR:"MCBD_ROOT_DIR",CM_PORT:"MCBD_PORT",CM_BIND:"MCBD_BIND",CM_LOG_LEVEL:"MCBD_LOG_LEVEL",CM_LOG_FORMAT:"MCBD_LOG_FORMAT",CM_LOG_DIR:"MCBD_LOG_DIR",CM_DB_PATH:"MCBD_DB_PATH"},d=new Set;function T(e){return function(e,t){let s=process.env[e];if(void 0!==s)return s;let r=process.env[t];if(void 0!==r)return d.has(t)||(console.warn(`[DEPRECATED] ${t} is deprecated, use ${e} instead`),d.add(t)),r}(e,E[e])}let c=!1;function p(){let e=T("CM_LOG_LEVEL")?.toLowerCase(),t=T("CM_LOG_FORMAT")?.toLowerCase();return{level:void 0!==e&&["debug","info","warn","error"].includes(e)?e:"info",format:"json"===t?"json":"text"}}function u(){let e;let t=T("CM_ROOT_DIR")||process.cwd(),s=parseInt(T("CM_PORT")||"3000",10),r=T("CM_BIND")||"127.0.0.1",a=T("CM_DB_PATH")||function(){let e=process.env.DATABASE_PATH;return e&&!c&&(console.warn("[DEPRECATED] DATABASE_PATH is deprecated. Use CM_DB_PATH instead."),c=!0),e}()||l();if(!t)throw Error("CM_ROOT_DIR (or MCBD_ROOT_DIR) is required");if(isNaN(s)||s<1||s>65535)throw Error(`Invalid CM_PORT: ${T("CM_PORT")}. Must be between 1 and 65535.`);if("127.0.0.1"!==r&&"0.0.0.0"!==r&&"localhost"!==r)throw Error(`Invalid CM_BIND: ${r}. Must be '127.0.0.1', '0.0.0.0', or 'localhost'.`);try{e=_(a)}catch{console.warn(`[Security] Invalid DB path "${a}", using default.`),e=_(l())}return{CM_ROOT_DIR:o().resolve(t),CM_PORT:s,CM_BIND:r,CM_DB_PATH:e}}},55483:(e,t,s)=>{s.d(t,{KE:()=>_,e7:()=>l});var r=s(83513);let o=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;function a(e){return e.replace(o,"").replace(/[\n\r]/g," ").substring(0,100)}let i=["claude","codex"];function n(e){return 2!==e.length?{valid:!1,error:"Must be 2 elements"}:e.every(e=>"string"==typeof e&&r.tK.includes(e))?e[0]===e[1]?{valid:!1,error:"Duplicate tool IDs not allowed"}:{valid:!0,value:e}:{valid:!1,error:"Invalid CLI tool ID"}}function l(e){if(!e)return i;try{let t=JSON.parse(e);if(!Array.isArray(t))return console.warn(`[selected-agents] Invalid format in DB, falling back to default: ${a(e)}`),i;let s=n(t);if(!s.valid)return console.warn(`[selected-agents] Invalid data in DB (${s.error}), falling back to default: ${a(e)}`),i;return s.value}catch{return console.warn(`[selected-agents] JSON parse error in DB, falling back to default: ${a(e)}`),i}}function _(e){return Array.isArray(e)&&2===e.length?n(e):{valid:!1,error:"selected_agents must be an array of 2 elements"}}}};
|