Fix variable typo (#8084)
This commit is contained in:
@@ -20,14 +20,14 @@ const Line = ({
|
||||
d='M0,18 L24,18'
|
||||
strokeWidth={1}
|
||||
fill='none'
|
||||
className='stroke-divider-soild'
|
||||
className='stroke-divider-solid'
|
||||
/>
|
||||
<rect
|
||||
x={0}
|
||||
y={16}
|
||||
width={1}
|
||||
height={4}
|
||||
className='fill-divider-soild-alt'
|
||||
className='fill-divider-solid-alt'
|
||||
/>
|
||||
</>
|
||||
)
|
||||
@@ -38,7 +38,7 @@ const Line = ({
|
||||
d={`M0,18 Q12,18 12,28 L12,${index * 48 + 18 - 10} Q12,${index * 48 + 18} 24,${index * 48 + 18}`}
|
||||
strokeWidth={1}
|
||||
fill='none'
|
||||
className='stroke-divider-soild'
|
||||
className='stroke-divider-solid'
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -47,7 +47,7 @@ const Line = ({
|
||||
y={index * 48 + 18 - 2}
|
||||
width={1}
|
||||
height={4}
|
||||
className='fill-divider-soild-alt'
|
||||
className='fill-divider-solid-alt'
|
||||
/>
|
||||
</g>
|
||||
))
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
useState,
|
||||
} from 'react'
|
||||
|
||||
export type UseResizePanelPrarams = {
|
||||
export type UseResizePanelParams = {
|
||||
direction?: 'horizontal' | 'vertical' | 'both'
|
||||
triggerDirection?: 'top' | 'right' | 'bottom' | 'left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
||||
minWidth?: number
|
||||
@@ -15,7 +15,7 @@ export type UseResizePanelPrarams = {
|
||||
onResized?: (width: number, height: number) => void
|
||||
onResize?: (width: number, height: number) => void
|
||||
}
|
||||
export const useResizePanel = (params?: UseResizePanelPrarams) => {
|
||||
export const useResizePanel = (params?: UseResizePanelParams) => {
|
||||
const {
|
||||
direction = 'both',
|
||||
triggerDirection = 'bottom-right',
|
||||
|
||||
@@ -44,7 +44,7 @@ const nodeDefault: NodeDefault<LLMNodeType> = {
|
||||
|
||||
if (!errorMessages && !payload.memory) {
|
||||
const isChatModel = payload.model.mode === 'chat'
|
||||
const isPromptyEmpty = isChatModel
|
||||
const isPromptEmpty = isChatModel
|
||||
? !(payload.prompt_template as PromptItem[]).some((t) => {
|
||||
if (t.edition_type === EditionType.jinja2)
|
||||
return t.jinja2_text !== ''
|
||||
@@ -52,7 +52,7 @@ const nodeDefault: NodeDefault<LLMNodeType> = {
|
||||
return t.text !== ''
|
||||
})
|
||||
: ((payload.prompt_template as PromptItem).edition_type === EditionType.jinja2 ? (payload.prompt_template as PromptItem).jinja2_text === '' : (payload.prompt_template as PromptItem).text === '')
|
||||
if (isPromptyEmpty)
|
||||
if (isPromptEmpty)
|
||||
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t('workflow.nodes.llm.prompt') })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user