diff --git a/uikit/src/select/index.tsx b/uikit/src/select/index.tsx index e31e28f89..7f60f301c 100644 --- a/uikit/src/select/index.tsx +++ b/uikit/src/select/index.tsx @@ -17,6 +17,8 @@ const SelectGroup = SelectPrimitive.Group const SelectValue = SelectPrimitive.Value +const SelectPortal = SelectPrimitive.Portal + const SelectTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -129,6 +131,7 @@ export { Select, SelectGroup, SelectValue, + SelectPortal, SelectTrigger, SelectContent, SelectLabel, diff --git a/web/containers/DropdownListSidebar/index.tsx b/web/containers/DropdownListSidebar/index.tsx index cfc73be59..3786037cb 100644 --- a/web/containers/DropdownListSidebar/index.tsx +++ b/web/containers/DropdownListSidebar/index.tsx @@ -6,6 +6,7 @@ import { Select, SelectContent, SelectGroup, + SelectPortal, SelectItem, SelectTrigger, SelectValue, @@ -66,6 +67,7 @@ export default function DropdownListSidebar() { }, []) const { recommendedModel, downloadedModels } = useRecommendedModel() + const [first, setfirst] = useState(false) const selectedName = downloadedModels.filter((x) => x.id === selectedModel?.id)[0]?.name ?? '' @@ -147,20 +149,18 @@ export default function DropdownListSidebar() { return ( <> {selectedName} - -
- - Local -
-
- {downloadedModels.length === 0 ? ( -
-

{`Oops, you don't have a model yet.`}

+ + +
+ + Local
) : ( @@ -181,26 +181,67 @@ export default function DropdownListSidebar() { {x.engine == InferenceEngine.nitro && ( )} +
+ {downloadedModels.length === 0 ? ( +
+

{`Oops, you don't have a model yet.`}

+
+ ) : ( + + {downloadedModels.map((x, i) => ( + +
+ {x.name} +
+ + {toGibibytes(x.metadata.size)} + + {x.engine == InferenceEngine.nitro && + getLabel(x.metadata.size)} +
-
- - ))} -
- )} -
-
- -
- + + ))} + + )} +
+
+ +
+ + + {selected?.engine === InferenceEngine.openai && ( +
+ + { + saveOpenAISettings({ apiKey: e.target.value }) + }} + /> +
+ )} +
) } diff --git a/web/screens/LocalServer/Logs.tsx b/web/screens/LocalServer/Logs.tsx index 5354246be..afc8a7366 100644 --- a/web/screens/LocalServer/Logs.tsx +++ b/web/screens/LocalServer/Logs.tsx @@ -47,7 +47,7 @@ const Logs = () => { r="55.9425" fill="#E7E7E7" stroke="white" - stroke-width="3.1151" + strokeWidth="3.1151" /> { y2="114.947" gradientUnits="userSpaceOnUse" > - - + + { y2="88.9801" gradientUnits="userSpaceOnUse" > - - + + diff --git a/web/screens/LocalServer/index.tsx b/web/screens/LocalServer/index.tsx index 81e35eb45..fbde6b7f0 100644 --- a/web/screens/LocalServer/index.tsx +++ b/web/screens/LocalServer/index.tsx @@ -1,6 +1,6 @@ 'use client' -import React, { useState } from 'react' +import React, { useEffect, useState } from 'react' import { Button, @@ -70,6 +70,18 @@ const LocalServerScreen = () => { const [host, setHost] = useAtom(hostAtom) const [port, setPort] = useAtom(portAtom) + const FIRST_TIME_VISIT_API_SERVER = 'firstTimeVisitAPIServer' + + const [firstTimeVisitAPIServer, setFirstTimeVisitAPIServer] = + useState(false) + + useEffect(() => { + if (localStorage.getItem(FIRST_TIME_VISIT_API_SERVER) === null) { + localStorage.setItem(FIRST_TIME_VISIT_API_SERVER, 'true') + setFirstTimeVisitAPIServer(true) + } + }, []) + return (
{/* Left SideBar */} @@ -213,13 +225,13 @@ const LocalServerScreen = () => { {/* Middle Bar */}
-
+

Server Logs

- + {firstTimeVisitAPIServer ? ( +
+
+
+ + + + +
+
+ You cannot chat with your assistant while the server is + running. +
+ +
+
+
+
+ ) : ( + + )}
{/* Right bar */}