improve goose2 agent management flows (#8737)

Signed-off-by: tulsi <tulsi@block.xyz>
This commit is contained in:
tulsi
2026-04-21 17:54:48 -07:00
committed by GitHub
parent 23b3b3dcac
commit 7e2fb3ee5c
46 changed files with 1219 additions and 524 deletions
+6 -2
View File
@@ -20,6 +20,7 @@ import { useAppStartup } from "./hooks/useAppStartup";
import { useHomeSessionStateSync } from "./hooks/useHomeSessionStateSync";
import { loadStoredHomeSessionId } from "./lib/homeSessionStorage";
import { resolveSupportedSessionModelPreference } from "./lib/resolveSupportedSessionModelPreference";
import { useCreatePersonaNavigation } from "./hooks/useCreatePersonaNavigation";
import { AppShellContent } from "./ui/AppShellContent";
import { acpPrepareSession, acpSetModel } from "@/shared/api/acp";
import {
@@ -66,14 +67,12 @@ export function AppShell({ children }: { children?: React.ReactNode }) {
const agentStore = useAgentStore();
const projectStore = useProjectStore();
const providerInventoryEntries = useProviderInventoryStore((s) => s.entries);
const pendingProjectCreatedRef = useRef<((projectId: string) => void) | null>(
null,
);
const homeSessionRequestRef = useRef<Promise<ChatSession | null> | null>(
null,
);
const loadSessionMessages = useCallback(async (sessionId: string) => {
const sid = sessionId.slice(0, 8);
const existingMsgs = useChatStore.getState().messagesBySession[sessionId];
@@ -502,6 +501,10 @@ export function AppShell({ children }: { children?: React.ReactNode }) {
[sessionStore],
);
const handleCreatePersona = useCreatePersonaNavigation(() =>
handleNavigate("agents"),
);
const toggleSidebar = () => setSidebarCollapsed((prev) => !prev);
const handleResizeStart = useCallback(
@@ -659,6 +662,7 @@ export function AppShell({ children }: { children?: React.ReactNode }) {
activeView={activeView}
activeSession={activeSession}
homeSessionId={homeSessionId}
onCreatePersona={handleCreatePersona}
onArchiveChat={handleArchiveChat}
onCreateProject={openCreateProjectDialog}
onActivateHomeSession={activateHomeSession}