forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elizaOS#2 from bmgalego/web-agent
feat: Web Agent
- Loading branch information
Showing
274 changed files
with
22,966 additions
and
2,858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default function Agent() { | ||
return ( | ||
<div className="min-h-screen flex flex-col items-center justify-center p-4"> | ||
<p className="text-lg text-gray-600"> | ||
Select an option from the sidebar to configure, view, or chat | ||
with your ELIZA agent | ||
</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { Button } from "@/components/ui/button"; | ||
import { useNavigate } from "react-router-dom"; | ||
import "./App.css"; | ||
|
||
type Agent = { | ||
id: string; | ||
name: string; | ||
}; | ||
|
||
function Agents() { | ||
const navigate = useNavigate(); | ||
const { data: agents, isLoading } = useQuery({ | ||
queryKey: ["agents"], | ||
queryFn: async () => { | ||
const res = await fetch("/api/agents"); | ||
const data = await res.json(); | ||
return data.agents as Agent[]; | ||
}, | ||
}); | ||
|
||
return ( | ||
<div className="min-h-screen flex flex-col items-center justify-center p-4"> | ||
<h1 className="text-2xl font-bold mb-8">Select your agent:</h1> | ||
|
||
{isLoading ? ( | ||
<div>Loading agents...</div> | ||
) : ( | ||
<div className="grid gap-4 w-full max-w-md"> | ||
{agents?.map((agent) => ( | ||
<Button | ||
key={agent.id} | ||
className="w-full text-lg py-6" | ||
onClick={() => { | ||
navigate(`/${agent.id}`); | ||
}} | ||
> | ||
{agent.name} | ||
</Button> | ||
))} | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default Agents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
|
Oops, something went wrong.