Threads:
{threadNum ?? 0}
diff --git a/apps/masterbots.ai/components/shared/thread-heading.tsx b/apps/masterbots.ai/components/shared/thread-heading.tsx
index 3fda2a67..780942ac 100644
--- a/apps/masterbots.ai/components/shared/thread-heading.tsx
+++ b/apps/masterbots.ai/components/shared/thread-heading.tsx
@@ -10,7 +10,9 @@ export function ThreadHeading({
response,
question,
copy = false,
- chat = false
+ chat = false,
+ isUser = false,
+ isBot = false
}: ThreadHeadingProps) {
return (
@@ -20,11 +22,13 @@ export function ThreadHeading({
)}
>
-
+ {!isBot && (
+
+ )}
{question}
- {chat ? null : (
- <>
-
by
-
- >
- )}
+ {chat
+ ? null
+ : !isUser && (
+ <>
+
by
+
+ >
+ )}
{copy ?
: null}
@@ -62,4 +68,6 @@ interface ThreadHeadingProps {
question: string
copy?: boolean
chat?: boolean
+ isBot?: boolean
+ isUser?: boolean
}
diff --git a/apps/masterbots.ai/components/shared/thread-list-accordion.tsx b/apps/masterbots.ai/components/shared/thread-list-accordion.tsx
index 575d896f..82d19915 100644
--- a/apps/masterbots.ai/components/shared/thread-list-accordion.tsx
+++ b/apps/masterbots.ai/components/shared/thread-list-accordion.tsx
@@ -16,7 +16,9 @@ import { createMessagePairs } from '@/lib/threads'
export function ThreadListAccordion({
thread,
- chat = false
+ chat = false,
+ isUser = false,
+ isBot = false
}: ThreadListAccordionProps) {
const [state, setState] = useSetState({
isOpen: false,
@@ -35,10 +37,16 @@ export function ThreadListAccordion({
type="multiple"
>
{/* Frist level question and excerpt visible on lists */}
-
+
@@ -60,7 +70,7 @@ export function ThreadListAccordion({
showHeading={false}
thread={thread}
initialMessagePairs={createMessagePairs(thread.messages)}
- className='border-r-[transparent]'
+ className="border-r-[transparent]"
/>
@@ -72,4 +82,6 @@ export function ThreadListAccordion({
interface ThreadListAccordionProps extends DialogProps {
thread: Thread
chat?: boolean
+ isBot?: boolean
+ isUser?: boolean
}
diff --git a/apps/masterbots.ai/components/shared/thread-list.tsx b/apps/masterbots.ai/components/shared/thread-list.tsx
index 7c724da3..32baf473 100644
--- a/apps/masterbots.ai/components/shared/thread-list.tsx
+++ b/apps/masterbots.ai/components/shared/thread-list.tsx
@@ -18,7 +18,9 @@ export function ThreadList({
initialThreads,
filter,
chat = false,
- dialog = false
+ dialog = false,
+ isUser = false,
+ isBot = false
}: ThreadListProps) {
const { query } = useGlobalStore()
const loadMoreRef = useRef
(null)
@@ -120,6 +122,8 @@ export function ThreadList({
defaultOpen={false} // we can have one open by default
key={thread.threadId}
thread={thread}
+ {...(isBot ? { isBot } : {})}
+ {...(isUser ? { isUser } : {})}
/>
))}
@@ -134,4 +138,6 @@ interface ThreadListProps {
chat?: boolean
dialog?: boolean
filter: GetBrowseThreadsParams
+ isUser?: boolean
+ isBot?: boolean
}