mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat(search-spaces): add cache keys for search spaces and llm configs
This commit is contained in:
parent
172f58f742
commit
edfe2aa87e
1 changed files with 14 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import type { GetChatsRequest } from "@/contracts/types/chat.types";
|
|||
import type { GetDocumentsRequest } from "@/contracts/types/document.types";
|
||||
import type { GetLLMConfigsRequest } from "@/contracts/types/llm-config.types";
|
||||
import type { GetPodcastsRequest } from "@/contracts/types/podcast.types";
|
||||
import type { GetSearchSpacesRequest } from "@/contracts/types/search-space.types";
|
||||
|
||||
export const cacheKeys = {
|
||||
chats: {
|
||||
|
|
@ -33,4 +34,17 @@ export const cacheKeys = {
|
|||
auth: {
|
||||
user: ["auth", "user"] as const,
|
||||
},
|
||||
searchSpaces: {
|
||||
all: ["search-spaces"] as const,
|
||||
withQueryParams: (queries: GetSearchSpacesRequest["queryParams"]) =>
|
||||
["search-spaces", ...(queries ? Object.values(queries) : [])] as const,
|
||||
detail: (searchSpaceId: string) => ["search-spaces", searchSpaceId] as const,
|
||||
communityPrompts: ["search-spaces", "community-prompts"] as const,
|
||||
},
|
||||
llmConfigs: {
|
||||
all: (searchSpaceId: string) => ["llm-configs", searchSpaceId] as const,
|
||||
global: ["llm-configs", "global"] as const,
|
||||
detail: (searchSpaceId: string, llmConfigId: string) => ["llm-configs", searchSpaceId, llmConfigId] as const,
|
||||
preferences: (searchSpaceId: string) => ["llm-configs", "preferences", searchSpaceId] as const,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue