1- <!DOCTYPE html>
1+ <!doctype html>
22< html lang ="en ">
3- < head >
4- < meta charset ="UTF-8 ">
3+ < head >
4+ < meta charset ="UTF-8 " / >
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no ">
66 < title > Your Local AI</ title >
7- < script src ="https://cdn.tailwindcss.com "> </ script >
8- < style >
9- .no-scrollbar ::-webkit-scrollbar { display : none; }
10- .no-scrollbar { -ms-overflow-style : none; scrollbar-width : none; }
11- .sidebar-transition { transition : transform 0.3s ease-in-out; }
12- .blink { animation : blinker 1.5s linear infinite; }
13- @keyframes blinker { 50% { opacity : 0 ; } }
14- .progress-bar { transition : width 0.3s ease; }
15- .fade-in { animation : fadeIn 0.3s ease-in; }
16- @keyframes fadeIn { from { opacity : 0 ; transform : translateY (5px ); } to { opacity : 1 ; transform : translateY (0 ); } }
17- </ style >
18- </ head >
19- < body class ="bg-gray-900 text-white h-[100dvh] flex overflow-hidden ">
20-
21- <!-- Mobile Overlay -->
22- < div id ="backdrop " onclick ="closeSidebar() " class ="fixed inset-0 bg-black/60 z-40 hidden backdrop-blur-sm md:hidden "> </ div >
23-
24- <!-- SIDEBAR -->
25- < div id ="sidebar " class ="fixed inset-y-0 left-0 w-80 bg-gray-800 border-r border-gray-700 z-50 transform -translate-x-full md:translate-x-0 md:relative sidebar-transition flex flex-col shadow-2xl shrink-0 ">
26- <!-- Tabs -->
27- < div class ="flex border-b border-gray-700 ">
28- < button onclick ="switchTab('models') " id ="tab-models " class ="flex-1 py-3 text-xs font-bold text-blue-400 border-b-2 border-blue-400 bg-gray-700/50 "> MODELS</ button >
29- < button onclick ="switchTab('history') " id ="tab-history " class ="flex-1 py-3 text-xs font-bold text-gray-500 hover:text-gray-300 "> HISTORY</ button >
30- </ div >
31-
32- < div class ="p-4 flex-1 overflow-y-auto space-y-6 no-scrollbar ">
33-
34- <!-- MODELS TAB -->
35- < div id ="view-models " class ="space-y-6 ">
36- <!-- CSV Models Section -->
37- < div >
38- < div class ="flex justify-between items-center mb-2 ">
39- < div class ="text-xs text-gray-400 uppercase font-bold "> Available Models</ div >
40- < button onclick ="loadModelList() " class ="text-[10px] text-blue-400 hover:underline "> Refresh</ button >
41- </ div >
42- < div id ="csv-model-list " class ="space-y-2 ">
43- < div class ="text-xs text-gray-600 italic text-center py-4 "> Loading list...</ div >
44- </ div >
45- </ div >
46-
47- <!-- Manual Upload -->
48- < div class ="border-t border-gray-700 pt-4 ">
49- < div class ="text-xs text-gray-400 uppercase font-bold mb-2 "> Manual Upload</ div >
50- < label class ="flex flex-col items-center justify-center w-full h-24 border-2 border-dashed border-gray-600 rounded-lg cursor-pointer hover:bg-gray-700 hover:border-blue-500 transition-colors bg-gray-800/50 ">
51- < div class ="flex flex-col items-center justify-center pt-2 pb-3 ">
52- < svg class ="w-6 h-6 mb-1 text-gray-400 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 "> < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12 "> </ path > </ svg >
53- < p class ="text-[10px] text-gray-400 "> Tap to Select .gguf</ p >
54- </ div >
55- < input type ="file " id ="file-upload " accept =".gguf " class ="hidden " />
56- </ label >
57- </ div >
58- </ div >
59-
60- <!-- HISTORY TAB -->
61- < div id ="view-history " class ="hidden space-y-2 ">
62- < div class ="flex justify-between items-center mb-2 ">
63- < div class ="text-xs text-gray-400 uppercase font-bold "> Recent Chats</ div >
64- < button onclick ="clearAllHistory() " class ="text-[10px] text-red-400 hover:underline "> Clear All</ button >
65- </ div >
66- < div id ="history-list " class ="space-y-1 ">
67- <!-- History Items Injected Here -->
68- </ div >
69- </ div >
70-
71- <!-- Download Progress -->
72- < div id ="dl-progress-container " class ="hidden bg-gray-900 rounded-lg p-3 border border-gray-700 mt-auto ">
73- < div class ="flex justify-between text-[10px] mb-1 ">
74- < span class ="text-blue-300 "> Downloading...</ span >
75- < span id ="dl-percent " class ="text-white font-mono "> 0%</ span >
76- </ div >
77- < div class ="w-full bg-gray-700 rounded-full h-1.5 ">
78- < div id ="dl-bar " class ="bg-blue-500 h-1.5 rounded-full progress-bar " style ="width: 0% "> </ div >
79- </ div >
80- < div id ="dl-details " class ="text-[9px] text-gray-500 mt-1 text-right font-mono "> 0MB / 0MB</ div >
81- </ div >
82- </ div >
83-
84- < div class ="p-2 text-center text-[10px] text-gray-600 bg-gray-800 border-t border-gray-700 "> v1.17.3 (Input Fixes)</ div >
85- </ div >
86-
87- <!-- MAIN CHAT -->
88- < div class ="flex-1 flex flex-col relative w-full bg-gray-900 min-w-0 ">
89- <!-- Header -->
90- < div class ="h-14 border-b border-gray-700 flex items-center px-4 justify-between bg-gray-800 z-10 ">
91- < div class ="flex items-center gap-3 ">
92- < button onclick ="openSidebar() " class ="md:hidden text-gray-400 p-1 hover:text-white ">
93- < svg class ="w-6 h-6 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 "> < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M4 6h16M4 12h16M4 18h16 "> </ path > </ svg >
94- </ button >
95- < div class ="flex flex-col ">
96- < span id ="header-status " class ="font-bold text-sm text-gray-200 "> Local AI</ span >
97- < span id ="active-model-name " class ="text-[10px] text-gray-500 truncate max-w-[150px] "> No Model Loaded</ span >
98- </ div >
99- </ div >
100-
101- < div class ="flex items-center gap-2 ">
102- < div id ="engine-state " class ="text-[10px] px-2 py-1 rounded bg-black/40 text-gray-400 font-mono hidden md:block "> OFFLINE</ div >
103- < button onclick ="startNewChat() " class ="bg-blue-600 hover:bg-blue-500 text-white text-xs px-3 py-1.5 rounded-lg flex items-center gap-1 transition-colors ">
104- < svg class ="w-3 h-3 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 "> < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M12 4v16m8-8H4 "> </ path > </ svg >
105- New Chat
106- </ button >
107- </ div >
108- </ div >
109-
110- <!-- Chat Area -->
111- < div id ="chat-box " class ="flex-1 overflow-y-auto p-4 pb-40 space-y-4 ">
112- < div id ="welcome-message " class ="flex flex-col items-center justify-center h-full text-gray-500 space-y-4 ">
113- < div class ="p-4 bg-gray-800 rounded-full animate-bounce ">
114- < svg class ="w-8 h-8 text-blue-400 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 "> < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M13 10V3L4 14h7v7l9-11h-7z "> </ path > </ svg >
115- </ div >
116- < div class ="text-center ">
117- < h3 class ="text-lg font-medium text-white "> How can I help you today?</ h3 >
118- < p class ="text-xs mt-1 "> Checking for downloaded models...</ p >
119- </ div >
120- </ div >
121- </ div >
122-
123- <!-- Input -->
124- < div class ="absolute bottom-0 w-full bg-gray-900 pt-4 pb-4 px-4 border-t border-gray-800 ">
125- < div class ="max-w-3xl mx-auto relative flex gap-2 ">
126- < input id ="user-input " type ="text " class ="flex-1 bg-gray-800 text-white rounded-lg px-4 py-3 border border-gray-700 focus:outline-none focus:border-blue-500 transition-all " placeholder ="Load a model to start... " disabled >
127- < button id ="send-btn " onclick ="sendMessage() " class ="bg-blue-600 px-6 rounded-lg text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:bg-blue-700 transition-colors " disabled > Send</ button >
128- </ div >
129- </ div >
130- </ div >
131-
132- < script type ="module " src ="index.js ">
133- </ script >
134- </ body >
135- </ html >
7+ < link rel ="icon " type ="image/svg+xml " href ="/logo.png " />
8+ </ head >
9+ < body >
10+ < div id ="root "> </ div >
11+ < script type ="module " src ="/src/main.jsx "> </ script >
12+ </ body >
13+ </ html >
0 commit comments