fix: align archive all action in VS Code header
Moves the archive all sessions action to the right side of the header Keeps the sessions title focused on text only
This commit is contained in:
@@ -10,6 +10,7 @@ import { useConfigStore } from '@/stores/useConfigStore';
|
|||||||
import { resolveGlobalSessionDirectory, useGlobalSessionsStore } from '@/stores/useGlobalSessionsStore';
|
import { resolveGlobalSessionDirectory, useGlobalSessionsStore } from '@/stores/useGlobalSessionsStore';
|
||||||
import { ContextUsageDisplay } from '@/components/ui/ContextUsageDisplay';
|
import { ContextUsageDisplay } from '@/components/ui/ContextUsageDisplay';
|
||||||
import { McpDropdown } from '@/components/mcp/McpDropdown';
|
import { McpDropdown } from '@/components/mcp/McpDropdown';
|
||||||
|
import { ArchiveAllDropdown } from '@/components/session/ArchiveAllDropdown';
|
||||||
import { SessionSwitcherDropdown } from '@/components/session/SessionSwitcherDropdown';
|
import { SessionSwitcherDropdown } from '@/components/session/SessionSwitcherDropdown';
|
||||||
import { SessionsTabTitle } from '@/components/session/SessionsTabTitle';
|
import { SessionsTabTitle } from '@/components/session/SessionsTabTitle';
|
||||||
import { useProjectsStore } from '@/stores/useProjectsStore';
|
import { useProjectsStore } from '@/stores/useProjectsStore';
|
||||||
@@ -813,9 +814,10 @@ const VSCodeHeader: React.FC<VSCodeHeaderProps> = ({ title, showBack, onBack, on
|
|||||||
</button>
|
</button>
|
||||||
</SessionSwitcherDropdown>
|
</SessionSwitcherDropdown>
|
||||||
) : (
|
) : (
|
||||||
<SessionsTabTitle title={title} onArchiveAll={onArchiveAll} />
|
<SessionsTabTitle title={title} />
|
||||||
)}
|
)}
|
||||||
<div className="min-w-0 flex-1" />
|
<div className="min-w-0 flex-1" />
|
||||||
|
{onArchiveAll && <ArchiveAllDropdown onArchiveAll={onArchiveAll} />}
|
||||||
{onNewSession && (
|
{onNewSession && (
|
||||||
<button
|
<button
|
||||||
onClick={onNewSession}
|
onClick={onNewSession}
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ArchiveAllDropdown } from '@/components/session/ArchiveAllDropdown';
|
|
||||||
|
|
||||||
interface SessionsTabTitleProps {
|
interface SessionsTabTitleProps {
|
||||||
title: string;
|
title: string;
|
||||||
onArchiveAll?: () => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SessionsTabTitle: React.FC<SessionsTabTitleProps> = ({ title, onArchiveAll }) => (
|
const SessionsTabTitle: React.FC<SessionsTabTitleProps> = ({ title }) => (
|
||||||
<>
|
<h1 className="text-sm font-medium truncate" title={title}>{title}</h1>
|
||||||
<h1 className="text-sm font-medium truncate flex-1" title={title}>{title}</h1>
|
|
||||||
{onArchiveAll && <ArchiveAllDropdown onArchiveAll={onArchiveAll} />}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export { SessionsTabTitle };
|
export { SessionsTabTitle };
|
||||||
|
|||||||
Reference in New Issue
Block a user