MCPcopy
hub / github.com/Aider-AI/aider / prepare_to_edit

Method prepare_to_edit

aider/coders/base_coder.py:2269–2294  ·  view source on GitHub ↗
(self, edits)

Source from the content-addressed store, hash-verified

2267 self.warning_given = True
2268
2269 def prepare_to_edit(self, edits):
2270 res = []
2271 seen = dict()
2272
2273 self.need_commit_before_edits = set()
2274
2275 for edit in edits:
2276 path = edit[0]
2277 if path is None:
2278 res.append(edit)
2279 continue
2280 if path == "python":
2281 dump(edits)
2282 if path in seen:
2283 allowed = seen[path]
2284 else:
2285 allowed = self.allowed_to_edit(path)
2286 seen[path] = allowed
2287
2288 if allowed:
2289 res.append(edit)
2290
2291 self.dirty_commit()
2292 self.need_commit_before_edits = set()
2293
2294 return res
2295
2296 def apply_updates(self):
2297 edited = set()

Callers 1

apply_updatesMethod · 0.95

Calls 3

allowed_to_editMethod · 0.95
dirty_commitMethod · 0.95
dumpFunction · 0.90

Tested by

no test coverage detected