-
Notifications
You must be signed in to change notification settings - Fork 80
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
Changes from 8 commits
1dfd8d6
7146973
a537aa3
1496a8f
0290902
61cbf3b
75d455e
873282b
9af6618
7a2f011
f3597d3
b1d1709
1a3aa6e
3019577
00bd825
db79da3
9629880
5a95eb7
5722a0b
61a1705
62df44f
10ab44e
4fa73c3
f4017b6
aebdc7f
47fdda3
013aa66
96e300d
d5feb48
b5210db
370e804
bce9557
e950e5f
f588926
162d7d0
afd4204
d6b0753
2f615ee
8841d3f
6fe220b
04cd48d
f096f8a
3656b3b
4cb24d8
4a074a1
96b6e00
f1cb732
ed33378
22cf3c4
ca1a7af
0db47a9
7771534
74452ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import clsx from "clsx" | ||
import Link from "next/link" | ||
import { Button } from "~core/components/Button" | ||
import { EXTENSION_CHROME_URL } from "~core/components/common" | ||
|
||
export const GetExtensionButton = ({ className = "" }) => ( | ||
<Button | ||
onClick={() => window.open(EXTENSION_CHROME_URL, "_blank")} | ||
className={clsx( | ||
"bg-indigo-9 hover:bg-indigo-10 text-white hover:text-white/80", | ||
className | ||
)}> | ||
Get the extension | ||
</Button> | ||
<Link target="_blank" href={EXTENSION_CHROME_URL}> | ||
<Button | ||
className={clsx( | ||
"bg-indigo-9 hover:bg-indigo-10 text-white hover:text-white/80", | ||
className | ||
)}> | ||
Get the extension | ||
</Button> | ||
</Link> | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useState, useEffect } from "react" | ||
|
||
export const useMatchMedia = (query: string) => { | ||
const [isMatch, setIsMatch] = useState<boolean>() | ||
|
||
useEffect(() => { | ||
if (!globalThis.window?.matchMedia) { | ||
return | ||
} | ||
|
||
// set initial value | ||
const mediaWatcher = globalThis.window.matchMedia(query) | ||
setIsMatch(mediaWatcher.matches) | ||
//watch for updates | ||
function onMediaChanged(e: MediaQueryListEvent) { | ||
setIsMatch(e.matches) | ||
} | ||
mediaWatcher.addEventListener("change", onMediaChanged) | ||
|
||
// clean up after ourselves | ||
return function cleanup() { | ||
mediaWatcher.removeEventListener("change", onMediaChanged) | ||
} | ||
}, [query]) | ||
|
||
return isMatch | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we put agent and vm inside a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done 👍 |
||
import { WebVMProvider } from "~features/web-vm/web-vm-provider" | ||
import { AgentPlaygroundView } from "~views/AgentPlaygroundView" | ||
|
||
export default function AgentPlaygroundPage() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could also name this folder |
||
import { AIContainerView } from "~views/AIContainerView" | ||
|
||
export default function AIContainerPage() { | ||
alexanderatallah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!