muralipala1504 commited on
Commit
214af7d
Β·
1 Parent(s): f1d5476

feat: welcome screen, Voice ON/OFF label, improved tip text

Browse files
Files changed (2) hide show
  1. app.js +5 -0
  2. index.html +42 -4
app.js CHANGED
@@ -69,9 +69,11 @@ window.toggleTTS = function() {
69
  if (window.ttsEnabled) {
70
  btn.classList.add("tts-active");
71
  btn.title = "Voice ON β€” click to disable";
 
72
  } else {
73
  btn.classList.remove("tts-active");
74
  btn.title = "Voice OFF β€” click to enable";
 
75
  window.speechSynthesis.cancel();
76
  }
77
  };
@@ -516,6 +518,9 @@ window._speakDirect = function(clean) {
516
  const prompt = input.value.trim();
517
  if (!prompt) return;
518
 
 
 
 
519
  appendMessage(output, "You", prompt);
520
  input.value = "";
521
  if (sendBtn) sendBtn.disabled = true;
 
69
  if (window.ttsEnabled) {
70
  btn.classList.add("tts-active");
71
  btn.title = "Voice ON β€” click to disable";
72
+ btn.innerHTML = "πŸ”Š Voice ON";
73
  } else {
74
  btn.classList.remove("tts-active");
75
  btn.title = "Voice OFF β€” click to enable";
76
+ btn.innerHTML = "πŸ”‡ Voice OFF";
77
  window.speechSynthesis.cancel();
78
  }
79
  };
 
518
  const prompt = input.value.trim();
519
  if (!prompt) return;
520
 
521
+ // Hide welcome message on first user input
522
+ const welcome = document.getElementById("welcome-msg");
523
+ if (welcome) welcome.style.display = "none";
524
  appendMessage(output, "You", prompt);
525
  input.value = "";
526
  if (sendBtn) sendBtn.disabled = true;
index.html CHANGED
@@ -373,7 +373,7 @@
373
  <button class="mode-btn" id="btn-dryrun" onclick="setMode('dryrun')">πŸ” Dry Run</button>
374
  </div>
375
  <button class="theme-btn" id="theme-btn" onclick="toggleTheme()" title="Toggle light/dark theme">πŸŒ™</button>
376
- <button id="tts-btn" class="tts-btn" onclick="toggleTTS()" title="Voice OFF β€” click to enable">πŸ”Š Voice</button>
377
  <button class="tts-btn" onclick="replayLast()" title="Replay last response">πŸ” Replay</button>
378
  <select id="lang-select" class="header-btn" onchange="setLang(this.value)" title="TTS Language">
379
  <option value="en-US">πŸ‡ΊπŸ‡Έ EN</option>
@@ -393,15 +393,53 @@
393
  </header>
394
 
395
  <div class="panel">
396
- <div id="chat-output" class="panel"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
 
398
  <form id="chat-form" class="composer" autocomplete="off">
399
  <textarea id="chat-input" placeholder="Type your prompt… e.g., Show me all running Docker containers."></textarea>
400
  <button id="chat-send" type="submit">Send</button>
401
  </form>
402
 
403
- <div class="hint">
404
- Tip: All code blocks have copy buttons. Click to copy commands to your clipboard.
405
  </div>
406
  </div>
407
  </div>
 
373
  <button class="mode-btn" id="btn-dryrun" onclick="setMode('dryrun')">πŸ” Dry Run</button>
374
  </div>
375
  <button class="theme-btn" id="theme-btn" onclick="toggleTheme()" title="Toggle light/dark theme">πŸŒ™</button>
376
+ <button id="tts-btn" class="tts-btn" onclick="toggleTTS()" title="Voice OFF β€” click to enable">πŸ”‡ Voice OFF</button>
377
  <button class="tts-btn" onclick="replayLast()" title="Replay last response">πŸ” Replay</button>
378
  <select id="lang-select" class="header-btn" onchange="setLang(this.value)" title="TTS Language">
379
  <option value="en-US">πŸ‡ΊπŸ‡Έ EN</option>
 
393
  </header>
394
 
395
  <div class="panel">
396
+ <div id="chat-output" class="panel">
397
+ <div id="welcome-msg" style="
398
+ display: flex;
399
+ flex-direction: column;
400
+ align-items: center;
401
+ justify-content: center;
402
+ height: 100%;
403
+ text-align: center;
404
+ padding: 40px 20px;
405
+ opacity: 0.85;
406
+ ">
407
+ <div style="font-size: 48px; margin-bottom: 16px;">πŸ–₯️</div>
408
+ <div style="font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 8px;">&gt;_ DeepShell</div>
409
+ <div style="font-size: 13px; color: var(--muted); margin-bottom: 24px; letter-spacing: 1px;">AI-POWERED DEVOPS ASSISTANT & TRAINER</div>
410
+ <div style="display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px;">
411
+ <div style="background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; min-width: 140px;">
412
+ <div style="font-size: 20px;">πŸ€–</div>
413
+ <div style="font-size: 13px; font-weight: 600; color: var(--accent); margin: 4px 0;">Assistant</div>
414
+ <div style="font-size: 11px; color: var(--muted);">Fast DevOps answers</div>
415
+ </div>
416
+ <div style="background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; min-width: 140px;">
417
+ <div style="font-size: 20px;">πŸŽ“</div>
418
+ <div style="font-size: 13px; font-weight: 600; color: var(--accent); margin: 4px 0;">Trainer</div>
419
+ <div style="font-size: 11px; color: var(--muted);">Learn with examples</div>
420
+ </div>
421
+ <div style="background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; min-width: 140px;">
422
+ <div style="font-size: 20px;">πŸ”</div>
423
+ <div style="font-size: 13px; font-weight: 600; color: var(--accent); margin: 4px 0;">Dry Run</div>
424
+ <div style="font-size: 11px; color: var(--muted);">Safe command analysis</div>
425
+ </div>
426
+ </div>
427
+ <div style="font-size: 12px; color: var(--muted); max-width: 400px; line-height: 1.6;">
428
+ Specialized for <span style="color: var(--accent);">Linux</span> β€’ <span style="color: var(--accent);">Docker</span> β€’ <span style="color: var(--accent);">Kubernetes</span> β€’ <span style="color: var(--accent);">Terraform</span> β€’ <span style="color: var(--accent);">AWS</span>
429
+ </div>
430
+ <div style="margin-top: 20px; font-size: 11px; color: var(--muted);">
431
+ πŸ”Š Voice TTS in English & Hindi &nbsp;|&nbsp; ⚑ Powered by Groq &nbsp;|&nbsp; πŸ”’ DevOps-only scope
432
+ </div>
433
+ </div>
434
+ </div>
435
 
436
  <form id="chat-form" class="composer" autocomplete="off">
437
  <textarea id="chat-input" placeholder="Type your prompt… e.g., Show me all running Docker containers."></textarea>
438
  <button id="chat-send" type="submit">Send</button>
439
  </form>
440
 
441
+ <div class="hint" style="font-size: 13px; text-align:center;">
442
+ πŸ’‘ Tip: All code blocks have copy buttons. &nbsp;|&nbsp; Use <b>Trainer mode</b> for structured learning. &nbsp;|&nbsp; <b>Dry Run</b> before executing risky commands.
443
  </div>
444
  </div>
445
  </div>