diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d97359f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +.next +.git +.env \ No newline at end of file diff --git a/README.md b/README.md index 387bf84..aceef52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# agent-ui demo +# Chat LangGraph + +> [!WARNING] +> This repo is still a work in progress and is not intended for use. Estimated launch date 03/11. Thank you for your patience. ## Setup diff --git a/agent/agent.tsx b/agent/agent.ts similarity index 100% rename from agent/agent.tsx rename to agent/agent.ts diff --git a/agent/uis/stockbroker/portfolio-view/index.tsx b/agent/uis/stockbroker/portfolio-view/index.tsx index 42bb140..2eff0be 100644 --- a/agent/uis/stockbroker/portfolio-view/index.tsx +++ b/agent/uis/stockbroker/portfolio-view/index.tsx @@ -160,7 +160,7 @@ export default function PortfolioView() { const chartData = selectedHolding ? generateChartData(selectedHolding) : []; return ( -
+

diff --git a/agent/uis/stockbroker/stock-price/index.tsx b/agent/uis/stockbroker/stock-price/index.tsx index 1c1ea52..8bcceca 100644 --- a/agent/uis/stockbroker/stock-price/index.tsx +++ b/agent/uis/stockbroker/stock-price/index.tsx @@ -149,7 +149,7 @@ export default function StockPrice(props: { }; return ( -
+

{ticker}

${currentPrice}

diff --git a/agent/uis/trip-planner/accommodations-list/index.tsx b/agent/uis/trip-planner/accommodations-list/index.tsx index 87e28f2..d360198 100644 --- a/agent/uis/trip-planner/accommodations-list/index.tsx +++ b/agent/uis/trip-planner/accommodations-list/index.tsx @@ -320,7 +320,7 @@ export default function AccommodationsList({ align: "start", loop: true, }} - className="w-full sm:max-w-sm md:max-w-2xl lg:max-w-3xl" + className="w-full sm:max-w-sm md:max-w-3xl lg:max-w-3xl" > {accommodations.map((accommodation) => ( diff --git a/index.html b/index.html index 5084932..790eb70 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - LangGraph Chat + Chat LangGraph diff --git a/langgraph.json b/langgraph.json index 4c8d865..0856fb4 100644 --- a/langgraph.json +++ b/langgraph.json @@ -1,12 +1,11 @@ { "node_version": "20", "graphs": { - "agent": "./agent/agent.tsx:graph" + "agent": "./agent/agent.ts:graph" }, "ui": { "agent": "./agent/uis/index.tsx" }, - "_INTERNAL_docker_tag": "20", "env": ".env", "dependencies": ["."] } diff --git a/src/components/thread/history/index.tsx b/src/components/thread/history/index.tsx index f0e3169..62a88ee 100644 --- a/src/components/thread/history/index.tsx +++ b/src/components/thread/history/index.tsx @@ -97,7 +97,7 @@ export default function ThreadHistory() { variant="ghost" onClick={() => setChatHistoryOpen((p) => !p)} > - +

Thread History diff --git a/src/components/thread/index.tsx b/src/components/thread/index.tsx index 2107630..4b4b8de 100644 --- a/src/components/thread/index.tsx +++ b/src/components/thread/index.tsx @@ -4,7 +4,6 @@ import { motion } from "framer-motion"; import { cn } from "@/lib/utils"; import { useStreamContext } from "@/providers/Stream"; import { useState, FormEvent } from "react"; -import { Input } from "../ui/input"; import { Button } from "../ui/button"; import { Checkpoint, Message } from "@langchain/langgraph-sdk"; import { AssistantMessage, AssistantMessageLoading } from "./messages/ai"; @@ -218,7 +217,7 @@ export function Thread() { variant="ghost" onClick={() => setChatHistoryOpen((p) => !p)} > - + )}

@@ -233,7 +232,7 @@ export function Thread() { variant="ghost" onClick={() => setChatHistoryOpen((p) => !p)} > - + )}
@@ -251,7 +250,7 @@ export function Thread() { > - LangGraph Chat + Chat LangGraph
@@ -277,7 +276,7 @@ export function Thread() { !chatStarted && "flex flex-col items-stretch mt-[25vh]", chatStarted && "grid grid-rows-[1fr_auto]", )} - contentClassName="pt-8 pb-16 px-4 max-w-4xl mx-auto flex flex-col gap-4 w-full" + contentClassName="pt-8 pb-16 max-w-3xl mx-auto flex flex-col gap-4 w-full" content={ <> {messages @@ -304,29 +303,36 @@ export function Thread() { } footer={ -
+
{!chatStarted && (

- LangGraph Chat + Chat LangGraph

)} -
+
- setInput(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter" && !e.shiftKey && !e.metaKey) { + e.preventDefault(); + const el = e.target as HTMLElement | undefined; + const form = el?.closest("form"); + form?.requestSubmit(); + } + }} placeholder="Type your message..." - className="px-4 py-6 border-none bg-transparent shadow-none ring-0 outline-none focus:outline-none focus:ring-0" + className="p-3.5 pb-0 border-none bg-transparent field-sizing-content shadow-none ring-0 outline-none focus:outline-none focus:ring-0 resize-none" />
@@ -338,6 +344,7 @@ export function Thread() { ) : (