diff --git a/ui/src/components/features/KnowledgeChatView.tsx b/ui/src/components/features/KnowledgeChatView.tsx index 18a0d86..04e08aa 100644 --- a/ui/src/components/features/KnowledgeChatView.tsx +++ b/ui/src/components/features/KnowledgeChatView.tsx @@ -40,6 +40,7 @@ export function KnowledgeChatView({ onGpuActivity }: Props = {}) { const [catalogDocs, setCatalogDocs] = useState(null) const [showArch, setShowArch] = useState(true) const [activeStage, setActiveStage] = useState(null) + const [traceCfg, setTraceCfg] = useState<{ tracing: boolean; project: string; smith_url: string } | null>(null) const bottomRef = useRef(null) const loadMeta = useCallback(async () => { @@ -77,6 +78,13 @@ export function KnowledgeChatView({ onGpuActivity }: Props = {}) { loadCatalog() }, [loadMeta, loadCatalog]) + useEffect(() => { + fetch('/rag/config') + .then((r) => (r.ok ? r.json() : null)) + .then((c) => { if (c) setTraceCfg(c) }) + .catch(() => {}) + }, []) + useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: 'smooth' }) }, [messages, loading]) @@ -351,6 +359,17 @@ export function KnowledgeChatView({ onGpuActivity }: Props = {}) { )} + {traceCfg?.tracing && ( + + LangSmith ↗ + + )}