cc-agent-ui 0.2.4 → 0.2.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-agent-ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Live canvas UI for cc-agent jobs — infinite canvas, streaming output, file browser",
5
5
  "type": "module",
6
6
  "repository": {
package/public/index.html CHANGED
@@ -1355,15 +1355,7 @@ async function jpSendMessage() {
1355
1355
  headers: { 'Content-Type': 'application/json' },
1356
1356
  body: JSON.stringify({ id: jpCurrentId, action: 'message', message: text }),
1357
1357
  });
1358
- const data = await r.json();
1359
- const d = document.createElement('div');
1360
- d.className = 'tl tl-head';
1361
- d.textContent = `[you] ${text}`;
1362
- jpLog.appendChild(d);
1363
- jpLog.scrollTop = jpLog.scrollHeight;
1364
- // Also echo to card terminal
1365
- const entry = jobs[jpCurrentId];
1366
- if (entry?.logEl) appendLines(entry.logEl, [`[you] ${text}`], true);
1358
+ await r.json();
1367
1359
  } catch (e) {
1368
1360
  const d = document.createElement('div');
1369
1361
  d.className = 'tl tl-err';
package/server.js CHANGED
@@ -240,7 +240,9 @@ const server = http.createServer((req, res) => {
240
240
  await redis.rPush(`cca:job:${id}:input`, message);
241
241
  // Echo to output so it's visible in terminal immediately
242
242
  const line = `[you] ${message}`;
243
- await redis.rPush(`cca:job:${id}:output`, line);
243
+ const newLen = await redis.rPush(`cca:job:${id}:output`, line);
244
+ // Advance the output length tracker so the poller doesn't re-broadcast this line
245
+ outputLengths[id] = newLen;
244
246
  broadcast({ type: 'job_output', id, lines: [line] });
245
247
  }
246
248
  }