copilot-operator 0.1.38 → 0.1.39
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/dist/src/api/operator.controller.js +27 -0
- package/dist/src/api/operator.service.js +184 -17
- package/dist/src/orchestrator/contract.js +77 -6
- package/dist/src/plan/systemGuide.js +60 -4
- package/dist/src/vcs/taskVcs.js +21 -0
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/549-bfde82e4a70ed1a0.js +1 -0
- package/dist/web/_next/static/chunks/584-eba7ffe26cf1be83.js +1 -0
- package/dist/web/_next/static/chunks/867-7fccf68b0840c0de.js +1 -0
- package/dist/web/_next/static/chunks/app/history/page-d3461384566aa332.js +1 -0
- package/dist/web/_next/static/chunks/app/sessions/view/page-945be57e397ae162.js +1 -0
- package/dist/web/_next/static/css/cea7913ba416dbb7.css +1 -0
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +11 -11
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +11 -11
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +11 -11
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +11 -11
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +11 -11
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +11 -11
- package/dist/web/presets.html +2 -2
- package/dist/web/presets.txt +11 -11
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +11 -11
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +11 -11
- package/package.json +3 -2
- package/dist/web/_next/static/chunks/36-94660f1cde2da529.js +0 -1
- package/dist/web/_next/static/chunks/549-7e35e4fdefadb05d.js +0 -1
- package/dist/web/_next/static/chunks/867-d4f5bd8c5805bffb.js +0 -1
- package/dist/web/_next/static/chunks/app/history/page-a0bd59986f7c8beb.js +0 -1
- package/dist/web/_next/static/chunks/app/sessions/view/page-ce99494b1997ee25.js +0 -1
- package/dist/web/_next/static/css/c37978b44194c37b.css +0 -1
- /package/dist/web/_next/static/{8C2D7RnTerPO3g_WyLEC3 → KYi1jz7Awse_66Fg8c7Ur}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{8C2D7RnTerPO3g_WyLEC3 → KYi1jz7Awse_66Fg8c7Ur}/_ssgManifest.js +0 -0
package/dist/web/404.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--KYi1jz7Awse_66Fg8c7Ur--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/cea7913ba416dbb7.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-7fccf68b0840c0de.js" async=""></script><script src="/_next/static/chunks/549-bfde82e4a70ed1a0.js" async=""></script><script src="/_next/static/chunks/app/layout-630b663626cebe4a.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
|
|
2
2
|
(function () {
|
|
3
3
|
try {
|
|
4
4
|
var d = document.documentElement;
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
d.dataset.focus = a.strongFocus ? 'strong' : 'normal';
|
|
14
14
|
} catch (e) {}
|
|
15
15
|
})();
|
|
16
|
-
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"SkipLink\"]\n6:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"\"]\n7:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"Nav\"]\n8:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"GlobalApprovals\"]\n9:I[5204,[],\"\"]\na:I[2642,[],\"\"]\nb:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-d4f5bd8c5805bffb.js\",\"549\",\"static/chunks/549-7e35e4fdefadb05d.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"ScrollJump\"]\nc:I[433,[],\"OutletBoundary\"]\ne:I[9884,[],\"AsyncMetadataOutlet\"]\n10:I[433,[],\"ViewportBoundary\"]\n12:I[433,[],\"MetadataBoundary\"]\n13:\"$Sreact.suspense\"\n15:I[3536,[],\"\"]\n:HL[\"/_next/static/css/c37978b44194c37b.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8C2D7RnTerPO3g_WyLEC3\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c37978b44194c37b.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L6\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lb\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lc\",null,{\"children\":[\"$Ld\",[\"$\",\"$Le\",null,{\"promise\":\"$@f\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],null],[\"$\",\"$L12\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$13\",null,{\"fallback\":null,\"children\":\"$L14\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:null\n"])</script><script>self.__next_f.push([1,"f:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"14:\"$f:metadata\"\n"])</script></body></html>
|
|
16
|
+
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"SkipLink\"]\n6:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"\"]\n7:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"Nav\"]\n8:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"GlobalApprovals\"]\n9:I[5204,[],\"\"]\na:I[2642,[],\"\"]\nb:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7fccf68b0840c0de.js\",\"549\",\"static/chunks/549-bfde82e4a70ed1a0.js\",\"177\",\"static/chunks/app/layout-630b663626cebe4a.js\"],\"ScrollJump\"]\nc:I[433,[],\"OutletBoundary\"]\ne:I[9884,[],\"AsyncMetadataOutlet\"]\n10:I[433,[],\"ViewportBoundary\"]\n12:I[433,[],\"MetadataBoundary\"]\n13:\"$Sreact.suspense\"\n15:I[3536,[],\"\"]\n:HL[\"/_next/static/css/cea7913ba416dbb7.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"KYi1jz7Awse_66Fg8c7Ur\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/cea7913ba416dbb7.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L6\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lb\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lc\",null,{\"children\":[\"$Ld\",[\"$\",\"$Le\",null,{\"promise\":\"$@f\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],null],[\"$\",\"$L12\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$13\",null,{\"fallback\":null,\"children\":\"$L14\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:null\n"])</script><script>self.__next_f.push([1,"f:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"14:\"$f:metadata\"\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{5549:(t,e,o)=>{o.d(e,{AV:()=>a,FH:()=>m,FZ:()=>r,Zm:()=>u,aT:()=>s,c5:()=>y,dK:()=>l,nC:()=>n,rt:()=>d,ub:()=>i,zi:()=>p});let n="/api";function s(t,e){return"/sessions/view?id=".concat(encodeURIComponent(t)).concat(e?"#".concat(e):"")}let c="cop-api-token";function a(){try{let t=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(t)return window.localStorage.setItem(c,t[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),t[1];return window.localStorage.getItem(c)||""}catch(t){return""}}function i(t){let e=a();return e?"".concat(t).concat(t.includes("?")?"&":"?","token=").concat(encodeURIComponent(e)):t}let r=["exit-zero","exit-nonzero","output-contains","output-omits","output-matches","file-exists","file-missing","file-contains"];function d(t){return t.startsWith("exit-")||t.startsWith("output-")}function l(t){return"output-contains"===t||"output-omits"===t||"output-matches"===t||"file-contains"===t}function u(t){return"limit-reached"===t.status||"aborted"===t.status||!!t.limit&&("failed"===t.status||"blocked"===t.status)}async function h(t,e){let o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=void 0===s.timeoutMs?3e4:s.timeoutMs;try{var i;o=await fetch("".concat(n).concat(t),{...e,...null!==c&&!(null==e?void 0:e.signal)?{signal:AbortSignal.timeout(c)}:{},headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{},...null!=(i=null==e?void 0:e.headers)?i:{}}})}catch(e){if("TimeoutError"===e.name)throw Error("The API did not answer within ".concat(Math.round((null!=c?c:0)/1e3)," s (").concat(t.split("?")[0],"). It may be busy; try again."));throw e}if(!o.ok){let t="".concat(o.status," ").concat(o.statusText);try{let e=await o.json();(null==e?void 0:e.message)&&(t=Array.isArray(e.message)?e.message.join("; "):e.message)}catch(t){}throw Error(t)}let r=await o.text();return r?JSON.parse(r):void 0}let m={health:()=>h("/health"),doctor:()=>h("/doctor"),settings:()=>h("/settings"),saveSettings:t=>h("/settings",{method:"PUT",body:JSON.stringify(t)}),level1:()=>h("/level1"),setLevel1:t=>h("/level1",{method:"PUT",body:JSON.stringify({content:t})}),resetLevel1:()=>h("/level1",{method:"DELETE"}),presets:()=>h("/presets"),savePreset:(t,e)=>h("/presets/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:e})}),deletePreset:t=>h("/presets/".concat(encodeURIComponent(t)),{method:"DELETE"}),personas:()=>h("/personas"),savePersona:(t,e)=>h("/personas/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:e})}),deletePersona:t=>h("/personas/".concat(encodeURIComponent(t)),{method:"DELETE"}),sessions:()=>h("/sessions"),reorderSessions:t=>h("/sessions-order",{method:"PUT",body:JSON.stringify({ids:t})}),metrics:()=>h("/metrics"),preparePreview:function(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return h("/repo/prepare/preview",{method:"POST",body:JSON.stringify({dir:t,fetch:e})},{timeoutMs:33e4})},prepareProject:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h("/repo/prepare",{method:"POST",body:JSON.stringify({dir:t,fingerprint:e,...o})})},session:t=>h("/sessions/".concat(t)),createSession:(t,e)=>h("/sessions",{method:"POST",body:JSON.stringify({name:t,projectDir:e})}),updateSession:(t,e)=>h("/sessions/".concat(t),{method:"PUT",body:JSON.stringify(e)}),deleteSession:t=>h("/sessions/".concat(t),{method:"DELETE"}),addTask:(t,e)=>h("/sessions/".concat(t,"/tasks"),{method:"POST",body:JSON.stringify(e)}),updateTask:(t,e,o)=>h("/sessions/".concat(t,"/tasks/").concat(e),{method:"PUT",body:JSON.stringify(o)}),deleteTask:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e),{method:"DELETE"}),continueTask:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/continue"),{method:"POST",body:"{}"}),rerunTask:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return h("/sessions/".concat(t,"/tasks/").concat(e,"/rerun"),{method:"POST",body:JSON.stringify({...o,...n.buildOnFinished?{buildOnFinished:!0}:{}})})},taskChanges:(t,e,o)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/changes").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskChangeFile:(t,e,o,n)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/changes/file?path=").concat(encodeURIComponent(o)).concat(n?"&run=".concat(encodeURIComponent(n)):"")),taskStory:(t,e,o)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/story").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskFiles:(t,e,o)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/files").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskLogUrl:(t,e,o)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(e,"/log").concat(o?"?run=".concat(encodeURIComponent(o)):""),taskFileUrl:(t,e,o,s,c)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(e,"/files/").concat(o,"/").concat(encodeURIComponent(s)).concat(c?"?run=".concat(encodeURIComponent(c)):""),saveTaskLog:(t,e,o)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/log").concat(o?"?run=".concat(encodeURIComponent(o)):""),{method:"POST",body:"{}"}),saveTaskFile:(t,e,o,n,s)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/files/").concat(o,"/").concat(encodeURIComponent(n)).concat(s?"?run=".concat(encodeURIComponent(s)):""),{method:"POST",body:"{}"}),start:(t,e,o)=>h("/sessions/".concat(t,"/start"),{method:"POST",body:JSON.stringify({mode:e,name:o})}),stop:t=>h("/sessions/".concat(t,"/stop"),{method:"POST",body:"{}"}),approvals:t=>h("/approvals".concat(t?"?session=".concat(encodeURIComponent(t)):"")),decide:(t,e)=>h("/approvals/".concat(t),{method:"POST",body:JSON.stringify({action:e})}),setRunMode:(t,e)=>h("/sessions/".concat(t,"/mode"),{method:"POST",body:JSON.stringify({mode:e})}),streamUrl:t=>i("".concat(n,"/sessions/").concat(t,"/stream")),batch:()=>h("/batch").then(t=>null!=t?t:null),startBatch:(t,e,o,n,s,c,a)=>h("/batch/start",{method:"POST",body:JSON.stringify({sessionIds:t,mode:e,onFailure:o,model:n,reviewModel:s,name:c,taskIds:a})}),suggestedRunName:t=>h("/batch/name?sessions=".concat(encodeURIComponent(t.join(",")))),stopBatch:()=>h("/batch/stop",{method:"POST",body:"{}"}),pauseBatch:()=>h("/batch/pause",{method:"POST",body:"{}"}),resumeBatch:()=>h("/batch/resume",{method:"POST",body:"{}"}),planBrief:t=>h("/plan/brief?lang=".concat(encodeURIComponent(t))),context:(t,e)=>h("/context/".concat(t,"?lang=").concat(encodeURIComponent(e))),setContext:(t,e)=>h("/context/".concat(t),{method:"PUT",body:JSON.stringify({content:e})}),resetContext:(t,e)=>h("/context/".concat(t,"?lang=").concat(encodeURIComponent(e)),{method:"DELETE"}),checkPlan:t=>h("/plan/check",{method:"POST",body:JSON.stringify({text:t})}),importPlan:t=>h("/plan/import",{method:"POST",body:JSON.stringify({text:t})}),browseFolder:t=>h("/browse-folder",{method:"POST",body:JSON.stringify({start:t})},{timeoutMs:null}),tasks:()=>h("/tasks"),activity:()=>h("/activity"),downloadBundle:async t=>{var e,o,s;let c=await fetch("".concat(n,"/export/bundle"),{method:"POST",headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{}},body:JSON.stringify({tasks:t})});if(!c.ok)throw Error(await c.text()||"".concat(c.status," ").concat(c.statusText));let i=null!=(s=c.headers.get("content-disposition"))?s:"",r=null==(e=/filename\*=UTF-8''([^;]+)/i.exec(i))?void 0:e[1],d=null==(o=/filename="([^"]+)"/i.exec(i))?void 0:o[1],l=null!=d?d:"copilot-operator-bundle.json";if(r)try{l=decodeURIComponent(r)}catch(t){}let u=URL.createObjectURL(await c.blob()),h=document.createElement("a");return h.href=u,h.download=l,document.body.appendChild(h),h.click(),h.remove(),setTimeout(()=>URL.revokeObjectURL(u),1e4),l},exportUrl:(t,e)=>{let o=new URLSearchParams;return e.run&&o.set("run",e.run),e.session&&o.set("session",e.session),e.task&&o.set("task",e.task),i("".concat(n,"/export/").concat(t,"?").concat(o.toString()))},debugExportUrl:t=>i("".concat(n,"/debug/export").concat(t.length>0?"?sessions=".concat(encodeURIComponent(t.join(","))):"")),vcsStatus:t=>h("/sessions/".concat(t,"/vcs")),runVcs:t=>h("/batch/vcs?ids=".concat(encodeURIComponent(t.join(",")))),runVcsPrepare:function(t,e,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return h("/batch/vcs/prepare",{method:"POST",body:JSON.stringify({sessionIds:t,repoDir:e,action:o,choices:n})})},vcsSnapshot:(t,e)=>h("/sessions/".concat(t,"/vcs/snapshot"),{method:"POST",body:JSON.stringify({choices:e})}),restorePreview:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/restore")),restore:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/restore"),{method:"POST",body:"{}"}),contractCheck:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/contract")),applyContractFix:(t,e,o,n)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/contract-fix"),{method:"POST",body:JSON.stringify({choices:o,expect:n})}),restartPlan:(t,e)=>h("/sessions/".concat(t,"/tasks/").concat(e,"/restart")),restartFrom:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h("/sessions/".concat(t,"/tasks/").concat(e,"/restart"),{method:"POST",body:JSON.stringify(o)})},repoCheck:t=>h("/repo?dir=".concat(encodeURIComponent(t))),project:()=>h("/project"),setProject:t=>h("/project",{method:"PUT",body:JSON.stringify(t)}),models:()=>h("/models"),setDefaultModel:t=>h("/models/default",{method:"PUT",body:JSON.stringify({model:t})}),setDefaultReviewModel:t=>h("/models/review-default",{method:"PUT",body:JSON.stringify({model:t})}),refreshModels:()=>h("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:t=>h("/login",{method:"POST",body:JSON.stringify({account:(null==t?void 0:t.trim())||void 0})},{timeoutMs:null})};function p(t){return t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}function y(t){if(void 0===t)return"";let e=Math.round(t/1e3);if(e<60)return"".concat(e,"s");let o=Math.floor(e/60);return o<60?"".concat(o,"m ").concat(e%60,"s"):"".concat(Math.floor(o/60),"h ").concat(o%60,"m")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[584],{287:(e,t,n)=>{n.d(t,{y:()=>u,f:()=>d});var s=n(3365),l=n(1521),a=n(5549),i=n(867),r=n(7527),c=n(1035),o=n(4811);function d(e){var t,n,d;let{target:h,intro:m,initial:f="one",focusFirst:p=!1,checkContract:x=!0,onClose:g}=e,{t:y}=(0,i.kj)(),j=(0,o.p)(),[k,v]=(0,l.useState)(null),[b,N]=(0,l.useState)(f),[w,S]=(0,l.useState)(!1),[C,I]=(0,l.useState)(""),[E,q]=(0,l.useState)(!1),F=(0,l.useRef)(null),R=(0,l.useRef)(null),L=(0,l.useRef)(null),T=(0,l.useId)(),M=()=>a.FH.session(h.sessionId).then(v).catch(e=>I(e.message));(0,l.useEffect)(()=>{M(),x&&a.FH.contractCheck(h.sessionId,h.taskId).then(e=>q(e.conflicts.length>0)).catch(()=>void 0)},[h.sessionId,h.taskId]),(0,r.z)(M,3e3,!!(null==k?void 0:k.running));let H=null!==k;if((0,l.useEffect)(()=>{var e,t,n;if(!H||(null==(t=F.current)||null==(e=t.scrollIntoView)||e.call(t,{block:"nearest"}),!p))return;let s=R.current;s&&!s.disabled?s.focus():null==(n=L.current)||n.focus()},[H,p]),!k)return(0,s.jsx)("div",{className:"notice calm",style:{marginTop:8},children:(0,s.jsx)("span",{className:"small",children:C||y("runq.loading")})});let D=function(e,t){let n=e.tasks.findIndex(e=>e.id===t),s=n>=0?e.tasks[n]:void 0,l=n>=0?e.tasks.slice(0,n):[],a=n>=0?e.tasks.slice(n+1):[],i="continue"!==e.onFailure,r=-1;return a.forEach((e,t)=>{"queued"===e.status&&(r=t)}),{task:s,followingQueued:a.filter(e=>"queued"===e.status),laterRan:a.filter(e=>"queued"!==e.status),earlierRan:l.filter(e=>"queued"!==e.status),chain:i,chainGap:i?l.find(e=>"done"!==e.status):void 0,chainGapLater:i&&r>0?a.slice(0,r).find(e=>"queued"!==e.status&&"done"!==e.status):void 0}}(k,h.taskId),O=(null==(t=D.task)?void 0:t.status)==="queued",B="following"===b?[D.task,...D.followingQueued]:D.task?[D.task]:[],G=k.running?y("runq.sessionRunning"):!1===k.active?y("runq.sessionInactive"):"",W=async e=>{if("unattended"!==e||j||await (0,c.Z)(y("batch.unattendedConfirm",{n:1}))){S(!0),I(""),q(!1);try{let n=await a.FH.suggestedRunName([h.sessionId]).then(e=>e.name).catch(()=>void 0),s=await a.FH.startBatch([h.sessionId],e,"stop",void 0,void 0,n,B.map(e=>e.id));if(!s.started){var t;I(y("batch.notStarted",{reason:null!=(t=s.reason)?t:""}));let e=await a.FH.contractCheck(h.sessionId,h.taskId).catch(()=>({conflicts:[]}));q(e.conflicts.length>0);return}I(y("runq.started",{n:B.length})),g(!0)}catch(e){I(e.message)}finally{S(!1)}}},A=y("runq.title",{title:h.title});return(0,s.jsxs)("div",{ref:F,className:"notice calm",role:"group","aria-label":A,style:{marginTop:8},children:[m&&(0,s.jsx)("p",{className:"small",style:{marginTop:0},children:m}),(0,s.jsx)("strong",{children:A}),O?(0,s.jsxs)(s.Fragment,{children:[D.followingQueued.length>0&&(0,s.jsxs)("div",{className:"small",role:"radiogroup","aria-label":A,style:{marginTop:6},children:[(0,s.jsxs)("label",{className:"option-inline",children:[(0,s.jsx)("input",{type:"radio",name:"runq-".concat(T),checked:"one"===b,onChange:()=>N("one"),disabled:w}),y("runq.onlyThis")]}),(0,s.jsxs)("label",{className:"option-inline",title:y("runq.followingWhy"),children:[(0,s.jsx)("input",{type:"radio",name:"runq-".concat(T),checked:"following"===b,onChange:()=>N("following"),disabled:w}),y("runq.following",{n:D.followingQueued.length,session:k.name})]})]}),(0,s.jsx)("div",{className:"small",style:{marginTop:6},children:y("runq.willRun")}),(0,s.jsx)("ol",{className:"small",style:{margin:"4px 0",paddingLeft:22},children:B.map(e=>(0,s.jsx)("li",{children:e.title},e.id))}),(0,s.jsxs)("ul",{className:"small",style:{margin:"4px 0",paddingLeft:18},children:[D.chain&&B.length>1&&(0,s.jsx)("li",{children:y("runq.chainStops")}),D.earlierRan.length>0&&(0,s.jsx)("li",{children:y("runq.untouched",{n:D.earlierRan.length})}),D.laterRan.length>0&&(0,s.jsx)("li",{children:y("runq.laterRan",{list:D.laterRan.map(e=>'"'.concat(e.title,'"')).join(", ")})}),"one"===b&&D.followingQueued.length>0&&(0,s.jsx)("li",{children:y("runq.restWait",{n:D.followingQueued.length})})]}),D.chainGap&&(0,s.jsx)("div",{className:"notice caution small",style:{marginTop:6},children:y("runq.chainGap",{before:D.chainGap.title,status:y("status.".concat(D.chainGap.status))})}),"following"===b&&D.chainGapLater&&(0,s.jsx)("div",{className:"notice caution small",style:{marginTop:6},children:y("runq.chainGapLater",{between:D.chainGapLater.title,status:y("status.".concat(D.chainGapLater.status))})}),G&&(0,s.jsx)("p",{className:"small",children:G})]}):(0,s.jsx)("p",{className:"small",children:y("runq.notQueued",{status:y("status.".concat(null!=(d=null==(n=D.task)?void 0:n.status)?d:"queued"))})}),(0,s.jsxs)("div",{className:"row",style:{marginTop:8},children:[O&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{ref:R,className:"primary",disabled:w||!!G,onClick:()=>void W("confirm"),title:y("runq.goWhy"),children:y("runq.go")}),(0,s.jsx)("button",{disabled:w||!!G,onClick:()=>void W("unattended"),title:y("runq.unattendedWhy"),children:y("runq.unattended")})]}),(0,s.jsx)("button",{ref:L,className:"quiet",disabled:w,onClick:()=>g(!1),children:m?y("runq.later"):y("dialog.cancel")}),C&&(0,s.jsx)("span",{className:"small",role:"status",children:C})]}),E&&(0,s.jsx)(u,{target:h,onApplied:(e,t)=>{M(),0===e&&(q(!1),I(t))}})]})}function u(e){let{target:t,onApplied:n}=e,{t:r}=(0,i.kj)(),[c,o]=(0,l.useState)(null),[d,u]=(0,l.useState)([]),[h,m]=(0,l.useState)(!1),[f,p]=(0,l.useState)(""),[x,g]=(0,l.useState)(null),[y,j]=(0,l.useState)(null),k=(0,l.useId)();(0,l.useEffect)(()=>{o(null),Promise.all([a.FH.contractCheck(t.sessionId,t.taskId),a.FH.session(t.sessionId)]).then(e=>{var n;let[s,l]=e,a=l.tasks.find(e=>e.id===t.taskId);o(s.conflicts),u(s.conflicts.map(e=>e.fixes.length>0?0:-1)),g(null!=(n=null==a?void 0:a.status)?n:null),j(a?{readOnly:a.readOnly,scope:a.scope,checks:a.checks}:null)}).catch(e=>p(e.message))},[t.sessionId,t.taskId]);let v=async()=>{if(c){m(!0),p("");try{let e=await a.FH.applyContractFix(t.sessionId,t.taskId,d,c.map(e=>e.text)),s=r("cfix.applied",{list:(y?function(e,t,n){var s,l,a,i;let r=[];!!t.readOnly!=!!n.readOnly&&r.push(e(n.readOnly?"cfix.chReadOnlyOn":"cfix.chReadOnlyOff"));let c=(null!=(s=t.scope)?s:[]).join(", "),o=(null!=(l=n.scope)?l:[]).join(", ");c!==o&&r.push(o?e("cfix.chScope",{paths:o}):e("cfix.chScopeRemoved"));let d=new Set((null!=(a=n.checks)?a:[]).map(e=>e.name));for(let n of null!=(i=t.checks)?i:[])d.has(n.name)||r.push(e("cfix.chDropped",{check:n.name}));return r.join("; ")}(r,y,e.task):e.applied.join("; "))||r("cfix.chNothing")});p(s+(e.remaining.length>0?" ".concat(r("cfix.remaining",{n:e.remaining.length})):"")),o(e.remaining),u(e.remaining.map(e=>e.fixes.length>0?0:-1)),g("queued"),j({readOnly:e.task.readOnly,scope:e.task.scope,checks:e.task.checks}),n(e.remaining.length,s)}catch(e){p(e.message)}finally{m(!1)}}},b=r("cfix.title",{title:t.title});return(0,s.jsxs)("div",{className:"notice caution",role:"group","aria-label":b,style:{marginTop:8},children:[(0,s.jsx)("strong",{children:b}),(0,s.jsx)("p",{className:"why",children:r("cfix.why")}),null===c?(0,s.jsx)("p",{className:"small",children:f||r("cfix.loading")}):0===c.length?(0,s.jsx)("p",{className:"small",role:"status",children:f||r("cfix.none")}):(0,s.jsxs)(s.Fragment,{children:[c.map((e,t)=>(0,s.jsxs)("fieldset",{className:"small",style:{margin:"8px 0",border:0,padding:0},children:[(0,s.jsx)("legend",{style:{fontWeight:600},children:e.text}),e.fixes.map((e,n)=>(0,s.jsxs)("label",{className:"option-inline",style:{display:"block"},children:[(0,s.jsx)("input",{type:"radio",name:"cfix-".concat(k,"-").concat(t),checked:d[t]===n,onChange:()=>u(e=>e.map((e,s)=>s===t?n:e)),disabled:h}),"add-to-scope"===e.kind?r("cfix.addToScope",{path:e.path}):"not-read-only"===e.kind?e.scope.length>0?r("cfix.notReadOnly",{paths:e.scope.join(", ")}):r("cfix.notReadOnlyAll"):"drop-scope"===e.kind?r("cfix.dropScope"):r("cfix.dropCheck",{check:e.check}),0===n&&(0,s.jsxs)("span",{className:"muted",children:[" ",r("cfix.minimal")]})]},n)),(0,s.jsxs)("label",{className:"option-inline",style:{display:"block"},children:[(0,s.jsx)("input",{type:"radio",name:"cfix-".concat(k,"-").concat(t),checked:-1===d[t],onChange:()=>u(e=>e.map((e,n)=>n===t?-1:e)),disabled:h}),e.fixes.length>0?r("cfix.leave"):r("cfix.noFix")]})]},t)),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)("button",{className:"primary",disabled:h||d.every(e=>-1===e),onClick:()=>void v(),children:"queued"===x?r("cfix.applyQueued"):r("cfix.apply")}),f&&(0,s.jsx)("span",{className:"small",role:"status",children:f})]})]})]})}},1035:(e,t,n)=>{n.d(t,{DialogHost:()=>d,Z:()=>o});var s=n(3365),l=n(1521),a=n(867),i=n(4969);let r=null,c=[];function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(n=>{var s;return s={kind:"confirm",message:e,...t,resolve:n},void(r?r(s):c.push(s))})}function d(e){var t,n;let{children:o}=e,{t:d}=(0,a.kj)(),[u,h]=(0,l.useState)([]),m=(0,l.useRef)(null),f=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(r=e=>h(t=>[...t,e]),c.length>0){let e=c.splice(0,c.length);h(t=>[...t,...e])}return()=>{r=null}},[]);let p=u[0],x=(0,l.useCallback)(e=>{p&&(p.resolve(e),h(e=>e.slice(1)))},[p]);return(0,i.V)(f,!!p,m),(0,l.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),x(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p,x]),(0,s.jsxs)(s.Fragment,{children:[o,p&&(0,s.jsx)("div",{className:"modal-backdrop",onClick:()=>x(!1),role:"presentation",children:(0,s.jsxs)("div",{ref:f,className:"modal".concat(p.danger?" danger":""),role:"confirm"===p.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h2",{id:"modal-title",children:null!=(t=p.title)?t:d("confirm"===p.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,s.jsx)("div",{id:"modal-body",className:"modal-body",children:p.message}),(0,s.jsxs)("div",{className:"row modal-actions",children:["confirm"===p.kind&&(0,s.jsx)("button",{type:"button",className:"quiet",onClick:()=>x(!1),children:d("dialog.cancel")}),(0,s.jsx)("button",{ref:m,type:"button",className:p.danger?"danger":"primary",onClick:()=>x(!0),children:null!=(n=p.okLabel)?n:d("dialog.ok")})]})]})})]})}},1366:(e,t,n)=>{n.d(t,{w:()=>r,y:()=>i});var s=n(3365),l=n(1521),a=n(867);function i(e){let{readOnly:t,scope:n,onReadOnly:i,onScope:r}=e,{t:c}=(0,a.kj)(),o=(0,l.useId)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"option",style:{marginTop:10},children:[(0,s.jsxs)("label",{children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:e=>i(e.target.checked)}),(0,s.jsx)("span",{children:c("task.readOnlyEdit")})]}),(0,s.jsx)("p",{className:"why",children:c("task.readOnlyEditWhy")})]}),(0,s.jsx)("label",{htmlFor:"".concat(o,"-scope"),children:c("task.scopeEdit")}),(0,s.jsx)("textarea",{id:"".concat(o,"-scope"),value:n,onChange:e=>r(e.target.value),placeholder:"tests/e2e/\nsrc/**/*.ts",style:{minHeight:60},disabled:t}),(0,s.jsx)("p",{className:"why",children:c("task.scopeEditWhy")})]})}function r(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}},1910:(e,t,n)=>{n.d(t,{H:()=>c,u:()=>r});var s=n(3365),l=n(1521),a=n(867),i=n(5549);function r(e){let{label:t,save:n}=e,{t:i}=(0,a.kj)(),[r,c]=(0,l.useState)(!1),[o,d]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1),m=async()=>{c(!0),d("");try{var e;let t=await n();h(!1),d(t.revealed?i("save.done",{path:t.path}):i("save.savedOnly",{path:t.path,note:null!=(e=t.note)?e:""}))}catch(e){h(!0),d(i("save.failed",{problem:e.message}))}finally{c(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"linkish",disabled:r,title:i("save.why"),onClick:()=>void m(),children:r?i("save.saving"):t}),o&&(0,s.jsx)("span",{className:u?"err small":"muted small",children:o})]})}function c(e){let{sessionId:t,taskId:n,attempt:r}=e,{t:c}=(0,a.kj)(),[o,d]=(0,l.useState)(!1),[u,h]=(0,l.useState)(""),[m,f]=(0,l.useState)(!1),p=async()=>{d(!0),h("");try{let e=await i.FH.downloadBundle([{sessionId:t,taskId:n,attempt:r}]);f(!1),h(c("reg.bundleSaved",{name:e}))}catch(e){f(!0),h(c("save.failed",{problem:e.message}))}finally{d(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"linkish",disabled:o,title:c("save.attemptRecordWhy"),onClick:()=>void p(),children:o?c("save.saving"):c("save.attemptRecord")}),u&&(0,s.jsx)("span",{className:m?"err small":"muted small",children:u})]})}},2876:(e,t,n)=>{n.d(t,{P:()=>d});var s=n(3365),l=n(1521),a=n(5549),i=n(867);function r(e,t){let[n,s]=(0,l.useState)(null),a=(0,l.useRef)(!0),[i,r]=(0,l.useState)(!0),c=(0,l.useCallback)(e=>s(e),[]);return(0,l.useLayoutEffect)(()=>{if(!n)return;let e=()=>{let e=n.scrollHeight-n.scrollTop-n.clientHeight<=24;a.current=e,r(e)};return n.addEventListener("scroll",e,{passive:!0}),()=>n.removeEventListener("scroll",e)},[n]),(0,l.useLayoutEffect)(()=>{n&&e&&a.current&&(n.scrollTop=n.scrollHeight)},[n,e,t]),{ref:c,following:i,follow:(0,l.useCallback)(()=>{a.current=!0,r(!0),n&&(n.scrollTop=n.scrollHeight)},[n])}}var c=n(5132);function o(e){let{text:t,follow:n}=e,{ref:l}=r(n,t);return(0,s.jsx)("pre",{ref:l,className:"story-out".concat(n?" terminal":""),children:t})}function d(e){let{sessionId:t,taskId:n,runId:d,live:h}=e,{t:m}=(0,i.kj)(),[f,p]=(0,l.useState)(null),[x,g]=(0,l.useState)(""),[y,j]=(0,l.useState)(!0),[k,v]=(0,l.useState)(!0),[b,N]=(0,l.useState)(new Set),[w,S]=(0,l.useState)(new Set),[C,I]=(0,l.useState)(new Set),E=!!(null==f?void 0:f.live),q=(0,l.useRef)(0);q.current+=1;let F=r(E,q.current),R=(0,l.useRef)(null),L=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{if(!f)return;let e=[],t=(n,s)=>n.forEach((n,l)=>{let a="".concat(s).concat(l);"review"===n.kind?t(n.entries,"".concat(a,"-")):"step"!==n.kind||n.outcome||e.push(a)});t(f.entries,"e"),e.some(e=>!w.has(e))&&S(t=>new Set([...t,...e])),f.live&&!L.current&&R.current&&(L.current=!0,R.current.scrollIntoView({block:"nearest",behavior:"smooth"}))},[f,w]),(0,l.useEffect)(()=>{let e,s=!0,l=async()=>{try{let i=await a.FH.taskStory(t,n,d);if(!s)return;p(i),g(""),(i.live||h)&&(e=setTimeout(l,2e3))}catch(t){if(!s)return;g(t.message),h&&(e=setTimeout(l,2e3))}};return l(),()=>{s=!1,e&&clearTimeout(e)}},[t,n,d,h]),x&&!f)return(0,s.jsx)("div",{className:"err small",children:x});if(!f)return(0,s.jsx)("div",{className:"muted small",children:m("story.loading")});let T=e=>b.has(e)||w.has(e)&&!C.has(e),M=e=>{let t=T(e);N(n=>{let s=new Set(n);return t?s.delete(e):s.add(e),s}),I(n=>{let s=new Set(n);return t?s.add(e):s.delete(e),s})},H=(e,t)=>{if(!("review"===e.kind?y||k:"step"===e.kind?k:y))return null;if("review"===e.kind)return(0,s.jsxs)("li",{className:"story-review",children:[(0,s.jsxs)("div",{className:"story-head",children:[(0,s.jsx)(u,{at:e.at}),(0,s.jsx)("span",{className:"chip",children:m("story.review",{n:e.round})})]}),(0,s.jsx)("ol",{className:"story",children:e.entries.map((e,n)=>H(e,"".concat(t,"-").concat(n)))})]},t);if("step"===e.kind){let n=T(t),l=!e.outcome&&f.live;return(0,s.jsxs)("li",{className:"story-step".concat(e.failed?" failed":""),children:[(0,s.jsxs)("div",{className:"story-head",children:[(0,s.jsx)(u,{at:e.at}),(0,s.jsx)("span",{className:"chip",children:m("story.step",{it:e.iteration,id:e.id})}),e.outcome&&(0,s.jsxs)("span",{className:"badge ".concat(e.failed?"failed":"done"),children:[e.outcome,void 0!==e.exitCode?" \xb7 exit ".concat(e.exitCode):"",void 0!==e.durationMs?" \xb7 ".concat((0,a.c5)(e.durationMs)):""]}),!e.outcome&&(0,s.jsx)("span",{className:"badge running",children:m("story.running")}),e.failed&&(0,s.jsx)("span",{className:"badge failed",children:m("story.failedHere")})]}),(0,s.jsx)("pre",{className:"story-cmd",children:e.command}),e.output&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"linkish small",onClick:()=>M(t),children:n?m("story.hideOutput"):m("story.showOutput",{n:e.output.length})}),n&&(0,s.jsx)(o,{text:e.output,follow:l})]})]},t)}let n=b.has(t),l="sent"===e.kind?m("story.bot"):m("story.chat"),i="reply"===e.kind&&("blocked"===e.status||"failed"===e.status);return(0,s.jsxs)("li",{className:"story-msg ".concat(e.kind).concat(i?" failed":""),children:[(0,s.jsxs)("div",{className:"story-head",children:[(0,s.jsx)(u,{at:e.at}),(0,s.jsx)("strong",{children:l}),(0,s.jsx)("span",{className:"muted small",children:e.label}),"reply"===e.kind&&e.status&&(0,s.jsx)("span",{className:"badge ".concat(i?"failed":"done"===e.status?"done":""),children:e.status})]}),"reply"===e.kind&&e.notes&&(0,s.jsx)("p",{className:"story-notes",children:e.notes}),(0,s.jsx)("button",{type:"button",className:"linkish small",onClick:()=>M(t),children:n?m("story.hideText"):m("story.showText",{n:e.text.length})}),n&&(0,s.jsx)("pre",{className:"story-out",children:e.text})]},t)},D=f.close,O=D&&"done"!==D.status;return(0,s.jsxs)("div",{className:"story-box",ref:R,children:[(0,s.jsxs)("div",{className:"row small",style:{marginBottom:6},children:[(0,s.jsxs)("label",{className:"option-inline",children:[(0,s.jsx)("input",{type:"checkbox",checked:y,onChange:e=>j(e.target.checked)})," ",m("story.showChat")]}),(0,s.jsxs)("label",{className:"option-inline",children:[(0,s.jsx)("input",{type:"checkbox",checked:k,onChange:e=>v(e.target.checked)})," ",m("story.showCommands")]}),f.live&&(0,s.jsxs)("span",{className:"live",children:[(0,s.jsx)("span",{className:"dot","aria-hidden":"true"})," ",m("story.live")]}),f.live&&!F.following&&(0,s.jsx)("button",{type:"button",className:"quiet small",onClick:F.follow,title:m("story.followWhy"),children:m("story.follow")}),x&&(0,s.jsx)("span",{className:"err",children:x})]}),(0,s.jsxs)("div",{className:"story-fixed",children:[(0,s.jsx)("strong",{children:m("story.prompt")}),(0,s.jsx)("pre",{className:"story-out always",children:f.prompt})]}),(0,s.jsx)("div",{ref:F.ref,className:"story-scroll".concat(f.live?" live":""),children:(0,s.jsx)("ol",{className:"story",children:f.entries.map((e,t)=>H(e,"e".concat(t)))})}),D?(0,s.jsxs)("div",{className:"story-fixed close".concat(O?" failed":""),children:[(0,s.jsx)("strong",{children:O?m("story.endedBadly",{status:D.status}):m("story.ended")}),D.reason&&(0,s.jsx)("p",{className:"err small",children:D.reason}),D.summary&&(0,s.jsx)(c.s,{text:D.summary,className:"what"}),D.checks&&D.checks.length>0&&(0,s.jsx)("ul",{className:"small",style:{margin:"6px 0 0",paddingLeft:18},children:D.checks.map((e,t)=>(0,s.jsxs)("li",{className:e.passed?"":"err",children:[e.passed?"✓":"✗"," ",e.name,!e.passed&&e.detail?" — ".concat(e.detail):""]},t))})]}):(0,s.jsx)("div",{className:"story-fixed muted small",children:m("story.notEnded")})]})}function u(e){let{at:t}=e,n=(0,i.W3)(),{locale:l}=(0,i.kj)();if(!t)return null;let a=new Date(t),r="bg"===l?"bg-BG":void 0,c=a.toLocaleTimeString(r,{hour12:!1}),o=new Date().toDateString()===a.toDateString();return(0,s.jsx)("time",{className:"story-when",dateTime:t,title:n(t),children:o?c:"".concat(a.toLocaleDateString(r)," ").concat(c)})}},3041:(e,t,n)=>{n.d(t,{e:()=>r});var s=n(1521),l=n(5549),a=n(1035),i=n(867);function r(e){let{t}=(0,i.kj)(),[n,r]=(0,s.useState)(""),[c,o]=(0,s.useState)({taskId:"",text:""}),d=(e,t)=>o({taskId:e,text:t}),u=(0,s.useCallback)(async n=>{r("restore"),d(n.taskId,"");try{var s,i,c,o,u,h,m,f,p,x,g,y,j,k;let r=await l.FH.restorePreview(n.sessionId,n.taskId);if(!r.ok)return void d(n.taskId,t("restore.cannot",{problem:null!=(c=r.problem)?c:""}));let v={repo:r.repoDir,title:n.title,branch:null!=(o=r.branchName)?o:"",commit:(null!=(u=r.baseCommit)?u:"").slice(0,8)},b=r.leftBehind.length>0?t("restore.confirmLosing",{...v,n:r.leftBehind.length,kept:null!=(h=r.keptOn)?h:"",list:r.leftBehind.slice(0,10).join("\n")}):t("restore.confirm",v);if(!await (0,a.Z)(b))return;let N=await l.FH.restore(n.sessionId,n.taskId);if(!N.ok)return void d(n.taskId,t("restore.failed",{problem:null!=(m=N.problem)?m:""}));d(n.taskId,(null!=(f=null==(s=N.leftBehind)?void 0:s.length)?f:0)>0?t("restore.done",{branch:null!=(p=N.branch)?p:"",commit:(null!=(x=N.commit)?x:"").slice(0,8),n:null!=(g=null==(i=N.leftBehind)?void 0:i.length)?g:0,kept:null!=(y=N.keptOn)?y:""}):t("restore.doneNothing",{branch:null!=(j=N.branch)?j:"",commit:(null!=(k=N.commit)?k:"").slice(0,8)})),e()}catch(e){d(n.taskId,e.message)}finally{r("")}},[t,e]),h=(0,s.useCallback)(async n=>{r("restart"),d(n.taskId,"");try{var s,i,c;let r=await l.FH.restartPlan(n.sessionId,n.taskId);if(!r.ok)return void d(n.taskId,t("restart.cannot",{problem:null!=(s=r.problem)?s:""}));let o=r.restores.filter(e=>!e.ok);if(o.length>0)return void d(n.taskId,t("restart.cannot",{problem:o.map(e=>{var t;return"".concat(e.repoDir,": ").concat(null!=(t=e.problem)?t:"")}).join(" | ")}));let u=r.restores.map(e=>{var n,s,l,a,i;return[t("restart.repoLine",{repo:e.repoDir,commit:(null!=(n=e.baseCommit)?n:"").slice(0,8),branch:null!=(s=e.branchName)?s:"",n:e.leftBehind.length,kept:null!=(l=e.keptOn)?l:""}),...e.leftBehind.length>0?[t("restart.commitsHead",{kept:null!=(a=e.keptOn)?a:""})]:[],...e.leftBehind.slice(0,15).map(e=>" ".concat(e)),...e.leftBehind.length>15?[t("restart.commitsMore",{n:e.leftBehind.length-15})]:[],...(null!=(i=e.laterSessions)?i:[]).flatMap(e=>[t("restart.laterSession",{session:e.sessionName,n:e.commits.length,branch:e.branch}),...e.commits.slice(0,15).map(e=>" ".concat(e)),...e.commits.length>15?[t("restart.commitsMore",{n:e.commits.length-15})]:[]])].join("\n")}).join("\n"),h=r.tasks.map(e=>" ".concat(e.sessionName," / ").concat(e.title).concat(e.alreadyQueued?t("restart.alreadyQueued"):t("restart.taskRedo",{status:t("status.".concat(e.status))}))).join("\n"),m="unattended"===r.mode&&!!r.unattendedRefused,f=t("restart.confirm",{title:r.from.title,tasks:r.tasks.length,sessions:r.sessions.length,list:h,repos:u||t("restart.noRepo"),mode:t("unattended"!==r.mode||m?"run.confirm":"run.unattended")})+(m?t("restart.stepByStep",{reason:null!=(i=r.unattendedRefused)?i:""}):"");if(!await (0,a.Z)(f))return;let p=await l.FH.restartFrom(n.sessionId,n.taskId,m?{mode:"confirm"}:{});if(!p.started){d(n.taskId,t("restart.failed",{problem:null!=(c=p.reason)?c:""})),e();return}d(n.taskId,t("restart.started",{requeued:p.requeued,repos:p.restored.length})),e()}catch(e){d(n.taskId,e.message)}finally{r("")}},[t,e]);return{busy:n,message:c.text,messageTask:c.taskId,clearMessage:()=>d("",""),restore:u,restartFrom:h}}},3374:(e,t,n)=>{n.d(t,{c:()=>l});var s=n(1521);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,[n,l]=(0,s.useState)(()=>Date.now());return(0,s.useEffect)(()=>{if(!e)return;l(Date.now());let n=window.setInterval(()=>l(Date.now()),t);return()=>window.clearInterval(n)},[e,t]),n}},3523:(e,t,n)=>{function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();if(!e)return;let s=Date.parse(e);if(Number.isNaN(s))return;let l=t?Date.parse(t):n;return Number.isNaN(l)?void 0:Math.max(0,l-s)}function l(e){return!!e.startedAt&&!e.finishedAt&&"queued"!==e.status}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),s=t.some(e=>l(e)),a=t.map(e=>e.finishedAt?Date.parse(e.finishedAt):NaN).filter(e=>!Number.isNaN(e)),i=Date.parse(e.startedAt),r=s||0===a.length?n:Math.max(...a);return{ms:Number.isNaN(i)?0:Math.max(0,r-i),live:s,tasks:t.length}}function i(e){var t,n;let s=new Map;for(let n of e){if(!n.runGroup)continue;let e=null!=(t=s.get(n.runGroup.id))?t:{run:n.runGroup,tasks:[]};e.tasks.push(n),s.set(n.runGroup.id,e)}return null!=(n=[...s.values()].sort((e,t)=>Date.parse(t.run.startedAt)-Date.parse(e.run.startedAt))[0])?n:null}n.d(t,{DG:()=>l,d5:()=>s,eZ:()=>a,hH:()=>i})},4811:(e,t,n)=>{n.d(t,{p:()=>a});var s=n(1521),l=n(5549);function a(){let[e,t]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=!0;return l.FH.settings().then(n=>{var s;let l=null!=(s=n.raw.execution)?s:{};e&&t("unattended"===l.mode)}).catch(()=>void 0),()=>{e=!1}},[]),e}},4969:(e,t,n)=>{n.d(t,{V:()=>a});var s=n(1521);let l='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function a(e,t,n){(0,s.useEffect)(()=>{var s,a;if(!t)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=e.current,c=null!=(a=null!=(s=null==n?void 0:n.current)?s:null==r?void 0:r.querySelector(l))?a:null;null==c||c.focus();let o=e=>{if("Tab"!==e.key||!r)return;let t=Array.from(r.querySelectorAll(l)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let n=t[0],s=t[t.length-1],a=r.contains(document.activeElement);e.shiftKey&&(document.activeElement===n||!a)?(e.preventDefault(),s.focus()):e.shiftKey||document.activeElement!==s&&a||(e.preventDefault(),n.focus())};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),i&&document.contains(i)&&i.focus()}},[e,t,n])}},5132:(e,t,n)=>{n.d(t,{s:()=>r});var s=n(3365),l=n(1521);function a(e,t){let n,l=[],a=/(`[^`\n]+`)|(\*\*[^*\n]+\*\*)|(\*[^*\n]+\*)/g,i=0,r=0;for(;null!==(n=a.exec(e));){n.index>i&&l.push(e.slice(i,n.index));let a=n[0],c="".concat(t,"-i").concat(r+=1);a.startsWith("`")?l.push((0,s.jsx)("code",{children:a.slice(1,-1)},c)):a.startsWith("**")?l.push((0,s.jsx)("strong",{children:a.slice(2,-2)},c)):l.push((0,s.jsx)("em",{children:a.slice(1,-1)},c)),i=n.index+a.length}return i<e.length&&l.push(e.slice(i)),l}function i(e){let t=/^\s*[-*•]\s+(.*)$/.exec(e);if(t)return t[1];let n=/^\s*\d+[.)]\s+(.*)$/.exec(e);return n?n[1]:null}function r(e){let{text:t,className:n}=e,r=[],c=t.replace(/\r\n/g,"\n").split("\n"),o=0,d=0;for(;o<c.length;){let e=c[o];if(e.trim().startsWith("```")){let e=[];for(o+=1;o<c.length&&!c[o].trim().startsWith("```");)e.push(c[o++]);o+=1,e.length>0&&r.push((0,s.jsx)("pre",{children:e.join("\n")},"b".concat(d+=1)));continue}if(null!==i(e)){let e=[];for(;o<c.length&&null!==i(c[o]);)e.push(i(c[o++]));r.push((0,s.jsx)("ul",{children:e.map((e,t)=>(0,s.jsx)("li",{children:a(e,"b".concat(d,"-").concat(t))},t))},"b".concat(d+=1)));continue}if(""===e.trim()){o+=1;continue}let t=[];for(;o<c.length&&""!==c[o].trim()&&null===i(c[o])&&!c[o].trim().startsWith("```");)t.push(c[o++]);let n=d+=1;r.push((0,s.jsx)("p",{children:t.map((e,t)=>(0,s.jsxs)(l.Fragment,{children:[t>0&&(0,s.jsx)("br",{}),a(e,"b".concat(n,"-").concat(t))]},t))},"b".concat(n)))}return(0,s.jsx)("div",{className:"rich ".concat(null!=n?n:""),children:r})}},7527:(e,t,n)=>{n.d(t,{z:()=>l});var s=n(1521);function l(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=(0,s.useRef)(e);l.current=e,(0,s.useEffect)(()=>{let e;if(!n)return;let s=!1,a=async()=>{try{await l.current()}catch(e){}finally{s||(e=setTimeout(()=>void a(),t))}};return a(),()=>{s=!0,e&&clearTimeout(e)}},[t,n])}},8934:(e,t,n)=>{n.d(t,{C:()=>o});var s=n(3365),l=n(1521),a=n(5549),i=n(4969),r=n(867);function c(e){if(null===e||""===e)return[];let t=e.split(/\r?\n/);return""===t[t.length-1]&&t.pop(),t}function o(e){let{sessionId:t,taskId:n,runId:a,title:i,files:c}=e,{t:o}=(0,r.kj)(),[u,h]=(0,l.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"linkish",onClick:()=>h(!0),title:o("diff.openWhy"),children:o("diff.open",{n:c})}),u&&(0,s.jsx)(d,{sessionId:t,taskId:n,runId:a,title:i,onClose:()=>h(!1)})]})}function d(e){var t,n,o,d,h,m,f;let{sessionId:p,taskId:x,runId:g,title:y,onClose:j}=e,{t:k}=(0,r.kj)(),[v,b]=(0,l.useState)(null),[N,w]=(0,l.useState)(""),[S,C]=(0,l.useState)(0),[I,E]=(0,l.useState)(new Map),[q,F]=(0,l.useState)(!1),[R,L]=(0,l.useState)(!0),[T,M]=(0,l.useState)(new Map),[H,D]=(0,l.useState)(-1),O=(0,l.useRef)(null),B=(0,l.useRef)(null),G=(0,l.useRef)(null);(0,i.V)(B,!0,G),(0,l.useEffect)(()=>{a.FH.taskChanges(p,x,g).then(b).catch(e=>w(e.message))},[p,x,g]);let W=null!=(o=null==v?void 0:v.files)?o:[],A=W[S];(0,l.useEffect)(()=>{!A||I.has(A.path)||a.FH.taskChangeFile(p,x,A.path,g).then(e=>E(t=>new Map(t).set(A.path,e))).catch(e=>E(t=>new Map(t).set(A.path,e.message)))},[A,I,p,x,g]);let P=A?I.get(A.path):void 0,Q=(0,l.useMemo)(()=>!P||"string"==typeof P||P.binary||P.tooLarge?[]:function(e,t){let n=function(e,t){let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n+=1;let s=e.length,l=t.length;for(;s>n&&l>n&&e[s-1]===t[l-1];)s-=1,l-=1;let a=[];for(let e=0;e<n;e+=1)a.push({kind:"same",a:e,b:e});for(let i of function(e,t){let n=e.length,s=t.length;if(0===n)return t.map((e,t)=>({kind:"add",b:t}));if(0===s)return e.map((e,t)=>({kind:"del",a:t}));let l=n+s,a=l+1,i=new Int32Array(2*l+3),r=[];for(let c=0;c<=Math.min(l,2e3);c+=1){r.push(i.slice(a-c-1,a+c+2));for(let l=-c;l<=c;l+=2){let o=l===-c||l!==c&&i[a+l-1]<i[a+l+1]?i[a+l+1]:i[a+l-1]+1,d=o-l;for(;o<n&&d<s&&e[o]===t[d];)o+=1,d+=1;if(i[a+l]=o,o>=n&&d>=s)return function(e,t,n,s){let l=[],a=t.length,i=n.length;for(let t=s;t>0;t-=1){let n=e[t],s=e=>n[e+t+1],r=a-i,c=r===-t||r!==t&&s(r-1)<s(r+1)?r+1:r-1,o=s(c),d=o-c;for(;a>o&&i>d;)a-=1,i-=1,l.push({kind:"same",a:a,b:i});a===o?l.push({kind:"add",b:d}):l.push({kind:"del",a:o}),a=o,i=d}for(;a>0&&i>0;)a-=1,i-=1,l.push({kind:"same",a:a,b:i});return l.reverse()}(r,e,t,c)}}return[...e.map((e,t)=>({kind:"del",a:t})),...t.map((e,t)=>({kind:"add",b:t}))]}(e.slice(n,s),t.slice(n,l)))a.push({kind:i.kind,...void 0!==i.a?{a:i.a+n}:{},...void 0!==i.b?{b:i.b+n}:{}});for(let t=0;s+t<e.length;t+=1)a.push({kind:"same",a:s+t,b:l+t});return a}(e,t),s=[];for(let l=0;l<n.length;){let a=n[l];if("same"===a.kind){s.push({kind:"same",left:{no:a.a+1,text:e[a.a]},right:{no:a.b+1,text:t[a.b]}}),l+=1;continue}let i=[],r=[];for(;l<n.length&&"same"!==n[l].kind;){let e=n[l];"del"===e.kind?i.push(e.a):r.push(e.b),l+=1}let c=Math.max(i.length,r.length);for(let n=0;n<c;n+=1){let l=i[n],a=r[n];s.push({kind:void 0!==l&&void 0!==a?"change":void 0!==l?"del":"add",...void 0!==l?{left:{no:l+1,text:e[l]}}:{},...void 0!==a?{right:{no:a+1,text:t[a]}}:{}})}}return s}(c(P.before),c(P.after)),[P]),V=A&&T.get(A.path)||new Set,K=(0,l.useMemo)(()=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(s)return e.map((e,t)=>({type:"row",row:e,index:t}));let l=[];for(let s=0;s<e.length;){if("same"!==e[s].kind){l.push({type:"row",row:e[s],index:s}),s+=1;continue}let a=s;for(;a<e.length&&"same"===e[a].kind;)a+=1;let i=0===s?0:t,r=a===e.length?0:t,c=a-s-i-r;if(c>1&&!n.has(s+i)){for(let t=s;t<s+i;t+=1)l.push({type:"row",row:e[t],index:t});l.push({type:"gap",from:s+i,count:c});for(let t=a-r;t<a;t+=1)l.push({type:"row",row:e[t],index:t})}else for(let t=s;t<a;t+=1)l.push({type:"row",row:e[t],index:t});s=a}return l})(Q,3,V,q),[Q,V,q]),Z=(0,l.useMemo)(()=>Q.flatMap((e,t)=>"same"!==e.kind&&(0===t||"same"===Q[t-1].kind)?[t]:[]),[Q]);(0,l.useEffect)(()=>{D(-1),O.current&&(O.current.scrollTop=0)},[S]);let _=(0,l.useCallback)(e=>{var t;if(0===Z.length)return;let n=H<0?1===e?0:Z.length-1:Math.min(Z.length-1,Math.max(0,H+e));D(n);let s=null==(t=O.current)?void 0:t.querySelector('[data-row="'.concat(Z[n],'"]'));null==s||s.scrollIntoView({block:"center"})},[H,Z]),z=(0,l.useCallback)(e=>C(t=>Math.min(Math.max(0,t+e),Math.max(0,W.length-1))),[W.length]);(0,l.useEffect)(()=>{let e=e=>{if(!e.ctrlKey&&!e.metaKey&&!e.altKey){if("Escape"===e.key)j();else if("n"===e.key)_(1);else if("p"===e.key)_(-1);else if("]"===e.key)z(1);else{if("["!==e.key)return;z(-1)}e.preventDefault()}};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[_,z,j]);let $=W.reduce((e,t)=>({added:e.added+Math.max(0,t.added),removed:e.removed+Math.max(0,t.removed)}),{added:0,removed:0});return(0,s.jsxs)("div",{ref:B,className:"diff-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"diff-title",children:[(0,s.jsxs)("div",{className:"diff-head",children:[(0,s.jsx)("h2",{id:"diff-title",children:k("diff.title",{title:y})}),(null==v?void 0:v.ok)&&(0,s.jsxs)("span",{className:"muted small",children:[v.branch?"".concat(v.branch," \xb7 "):"",null==(t=v.base)?void 0:t.slice(0,8)," → ",null==(n=v.commit)?void 0:n.slice(0,8)," \xb7 ",k("diff.summary",{n:W.length,a:$.added,r:$.removed})]}),(0,s.jsx)("span",{className:"grow"}),(0,s.jsx)("span",{className:"muted small",children:k("diff.keys")}),(0,s.jsx)("button",{ref:G,type:"button",onClick:j,children:k("diff.close")})]}),N&&(0,s.jsx)("div",{className:"err",style:{padding:12},children:N}),!v&&!N&&(0,s.jsx)("div",{className:"muted",style:{padding:12},children:k("diff.loading")}),v&&!v.ok&&(0,s.jsx)("div",{className:"notice caution",style:{margin:12},children:v.problem}),(null==v?void 0:v.ok)&&0===W.length&&(0,s.jsx)("div",{className:"notice",style:{margin:12},children:k("diff.nothing")}),(null==v?void 0:v.ok)&&W.length>0&&(0,s.jsxs)("div",{className:"diff-body",children:[(0,s.jsx)("nav",{className:"diff-files","aria-label":k("diff.files"),children:W.map((e,t)=>{let n=e.path.lastIndexOf("/");return(0,s.jsxs)("button",{type:"button",className:"diff-file".concat(t===S?" on":""),onClick:()=>C(t),title:e.oldPath?"".concat(e.oldPath," → ").concat(e.path):e.path,children:[(0,s.jsx)("span",{className:"diff-status s-".concat(e.status),children:e.status}),(0,s.jsxs)("span",{className:"diff-path",children:[n>=0&&(0,s.jsx)("span",{className:"muted",children:e.path.slice(0,n+1)}),(0,s.jsx)("strong",{children:e.path.slice(n+1)})]}),(0,s.jsx)("span",{className:"diff-counts",children:e.added<0?k("diff.binaryShort"):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"plus",children:["+",e.added]})," ",(0,s.jsxs)("span",{className:"minus",children:["−",e.removed]})]})})]},e.path)})}),(0,s.jsxs)("div",{className:"diff-main",children:[A&&(0,s.jsxs)("div",{className:"diff-toolbar",children:[(0,s.jsx)("strong",{className:"diff-name",children:A.oldPath?"".concat(A.oldPath," → ").concat(A.path):A.path}),(0,s.jsx)("span",{className:"muted small",children:"A"===A.status?k("diff.added"):"D"===A.status?k("diff.deleted"):"R"===A.status?k("diff.renamed"):""}),(0,s.jsx)("span",{className:"grow"}),(0,s.jsx)("button",{type:"button",className:"quiet",onClick:()=>_(-1),disabled:0===Z.length,children:k("diff.prevChange")}),(0,s.jsx)("button",{type:"button",className:"quiet",onClick:()=>_(1),disabled:0===Z.length,children:k("diff.nextChange")}),(0,s.jsx)("span",{className:"muted small",children:Z.length>0?k("diff.changeN",{i:H<0?"–":H+1,n:Z.length}):""}),(0,s.jsx)("button",{type:"button",className:"quiet",onClick:()=>z(-1),disabled:0===S,children:k("diff.prevFile")}),(0,s.jsx)("button",{type:"button",className:"quiet",onClick:()=>z(1),disabled:S>=W.length-1,children:k("diff.nextFile")}),(0,s.jsxs)("label",{className:"option-inline",children:[(0,s.jsx)("input",{type:"checkbox",checked:q,onChange:e=>F(e.target.checked)})," ",k("diff.whole")]}),(0,s.jsxs)("label",{className:"option-inline",children:[(0,s.jsx)("input",{type:"checkbox",checked:R,onChange:e=>L(e.target.checked)})," ",k("diff.wrap")]})]}),(0,s.jsxs)("div",{className:"diff-scroll",ref:O,children:[void 0===P&&(0,s.jsx)("div",{className:"muted",style:{padding:12},children:k("diff.loading")}),"string"==typeof P&&(0,s.jsx)("div",{className:"err",style:{padding:12},children:P}),P&&"string"!=typeof P&&P.binary&&(0,s.jsx)("div",{className:"notice",style:{margin:12},children:k("diff.binary")}),P&&"string"!=typeof P&&P.tooLarge&&(0,s.jsx)("div",{className:"notice",style:{margin:12},children:k("diff.tooLarge")}),P&&"string"!=typeof P&&!P.binary&&!P.tooLarge&&(0,s.jsxs)(s.Fragment,{children:[(null!=(d=P.before)?d:"").includes("\r\n")!==(null!=(h=P.after)?h:"").includes("\r\n")&&null!==P.before&&null!==P.after&&(0,s.jsx)("div",{className:"notice small",style:{margin:8},children:k("diff.eol",{from:(null!=(m=P.before)?m:"").includes("\r\n")?"CRLF":"LF",to:(null!=(f=P.after)?f:"").includes("\r\n")?"CRLF":"LF"})}),Q.length>0&&0===Z.length&&(0,s.jsx)("div",{className:"notice small",style:{margin:8},children:k("diff.sameText")}),(0,s.jsxs)("table",{className:"diff-table".concat(R?"":" nowrap"),children:[(0,s.jsxs)("colgroup",{children:[(0,s.jsx)("col",{className:"num"}),(0,s.jsx)("col",{}),(0,s.jsx)("col",{className:"num"}),(0,s.jsx)("col",{})]}),(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{colSpan:2,children:k("diff.before")}),(0,s.jsx)("th",{colSpan:2,children:k("diff.after")})]})}),(0,s.jsx)("tbody",{children:K.map(e=>"gap"===e.type?(0,s.jsx)("tr",{className:"diff-gap",children:(0,s.jsx)("td",{colSpan:4,children:(0,s.jsx)("button",{type:"button",className:"linkish small",onClick:()=>{var t;return t=e.from,void(A&&M(e=>{var n;return new Map(e).set(A.path,new Set([...null!=(n=e.get(A.path))?n:[],t]))}))},children:k("diff.gap",{n:e.count})})})},"g".concat(e.from)):(0,s.jsx)(u,{row:e.row,index:e.index,current:H>=0&&Z[H]===e.index},e.index))})]})]})]})]})]})]})}function u(e){var t,n,a,i;let{row:r,index:c,current:o}=e,d="change"===r.kind?function(e,t){let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n+=1;let s=e.length,l=t.length;for(;s>n&&l>n&&e[s-1]===t[l-1];)s-=1,l-=1;return{start:n,leftEnd:s,rightEnd:l}}(r.left.text,r.right.text):null,u=e=>{let t=r[e];if(!t)return null;if(!d)return t.text;let n="left"===e?d.leftEnd:d.rightEnd;return(0,s.jsxs)(l.Fragment,{children:[t.text.slice(0,d.start),(0,s.jsx)("mark",{children:t.text.slice(d.start,n)}),t.text.slice(n)]})};return(0,s.jsxs)("tr",{className:"diff-row ".concat(r.kind).concat(o?" current":""),"data-row":c,children:[(0,s.jsx)("td",{className:"num",children:null!=(a=null==(t=r.left)?void 0:t.no)?a:""}),(0,s.jsx)("td",{className:"code l".concat(r.left?"":" empty"),children:u("left")}),(0,s.jsx)("td",{className:"num",children:null!=(i=null==(n=r.right)?void 0:n.no)?i:""}),(0,s.jsx)("td",{className:"code r".concat(r.right?"":" empty"),children:u("right")})]})}}}]);
|