Feat: Add note node #3221 (#8728)

### What problem does this PR solve?

Feat: Add note node #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-08 19:18:55 +08:00
committed by GitHub
parent 2a03d49a84
commit 3fe143d84a
17 changed files with 414 additions and 407 deletions

View File

@ -85,6 +85,10 @@ function findInputFromList(eventList: IEventList) {
};
}
export function getLatestError(eventList: IEventList) {
return get(eventList.at(-1), 'data.outputs._ERROR');
}
const useGetBeginNodePrologue = () => {
const getNode = useGraphStore((state) => state.getNode);
@ -159,7 +163,7 @@ export const useSendNextMessage = () => {
const inputAnswer = findInputFromList(answerList);
if (answerList.length > 0) {
addNewestOneAnswer({
answer: content,
answer: content || getLatestError(answerList),
id: id,
...inputAnswer,
});