MCPcopy Create free account
hub / github.com/Louisym/MiniCC / _default_executor

Method _default_executor

tutorials/13_multi_agent_coordination.py:281–289  ·  view source on GitHub ↗

模拟执行任务

(self, task: str)

Source from the content-addressed store, hash-verified

279 self.executor = executor or self._default_executor
280
281 def _default_executor(self, task: str) -> str:
282 """模拟执行任务"""
283 if "search" in task.lower() or "find" in task.lower():
284 return "Found 3 relevant files: auth.py, login.py, session.py"
285 elif "test" in task.lower():
286 return "All 12 tests passed. Coverage: 87%"
287 elif "fix" in task.lower() or "implement" in task.lower():
288 return "Changes applied to 2 files. See diff above."
289 return f"Task completed: {task[:50]}"
290
291 def process_messages(self):
292 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected