mirror of
https://github.com/aljazceru/AgentGPT.git
synced 2025-12-17 14:04:25 +01:00
🚀 Add meta
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import cx from "classnames";
|
import cx from "classnames";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import type { Message } from "../pages";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
interface ChatWindowProps {
|
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 default ChatWindow;
|
||||||
export { ChatMessage };
|
export { ChatMessage };
|
||||||
|
|||||||
@@ -7,12 +7,23 @@ interface LayoutProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DefaultLayout = (props: LayoutProps) => {
|
const DefaultLayout = (props: LayoutProps) => {
|
||||||
|
const description =
|
||||||
|
"Assemble, configure, and deploy autonomous AI Agents in your browser.";
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen min-h-screen flex-col bg-gradient-to-b from-[#2B2B2B] to-[#1F1F1F]">
|
<div className="flex min-h-screen min-h-screen flex-col bg-gradient-to-b from-[#2B2B2B] to-[#1F1F1F]">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Agent-GPT</title>
|
<title>Agent-GPT</title>
|
||||||
<meta name="description" content="Agent-GPT b Reworkd.ai" />
|
<meta name="description" content={description} />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta property="og:url" content="https://agentgpt.reworkd.ai/" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta name="twitter:card" content={description} />
|
||||||
|
<meta property="og:description" content={description} />
|
||||||
|
<meta property="og:title" content="Reworkd." />
|
||||||
|
<meta
|
||||||
|
property="og:image"
|
||||||
|
content="https://raw.githubusercontent.com/reworkd/extension/main/assets/icon512.png"
|
||||||
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<DottedGridBackground>{props.children}</DottedGridBackground>
|
<DottedGridBackground>{props.children}</DottedGridBackground>
|
||||||
{/*<Footer />*/}
|
{/*<Footer />*/}
|
||||||
|
|||||||
@@ -2,26 +2,18 @@ import { type NextPage } from "next";
|
|||||||
import Badge from "../components/Badge";
|
import Badge from "../components/Badge";
|
||||||
import DefaultLayout from "../layout/default";
|
import DefaultLayout from "../layout/default";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ChatWindow, { ChatMessage } from "../components/ChatWindow";
|
import type { Message } from "../components/ChatWindow";
|
||||||
|
import ChatWindow, {
|
||||||
|
ChatMessage,
|
||||||
|
CreateGoalMessage,
|
||||||
|
CreateTaskMessage,
|
||||||
|
} from "../components/ChatWindow";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import Drawer from "../components/Drawer";
|
import Drawer from "../components/Drawer";
|
||||||
import Input from "../components/Input";
|
import Input from "../components/Input";
|
||||||
import Button from "../components/Button";
|
import Button from "../components/Button";
|
||||||
import { FaRobot, FaStar } from "react-icons/fa";
|
import { FaRobot, FaStar } from "react-icons/fa";
|
||||||
|
|
||||||
export interface Message {
|
|
||||||
type: "goal" | "thinking" | "task" | "action";
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const GoalMessage = (goal: string) => {
|
|
||||||
return { type: "goal", value: goal } as Message;
|
|
||||||
};
|
|
||||||
|
|
||||||
const TaskMessage = (task: string) => {
|
|
||||||
return { type: "task", value: task } as Message;
|
|
||||||
};
|
|
||||||
|
|
||||||
const Home: NextPage = () => {
|
const Home: NextPage = () => {
|
||||||
const [loading, setLoading] = React.useState<boolean>(false);
|
const [loading, setLoading] = React.useState<boolean>(false);
|
||||||
const [name, setName] = React.useState<string>("");
|
const [name, setName] = React.useState<string>("");
|
||||||
@@ -32,7 +24,7 @@ const Home: NextPage = () => {
|
|||||||
const handleNewGoal = async () => {
|
const handleNewGoal = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setGoal(goalInput);
|
setGoal(goalInput);
|
||||||
setMessages([...messages, GoalMessage(goalInput)]);
|
setMessages([...messages, CreateGoalMessage(goalInput)]);
|
||||||
|
|
||||||
const res = await axios.post(
|
const res = await axios.post(
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
@@ -42,7 +34,7 @@ const Home: NextPage = () => {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access
|
||||||
const tasks: string[] = JSON.parse(res.data.tasks);
|
const tasks: string[] = JSON.parse(res.data.tasks);
|
||||||
setMessages((prev) => [...prev, ...tasks.map(TaskMessage)]);
|
setMessages((prev) => [...prev, ...tasks.map(CreateTaskMessage)]);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62,13 +54,14 @@ const Home: NextPage = () => {
|
|||||||
id="title"
|
id="title"
|
||||||
className="flex flex-col items-center font-mono shadow-2xl"
|
className="flex flex-col items-center font-mono shadow-2xl"
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center shadow-2xl">
|
||||||
<span className="text-6xl font-bold text-[#C0C0C0]">Agent</span>
|
<span className="text-6xl font-bold text-[#C0C0C0]">Agent</span>
|
||||||
<span className="mr-5 text-6xl font-bold text-white">GPT</span>
|
<span className="mr-5 text-6xl font-bold text-white">GPT</span>
|
||||||
<Badge>Beta 🚀</Badge>
|
<Badge>Beta 🚀</Badge>
|
||||||
</div>
|
</div>
|
||||||
<div className="font-mono text-[0.8em] font-bold text-white">
|
<div className="mt-1 font-mono text-[0.8em] font-bold text-white shadow-2xl">
|
||||||
Autonomous AI Agents in your browser
|
Assemble, configure, and deploy autonomous AI Agents in your
|
||||||
|
browser.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user