Warning: session_start(): open(/var/lib/php/sessions/sess_deto6a9djmplvntuult5ta8vjm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
srecord Line (
S type, // 'user, 'suggestion, 'bot, 'metaComment
S text
) {}
concept Interaction {
new L lines;
}
sS lineToString(Line line) {
ret lpad(10, firstToUpper(replaceCompleteValue(line.type, 'metaComment, 'comment))) + ": " + line.text;
}
module TrainedInteractions > DynCRUD {
*() { super(Interaction); }
// API
void addInteraction(O interaction) {
L lines = cast get(interaction, 'lines);
cnew(Interaction, lines := map(lines, func(O line) -> Line {
shallowCloneToClassWithFields(line, Line, 'type, 'text)
});
}
}