lowvoltagenation Claude commited on
Commit
c3e3fd8
·
1 Parent(s): 028cec7

Fix terminal component: replace gr.Code with gr.Textbox

Browse files

- Replaced gr.Code(language='bash') with gr.Textbox to fix unsupported language error
- Updated CSS to properly style textarea element for terminal appearance
- Added show_copy_button=True for better usability
- Maintained black terminal background with green text styling
- Fixed Gradio 5.0 compatibility issue

The terminal now uses a standard textbox with terminal styling instead of
the code component that doesn't support bash syntax highlighting.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

src/__pycache__/model_interface.cpython-313.pyc CHANGED
Binary files a/src/__pycache__/model_interface.cpython-313.pyc and b/src/__pycache__/model_interface.cpython-313.pyc differ
 
src/app.py CHANGED
@@ -532,7 +532,7 @@ Communication style:
532
  }
533
 
534
  /* Terminal styling */
535
- .terminal-display {
536
  background-color: #000000 !important;
537
  color: #00ff00 !important;
538
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
@@ -542,21 +542,21 @@ Communication style:
542
  padding: 15px !important;
543
  margin: 10px 0 !important;
544
  box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
 
 
 
545
  }
546
 
547
- .terminal-display .code {
548
  background-color: #000000 !important;
549
- color: #00ff00 !important;
550
- border: none !important;
551
  }
552
 
553
- .terminal-display pre {
554
- background-color: #000000 !important;
555
  color: #00ff00 !important;
556
- border: none !important;
557
- font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
558
- font-size: 12px !important;
559
- line-height: 1.4 !important;
560
  }
561
 
562
  /* Terminal header styling */
@@ -670,15 +670,15 @@ Communication style:
670
  size="sm"
671
  )
672
 
673
- terminal_output = gr.Code(
674
  label="System Activity",
675
  value="🔧 Maya Backend Terminal - Click 'Show Real-time Logs' to see system activity",
676
- language="bash",
677
  lines=15,
678
  max_lines=25,
679
  interactive=False,
680
  visible=False, # Hidden by default
681
- elem_classes=["terminal-display"]
 
682
  )
683
 
684
  # Knowledge Base Tab
 
532
  }
533
 
534
  /* Terminal styling */
535
+ .terminal-display textarea {
536
  background-color: #000000 !important;
537
  color: #00ff00 !important;
538
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
 
542
  padding: 15px !important;
543
  margin: 10px 0 !important;
544
  box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
545
+ line-height: 1.4 !important;
546
+ white-space: pre-wrap !important;
547
+ overflow-wrap: break-word !important;
548
  }
549
 
550
+ .terminal-display .textbox {
551
  background-color: #000000 !important;
552
+ border: 2px solid #333 !important;
553
+ border-radius: 8px !important;
554
  }
555
 
556
+ .terminal-display label {
 
557
  color: #00ff00 !important;
558
+ font-family: 'Courier New', monospace !important;
559
+ font-weight: bold !important;
 
 
560
  }
561
 
562
  /* Terminal header styling */
 
670
  size="sm"
671
  )
672
 
673
+ terminal_output = gr.Textbox(
674
  label="System Activity",
675
  value="🔧 Maya Backend Terminal - Click 'Show Real-time Logs' to see system activity",
 
676
  lines=15,
677
  max_lines=25,
678
  interactive=False,
679
  visible=False, # Hidden by default
680
+ elem_classes=["terminal-display"],
681
+ show_copy_button=True
682
  )
683
 
684
  # Knowledge Base Tab