]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ui: fix mobile chat form overflow and bust stale bundle cache (#24158)
authorPascal <redacted>
Tue, 9 Jun 2026 09:12:58 +0000 (11:12 +0200)
committerGitHub <redacted>
Tue, 9 Jun 2026 09:12:58 +0000 (11:12 +0200)
tools/ui/scripts/vite-plugin-llama-cpp-build.ts
tools/ui/src/routes/+layout.svelte

index 01c714a241df8211768eb0e27466e60bfb7cdf90..74e3de9baa9c8c0ac9ca6b74fefbf4458901a807 100644 (file)
@@ -46,10 +46,12 @@ export function llamaCppBuildPlugin(): Plugin {
 
                                        content = content.replace(/\r/g, '');
                                        content = GUIDE_FOR_FRONTEND + '\n' + content;
-                                       content = content.replace(/\/_app\/immutable\/bundle\.[^"]+\.js/g, './bundle.js');
+
+                                       // Keep the Vite hash as a query string so each build busts the browser cache
+                                       content = content.replace(/\/_app\/immutable\/bundle\.([^".]+)\.js/g, './bundle.js?$1');
                                        content = content.replace(
-                                               /\/_app\/immutable\/assets\/bundle\.[^"]+\.css/g,
-                                               './bundle.css'
+                                               /\/_app\/immutable\/assets\/bundle\.([^".]+)\.css/g,
+                                               './bundle.css?$1'
                                        );
                                        content = content.replace(/__sveltekit_[a-z0-9]+/g, '__sveltekit__');
 
index be474109ad92475317d2d4e395aaa1c54cc3656a..aa023840bdebe639ed5f14fd5a27f7b99d346839 100644 (file)
        />
 
        <Sidebar.Provider bind:open={sidebarOpen}>
-               <div class="flex h-screen w-full">
+               <div class="flex h-dvh w-full">
                        <Sidebar.Root variant="floating" class="h-full"
                                ><SidebarNavigation bind:this={chatSidebar} /></Sidebar.Root
                        >