@devflow-tools/devflow 0.16.0 → 0.16.2
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/cli.js +78 -49
- package/dist/dashboard/404.html +1 -1
- package/dist/dashboard/_next/static/chunks/{736-db1a009357c222d2.js → 384-484184f146e1b764.js} +1 -1
- package/dist/dashboard/_next/static/chunks/{429-eac85fdc49353ed8.js → 429-3a8e078af4ea04bd.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/accuracy/{page-ca6a419d8b29eb4f.js → page-3b8b7448c9c7aeee.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/benchmark/page-d8f3f089f1d15cc7.js +1 -0
- package/dist/dashboard/_next/static/chunks/app/context/{page-1874ae1050524cb6.js → page-480f7324dee9cf74.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/doctor/{page-d542f2ab8d6a1c59.js → page-c32c81c69968099f.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/executions/{page-b98ec834dcda8d93.js → page-bee250062acc03a8.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/graph/{page-f0e7e15288791e9c.js → page-75947209e5b7741c.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/knowledge/{page-86808abd0d47c026.js → page-61a2d663940fb04b.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/{layout-4b78776412bd4fee.js → layout-572650e435947896.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/memory/{page-e169762426ac7a23.js → page-71d7c8926179b065.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/{page-c3e980fb2621470c.js → page-10dcf844701d7903.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/replay/{page-a8a465ed885df0cf.js → page-f354eb8ed0bfbb11.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/runs/[id]/{page-cc1d5182707fca5b.js → page-ffc0fda72263722c.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/runs/{page-bbf0a58abd70430c.js → page-4da6997bddcfeb45.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/settings/{page-9602ff45892e7910.js → page-0fa1d3b02152a97c.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/timeline/{page-a8eb3caf23be8a86.js → page-b676878a19561da3.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/tool-metrics/{page-1f86f62b187f2b5e.js → page-6452423bc1f543ec.js} +1 -1
- package/dist/dashboard/_next/static/chunks/app/workflows/{page-551939c9e86b26c6.js → page-0ff0044616ac56aa.js} +1 -1
- package/dist/dashboard/_next/static/chunks/main-app-cf693a9b955f073e.js +1 -0
- package/dist/dashboard/accuracy.html +1 -1
- package/dist/dashboard/accuracy.txt +3 -3
- package/dist/dashboard/benchmark.html +1 -1
- package/dist/dashboard/benchmark.txt +3 -3
- package/dist/dashboard/context.html +1 -1
- package/dist/dashboard/context.txt +3 -3
- package/dist/dashboard/doctor.html +1 -1
- package/dist/dashboard/doctor.txt +3 -3
- package/dist/dashboard/executions.html +1 -1
- package/dist/dashboard/executions.txt +3 -3
- package/dist/dashboard/graph.html +1 -1
- package/dist/dashboard/graph.txt +3 -3
- package/dist/dashboard/index.html +1 -1
- package/dist/dashboard/index.txt +3 -3
- package/dist/dashboard/knowledge.html +1 -1
- package/dist/dashboard/knowledge.txt +3 -3
- package/dist/dashboard/memory.html +1 -1
- package/dist/dashboard/memory.txt +3 -3
- package/dist/dashboard/replay.html +1 -1
- package/dist/dashboard/replay.txt +3 -3
- package/dist/dashboard/runs/_.html +1 -1
- package/dist/dashboard/runs/_.txt +3 -3
- package/dist/dashboard/runs.html +1 -1
- package/dist/dashboard/runs.txt +3 -3
- package/dist/dashboard/settings.html +1 -1
- package/dist/dashboard/settings.txt +3 -3
- package/dist/dashboard/timeline.html +1 -1
- package/dist/dashboard/timeline.txt +3 -3
- package/dist/dashboard/tool-metrics.html +1 -1
- package/dist/dashboard/tool-metrics.txt +3 -3
- package/dist/dashboard/workflows.html +1 -1
- package/dist/dashboard/workflows.txt +3 -3
- package/dist/hooks/hook-client.js +5 -5
- package/dist/hooks/hook-daemon.js +11 -11
- package/dist/hooks/post-tool-use-failure.js +2 -2
- package/dist/hooks/post-tool-use.js +3 -3
- package/dist/hooks/pre-compact.js +2 -2
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/session-end.js +2 -2
- package/dist/hooks/stop.js +2 -2
- package/dist/hooks/user-prompt-submit.js +3 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/CLAUDE.md +34 -0
- package/dist/plugin/dist/command-registry.json +297 -0
- package/dist/plugin/dist/hooks/hook-client.js +5 -5
- package/dist/plugin/dist/hooks/hook-daemon.js +11 -11
- package/dist/plugin/dist/hooks/post-tool-use-failure.js +2 -2
- package/dist/plugin/dist/hooks/post-tool-use.js +3 -3
- package/dist/plugin/dist/hooks/pre-compact.js +2 -2
- package/dist/plugin/dist/hooks/pre-tool-use.js +2 -2
- package/dist/plugin/dist/hooks/session-end.js +2 -2
- package/dist/plugin/dist/hooks/stop.js +2 -2
- package/dist/plugin/dist/hooks/user-prompt-submit.js +3 -2
- package/dist/plugin/dist/skills/devflow:animation/SKILL.md +63 -0
- package/dist/plugin/dist/skills/devflow:context/SKILL.md +90 -0
- package/dist/plugin/dist/skills/devflow:css/SKILL.md +63 -0
- package/dist/plugin/dist/skills/devflow:docker/SKILL.md +67 -0
- package/dist/plugin/dist/skills/devflow:electron/SKILL.md +67 -0
- package/dist/plugin/dist/skills/devflow:git/SKILL.md +67 -0
- package/dist/plugin/dist/skills/devflow:graph/SKILL.md +80 -0
- package/dist/plugin/dist/skills/devflow:graphql/SKILL.md +66 -0
- package/dist/plugin/dist/skills/devflow:knowledge/SKILL.md +80 -0
- package/dist/plugin/dist/skills/devflow:memory/SKILL.md +79 -0
- package/dist/plugin/dist/skills/devflow:nest/SKILL.md +68 -0
- package/dist/plugin/dist/skills/devflow:nextjs/SKILL.md +65 -0
- package/dist/plugin/dist/skills/devflow:performance/SKILL.md +67 -0
- package/dist/plugin/dist/skills/devflow:react/SKILL.md +96 -0
- package/dist/plugin/dist/skills/devflow:tailwind/SKILL.md +65 -0
- package/dist/plugin/dist/skills/devflow:taro/SKILL.md +66 -0
- package/dist/plugin/dist/skills/devflow:ui-layout/SKILL.md +63 -0
- package/dist/plugin/dist/skills/devflow:vue/SKILL.md +72 -0
- package/dist/plugin/dist/skills/devflow:workflow/SKILL.md +80 -0
- package/dist/plugin/hooks/constitution.md +20 -0
- package/dist/plugin/hooks/post-tool-use +20 -0
- package/dist/plugin/hooks/post-tool-use-failure +19 -0
- package/dist/plugin/hooks/pre-compact +19 -0
- package/dist/plugin/hooks/pre-tool-use +23 -0
- package/dist/plugin/hooks/session-end +19 -0
- package/dist/plugin/hooks/session-start +249 -0
- package/dist/plugin/hooks/stop +27 -0
- package/dist/plugin/hooks/user-prompt-submit +19 -0
- package/dist/plugin/package.json +43 -0
- package/dist/plugin/skills/{devflow:react → react}/SKILL.md +16 -3
- package/package.json +13 -13
- package/plugin-registry.json +29 -29
- package/dist/dashboard/_next/static/chunks/app/benchmark/page-6c6d0acbcde4eb85.js +0 -1
- package/dist/dashboard/_next/static/chunks/main-app-202a5f91ead17fa7.js +0 -1
- /package/dist/dashboard/_next/static/{n_2t1_63toasXsidAssD9 → ZaapgyqOj6AXHY5zdw6_X}/_buildManifest.js +0 -0
- /package/dist/dashboard/_next/static/{n_2t1_63toasXsidAssD9 → ZaapgyqOj6AXHY5zdw6_X}/_ssgManifest.js +0 -0
- /package/dist/plugin/{hooks.json → hooks/hooks.json} +0 -0
- /package/dist/plugin/skills/{devflow:animation → animation}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:context → context}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:css → css}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:docker → docker}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:doctor → doctor}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:electron → electron}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:git → git}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:graph → graph}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:graphql → graphql}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:knowledge → knowledge}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:memory → memory}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:nest → nest}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:nextjs → nextjs}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:performance → performance}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:start → start}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:tailwind → tailwind}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:taro → taro}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:ui-layout → ui-layout}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:vue → vue}/SKILL.md +0 -0
- /package/dist/plugin/skills/{devflow:workflow → workflow}/SKILL.md +0 -0
package/dist/dashboard/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7d4d1db5aa137b5a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js"/><script src="/_next/static/chunks/1dd3208c-f3e84932bdc53383.js" async=""></script><script src="/_next/static/chunks/528-7d4fc14903647f1e.js" async=""></script><script src="/_next/static/chunks/main-app-
|
|
1
|
+
<!DOCTYPE html><html lang="zh" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7d4d1db5aa137b5a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js"/><script src="/_next/static/chunks/1dd3208c-f3e84932bdc53383.js" async=""></script><script src="/_next/static/chunks/528-7d4fc14903647f1e.js" async=""></script><script src="/_next/static/chunks/main-app-cf693a9b955f073e.js" async=""></script><script src="/_next/static/chunks/384-484184f146e1b764.js" async=""></script><script src="/_next/static/chunks/806-195d4d5cc6c28f6c.js" async=""></script><script src="/_next/static/chunks/697-05cf55b6c667773f.js" async=""></script><script src="/_next/static/chunks/458-75822399a849befa.js" async=""></script><script src="/_next/static/chunks/249-e04c1de6240fd78a.js" async=""></script><script src="/_next/static/chunks/429-3a8e078af4ea04bd.js" async=""></script><script src="/_next/static/chunks/app/layout-572650e435947896.js" async=""></script><meta name="robots" content="noindex"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-dvh overflow-hidden"><div class="flex h-dvh items-center justify-center text-sm text-muted-foreground">Loading...</div><script src="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/7d4d1db5aa137b5a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[11815,[],\"\"]\n4:I[55092,[],\"\"]\n5:I[82023,[],\"\"]\n6:I[68762,[\"384\",\"static/chunks/384-484184f146e1b764.js\",\"806\",\"static/chunks/806-195d4d5cc6c28f6c.js\",\"697\",\"static/chunks/697-05cf55b6c667773f.js\",\"458\",\"static/chunks/458-75822399a849befa.js\",\"249\",\"static/chunks/249-e04c1de6240fd78a.js\",\"429\",\"static/chunks/429-3a8e078af4ea04bd.js\",\"185\",\"static/chunks/app/layout-572650e435947896.js\"],\"default\",1]\nc:I[91584,[],\"\"]\n7:{\"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\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"ZaapgyqOj6AXHY5zdw6_X\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"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],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7d4d1db5aa137b5a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"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\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
|
package/dist/dashboard/_next/static/chunks/{736-db1a009357c222d2.js → 384-484184f146e1b764.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[736],{49767:function(t){var e,r,i,s=t.exports={};function n(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function u(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a=[],c=!1,h=-1;function l(){c&&i&&(c=!1,i.length?a=i.concat(a):h=-1,a.length&&d())}function d(){if(!c){var t=u(l);c=!0;for(var e=a.length;e;){for(i=a,a=[];++h<e;)i&&i[h].run();h=-1,e=a.length}i=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function p(){}s.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new f(t,e)),1!==a.length||c||u(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=p,s.addListener=p,s.once=p,s.off=p,s.removeListener=p,s.removeAllListeners=p,s.emit=p,s.prependListener=p,s.prependOnceListener=p,s.listeners=function(t){return[]},s.binding=function(t){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw Error("process.chdir is not supported")},s.umask=function(){return 0}},78617:function(t,e,r){"use strict";let i;r.d(e,{m:function(){return n}});var s=r(50803),n=(i=()=>s.sk,{isServer:()=>i(),setIsServer(t){i=t}})},87047:function(t,e,r){"use strict";r.d(e,{j:function(){return s}});var i=r(24559),s=new class extends i.l{#t;#e;#r;constructor(){super(),this.#r=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#t?this.#t:globalThis.document?.visibilityState!=="hidden"}}},2906:function(t,e,r){"use strict";r.d(e,{Vr:function(){return s}});var i=r(40928).Hp,s=function(){let t=[],e=0,r=t=>{t()},s=t=>{t()},n=i,o=i=>{e?t.push(i):n(()=>{r(i)})},u=()=>{let e=t;t=[],e.length&&n(()=>{s(()=>{e.forEach(t=>{r(t)})})})};return{batch:t=>{let r;e++;try{r=t()}finally{--e||u()}return r},batchCalls:t=>(...e)=>{o(()=>{t(...e)})},schedule:o,setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{s=t},setScheduler:t=>{n=t}}}()},33906:function(t,e,r){"use strict";r.d(e,{N:function(){return s}});var i=r(24559),s=new class extends i.l{#i=!0;#e;#r;constructor(){super(),this.#r=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#i!==t&&(this.#i=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#i}}},99617:function(t,e,r){"use strict";r.d(e,{A:function(){return a},z:function(){return c}});var i=r(50803),s=r(2906),n=r(11135),o=r(5531);function u(t,{pages:e,pageParams:r}){let i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}var a=class extends o.F{#s;#n;#o;#u;#a;#c;#h;#l;constructor(t){super(),this.#l=!1,this.#h=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#a=t.client,this.#u=this.#a.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#n=l(this.options),this.state=t.state??this.#n,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#s}get promise(){return this.#c?.promise}setOptions(t){if(this.options={...this.#h,...t},t?._type&&(this.#s=t._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=l(this.options);void 0!==t.data&&(this.setState(h(t.data,t.dataUpdatedAt)),this.#n=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(t,e){let r=(0,i.oE)(this.state.data,t,this.options);return this.#d({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t){this.#d({type:"setState",state:t})}cancel(t){let e=this.#c?.promise;return this.#c?.cancel(t),e?e.then(i.ZT).catch(i.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#n}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>!1!==(0,i.TD)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.CN||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,i.KC)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,i.Kp)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#c&&(this.#l||this.#f()?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#f(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(t,e){var r;if("idle"!==this.state.fetchStatus&&this.#c?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let s=new AbortController,o=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},a=()=>{let t=(0,i.cG)(this.options,e),r=(()=>{let t={client:this.#a,queryKey:this.queryKey,meta:this.meta};return o(t),t})();return(this.#l=!1,this.options.persister)?this.options.persister(t,r,this):t(r)},c=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:a};return o(t),t})(),h="infinite"===this.#s?(r=this.options.pages,{onFetch:(t,e)=>{let s=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},h=0,l=async()=>{let e=!1,l=r=>{(0,i.I4)(r,()=>t.signal,()=>e=!0)},d=(0,i.cG)(t.options,t.fetchOptions),f=async(r,s,n)=>{if(e)return Promise.reject(t.signal.reason);if(null==s&&r.pages.length)return Promise.resolve(r);let o=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:s,direction:n?"backward":"forward",meta:t.options.meta};return l(e),e})(),u=await d(o),{maxPages:a}=t.options,c=n?i.Ht:i.VX;return{pages:c(r.pages,u,a),pageParams:c(r.pageParams,s,a)}};if(n&&o.length){let t="backward"===n,e={pages:o,pageParams:a},r=(t?function(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}:u)(s,e);c=await f(e,r,t)}else{let t=r??o.length;do{let t=0===h?a[0]??s.initialPageParam:u(s,c);if(h>0&&null==t)break;c=await f(c,t),h++}while(h<t)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},e):t.fetchFn=l}}):this.options.behavior;h?.onFetch(c,this),this.#o=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#d({type:"fetch",meta:c.fetchOptions?.meta}),this.#c=(0,n.Mz)({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:t=>{t instanceof n.p8&&t.revert&&this.setState({...this.#o,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#d({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{let t=await this.#c.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#u.config.onSuccess?.(t,this),this.#u.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof n.p8){if(t.silent)return this.#c.promise;if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#d({type:"error",error:t}),this.#u.config.onError?.(t,this),this.#u.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#d(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...c(e.data,this.options),fetchMeta:t.meta??null};case"success":let r={...e,...h(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#o=t.manual?r:void 0,r;case"error":let i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),s.Vr.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:t})})}};function c(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.Kw)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function h(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,r=void 0!==e,i=r?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}},5531:function(t,e,r){"use strict";r.d(e,{F:function(){return o}});var i=r(40928),s=r(78617),n=r(50803),o=class{#p;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#p=i.mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(s.m.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#p&&(i.mr.clearTimeout(this.#p),this.#p=void 0)}}},11135:function(t,e,r){"use strict";r.d(e,{Kw:function(){return c},Mz:function(){return l},p8:function(){return h}});var i=r(87047),s=r(33906),n=r(49808),o=r(78617),u=r(50803);function a(t){return Math.min(1e3*2**t,3e4)}function c(t){return(t??"online")!=="online"||s.N.isOnline()}var h=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function l(t){let e,r=!1,l=0,d=(0,n.O)(),f=()=>"pending"!==d.status,p=()=>i.j.isFocused()&&("always"===t.networkMode||s.N.isOnline())&&t.canRun(),y=()=>c(t.networkMode)&&t.canRun(),v=t=>{f()||(e?.(),d.resolve(t))},m=t=>{f()||(e?.(),d.reject(t))},b=()=>new Promise(r=>{e=t=>{(f()||p())&&r(t)},t.onPause?.()}).then(()=>{e=void 0,f()||t.onContinue?.()}),g=()=>{let e;if(f())return;let i=0===l?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(v).catch(e=>{if(f())return;let i=t.retry??(o.m.isServer()?0:3),s=t.retryDelay??a,n="function"==typeof s?s(l,e):s,c=!0===i||"number"==typeof i&&l<i||"function"==typeof i&&i(l,e);if(r||!c){m(e);return}l++,t.onFail?.(l,e),(0,u._v)(n).then(()=>p()?void 0:b()).then(()=>{r?m(e):g()})})};return{promise:d,status:()=>d.status,cancel:e=>{if(!f()){let r=new h(e);m(r),t.onCancel?.(r)}},continue:()=>(e?.(),d),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:y,start:()=>(y()?g():b().then(g),d)}}},24559:function(t,e,r){"use strict";r.d(e,{l:function(){return i}});var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},49808:function(t,e,r){"use strict";function i(){let t,e;let r=new Promise((r,i)=>{t=r,e=i});function i(t){Object.assign(r,t),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},r.reject=t=>{i({status:"rejected",reason:t}),e(t)},r}r.d(e,{O:function(){return i}})},40928:function(t,e,r){"use strict";r.d(e,{Hp:function(){return n},mr:function(){return s}});var i={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},s=new class{#y=i;#v=!1;setTimeoutProvider(t){this.#y=t}setTimeout(t,e){return this.#y.setTimeout(t,e)}clearTimeout(t){this.#y.clearTimeout(t)}setInterval(t,e){return this.#y.setInterval(t,e)}clearInterval(t){this.#y.clearInterval(t)}};function n(t){setTimeout(t,0)}},50803:function(t,e,r){"use strict";r.d(e,{CN:function(){return C},Ht:function(){return O},I4:function(){return I},KC:function(){return c},Kp:function(){return a},L3:function(){return E},PN:function(){return u},Rm:function(){return f},SE:function(){return o},TD:function(){return h},VS:function(){return m},VX:function(){return w},X7:function(){return d},Ym:function(){return p},ZT:function(){return n},_v:function(){return R},_x:function(){return l},cG:function(){return F},oE:function(){return S},sk:function(){return s},to:function(){return y}});var i=r(40928),s="undefined"==typeof window||"Deno"in globalThis;function n(){}function o(t,e){return"function"==typeof t?t(e):t}function u(t){return"number"==typeof t&&t>=0&&t!==1/0}function a(t,e){return Math.max(t+(e||0)-Date.now(),0)}function c(t,e){return"function"==typeof t?t(e):t}function h(t,e){return"function"==typeof t?t(e):t}function l(t,e){let{type:r="all",exact:i,fetchStatus:s,predicate:n,queryKey:o,stale:u}=t;if(o){if(i){if(e.queryHash!==f(o,e.options))return!1}else if(!y(e.queryKey,o))return!1}if("all"!==r){let t=e.isActive();if("active"===r&&!t||"inactive"===r&&t)return!1}return("boolean"!=typeof u||e.isStale()===u)&&(!s||s===e.state.fetchStatus)&&(!n||!!n(e))}function d(t,e){let{exact:r,status:i,predicate:s,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(r){if(p(e.options.mutationKey)!==p(n))return!1}else if(!y(e.options.mutationKey,n))return!1}return(!i||e.state.status===i)&&(!s||!!s(e))}function f(t,e){return(e?.queryKeyHashFn||p)(t)}function p(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(r=>y(t[r],e[r]))}var v=Object.prototype.hasOwnProperty;function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function b(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!T(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!!(T(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(t)===Object.prototype}function T(t){return"[object Object]"===Object.prototype.toString.call(t)}function R(t){return new Promise(e=>{i.mr.setTimeout(e,t)})}function S(t,e,r){return"function"==typeof r.structuralSharing?r.structuralSharing(t,e):!1!==r.structuralSharing?function t(e,r,i=0){if(e===r)return e;if(i>500)return r;let s=b(e)&&b(r);if(!s&&!(g(e)&&g(r)))return r;let n=(s?e:Object.keys(e)).length,o=s?r:Object.keys(r),u=o.length,a=s?Array(u):{},c=0;for(let h=0;h<u;h++){let u=s?h:o[h],l=e[u],d=r[u];if(l===d){a[u]=l,(s?h<n:v.call(e,u))&&c++;continue}if(null===l||null===d||"object"!=typeof l||"object"!=typeof d){a[u]=d;continue}let f=t(l,d,i+1);a[u]=f,f===l&&c++}return n===u&&c===n?e:a}(t,e):e}function w(t,e,r=0){let i=[...t,e];return r&&i.length>r?i.slice(1):i}function O(t,e,r=0){let i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var C=Symbol();function F(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==C?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function E(t,e){return"function"==typeof t?t(...e):!!t}function I(t,e,r){let i,s=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),s||(s=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),t}},77930:function(t,e,r){"use strict";r.d(e,{NL:function(){return o},aH:function(){return u}});var i=r(7653),s=r(27573),n=i.createContext(void 0),o=t=>{let e=i.useContext(n);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},u=t=>{let{client:e,children:r}=t;return i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(n.Provider,{value:e,children:r})}},31988:function(t,e,r){"use strict";let i;r.d(e,{a:function(){return P}});var s=r(87047),n=r(78617),o=r(2906),u=r(99617),a=r(24559),c=r(49808),h=r(50803),l=r(40928),d=class extends a.l{constructor(t,e){super(),this.options=e,this.#a=t,this.#m=null,this.#b=(0,c.O)(),this.bindMethods(),this.setOptions(e)}#a;#g=void 0;#T=void 0;#R=void 0;#S;#w;#b;#m;#O;#C;#F;#E;#I;#Q;#P=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),f(this.#g,this.options)?this.#D():this.updateResult(),this.#q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#U(),this.#g.removeObserver(this)}setOptions(t){let e=this.options,r=this.#g;if(this.options=this.#a.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,h.TD)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#g.setOptions(this.options),e._defaulted&&!(0,h.VS)(this.options,e)&&this.#a.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let i=this.hasListeners();i&&y(this.#g,r,this.options,e)&&this.#D(),this.updateResult(),i&&(this.#g!==r||(0,h.TD)(this.options.enabled,this.#g)!==(0,h.TD)(e.enabled,this.#g)||(0,h.KC)(this.options.staleTime,this.#g)!==(0,h.KC)(e.staleTime,this.#g))&&this.#x();let s=this.#L();i&&(this.#g!==r||(0,h.TD)(this.options.enabled,this.#g)!==(0,h.TD)(e.enabled,this.#g)||s!==this.#Q)&&this.#A(s)}getOptimisticResult(t){let e=this.#a.getQueryCache().build(this.#a,t),r=this.createResult(e,t);return(0,h.VS)(this.getCurrentResult(),r)||(this.#R=r,this.#w=this.options,this.#S=this.#g.state),r}getCurrentResult(){return this.#R}trackResult(t,e){return new Proxy(t,{get:(t,r)=>(this.trackProp(r),e?.(r),"promise"!==r||(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#b.status||this.#b.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,r))})}trackProp(t){this.#P.add(t)}getCurrentQuery(){return this.#g}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#a.defaultQueryOptions(t),r=this.#a.getQueryCache().build(this.#a,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#D({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#R))}#D(t){this.#j();let e=this.#g.fetch(this.options,t);return t?.throwOnError||(e=e.catch(h.ZT)),e}#x(){this.#k();let t=(0,h.KC)(this.options.staleTime,this.#g);if(n.m.isServer()||this.#R.isStale||!(0,h.PN)(t))return;let e=(0,h.Kp)(this.#R.dataUpdatedAt,t);this.#E=l.mr.setTimeout(()=>{this.#R.isStale||this.updateResult()},e+1)}#L(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#A(t){this.#U(),this.#Q=t,!n.m.isServer()&&!1!==(0,h.TD)(this.options.enabled,this.#g)&&(0,h.PN)(this.#Q)&&0!==this.#Q&&(this.#I=l.mr.setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#D()},this.#Q))}#q(){this.#x(),this.#A(this.#L())}#k(){void 0!==this.#E&&(l.mr.clearTimeout(this.#E),this.#E=void 0)}#U(){void 0!==this.#I&&(l.mr.clearInterval(this.#I),this.#I=void 0)}createResult(t,e){let r;let i=this.#g,s=this.options,n=this.#R,o=this.#S,a=this.#w,l=t!==i?t.state:this.#T,{state:d}=t,p={...d},m=!1;if(e._optimisticResults){let r=this.hasListeners(),n=!r&&f(t,e),o=r&&y(t,i,e,s);(n||o)&&(p={...p,...(0,u.z)(d.data,t.options)}),"isRestoring"===e._optimisticResults&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:T}=p;r=p.data;let R=!1;if(void 0!==e.placeholderData&&void 0===r&&"pending"===T){let t;n?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(t=n.data,R=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#F?.state.data,this.#F):e.placeholderData,void 0!==t&&(T="success",r=(0,h.oE)(n?.data,t,e),m=!0)}if(e.select&&void 0!==r&&!R){if(n&&r===o?.data&&e.select===this.#O)r=this.#C;else try{this.#O=e.select,r=e.select(r),r=(0,h.oE)(n?.data,r,e),this.#C=r,this.#m=null}catch(t){this.#m=t}}this.#m&&(b=this.#m,r=this.#C,g=Date.now(),T="error");let S="fetching"===p.fetchStatus,w="pending"===T,O="error"===T,C=w&&S,F=void 0!==r,E={status:T,fetchStatus:p.fetchStatus,isPending:w,isSuccess:"success"===T,isError:O,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!w,isLoadingError:O&&!F,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:O&&F,isStale:v(t,e),refetch:this.refetch,promise:this.#b,isEnabled:!1!==(0,h.TD)(e.enabled,t)};if(this.options.experimental_prefetchInRender){let e=void 0!==E.data,r="error"===E.status&&!e,s=t=>{r?t.reject(E.error):e&&t.resolve(E.data)},n=()=>{s(this.#b=E.promise=(0,c.O)())},o=this.#b;switch(o.status){case"pending":t.queryHash===i.queryHash&&s(o);break;case"fulfilled":(r||E.data!==o.value)&&n();break;case"rejected":r&&E.error===o.reason||n()}}return E}updateResult(){let t=this.#R,e=this.createResult(this.#g,this.options);this.#S=this.#g.state,this.#w=this.options,void 0!==this.#S.data&&(this.#F=this.#g),(0,h.VS)(e,t)||(this.#R=e,this.#K({listeners:(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#P.size)return!0;let i=new Set(r??this.#P);return this.options.throwOnError&&i.add("error"),Object.keys(this.#R).some(e=>this.#R[e]!==t[e]&&i.has(e))})()}))}#j(){let t=this.#a.getQueryCache().build(this.#a,this.options);if(t===this.#g)return;let e=this.#g;this.#g=t,this.#T=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#q()}#K(t){o.Vr.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#R)}),this.#a.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function f(t,e){return!1!==(0,h.TD)(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===(0,h.TD)(e.retryOnMount,t))||void 0!==t.state.data&&p(t,e,e.refetchOnMount)}function p(t,e,r){if(!1!==(0,h.TD)(e.enabled,t)&&"static"!==(0,h.KC)(e.staleTime,t)){let i="function"==typeof r?r(t):r;return"always"===i||!1!==i&&v(t,e)}return!1}function y(t,e,r,i){return(t!==e||!1===(0,h.TD)(i.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&v(t,r)}function v(t,e){return!1!==(0,h.TD)(e.enabled,t)&&t.isStaleByTime((0,h.KC)(e.staleTime,t))}var m=r(7653),b=r(77930);r(27573);var g=m.createContext((i=!1,{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i})),T=()=>m.useContext(g),R=(t,e,r)=>{let i=(null==r?void 0:r.state.error)&&"function"==typeof t.throwOnError?(0,h.L3)(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&!e.isReset()&&(t.retryOnMount=!1)},S=t=>{m.useEffect(()=>{t.clearReset()},[t])},w=t=>{let{result:e,errorResetBoundary:r,throwOnError:i,query:s,suspense:n}=t;return e.isError&&!r.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,h.L3)(i,[e.error,s]))},O=m.createContext(!1),C=()=>m.useContext(O);O.Provider;var F=t=>{if(t.suspense){let e=t=>"static"===t?t:Math.max(t??1e3,1e3),r=t.staleTime;t.staleTime="function"==typeof r?(...t)=>e(r(...t)):e(r),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3))}},E=(t,e)=>t.isLoading&&t.isFetching&&!e,I=(t,e)=>t?.suspense&&e.isPending,Q=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function P(t,e){return function(t,e,r){var i,s,u,a;let c=C(),l=T(),d=(0,b.NL)(r),f=d.defaultQueryOptions(t);null===(s=d.getDefaultOptions().queries)||void 0===s||null===(i=s._experimental_beforeQuery)||void 0===i||i.call(s,f);let p=d.getQueryCache().get(f.queryHash),y=!1!==t.subscribed;f._optimisticResults=c?"isRestoring":y?"optimistic":void 0,F(f),R(f,l,p),S(l);let v=!d.getQueryCache().get(f.queryHash),[g]=m.useState(()=>new e(d,f)),O=g.getOptimisticResult(f),P=!c&&y;if(m.useSyncExternalStore(m.useCallback(t=>{let e=P?g.subscribe(o.Vr.batchCalls(t)):h.ZT;return g.updateResult(),e},[g,P]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),m.useEffect(()=>{g.setOptions(f)},[f,g]),I(f,O))throw Q(f,g,l);if(w({result:O,errorResetBoundary:l,throwOnError:f.throwOnError,query:p,suspense:f.suspense}))throw O.error;if(null===(a=d.getDefaultOptions().queries)||void 0===a||null===(u=a._experimental_afterQuery)||void 0===u||u.call(a,f,O),f.experimental_prefetchInRender&&!n.m.isServer()&&E(O,c)){let t=v?Q(f,g,l):null==p?void 0:p.promise;null==t||t.catch(h.ZT).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?O:g.trackResult(O)}(t,d,e)}}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[384],{53241:function(t){var e,r,i,s=t.exports={};function n(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function u(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a=[],c=!1,h=-1;function l(){c&&i&&(c=!1,i.length?a=i.concat(a):h=-1,a.length&&d())}function d(){if(!c){var t=u(l);c=!0;for(var e=a.length;e;){for(i=a,a=[];++h<e;)i&&i[h].run();h=-1,e=a.length}i=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function p(){}s.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new f(t,e)),1!==a.length||c||u(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=p,s.addListener=p,s.once=p,s.off=p,s.removeListener=p,s.removeAllListeners=p,s.emit=p,s.prependListener=p,s.prependOnceListener=p,s.listeners=function(t){return[]},s.binding=function(t){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw Error("process.chdir is not supported")},s.umask=function(){return 0}},78617:function(t,e,r){"use strict";let i;r.d(e,{m:function(){return n}});var s=r(50803),n=(i=()=>s.sk,{isServer:()=>i(),setIsServer(t){i=t}})},87047:function(t,e,r){"use strict";r.d(e,{j:function(){return s}});var i=r(24559),s=new class extends i.l{#t;#e;#r;constructor(){super(),this.#r=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#t?this.#t:globalThis.document?.visibilityState!=="hidden"}}},2906:function(t,e,r){"use strict";r.d(e,{Vr:function(){return s}});var i=r(40928).Hp,s=function(){let t=[],e=0,r=t=>{t()},s=t=>{t()},n=i,o=i=>{e?t.push(i):n(()=>{r(i)})},u=()=>{let e=t;t=[],e.length&&n(()=>{s(()=>{e.forEach(t=>{r(t)})})})};return{batch:t=>{let r;e++;try{r=t()}finally{--e||u()}return r},batchCalls:t=>(...e)=>{o(()=>{t(...e)})},schedule:o,setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{s=t},setScheduler:t=>{n=t}}}()},33906:function(t,e,r){"use strict";r.d(e,{N:function(){return s}});var i=r(24559),s=new class extends i.l{#i=!0;#e;#r;constructor(){super(),this.#r=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#i!==t&&(this.#i=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#i}}},99617:function(t,e,r){"use strict";r.d(e,{A:function(){return a},z:function(){return c}});var i=r(50803),s=r(2906),n=r(11135),o=r(5531);function u(t,{pages:e,pageParams:r}){let i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}var a=class extends o.F{#s;#n;#o;#u;#a;#c;#h;#l;constructor(t){super(),this.#l=!1,this.#h=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#a=t.client,this.#u=this.#a.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#n=l(this.options),this.state=t.state??this.#n,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#s}get promise(){return this.#c?.promise}setOptions(t){if(this.options={...this.#h,...t},t?._type&&(this.#s=t._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=l(this.options);void 0!==t.data&&(this.setState(h(t.data,t.dataUpdatedAt)),this.#n=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(t,e){let r=(0,i.oE)(this.state.data,t,this.options);return this.#d({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t){this.#d({type:"setState",state:t})}cancel(t){let e=this.#c?.promise;return this.#c?.cancel(t),e?e.then(i.ZT).catch(i.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#n}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>!1!==(0,i.TD)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.CN||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,i.KC)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,i.Kp)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#c&&(this.#l||this.#f()?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#f(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(t,e){var r;if("idle"!==this.state.fetchStatus&&this.#c?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let s=new AbortController,o=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},a=()=>{let t=(0,i.cG)(this.options,e),r=(()=>{let t={client:this.#a,queryKey:this.queryKey,meta:this.meta};return o(t),t})();return(this.#l=!1,this.options.persister)?this.options.persister(t,r,this):t(r)},c=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:a};return o(t),t})(),h="infinite"===this.#s?(r=this.options.pages,{onFetch:(t,e)=>{let s=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},h=0,l=async()=>{let e=!1,l=r=>{(0,i.I4)(r,()=>t.signal,()=>e=!0)},d=(0,i.cG)(t.options,t.fetchOptions),f=async(r,s,n)=>{if(e)return Promise.reject(t.signal.reason);if(null==s&&r.pages.length)return Promise.resolve(r);let o=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:s,direction:n?"backward":"forward",meta:t.options.meta};return l(e),e})(),u=await d(o),{maxPages:a}=t.options,c=n?i.Ht:i.VX;return{pages:c(r.pages,u,a),pageParams:c(r.pageParams,s,a)}};if(n&&o.length){let t="backward"===n,e={pages:o,pageParams:a},r=(t?function(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}:u)(s,e);c=await f(e,r,t)}else{let t=r??o.length;do{let t=0===h?a[0]??s.initialPageParam:u(s,c);if(h>0&&null==t)break;c=await f(c,t),h++}while(h<t)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},e):t.fetchFn=l}}):this.options.behavior;h?.onFetch(c,this),this.#o=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#d({type:"fetch",meta:c.fetchOptions?.meta}),this.#c=(0,n.Mz)({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:t=>{t instanceof n.p8&&t.revert&&this.setState({...this.#o,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#d({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{let t=await this.#c.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#u.config.onSuccess?.(t,this),this.#u.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof n.p8){if(t.silent)return this.#c.promise;if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#d({type:"error",error:t}),this.#u.config.onError?.(t,this),this.#u.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#d(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...c(e.data,this.options),fetchMeta:t.meta??null};case"success":let r={...e,...h(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#o=t.manual?r:void 0,r;case"error":let i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),s.Vr.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:t})})}};function c(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.Kw)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function h(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,r=void 0!==e,i=r?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}},5531:function(t,e,r){"use strict";r.d(e,{F:function(){return o}});var i=r(40928),s=r(78617),n=r(50803),o=class{#p;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#p=i.mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(s.m.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#p&&(i.mr.clearTimeout(this.#p),this.#p=void 0)}}},11135:function(t,e,r){"use strict";r.d(e,{Kw:function(){return c},Mz:function(){return l},p8:function(){return h}});var i=r(87047),s=r(33906),n=r(49808),o=r(78617),u=r(50803);function a(t){return Math.min(1e3*2**t,3e4)}function c(t){return(t??"online")!=="online"||s.N.isOnline()}var h=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function l(t){let e,r=!1,l=0,d=(0,n.O)(),f=()=>"pending"!==d.status,p=()=>i.j.isFocused()&&("always"===t.networkMode||s.N.isOnline())&&t.canRun(),y=()=>c(t.networkMode)&&t.canRun(),v=t=>{f()||(e?.(),d.resolve(t))},m=t=>{f()||(e?.(),d.reject(t))},b=()=>new Promise(r=>{e=t=>{(f()||p())&&r(t)},t.onPause?.()}).then(()=>{e=void 0,f()||t.onContinue?.()}),g=()=>{let e;if(f())return;let i=0===l?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(v).catch(e=>{if(f())return;let i=t.retry??(o.m.isServer()?0:3),s=t.retryDelay??a,n="function"==typeof s?s(l,e):s,c=!0===i||"number"==typeof i&&l<i||"function"==typeof i&&i(l,e);if(r||!c){m(e);return}l++,t.onFail?.(l,e),(0,u._v)(n).then(()=>p()?void 0:b()).then(()=>{r?m(e):g()})})};return{promise:d,status:()=>d.status,cancel:e=>{if(!f()){let r=new h(e);m(r),t.onCancel?.(r)}},continue:()=>(e?.(),d),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:y,start:()=>(y()?g():b().then(g),d)}}},24559:function(t,e,r){"use strict";r.d(e,{l:function(){return i}});var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},49808:function(t,e,r){"use strict";function i(){let t,e;let r=new Promise((r,i)=>{t=r,e=i});function i(t){Object.assign(r,t),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},r.reject=t=>{i({status:"rejected",reason:t}),e(t)},r}r.d(e,{O:function(){return i}})},40928:function(t,e,r){"use strict";r.d(e,{Hp:function(){return n},mr:function(){return s}});var i={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},s=new class{#y=i;#v=!1;setTimeoutProvider(t){this.#y=t}setTimeout(t,e){return this.#y.setTimeout(t,e)}clearTimeout(t){this.#y.clearTimeout(t)}setInterval(t,e){return this.#y.setInterval(t,e)}clearInterval(t){this.#y.clearInterval(t)}};function n(t){setTimeout(t,0)}},50803:function(t,e,r){"use strict";r.d(e,{CN:function(){return C},Ht:function(){return O},I4:function(){return I},KC:function(){return c},Kp:function(){return a},L3:function(){return E},PN:function(){return u},Rm:function(){return f},SE:function(){return o},TD:function(){return h},VS:function(){return m},VX:function(){return w},X7:function(){return d},Ym:function(){return p},ZT:function(){return n},_v:function(){return R},_x:function(){return l},cG:function(){return F},oE:function(){return S},sk:function(){return s},to:function(){return y}});var i=r(40928),s="undefined"==typeof window||"Deno"in globalThis;function n(){}function o(t,e){return"function"==typeof t?t(e):t}function u(t){return"number"==typeof t&&t>=0&&t!==1/0}function a(t,e){return Math.max(t+(e||0)-Date.now(),0)}function c(t,e){return"function"==typeof t?t(e):t}function h(t,e){return"function"==typeof t?t(e):t}function l(t,e){let{type:r="all",exact:i,fetchStatus:s,predicate:n,queryKey:o,stale:u}=t;if(o){if(i){if(e.queryHash!==f(o,e.options))return!1}else if(!y(e.queryKey,o))return!1}if("all"!==r){let t=e.isActive();if("active"===r&&!t||"inactive"===r&&t)return!1}return("boolean"!=typeof u||e.isStale()===u)&&(!s||s===e.state.fetchStatus)&&(!n||!!n(e))}function d(t,e){let{exact:r,status:i,predicate:s,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(r){if(p(e.options.mutationKey)!==p(n))return!1}else if(!y(e.options.mutationKey,n))return!1}return(!i||e.state.status===i)&&(!s||!!s(e))}function f(t,e){return(e?.queryKeyHashFn||p)(t)}function p(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(r=>y(t[r],e[r]))}var v=Object.prototype.hasOwnProperty;function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function b(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!T(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!!(T(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(t)===Object.prototype}function T(t){return"[object Object]"===Object.prototype.toString.call(t)}function R(t){return new Promise(e=>{i.mr.setTimeout(e,t)})}function S(t,e,r){return"function"==typeof r.structuralSharing?r.structuralSharing(t,e):!1!==r.structuralSharing?function t(e,r,i=0){if(e===r)return e;if(i>500)return r;let s=b(e)&&b(r);if(!s&&!(g(e)&&g(r)))return r;let n=(s?e:Object.keys(e)).length,o=s?r:Object.keys(r),u=o.length,a=s?Array(u):{},c=0;for(let h=0;h<u;h++){let u=s?h:o[h],l=e[u],d=r[u];if(l===d){a[u]=l,(s?h<n:v.call(e,u))&&c++;continue}if(null===l||null===d||"object"!=typeof l||"object"!=typeof d){a[u]=d;continue}let f=t(l,d,i+1);a[u]=f,f===l&&c++}return n===u&&c===n?e:a}(t,e):e}function w(t,e,r=0){let i=[...t,e];return r&&i.length>r?i.slice(1):i}function O(t,e,r=0){let i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var C=Symbol();function F(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==C?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function E(t,e){return"function"==typeof t?t(...e):!!t}function I(t,e,r){let i,s=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),s||(s=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),t}},77930:function(t,e,r){"use strict";r.d(e,{NL:function(){return o},aH:function(){return u}});var i=r(7653),s=r(27573),n=i.createContext(void 0),o=t=>{let e=i.useContext(n);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},u=t=>{let{client:e,children:r}=t;return i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(n.Provider,{value:e,children:r})}},31988:function(t,e,r){"use strict";let i;r.d(e,{a:function(){return P}});var s=r(87047),n=r(78617),o=r(2906),u=r(99617),a=r(24559),c=r(49808),h=r(50803),l=r(40928),d=class extends a.l{constructor(t,e){super(),this.options=e,this.#a=t,this.#m=null,this.#b=(0,c.O)(),this.bindMethods(),this.setOptions(e)}#a;#g=void 0;#T=void 0;#R=void 0;#S;#w;#b;#m;#O;#C;#F;#E;#I;#Q;#P=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),f(this.#g,this.options)?this.#D():this.updateResult(),this.#q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#U(),this.#g.removeObserver(this)}setOptions(t){let e=this.options,r=this.#g;if(this.options=this.#a.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,h.TD)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#g.setOptions(this.options),e._defaulted&&!(0,h.VS)(this.options,e)&&this.#a.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let i=this.hasListeners();i&&y(this.#g,r,this.options,e)&&this.#D(),this.updateResult(),i&&(this.#g!==r||(0,h.TD)(this.options.enabled,this.#g)!==(0,h.TD)(e.enabled,this.#g)||(0,h.KC)(this.options.staleTime,this.#g)!==(0,h.KC)(e.staleTime,this.#g))&&this.#x();let s=this.#L();i&&(this.#g!==r||(0,h.TD)(this.options.enabled,this.#g)!==(0,h.TD)(e.enabled,this.#g)||s!==this.#Q)&&this.#A(s)}getOptimisticResult(t){let e=this.#a.getQueryCache().build(this.#a,t),r=this.createResult(e,t);return(0,h.VS)(this.getCurrentResult(),r)||(this.#R=r,this.#w=this.options,this.#S=this.#g.state),r}getCurrentResult(){return this.#R}trackResult(t,e){return new Proxy(t,{get:(t,r)=>(this.trackProp(r),e?.(r),"promise"!==r||(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#b.status||this.#b.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,r))})}trackProp(t){this.#P.add(t)}getCurrentQuery(){return this.#g}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#a.defaultQueryOptions(t),r=this.#a.getQueryCache().build(this.#a,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#D({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#R))}#D(t){this.#j();let e=this.#g.fetch(this.options,t);return t?.throwOnError||(e=e.catch(h.ZT)),e}#x(){this.#k();let t=(0,h.KC)(this.options.staleTime,this.#g);if(n.m.isServer()||this.#R.isStale||!(0,h.PN)(t))return;let e=(0,h.Kp)(this.#R.dataUpdatedAt,t);this.#E=l.mr.setTimeout(()=>{this.#R.isStale||this.updateResult()},e+1)}#L(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#A(t){this.#U(),this.#Q=t,!n.m.isServer()&&!1!==(0,h.TD)(this.options.enabled,this.#g)&&(0,h.PN)(this.#Q)&&0!==this.#Q&&(this.#I=l.mr.setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#D()},this.#Q))}#q(){this.#x(),this.#A(this.#L())}#k(){void 0!==this.#E&&(l.mr.clearTimeout(this.#E),this.#E=void 0)}#U(){void 0!==this.#I&&(l.mr.clearInterval(this.#I),this.#I=void 0)}createResult(t,e){let r;let i=this.#g,s=this.options,n=this.#R,o=this.#S,a=this.#w,l=t!==i?t.state:this.#T,{state:d}=t,p={...d},m=!1;if(e._optimisticResults){let r=this.hasListeners(),n=!r&&f(t,e),o=r&&y(t,i,e,s);(n||o)&&(p={...p,...(0,u.z)(d.data,t.options)}),"isRestoring"===e._optimisticResults&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:T}=p;r=p.data;let R=!1;if(void 0!==e.placeholderData&&void 0===r&&"pending"===T){let t;n?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(t=n.data,R=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#F?.state.data,this.#F):e.placeholderData,void 0!==t&&(T="success",r=(0,h.oE)(n?.data,t,e),m=!0)}if(e.select&&void 0!==r&&!R){if(n&&r===o?.data&&e.select===this.#O)r=this.#C;else try{this.#O=e.select,r=e.select(r),r=(0,h.oE)(n?.data,r,e),this.#C=r,this.#m=null}catch(t){this.#m=t}}this.#m&&(b=this.#m,r=this.#C,g=Date.now(),T="error");let S="fetching"===p.fetchStatus,w="pending"===T,O="error"===T,C=w&&S,F=void 0!==r,E={status:T,fetchStatus:p.fetchStatus,isPending:w,isSuccess:"success"===T,isError:O,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!w,isLoadingError:O&&!F,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:O&&F,isStale:v(t,e),refetch:this.refetch,promise:this.#b,isEnabled:!1!==(0,h.TD)(e.enabled,t)};if(this.options.experimental_prefetchInRender){let e=void 0!==E.data,r="error"===E.status&&!e,s=t=>{r?t.reject(E.error):e&&t.resolve(E.data)},n=()=>{s(this.#b=E.promise=(0,c.O)())},o=this.#b;switch(o.status){case"pending":t.queryHash===i.queryHash&&s(o);break;case"fulfilled":(r||E.data!==o.value)&&n();break;case"rejected":r&&E.error===o.reason||n()}}return E}updateResult(){let t=this.#R,e=this.createResult(this.#g,this.options);this.#S=this.#g.state,this.#w=this.options,void 0!==this.#S.data&&(this.#F=this.#g),(0,h.VS)(e,t)||(this.#R=e,this.#K({listeners:(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#P.size)return!0;let i=new Set(r??this.#P);return this.options.throwOnError&&i.add("error"),Object.keys(this.#R).some(e=>this.#R[e]!==t[e]&&i.has(e))})()}))}#j(){let t=this.#a.getQueryCache().build(this.#a,this.options);if(t===this.#g)return;let e=this.#g;this.#g=t,this.#T=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#q()}#K(t){o.Vr.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#R)}),this.#a.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function f(t,e){return!1!==(0,h.TD)(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===(0,h.TD)(e.retryOnMount,t))||void 0!==t.state.data&&p(t,e,e.refetchOnMount)}function p(t,e,r){if(!1!==(0,h.TD)(e.enabled,t)&&"static"!==(0,h.KC)(e.staleTime,t)){let i="function"==typeof r?r(t):r;return"always"===i||!1!==i&&v(t,e)}return!1}function y(t,e,r,i){return(t!==e||!1===(0,h.TD)(i.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&v(t,r)}function v(t,e){return!1!==(0,h.TD)(e.enabled,t)&&t.isStaleByTime((0,h.KC)(e.staleTime,t))}var m=r(7653),b=r(77930);r(27573);var g=m.createContext((i=!1,{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i})),T=()=>m.useContext(g),R=(t,e,r)=>{let i=(null==r?void 0:r.state.error)&&"function"==typeof t.throwOnError?(0,h.L3)(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&!e.isReset()&&(t.retryOnMount=!1)},S=t=>{m.useEffect(()=>{t.clearReset()},[t])},w=t=>{let{result:e,errorResetBoundary:r,throwOnError:i,query:s,suspense:n}=t;return e.isError&&!r.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,h.L3)(i,[e.error,s]))},O=m.createContext(!1),C=()=>m.useContext(O);O.Provider;var F=t=>{if(t.suspense){let e=t=>"static"===t?t:Math.max(t??1e3,1e3),r=t.staleTime;t.staleTime="function"==typeof r?(...t)=>e(r(...t)):e(r),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3))}},E=(t,e)=>t.isLoading&&t.isFetching&&!e,I=(t,e)=>t?.suspense&&e.isPending,Q=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function P(t,e){return function(t,e,r){var i,s,u,a;let c=C(),l=T(),d=(0,b.NL)(r),f=d.defaultQueryOptions(t);null===(s=d.getDefaultOptions().queries)||void 0===s||null===(i=s._experimental_beforeQuery)||void 0===i||i.call(s,f);let p=d.getQueryCache().get(f.queryHash),y=!1!==t.subscribed;f._optimisticResults=c?"isRestoring":y?"optimistic":void 0,F(f),R(f,l,p),S(l);let v=!d.getQueryCache().get(f.queryHash),[g]=m.useState(()=>new e(d,f)),O=g.getOptimisticResult(f),P=!c&&y;if(m.useSyncExternalStore(m.useCallback(t=>{let e=P?g.subscribe(o.Vr.batchCalls(t)):h.ZT;return g.updateResult(),e},[g,P]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),m.useEffect(()=>{g.setOptions(f)},[f,g]),I(f,O))throw Q(f,g,l);if(w({result:O,errorResetBoundary:l,throwOnError:f.throwOnError,query:p,suspense:f.suspense}))throw O.error;if(null===(a=d.getDefaultOptions().queries)||void 0===a||null===(u=a._experimental_afterQuery)||void 0===u||u.call(a,f,O),f.experimental_prefetchInRender&&!n.m.isServer()&&E(O,c)){let t=v?Q(f,g,l):null==p?void 0:p.promise;null==t||t.catch(h.ZT).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?O:g.trackResult(O)}(t,d,e)}}}]);
|
package/dist/dashboard/_next/static/chunks/{429-eac85fdc49353ed8.js → 429-3a8e078af4ea04bd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[429],{41493:function(e,t,n){n.d(t,{h:function(){return i}});var r,o=n(50794);let u=null!==(r=n(49767).env.NEXT_PUBLIC_DEVFLOW_API_URL)&&void 0!==r?r:"http://localhost:13337";async function c(e,t){let n=function(){try{return localStorage.getItem("devflow-active-project-root")}catch(e){return null}}(),r={"Content-Type":"application/json",...(0,o.O)()};n&&(r["x-devflow-project"]=n);let c=await fetch("".concat(u,"/api").concat(e),{...t,headers:{...r,...null==t?void 0:t.headers}});if(!c.ok){let e=await c.text();if(401===c.status)throw Error("API 401: configure NEXT_PUBLIC_DEVFLOW_API_KEY or localStorage['devflow-api-key']");throw Error("API ".concat(c.status,": ").concat(e))}let i=await c.json();return i&&"object"==typeof i&&"ok"in i&&"data"in i?i.data:i}let i={listProjects:()=>c("/projects"),getProject:e=>c("/projects/".concat(e)),createProject:e=>c("/projects",{method:"POST",body:JSON.stringify(e)}),deleteProject:e=>c("/projects/".concat(e),{method:"DELETE"}),connectProject:e=>c("/projects/connect",{method:"POST",body:JSON.stringify({rootPath:e})}),disconnectProject:()=>c("/projects/active",{method:"DELETE"}),getActiveProject:()=>c("/projects/active"),getOnboardingPackByRoot:e=>c("/projects/onboarding-pack?rootPath=".concat(encodeURIComponent(e))),refreshOnboardingPack:e=>c("/projects/onboarding-pack/refresh",{method:"POST",body:JSON.stringify({rootPath:e})}),getContextStatus:()=>c("/context/status"),buildContext:e=>c("/context/build",{method:"POST",body:JSON.stringify(e)}),buildTaskContext:e=>c("/context/build-task",{method:"POST",body:JSON.stringify(e)}),submitFeedback:e=>c("/context/feedback",{method:"POST",body:JSON.stringify(e)}),getFeedbackSummary:()=>c("/context/feedback-summary"),getGraph:()=>c("/graph"),getLayeredGraph:()=>c("/graph?view=layered"),getNode:e=>c("/graph/".concat(e)),expandNode:(e,t,n)=>c("/graph/".concat(e,"/expand?depth=").concat(null!=t?t:2,"&direction=").concat(null!=n?n:"both")),listWorkflows:()=>c("/workflows"),runWorkflow:(e,t)=>c("/workflows/".concat(e,"/run"),{method:"POST",body:JSON.stringify({input:t})}),listRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return c("/workflows/runs?limit=".concat(e,"&offset=").concat(t))},getRun:e=>c("/workflows/runs/".concat(e)),approveRun:e=>c("/workflows/runs/".concat(e,"/approve"),{method:"POST"}),rejectRun:(e,t)=>c("/workflows/runs/".concat(e,"/reject"),{method:"POST",body:JSON.stringify({reason:t})}),getMemory:()=>c("/memory"),addMemory:e=>c("/memory",{method:"POST",body:JSON.stringify(e)}),updateMemoryEntry:(e,t)=>c("/memory/".concat(e),{method:"PUT",body:JSON.stringify(t)}),deleteMemoryEntry:e=>c("/memory/".concat(e),{method:"DELETE"}),getCandidates:()=>c("/memory/candidates"),approveCandidate:e=>c("/memory/candidates/".concat(e,"/approve"),{method:"POST"}),rejectCandidate:e=>c("/memory/candidates/".concat(e,"/reject"),{method:"POST"}),searchMemory:(e,t,n)=>c("/memory/search",{method:"POST",body:JSON.stringify({query:e,limit:t,categories:n})}),updateMemory:(e,t,n)=>c("/memory/".concat(e,"/").concat(t),{method:"PUT",body:JSON.stringify({value:n})}),searchKnowledge:(e,t)=>c("/knowledge/search?q=".concat(encodeURIComponent(e)).concat(t?"&scope=".concat(t):"")),syncKnowledge:e=>c("/knowledge/sync",{method:"POST",body:JSON.stringify({pluginName:e})}),getKnowledgeSources:()=>c("/knowledge/sources"),listTelemetryRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return c("/telemetry/runs?limit=".concat(e,"&offset=").concat(t).concat(n?"&source=".concat(n):""))},getTelemetryRun:e=>c("/telemetry/runs/".concat(e)),getTimeline:(e,t)=>c("/telemetry/timeline".concat(e?"?from=".concat(e).concat(t?"&to=".concat(t):""):"")),listSessions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=new URLSearchParams({limit:String(e),offset:String(t)});return n&&r.set("projectRoot",n),c("/telemetry/sessions?".concat(r))},getSession:e=>c("/telemetry/sessions/".concat(e)),getSessionEvents:e=>c("/telemetry/sessions/".concat(e,"/events")),getRunEvents:e=>c("/telemetry/runs/".concat(e,"/events")),getRunStats:e=>c("/telemetry/runs/".concat(e,"/stats")),completeRun:e=>c("/telemetry/runs/".concat(e,"/complete"),{method:"POST"}),getTelemetryStats:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/stats?days=".concat(e))},getRoiSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/roi-summary?days=".concat(e))},listBenchmarkReports:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return c("/benchmark/reports?limit=".concat(e))},getLatestBenchmarkReport:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return c("/benchmark/reports/latest?suite=".concat(encodeURIComponent(e)))},getBenchmarkReport:e=>c("/benchmark/reports/".concat(encodeURIComponent(e))),cleanupTelemetry:e=>c("/telemetry/cleanup",{method:"POST",body:JSON.stringify({olderThanDays:e})}),getToolMetricsSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/tool-metrics/summary?days=".concat(e))},getAccuracyStats:(e,t)=>{let n=new URLSearchParams;e&&n.set("engine",e),t&&n.set("since",String(t));let r=n.toString();return c("/telemetry/accuracy/stats".concat(r?"?".concat(r):""))},getAccuracyQueries:e=>{let t=new URLSearchParams;(null==e?void 0:e.engine)&&t.set("engine",e.engine),(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.offset)&&t.set("offset",String(e.offset));let n=t.toString();return c("/telemetry/accuracy/queries".concat(n?"?".concat(n):""))},postAccuracyFeedback:e=>c("/telemetry/accuracy/feedback",{method:"POST",body:JSON.stringify(e)}),getAutoCheck:()=>c("/telemetry/auto-check"),getExecutions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1?arguments[1]:void 0,n=new URLSearchParams({limit:String(e)});return t&&n.set("skillName",t),c("/telemetry/executions?".concat(n))},getExecutionEvents:e=>c("/telemetry/executions/".concat(e,"/events")),getMcpCompliance:()=>c("/telemetry/mcp-compliance"),getGovernanceRules:()=>c("/governance/rules"),createGovernanceRule:e=>c("/governance/rules",{method:"POST",body:JSON.stringify(e)}),updateGovernanceRule:e=>c("/governance/rules/".concat(encodeURIComponent(e.id)),{method:"PUT",body:JSON.stringify(e)}),deleteGovernanceRule:e=>c("/governance/rules/".concat(encodeURIComponent(e)),{method:"DELETE"}),getGovernanceAudit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return c("/governance/audit-chain?limit=".concat(e,"&offset=").concat(t))},listPlugins:(e,t)=>c("/registry/plugins".concat(e?"?search=".concat(encodeURIComponent(e)).concat(t?"&tag=".concat(t):""):t?"?tag=".concat(t):"")),getPlugin:e=>c("/registry/plugins/".concat(e)),publishPlugin:e=>c("/registry/plugins",{method:"POST",body:JSON.stringify(e)}),getPluginEffectiveness:e=>c("/registry/plugins/effectiveness".concat(e?"?rootPath=".concat(encodeURIComponent(e)):""))}},50794:function(e,t,n){var r,o;n.d(t,{O:function(){return c}});let u=null!==(o=null===(r=n(49767).env.NEXT_PUBLIC_DEVFLOW_API_KEY)||void 0===r?void 0:r.trim())&&void 0!==o?o:"";function c(){let e=function(){if(u)return u;try{var e;return(null===(e=localStorage.getItem("devflow-api-key"))||void 0===e?void 0:e.trim())||null}catch(e){return null}}();return e?{"x-api-key":e}:{}}},57429:function(e,t,n){n.d(t,{Af:function(){return _},C:function(){return q},D:function(){return h},FU:function(){return y},Fx:function(){return X},G2:function(){return s},Hx:function(){return J},JM:function(){return A},KA:function(){return b},OV:function(){return H},Re:function(){return B},S0:function(){return G},Tr:function(){return l},Tu:function(){return I},VU:function(){return E},Vc:function(){return P},Vw:function(){return M},X0:function(){return d},YG:function(){return Y},Z0:function(){return i},ZL:function(){return V},_m:function(){return O},aw:function(){return L},bz:function(){return U},dL:function(){return F},dP:function(){return R},e3:function(){return W},fC:function(){return a},ff:function(){return C},g6:function(){return Q},hI:function(){return f},iP:function(){return z},kP:function(){return K},mE:function(){return x},mU:function(){return D},mp:function(){return k},n4:function(){return m},nO:function(){return g},nq:function(){return p},on:function(){return S},ow:function(){return T},qt:function(){return N},rC:function(){return w},rO:function(){return j},rw:function(){return Z},xT:function(){return $},xX:function(){return v}});var r=n(31988),o=n(77930),u=n(15969),c=n(41493);function i(){return(0,r.a)({queryKey:["projects"],queryFn:()=>c.h.listProjects()})}function a(){return(0,r.a)({queryKey:["active-project"],queryFn:()=>c.h.getActiveProject()})}function s(e){return(0,r.a)({queryKey:["onboarding-pack",e],queryFn:()=>c.h.getOnboardingPackByRoot(e),enabled:!!e})}function l(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.refreshOnboardingPack(e),onSuccess:(t,n)=>e.setQueryData(["onboarding-pack",n],t)})}function y(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.connectProject(e),onSuccess:()=>e.invalidateQueries({queryKey:["active-project"]})})}function d(){let e=(0,o.NL)();return(0,u.D)({mutationFn:()=>c.h.disconnectProject(),onSuccess:()=>e.invalidateQueries({queryKey:["active-project"]})})}function f(){return(0,r.a)({queryKey:["context-status"],queryFn:()=>c.h.getContextStatus()})}function m(){return(0,r.a)({queryKey:["graph"],queryFn:()=>c.h.getGraph()})}function g(){return(0,r.a)({queryKey:["layered-graph"],queryFn:()=>c.h.getLayeredGraph()})}function h(){return(0,r.a)({queryKey:["workflows"],queryFn:()=>c.h.listWorkflows()})}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,r.a)({queryKey:["workflow-runs",e,t],queryFn:()=>c.h.listRuns(e,t)})}function p(){return(0,r.a)({queryKey:["memory"],queryFn:()=>c.h.getMemory()})}function S(e,t){return(0,r.a)({queryKey:["memory-search",e,t],queryFn:()=>c.h.searchMemory(e,null==t?void 0:t.limit,null==t?void 0:t.categories),enabled:e.length>0})}function q(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.approveCandidate(e),onSuccess:()=>{e.invalidateQueries({queryKey:["memory"]}),e.invalidateQueries({queryKey:["memory-candidates"]})}})}function k(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.rejectCandidate(e),onSuccess:()=>{e.invalidateQueries({queryKey:["memory"]}),e.invalidateQueries({queryKey:["memory-candidates"]})}})}function b(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.addMemory(e),onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,r.a)({queryKey:["telemetry-runs",e,t],queryFn:()=>c.h.listTelemetryRuns(e,t)})}function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return(0,r.a)({queryKey:["sessions",e,t,n],queryFn:()=>c.h.listSessions(e,t,n)})}function K(e){return(0,r.a)({queryKey:["session",e],queryFn:()=>c.h.getSession(e),enabled:!!e})}function w(e){return(0,r.a)({queryKey:["session-events",e],queryFn:()=>c.h.getSessionEvents(e),enabled:!!e})}function O(e,t){return(0,r.a)({queryKey:["plugins",e,t],queryFn:()=>c.h.listPlugins(e,t)})}function T(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.buildContext(e),onSuccess:t=>e.setQueryData(["context-result"],t)})}function N(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.buildTaskContext(e),onSuccess:t=>e.setQueryData(["task-context-result"],t)})}function R(){return(0,r.a)({queryKey:["context-result"],queryFn:()=>Promise.reject(Error("No queryFn — this query is never enabled")),enabled:!1})}function E(){return(0,r.a)({queryKey:["task-context-result"],queryFn:()=>Promise.reject(Error("No queryFn — this query is never enabled")),enabled:!1})}function j(){return(0,u.D)({mutationFn:e=>c.h.submitFeedback(e)})}function L(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{type:t,input:n}=e;return c.h.runWorkflow(t,n)},onSuccess:()=>e.invalidateQueries({queryKey:["workflow-runs"]})})}function C(){return(0,r.a)({queryKey:["knowledge-sources"],queryFn:()=>c.h.getKnowledgeSources()})}function x(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.syncKnowledge(e),onSuccess:()=>e.invalidateQueries({queryKey:["knowledge-sources"]})})}function D(e){return(0,r.a)({queryKey:["knowledge-search",e],queryFn:()=>c.h.searchKnowledge(e),enabled:e.length>0})}function U(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["telemetry-stats",e],queryFn:()=>c.h.getTelemetryStats(e)})}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["roi-summary",e],queryFn:()=>c.h.getRoiSummary(e)})}function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return(0,r.a)({queryKey:["benchmark-report","latest",e],queryFn:()=>c.h.getLatestBenchmarkReport(e)})}function A(e){return(0,r.a)({queryKey:["run-events",e],queryFn:()=>c.h.getRunEvents(e),enabled:!!e,refetchInterval:2e3})}function J(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.cleanupTelemetry(e),onSuccess:()=>e.invalidateQueries({queryKey:["telemetry-stats"]})})}function _(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{id:t,updates:n}=e;return c.h.updateMemoryEntry(t,n)},onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function G(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.deleteMemoryEntry(e),onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function M(e){return(0,r.a)({queryKey:["plugin-effectiveness",e],queryFn:()=>c.h.getPluginEffectiveness(e)})}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["tool-metrics-summary",e],queryFn:()=>c.h.getToolMetricsSummary(e)})}function V(e){return(0,r.a)({queryKey:["accuracy-stats",e],queryFn:()=>c.h.getAccuracyStats(e)})}function W(e){return(0,r.a)({queryKey:["accuracy-queries",e],queryFn:()=>c.h.getAccuracyQueries(e)})}function X(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.postAccuracyFeedback(e),onSuccess:()=>{e.invalidateQueries({queryKey:["accuracy-stats"]}),e.invalidateQueries({queryKey:["accuracy-queries"]})}})}function Y(){return(0,r.a)({queryKey:["auto-check"],queryFn:()=>c.h.getAutoCheck()})}function Z(){return(0,r.a)({queryKey:["governance-rules"],queryFn:()=>c.h.getGovernanceRules()})}function z(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{rule:t,create:n}=e;return n?c.h.createGovernanceRule(t):c.h.updateGovernanceRule(t)},onSuccess:()=>e.invalidateQueries({queryKey:["governance-rules"]})})}function H(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.deleteGovernanceRule(e),onSuccess:()=>e.invalidateQueries({queryKey:["governance-rules"]})})}function $(){return(0,r.a)({queryKey:["governance-audit"],queryFn:()=>c.h.getGovernanceAudit(),refetchInterval:1e4})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[429],{41493:function(e,t,n){n.d(t,{h:function(){return i}});var r,o=n(50794);let u=null!==(r=n(53241).env.NEXT_PUBLIC_DEVFLOW_API_URL)&&void 0!==r?r:"http://localhost:13337";async function c(e,t){let n=function(){try{return localStorage.getItem("devflow-active-project-root")}catch(e){return null}}(),r={"Content-Type":"application/json",...(0,o.O)()};n&&(r["x-devflow-project"]=n);let c=await fetch("".concat(u,"/api").concat(e),{...t,headers:{...r,...null==t?void 0:t.headers}});if(!c.ok){let e=await c.text();if(401===c.status)throw Error("API 401: configure NEXT_PUBLIC_DEVFLOW_API_KEY or localStorage['devflow-api-key']");throw Error("API ".concat(c.status,": ").concat(e))}let i=await c.json();return i&&"object"==typeof i&&"ok"in i&&"data"in i?i.data:i}let i={listProjects:()=>c("/projects"),getProject:e=>c("/projects/".concat(e)),createProject:e=>c("/projects",{method:"POST",body:JSON.stringify(e)}),deleteProject:e=>c("/projects/".concat(e),{method:"DELETE"}),connectProject:e=>c("/projects/connect",{method:"POST",body:JSON.stringify({rootPath:e})}),disconnectProject:()=>c("/projects/active",{method:"DELETE"}),getActiveProject:()=>c("/projects/active"),getOnboardingPackByRoot:e=>c("/projects/onboarding-pack?rootPath=".concat(encodeURIComponent(e))),refreshOnboardingPack:e=>c("/projects/onboarding-pack/refresh",{method:"POST",body:JSON.stringify({rootPath:e})}),getContextStatus:()=>c("/context/status"),buildContext:e=>c("/context/build",{method:"POST",body:JSON.stringify(e)}),buildTaskContext:e=>c("/context/build-task",{method:"POST",body:JSON.stringify(e)}),submitFeedback:e=>c("/context/feedback",{method:"POST",body:JSON.stringify(e)}),getFeedbackSummary:()=>c("/context/feedback-summary"),getGraph:()=>c("/graph"),getLayeredGraph:()=>c("/graph?view=layered"),getNode:e=>c("/graph/".concat(e)),expandNode:(e,t,n)=>c("/graph/".concat(e,"/expand?depth=").concat(null!=t?t:2,"&direction=").concat(null!=n?n:"both")),listWorkflows:()=>c("/workflows"),runWorkflow:(e,t)=>c("/workflows/".concat(e,"/run"),{method:"POST",body:JSON.stringify({input:t})}),listRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return c("/workflows/runs?limit=".concat(e,"&offset=").concat(t))},getRun:e=>c("/workflows/runs/".concat(e)),approveRun:e=>c("/workflows/runs/".concat(e,"/approve"),{method:"POST"}),rejectRun:(e,t)=>c("/workflows/runs/".concat(e,"/reject"),{method:"POST",body:JSON.stringify({reason:t})}),getMemory:()=>c("/memory"),addMemory:e=>c("/memory",{method:"POST",body:JSON.stringify(e)}),updateMemoryEntry:(e,t)=>c("/memory/".concat(e),{method:"PUT",body:JSON.stringify(t)}),deleteMemoryEntry:e=>c("/memory/".concat(e),{method:"DELETE"}),getCandidates:()=>c("/memory/candidates"),approveCandidate:e=>c("/memory/candidates/".concat(e,"/approve"),{method:"POST"}),rejectCandidate:e=>c("/memory/candidates/".concat(e,"/reject"),{method:"POST"}),searchMemory:(e,t,n)=>c("/memory/search",{method:"POST",body:JSON.stringify({query:e,limit:t,categories:n})}),updateMemory:(e,t,n)=>c("/memory/".concat(e,"/").concat(t),{method:"PUT",body:JSON.stringify({value:n})}),searchKnowledge:(e,t)=>c("/knowledge/search?q=".concat(encodeURIComponent(e)).concat(t?"&scope=".concat(t):"")),syncKnowledge:e=>c("/knowledge/sync",{method:"POST",body:JSON.stringify({pluginName:e})}),getKnowledgeSources:()=>c("/knowledge/sources"),listTelemetryRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return c("/telemetry/runs?limit=".concat(e,"&offset=").concat(t).concat(n?"&source=".concat(n):""))},getTelemetryRun:e=>c("/telemetry/runs/".concat(e)),getTimeline:(e,t)=>c("/telemetry/timeline".concat(e?"?from=".concat(e).concat(t?"&to=".concat(t):""):"")),listSessions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=new URLSearchParams({limit:String(e),offset:String(t)});return n&&r.set("projectRoot",n),c("/telemetry/sessions?".concat(r))},getSession:e=>c("/telemetry/sessions/".concat(e)),getSessionEvents:e=>c("/telemetry/sessions/".concat(e,"/events")),getRunEvents:e=>c("/telemetry/runs/".concat(e,"/events")),getRunStats:e=>c("/telemetry/runs/".concat(e,"/stats")),completeRun:e=>c("/telemetry/runs/".concat(e,"/complete"),{method:"POST"}),getTelemetryStats:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/stats?days=".concat(e))},getRoiSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/roi-summary?days=".concat(e))},listBenchmarkReports:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return c("/benchmark/reports?limit=".concat(e))},getLatestBenchmarkReport:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return c("/benchmark/reports/latest?suite=".concat(encodeURIComponent(e)))},getBenchmarkReport:e=>c("/benchmark/reports/".concat(encodeURIComponent(e))),cleanupTelemetry:e=>c("/telemetry/cleanup",{method:"POST",body:JSON.stringify({olderThanDays:e})}),getToolMetricsSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return c("/telemetry/tool-metrics/summary?days=".concat(e))},getAccuracyStats:(e,t)=>{let n=new URLSearchParams;e&&n.set("engine",e),t&&n.set("since",String(t));let r=n.toString();return c("/telemetry/accuracy/stats".concat(r?"?".concat(r):""))},getAccuracyQueries:e=>{let t=new URLSearchParams;(null==e?void 0:e.engine)&&t.set("engine",e.engine),(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.offset)&&t.set("offset",String(e.offset));let n=t.toString();return c("/telemetry/accuracy/queries".concat(n?"?".concat(n):""))},postAccuracyFeedback:e=>c("/telemetry/accuracy/feedback",{method:"POST",body:JSON.stringify(e)}),getAutoCheck:()=>c("/telemetry/auto-check"),getExecutions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1?arguments[1]:void 0,n=new URLSearchParams({limit:String(e)});return t&&n.set("skillName",t),c("/telemetry/executions?".concat(n))},getExecutionEvents:e=>c("/telemetry/executions/".concat(e,"/events")),getMcpCompliance:()=>c("/telemetry/mcp-compliance"),getGovernanceRules:()=>c("/governance/rules"),createGovernanceRule:e=>c("/governance/rules",{method:"POST",body:JSON.stringify(e)}),updateGovernanceRule:e=>c("/governance/rules/".concat(encodeURIComponent(e.id)),{method:"PUT",body:JSON.stringify(e)}),deleteGovernanceRule:e=>c("/governance/rules/".concat(encodeURIComponent(e)),{method:"DELETE"}),getGovernanceAudit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return c("/governance/audit-chain?limit=".concat(e,"&offset=").concat(t))},listPlugins:(e,t)=>c("/registry/plugins".concat(e?"?search=".concat(encodeURIComponent(e)).concat(t?"&tag=".concat(t):""):t?"?tag=".concat(t):"")),getPlugin:e=>c("/registry/plugins/".concat(e)),publishPlugin:e=>c("/registry/plugins",{method:"POST",body:JSON.stringify(e)}),getPluginEffectiveness:e=>c("/registry/plugins/effectiveness".concat(e?"?rootPath=".concat(encodeURIComponent(e)):""))}},50794:function(e,t,n){var r,o;n.d(t,{O:function(){return c}});let u=null!==(o=null===(r=n(53241).env.NEXT_PUBLIC_DEVFLOW_API_KEY)||void 0===r?void 0:r.trim())&&void 0!==o?o:"";function c(){let e=function(){if(u)return u;try{var e;return(null===(e=localStorage.getItem("devflow-api-key"))||void 0===e?void 0:e.trim())||null}catch(e){return null}}();return e?{"x-api-key":e}:{}}},57429:function(e,t,n){n.d(t,{Af:function(){return _},C:function(){return q},D:function(){return h},FU:function(){return y},Fx:function(){return X},G2:function(){return s},Hx:function(){return J},JM:function(){return A},KA:function(){return b},OV:function(){return H},Re:function(){return B},S0:function(){return G},Tr:function(){return l},Tu:function(){return I},VU:function(){return E},Vc:function(){return P},Vw:function(){return M},X0:function(){return d},YG:function(){return Y},Z0:function(){return i},ZL:function(){return V},_m:function(){return O},aw:function(){return L},bz:function(){return U},dL:function(){return F},dP:function(){return R},e3:function(){return W},fC:function(){return a},ff:function(){return C},g6:function(){return Q},hI:function(){return f},iP:function(){return z},kP:function(){return K},mE:function(){return x},mU:function(){return D},mp:function(){return k},n4:function(){return m},nO:function(){return g},nq:function(){return p},on:function(){return S},ow:function(){return T},qt:function(){return N},rC:function(){return w},rO:function(){return j},rw:function(){return Z},xT:function(){return $},xX:function(){return v}});var r=n(31988),o=n(77930),u=n(15969),c=n(41493);function i(){return(0,r.a)({queryKey:["projects"],queryFn:()=>c.h.listProjects()})}function a(){return(0,r.a)({queryKey:["active-project"],queryFn:()=>c.h.getActiveProject()})}function s(e){return(0,r.a)({queryKey:["onboarding-pack",e],queryFn:()=>c.h.getOnboardingPackByRoot(e),enabled:!!e})}function l(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.refreshOnboardingPack(e),onSuccess:(t,n)=>e.setQueryData(["onboarding-pack",n],t)})}function y(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.connectProject(e),onSuccess:()=>e.invalidateQueries({queryKey:["active-project"]})})}function d(){let e=(0,o.NL)();return(0,u.D)({mutationFn:()=>c.h.disconnectProject(),onSuccess:()=>e.invalidateQueries({queryKey:["active-project"]})})}function f(){return(0,r.a)({queryKey:["context-status"],queryFn:()=>c.h.getContextStatus()})}function m(){return(0,r.a)({queryKey:["graph"],queryFn:()=>c.h.getGraph()})}function g(){return(0,r.a)({queryKey:["layered-graph"],queryFn:()=>c.h.getLayeredGraph()})}function h(){return(0,r.a)({queryKey:["workflows"],queryFn:()=>c.h.listWorkflows()})}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,r.a)({queryKey:["workflow-runs",e,t],queryFn:()=>c.h.listRuns(e,t)})}function p(){return(0,r.a)({queryKey:["memory"],queryFn:()=>c.h.getMemory()})}function S(e,t){return(0,r.a)({queryKey:["memory-search",e,t],queryFn:()=>c.h.searchMemory(e,null==t?void 0:t.limit,null==t?void 0:t.categories),enabled:e.length>0})}function q(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.approveCandidate(e),onSuccess:()=>{e.invalidateQueries({queryKey:["memory"]}),e.invalidateQueries({queryKey:["memory-candidates"]})}})}function k(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.rejectCandidate(e),onSuccess:()=>{e.invalidateQueries({queryKey:["memory"]}),e.invalidateQueries({queryKey:["memory-candidates"]})}})}function b(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.addMemory(e),onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,r.a)({queryKey:["telemetry-runs",e,t],queryFn:()=>c.h.listTelemetryRuns(e,t)})}function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return(0,r.a)({queryKey:["sessions",e,t,n],queryFn:()=>c.h.listSessions(e,t,n)})}function K(e){return(0,r.a)({queryKey:["session",e],queryFn:()=>c.h.getSession(e),enabled:!!e})}function w(e){return(0,r.a)({queryKey:["session-events",e],queryFn:()=>c.h.getSessionEvents(e),enabled:!!e})}function O(e,t){return(0,r.a)({queryKey:["plugins",e,t],queryFn:()=>c.h.listPlugins(e,t)})}function T(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.buildContext(e),onSuccess:t=>e.setQueryData(["context-result"],t)})}function N(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.buildTaskContext(e),onSuccess:t=>e.setQueryData(["task-context-result"],t)})}function R(){return(0,r.a)({queryKey:["context-result"],queryFn:()=>Promise.reject(Error("No queryFn — this query is never enabled")),enabled:!1})}function E(){return(0,r.a)({queryKey:["task-context-result"],queryFn:()=>Promise.reject(Error("No queryFn — this query is never enabled")),enabled:!1})}function j(){return(0,u.D)({mutationFn:e=>c.h.submitFeedback(e)})}function L(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{type:t,input:n}=e;return c.h.runWorkflow(t,n)},onSuccess:()=>e.invalidateQueries({queryKey:["workflow-runs"]})})}function C(){return(0,r.a)({queryKey:["knowledge-sources"],queryFn:()=>c.h.getKnowledgeSources()})}function x(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.syncKnowledge(e),onSuccess:()=>e.invalidateQueries({queryKey:["knowledge-sources"]})})}function D(e){return(0,r.a)({queryKey:["knowledge-search",e],queryFn:()=>c.h.searchKnowledge(e),enabled:e.length>0})}function U(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["telemetry-stats",e],queryFn:()=>c.h.getTelemetryStats(e)})}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["roi-summary",e],queryFn:()=>c.h.getRoiSummary(e)})}function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return(0,r.a)({queryKey:["benchmark-report","latest",e],queryFn:()=>c.h.getLatestBenchmarkReport(e)})}function A(e){return(0,r.a)({queryKey:["run-events",e],queryFn:()=>c.h.getRunEvents(e),enabled:!!e,refetchInterval:2e3})}function J(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.cleanupTelemetry(e),onSuccess:()=>e.invalidateQueries({queryKey:["telemetry-stats"]})})}function _(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{id:t,updates:n}=e;return c.h.updateMemoryEntry(t,n)},onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function G(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.deleteMemoryEntry(e),onSuccess:()=>e.invalidateQueries({queryKey:["memory"]})})}function M(e){return(0,r.a)({queryKey:["plugin-effectiveness",e],queryFn:()=>c.h.getPluginEffectiveness(e)})}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return(0,r.a)({queryKey:["tool-metrics-summary",e],queryFn:()=>c.h.getToolMetricsSummary(e)})}function V(e){return(0,r.a)({queryKey:["accuracy-stats",e],queryFn:()=>c.h.getAccuracyStats(e)})}function W(e){return(0,r.a)({queryKey:["accuracy-queries",e],queryFn:()=>c.h.getAccuracyQueries(e)})}function X(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.postAccuracyFeedback(e),onSuccess:()=>{e.invalidateQueries({queryKey:["accuracy-stats"]}),e.invalidateQueries({queryKey:["accuracy-queries"]})}})}function Y(){return(0,r.a)({queryKey:["auto-check"],queryFn:()=>c.h.getAutoCheck()})}function Z(){return(0,r.a)({queryKey:["governance-rules"],queryFn:()=>c.h.getGovernanceRules()})}function z(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>{let{rule:t,create:n}=e;return n?c.h.createGovernanceRule(t):c.h.updateGovernanceRule(t)},onSuccess:()=>e.invalidateQueries({queryKey:["governance-rules"]})})}function H(){let e=(0,o.NL)();return(0,u.D)({mutationFn:e=>c.h.deleteGovernanceRule(e),onSuccess:()=>e.invalidateQueries({queryKey:["governance-rules"]})})}function $(){return(0,r.a)({queryKey:["governance-audit"],queryFn:()=>c.h.getGovernanceAudit(),refetchInterval:1e4})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[506],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[506],{32918:function(e,t,r){Promise.resolve().then(r.bind(r,72206))},38941:function(e,t,r){"use strict";r.d(t,{C:function(){return i}});var n=r(27573);r(7653);var a=r(29147);let s=(0,r(49289).j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:r,...i}=e;return(0,n.jsx)("div",{className:(0,a.cn)(s({variant:r}),t),...i})}},50466:function(e,t,r){"use strict";r.d(t,{z:function(){return l}});var n=r(27573),a=r(7653),s=r(29147);let i=(0,r(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=a.forwardRef((e,t)=>{let{className:r,variant:a,size:l,...o}=e;return(0,n.jsx)("button",{className:(0,s.cn)(i({variant:a,size:l,className:r})),ref:t,...o})});l.displayName="Button"},72196:function(e,t,r){"use strict";r.d(t,{Ol:function(){return l},Zb:function(){return i},aY:function(){return c},ll:function(){return o}});var n=r(27573),a=r(7653),s=r(29147);let i=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,s.cn)("rounded-lg border border-border bg-card text-card-foreground",r),...a})});i.displayName="Card";let l=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-4",r),...a})});l.displayName="CardHeader";let o=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("h3",{ref:t,className:(0,s.cn)("text-sm font-semibold leading-none tracking-tight",r),...a})});o.displayName="CardTitle";let c=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,s.cn)("p-4 pt-0",r),...a})});c.displayName="CardContent"},72206:function(e,t,r){"use strict";r.d(t,{AccuracyView:function(){return d}});var n=r(27573),a=r(7653),s=r(72196),i=r(38941),l=r(50466),o=r(57429),c=r(33127);function d(){(0,c.z)("accuracy",[["accuracy-stats"],["accuracy-queries"],["auto-check"]]);let[e,t]=(0,a.useState)(""),{data:r}=(0,o.ZL)(e||void 0),{data:d}=(0,o.e3)({engine:e||void 0,status:"unannotated",limit:20}),{data:u}=(0,o.YG)(),f=(0,o.Fx)(),m=null!=r?r:{},x=Array.isArray(d)?d:[],v=Array.isArray(u)?u:[],h=(0,a.useCallback)((e,t)=>{f.mutate({queryId:e,relevance:t})},[f]);return(0,n.jsxs)("div",{className:"p-6 space-y-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold",children:"Accuracy"}),(0,n.jsxs)("select",{value:e,onChange:e=>t(e.target.value),className:"border rounded px-2 py-1 text-sm bg-background",children:[(0,n.jsx)("option",{value:"",children:"All Engines"}),(0,n.jsx)("option",{value:"codegraph",children:"CodeGraph"}),(0,n.jsx)("option",{value:"knowledge",children:"Knowledge"}),(0,n.jsx)("option",{value:"memory",children:"Memory"})]})]}),v.length>0&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("h3",{className:"text-sm font-medium",children:"Auto Check Results"}),v.map(e=>(0,n.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded text-sm ".concat("error"===e.severity?"bg-red-50 dark:bg-red-950 border border-red-300":"warning"===e.severity?"bg-yellow-50 dark:bg-yellow-950 border border-yellow-300":"bg-green-50 dark:bg-green-950 border border-green-300"),children:[(0,n.jsx)(i.C,{variant:"ok"===e.severity?"default":"destructive",children:e.severity}),(0,n.jsx)("span",{className:"flex-1",children:e.detail})]},e.name))]}),Object.keys(m).length>0&&(0,n.jsx)("div",{className:"grid grid-cols-3 gap-4",children:Object.entries(m).map(e=>{let[t,r]=e;return(0,n.jsxs)(s.Zb,{className:"p-4 space-y-2",children:[(0,n.jsx)("h3",{className:"font-medium text-sm capitalize",children:t}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[(0,n.jsx)("span",{className:"text-muted-foreground",children:"Queries"}),(0,n.jsx)("span",{className:"font-semibold text-right",children:r.totalQueries}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Annotated"}),(0,n.jsx)("span",{className:"font-semibold text-right",children:r.annotatedQueries}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Hit Rate"}),(0,n.jsx)("span",{className:"font-semibold text-right",children:null!=r.hitRate?"".concat(Math.round(100*r.hitRate),"%"):"N/A"})]})]},t)})}),x.length>0&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("h3",{className:"text-sm font-medium",children:["Annotation Queue (",x.length," unannotated)"]}),x.slice(0,10).map(e=>{var t;return(0,n.jsxs)(s.Zb,{className:"p-3 space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(i.C,{variant:"outline",children:e.engine}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]}),(0,n.jsx)("p",{className:"text-sm font-mono",children:e.query}),(0,n.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Top results: ",(null===(t=e.topKResults)||void 0===t?void 0:t.slice(0,3).map(e=>{var t;return null!==(t=e.name)&&void 0!==t?t:e.title}).join(", "))||"none"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.z,{size:"sm",variant:"default",onClick:()=>h(e.id,"hit"),children:"Hit"}),(0,n.jsx)(l.z,{size:"sm",variant:"secondary",onClick:()=>h(e.id,"partial"),children:"Partial"}),(0,n.jsx)(l.z,{size:"sm",variant:"destructive",onClick:()=>h(e.id,"miss"),children:"Miss"})]})]},e.id)})]}),0===Object.keys(m).length&&0===x.length&&0===v.length&&(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:"No accuracy data yet. Start a Claude Code session to collect queries."})]})}},33127:function(e,t,r){"use strict";r.d(t,{D:function(){return c},z:function(){return d}});var n,a=r(7653),s=r(77930),i=r(50794);let l=null!==(n=r(53241).env.NEXT_PUBLIC_DEVFLOW_API_URL)&&void 0!==n?n:"http://localhost:13337";async function o(e,t,r){let n=await fetch("".concat(l,"/api").concat(e),{headers:(0,i.O)(),signal:t});if(!n.ok||!n.body)throw Error("SSE ".concat(n.status));let a=n.body.getReader(),s=new TextDecoder,o="";for(;!t.aborted;){var c;let{value:e,done:t}=await a.read();if(t)break;let n=(o+=s.decode(e,{stream:!0})).split("\n\n");for(let e of(o=null!==(c=n.pop())&&void 0!==c?c:"",n)){let t="message",n=[];for(let r of e.split("\n"))r.startsWith("event:")&&(t=r.slice(6).trim()),r.startsWith("data:")&&n.push(r.slice(5).trim());if(0!==n.length)try{r({type:t,data:JSON.parse(n.join("\n"))})}catch(e){}}}}function c(e){let[t,r]=(0,a.useState)([]);return(0,a.useEffect)(()=>{if(!e)return;let t=new AbortController;return o("/workflows/runs/".concat(encodeURIComponent(e),"/stream"),t.signal,e=>r(t=>[...t,e])).catch(()=>void 0),()=>t.abort()},[e]),{events:t,clear:(0,a.useCallback)(()=>r([]),[])}}function d(e,t){let r=(0,s.NL)(),n=JSON.stringify(t);(0,a.useEffect)(()=>{let t=new AbortController,a=JSON.parse(n);return o("/live/stream?channels=".concat(encodeURIComponent(e)),t.signal,t=>{if("refresh"===t.type&&t.data.channel===e)for(let e of a)r.invalidateQueries({queryKey:e})}).catch(()=>void 0),()=>t.abort()},[e,r,n])}},29147:function(e,t,r){"use strict";r.d(t,{cn:function(){return s}});var n=r(10607),a=r(25579);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,n.W)(t))}},49289:function(e,t,r){"use strict";r.d(t,{j:function(){return i}});var n=r(10607);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=n.W,i=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return s(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:l}=t,o=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===t)return null;let s=a(t)||a(n);return i[e][s]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return s(e,o,null==t?void 0:null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...c}[t]):({...l,...c})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[384,697,429,293,528,744],function(){return e(e.s=32918)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[395],{85:function(e,s,t){Promise.resolve().then(t.bind(t,24388))},38941:function(e,s,t){"use strict";t.d(s,{C:function(){return l}});var r=t(27573);t(7653);var a=t(29147);let n=(0,t(49289).j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:s,variant:t,...l}=e;return(0,r.jsx)("div",{className:(0,a.cn)(n({variant:t}),s),...l})}},50466:function(e,s,t){"use strict";t.d(s,{z:function(){return i}});var r=t(27573),a=t(7653),n=t(29147);let l=(0,t(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=a.forwardRef((e,s)=>{let{className:t,variant:a,size:i,...c}=e;return(0,r.jsx)("button",{className:(0,n.cn)(l({variant:a,size:i,className:t})),ref:s,...c})});i.displayName="Button"},72196:function(e,s,t){"use strict";t.d(s,{Ol:function(){return i},Zb:function(){return l},aY:function(){return d},ll:function(){return c}});var r=t(27573),a=t(7653),n=t(29147);let l=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("rounded-lg border border-border bg-card text-card-foreground",t),...a})});l.displayName="Card";let i=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-4",t),...a})});i.displayName="CardHeader";let c=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("h3",{ref:s,className:(0,n.cn)("text-sm font-semibold leading-none tracking-tight",t),...a})});c.displayName="CardTitle";let d=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("p-4 pt-0",t),...a})});d.displayName="CardContent"},12862:function(e,s,t){"use strict";t.d(s,{SP:function(){return d},dr:function(){return c},mQ:function(){return i},nU:function(){return o}});var r=t(27573),a=t(7653),n=t(4343),l=t(29147);let i=n.fC,c=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.aV,{ref:s,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...a})});c.displayName=n.aV.displayName;let d=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.xz,{ref:s,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...a})});d.displayName=n.xz.displayName;let o=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.VY,{ref:s,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...a})});o.displayName=n.VY.displayName},24388:function(e,s,t){"use strict";t.d(s,{BenchmarkView:function(){return N}});var r=t(27573),a=t(7653),n=t(2389);let l=(0,n.Z)("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);var i=t(12198),c=t(39790),d=t(84142);let o=(0,n.Z)("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);var u=t(79901),m=t(25555),x=t(20054),h=t(3806),f=t(57429),v=t(72196);function b(){var e,s,t;let{t:a}=(0,h.$G)(),{data:n,isLoading:l,error:i}=(0,f.Tu)(7);if(l)return(0,r.jsx)("div",{children:a("benchmark.loading")});if(i||!(null==n?void 0:n.overview))return(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{children:a("benchmark.opsSummary")})}),(0,r.jsx)(v.aY,{children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:i?a("benchmark.loadFailed",{error:String(i)}):a("benchmark.noOpsData")})})]});let c=n.overview;return(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{children:a("benchmark.opsSummary")})}),(0,r.jsx)(v.aY,{className:"space-y-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.totalRunsCount")}),(0,r.jsx)("p",{className:"text-2xl font-bold",children:null!==(e=null==c?void 0:c.totalRuns)&&void 0!==e?e:0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.successRatePercent")}),(0,r.jsxs)("p",{className:"text-2xl font-bold",children:[(null!==(s=null==c?void 0:c.firstPassSuccessRate)&&void 0!==s?s:0).toFixed(1),"%"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.avgDurationTime")}),(0,r.jsxs)("p",{className:"text-2xl font-bold",children:[((null!==(t=null==c?void 0:c.avgDuration)&&void 0!==t?t:0)/1e3).toFixed(1),"s"]})]})]})})]})}var g=t(4509),j=t(12862),p=t(50466);let k=[7,14,30];function N(){var e;let{t:s}=(0,h.$G)(),[t,n]=(0,a.useState)(7),d=(0,f.g6)(),o=(0,f.Tu)(t);return(0,r.jsx)("div",{className:"h-full overflow-y-auto p-4 md:p-6",children:(0,r.jsxs)("div",{className:"mx-auto max-w-6xl space-y-5",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:s("benchmark.title")}),d.data&&(0,r.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[d.data.suiteName," \xb7 v",d.data.suiteVersion," \xb7 ",new Date(d.data.createdAt).toLocaleString()]})]})}),(0,r.jsxs)(j.mQ,{defaultValue:"experiment",className:"space-y-5",children:[(0,r.jsxs)(j.dr,{children:[(0,r.jsxs)(j.SP,{value:"experiment",children:[(0,r.jsx)(l,{className:"mr-2 h-4 w-4"}),s("benchmark.experimentTab","A/B Benchmark")]}),(0,r.jsxs)(j.SP,{value:"operations",children:[(0,r.jsx)(i.Z,{className:"mr-2 h-4 w-4"}),s("benchmark.operationsTab","Operations")]})]}),(0,r.jsx)(j.nU,{value:"experiment",className:"space-y-4",children:(0,r.jsx)(y,{report:null!==(e=d.data)&&void 0!==e?e:null,loading:d.isLoading,error:d.error})}),(0,r.jsxs)(j.nU,{value:"operations",className:"space-y-4",children:[(0,r.jsx)("div",{className:"flex justify-end gap-1",children:k.map(e=>(0,r.jsxs)(p.z,{size:"sm",variant:e===t?"default":"outline",onClick:()=>n(e),children:[e,"d"]},e))}),o.isLoading?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s("benchmark.loading")}):o.data?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsxs)(v.ll,{className:"flex items-center gap-2 text-base",children:[(0,r.jsx)(c.Z,{className:"h-4 w-4"}),s("benchmark.overview")]})}),(0,r.jsxs)(v.aY,{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[(0,r.jsx)(Z,{label:s("benchmark.totalRuns"),value:o.data.overview.totalRuns}),(0,r.jsx)(Z,{label:s("benchmark.completed"),value:o.data.overview.completedRuns}),(0,r.jsx)(Z,{label:s("benchmark.failed"),value:o.data.overview.failedRuns}),(0,r.jsx)(Z,{label:s("benchmark.avgDuration"),value:"".concat((o.data.overview.avgDuration/1e3).toFixed(1),"s")})]})]}),(0,r.jsx)(b,{}),(0,r.jsx)(g.q,{})]}):(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s("benchmark.noOpsData")})]})]})]})})}function y(e){let{report:s,loading:t,error:a}=e,{t:n}=(0,h.$G)();if(t)return(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:n("benchmark.loading")});if(a)return(0,r.jsx)("p",{className:"text-sm text-destructive",children:n("benchmark.loadFailed",{error:a.message})});if(!s)return(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:n("benchmark.noReports")});let l=s.summary.baseline,i=s.summary.devflow;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,r.jsx)(w,{icon:d.Z,label:n("benchmark.avgTokens"),baseline:l.avgTokensUsed.toFixed(0),devflow:i.avgTokensUsed.toFixed(0)}),(0,r.jsx)(w,{icon:o,label:n("benchmark.filesTouched"),baseline:l.avgFilesTouched.toFixed(1),devflow:i.avgFilesTouched.toFixed(1)}),(0,r.jsx)(w,{icon:u.Z,label:n("benchmark.correctness"),baseline:R(l.avgCorrectnessScore),devflow:R(i.avgCorrectnessScore)}),(0,r.jsx)(w,{icon:m.Z,label:n("benchmark.avgDuration"),baseline:"".concat(l.avgDurationMs.toFixed(1),"ms"),devflow:"".concat(i.avgDurationMs.toFixed(1),"ms")})]}),s.regressions.length>0&&(0,r.jsxs)("div",{className:"flex gap-3 border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-800 dark:text-amber-200",children:[(0,r.jsx)(x.Z,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:n("benchmark.regressions")}),s.regressions.map(e=>(0,r.jsx)("p",{children:e.message},e.metric))]})]}),(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{className:"text-base",children:n("benchmark.detailedResults")})}),(0,r.jsx)(v.aY,{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[680px] text-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b text-left text-muted-foreground",children:[(0,r.jsx)("th",{className:"pb-2",children:n("benchmark.task")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.baselineCorrectness")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.devflowCorrectness")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.baselineTokens")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.devflowTokens")})]})}),(0,r.jsx)("tbody",{children:s.tasks.map(e=>(0,r.jsxs)("tr",{className:"border-b last:border-0",children:[(0,r.jsx)("td",{className:"py-2 font-mono text-xs",children:e.taskId}),(0,r.jsx)("td",{className:"py-2 text-right",children:R(e.baseline.correctnessScore)}),(0,r.jsx)("td",{className:"py-2 text-right",children:R(e.devflow.correctnessScore)}),(0,r.jsx)("td",{className:"py-2 text-right",children:e.baseline.tokensUsed.toFixed(0)}),(0,r.jsx)("td",{className:"py-2 text-right",children:e.devflow.tokensUsed.toFixed(0)})]},e.taskId))})]})})]})]})}function w(e){let{icon:s,label:t,baseline:a,devflow:n}=e,{t:l}=(0,h.$G)();return(0,r.jsx)(v.Zb,{children:(0,r.jsxs)(v.aY,{className:"p-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(s,{className:"h-4 w-4"})," ",t]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)(Z,{label:l("benchmark.baseline"),value:a}),(0,r.jsx)(Z,{label:l("benchmark.devflow"),value:n})]})]})})}function Z(e){let{label:s,value:t}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:s}),(0,r.jsx)("div",{className:"text-lg font-semibold",children:t})]})}function R(e){return"".concat((100*e).toFixed(1),"%")}},4509:function(e,s,t){"use strict";t.d(s,{q:function(){return c}});var r=t(27573),a=t(72196),n=t(38941),l=t(3806),i=t(57429);function c(){let{t:e}=(0,l.$G)(),s=localStorage.getItem("devflow-active-project-root")||void 0,{data:t=[],isLoading:c,error:d}=(0,i.Vw)(s);if(c)return(0,r.jsx)("div",{children:e("benchmark.loading")});if(d)return(0,r.jsxs)(a.Zb,{children:[(0,r.jsx)(a.Ol,{children:(0,r.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,r.jsx)(a.aY,{children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.loadFailed",{error:String(d)})})})]});let o=t.filter(e=>"install"===e.recommendation),u=t.filter(e=>"remove"===e.recommendation);return(0,r.jsxs)(a.Zb,{children:[(0,r.jsx)(a.Ol,{children:(0,r.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,r.jsxs)(a.aY,{className:"space-y-6",children:[o.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-2 text-green-600",children:e("benchmark.recommendedInstall")}),(0,r.jsx)("div",{className:"space-y-2",children:o.map(s=>{var t,a,l;return(0,r.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("span",{className:"font-medium",children:s.name}),(0,r.jsx)(n.C,{variant:"default",children:e("benchmark.recommended")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,r.jsxs)("div",{children:[e("benchmark.installCount"),": ",s.installCount]}),(0,r.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(t=null==s?void 0:s.activeRate)&&void 0!==t?t:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==s?void 0:s.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.tokenImpact"),": ",(null!==(l=null==s?void 0:s.avgTokenImpact)&&void 0!==l?l:0).toFixed(0)]})]}),s.lastUsedAt&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("benchmark.lastUsed"),": ",new Date(s.lastUsedAt).toLocaleDateString()]})]},s.name)})})]}),u.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-2 text-red-600",children:e("benchmark.suggestedRemove")}),(0,r.jsx)("div",{className:"space-y-2",children:u.map(s=>{var t,a;return(0,r.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("span",{className:"font-medium",children:s.name}),(0,r.jsx)(n.C,{variant:"destructive",children:e("benchmark.lowEfficiency")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,r.jsxs)("div",{children:[e("benchmark.installCount"),": ",s.installCount]}),(0,r.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(t=null==s?void 0:s.activeRate)&&void 0!==t?t:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==s?void 0:s.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]})]})]},s.name)})})]}),0===t.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.noPluginData")})]})]})}},29147:function(e,s,t){"use strict";t.d(s,{cn:function(){return n}});var r=t(10607),a=t(25579);function n(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return(0,a.m6)((0,r.W)(s))}},39790:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},79901:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},25555:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},84142:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]])},12198:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},20054:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])}},function(e){e.O(0,[384,806,697,402,343,429,293,528,744],function(){return e(e.s=85)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[810],{10807:function(e,t,n){Promise.resolve().then(n.bind(n,31725))},50466:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var s=n(27573),r=n(7653),l=n(29147);let a=(0,n(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=r.forwardRef((e,t)=>{let{className:n,variant:r,size:i,...c}=e;return(0,s.jsx)("button",{className:(0,l.cn)(a({variant:r,size:i,className:n})),ref:t,...c})});i.displayName="Button"},72196:function(e,t,n){"use strict";n.d(t,{Ol:function(){return i},Zb:function(){return a},aY:function(){return o},ll:function(){return c}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",n),...r})});a.displayName="Card";let i=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",n),...r})});i.displayName="CardHeader";let c=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("h3",{ref:t,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",n),...r})});c.displayName="CardTitle";let o=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-4 pt-0",n),...r})});o.displayName="CardContent"},39134:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,type:r,...a}=e;return(0,s.jsx)("input",{type:r,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...a})});a.displayName="Input"},31725:function(e,t,n){"use strict";n.d(t,{ContextViewer:function(){return j}});var s=n(27573),r=n(7653),l=n(57429),a=n(10535),i=n(50466),c=n(72196),o=n(39134),d=n(95731),u=n(2389);let x=(0,u.Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var f=n(20054),m=n(77329);let h=(0,u.Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),p=(0,u.Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var v=n(10269),g=n(3806);function j(){let{t:e}=(0,g.$G)(),[t,n]=(0,r.useState)(""),[u,j]=(0,r.useState)(!1),[b,y]=(0,r.useState)({}),N=(0,a.q)(e=>e.activeProjectRoot),k=(0,l.ow)(),w=(0,l.qt)(),{data:S}=(0,l.dP)(),{data:Z}=(0,l.VU)(),C=(0,l.rO)(),E=u?Z:S,R=u?w.isPending:k.isPending,M=()=>{t.trim()&&(y({}),u?w.mutate({query:t,mode:"fast"}):k.mutate({query:t,mode:"fast"}))},O=e=>{t.trim()&&(y({[t]:e}),C.mutate({query:t,feedback:e,projectRoot:null!=N?N:void 0,taskType:u&&Z?Z.taskType:void 0,contextMode:u?"task":"general",tokenCount:null==E?void 0:E.tokenCount}))};return(0,s.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:e("context.title")}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:u,onChange:e=>j(e.target.checked),className:"rounded"}),e("context.taskMode")]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.I,{placeholder:e("context.placeholder"),value:t,onChange:e=>n(e.target.value),onKeyDown:e=>"Enter"===e.key&&M()}),(0,s.jsxs)(i.z,{onClick:M,disabled:R,children:[(0,s.jsx)(d.Z,{className:"h-4 w-4 mr-1"})," ",e("context.build")]})]}),R&&(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e("context.building")}),E&&(0,s.jsxs)(s.Fragment,{children:[!u&&S&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsx)(c.ll,{children:e("context.results",{files:S.files.length,tokens:S.tokenCount})})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-3",children:S.files.map((e,t)=>(0,s.jsxs)("div",{className:"p-3 rounded-md bg-secondary/50",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground font-mono",children:e.path}),(0,s.jsx)("pre",{className:"text-xs mt-1 overflow-x-auto whitespace-pre-wrap",children:e.snippet})]},t))})})]}),u&&Z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[e("context.taskContext"),": ",Z.taskType]}),(0,s.jsx)("span",{className:"text-sm font-normal text-muted-foreground",children:e("context.confidenceTokens",{confidence:(100*Z.confidence).toFixed(0),tokens:Z.tokenCount})})]})})}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.requiredFiles")," (",Z.requiredFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.requiredFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-green-700 dark:text-green-400",children:["● ",e]},e))})})]}),Z.optionalFiles.files.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.optionalFiles")," (",Z.optionalFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.optionalFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-muted-foreground",children:["○ ",e]},e))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{children:[e("context.keySymbols")," (",Z.keySymbols.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.keySymbols.slice(0,10).map(t=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat("direct"===t.relevance?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"),children:"direct"===t.relevance?e("context.relevanceDirect"):e("context.relevanceIndirect")}),(0,s.jsx)("span",{className:"text-sm font-medium",children:t.name}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",t.kind,")"]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono ml-auto",children:t.file})]},"".concat(t.file,":").concat(t.name)))})})]}),Z.riskHints.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(f.Z,{className:"h-4 w-4"}),e("context.riskHints")," (",Z.riskHints.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.riskHints.map((t,n)=>(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"mt-0.5 px-1.5 py-0.5 rounded text-xs font-medium ".concat("high"===t.level?"bg-red-100 text-red-700":"medium"===t.level?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-600"),children:"high"===t.level?e("context.levelHigh"):"medium"===t.level?e("context.levelMedium"):e("context.levelLow")}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:t.category}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t.description})]})]},n))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(m.Z,{className:"h-4 w-4"}),e("context.nextActions")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.nextActions.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-blue-100 text-blue-700 text-xs",children:e.kind}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e.payload})]},t))})})]})]}),E&&(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.aY,{className:"p-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground mr-2",children:e("context.wasHelpful")}),(0,s.jsxs)(i.z,{size:"sm",variant:"hit"===b[t]?"default":"outline",onClick:()=>O("hit"),disabled:C.isPending,children:[(0,s.jsx)(h,{className:"h-3 w-3 mr-1"})," ",e("context.hit")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"partial"===b[t]?"default":"outline",onClick:()=>O("partial"),disabled:C.isPending,children:[(0,s.jsx)(p,{className:"h-3 w-3 mr-1"})," ",e("context.partial")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"miss"===b[t]?"default":"outline",onClick:()=>O("miss"),disabled:C.isPending,children:[(0,s.jsx)(v.Z,{className:"h-3 w-3 mr-1"})," ",e("context.miss")]}),C.isSuccess&&(0,s.jsx)("span",{className:"text-xs text-green-600 ml-2",children:e("context.thanks")})]})})})]})]})}},10535:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var s=n(62052);let r="devflow-project-root",l="devflow-active-project-root";function a(e){try{return localStorage.getItem(e)}catch(e){return null}}function i(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let c=(0,s.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:a(r),activeProjectRoot:a(l),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{i(r,t),e({projectRoot:t})},setActiveProjectRoot:t=>{i(l,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,n){"use strict";n.d(t,{cn:function(){return l}});var s=n(10607),r=n(25579);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.m6)((0,s.W)(t))}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var s=n(7653);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,s.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:o="",children:d,iconNode:u,...x}=e;return(0,s.createElement)("svg",{ref:t,...a,width:r,height:r,stroke:n,strokeWidth:c?24*Number(i)/Number(r):i,className:l("lucide",o),...x},[...u.map(e=>{let[t,n]=e;return(0,s.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),c=(e,t)=>{let n=(0,s.forwardRef)((n,a)=>{let{className:c,...o}=n;return(0,s.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(r(e)),c),...o})});return n.displayName="".concat(e),n}},77329:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},95731:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},20054:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},10269:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},38475:function(e,t,n){"use strict";var s=n(7653),r=n(96250),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=s.useRef,c=s.useEffect,o=s.useMemo,d=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,s,r){var u=i(null);if(null===u.current){var x={hasValue:!1,value:null};u.current=x}else x=u.current;var f=a(e,(u=o(function(){function e(e){if(!c){if(c=!0,a=e,e=s(e),void 0!==r&&x.hasValue){var t=x.value;if(r(t,e))return i=t}return i=e}if(t=i,l(a,e))return t;var n=s(e);return void 0!==r&&r(t,n)?(a=e,t):(a=e,i=n)}var a,i,c=!1,o=void 0===n?null:n;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,n,s,r]))[0],u[1]);return c(function(){x.hasValue=!0,x.value=f},[f]),d(f),f}},18678:function(e,t,n){"use strict";e.exports=n(38475)},49289:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var s=n(10607);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=s.W,a=(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return l(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],s=null==i?void 0:i[e];if(null===t)return null;let l=r(t)||r(s);return a[e][l]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,s]=t;return void 0===s||(e[n]=s),e},{});return l(e,c,null==t?void 0:null===(s=t.compoundVariants)||void 0===s?void 0:s.reduce((e,t)=>{let{class:n,className:s,...r}=t;return Object.entries(r).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):({...i,...o})[t]===n})?[...e,n,s]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},62052:function(e,t,n){"use strict";n.d(t,{Ue:function(){return u}});var s=n(19730),r=n(7653),l=n(18678);let{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:i}=l,c=!1,o=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?(0,s.M)(e):e,n=(e,n)=>(function(e,t=o,n){n&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);let s=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return a(s),s})(t,e,n);return Object.assign(n,t),n},u=e=>e?d(e):d},19730:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let s=e=>{let t;let n=new Set,s=(e,s)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,l={setState:s,getState:r,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(s,r,l);return l},r=e=>e?s(e):s}},function(e){e.O(0,[736,806,697,429,293,528,744],function(){return e(e.s=10807)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[810],{83567:function(e,t,n){Promise.resolve().then(n.bind(n,31725))},50466:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var s=n(27573),r=n(7653),l=n(29147);let a=(0,n(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=r.forwardRef((e,t)=>{let{className:n,variant:r,size:i,...c}=e;return(0,s.jsx)("button",{className:(0,l.cn)(a({variant:r,size:i,className:n})),ref:t,...c})});i.displayName="Button"},72196:function(e,t,n){"use strict";n.d(t,{Ol:function(){return i},Zb:function(){return a},aY:function(){return o},ll:function(){return c}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",n),...r})});a.displayName="Card";let i=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",n),...r})});i.displayName="CardHeader";let c=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("h3",{ref:t,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",n),...r})});c.displayName="CardTitle";let o=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-4 pt-0",n),...r})});o.displayName="CardContent"},39134:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,type:r,...a}=e;return(0,s.jsx)("input",{type:r,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...a})});a.displayName="Input"},31725:function(e,t,n){"use strict";n.d(t,{ContextViewer:function(){return j}});var s=n(27573),r=n(7653),l=n(57429),a=n(10535),i=n(50466),c=n(72196),o=n(39134),d=n(95731),u=n(2389);let x=(0,u.Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var f=n(20054),m=n(77329);let h=(0,u.Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),p=(0,u.Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var v=n(10269),g=n(3806);function j(){let{t:e}=(0,g.$G)(),[t,n]=(0,r.useState)(""),[u,j]=(0,r.useState)(!1),[b,y]=(0,r.useState)({}),N=(0,a.q)(e=>e.activeProjectRoot),k=(0,l.ow)(),w=(0,l.qt)(),{data:S}=(0,l.dP)(),{data:Z}=(0,l.VU)(),C=(0,l.rO)(),E=u?Z:S,R=u?w.isPending:k.isPending,M=()=>{t.trim()&&(y({}),u?w.mutate({query:t,mode:"fast"}):k.mutate({query:t,mode:"fast"}))},O=e=>{t.trim()&&(y({[t]:e}),C.mutate({query:t,feedback:e,projectRoot:null!=N?N:void 0,taskType:u&&Z?Z.taskType:void 0,contextMode:u?"task":"general",tokenCount:null==E?void 0:E.tokenCount}))};return(0,s.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:e("context.title")}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:u,onChange:e=>j(e.target.checked),className:"rounded"}),e("context.taskMode")]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.I,{placeholder:e("context.placeholder"),value:t,onChange:e=>n(e.target.value),onKeyDown:e=>"Enter"===e.key&&M()}),(0,s.jsxs)(i.z,{onClick:M,disabled:R,children:[(0,s.jsx)(d.Z,{className:"h-4 w-4 mr-1"})," ",e("context.build")]})]}),R&&(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e("context.building")}),E&&(0,s.jsxs)(s.Fragment,{children:[!u&&S&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsx)(c.ll,{children:e("context.results",{files:S.files.length,tokens:S.tokenCount})})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-3",children:S.files.map((e,t)=>(0,s.jsxs)("div",{className:"p-3 rounded-md bg-secondary/50",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground font-mono",children:e.path}),(0,s.jsx)("pre",{className:"text-xs mt-1 overflow-x-auto whitespace-pre-wrap",children:e.snippet})]},t))})})]}),u&&Z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[e("context.taskContext"),": ",Z.taskType]}),(0,s.jsx)("span",{className:"text-sm font-normal text-muted-foreground",children:e("context.confidenceTokens",{confidence:(100*Z.confidence).toFixed(0),tokens:Z.tokenCount})})]})})}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.requiredFiles")," (",Z.requiredFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.requiredFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-green-700 dark:text-green-400",children:["● ",e]},e))})})]}),Z.optionalFiles.files.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.optionalFiles")," (",Z.optionalFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.optionalFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-muted-foreground",children:["○ ",e]},e))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{children:[e("context.keySymbols")," (",Z.keySymbols.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.keySymbols.slice(0,10).map(t=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat("direct"===t.relevance?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"),children:"direct"===t.relevance?e("context.relevanceDirect"):e("context.relevanceIndirect")}),(0,s.jsx)("span",{className:"text-sm font-medium",children:t.name}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",t.kind,")"]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono ml-auto",children:t.file})]},"".concat(t.file,":").concat(t.name)))})})]}),Z.riskHints.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(f.Z,{className:"h-4 w-4"}),e("context.riskHints")," (",Z.riskHints.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.riskHints.map((t,n)=>(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"mt-0.5 px-1.5 py-0.5 rounded text-xs font-medium ".concat("high"===t.level?"bg-red-100 text-red-700":"medium"===t.level?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-600"),children:"high"===t.level?e("context.levelHigh"):"medium"===t.level?e("context.levelMedium"):e("context.levelLow")}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:t.category}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t.description})]})]},n))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(m.Z,{className:"h-4 w-4"}),e("context.nextActions")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.nextActions.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-blue-100 text-blue-700 text-xs",children:e.kind}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e.payload})]},t))})})]})]}),E&&(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.aY,{className:"p-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground mr-2",children:e("context.wasHelpful")}),(0,s.jsxs)(i.z,{size:"sm",variant:"hit"===b[t]?"default":"outline",onClick:()=>O("hit"),disabled:C.isPending,children:[(0,s.jsx)(h,{className:"h-3 w-3 mr-1"})," ",e("context.hit")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"partial"===b[t]?"default":"outline",onClick:()=>O("partial"),disabled:C.isPending,children:[(0,s.jsx)(p,{className:"h-3 w-3 mr-1"})," ",e("context.partial")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"miss"===b[t]?"default":"outline",onClick:()=>O("miss"),disabled:C.isPending,children:[(0,s.jsx)(v.Z,{className:"h-3 w-3 mr-1"})," ",e("context.miss")]}),C.isSuccess&&(0,s.jsx)("span",{className:"text-xs text-green-600 ml-2",children:e("context.thanks")})]})})})]})]})}},10535:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var s=n(62052);let r="devflow-project-root",l="devflow-active-project-root";function a(e){try{return localStorage.getItem(e)}catch(e){return null}}function i(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let c=(0,s.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:a(r),activeProjectRoot:a(l),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{i(r,t),e({projectRoot:t})},setActiveProjectRoot:t=>{i(l,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,n){"use strict";n.d(t,{cn:function(){return l}});var s=n(10607),r=n(25579);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.m6)((0,s.W)(t))}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var s=n(7653);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,s.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:o="",children:d,iconNode:u,...x}=e;return(0,s.createElement)("svg",{ref:t,...a,width:r,height:r,stroke:n,strokeWidth:c?24*Number(i)/Number(r):i,className:l("lucide",o),...x},[...u.map(e=>{let[t,n]=e;return(0,s.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),c=(e,t)=>{let n=(0,s.forwardRef)((n,a)=>{let{className:c,...o}=n;return(0,s.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(r(e)),c),...o})});return n.displayName="".concat(e),n}},77329:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},95731:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},20054:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},10269:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},38475:function(e,t,n){"use strict";var s=n(7653),r=n(96250),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=s.useRef,c=s.useEffect,o=s.useMemo,d=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,s,r){var u=i(null);if(null===u.current){var x={hasValue:!1,value:null};u.current=x}else x=u.current;var f=a(e,(u=o(function(){function e(e){if(!c){if(c=!0,a=e,e=s(e),void 0!==r&&x.hasValue){var t=x.value;if(r(t,e))return i=t}return i=e}if(t=i,l(a,e))return t;var n=s(e);return void 0!==r&&r(t,n)?(a=e,t):(a=e,i=n)}var a,i,c=!1,o=void 0===n?null:n;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,n,s,r]))[0],u[1]);return c(function(){x.hasValue=!0,x.value=f},[f]),d(f),f}},18678:function(e,t,n){"use strict";e.exports=n(38475)},49289:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var s=n(10607);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=s.W,a=(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return l(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],s=null==i?void 0:i[e];if(null===t)return null;let l=r(t)||r(s);return a[e][l]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,s]=t;return void 0===s||(e[n]=s),e},{});return l(e,c,null==t?void 0:null===(s=t.compoundVariants)||void 0===s?void 0:s.reduce((e,t)=>{let{class:n,className:s,...r}=t;return Object.entries(r).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):({...i,...o})[t]===n})?[...e,n,s]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},62052:function(e,t,n){"use strict";n.d(t,{Ue:function(){return u}});var s=n(19730),r=n(7653),l=n(18678);let{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:i}=l,c=!1,o=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?(0,s.M)(e):e,n=(e,n)=>(function(e,t=o,n){n&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);let s=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return a(s),s})(t,e,n);return Object.assign(n,t),n},u=e=>e?d(e):d},19730:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let s=e=>{let t;let n=new Set,s=(e,s)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,l={setState:s,getState:r,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(s,r,l);return l},r=e=>e?s(e):s}},function(e){e.O(0,[384,806,697,429,293,528,744],function(){return e(e.s=83567)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[479],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[479],{19095:function(t,e,s){Promise.resolve().then(s.bind(s,16455))},16455:function(t,e,s){"use strict";s.d(e,{DoctorView:function(){return l}});var i=s(27573),r=s(79901),n=s(20054),a=s(53512),o=s(88623),u=s(57429);let c={ok:r.Z,warning:n.Z,error:a.Z},h={ok:"text-emerald-500",warning:"text-amber-500",error:"text-red-500"};function l(){var t;let e=(0,u.YG)(),s=(0,u.hI)(),r=null!==(t=e.data)&&void 0!==t?t:[];return(0,i.jsxs)("div",{className:"h-full overflow-y-auto p-6",children:[(0,i.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-2xl font-bold",children:"Doctor"}),(0,i.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:s.data?"".concat(s.data.totalFiles," files \xb7 ").concat(s.data.totalSymbols," symbols"):"Server unavailable"})]}),(0,i.jsx)("button",{onClick:()=>Promise.all([e.refetch(),s.refetch()]),className:"icon-button",title:"Refresh checks","aria-label":"Refresh checks",children:(0,i.jsx)(o.Z,{className:"h-4 w-4 ".concat(e.isFetching?"animate-spin":"")})})]}),(0,i.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[r.map(t=>{let e=c[t.severity];return(0,i.jsxs)("div",{className:"grid grid-cols-[24px_minmax(120px,220px)_1fr] items-start gap-3 py-3 text-sm",children:[(0,i.jsx)(e,{className:"mt-0.5 h-4 w-4 ".concat(h[t.severity])}),(0,i.jsx)("span",{className:"font-medium",children:t.name}),(0,i.jsx)("span",{className:"text-muted-foreground",children:t.detail})]},t.name)}),e.isLoading||0!==r.length?null:(0,i.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No checks reported"})]})]})}},2389:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});var i=s(7653);let r=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=function(){for(var t=arguments.length,e=Array(t),s=0;s<t;s++)e[s]=arguments[s];return e.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,i.forwardRef)((t,e)=>{let{color:s="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:c="",children:h,iconNode:l,...d}=t;return(0,i.createElement)("svg",{ref:e,...a,width:r,height:r,stroke:s,strokeWidth:u?24*Number(o)/Number(r):o,className:n("lucide",c),...d},[...l.map(t=>{let[e,s]=t;return(0,i.createElement)(e,s)}),...Array.isArray(h)?h:[h]])}),u=(t,e)=>{let s=(0,i.forwardRef)((s,a)=>{let{className:u,...c}=s;return(0,i.createElement)(o,{ref:a,iconNode:e,className:n("lucide-".concat(r(t)),u),...c})});return s.displayName="".concat(t),s}},79901:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},53512:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},88623:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},20054:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},64855:function(t,e,s){"use strict";s.d(e,{R:function(){return o},m:function(){return a}});var i=s(2906),r=s(5531),n=s(11135),a=class extends r.F{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let n=await this.#i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},15969:function(t,e,s){"use strict";s.d(e,{D:function(){return h}});var i=s(7653),r=s(64855),n=s(2906),a=s(24559),o=s(50803),u=class extends a.l{#t;#n=void 0;#a;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#n}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#u(){let t=this.#a?.state??(0,r.R)();this.#n={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){n.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#n.variables,s=this.#n.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#n)})})}},c=s(77930);function h(t,e){let s=(0,c.NL)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let a=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(n.Vr.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),h=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.ZT)},[r]);if(a.error&&(0,o.L3)(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:h,mutateAsync:a.mutate}}}},function(t){t.O(0,[384,429,293,528,744],function(){return t(t.s=19095)}),_N_E=t.O()}]);
|