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

Method _update_files

aider/coders/wholefile_func_coder.py:110–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 return "\n".join(show_diff)
109
110 def _update_files(self):
111 name = self.partial_response_function_call.get("name")
112 if name and name != "write_file":
113 raise ValueError(f'Unknown function_call name="{name}", use name="write_file"')
114
115 args = self.parse_partial_args()
116 if not args:
117 return
118
119 files = args.get("files", [])
120
121 edited = set()
122 for file_upd in files:
123 path = file_upd.get("path")
124 if not path:
125 raise ValueError(f"Missing path parameter: {file_upd}")
126
127 content = file_upd.get("content")
128 if not content:
129 raise ValueError(f"Missing content parameter: {file_upd}")
130
131 if self.allowed_to_edit(path, content):
132 edited.add(path)
133
134 return edited

Callers

nothing calls this directly

Calls 2

parse_partial_argsMethod · 0.80
allowed_to_editMethod · 0.80

Tested by

no test coverage detected