feat(chats): add managed projectless chat sessions
Create projectless chat sessions under a managed, date-scoped Chats directory and clean abandoned or deleted session folders. Add Chats to sidebar state, startup cache, shared context, and Electron Mini Chat while keeping VS Code project-only. Resolve managed chat directories to one server-side memory owner and document the runtime contracts.
This commit is contained in:
@@ -3,6 +3,7 @@ import { runBackgroundNetworkTask } from '@/lib/background-network';
|
||||
import { retry } from "@/sync/retry";
|
||||
import { stripSessionListDetails } from "@/sync/sanitize";
|
||||
import { startSessionLoadPerformanceEvent } from "@/sync/session-load-performance";
|
||||
import { isChatDirectoryPath } from '@/lib/chatDirectories';
|
||||
|
||||
export type GlobalSessionRecord = Session & {
|
||||
project?: {
|
||||
@@ -12,6 +13,12 @@ export type GlobalSessionRecord = Session & {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export const filterManagedChatsForRuntime = (sessions: Session[], vscode: boolean): Session[] => (
|
||||
vscode
|
||||
? sessions.filter((session) => !isChatDirectoryPath(session.directory))
|
||||
: sessions
|
||||
);
|
||||
|
||||
const toNumber = (value: string | null): number | null => {
|
||||
if (!value) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user