Merge branch 'release/v0.2.4' into develop

# Conflicts:
#	web/src/views/Workflow/constant.ts
#	web/src/views/Workflow/hooks/useWorkflowGraph.ts
This commit is contained in:
Mark
2026-02-10 15:51:28 +08:00
66 changed files with 1772 additions and 674 deletions

View File

@@ -135,7 +135,10 @@ export const useWorkflowGraph = ({
if (nodeLibraryConfig?.config) {
Object.keys(nodeLibraryConfig.config).forEach(key => {
if (key === 'memory' && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
if (type === 'memory-write' && key === 'message' && nodeLibraryConfig.config) {
nodeLibraryConfig.config['messages'].defaultValue = [{ role: 'USER', content: config[key] }]
delete nodeLibraryConfig.config[key]
} else if (key === 'memory' && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
const { memory, messages } = config as any;
if (memory?.enable && messages && messages.length > 0) {
const lastMessage = messages[messages.length - 1]