To preserve last typed prompt messages for chat being switched
These are all versions of this script. Show only the versions where the code changed.