Sessions: edit form, soft-delete, lazy creation, chat as separate page

- Session click opens edit form (name, description, image, agent) instead of chat
- Chat is now a separate route (#chat/{id}), opened via button
- Sessions created on save, not on click
- Soft-delete for sessions (is_deleted flag)
- Delete button in session form
- Removed title double-click editing from chat
- Card images now square (aspect-ratio: 1)
- New Session as placeholder card
This commit is contained in:
Meleki committed 2026-02-26 21:25:35 +01:00
1 parent 449c872296
commit a90b9427a5
10 files changed
+340 -188

No files matched your search

+10 -2
View File
@@ -76,8 +76,12 @@ async function apiGetSessions() {
return resp.json();
}
async function apiCreateSession() {
const resp = await fetch('/api/sessions', { method: 'POST' });
async function apiCreateSession(data = {}) {
const resp = await fetch('/api/sessions', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
});
return resp.json();
}
@@ -87,6 +91,10 @@ async function apiGetSession(sessionId) {
return resp.json();
}
async function apiDeleteSession(sessionId) {
return fetch(`/api/sessions/${sessionId}`, { method: 'DELETE' });
}
async function apiUpdateSession(sessionId, data) {
const resp = await fetch(`/api/sessions/${sessionId}`, {
method: 'PUT',