Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Annotate agent deploy body parameters

Tomas Valenta311ef86af1fe
diff --git a/pages/agent/smol-developer/setup.tsx b/pages/agent/smol-developer/setup.tsx
index 5b73888a5..1d63b4598 100644
--- a/pages/agent/smol-developer/setup.tsx
+++ b/pages/agent/smol-developer/setup.tsx
@@ -28,16 +28,24 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
}
export interface PostAgentBody {
+ // ID of the installation of the GitHub App
installationID: number
+ // ID of the repository
repositoryID: number
+ // Title of the PR
title: string
+ // Default branch against which to create the PR
defaultBranch: string
+ // Initial prompt used as a body text for the PR (can be markdown)
body: string
+ // Owner of the repo (user or org)
owner: string
+ // Name of the repo
repo: string
+ // Name of the branch created for the PR
branch: string
+ // Commit message for the PR first empty commit
commitMessage: string
- prompt: string
}
async function handlePostAgent(url: string, { arg }: { arg: PostAgentBody }) {
@@ -72,7 +80,6 @@ function Repo() {
defaultBranch,
installationID,
owner,
- prompt,
repo,
branch,
commitMessage,
diff --git a/pages/api/agent.ts b/pages/api/agent.ts
index 401148227..75688b015 100644
--- a/pages/api/agent.ts
+++ b/pages/api/agent.ts
@@ -13,7 +13,6 @@ async function postAgent(req: NextApiRequest, res: NextApiResponse) {
repositoryID,
title,
body,
- prompt,
owner,
branch,
commitMessage,
@@ -129,7 +128,7 @@ async function postAgent(req: NextApiRequest, res: NextApiResponse) {
await triggerSmolDevAgentRun({
deployment,
- prompt,
+ prompt: body,
accessToken,
commitMessage: 'Add code based on the PR description',
})