feat: task_list priority filter, session delete confirm, spawn_agent tool restrictions
- task_list: add priority param ('low'/'normal'/'high') alongside existing status filter
- Session delete: inline confirm row (Delete / Cancel) instead of immediate delete
- spawn_agent: allow_tools and deny_tools per-call params; role config remains ceiling;
deny_tools falls back to confirm_deny gate when no explicit tool_list is set
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -693,19 +693,53 @@
|
||||
editBtn.onclick = enterEditMode;
|
||||
|
||||
// ── Delete ───────────────────────────────────────────────
|
||||
delBtn.addEventListener('click', async (e) => {
|
||||
delBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
await fetch(`/sessions/${s.session_id}?${_fileParams}`, { method: 'DELETE' });
|
||||
if (sessionId === s.session_id) {
|
||||
sessionId = null;
|
||||
clear_stored_session();
|
||||
currentHistory = [];
|
||||
messagesEl.innerHTML = '';
|
||||
sessionEl.textContent = '';
|
||||
showToast('Session deleted');
|
||||
|
||||
// Swap row content for inline confirm
|
||||
editBtn.hidden = true;
|
||||
bodyEl.hidden = true;
|
||||
delBtn.hidden = true;
|
||||
|
||||
const confirmRow = document.createElement('div');
|
||||
confirmRow.className = 'session-confirm-row';
|
||||
confirmRow.innerHTML =
|
||||
'<span class="session-confirm-label">Delete this session?</span>';
|
||||
|
||||
const yesBtn = document.createElement('button');
|
||||
yesBtn.className = 'session-confirm-yes';
|
||||
yesBtn.textContent = 'Delete';
|
||||
|
||||
const noBtn = document.createElement('button');
|
||||
noBtn.className = 'session-confirm-no';
|
||||
noBtn.textContent = 'Cancel';
|
||||
|
||||
confirmRow.append(yesBtn, noBtn);
|
||||
item.appendChild(confirmRow);
|
||||
|
||||
function cancelConfirm() {
|
||||
confirmRow.remove();
|
||||
editBtn.hidden = false;
|
||||
bodyEl.hidden = false;
|
||||
delBtn.hidden = false;
|
||||
}
|
||||
const res = await fetch(`/sessions?${_fileParams}`);
|
||||
renderPanel((await res.json()).sessions);
|
||||
|
||||
noBtn.addEventListener('click', (e) => { e.stopPropagation(); cancelConfirm(); });
|
||||
|
||||
yesBtn.addEventListener('click', async (e) => {
|
||||
e.stopPropagation();
|
||||
await fetch(`/sessions/${s.session_id}?${_fileParams}`, { method: 'DELETE' });
|
||||
if (sessionId === s.session_id) {
|
||||
sessionId = null;
|
||||
clear_stored_session();
|
||||
currentHistory = [];
|
||||
messagesEl.innerHTML = '';
|
||||
sessionEl.textContent = '';
|
||||
showToast('Session deleted');
|
||||
}
|
||||
const res = await fetch(`/sessions?${_fileParams}`);
|
||||
renderPanel((await res.json()).sessions);
|
||||
});
|
||||
});
|
||||
|
||||
sessionsPanel.appendChild(item);
|
||||
|
||||
Reference in New Issue
Block a user