Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Introduced new components for managing admin settings, including AdminListControls, AdminSettingsCard, and TechBrandSelectLabel. - Implemented dynamic loading for admin settings sections to optimize performance. - Enhanced the layout of various admin settings sections for better user experience. - Updated the AiAssistantSection to include LLM provider management and improved model selection. - Refactored authentication settings to streamline configuration and improve accessibility.
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
export type UltiAiToolGroup = {
|
|
id: string
|
|
label: string
|
|
description: string
|
|
}
|
|
|
|
/** Tool groups exposed to UltiAI via MCP (X-Ulti-Enabled-Tools). */
|
|
export const ULTIAI_TOOL_GROUPS: UltiAiToolGroup[] = [
|
|
{
|
|
id: "mail",
|
|
label: "Mail",
|
|
description: "Recherche, lecture, envoi, libellés et suppression de messages.",
|
|
},
|
|
{
|
|
id: "drive",
|
|
label: "Drive",
|
|
description: "Fichiers, dossiers, partages et déplacements.",
|
|
},
|
|
{
|
|
id: "contacts",
|
|
label: "Contacts",
|
|
description: "Carnets d'adresses et fiches contacts.",
|
|
},
|
|
{
|
|
id: "agenda",
|
|
label: "Agenda",
|
|
description: "Calendriers, événements, invitations et visioconférence.",
|
|
},
|
|
{
|
|
id: "search",
|
|
label: "Recherche suite",
|
|
description: "Index unifié mail, drive et contacts (pas le web public).",
|
|
},
|
|
{
|
|
id: "web_search",
|
|
label: "Recherche web",
|
|
description:
|
|
"Recherche en ligne (Brave, Bing, SearXNG, DuckDuckGo, API JSON). Même réglages que contacts — onglet Recherche.",
|
|
},
|
|
]
|
|
|
|
export const DEFAULT_ULTIAI_ENABLED_TOOLS = ULTIAI_TOOL_GROUPS.map((group) => group.id)
|
|
|
|
export function toggleUltiAiToolGroup(
|
|
enabledTools: string[],
|
|
groupId: string,
|
|
enabled: boolean,
|
|
): string[] {
|
|
const set = new Set(enabledTools)
|
|
if (enabled) set.add(groupId)
|
|
else set.delete(groupId)
|
|
return ULTIAI_TOOL_GROUPS.map((group) => group.id).filter((id) => set.has(id))
|
|
}
|