Add conversations modal

This commit is contained in:
dwrz
2026-10-30 23:06:25 +00:00
parent e1457b5130
commit 9020167a92
7 changed files with 429 additions and 1 deletions
+21
View File
@@ -55,6 +55,27 @@ export class Api {
// --- Conversations ---
/**
* listConversations returns every conversation of the user, most
* recently updated first. Each row holds id, title, created_at,
* and updated_at. It holds no messages.
* @returns {Promise<Array<Object>>}
*/
async listConversations() {
return this._json('/conversations');
}
/**
* getConversation returns one conversation row. Use it to verify
* that a conversation exists before the local selection moves to
* it. It returns no messages.
* @param {string} id
* @returns {Promise<Object>}
*/
async getConversation(id) {
return this._json(`/conversations/${encodeURIComponent(id)}`);
}
/**
* createConversation saves a new conversation with its initial
* system message. An empty systemMessage makes the server use its