MCPcopy
hub / github.com/lightningpixel/modly / _workspace_relative_path

Function _workspace_relative_path

tools/modly-cli/agent.py:132–138  ·  view source on GitHub ↗
(output_url: str)

Source from the content-addressed store, hash-verified

130
131
132def _workspace_relative_path(output_url: str) -> str:
133 parsed = urllib.parse.urlparse(output_url)
134 path = parsed.path if parsed.scheme else output_url
135 prefix = "/workspace/"
136 if path.startswith(prefix):
137 return _validate_workspace_path(urllib.parse.unquote(path[len(prefix):]))
138 return _validate_workspace_path(urllib.parse.unquote(path))
139
140
141def _is_windows_drive_component(component: str) -> bool:

Callers 2

_workflow_workspace_pathFunction · 0.85
_run_generation_jobFunction · 0.85

Calls 1

_validate_workspace_pathFunction · 0.85

Tested by

no test coverage detected