@volter-ai-dev/supercode-ui 0.1.13 → 0.1.15

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/core.mjs CHANGED
@@ -325,6 +325,7 @@ function readTranscript(value) {
325
325
  text: item.text,
326
326
  ts: nullableNumber(item.ts),
327
327
  truncated: item.truncated === true,
328
+ ...(Number.isSafeInteger(item.messageIndex) && item.messageIndex > 0 ? { messageIndex: item.messageIndex } : {}),
328
329
  };
329
330
  for (const key of ['label', 'arguments', 'resultText', 'code']) {
330
331
  if (typeof item[key] === 'string') entry[key] = item[key];
@@ -378,6 +379,7 @@ function readSessions(value) {
378
379
  name: string(row.name),
379
380
  cwd: string(row.cwd),
380
381
  title: string(row.title),
382
+ preview: string(row.preview),
381
383
  age: string(row.age),
382
384
  updatedAt: nullableNumber(row.updatedAt),
383
385
  messages: nullableNumber(row.messages),
@@ -542,7 +544,7 @@ export function normalizeUiState(value) {
542
544
  attention: Array.isArray(raw.attention) ? raw.attention.flatMap((candidate) => {
543
545
  const item = record(candidate);
544
546
  return item && typeof item.key === 'string' && ['unseen', 'finished', 'failed'].includes(item.kind)
545
- ? [{ key: item.key, kind: item.kind, ...(typeof item.preview === 'string' ? { preview: item.preview } : {}) }]
547
+ ? [{ key: item.key, kind: item.kind, ...(typeof item.preview === 'string' ? { preview: item.preview } : {}), ...(Number.isSafeInteger(item.afterMessages) && item.afterMessages >= 0 ? { afterMessages: item.afterMessages } : {}) }]
546
548
  : [];
547
549
  }) : [],
548
550
  sessions: readSessions(raw.sessions),
@@ -636,7 +638,7 @@ export function canContinueHere(state) {
636
638
 
637
639
  export function operationLabel(operation) {
638
640
  if (!operation) return '';
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…' };
641
+ const labels = { discover: 'Refreshing chats…', observe: 'Loading recent messages…', attach: 'Opening chat…', start: 'Starting new chat…', resume: 'Continuing here…', join: 'Joining live session…', detach: 'Detaching to read-only…', branch: 'Starting continuation…', reduce: 'Reducing context and verifying reversibility…', terminal: 'Preparing terminal handoff…', export: 'Exporting losslessly…', interrupt: 'Stopping agent…', respond: 'Sending response…', loadEarlier: 'Loading earlier messages…', loadSessions: 'Loading more chats…', refresh: 'Retrying…' };
640
642
  return labels[operation] ?? `${operation.replaceAll('_', ' ')}…`;
641
643
  }
642
644