@columenlabs/lumen-ui 0.1.312 → 0.1.314

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.
@@ -224,8 +224,9 @@ function Messages({ chat, status, onSettings, onRetry, onFresh, onAnswer, }) {
224
224
  if (el)
225
225
  pinned.current = el.scrollHeight - el.scrollTop - el.clientHeight < FOLLOW_PX;
226
226
  };
227
- const last = chat.items[chat.items.length - 1];
228
- const sent = last?.kind === 'user' ? last.at : undefined;
227
+ // How many messages the person has sent: a reload in place swaps each item for the server's copy
228
+ // (a new `at`), which must not count as a new message and pull the list back to its end.
229
+ const sent = chat.items.reduce((n, it) => n + (it.kind === 'user' ? 1 : 0), 0);
229
230
  // biome-ignore lint/correctness/useExhaustiveDependencies: a new message or chat pins the end again
230
231
  useEffect(() => {
231
232
  pinned.current = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui",
3
- "version": "0.1.312",
3
+ "version": "0.1.314",
4
4
  "description": "Lumen: shared React components (frame, views, widgets, charts, drawers).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,7 +49,7 @@
49
49
  "@codemirror/lang-javascript": "6.2.5",
50
50
  "@codemirror/lang-json": "6.0.2",
51
51
  "@codemirror/lang-sql": "6.10.0",
52
- "@columenlabs/lumen-ui-types": "0.1.312",
52
+ "@columenlabs/lumen-ui-types": "0.1.314",
53
53
  "@dnd-kit/core": "6.3.1",
54
54
  "@dnd-kit/sortable": "10.0.0",
55
55
  "@dnd-kit/utilities": "3.2.2",