fix: AI loop prevention (no tools on last iteration), calendar button first, mail filter in toolbar, AI folder rename query invalidation
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState, useRef, useCallback } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import {
|
||||
fetchSessions, createSession, deleteSession, updateSession,
|
||||
fetchFolders, createFolder, deleteFolder, updateFolder,
|
||||
@@ -261,6 +262,7 @@ export function SessionList({ activeSessionId, onSelectSession, isSidebar, class
|
||||
const [dragSessionId, setDragSessionId] = useState<string | null>(null);
|
||||
const [dragFolderId, setDragFolderId] = useState<string | null>(null);
|
||||
const [contextMenu, setContextMenu] = useState<ContextMenuState | null>(null);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const loadData = async () => {
|
||||
try {
|
||||
@@ -287,7 +289,10 @@ export function SessionList({ activeSessionId, onSelectSession, isSidebar, class
|
||||
if (!newName) return;
|
||||
try {
|
||||
if (type === 'session') await updateSession(id, { title: newName });
|
||||
else await updateFolder(id, { name: newName });
|
||||
else {
|
||||
await updateFolder(id, { name: newName });
|
||||
queryClient.invalidateQueries({ queryKey: ['ai', 'folders'] });
|
||||
}
|
||||
loadData();
|
||||
} catch (e) { setError(e instanceof Error ? e.message : 'Rename failed'); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user