diff --git a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx index 13327af6de2c..baefdc5c684a 100644 --- a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx +++ b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx @@ -95,13 +95,14 @@ const menuItems: NavigationEntry[] = [ ]; const getSessionDisplayName = (session: Session): string => { - if (!shouldShowNewChatTitle(session)) { - return session.name; - } if (session.recipe?.title) { return session.recipe.title; } - return DEFAULT_CHAT_TITLE; + + if (shouldShowNewChatTitle(session)) { + return DEFAULT_CHAT_TITLE; + } + return session.name; }; const SessionList = React.memo<{ diff --git a/ui/desktop/src/components/recipes/RecipesView.tsx b/ui/desktop/src/components/recipes/RecipesView.tsx index 64fe60f6d2c4..c6f8940cc7ff 100644 --- a/ui/desktop/src/components/recipes/RecipesView.tsx +++ b/ui/desktop/src/components/recipes/RecipesView.tsx @@ -58,6 +58,7 @@ import { } from '../ui/dropdown-menu'; import { getSearchShortcutText } from '../../utils/keyboardShortcuts'; import { errorMessage } from '../../utils/conversionUtils'; +import { AppEvents } from '../../constants/events'; export default function RecipesView() { const setView = useNavigation(); @@ -149,6 +150,9 @@ export default function RecipesView() { }); const session = newAgent.data; trackRecipeStarted(true, undefined, false); + + window.dispatchEvent(new CustomEvent(AppEvents.SESSION_CREATED, { detail: { session } })); + setView('pair', { disableAnimation: true, resumeSessionId: session.id, diff --git a/ui/desktop/src/sessions.ts b/ui/desktop/src/sessions.ts index d3e87967ba68..0ab2a45e9428 100644 --- a/ui/desktop/src/sessions.ts +++ b/ui/desktop/src/sessions.ts @@ -9,6 +9,9 @@ import type { FixedExtensionEntry } from './components/ConfigContext'; import { AppEvents } from './constants/events'; export function shouldShowNewChatTitle(session: Session): boolean { + if (session.recipe) { + return false; + } return !session.user_set_name && session.message_count === 0; }