MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / add_to_history

Method add_to_history

src/runner/cli_wide.cpp:218–237  ·  view source on GitHub ↗

\brief Add command to history

Source from the content-addressed store, hash-verified

216
217/// \brief Add command to history
218void CLIWide::add_to_history(const std::string& command) {
219 if (command.empty()) return;
220
221 // Remove duplicate if it exists
222 auto it = std::find(command_history.begin(), command_history.end(), command);
223 if (it != command_history.end()) {
224 command_history.erase(it);
225 }
226
227 // Add to end
228 command_history.push_back(command);
229
230 // Limit history size
231 while (command_history.size() > max_history_size) {
232 command_history.pop_front();
233 }
234
235 // Reset history navigation index
236 history_index = -1;
237}
238
239/// \brief Move cursor to specific column
240void CLIWide::move_cursor_to_column(int column) {

Callers

nothing calls this directly

Calls 7

eraseMethod · 0.80
push_backMethod · 0.80
findFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected