mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-05 10:58:34 +08:00
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:
@@ -4,6 +4,7 @@ import { CodeOutputContract } from '../../form/code-form/utils';
|
||||
const SYSTEM_OUTPUT_NAMES = new Set([
|
||||
'_ERROR',
|
||||
'_ARTIFACTS',
|
||||
'attachments',
|
||||
'_ATTACHMENT_CONTENT',
|
||||
]);
|
||||
|
||||
|
||||
@@ -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>(
|
||||
|
||||
@@ -73,6 +73,10 @@ function getNodeOutputs(x: BaseNode) {
|
||||
type: JsonSchemaDataType.String,
|
||||
value: '',
|
||||
},
|
||||
attachments: outputs.attachments ?? {
|
||||
type: 'Array<String>',
|
||||
value: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user