diff --git a/ui/index.html b/ui/index.html
index f01c3e6..3453914 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -3,7 +3,11 @@
-
+
+
+
+
+
llama-swap
diff --git a/ui/misc/logo.acorn b/ui/misc/logo.acorn
index f1185f3..b68762d 100644
Binary files a/ui/misc/logo.acorn and b/ui/misc/logo.acorn differ
diff --git a/ui/public/apple-touch-icon.png b/ui/public/apple-touch-icon.png
new file mode 100644
index 0000000..27b03b9
Binary files /dev/null and b/ui/public/apple-touch-icon.png differ
diff --git a/ui/public/favicon-96x96.png b/ui/public/favicon-96x96.png
new file mode 100644
index 0000000..94e5738
Binary files /dev/null and b/ui/public/favicon-96x96.png differ
diff --git a/ui/public/favicon.ico b/ui/public/favicon.ico
index acbee7d..359c2d2 100644
Binary files a/ui/public/favicon.ico and b/ui/public/favicon.ico differ
diff --git a/ui/public/favicon.svg b/ui/public/favicon.svg
new file mode 100644
index 0000000..80a6387
--- /dev/null
+++ b/ui/public/favicon.svg
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/ui/public/site.webmanifest b/ui/public/site.webmanifest
new file mode 100644
index 0000000..42e9963
--- /dev/null
+++ b/ui/public/site.webmanifest
@@ -0,0 +1,21 @@
+{
+ "name": "llama-swap",
+ "short_name": "llama-swap",
+ "icons": [
+ {
+ "src": "/web-app-manifest-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "maskable"
+ },
+ {
+ "src": "/web-app-manifest-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
\ No newline at end of file
diff --git a/ui/public/web-app-manifest-192x192.png b/ui/public/web-app-manifest-192x192.png
new file mode 100644
index 0000000..f2a1bce
Binary files /dev/null and b/ui/public/web-app-manifest-192x192.png differ
diff --git a/ui/public/web-app-manifest-512x512.png b/ui/public/web-app-manifest-512x512.png
new file mode 100644
index 0000000..7912d0b
Binary files /dev/null and b/ui/public/web-app-manifest-512x512.png differ
diff --git a/ui/src/contexts/APIProvider.tsx b/ui/src/contexts/APIProvider.tsx
index a6cc689..b37859d 100644
--- a/ui/src/contexts/APIProvider.tsx
+++ b/ui/src/contexts/APIProvider.tsx
@@ -58,9 +58,27 @@ export function APIProvider({ children }: APIProviderProps) {
const enableProxyLogs = useCallback(
(enabled: boolean) => {
if (enabled) {
- const eventSource = new EventSource("/logs/streamSSE/proxy");
- eventSource.onmessage = handleProxyMessage;
- proxyEventSource.current = eventSource;
+ let retryCount = 0;
+ const maxRetries = 3;
+ const initialDelay = 1000; // 1 second
+
+ const connect = () => {
+ const eventSource = new EventSource("/logs/streamSSE/proxy");
+
+ eventSource.onmessage = handleProxyMessage;
+ eventSource.onerror = () => {
+ eventSource.close();
+ if (retryCount < maxRetries) {
+ retryCount++;
+ const delay = initialDelay * Math.pow(2, retryCount - 1);
+ setTimeout(connect, delay);
+ }
+ };
+
+ proxyEventSource.current = eventSource;
+ };
+
+ connect();
} else {
proxyEventSource.current?.close();
proxyEventSource.current = null;
@@ -72,15 +90,33 @@ export function APIProvider({ children }: APIProviderProps) {
const enableUpstreamLogs = useCallback(
(enabled: boolean) => {
if (enabled) {
- const eventSource = new EventSource("/logs/streamSSE/upstream");
- eventSource.onmessage = handleUpstreamMessage;
- upstreamEventSource.current = eventSource;
+ let retryCount = 0;
+ const maxRetries = 3;
+ const initialDelay = 1000; // 1 second
+
+ const connect = () => {
+ const eventSource = new EventSource("/logs/streamSSE/upstream");
+
+ eventSource.onmessage = handleUpstreamMessage;
+ eventSource.onerror = () => {
+ eventSource.close();
+ if (retryCount < maxRetries) {
+ retryCount++;
+ const delay = initialDelay * Math.pow(2, retryCount - 1);
+ setTimeout(connect, delay);
+ }
+ };
+
+ upstreamEventSource.current = eventSource;
+ };
+
+ connect();
} else {
upstreamEventSource.current?.close();
upstreamEventSource.current = null;
}
},
- [upstreamEventSource, handleUpstreamMessage]
+ [handleUpstreamMessage]
);
const enableModelUpdates = useCallback(