Fix variable typo (#8084)

This commit is contained in:
Nam Vu
2024-09-08 12:14:11 +07:00
committed by GitHub
parent b1918dae5e
commit 2d7954c7da
215 changed files with 599 additions and 597 deletions

View File

@@ -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>
))

View File

@@ -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',

View File

@@ -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') })
}