TsgcWSAPIClient_MCP › Events › OnMCPTaskStatus
Fires when the status of a task changes.
property OnMCPTaskStatus: TsgcAI_MCP_Client_OnTaskEvent;
// TsgcAI_MCP_Client_OnTaskEvent = procedure(Sender: TObject; const aTask: TsgcAI_MCP_Client_Task) of object
—
Raised by the poller (MCPOptions.Tasks.AutoPoll) when the status, the status message or the requested inputs change, and by every call to TasksGet.
When raised by the poller the event runs in the background thread of the task; use TThread.Queue or TThread.Synchronize to update visual controls. See Tasks.
procedure TMainForm.MCPTaskStatus(Sender: TObject;
const aTask: TsgcAI_MCP_Client_Task);
begin
Log(aTask.TaskId + ': ' + aTask.StatusMessage);
end;