Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(webui): remove eager markdown preload
yorkhellen52a9300d9eb0
diff --git a/webui/src/App.tsx b/webui/src/App.tsxindex d5b7485a6..600cc802d 100644--- a/webui/src/App.tsx+++ b/webui/src/App.tsx@@ -5,7 +5,7 @@ import { Sidebar } from "@/components/Sidebar";import { SettingsView } from "@/components/settings/SettingsView";import { ThreadShell } from "@/components/thread/ThreadShell";import { Sheet, SheetContent } from "@/components/ui/sheet";-import { preloadMarkdownText } from "@/components/MarkdownText";+import { useSessions } from "@/hooks/useSessions";import { useTheme } from "@/hooks/useTheme";import { cn } from "@/lib/utils";@@ -157,22 +157,7 @@ export default function App() {return bootstrapWithSecret(saved);}, [bootstrapWithSecret]);- useEffect(() => {- const warm = () => preloadMarkdownText();- const win = globalThis as typeof globalThis & {- requestIdleCallback?: (- callback: IdleRequestCallback,- options?: IdleRequestOptions,- ) => number;- cancelIdleCallback?: (handle: number) => void;- };- if (typeof win.requestIdleCallback === "function") {- const id = win.requestIdleCallback(warm, { timeout: 1500 });- return () => win.cancelIdleCallback?.(id);- }- const id = globalThis.setTimeout(warm, 250);- return () => globalThis.clearTimeout(id);- }, []);+if (state.status === "loading") {return (diff --git a/webui/src/components/MarkdownText.tsx b/webui/src/components/MarkdownText.tsxindex 111158968..fd92873b3 100644--- a/webui/src/components/MarkdownText.tsx+++ b/webui/src/components/MarkdownText.tsx@@ -10,9 +10,7 @@ interface MarkdownTextProps {const loadMarkdownRenderer = () => import("@/components/MarkdownTextRenderer");const LazyMarkdownRenderer = lazy(loadMarkdownRenderer);-export function preloadMarkdownText(): void {- void loadMarkdownRenderer();-}+/*** Lightweight markdown renderer mirroring agent-chat-ui: GFM + math via