(
self,
code_dir: Path,
config: ResearchConfig,
log_fn: Any = None,
)
| 178 | """LLM-powered interactive code editor with backup/rollback.""" |
| 179 | |
| 180 | def __init__( |
| 181 | self, |
| 182 | code_dir: Path, |
| 183 | config: ResearchConfig, |
| 184 | log_fn: Any = None, |
| 185 | ) -> None: |
| 186 | self.code_dir = code_dir.resolve() |
| 187 | self.snapshot_mgr = CodeSnapshotManager(self.code_dir) |
| 188 | self.config = config |
| 189 | self.dispatcher = ModelDispatcher(config) |
| 190 | self._log = log_fn or (lambda msg: None) |
| 191 | self._history: list[dict[str, str]] = [] |
| 192 | |
| 193 | async def preview_instruction(self, instruction: str) -> dict[str, Any]: |
| 194 | """Dry-run: ask LLM for edits but do NOT apply them. |
nothing calls this directly
no test coverage detected