Histórico persistente de execuções com visualização detalhada
- Novo executionsStore em db.js com cache in-memory e escrita debounced - Camada de cache (src/cache/index.js) com TTL e suporte opcional a Redis - Persistência de execuções de agentes e pipelines com metadados completos - Pipeline grava cada etapa com prompt, resultado, timestamps e status - 4 endpoints REST: listagem paginada com filtros, detalhe, exclusão individual e limpeza total - Componente frontend (history.js) com cards, filtros, paginação e modal de detalhe - Timeline visual para pipelines com prompts colapsáveis por etapa - Correção do executor: --max-turns em vez de --max-tokens, --permission-mode bypassPermissions - Refatoração do scheduler com persistência melhorada e graceful shutdown
This commit is contained in:
@@ -12,6 +12,7 @@ const App = {
|
||||
schedules: 'Agendamentos',
|
||||
pipelines: 'Pipelines',
|
||||
terminal: 'Terminal',
|
||||
history: 'Histórico',
|
||||
settings: 'Configurações',
|
||||
},
|
||||
|
||||
@@ -70,6 +71,7 @@ const App = {
|
||||
case 'tasks': await TasksUI.load(); break;
|
||||
case 'schedules': await SchedulesUI.load(); break;
|
||||
case 'pipelines': await PipelinesUI.load(); break;
|
||||
case 'history': await HistoryUI.load(); break;
|
||||
case 'settings': await SettingsUI.load(); break;
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -363,6 +365,32 @@ const App = {
|
||||
PipelinesUI.filter(document.getElementById('pipelines-search')?.value);
|
||||
});
|
||||
|
||||
on('history-search', 'input', () => {
|
||||
HistoryUI.filter(
|
||||
document.getElementById('history-search')?.value,
|
||||
document.getElementById('history-filter-type')?.value,
|
||||
document.getElementById('history-filter-status')?.value
|
||||
);
|
||||
});
|
||||
|
||||
on('history-filter-type', 'change', () => {
|
||||
HistoryUI.filter(
|
||||
document.getElementById('history-search')?.value,
|
||||
document.getElementById('history-filter-type')?.value,
|
||||
document.getElementById('history-filter-status')?.value
|
||||
);
|
||||
});
|
||||
|
||||
on('history-filter-status', 'change', () => {
|
||||
HistoryUI.filter(
|
||||
document.getElementById('history-search')?.value,
|
||||
document.getElementById('history-filter-type')?.value,
|
||||
document.getElementById('history-filter-status')?.value
|
||||
);
|
||||
});
|
||||
|
||||
on('history-clear-btn', 'click', () => HistoryUI.clearHistory());
|
||||
|
||||
document.getElementById('agents-grid')?.addEventListener('click', (e) => {
|
||||
const btn = e.target.closest('[data-action]');
|
||||
if (!btn) return;
|
||||
@@ -419,6 +447,16 @@ const App = {
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('history-list')?.addEventListener('click', (e) => {
|
||||
const btn = e.target.closest('[data-action]');
|
||||
if (!btn) return;
|
||||
const { action, id } = btn.dataset;
|
||||
switch (action) {
|
||||
case 'view-execution': HistoryUI.viewDetail(id); break;
|
||||
case 'delete-execution': HistoryUI.deleteExecution(id); break;
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('pipeline-steps-container')?.addEventListener('click', (e) => {
|
||||
const btn = e.target.closest('[data-step-action]');
|
||||
if (!btn) return;
|
||||
|
||||
Reference in New Issue
Block a user