Archiv-System: Clear archiviert, Button lädt ältere Archive chronologisch, kein Limit
This commit is contained in:
1 parent
fb2c3a0720
commit
843c210209
9 files changed
+363
-129
No files matched your search
+18
-2
@@ -8,8 +8,8 @@ async function apiChat(model, messages, systemPrompt) {
|
||||
});
|
||||
}
|
||||
|
||||
async function apiHistory(sessionId = 'null', limit = 50) {
|
||||
const resp = await fetch(`/api/history?sessionId=${sessionId}&limit=${limit}`);
|
||||
async function apiHistory(sessionId = 'null') {
|
||||
const resp = await fetch(`/api/history?sessionId=${sessionId}`);
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
@@ -17,3 +17,19 @@ async function apiHistoryPoll(afterId) {
|
||||
const resp = await fetch(`/api/history/poll?afterId=${afterId}`);
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiArchive() {
|
||||
const resp = await fetch('/api/archive', { method: 'POST' });
|
||||
if (resp.status === 204) return null;
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiListArchives() {
|
||||
const resp = await fetch('/api/archives');
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiGetArchive(archiveId) {
|
||||
const resp = await fetch(`/api/archive/${archiveId}`);
|
||||
return resp.json();
|
||||
}
|
||||
Reference in new issue
Block a user