feat: a new chat is named by the model in two or three words, asked aside; the machine's name gets its room in the chat's header
This commit is contained in:
1 parent
6442c39360
commit
80ed7d4ffa
4 files changed
+90
-3
No files matched your search
@@ -483,7 +483,11 @@
|
||||
});
|
||||
// A new chat gets its id (and its name) from the answer.
|
||||
const cid = Number(r.headers.get('X-Chat-Id')) || 0;
|
||||
if (cid && cid !== chatId) { setChat(cid); loadChats(); }
|
||||
if (cid && cid !== chatId) {
|
||||
setChat(cid); loadChats();
|
||||
// The model names the new chat a moment later.
|
||||
setTimeout(loadChats, 4000); setTimeout(loadChats, 12000);
|
||||
}
|
||||
if (r.redirected && new URL(r.url).pathname === '/login') { location.href = '/login'; return; }
|
||||
const contentType = r.headers.get('content-type') || '';
|
||||
if (!r.ok) throw new Error(responseError(r.status, contentType, await r.text()));
|
||||
|
||||
Reference in new issue
Block a user