Skip to content

Commit

Permalink
feat: add run debug info to user messages in admin ui (#1082)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Hopper-Lowe <[email protected]>
  • Loading branch information
ryanhopperlowe authored Dec 30, 2024
1 parent 0586286 commit 248fe0e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 14 additions & 2 deletions ui/admin/app/components/chat/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,20 @@ export const Message = React.memo(({ message }: MessageProps) => {
return (
<div className="mb-4 w-full">
<div
className={cn("flex", isUser ? "justify-end" : "justify-start")}
className={cn(
"flex gap-4",
isUser ? "justify-end" : "justify-start"
)}
>
{isUser && message.runId && (
<div className="mt-3">
<MessageDebug
variant="secondary"
runId={message.runId}
/>
</div>
)}

<div
className={cn({
"border border-error bg-error-foreground rounded-xl":
Expand Down Expand Up @@ -118,7 +130,7 @@ export const Message = React.memo(({ message }: MessageProps) => {
</ToolCallInfo>
)}

{!isUser && message.runId && (
{message.runId && !isUser && (
<div className="self-start">
<MessageDebug
variant="secondary"
Expand Down
4 changes: 1 addition & 3 deletions ui/admin/app/components/chat/MessageDebug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ export function MessageDebug({ runId, variant }: MessageDebugProps) {
</Button>
</DialogTrigger>
</TooltipTrigger>
<TooltipContent>
<p>View details</p>
</TooltipContent>
<TooltipContent>View Run Info</TooltipContent>
</Tooltip>

<DialogContent
Expand Down

0 comments on commit 248fe0e

Please sign in to comment.