Ab-Romia commited on
Commit
ba74fcb
Β·
verified Β·
1 Parent(s): a1161f3

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +15 -16
templates/index.html CHANGED
@@ -67,17 +67,14 @@
67
  </style>
68
  </head>
69
  <body class="font-inter text-white">
70
- <!-- Background decorative elements -->
71
  <div class="fixed inset-0 -z-10">
72
  <div class="absolute -top-40 -right-40 w-80 h-80 bg-purple-500 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse-slow"></div>
73
  <div class="absolute -bottom-40 -left-40 w-80 h-80 bg-blue-500 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse-slow animation-delay-2000"></div>
74
  </div>
75
 
76
- <!-- Main container for the entire application -->
77
  <div class="relative z-10 flex items-center justify-center min-h-screen p-2 sm:p-4">
78
  <div class="w-full max-w-7xl min-h-[95vh] glass-effect rounded-3xl shadow-2xl flex flex-col">
79
 
80
- <!-- Header Section -->
81
  <header class="flex items-center justify-between p-4 sm:p-6 border-b border-slate-600/50 flex-wrap">
82
  <div class="flex items-center space-x-4">
83
  <div class="w-10 h-10 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl flex items-center justify-center flex-shrink-0">
@@ -95,7 +92,6 @@
95
  </div>
96
  </header>
97
 
98
- <!-- API Key Configuration Section (Collapsible) -->
99
  <div id="api-key-section" class="p-4 sm:p-6 border-b border-slate-600/30 bg-slate-800/30">
100
  <div id="toggle-api-section" class="flex items-center justify-between cursor-pointer">
101
  <div>
@@ -136,22 +132,30 @@
136
  </div>
137
  </div>
138
 
139
- <!-- Main Content Area: Stacks on mobile, side-by-side on desktop -->
140
  <div class="flex-1 flex flex-col lg:flex-row lg:overflow-hidden">
141
- <!-- Left Panel: Knowledge Base -->
142
  <div class="w-full lg:w-1/2 flex flex-col border-b lg:border-b-0 lg:border-r border-slate-600/50">
143
- <!-- Mobile Header for Knowledge Base (Collapsible) -->
144
  <div id="kb-header" class="p-4 sm:p-6 border-b border-slate-600/30 flex justify-between items-center lg:hidden cursor-pointer">
145
  <h2 class="text-lg font-semibold text-slate-200">πŸ“š Knowledge Base</h2>
146
  <svg id="kb-toggle-icon" class="w-5 h-5 transition-transform duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>
147
  </div>
148
 
149
- <!-- Knowledge Base Content -->
150
  <div id="kb-content" class="flex-1 p-4 sm:p-6 flex flex-col lg:flex">
151
  <h2 class="hidden lg:block text-lg font-semibold text-slate-200">πŸ“š Knowledge Base</h2>
152
  <p class="hidden lg:block text-sm text-slate-400 mt-1 mb-4">Provide context for the AI to learn from.</p>
 
 
 
 
 
 
 
 
 
 
 
 
153
  <div class="flex-1 flex flex-col">
154
- <textarea id="context-input" class="w-full flex-1 bg-slate-900/50 border border-slate-600/50 rounded-xl p-4 text-slate-200 placeholder-slate-500 focus:ring-2 focus:ring-indigo-500 focus:outline-none resize-none transition scroll-container min-h-[250px] lg:min-h-0" placeholder="Paste your documents, meeting notes, or any relevant context here..."></textarea>
155
  </div>
156
  <div class="mt-4 flex items-center justify-between">
157
  <div class="text-xs text-slate-400">
@@ -165,15 +169,12 @@
165
  </div>
166
  </div>
167
 
168
- <!-- Right Panel: AI Assistant -->
169
  <div class="w-full lg:w-1/2 flex flex-col">
170
- <!-- Mobile Header for AI Assistant (Collapsible) -->
171
  <div id="assistant-header" class="p-4 sm:p-6 border-b border-slate-600/30 flex justify-between items-center lg:hidden cursor-pointer">
172
  <h2 class="text-lg font-semibold text-slate-200">πŸ€– AI Assistant</h2>
173
  <svg id="assistant-toggle-icon" class="w-5 h-5 transition-transform duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>
174
  </div>
175
 
176
- <!-- AI Assistant Content -->
177
  <div id="assistant-content" class="flex-1 flex flex-col lg:flex lg:overflow-hidden">
178
  <div class="hidden lg:block p-6 border-b border-slate-600/30">
179
  <h2 class="text-lg font-semibold text-slate-200">πŸ€– AI Assistant</h2>
@@ -189,8 +190,7 @@
189
  </select>
190
  </div>
191
  <div id="chat-container" class="flex-1 overflow-y-auto scroll-container p-6 space-y-6 min-h-[300px] lg:min-h-0">
192
- <!-- Chat messages will be dynamically added here -->
193
- </div>
194
  <div class="p-4 sm:p-6 border-t border-slate-600/30">
195
  <div class="relative">
196
  <textarea id="chat-input" rows="1" class="w-full bg-slate-900/50 border border-slate-600/50 rounded-xl p-3 pr-12 text-slate-200 placeholder-slate-500 focus:ring-2 focus:ring-indigo-500 focus:outline-none resize-none transition" placeholder="Ask a question or provide a prompt..." style="max-height: 120px;"></textarea>
@@ -200,8 +200,7 @@
200
  </div>
201
  <div class="flex items-center justify-between mt-3 text-xs text-slate-400 h-5">
