Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Apr 15, 2024
1 parent 2663d1d commit 3463182
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
9 changes: 4 additions & 5 deletions packages/frontend/components/blocks/RunInputOutput.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import { useRun, useUser } from "@/utils/dataHooks"
import {
Badge,
Button,
Card,
Flex,
Group,
HoverCard,
ScrollArea,
Stack,
Switch,
Text,
} from "@mantine/core"
import { notifications } from "@mantine/notifications"
import { IconPencilShare } from "@tabler/icons-react"
import Link from "next/link"
import { hasAccess } from "shared"
import SmartViewer from "../SmartViewer"
import TokensBadge from "./TokensBadge"
import { useRun, useUser } from "@/utils/dataHooks"
import { notifications } from "@mantine/notifications"
import CopyText, { SuperCopyButton } from "./CopyText"
import { hasAccess } from "shared"
import ErrorBoundary from "./ErrorBoundary"
import TokensBadge from "./TokensBadge"

const isChatMessages = (obj) => {
return Array.isArray(obj)
Expand Down
24 changes: 16 additions & 8 deletions packages/frontend/pages/logs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Drawer,
Flex,
Group,
Loader,
Menu,
SegmentedControl,
Stack,
Expand Down Expand Up @@ -386,15 +387,22 @@ export default function Logs() {
title={selectedLog ? formatDateTime(selectedLog.createdAt) : ""}
onClose={() => setSelectedId(null)}
>
{selectedLog?.type === "llm" && (
<RunInputOutput
initialRun={selectedLog}
withPlayground={true}
withShare={true}
/>
{loading ? (
<Loader />
) : (
<>
{selectedLog?.type === "llm" && (
<RunInputOutput
initialRun={selectedLog}
withPlayground={true}
withShare={true}
/>
)}
{selectedLog?.type === "thread" && (
<ChatReplay run={selectedLog} />
)}
</>
)}

{selectedLog?.type === "thread" && <ChatReplay run={selectedLog} />}
</Drawer>

<DataTable
Expand Down

0 comments on commit 3463182

Please sign in to comment.