@@ -22,7 +22,6 @@ import {
22
22
MIN_SIDEBAR_WIDTH ,
23
23
NARROW_SIDEBAR_WIDTH ,
24
24
Path ,
25
- PLUGINS ,
26
25
REPO_URL ,
27
26
} from "../constant" ;
28
27
@@ -32,6 +31,12 @@ import dynamic from "next/dynamic";
32
31
import { showConfirm , Selector } from "./ui-lib" ;
33
32
import clsx from "clsx" ;
34
33
34
+ const DISCOVERY = [
35
+ { name : Locale . Plugin . Name , path : Path . Plugins } ,
36
+ { name : "Stable Diffusion" , path : Path . Sd } ,
37
+ { name : Locale . SearchChat . Page . Title , path : Path . SearchChat } ,
38
+ ] ;
39
+
35
40
const ChatList = dynamic ( async ( ) => ( await import ( "./chat-list" ) ) . ChatList , {
36
41
loading : ( ) => null ,
37
42
} ) ;
@@ -219,7 +224,7 @@ export function SideBarTail(props: {
219
224
export function SideBar ( props : { className ?: string } ) {
220
225
useHotKey ( ) ;
221
226
const { onDragStart, shouldNarrow } = useDragSideBar ( ) ;
222
- const [ showPluginSelector , setShowPluginSelector ] = useState ( false ) ;
227
+ const [ showDiscoverySelector , setshowDiscoverySelector ] = useState ( false ) ;
223
228
const navigate = useNavigate ( ) ;
224
229
const config = useAppConfig ( ) ;
225
230
const chatStore = useChatStore ( ) ;
@@ -254,21 +259,21 @@ export function SideBar(props: { className?: string }) {
254
259
icon = { < DiscoveryIcon /> }
255
260
text = { shouldNarrow ? undefined : Locale . Discovery . Name }
256
261
className = { styles [ "sidebar-bar-button" ] }
257
- onClick = { ( ) => setShowPluginSelector ( true ) }
262
+ onClick = { ( ) => setshowDiscoverySelector ( true ) }
258
263
shadow
259
264
/>
260
265
</ div >
261
- { showPluginSelector && (
266
+ { showDiscoverySelector && (
262
267
< Selector
263
268
items = { [
264
- ...PLUGINS . map ( ( item ) => {
269
+ ...DISCOVERY . map ( ( item ) => {
265
270
return {
266
271
title : item . name ,
267
272
value : item . path ,
268
273
} ;
269
274
} ) ,
270
275
] }
271
- onClose = { ( ) => setShowPluginSelector ( false ) }
276
+ onClose = { ( ) => setshowDiscoverySelector ( false ) }
272
277
onSelection = { ( s ) => {
273
278
navigate ( s [ 0 ] , { state : { fromHome : true } } ) ;
274
279
} }
0 commit comments