diff --git a/ui/admin/app/components/chat/Message.tsx b/ui/admin/app/components/chat/Message.tsx index 3057f14e2..723b334b4 100644 --- a/ui/admin/app/components/chat/Message.tsx +++ b/ui/admin/app/components/chat/Message.tsx @@ -78,7 +78,7 @@ export const Message = React.memo(({ message }: MessageProps) => { /> )} - {message.prompt ? ( + {message.prompt?.metadata ? ( ) : ( { Message.displayName = "Message"; function PromptMessage({ prompt }: { prompt: OAuthPrompt }) { + if (!prompt.metadata) return null; + return (
diff --git a/ui/admin/app/lib/model/chatEvents.ts b/ui/admin/app/lib/model/chatEvents.ts index 37358ce89..b973af5d1 100644 --- a/ui/admin/app/lib/model/chatEvents.ts +++ b/ui/admin/app/lib/model/chatEvents.ts @@ -26,7 +26,7 @@ export type OAuthPrompt = { id?: string; name: string; time?: Date; - message?: string; + message: string; fields?: string[]; sensitive?: boolean; metadata?: PromptOAuthMeta; diff --git a/ui/admin/app/lib/model/messages.ts b/ui/admin/app/lib/model/messages.ts index 4e4f104b3..fb22e2a20 100644 --- a/ui/admin/app/lib/model/messages.ts +++ b/ui/admin/app/lib/model/messages.ts @@ -41,7 +41,7 @@ export const toolCallMessage = (toolCall: ToolCall): Message => ({ export const promptMessage = (prompt: OAuthPrompt, runID: string): Message => ({ sender: "agent", - text: "", + text: prompt.message, prompt, runId: runID, });