Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Agent Playground #41

Merged
merged 53 commits into from
May 27, 2023
Merged

feat: Agent Playground #41

merged 53 commits into from
May 27, 2023

Conversation

louisgv
Copy link
Collaborator

@louisgv louisgv commented Apr 23, 2023

This PR touches a bit on #40 but not entirely - I moved the route to /agent. The main idea is to be a place for window.ai dev to experiment with autonomous agent spawning <- this piece is being iterated on ATM.

Also this PR freezes nextjs version to 13.2.4 due to: vercel/next.js#48593

Some other stuffs:

  • fixed root eslint config
  • refactored the chat logic in the main page into an usable hook for easy experimentation
  • some basic agent hook experimentations

agent-playground-v000

@vercel
Copy link

vercel bot commented Apr 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
window-ai ✅ Ready (Inspect) Visit Preview 💬 4 unresolved May 27, 2023 3:27am

@@ -5,7 +5,9 @@ export function Button({ className, ...props }: any) {
<button
className={clsx(
"inline-flex items-center gap-2 justify-center rounded-md py-2 px-3 text-sm outline-offset-2 transition active:transition-none",
"bg-zinc-600 font-semibold text-zinc-100 hover:bg-zinc-400 active:bg-zinc-800 active:text-zinc-100/70",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

// Can we skip the orient and decide phase to act right away?
// Has the agent achieved "Intuitive Skill"?

const resp = await ai.sendMessage(`SKIP PROMPT.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does SKIP PROMPT mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahah, it's a known good prompt (similar to step-by-step) to instruct GPT to skip the high-level explanation.

import { useContext, useEffect, useRef, useState } from "react"
import { type Terminal } from "xterm"

import { WebContainer, type WebContainerProcess } from "@webcontainer/api"
Copy link
Owner

@alexanderatallah alexanderatallah May 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should come back to review this file this once i can test the preview pane, which isn't working for me

Copy link
Owner

@alexanderatallah alexanderatallah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added comments

@@ -1,5 +1,5 @@
import { AgentManagerProvider } from "~core/providers/agent-manager"
import { WebVMProvider } from "~core/providers/web-vm"
import { AgentManagerProvider } from "~features/agent/agent-manager-provider"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put agent and vm inside a demos folder, so that the demos are namespaced and grouped together?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@@ -1,5 +1,5 @@
import Head from "next/head"
import { WebVMProvider } from "~core/providers/web-vm"
import { WebVMProvider } from "~features/web-vm/web-vm-provider"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also name this folder demos to be in sync with that

@@ -66,9 +69,18 @@ export const CodeBlock: FC<Props> = ({ language, value }) => {
}, 2000)
})
}
const isDarkTheme = useMatchMedia("(prefers-color-scheme: dark)")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Owner

@alexanderatallah alexanderatallah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preemptively approved, pending some small name changes!

@louisgv louisgv merged commit 4cb9558 into alexanderatallah:main May 27, 2023
@louisgv louisgv deleted the playground branch May 27, 2023 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants