Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
[WIP]
Tomas Valenta9f41eb243392
diff --git a/api-service/session/playground/base.py b/api-service/session/playground/base.pyindex 1217576e4..9d7af045d 100644--- a/api-service/session/playground/base.py+++ b/api-service/session/playground/base.py@@ -65,6 +65,7 @@ class Playground(Session):)gh = "/gh/bin/gh"+# Restricted tokenawait self.write_file("/github_token",@@ -73,14 +74,23 @@ class Playground(Session):id = str(uuid.uuid4())[:8]- await self.run_command(f"{gh} auth login --with-token < /github_token")- await self.run_command(f"git config --global user.email agent1")- await self.run_command(f"git checkout -b pr-{id}")- await self.run_command(f"git add .", rootdir="/repo")- await self.run_command(f"git commit -m", rootdir="/repo")- await self.run_command(f"{gh} auth setup-git")- await self.run_command(f"git push --set-upstream origin {id}")- await self.run_command(f"{gh} pr create --title 'PR-{id}' --body 'PR-{id}'")+ print(await self.run_command(f"echo 2 > /repo/test.txt"))+ print(await self.run_command(f"{gh} auth login --with-token < /github_token"))+ print(await self.run_command(f"git config --global user.email agent1"))+ print(await self.run_command(f"git checkout -b pr-{id}"))+ print(await self.run_command(f"git add .", rootdir="/repo"))+ print(await self.run_command(f"git commit -m", rootdir="/repo"))+ print(await self.run_command(f"{gh} auth setup-git"))+ print(+ await self.run_command(+ f"git push --set-upstream origin {id}", rootdir="/repo"+ )+ )+ print(+ await self.run_command(+ f"gh pr create --title 'PR-{id}' --body 'PR-{id}'", rootdir="/repo"+ )+ )async def change_rootdir(self, rootdir: str):self.rootdir = rootdirdiff --git a/components/Editor/index.tsx b/components/Editor/index.tsxindex b631ce5ff..b1eaec609 100644--- a/components/Editor/index.tsx+++ b/components/Editor/index.tsx@@ -93,7 +93,7 @@ function Editor({ project }: Props) {MenuSection.Run,)- const [sizes, setSizes] = useLocalStorage('project-board-splitter-sizes', [0, 100 / 3, 100 / 3])+ const [sizes, setSizes] = useLocalStorage('project-board-splitter-sizes', [100 / 3, 100 / 3, 100 / 3])const handleResize = useCallback((_: number, newSizes: number[]) => {setSizes(newSizes)if (ref.current) {@@ -115,7 +115,7 @@ function Editor({ project }: Props) {flex-1"><Splitter- minWidths={[0, 260, 260]}+ minWidths={[260, 260, 260]}gutterTheme={GutterTheme.Light}initialSizes={sizes}classes={['flex', 'flex', 'flex']}