Dont show new chat placeholders for recipes in sidebar (#6790)

This commit is contained in:
Zane
2026-02-03 08:36:05 -08:00
committed by GitHub
parent eae5a47788
commit 1f95f07065
3 changed files with 12 additions and 4 deletions
@@ -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<{
@@ -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,
+3
View File
@@ -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;
}