- Curated files loader now MERGES per top-level folder: dropping real files into demo/files/Music/ swaps only Music and keeps the sample Documents/Photos/Videos (verified). Media plays with the Range support already in place. - AIUI index.html: a ?seed bootstrap pre-loads the example "Content Showcase" conversation into AIUI's IndexedDB by calling the bundle's own seedPromptsToConversation() (identical to its /seed command), so the chat history isn't empty when the demo points users to "previous chats". Guarded by try/catch + an existence check; no-op without ?seed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
3.1 KiB
HTML
49 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="h-full overflow-hidden">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
|
<meta name="theme-color" content="#0a0a0a" media="(prefers-color-scheme: dark)" />
|
|
<meta name="theme-color" content="#faf9f6" media="(prefers-color-scheme: light)" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="apple-mobile-web-app-title" content="AIUI" />
|
|
<meta name="description" content="AI chat interface with rich content surfaces" />
|
|
<!-- CSP set via HTTP headers in production nginx — not in HTML meta to avoid breaking Vite HMR -->
|
|
<link rel="icon" href="/aiui/favicon.svg" type="image/svg+xml" />
|
|
<link rel="apple-touch-icon" href="/aiui/apple-touch-icon-180x180.png" />
|
|
<title>AIUI</title>
|
|
<!-- Demo (?seed): pre-load the example "Content Showcase" conversation into
|
|
AIUI's IndexedDB so the chat history isn't empty (live chat is disabled
|
|
in the demo and points users to these previous chats). Mirrors the app's
|
|
own /seed exactly by calling its seedPromptsToConversation(). -->
|
|
<script type="module">
|
|
(async () => {
|
|
try {
|
|
if (!new URLSearchParams(location.search).has('seed')) return;
|
|
const db = await new Promise((res, rej) => {
|
|
const r = indexedDB.open('aiui-store', 1);
|
|
r.onupgradeneeded = (e) => { const d = e.target.result; if (!d.objectStoreNames.contains('conversations')) d.createObjectStore('conversations', { keyPath: 'id' }); };
|
|
r.onsuccess = () => res(r.result); r.onerror = () => rej(r.error);
|
|
});
|
|
const exists = await new Promise((res) => {
|
|
try { const q = db.transaction('conversations', 'readonly').objectStore('conversations').getKey('seed-all'); q.onsuccess = () => res(!!q.result); q.onerror = () => res(false); }
|
|
catch { res(false); }
|
|
});
|
|
if (exists) return;
|
|
const { seedPromptsToConversation } = await import('/aiui/assets/seedPrompts-CLWaUv28.js');
|
|
const conv = seedPromptsToConversation();
|
|
await new Promise((res, rej) => { const t = db.transaction('conversations', 'readwrite'); t.objectStore('conversations').put(conv); t.oncomplete = () => res(); t.onerror = () => rej(t.error); });
|
|
try { localStorage.setItem('aiui-active-conversation', conv.id); } catch {}
|
|
} catch (e) { console.warn('[demo] AIUI seed bootstrap failed', e); }
|
|
})();
|
|
</script>
|
|
<script type="module" crossorigin src="/aiui/assets/index-Lh5NfTCq.js"></script>
|
|
<link rel="stylesheet" crossorigin href="/aiui/assets/index-CHQ7uqBj.css">
|
|
<link rel="manifest" href="/aiui/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/aiui/registerSW.js"></script></head>
|
|
<body class="antialiased h-full overflow-hidden fixed w-full">
|
|
<div id="app"></div>
|
|
</body>
|
|
</html>
|