Merge branch 'two_edges' of personal:langflow-ai/langflow into two_edges
This commit is contained in:
commit
2a3f095668
3 changed files with 8 additions and 4 deletions
|
|
@ -858,3 +858,5 @@ export const ERROR_UPDATING_COMPONENT =
|
||||||
"An unexpected error occurred while updating the Component. Please try again.";
|
"An unexpected error occurred while updating the Component. Please try again.";
|
||||||
export const TITLE_ERROR_UPDATING_COMPONENT =
|
export const TITLE_ERROR_UPDATING_COMPONENT =
|
||||||
"Error while updating the Component";
|
"Error while updating the Component";
|
||||||
|
|
||||||
|
export const EMPTY_INPUT_SEND_MESSAGE = "No input message provided.";
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import useFlowStore from "../../../../../stores/flowStore";
|
||||||
import { chatMessagePropsType } from "../../../../../types/components";
|
import { chatMessagePropsType } from "../../../../../types/components";
|
||||||
import { classNames, cn } from "../../../../../utils/utils";
|
import { classNames, cn } from "../../../../../utils/utils";
|
||||||
import FileCardWrapper from "./components/fileCardWrapper";
|
import FileCardWrapper from "./components/fileCardWrapper";
|
||||||
|
import { EMPTY_INPUT_SEND_MESSAGE } from "../../../../../constants/constants";
|
||||||
|
|
||||||
export default function ChatMessage({
|
export default function ChatMessage({
|
||||||
chat,
|
chat,
|
||||||
|
|
@ -310,7 +311,9 @@ export default function ChatMessage({
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span
|
<span
|
||||||
className="prose text-primary word-break-break-word dark:prose-invert"
|
className={`prose word-break-break-word dark:prose-invert ${
|
||||||
|
chatMessage === EMPTY_INPUT_SEND_MESSAGE ? "text-gray-400" : "text-primary"
|
||||||
|
}`}
|
||||||
data-testid={
|
data-testid={
|
||||||
"chat-message-" + chat.sender_name + "-" + chatMessage
|
"chat-message-" + chat.sender_name + "-" + chatMessage
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { Button } from "../../../../components/ui/button";
|
||||||
import {
|
import {
|
||||||
CHAT_FIRST_INITIAL_TEXT,
|
CHAT_FIRST_INITIAL_TEXT,
|
||||||
CHAT_SECOND_INITIAL_TEXT,
|
CHAT_SECOND_INITIAL_TEXT,
|
||||||
|
EMPTY_INPUT_SEND_MESSAGE,
|
||||||
} from "../../../../constants/constants";
|
} from "../../../../constants/constants";
|
||||||
import { deleteFlowPool } from "../../../../controllers/API";
|
import { deleteFlowPool } from "../../../../controllers/API";
|
||||||
import useAlertStore from "../../../../stores/alertStore";
|
import useAlertStore from "../../../../stores/alertStore";
|
||||||
|
|
@ -79,9 +80,7 @@ export default function ChatView({
|
||||||
return {
|
return {
|
||||||
isSend: !is_ai,
|
isSend: !is_ai,
|
||||||
message:
|
message:
|
||||||
message === "" || !message
|
message === "" || !message ? EMPTY_INPUT_SEND_MESSAGE : message,
|
||||||
? "No input message provided."
|
|
||||||
: message,
|
|
||||||
sender_name,
|
sender_name,
|
||||||
componentId: output.id,
|
componentId: output.id,
|
||||||
stream_url: stream_url,
|
stream_url: stream_url,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue