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

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];
@@ -542,7 +543,7 @@ export function normalizeUiState(value) {
542
543
  attention: Array.isArray(raw.attention) ? raw.attention.flatMap((candidate) => {
543
544
  const item = record(candidate);
544
545
  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 } : {}) }]
546
+ ? [{ key: item.key, kind: item.kind, ...(typeof item.preview === 'string' ? { preview: item.preview } : {}), ...(Number.isSafeInteger(item.afterMessages) && item.afterMessages >= 0 ? { afterMessages: item.afterMessages } : {}) }]
546
547
  : [];
547
548
  }) : [],
548
549
  sessions: readSessions(raw.sessions),
@@ -636,7 +637,7 @@ export function canContinueHere(state) {
636
637
 
637
638
  export function operationLabel(operation) {
638
639
  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…' };
640
+ 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
641
  return labels[operation] ?? `${operation.replaceAll('_', ' ')}…`;
641
642
  }
642
643