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

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-06 21:10:56
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-06 21:10:56
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-10 12:17:41
*/
/**
* Workflow Chat Component
@@ -99,6 +99,8 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
setChatList([])
setVariables([])
setConversationId(null)
setMessage(undefined)
setFileList([])
}
/**
* Opens the variable configuration modal
@@ -148,7 +150,7 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
return
}
// setLoading(true)
setLoading(true)
const message = msg
setChatList(prev => [...prev, {
role: 'user',
@@ -284,6 +286,7 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
return newList
})
setStreamLoading(false)
setLoading(false)
break
}

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 15:39:59
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-05 14:21:45
* @Last Modified time: 2026-02-09 19:56:42
*/
import { type FC, useEffect, useState, useMemo } from "react";
import clsx from 'clsx'
@@ -491,7 +491,7 @@ const Properties: FC<PropertiesProps> = ({
if (config.type === 'messageEditor') {
return (
<Form.Item key={key} name={key}>
<Form.Item key={key} name={key} label={selectedNode?.data?.type === 'memory-write' ? t(`workflow.config.${selectedNode?.data?.type}.${key}`) : undefined }>
<MessageEditor
title={t(`workflow.config.${selectedNode?.data?.type}.${key}`)}
isArray={!!config.isArray}

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 15:06:18
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-09 17:48:46
* @Last Modified time: 2026-02-09 20:08:03
*/
import LoopNode from './components/Nodes/LoopNode';
import NormalNode from './components/Nodes/NormalNode';
@@ -242,6 +242,12 @@ export const nodeLibrary: NodeLibrary[] = [
type: 'editor',
isArray: false
},
messages: {
type: 'messageEditor',
defaultValue: [],
placeholder: 'workflow.config.llm.messagesPlaceholder',
isArray: true
},
config_id: {
type: 'customSelect',
url: memoryConfigListUrl,

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]