orgo 0.0.19__tar.gz → 0.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {orgo-0.0.19 → orgo-0.0.20}/PKG-INFO +1 -1
- {orgo-0.0.19 → orgo-0.0.20}/pyproject.toml +1 -1
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/computer.py +4 -1
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/project.py +14 -1
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo.egg-info/PKG-INFO +1 -1
- {orgo-0.0.19 → orgo-0.0.20}/README.md +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/setup.cfg +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/__init__.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/api/__init__.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/api/client.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/prompt.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/utils/__init__.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo/utils/auth.py +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo.egg-info/SOURCES.txt +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo.egg-info/dependency_links.txt +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo.egg-info/requires.txt +0 -0
- {orgo-0.0.19 → orgo-0.0.20}/src/orgo.egg-info/top_level.txt +0 -0
|
@@ -74,7 +74,10 @@ class Computer:
|
|
|
74
74
|
|
|
75
75
|
def destroy(self) -> Dict[str, Any]:
|
|
76
76
|
"""Terminate and delete the computer instance"""
|
|
77
|
-
|
|
77
|
+
result = self.api.delete_computer(self.project_id)
|
|
78
|
+
# Clear the local project cache after destroying
|
|
79
|
+
ProjectManager.clear_project_cache()
|
|
80
|
+
return result
|
|
78
81
|
|
|
79
82
|
# Navigation methods
|
|
80
83
|
def left_click(self, x: int, y: int) -> Dict[str, Any]:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"""Project management for Orgo virtual environments"""
|
|
3
3
|
import os
|
|
4
4
|
import json
|
|
5
|
+
import shutil
|
|
5
6
|
import logging
|
|
6
7
|
from typing import Optional
|
|
7
8
|
|
|
@@ -40,6 +41,18 @@ class ProjectManager:
|
|
|
40
41
|
logger.error(f"Failed to save project ID: {str(e)}")
|
|
41
42
|
raise RuntimeError(f"Failed to save project configuration: {str(e)}") from e
|
|
42
43
|
|
|
44
|
+
@staticmethod
|
|
45
|
+
def clear_project_cache() -> None:
|
|
46
|
+
"""Clear the .orgo folder and all its contents"""
|
|
47
|
+
project_dir = ProjectManager._get_project_dir()
|
|
48
|
+
|
|
49
|
+
if os.path.exists(project_dir):
|
|
50
|
+
try:
|
|
51
|
+
shutil.rmtree(project_dir)
|
|
52
|
+
logger.info(f"Cleared project cache at {project_dir}")
|
|
53
|
+
except (IOError, OSError) as e:
|
|
54
|
+
logger.warning(f"Failed to clear project cache: {str(e)}")
|
|
55
|
+
|
|
43
56
|
@staticmethod
|
|
44
57
|
def _get_project_dir() -> str:
|
|
45
58
|
"""Get the project directory path"""
|
|
@@ -48,4 +61,4 @@ class ProjectManager:
|
|
|
48
61
|
@staticmethod
|
|
49
62
|
def _get_config_path() -> str:
|
|
50
63
|
"""Get the full path to the config file"""
|
|
51
|
-
return os.path.join(ProjectManager._get_project_dir(), "project.json")
|
|
64
|
+
return os.path.join(ProjectManager._get_project_dir(), "project.json")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|