Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Save last run prompt
Tomas Valenta2163056ae48d
diff --git a/pages/api/agent/run.ts b/pages/api/agent/run.tsindex 0dde6faa6..a7f020913 100644--- a/pages/api/agent/run.ts+++ b/pages/api/agent/run.ts@@ -36,7 +36,6 @@ async function postRun(req: NextApiRequest, res: NextApiResponse) {const authData = deployment.auth as unknown as DeploymentAuthDataconst client = getGHInstallationClient({ installationID: authData.github.installation_id })-// TODO: Should we maybe just edit the previous comment?// Or should we do that only if the previous run was cancelledawait addCommentToPR({@@ -47,6 +46,15 @@ async function postRun(req: NextApiRequest, res: NextApiResponse) {pullNumber: authData.github.pull_number,})+ await prisma.deployments.update({+ where: {+ id: deployment_id,+ },+ data: {+ last_finished_prompt: prompt,+ },+ })+res.status(200).json({})} catch (err: any) {console.error(err)