UjjwalK commited on
Commit
ab44995
·
verified ·
1 Parent(s): e6bc8b0

Add 1 files

Browse files
Files changed (1) hide show
  1. index.html +121 -267
index.html CHANGED
@@ -57,6 +57,35 @@
57
  .typing-dot:nth-child(3) {
58
  animation-delay: 0.6s;
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </style>
61
  </head>
62
  <body class="bg-gray-100 font-sans">
@@ -69,15 +98,15 @@
69
  </div>
70
  <div>
71
  <h1 class="text-2xl font-bold text-gray-800">Knowledge Base Assistant</h1>
72
- <p class="text-gray-600">Ask me anything from our documentation</p>
73
  </div>
74
  </div>
75
  <div class="flex space-x-2">
76
  <button id="clearChat" class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded-lg text-gray-700 transition">
77
  <i class="fas fa-trash-alt mr-2"></i>Clear
78
  </button>
79
- <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white transition">
80
- <i class="fas fa-book mr-2"></i>Knowledge Base
81
  </button>
82
  </div>
83
  </header>
@@ -85,59 +114,34 @@
85
  <!-- Main Chat Area -->
86
  <div class="bg-white rounded-xl shadow-lg overflow-hidden">
87
  <div class="flex h-[70vh]">
88
- <!-- Sidebar with categories -->
89
  <div class="w-64 bg-gray-50 border-r border-gray-200 p-4 hidden md:block">
90
  <div class="mb-6">
91
- <h3 class="font-semibold text-gray-700 mb-3">Categories</h3>
92
- <ul class="space-y-2">
93
- <li>
94
- <button class="category-btn w-full text-left px-3 py-2 rounded-lg bg-blue-100 text-blue-700 font-medium">
95
- <i class="fas fa-cog mr-2"></i>Getting Started
96
- </button>
97
- </li>
98
- <li>
99
- <button class="category-btn w-full text-left px-3 py-2 rounded-lg hover:bg-gray-100 text-gray-700 transition">
100
- <i class="fas fa-user mr-2"></i>User Guide
101
- </button>
102
- </li>
103
- <li>
104
- <button class="category-btn w-full text-left px-3 py-2 rounded-lg hover:bg-gray-100 text-gray-700 transition">
105
- <i class="fas fa-tools mr-2"></i>Troubleshooting
106
- </button>
107
- </li>
108
- <li>
109
- <button class="category-btn w-full text-left px-3 py-2 rounded-lg hover:bg-gray-100 text-gray-700 transition">
110
- <i class="fas fa-shield-alt mr-2"></i>Security
111
- </button>
112
- </li>
113
- <li>
114
- <button class="category-btn w-full text-left px-3 py-2 rounded-lg hover:bg-gray-100 text-gray-700 transition">
115
- <i class="fas fa-chart-line mr-2"></i>API Reference
116
- </button>
117
- </li>
118
- </ul>
119
  </div>
120
  <div>
121
- <h3 class="font-semibold text-gray-700 mb-3">Popular Questions</h3>
122
  <ul class="space-y-2">
123
  <li>
124
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
125
- How do I reset my password?
126
  </button>
127
  </li>
128
  <li>
129
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
130
- Where can I download the mobile app?
131
  </button>
132
  </li>
133
  <li>
134
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
135
- What are the system requirements?
136
- </button>
137
- </li>
138
- <li>
139
- <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
140
- How to enable two-factor authentication?
141
  </button>
142
  </li>
143
  </ul>
@@ -155,13 +159,16 @@
155
  </div>
156
  <div class="flex-1">
157
  <div class="bg-gray-100 rounded-xl p-4 inline-block max-w-3xl">
158
- <h3 class="font-bold text-gray-800 mb-1">Hello! 👋</h3>
159
- <p class="text-gray-700">I'm your Knowledge Base Assistant. I can help you find answers from our documentation. Try asking me something like:</p>
160
- <ul class="mt-2 space-y-1">
161
- <li class="text-blue-600">• How do I create an account?</li>
162
- <li class="text-blue-600">• Where can I find the user manual?</li>
163
- <li class="text-blue-600">• What's the refund policy?</li>
164
- </ul>
 
 
 
165
  </div>
166
  <p class="text-xs text-gray-500 mt-1">Today at <span id="currentTime"></span></p>
167
  </div>
@@ -190,18 +197,19 @@
190
  <input
191
  id="userInput"
192
  type="text"
193
- placeholder="Ask a question..."
194
  class="w-full p-4 pr-12 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
195
  autocomplete="off"
 
196
  >
197
- <button type="button" id="attachFile" class="absolute right-12 top-4 text-gray-500 hover:text-gray-700">
198
  <i class="fas fa-paperclip"></i>
199
  </button>
200
  <button type="button" id="voiceInput" class="absolute right-4 top-4 text-gray-500 hover:text-gray-700">
201
  <i class="fas fa-microphone"></i>
202
  </button>
203
  </div>
204
- <button type="submit" class="ml-3 w-12 h-12 rounded-lg bg-blue-600 text-white hover:bg-blue-700 transition flex items-center justify-center">
205
  <i class="fas fa-paper-plane"></i>
206
  </button>
207
  </form>
@@ -218,6 +226,54 @@
218
  </div>
219
  </div>
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  <!-- Feedback modal (hidden by default) -->
222
  <div id="feedbackModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
223
  <div class="bg-white rounded-xl p-6 w-full max-w-md">
@@ -262,221 +318,19 @@
262
  const chatForm = document.getElementById('chatForm');
263
  const chatMessages = document.getElementById('chatMessages');
264
  const typingIndicator = document.getElementById('typingIndicator');
 
265
 
266
- chatForm.addEventListener('submit', function(e) {
267
- e.preventDefault();
268
- const message = userInput.value.trim();
269
- if (message === '') return;
270
-
271
- // Add user message to chat
272
- addMessageToChat('user', message);
273
- userInput.value = '';
274
- charCount.textContent = '0';
275
-
276
- // Show typing indicator
277
- typingIndicator.classList.remove('hidden');
278
-
279
- // Scroll to bottom
280
- chatMessages.scrollTop = chatMessages.scrollHeight;
281
-
282
- // Simulate bot response after a delay
283
- setTimeout(() => {
284
- typingIndicator.classList.add('hidden');
285
- const botResponse = generateBotResponse(message);
286
- addMessageToChat('bot', botResponse);
287
-
288
- // Scroll to bottom after bot responds
289
- setTimeout(() => {
290
- chatMessages.scrollTop = chatMessages.scrollHeight;
291
- }, 100);
292
- }, 1500);
293
- });
294
-
295
- // Clear chat button
296
- document.getElementById('clearChat').addEventListener('click', function() {
297
- chatMessages.innerHTML = `
298
- <div class="message mb-6">
299
- <div class="flex items-start">
300
- <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
301
- <i class="fas fa-robot text-blue-600"></i>
302
- </div>
303
- <div class="flex-1">
304
- <div class="bg-gray-100 rounded-xl p-4 inline-block max-w-3xl">
305
- <h3 class="font-bold text-gray-800 mb-1">Hello! 👋</h3>
306
- <p class="text-gray-700">I'm your Knowledge Base Assistant. I can help you find answers from our documentation. Try asking me something like:</p>
307
- <ul class="mt-2 space-y-1">
308
- <li class="text-blue-600">• How do I create an account?</li>
309
- <li class="text-blue-600">• Where can I find the user manual?</li>
310
- <li class="text-blue-600">• What's the refund policy?</li>
311
- </ul>
312
- </div>
313
- <p class="text-xs text-gray-500 mt-1">Today at ${timeString}</p>
314
- </div>
315
- </div>
316
- </div>
317
- `;
318
- });
319
-
320
- // Suggested questions
321
- document.querySelectorAll('.suggested-question').forEach(button => {
322
- button.addEventListener('click', function() {
323
- userInput.value = this.textContent;
324
- userInput.focus();
325
- });
326
- });
327
-
328
- // Need inspiration button
329
- document.getElementById('suggestQuestions').addEventListener('click', function() {
330
- const suggestions = [
331
- "How do I update my profile information?",
332
- "Where can I find the pricing plans?",
333
- "How to export my data?",
334
- "What payment methods do you accept?",
335
- "How to contact customer support?"
336
- ];
337
-
338
- const randomSuggestion = suggestions[Math.floor(Math.random() * suggestions.length)];
339
- userInput.value = randomSuggestion;
340
- userInput.focus();
341
- });
342
-
343
- // Feedback modal
344
- const feedbackModal = document.getElementById('feedbackModal');
345
- const closeFeedbackModal = document.getElementById('closeFeedbackModal');
346
- const feedbackBtns = document.querySelectorAll('.feedback-btn');
347
- const feedbackCommentArea = document.getElementById('feedbackCommentArea');
348
- const submitFeedback = document.getElementById('submitFeedback');
349
-
350
- feedbackBtns.forEach(btn => {
351
- btn.addEventListener('click', function() {
352
- if (this.dataset.feedback === 'no') {
353
- feedbackCommentArea.classList.remove('hidden');
354
- } else {
355
- feedbackModal.classList.add('hidden');
356
- showToast('Thanks for your feedback!');
357
- }
358
- });
359
- });
360
-
361
- closeFeedbackModal.addEventListener('click', function() {
362
- feedbackModal.classList.add('hidden');
363
- });
364
-
365
- submitFeedback.addEventListener('click', function() {
366
- feedbackModal.classList.add('hidden');
367
- showToast('Feedback submitted. Thank you!');
368
- });
369
-
370
- // Helper functions
371
- function addMessageToChat(sender, message) {
372
- const now = new Date();
373
- const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
374
-
375
- if (sender === 'user') {
376
- const messageElement = `
377
- <div class="message mb-6">
378
- <div class="flex items-start justify-end">
379
- <div class="flex-1 max-w-3xl">
380
- <div class="bg-blue-600 text-white rounded-xl p-4 inline-block">
381
- ${message}
382
- </div>
383
- <p class="text-xs text-gray-500 mt-1 text-right">${timeString}</p>
384
- </div>
385
- <div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center ml-3">
386
- <i class="fas fa-user text-white"></i>
387
- </div>
388
- </div>
389
- </div>
390
- `;
391
- chatMessages.insertAdjacentHTML('beforeend', messageElement);
392
- } else {
393
- const messageElement = `
394
- <div class="message mb-6">
395
- <div class="flex items-start">
396
- <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
397
- <i class="fas fa-robot text-blue-600"></i>
398
- </div>
399
- <div class="flex-1">
400
- <div class="bg-gray-100 rounded-xl p-4 inline-block max-w-3xl">
401
- ${message}
402
- </div>
403
- <div class="mt-2 flex items-center space-x-3">
404
- <button class="text-xs text-blue-600 hover:underline feedback-trigger">Was this helpful?</button>
405
- <button class="text-xs text-gray-500 hover:text-gray-700">
406
- <i class="fas fa-copy mr-1"></i>Copy
407
- </button>
408
- </div>
409
- <p class="text-xs text-gray-500 mt-1">${timeString}</p>
410
- </div>
411
- </div>
412
- </div>
413
- `;
414
- chatMessages.insertAdjacentHTML('beforeend', messageElement);
415
-
416
- // Add event listener to the new feedback button
417
- const lastMessage = chatMessages.lastElementChild;
418
- const feedbackTrigger = lastMessage.querySelector('.feedback-trigger');
419
- feedbackTrigger.addEventListener('click', function() {
420
- feedbackModal.classList.remove('hidden');
421
- });
422
- }
423
- }
424
-
425
- function generateBotResponse(question) {
426
- // This is a simplified response generator
427
- // In a real app, you would connect to your knowledge base API
428
-
429
- const responses = {
430
- "hello": "Hello! How can I assist you with our knowledge base today?",
431
- "hi": "Hi there! What would you like to know?",
432
- "help": "I'm here to help! Please ask me a specific question about our product or service.",
433
- "account": "To manage your account, please go to Settings > Account. There you can update your profile, change your password, and manage security settings.",
434
- "password": "To reset your password: 1) Go to the login page 2) Click 'Forgot password' 3) Enter your email 4) Follow the instructions in the email you receive.",
435
- "contact": "You can contact our support team by email at [email protected] or by phone at (555) 123-4567. Our support hours are Monday-Friday, 9AM-5PM.",
436
- "refund": "Our refund policy allows for returns within 30 days of purchase. Please contact our support team with your order number to initiate a refund.",
437
- "download": "You can download our mobile app from the Apple App Store or Google Play Store. Search for 'OurProductName' to find it."
438
- };
439
-
440
- // Check for exact matches first
441
- const lowerQuestion = question.toLowerCase();
442
- if (responses[lowerQuestion]) {
443
- return responses[lowerQuestion];
444
- }
445
-
446
- // Check for keywords
447
- if (lowerQuestion.includes('password')) {
448
- return responses['password'];
449
- } else if (lowerQuestion.includes('account')) {
450
- return responses['account'];
451
- } else if (lowerQuestion.includes('contact') || lowerQuestion.includes('support')) {
452
- return responses['contact'];
453
- } else if (lowerQuestion.includes('refund') || lowerQuestion.includes('return')) {
454
- return responses['refund'];
455
- } else if (lowerQuestion.includes('download') || lowerQuestion.includes('app')) {
456
- return responses['download'];
457
- }
458
-
459
- // Default response
460
- return `I found this information that might help with your question about "${question}":<br><br>
461
- <div class="bg-blue-50 border-l-4 border-blue-500 p-3 rounded-r-lg mb-3">
462
- <h4 class="font-semibold text-blue-800">Related Article</h4>
463
- <p class="text-blue-700">"${question.replace('?', '')}" in our knowledge base</p>
464
- <a href="#" class="text-blue-600 text-sm hover:underline mt-1 inline-block">Read more →</a>
465
- </div>
466
- Does this answer your question? If not, please try rephrasing or ask something more specific.`;
467
- }
468
-
469
- function showToast(message) {
470
- const toast = document.createElement('div');
471
- toast.className = 'fixed bottom-4 right-4 bg-gray-800 text-white px-4 py-2 rounded-lg shadow-lg animate-fade-in-out';
472
- toast.textContent = message;
473
- document.body.appendChild(toast);
474
-
475
- setTimeout(() => {
476
- toast.remove();
477
- }, 3000);
478
- }
479
- });
480
- </script>
481
- <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - <a href="https://enzostvs-deepsite.hf.space?remix=UjjwalK/my-space" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
482
  </html>
 
