mirror of
https://github.com/ggerganov/wave-share.git
synced 2026-02-06 01:16:13 +08:00
add option to resend last input
This commit is contained in:
9
main.cpp
9
main.cpp
@@ -994,12 +994,19 @@ int main(int argc, char** argv) {
|
||||
};
|
||||
printf("\n");
|
||||
std::thread inputThread([]() {
|
||||
std::string inputOld = "";
|
||||
while (true) {
|
||||
std::string input;
|
||||
std::cout << "Enter text: ";
|
||||
getline(std::cin, input);
|
||||
if (input.empty()) {
|
||||
std::cout << "Re-sending ... " << std::endl;
|
||||
input = inputOld;
|
||||
} else {
|
||||
std::cout << "Sending ... " << std::endl;
|
||||
}
|
||||
setText(input.size(), input.data());
|
||||
std::cout << "Sending ... " << std::endl;
|
||||
inputOld = input;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user