MCPcopy Create free account
hub / github.com/modelscope/ms-agent / cleanup

Method cleanup

ms_agent/skill/container.py:1432–1443  ·  view source on GitHub ↗

Clean up workspace directory. Args: keep_spec: If True, saves spec before cleanup.

(self, keep_spec: bool = True)

Source from the content-addressed store, hash-verified

1430 logger.info(f'Saved execution spec to: {output_path}')
1431
1432 def cleanup(self, keep_spec: bool = True):
1433 """
1434 Clean up workspace directory.
1435
1436 Args:
1437 keep_spec: If True, saves spec before cleanup.
1438 """
1439 if keep_spec:
1440 self.save_spec_log()
1441 if self.workspace_dir.exists():
1442 shutil.rmtree(self.workspace_dir)
1443 logger.info(f'Cleaned up workspace: {self.workspace_dir}')

Callers

nothing calls this directly

Calls 1

save_spec_logMethod · 0.95

Tested by

no test coverage detected