memory view in chat client
This commit is contained in:
@@ -222,7 +222,7 @@ export async function updateSessionProject(sessionId, projectId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getEpisodes({ limit = 50, offset = 0, sessionId, q } = {}) {
|
export async function getEpisodes({ limit = 50, offset = 0, sessionId, q } = {}) {
|
||||||
const url = new URL(`${BASE}/episodes`);
|
const url = new URL(`${BASE_URL}/episodes`, window.location.origin);
|
||||||
url.searchParams.set('limit', limit);
|
url.searchParams.set('limit', limit);
|
||||||
url.searchParams.set('offset', offset);
|
url.searchParams.set('offset', offset);
|
||||||
if (sessionId) url.searchParams.set('sessionId', sessionId);
|
if (sessionId) url.searchParams.set('sessionId', sessionId);
|
||||||
@@ -234,6 +234,6 @@ export async function getEpisodes({ limit = 50, offset = 0, sessionId, q } = {})
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteEpisode(id) {
|
export async function deleteEpisode(id) {
|
||||||
const res = await fetch(`${BASE}/episodes/${id}`, { method: 'DELETE' });
|
const res = await fetch(`${BASE_URL}/episodes/${id}`, { method: 'DELETE' });
|
||||||
if (!res.ok) throw new Error(`Failed to delete episode: ${res.status}`);
|
if (!res.ok) throw new Error(`Failed to delete episode: ${res.status}`);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user