diff --git a/client/main.tsx b/client/main.tsx
index bb4263a..d813fef 100644
--- a/client/main.tsx
+++ b/client/main.tsx
@@ -49,7 +49,9 @@ function conversationUI(id: string) {
const scrolledToBottom =
chatlog.scrollTop + 16 >= chatlog.scrollHeight - chatlog.clientHeight;
- if ("u" in message) {
+ if ("i" in message) {
+ window.history.replaceState(null, "", "#" + message.i);
+ } else if ("u" in message) {
chatlog.append({message.u});
} else if ("f" in message) {
chatlog.append({message.f});
diff --git a/server/inference.py b/server/inference.py
index 46e75d9..332a2ba 100644
--- a/server/inference.py
+++ b/server/inference.py
@@ -42,6 +42,9 @@ async def connect_to_conversation(ws: WebSocket):
await ws.send_text(json({"u": response.prompt.prompt})) # user
await ws.send_text(json({"f": response.text_or_raise()})) # full
+ if conversation_id == "new":
+ await ws.send_text(json({"i": conversation.id}))
+
async for message in ws.iter_text():
response = conversation.prompt(message, system=system_prompt, stream=True)
system_prompt = None