MCPcopy Create free account
hub / github.com/github/copilot-sdk / read_file

Method read_file

python/copilot/session_fs_provider.py:167–173  ·  view source on GitHub ↗
(self, params: Any)

Source from the content-addressed store, hash-verified

165 self._p = provider
166
167 async def read_file(self, params: Any) -> SessionFSReadFileResult:
168 try:
169 content = await self._p.read_file(params.path)
170 return SessionFSReadFileResult.from_dict({"content": content})
171 except Exception as exc:
172 err = _to_session_fs_error(exc)
173 return SessionFSReadFileResult.from_dict({"content": "", "error": err.to_dict()})
174
175 async def write_file(self, params: Any) -> SessionFSError | None:
176 try:

Callers

nothing calls this directly

Calls 4

_to_session_fs_errorFunction · 0.85
read_fileMethod · 0.45
from_dictMethod · 0.45
to_dictMethod · 0.45

Tested by

no test coverage detected