mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user