MCPcopy
hub / github.com/HKUDS/OpenHarness / _runtime_system_prompt

Method _runtime_system_prompt

ohmo/gateway/runtime.py:660–674  ·  view source on GitHub ↗
(self, bundle: RuntimeBundle, latest_user_prompt: str | None)

Source from the content-addressed store, hash-verified

658 return refreshed
659
660 def _runtime_system_prompt(self, bundle: RuntimeBundle, latest_user_prompt: str | None) -> str:
661 bundle_cwd = str(Path(getattr(bundle, "cwd", self._cwd)).resolve())
662 if not hasattr(bundle, "current_settings"):
663 return build_ohmo_system_prompt(bundle_cwd, workspace=self._workspace, extra_prompt=None)
664 settings = bundle.current_settings()
665 if not hasattr(settings, "system_prompt"):
666 return build_ohmo_system_prompt(bundle_cwd, workspace=self._workspace, extra_prompt=None)
667 return build_runtime_system_prompt(
668 settings,
669 cwd=bundle_cwd,
670 latest_user_prompt=latest_user_prompt,
671 extra_skill_dirs=getattr(bundle, "extra_skill_dirs", ()),
672 extra_plugin_roots=getattr(bundle, "extra_plugin_roots", ()),
673 include_project_memory=False,
674 )
675
676 def _cwd_for_message(self, message: InboundMessage) -> str:
677 record = load_managed_group_record(

Callers 5

get_bundleMethod · 0.95
_save_snapshotMethod · 0.95
_refresh_bundleMethod · 0.95

Calls 3

build_ohmo_system_promptFunction · 0.90
current_settingsMethod · 0.80

Tested by

no test coverage detected