wu981526092 commited on
Commit
444bbd2
·
1 Parent(s): 08cb761

� Fix SelectGroup error - Assistant Studio now works properly

Browse files

❌ Fixed Error:
- **SelectLabel must be used within SelectGroup** - React component structure error
- Wrapped all SelectLabel components in proper SelectGroup containers

�️ Technical Fix:
- **My Assistants Section**: Now properly grouped with SelectGroup wrapper
- **Templates Section**: Wrapped in SelectGroup for correct component hierarchy
- **Model Selection**: Already correctly structured (API/Local groups)
- **Shadcn UI Compliance**: All Select components follow proper nesting structure

✅ Result: Assistant Studio dropdown now works without console errors and loads properly!

frontend/src/pages/Playground.tsx CHANGED
@@ -730,7 +730,7 @@ function AssistantSelector({
730
  <SelectContent>
731
  {/* My Assistants Section */}
732
  {savedAssistants.length > 0 && (
733
- <>
734
  <SelectLabel className="flex items-center gap-2 text-sm font-medium">
735
  <User className="h-4 w-4" />
736
  My Assistants ({savedAssistants.length})
@@ -744,13 +744,12 @@ function AssistantSelector({
744
  </div>
745
  </SelectItem>
746
  ))}
747
- </>
748
  )}
749
 
750
  {/* Templates Section */}
751
  {presets.length > 0 && (
752
- <>
753
- {savedAssistants.length > 0 && <div className="border-t my-2" />}
754
  <SelectLabel className="flex items-center gap-2 text-sm font-medium">
755
  <Bookmark className="h-4 w-4" />
756
  Templates ({presets.length})
@@ -764,7 +763,7 @@ function AssistantSelector({
764
  </div>
765
  </SelectItem>
766
  ))}
767
- </>
768
  )}
769
 
770
  {/* Empty State */}
 
730
  <SelectContent>
731
  {/* My Assistants Section */}
732
  {savedAssistants.length > 0 && (
733
+ <SelectGroup>
734
  <SelectLabel className="flex items-center gap-2 text-sm font-medium">
735
  <User className="h-4 w-4" />
736
  My Assistants ({savedAssistants.length})
 
744
  </div>
745
  </SelectItem>
746
  ))}
747
+ </SelectGroup>
748
  )}
749
 
750
  {/* Templates Section */}
751
  {presets.length > 0 && (
752
+ <SelectGroup>
 
753
  <SelectLabel className="flex items-center gap-2 text-sm font-medium">
754
  <Bookmark className="h-4 w-4" />
755
  Templates ({presets.length})
 
763
  </div>
764
  </SelectItem>
765
  ))}
766
+ </SelectGroup>
767
  )}
768
 
769
  {/* Empty State */}
static/assets/index-df7499e5.js ADDED
The diff for this file is too large to render. See raw diff
 
static/assets/index-df7499e5.js.map ADDED
The diff for this file is too large to render. See raw diff
 
static/index.html CHANGED
@@ -5,8 +5,8 @@
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Edge LLM</title>
8
- <script type="module" crossorigin src="/assets/index-69eb6ad3.js"></script>
9
- <link rel="stylesheet" href="/assets/index-f2bb8c65.css">
10
  </head>
11
  <body>
12
  <div id="root"></div>
 
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Edge LLM</title>
8
+ <script type="module" crossorigin src="/assets/index-df7499e5.js"></script>
9
+ <link rel="stylesheet" href="/assets/index-dc91355e.css">
10
  </head>
11
  <body>
12
  <div id="root"></div>