Add the agent scaffold, mobile web UI, voice auto-leave, and text notifications

This commit is contained in:
Fisto
2026-09-14 16:38:14 +02:00
parent c7aad7547f
commit eab94132bb
27 changed files with 1521 additions and 73 deletions
+21
View File
@@ -61,6 +61,27 @@ export class MessageCache {
return merged;
}
/** Update cached content after an edit. */
edit(channelId: string, messageId: string, content: string): boolean {
const messages = this.get(channelId);
const message = messages.find(item => item.id === messageId);
if (!message) return false;
message.content = content;
this.write(channelId, messages);
return true;
}
/** Drop a deleted message from the cache. */
remove(channelId: string, messageId: string): boolean {
const messages = this.get(channelId);
const next = messages.filter(item => item.id !== messageId);
if (next.length === messages.length) return false;
this.write(channelId, next);
return true;
}
private file(channelId: string): string {
return join(this.dir, `${channelId}.json`);
}