add title & logo
This commit is contained in:
18
src/components/icons/langgraph.tsx
Normal file
18
src/components/icons/langgraph.tsx
Normal file
File diff suppressed because one or more lines are too long
@@ -12,6 +12,7 @@ import {
|
|||||||
DO_NOT_RENDER_ID_PREFIX,
|
DO_NOT_RENDER_ID_PREFIX,
|
||||||
ensureToolCallsHaveResponses,
|
ensureToolCallsHaveResponses,
|
||||||
} from "@/lib/ensure-tool-responses";
|
} from "@/lib/ensure-tool-responses";
|
||||||
|
import { LangGraphLogoSVG } from "../icons/langgraph";
|
||||||
|
|
||||||
// const dummyMessages = [
|
// const dummyMessages = [
|
||||||
// { type: "human", content: "Hi! What can you do?" },
|
// { type: "human", content: "Hi! What can you do?" },
|
||||||
@@ -30,6 +31,15 @@ import {
|
|||||||
// },
|
// },
|
||||||
// ];
|
// ];
|
||||||
|
|
||||||
|
function Title({ className }: { className?: string }) {
|
||||||
|
return (
|
||||||
|
<div className={cn("flex gap-2 items-center", className)}>
|
||||||
|
<LangGraphLogoSVG width={32} height={32} />
|
||||||
|
<h1 className="text-xl font-medium">LangGraph Chat</h1>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function Thread() {
|
export function Thread() {
|
||||||
const [input, setInput] = useState("");
|
const [input, setInput] = useState("");
|
||||||
const [firstTokenReceived, setFirstTokenReceived] = useState(false);
|
const [firstTokenReceived, setFirstTokenReceived] = useState(false);
|
||||||
@@ -89,14 +99,16 @@ export function Thread() {
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className={cn("flex-1 px-4", chatStarted ? "pb-28" : "mt-64")}>
|
<div className={cn("flex-1 px-4", chatStarted ? "pb-28" : "mt-64")}>
|
||||||
<h1
|
{!chatStarted && (
|
||||||
className={cn(
|
<div className="flex justify-center">
|
||||||
"text-2xl font-medium mb-12 text-center",
|
<Title className="mb-12" />
|
||||||
chatStarted && "hidden",
|
</div>
|
||||||
|
)}
|
||||||
|
{chatStarted && (
|
||||||
|
<div className="hidden md:flex absolute top-4 right-4">
|
||||||
|
<Title />
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
>
|
|
||||||
Chat
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|||||||
Reference in New Issue
Block a user