Fix: add codeexec attachments output (#14787)

### What problem does this PR solve?

add codeexec attachments output

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
buua436
2026-05-11 19:16:33 +08:00
committed by GitHub
parent 39ee2fb120
commit daf8a58c4b
5 changed files with 37 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import { CodeOutputContract } from '../../form/code-form/utils';
const SYSTEM_OUTPUT_NAMES = new Set([
'_ERROR',
'_ARTIFACTS',
'attachments',
'_ATTACHMENT_CONTENT',
]);

View File

@@ -14,6 +14,7 @@ const CodeExecReservedOutputKeys = [
'content',
'actual_type',
'raw_result',
'attachments',
'_ERROR',
'_ARTIFACTS',
'_ATTACHMENT_CONTENT',
@@ -30,6 +31,10 @@ export const CodeExecPanelSystemOutputs: ICodeForm['outputs'] = {
type: 'String',
value: '',
},
attachments: {
type: 'Array<String>',
value: [],
},
};
const CodeExecReservedOutputKeySet = new Set<string>(

View File

@@ -73,6 +73,10 @@ function getNodeOutputs(x: BaseNode) {
type: JsonSchemaDataType.String,
value: '',
},
attachments: outputs.attachments ?? {
type: 'Array<String>',
value: [],
},
};
}