mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
fix: prompt-editor
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
import { useEffect } from 'react'
|
||||
import { registerCodeHighlighting } from '@lexical/code'
|
||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||
|
||||
export default function CodeHighlightPlugin() {
|
||||
const [editor] = useLexicalComposerContext()
|
||||
|
||||
useEffect(() => {
|
||||
return registerCodeHighlighting(editor)
|
||||
}, [editor])
|
||||
|
||||
return null
|
||||
}
|
||||
@ -125,7 +125,7 @@ const ComponentPicker = ({
|
||||
anchorElementRef,
|
||||
{ selectedIndex, selectOptionAndCleanUp, setHighlightedIndex },
|
||||
) => {
|
||||
if (anchorElementRef.current && (allOptions.length || workflowVariableOptions.length)) {
|
||||
if (anchorElementRef.current && (allOptions.length || workflowVariableBlock?.show)) {
|
||||
return (
|
||||
<>
|
||||
{
|
||||
@ -224,7 +224,7 @@ const ComponentPicker = ({
|
||||
)
|
||||
}
|
||||
{
|
||||
!!workflowVariableOptions.length && (
|
||||
workflowVariableBlock?.show && (
|
||||
<>
|
||||
{
|
||||
(!!promptOptions.length || !!variableOptions.length || !!externalToolOptions.length) && (
|
||||
@ -257,8 +257,9 @@ const ComponentPicker = ({
|
||||
promptOptions,
|
||||
variableOptions,
|
||||
externalToolOptions,
|
||||
workflowVariableOptions,
|
||||
queryString,
|
||||
workflowVariableBlock?.show,
|
||||
workflowVariableOptions,
|
||||
handleSelectWorkflowVariable,
|
||||
elements,
|
||||
floatingStyles,
|
||||
|
||||
Reference in New Issue
Block a user