waver : add shortcuts to delete messages

This commit is contained in:
Georgi Gerganov
2021-02-28 17:27:07 +02:00
parent b1240da806
commit 9ea6aed9d1

View File

@@ -866,6 +866,19 @@ void renderMain() {
static std::vector<Message> messageHistory;
static std::string inputLast = "";
// keyboard shortcuts:
if (ImGui::IsKeyPressed(62)) {
printf("F5 pressed : clear message history\n");
messageHistory.clear();
}
if (ImGui::IsKeyPressed(63)) {
if (messageHistory.size() > 0) {
printf("F6 pressed : delete last message\n");
messageHistory.erase(messageHistory.end() - 1);
}
}
if (stateCurrent.update) {
if (stateCurrent.flags.newMessage) {
scrollMessagesToBottom = true;