@devries-cameron20 / composio Mirror · read-only / commits / c009bb589
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 08:15 UTC

docs: restore working Ask AI widget opener with API + DOM fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 19, 2026 at 16:01 UTC c009bb589a61dc19c6c560e9208734ca10a10ff3
1 file changed +2
docs/components/ask-ai-button.tsx
+2
@@ -6,6 +6,7 @@ import { useSearchContext } from '@fumadocs/ui/contexts/search';
6 import { useI18n } from '@fumadocs/ui/contexts/i18n';
7
8 function openDecimalWidget() {
9 + // Try the global API first
10 const win = window as typeof window & { Decimal?: Record<string, unknown> };
11 if (win.Decimal) {
12 for (const key of ['open', 'toggle', 'show'] as const) {
@@ -15,6 +16,7 @@ function openDecimalWidget() {
16 }
17 }
18 }
19 + // Fallback: find and click the widget's launcher button in the DOM
20 const launcher =
21 document.querySelector<HTMLElement>('[data-decimal-widget]') ??
22 document.querySelector<HTMLElement>('[class*="decimal" i]') ??