57
  .typing-dot:nth-child(3) {
58
  animation-delay: 0.6s;
59
  }
60
+
61
+ /* Drag and drop area */
62
+ .dropzone {
63
+ border: 2px dashed #cbd5e0;
64
+ transition: all 0.3s;
65
+ }
66
+
67
+ .dropzone-active {
68
+ border-color: #4299e1;
69
+ background-color: #ebf8ff;
70
+ }
71
+
72
+ /* Toast animation */
73
+ @keyframes fadeInOut {
74
+ 0% { opacity: 0; transform: translateY(10px); }
75
+ 10% { opacity: 1; transform: translateY(0); }
76
+ 90% { opacity: 1; transform: translateY(0); }
77
+ 100% { opacity: 0; transform: translateY(-10px); }
78
+ }
79
+
80
+ .animate-toast {
81
+ animation: fadeInOut 3s ease-in-out forwards;
82
+ }
83
+
84
+ /* Document card */
85
+ .document-card:hover {
86
+ transform: translateY(-2px);
87
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
88
+ }
89
  </style>
90
  </head>
91
  <body class="bg-gray-100 font-sans">
 
98
  </div>
99
  <div>
100
  <h1 class="text-2xl font-bold text-gray-800">Knowledge Base Assistant</h1>
101
+ <p class="text-gray-600">Upload documents and ask me anything</p>
102
  </div>
