MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / handle_context_clone

Method handle_context_clone

source/MaaAgentClient/Client/AgentClient.cpp:748–771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748bool AgentClient::handle_context_clone(const json::value& j)
749{
750 if (!j.is<ContextCloneReverseRequest>()) {
751 return false;
752 }
753
754 const ContextCloneReverseRequest& req = j.as<ContextCloneReverseRequest>();
755 LogFunc << VAR(req) << VAR(ipc_addr_);
756
757 MaaContext* context = query_context(req.context_id);
758 if (!context) {
759 LogError << "context not found" << VAR(req.context_id);
760 return false;
761 }
762
763 MaaContext* clone = context->clone();
764
765 ContextCloneReverseResponse resp {
766 .clone_id = context_id(clone),
767 };
768 send(resp);
769
770 return true;
771}
772
773bool AgentClient::handle_context_task_id(const json::value& j)
774{

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected