Fix popular topics not starting chat when clicked (#6508)

This commit is contained in:
Zane
2026-01-15 07:39:30 -08:00
committed by Zane Staggs
parent 5e815e2a3e
commit 828e863723
+9 -1
View File
@@ -402,7 +402,15 @@ function BaseChatContent({
<div className="block h-8" />
</>
) : !recipe && showPopularTopics ? (
<PopularChatTopics append={(text: string) => handleSubmit(text)} />
<PopularChatTopics
append={(text: string) => {
const syntheticEvent = {
detail: { value: text },
preventDefault: () => {},
} as unknown as React.FormEvent;
handleFormSubmit(syntheticEvent);
}}
/>
) : null}
</ScrollArea>