diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index b73ba3d..960f903 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -1,5 +1,16 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { api } from "../lib/api"; +import { ScrollArea } from "@/components/ui/scroll-area"; +import { + Select, + SelectTrigger, + SelectValue, + SelectContent, + SelectItem, +} from "@/components/ui/select"; +import { Input } from "@/components/ui/input"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; interface Message { role: "user" | "assistant"; @@ -76,54 +87,57 @@ export function Chat() { }, [input, loading, agentId, sessionId]); return ( -
-
-

Chat

- - +
-
+ {messages.map((msg, i) => ( -
-
-
{msg.content}
+
+
+
{msg.content}
))} - {loading &&
Thinking...
} + {loading &&
Thinking...
}
-
-
- +
+ setInput(e.target.value)} onKeyDown={(e) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); send(); } }} placeholder="Ask your OpenClaw agent..." - style={{ flex: 1 }} + className="flex-1 bg-panel border-border-subtle text-text-main" /> - +
);