Skip to content

Commit

Permalink
Homepage Fixes (#248)
Browse files Browse the repository at this point in the history
* Main deploy (#5)

Co-authored-by: dongyuanjushi <kai.mei@rutgers.edu>

* retry logic

* fix agent cache path

* frontend network fixes

* added base url

* switch from mixtral to 4o-mini

* home page asset transfer

* index

* changes

* wip

* homepage updates

---------

Co-authored-by: dongyuanjushi <kai.mei@rutgers.edu>
  • Loading branch information
BRama10 and dongyuanjushi authored Sep 24, 2024
1 parent ee95077 commit 522fd9e
Show file tree
Hide file tree
Showing 29 changed files with 1,958 additions and 133 deletions.
11 changes: 11 additions & 0 deletions agenthub/app/_page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import LandingPageFooter from './LandingPageFooter'
import LandingPageMain from './LandingPageMain'

export default function Page() {
return (
<main>
<LandingPageMain />
<LandingPageFooter />
</main>
)
}
10 changes: 5 additions & 5 deletions agenthub/app/agents/ContentLayout/DatasetsHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { FilterSVG, InnerDatasetSVG, SortSVG, AgentSVG } from '@/ui/svgs'
import { FilterSVG, SortSVG } from '@/ui/svgs'
import { Input } from '@nextui-org/react'
import { AgentListGenerator } from '../const';

Expand All @@ -25,18 +25,18 @@ export function DatasetsHeader() {
<h1>Agents</h1>
<div className="ml-3 w-16 font-normal text-gray-400">{agentNumber}</div>
</div>
<div className="flex-1 md:mx-4">
<div className="flex-1 md:mx-4 opacity-0">
<div className="relative w-full md:max-w-xs">
<Input />
</div>
</div>
<a href="/search/full-text?type=dataset" className="btn mr-2 rounded-full text-sm opacity-80 hover:opacity-100">
<a href="#" className="btn mr-2 rounded-full text-sm opacity-80 hover:opacity-100">
<span className="mr-1.5 rounded bg-blue-500/10 px-1 text-xs leading-tight text-blue-700 dark:text-blue-200">
new
Coming Soon
</span>
Full-text search
</a>
<div>
<div className='opacity-0'>
<button className="btn mr-2 inline-flex text-sm lg:hidden " type="button">
<FilterSVG />
Add filters
Expand Down
4 changes: 2 additions & 2 deletions agenthub/app/agents/ContentLayout/DatasetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default async function DatasetsList(
{ searchParams }:
{ searchParams: { [key: string]: string | string[] | undefined } }) {

let page;
if (searchParams==undefined) {
let page;
if (typeof searchParams.p !== 'string') {
page = 0;
} else {
page = parseInt(searchParams.p as string)
Expand Down
3 changes: 2 additions & 1 deletion agenthub/app/agents/[name]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { baseUrl } from "@/lib/env";
import AgentPage, { Agent } from "./agent";


export default async function Page({ params }: { params: { name: string } }) {
// let agentInfo: Agent;

const res = await fetch(`https://agenthub.aios.foundation/api/get_agent_by_name?name=${params.name}`);
const res = await fetch(`${baseUrl}/api/get_agent_by_name?name=${params.name}`);
const agentInfo: Agent = await res.json();

return <AgentPage agent={agentInfo} />
Expand Down
3 changes: 2 additions & 1 deletion agenthub/app/agents/const.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { baseUrl } from '@/lib/env';
import { AgentItem, DatasetItem, DatasetsTabItem } from './type'

export const DatasetList: DatasetItem[] = [...Array(30)].map(() => ({
Expand All @@ -14,7 +15,7 @@ export const AgentList: AgentItem[] = [];
// export const AgentList =

export const AgentListGenerator: () => Promise<AgentItem[]> = async () => {
const res = await fetch('https://agenthub.aios.foundation/api/get_all_agents/light');
const res = await fetch(`${baseUrl}/api/get_all_agents/light`);
const res_ = await res.json();

const values: AgentItem[] = Object.values(res_);
Expand Down
4 changes: 2 additions & 2 deletions agenthub/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ const Chat = () => {


return (
isMounted ? <div className="bg-neutral-800 w-full h-[85vh] flex flex-col items-center">
isMounted ? <div className="bg-neutral-800 w-full min-h-[85vh] max-h-[85vh] flex flex-col items-center">
{/* <Header /> */}
<div className='h-[40px] w-full'></div>
<div className="flex flex-col h-full w-3/5 items-center relative">
<div className="flex flex-col h-[calc(85vh-50px)] w-4/5 items-center relative">
<Body messages={messages} />
<div className="w-full fixed bottom-0 bg-neutral-800">
<Form callback={addMessage} />
Expand Down
Binary file removed agenthub/app/favicon.ico
Binary file not shown.
99 changes: 88 additions & 11 deletions agenthub/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,34 @@ body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
background-color:rgb(18,18,18);
}

/* body{--tw-bg-opacity:1;); */

@layer utilities {
.text-balance {
text-wrap: balance;
}
}


.editor {
border: 1px solid #737373; /* border-[1px] and border-neutral-500 */
border-radius: 0.75rem; /* rounded-xl */
background-color: inherit; /* bg-inherit */
color: #e5e5e5; /* text-neutral-200 */
min-height: 3rem; /* h-12 (assuming 1rem = 16px) */
border: 1px solid #737373; /* border-[1px] and border-neutral-500 */
border-radius: 0.75rem; /* rounded-xl */
background-color: inherit; /* bg-inherit */
color: #e5e5e5; /* text-neutral-200 */
min-height: 3rem; /* h-12 (assuming 1rem = 16px) */
max-height: 7rem;
overflow-y: auto;
padding: 12px;
outline: none;
outline: none;
display: flex;
max-width: 100%;
}

.editor[placeholder]:empty:before {
content: attr(placeholder);
color: #a3a3a3;
color: #a3a3a3;
cursor: text;
}

Expand All @@ -53,8 +55,8 @@ body {
}

.mentionNode {
background-color: rgba(88, 101, 242, 0.3); /* Discord blue with opacity */
color: #dee0fc; /* Light blue-ish color for text */
background-color: rgba(88, 101, 242, 0.3); /* Discord blue with opacity */
color: #dee0fc; /* Light blue-ish color for text */
border-radius: 16px;
padding: 4px 8px;
font-weight: 500;
Expand All @@ -65,7 +67,7 @@ body {
.mentionsContainer {
background-color: #2f3136;
border-radius: 16px;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.2);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
max-height: 60vh;
overflow-y: auto;
width: 40vh;
Expand All @@ -84,4 +86,79 @@ body {

.mentionsItem:hover {
background-color: #393c43;
}

@keyframes marquee {
0% {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
}

.text-foreground {
/* font-size: 72px; */
color: white;
}

.text-brand {
/* font-size: 72px; */
color: rgb(30, 145, 221);
}

.bg-muted {
background-color: rgb(36,36,36);
}

.border-strong {
border-color: rgb(54,54,54);
}

.border-stronger {
border-color: rgb(69, 69, 69);
}

.border-strong:hover {
border-color: rgb(69, 69, 69);
}

.from-border {
border-color: rgb(46, 46, 46);
border-width: 1px;
}

@layer base {
/* Headings */
h1 {
@apply text-4xl font-bold mb-4;
}
h2 {
@apply text-3xl font-bold mb-3;
}
h3 {
@apply text-2xl font-bold mb-2;
}
h4 {
@apply text-xl font-bold mb-2;
}

/* Lists */
ul, ol {
@apply mb-4 pl-8;
}
ul {
@apply list-disc;
}
ol {
@apply list-decimal;
}
li {
@apply mb-1;
}

/* Strong tag */
strong {
@apply font-bold;
}
}
108 changes: 108 additions & 0 deletions agenthub/app/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions agenthub/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,21 @@ import '@/styles/global-stylesheet.css'
import '@/styles/google-font-Source-Sans-Pro.css'
import '@/styles/google-font-IBM-Plex-Mono.css'
import "./globals.css";
import "./ts.css"

export const metadata: Metadata = {
title: 'AIOS - The future of agents',
title: 'AIOS The future of AI Agents',
openGraph: {
title: 'AIOS - The future of agents',
title: 'AIOS The future of AI Agents',
type: 'website',
url: 'huggingface',
images: 'https://huggingface.co/front/thumbnails/v2-2.png',
url: 'aiosfoundation',
images: 'https://aiosfoundation.org/assets/images/about/Agent.svg',
},
description:
'We’re on a journey to advance and democratize artificial intelligence through open source and open science.',
twitter: {
card: 'summary_large_image',
site: '@huggingface',
site: '@aiosfoundation',
},
appLinks: {},
// fb: { app_id: '1321688464574422', },
Expand All @@ -74,11 +75,12 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<body>
<Providers>
<main
className="HomePage flex min-h-screen flex-col bg-white text-black dark:bg-gray-950"
className="HomePage flex min-h-screen flex-col text-black bg-white dark:bg-gray-950"
style={{ fontSize: 16 }}
>
<div className="flex min-h-screen flex-col">
<NavHeader />
{/* <div className='w-full bg-inherit opacity-0 h-[24px]'></div> */}
{children}
</div>
</main>
Expand Down
Loading

0 comments on commit 522fd9e

Please sign in to comment.