[AESH-25] [AESH-46]
fix the prompt to show ansi text even after text have been edited
extend its current api to make it ready for curses