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

Method handle_context_run_task

source/MaaAgentClient/Client/AgentClient.cpp:516–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516bool AgentClient::handle_context_run_task(const json::value& j)
517{
518 if (!j.is<ContextRunTaskReverseRequest>()) {
519 return false;
520 }
521
522 const ContextRunTaskReverseRequest& req = j.as<ContextRunTaskReverseRequest>();
523 LogFunc << VAR(req) << VAR(ipc_addr_);
524
525 MaaContext* context = query_context(req.context_id);
526 if (!context) {
527 LogError << "context not found" << VAR(req.context_id);
528 return false;
529 }
530
531 auto task_id = context->run_task(req.entry, req.pipeline_override);
532
533 ContextRunTaskReverseResponse resp {
534 .task_id = task_id,
535 };
536 send(resp);
537
538 return true;
539}
540
541bool AgentClient::handle_context_run_recognition(const json::value& j)
542{

Callers

nothing calls this directly

Calls 1

run_taskMethod · 0.45

Tested by

no test coverage detected