mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-24 22:34:59 +00:00
test-commit
This commit is contained in:
@@ -435,9 +435,7 @@ export function useProjectsState({
|
||||
}
|
||||
}
|
||||
|
||||
const hasActiveSession =
|
||||
(selectedSession && activeSessions.has(selectedSession.id)) ||
|
||||
(activeSessions.size > 0 && Array.from(activeSessions).some((id) => id.startsWith('new-session-')));
|
||||
const hasActiveSession = Boolean(selectedSession && activeSessions.has(selectedSession.id));
|
||||
|
||||
const updatedProjectsWithTaskMaster = mergeTaskMasterCache(projectsMessage.projects, projects);
|
||||
const updatedProjects = mergeExpandedSessionPages(projects, updatedProjectsWithTaskMaster);
|
||||
|
||||
@@ -44,23 +44,6 @@ export function useSessionProtection() {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const replaceTemporarySession = useCallback((realSessionId?: string | null) => {
|
||||
if (!realSessionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
setActiveSessions((prev) => {
|
||||
const next = new Set<string>();
|
||||
for (const sessionId of prev) {
|
||||
if (!sessionId.startsWith('new-session-')) {
|
||||
next.add(sessionId);
|
||||
}
|
||||
}
|
||||
next.add(realSessionId);
|
||||
return next;
|
||||
});
|
||||
}, []);
|
||||
|
||||
return {
|
||||
activeSessions,
|
||||
processingSessions,
|
||||
@@ -68,6 +51,5 @@ export function useSessionProtection() {
|
||||
markSessionAsInactive,
|
||||
markSessionAsProcessing,
|
||||
markSessionAsNotProcessing,
|
||||
replaceTemporarySession,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user