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

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/icon.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  // src/icon.jsx
2
2
  import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
3
3
  var ICONS = {
4
+ attach: () => /* @__PURE__ */ jsx("path", { d: "M6.25 9.75 10.6 5.4a2.1 2.1 0 0 1 2.97 2.97l-5.4 5.4a3.3 3.3 0 0 1-4.67-4.66l5.52-5.52" }),
4
5
  back: () => /* @__PURE__ */ jsx("path", { d: "m11.5 4.5-4.5 4.5 4.5 4.5" }),
5
6
  check: () => /* @__PURE__ */ jsx("path", { d: "m4 9 3.25 3.25L14 5.5" }),
6
7
  chevron: () => /* @__PURE__ */ jsx("path", { d: "m7 4.5 4.5 4.5L7 13.5" }),
package/index.d.ts CHANGED
@@ -211,8 +211,8 @@ export type SupercodeUiIntent =
211
211
  | { action: 'loadSessions' }
212
212
  | { action: 'loadEarlier' }
213
213
  | { action: 'draft'; text: string }
214
- | { action: 'send'; text: string }
215
- | { action: 'new'; harness: HarnessId; text: string }
214
+ | { action: 'send'; text: string; context?: TranscriptContext[] }
215
+ | { action: 'new'; harness: HarnessId; text: string; context?: TranscriptContext[] }
216
216
  | { action: 'resume' }
217
217
  | { action: 'join' }
218
218
  | { action: 'detach' }
@@ -227,6 +227,8 @@ export type SupercodeUiIntent =
227
227
 
228
228
  export interface UiAdapter {
229
229
  onIntent(intent: SupercodeUiIntent): void | Promise<void>;
230
+ /** Ask the embedding host for explicit user-selected text context. */
231
+ pickContext?(): TranscriptContext | TranscriptContext[] | null | Promise<TranscriptContext | TranscriptContext[] | null>;
230
232
  onClose?(): void;
231
233
  onOpen?(): void;
232
234
  copyText?(value: string): void | Promise<void>;
@@ -245,6 +247,7 @@ export interface MessengerLabels {
245
247
 
246
248
  export interface PendingMessageModel {
247
249
  text: string;
250
+ context?: TranscriptContext[];
248
251
  status: 'sending' | 'failed';
249
252
  onRetry?(): void;
250
253
  onEdit?(): void;
@@ -341,7 +344,7 @@ export function terminalCommand(handoff: NonNullable<SupercodeUiState['terminalH
341
344
  export function isSendKey(event: Pick<KeyboardEvent, 'key' | 'shiftKey' | 'isComposing'>): boolean;
342
345
 
343
346
  export function HarnessLogo(props: { id: HarnessId; activity?: SessionActivity; size?: number; onMissingLogo?(id: string): void }): VNode | null;
344
- export type UiIconName = 'back' | 'check' | 'chevron' | 'close' | 'copy' | 'down' | 'menu' | 'plus' | 'search' | 'send' | 'stop';
347
+ export type UiIconName = 'attach' | 'back' | 'check' | 'chevron' | 'close' | 'copy' | 'down' | 'menu' | 'plus' | 'search' | 'send' | 'stop';
345
348
  export function UiIcon(props: { name: UiIconName; size?: number; class?: string }): VNode | null;
346
349
  export function hasHarnessLogo(id: string): boolean;
347
350
  export function LoadingStatus(props: { state: SupercodeUiState; compact?: boolean }): VNode;
@@ -355,7 +358,7 @@ export function Conversation(props: { state: SupercodeUiState; adapter: UiAdapte
355
358
  export function SessionRow(props: { row: SessionRowModel; state: SupercodeUiState; adapter: UiAdapter; onOpen(row: SessionRowModel): void }): VNode;
356
359
  export function SessionList(props: { state: SupercodeUiState; adapter: UiAdapter; onOpen(row: SessionRowModel): void; onNew?(): void; onClose?(): void; components?: MessengerComponents; labels?: MessengerLabels; focusKey?: string | null; memoryKey?: string }): VNode;
357
360
  export function ContinuationBar(props: { state: SupercodeUiState; adapter: UiAdapter; labels?: MessengerLabels }): VNode | null;
358
- export function Composer(props: { state: SupercodeUiState; adapter: UiAdapter; labels?: MessengerLabels; memoryKey?: string; pendingStatus?: PendingMessageModel['status'] | 'editing' | null; restoreDraft?: { id: string | number; text: string } | null; onPending?(text: string): void; onDraftRestored?(id: string | number): void }): VNode;
361
+ export function Composer(props: { state: SupercodeUiState; adapter: UiAdapter; labels?: MessengerLabels; memoryKey?: string; pendingStatus?: PendingMessageModel['status'] | 'editing' | null; restoreDraft?: { id: string | number; text: string; context?: TranscriptContext[] } | null; onPending?(text: string, context?: TranscriptContext[]): void; onDraftRestored?(id: string | number): void }): VNode;
359
362
  export function SupercodeMessenger(props: MessengerProps): VNode;
360
363
 
361
364
  export interface MountedMessenger {