Skip to content

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

chore: files changed app/src/features/conversations/aui/toolkit.tsx,app/src/providers/assistantUiMes

Steven Enamakelec176fee8515
diff --git a/app/src/features/conversations/aui/toolkit.tsx b/app/src/features/conversations/aui/toolkit.tsx
index ec7540701b..61f55e3e94 100644
--- a/app/src/features/conversations/aui/toolkit.tsx
+++ b/app/src/features/conversations/aui/toolkit.tsx
@@ -62,6 +62,26 @@ export function openHumanToolEntries(): Record<string, OpenHumanToolEntry> {
* before this registry replaced the manual switch.
*/
task: { type: 'backend', display: 'inline', render: SubagentCall },
+
+ /**
+ * Image / video generation: the `elements-image-generation` placeholder
+ * while it runs, then the `image` element per produced artifact. Pulled
+ * out for its own spot in the transcript rather than folded into the
+ * activity trace, same as a produced document below.
+ */
+ media_generate_image: { type: 'backend', display: 'standalone', render: MediaGenerationCall },
+ media_generate_video: { type: 'backend', display: 'standalone', render: MediaGenerationCall },
+
+ /**
+ * `generate_document` / `generate_presentation`: the `elements-artifact-
+ * card` element.
+ */
+ generate_document: { type: 'backend', display: 'standalone', render: DocumentArtifactCall },
+ generate_presentation: {
+ type: 'backend',
+ display: 'standalone',
+ render: DocumentArtifactCall,
+ },
};
}
diff --git a/app/src/providers/assistantUiMessages.ts b/app/src/providers/assistantUiMessages.ts
index c3a6c02d20..dcfa808abe 100644
--- a/app/src/providers/assistantUiMessages.ts
+++ b/app/src/providers/assistantUiMessages.ts
@@ -7,6 +7,7 @@ import type {
import { parseMessageImages } from '../lib/attachments';
import { unwrapToolCallEnvelope } from '../lib/chat/toolCallEnvelope';
+import type { ChatCitation } from '../services/chatService';
import {
isActiveTimelineStatus,
type PendingApproval,
@@ -422,9 +423,23 @@ function assistantParts(
title: source.title,
});
}
+ // Memory citations captured during retrieval for this turn
+ // (`ChatDoneEvent.citations` / `ChatSegmentEvent.citations`), surfaced as
+ // `document` source parts alongside the turn's `url` sources.
+ for (const citation of citations) {
+ parts.push({
+ type: 'source',
+ sourceType: 'document',
+ id: `memory:${citation.id}`,
+ title: citation.key,
+ mediaType: 'application/vnd.openhuman.memory-citation',
+ });
+ }
return parts;
}
+const EMPTY_CITATIONS: readonly ChatCitation[] = [];
+
function stringArray(value: unknown): string[] {
return Array.isArray(value)
? value.filter((item): item is string => typeof item === 'string')
diff --git a/crates/openhuman-core/src/web_chat/ops/start_chat.rs b/crates/openhuman-core/src/web_chat/ops/start_chat.rs
index f08c7ab226..b198fbb09b 100644
--- a/crates/openhuman-core/src/web_chat/ops/start_chat.rs
+++ b/crates/openhuman-core/src/web_chat/ops/start_chat.rs
@@ -335,11 +335,23 @@ pub async fn start_chat(
event: "chat_error".to_string(),
client_id: client_id.clone(),
thread_id: thread_id.clone(),
- request_id: cancelled_id,
+ request_id: cancelled_id.clone(),
message: Some("Cancelled by newer request".to_string()),
error_type: Some("cancelled".to_string()),
..Default::default()
});
+ // See channel_ops::cancel_chat_inner — `chat_cancelled` is the
+ // structured successor to `chat_error{error_type:"cancelled"}`,
+ // kept alongside it for one release.
+ publish_web_channel_event(WebChannelEvent {
+ event: "chat_cancelled".to_string(),
+ client_id: client_id.clone(),
+ thread_id: thread_id.clone(),
+ request_id: cancelled_id,
+ cancel_reason: Some("superseded".to_string()),
+ superseded_by: Some(request_id.clone()),
+ ..Default::default()
+ });
}
}