103
  </div>
104
  <div class="flex space-x-2">
105
  <button id="clearChat" class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded-lg text-gray-700 transition">
106
  <i class="fas fa-trash-alt mr-2"></i>Clear
107
  </button>
108
+ <button id="uploadDocumentsBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white transition">
109
+ <i class="fas fa-upload mr-2"></i>Upload Docs
110
  </button>
111
  </div>
112
  </header>
 
114
  <!-- Main Chat Area -->
115
  <div class="bg-white rounded-xl shadow-lg overflow-hidden">
116
  <div class="flex h-[70vh]">
117
+ <!-- Sidebar with uploaded documents -->
118
  <div class="w-64 bg-gray-50 border-r border-gray-200 p-4 hidden md:block">
119
  <div class="mb-6">
120
+ <h3 class="font-semibold text-gray-700 mb-3">Your Documents</h3>
121
+ <div id="documentsList" class="space-y-3">
122
+ <div class="text-center text-gray-500 py-4">
123
+ <i class="fas fa-folder-open text-2xl mb-2"></i>
124
+ <p>No documents uploaded</p>
125
+ <button id="sidebarUploadBtn" class="text-sm text-blue-600 mt-2 hover:underline">Upload documents</button>
126
+ </div>
127
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  </div>
129
  <div>
