Cleaned up utils.nim by removing unnecessary functions.
This commit is contained in:
@@ -123,7 +123,8 @@ proc agentInteract*(cq: Conquest, name: string) =
|
||||
|
||||
while command.replace(" ", "") != "back":
|
||||
command = cq.prompt.readLine()
|
||||
cq.withOutput(handleAgentCommand, command)
|
||||
|
||||
cq.handleAgentCommand(command)
|
||||
|
||||
# Reset interactAgent field after interaction with agent is ended using 'back' command
|
||||
cq.interactAgent = nil
|
||||
|
||||
|
||||
@@ -172,4 +172,4 @@ proc startServer*(profilePath: string) =
|
||||
cq.prompt.showPrompt()
|
||||
|
||||
var command: string = cq.prompt.readLine()
|
||||
cq.withOutput(handleConsoleCommand, command)
|
||||
cq.handleConsoleCommand(command)
|
||||
|
||||
@@ -11,12 +11,6 @@ proc validatePort*(portStr: string): bool =
|
||||
except ValueError:
|
||||
return false
|
||||
|
||||
# Overwrite withOutput function to handle function arguments
|
||||
proc withOutput*(cq: Conquest, outputFunction: proc(cq: Conquest, args: string), args: string) =
|
||||
cq.prompt.hidePrompt()
|
||||
outputFunction(cq, args)
|
||||
cq.prompt.showPrompt()
|
||||
|
||||
# Table border characters
|
||||
type
|
||||
Cell = object
|
||||
|
||||
Reference in New Issue
Block a user