MCPcopy Index your code
hub / github.com/BasicProtein/AugmentCode-Free / run

Method run

gui_qt6/patch_worker.py:165–197  ·  view source on GitHub ↗

执行扫描操作

(self)

Source from the content-addressed store, hash-verified

163 self.extension_finder = ExtensionFinder()
164
165 def run(self):
166 """执行扫描操作"""
167 try:
168 self.progress_updated.emit(get_text("patch.scanning"))
169
170 results = {}
171
172 for ide_type in self.ide_types:
173 self.progress_updated.emit(get_text("patch.scanning_ide", ide_type=ide_type.value))
174
175 portable_root = self.portable_roots.get(ide_type)
176 extension_files = self.extension_finder.find_extension_files(ide_type, portable_root)
177
178 ide_results = []
179 for file_path in extension_files:
180 status = self.patch_manager.get_patch_status(file_path)
181 ide_results.append({
182 'path': file_path,
183 'status': status
184 })
185 self.file_found.emit(ide_type.value, file_path, status)
186
187 results[ide_type.value] = ide_results
188 self.progress_updated.emit(get_text("patch.scan_completed",
189 ide_type=ide_type.value, count=len(extension_files)))
190
191 self.progress_updated.emit(get_text("patch.scan_finished"))
192 self.scan_completed.emit(results)
193
194 except Exception as e:
195 error_msg = get_text("patch.scan_error", error=str(e))
196 self.progress_updated.emit(f"❌ {error_msg}")
197 self.scan_completed.emit({})
198
199
200class BatchPatchWorker(QThread):

Callers

nothing calls this directly

Calls 3

get_textFunction · 0.90
find_extension_filesMethod · 0.80
get_patch_statusMethod · 0.80

Tested by

no test coverage detected