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
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>DeepDev AI - Powered by DeepSeek</title>
|
| 7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 8 |
+
<style>
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
|
| 18 |
+
color: #333;
|
| 19 |
+
min-height: 100vh;
|
| 20 |
+
display: flex;
|
| 21 |
+
flex-direction: column;
|
| 22 |
+
align-items: center;
|
| 23 |
+
padding: 20px;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.container {
|
| 27 |
+
width: 100%;
|
| 28 |
+
max-width: 1200px;
|
| 29 |
+
display: flex;
|
| 30 |
+
flex-direction: column;
|
| 31 |
+
gap: 20px;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
header {
|
| 35 |
+
background: rgba(255, 255, 255, 0.9);
|
| 36 |
+
padding: 20px;
|
| 37 |
+
border-radius: 15px;
|
| 38 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
|
| 39 |
+
text-align: center;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.logo {
|
| 43 |
+
display: flex;
|
| 44 |
+
align-items: center;
|
| 45 |
+
justify-content: center;
|
| 46 |
+
gap: 15px;
|
| 47 |
+
margin-bottom: 10px;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.logo-icon {
|
| 51 |
+
font-size: 2.5rem;
|
| 52 |
+
color: #0066ff;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
h1 {
|
| 56 |
+
color: #0066ff;
|
| 57 |
+
font-size: 2.5rem;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.tagline {
|
| 61 |
+
color: #666;
|
| 62 |
+
font-size: 1.2rem;
|
| 63 |
+
margin-bottom: 15px;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.api-key-container {
|
| 67 |
+
background: #f8f9fa;
|
| 68 |
+
padding: 15px;
|
| 69 |
+
border-radius: 10px;
|
| 70 |
+
margin-top: 10px;
|
| 71 |
+
display: flex;
|
| 72 |
+
flex-direction: column;
|
| 73 |
+
gap: 10px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.api-key-input {
|
| 77 |
+
display: flex;
|
| 78 |
+
gap: 10px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.api-key-input input {
|
| 82 |
+
flex: 1;
|
| 83 |
+
padding: 10px 15px;
|
| 84 |
+
border: 2px solid #ddd;
|
| 85 |
+
border-radius: 25px;
|
| 86 |
+
font-size: 1rem;
|
| 87 |
+
outline: none;
|
| 88 |
+
transition: border-color 0.3s;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.api-key-input input:focus {
|
| 92 |
+
border-color: #0066ff;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.api-key-input button {
|
| 96 |
+
background: #0066ff;
|
| 97 |
+
color: white;
|
| 98 |
+
border: none;
|
| 99 |
+
border-radius: 25px;
|
| 100 |
+
padding: 10px 20px;
|
| 101 |
+
cursor: pointer;
|
| 102 |
+
font-weight: bold;
|
| 103 |
+
transition: background 0.3s;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.api-key-input button:hover {
|
| 107 |
+
background: #0052cc;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.main-content {
|
| 111 |
+
display: flex;
|
| 112 |
+
gap: 20px;
|
| 113 |
+
flex-wrap: wrap;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.chat-container {
|
| 117 |
+
flex: 2;
|
| 118 |
+
background: rgba(255, 255, 255, 0.85);
|
| 119 |
+
border-radius: 15px;
|
| 120 |
+
padding: 20px;
|
| 121 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
|
| 122 |
+
display: flex;
|
| 123 |
+
flex-direction: column;
|
| 124 |
+
min-height: 500px;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.chat-header {
|
| 128 |
+
padding-bottom: 15px;
|
| 129 |
+
border-bottom: 2px solid #eee;
|
| 130 |
+
margin-bottom: 15px;
|
| 131 |
+
display: flex;
|
| 132 |
+
align-items: center;
|
| 133 |
+
gap: 10px;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.chat-header i {
|
| 137 |
+
color: #0066ff;
|
| 138 |
+
font-size: 1.5rem;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.chat-messages {
|
| 142 |
+
flex: 1;
|
| 143 |
+
overflow-y: auto;
|
| 144 |
+
padding: 15px;
|
| 145 |
+
background: #f9f9f9;
|
| 146 |
+
border-radius: 10px;
|
| 147 |
+
margin-bottom: 15px;
|
| 148 |
+
display: flex;
|
| 149 |
+
flex-direction: column;
|
| 150 |
+
gap: 15px;
|
| 151 |
+
max-height: 400px;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.message {
|
| 155 |
+
padding: 12px 15px;
|
| 156 |
+
border-radius: 10px;
|
| 157 |
+
max-width: 80%;
|
| 158 |
+
line-height: 1.5;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.user-message {
|
| 162 |
+
background: #e3f2fd;
|
| 163 |
+
align-self: flex-end;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
.ai-message {
|
| 167 |
+
background: #f5f5f5;
|
| 168 |
+
align-self: flex-start;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.code-block {
|
| 172 |
+
background: #2d2d2d;
|
| 173 |
+
color: #f8f8f2;
|
| 174 |
+
padding: 12px;
|
| 175 |
+
border-radius: 5px;
|
| 176 |
+
font-family: 'Courier New', monospace;
|
| 177 |
+
margin: 8px 0;
|
| 178 |
+
overflow-x: auto;
|
| 179 |
+
position: relative;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.copy-btn {
|
| 183 |
+
position: absolute;
|
| 184 |
+
top: 5px;
|
| 185 |
+
right: 5px;
|
| 186 |
+
background: rgba(255, 255, 255, 0.2);
|
| 187 |
+
border: none;
|
| 188 |
+
color: white;
|
| 189 |
+
padding: 3px 8px;
|
| 190 |
+
border-radius: 3px;
|
| 191 |
+
cursor: pointer;
|
| 192 |
+
font-size: 0.8rem;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.chat-input {
|
| 196 |
+
display: flex;
|
| 197 |
+
gap: 10px;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.chat-input input {
|
| 201 |
+
flex: 1;
|
| 202 |
+
padding: 12px 15px;
|
| 203 |
+
border: 2px solid #ddd;
|
| 204 |
+
border-radius: 25px;
|
| 205 |
+
font-size: 1rem;
|
| 206 |
+
outline: none;
|
| 207 |
+
transition: border-color 0.3s;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.chat-input input:focus {
|
| 211 |
+
border-color: #0066ff;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
.chat-input button {
|
| 215 |
+
background: #0066ff;
|
| 216 |
+
color: white;
|
| 217 |
+
border: none;
|
| 218 |
+
border-radius: 25px;
|
| 219 |
+
padding: 12px 20px;
|
| 220 |
+
cursor: pointer;
|
| 221 |
+
font-weight: bold;
|
| 222 |
+
transition: background 0.3s;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.chat-input button:hover {
|
| 226 |
+
background: #0052cc;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.chat-input button:disabled {
|
| 230 |
+
background: #ccc;
|
| 231 |
+
cursor: not-allowed;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.features {
|
| 235 |
+
flex: 1;
|
| 236 |
+
background: rgba(255, 255, 255, 0.85);
|
| 237 |
+
border-radius: 15px;
|
| 238 |
+
padding: 20px;
|
| 239 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.features h2 {
|
| 243 |
+
color: #0066ff;
|
| 244 |
+
margin-bottom: 15px;
|
| 245 |
+
display: flex;
|
| 246 |
+
align-items: center;
|
| 247 |
+
gap: 10px;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.features-list {
|
| 251 |
+
list-style: none;
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
.features-list li {
|
| 255 |
+
padding: 12px;
|
| 256 |
+
background: #f9f9f9;
|
| 257 |
+
margin-bottom: 10px;
|
| 258 |
+
border-radius: 8px;
|
| 259 |
+
display: flex;
|
| 260 |
+
align-items: center;
|
| 261 |
+
gap: 10px;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.features-list i {
|
| 265 |
+
color: #0066ff;
|
| 266 |
+
font-size: 1.2rem;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.language-selector {
|
| 270 |
+
margin-top: 15px;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.language-selector select {
|
| 274 |
+
width: 100%;
|
| 275 |
+
padding: 10px;
|
| 276 |
+
border: 2px solid #ddd;
|
| 277 |
+
border-radius: 8px;
|
| 278 |
+
font-size: 1rem;
|
| 279 |
+
outline: none;
|
| 280 |
+
transition: border-color 0.3s;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
.language-selector select:focus {
|
| 284 |
+
border-color: #0066ff;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.loading {
|
| 288 |
+
display: flex;
|
| 289 |
+
align-items: center;
|
| 290 |
+
gap: 10px;
|
| 291 |
+
color: #666;
|
| 292 |
+
font-style: italic;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
.loading-dots {
|
| 296 |
+
display: flex;
|
| 297 |
+
gap: 3px;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
.loading-dots span {
|
| 301 |
+
width: 8px;
|
| 302 |
+
height: 8px;
|
| 303 |
+
background: #0066ff;
|
| 304 |
+
border-radius: 50%;
|
| 305 |
+
animation: bounce 1.5s infinite;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
.loading-dots span:nth-child(2) {
|
| 309 |
+
animation-delay: 0.2s;
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
.loading-dots span:nth-child(3) {
|
| 313 |
+
animation-delay: 0.4s;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
@keyframes bounce {
|
| 317 |
+
0%, 100% { transform: translateY(0); }
|
| 318 |
+
50% { transform: translateY(-5px); }
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
footer {
|
| 322 |
+
text-align: center;
|
| 323 |
+
padding: 20px;
|
| 324 |
+
color: white;
|
| 325 |
+
margin-top: auto;
|
| 326 |
+
font-size: 0.9rem;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
@media (max-width: 768px) {
|
| 330 |
+
.main-content {
|
| 331 |
+
flex-direction: column;
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
h1 {
|
| 335 |
+
font-size: 2rem;
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
.message {
|
| 339 |
+
max-width: 90%;
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
+
</style>
|
| 343 |
+
</head>
|
| 344 |
+
<body>
|
| 345 |
+
<div class="container">
|
| 346 |
+
<header>
|
| 347 |
+
<div class="logo">
|
| 348 |
+
<i class="fas fa-code logo-icon"></i>
|
| 349 |
+
<h1>DeepDev AI</h1>
|
| 350 |
+
</div>
|
| 351 |
+
<p class="tagline">Powered by DeepSeek - Your intelligent coding assistant</p>
|
| 352 |
+
<p>Ask me to code in any programming language!</p>
|
| 353 |
+
|
| 354 |
+
<div class="api-key-container">
|
| 355 |
+
<p><strong>API Key Required:</strong> To use DeepDev AI, you need a DeepSeek API key.</p>
|
| 356 |
+
<div class="api-key-input">
|
| 357 |
+
<input type="password" id="api-key" placeholder="Enter your DeepSeek API key">
|
| 358 |
+
<button id="save-api-key">Save Key</button>
|
| 359 |
+
</div>
|
| 360 |
+
<p class="api-key-note">Your API key is stored only in your browser and never sent to our servers.</p>
|
| 361 |
+
</div>
|
| 362 |
+
</header>
|
| 363 |
+
|
| 364 |
+
<div class="main-content">
|
| 365 |
+
<div class="chat-container">
|
| 366 |
+
<div class="chat-header">
|
| 367 |
+
<i class="fas fa-comments"></i>
|
| 368 |
+
<h2>Chat with DeepDev</h2>
|
| 369 |
+
</div>
|
| 370 |
+
|
| 371 |
+
<div class="chat-messages" id="chat-messages">
|
| 372 |
+
<div class="message ai-message">
|
| 373 |
+
<p>Hello! I'm DeepDev, powered by DeepSeek. I can help you code in any programming language. What would you like to create today?</p>
|
| 374 |
+
</div>
|
| 375 |
+
</div>
|
| 376 |
+
|
| 377 |
+
<div class="chat-input">
|
| 378 |
+
<input type="text" id="user-input" placeholder="Ask DeepDev to code something...">
|
| 379 |
+
<button id="send-btn">Send <i class="fas fa-paper-plane"></i></button>
|
| 380 |
+
</div>
|
| 381 |
+
</div>
|
| 382 |
+
|
| 383 |
+
<div class="features">
|
| 384 |
+
<h2><i class="fas fa-star"></i> DeepDev Capabilities</h2>
|
| 385 |
+
<ul class="features-list">
|
| 386 |
+
<li><i class="fas fa-check"></i> Code in Python, JavaScript, Java, C++, and more</li>
|
| 387 |
+
<li><i class="fas fa-check"></i> Explain complex programming concepts</li>
|
| 388 |
+
<li><i class="fas fa-check"></i> Debug and optimize existing code</li>
|
| 389 |
+
<li><i class="fas fa-check"></i> Generate code from natural language descriptions</li>
|
| 390 |
+
<li><i class="fas fa-check"></i> Convert code between programming languages</li>
|
| 391 |
+
<li><i class="fas fa-check"></i> Write unit tests and documentation</li>
|
| 392 |
+
<li><i class="fas fa-check"></i> Suggest algorithms and data structures</li>
|
| 393 |
+
<li><i class="fas fa-check"></i> Help with web development frameworks</li>
|
| 394 |
+
</ul>
|
| 395 |
+
|
| 396 |
+
<div class="language-selector">
|
| 397 |
+
<label for="language"><strong>Preferred Language:</strong></label>
|
| 398 |
+
<select id="language">
|
| 399 |
+
<option value="auto">Auto-detect</option>
|
| 400 |
+
<option value="python">Python</option>
|
| 401 |
+
<option value="javascript">JavaScript</option>
|
| 402 |
+
<option value="java">Java</option>
|
| 403 |
+
<option value="csharp">C#</option>
|
| 404 |
+
<option value="cpp">C++</option>
|
| 405 |
+
<option value="php">PHP</option>
|
| 406 |
+
<option value="ruby">Ruby</option>
|
| 407 |
+
<option value="go">Go</option>
|
| 408 |
+
<option value="rust">Rust</option>
|
| 409 |
+
<option value="swift">Swift</option>
|
| 410 |
+
<option value="typescript">TypeScript</option>
|
| 411 |
+
<option value="html">HTML/CSS</option>
|
| 412 |
+
</select>
|
| 413 |
+
</div>
|
| 414 |
+
</div>
|
| 415 |
+
</div>
|
| 416 |
+
</div>
|
| 417 |
+
|
| 418 |
+
<footer>
|
| 419 |
+
<p>(c) 2025 Zewpol inc. no rights reserved</p>
|
| 420 |
+
</footer>
|
| 421 |
+
|
| 422 |
+
<script>
|
| 423 |
+
// DOM Elements
|
| 424 |
+
const apiKeyInput = document.getElementById('api-key');
|
| 425 |
+
const saveApiKeyBtn = document.getElementById('save-api-key');
|
| 426 |
+
const chatMessages = document.getElementById('chat-messages');
|
| 427 |
+
const userInput = document.getElementById('user-input');
|
| 428 |
+
const sendBtn = document.getElementById('send-btn');
|
| 429 |
+
const languageSelect = document.getElementById('language');
|
| 430 |
+
|
| 431 |
+
// State
|
| 432 |
+
let apiKey = localStorage.getItem('deepseek-api-key') || '';
|
| 433 |
+
let isWaitingForResponse = false;
|
| 434 |
+
|
| 435 |
+
// Initialize
|
| 436 |
+
if (apiKey) {
|
| 437 |
+
apiKeyInput.value = '••••••••••••••••';
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
// Event Listeners
|
| 441 |
+
saveApiKeyBtn.addEventListener('click', saveApiKey);
|
| 442 |
+
sendBtn.addEventListener('click', sendMessage);
|
| 443 |
+
userInput.addEventListener('keypress', (e) => {
|
| 444 |
+
if (e.key === 'Enter') {
|
| 445 |
+
sendMessage();
|
| 446 |
+
}
|
| 447 |
+
});
|
| 448 |
+
|
| 449 |
+
// Functions
|
| 450 |
+
function saveApiKey() {
|
| 451 |
+
const key = apiKeyInput.value.trim();
|
| 452 |
+
if (key) {
|
| 453 |
+
// If the input is masked, don't override with the mask
|
| 454 |
+
if (key !== '••••••••••••••••') {
|
| 455 |
+
apiKey = key;
|
| 456 |
+
localStorage.setItem('deepseek-api-key', apiKey);
|
| 457 |
+
apiKeyInput.value = '••••••••••••••••';
|
| 458 |
+
alert('API key saved successfully!');
|
| 459 |
+
} else {
|
| 460 |
+
// Use the already saved key
|
| 461 |
+
alert('API key is already saved.');
|
| 462 |
+
}
|
| 463 |
+
} else {
|
| 464 |
+
alert('Please enter a valid API key.');
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
function sendMessage() {
|
| 469 |
+
if (isWaitingForResponse) return;
|
| 470 |
+
|
| 471 |
+
const message = userInput.value.trim();
|
| 472 |
+
if (!message) return;
|
| 473 |
+
|
| 474 |
+
if (!apiKey) {
|
| 475 |
+
alert('Please enter your DeepSeek API key first.');
|
| 476 |
+
return;
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
// Add user message to chat
|
| 480 |
+
addMessage(message, 'user');
|
| 481 |
+
userInput.value = '';
|
| 482 |
+
|
| 483 |
+
// Show loading indicator
|
| 484 |
+
showLoading();
|
| 485 |
+
|
| 486 |
+
// Get selected language
|
| 487 |
+
const language = languageSelect.value;
|
| 488 |
+
|
| 489 |
+
// Call DeepSeek API
|
| 490 |
+
callDeepSeekAPI(message, language);
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
function addMessage(text, sender) {
|
| 494 |
+
const messageDiv = document.createElement('div');
|
| 495 |
+
messageDiv.className = `message ${sender}-message`;
|
| 496 |
+
|
| 497 |
+
// Format code blocks if present
|
| 498 |
+
const formattedText = formatCodeBlocks(text);
|
| 499 |
+
messageDiv.innerHTML = formattedText;
|
| 500 |
+
|
| 501 |
+
chatMessages.appendChild(messageDiv);
|
| 502 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
| 503 |
+
|
| 504 |
+
// Add copy buttons to code blocks
|
| 505 |
+
messageDiv.querySelectorAll('.code-block').forEach(block => {
|
| 506 |
+
const copyButton = document.createElement('button');
|
| 507 |
+
copyButton.className = 'copy-btn';
|
| 508 |
+
copyButton.innerHTML = '<i class="fas fa-copy"></i> Copy';
|
| 509 |
+
copyButton.addEventListener('click', () => {
|
| 510 |
+
const code = block.querySelector('code')?.innerText || block.innerText;
|
| 511 |
+
navigator.clipboard.writeText(code).then(() => {
|
| 512 |
+
copyButton.innerHTML = '<i class="fas fa-check"></i> Copied!';
|
| 513 |
+
setTimeout(() => {
|
| 514 |
+
copyButton.innerHTML = '<i class="fas fa-copy"></i> Copy';
|
| 515 |
+
}, 2000);
|
| 516 |
+
});
|
| 517 |
+
});
|
| 518 |
+
block.appendChild(copyButton);
|
| 519 |
+
});
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
function formatCodeBlocks(text) {
|
| 523 |
+
// Simple code block formatting - in a real scenario, you might use a library like Highlight.js
|
| 524 |
+
return text.replace(/```(\w+)?\s([\s\S]*?)```/g, (match, lang, code) => {
|
| 525 |
+
return `<div class="code-block"><code>${escapeHtml(code.trim())}</code></div>`;
|
| 526 |
+
});
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
function escapeHtml(unsafe) {
|
| 530 |
+
return unsafe
|
| 531 |
+
.replace(/&/g, "&")
|
| 532 |
+
.replace(/</g, "<")
|
| 533 |
+
.replace(/>/g, ">")
|
| 534 |
+
.replace(/"/g, """)
|
| 535 |
+
.replace(/'/g, "'");
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
function showLoading() {
|
| 539 |
+
isWaitingForResponse = true;
|
| 540 |
+
sendBtn.disabled = true;
|
| 541 |
+
|
| 542 |
+
const loadingDiv = document.createElement('div');
|
| 543 |
+
loadingDiv.className = 'message ai-message loading';
|
| 544 |
+
loadingDiv.id = 'loading-message';
|
| 545 |
+
loadingDiv.innerHTML = `
|
| 546 |
+
<div class="loading-dots">
|
| 547 |
+
<span></span>
|
| 548 |
+
<span></span>
|
| 549 |
+
<span></span>
|
| 550 |
+
</div>
|
| 551 |
+
DeepDev is thinking...
|
| 552 |
+
`;
|
| 553 |
+
|
| 554 |
+
chatMessages.appendChild(loadingDiv);
|
| 555 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
function hideLoading() {
|
| 559 |
+
isWaitingForResponse = false;
|
| 560 |
+
sendBtn.disabled = false;
|
| 561 |
+
|
| 562 |
+
const loadingDiv = document.getElementById('loading-message');
|
| 563 |
+
if (loadingDiv) {
|
| 564 |
+
loadingDiv.remove();
|
| 565 |
+
}
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
async function callDeepSeekAPI(message, language) {
|
| 569 |
+
try {
|
| 570 |
+
// This is a simulation since we don't have actual API details
|
| 571 |
+
// In a real implementation, you would use the actual DeepSeek API endpoint
|
| 572 |
+
|
| 573 |
+
// Simulate API delay
|
| 574 |
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
| 575 |
+
|
| 576 |
+
// Remove loading indicator
|
| 577 |
+
hideLoading();
|
| 578 |
+
|
| 579 |
+
// Generate a simulated response based on the message
|
| 580 |
+
let response = generateResponse(message, language);
|
| 581 |
+
|
| 582 |
+
// Add AI response to chat
|
| 583 |
+
addMessage(response, 'ai');
|
| 584 |
+
} catch (error) {
|
| 585 |
+
hideLoading();
|
| 586 |
+
addMessage(`Sorry, I encountered an error: ${error.message}`, 'ai');
|
| 587 |
+
}
|
| 588 |
+
}
|
| 589 |
+
|
| 590 |
+
function generateResponse(message, language) {
|
| 591 |
+
// This function simulates the AI response since we don't have actual API access
|
| 592 |
+
// In a real implementation, this would be replaced with the actual API call
|
| 593 |
+
|
| 594 |
+
const lowerMessage = message.toLowerCase();
|
| 595 |
+
let response = '';
|
| 596 |
+
|
| 597 |
+
if (lowerMessage.includes('hello') || lowerMessage.includes('hi')) {
|
| 598 |
+
response = 'Hello! How can I help you with your coding today?';
|
| 599 |
+
} else if (lowerMessage.includes('fibonacci')) {
|
| 600 |
+
response = `Here's a Python function to generate the Fibonacci sequence:\n\n\`\`\`python
|
| 601 |
+
def fibonacci(n):
|
| 602 |
+
sequence = []
|
| 603 |
+
a, b = 0, 1
|
| 604 |
+
for _ in range(n):
|
| 605 |
+
sequence.append(a)
|
| 606 |
+
a, b = b, a + b
|
| 607 |
+
return sequence
|
| 608 |
+
|
| 609 |
+
# Example usage
|
| 610 |
+
print(fibonacci(10)) # Output: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
|
| 611 |
+
\`\`\``;
|
| 612 |
+
} else if (lowerMessage.includes('sort') || lowerMessage.includes('algorithm')) {
|
| 613 |
+
response = `Here's a JavaScript implementation of the quicksort algorithm:\n\n\`\`\`javascript
|
| 614 |
+
function quicksort(arr) {
|
| 615 |
+
if (arr.length <= 1) return arr;
|
| 616 |
+
|
| 617 |
+
const pivot = arr[Math.floor(arr.length / 2)];
|
| 618 |
+
const left = arr.filter(x => x < pivot);
|
| 619 |
+
const middle = arr.filter(x => x === pivot);
|
| 620 |
+
const right = arr.filter(x => x > pivot);
|
| 621 |
+
|
| 622 |
+
return [...quicksort(left), ...middle, ...quicksort(right)];
|
| 623 |
+
}
|
| 624 |
+
|
| 625 |
+
// Example usage
|
| 626 |
+
console.log(quicksort([3, 6, 8, 10, 1, 2, 1])); // Output: [1, 1, 2, 3, 6, 8, 10]
|
| 627 |
+
\`\`\``;
|
| 628 |
+
} else if (lowerMessage.includes('react') || lowerMessage.includes('component')) {
|
| 629 |
+
response = `Here's a simple React component example:\n\n\`\`\`jsx
|
| 630 |
+
import React, { useState } from 'react';
|
| 631 |
+
|
| 632 |
+
function Counter() {
|
| 633 |
+
const [count, setCount] = useState(0);
|
| 634 |
+
|
| 635 |
+
return (
|
| 636 |
+
<div>
|
| 637 |
+
<p>You clicked {count} times</p>
|
| 638 |
+
<button onClick={() => setCount(count + 1)}>
|
| 639 |
+
Click me
|
| 640 |
+
</button>
|
| 641 |
+
</div>
|
| 642 |
+
);
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
+
export default Counter;
|
| 646 |
+
\`\`\``;
|
| 647 |
+
} else {
|
| 648 |
+
response = `I can help you with "${message}". As an AI assistant powered by DeepSeek, I can generate code for that. In a real implementation, this would connect to the DeepSeek API to generate a proper response.\n\n\`\`\`python
|
| 649 |
+
# Example code would appear here based on your request
|
| 650 |
+
def example_function():
|
| 651 |
+
print("DeepDev AI is working on your request!")
|
| 652 |
+
|
| 653 |
+
# Add your specific code here based on the query
|
| 654 |
+
return "Solution to your problem"
|
| 655 |
+
\`\`\``;
|
| 656 |
+
}
|
| 657 |
+
|
| 658 |
+
return response;
|
| 659 |
+
}
|
| 660 |
+
</script>
|
| 661 |
+
</body>
|
| 662 |
</html>
|