ONLY DO AFTER #705 #707 #708
Currently, the chatGptSendMessage in openai.ts returns the entire chat history for the level. Instead, just have it return any new chat messages, and have the chat controller append them to the chat history.
Additional context
This must be done after #705 and #708 because those are modifying the return type of chatGptSendMessage.
For this to be done, the logic that adds/removes the system role from the chat must be moved out of openai.ts, and into the chat controller. This is a more natural place for it to be, anyway. THIS IS ACTUALLY COVERED IN #707
Once this is done, the chat controller will be the only place that new messages are added to the chat history, meaning the pushMessageToHistory can be moved into the controller.
Acceptance criteria
Refactor ticket, so regression testing. Especially around chatting with the bot and getting the right replies. Also worth checking that the history is as expected after refreshing and changing levels.
Feature Request
Description
ONLY DO AFTER #705 #707 #708 Currently, the
chatGptSendMessage
in openai.ts returns the entire chat history for the level. Instead, just have it return any new chat messages, and have the chat controller append them to the chat history.Additional context
chatGptSendMessage
.pushMessageToHistory
can be moved into the controller.Acceptance criteria
Refactor ticket, so regression testing. Especially around chatting with the bot and getting the right replies. Also worth checking that the history is as expected after refreshing and changing levels.