LeroyDyer commited on
Commit
3e253f3
·
verified ·
1 Parent(s): e40a052

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1079 -1
app.py CHANGED
@@ -10,6 +10,7 @@ client = OpenAI(
10
  )
11
 
12
  def respond(
 
13
  message,
14
  history: list[dict[str, str]],
15
  system_message,
@@ -47,11 +48,1088 @@ def respond(
47
  yield response
48
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
 
52
  with gr.Blocks(
53
  title="🚀 L.C.A.R.S - Local Computer Advanced Reasoning System",
54
- theme='Yntec/HaleyCH_Theme_Orange_Green'
55
  ) as demo:
56
  # Header
57
  # State management
 
10
  )
11
 
12
  def respond(
13
+
14
  message,
15
  history: list[dict[str, str]],
16
  system_message,
 
48
  yield response
49
 
50
 
51
+ custom_css = """
52
+
53
+ .gradio-container {
54
+ background-color: rgba(243, 48, 4, 0.85);
55
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
56
+ background-size: cover;
57
+ background-position: center;
58
+ background-repeat: no-repeat;
59
+ border-radius: 20px;
60
+ }
61
+
62
+
63
+ .agent-card { padding: 10px; margin: 5px 0; border-radius: 8px; background: #f0f8ff; }
64
+ .agent-card.active { background: #e6f2ff; border-left: 3px solid #3399FF; }
65
+ .status-indicator { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
66
+ .online { background-color: #4CAF50; }
67
+ .offline { background-color: #F44336; }
68
+ .console-log { font-family: monospace; font-size: 0.9em; background: #1e1e1e; color: #00ff00; padding: 10px; border-radius: 5px; height: 500px; overflow-y: auto; }
69
+ .log-entry { margin: 2px 0; }
70
+ .log-public { color: #00ff00; }
71
+ .log-direct { color: #ffaa00; }
72
+ .log-system { color: #00aaff; }
73
+ .message-controls { background: #f5f5f5; padding: 10px; border-radius: 5px; margin-bottom: 10px; }
74
+
75
+ .console-log {
76
+ font-family: monospace;
77
+ font-size: 0.85em;
78
+ background: #1e1e1e;
79
+ color: #00ff00;
80
+ padding: 10px;
81
+ border-radius: 5px;
82
+ height: 600px;
83
+ overflow-y: auto;
84
+ word-wrap: break-word;
85
+ white-space: pre-wrap;
86
+ }
87
+
88
+ .log-entry {
89
+ margin: 4px 0;
90
+ padding: 2px 4px;
91
+ border-left: 2px solid #333;
92
+ }
93
+
94
+ .log-public {
95
+ color: #00ff00;
96
+ border-left-color: #00aa00;
97
+ }
98
+
99
+ .log-direct {
100
+ color: #ffaa00;
101
+ border-left-color: #ff8800;
102
+ }
103
+
104
+ .log-system {
105
+ color: #00aaff;
106
+ border-left-color: #0088ff;
107
+ }
108
+
109
+ .lcars-container {
110
+ background: #000d1a;
111
+ color: #7EC8E3;
112
+ font-family: 'Courier New', monospace;
113
+ padding: 20px;
114
+ border-radius: 0;
115
+ }
116
+ .lcars-title {
117
+ color: #7EC8E3;
118
+ text-align: center;
119
+ font-size: 2.2em;
120
+ text-shadow: 0 0 10px #7EC8E3, 0 0 20px rgba(126, 200, 227, 0.5);
121
+ margin-bottom: 10px;
122
+ letter-spacing: 2px;
123
+ }
124
+ .lcars-subtitle {
125
+ color: #aaa;
126
+ text-align: center;
127
+ font-style: italic;
128
+ margin-bottom: 30px;
129
+ }
130
+ /* Glowing Input Boxes */
131
+ .gr-box input, .gr-box textarea {
132
+ background: #001122 !important;
133
+ color: #7EC8E3 !important;
134
+ border: 1px solid #7EC8E3 !important;
135
+ box-shadow: 0 0 8px rgba(126, 200, 227, 0.3) !important;
136
+ font-family: 'Courier New', monospace !important;
137
+ }
138
+ .gr-button {
139
+ background: linear-gradient(90deg, #003366, #0055aa) !important;
140
+ color: #7EC8E3 !important;
141
+ border: 1px solid #7EC8E3 !important;
142
+ box-shadow: 0 0 10px rgba(126, 200, 227, 0.4) !important;
143
+ font-family: 'Courier New', monospace !important;
144
+ font-weight: bold !important;
145
+ letter-spacing: 1px;
146
+ transition: all 0.3s ease;
147
+ }
148
+ .gr-button:hover {
149
+ background: linear-gradient(90deg, #004488, #0077cc) !important;
150
+ box-shadow: 0 0 15px rgba(126, 200, 227, 0.6) !important;
151
+ transform: scale(1.05);
152
+ }
153
+ /* Output Panels */
154
+ .lcars-output-panel {
155
+ border: 2px solid #7EC8E3;
156
+ border-radius: 12px;
157
+ padding: 15px;
158
+ background: #00141a;
159
+ box-shadow: 0 0 15px rgba(126, 200, 227, 0.2);
160
+ margin-top: 10px;
161
+ }
162
+ .lcars-error {
163
+ color: #ff6b6b;
164
+ font-weight: bold;
165
+ text-shadow: 0 0 5px rgba(255,107,107,0.5);
166
+ padding: 20px;
167
+ text-align: center;
168
+ }
169
+ .lcars-log {
170
+ max-height: 400px;
171
+ overflow-y: auto;
172
+ background: #001018;
173
+ border: 1px solid #7EC8E3;
174
+ border-radius: 8px;
175
+ padding: 10px;
176
+ }
177
+ .lcars-step {
178
+ margin-bottom: 15px;
179
+ padding: 10px;
180
+ background: #000c14;
181
+ border-left: 3px solid #7EC8E3;
182
+ }
183
+ .lcars-step h4 {
184
+ margin: 0 0 8px 0;
185
+ color: #7EC8E3;
186
+ }
187
+ .lcars-step pre {
188
+ white-space: pre-wrap;
189
+ background: #00080c;
190
+ padding: 10px;
191
+ border-radius: 5px;
192
+ color: #ccc;
193
+ font-size: 0.9em;
194
+ margin: 10px 0 0 0;
195
+ }
196
+ code {
197
+ background: #000f1f;
198
+ color: #7EC8E3;
199
+ padding: 2px 6px;
200
+ border-radius: 4px;
201
+ font-family: 'Courier New';
202
+ }
203
+ @keyframes glow-pulse {
204
+ 0% { opacity: 0.8; }
205
+ 50% { opacity: 1; }
206
+ 100% { opacity: 0.8; }
207
+ }
208
+ iframe {
209
+ animation: glow-pulse 2.5s infinite ease-in-out;
210
+ }
211
+ .gr-form { background: transparent !important; }
212
+
213
+ /* =========================
214
+ LCARS47 Bridge Theme
215
+ Seamless Drop-In
216
+ ========================= */
217
+
218
+ :root {
219
+ /* Core LCARS Palette */
220
+ --lcars-bg: #000814;
221
+ --lcars-panel: #111827;
222
+ --lcars-red: #CC6666;
223
+ --lcars-gold: #FFCC66;
224
+
225
+
226
+ --lcars-cyan: #66CCCC;
227
+
228
+ --lcars-text: #FFFFFF;
229
+ --lcars-muted: #AAAAAA;
230
+ --lcars-orange: #FF9966;
231
+ --lcars-purple: #663399;
232
+ --lcars-rose: #FF6F91;
233
+ --lcars-gold: #FFC766;
234
+
235
+ --lcars-peach: #FFCC99;
236
+ --lcars-blue: #9999FF;
237
+
238
+ --lcars-lavender: #CCCCFF;
239
+ --lcars-tan: #FFCC99;
240
+ --lcars-rust: #CC6666;
241
+ --lcars-gold: #FFCC66;
242
+ --lcars-bg: #F5F0FF;
243
+ --lcars-panel: #E8E0F5;
244
+ --lcars-text: #2D2D5F;
245
+ --lcars-text-light: #5F5F8F;
246
+ --lcars-border: #9999CC;
247
+ --lcars-accent: #6666CC;
248
+ --lcars-dark: #111317;
249
+ /* Shared component vars */
250
+ --radius-large: 24px;
251
+ --radius-full: 50%;
252
+ --pulse-speed: 2s;
253
+ --font-stack: "Arial Narrow", "Helvetica Neue", sans-serif;
254
+ }
255
+
256
+ .lcars-thinking {{
257
+ background: linear-gradient(135deg, {self.colors['panel']}, #001122) !important;
258
+ border-left: 4px solid {self.colors['info']} !important;
259
+ color: {self.colors['text']} !important;
260
+ padding: 15px !important;
261
+ border-radius: 0px 15px 15px 0px !important;
262
+ }}
263
+
264
+
265
+ .gradio-container {{background-color: rgba(243, 48, 4, 0.85);
266
+ background: linear-gradient(135deg, {self.colors['background']}, #001122) !important;
267
+ color: {self.colors['text']} !important;
268
+ font-family: 'Courier New', monospace !important;
269
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
270
+ background-size: cover;
271
+ background-position: center;
272
+ background-repeat: no-repeat;
273
+ border-radius: 20px;
274
+ }}
275
+ #left-panel {
276
+ flex: 0 0 250px !important; /* fixed width */
277
+ max-width: 350px !important;
278
+ padding: 20px !important;
279
+ }
280
+ @keyframes pulse {
281
+ 0% { box-shadow: 0 0 5px var(--lcars-orange); }
282
+ 50% { box-shadow: 0 0 20px var(--lcars-orange); }
283
+ 100% { box-shadow: 0 0 5px var(--lcars-orange); }
284
+ }
285
+ .pulse-animation {
286
+ animation: pulse 2s infinite;
287
+ }
288
+
289
+
290
+ /* Panels */
291
+ .lcars-panel {
292
+ background-color: var(--lcars-panel);
293
+ border-radius: var(--radius-large);
294
+ padding: 1rem;
295
+ margin: 0.5rem;
296
+ box-shadow: 0 0 8px rgba(0,0,0,0.6);
297
+ }
298
+ /* Inputs & Outputs */
299
+ .lcars-input {{
300
+ background: {self.colors['panel']} !important;
301
+ color: {self.colors['text']} !important;
302
+ border: 2px solid {self.colors['primary']} !important;
303
+ border-radius: 0px 10px 10px 0px !important;
304
+ padding: 10px !important;
305
+ }}
306
+ .lcars-output {{
307
+ background: linear-gradient(135deg, {self.colors['background']}, {self.colors['panel']}) !important;
308
+ color: {self.colors['text']} !important;
309
+ border: 2px solid {self.colors['success']} !important;
310
+ border-radius: 0px 15px 15px 0px !important;
311
+ padding: 15px !important;
312
+ font-family: 'Courier New', monospace !important;
313
+ }}
314
+ /* Responsive */
315
+ @media (max-width: 768px) {
316
+ .gradio-container { padding: 10px; }
317
+ #lcars_logo { height: 150px !important; width: 150px !important; }
318
+ }
319
+
320
+
321
+ /* Code & Thinking blocks */
322
+ .lcars-code {{
323
+ background: {self.colors['background']} !important;
324
+ color: {self.colors['success']} !important;
325
+ border: 1px solid {self.colors['success']} !important;
326
+ border-radius: 5px !important;
327
+ font-family: 'Courier New', monospace !important;
328
+ }}
329
+ .lcars-thinking {{
330
+ background: linear-gradient(135deg, {self.colors['panel']}, #001122) !important;
331
+ border-left: 4px solid {self.colors['info']} !important;
332
+ color: {self.colors['text']} !important;
333
+ padding: 15px !important;
334
+ border-radius: 0px 15px 15px 0px !important;
335
+ }}
336
+ .lcars-artifact {{
337
+ background: {self.colors['panel']} !important;
338
+ border: 2px solid {self.colors['border']} !important;
339
+ color: {self.colors['text']} !important;
340
+ border-radius: 0px 15px 15px 0px !important;
341
+ padding: 15px !important;
342
+ margin: 10px 0 !important;
343
+ }}
344
+ /* Headers */
345
+ .lcars-header {
346
+ background: var(--lcars-red);
347
+ color: var(--lcars-text);
348
+ border-radius: var(--radius-large);
349
+ padding: 0.75rem 1.5rem;
350
+ text-transform: uppercase;
351
+ font-size: 1.25rem;
352
+ }
353
+ /* Chatbox */
354
+ .chatbox > div {
355
+ background: var(--lcars-dark) !important;
356
+ border-radius: 18px !important;
357
+ border: 2px solid var(--lcars-purple) !important;
358
+ }
359
+ /* =========================
360
+ Buttons / Tabs / Chips
361
+ ========================= */
362
+
363
+ button, .lcars-tab, .lcars-chip {
364
+ background: var(--lcars-gold);
365
+ border: none;
366
+ border-radius: var(--radius-large);
367
+ padding: 0.5rem 1rem;
368
+ margin: 0.25rem;
369
+ color: var(--lcars-bg);
370
+ font-weight: bold;
371
+ font-size: 1rem;
372
+ transition: all 0.3s ease-in-out;
373
+ cursor: pointer;
374
+ }
375
+
376
+ button:hover, .lcars-tab:hover, .lcars-chip:hover {
377
+ background: var(--lcars-orange);
378
+ color: var(--lcars-text);
379
+ }
380
+
381
+ /* Circular buttons */
382
+ button.round, .lcars-chip.round {
383
+ border-radius: var(--radius-full);
384
+ padding: 0.75rem;
385
+ width: 3rem;
386
+ height: 3rem;
387
+ text-align: center;
388
+ }
389
+
390
+ /* =========================
391
+ Containers (Code, JSON, Chat, Artifacts)
392
+ ========================= */
393
+
394
+ .json-container, .code-container, .chat-container, .artifact-container {
395
+ border-radius: var(--radius-large);
396
+ padding: 1rem;
397
+ margin: 0.5rem 0;
398
+ background: var(--lcars-panel);
399
+ color: var(--lcars-text);
400
+ font-family: monospace;
401
+ font-size: 0.9rem;
402
+ line-height: 1.4;
403
+ white-space: pre-wrap;
404
+ overflow-x: auto;
405
+ }
406
+
407
+ /* =========================
408
+ Artifact / Chat / Code Borders
409
+ ========================= */
410
+
411
+ .artifact-container {
412
+ border: 3px solid var(--lcars-gold);
413
+ animation: pulse-yellow var(--pulse-speed) infinite;
414
+ }
415
+
416
+ .chat-container {
417
+ border: 3px solid var(--lcars-red);
418
+ animation: pulse-red var(--pulse-speed) infinite;
419
+ }
420
+
421
+ .code-container {
422
+ border: 3px solid var(--lcars-purple);
423
+ animation: pulse-orange var(--pulse-speed) infinite;
424
+ }
425
+
426
+ /* =========================
427
+ Animations
428
+ ========================= */
429
+
430
+ @keyframes pulse-red {
431
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-red); }
432
+ 50% { box-shadow: 0 0 20px var(--lcars-red); }
433
+ }
434
+
435
+ @keyframes pulse-yellow {
436
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-gold); }
437
+ 50% { box-shadow: 0 0 20px var(--lcars-gold); }
438
+ }
439
+
440
+ @keyframes pulse-orange {
441
+ 0%, 100% { box-shadow: 0 0 5px var(--lcars-orange); }
442
+ 50% { box-shadow: 0 0 20px var(--lcars-orange); }
443
+ }
444
+
445
+ /* Thought styling */
446
+ .thought {
447
+ opacity: 0.8;
448
+ font-family: "Courier New", monospace;
449
+ border: 1px rgb(229, 128, 12) solid;
450
+ padding: 10px;
451
+ border-radius: 5px;
452
+ display: none;
453
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
454
+ }
455
+ .thought-prompt {
456
+ opacity: 0.8;
457
+ font-family: "Courier New", monospace;
458
+ }
459
+ /* =========================
460
+ Metadata & Thought Blocks
461
+ ========================= */
462
+
463
+ .metadata-display, .thought-block {
464
+ background: var(--lcars-blue);
465
+ border-radius: var(--radius-large);
466
+ padding: 0.75rem;
467
+ margin: 0.5rem 0;
468
+ color: var(--lcars-bg);
469
+ font-weight: bold;
470
+ }
471
+ .metadata-display {
472
+ background: var(--lcars-panel);
473
+ border-left: 4px solid var(--lcars-blue);
474
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
475
+ padding: 10px;
476
+ border-radius: 5px;
477
+ overflow-y: auto;
478
+ max-height: 300px;
479
+ }
480
+ .metadata-display .json-container {
481
+ font-family: monospace;
482
+ font-size: 0.9em;
483
+ background: #6b50111a;
484
+ }
485
+
486
+ .primary {
487
+ background: linear-gradient(45deg, var(--lcars-orange), #ffaa33) !important;
488
+
489
+ color: hwb(90 7% 5% / 0.102);
490
+ font-family: "Courier New", monospace;
491
+ border: 1px rgb(229, 128, 12) solid;
492
+ }
493
+ .secondary {
494
+ background: linear-gradient(45deg, var(--lcars-blue), #33aacc) !important;
495
+ color: #6b50111a;
496
+ font-family: "Courier New", monospace;
497
+ border: 1px rgb(229, 128, 12) solid;
498
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
499
+ }
500
+ ::-webkit-scrollbar-thumb:hover {
501
+ background-color: var(--lcars-gold);
502
+ }
503
+ #lcars_logo {
504
+ border-radius: 15px;
505
+ border: 2px solid var(--lcars-orange);
506
+ box-shadow: 0 0 20px rgba(255, 153, 0, 0.932);
507
+ }
508
+
509
+
510
+
511
+ .lcars-tab {{
512
+ background: {self.colors['panel']} !important;
513
+ color: {self.colors['text']} !important;
514
+ border: 2px solid {self.colors['primary']} !important;
515
+ border-radius: 0px 10px 0px 0px !important;
516
+ }}
517
+ .lcars-tab.selected {{
518
+ background: {self.colors['primary']} !important;
519
+ color: {self.colors['background']} !important;
520
+ }}
521
+ .lcars-panel.lcars-empty {
522
+ text-align: center;
523
+ font-style: italic;
524
+ color: var(--lcars-text-light);
525
+ }
526
+
527
+ .lcars-panel.lcars-error {
528
+ background: #FFE5E5;
529
+ border-color: var(--lcars-rust);
530
+ color: #CC0000;
531
+ }
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+ /* Input fields */
543
+ .lcars-input input,
544
+ .lcars-input textarea {
545
+ background: white !important;
546
+ border: 2px solid var(--lcars-border) !important;
547
+ border-radius: 8px !important;
548
+ color: var(--lcars-text) !important;
549
+ padding: 10px !important;
550
+ font-size: 14px !important;
551
+ }
552
+
553
+ .lcars-input input:focus,
554
+ .lcars-input textarea:focus {
555
+ border-color: var(--lcars-accent) !important;
556
+ outline: none !important;
557
+ box-shadow: 0 0 8px rgba(102, 102, 204, 0.3) !important;
558
+ }
559
+
560
+ /* Dropdowns and selects */
561
+ .lcars-dropdown select,
562
+ .lcars-dropdown input {
563
+ background: white !important;
564
+ border: 2px solid var(--lcars-border) !important;
565
+ border-radius: 8px !important;
566
+ color: var(--lcars-text) !important;
567
+ padding: 8px !important;
568
+ }
569
+
570
+ /* Checkboxes */
571
+ .lcars-checkbox label {
572
+ background: var(--lcars-panel) !important;
573
+ border: 2px solid var(--lcars-border) !important;
574
+ border-radius: 8px !important;
575
+ padding: 8px 12px !important;
576
+ margin: 4px !important;
577
+ transition: all 0.2s ease !important;
578
+ }
579
+
580
+ .lcars-checkbox label:hover {
581
+ background: var(--lcars-lavender) !important;
582
+ border-color: var(--lcars-accent) !important;
583
+ }
584
+
585
+ /* Radio buttons */
586
+ .lcars-radio label {
587
+ background: var(--lcars-panel) !important;
588
+ border: 2px solid var(--lcars-border) !important;
589
+ border-radius: 20px !important;
590
+ padding: 8px 16px !important;
591
+ margin: 4px !important;
592
+ }
593
+
594
+ /* Display fields */
595
+ .lcars-display input {
596
+ background: var(--lcars-panel) !important;
597
+ border: 2px solid var(--lcars-border) !important;
598
+ border-radius: 8px !important;
599
+ color: var(--lcars-text) !important;
600
+ font-family: 'Courier New', monospace !important;
601
+ padding: 10px !important;
602
+ }
603
+
604
+ /* Accordions */
605
+ .lcars-accordion {
606
+ background: var(--lcars-panel) !important;
607
+ border: 2px solid var(--lcars-border) !important;
608
+ border-radius: 12px !important;
609
+ margin: 8px 0 !important;
610
+ }
611
+
612
+ .lcars-accordion summary {
613
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
614
+ color: var(--lcars-text) !important;
615
+ font-weight: bold !important;
616
+ padding: 12px !important;
617
+ border-radius: 10px !important;
618
+ cursor: pointer !important;
619
+ }
620
+
621
+ /* Participant Cards & Collapsible Layout */
622
+ .lcars-participants-container {
623
+ display: flex;
624
+ flex-direction: column;
625
+ gap: 15px;
626
+ width: 100%;
627
+ }
628
+
629
+ /* Base Card Styles */
630
+ .lcars-collapsible-card {
631
+ border: 1px solid #444;
632
+ border-radius: 8px;
633
+ background: #1a1a1a;
634
+ color: #fff;
635
+ overflow: hidden;
636
+ transition: all 0.3s ease;
637
+ }
638
+
639
+ .lcars-collapsible-card.collapsed .lcars-participant-expanded {
640
+ display: none;
641
+ }
642
+
643
+ .lcars-collapsible-card.expanded .lcars-participant-collapsed {
644
+ display: none;
645
+ }
646
+
647
+ .lcars-collapsible-card.expanded .lcars-collapse-icon {
648
+ transform: rotate(90deg);
649
+ }
650
+
651
+ /* Card Headers */
652
+ .lcars-participant-header {
653
+ background: #3366cc;
654
+ color: white;
655
+ padding: 12px 15px;
656
+ display: flex;
657
+ justify-content: space-between;
658
+ align-items: center;
659
+ cursor: pointer;
660
+ border-bottom: 2px solid #ffcc00;
661
+ transition: background 0.2s ease;
662
+ }
663
+
664
+ .lcars-participant-header:hover {
665
+ background: #2a55a8;
666
+ }
667
+
668
+ .lcars-participant-name {
669
+ font-weight: bold;
670
+ font-size: 1.1em;
671
+ }
672
+
673
+ .lcars-collapse-icon {
674
+ transition: transform 0.3s ease;
675
+ font-size: 0.8em;
676
+ }
677
+
678
+ /* Badges */
679
+ .lcars-badge-manager {
680
+ background: #ffcc00;
681
+ color: #000;
682
+ padding: 4px 8px;
683
+ border-radius: 12px;
684
+ font-size: 0.8em;
685
+ font-weight: bold;
686
+ letter-spacing: 1px;
687
+ box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
688
+ }
689
+
690
+ .lcars-badge-agent {
691
+ background: #00cc66;
692
+ color: #000;
693
+ padding: 4px 8px;
694
+ border-radius: 12px;
695
+ font-size: 0.8em;
696
+ font-weight: bold;
697
+ letter-spacing: 1px;
698
+ box-shadow: 0 2px 4px rgba(0, 204, 102, 0.3);
699
+ }
700
+
701
+ .lcars-badge-human {
702
+ background: #9966cc;
703
+ color: #fff;
704
+ padding: 4px 8px;
705
+ border-radius: 12px;
706
+ font-size: 0.8em;
707
+ font-weight: bold;
708
+ letter-spacing: 1px;
709
+ box-shadow: 0 2px 4px rgba(153, 102, 255, 0.3);
710
+ }
711
+
712
+ /* Card Content Sections */
713
+ .lcars-participant-collapsed,
714
+ .lcars-participant-expanded {
715
+ padding: 15px;
716
+ }
717
+
718
+ .lcars-participant-preview {
719
+ display: flex;
720
+ flex-direction: column;
721
+ gap: 8px;
722
+ }
723
+
724
+ .lcars-info-section {
725
+ margin-bottom: 20px;
726
+ padding-bottom: 15px;
727
+ border-bottom: 1px solid #333;
728
+ }
729
+
730
+ .lcars-info-section:last-child {
731
+ border-bottom: none;
732
+ margin-bottom: 0;
733
+ }
734
+
735
+ .lcars-section-title {
736
+ color: #ffcc00;
737
+ font-weight: bold;
738
+ font-size: 0.9em;
739
+ text-transform: uppercase;
740
+ letter-spacing: 1px;
741
+ margin-bottom: 10px;
742
+ border-bottom: 1px solid #444;
743
+ padding-bottom: 5px;
744
+ }
745
+
746
+ /* Info Rows */
747
+ .lcars-info-row {
748
+ display: flex;
749
+ margin-bottom: 8px;
750
+ line-height: 1.4;
751
+ color: var(--lcars-text-light);
752
+ }
753
+
754
+ .lcars-info-row.full-width {
755
+ flex-direction: column;
756
+ }
757
+
758
+ .lcars-label {
759
+ color: #ffcc00;
760
+ font-weight: bold;
761
+ min-width: 120px;
762
+ margin-right: 10px;
763
+ font-size: 0.9em;
764
+ }
765
+
766
+ /* Lists */
767
+ .lcars-goals-list li {
768
+ margin-bottom: 5px;
769
+ line-height: 1.4;
770
+ color: #e0e0e0;
771
+ }
772
+
773
+ /* Template Styling */
774
+ .lcars-template-container {
775
+ background: rgba(255, 255, 255, 0.05);
776
+ border: 1px solid #444;
777
+ border-radius: 4px;
778
+ padding: 10px;
779
+ max-height: 200px;
780
+ overflow-y: auto;
781
+ }
782
+
783
+ .lcars-template-preview {
784
+ color: #e0e0e0;
785
+ font-family: monospace;
786
+ font-size: 0.85em;
787
+ line-height: 1.4;
788
+ white-space: pre-wrap;
789
+ }
790
+
791
+ .lcars-template-truncated {
792
+ color: #ffcc00;
793
+ font-size: 0.8em;
794
+ font-style: italic;
795
+ margin-top: 8px;
796
+ }
797
+
798
+ .lcars-no-template {
799
+ color: #888;
800
+ font-style: italic;
801
+ }
802
+
803
+ /* More Skills Indicator */
804
+ .lcars-more-skills {
805
+ color: #ffcc00;
806
+ font-size: 0.8em;
807
+ font-style: italic;
808
+ margin-top: 5px;
809
+ display: block;
810
+ }
811
+
812
+ /* Agent Details Panel */
813
+ .lcars-agent-details {
814
+ background: white;
815
+ border: 3px solid var(--lcars-border);
816
+ border-radius: 12px;
817
+ overflow: hidden;
818
+ box-shadow: 0 4px 12px rgba(102, 102, 204, 0.2);
819
+ }
820
+
821
+ .lcars-agent-header {
822
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender));
823
+ padding: 16px;
824
+ display: flex;
825
+ justify-content: space-between;
826
+ align-items: center;
827
+ }
828
+
829
+ .lcars-agent-name {
830
+ font-size: 20px;
831
+ font-weight: bold;
832
+ color: white;
833
+ text-transform: uppercase;
834
+ letter-spacing: 2px;
835
+ }
836
+
837
+ .lcars-status-connected {
838
+ background: #66CC66;
839
+ color: white;
840
+ padding: 6px 14px;
841
+ border-radius: 16px;
842
+ font-size: 12px;
843
+ font-weight: bold;
844
+ }
845
+
846
+ .lcars-status-available {
847
+ background: var(--lcars-orange);
848
+ color: white;
849
+ padding: 6px 14px;
850
+ border-radius: 16px;
851
+ font-size: 12px;
852
+ font-weight: bold;
853
+ }
854
+
855
+ .lcars-agent-body {
856
+ padding: 18px;
857
+ }
858
+
859
+ .lcars-detail-row {
860
+ margin: 12px 0;
861
+ display: flex;
862
+ gap: 10px;
863
+ }
864
+
865
+ .lcars-detail-label {
866
+ font-weight: bold;
867
+ color: var(--lcars-accent);
868
+ min-width: 120px;
869
+ text-transform: uppercase;
870
+ font-size: 12px;
871
+ letter-spacing: 1px;
872
+ }
873
+
874
+ .lcars-detail-value {
875
+ color: var(--lcars-text);
876
+ flex: 1;
877
+ }
878
+
879
+ .lcars-model-badge {
880
+ background: var(--lcars-panel);
881
+ color: var(--lcars-accent);
882
+ padding: 4px 10px;
883
+ border-radius: 6px;
884
+ font-family: 'Courier New', monospace;
885
+ font-size: 12px;
886
+ }
887
+
888
+ .lcars-detail-section {
889
+ margin: 16px 0;
890
+ padding: 12px;
891
+ background: var(--lcars-panel);
892
+ border-radius: 8px;
893
+ }
894
+
895
+ .lcars-skills-list {
896
+ line-height: 2;
897
+ }
898
+
899
+ .lcars-skill-item {
900
+ color: var(--lcars-text-light);
901
+ font-size: 13px;
902
+ margin-left: 8px;
903
+ }
904
+
905
+ .lcars-expertise {
906
+ color: var(--lcars-text-light);
907
+ font-size: 13px;
908
+ line-height: 1.8;
909
+ }
910
+
911
+ /* Pattern Details */
912
+ .lcars-pattern-details {
913
+ border: 1px solid #444;
914
+ border-radius: 8px;
915
+ margin: 10px 0;
916
+ background: #1a1a1a;
917
+ color: #fff;
918
+ }
919
+
920
+ .lcars-pattern-header {
921
+ background: #3366cc;
922
+ color: white;
923
+ padding: 12px 15px;
924
+ font-weight: bold;
925
+ font-size: 1.1em;
926
+ text-align: center;
927
+ border-bottom: 2px solid #ffcc00;
928
+ }
929
+
930
+ .lcars-pattern-body {
931
+ padding: 15px;
932
+ }
933
+
934
+ .lcars-pattern-section {
935
+ margin-bottom: 20px;
936
+ display: block;
937
+ }
938
+
939
+ .lcars-pattern-section:last-child {
940
+ margin-bottom: 0;
941
+ }
942
+
943
+ .lcars-pattern-label {
944
+ font-weight: bold;
945
+ color: #ffcc00;
946
+ margin-bottom: 5px;
947
+ font-size: 0.9em;
948
+ text-transform: uppercase;
949
+ letter-spacing: 1px;
950
+ }
951
+
952
+ .lcars-pattern-text {
953
+ color: #fa0404;
954
+ line-height: 1.5;
955
+ }
956
+
957
+ /* Log display */
958
+ .lcars-log-panel {
959
+ background: #00008734;
960
+ color: #050505;
961
+ font-family: 'Courier New', monospace;
962
+ font-size: 16px;
963
+ border-radius: 8px;
964
+ padding: 12px;
965
+ max-height: 500px;
966
+ overflow-y: auto;
967
+ box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
968
+ }
969
+
970
+ .lcars-log-panel.lcars-empty {
971
+ color: #999;
972
+ text-align: center;
973
+ font-style: italic;
974
+ }
975
+
976
+ .lcars-log-entries {
977
+ display: flex;
978
+ flex-direction: column;
979
+ gap: 4px;
980
+ }
981
+
982
+ .lcars-log-entry {
983
+ padding: 6px 10px;
984
+ border-left: 3px solid transparent;
985
+ border-radius: 3px;
986
+ transition: all 0.2s ease;
987
+ }
988
+
989
+ .lcars-log-entry:hover {
990
+ background: rgba(255, 255, 255, 0.05);
991
+ }
992
+
993
+ .lcars-log-info {
994
+ border-left-color: #5c635cda;
995
+ color: #1636e7;
996
+ }
997
+
998
+ .lcars-log-error {
999
+ border-left-color: #202120;
1000
+ color: #1636e7;
1001
+ }
1002
+
1003
+ .lcars-log-level {
1004
+ font-weight: bold;
1005
+ margin-right: 8px;
1006
+ }
1007
+
1008
+ /* Chatbot styling */
1009
+ .lcars-chatbot {
1010
+ border: 3px solid var(--lcars-border) !important;
1011
+ border-radius: 12px !important;
1012
+ background: white !important;
1013
+ }
1014
+
1015
+ .gradio-container {
1016
+ background-color: rgba(243, 48, 4, 0.85);
1017
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1018
+ background-size: cover;
1019
+ background-position: center;
1020
+ background-repeat: no-repeat;
1021
+ border-radius: 20px;
1022
+ }
1023
+ .tab-nav button {
1024
+ background: var(--lcars-panel) !important;
1025
+ border: 2px solid var(--lcars-border) !important;
1026
+ color: var(--lcars-text) !important;
1027
+ border-radius: 8px 8px 0 0 !important;
1028
+ margin-right: 4px !important;
1029
+ font-weight: bold !important;
1030
+ }
1031
+
1032
+ .tab-nav button.selected {
1033
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1034
+ color: var(--lcars-text) !important;
1035
+ border-bottom: none !important;
1036
+ }
1037
+
1038
+ /* Ensure vertical stacking of participants */
1039
+ .lcars-participants-container {
1040
+ display: flex !important;
1041
+ flex-direction: column !important;
1042
+ gap: 16px !important;
1043
+ width: 100% !important;
1044
+ max-width: 100% !important;
1045
+ margin: 0 auto !important;
1046
+ align-items: stretch !important; /* Ensures full width alignment */
1047
+ }
1048
+
1049
+ /* Make sure each participant card respects container flow */
1050
+ .lcars-participant-card-manager,
1051
+ .lcars-participant-card-agent,
1052
+ .lcars-participant-card-human {
1053
+ display: flex !important;
1054
+ flex-direction: column !important;
1055
+ break-inside: avoid !important; /* Prevents awkward splits in print/PDF */
1056
+ position: relative !important;
1057
+ width: 100% !important;
1058
+ box-sizing: border-box !important;
1059
+ background: white !important;
1060
+ color: #2D2D5F !important;
1061
+ }
1062
+ .lcars-content {
1063
+ background: rgba(0, 0, 0, 0.95) !important;
1064
+ border: 2px solid #ff9900 !important;
1065
+ color: #ffffff !important;
1066
+ font-family: 'Times New Roman', serif !important;
1067
+ padding: 20px !important;
1068
+ height: 600px !important;
1069
+ overflow-y: auto !important;
1070
+ }
1071
+ .gr-button:hover {
1072
+ background: linear-gradient(45deg, #ffcc00, #ff9900) !important;
1073
+ box-shadow: 0 0 15px rgba(255, 153, 0, 0.8) !important;
1074
+ }
1075
+ .block {
1076
+ background: rgba(0, 0, 0, 0.8) !important;
1077
+ border: 2px solid #ff9900 !important;
1078
+ border-radius: 0px !important;
1079
+ }
1080
+ /* Scrollbar */
1081
+ ::-webkit-scrollbar {{ width: 12px; }}
1082
+ ::-webkit-scrollbar-track {{ background: {self.colors['background']}; }}
1083
+ ::-webkit-scrollbar-thumb {{
1084
+ background: {self.colors['primary']};
1085
+ border-radius: 0px 10px 10px 0px;
1086
+ }}
1087
+ ::-webkit-scrollbar-thumb:hover {{ background: {self.colors['accent']}; }}
1088
+
1089
+
1090
+ .lcars-button,
1091
+ button[variant="primary"] {
1092
+ background: linear-gradient(135deg, var(--lcars-orange), var(--lcars-peach)) !important;
1093
+ color: var(--lcars-text) !important;
1094
+ }
1095
+
1096
+ .lcars-button-add {
1097
+ background: linear-gradient(135deg, var(--lcars-blue), var(--lcars-lavender)) !important;
1098
+ color: white !important;
1099
+ }
1100
+
1101
+ .lcars-button-send,
1102
+ .lcars-button-task {
1103
+ background: linear-gradient(135deg, var(--lcars-purple), var(--lcars-lavender)) !important;
1104
+ color: white !important;
1105
+ }
1106
+
1107
+ .lcars-button-remove {
1108
+ background: linear-gradient(135deg, var(--lcars-rust), #FF9999) !important;
1109
+ color: white !important;
1110
+ }
1111
+
1112
+ .lcars-button-secondary,
1113
+ .lcars-button-create {
1114
+ background: linear-gradient(135deg, var(--lcars-gold), var(--lcars-tan)) !important;
1115
+ color: var(--lcars-text) !important;
1116
+ }
1117
+ .gradio-container {{background-color: rgba(243, 48, 4, 0.85);
1118
+ background: linear-gradient(135deg, {self.colors['background']}, #001122) !important;
1119
+ color: {self.colors['text']} !important;
1120
+ font-family: 'Courier New', monospace !important;
1121
+ background-image: url("https://huggingface.co/LeroyDyer/ImageFiles/resolve/main/LCARS_PANEL.png");
1122
+ background-size: cover;
1123
+ background-position: center;
1124
+ background-repeat: no-repeat;
1125
+ border-radius: 20px;
1126
+ }}
1127
+ """
1128
 
1129
 
1130
  with gr.Blocks(
1131
  title="🚀 L.C.A.R.S - Local Computer Advanced Reasoning System",
1132
+ theme='Yntec/HaleyCH_Theme_Orange_Green',css=custom_css
1133
  ) as demo:
1134
  # Header
1135
  # State management