Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: restore working Ask AI widget opener with API + DOM fallback
Sushmithamalleshc009bb589a61
diff --git a/docs/components/ask-ai-button.tsx b/docs/components/ask-ai-button.tsxindex e3a930109..864a58c78 100644--- a/docs/components/ask-ai-button.tsx+++ b/docs/components/ask-ai-button.tsx@@ -6,6 +6,7 @@ import { useSearchContext } from '@fumadocs/ui/contexts/search';import { useI18n } from '@fumadocs/ui/contexts/i18n';function openDecimalWidget() {+ // Try the global API firstconst win = window as typeof window & { Decimal?: Record<string, unknown> };if (win.Decimal) {for (const key of ['open', 'toggle', 'show'] as const) {@@ -15,6 +16,7 @@ function openDecimalWidget() {}}}+ // Fallback: find and click the widget's launcher button in the DOMconst launcher =document.querySelector<HTMLElement>('[data-decimal-widget]') ??document.querySelector<HTMLElement>('[class*="decimal" i]') ??