@seqyuan/annovibe 0.8.121 → 0.8.123

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.
Files changed (81) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +15 -15
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/server/app/api/agent/runtime/route.js +1 -1
  26. package/.next/server/app/api/internal/runtime/route.js +1 -1
  27. package/.next/server/app/api/version/route.js +1 -1
  28. package/.next/server/app/index.html +1 -1
  29. package/.next/server/app/index.rsc +2 -2
  30. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  31. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  32. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  33. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  35. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/login.html +1 -1
  37. package/.next/server/app/login.rsc +1 -1
  38. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  39. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  40. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  41. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  43. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  44. package/.next/server/app/page.js +2 -2
  45. package/.next/server/app/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/smoke/session-stream/page.js +1 -1
  48. package/.next/server/app/smoke/session-stream/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/smoke/session-stream.html +1 -1
  50. package/.next/server/app/smoke/session-stream.rsc +2 -2
  51. package/.next/server/app/smoke/session-stream.segments/_full.segment.rsc +2 -2
  52. package/.next/server/app/smoke/session-stream.segments/_head.segment.rsc +1 -1
  53. package/.next/server/app/smoke/session-stream.segments/_index.segment.rsc +1 -1
  54. package/.next/server/app/smoke/session-stream.segments/_tree.segment.rsc +1 -1
  55. package/.next/server/app/smoke/session-stream.segments/smoke/session-stream/__PAGE__.segment.rsc +2 -2
  56. package/.next/server/app/smoke/session-stream.segments/smoke/session-stream.segment.rsc +1 -1
  57. package/.next/server/app/smoke/session-stream.segments/smoke.segment.rsc +1 -1
  58. package/.next/server/app/smoke.html +1 -1
  59. package/.next/server/app/smoke.rsc +1 -1
  60. package/.next/server/app/smoke.segments/_full.segment.rsc +1 -1
  61. package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
  62. package/.next/server/app/smoke.segments/_index.segment.rsc +1 -1
  63. package/.next/server/app/smoke.segments/_tree.segment.rsc +1 -1
  64. package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +1 -1
  65. package/.next/server/app/smoke.segments/smoke.segment.rsc +1 -1
  66. package/.next/server/app-paths-manifest.json +15 -15
  67. package/.next/server/chunks/3041.js +5 -5
  68. package/.next/server/chunks/4584.js +2 -2
  69. package/.next/server/middleware-build-manifest.js +1 -1
  70. package/.next/server/middleware.js +3 -3
  71. package/.next/server/pages/404.html +1 -1
  72. package/.next/server/pages/500.html +1 -1
  73. package/.next/server/server-reference-manifest.json +1 -1
  74. package/.next/static/chunks/5377-70343e4bd39d4239.js +22 -0
  75. package/.next/static/chunks/app/{page-7673f9b48c531a25.js → page-7816338a1e8f2d4d.js} +2 -2
  76. package/.next/static/chunks/app/smoke/session-stream/page-17dc06b24b9587f2.js +6 -0
  77. package/package.json +1 -1
  78. package/.next/static/chunks/5377-8f8cd2e62855e613.js +0 -22
  79. package/.next/static/chunks/app/smoke/session-stream/page-e4493b066a788be3.js +0 -6
  80. /package/.next/static/{RGo27ZXaxOnz4AWGjVXXd → -zDFcEPiS1rhVSLb5AN96}/_buildManifest.js +0 -0
  81. /package/.next/static/{RGo27ZXaxOnz4AWGjVXXd → -zDFcEPiS1rhVSLb5AN96}/_ssgManifest.js +0 -0
@@ -1467,4 +1467,4 @@ line 28 = 28
1467
1467
  line 29 = 29
1468
1468
  line 30 = 30
1469
1469
  line 31 = 31
1470
- line 32 = 32</span></code></div><div style="position:absolute;inset-inline:0;bottom:0;height:3.5rem;background:linear-gradient(to top, var(--bg) 0%, transparent 100%);pointer-events:none"></div></div><button type="button" aria-expanded="false" style="display:flex;align-items:center;gap:4px;width:100%;min-height:28px;padding:4px 8px;justify-content:center;background:var(--bg);border:none;border-top:1px solid var(--border);color:var(--text-dim);cursor:pointer;font-size:11px">Show all 35 lines</button></div></div></div></section></section></div></main><!--$--><!--/$--><script src="/_next/static/chunks/webpack-fb1763edb92ee346.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[42593,[\"7177\",\"static/chunks/app/layout-5608bfe5e8f4e4c0.js\"],\"\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:I[61304,[],\"ClientPageRoot\"]\n6:I[54833,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"2941\",\"static/chunks/73972abe-9ff83c7d1a6ea9f7.js\",\"2995\",\"static/chunks/0b9a0da7-9075af772487e743.js\",\"6079\",\"static/chunks/363642f4-dc35a7a659350f8e.js\",\"2693\",\"static/chunks/2693-b831832202452107.js\",\"2254\",\"static/chunks/2254-fa3fcc88564ee18d.js\",\"4456\",\"static/chunks/4456-2ebe94e87b59562c.js\",\"5618\",\"static/chunks/5618-3b8444e736e6ae4d.js\",\"2444\",\"static/chunks/app/smoke/page-35df723c803f35e1.js\"],\"default\"]\n9:I[90484,[],\"OutletBoundary\"]\na:\"$Sreact.suspense\"\nd:I[90484,[],\"ViewportBoundary\"]\nf:I[90484,[],\"MetadataBoundary\"]\n11:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/82991d37d91b75fd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"smoke\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"smoke\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/82991d37d91b75fd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_66b8ca\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"strategy\":\"beforeInteractive\",\"children\":\"(function(){try{var t=localStorage.getItem(\\\"pi-theme\\\");if(t===\\\"dark\\\")document.documentElement.classList.add(\\\"dark\\\")}catch(e){}})();\"}]}],[\"$\",\"body\",null,{\"style\":{\"height\":\"100dvh\",\"display\":\"flex\",\"flexDirection\":\"column\"},\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}}],null,[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@b\"}]}]]}],{},null,false,null]},null,false,\"$@c\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"RGo27ZXaxOnz4AWGjVXXd\"}\n"])</script><script>self.__next_f.push([1,"12:[]\nc:\"$W12\"\n7:{}\n8:\"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[86869,[],\"IconMark\"]\nb:null\n10:[[\"$\",\"title\",\"0\",{\"children\":\"AnnoVibe\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI-native bioinformatics workspace by Annoroad\"}],[\"$\",\"link\",\"2\",{\"rel\":\"shortcut icon\",\"href\":\"/icon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L13\",\"4\",{}]]\n"])</script></body></html>
1470
+ line 32 = 32</span></code></div><div style="position:absolute;inset-inline:0;bottom:0;height:3.5rem;background:linear-gradient(to top, var(--bg) 0%, transparent 100%);pointer-events:none"></div></div><button type="button" aria-expanded="false" style="display:flex;align-items:center;gap:4px;width:100%;min-height:28px;padding:4px 8px;justify-content:center;background:var(--bg);border:none;border-top:1px solid var(--border);color:var(--text-dim);cursor:pointer;font-size:11px">Show all 35 lines</button></div></div></div></section></section></div></main><!--$--><!--/$--><script src="/_next/static/chunks/webpack-fb1763edb92ee346.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[42593,[\"7177\",\"static/chunks/app/layout-5608bfe5e8f4e4c0.js\"],\"\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:I[61304,[],\"ClientPageRoot\"]\n6:I[54833,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"2941\",\"static/chunks/73972abe-9ff83c7d1a6ea9f7.js\",\"2995\",\"static/chunks/0b9a0da7-9075af772487e743.js\",\"6079\",\"static/chunks/363642f4-dc35a7a659350f8e.js\",\"2693\",\"static/chunks/2693-b831832202452107.js\",\"2254\",\"static/chunks/2254-fa3fcc88564ee18d.js\",\"4456\",\"static/chunks/4456-2ebe94e87b59562c.js\",\"5618\",\"static/chunks/5618-3b8444e736e6ae4d.js\",\"2444\",\"static/chunks/app/smoke/page-35df723c803f35e1.js\"],\"default\"]\n9:I[90484,[],\"OutletBoundary\"]\na:\"$Sreact.suspense\"\nd:I[90484,[],\"ViewportBoundary\"]\nf:I[90484,[],\"MetadataBoundary\"]\n11:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/82991d37d91b75fd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"smoke\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"smoke\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/82991d37d91b75fd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_66b8ca\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"strategy\":\"beforeInteractive\",\"children\":\"(function(){try{var t=localStorage.getItem(\\\"pi-theme\\\");if(t===\\\"dark\\\")document.documentElement.classList.add(\\\"dark\\\")}catch(e){}})();\"}]}],[\"$\",\"body\",null,{\"style\":{\"height\":\"100dvh\",\"display\":\"flex\",\"flexDirection\":\"column\"},\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}}],null,[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@b\"}]}]]}],{},null,false,null]},null,false,\"$@c\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"-zDFcEPiS1rhVSLb5AN96\"}\n"])</script><script>self.__next_f.push([1,"12:[]\nc:\"$W12\"\n7:{}\n8:\"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[86869,[],\"IconMark\"]\nb:null\n10:[[\"$\",\"title\",\"0\",{\"children\":\"AnnoVibe\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI-native bioinformatics workspace by Annoroad\"}],[\"$\",\"link\",\"2\",{\"rel\":\"shortcut icon\",\"href\":\"/icon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L13\",\"4\",{}]]\n"])</script></body></html>
@@ -13,7 +13,7 @@ f:I[90484,[],"MetadataBoundary"]
13
13
  :HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
14
14
  :HL["/_next/static/css/88714c00e109ce28.css","style"]
15
15
  :HL["/_next/static/css/82991d37d91b75fd.css","style"]
