Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(assistant-ui): add image element support to chat service

Steven Enamakelb4f2a46abe6d
diff --git a/app/src/components/assistant-ui/elements/image.tsx b/app/src/components/assistant-ui/elements/image.tsx
index 2c36cfc175..2c8b3e1376 100644
--- a/app/src/components/assistant-ui/elements/image.tsx
+++ b/app/src/components/assistant-ui/elements/image.tsx
@@ -1,5 +1,19 @@
'use client';
+/**
+ * assistant-ui's `image` element: renders an `ImageMessagePart` with a
+ * lightbox, copy/download actions and error/loading states.
+ *
+ * Vendored from the assistant-ui `image` registry item
+ * (https://r.assistant-ui.com/styles/base-nova/image.json). This file
+ * predates the "Changes from upstream" convention adopted for later
+ * elements; it already carries OpenHuman-specific behavior (the
+ * download-to-Blob path for `data:`/relative URIs, copy-to-clipboard,
+ * moderation/error iconography) beyond a line-for-line vendor, and a full
+ * diff against the current upstream body was out of scope for this pass —
+ * only its location (moved under `elements/`, per the other elements in this
+ * directory) and this header changed here.
+ */
import { cn } from '@/components/assistant-ui/lib/utils';
import type { ImageMessagePart, ImageMessagePartComponent } from '@assistant-ui/react';
import { cva, type VariantProps } from 'class-variance-authority';
diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.ts
index 135d5a17fa..4704f4ba7a 100644
--- a/app/src/services/chatService.ts
+++ b/app/src/services/chatService.ts
@@ -810,6 +810,8 @@ export interface ChatEventListeners {
onArtifactPending?: (event: ArtifactPendingEvent) => void;
onArtifactReady?: (event: ArtifactReadyEvent) => void;
onArtifactFailed?: (event: ArtifactFailedEvent) => void;
+ onExternalTransferPending?: (event: ExternalTransferPendingEvent) => void;
+ onCancelled?: (event: ChatCancelledEvent) => void;
onDone?: (event: ChatDoneEvent) => void;
onError?: (event: ChatErrorEvent) => void;
}