fix: empty tooltip on attachment icon, also fix z-index (#4290)
This commit is contained in:
parent
643c7276b5
commit
ffdea36b18
@ -71,7 +71,6 @@ const ModelItemHeader = ({ model, onClick, open }: Props) => {
|
|||||||
|
|
||||||
let downloadButton = (
|
let downloadButton = (
|
||||||
<Button
|
<Button
|
||||||
className="z-50"
|
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
onDownloadClick()
|
onDownloadClick()
|
||||||
|
|||||||
@ -100,9 +100,9 @@ const ChatInput = () => {
|
|||||||
stopInference()
|
stopInference()
|
||||||
}
|
}
|
||||||
|
|
||||||
const isModelSupportRagAndTools =
|
const isModelSupportRagAndTools = isLocalEngine(
|
||||||
selectedModel?.engine === InferenceEngine.openai ||
|
selectedModel?.engine as InferenceEngine
|
||||||
isLocalEngine(selectedModel?.engine as InferenceEngine)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the change event of the extension file input element by setting the file name state.
|
* Handles the change event of the extension file input element by setting the file name state.
|
||||||
@ -188,7 +188,7 @@ const ChatInput = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
disabled={
|
disabled={
|
||||||
isModelSupportRagAndTools &&
|
!isModelSupportRagAndTools &&
|
||||||
activeAssistant?.tools &&
|
activeAssistant?.tools &&
|
||||||
activeAssistant?.tools[0]?.enabled
|
activeAssistant?.tools[0]?.enabled
|
||||||
}
|
}
|
||||||
@ -237,7 +237,8 @@ const ChatInput = () => {
|
|||||||
<li
|
<li
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'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))]',
|
'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))]',
|
||||||
activeAssistant?.model.settings?.vision_model
|
activeAssistant?.model.settings?.vision_model ||
|
||||||
|
isModelSupportRagAndTools
|
||||||
? 'cursor-pointer'
|
? 'cursor-pointer'
|
||||||
: 'cursor-not-allowed opacity-50'
|
: 'cursor-not-allowed opacity-50'
|
||||||
)}
|
)}
|
||||||
@ -261,11 +262,15 @@ const ChatInput = () => {
|
|||||||
<li
|
<li
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'text-[hsla(var(--text-secondary)] hover:bg-secondary flex w-full cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]',
|
'text-[hsla(var(--text-secondary)] hover:bg-secondary flex w-full cursor-pointer items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]',
|
||||||
'cursor-pointer'
|
isModelSupportRagAndTools
|
||||||
|
? 'cursor-pointer'
|
||||||
|
: 'cursor-not-allowed opacity-50'
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (isModelSupportRagAndTools) {
|
||||||
fileInputRef.current?.click()
|
fileInputRef.current?.click()
|
||||||
setShowAttacmentMenus(false)
|
setShowAttacmentMenus(false)
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FileTextIcon size={16} />
|
<FileTextIcon size={16} />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user