From be2d21d5888fbc26f451fb9dd5265bfe525c6cda Mon Sep 17 00:00:00 2001 From: Vince Loewe Date: Mon, 15 Jul 2024 22:53:52 +0100 Subject: [PATCH] fix threads --- packages/frontend/components/blocks/RunChat.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/components/blocks/RunChat.tsx b/packages/frontend/components/blocks/RunChat.tsx index bb853e0d..52d2c3d0 100644 --- a/packages/frontend/components/blocks/RunChat.tsx +++ b/packages/frontend/components/blocks/RunChat.tsx @@ -20,7 +20,7 @@ import { mutate } from "swr" import AppUserAvatar from "./AppUserAvatar" import Feedbacks from "./Feedbacks" -const OUTPUT_ROLES = ["assistant", "ai", "tool"] +const OUTPUT_ROLES = ["assistant", "ai", "system", "tool"] const INPUT_ROLES = ["user"] function parseMessageFromRun(run) { @@ -192,7 +192,7 @@ export function ChatReplay({ run, mutateLogs }) { run.user?.id && `/external-users/${run.user?.id}`, ) - const sorted = runs?.sort((a, b) => { + const sorted = runs?.data?.sort((a, b) => { return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() })