@@ -316,89 +316,93 @@ export const HistorySidebar = React.memo(
316
316
) }
317
317
</ div >
318
318
) }
319
- < Projects />
320
- < div className = "h-full relative overflow-x-hidden overflow-y-auto" >
321
- < div className = "flex px-4 font-normal text-sm gap-x-2 leading-normal text-text-500/80 dark:text-[#D4D4D4] items-center font-normal leading-normal" >
322
- Assistants
323
- </ div >
324
- < DndContext
325
- sensors = { sensors }
326
- collisionDetection = { closestCenter }
327
- onDragEnd = { handleDragEnd }
328
- modifiers = { [ restrictToVerticalAxis ] }
329
- >
330
- < SortableContext
331
- items = { pinnedAssistants . map ( ( a ) =>
332
- a . id === 0 ? "assistant-0" : a . id
333
- ) }
334
- strategy = { verticalListSortingStrategy }
319
+
320
+ < div className = "h-full relative overflow-x-hidden overflow-y-auto flex flex-col gap-y-2" >
321
+ < div >
322
+ < div className = "flex px-4 font-normal text-sm gap-x-2 leading-normal text-text-500/80 dark:text-[#D4D4D4] items-center font-normal leading-normal" >
323
+ Assistants
324
+ </ div >
325
+ < DndContext
326
+ sensors = { sensors }
327
+ collisionDetection = { closestCenter }
328
+ onDragEnd = { handleDragEnd }
329
+ modifiers = { [ restrictToVerticalAxis ] }
335
330
>
336
- < div className = "flex px-0 mr-4 flex-col gap-y-1 mt-1" >
337
- { pinnedAssistants . map (
338
- ( assistant : MinimalPersonaSnapshot ) => (
339
- < SortableAssistant
340
- key = {
341
- assistant . id === 0 ? "assistant-0" : assistant . id
342
- }
343
- assistant = { assistant }
344
- active = { assistant . id === liveAssistant ?. id }
345
- onClick = { ( ) => {
346
- router . push (
347
- buildChatUrl ( searchParams , null , assistant . id )
348
- ) ;
349
- } }
350
- onPinAction = { async ( e : React . MouseEvent ) => {
351
- e . stopPropagation ( ) ;
352
- await toggleAssistantPinnedStatus (
353
- pinnedAssistants . map ( ( a ) => a . id ) ,
354
- assistant . id ,
355
- false
356
- ) ;
357
- await refreshAssistants ( ) ;
358
- } }
359
- />
360
- )
331
+ < SortableContext
332
+ items = { pinnedAssistants . map ( ( a ) =>
333
+ a . id === 0 ? "assistant-0" : a . id
361
334
) }
362
- </ div >
363
- </ SortableContext >
364
- </ DndContext >
365
- { ! pinnedAssistants . some ( ( a ) => a . id === liveAssistant ?. id ) &&
366
- liveAssistant &&
367
- // filter out the default assistant
368
- liveAssistant . id !== 0 && (
369
- < div className = "w-full mt-1 pr-4" >
370
- < SortableAssistant
371
- pinned = { false }
372
- assistant = { liveAssistant }
373
- active = { liveAssistant . id === liveAssistant ?. id }
374
- onClick = { ( ) => {
375
- router . push (
376
- buildChatUrl ( searchParams , null , liveAssistant . id )
377
- ) ;
378
- } }
379
- onPinAction = { async ( e : React . MouseEvent ) => {
380
- e . stopPropagation ( ) ;
381
- await toggleAssistantPinnedStatus (
382
- [ ...pinnedAssistants . map ( ( a ) => a . id ) ] ,
383
- liveAssistant . id ,
384
- true
385
- ) ;
386
- await refreshAssistants ( ) ;
387
- } }
388
- />
389
- </ div >
390
- ) }
335
+ strategy = { verticalListSortingStrategy }
336
+ >
337
+ < div className = "flex px-0 mr-4 flex-col gap-y-1 mt-1" >
338
+ { pinnedAssistants . map (
339
+ ( assistant : MinimalPersonaSnapshot ) => (
340
+ < SortableAssistant
341
+ key = {
342
+ assistant . id === 0 ? "assistant-0" : assistant . id
343
+ }
344
+ assistant = { assistant }
345
+ active = { assistant . id === liveAssistant ?. id }
346
+ onClick = { ( ) => {
347
+ router . push (
348
+ buildChatUrl ( searchParams , null , assistant . id )
349
+ ) ;
350
+ } }
351
+ onPinAction = { async ( e : React . MouseEvent ) => {
352
+ e . stopPropagation ( ) ;
353
+ await toggleAssistantPinnedStatus (
354
+ pinnedAssistants . map ( ( a ) => a . id ) ,
355
+ assistant . id ,
356
+ false
357
+ ) ;
358
+ await refreshAssistants ( ) ;
359
+ } }
360
+ />
361
+ )
362
+ ) }
363
+ </ div >
364
+ </ SortableContext >
365
+ </ DndContext >
366
+ { ! pinnedAssistants . some ( ( a ) => a . id === liveAssistant ?. id ) &&
367
+ liveAssistant &&
368
+ // filter out the default assistant
369
+ liveAssistant . id !== 0 && (
370
+ < div className = "w-full mt-1 pr-4" >
371
+ < SortableAssistant
372
+ pinned = { false }
373
+ assistant = { liveAssistant }
374
+ active = { liveAssistant . id === liveAssistant ?. id }
375
+ onClick = { ( ) => {
376
+ router . push (
377
+ buildChatUrl ( searchParams , null , liveAssistant . id )
378
+ ) ;
379
+ } }
380
+ onPinAction = { async ( e : React . MouseEvent ) => {
381
+ e . stopPropagation ( ) ;
382
+ await toggleAssistantPinnedStatus (
383
+ [ ...pinnedAssistants . map ( ( a ) => a . id ) ] ,
384
+ liveAssistant . id ,
385
+ true
386
+ ) ;
387
+ await refreshAssistants ( ) ;
388
+ } }
389
+ />
390
+ </ div >
391
+ ) }
391
392
392
- < div className = "w-full px-4" >
393
- < button
394
- aria-label = "Explore Assistants"
395
- onClick = { ( ) => setShowAssistantsModal ( true ) }
396
- className = "w-full cursor-pointer text-base text-black dark:text-[#D4D4D4] hover:bg-background-chat-hover flex items-center gap-x-2 py-1 px-2 rounded-md"
397
- >
398
- Explore Assistants
399
- </ button >
393
+ < div className = "w-full px-4" >
394
+ < button
395
+ aria-label = "Explore Assistants"
396
+ onClick = { ( ) => setShowAssistantsModal ( true ) }
397
+ className = "w-full cursor-pointer text-base text-black dark:text-[#D4D4D4] hover:bg-background-chat-hover flex items-center gap-x-2 py-1 px-2 rounded-md"
398
+ >
399
+ Explore Assistants
400
+ </ button >
401
+ </ div >
400
402
</ div >
401
403
404
+ < Projects />
405
+
402
406
< PagesTab
403
407
toggleChatSessionSearchModal = { toggleChatSessionSearchModal }
404
408
showDeleteModal = { showDeleteModal }
0 commit comments