feat: LLM node to only show generation output var when computer use is

enabled, matching the actual output structure.
This commit is contained in:
zhsama
2026-02-09 23:40:42 +08:00
parent a71f336ee0
commit 41b218f427
12 changed files with 222 additions and 95 deletions

View File

@ -410,28 +410,30 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
)}
>
<>
<VarItem
name="generation"
type="object"
description={t(`${i18nPrefix}.outputVars.generation`, { ns: 'workflow' })}
subItems={[
{
name: 'content',
type: 'string',
description: '',
},
{
name: 'reasoning_content',
type: 'array[string]',
description: '',
},
{
name: 'tool_calls',
type: 'array[object]',
description: '',
},
]}
/>
{!!inputs.computer_use && (
<VarItem
name="generation"
type="object"
description={t(`${i18nPrefix}.outputVars.generation`, { ns: 'workflow' })}
subItems={[
{
name: 'content',
type: 'string',
description: '',
},
{
name: 'reasoning_content',
type: 'array[string]',
description: '',
},
{
name: 'tool_calls',
type: 'array[object]',
description: '',
},
]}
/>
)}
<VarItem
name="text"
type="string"