130
+ <h3 class="font-semibold text-gray-700 mb-3">Sample Questions</h3>
131
  <ul class="space-y-2">
132
  <li>
133
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
134
+ Summarize the main points from my documents
135
  </button>
136
  </li>
137
  <li>
138
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
139
+ What are the key takeaways?
140
  </button>
141
  </li>
142
  <li>
143
  <button class="suggested-question w-full text-left px-3 py-2 text-sm rounded-lg hover:bg-gray-100 text-gray-600 transition">
144
+ Find references to specific terms
 
 
 
 
 
145
  </button>
146
  </li>
147
  </ul>
 
159
  </div>
160
  <div class="flex-1">
161
  <div class="bg-gray-100 rounded-xl p-4 inline-block max-w-3xl">
162
+ <h3 class="font-bold text-gray-800 mb-1">Document Analysis Assistant 📄</h3>
163
+ <p class="text-gray-700">Upload your documents (PDF, Word, Excel, etc.) and I'll help you analyze and answer questions about their content.</p>
164
+ <div class="mt-4 flex flex-wrap gap-3">
165
+ <button id="welcomeUploadBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white transition text-sm">
166
+ <i class="fas fa-upload mr-2"></i>Upload Documents
167
+ </button>
168
+ <button class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded-lg text-gray-700 transition text-sm">
169
+ <i class="fas fa-question-circle mr-2"></i>How It Works
170
+ </button>
171
+ </div>
172
  </div>
