refactor(web): remove LLM reasoning format config and clean up locale strings

This commit is contained in:
zhsama
2026-02-09 23:57:27 +08:00
parent 9614fe8e6e
commit fff2c11d9c
26 changed files with 0 additions and 147 deletions

View File

@ -1,40 +0,0 @@
import type { FC } from 'react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import Switch from '@/app/components/base/switch'
import Field from '@/app/components/workflow/nodes/_base/components/field'
type ReasoningFormatConfigProps = {
value?: 'tagged' | 'separated'
onChange: (value: 'tagged' | 'separated') => void
readonly?: boolean
}
const ReasoningFormatConfig: FC<ReasoningFormatConfigProps> = ({
value = 'tagged',
onChange,
readonly = false,
}) => {
const { t } = useTranslation()
return (
<Field
title={t('nodes.llm.reasoningFormat.title', { ns: 'workflow' })}
tooltip={t('nodes.llm.reasoningFormat.tooltip', { ns: 'workflow' })}
operations={(
// ON = separated, OFF = tagged
<Switch
defaultValue={value === 'separated'}
onChange={enabled => onChange(enabled ? 'separated' : 'tagged')}
size="md"
disabled={readonly}
key={value}
/>
)}
>
<div />
</Field>
)
}
export default ReasoningFormatConfig

View File

@ -23,7 +23,6 @@ import MemoryConfig from '../_base/components/memory-config'
import VarReferencePicker from '../_base/components/variable/var-reference-picker'
import ComputerUseConfig from './components/computer-use-config'
import ConfigPrompt from './components/config-prompt'
import ReasoningFormatConfig from './components/reasoning-format-config'
import StructureOutput from './components/structure-output'
import Tools from './components/tools'
import MaxIterations from './components/tools/max-iterations'
@ -72,7 +71,6 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
handleStructureOutputEnableChange,
handleStructureOutputChange,
filterJinja2InputVar,
handleReasoningFormatChange,
isSupportSandbox,
handleComputerUseChange,
} = useConfig(id, data)
@ -335,13 +333,6 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
value={inputs.max_iterations}
onChange={handleMaxIterationsChange}
/>
{/* Reasoning Format */}
<ReasoningFormatConfig
value={inputs.reasoning_format || 'tagged'}
onChange={handleReasoningFormatChange}
readonly={readOnly}
/>
</div>
</FieldCollapse>

View File

@ -38,7 +38,6 @@ export type LLMNodeType = CommonNodeType & {
}
structured_output_enabled?: boolean
structured_output?: StructuredOutput
reasoning_format?: 'tagged' | 'separated'
tools?: ToolValue[]
tool_settings?: ToolSetting[]
max_iterations?: number

View File

@ -362,14 +362,6 @@ const useConfig = (id: string, payload: LLMNodeType) => {
return [VarType.arrayObject, VarType.array, VarType.number, VarType.string, VarType.secret, VarType.arrayString, VarType.arrayNumber, VarType.file, VarType.arrayFile].includes(varPayload.type)
}, [])
// reasoning format
const handleReasoningFormatChange = useCallback((reasoningFormat: 'tagged' | 'separated') => {
const newInputs = produce(inputRef.current, (draft) => {
draft.reasoning_format = reasoningFormat
})
setInputs(newInputs)
}, [setInputs])
const {
availableVars,
availableNodesWithParent,
@ -411,7 +403,6 @@ const useConfig = (id: string, payload: LLMNodeType) => {
setStructuredOutputCollapsed,
handleStructureOutputEnableChange,
filterJinja2InputVar,
handleReasoningFormatChange,
isSupportSandbox,
handleComputerUseChange,
}