Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add handlers

Vasek Mlejnskyc07bfc6e101e
diff --git a/components/AgentInstructions.tsx b/components/AgentInstructions.tsx
index e325386a7..2fbd380af 100644
--- a/components/AgentInstructions.tsx
+++ b/components/AgentInstructions.tsx
@@ -8,7 +8,7 @@ export interface Props {
value: string
onChange: (value: string) => void
onBack: () => void
- onNext: (instructions: string) => void
+ onNext: () => void
}
function AgentInstructions({
@@ -38,7 +38,7 @@ function AgentInstructions({
</button>
<button
className="px-2 py-1 font-medium rounded-md text-sm border border-transparent bg-indigo-600/30 text-indigo-500 hover:bg-transparent hover:border-indigo-600 transition-all"
- onClick={() => onNext(content)}
+ onClick={onNext}
>
Continue
</button>
diff --git a/pages/agent/smol-developer/setup.tsx b/pages/agent/smol-developer/setup.tsx
index 104f72d7f..1ac502b06 100644
--- a/pages/agent/smol-developer/setup.tsx
+++ b/pages/agent/smol-developer/setup.tsx
@@ -113,7 +113,7 @@ function Setup() {
const [selectedRepository, setSelectedRepository] = useState<RepoSetup>()
const { repos, refetch } = useRepositories(github)
const [instructions, setInstructions] = useState('')
- const [openAIAPIKey, setOpenAIAPIKey] = useState<string>()
+ const [openAIAPIKey, setOpenAIAPIKey] = useState<string>('')
const handleMessageEvent = useCallback((event: MessageEvent) => {
if (event.data.accessToken) {
@@ -240,11 +240,10 @@ function Setup() {
)}
{currentStep === 1 && (
<AgentInstructions
+ value={instructions}
+ onChange={setInstructions}
onBack={() => previousStep()}
- onNext={i => {
- setInstructions(i)
- nextStep()
- }}
+ onNext={() => nextStep()}
/>
)}
{currentStep === 2 && (