Right now we handle the input defence detection in handleHigherLevelChat(), but the output defence detection in chatGptSendMessage(), which strikes me as out of place. I'd like to move the output defence detection up to handleHigherLevelChat(). Which will make chatGptSendMessage() responsible for one thing fewer 👍
Also move the logic to detect output defences into defence.ts
while we're here, can we rename detectTriggeredDefences() to detectTriggeredInputDefences()
Right now we handle the input defence detection in
handleHigherLevelChat()
, but the output defence detection inchatGptSendMessage()
, which strikes me as out of place. I'd like to move the output defence detection up tohandleHigherLevelChat()
. Which will makechatGptSendMessage()
responsible for one thing fewer 👍Also move the logic to detect output defences into defence.ts
while we're here, can we rename
detectTriggeredDefences()
todetectTriggeredInputDefences()
AC
Refactor ticket, so just regression testing here.