Reworked logging system to work with new GUI.

This commit is contained in:
Jakob Friedl
2025-10-02 13:51:04 +02:00
parent ab48bc5795
commit d02808a6d3
5 changed files with 46 additions and 27 deletions

View File

@@ -48,12 +48,13 @@ proc sendAgentBuild*(connection: WsConnection, buildInformation: AgentBuildInfor
)
connection.ws.sendEvent(event, connection.sessionKey)
proc sendAgentTask*(connection: WsConnection, agentId: string, task: Task) =
proc sendAgentTask*(connection: WsConnection, agentId: string, command: string, task: Task) =
let event = Event(
eventType: CLIENT_AGENT_TASK,
timestamp: now().toTime().toUnix(),
data: %*{
"agentId": agentId,
"command": command,
"task": task
}
)