- {hidden && chat.thought && chat.thought !== "" && (
-
setHidden((prev) => !prev)}
- className="absolute -top-1 -left-2 cursor-pointer"
- >
-
-
- )}
- {chat.thought && chat.thought !== "" && !hidden && (
-
setHidden((prev) => !prev)}
- className=" text-start inline-block rounded-md text-gray-600 dark:text-gray-200 h-full border border-gray-300 dark:border-gray-500
+
+ {!chat.isSend && (
+
+

+

+
+ )}
+ {chat.isSend && (
+
+ )}
+
+ {!chat.isSend ? (
+
+
+ {hidden && chat.thought && chat.thought !== "" && (
+
setHidden((prev) => !prev)}
+ className="absolute -top-1 -left-2 cursor-pointer"
+ >
+
+
+ )}
+ {chat.thought && chat.thought !== "" && !hidden && (
+
setHidden((prev) => !prev)}
+ className=" text-start inline-block rounded-md text-background h-full border border-gray-300 dark:border-gray-500
bg-muted dark:bg-gray-800 w-[95%] pb-3 pt-3 px-2 ml-3 cursor-pointer scrollbar-hide overflow-scroll"
- dangerouslySetInnerHTML={{
- __html: convert.toHtml(chat.thought),
- }}
- >
- )}
- {chat.thought && chat.thought !== "" && !hidden &&
}
-
-
-
-
- ▍
-
+ dangerouslySetInnerHTML={{
+ __html: convert.toHtml(chat.thought),
+ }}
+ >
+ )}
+ {chat.thought && chat.thought !== "" && !hidden &&
}
+
+
+
+
+ ▍
+
+ );
+ }
+
+ children[0] = (children[0] as string).replace(
+ "`▍`",
+ "▍"
);
}
- children[0] = (children[0] as string).replace(
- "`▍`",
- "▍"
+ const match = /language-(\w+)/.exec(className || "");
+
+ return !inline ? (
+
+ ) : (
+
+ {children}
+
);
- }
-
- const match = /language-(\w+)/.exec(className || "");
-
- return !inline ? (
-
- ) : (
-
- {children}
-
- );
- },
- }}
- >
- {message}
-
-
- {chat.files && (
-
- {chat.files.map((file, index) => {
- return (
-
-
-
- );
- })}
+ },
+ }}
+ >
+ {message}
+
- )}
+ {chat.files && (
+
+ {chat.files.map((file, index) => {
+ return (
+
+
+
+ );
+ })}
+
+ )}
+
-
- ) : (
-
-
-
"),
- }}
- >
+ ) : (
+
-
- )}
+ )}
+
);
}
diff --git a/src/frontend/src/modals/formModal/index.tsx b/src/frontend/src/modals/formModal/index.tsx
index 3023cfa49..a2819241c 100644
--- a/src/frontend/src/modals/formModal/index.tsx
+++ b/src/frontend/src/modals/formModal/index.tsx
@@ -11,7 +11,15 @@ import { ChatMessageType } from "../../types/chat";
import ChatInput from "./chatInput";
import _ from "lodash";
-import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../../components/ui/dialog";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
import { dark } from "@mui/material/styles/createPalette";
import { CODE_PROMPT_DIALOG_SUBTITLE } from "../../constants";
import { postValidateCode } from "../../controllers/API";
@@ -51,7 +59,7 @@ export default function FormModal({
}, [open]);
useEffect(() => {
id.current = flow.id;
- console.log(tabsState[flow.id])
+ console.log(tabsState[flow.id]);
}, [flow.id]);
var isStream = false;
@@ -338,15 +346,56 @@ export default function FormModal({
-
-
-
-
-
+
-
- teste
+
+
+ {chatHistory.length > 0 ? (
+ chatHistory.map((c, i) => (
+
+ ))
+ ) : (
+
+
+ 👋{" "}
+
+ LangFlow Chat
+
+
+
+
+
+ Start a conversation and click the agent’s thoughts{" "}
+
+
+ {" "}
+ to inspect the chaining process.
+
+
+
+ )}
+
+
+