16
- 0:{"P":null,"c":["","smoke"],"q":"","i":false,"f":[[["",{"children":["smoke",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],null,["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"RGo27ZXaxOnz4AWGjVXXd"}
16
+ 0:{"P":null,"c":["","smoke"],"q":"","i":false,"f":[[["",{"children":["smoke",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],null,["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"-zDFcEPiS1rhVSLb5AN96"}
17
17
  12:[]
18
18
  c:"$W12"
19
19
  7:{}
@@ -13,7 +13,7 @@ f:I[90484,[],"MetadataBoundary"]
13
13
  :HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
14
14
  :HL["/_next/static/css/88714c00e109ce28.css","style"]
15
15
  :HL["/_next/static/css/82991d37d91b75fd.css","style"]
16
- 0:{"P":null,"c":["","smoke"],"q":"","i":false,"f":[[["",{"children":["smoke",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],null,["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"RGo27ZXaxOnz4AWGjVXXd"}
16
+ 0:{"P":null,"c":["","smoke"],"q":"","i":false,"f":[[["",{"children":["smoke",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],null,["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"-zDFcEPiS1rhVSLb5AN96"}
17
17
  12:[]
18
18
  c:"$W12"
19
19
  7:{}
@@ -3,4 +3,4 @@
3
3
  3:I[90484,[],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[86869,[],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"AnnoVibe"}],["$","meta","1",{"name":"description","content":"AI-native bioinformatics workspace by Annoroad"}],["$","link","2",{"rel":"shortcut icon","href":"/icon.svg","type":"image/svg+xml"}],["$","link","3",{"rel":"icon","href":"/icon.svg","type":"image/svg+xml"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"RGo27ZXaxOnz4AWGjVXXd"}
6
+ 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"AnnoVibe"}],["$","meta","1",{"name":"description","content":"AI-native bioinformatics workspace by Annoroad"}],["$","link","2",{"rel":"shortcut icon","href":"/icon.svg","type":"image/svg+xml"}],["$","link","3",{"rel":"icon","href":"/icon.svg","type":"image/svg+xml"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"-zDFcEPiS1rhVSLb5AN96"}
@@ -4,4 +4,4 @@
4
4
  4:I[74581,[],""]
5
5
  :HL["/_next/static/css/88714c00e109ce28.css","style"]
6
6
  :HL["/_next/static/css/82991d37d91b75fd.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","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."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"RGo27ZXaxOnz4AWGjVXXd"}
7
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/82991d37d91b75fd.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"__variable_66b8ca","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","$L2",null,{"id":"theme-init","strategy":"beforeInteractive","children":"(function(){try{var t=localStorage.getItem(\"pi-theme\");if(t===\"dark\")document.documentElement.classList.add(\"dark\")}catch(e){}})();"}]}],["$","body",null,{"style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","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."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"-zDFcEPiS1rhVSLb5AN96"}
@@ -2,4 +2,4 @@
2
2
  :HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3
3
  :HL["/_next/static/css/88714c00e109ce28.css","style"]
4
4
  :HL["/_next/static/css/82991d37d91b75fd.css","style"]
5
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"smoke","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"RGo27ZXaxOnz4AWGjVXXd"}
5
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"smoke","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"-zDFcEPiS1rhVSLb5AN96"}
@@ -3,7 +3,7 @@
3
3
  3:I[54833,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","2941","static/chunks/73972abe-9ff83c7d1a6ea9f7.js","2995","static/chunks/0b9a0da7-9075af772487e743.js","6079","static/chunks/363642f4-dc35a7a659350f8e.js","2693","static/chunks/2693-b831832202452107.js","2254","static/chunks/2254-fa3fcc88564ee18d.js","4456","static/chunks/4456-2ebe94e87b59562c.js","5618","static/chunks/5618-3b8444e736e6ae4d.js","2444","static/chunks/app/smoke/page-35df723c803f35e1.js"],"default"]
4
4
  6:I[90484,[],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"RGo27ZXaxOnz4AWGjVXXd"}
6
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"-zDFcEPiS1rhVSLb5AN96"}
7
7
  4:{}
8
8
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
9
  8:null
@@ -2,4 +2,4 @@
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
4
  4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"RGo27ZXaxOnz4AWGjVXXd"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"-zDFcEPiS1rhVSLb5AN96"}
@@ -23,31 +23,30 @@
23
23
  "/favicon.ico/route": "app/favicon.ico/route.js",
24
24
  "/icon.svg/route": "app/icon.svg/route.js",
25
25
  "/api/agent/[id]/prepare/route": "app/api/agent/[id]/prepare/route.js",
26
- "/api/agent/running/events/route": "app/api/agent/running/events/route.js",
26
+ "/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
27
27
  "/api/agent/running/route": "app/api/agent/running/route.js",
28
+ "/api/agent/running/events/route": "app/api/agent/running/events/route.js",
28
29
  "/api/agent/runtime/route": "app/api/agent/runtime/route.js",
29
30
  "/api/agent/[id]/route": "app/api/agent/[id]/route.js",
30
- "/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
31
- "/api/apps/[id]/[[...path]]/route": "app/api/apps/[id]/[[...path]]/route.js",
32
31
  "/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
32
+ "/api/apps/route": "app/api/apps/route.js",
33
+ "/api/apps/[id]/[[...path]]/route": "app/api/apps/[id]/[[...path]]/route.js",
33
34
  "/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
35
+ "/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
34
36
  "/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
35
37
  "/api/auth/providers/route": "app/api/auth/providers/route.js",
36
38
  "/api/debug-models/route": "app/api/debug-models/route.js",
37
39
  "/api/file-tree/delete/route": "app/api/file-tree/delete/route.js",
38
40
  "/api/file-tree/mkdir/route": "app/api/file-tree/mkdir/route.js",
39
- "/api/apps/route": "app/api/apps/route.js",
40
41
  "/api/file-tree/rename/route": "app/api/file-tree/rename/route.js",
41
42
  "/api/file-tree/reveal/route": "app/api/file-tree/reveal/route.js",
42
- "/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
43
43
  "/api/file-tree/write/route": "app/api/file-tree/write/route.js",
44
44
  "/api/file-watch/route": "app/api/file-watch/route.js",
45
45
  "/api/im/cancel/route": "app/api/im/cancel/route.js",
46
46
  "/api/im/gateway-status/route": "app/api/im/gateway-status/route.js",
47
- "/api/files/[...path]/route": "app/api/files/[...path]/route.js",
48
47
  "/api/im/gateway-token/route": "app/api/im/gateway-token/route.js",
49
- "/api/im/projects/route": "app/api/im/projects/route.js",
50
48
  "/api/im/project/route": "app/api/im/project/route.js",
49
+ "/api/im/projects/route": "app/api/im/projects/route.js",
51
50
  "/api/im/session-ids/route": "app/api/im/session-ids/route.js",
52
51
  "/api/im/turn/route": "app/api/im/turn/route.js",
53
52
  "/api/internal/runtime/route": "app/api/internal/runtime/route.js",
@@ -55,20 +54,21 @@
55
54
  "/api/memory/promote/route": "app/api/memory/promote/route.js",
56
55
  "/api/models-config/discover/route": "app/api/models-config/discover/route.js",
57
56
  "/api/models-config/route": "app/api/models-config/route.js",
58
- "/api/plot-kernels/route": "app/api/plot-kernels/route.js",
57
+ "/api/models-config/test/route": "app/api/models-config/test/route.js",
58
+ "/api/files/[...path]/route": "app/api/files/[...path]/route.js",
59
59
  "/api/models/route": "app/api/models/route.js",
60
- "/api/plot-kernels/status/route": "app/api/plot-kernels/status/route.js",
60
+ "/api/plot-kernels/route": "app/api/plot-kernels/route.js",
61
61
  "/api/plot-kernels/save/route": "app/api/plot-kernels/save/route.js",
62
+ "/api/plot-kernels/status/route": "app/api/plot-kernels/status/route.js",
62
63
  "/api/plot-kernels/stop/route": "app/api/plot-kernels/stop/route.js",
63
- "/api/models-config/test/route": "app/api/models-config/test/route.js",
64
- "/api/skills/route": "app/api/skills/route.js",
64
+ "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
65
+ "/api/settings/route": "app/api/settings/route.js",
65
66
  "/api/skills/install/route": "app/api/skills/install/route.js",
66
- "/api/skills/search/route": "app/api/skills/search/route.js",
67
+ "/api/skills/route": "app/api/skills/route.js",
68
+ "/api/smoke/prompt-admission/route": "app/api/smoke/prompt-admission/route.js",
67
69
  "/api/subagents/status/route": "app/api/subagents/status/route.js",
68
70
  "/api/version/route": "app/api/version/route.js",
69
- "/api/smoke/prompt-admission/route": "app/api/smoke/prompt-admission/route.js",
70
- "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
71
- "/api/settings/route": "app/api/settings/route.js",
71
+ "/api/skills/search/route": "app/api/skills/search/route.js",
72
72
  "/login/page": "app/login/page.js",
73
73
  "/page": "app/page.js",
74
74
  "/smoke/session-stream/page": "app/smoke/session-stream/page.js",
@@ -1,22 +1,22 @@
1
- "use strict";exports.id=3041,exports.ids=[3041],exports.modules={29947:(a,b,c)=>{c.d(b,{ES:()=>m,IB:()=>n,SN:()=>e,tE:()=>o,xG:()=>l});let d="subagent",e=["retain","recall","reflect"],f=[],g=["read","bash","edit","write"],h=["bash","read","edit","write","grep","find","ls"],i=[...h,"kernel_plot_run","kernel_plot_render","kernel_plot_inspect","kernel_plot_stop","kernel_plot_artifacts"],j=[...h,d];function k(a){return[...a].sort().join(",")}function l(a){switch(a){case"none":return f;case"default":return g;case"workbench":return i;case"agent":return j;default:return h}}function m(a){let b=a.filter(a=>a.active).map(a=>a.name),c=b.filter(a=>!e.includes(a)),f=k(b),l=k(c);return""===f?"none":f===k(g)?"default":f===k(h)?"full":f===k(i)?"workbench":f===k(j)?"agent":""===l?"none":l===k(g)?"default":l===k(h)?"full":l===k(i)?"workbench":l===k(j)||b.includes(d)?"agent":"default"}function n(a){return e.filter(b=>a.some(a=>a.active&&a.name===b))}function o(a,b){return[...new Set([...l(a),...b])]}},33041:(a,b,c)=>{c.d(b,{T:()=>O});var d=c(67484);function e(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}var f=c(37267),g=c(31343);async function h(a,b){if(!b.length)return[];let c=await fetch("/api/images/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:a,images:b.map(a=>({data:a.data,mimeType:a.mimeType,name:a.name}))})}),d=await c.json().catch(()=>({}));if(!c.ok||d.error)throw Error(d.error??`Upload failed (HTTP ${c.status})`);return(d.uploaded??[]).map((a,c)=>({...a,previewUrl:b[c]?.previewUrl}))}async function i(a,b,c){let d,e=new TextDecoder,f="",g=a=>{if(a.startsWith("id: ")){d=a.slice(4);return}if(!a.startsWith("data: "))return;let c=a.slice(6);if("[DONE]"!==c)try{b(c,d)}catch{}finally{d=void 0}},h=new Promise(a=>{c?.aborted?a():c?.addEventListener("abort",()=>a(),{once:!0})});for(;;){let b=await Promise.race([a.read(),h.then(()=>({done:!0,value:void 0}))]);if(b.done)break;let c=(f+=e.decode(b.value,{stream:!0})).split("\n");for(let a of(f=c.pop()||"",c))g(a)}if(f.trim())for(let a of f.split("\n"))g(a)}c(81537);let j="__annovibeStreamSessions__",k="__annovibeStreamListeners__",l="__annovibeStreamErrorCallbacks__";function m(){let a=globalThis;return a[j]||(a[j]=new Map),a[j]}function n(){let a=globalThis;return a[l]||(a[l]=new Map),a[l]}function o(a){return{sessionId:a,phase:"idle",startedAt:null,lastEventAt:null,lastHeartbeatAt:null,reconnectCount:0,lastSyncReason:null,accumulatedText:"",toolCalls:[],toolResults:[],statusText:null,streamingMessage:null,isStreaming:!1,error:null}}function p(a,b){let c;for(let d of(!(c=globalThis)[k]&&(c[k]=new Map),c[k]).get(a)??[])try{d(b)}catch{}}function q(a){a.textThrottleTimer&&(clearTimeout(a.textThrottleTimer),a.textThrottleTimer=null),a.textDirty&&(a.textDirty=!1,s(a))}function r(a,b=!1){let c=Date.now();if(a.snapshot.lastEventAt=c,!b){a.textDirty=!0,a.textThrottleTimer||(a.textThrottleTimer=setTimeout(()=>{a.textThrottleTimer=null,a.textDirty&&(a.textDirty=!1,s(a))},100));return}q(a),s(a)}function s(a,b){let c=Date.now(),d=function(a){let b=[];for(let c of a.toolCalls.values())b.push({type:"toolCall",toolCallId:c.toolCallId,toolName:c.toolName,input:c.input??{}});let c=a.accumulatedText.trim();return c&&b.push({type:"text",text:c}),b}(a),e=(b??a.snapshot.phase)==="active";a.snapshot={...a.snapshot,phase:b??a.snapshot.phase,lastEventAt:c,accumulatedText:a.accumulatedText,toolCalls:[...a.toolCalls.values()],toolResults:[...a.toolResults.values()],statusText:e?function(a){if(a.activeToolId){let b=a.toolCalls.get(a.activeToolId);if(b){let a=Math.max(0,Math.floor((Date.now()-b.startedAt)/1e3));return`Running ${b.toolName||"tool"}… (${a}s)`}}return a.accumulatedText.trim()?"Generating response…":a.toolCalls.size>0?"Finishing tool results…":null}(a):a.snapshot.statusText,streamingMessage:e&&d.length>0?{role:"assistant",content:d}:null,isStreaming:e},p(a.snapshot.sessionId,{type:"snapshot-updated",snapshot:a.snapshot})}function t(a){u(a),a.idleCheckTimer=setInterval(()=>{if("connected"!==a.connectionState)return;let b=Math.max(a.snapshot.lastEventAt??0,a.snapshot.lastHeartbeatAt??0);if(Date.now()-b>=18e4){v(a),q(a);let b="Stream idle timeout — no activity for 180s.";a.snapshot={...a.snapshot,phase:"error",isStreaming:!1,streamingMessage:null,statusText:null,error:b},u(a),p(a.snapshot.sessionId,{type:"error",snapshot:a.snapshot});let c=n().get(a.snapshot.sessionId);if(c)try{c(a.snapshot.sessionId,b)}catch{}}},1e4)}function u(a){a.idleCheckTimer&&(clearInterval(a.idleCheckTimer),a.idleCheckTimer=null)}function v(a){a.toolProgressTimer&&(clearInterval(a.toolProgressTimer),a.toolProgressTimer=null)}function w(a){let b=m(),c=b.get(a);return c||(c={snapshot:o(a),accumulatedText:"",toolCalls:new Map,toolResults:new Map,toolProgressTimer:null,activeToolId:null,textThrottleTimer:null,textDirty:!1,connectionState:"idle",idleCheckTimer:null},b.set(a,c)),c}function x(a,b){let c=n();return c.set(a,b),()=>{c.get(a)===b&&c.delete(a)}}function y(a){let b=m(),c=b.get(a);c&&(v(c),u(c),q(c)),b.delete(a)}function z(a){let b=m().get(a);b&&(b.snapshot={...b.snapshot,reconnectCount:b.snapshot.reconnectCount+1,lastSyncReason:"sse-reconnect",lastEventAt:Date.now()},r(b,!0))}let A="__annovibeSessionMessageCache__";function B(){let a=globalThis;if(!a[A]){var b;let c={entries:new Map,cleanupTimer:null};a[A]=c,(b=c).cleanupTimer||(b.cleanupTimer=setInterval(()=>{let a=Date.now();for(let[c,d]of b.entries)a-d.loadedAt>72e5&&b.entries.delete(c)},6e4))}return a[A]}function C(a){let b=B(),c=b.entries.get(a);return c?Date.now()-c.loadedAt>72e5?(b.entries.delete(a),null):(c.loadedAt=Date.now(),{...c,messages:[...c.messages],entryIds:[...c.entryIds]}):null}function D(a,b,c,d,e){let f=B(),g=f.entries.get(a);if(!g)return;let h=new Set(g.entryIds),i=[],j=[];for(let a=0;a<b.length;a++){let d=c[a];d&&!h.has(d)&&(i.push(b[a]),j.push(d))}0!==i.length&&f.entries.set(a,{...g,messages:[...i,...g.messages],entryIds:[...j,...g.entryIds],hasMore:d,loadedMessagesCount:e,loadedAt:Date.now()})}function E(a){B().entries.delete(a)}var F=c(29947);function G(a,b){switch(b.type){case"start":return{isStreaming:!0,streamingMessage:null};case"update":return{isStreaming:!0,streamingMessage:b.message};case"end":case"reset":return{isStreaming:!1,streamingMessage:null};default:return a}}function H(a,b){return new DOMException(a,b)}function I(){return"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,11)}-${Math.random().toString(36).slice(2,11)}`}let J=["read","bash","grep","find","ls"];function K(a,b){return a.trim()||0!==b?`text:${a}|images:${b}`:null}function L(a){return"string"==typeof a?K(a,0):Array.isArray(a)?K(a.filter(a=>!!a&&"object"==typeof a&&"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("\n"),a.filter(a=>!!a&&"object"==typeof a&&"image"===a.type).length):null}function M(a){let b=new Map;for(let c of a){let a="user"!==c.role?null:L(c.content);a&&b.set(a,(b.get(a)??0)+1)}return b}function N(a,b,c){return a.sessionId===b&&(!a.leafId||c.includes(a.leafId))}function O(a){let{session:b,newSessionCwd:c,planMode:j=!1,onAgentEnd:k,onSessionCreated:l,onSessionForked:n,modelsRefreshKey:s,onBranchDataChange:A,onPlanModeState:O}=a,P=null===b&&null!==c,[Q,R]=(0,d.useState)(null),[S,T]=(0,d.useState)(!P),[U,V]=(0,d.useState)(null),[W,X]=(0,d.useState)(null),[Y,Z]=(0,d.useState)([]),[$,_]=(0,d.useState)([]),[aa,ab]=(0,d.useState)(0),[ac,ad]=(0,d.useState)(!1),[ae,af]=(0,d.useState)(0),[ag,ah]=(0,d.useReducer)(G,{isStreaming:!1,streamingMessage:null}),[ai,aj]=(0,d.useState)(!1),[ak,al]=(0,d.useState)({}),[am,an]=(0,d.useState)([]),[ao,ap]=(0,d.useState)({}),[aq,ar]=(0,d.useState)({}),[as,at]=(0,d.useState)(null),[au,av]=(0,d.useState)("full"),[aw,ax]=(0,d.useState)([...F.SN]),[ay,az]=(0,d.useState)("auto"),[aA,aB]=(0,d.useState)(null),[aC,aD]=(0,d.useState)(null),[aE,aF]=(0,d.useState)(null),[aG,aH]=(0,d.useState)(null),[aI,aJ]=(0,d.useState)(null),[aK,aL]=(0,d.useState)(null),[aM,aN]=(0,d.useState)(!1),[aO,aP]=(0,d.useState)(null),[aQ,aR]=(0,d.useState)(null),[aS,aT]=(0,d.useState)(null),aU=(0,d.useRef)(null),aV=(0,d.useRef)(b?.id??null),aW=(0,d.useRef)(!1),aX=(0,d.useRef)(null),aY=(0,d.useRef)(null),aZ=(0,d.useRef)(null),a$=(0,d.useRef)(!1),a_=(0,d.useRef)(null),a0=(0,d.useRef)(!1),a1=(0,d.useRef)(null),a2=(0,d.useRef)(null),a3=(0,d.useRef)(new Map),a4=(0,d.useRef)(new Map),a5=(0,d.useRef)(null),a6=(0,d.useRef)([]),a7=(0,d.useRef)(null),a8=(0,d.useRef)(0),a9=(0,d.useRef)(!1),ba=(0,d.useRef)(0),bb=(0,d.useRef)(!1);(0,d.useRef)(!1),(0,d.useRef)(0);let bc=(0,d.useRef)(null),bd=(0,d.useRef)(null),be=(0,d.useRef)(null),bf=(0,d.useRef)(!1),bg=a.setNewSessionModel??at,bh=a.setToolPreset??av,bi=a.setMemoryTools??ax,bj=aI??Q?.context.model??aK??null,bk=P?as:bj,bl=(0,d.useCallback)(()=>j?J:(0,F.tE)(au,aw),[aw,j,au]),bm=(0,d.useCallback)(a=>a?.length?a.map((a,b)=>{let c=`Attachment ${b+1}: ${a.fileName} (${a.mimeType||"application/octet-stream"}, ${a.size} bytes)`;if(a.extractedText){let b=a.truncated?"\n[The extracted text was truncated before sending.]":"";return`${c}
1
+ "use strict";exports.id=3041,exports.ids=[3041],exports.modules={29947:(a,b,c)=>{c.d(b,{ES:()=>m,IB:()=>n,SN:()=>e,tE:()=>o,xG:()=>l});let d="subagent",e=["retain","recall","reflect"],f=[],g=["read","bash","edit","write"],h=["bash","read","edit","write","grep","find","ls"],i=[...h,"kernel_plot_run","kernel_plot_render","kernel_plot_inspect","kernel_plot_stop","kernel_plot_artifacts"],j=[...h,d];function k(a){return[...a].sort().join(",")}function l(a){switch(a){case"none":return f;case"default":return g;case"workbench":return i;case"agent":return j;default:return h}}function m(a){let b=a.filter(a=>a.active).map(a=>a.name),c=b.filter(a=>!e.includes(a)),f=k(b),l=k(c);return""===f?"none":f===k(g)?"default":f===k(h)?"full":f===k(i)?"workbench":f===k(j)?"agent":""===l?"none":l===k(g)?"default":l===k(h)?"full":l===k(i)?"workbench":l===k(j)||b.includes(d)?"agent":"default"}function n(a){return e.filter(b=>a.some(a=>a.active&&a.name===b))}function o(a,b){return[...new Set([...l(a),...b])]}},33041:(a,b,c)=>{c.d(b,{T:()=>P});var d=c(67484);function e(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}var f=c(37267),g=c(31343);async function h(a,b){if(!b.length)return[];let c=await fetch("/api/images/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:a,images:b.map(a=>({data:a.data,mimeType:a.mimeType,name:a.name}))})}),d=await c.json().catch(()=>({}));if(!c.ok||d.error)throw Error(d.error??`Upload failed (HTTP ${c.status})`);return(d.uploaded??[]).map((a,c)=>({...a,previewUrl:b[c]?.previewUrl}))}async function i(a,b,c){let d,e=new TextDecoder,f="",g=a=>{if(a.startsWith("id: ")){d=a.slice(4);return}if(!a.startsWith("data: "))return;let c=a.slice(6);if("[DONE]"!==c)try{b(c,d)}catch{}finally{d=void 0}},h=new Promise(a=>{c?.aborted?a():c?.addEventListener("abort",()=>a(),{once:!0})});for(;;){let b=await Promise.race([a.read(),h.then(()=>({done:!0,value:void 0}))]);if(b.done)break;let c=(f+=e.decode(b.value,{stream:!0})).split("\n");for(let a of(f=c.pop()||"",c))g(a)}if(f.trim())for(let a of f.split("\n"))g(a)}c(81537);let j="__annovibeStreamSessions__",k="__annovibeStreamListeners__",l="__annovibeStreamErrorCallbacks__";function m(){let a=globalThis;return a[j]||(a[j]=new Map),a[j]}function n(){let a=globalThis;return a[l]||(a[l]=new Map),a[l]}function o(a){return{sessionId:a,phase:"idle",startedAt:null,lastEventAt:null,lastHeartbeatAt:null,reconnectCount:0,lastSyncReason:null,accumulatedText:"",toolCalls:[],toolResults:[],statusText:null,streamingMessage:null,isStreaming:!1,error:null}}function p(a,b){let c;for(let d of(!(c=globalThis)[k]&&(c[k]=new Map),c[k]).get(a)??[])try{d(b)}catch{}}function q(a){a.textThrottleTimer&&(clearTimeout(a.textThrottleTimer),a.textThrottleTimer=null),a.textDirty&&(a.textDirty=!1,s(a))}function r(a,b=!1){let c=Date.now();if(a.snapshot.lastEventAt=c,!b){a.textDirty=!0,a.textThrottleTimer||(a.textThrottleTimer=setTimeout(()=>{a.textThrottleTimer=null,a.textDirty&&(a.textDirty=!1,s(a))},100));return}q(a),s(a)}function s(a,b){let c=Date.now(),d=function(a){let b=[];for(let c of a.toolCalls.values())b.push({type:"toolCall",toolCallId:c.toolCallId,toolName:c.toolName,input:c.input??{}});let c=a.accumulatedText.trim();return c&&b.push({type:"text",text:c}),b}(a),e=(b??a.snapshot.phase)==="active";a.snapshot={...a.snapshot,phase:b??a.snapshot.phase,lastEventAt:c,accumulatedText:a.accumulatedText,toolCalls:[...a.toolCalls.values()],toolResults:[...a.toolResults.values()],statusText:e?function(a){if(a.activeToolId){let b=a.toolCalls.get(a.activeToolId);if(b){let a=Math.max(0,Math.floor((Date.now()-b.startedAt)/1e3));return`Running ${b.toolName||"tool"}… (${a}s)`}}return a.accumulatedText.trim()?"Generating response…":a.toolCalls.size>0?"Finishing tool results…":null}(a):a.snapshot.statusText,streamingMessage:e&&d.length>0?{role:"assistant",content:d}:null,isStreaming:e},p(a.snapshot.sessionId,{type:"snapshot-updated",snapshot:a.snapshot})}function t(a){u(a),a.idleCheckTimer=setInterval(()=>{if("connected"!==a.connectionState)return;let b=Math.max(a.snapshot.lastEventAt??0,a.snapshot.lastHeartbeatAt??0);if(Date.now()-b>=18e4){v(a),q(a);let b="Stream idle timeout — no activity for 180s.";a.snapshot={...a.snapshot,phase:"error",isStreaming:!1,streamingMessage:null,statusText:null,error:b},u(a),p(a.snapshot.sessionId,{type:"error",snapshot:a.snapshot});let c=n().get(a.snapshot.sessionId);if(c)try{c(a.snapshot.sessionId,b)}catch{}}},1e4)}function u(a){a.idleCheckTimer&&(clearInterval(a.idleCheckTimer),a.idleCheckTimer=null)}function v(a){a.toolProgressTimer&&(clearInterval(a.toolProgressTimer),a.toolProgressTimer=null)}function w(a){let b=m(),c=b.get(a);return c||(c={snapshot:o(a),accumulatedText:"",toolCalls:new Map,toolResults:new Map,toolProgressTimer:null,activeToolId:null,textThrottleTimer:null,textDirty:!1,connectionState:"idle",idleCheckTimer:null},b.set(a,c)),c}function x(a,b){let c=n();return c.set(a,b),()=>{c.get(a)===b&&c.delete(a)}}function y(a){let b=m(),c=b.get(a);c&&(v(c),u(c),q(c)),b.delete(a)}function z(a){let b=m().get(a);b&&(b.snapshot={...b.snapshot,reconnectCount:b.snapshot.reconnectCount+1,lastSyncReason:"sse-reconnect",lastEventAt:Date.now()},r(b,!0))}let A="__annovibeSessionMessageCache__";function B(){let a=globalThis;if(!a[A]){var b;let c={entries:new Map,cleanupTimer:null};a[A]=c,(b=c).cleanupTimer||(b.cleanupTimer=setInterval(()=>{let a=Date.now();for(let[c,d]of b.entries)a-d.loadedAt>72e5&&b.entries.delete(c)},6e4))}return a[A]}function C(a){let b=B(),c=b.entries.get(a);return c?Date.now()-c.loadedAt>72e5?(b.entries.delete(a),null):(c.loadedAt=Date.now(),{...c,messages:[...c.messages],entryIds:[...c.entryIds]}):null}function D(a,b,c,d,e){let f=B(),g=f.entries.get(a);if(!g)return;let h=new Set(g.entryIds),i=[],j=[];for(let a=0;a<b.length;a++){let d=c[a];d&&!h.has(d)&&(i.push(b[a]),j.push(d))}0!==i.length&&f.entries.set(a,{...g,messages:[...i,...g.messages],entryIds:[...j,...g.entryIds],hasMore:d,loadedMessagesCount:e,loadedAt:Date.now()})}function E(a){B().entries.delete(a)}var F=c(29947);function G(a,b){switch(b.type){case"start":return{isStreaming:!0,streamingMessage:null};case"update":return{isStreaming:!0,streamingMessage:b.message};case"end":case"reset":return{isStreaming:!1,streamingMessage:null};default:return a}}function H(a,b){return new DOMException(a,b)}function I(){return"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,11)}-${Math.random().toString(36).slice(2,11)}`}let J=["read","bash","grep","find","ls"];function K(a,b){return a.trim()||0!==b?`text:${a}|images:${b}`:null}function L(a){return"string"==typeof a?K(a,0):Array.isArray(a)?K(a.filter(a=>!!a&&"object"==typeof a&&"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("\n"),a.filter(a=>!!a&&"object"==typeof a&&"image"===a.type).length):null}function M(a){let b=new Map;for(let c of a){let a="user"!==c.role?null:L(c.content);a&&b.set(a,(b.get(a)??0)+1)}return b}function N(a,b,c){return a.sessionId===b&&(!a.leafId||c.includes(a.leafId))}function O(a,b){let c=a.timestamp,d=b.timestamp;if("number"!=typeof c||"number"!=typeof d||c!==d||a.role!==b.role)return!1;try{return JSON.stringify(a)===JSON.stringify(b)}catch{return!1}}function P(a){let{session:b,newSessionCwd:c,planMode:j=!1,onAgentEnd:k,onSessionCreated:l,onSessionForked:n,modelsRefreshKey:s,onBranchDataChange:A,onPlanModeState:P}=a,Q=null===b&&null!==c,[R,S]=(0,d.useState)(null),[T,U]=(0,d.useState)(!Q),[V,W]=(0,d.useState)(null),[X,Y]=(0,d.useState)(null),[Z,$]=(0,d.useState)([]),[_,aa]=(0,d.useState)([]),[ab,ac]=(0,d.useState)(0),[ad,ae]=(0,d.useState)(!1),[af,ag]=(0,d.useState)(0),[ah,ai]=(0,d.useReducer)(G,{isStreaming:!1,streamingMessage:null}),[aj,ak]=(0,d.useState)(!1),[al,am]=(0,d.useState)({}),[an,ao]=(0,d.useState)([]),[ap,aq]=(0,d.useState)({}),[ar,as]=(0,d.useState)({}),[at,au]=(0,d.useState)(null),[av,aw]=(0,d.useState)("full"),[ax,ay]=(0,d.useState)([...F.SN]),[az,aA]=(0,d.useState)("auto"),[aB,aC]=(0,d.useState)(null),[aD,aE]=(0,d.useState)(null),[aF,aG]=(0,d.useState)(null),[aH,aI]=(0,d.useState)(null),[aJ,aK]=(0,d.useState)(null),[aL,aM]=(0,d.useState)(null),[aN,aO]=(0,d.useState)(!1),[aP,aQ]=(0,d.useState)(null),[aR,aS]=(0,d.useState)(null),[aT,aU]=(0,d.useState)(null),aV=(0,d.useRef)(null),aW=(0,d.useRef)(b?.id??null),aX=(0,d.useRef)(!1),aY=(0,d.useRef)(null),aZ=(0,d.useRef)(null),a$=(0,d.useRef)(null),a_=(0,d.useRef)(!1),a0=(0,d.useRef)(null),a1=(0,d.useRef)(!1),a2=(0,d.useRef)(null),a3=(0,d.useRef)(null),a4=(0,d.useRef)(new Map),a5=(0,d.useRef)(new Map),a6=(0,d.useRef)(new Map),a7=(0,d.useRef)(null),a8=(0,d.useRef)([]),a9=(0,d.useRef)(null),ba=(0,d.useRef)(0),bb=(0,d.useRef)(!1),bc=(0,d.useRef)(0),bd=(0,d.useRef)(!1);(0,d.useRef)(!1),(0,d.useRef)(0);let be=(0,d.useRef)(null),bf=(0,d.useRef)(null),bg=a.setNewSessionModel??au,bh=a.setToolPreset??aw,bi=a.setMemoryTools??ay,bj=aJ??R?.context.model??aL??null,bk=Q?at:bj,bl=(0,d.useCallback)(()=>j?J:(0,F.tE)(av,ax),[ax,j,av]),bm=(0,d.useCallback)(a=>a?.length?a.map((a,b)=>{let c=`Attachment ${b+1}: ${a.fileName} (${a.mimeType||"application/octet-stream"}, ${a.size} bytes)`;if(a.extractedText){let b=a.truncated?"\n[The extracted text was truncated before sending.]":"";return`${c}
2
2
  ${b}
3
3
  ${a.extractedText}`.trim()}return`${c}
4
- [Text extraction unavailable: ${a.extractionError??"unsupported file type"}]`}).join("\n\n---\n\n"):"",[]),bn=(0,d.useCallback)(async a=>{let b=await fetch(`/api/agent/${encodeURIComponent(a)}/prepare`,{method:"POST"});if(!b.ok)throw Error((await b.json().catch(()=>({}))).error??`Failed to prepare session (HTTP ${b.status})`)},[]),bo=(()=>{let a={input:0,output:0,cacheRead:0,cacheWrite:0},b=0;for(let c of Y){if("assistant"!==c.role)continue;let d=c.usage;d&&(a.input+=d.input??0,a.output+=d.output??0,a.cacheRead+=d.cacheRead??0,a.cacheWrite+=d.cacheWrite??0,b+=d.cost?.total??0)}return a.input+a.output+a.cacheRead+a.cacheWrite>0?{tokens:a,cost:b}:null})(),bp=(0,d.useRef)(!1),bq=(0,d.useCallback)(async()=>{let a=aV.current;if(!a||bp.current||bb.current)return;bp.current=!0,a9.current=!0;let b=0,c=C(a);b=c?c.loadedMessagesCount:50;try{for(;;)try{let c=await fetch(`/api/sessions/${encodeURIComponent(a)}?limit=100&offset=${b}`);if(!c.ok)break;let d=await c.json();if(aV.current!==a)break;let e=d.context.messages,f=d.context.entryIds??[];if(0===e.length)break;Z(a=>[...e,...a]),_(a=>{let b=[...f,...a];return a6.current=b,b});let g=b+e.length;if(af(g),ba.current=g,ad(d.hasMore??!1),D(a,e,f,d.hasMore??!1,g),b=g,!d.hasMore)break;await new Promise(a=>setTimeout(a,800))}catch{break}}finally{bp.current=!1,bb.current=!0,a9.current=!1}},[]),br=(0,d.useCallback)(async(a,b=!1,c=!1,d=!1)=>{var e;let f=null;try{if(b&&T(!0),!c&&!aW.current&&!d){let c=C(a);if(c)return ab(c.totalMessages),ad(c.hasMore),af(c.loadedMessagesCount),Z(c.messages),a6.current=c.entryIds,_(c.entryIds),a5.current=c.leafId,X(c.leafId),ba.current=c.loadedMessagesCount,b&&T(!1),c.hasMore&&!bb.current&&setTimeout(()=>{bq()},1500),null}let g=c?`/api/sessions/${encodeURIComponent(a)}?includeState`:`/api/sessions/${encodeURIComponent(a)}?limit=50&offset=0`,h=bd.current;if(h?.sid===a&&!b)return null;h?.controller.abort(H("Session load superseded","AbortError"));let i=new AbortController;f=i,bd.current={sid:a,controller:i};let j=setTimeout(()=>{i.abort(H("Session load timed out after 30 seconds","TimeoutError"))},3e4),k=await fetch(g,{signal:i.signal}).finally(()=>clearTimeout(j));if(aV.current&&aV.current!==a)return null;if(404===k.status)return b&&(R(null),a5.current=null,X(null),Z([]),V(null)),null;if(!k.ok)throw Error(`HTTP ${k.status}`);let l=await k.json();c?(ab(l.totalMessages??l.context.messages.length),ad(!1)):(ab(l.totalMessages??l.context.messages.length),ad(l.hasMore??!1)),af(l.context.messages.length),R(l),a5.current=l.leafId,X(l.leafId);let m=l.context.messages,n=M(m),o=new Map,p=Date.now();for(let[b,c]of a3.current)if(c.sessionId===a){if(p-c.createdAt>12e4){a3.current.delete(b);continue}if(c.confirmKey){let a=n.get(c.confirmKey)??0,d=o.get(c.confirmKey)??0;a-d>c.confirmCountAtCreate&&(a3.current.delete(b),o.set(c.confirmKey,d+1))}}a4.current=n;let q=l.context.entryIds??[],r=[...a3.current.values()].filter(b=>N(b,a,q)).map(a=>a.message),s=r.length>0?[...m,...r]:m,t=s.length;return!c&&ba.current>t?(ab(l.totalMessages??l.context.messages.length),ad(l.hasMore??!1)):(Z(s),a6.current=q,_(q),c?ba.current=t:ba.current=Math.max(ba.current,t),e={sessionId:a,leafId:l.leafId,messages:s,entryIds:q,totalMessages:l.totalMessages??l.context.messages.length,hasMore:!c&&(l.hasMore??!1),loadedMessagesCount:l.context.messages.length},B().entries.set(a,{...e,loadedAt:Date.now()})),aJ(a=>{if(!a)return null;let b=l.context.model;return b?.provider===a.provider&&b.modelId===a.modelId?null:a}),V(null),!l.agentState?.state?.thinkingLevel&&l.context.thinkingLevel&&"off"!==l.context.thinkingLevel&&az(l.context.thinkingLevel),l.agentState?.state?.planMode&&O?.(l.agentState.state.planMode),l.agentState??null}catch(a){if(a instanceof DOMException&&("AbortError"===a.name||"TimeoutError"===a.name)||a instanceof Error&&/aborted without reason|AbortError|Session load (?:timed out|superseded)/i.test(a.message))return null;return V(String(a)),null}finally{f&&bd.current?.controller===f&&(bd.current=null),b&&T(!1)}},[O,bq]),bs=(0,d.useRef)(!1),bt=(0,d.useCallback)(async()=>{if(bs.current)return;bs.current=!0;let a=aV.current;if(!a){bs.current=!1;return}try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}?limit=50&offset=${ae}`);if(!b.ok)return;let c=await b.json(),d=c.context.messages,e=c.context.entryIds??[];Z(a=>[...d,...a]),_(a=>{let b=[...e,...a];return a6.current=b,b}),af(a=>a+d.length),ad(c.hasMore??!1),D(a,d,e,c.hasMore??!1,ae+d.length)}catch{}finally{bs.current=!1}},[ae]),bu=(0,d.useCallback)(async(a,b)=>{try{let c=b?`/api/sessions/${encodeURIComponent(a)}/context?leafId=${encodeURIComponent(b)}`:`/api/sessions/${encodeURIComponent(a)}/context`,d=await fetch(c);if(!d.ok)throw Error(`HTTP ${d.status}`);let e=await d.json(),f=e.context.messages,g=e.context.entryIds??[],h=M(f),i=new Map,j=Date.now();for(let[b,c]of a3.current)if(c.sessionId===a){if(j-c.createdAt>12e4){a3.current.delete(b);continue}if(c.confirmKey){let a=h.get(c.confirmKey)??0,d=i.get(c.confirmKey)??0;a-d>c.confirmCountAtCreate&&(a3.current.delete(b),i.set(c.confirmKey,d+1))}}a4.current=h;let k=[...a3.current.values()].filter(b=>N(b,a,g)).map(a=>a.message);Z(k.length>0?[...f,...k]:f),a6.current=g,_(g)}catch(a){console.error("Failed to load context:",a)}},[]),bv=(0,d.useCallback)(async a=>{try{let b=await (0,f.$)(a,{type:"get_tools"});b&&(bh((0,F.ES)(b)),bi((0,F.IB)(b)))}catch(a){console.error("Failed to load tools:",a)}},[bi,bh]),bw=(0,d.useCallback)((a,b={})=>{aU.current?.close(),aU.current=null;let c=`/api/agent/${encodeURIComponent(a)}/events${b.replay?"?replay=1":""}`;return!function(a){let b=w(a);if("active"===b.snapshot.phase)return r(b,!0),t(b),b.snapshot;let c=Date.now();b.snapshot={...o(a),phase:"active",startedAt:c,lastEventAt:c,isStreaming:!0,streamingMessage:{role:"assistant",content:[]}},t(b),r(b,!0),b.snapshot}(a),new Promise((d,e)=>{let f=!1,g=!1,h=null,j=a=>{if(!f){if(f=!0,clearTimeout(k),a){h?.close(),aU.current===h&&(aU.current=null),e(a);return}d()}},k=setTimeout(()=>{b.requireConnected?j(Error("Timed out waiting for event stream connection")):j()},b.timeoutMs??3e4);aU.current=h=function(a){let{url:b,onEvent:c,onStateChange:d,onFatalError:e,maxReconnectAttempts:f=1/0,reconnectBaseMs:g=1e3,reconnectMaxMs:h=3e4,autoReconnect:j=!0}=a,k="idle",l=new AbortController,m=0,n=null,o=null,p=!1,q=(a,b)=>{b&&(o=b),c(a,b)},r=a=>{k!==a&&(k=a,d?.(a))},s=()=>{null!==n&&(clearTimeout(n),n=null)},t=()=>{if(p)return;if(!j)return void r("error");if(m>=f){r("error"),e?.(Error(`Max reconnect attempts (${f}) reached`));return}let a=Math.min(h,g*2**m);m+=1,r("connecting"),n=setTimeout(()=>{n=null,u()},a)},u=async()=>{if(!p){s(),l=new AbortController,r("connecting");try{let a=await fetch(b,{signal:l.signal,headers:{Accept:"text/event-stream","Cache-Control":"no-cache",...o?{"Last-Event-ID":o}:{}}});if(!a.ok)throw Error(`HTTP ${a.status}: ${a.statusText}`);let c=a.body;if(!c)throw Error("Response has no readable body");let d=c.getReader();if(r("connected"),m=0,await i(d,q,l.signal),l.signal.aborted)try{await d.cancel()}catch{}d.releaseLock(),r("closed"),!p&&j&&t()}catch(a){if(p||a instanceof DOMException&&"AbortError"===a.name)return void r("closed");r("error"),j&&t()}}};return{get state(){return k},connect:()=>{p=!1,m=0,s(),u()},close:()=>{p=!0,s(),l.abort(),r("closed")},get abortController(){return l}}}({url:c,onEvent:b=>{try{let c=JSON.parse(b);if("connected"===c.type&&j(),aV.current!==a)return;aX.current?.(c)}catch{}},onStateChange:b=>{!function(a,b){let c=m().get(a);if(!c)return;let d=c.connectionState;c.connectionState=b,"connected"===b&&"connected"!==d&&(c.snapshot={...c.snapshot,lastEventAt:Date.now(),lastHeartbeatAt:Date.now()},t(c)),"connected"!==b&&"connected"===d&&u(c)}(a,b),"connected"===b&&(g&&(z(a),aY.current?.(a,"sse_reconnected")),g=!0)},reconnectBaseMs:1e3,reconnectMaxMs:3e4}),h.connect()})},[]),bx=(0,d.useCallback)(async(a,b="manual")=>{if(!a||aV.current!==a)return;let c=a8.current;try{let b=await fetch(`/api/agent/${encodeURIComponent(a)}`),e=await b.json().catch(()=>({}));if(aV.current!==a||a8.current!==c)return;if(e.running){var d;aW.current=!0,aj(!0),aR((d=e.state,d?.phase==="running_tools"?{kind:"running_tools",tools:(d.activeTools??[]).map(a=>({id:a.id,name:a.name}))}:d?.phase==="streaming"||d?.phase==="compacting"||d?.phase==="idle"?null:{kind:"waiting_model"})),("u"<typeof document||"hidden"!==document.visibilityState)&&(!aU.current||"closed"===aU.current.state||"error"===aU.current.state)&&(z(a),bw(a,{replay:!0}))}else aW.current=!1,aU.current?.close(),aU.current=null,y(a),aj(!1),aR(null),aB(null),ah({type:"end"}),E(a),await br(a,!1,!1,!0);e.state?.contextUsage!==void 0&&aD(e.state.contextUsage??null),e.state?.systemPrompt!==void 0&&aF(e.state.systemPrompt??null),e.state?.isCompacting!==void 0&&aN(e.state.isCompacting),e.state?.thinkingLevel!==void 0&&az(e.state.thinkingLevel??"auto"),e.state?.planMode!==void 0&&O?.(e.state.planMode)}catch{}},[bw,br,O]);aX.current=(0,d.useCallback)(a=>{let b=aV.current;switch(b&&function(a,b){let c=w(a),d=Date.now();switch(b.type){case"agent_start":if("active"===c.snapshot.phase)return r(c,!0),c.snapshot;return v(c),c.accumulatedText="",c.toolCalls.clear(),c.toolResults.clear(),c.activeToolId=null,c.snapshot={...o(a),phase:"active",startedAt:d,lastEventAt:d,isStreaming:!0,streamingMessage:{role:"assistant",content:[]}},t(c),r(c,!0),c.snapshot;case"message_update":{let a=b.message;if(!a||"assistant"!==a.role)return c.snapshot;let e=a.content;for(let a of Array.isArray(e)?e:[])"object"==typeof a&&null!==a&&"type"in a&&("text"===a.type?c.accumulatedText=a.text??"":"toolCall"===a.type&&a.toolCallId&&!c.toolCalls.has(a.toolCallId)&&c.toolCalls.set(a.toolCallId,{...a,startedAt:d}));return r(c,!1),c.snapshot}case"tool_execution_start":{let a="string"==typeof b.toolCallId?b.toolCallId:"",e="string"==typeof b.toolName?b.toolName:"tool",f=b.input??{};if(!a)return c.snapshot;let g=c.toolCalls.get(a);return c.toolCalls.set(a,{type:"toolCall",toolCallId:a,toolName:e,input:g?.input??f,startedAt:g?.startedAt??d}),c.activeToolId=a,v(c),c.activeToolId&&(c.toolProgressTimer=setInterval(()=>r(c,!0),1e3)),r(c,!0),c.snapshot}case"tool_execution_end":{let a="string"==typeof b.toolCallId?b.toolCallId:"",e="string"==typeof b.toolName?b.toolName:"tool",f="string"==typeof b.result?b.result:JSON.stringify(b.result??"");if(a){let g=c.toolCalls.get(a);g&&c.toolCalls.set(a,{...g,endedAt:d}),c.toolResults.set(a,{role:"toolResult",toolCallId:a,toolName:e,content:[{type:"text",text:f}],isError:!!b.isError,timestamp:d}),c.activeToolId===a&&(c.activeToolId=null,v(c))}return r(c,!0),c.snapshot}case"message_end":return q(c),r(c,!0),c.snapshot;case"agent_end":{if(q(c),v(c),c.activeToolId=null,!0===b.willRetry)return c.accumulatedText="",c.toolCalls.clear(),c.toolResults.clear(),c.snapshot={...c.snapshot,phase:"active",lastEventAt:d,accumulatedText:"",toolCalls:[],toolResults:[],statusText:null,streamingMessage:null,isStreaming:!0,error:null},t(c),p(a,{type:"snapshot-updated",snapshot:c.snapshot}),c.snapshot;u(c);let e="string"==typeof b.error?b.error:null;return c.snapshot={...c.snapshot,phase:e?"error":"completed",isStreaming:!1,streamingMessage:null,statusText:null,error:e},p(a,e?{type:"error",snapshot:c.snapshot}:{type:"completed",snapshot:c.snapshot}),c.snapshot}case"heartbeat":return c.snapshot={...c.snapshot,lastHeartbeatAt:d},c.snapshot;default:return c.snapshot}}(b,a),a.type){case"prompt_admitted":case"agent_start":aT(null),aW.current=!0,aj(!0),aR({kind:"waiting_model"}),ah({type:"start"});break;case"agent_end":if(!0===a.willRetry){aW.current=!0,aj(!0),aR({kind:"waiting_model"});break}aW.current=!1,aU.current?.close(),aU.current=null,aj(!1),aR(null),aB(null),ah({type:"end"}),b&&(E(b),br(b,!1,!1,!0),bc.current&&clearTimeout(bc.current),bc.current=setTimeout(()=>{aV.current!==b||aW.current||(E(b),br(b,!1,!1,!0))},500),fetch(`/api/agent/${encodeURIComponent(b)}`).then(a=>a.json()).then(a=>{a.state?.contextUsage!==void 0&&aD(a.state.contextUsage??null),a.state?.systemPrompt!==void 0&&aF(a.state.systemPrompt??null),a.state?.isCompacting!==void 0&&aN(a.state.isCompacting)}).catch(()=>{})),k?.();break;case"message_start":case"message_update":{if(!aW.current)break;let b=a.message;if(b?.role==="user")break;b&&ah({type:"update",message:e(b)}),aR(null);break}case"message_end":{if(!aW.current)break;let b=a.message,c="string"==typeof a.__entryId?a.__entryId:null;if(b&&"user"!==b.role){"assistant"===b.role&&"error"===b.stopReason&&b.errorMessage?.trim()&&aT(`Model response failed: ${b.errorMessage.trim()}`);let a=e(b);!(c&&a6.current.includes(c))&&(Z(b=>b.some(b=>(function(a,b){let c=a.timestamp,d=b.timestamp;if("number"!=typeof c||"number"!=typeof d||c!==d||a.role!==b.role)return!1;try{return JSON.stringify(a)===JSON.stringify(b)}catch{return!1}})(b,a))?b:[...b,a]),c&&_(a=>{if(a.includes(c))return a;let b=[...a,c];return a6.current=b,b}))}ah({type:"reset"}),aR({kind:"waiting_model"});break}case"replay_gap":b&&(E(b),br(b,!1,!1,!0));break;case"prompt_done":if(!aW.current)break;bx(aV.current??"","prompt_done");break;case"prompt_error":{let c="string"==typeof a.error&&a.error.trim()?a.error.trim():"The model request failed before producing a response.";if(aW.current=!1,aj(!1),aR(null),aB(null),ah({type:"end"}),aU.current?.close(),aU.current=null,b){for(let[a,c]of(y(b),a3.current))c.sessionId===b&&"prompt"===c.kind&&a3.current.delete(a);E(b),br(b,!1,!1,!0)}aT(`Model request failed: ${c}`),k?.();break}case"tool_execution_start":{let b=a.toolCallId,c=a.toolName,d=a.args,e="bash"===c&&"string"==typeof d?.command?d.command:void 0;aR(a=>{let d=a?.kind==="running_tools"?[...a.tools]:[];return d.some(a=>a.id===b)||d.push({id:b,name:c,args:e}),{kind:"running_tools",tools:d}});break}case"tool_execution_end":{let b=a.toolCallId;aR(a=>{if(a?.kind!=="running_tools")return a;let c=a.tools.filter(a=>a.id!==b);return 0===c.length?{kind:"waiting_model"}:{kind:"running_tools",tools:c}});break}case"auto_retry_start":aT(null),aW.current=!0,aj(!0),aR({kind:"waiting_model"}),aB({attempt:a.attempt,maxAttempts:a.maxAttempts,errorMessage:a.errorMessage});break;case"auto_retry_end":aB(null),!1===a.success&&"string"==typeof a.finalError&&a.finalError.trim()?aT(`Model response failed after retries: ${a.finalError.trim()}`):!0===a.success&&aT(null);break;case"auto_compaction_start":case"compaction_start":aN(!0),aP(null);break;case"auto_compaction_end":case"compaction_end":aN(!1),a.errorMessage?aP(a.errorMessage):!a.aborted&&aV.current&&br(aV.current)}},[br,k,bx]);let by=(0,d.useCallback)(async(a,d,e,i)=>{if(!a.trim()&&!d?.length&&!e?.length||ai)return;a8.current+=1;let k=bm(e),m=a.trim()?k?`${a}
4
+ [Text extraction unavailable: ${a.extractionError??"unsupported file type"}]`}).join("\n\n---\n\n"):"",[]),bn=(0,d.useCallback)(async a=>{let b=await fetch(`/api/agent/${encodeURIComponent(a)}/prepare`,{method:"POST"});if(!b.ok)throw Error((await b.json().catch(()=>({}))).error??`Failed to prepare session (HTTP ${b.status})`)},[]),bo=(()=>{let a={input:0,output:0,cacheRead:0,cacheWrite:0},b=0;for(let c of Z){if("assistant"!==c.role)continue;let d=c.usage;d&&(a.input+=d.input??0,a.output+=d.output??0,a.cacheRead+=d.cacheRead??0,a.cacheWrite+=d.cacheWrite??0,b+=d.cost?.total??0)}return a.input+a.output+a.cacheRead+a.cacheWrite>0?{tokens:a,cost:b}:null})(),bp=(0,d.useRef)(!1),bq=(0,d.useCallback)(async()=>{let a=aW.current;if(!a||bp.current||bd.current)return;bp.current=!0,bb.current=!0;let b=0,c=C(a);b=c?c.loadedMessagesCount:50;try{for(;;)try{let c=await fetch(`/api/sessions/${encodeURIComponent(a)}?limit=100&offset=${b}`);if(!c.ok)break;let d=await c.json();if(aW.current!==a)break;let e=d.context.messages,f=d.context.entryIds??[];if(0===e.length)break;$(a=>[...e,...a]),aa(a=>{let b=[...f,...a];return a8.current=b,b});let g=b+e.length;if(ag(g),bc.current=g,ae(d.hasMore??!1),D(a,e,f,d.hasMore??!1,g),b=g,!d.hasMore)break;await new Promise(a=>setTimeout(a,800))}catch{break}}finally{bp.current=!1,bd.current=!0,bb.current=!1}},[]),br=(0,d.useCallback)(async(a,b=!1,c=!1,d=!1)=>{var e;let f=null;try{if(b&&U(!0),!c&&!aX.current&&!d){let c=C(a);if(c)return ac(c.totalMessages),ae(c.hasMore),ag(c.loadedMessagesCount),$(c.messages),a8.current=c.entryIds,aa(c.entryIds),a7.current=c.leafId,Y(c.leafId),bc.current=c.loadedMessagesCount,b&&U(!1),c.hasMore&&!bd.current&&setTimeout(()=>{bq()},1500),null}let g=c?`/api/sessions/${encodeURIComponent(a)}?includeState`:`/api/sessions/${encodeURIComponent(a)}?limit=50&offset=0`,h=bf.current;if(h?.sid===a&&!b)return null;h?.controller.abort(H("Session load superseded","AbortError"));let i=new AbortController;f=i,bf.current={sid:a,controller:i};let j=setTimeout(()=>{i.abort(H("Session load timed out after 30 seconds","TimeoutError"))},3e4),k=await fetch(g,{signal:i.signal}).finally(()=>clearTimeout(j));if(aW.current&&aW.current!==a)return null;if(404===k.status)return b&&(S(null),a7.current=null,Y(null),$([]),W(null)),null;if(!k.ok)throw Error(`HTTP ${k.status}`);let l=await k.json();c?(ac(l.totalMessages??l.context.messages.length),ae(!1)):(ac(l.totalMessages??l.context.messages.length),ae(l.hasMore??!1)),ag(l.context.messages.length),S(l),a7.current=l.leafId,Y(l.leafId);let m=l.context.messages,n=M(m),o=new Map,p=Date.now();for(let[b,c]of a4.current)if(c.sessionId===a){if(p-c.createdAt>12e4){a4.current.delete(b);continue}if(c.confirmKey){let a=n.get(c.confirmKey)??0,d=o.get(c.confirmKey)??0;a-d>c.confirmCountAtCreate&&(a4.current.delete(b),o.set(c.confirmKey,d+1))}}a5.current=n;let q=l.context.entryIds??[],r=[...a4.current.values()].filter(b=>N(b,a,q)).map(a=>a.message),s=r.length>0?[...m,...r]:m,t=a6.current.get(a);if(t){for(let[a,b]of t)p-b>12e4&&t.delete(a);0===t.size&&a6.current.delete(a)}let u=t?.size?t:null,v=u?new Set(q):null,w=!!u&&!!v&&[...u.keys()].some(a=>!v.has(a));u&&v&&!w&&a6.current.delete(a);let x=s.length;return!c&&(bc.current>x||w)?(ac(l.totalMessages??l.context.messages.length),ae(l.hasMore??!1)):($(a=>(function(a,b){if(a.length!==b.length)return b;let c=!1,d=b.map((b,d)=>O(a[d],b)?a[d]:(c=!0,b));return c?d:a})(a,s)),a8.current=q,aa(q),c?bc.current=x:bc.current=Math.max(bc.current,x),e={sessionId:a,leafId:l.leafId,messages:s,entryIds:q,totalMessages:l.totalMessages??l.context.messages.length,hasMore:!c&&(l.hasMore??!1),loadedMessagesCount:l.context.messages.length},B().entries.set(a,{...e,loadedAt:Date.now()})),aK(a=>{if(!a)return null;let b=l.context.model;return b?.provider===a.provider&&b.modelId===a.modelId?null:a}),W(null),!l.agentState?.state?.thinkingLevel&&l.context.thinkingLevel&&"off"!==l.context.thinkingLevel&&aA(l.context.thinkingLevel),l.agentState?.state?.planMode&&P?.(l.agentState.state.planMode),l.agentState??null}catch(a){if(a instanceof DOMException&&("AbortError"===a.name||"TimeoutError"===a.name)||a instanceof Error&&/aborted without reason|AbortError|Session load (?:timed out|superseded)/i.test(a.message))return null;return W(String(a)),null}finally{f&&bf.current?.controller===f&&(bf.current=null),b&&U(!1)}},[P,bq]),bs=(0,d.useRef)(!1),bt=(0,d.useCallback)(async()=>{if(bs.current)return;bs.current=!0;let a=aW.current;if(!a){bs.current=!1;return}try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}?limit=50&offset=${af}`);if(!b.ok)return;let c=await b.json(),d=c.context.messages,e=c.context.entryIds??[];$(a=>[...d,...a]),aa(a=>{let b=[...e,...a];return a8.current=b,b}),ag(a=>a+d.length),ae(c.hasMore??!1),D(a,d,e,c.hasMore??!1,af+d.length)}catch{}finally{bs.current=!1}},[af]),bu=(0,d.useCallback)(async(a,b)=>{try{let c=b?`/api/sessions/${encodeURIComponent(a)}/context?leafId=${encodeURIComponent(b)}`:`/api/sessions/${encodeURIComponent(a)}/context`,d=await fetch(c);if(!d.ok)throw Error(`HTTP ${d.status}`);let e=await d.json(),f=e.context.messages,g=e.context.entryIds??[],h=M(f),i=new Map,j=Date.now();for(let[b,c]of a4.current)if(c.sessionId===a){if(j-c.createdAt>12e4){a4.current.delete(b);continue}if(c.confirmKey){let a=h.get(c.confirmKey)??0,d=i.get(c.confirmKey)??0;a-d>c.confirmCountAtCreate&&(a4.current.delete(b),i.set(c.confirmKey,d+1))}}a5.current=h;let k=[...a4.current.values()].filter(b=>N(b,a,g)).map(a=>a.message);$(k.length>0?[...f,...k]:f),a8.current=g,aa(g)}catch(a){console.error("Failed to load context:",a)}},[]),bv=(0,d.useCallback)(async a=>{try{let b=await (0,f.$)(a,{type:"get_tools"});b&&(bh((0,F.ES)(b)),bi((0,F.IB)(b)))}catch(a){console.error("Failed to load tools:",a)}},[bi,bh]),bw=(0,d.useCallback)((a,b={})=>{aV.current?.close(),aV.current=null;let c=`/api/agent/${encodeURIComponent(a)}/events${b.replay?"?replay=1":""}`;return!function(a){let b=w(a);if("active"===b.snapshot.phase)return r(b,!0),t(b),b.snapshot;let c=Date.now();b.snapshot={...o(a),phase:"active",startedAt:c,lastEventAt:c,isStreaming:!0,streamingMessage:{role:"assistant",content:[]}},t(b),r(b,!0),b.snapshot}(a),new Promise((d,e)=>{let f=!1,g=!1,h=null,j=a=>{if(!f){if(f=!0,clearTimeout(k),a){h?.close(),aV.current===h&&(aV.current=null),e(a);return}d()}},k=setTimeout(()=>{b.requireConnected?j(Error("Timed out waiting for event stream connection")):j()},b.timeoutMs??3e4);aV.current=h=function(a){let{url:b,onEvent:c,onStateChange:d,onFatalError:e,maxReconnectAttempts:f=1/0,reconnectBaseMs:g=1e3,reconnectMaxMs:h=3e4,autoReconnect:j=!0}=a,k="idle",l=new AbortController,m=0,n=null,o=null,p=!1,q=(a,b)=>{b&&(o=b),c(a,b)},r=a=>{k!==a&&(k=a,d?.(a))},s=()=>{null!==n&&(clearTimeout(n),n=null)},t=()=>{if(p)return;if(!j)return void r("error");if(m>=f){r("error"),e?.(Error(`Max reconnect attempts (${f}) reached`));return}let a=Math.min(h,g*2**m);m+=1,r("connecting"),n=setTimeout(()=>{n=null,u()},a)},u=async()=>{if(!p){s(),l=new AbortController,r("connecting");try{let a=await fetch(b,{signal:l.signal,headers:{Accept:"text/event-stream","Cache-Control":"no-cache",...o?{"Last-Event-ID":o}:{}}});if(!a.ok)throw Error(`HTTP ${a.status}: ${a.statusText}`);let c=a.body;if(!c)throw Error("Response has no readable body");let d=c.getReader();if(r("connected"),m=0,await i(d,q,l.signal),l.signal.aborted)try{await d.cancel()}catch{}d.releaseLock(),r("closed"),!p&&j&&t()}catch(a){if(p||a instanceof DOMException&&"AbortError"===a.name)return void r("closed");r("error"),j&&t()}}};return{get state(){return k},connect:()=>{p=!1,m=0,s(),u()},close:()=>{p=!0,s(),l.abort(),r("closed")},get abortController(){return l}}}({url:c,onEvent:b=>{try{let c=JSON.parse(b);if("connected"===c.type&&j(),aW.current!==a)return;aY.current?.(c)}catch{}},onStateChange:b=>{!function(a,b){let c=m().get(a);if(!c)return;let d=c.connectionState;c.connectionState=b,"connected"===b&&"connected"!==d&&(c.snapshot={...c.snapshot,lastEventAt:Date.now(),lastHeartbeatAt:Date.now()},t(c)),"connected"!==b&&"connected"===d&&u(c)}(a,b),"connected"===b&&(g&&(z(a),aZ.current?.(a,"sse_reconnected")),g=!0)},reconnectBaseMs:1e3,reconnectMaxMs:3e4}),h.connect()})},[]),bx=(0,d.useCallback)(async(a,b="manual")=>{if(!a||aW.current!==a)return;let c=ba.current;try{let b=await fetch(`/api/agent/${encodeURIComponent(a)}`),e=await b.json().catch(()=>({}));if(aW.current!==a||ba.current!==c)return;if(e.running){var d;aX.current=!0,ak(!0),aS((d=e.state,d?.phase==="running_tools"?{kind:"running_tools",tools:(d.activeTools??[]).map(a=>({id:a.id,name:a.name}))}:d?.phase==="streaming"||d?.phase==="compacting"||d?.phase==="idle"?null:{kind:"waiting_model"})),aV.current&&"closed"!==aV.current.state&&"error"!==aV.current.state||(z(a),bw(a,{replay:!0}))}else aX.current=!1,aV.current?.close(),aV.current=null,y(a),ak(!1),aS(null),aC(null),ai({type:"end"}),E(a),await br(a,!1,!1,!0);e.state?.contextUsage!==void 0&&aE(e.state.contextUsage??null),e.state?.systemPrompt!==void 0&&aG(e.state.systemPrompt??null),e.state?.isCompacting!==void 0&&aO(e.state.isCompacting),e.state?.thinkingLevel!==void 0&&aA(e.state.thinkingLevel??"auto"),e.state?.planMode!==void 0&&P?.(e.state.planMode)}catch{}},[bw,br,P]);aY.current=(0,d.useCallback)(a=>{let b=aW.current;switch(b&&function(a,b){let c=w(a),d=Date.now();switch(b.type){case"agent_start":if("active"===c.snapshot.phase)return r(c,!0),c.snapshot;return v(c),c.accumulatedText="",c.toolCalls.clear(),c.toolResults.clear(),c.activeToolId=null,c.snapshot={...o(a),phase:"active",startedAt:d,lastEventAt:d,isStreaming:!0,streamingMessage:{role:"assistant",content:[]}},t(c),r(c,!0),c.snapshot;case"message_update":{let a=b.message;if(!a||"assistant"!==a.role)return c.snapshot;let e=a.content;for(let a of Array.isArray(e)?e:[])"object"==typeof a&&null!==a&&"type"in a&&("text"===a.type?c.accumulatedText=a.text??"":"toolCall"===a.type&&a.toolCallId&&!c.toolCalls.has(a.toolCallId)&&c.toolCalls.set(a.toolCallId,{...a,startedAt:d}));return r(c,!1),c.snapshot}case"tool_execution_start":{let a="string"==typeof b.toolCallId?b.toolCallId:"",e="string"==typeof b.toolName?b.toolName:"tool",f=b.input??{};if(!a)return c.snapshot;let g=c.toolCalls.get(a);return c.toolCalls.set(a,{type:"toolCall",toolCallId:a,toolName:e,input:g?.input??f,startedAt:g?.startedAt??d}),c.activeToolId=a,v(c),c.activeToolId&&(c.toolProgressTimer=setInterval(()=>r(c,!0),1e3)),r(c,!0),c.snapshot}case"tool_execution_end":{let a="string"==typeof b.toolCallId?b.toolCallId:"",e="string"==typeof b.toolName?b.toolName:"tool",f="string"==typeof b.result?b.result:JSON.stringify(b.result??"");if(a){let g=c.toolCalls.get(a);g&&c.toolCalls.set(a,{...g,endedAt:d}),c.toolResults.set(a,{role:"toolResult",toolCallId:a,toolName:e,content:[{type:"text",text:f}],isError:!!b.isError,timestamp:d}),c.activeToolId===a&&(c.activeToolId=null,v(c))}return r(c,!0),c.snapshot}case"message_end":return q(c),r(c,!0),c.snapshot;case"agent_end":{if(q(c),v(c),c.activeToolId=null,!0===b.willRetry)return c.accumulatedText="",c.toolCalls.clear(),c.toolResults.clear(),c.snapshot={...c.snapshot,phase:"active",lastEventAt:d,accumulatedText:"",toolCalls:[],toolResults:[],statusText:null,streamingMessage:null,isStreaming:!0,error:null},t(c),p(a,{type:"snapshot-updated",snapshot:c.snapshot}),c.snapshot;u(c);let e="string"==typeof b.error?b.error:null;return c.snapshot={...c.snapshot,phase:e?"error":"completed",isStreaming:!1,streamingMessage:null,statusText:null,error:e},p(a,e?{type:"error",snapshot:c.snapshot}:{type:"completed",snapshot:c.snapshot}),c.snapshot}case"heartbeat":return c.snapshot={...c.snapshot,lastHeartbeatAt:d},c.snapshot;default:return c.snapshot}}(b,a),a.type){case"prompt_admitted":case"agent_start":aU(null),aX.current=!0,ak(!0),aS({kind:"waiting_model"}),ai({type:"start"});break;case"agent_end":if(!0===a.willRetry){aX.current=!0,ak(!0),aS({kind:"waiting_model"});break}aX.current=!1,aV.current?.close(),aV.current=null,ak(!1),aS(null),aC(null),ai({type:"end"}),b&&(E(b),br(b,!1,!1,!0),be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{aW.current!==b||aX.current||(E(b),br(b,!1,!1,!0))},500),fetch(`/api/agent/${encodeURIComponent(b)}`).then(a=>a.json()).then(a=>{a.state?.contextUsage!==void 0&&aE(a.state.contextUsage??null),a.state?.systemPrompt!==void 0&&aG(a.state.systemPrompt??null),a.state?.isCompacting!==void 0&&aO(a.state.isCompacting)}).catch(()=>{})),k?.();break;case"message_start":case"message_update":{if(!aX.current)break;let b=a.message;if(b?.role==="user")break;b&&ai({type:"update",message:e(b)}),aS(null);break}case"message_end":{if(!aX.current)break;let c=a.message,d="string"==typeof a.__entryId?a.__entryId:null;if(c&&"user"!==c.role){"assistant"===c.role&&"error"===c.stopReason&&c.errorMessage?.trim()&&aU(`Model response failed: ${c.errorMessage.trim()}`);let a=e(c);if(!(d&&a8.current.includes(d))){if(b&&d){let a=a6.current.get(b)??new Map;a.set(d,Date.now()),a6.current.set(b,a)}$(b=>b.some(b=>O(b,a))?b:[...b,a]),d&&aa(a=>{if(a.includes(d))return a;let b=[...a,d];return a8.current=b,b})}}ai({type:"reset"}),aS({kind:"waiting_model"});break}case"replay_gap":b&&(E(b),br(b,!1,!1,!0));break;case"prompt_done":if(!aX.current)break;bx(aW.current??"","prompt_done");break;case"prompt_error":{let c="string"==typeof a.error&&a.error.trim()?a.error.trim():"The model request failed before producing a response.";if(aX.current=!1,ak(!1),aS(null),aC(null),ai({type:"end"}),aV.current?.close(),aV.current=null,b){for(let[a,c]of(y(b),a4.current))c.sessionId===b&&"prompt"===c.kind&&a4.current.delete(a);E(b),br(b,!1,!1,!0)}aU(`Model request failed: ${c}`),k?.();break}case"tool_execution_start":{let b=a.toolCallId,c=a.toolName,d=a.args,e="bash"===c&&"string"==typeof d?.command?d.command:void 0;aS(a=>{let d=a?.kind==="running_tools"?[...a.tools]:[];return d.some(a=>a.id===b)||d.push({id:b,name:c,args:e}),{kind:"running_tools",tools:d}});break}case"tool_execution_end":{let b=a.toolCallId;aS(a=>{if(a?.kind!=="running_tools")return a;let c=a.tools.filter(a=>a.id!==b);return 0===c.length?{kind:"waiting_model"}:{kind:"running_tools",tools:c}});break}case"auto_retry_start":aU(null),aX.current=!0,ak(!0),aS({kind:"waiting_model"}),aC({attempt:a.attempt,maxAttempts:a.maxAttempts,errorMessage:a.errorMessage});break;case"auto_retry_end":aC(null),!1===a.success&&"string"==typeof a.finalError&&a.finalError.trim()?aU(`Model response failed after retries: ${a.finalError.trim()}`):!0===a.success&&aU(null);break;case"auto_compaction_start":case"compaction_start":aO(!0),aQ(null);break;case"auto_compaction_end":case"compaction_end":aO(!1),a.errorMessage?aQ(a.errorMessage):!a.aborted&&aW.current&&br(aW.current)}},[br,k,bx]);let by=(0,d.useCallback)(async(a,d,e,i)=>{if(!a.trim()&&!d?.length&&!e?.length||aj)return;ba.current+=1;let k=bm(e),m=a.trim()?k?`${a}
5
5
 
6
6
  Attached document text:
7
7
 
8
8
  ${k}`:a:k?`Attached document text:
9
9
 
10
- ${k}`:"",n=[],o=P?c:b?.cwd??Q?.info?.cwd;if(d?.length&&o)try{n=await h(o,d)}catch(a){aT(a instanceof Error?a.message:String(a));return}let p=n.length?n.map(a=>{var b;return{type:"image",path:a.path,mimeType:a.mimeType,name:a.name,source:{type:"url",url:(b=a.path,`/api/files/${(0,g.HG)(b)}?type=read`),media_type:a.mimeType}}}):d?.map(a=>({type:"image",source:{type:"base64",media_type:a.mimeType,data:a.data}})),q={role:"user",content:p?.length?[...m.trim()?[{type:"text",text:m}]:[],...p]:m,timestamp:Date.now()},r=I(),s=P?null:b?.id??null;s&&E(s);let t=a5.current,u=L(q.content);a3.current.set(r,{localId:r,sessionId:s??"__new__",leafId:t,message:q,createdAt:Date.now(),kind:"prompt",confirmKey:u,confirmCountAtCreate:P?0:u?a4.current.get(u)??0:0}),Z(a=>[...a,q]),aT(null),aW.current=!0,aj(!0),aR({kind:"waiting_model"}),ah({type:"start"}),a0.current=!0;let v=am.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,w=!v||0===v.length||v.includes("image")?d?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0;bf.current=!0;try{if(P&&c){as&&aL(as);let b=i??bl(),d=await fetch("/api/agent/new",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:c,type:"prompt",message:m,toolNames:b,planMode:j,deferPrompt:!0,...w?.length?{images:w}:{},...as?{provider:as.provider,modelId:as.modelId}:{},..."auto"!==ay?{thinkingLevel:ay}:{}})}),e=await d.json().catch(()=>({}));if(!d.ok||e.error||!e.sessionId)throw Error(e.error??`HTTP ${d.status}`);let g=e.sessionId;aV.current=g;let h=a3.current.get(r);h&&(h.sessionId=g),aZ.current?.(),aZ.current=x(g,()=>{aV.current===g&&(aj(!1),aR(null))}),a7.current=g,await bw(g,{requireConnected:!0,timeoutMs:1e4}),await (0,f.$)(g,{type:"prompt",message:m,toolNames:b,planMode:j,...w?.length?{images:w}:{}}),l?.({id:g,path:"",cwd:c,name:void 0,created:new Date().toISOString(),modified:new Date().toISOString(),messageCount:1,firstMessage:a})}else if(b){let a=i??bl();await bn(b.id),aZ.current?.(),aZ.current=x(b.id,()=>{aV.current===b.id&&(aj(!1),aR(null))}),await bw(b.id,{requireConnected:!0,timeoutMs:1e4}),await (0,f.$)(b.id,{type:"prompt",message:m,toolNames:a,planMode:j,leafId:t,...bj?{provider:bj.provider,modelId:bj.modelId}:{},..."auto"!==ay?{thinkingLevel:ay}:{},...w?.length?{images:w}:{}})}}catch(b){let a=aV.current;if(a3.current.delete(r),Z(a=>a.filter(a=>a!==q)),b instanceof f.H&&(409===b.status||"SESSION_BUSY"===b.code)){aT("This session is already running in another tab. Showing that active run instead."),aW.current=!0,aj(!0),aR({kind:"waiting_model"}),ah({type:"start"}),a&&(aU.current?.close(),aU.current=null,z(a),bw(a,{replay:!0}),aY.current?.(a,"prompt_conflict"));return}if(console.error("Failed to send message:",b),P&&aV.current){let a=aV.current;aV.current=null,a7.current=null,fetch(`/api/sessions/${encodeURIComponent(a)}`,{method:"DELETE"}).catch(()=>{})}aT(b instanceof Error?b.message:String(b)),aU.current?.close(),aU.current=null,a&&y(a),aW.current=!1,aj(!1),aR(null),ah({type:"end"})}finally{bf.current=!1,"u">typeof document&&"hidden"===document.visibilityState&&!be.current&&(be.current=setTimeout(()=>{be.current=null,"hidden"!==document.visibilityState||bf.current||(aU.current?.close(),aU.current=null)},1e3))}},[P,c,as,bl,ay,b,Q?.info?.cwd,ai,bw,l,bm,j,am,bj,bn]),bz=(0,d.useCallback)(async()=>{let a=aV.current;if(a){aW.current=!1,aT(null),aj(!1),aR(null),ah({type:"end"}),aU.current?.close(),aU.current=null,y(a),E(a);try{await (0,f.$)(a,{type:"abort"}),await br(a,!1,!1,!0)}catch(b){console.error("Failed to abort:",b),await br(a,!1,!1,!0)}}},[br]),bA=(0,d.useCallback)(async a=>{let b=aV.current;if(b){aH(a);try{let{cancelled:c,newSessionId:d}=await (0,f.$)(b,{type:"fork",entryId:a})??{};!c&&d&&n?.(d)}catch(a){console.error("Fork failed:",a)}finally{aH(null)}}},[n]),bB=(0,d.useCallback)(async a=>{let b=aV.current;b&&(E(b),a5.current=a,X(a),await bu(b,a))},[bu]);(0,d.useCallback)(async a=>{a5.current=a,X(a);let b=aV.current;b&&(E(b),await bu(b,a))},[bu]);let bC=(0,d.useCallback)(async(a,b)=>{if(P)return void bg({provider:a,modelId:b});let c=aV.current;if(c)try{var d;aT(null);let e=await (0,f.$)(c,{type:"set_model",provider:a,modelId:b}),g={provider:e.provider,modelId:e.id};e.thinkingLevel&&(d=e.thinkingLevel,"auto"===d||"off"===d||"minimal"===d||"low"===d||"medium"===d||"high"===d||"xhigh"===d)&&az(e.thinkingLevel),aJ(g),R(a=>a?{...a,context:{...a.context,model:g}}:a)}catch(b){let a=b instanceof Error?b.message:String(b);console.error("Failed to set model:",b),aT(a)}},[P,bg]),bD=(0,d.useCallback)(async()=>{let a=aV.current;if(a&&!aM){aN(!0),aP(null);try{await (0,f.$)(a,{type:"compact"}),await br(a,!0)}catch(a){aP(a instanceof Error?a.message:String(a))}finally{aN(!1)}}},[aM,br]),bE=(0,d.useCallback)(async(a,b,c)=>{let d=aV.current;if(!d)return;E(d);let e=bm(c),g=a.trim()?e?`${a}
10
+ ${k}`:"",n=[],o=Q?c:b?.cwd??R?.info?.cwd;if(d?.length&&o)try{n=await h(o,d)}catch(a){aU(a instanceof Error?a.message:String(a));return}let p=n.length?n.map(a=>{var b;return{type:"image",path:a.path,mimeType:a.mimeType,name:a.name,source:{type:"url",url:(b=a.path,`/api/files/${(0,g.HG)(b)}?type=read`),media_type:a.mimeType}}}):d?.map(a=>({type:"image",source:{type:"base64",media_type:a.mimeType,data:a.data}})),q={role:"user",content:p?.length?[...m.trim()?[{type:"text",text:m}]:[],...p]:m,timestamp:Date.now()},r=I(),s=Q?null:b?.id??null;s&&E(s);let t=a7.current,u=L(q.content);a4.current.set(r,{localId:r,sessionId:s??"__new__",leafId:t,message:q,createdAt:Date.now(),kind:"prompt",confirmKey:u,confirmCountAtCreate:Q?0:u?a5.current.get(u)??0:0}),$(a=>[...a,q]),aU(null),aX.current=!0,ak(!0),aS({kind:"waiting_model"}),ai({type:"start"}),a1.current=!0;let v=an.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,w=!v||0===v.length||v.includes("image")?d?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0;try{if(Q&&c){at&&aM(at);let b=i??bl(),d=await fetch("/api/agent/new",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:c,type:"prompt",message:m,toolNames:b,planMode:j,deferPrompt:!0,...w?.length?{images:w}:{},...at?{provider:at.provider,modelId:at.modelId}:{},..."auto"!==az?{thinkingLevel:az}:{}})}),e=await d.json().catch(()=>({}));if(!d.ok||e.error||!e.sessionId)throw Error(e.error??`HTTP ${d.status}`);let g=e.sessionId;aW.current=g;let h=a4.current.get(r);h&&(h.sessionId=g),a$.current?.(),a$.current=x(g,()=>{aW.current===g&&(ak(!1),aS(null))}),a9.current=g,await bw(g,{requireConnected:!0,timeoutMs:1e4}),await (0,f.$)(g,{type:"prompt",message:m,toolNames:b,planMode:j,...w?.length?{images:w}:{}}),l?.({id:g,path:"",cwd:c,name:void 0,created:new Date().toISOString(),modified:new Date().toISOString(),messageCount:1,firstMessage:a})}else if(b){let a=i??bl();await bn(b.id),a$.current?.(),a$.current=x(b.id,()=>{aW.current===b.id&&(ak(!1),aS(null))}),await bw(b.id,{requireConnected:!0,timeoutMs:1e4}),await (0,f.$)(b.id,{type:"prompt",message:m,toolNames:a,planMode:j,leafId:t,...bj?{provider:bj.provider,modelId:bj.modelId}:{},..."auto"!==az?{thinkingLevel:az}:{},...w?.length?{images:w}:{}})}}catch(b){let a=aW.current;if(a4.current.delete(r),$(a=>a.filter(a=>a!==q)),b instanceof f.H&&(409===b.status||"SESSION_BUSY"===b.code)){aU("This session is already running in another tab. Showing that active run instead."),aX.current=!0,ak(!0),aS({kind:"waiting_model"}),ai({type:"start"}),a&&(aV.current?.close(),aV.current=null,z(a),bw(a,{replay:!0}),aZ.current?.(a,"prompt_conflict"));return}if(console.error("Failed to send message:",b),Q&&aW.current){let a=aW.current;aW.current=null,a9.current=null,fetch(`/api/sessions/${encodeURIComponent(a)}`,{method:"DELETE"}).catch(()=>{})}aU(b instanceof Error?b.message:String(b)),aV.current?.close(),aV.current=null,a&&y(a),aX.current=!1,ak(!1),aS(null),ai({type:"end"})}},[Q,c,at,bl,az,b,R?.info?.cwd,aj,bw,l,bm,j,an,bj,bn]),bz=(0,d.useCallback)(async()=>{let a=aW.current;if(a){aX.current=!1,aU(null),ak(!1),aS(null),ai({type:"end"}),aV.current?.close(),aV.current=null,y(a),E(a);try{await (0,f.$)(a,{type:"abort"}),await br(a,!1,!1,!0)}catch(b){console.error("Failed to abort:",b),await br(a,!1,!1,!0)}}},[br]),bA=(0,d.useCallback)(async a=>{let b=aW.current;if(b){aI(a);try{let{cancelled:c,newSessionId:d}=await (0,f.$)(b,{type:"fork",entryId:a})??{};!c&&d&&n?.(d)}catch(a){console.error("Fork failed:",a)}finally{aI(null)}}},[n]),bB=(0,d.useCallback)(async a=>{let b=aW.current;b&&(a6.current.delete(b),E(b),a7.current=a,Y(a),await bu(b,a))},[bu]);(0,d.useCallback)(async a=>{a7.current=a,Y(a);let b=aW.current;b&&(a6.current.delete(b),E(b),await bu(b,a))},[bu]);let bC=(0,d.useCallback)(async(a,b)=>{if(Q)return void bg({provider:a,modelId:b});let c=aW.current;if(c)try{var d;aU(null);let e=await (0,f.$)(c,{type:"set_model",provider:a,modelId:b}),g={provider:e.provider,modelId:e.id};e.thinkingLevel&&(d=e.thinkingLevel,"auto"===d||"off"===d||"minimal"===d||"low"===d||"medium"===d||"high"===d||"xhigh"===d)&&aA(e.thinkingLevel),aK(g),S(a=>a?{...a,context:{...a.context,model:g}}:a)}catch(b){let a=b instanceof Error?b.message:String(b);console.error("Failed to set model:",b),aU(a)}},[Q,bg]),bD=(0,d.useCallback)(async()=>{let a=aW.current;if(a&&!aN){aO(!0),aQ(null);try{await (0,f.$)(a,{type:"compact"}),await br(a,!0)}catch(a){aQ(a instanceof Error?a.message:String(a))}finally{aO(!1)}}},[aN,br]),bE=(0,d.useCallback)(async(a,b,c)=>{let d=aW.current;if(!d)return;E(d);let e=bm(c),g=a.trim()?e?`${a}
11
11
 
12
12
  Attached document text:
13
13
 
14
14
  ${e}`:a:e?`Attached document text:
15
15
 
16
- ${e}`:"",h=am.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,i=!h||0===h.length||h.includes("image")?b?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0,j={role:"user",content:`[steer] ${g}`,timestamp:Date.now()},k=I(),l=K(g,i?.length??0);a3.current.set(k,{localId:k,sessionId:d,leafId:a5.current,message:j,createdAt:Date.now(),kind:"steer",confirmKey:l,confirmCountAtCreate:l?a4.current.get(l)??0:0}),Z(a=>[...a,j]);try{await (0,f.$)(d,{type:"steer",message:g,...i?.length?{images:i}:{}})}catch(a){a3.current.delete(k),console.error("Failed to steer:",a)}},[bm,am,bj]),bF=(0,d.useCallback)(async(a,b,c)=>{let d=aV.current;if(!d)return;E(d);let e=bm(c),g=a.trim()?e?`${a}
16
+ ${e}`:"",h=an.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,i=!h||0===h.length||h.includes("image")?b?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0,j={role:"user",content:`[steer] ${g}`,timestamp:Date.now()},k=I(),l=K(g,i?.length??0);a4.current.set(k,{localId:k,sessionId:d,leafId:a7.current,message:j,createdAt:Date.now(),kind:"steer",confirmKey:l,confirmCountAtCreate:l?a5.current.get(l)??0:0}),$(a=>[...a,j]);try{await (0,f.$)(d,{type:"steer",message:g,...i?.length?{images:i}:{}})}catch(a){a4.current.delete(k),console.error("Failed to steer:",a)}},[bm,an,bj]),bF=(0,d.useCallback)(async(a,b,c)=>{let d=aW.current;if(!d)return;E(d);let e=bm(c),g=a.trim()?e?`${a}
17
17
 
18
18
  Attached document text:
19
19
 
20
20
  ${e}`:a:e?`Attached document text:
21
21
 
22
- ${e}`:"",h=am.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,i=!h||0===h.length||h.includes("image")?b?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0,j={role:"user",content:g,timestamp:Date.now()},k=I(),l=K(g,i?.length??0);a3.current.set(k,{localId:k,sessionId:d,leafId:a5.current,message:j,createdAt:Date.now(),kind:"follow_up",confirmKey:l,confirmCountAtCreate:l?a4.current.get(l)??0:0}),Z(a=>[...a,j]);try{await (0,f.$)(d,{type:"follow_up",message:g,...i?.length?{images:i}:{}})}catch(a){a3.current.delete(k),console.error("Failed to follow up:",a)}},[bm,am,bj]),bG=(0,d.useCallback)(async()=>{let a=aV.current;if(a)try{await (0,f.$)(a,{type:"abort_compaction"})}catch(a){console.error("Failed to abort compaction:",a)}},[]),bH=(0,d.useCallback)(async a=>{if(az(a),"auto"===a)return;let b=aV.current;if(b)try{await (0,f.$)(b,{type:"set_thinking_level",level:a})}catch(a){console.error("Failed to set thinking level:",a)}},[]),bI=(0,d.useCallback)(async a=>{bh(a);let b=(0,F.tE)(a,aw),c=aV.current;if(c)try{await (0,f.$)(c,{type:"set_tools",toolNames:b})}catch(a){console.error("Failed to set tools:",a)}},[aw,bh]),bJ=(0,d.useCallback)(async a=>{bi(a);let b=(0,F.tE)(au,a),c=aV.current;if(c)try{await (0,f.$)(c,{type:"set_tools",toolNames:b})}catch(a){console.error("Failed to set memory tools:",a)}},[bi,au]);return(0,d.useCallback)((a="smooth")=>{a1.current?.scrollIntoView({behavior:a})},[]),(0,d.useCallback)(()=>{let a=a2.current,b=a_.current;if(!a||!b)return;let c=b.getBoundingClientRect().top-a.getBoundingClientRect().top+a.scrollTop;a.scrollTo({top:c-16,behavior:"smooth"})},[]),{data:Q,loading:S,error:U,activeLeafId:W,messages:Y,entryIds:$,streamState:ag,agentRunning:ai,modelNames:ak,modelList:am,modelThinkingLevels:ao,modelThinkingLevelMaps:aq,newSessionModel:as,toolPreset:au,memoryTools:aw,thinkingLevel:ay,retryInfo:aA,contextUsage:aC,systemPrompt:aE,forkingEntryId:aG,isCompacting:aM,compactError:aO,currentModel:bj,displayModel:bk,sessionStats:bo,agentPhase:aQ,agentError:aS,isNew:P,sessionIdRef:aV,sseReaderRef:aU,messagesEndRef:a1,scrollContainerRef:a2,lastUserMsgRef:a_,pendingScrollToUserRef:a0,initialScrollDoneRef:a$,handleSend:by,handleAbort:bz,handleFork:bA,handleNavigate:bB,handleModelChange:bC,handleCompact:bD,handleSteer:bE,handleFollowUp:bF,handleAbortCompaction:bG,handleToolPresetChange:bI,handleMemoryToolsChange:bJ,handleThinkingLevelChange:bH,loadTools:bv,setActiveLeafId:X,setData:R,setMessages:Z,dispatch:ah,setAgentRunning:aj,setForkingEntryId:aH,loadMoreMessages:bt,hasMoreMessages:ac,totalMessages:aa,loadedMessagesCount:ae,handleAgentEventRef:aX}}},37267:(a,b,c)=>{c.d(b,{$:()=>e,H:()=>d});class d extends Error{constructor(a,b,c){super(a),this.status=b,this.code=c,this.name="AgentCommandError"}}async function e(a,b){let c=await fetch(`/api/agent/${encodeURIComponent(a)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),e=await c.json().catch(()=>({}));if(!c.ok||e.error)throw new d(e.error??`HTTP ${c.status}`,c.status,e.code);return e.data}},81537:(a,b,c)=>{c.d(b,{O:()=>k});let d=new Set,e=null,f=null,g=null,h=null,i=null,j=!1;function k(a){return d.add(a),e&&a(e),()=>{if(d.delete(a),0===d.size&&j){if(j=!1,h&&clearTimeout(h),h=null,g&&(clearInterval(g),g=null),i?.(),i=null,f){try{f.port.postMessage({type:"disconnect"})}catch{}try{f.port.close()}catch{}}f=null,e=null}}}}};
22
+ ${e}`:"",h=an.find(a=>a.provider===bj?.provider&&a.id===bj?.modelId)?.input,i=!h||0===h.length||h.includes("image")?b?.map(a=>({type:"image",data:a.data,mimeType:a.mimeType})):void 0,j={role:"user",content:g,timestamp:Date.now()},k=I(),l=K(g,i?.length??0);a4.current.set(k,{localId:k,sessionId:d,leafId:a7.current,message:j,createdAt:Date.now(),kind:"follow_up",confirmKey:l,confirmCountAtCreate:l?a5.current.get(l)??0:0}),$(a=>[...a,j]);try{await (0,f.$)(d,{type:"follow_up",message:g,...i?.length?{images:i}:{}})}catch(a){a4.current.delete(k),console.error("Failed to follow up:",a)}},[bm,an,bj]),bG=(0,d.useCallback)(async()=>{let a=aW.current;if(a)try{await (0,f.$)(a,{type:"abort_compaction"})}catch(a){console.error("Failed to abort compaction:",a)}},[]),bH=(0,d.useCallback)(async a=>{if(aA(a),"auto"===a)return;let b=aW.current;if(b)try{await (0,f.$)(b,{type:"set_thinking_level",level:a})}catch(a){console.error("Failed to set thinking level:",a)}},[]),bI=(0,d.useCallback)(async a=>{bh(a);let b=(0,F.tE)(a,ax),c=aW.current;if(c)try{await (0,f.$)(c,{type:"set_tools",toolNames:b})}catch(a){console.error("Failed to set tools:",a)}},[ax,bh]),bJ=(0,d.useCallback)(async a=>{bi(a);let b=(0,F.tE)(av,a),c=aW.current;if(c)try{await (0,f.$)(c,{type:"set_tools",toolNames:b})}catch(a){console.error("Failed to set memory tools:",a)}},[bi,av]);return(0,d.useCallback)((a="smooth")=>{a2.current?.scrollIntoView({behavior:a})},[]),(0,d.useCallback)(()=>{let a=a3.current,b=a0.current;if(!a||!b)return;let c=b.getBoundingClientRect().top-a.getBoundingClientRect().top+a.scrollTop;a.scrollTo({top:c-16,behavior:"smooth"})},[]),{data:R,loading:T,error:V,activeLeafId:X,messages:Z,entryIds:_,streamState:ah,agentRunning:aj,modelNames:al,modelList:an,modelThinkingLevels:ap,modelThinkingLevelMaps:ar,newSessionModel:at,toolPreset:av,memoryTools:ax,thinkingLevel:az,retryInfo:aB,contextUsage:aD,systemPrompt:aF,forkingEntryId:aH,isCompacting:aN,compactError:aP,currentModel:bj,displayModel:bk,sessionStats:bo,agentPhase:aR,agentError:aT,isNew:Q,sessionIdRef:aW,sseReaderRef:aV,messagesEndRef:a2,scrollContainerRef:a3,lastUserMsgRef:a0,pendingScrollToUserRef:a1,initialScrollDoneRef:a_,handleSend:by,handleAbort:bz,handleFork:bA,handleNavigate:bB,handleModelChange:bC,handleCompact:bD,handleSteer:bE,handleFollowUp:bF,handleAbortCompaction:bG,handleToolPresetChange:bI,handleMemoryToolsChange:bJ,handleThinkingLevelChange:bH,loadTools:bv,setActiveLeafId:Y,setData:S,setMessages:$,dispatch:ai,setAgentRunning:ak,setForkingEntryId:aI,loadMoreMessages:bt,hasMoreMessages:ad,totalMessages:ab,loadedMessagesCount:af,handleAgentEventRef:aY}}},37267:(a,b,c)=>{c.d(b,{$:()=>e,H:()=>d});class d extends Error{constructor(a,b,c){super(a),this.status=b,this.code=c,this.name="AgentCommandError"}}async function e(a,b){let c=await fetch(`/api/agent/${encodeURIComponent(a)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),e=await c.json().catch(()=>({}));if(!c.ok||e.error)throw new d(e.error??`HTTP ${c.status}`,c.status,e.code);return e.data}},81537:(a,b,c)=>{c.d(b,{O:()=>k});let d=new Set,e=null,f=null,g=null,h=null,i=null,j=!1;function k(a){return d.add(a),e&&a(e),()=>{if(d.delete(a),0===d.size&&j){if(j=!1,h&&clearTimeout(h),h=null,g&&(clearInterval(g),g=null),i?.(),i=null,f){try{f.port.postMessage({type:"disconnect"})}catch{}try{f.port.close()}catch{}}f=null,e=null}}}}};