UNPKG

@veltdev/types

Version:

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.

58 lines (57 loc) 2.22 kB
/** * Public configuration surface for AI agent suggestion comment actions. * * Hosts can override or augment the built-in accept (convert suggestion -> * comment) and reject (delete) actions rendered on an agent suggestion card. * When no config is provided, the built-in defaults are used (INV-004). * * Part of the SDK public API (exported via velt-types). Backward-compatible / * additive — see specs/agent-suggestion-comment-ui/spec.md `## Outbound contract changes`. */ import { CommentAnnotation } from './comment-annotation.data.model'; /** * A single host-defined action button on an agent suggestion card. */ export interface AgentSuggestionAction { /** Stable identifier for the action. */ id: string; /** Display label (button text / aria-label). */ label?: string; /** Optional icon identifier or URL. */ icon?: string; /** * Invoked when the action button is clicked. Receives the raw * CommentAnnotation (review decision 2026-06-03 — accepted public-contract * surface). Handler throws are caught by the SDK (EC-006). */ onClick: (annotation: CommentAnnotation) => void | Promise<void>; } /** * Host configuration for agent suggestion card actions. * When `actions` is provided it replaces the default accept/reject pair. */ export interface AgentSuggestionActionsConfig { actions?: AgentSuggestionAction[]; } /** * Discriminator for the bespoke agent-suggestion overflow-menu rows. * Drives the icon, label and click action of the generic menu-item primitive. */ export type AgentSuggestionMenuItemType = 'copy-link' | 'delete'; /** * Canonical agent-suggestion overflow-menu item types. * Avoids repeating the discriminator string literals across primitives. */ export declare const AGENT_SUGGESTION_MENU_ITEM_TYPE: { readonly COPY_LINK: "copy-link"; readonly DELETE: "delete"; }; /** * Translation keys / labels used by the agent-suggestion overflow menu. * Centralised so the menu-item, label and trigger primitives stay in sync. */ export declare const AGENT_SUGGESTION_MENU_LABEL: { readonly COPY_LINK: "Copy link"; readonly LINK_COPIED: "Link copied!"; readonly DELETE_THREAD: "Delete thread"; };