From 1dba4b7bf98a7cfe6879d06d8938681bd49a7730 Mon Sep 17 00:00:00 2001 From: Asim Shrestha Date: Fri, 7 Apr 2023 18:06:06 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Add=20meta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ChatWindow.tsx | 14 +++++++++++++- src/layout/default.tsx | 13 ++++++++++++- src/pages/index.tsx | 31 ++++++++++++------------------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/components/ChatWindow.tsx b/src/components/ChatWindow.tsx index 20ee176..00a610c 100644 --- a/src/components/ChatWindow.tsx +++ b/src/components/ChatWindow.tsx @@ -1,6 +1,5 @@ import cx from "classnames"; import type { ReactNode } from "react"; -import type { Message } from "../pages"; import React from "react"; interface ChatWindowProps { @@ -46,5 +45,18 @@ const ChatMessage = ({ message }: { message: Message }) => { ); }; +export interface Message { + type: "goal" | "thinking" | "task" | "action"; + value: string; +} + +export const CreateGoalMessage = (goal: string): Message => { + return { type: "goal", value: goal }; +}; + +export const CreateTaskMessage = (task: string): Message => { + return { type: "task", value: task }; +}; + export default ChatWindow; export { ChatMessage }; diff --git a/src/layout/default.tsx b/src/layout/default.tsx index 20fd747..4f5b17d 100644 --- a/src/layout/default.tsx +++ b/src/layout/default.tsx @@ -7,12 +7,23 @@ interface LayoutProps { } const DefaultLayout = (props: LayoutProps) => { + const description = + "Assemble, configure, and deploy autonomous AI Agents in your browser."; return (
Agent-GPT - + + + + + + + {props.children} {/*