173
  <p class="text-xs text-gray-500 mt-1">Today at <span id="currentTime"></span></p>
174
  </div>
 
197
  <input
198
  id="userInput"
199
  type="text"
200
+ placeholder="Ask a question about your documents..."
201
  class="w-full p-4 pr-12 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
202
  autocomplete="off"
203
+ disabled
204
  >
205
+ <button type="button" id="attachFileBtn" class="absolute right-12 top-4 text-gray-500 hover:text-gray-700">
206
  <i class="fas fa-paperclip"></i>
207
  </button>
208
  <button type="button" id="voiceInput" class="absolute right-4 top-4 text-gray-500 hover:text-gray-700">
209
  <i class="fas fa-microphone"></i>
210
  </button>
211
  </div>
212
+ <button type="submit" class="ml-3 w-12 h-12 rounded-lg bg-blue-300 text-white flex items-center justify-center" disabled id="submitBtn">
213
  <i class="fas fa-paper-plane"></i>
214
  </button>
215
  </form>
 
226
  </div>
227
  </div>
228
 
229
+ <!-- Document Upload Modal -->
230
+ <div id="uploadModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
231
+ <div class="bg-white rounded-xl p-6 w-full max-w-2xl">
232
+ <div class="flex justify-between items-center mb-4">
233
+ <h3 class="text-lg font-semibold">Upload Documents</h3>
234
+ <button id="closeUploadModal" class="text-gray-500 hover:text-gray-700">
235
+ <i class="fas fa-times"></i>
236
+ </button>
237
+ </div>
238
+ <div class="mb-4 text-sm text-gray-600">
239
+ <p>Supported formats: PDF, DOCX, PPTX, XLSX, TXT</p>
240
+ <p>Maximum file size: 10MB per file</p>
241
+ </div>
242
+ <div id="dropzone" class="dropzone p-8 rounded-lg mb-4 text-center cursor-pointer">
243
+ <div class="flex flex-col items-center justify-center py-8">
244
+ <i class="fas fa-cloud-upload-alt text-4xl text-blue-500 mb-3"></i>
245
+ <h4 class="font-medium text-gray-700 mb-1">Drag & drop files here</h4>
246
+ <p class="text-gray-500 text-sm mb-4">or</p>
247
+ <input type="file" id="fileInput" class="hidden" multiple>
248
+ <button id="browseFilesBtn" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
249
+ Browse Files
250
+ </button>
251
+ </div>
252
+ </div>
253
+ <div class="mb-4 hidden" id="uploadProgressContainer">
254
+ <div class="flex justify-between text-sm mb-1">
255
+ <span>Upload Progress</span>
256
+ <span id="uploadProgressText">0%</span>
257
+ </div>
258
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
259
+ <div id="uploadProgressBar" class="bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div>
260
+ </div>
261
+ </div>
262
+ <div id="selectedFilesContainer" class="hidden">
263
+ <h4 class="font-medium text-gray-700 mb-2">Selected Files:</h4>
264
+ <div id="selectedFilesList" class="space-y-2 mb-4 max-h-40 overflow-y-auto"></div>
265
+ </div>
266
+ <div class="flex justify-end space-x-3">
267
+ <button id="cancelUploadBtn" class="px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition">
268
+ Cancel
269
+ </button>
270
+ <button id="startUploadBtn" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
271
+ Upload Files
272
+ </button>
273
+ </div>
274
+ </div>
275
+ </div>
276
+
277
  <!-- Feedback modal (hidden by default) -->
