MCPcopy
hub / github.com/HKUDS/DeepCode / ensure_workspace_exists

Function ensure_workspace_exists

tools/code_implementation_server.py:80–89  ·  view source on GitHub ↗

Ensure workspace directory exists

()

Source from the content-addressed store, hash-verified

78
79
80def ensure_workspace_exists():
81 """Ensure workspace directory exists"""
82 global WORKSPACE_DIR
83 if WORKSPACE_DIR is None:
84 initialize_workspace()
85
86 # Create workspace directory (if it doesn't exist)
87 if not WORKSPACE_DIR.exists():
88 WORKSPACE_DIR.mkdir(parents=True, exist_ok=True)
89 logger.info(f"Workspace directory created: {WORKSPACE_DIR}")
90
91
92def validate_path(path: str) -> Path:

Callers 5

execute_pythonFunction · 0.85
execute_bashFunction · 0.85
read_code_memFunction · 0.85
search_codeFunction · 0.85
get_file_structureFunction · 0.85

Calls 1

initialize_workspaceFunction · 0.85

Tested by

no test coverage detected