Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 17 additions & 25 deletions ui/desktop/src/components/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,31 +372,23 @@ function BaseChatContent({
{/* Custom content before messages */}
{renderBeforeMessages && renderBeforeMessages()}

{/* Messages or RecipeActivities or Popular Topics */}
{/* Recipe Activities - always show when recipe is active and accepted */}
{recipeConfig && recipeAccepted && !suppressEmptyState && (
<div className={hasStartedUsingRecipe ? 'mb-6' : ''}>
<RecipeActivities
append={(text: string) => appendWithTracking(text)}
activities={
Array.isArray(recipeConfig.activities) ? recipeConfig.activities : null
}
title={recipeConfig.title}
parameterValues={recipeParameters || {}}
/>
</div>
)}

{/* Messages or Popular Topics */}
{
// Check if we should show splash instead of messages
// Show splash if we have a recipe and user hasn't started using it yet, and recipe has been accepted
loadingChat ? null : recipeConfig &&
recipeAccepted &&
!hasStartedUsingRecipe &&
!suppressEmptyState ? (
<>
{/* Show RecipeActivities when we have a recipe config and user hasn't started using it */}
{recipeConfig ? (
<RecipeActivities
append={(text: string) => appendWithTracking(text)}
activities={
Array.isArray(recipeConfig.activities) ? recipeConfig.activities : null
}
title={recipeConfig.title}
parameterValues={recipeParameters || {}}
/>
) : showPopularTopics ? (
/* Show PopularChatTopics when no real messages, no recipe, and showPopularTopics is true (Pair view) */
<PopularChatTopics append={(text: string) => appendWithTracking(text)} />
) : null}
</>
) : filteredMessages.length > 0 ||
loadingChat ? null : filteredMessages.length > 0 ||
(recipeConfig && recipeAccepted && hasStartedUsingRecipe) ? (
<>
{disableSearch ? (
Expand Down Expand Up @@ -476,7 +468,7 @@ function BaseChatContent({

<div className="block h-8" />
</>
) : showPopularTopics ? (
) : !recipeConfig && showPopularTopics ? (
/* Show PopularChatTopics when no messages, no recipe, and showPopularTopics is true (Pair view) */
<PopularChatTopics append={(text: string) => append(text)} />
) : null /* Show nothing when messages.length === 0 && suppressEmptyState === true */
Expand Down
Loading