diff --git a/frontend/src/lib/components/home/HomeQuickAccess.svelte b/frontend/src/lib/components/home/HomeQuickAccess.svelte index 493b6a0e8f..b81f848838 100644 --- a/frontend/src/lib/components/home/HomeQuickAccess.svelte +++ b/frontend/src/lib/components/home/HomeQuickAccess.svelte @@ -10,7 +10,6 @@ GitFork, LayoutGrid, List, - MessagesSquare, Pen, Star as StarIcon, StarOff, @@ -40,15 +39,6 @@ import HomeSectionLabel from './HomeSectionLabel.svelte' import HomeSectionCount from './HomeSectionCount.svelte' import { QUICK_ACCESS_ROWS, homeQuickAccessSettings } from './homeQuickAccessSettings.svelte' - import { sessionsSwitchShown } from '$lib/components/sessions/sidebarList.svelte' - import { - getEffectiveWorkspaceId, - homeDraft, - sessionLastActivityAt, - sessionPageHref, - sessionState - } from '$lib/components/sessions/sessionState.svelte' - import { openSession } from '$lib/components/sessions/sessionSwitch.svelte' interface Props { workspace: string @@ -78,24 +68,6 @@ const RECENT_COUNT = 6 - // The workspace's last sessions, one row of them: sent ones and drafts with text, not Home's - // own draft, which is the composer above. The session list holds the rest. - const CONTINUE_COUNT = 3 - let continueSessions = $derived( - sessionsSwitchShown() - ? sessionState.sessions - .filter( - (s) => - !s.archived && - s.id !== homeDraft.id && - (!!s.workspace_id || !!s.draftPrompt?.trim()) && - getEffectiveWorkspaceId(s) === workspace - ) - .sort((a, b) => sessionLastActivityAt(b) - sessionLastActivityAt(a)) - .slice(0, CONTINUE_COUNT) - : [] - ) - // The way back from Hide from Home is in the header menu HomeAIChat adds, which Home mounts // only with the AI sessions beta on. Without it the section can't be hidden, and one hidden // earlier shows again. @@ -259,9 +231,6 @@ ((!homeQuickAccessSettings.showFavorites && favorites.length > 0) || (!homeQuickAccessSettings.showRecent && recentItems.list(workspace).length > 0)) ) - let favoritesShown = $derived( - favoriteManager.loadedFor === workspace && (entries.length > 0 || emptiedBySettings) && !hidden - ) // Read when the pointer reaches the time, so the tooltip is current however long the // page has been open. @@ -432,42 +401,9 @@ {/snippet} -{#if continueSessions.length > 0} -
- Continue last session -
- {#each continueSessions as session (session.id)} - - { - if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return - e.preventDefault() - void openSession(session) - }} - > - - {session.summary ?? 'Untitled session'} - - - - - {/each} -
-
-{/if} - -{#if favoritesShown} +{#if favoriteManager.loadedFor === workspace && (entries.length > 0 || emptiedBySettings) && !hidden}
@@ -536,8 +472,6 @@ {/if}
-{/if} -{#if favoritesShown || continueSessions.length > 0} Workspace items {#if itemCount != undefined} diff --git a/frontend/src/lib/components/sessions/sessionSwitch.svelte.ts b/frontend/src/lib/components/sessions/sessionSwitch.svelte.ts index 4878f4e168..88a0478f3f 100644 --- a/frontend/src/lib/components/sessions/sessionSwitch.svelte.ts +++ b/frontend/src/lib/components/sessions/sessionSwitch.svelte.ts @@ -140,13 +140,6 @@ export async function openNewSession(workspaceId?: string): Promise { await toHome(blankHomeDraft().id) } -/** A session picked from a list: an unsent draft in Home's composer, any other on its page. */ -export async function openSession(session: Session): Promise { - if (opensOnHome(session)) return openDraftOnHome(session.id) - selectSession(session.id) - await goto(sessionPageHref(session.id)) -} - /** An unsent draft, opened in Home's composer. `replace` for a redirect off the sessions * page, where Back must not return to the URL that bounced here. */ export async function openDraftOnHome(id: string, opts?: { replace?: boolean }): Promise {