🗂️ feat: Add File Search Toggle Permission for Chat Area Badge (#8605)

This commit is contained in:
Danny Avila 2025-07-22 17:51:21 -04:00 committed by GitHub
parent 5178507b1c
commit e5d08ccdf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 184 additions and 19 deletions

View file

@ -36,6 +36,10 @@ export enum PermissionTypes {
* Type for using the "Web Search" feature
*/
WEB_SEARCH = 'WEB_SEARCH',
/**
* Type for using the "File Search" feature
*/
FILE_SEARCH = 'FILE_SEARCH',
}
/**
@ -103,6 +107,11 @@ export const webSearchPermissionsSchema = z.object({
});
export type TWebSearchPermissions = z.infer<typeof webSearchPermissionsSchema>;
export const fileSearchPermissionsSchema = z.object({
[Permissions.USE]: z.boolean().default(true),
});
export type TFileSearchPermissions = z.infer<typeof fileSearchPermissionsSchema>;
// Define a single permissions schema that holds all permission types.
export const permissionsSchema = z.object({
[PermissionTypes.PROMPTS]: promptPermissionsSchema,
@ -113,4 +122,5 @@ export const permissionsSchema = z.object({
[PermissionTypes.TEMPORARY_CHAT]: temporaryChatPermissionsSchema,
[PermissionTypes.RUN_CODE]: runCodePermissionsSchema,
[PermissionTypes.WEB_SEARCH]: webSearchPermissionsSchema,
[PermissionTypes.FILE_SEARCH]: fileSearchPermissionsSchema,
});