2025-07-16 14:45:45 +02:00
|
|
|
import argparse, times, strformat, terminal, sequtils
|
2025-07-15 23:26:54 +02:00
|
|
|
import ../../types
|
2025-07-16 14:45:45 +02:00
|
|
|
import ../utils
|
2025-05-18 12:51:26 +02:00
|
|
|
|
2025-07-15 23:26:54 +02:00
|
|
|
proc createTask*(cq: Conquest, command: CommandType, args: string, message: string) =
|
|
|
|
|
let
|
|
|
|
|
date = now().format("dd-MM-yyyy HH:mm:ss")
|
|
|
|
|
task = Task(
|
2025-07-16 14:45:45 +02:00
|
|
|
id: generateUUID(),
|
2025-07-15 23:26:54 +02:00
|
|
|
agent: cq.interactAgent.name,
|
|
|
|
|
command: command,
|
|
|
|
|
args: args,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cq.interactAgent.tasks.add(task)
|
2025-07-16 12:32:01 +02:00
|
|
|
cq.writeLine(fgBlack, styleBright, fmt"[{date}] [*] ", resetStyle, message)
|