feat: File-Explorer für Agent-Ordner im Agent-Formular

This commit is contained in:
Meleki committed 2026-03-01 15:48:13 +01:00
1 parent 8e585443e2
commit 58c5ccb79b
4 files changed
+192 -4

No files matched your search

+8
View File
@@ -33,6 +33,8 @@ registerPage('agent', {
const deleteBtn = document.getElementById('agentDeleteBtn');
const commandsList = document.getElementById('agentCommandsList');
const addCommandBtn = document.getElementById('agentAddCommandBtn');
const filesSection = document.getElementById('agentFilesSection');
const filesBtn = document.getElementById('agentFilesBtn');
_agentAvatarData = null;
@@ -49,6 +51,7 @@ registerPage('agent', {
useMemoryEl.checked = agent.useMemory !== false;
_agentAvatarData = agent.avatar || null;
deleteBtn.hidden = false;
filesSection.hidden = false;
if (agent.avatar) {
avatarPreview.innerHTML = `<img src="${agent.avatar}" alt="Avatar">`;
@@ -58,6 +61,11 @@ registerPage('agent', {
loadCommandsIntoUI(commandsList, agent.customCommands);
}
// Agent-Dateien öffnen
filesBtn.addEventListener('click', () => {
openFileExplorer({ agentId: agentId });
});
// Befehl hinzufügen
addCommandBtn.addEventListener('click', () => createCommandRow(commandsList));