The prompt is part of the response from the device, but there is nothing in the response to indicate which part of the response is the actual response and which part is the prompt.
The basic approach in DetectPrompt method is to send the "Enter" key and wait for the server to respond with some common prompt-like pattern. It's a bit more complex than this, but this is the main approach.
But if you simply need to retrieve an already-detected prompt, then try using WaitFor instead of ReadUntil. Unlike ReadUntil, the WaitFor method will return an instance of ScriptMatch, which makes it possible to determine what was actually matched. (And to get the response received before the match, use Scripting object's ReceivedData property.)