agentchannel 0.7.21 → 0.7.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ui/app.js +31 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentchannel",
3
- "version": "0.7.21",
3
+ "version": "0.7.22",
4
4
  "description": "Encrypted cross-network messaging for AI coding agents via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
package/ui/app.js CHANGED
@@ -170,12 +170,19 @@ function richText(t) {
170
170
  // Render messages
171
171
  // ---------------------------------------------------------------------------
172
172
  function render() {
173
- var filtered = activeChannel === "all"
174
- ? allMessages.slice()
175
- : allMessages.filter(function(m) {
176
- var mid = m.subchannel ? m.channel + '/' + m.subchannel : m.channel;
177
- return mid === activeChannel;
178
- });
173
+ var filtered;
174
+ if (activeChannel === "all") {
175
+ filtered = allMessages.slice();
176
+ } else if (activeChannel === "@me") {
177
+ filtered = allMessages.filter(function(m) {
178
+ return m.content && CONFIG.name && m.content.indexOf("@" + CONFIG.name) !== -1;
179
+ });
180
+ } else {
181
+ filtered = allMessages.filter(function(m) {
182
+ var mid = m.subchannel ? m.channel + '/' + m.subchannel : m.channel;
183
+ return mid === activeChannel;
184
+ });
185
+ }
179
186
 
180
187
  // Insert readme as first message (never mutate allMessages)
181
188
  if (activeChannel !== "all") {
@@ -296,6 +303,22 @@ function renderSidebar() {
296
303
  };
297
304
  el.appendChild(allDiv);
298
305
 
306
+ // @Me — show only messages mentioning me
307
+ var mentionCount = allMessages.filter(function(m) { return m.content && CONFIG.name && m.content.indexOf("@" + CONFIG.name) !== -1; }).length;
308
+ var meDiv = document.createElement("div");
309
+ meDiv.className = "sidebar__channel" + (activeChannel === "@me" ? " active" : "");
310
+ meDiv.innerHTML = '<span style="color:var(--mention-text);margin-right:2px">@</span>Mentions' + (mentionCount ? '<span class="badge" style="background:var(--mention-text);color:#fff;opacity:1">' + mentionCount + '</span>' : "");
311
+ meDiv.onclick = function() {
312
+ activeChannel = "@me";
313
+ headerName.textContent = "@Me";
314
+ headerDesc.textContent = "Messages mentioning you";
315
+ document.title = "AgentChannel — @Me";
316
+ renderSidebar();
317
+ render();
318
+ if (window.renderMembers) window.renderMembers();
319
+ };
320
+ el.appendChild(meDiv);
321
+
299
322
  // Render each parent + children
300
323
  for (var pi = 0; pi < parents.length; pi++) {
301
324
  var ch = parents[pi];
@@ -602,8 +625,8 @@ async function init() {
602
625
  var header = document.querySelector(".members__header");
603
626
  if (!list || !panel) return;
604
627
 
605
- // Hide members for All channels and public channels
606
- if (activeChannel === "all" || activeChannel.toLowerCase() === "agentchannel") {
628
+ // Hide members for All channels and @me views
629
+ if (activeChannel === "all" || activeChannel === "@me") {
607
630
  if (header) header.textContent = "MEMBERS";
608
631
  list.innerHTML = "";
609
632
  panel.style.display = "none";