chore: bumb nitro version (#740)
* chore: take out experimental feature and bump nitro version * chore: update inference module to use nitro 0.1.17
This commit is contained in:
parent
9bf39cb406
commit
0ffc81e0f8
@ -1 +1 @@
|
||||
0.1.11
|
||||
0.1.17
|
||||
@ -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: <CpuIcon size={20} className="flex-shrink-0" />,
|
||||
|
||||
@ -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: <CpuIcon size={16} className="mr-3 text-muted-foreground" />,
|
||||
|
||||
@ -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 (
|
||||
<div className="flex h-full w-full flex-col-reverse overflow-y-auto">
|
||||
{messages.map((message) => (
|
||||
<ChatItem {...message} key={message.id} />
|
||||
))}
|
||||
{experimentalFeatureEnabed && messages.length === 0 && (
|
||||
<ChatInstruction />
|
||||
)}
|
||||
{messages.length === 0 && <ChatInstruction />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -31,12 +31,12 @@ const ChatInstruction = () => {
|
||||
}
|
||||
return (
|
||||
<div className="mx-auto mb-20 flex flex-col space-y-2">
|
||||
<p>
|
||||
What does this Assistant do? How does it behave? What should it avoid
|
||||
doing?
|
||||
</p>
|
||||
{!isSettingInstruction && activeConvoId && (
|
||||
<>
|
||||
<p>
|
||||
What does this Assistant do? How does it behave? What should it
|
||||
avoid doing?
|
||||
</p>
|
||||
<Button
|
||||
themes={'outline'}
|
||||
className="w-32"
|
||||
|
||||
@ -50,7 +50,6 @@ const marked = new Marked(
|
||||
)
|
||||
|
||||
const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
||||
const parsedText = marked.parse(props.content ?? '')
|
||||
const isUser = props.role === ChatCompletionRole.User
|
||||
const isSystem = props.role === ChatCompletionRole.System
|
||||
@ -61,7 +60,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
||||
|
||||
useEffect(() => {
|
||||
if (props.status === MessageStatus.Ready || !experimentalFeatureEnabed) {
|
||||
if (props.status === MessageStatus.Ready) {
|
||||
return
|
||||
}
|
||||
const currentTimestamp = new Date().getTime() // Get current time in milliseconds
|
||||
@ -91,7 +90,6 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
{!isUser && !isSystem && <LogoMark width={20} />}
|
||||
<div className="text-sm font-extrabold capitalize">{props.role}</div>
|
||||
<p className="text-xs font-medium">{displayDate(props.createdAt)}</p>
|
||||
{experimentalFeatureEnabed && (
|
||||
<div
|
||||
className={twMerge(
|
||||
'absolute right-0 cursor-pointer transition-all',
|
||||
@ -102,7 +100,6 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
>
|
||||
<MessageToolbar message={props} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={twMerge('w-full')}>
|
||||
@ -122,8 +119,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{experimentalFeatureEnabed &&
|
||||
(props.status === MessageStatus.Pending || tokenSpeed > 0) && (
|
||||
{(props.status === MessageStatus.Pending || tokenSpeed > 0) && (
|
||||
<p className="mt-2 text-xs font-medium text-foreground">
|
||||
Token Speed: {Number(tokenSpeed).toFixed(2)}/s
|
||||
</p>
|
||||
|
||||
@ -64,8 +64,6 @@ const ChatScreen = () => {
|
||||
const [isModelAvailable, setIsModelAvailable] = useState(
|
||||
downloadedModels.some((x) => x.id === currentConvo?.modelId)
|
||||
)
|
||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
||||
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
||||
const { startModel } = useActiveModel()
|
||||
const modelRef = useRef(activeModel)
|
||||
@ -176,20 +174,16 @@ const ChatScreen = () => {
|
||||
Download Model
|
||||
</Button>
|
||||
)}
|
||||
{experimentalFeatureEnabed && (
|
||||
<Paintbrush
|
||||
size={16}
|
||||
className="cursor-pointer text-muted-foreground"
|
||||
onClick={() => cleanConvo()}
|
||||
/>
|
||||
)}
|
||||
{
|
||||
<Trash2Icon
|
||||
size={16}
|
||||
className="cursor-pointer text-muted-foreground"
|
||||
onClick={() => deleteConvo()}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user