mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 20:20:08 +08:00
fix(formModal/index.tsx): update updateLastMessage function to include prompt value when data.type is "end"
fix(formModal/index.tsx): update template.current value when data.type is "prompt" and data.prompt is provided fix(formModal/index.tsx): remove unnecessary updateLastMessage call when data.type is "stream" and isStream is true
This commit is contained in:
@ -261,7 +261,11 @@ export default function FormModal({
|
||||
}
|
||||
if (data.type === "end") {
|
||||
if (data.message) {
|
||||
updateLastMessage({ str: data.message, end: true });
|
||||
updateLastMessage({
|
||||
str: data.message,
|
||||
end: true,
|
||||
prompt: template.current,
|
||||
});
|
||||
}
|
||||
if (data.intermediate_steps) {
|
||||
updateLastMessage({
|
||||
@ -276,19 +280,14 @@ export default function FormModal({
|
||||
files: data.files,
|
||||
});
|
||||
}
|
||||
if (data.type === "prompt" && data.prompt) {
|
||||
template.current = data.prompt;
|
||||
}
|
||||
|
||||
setLockChat(false);
|
||||
isStream = false;
|
||||
}
|
||||
if (data.type == "prompt" && data.prompt) {
|
||||
template.current = data.prompt;
|
||||
}
|
||||
if (data.type === "stream" && isStream) {
|
||||
if (data.prompt) {
|
||||
updateLastMessage({ prompt: data.prompt });
|
||||
} else {
|
||||
updateLastMessage({ str: data.message });
|
||||
}
|
||||
updateLastMessage({ str: data.message });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user