Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): import agent sessions from project settings after onboarding #23122

ClosedPohTeyToe(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/23122/headopened View on GitHub

Showing 4 changed files with 104 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
92 additions and 1 deletionapps/web/src/components/settings/ProjectSettingsPanel.tsxModified
View file
@@ -15,7 +15,7 @@
import { type EnvironmentId, type ProjectIconOverride } from "@t3tools/contracts";
import { useLocation, useNavigate } from "@tanstack/react-router";
import * as Cause from "effect/Cause";
-import { InfoIcon, Trash2Icon } from "lucide-react";
+import { DownloadIcon, InfoIcon, Trash2Icon } from "lucide-react";
import { lazy, Suspense, useEffect, useRef, useState, type ReactNode } from "react";
​
import { useComposerDraftStore } from "../../composerDraftStore";
@@ -25,6 +25,8 @@
type SidebarProjectGroupMember,
type SidebarProjectSnapshot,
} from "../../sidebarProjectGrouping";
+import { agentSessionImport, agentSessionRescan } from "../../state/agentSessions";
+import { useAtomCommand } from "../../state/use-atom-command";
import { useEnvironments, usePrimaryEnvironmentId } from "../../state/environments";
import { useThreadShells, waitForProjectRemoval } from "../../state/entities";
import { projectEnvironment } from "../../state/projects";
@@ -185,6 +187,8 @@
const deleteProject = useOrchestrationCommand(projectEnvironment.delete, {
reportFailure: false,
});
+ const rescanSessions = useAtomCommand(agentSessionRescan, { reportFailure: false });
+ const importSessions = useOrchestrationCommand(agentSessionImport, { reportFailure: false });
const projectNameEditedRef = useRef(false);
​
const faviconPath = representative.faviconPath ?? null;