mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 05:54:44 +00:00
feat(settings): add team appearance setting to hide agent features (#411)
* feat(settings): add team appearance setting to hide agent features Add an Appearance subpage under Team Settings allowing team owners to toggle appearance.hideAgent for the team. Return appearance.hideAgent in the user-metadata API, and conditionally hide the AGENTS.md button, agent chatbot sidebar, and chatbot trigger button in the WebUI. * refactor(settings): add strongly typed TeamSettingsResponse to remove explicit any Introduce TeamSettingsResponse and TeamAppearanceSettings in @shumai/dtos, type TeamService.getSettings and updateSettings, and eliminate the explicit any cast in AppearanceSettings.tsx.
This commit is contained in:
@@ -89,9 +89,27 @@ export const updateTeamSettingsRequestSchema = z.union([
|
||||
key: z.literal('transcode.hardwareAcceleration'),
|
||||
value: z.nativeEnum(HardwareAcceleration),
|
||||
}),
|
||||
z.object({
|
||||
key: z.literal('appearance.hideAgent'),
|
||||
value: z.boolean(),
|
||||
}),
|
||||
])
|
||||
export type UpdateTeamSettingsRequest = z.infer<typeof updateTeamSettingsRequestSchema>
|
||||
|
||||
export interface TeamAppearanceSettings {
|
||||
hideAgent?: boolean
|
||||
}
|
||||
|
||||
export interface TeamSettingsResponse {
|
||||
transcode?: {
|
||||
videoStrategy?: VideoTranscodeStrategy
|
||||
hardwareAcceleration?: HardwareAcceleration
|
||||
}
|
||||
appearance?: TeamAppearanceSettings
|
||||
semanticSearchEnabled?: boolean
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export const sandboxSettingsSchema = z.object({
|
||||
networkSandboxEnabled: z.boolean(),
|
||||
allowedDomains: z.array(z.string()),
|
||||
|
||||
Reference in New Issue
Block a user