Elffuss BraidHub

kikocis/continue public

c977fe2591e2 · 547 BRawPermalink
1import QuickLRU from "quick-lru";
2
3// The cache key and value are both a filepath string
4export type cacheElementType = string;
5
6// maximum number of open files that can be cached
7const MAX_NUM_OPEN_CONTEXT_FILES = 20;
8
9// stores which files are currently open in the IDE, in viewing order
10export const openedFilesLruCache = new QuickLRU<
11 cacheElementType,
12 cacheElementType
13>({
14 maxSize: MAX_NUM_OPEN_CONTEXT_FILES,
15});
16
17// used in core/core.ts to handle removals from the cache
18export const prevFilepaths = {
19 filepaths: [] as string[],
20};