@volter-ai-dev/supercode-ui 0.1.13 → 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/README.md +1 -1
- package/components.d.ts +1 -0
- package/components.mjs +711 -361
- package/composer.mjs +77 -19
- package/controller.mjs +5 -2
- package/conversation.mjs +364 -196
- package/core.mjs +3 -2
- package/embed.mjs +712 -363
- package/icon.d.ts +2 -0
- package/icon.mjs +45 -0
- package/index.d.ts +9 -3
- package/messenger.mjs +710 -361
- package/package.json +8 -2
- package/sessions.mjs +160 -48
- package/styles.css +35 -18
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
|
|