lint: fix issue of no-unused-vars (#23375)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { AnswerNodeType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: AnswerNodeType) => {
|
||||
export const checkNodeValid = (_payload: AnswerNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AssignerNodeType } from './types'
|
||||
import { AssignerNodeInputType, WriteMode } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: AssignerNodeType) => {
|
||||
export const checkNodeValid = (_payload: AssignerNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EndNodeType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: EndNodeType) => {
|
||||
export const checkNodeValid = (_payload: EndNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ const ConditionItem = ({
|
||||
onRemoveCondition?.(caseId, condition.id)
|
||||
}, [caseId, condition, conditionId, isSubVariableKey, onRemoveCondition, onRemoveSubVariableCondition])
|
||||
|
||||
const handleVarChange = useCallback((valueSelector: ValueSelector, varItem: Var) => {
|
||||
const handleVarChange = useCallback((valueSelector: ValueSelector, _varItem: Var) => {
|
||||
const resolvedVarType = getVarType({
|
||||
valueSelector,
|
||||
availableNodes,
|
||||
|
||||
@@ -82,7 +82,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
|
||||
Toast.notify({ type: 'warning', message: `${t('common.modelProvider.parametersInvalidRemoved')}: ${keys.map(k => `${k} (${removedDetails[k]})`).join(', ')}` })
|
||||
handleCompletionParamsChange(filtered)
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
Toast.notify({ type: 'error', message: t('common.error') })
|
||||
handleCompletionParamsChange({})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Validator } from 'jsonschema'
|
||||
import produce from 'immer'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const checkNodeValid = (payload: LLMNodeType) => {
|
||||
export const checkNodeValid = (_payload: LLMNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ const validator = new Validator()
|
||||
|
||||
export const validateSchemaAgainstDraft7 = (schemaToValidate: any) => {
|
||||
const schema = produce(schemaToValidate, (draft: any) => {
|
||||
// Make sure the schema has the $schema property for draft-07
|
||||
// Make sure the schema has the $schema property for draft-07
|
||||
if (!draft.$schema)
|
||||
draft.$schema = 'http://json-schema.org/draft-07/schema#'
|
||||
})
|
||||
|
||||
@@ -6,7 +6,6 @@ import produce from 'immer'
|
||||
import { v4 as uuid4 } from 'uuid'
|
||||
import {
|
||||
useIsChatMode,
|
||||
useIsNodeInLoop,
|
||||
useNodesReadOnly,
|
||||
useWorkflow,
|
||||
} from '../../hooks'
|
||||
@@ -20,10 +19,8 @@ import type { HandleAddCondition, HandleAddSubVariableCondition, HandleRemoveCon
|
||||
import useIsVarFileAttribute from './use-is-var-file-attribute'
|
||||
import { useStore } from '@/app/components/workflow/store'
|
||||
|
||||
const DELIMITER = '@@@@@'
|
||||
const useConfig = (id: string, payload: LoopNodeType) => {
|
||||
const { nodesReadOnly: readOnly } = useNodesReadOnly()
|
||||
const { isNodeInLoop } = useIsNodeInLoop(id)
|
||||
const isChatMode = useIsChatMode()
|
||||
const conversationVariables = useStore(s => s.conversationVariables)
|
||||
|
||||
@@ -39,10 +36,8 @@ const useConfig = (id: string, payload: LoopNodeType) => {
|
||||
}, [])
|
||||
|
||||
// output
|
||||
const { getLoopNodeChildren, getBeforeNodesInSameBranch } = useWorkflow()
|
||||
const beforeNodes = getBeforeNodesInSameBranch(id)
|
||||
const { getLoopNodeChildren } = useWorkflow()
|
||||
const loopChildrenNodes = [{ id, data: payload } as any, ...getLoopNodeChildren(id)]
|
||||
const canChooseVarNodes = [...beforeNodes, ...loopChildrenNodes]
|
||||
const childrenNodeVars = toNodeOutputVars(loopChildrenNodes, isChatMode, undefined, [], conversationVariables)
|
||||
|
||||
const {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { StartNodeType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: StartNodeType) => {
|
||||
export const checkNodeValid = (_payload: StartNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { TemplateTransformNodeType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: TemplateTransformNodeType) => {
|
||||
export const checkNodeValid = (_payload: TemplateTransformNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ToolNodeType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: ToolNodeType) => {
|
||||
export const checkNodeValid = (_payload: ToolNodeType) => {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user