278
  <div id="feedbackModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
279
  <div class="bg-white rounded-xl p-6 w-full max-w-md">
 
318
  const chatForm = document.getElementById('chatForm');
319
  const chatMessages = document.getElementById('chatMessages');
320
  const typingIndicator = document.getElementById('typingIndicator');
321
+ const submitBtn = document.getElementById('submitBtn');
322
 
323
+ // Document upload modal elements
324
+ const uploadModal = document.getElementById('uploadModal');
325
+ const uploadDocumentsBtn = document.getElementById('uploadDocumentsBtn');
326
+ const sidebarUploadBtn = document.getElementById('sidebarUploadBtn');
327
+ const welcomeUploadBtn = document.getElementById('welcomeUploadBtn');
328
+ const closeUploadModal = document.getElementById('closeUploadModal');
329
+ const dropzone = document.getElementById('dropzone');
330
+ const fileInput = document.getElementById('fileInput');
331
+ const browseFilesBtn = document.getElementById('browseFilesBtn');
332
+ const selectedFilesList = document.getElementById('selectedFilesList');
333
+ const selectedFilesContainer = document.getElementById('selectedFilesContainer');
334
+ const uploadProgressContainer = document.getElementById('uploadProgressContainer');
335
+ const uploadProgress
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  </html>