// CLI History View
// Standalone view for CLI execution history with batch delete support
// ========== Multi-Select State ==========
var selectedExecutions = new Set();
var isMultiSelectMode = false;
// ========== Rendering ==========
async function renderCliHistoryView() {
var container = document.getElementById('mainContent');
if (!container) return;
// Hide stats grid and search for History view
var statsGrid = document.getElementById('statsGrid');
var searchInput = document.getElementById('searchInput');
if (statsGrid) statsGrid.style.display = 'none';
if (searchInput) searchInput.parentElement.style.display = 'none';
// Load history data
await loadCliHistory();
// Filter by search query
var filteredHistory = cliHistorySearch
? cliExecutionHistory.filter(function(exec) {
return exec.prompt_preview.toLowerCase().includes(cliHistorySearch.toLowerCase()) ||
exec.tool.toLowerCase().includes(cliHistorySearch.toLowerCase());
})
: cliExecutionHistory;
var historyHtml = '';
if (cliExecutionHistory.length === 0) {
historyHtml = '