@volter-ai-dev/supercode-ui 0.1.18 → 0.1.21

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
@@ -491,6 +491,18 @@ function readTranscript(value) {
491
491
  : [];
492
492
  });
493
493
  }
494
+ if (Array.isArray(item.images)) {
495
+ entry.images = item.images.flatMap((raw) => {
496
+ const image = record(raw);
497
+ return image && typeof image.label === 'string'
498
+ ? [{
499
+ ...(typeof image.id === 'string' ? { id: image.id } : {}),
500
+ label: image.label,
501
+ ...(typeof image.url === 'string' ? { url: image.url } : {}),
502
+ }]
503
+ : [];
504
+ }).slice(0, 4);
505
+ }
494
506
  const request = record(item.request);
495
507
  if (request && typeof request.requestKind === 'string' && typeof request.payloadText === 'string') {
496
508
  entry.request = {
@@ -721,7 +733,7 @@ export function sessionActivity(state, row) {
721
733
  export function filterSessions(rows, query) {
722
734
  const needle = query.trim().toLocaleLowerCase();
723
735
  if (!needle) return [...rows];
724
- return rows.filter((row) => [row.name, row.title, row.cwd, row.harness, harnessDisplayName(row.harness)].some((value) => value.toLocaleLowerCase().includes(needle)));
736
+ return rows.filter((row) => [row.name, row.title, row.preview, row.cwd, row.harness, harnessDisplayName(row.harness)].some((value) => typeof value === 'string' && value.toLocaleLowerCase().includes(needle)));
725
737
  }
726
738
 
727
739
  export function groupConversation(entries) {