fix(assistant): preserve managed status gating

Only request managed status for the assistant addon. Cover the configured attachment path and keep operator-only gateway configuration out of the self-hosted environment reference.
This commit is contained in:
Maurice
2026-12-01 00:40:57 +01:00
parent 00e98b8711
commit f511fe4fcf
5 changed files with 30 additions and 13 deletions
@@ -2,6 +2,7 @@ import { useEffect } from 'react';
import { useAddonStore } from '../../store/addonStore';
import { aiRoutesOpen, useAssistantStore } from '../../store/assistantStore';
import { useAuthStore } from '../../store/authStore';
/**
* Asks for the assistant's status when a view of it mounts, and again when
@@ -13,7 +14,8 @@ import { aiRoutesOpen, useAssistantStore } from '../../store/assistantStore';
*/
export function useAssistantStatus(): void {
const loadStatus = useAssistantStore((s) => s.loadStatus);
const routesOpen = useAddonStore(aiRoutesOpen);
const managed = useAuthStore((s) => s.managed);
const routesOpen = useAddonStore((s) => aiRoutesOpen(s, managed));
const assistantOn = useAddonStore((s) => s.isEnabled('ai_assistant'));
useEffect(() => {