202
  <div id="status-indicator" class="hidden">
203
- <!-- Status messages appear here -->
204
- </div>
205
  </div>
206
  </div>
207
  </div>
 
67
  </style>
68
  </head>
69
  <body class="font-inter text-white">
 
70
  <div class="fixed inset-0 -z-10">
71
  <div class="absolute -top-40 -right-40 w-80 h-80 bg-purple-500 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse-slow"></div>
72
  <div class="absolute -bottom-40 -left-40 w-80 h-80 bg-blue-500 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse-slow animation-delay-2000"></div>
73
  </div>
74
 
 
75
  <div class="relative z-10 flex items-center justify-center min-h-screen p-2 sm:p-4">
76
  <div class="w-full max-w-7xl min-h-[95vh] glass-effect rounded-3xl shadow-2xl flex flex-col">
77
 
 
78
  <header class="flex items-center justify-between p-4 sm:p-6 border-b border-slate-600/50 flex-wrap">
79
  <div class="flex items-center space-x-4">
80
  <div class="w-10 h-10 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl flex items-center justify-center flex-shrink-0">
 
92
  </div>
93
  </header>
94
 
 
95
  <div id="api-key-section" class="p-4 sm:p-6 border-b border-slate-600/30 bg-slate-800/30">
96
  <div id="toggle-api-section" class="flex items-center justify-between cursor-pointer">
97
  <div>
 
132
  </div>
133
  </div>
134
 
 
135
  <div class="flex-1 flex flex-col lg:flex-row lg:overflow-hidden">
 
136
  <div class="w-full lg:w-1/2 flex flex-col border-b lg:border-b-0 lg:border-r border-slate-600/50">
 
137
  <div id="kb-header" class="p-4 sm:p-6 border-b border-slate-600/30 flex justify-between items-center lg:hidden cursor-pointer">
138
  <h2 class="text-lg font-semibold text-slate-200">πŸ“š Knowledge Base</h2>
139
  <svg id="kb-toggle-icon" class="w-5 h-5 transition-transform duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>
140
  </div>
141
 
 
142
  <div id="kb-content" class="flex-1 p-4 sm:p-6 flex flex-col lg:flex">
143
  <h2 class="hidden lg:block text-lg font-semibold text-slate-200">πŸ“š Knowledge Base</h2>
144
  <p class="hidden lg:block text-sm text-slate-400 mt-1 mb-4">Provide context for the AI to learn from.</p>
145
+
146
+ <div class="mb-4">
147
+ <label for="file-input" class="block text-sm font-medium text-slate-300 mb-2">Upload a document (.txt, .pdf):</label>
148
+ <div class="flex items-center space-x-2">
149
+ <input type="file" id="file-input" class="hidden" accept=".txt,.pdf">
150
+ <label for="file-input" class="flex-1 cursor-pointer bg-slate-900/50 border border-slate-600/50 rounded-lg p-2 text-slate-400 hover:bg-slate-800/50 transition truncate">
151
+ <span id="file-name" class="text-slate-400">Choose a file...</span>
152
+ </label>
153
+ </div>
154
+ <p class="text-xs text-slate-500 mt-2">Uploading a file will replace the text in the text area below.</p>
155
+ </div>
156
+
157
  <div class="flex-1 flex flex-col">
158
+ <textarea id="context-input" class="w-full flex-1 bg-slate-900/50 border border-slate-600/50 rounded-xl p-4 text-slate-200 placeholder-slate-500 focus:ring-2 focus:ring-indigo-500 focus:outline-none resize-none transition scroll-container min-h-[250px] lg:min-h-0" placeholder="... or paste your documents, meeting notes, or any relevant context here"></textarea>
159
  </div>
160
  <div class="mt-4 flex items-center justify-between">
161
  <div class="text-xs text-slate-400">
 
169
  </div>
170
  </div>
171
 
 
172
  <div class="w-full lg:w-1/2 flex flex-col">
 
173
  <div id="assistant-header" class="p-4 sm:p-6 border-b border-slate-600/30 flex justify-between items-center lg:hidden cursor-pointer">
174
  <h2 class="text-lg font-semibold text-slate-200">πŸ€– AI Assistant</h2>
175
  <svg id="assistant-toggle-icon" class="w-5 h-5 transition-transform duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>
176
  </div>
177
 
 
178
  <div id="assistant-content" class="flex-1 flex flex-col lg:flex lg:overflow-hidden">
179
  <div class="hidden lg:block p-6 border-b border-slate-600/30">
180
  <h2 class="text-lg font-semibold text-slate-200">πŸ€– AI Assistant</h2>
 
190
  </select>
191
  </div>
192
  <div id="chat-container" class="flex-1 overflow-y-auto scroll-container p-6 space-y-6 min-h-[300px] lg:min-h-0">
193
+ </div>
 
194
  <div class="p-4 sm:p-6 border-t border-slate-600/30">
195
  <div class="relative">
196
  <textarea id="chat-input" rows="1" class="w-full bg-slate-900/50 border border-slate-600/50 rounded-xl p-3 pr-12 text-slate-200 placeholder-slate-500 focus:ring-2 focus:ring-indigo-500 focus:outline-none resize-none transition" placeholder="Ask a question or provide a prompt..." style="max-height: 120px;"></textarea>
 
200
  </div>
201
  <div class="flex items-center justify-between mt-3 text-xs text-slate-400 h-5">
202
  <div id="status-indicator" class="hidden">
203
+ </div>
 
204
  </div>
205
  </div>
206
  </div>