@madh-io/alfred-ai 0.15.3 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/web-ui/404/index.html +1 -1
- package/bundle/web-ui/404.html +1 -1
- package/bundle/web-ui/_next/static/NcQB9ZO1XwBeNblbfh0F-/_buildManifest.js +1 -0
- package/bundle/web-ui/_next/static/NcQB9ZO1XwBeNblbfh0F-/_ssgManifest.js +1 -0
- package/bundle/web-ui/_next/static/chunks/624-3d6f8c4e5702aa22.js +1 -0
- package/bundle/web-ui/_next/static/chunks/743-5ed4db7852c08f31.js +1 -0
- package/bundle/web-ui/_next/static/chunks/app/chat/page-62b98eb665eb19d4.js +1 -0
- package/bundle/web-ui/_next/static/chunks/app/layout-6ca8e9154971bc2f.js +1 -0
- package/bundle/web-ui/_next/static/chunks/app/page-291dc9884a6d63cc.js +1 -0
- package/bundle/web-ui/_next/static/chunks/main-22b7ee56e2e97978.js +1 -0
- package/bundle/web-ui/_next/static/chunks/webpack-9d78bf20c64f9a35.js +1 -0
- package/bundle/web-ui/_next/static/vwy_A3HL2e1Uxck6K-vic/_buildManifest.js +1 -0
- package/bundle/web-ui/_next/static/vwy_A3HL2e1Uxck6K-vic/_ssgManifest.js +1 -0
- package/bundle/web-ui/chat/index.html +1 -1
- package/bundle/web-ui/chat/index.txt +5 -5
- package/bundle/web-ui/dashboard/index.html +1 -1
- package/bundle/web-ui/dashboard/index.txt +4 -4
- package/bundle/web-ui/index.html +1 -1
- package/bundle/web-ui/index.txt +5 -5
- package/bundle/web-ui/settings/index.html +1 -1
- package/bundle/web-ui/settings/index.txt +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--vwy_A3HL2e1Uxck6K_vic--><html lang="de"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/ab41d248afac9f33.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9d78bf20c64f9a35.js"/><script src="/_next/static/chunks/8e6518bb-c26e82767f1faf66.js" async=""></script><script src="/_next/static/chunks/743-5ed4db7852c08f31.js" async=""></script><script src="/_next/static/chunks/main-app-bf91f7268c1fdab4.js" async=""></script><script src="/_next/static/chunks/app/layout-6ca8e9154971bc2f.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Alfred AI</title><meta name="description" content="Self-hosted AI Assistant"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0a0a0a] text-gray-200 h-screen overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div class="flex h-full"><aside class="w-16 md:w-56 bg-[#111111] border-r border-[#1f1f1f] flex flex-col h-full"><div class="p-4 border-b border-[#1f1f1f]"><a class="flex items-center gap-2" href="/chat/"><span class="text-xl font-bold text-blue-500 font-mono">A</span><span class="hidden md:inline text-sm font-semibold text-gray-200">Alfred</span></a></div><nav class="flex-1 p-2 space-y-1"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/chat/"><span>💬</span><span class="hidden md:inline">Chat</span></a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/dashboard/"><span>📊</span><span class="hidden md:inline">Dashboard</span></a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/settings/"><span>⚙️</span><span class="hidden md:inline">Settings</span></a></nav><div class="p-4 border-t border-[#1f1f1f]"><a href="https://github.com/madh99/alfred-ai" target="_blank" rel="noopener noreferrer" class="text-xs text-gray-500 hover:text-gray-400 hidden md:block">GitHub</a></div></aside><main class="flex-1 overflow-hidden"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-9d78bf20c64f9a35.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[8719,[\"177\",\"static/chunks/app/layout-6ca8e9154971bc2f.js\"],\"ConfigProvider\"]\n3:I[7946,[\"177\",\"static/chunks/app/layout-6ca8e9154971bc2f.js\"],\"Sidebar\"]\n4:I[8954,[],\"\"]\n5:I[5640,[],\"\"]\n6:I[2051,[],\"OutletBoundary\"]\n8:I[6658,[],\"AsyncMetadataOutlet\"]\na:I[2051,[],\"ViewportBoundary\"]\nc:I[2051,[],\"MetadataBoundary\"]\nd:\"$Sreact.suspense\"\nf:I[7698,[],\"\"]\n:HL[\"/_next/static/css/ab41d248afac9f33.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"vwy_A3HL2e1Uxck6K-vic\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/ab41d248afac9f33.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"de\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-[#0a0a0a] text-gray-200 h-screen overflow-hidden\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex h-full\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$L7\",[\"$\",\"$L8\",null,{\"promise\":\"$@9\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],null],[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$d\",null,{\"fallback\":null,\"children\":\"$Le\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n7:null\n"])</script><script>self.__next_f.push([1,"9:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Alfred AI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted AI Assistant\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"e:\"$9:metadata\"\n"])</script></body></html>
|
package/bundle/web-ui/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--vwy_A3HL2e1Uxck6K_vic--><html lang="de"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/ab41d248afac9f33.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9d78bf20c64f9a35.js"/><script src="/_next/static/chunks/8e6518bb-c26e82767f1faf66.js" async=""></script><script src="/_next/static/chunks/743-5ed4db7852c08f31.js" async=""></script><script src="/_next/static/chunks/main-app-bf91f7268c1fdab4.js" async=""></script><script src="/_next/static/chunks/app/layout-6ca8e9154971bc2f.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Alfred AI</title><meta name="description" content="Self-hosted AI Assistant"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0a0a0a] text-gray-200 h-screen overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div class="flex h-full"><aside class="w-16 md:w-56 bg-[#111111] border-r border-[#1f1f1f] flex flex-col h-full"><div class="p-4 border-b border-[#1f1f1f]"><a class="flex items-center gap-2" href="/chat/"><span class="text-xl font-bold text-blue-500 font-mono">A</span><span class="hidden md:inline text-sm font-semibold text-gray-200">Alfred</span></a></div><nav class="flex-1 p-2 space-y-1"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/chat/"><span>💬</span><span class="hidden md:inline">Chat</span></a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/dashboard/"><span>📊</span><span class="hidden md:inline">Dashboard</span></a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors text-gray-400 hover:bg-[#1a1a1a] hover:text-gray-200" href="/settings/"><span>⚙️</span><span class="hidden md:inline">Settings</span></a></nav><div class="p-4 border-t border-[#1f1f1f]"><a href="https://github.com/madh99/alfred-ai" target="_blank" rel="noopener noreferrer" class="text-xs text-gray-500 hover:text-gray-400 hidden md:block">GitHub</a></div></aside><main class="flex-1 overflow-hidden"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-9d78bf20c64f9a35.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[8719,[\"177\",\"static/chunks/app/layout-6ca8e9154971bc2f.js\"],\"ConfigProvider\"]\n3:I[7946,[\"177\",\"static/chunks/app/layout-6ca8e9154971bc2f.js\"],\"Sidebar\"]\n4:I[8954,[],\"\"]\n5:I[5640,[],\"\"]\n6:I[2051,[],\"OutletBoundary\"]\n8:I[6658,[],\"AsyncMetadataOutlet\"]\na:I[2051,[],\"ViewportBoundary\"]\nc:I[2051,[],\"MetadataBoundary\"]\nd:\"$Sreact.suspense\"\nf:I[7698,[],\"\"]\n:HL[\"/_next/static/css/ab41d248afac9f33.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"vwy_A3HL2e1Uxck6K-vic\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/ab41d248afac9f33.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"de\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-[#0a0a0a] text-gray-200 h-screen overflow-hidden\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex h-full\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$L7\",[\"$\",\"$L8\",null,{\"promise\":\"$@9\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],null],[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$d\",null,{\"fallback\":null,\"children\":\"$Le\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n7:null\n"])</script><script>self.__next_f.push([1,"9:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Alfred AI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted AI Assistant\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"e:\"$9:metadata\"\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:5,errorRate:1e-4,numBits:96,numHashes:14,bitArray:[1,0,0,1,e,r,e,r,r,e,r,e,e,r,r,e,r,e,e,e,r,e,e,e,r,r,e,e,e,e,r,e,r,r,r,r,e,e,r,e,e,r,e,r,e,r,e,e,r,e,r,r,r,r,r,e,e,e,e,e,e,e,r,e,e,e,r,r,e,e,r,e,r,r,e,r,r,e,e,r,e,e,e,e,r,r,e,e,e,r,r,r,r,e,e,r]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-01ab52c470df0174.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[624],{1740:(e,t,a)=>{"use strict";a.d(t,{ChatPage:()=>d});var r=a(8111),s=a(5271),n=a(346),l=a(839);function o(e){var t;let{message:a}=e,s="user"===a.role;return(0,r.jsx)("div",{className:"flex ".concat(s?"justify-end":"justify-start"," mb-4"),children:(0,r.jsxs)("div",{className:"max-w-[85%] rounded-2xl px-4 py-3 ".concat(s?"bg-blue-600 text-white":"bg-[#1a1a1a] text-gray-200 border border-[#2a2a2a]"),children:[s?(0,r.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:a.content}):(0,r.jsx)("div",{className:"prose prose-invert prose-sm max-w-none [&_pre]:bg-[#0d0d0d] [&_pre]:rounded-lg [&_pre]:p-3 [&_code]:text-blue-300 [&_a]:text-blue-400",children:(0,r.jsx)(n.oz,{remarkPlugins:[l.A],children:a.content||"..."})}),null==(t=a.attachments)?void 0:t.map((e,t)=>{var a,s;return(0,r.jsxs)("div",{className:"mt-2",children:["image"===e.type&&(0,r.jsx)("img",{src:"data:image/png;base64,".concat(e.data),alt:null!=(a=e.caption)?a:"Image",className:"rounded-lg max-w-full"}),"file"===e.type&&(0,r.jsx)("a",{href:"data:application/octet-stream;base64,".concat(e.data),download:e.fileName,className:"text-blue-400 underline text-sm",children:null!=(s=e.fileName)?s:"Download"}),"voice"===e.type&&(0,r.jsx)("audio",{controls:!0,src:"data:audio/ogg;base64,".concat(e.data),className:"mt-1"})]},t)})]})})}function i(e){let{onSend:t,disabled:a}=e,[n,l]=(0,s.useState)(""),o=(0,s.useRef)(null),i=()=>{var e;n.trim()&&!a&&(t(n.trim()),l(""),null==(e=o.current)||e.focus())};return(0,r.jsx)("div",{className:"border-t border-[#1f1f1f] bg-[#111111] p-4",children:(0,r.jsxs)("div",{className:"flex gap-3 max-w-4xl mx-auto",children:[(0,r.jsx)("textarea",{ref:o,value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},placeholder:"Nachricht an Alfred...",disabled:a,rows:1,className:"flex-1 bg-[#1a1a1a] text-gray-200 border border-[#2a2a2a] rounded-xl px-4 py-3 text-sm resize-none focus:outline-none focus:border-blue-500 placeholder-gray-500 disabled:opacity-50"}),(0,r.jsx)("button",{onClick:i,disabled:a||!n.trim(),className:"bg-blue-600 hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed text-white rounded-xl px-5 py-3 text-sm font-medium transition-colors",children:"Senden"})]})})}var c=a(8719);function u(e,t){switch(t.type){case"ADD_USER":return{...e,messages:[...e.messages,{id:"user-".concat(Date.now()),role:"user",content:t.text,timestamp:Date.now()}],error:null};case"START_ASSISTANT":return{...e,streaming:!0,currentStatus:null,messages:[...e.messages,{id:"asst-".concat(Date.now()),role:"assistant",content:"",timestamp:Date.now()}]};case"APPEND_RESPONSE":{let a=[...e.messages],r=a[a.length-1];return(null==r?void 0:r.role)==="assistant"&&(a[a.length-1]={...r,content:r.content+t.text}),{...e,messages:a,currentStatus:null}}case"SET_STATUS":return{...e,currentStatus:t.text};case"ADD_ATTACHMENT":{let r=[...e.messages],s=r[r.length-1];if((null==s?void 0:s.role)==="assistant"){var a;let e=[...null!=(a=s.attachments)?a:[],t.attachment];r[r.length-1]={...s,attachments:e}}return{...e,messages:r}}case"DONE":return{...e,streaming:!1,currentStatus:null};case"ERROR":return{...e,streaming:!1,currentStatus:null,error:t.error}}}function d(){let{messages:e,streaming:t,currentStatus:a,error:n,sendMessage:l}=function(e){let{client:t}=(0,c.U)(),[a,r]=(0,s.useReducer)(u,{messages:[],streaming:!1,currentStatus:null,error:null}),n=(0,s.useRef)(null),l=(0,s.useCallback)(s=>{s.trim()&&!a.streaming&&(r({type:"ADD_USER",text:s}),r({type:"START_ASSISTANT"}),n.current=t.streamMessage(s,e,"web-user",{onStatus:e=>r({type:"SET_STATUS",text:e}),onResponse:e=>r({type:"APPEND_RESPONSE",text:e}),onAttachment:e=>r({type:"ADD_ATTACHMENT",attachment:e}),onDone:()=>r({type:"DONE"}),onError:e=>r({type:"ERROR",error:e})}))},[t,e,a.streaming]),o=(0,s.useCallback)(()=>{var e;null==(e=n.current)||e.call(n),r({type:"DONE"})},[]);return{...a,sendMessage:l,cancel:o}}((0,s.useMemo)(()=>"web-".concat(Date.now().toString(36)),[])),d=(0,s.useRef)(null);return(0,s.useEffect)(()=>{var e;null==(e=d.current)||e.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[e,a]),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{ref:d,className:"flex-1 overflow-y-auto p-4",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto",children:[0===e.length&&(0,r.jsxs)("div",{className:"text-center text-gray-500 mt-20",children:[(0,r.jsx)("p",{className:"text-4xl mb-4 font-mono font-bold text-blue-500",children:"Alfred"}),(0,r.jsx)("p",{className:"text-sm",children:"Self-hosted AI Assistant"}),(0,r.jsx)("p",{className:"text-xs mt-2 text-gray-600",children:"Stelle eine Frage oder gib einen Befehl ein."})]}),e.map(e=>(0,r.jsx)(o,{message:e},e.id)),a&&(0,r.jsx)("div",{className:"flex justify-start mb-4",children:(0,r.jsx)("div",{className:"bg-[#1a1a1a] border border-[#2a2a2a] rounded-2xl px-4 py-2 text-xs text-gray-400 animate-pulse",children:a})}),n&&(0,r.jsx)("div",{className:"text-center text-red-400 text-sm mt-4 bg-red-500/10 rounded-lg p-3",children:n})]})}),(0,r.jsx)(i,{onSend:l,disabled:t})]})}},8719:(e,t,a)=>{"use strict";a.d(t,{ConfigProvider:()=>u,U:()=>d});var r,s=a(8111),n=a(5271);async function*l(e){var t,a;let r=null==(t=e.body)?void 0:t.getReader();if(!r)return;let s=new TextDecoder,n="",l="",o="";try{for(;;){let{done:e,value:t}=await r.read();if(e)break;let i=(n+=s.decode(t,{stream:!0})).split("\n");for(let e of(n=null!=(a=i.pop())?a:"",i))e.startsWith("event: ")?l=e.slice(7).trim():e.startsWith("data: ")?o+=(o?"\n":"")+e.slice(6):""===e&&(l&&o&&(yield{event:l,data:o}),l="",o="")}l&&o&&(yield{event:l,data:o})}finally{r.releaseLock()}}class o{updateConfig(e,t){this.baseUrl=e,this.token=t}streamMessage(e,t,a,r){let s=new AbortController;return(async()=>{var n,o,i,c,u,d;try{let d=await fetch("".concat(this.baseUrl,"/api/message"),{method:"POST",headers:{"Content-Type":"application/json",...this.token?{Authorization:"Bearer ".concat(this.token)}:{}},body:JSON.stringify({text:e,chatId:t,userId:a}),signal:s.signal});if(!d.ok)return void r.onError("HTTP ".concat(d.status,": ").concat(d.statusText));for await(let{event:e,data:t}of l(d))try{let a=JSON.parse(t);switch(e){case"status":r.onStatus(null!=(o=null!=(n=a.text)?n:a.status)?o:t);break;case"response":r.onResponse(null!=(i=a.text)?i:t);break;case"attachment":r.onAttachment(a);break;case"done":r.onDone();break;case"error":r.onError(null!=(u=null!=(c=a.error)?c:a.message)?u:t)}}catch(a){"response"===e?r.onResponse(t):"error"===e&&r.onError(t)}r.onDone()}catch(e){"AbortError"!==e.name&&r.onError(null!=(d=e.message)?d:"Connection failed")}})(),()=>s.abort()}async fetchDashboard(){let e=await fetch("".concat(this.baseUrl,"/api/dashboard"),{headers:this.token?{Authorization:"Bearer ".concat(this.token)}:{}});if(!e.ok)throw Error("Dashboard: HTTP ".concat(e.status));return e.json()}async fetchHealth(){let e=await fetch("".concat(this.baseUrl,"/api/health"),{headers:this.token?{Authorization:"Bearer ".concat(this.token)}:{}});if(!e.ok)throw Error("Health: HTTP ".concat(e.status));return e.json()}constructor(e,t){this.baseUrl=e,this.token=t}}let i={apiUrl:null!=(r=a(1756).env.NEXT_PUBLIC_ALFRED_API_URL)?r:"http://localhost:3420",apiToken:""},c=(0,n.createContext)(null);function u(e){let{children:t}=e,[a,r]=(0,n.useState)(i),[l]=(0,n.useState)(()=>new o(i.apiUrl,i.apiToken));return(0,n.useEffect)(()=>{try{let e=localStorage.getItem("alfred-config");if(e){let t=JSON.parse(e);r(t),l.updateConfig(t.apiUrl,t.apiToken)}}catch(e){}},[l]),(0,s.jsx)(c.Provider,{value:{config:a,setConfig:e=>{r(e),l.updateConfig(e.apiUrl,e.apiToken),localStorage.setItem("alfred-config",JSON.stringify(e))},client:l},children:t})}function d(){let e=(0,n.useContext)(c);if(!e)throw Error("useConfig must be used within ConfigProvider");return e}},9624:(e,t,a)=>{Promise.resolve().then(a.bind(a,1740))}}]);
|