start method
void
start()
Implementation
void start() {
outputStream.writeln("${green.wrap("at_repl started") ?? "at_repl started"}. ${cyan.wrap("Type /help for available commands or /quit to quit.") ?? "Type /help for available commands or /quit to quit."}");
_showPrompt();
inputStream.listen((String input) {
input = input.trim();
if (input.isEmpty) {
_showPrompt();
return;
}
// Check if we're in interactive mode
if (currentSession != null && currentSession!.isActive) {
final continueSession = currentSession!.handleInput(input);
if (!continueSession || !currentSession!.isActive) {
currentSession = null;
currentMode = ReplMode.main;
}
_showPrompt();
return;
}
if (input.startsWith('/')) {
_handleCommand(input);
} else {
_handleRawProtocolCommand(input);
}
_showPrompt();
});
}