Skip to content

Commit 879ff44

Browse files
committed
Use a tmp folder for all patchflow artifacts
1 parent 0d85c04 commit 879ff44

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,5 @@ benchmark/
168168

169169
# node modules
170170
node_modules/
171+
172+
tmp/

patchwork/common/utils/browser_initializer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ def init_browser_context(cls, config: Optional[BrowserContextConfig]):
9191
if cls._browser_context is not None:
9292
return cls._browser_context
9393

94-
downloads_path = os.path.join(os.getcwd(), "downloads")
94+
downloads_path = os.path.join(os.getcwd(), "tmp", "downloads")
9595
if not os.path.exists(downloads_path):
9696
os.makedirs(downloads_path)
9797

98-
cookies_file = os.path.join(os.getcwd(), "cookies.json")
98+
cookies_file = os.path.join(os.getcwd(), "tmp", "cookies.json")
9999

100100
context_config = BrowserContextConfig(
101101
save_downloads_path=downloads_path, cookies_file=cookies_file, _force_keep_context_alive=True

patchwork/steps/BrowserUse/BrowserUse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, inputs):
5252

5353
# Configure GIF generation for debugging/visualization
5454
self.generate_gif = (
55-
f"agent_history_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.gif"
55+
f"tmp/agent_history_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.gif"
5656
if ("generate_gif" in self.inputs and self.inputs["generate_gif"])
5757
or ("debug" in self.inputs and self.inputs["debug"])
5858
else False

0 commit comments

Comments
 (0)