Adicionar file explorer para projetos criados pelos agentes

This commit is contained in:
Frederico Castro
2026-02-28 01:38:26 -03:00
parent 3ed285c9d1
commit 96733b55cd
6 changed files with 451 additions and 4 deletions

View File

@@ -17,10 +17,11 @@ const App = {
webhooks: 'Webhooks',
terminal: 'Terminal',
history: 'Histórico',
files: 'Projetos',
settings: 'Configurações',
},
sections: ['dashboard', 'agents', 'tasks', 'schedules', 'pipelines', 'webhooks', 'terminal', 'history', 'settings'],
sections: ['dashboard', 'agents', 'tasks', 'schedules', 'pipelines', 'webhooks', 'terminal', 'history', 'files', 'settings'],
init() {
if (App._initialized) return;
@@ -113,6 +114,7 @@ const App = {
case 'pipelines': await PipelinesUI.load(); break;
case 'webhooks': await WebhooksUI.load(); break;
case 'history': await HistoryUI.load(); break;
case 'files': await FilesUI.load(); break;
case 'settings': await SettingsUI.load(); break;
}
} catch (err) {
@@ -763,6 +765,18 @@ const App = {
}
});
document.getElementById('files-container')?.addEventListener('click', (e) => {
const el = e.target.closest('[data-action]');
if (!el) return;
e.preventDefault();
const { action, path } = el.dataset;
switch (action) {
case 'navigate-files': FilesUI.navigate(path || ''); break;
case 'download-file': FilesUI.downloadFile(path); break;
case 'download-folder': FilesUI.downloadFolder(path); break;
}
});
document.getElementById('pipeline-steps-container')?.addEventListener('click', (e) => {
const btn = e.target.closest('[data-step-action]');
if (!btn) return;