@volter-ai-dev/supercode-ui 0.1.22 → 0.1.24
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 +9 -0
- package/components.d.ts +2 -0
- package/components.mjs +260 -109
- package/composer.mjs +19 -17
- package/controller.d.ts +20 -0
- package/controller.mjs +69 -12
- package/conversation.d.ts +2 -0
- package/conversation.mjs +192 -44
- package/core.mjs +3 -0
- package/embed.mjs +258 -109
- package/index.d.ts +8 -0
- package/messenger.mjs +258 -109
- package/package.json +1 -1
- package/sessions.mjs +15 -13
- package/styles.css +2 -1
package/index.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface TranscriptImage {
|
|
|
50
50
|
id?: string;
|
|
51
51
|
label: string;
|
|
52
52
|
url?: string;
|
|
53
|
+
/** Opaque host-owned handle for an image deliberately omitted from the initial UI payload. */
|
|
54
|
+
reference?: string;
|
|
55
|
+
mediaType?: string;
|
|
56
|
+
byteSize?: number;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
export type TranscriptAttachment = TranscriptContext | (TranscriptImage & { url: string });
|
|
@@ -238,6 +242,8 @@ export interface UiAdapter {
|
|
|
238
242
|
onIntent(intent: SupercodeUiIntent): void | Promise<void>;
|
|
239
243
|
/** Ask the embedding host for explicit user-selected text or image context. */
|
|
240
244
|
pickContext?(): TranscriptAttachment | TranscriptAttachment[] | null | Promise<TranscriptAttachment | TranscriptAttachment[] | null>;
|
|
245
|
+
/** Resolve one projected historical image on demand. The UI owns and revokes its object URL. */
|
|
246
|
+
resolveImage?(image: TranscriptImage): Blob | Promise<Blob>;
|
|
241
247
|
onClose?(): void;
|
|
242
248
|
onOpen?(): void;
|
|
243
249
|
copyText?(value: string): void | Promise<void>;
|
|
@@ -357,6 +363,8 @@ export function HarnessLogo(props: { id: HarnessId; activity?: SessionActivity;
|
|
|
357
363
|
export type UiIconName = 'attach' | 'back' | 'check' | 'chevron' | 'close' | 'copy' | 'down' | 'menu' | 'plus' | 'search' | 'send' | 'stop';
|
|
358
364
|
export function UiIcon(props: { name: UiIconName; size?: number; class?: string }): VNode | null;
|
|
359
365
|
export function hasHarnessLogo(id: string): boolean;
|
|
366
|
+
export function ImageViewer(props: { items: TranscriptImage[]; index: number; adapter?: Pick<UiAdapter, 'copyText' | 'resolveImage'>; onChange(index: number): void; onClose(): void }): VNode | null;
|
|
367
|
+
export function MessageImages(props: { items?: TranscriptImage[]; adapter?: Pick<UiAdapter, 'copyText' | 'resolveImage'> }): VNode | null;
|
|
360
368
|
export function LoadingStatus(props: { state: SupercodeUiState; compact?: boolean }): VNode;
|
|
361
369
|
export function RequestCard(props: { entry: TranscriptEntryModel; adapter: UiAdapter; canRespond: boolean }): VNode | null;
|
|
362
370
|
export function TranscriptEntry(props: { entry: TranscriptEntryModel; state: SupercodeUiState; adapter: UiAdapter }): VNode;
|