fix(chats): use a dedicated empty message
Show a localized Chats-specific empty state instead of reusing the project workspace session message.
This commit is contained in:
@@ -1790,10 +1790,11 @@ const SessionSidebarComponent: React.FC<SessionSidebarProps> = ({
|
|||||||
folderScopeKey: chatsRoot,
|
folderScopeKey: chatsRoot,
|
||||||
folderScopes,
|
folderScopes,
|
||||||
draftTarget: 'chat',
|
draftTarget: 'chat',
|
||||||
|
emptyMessage: t('sessions.sidebar.activity.chatsEmpty'),
|
||||||
sessions: items.map((item) => item.node),
|
sessions: items.map((item) => item.node),
|
||||||
};
|
};
|
||||||
return renderGroupSessions(group, 'managed-chats', null, true);
|
return renderGroupSessions(group, 'managed-chats', null, true);
|
||||||
}, [homeDirectory, renderGroupSessions, renderSessionNode]);
|
}, [homeDirectory, renderGroupSessions, renderSessionNode, t]);
|
||||||
|
|
||||||
const topContent = React.useMemo(
|
const topContent = React.useMemo(
|
||||||
() => (!isVSCode && !hasSessionSearchQuery && hasActivitySectionItems) ? (
|
() => (!isVSCode && !hasSessionSearchQuery && hasActivitySectionItems) ? (
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
- Root session menus can quickly create a worktree from the session directory's current branch and move the full session subtree there while idle.
|
- Root session menus can quickly create a worktree from the session directory's current branch and move the full session subtree there while idle.
|
||||||
- Managed Chats never offer the worktree-move action in either the sidebar row menu or the active-session header menu because their directories are not project repositories.
|
- Managed Chats never offer the worktree-move action in either the sidebar row menu or the active-session header menu because their directories are not project repositories.
|
||||||
- Managed Chats use the shared Chats root as their folder scope. Their activity section renders the normal folder tree, and sessions created from a Chats folder are assigned back to that root-scoped folder after their date/session directory materializes. Per-session folder scopes created by older builds remain visible for compatibility.
|
- Managed Chats use the shared Chats root as their folder scope. Their activity section renders the normal folder tree, and sessions created from a Chats folder are assigned back to that root-scoped folder after their date/session directory materializes. Per-session folder scopes created by older builds remain visible for compatibility.
|
||||||
|
- An empty Chats section says that there are no chats yet; it never reuses the project/workspace empty message.
|
||||||
- The New session keyboard command inherits the active materialized session directory. Explicit sidebar entry points, including the top New session row and the Chats `+`, open a fresh managed Chat draft instead.
|
- The New session keyboard command inherits the active materialized session directory. Explicit sidebar entry points, including the top New session row and the Chats `+`, open a fresh managed Chat draft instead.
|
||||||
- The new-worktree keyboard command is a silent no-op while a managed Chat draft is open. It must not retarget that draft to the active project or show a Git/worktree error because Chats never participate in worktrees.
|
- The new-worktree keyboard command is a silent no-op while a managed Chat draft is open. It must not retarget that draft to the active project or show a Git/worktree error because Chats never participate in worktrees.
|
||||||
- Directory loading is demand-driven: the sidebar publishes one complete priority plan for all known project/worktree directories, while the sync layer owns bounded execution.
|
- Directory loading is demand-driven: the sidebar publishes one complete priority plan for all known project/worktree directories, while the sync layer owns bounded execution.
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@ function SessionGroupSectionBase(props: Props): React.ReactNode {
|
|||||||
)
|
)
|
||||||
: bootstrapFailureNotice
|
: bootstrapFailureNotice
|
||||||
? bootstrapFailureNotice
|
? bootstrapFailureNotice
|
||||||
: t('sessions.sidebar.group.empty.noSessionsInWorkspace')}
|
: group.emptyMessage ?? t('sessions.sidebar.group.empty.noSessionsInWorkspace')}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
{totalSessions > 0 && bootstrapFailureNotice ? (
|
{totalSessions > 0 && bootstrapFailureNotice ? (
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export type SessionGroup = {
|
|||||||
*/
|
*/
|
||||||
folderScopes?: SessionGroupFolderScope[];
|
folderScopes?: SessionGroupFolderScope[];
|
||||||
draftTarget?: 'chat' | 'project';
|
draftTarget?: 'chat' | 'project';
|
||||||
|
emptyMessage?: string;
|
||||||
sessions: SessionNode[];
|
sessions: SessionNode[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -416,6 +416,7 @@ export const dict = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': 'Versuchen Sie einen anderen Titel, Branch, Ordner oder Pfad.',
|
'sessions.sidebar.empty.noMatches.description': 'Versuchen Sie einen anderen Titel, Branch, Ordner oder Pfad.',
|
||||||
'sessions.sidebar.activity.recentTitle': 'kürzlich',
|
'sessions.sidebar.activity.recentTitle': 'kürzlich',
|
||||||
'sessions.sidebar.activity.chatsTitle': 'Chats',
|
'sessions.sidebar.activity.chatsTitle': 'Chats',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': 'Noch keine Chats.',
|
||||||
'chat.chatInput.chooseProject': 'Projekt auswählen',
|
'chat.chatInput.chooseProject': 'Projekt auswählen',
|
||||||
'sessions.switcher.openAria': 'Sitzungswechsler öffnen',
|
'sessions.switcher.openAria': 'Sitzungswechsler öffnen',
|
||||||
'sessions.switcher.empty': 'Keine kürzlichen Sitzungen',
|
'sessions.switcher.empty': 'Keine kürzlichen Sitzungen',
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ export const dict = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': 'Try a different title, branch, folder, or path.',
|
'sessions.sidebar.empty.noMatches.description': 'Try a different title, branch, folder, or path.',
|
||||||
'sessions.sidebar.activity.recentTitle': 'recent',
|
'sessions.sidebar.activity.recentTitle': 'recent',
|
||||||
'sessions.sidebar.activity.chatsTitle': 'chats',
|
'sessions.sidebar.activity.chatsTitle': 'chats',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': 'No chats yet.',
|
||||||
'chat.chatInput.chooseProject': 'Choose project',
|
'chat.chatInput.chooseProject': 'Choose project',
|
||||||
'sessions.archivePage.allDirectories': 'All directories',
|
'sessions.archivePage.allDirectories': 'All directories',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': 'Sticky project headers',
|
'sessions.sidebar.header.displayMode.stickyHeaders': 'Sticky project headers',
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
"sessions.sidebar.empty.noMatches.description": "Inténtalo con un título, rama, carpeta o ruta diferente.",
|
"sessions.sidebar.empty.noMatches.description": "Inténtalo con un título, rama, carpeta o ruta diferente.",
|
||||||
"sessions.sidebar.activity.recentTitle": "reciente",
|
"sessions.sidebar.activity.recentTitle": "reciente",
|
||||||
"sessions.sidebar.activity.chatsTitle": "chats",
|
"sessions.sidebar.activity.chatsTitle": "chats",
|
||||||
|
"sessions.sidebar.activity.chatsEmpty": "Aún no hay chats.",
|
||||||
"chat.chatInput.chooseProject": "Elegir proyecto",
|
"chat.chatInput.chooseProject": "Elegir proyecto",
|
||||||
"sessions.archivePage.allDirectories": "Todos los directorios",
|
"sessions.archivePage.allDirectories": "Todos los directorios",
|
||||||
"sessions.sidebar.header.displayMode.stickyHeaders": "Encabezados de proyecto fijos",
|
"sessions.sidebar.header.displayMode.stickyHeaders": "Encabezados de proyecto fijos",
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ export const dict = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': 'Essayez un autre titre, branche, dossier ou chemin.',
|
'sessions.sidebar.empty.noMatches.description': 'Essayez un autre titre, branche, dossier ou chemin.',
|
||||||
'sessions.sidebar.activity.recentTitle': 'récent',
|
'sessions.sidebar.activity.recentTitle': 'récent',
|
||||||
'sessions.sidebar.activity.chatsTitle': 'discussions',
|
'sessions.sidebar.activity.chatsTitle': 'discussions',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': 'Aucune discussion pour le moment.',
|
||||||
'chat.chatInput.chooseProject': 'Choisir un projet',
|
'chat.chatInput.chooseProject': 'Choisir un projet',
|
||||||
'sessions.archivePage.allDirectories': 'Tous les répertoires',
|
'sessions.archivePage.allDirectories': 'Tous les répertoires',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': 'Épingler les en-têtes de projet',
|
'sessions.sidebar.header.displayMode.stickyHeaders': 'Épingler les en-têtes de projet',
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': '別のタイトル、ブランチ、フォルダ、パスをお試しください。',
|
'sessions.sidebar.empty.noMatches.description': '別のタイトル、ブランチ、フォルダ、パスをお試しください。',
|
||||||
'sessions.sidebar.activity.recentTitle': '最近',
|
'sessions.sidebar.activity.recentTitle': '最近',
|
||||||
'sessions.sidebar.activity.chatsTitle': 'チャット',
|
'sessions.sidebar.activity.chatsTitle': 'チャット',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': 'まだチャットはありません。',
|
||||||
'chat.chatInput.chooseProject': 'プロジェクトを選択',
|
'chat.chatInput.chooseProject': 'プロジェクトを選択',
|
||||||
'sessions.archivePage.allDirectories': 'すべてのディレクトリ',
|
'sessions.archivePage.allDirectories': 'すべてのディレクトリ',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': 'プロジェクトヘッダーを固定',
|
'sessions.sidebar.header.displayMode.stickyHeaders': 'プロジェクトヘッダーを固定',
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': '다른 제목, 브랜치, 폴더 또는 경로로 검색해 보세요.',
|
'sessions.sidebar.empty.noMatches.description': '다른 제목, 브랜치, 폴더 또는 경로로 검색해 보세요.',
|
||||||
'sessions.sidebar.activity.recentTitle': '최근',
|
'sessions.sidebar.activity.recentTitle': '최근',
|
||||||
'sessions.sidebar.activity.chatsTitle': '채팅',
|
'sessions.sidebar.activity.chatsTitle': '채팅',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': '아직 채팅이 없습니다.',
|
||||||
'chat.chatInput.chooseProject': '프로젝트 선택',
|
'chat.chatInput.chooseProject': '프로젝트 선택',
|
||||||
'sessions.archivePage.allDirectories': '모든 디렉터리',
|
'sessions.archivePage.allDirectories': '모든 디렉터리',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': '프로젝트 헤더 고정',
|
'sessions.sidebar.header.displayMode.stickyHeaders': '프로젝트 헤더 고정',
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': 'Spróbuj innego tytułu, gałęzi, folderu lub ścieżki.',
|
'sessions.sidebar.empty.noMatches.description': 'Spróbuj innego tytułu, gałęzi, folderu lub ścieżki.',
|
||||||
'sessions.sidebar.activity.recentTitle': 'ostatnie',
|
'sessions.sidebar.activity.recentTitle': 'ostatnie',
|
||||||
'sessions.sidebar.activity.chatsTitle': 'czaty',
|
'sessions.sidebar.activity.chatsTitle': 'czaty',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': 'Nie ma jeszcze czatów.',
|
||||||
'chat.chatInput.chooseProject': 'Wybierz projekt',
|
'chat.chatInput.chooseProject': 'Wybierz projekt',
|
||||||
'sessions.archivePage.allDirectories': 'Wszystkie katalogi',
|
'sessions.archivePage.allDirectories': 'Wszystkie katalogi',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': 'Przyklejone nagłówki projektów',
|
'sessions.sidebar.header.displayMode.stickyHeaders': 'Przyklejone nagłówki projektów',
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
"sessions.sidebar.empty.noMatches.description": "Tente com outro título, branch, pasta ou caminho.",
|
"sessions.sidebar.empty.noMatches.description": "Tente com outro título, branch, pasta ou caminho.",
|
||||||
"sessions.sidebar.activity.recentTitle": "recente",
|
"sessions.sidebar.activity.recentTitle": "recente",
|
||||||
"sessions.sidebar.activity.chatsTitle": "conversas",
|
"sessions.sidebar.activity.chatsTitle": "conversas",
|
||||||
|
"sessions.sidebar.activity.chatsEmpty": "Ainda não há conversas.",
|
||||||
"chat.chatInput.chooseProject": "Escolher projeto",
|
"chat.chatInput.chooseProject": "Escolher projeto",
|
||||||
"sessions.archivePage.allDirectories": "Todos os diretórios",
|
"sessions.archivePage.allDirectories": "Todos os diretórios",
|
||||||
"sessions.sidebar.header.displayMode.stickyHeaders": "Cabeçalhos de projeto fixos",
|
"sessions.sidebar.header.displayMode.stickyHeaders": "Cabeçalhos de projeto fixos",
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
"sessions.sidebar.empty.noMatches.description": "Спробуйте інший заголовок, гілку, папку або шлях.",
|
"sessions.sidebar.empty.noMatches.description": "Спробуйте інший заголовок, гілку, папку або шлях.",
|
||||||
"sessions.sidebar.activity.recentTitle": "Останні",
|
"sessions.sidebar.activity.recentTitle": "Останні",
|
||||||
"sessions.sidebar.activity.chatsTitle": "Чати",
|
"sessions.sidebar.activity.chatsTitle": "Чати",
|
||||||
|
"sessions.sidebar.activity.chatsEmpty": "Чатів ще немає.",
|
||||||
"chat.chatInput.chooseProject": "Вибрати проєкт",
|
"chat.chatInput.chooseProject": "Вибрати проєкт",
|
||||||
"sessions.archivePage.allDirectories": "Всі директорії",
|
"sessions.archivePage.allDirectories": "Всі директорії",
|
||||||
"sessions.sidebar.header.displayMode.stickyHeaders": "Липкі заголовки проектів",
|
"sessions.sidebar.header.displayMode.stickyHeaders": "Липкі заголовки проектів",
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': '请尝试其他标题、分支、文件夹或路径。',
|
'sessions.sidebar.empty.noMatches.description': '请尝试其他标题、分支、文件夹或路径。',
|
||||||
'sessions.sidebar.activity.recentTitle': '最近',
|
'sessions.sidebar.activity.recentTitle': '最近',
|
||||||
'sessions.sidebar.activity.chatsTitle': '聊天',
|
'sessions.sidebar.activity.chatsTitle': '聊天',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': '暂无聊天。',
|
||||||
'chat.chatInput.chooseProject': '选择项目',
|
'chat.chatInput.chooseProject': '选择项目',
|
||||||
'sessions.archivePage.allDirectories': '所有目录',
|
'sessions.archivePage.allDirectories': '所有目录',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': '固定项目标题',
|
'sessions.sidebar.header.displayMode.stickyHeaders': '固定项目标题',
|
||||||
|
|||||||
@@ -452,6 +452,7 @@ export const dict: Record<I18nKey, string> = {
|
|||||||
'sessions.sidebar.empty.noMatches.description': '請嘗試其他標題、分支、資料夾或路徑。',
|
'sessions.sidebar.empty.noMatches.description': '請嘗試其他標題、分支、資料夾或路徑。',
|
||||||
'sessions.sidebar.activity.recentTitle': '最近',
|
'sessions.sidebar.activity.recentTitle': '最近',
|
||||||
'sessions.sidebar.activity.chatsTitle': '聊天',
|
'sessions.sidebar.activity.chatsTitle': '聊天',
|
||||||
|
'sessions.sidebar.activity.chatsEmpty': '尚無聊天。',
|
||||||
'chat.chatInput.chooseProject': '選擇專案',
|
'chat.chatInput.chooseProject': '選擇專案',
|
||||||
'sessions.archivePage.allDirectories': '所有目錄',
|
'sessions.archivePage.allDirectories': '所有目錄',
|
||||||
'sessions.sidebar.header.displayMode.stickyHeaders': '固定專案標題',
|
'sessions.sidebar.header.displayMode.stickyHeaders': '固定專案標題',
|
||||||
|
|||||||
Reference in New Issue
Block a user