diff --git a/desktop/src/components/ButlerPanel/index.tsx b/desktop/src/components/ButlerPanel/index.tsx index d84886d..6e063ed 100644 --- a/desktop/src/components/ButlerPanel/index.tsx +++ b/desktop/src/components/ButlerPanel/index.tsx @@ -13,12 +13,15 @@ interface ButlerPanelProps { } export function ButlerPanel({ agentId }: ButlerPanelProps) { - const { painPoints, proposals, loading, error, refresh } = useButlerInsights(agentId); + const [resolvedAgentId, setResolvedAgentId] = useState(null); + // Use resolved kernel UUID for queries — raw agentId may be "1" from SaaS relay + // while pain points/proposals are stored under kernel UUID + const effectiveAgentId = resolvedAgentId ?? agentId; + const { painPoints, proposals, loading, error, refresh } = useButlerInsights(effectiveAgentId); const messageCount = useChatStore((s) => s.messages.length); const { accountIndustries, configs, lastSynced, isLoading: industryLoading, fetchIndustries } = useIndustryStore(); const [analyzing, setAnalyzing] = useState(false); const [memoryRefreshKey, setMemoryRefreshKey] = useState(0); - const [resolvedAgentId, setResolvedAgentId] = useState(null); // Resolve SaaS relay agentId ("1") to kernel UUID for VikingStorage queries useEffect(() => {