fraudTech commited on
Commit
05fad85
·
1 Parent(s): b1b97d5

input json horizontal scroll

Browse files
Files changed (2) hide show
  1. web/src/App.css +45 -1
  2. web/src/App.tsx +4 -4
web/src/App.css CHANGED
@@ -606,11 +606,47 @@ details.tool-call summary::-webkit-details-marker {
606
  margin-top: 0.75rem;
607
  }
608
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609
  .tool-section-label {
610
  color: #8b7355;
611
  font-size: 0.8rem;
612
  font-weight: 600;
613
- margin-bottom: 0.5rem;
614
  text-transform: uppercase;
615
  letter-spacing: 0.5px;
616
  }
@@ -628,6 +664,14 @@ details.tool-call summary::-webkit-details-marker {
628
  word-break: break-word;
629
  }
630
 
 
 
 
 
 
 
 
 
631
  .typing-indicator {
632
  display: flex;
633
  align-items: center;
 
606
  margin-top: 0.75rem;
607
  }
608
 
609
+ /* Collapsible input section */
610
+ details.tool-section {
611
+ background: transparent;
612
+ border: none;
613
+ border-radius: 0;
614
+ }
615
+
616
+ details.tool-section summary {
617
+ cursor: pointer;
618
+ padding: 0;
619
+ user-select: none;
620
+ list-style: none;
621
+ margin-bottom: 0.5rem;
622
+ transition: color 0.2s ease;
623
+ }
624
+
625
+ details.tool-section summary:hover {
626
+ color: #d4a574;
627
+ }
628
+
629
+ /* Hide default disclosure triangle */
630
+ details.tool-section summary::-webkit-details-marker {
631
+ display: none;
632
+ }
633
+
634
+ /* Add custom arrow indicator */
635
+ details.tool-section summary::before {
636
+ content: '▶ ';
637
+ display: inline-block;
638
+ transition: transform 0.2s ease;
639
+ margin-right: 0.25rem;
640
+ }
641
+
642
+ details.tool-section[open] summary::before {
643
+ transform: rotate(90deg);
644
+ }
645
+
646
  .tool-section-label {
647
  color: #8b7355;
648
  font-size: 0.8rem;
649
  font-weight: 600;
 
650
  text-transform: uppercase;
651
  letter-spacing: 0.5px;
652
  }
 
664
  word-break: break-word;
665
  }
666
 
667
+ /* Horizontal scroll for collapsed input */
668
+ .tool-input-scroll {
669
+ white-space: pre;
670
+ word-break: normal;
671
+ overflow-x: auto;
672
+ max-width: 100%;
673
+ }
674
+
675
  .typing-indicator {
676
  display: flex;
677
  align-items: center;
web/src/App.tsx CHANGED
@@ -598,10 +598,10 @@ function App() {
598
  {tool.output && <span className="checkmark">✓</span>}
599
  </summary>
600
  <div className="tool-call-content">
601
- <div className="tool-section">
602
- <div className="tool-section-label">Input:</div>
603
- <pre className="tool-code">{tool.input}</pre>
604
- </div>
605
  {tool.output && (
606
  <div className="tool-section">
607
  <div className="tool-section-label">Output:</div>
 
598
  {tool.output && <span className="checkmark">✓</span>}
599
  </summary>
600
  <div className="tool-call-content">
601
+ <details className="tool-section">
602
+ <summary className="tool-section-label">Input:</summary>
603
+ <pre className="tool-code tool-input-scroll">{tool.input}</pre>
604
+ </details>
605
  {tool.output && (
606
  <div className="tool-section">
607
  <div className="tool-section-label">Output:</div>