static void ai_activeSpec_answerOnChat(S s) { S response = ""; { lock ai_activeSpecLock(); if (has(s, "should be", "answered in the chat") && !has(s, "was", "answered in the chat")) { L answers = ai_texts("$X", "answers external question", s); if (empty(answers)) answers = unquoteAll(ai_texts_multi("$X", "answers", ll(s, quote(s)))); //print("activeSpec: have answers " + answers); if (nempty(answers)) { ai_invalidateTriple(s, "should be", "answered in the chat"); response = s + "\n=> " + joinWithComma(answers); } } } if (nempty(response) && postToStefansChat(response)) post(s, "was", "answered in the chat"); }