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:
Yiling-J
2026-09-17 18:31:43 +08:00
committed by GitHub
parent 7af3647913
commit e2f741eda6
18 changed files with 458 additions and 43 deletions
@@ -5,6 +5,7 @@ import { ResizeHandle } from '@/ui/components/resize-handle'
import { useChatbotStore } from '@/ui/stores/chatbot'
import { useTopNavStore } from '@/ui/stores/top-nav'
import { useUiStore } from '@/ui/stores/ui'
import { useUserMetadataStore } from '@/ui/stores/user-metadata'
import type { AncestorFolder, AssetInfo } from '@shumai/dtos'
import { useQuery } from '@tanstack/react-query'
import { useNavigate } from '@tanstack/react-router'
@@ -36,6 +37,7 @@ export default function AgentsMdManager({
setFileListLeftSidebarCollapsed: setIsLeftSidebarCollapsed,
} = useUiStore()
const { isChatbotOpen, setIsChatbotOpen } = useChatbotStore()
const hideAgent = useUserMetadataStore((s) => Boolean(s.metadata['appearance.hideAgent']))
const { data: folderInfo } = useQuery({
queryKey: ['folders', assetId],
@@ -136,7 +138,7 @@ export default function AgentsMdManager({
/>
</div>
{isChatbotOpen && (
{isChatbotOpen && !hideAgent && (
<>
<ResizeHandle
onResize={(delta) => {