eleven / ocho Public

Remove more errant apps/todo references

Thanks for the crappy merge, Claude!
James Adam 64a8d1eb1875415d8289e9f55047af26a4bed24b parent ded0920
1 file changed, +0 −17
  • web/static/chat.js +0 −17
diff --git a/web/static/chat.js b/web/static/chat.js
index 5ed746a..ad56628 100644
--- a/web/static/chat.js
+++ b/web/static/chat.js
@@ -1483,12 +1483,10 @@ async function openThread(id) {
// cascade of visible layout shift on first open. A detached fragment never
// paints mid-build, so the feed appears complete, already at the latest message.
const frag = document.createDocumentFragment();
- resetThread(id); // fold this thread's app state fresh from the loaded window
for (const m of r.messages || []) await appendMessage(id, m, false, frag, cache);
if (myOpen !== openSeq) return; // switched away mid-build — don't attach a stale feed
feed.appendChild(frag);
cache.loaded = true;
- if (id === activeId) renderActiveSurfaces(); // paint app panels from the folded state
} catch (e) {
console.error("load messages", e);
}
@@ -2428,11 +2426,6 @@ function sendMessage(raw) {
// send button is greyed meanwhile, but Enter can still land here.
if (!activeId || !ws || ws.readyState !== WebSocket.OPEN) return false;
- // A slash command handled by a mini-app (e.g. "/todo buy milk"): emit its
- // event instead of sending a chat message. Skipped while editing so you can
- // still edit a message whose text starts with "/".
- if (editing == null && runCommand(text, activeId)) return true;
-
// Editing an existing message: re-encrypt the original payload with new text
// (preserving its name + any attachments) and send an edit.
if (editing != null) {
@@ -3049,16 +3042,6 @@ function connectWS() {
try {
payload = await decrypt(threadKeys[tid], msg.blob);
} catch {}
- // A mini-app event, not a chat message: fold it (so the app's state stays
- // current) but never mark unread, preview, or notify — it's not a message.
- if (payload && isAppType(payload.type)) {
- if (tid === activeId) await appendMessage(tid, msg, true);
- else foldEvent(tid, payload, { id: msg.id, ts: payload.ts });
- const at = threads.find((x) => x.id === tid);
- if (at) at.last_at = msg.created_at || Math.floor(Date.now() / 1000);
- renderThreadList();
- return;
- }
if (tid === activeId) {
await appendMessage(tid, msg, true);
} else {