ArunKr commited on
Commit
52289b1
·
verified ·
1 Parent(s): 42c0af8

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. static/dashboard.html +4 -9
  2. static/dashboard.js +9 -2
  3. static/theme.css +21 -0
static/dashboard.html CHANGED
@@ -137,10 +137,6 @@
137
  <h2 class="text-lg font-semibold text-gray-100">Getting started</h2>
138
  <p class="text-sm text-gray-400 mt-1">A quick checklist to get productive in under a minute.</p>
139
  </div>
140
- <button onclick="window.location.href = routeUrl('settings');"
141
- class="shrink-0 px-3 py-2 bg-gray-700 rounded-lg hover:bg-gray-600 text-sm font-medium transition">
142
- Settings
143
- </button>
144
  </div>
145
 
146
  <div class="grid grid-cols-1 md:grid-cols-2 gap-3 mt-4">
@@ -682,18 +678,17 @@
682
  <!-- Input -->
683
  <div class="p-3 bg-gray-800 border-t border-gray-700 shrink-0">
684
  <div id="chat-attachments" class="max-w-5xl mx-auto mb-2 hidden"></div>
685
- <div class="flex space-x-2 max-w-5xl mx-auto items-center">
686
  <select id="chat-agent-target" onchange="setChatAgentTarget(this.value)"
687
  class="bg-gray-700 h-10 rounded-lg border border-gray-600 px-2 text-sm text-white outline-none focus:border-blue-500"
688
  title="Target">
689
  <option value="chat">Chat</option>
690
  <option value="codex">@codex</option>
691
  </select>
692
- <textarea id="chat-input" rows="1"
693
- class="flex-grow bg-gray-700 px-3 py-2 rounded-lg border border-gray-600 resize-none focus:ring-2 focus:ring-blue-500 focus:outline-none text-white max-h-32"
694
  placeholder="Message..."
695
- oninput="this.style.height = ''; this.style.height = this.scrollHeight + 'px'"
696
- onkeydown="handleEnter(event)"></textarea>
697
  <input id="chat-model-quick" type="text" list="model-list" placeholder="Model"
698
  class="bg-gray-700 h-10 w-44 px-2 rounded-lg border border-gray-600 text-sm text-white outline-none focus:border-blue-500 hidden sm:block"
699
  onchange="setQuickModel(this.value)" title="Model" />
 
137
  <h2 class="text-lg font-semibold text-gray-100">Getting started</h2>
138
  <p class="text-sm text-gray-400 mt-1">A quick checklist to get productive in under a minute.</p>
139
  </div>
 
 
 
 
140
  </div>
141
 
142
  <div class="grid grid-cols-1 md:grid-cols-2 gap-3 mt-4">
 
678
  <!-- Input -->
679
  <div class="p-3 bg-gray-800 border-t border-gray-700 shrink-0">
680
  <div id="chat-attachments" class="max-w-5xl mx-auto mb-2 hidden"></div>
681
+ <div class="flex gap-2 max-w-5xl mx-auto items-center flex-nowrap overflow-x-auto">
682
  <select id="chat-agent-target" onchange="setChatAgentTarget(this.value)"
683
  class="bg-gray-700 h-10 rounded-lg border border-gray-600 px-2 text-sm text-white outline-none focus:border-blue-500"
684
  title="Target">
685
  <option value="chat">Chat</option>
686
  <option value="codex">@codex</option>
687
  </select>
688
+ <input id="chat-input" type="text" autocomplete="off"
689
+ class="flex-grow bg-gray-700 h-10 px-3 rounded-lg border border-gray-600 focus:ring-2 focus:ring-blue-500 focus:outline-none text-white"
690
  placeholder="Message..."
691
+ onkeydown="handleEnter(event)" />
 
692
  <input id="chat-model-quick" type="text" list="model-list" placeholder="Model"
693
  class="bg-gray-700 h-10 w-44 px-2 rounded-lg border border-gray-600 text-sm text-white outline-none focus:border-blue-500 hidden sm:block"
694
  onchange="setQuickModel(this.value)" title="Model" />
static/dashboard.js CHANGED
@@ -257,6 +257,11 @@ let supabase;
257
  if (notesPreview) {
258
  notesPreview.classList.toggle('prose-invert', t !== 'light');
259
  }
 
 
 
 
 
