@volter-ai-dev/supercode-ui 0.1.10 → 0.1.12

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/components.mjs CHANGED
@@ -545,7 +545,7 @@ function canContinueHere(state) {
545
545
  }
546
546
  function operationLabel(operation) {
547
547
  if (!operation) return "";
548
- const labels = { discover: "Refreshing chats\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
548
+ const labels = { discover: "Refreshing chats\u2026", observe: "Loading recent messages\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
549
549
  return labels[operation] ?? `${operation.replaceAll("_", " ")}\u2026`;
550
550
  }
551
551
  function terminalCommand(handoff) {
@@ -1089,7 +1089,7 @@ function Conversation({ state, adapter, components = {}, slots = {}, memoryKey =
1089
1089
  if (remembered.top !== null && !remembered.atBottom) element.scrollTop = remembered.top;
1090
1090
  else pin();
1091
1091
  } else if (atBottom) pin();
1092
- }, [memoryKey, state.transcript.length, state.busy]);
1092
+ }, [memoryKey, state.transcript, state.busy, state.operation]);
1093
1093
  return /* @__PURE__ */ jsxs2("div", { class: "scui-conversation-wrap", children: [
1094
1094
  /* @__PURE__ */ jsx3("div", { class: "scui-conversation", ref: scroller, tabIndex: 0, "aria-label": "Conversation", onScroll: (event) => {
1095
1095
  const element = event.currentTarget;
@@ -1192,7 +1192,7 @@ function HarnessLogo({ id, activity, size = 28, onMissingLogo }) {
1192
1192
  }
1193
1193
 
1194
1194
  // src/messenger.jsx
1195
- import { useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "preact/hooks";
1195
+ import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "preact/hooks";
1196
1196
 
1197
1197
  // src/sessions.jsx
1198
1198
  import { useState as useState3 } from "preact/hooks";
@@ -1413,7 +1413,7 @@ function NewChat({ state, adapter, onBack, onClose, onStarted, labels }) {
1413
1413
  ] });
1414
1414
  }
1415
1415
  function SupercodeMessenger({ state: stateInput, adapter, class: className = "", initialView, labels, components = {}, slots = {} }) {
1416
- const state = normalizeUiState(stateInput);
1416
+ const state = useMemo2(() => normalizeUiState(stateInput), [stateInput]);
1417
1417
  const copy = { ...DEFAULT_LABELS, ...labels };
1418
1418
  const [view, setView] = useState4(initialView ?? (state.attention.length ? "list" : state.attached || state.transcript.length ? "chat" : "list"));
1419
1419
  const [opening, setOpening] = useState4(null);
package/conversation.mjs CHANGED
@@ -723,7 +723,7 @@ function Conversation({ state, adapter, components = {}, slots = {}, memoryKey =
723
723
  if (remembered.top !== null && !remembered.atBottom) element.scrollTop = remembered.top;
724
724
  else pin();
725
725
  } else if (atBottom) pin();
726
- }, [memoryKey, state.transcript.length, state.busy]);
726
+ }, [memoryKey, state.transcript, state.busy, state.operation]);
727
727
  return /* @__PURE__ */ jsxs("div", { class: "scui-conversation-wrap", children: [
728
728
  /* @__PURE__ */ jsx2("div", { class: "scui-conversation", ref: scroller, tabIndex: 0, "aria-label": "Conversation", onScroll: (event) => {
729
729
  const element = event.currentTarget;
package/core.mjs CHANGED
@@ -636,7 +636,7 @@ export function canContinueHere(state) {
636
636
 
637
637
  export function operationLabel(operation) {
638
638
  if (!operation) return '';
639
- const labels = { discover: 'Refreshing chats…', attach: 'Opening chat…', resume: 'Continuing here…', branch: 'Starting continuation…', reduce: 'Reducing context and verifying reversibility…', terminal: 'Preparing terminal handoff…', export: 'Exporting losslessly…', refresh: 'Retrying…' };
639
+ const labels = { discover: 'Refreshing chats…', observe: 'Loading recent messages…', attach: 'Opening chat…', resume: 'Continuing here…', branch: 'Starting continuation…', reduce: 'Reducing context and verifying reversibility…', terminal: 'Preparing terminal handoff…', export: 'Exporting losslessly…', refresh: 'Retrying…' };
640
640
  return labels[operation] ?? `${operation.replaceAll('_', ' ')}…`;
641
641
  }
642
642
 
package/embed.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { render } from "preact";
3
3
 
4
4
  // src/messenger.jsx
5
- import { useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "preact/hooks";
5
+ import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "preact/hooks";
6
6
 
7
7
  // core.mjs
8
8
  var HARNESS_NAMES = Object.freeze({
@@ -548,7 +548,7 @@ function canContinueHere(state) {
548
548
  }
549
549
  function operationLabel(operation) {
550
550
  if (!operation) return "";
551
- const labels = { discover: "Refreshing chats\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
551
+ const labels = { discover: "Refreshing chats\u2026", observe: "Loading recent messages\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
552
552
  return labels[operation] ?? `${operation.replaceAll("_", " ")}\u2026`;
553
553
  }
554
554
  function terminalCommand(handoff) {
@@ -1095,7 +1095,7 @@ function Conversation({ state, adapter, components = {}, slots = {}, memoryKey =
1095
1095
  if (remembered.top !== null && !remembered.atBottom) element.scrollTop = remembered.top;
1096
1096
  else pin();
1097
1097
  } else if (atBottom) pin();
1098
- }, [memoryKey, state.transcript.length, state.busy]);
1098
+ }, [memoryKey, state.transcript, state.busy, state.operation]);
1099
1099
  return /* @__PURE__ */ jsxs2("div", { class: "scui-conversation-wrap", children: [
1100
1100
  /* @__PURE__ */ jsx3("div", { class: "scui-conversation", ref: scroller, tabIndex: 0, "aria-label": "Conversation", onScroll: (event) => {
1101
1101
  const element = event.currentTarget;
@@ -1413,7 +1413,7 @@ function NewChat({ state, adapter, onBack, onClose, onStarted, labels }) {
1413
1413
  ] });
1414
1414
  }
1415
1415
  function SupercodeMessenger({ state: stateInput, adapter, class: className = "", initialView, labels, components = {}, slots = {} }) {
1416
- const state = normalizeUiState(stateInput);
1416
+ const state = useMemo2(() => normalizeUiState(stateInput), [stateInput]);
1417
1417
  const copy = { ...DEFAULT_LABELS, ...labels };
1418
1418
  const [view, setView] = useState4(initialView ?? (state.attention.length ? "list" : state.attached || state.transcript.length ? "chat" : "list"));
1419
1419
  const [opening, setOpening] = useState4(null);
package/messenger.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/messenger.jsx
2
- import { useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "preact/hooks";
2
+ import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "preact/hooks";
3
3
 
4
4
  // core.mjs
5
5
  var HARNESS_NAMES = Object.freeze({
@@ -545,7 +545,7 @@ function canContinueHere(state) {
545
545
  }
546
546
  function operationLabel(operation) {
547
547
  if (!operation) return "";
548
- const labels = { discover: "Refreshing chats\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
548
+ const labels = { discover: "Refreshing chats\u2026", observe: "Loading recent messages\u2026", attach: "Opening chat\u2026", resume: "Continuing here\u2026", branch: "Starting continuation\u2026", reduce: "Reducing context and verifying reversibility\u2026", terminal: "Preparing terminal handoff\u2026", export: "Exporting losslessly\u2026", refresh: "Retrying\u2026" };
549
549
  return labels[operation] ?? `${operation.replaceAll("_", " ")}\u2026`;
550
550
  }
551
551
  function terminalCommand(handoff) {
@@ -1092,7 +1092,7 @@ function Conversation({ state, adapter, components = {}, slots = {}, memoryKey =
1092
1092
  if (remembered.top !== null && !remembered.atBottom) element.scrollTop = remembered.top;
1093
1093
  else pin();
1094
1094
  } else if (atBottom) pin();
1095
- }, [memoryKey, state.transcript.length, state.busy]);
1095
+ }, [memoryKey, state.transcript, state.busy, state.operation]);
1096
1096
  return /* @__PURE__ */ jsxs2("div", { class: "scui-conversation-wrap", children: [
1097
1097
  /* @__PURE__ */ jsx3("div", { class: "scui-conversation", ref: scroller, tabIndex: 0, "aria-label": "Conversation", onScroll: (event) => {
1098
1098
  const element = event.currentTarget;
@@ -1410,7 +1410,7 @@ function NewChat({ state, adapter, onBack, onClose, onStarted, labels }) {
1410
1410
  ] });
1411
1411
  }
1412
1412
  function SupercodeMessenger({ state: stateInput, adapter, class: className = "", initialView, labels, components = {}, slots = {} }) {
1413
- const state = normalizeUiState(stateInput);
1413
+ const state = useMemo2(() => normalizeUiState(stateInput), [stateInput]);
1414
1414
  const copy = { ...DEFAULT_LABELS, ...labels };
1415
1415
  const [view, setView] = useState4(initialView ?? (state.attention.length ? "list" : state.attached || state.transcript.length ? "chat" : "list"));
1416
1416
  const [opening, setOpening] = useState4(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter-ai-dev/supercode-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "Composable default UI kit for Supercode-powered coding-agent experiences",
6
6
  "exports": {