Skip to content

Commit 75feda4

Browse files
committed
cr
1 parent b115043 commit 75feda4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

frontend/app/components/ThreadHistory.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function ThreadHistory(props: ThreadHistoryProps) {
187187
) : null}
188188
</div>
189189
<div className="overflow-y-auto flex-grow scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-transparent">
190-
{props.isUserThreadsLoading ? (
190+
{props.isUserThreadsLoading && !props.userThreads.length ? (
191191
<div className="flex flex-col gap-1 px-3 pt-3">
192192
{Array.from({ length: 25 }).map((_, i) => (
193193
<LoadingThread />
@@ -212,7 +212,7 @@ export function ThreadHistory(props: ThreadHistoryProps) {
212212
</TooltipIconButton>
213213
</SheetTrigger>
214214
<SheetContent side="left" className="bg-[#282828] border-none">
215-
{props.isUserThreadsLoading ? (
215+
{props.isUserThreadsLoading && !props.userThreads.length ? (
216216
<div className="flex flex-col gap-1 px-3 pt-3">
217217
{Array.from({ length: 25 }).map((_, i) => (
218218
<LoadingThread />

frontend/app/hooks/useGraph.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,19 @@ export function useGraph(userId: string | undefined) {
667667
],
668668
})
669669
: undefined;
670+
const answerHeaderToolMsg = new AIMessage({
671+
content: "",
672+
tool_calls: [
673+
{
674+
name: "answer_header",
675+
args: {},
676+
},
677+
],
678+
});
670679
return [
671680
...(routerMessage ? [routerMessage] : []),
672681
...(selectedDocumentsAIMessage ? [selectedDocumentsAIMessage] : []),
682+
answerHeaderToolMsg,
673683
new AIMessage({
674684
...msg,
675685
content: msg.content,

0 commit comments

Comments
 (0)