From 010113eda414675799e715fa951a3a17bc980181 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 28 Nov 2023 10:23:47 +0700 Subject: [PATCH 1/2] chore: take out experimental feature and bump nitro version --- web/containers/Layout/Ribbon/index.tsx | 5 --- .../Layout/TopBar/CommandSearch/index.tsx | 3 -- web/screens/Chat/ChatBody/index.tsx | 9 +---- web/screens/Chat/ChatInstruction/index.tsx | 8 ++--- web/screens/Chat/SimpleTextMessage/index.tsx | 36 +++++++++---------- web/screens/Chat/index.tsx | 26 ++++++-------- 6 files changed, 31 insertions(+), 56 deletions(-) diff --git a/web/containers/Layout/Ribbon/index.tsx b/web/containers/Layout/Ribbon/index.tsx index 09f29ced77..6babadb9dc 100644 --- a/web/containers/Layout/Ribbon/index.tsx +++ b/web/containers/Layout/Ribbon/index.tsx @@ -20,15 +20,12 @@ import { twMerge } from 'tailwind-merge' import LogoMark from '@/containers/Brand/Logo/Mark' -import { FeatureToggleContext } from '@/context/FeatureToggle' - import { MainViewState } from '@/constants/screens' import { useMainViewState } from '@/hooks/useMainViewState' export default function RibbonNav() { const { mainViewState, setMainViewState } = useMainViewState() - const { experimentalFeatureEnabed } = useContext(FeatureToggleContext) const onMenuClick = (state: MainViewState) => { if (mainViewState === state) return @@ -49,8 +46,6 @@ export default function RibbonNav() { ] const secondaryMenus = [ - // Add menu if experimental feature - ...(experimentalFeatureEnabed ? [] : []), { name: 'Explore Models', icon: , diff --git a/web/containers/Layout/TopBar/CommandSearch/index.tsx b/web/containers/Layout/TopBar/CommandSearch/index.tsx index cd7b815d60..d5eeff3fdd 100644 --- a/web/containers/Layout/TopBar/CommandSearch/index.tsx +++ b/web/containers/Layout/TopBar/CommandSearch/index.tsx @@ -28,7 +28,6 @@ import { MainViewState } from '@/constants/screens' import { useMainViewState } from '@/hooks/useMainViewState' export default function CommandSearch() { - const { experimentalFeatureEnabed } = useContext(FeatureToggleContext) const { setMainViewState } = useMainViewState() const menus = [ @@ -44,8 +43,6 @@ export default function CommandSearch() { ), state: MainViewState.Chat, }, - // Added experimental feature here - ...(experimentalFeatureEnabed ? [] : []), { name: 'Explore Models', icon: , diff --git a/web/screens/Chat/ChatBody/index.tsx b/web/screens/Chat/ChatBody/index.tsx index c0bd74f529..b34b4fae16 100644 --- a/web/screens/Chat/ChatBody/index.tsx +++ b/web/screens/Chat/ChatBody/index.tsx @@ -1,9 +1,5 @@ -import { useContext } from 'react' - import { useAtomValue } from 'jotai' -import { FeatureToggleContext } from '@/context/FeatureToggle' - import ChatInstruction from '../ChatInstruction' import ChatItem from '../ChatItem' @@ -11,15 +7,12 @@ import { getCurrentChatMessagesAtom } from '@/helpers/atoms/ChatMessage.atom' const ChatBody: React.FC = () => { const messages = useAtomValue(getCurrentChatMessagesAtom) - const { experimentalFeatureEnabed } = useContext(FeatureToggleContext) return (
{messages.map((message) => ( ))} - {experimentalFeatureEnabed && messages.length === 0 && ( - - )} + {messages.length === 0 && }
) } diff --git a/web/screens/Chat/ChatInstruction/index.tsx b/web/screens/Chat/ChatInstruction/index.tsx index 99b2448345..bff82101e9 100644 --- a/web/screens/Chat/ChatInstruction/index.tsx +++ b/web/screens/Chat/ChatInstruction/index.tsx @@ -31,12 +31,12 @@ const ChatInstruction = () => { } return (
+

+ What does this Assistant do? How does it behave? What should it avoid + doing? +

{!isSettingInstruction && activeConvoId && ( <> -

- What does this Assistant do? How does it behave? What should it - avoid doing? -

@@ -122,12 +119,11 @@ const SimpleTextMessage: React.FC = (props) => { )}
- {experimentalFeatureEnabed && - (props.status === MessageStatus.Pending || tokenSpeed > 0) && ( -

- Token Speed: {Number(tokenSpeed).toFixed(2)}/s -

- )} + {(props.status === MessageStatus.Pending || tokenSpeed > 0) && ( +

+ Token Speed: {Number(tokenSpeed).toFixed(2)}/s +

+ )} ) } diff --git a/web/screens/Chat/index.tsx b/web/screens/Chat/index.tsx index 022e351f05..492880e00f 100644 --- a/web/screens/Chat/index.tsx +++ b/web/screens/Chat/index.tsx @@ -64,8 +64,6 @@ const ChatScreen = () => { const [isModelAvailable, setIsModelAvailable] = useState( downloadedModels.some((x) => x.id === currentConvo?.modelId) ) - const { experimentalFeatureEnabed } = useContext(FeatureToggleContext) - const textareaRef = useRef(null) const { startModel } = useActiveModel() const modelRef = useRef(activeModel) @@ -176,20 +174,16 @@ const ChatScreen = () => { Download Model )} - {experimentalFeatureEnabed && ( - cleanConvo()} - /> - )} - { - deleteConvo()} - /> - } + cleanConvo()} + /> + deleteConvo()} + /> From 9289163117fda83fb5a6b0a32815ef524b2668bd Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 27 Nov 2023 16:40:19 +0700 Subject: [PATCH 2/2] chore: update inference module to use nitro 0.1.17 --- plugins/inference-plugin/nitro/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inference-plugin/nitro/version.txt b/plugins/inference-plugin/nitro/version.txt index a34eaa5d03..44a7df273e 100644 --- a/plugins/inference-plugin/nitro/version.txt +++ b/plugins/inference-plugin/nitro/version.txt @@ -1 +1 @@ -0.1.11 \ No newline at end of file +0.1.17 \ No newline at end of file