Fixed issue that caused assembly execution to fail when used more than once in a session.

This commit is contained in:
Jakob Friedl
2025-09-13 14:14:21 +02:00
parent 94f2f8121c
commit b7b9114258
3 changed files with 29 additions and 17 deletions

View File

@@ -12,11 +12,9 @@ proc makeAgentLogDirectory*(cq: Conquest, agentId: string): bool =
return false
proc log*(cq: Conquest, logEntry: string) =
let
# TODO: Fix issue where log files are written to the wrong agent when the interact agent is changed in the middle of command execution
# Though that problem would not occur when a proper GUI is used in the future
date = now().format("dd-MM-yyyy")
agentLogPath = fmt"{CONQUEST_ROOT}/data/logs/{cq.interactAgent.agentId}/{date}.session.log"
# TODO: Fix issue where log files are written to the wrong agent when the interact agent is changed in the middle of command execution
# Though that problem would not occur when a proper GUI is used in the future
let agentLogPath = fmt"{CONQUEST_ROOT}/data/logs/{cq.interactAgent.agentId}/session.log"
# Write log entry to file
let file = open(agentLogPath, fmAppend)