Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Fix passing agent instructions

Tomas Valenta575f5ea20449
diff --git a/components/AgentInstructions.tsx b/components/AgentInstructions.tsx
index fca1d7919..e325386a7 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: () => void
+ onNext: (instructions: string) => void
}
function AgentInstructions({
@@ -28,7 +28,6 @@ function AgentInstructions({
onChange={onChange}
/>
</div>
-
<div className="w-full flex items-center justify-between">
<button
className="flex items-center justify-start space-x-1 text-gray-400 hover:text-gray-100 transition-all"
@@ -39,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}
+ onClick={() => onNext(content)}
>
Continue
</button>
diff --git a/pages/agent/smol-developer/setup.tsx b/pages/agent/smol-developer/setup.tsx
index c9a1a47c6..2fc424cf9 100644
--- a/pages/agent/smol-developer/setup.tsx
+++ b/pages/agent/smol-developer/setup.tsx
@@ -232,10 +232,11 @@ function Setup() {
)}
{currentStep === 1 && (
<AgentInstructions
- value={instructions}
- onChange={setInstructions}
onBack={() => previousStep()}
- onNext={() => nextStep()}
+ onNext={i => {
+ setInstructions(i)
+ nextStep()
+ }}
/>
)}
{currentStep === 2 && (