260
  }
261
 
262
  function toggleTheme() {
@@ -2291,7 +2296,8 @@ let supabase;
2291
 
2292
  function addMessageToUI(role, content) {
2293
  const div = document.createElement('div');
2294
- div.className = `chat-message ${role === 'user' ? 'user-message self-end' : 'ai-message self-start'} max-w-[85%] p-3 rounded-xl my-2 prose prose-invert break-words text-sm md:text-base shadow-sm`;
 
2295
  renderMarkdownInto(div, content);
2296
  const container = document.getElementById('chat-history');
2297
  const empty = document.getElementById('chat-empty-state');
@@ -2874,7 +2880,8 @@ let supabase;
2874
 
2875
  function addAgentMessageToUI(role, content) {
2876
  const div = document.createElement('div');
2877
- div.className = `chat-message ${role === 'user' ? 'user-message self-end' : 'ai-message self-start'} max-w-[85%] p-3 rounded-xl my-2 prose prose-invert break-words text-sm md:text-base shadow-sm`;
 
2878
  renderMarkdownInto(div, content);
2879
  const container = document.getElementById('agent-chat-history');
2880
  const empty = document.getElementById('agent-empty-state');
 
257
  if (notesPreview) {
258
  notesPreview.classList.toggle('prose-invert', t !== 'light');
259
  }
260
+
261
+ // Chat bubbles use prose-invert in dark mode only (light mode needs normal typography colors).
262
+ document.querySelectorAll('.chat-message').forEach((el) => {
263
+ el.classList.toggle('prose-invert', t !== 'light');
264
+ });
265
  }
266
 
267
  function toggleTheme() {
 
2296
 
2297
  function addMessageToUI(role, content) {
2298
  const div = document.createElement('div');
2299
+ const invert = (document.documentElement.getAttribute('data-theme') || 'dark') !== 'light';
2300
+ div.className = `chat-message ${role === 'user' ? 'user-message self-end' : 'ai-message self-start'} max-w-[85%] p-3 rounded-xl my-2 prose ${invert ? 'prose-invert' : ''} break-words text-sm md:text-base shadow-sm`;
2301
  renderMarkdownInto(div, content);
2302
  const container = document.getElementById('chat-history');
2303
  const empty = document.getElementById('chat-empty-state');
 
2880
 
2881
  function addAgentMessageToUI(role, content) {
2882
  const div = document.createElement('div');
2883
+ const invert = (document.documentElement.getAttribute('data-theme') || 'dark') !== 'light';
2884
+ div.className = `chat-message ${role === 'user' ? 'user-message self-end' : 'ai-message self-start'} max-w-[85%] p-3 rounded-xl my-2 prose ${invert ? 'prose-invert' : ''} break-words text-sm md:text-base shadow-sm`;
2885
  renderMarkdownInto(div, content);
2886
  const container = document.getElementById('agent-chat-history');
2887
  const empty = document.getElementById('agent-empty-state');
static/theme.css CHANGED
@@ -89,6 +89,27 @@ footer {
89
  color: var(--accent-1);
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  [data-theme="light"] input,
93
  [data-theme="light"] textarea,
94
  [data-theme="light"] select {
 
89
  color: var(--accent-1);
90
  }
91
 
92
+ [data-theme="light"] .bg-blue-600 {
93
+ background-color: var(--accent-1) !important;
94
+ }
95
+ [data-theme="light"] .hover\:bg-blue-700:hover {
96
+ background-color: #1d4ed8 !important;
97
+ }
98
+ [data-theme="light"] .bg-indigo-600,
99
+ [data-theme="light"] .bg-purple-600 {
100
+ background-color: var(--accent-2) !important;
101
+ }
102
+ [data-theme="light"] .hover\:bg-indigo-700:hover,
103
+ [data-theme="light"] .hover\:bg-purple-700:hover {
104
+ background-color: #6d28d9 !important;
105
+ }
106
+
107
+ [data-theme="light"] .text-blue-500,
108
+ [data-theme="light"] .text-blue-400,
109
+ [data-theme="light"] .text-blue-300 {
110
+ color: var(--accent-1) !important;
111
+ }
112
+
113
  [data-theme="light"] input,
114
  [data-theme="light"] textarea,
115
  [data-theme="light"] select {