Skip to content

Commit ab3ce36

Browse files
committed
Sidebar in alphabetical order
1 parent 74f97ef commit ab3ce36

File tree

1 file changed

+65
-60
lines changed

1 file changed

+65
-60
lines changed

ai/ai-react-app/src/components/Layout/RightSidebar.tsx

Lines changed: 65 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -433,32 +433,6 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
433433

434434
<div>
435435
<h5 className={styles.subSectionTitle}>Tools</h5>
436-
<div className={styles.groupContainer}>
437-
<div
438-
className={`${styles.toggleGroup} ${isFunctionCallingActive ? styles.disabledText : ""}`}
439-
>
440-
<label htmlFor="structured-output-toggle">
441-
Structured output (JSON)
442-
</label>
443-
<label className={styles.switch}>
444-
<input
445-
type="checkbox"
446-
id="structured-output-toggle"
447-
name="structured-output-toggle"
448-
checked={isStructuredOutputActive}
449-
onChange={handleToggleChange}
450-
disabled={
451-
isFunctionCallingActive ||
452-
isGroundingWithGoogleSearchActive ||
453-
isGroundingWithGoogleMapsActive
454-
}
455-
/>
456-
<span
457-
className={`${styles.slider} ${isFunctionCallingActive || isGroundingWithGoogleSearchActive || isGroundingWithGoogleMapsActive ? styles.disabled : ""}`}
458-
></span>
459-
</label>
460-
</div>
461-
</div>
462436
<div className={styles.groupContainer}>
463437
<div
464438
className={`${styles.toggleGroup} ${isStructuredOutputActive || isGroundingWithGoogleSearchActive ? styles.disabledText : ""}`}
@@ -483,38 +457,6 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
483457
</label>
484458
</div>
485459
</div>
486-
<div className={styles.groupContainer}>
487-
<div
488-
className={`${styles.toggleGroup} ${isStructuredOutputActive || isFunctionCallingActive
489-
? styles.disabledText
490-
: ""
491-
}`}
492-
>
493-
<label htmlFor="google-search-toggle">
494-
Grounding with Google Search
495-
</label>
496-
<label className={styles.switch}>
497-
<input
498-
type="checkbox"
499-
id="google-search-toggle"
500-
name="google-search-toggle"
501-
checked={isGroundingWithGoogleSearchActive}
502-
onChange={handleToggleChange}
503-
disabled={
504-
isStructuredOutputActive || isFunctionCallingActive
505-
}
506-
/>
507-
<span
508-
className={`${styles.slider} ${isStructuredOutputActive ||
509-
isFunctionCallingActive ||
510-
isGroundingWithGoogleMapsActive
511-
? styles.disabled
512-
: ""
513-
}`}
514-
></span>
515-
</label>
516-
</div>
517-
</div>
518460
{/* Google Maps Grounding Group */}
519461
<div className={styles.groupContainer}>
520462
<div
@@ -553,7 +495,12 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
553495
className={`${styles.toggleGroup} ${!isGroundingWithGoogleMapsActive ? styles.disabledText : ""}`}
554496
style={{ paddingLeft: "10px" }}
555497
>
556-
<label htmlFor="google-maps-widget-toggle">Enable Widget</label>
498+
<label
499+
htmlFor="google-maps-widget-toggle"
500+
title="Include the widget context token in the response."
501+
>
502+
Enable Widget
503+
</label>
557504
<label className={styles.switch}>
558505
<input
559506
type="checkbox"
@@ -573,7 +520,7 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
573520
className={`${styles.controlGroup} ${!isGroundingWithGoogleMapsActive ? styles.disabledText : ""}`}
574521
style={{ paddingLeft: "10px", marginTop: "10px", marginBottom: 0 }}
575522
>
576-
<label>Location Context</label>
523+
<label>Location Context (optional)</label>
577524
<div style={{ display: "flex", gap: "10px" }}>
578525
<input
579526
type="number"
@@ -602,6 +549,64 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
602549
</div>
603550
)}
604551
</div>
552+
<div className={styles.groupContainer}>
553+
<div
554+
className={`${styles.toggleGroup} ${isStructuredOutputActive || isFunctionCallingActive
555+
? styles.disabledText
556+
: ""
557+
}`}
558+
>
559+
<label htmlFor="google-search-toggle">
560+
Grounding with Google Search
561+
</label>
562+
<label className={styles.switch}>
563+
<input
564+
type="checkbox"
565+
id="google-search-toggle"
566+
name="google-search-toggle"
567+
checked={isGroundingWithGoogleSearchActive}
568+
onChange={handleToggleChange}
569+
disabled={
570+
isStructuredOutputActive || isFunctionCallingActive
571+
}
572+
/>
573+
<span
574+
className={`${styles.slider} ${isStructuredOutputActive ||
575+
isFunctionCallingActive ||
576+
isGroundingWithGoogleMapsActive
577+
? styles.disabled
578+
: ""
579+
}`}
580+
></span>
581+
</label>
582+
</div>
583+
</div>
584+
<div className={styles.groupContainer}>
585+
<div
586+
className={`${styles.toggleGroup} ${isFunctionCallingActive ? styles.disabledText : ""}`}
587+
>
588+
<label htmlFor="structured-output-toggle">
589+
Structured output (JSON)
590+
</label>
591+
<label className={styles.switch}>
592+
<input
593+
type="checkbox"
594+
id="structured-output-toggle"
595+
name="structured-output-toggle"
596+
checked={isStructuredOutputActive}
597+
onChange={handleToggleChange}
598+
disabled={
599+
isFunctionCallingActive ||
600+
isGroundingWithGoogleSearchActive ||
601+
isGroundingWithGoogleMapsActive
602+
}
603+
/>
604+
<span
605+
className={`${styles.slider} ${isFunctionCallingActive || isGroundingWithGoogleSearchActive || isGroundingWithGoogleMapsActive ? styles.disabled : ""}`}
606+
></span>
607+
</label>
608+
</div>
609+
</div>
605610
</div>
606611
</>
607612
)}

0 commit comments

Comments
 (0)