File tree Expand file tree Collapse file tree 2 files changed +28
-25
lines changed
web/screens/Thread/ThreadCenterPanel Expand file tree Collapse file tree 2 files changed +28
-25
lines changed Original file line number Diff line number Diff line change @@ -231,30 +231,24 @@ const ChatInput = () => {
231231 ) }
232232 >
233233 < ul >
234- < Tooltip
235- trigger = {
236- < li
237- className = { twMerge (
238- 'text-[hsla(var(--text-secondary)] hover:bg-secondary flex w-full items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]' ,
239- activeAssistant ?. model . settings ?. vision_model ||
240- isModelSupportRagAndTools
241- ? 'cursor-pointer'
242- : 'cursor-not-allowed opacity-50'
243- ) }
244- onClick = { ( ) => {
245- if ( activeAssistant ?. model . settings ?. vision_model ) {
246- imageInputRef . current ?. click ( )
247- setShowAttacmentMenus ( false )
248- }
249- } }
250- >
251- < ImageIcon size = { 16 } />
252- < span className = "font-medium" > Image</ span >
253- </ li >
254- }
255- content = "This feature only supports multimodal models."
256- disabled = { activeAssistant ?. model . settings ?. vision_model }
257- />
234+ < li
235+ className = { twMerge (
236+ 'text-[hsla(var(--text-secondary)] hover:bg-secondary flex w-full items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]' ,
237+ activeAssistant ?. model . settings ?. vision_model &&
238+ isModelSupportRagAndTools
239+ ? 'cursor-pointer'
240+ : 'cursor-not-allowed opacity-50'
241+ ) }
242+ onClick = { ( ) => {
243+ if ( activeAssistant ?. model . settings ?. vision_model ) {
244+ imageInputRef . current ?. click ( )
245+ setShowAttacmentMenus ( false )
246+ }
247+ } }
248+ >
249+ < ImageIcon size = { 16 } />
250+ < span className = "font-medium" > Image</ span >
251+ </ li >
258252 < Tooltip
259253 side = "bottom"
260254 trigger = {
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import RequestDownloadModel from './RequestDownloadModel'
3030import { showSystemMonitorPanelAtom } from '@/helpers/atoms/App.atom'
3131import { experimentalFeatureEnabledAtom } from '@/helpers/atoms/AppConfig.atom'
3232import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom'
33+ import { chatWidthAtom } from '@/helpers/atoms/Setting.atom'
3334import { activeThreadAtom } from '@/helpers/atoms/Thread.atom'
3435
3536import {
@@ -59,6 +60,7 @@ const ThreadCenterPanel = () => {
5960 const experimentalFeature = useAtomValue ( experimentalFeatureEnabledAtom )
6061 const activeThread = useAtomValue ( activeThreadAtom )
6162 const activeAssistant = useAtomValue ( activeAssistantAtom )
63+ const chatWidth = useAtomValue ( chatWidthAtom )
6264 const upload = uploader ( )
6365 const acceptedFormat : Accept = activeAssistant ?. model . settings ?. vision_model
6466 ? {
@@ -235,7 +237,14 @@ const ThreadCenterPanel = () => {
235237 { reloadModel && < ModelReload /> }
236238
237239 { activeModel && isGeneratingResponse && < GenerateResponse /> }
238- < ChatInput />
240+ < div
241+ className = { twMerge (
242+ 'mx-auto w-full' ,
243+ chatWidth === 'compact' && 'max-w-[700px]'
244+ ) }
245+ >
246+ < ChatInput />
247+ </ div >
239248 </ div >
240249 </ div >
241250 </ CenterPanelContainer >
You can’t perform that action at this time.
0 commit comments