MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / handle_user_input

Function handle_user_input

smallthinker/tools/run/run.cpp:1093–1100  ·  view source on GitHub ↗

Helper function to handle user input

Source from the content-addressed store, hash-verified

1091
1092// Helper function to handle user input
1093static int handle_user_input(std::string & user_input, const std::string & user) {
1094 if (!user.empty()) {
1095 user_input = user;
1096 return 0; // No need for interactive input
1097 }
1098
1099 return read_user_input(user_input); // Returns true if input ends the loop
1100}
1101
1102static bool is_stdin_a_terminal() {
1103#if defined(_WIN32)

Callers 1

get_user_inputFunction · 0.85

Calls 2

read_user_inputFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected