@devries-cameron20 / composio-1 / commits / ee54348d0
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.

revert(docs): use Decimal.show() only until toggle API is available

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

Sushmithamallesh committed Feb 19, 2026 at 16:28 UTC ee54348d0f633589b36f7493ac5e3d15f21de66e
1 file changed +7 -20
docs/components/ask-ai-button.tsx
+7 -20
@@ -11,26 +11,13 @@ function getDecimal() {
11 return (window as typeof window & { Decimal?: DecimalAPI }).Decimal;
12 }
13
14 -function isDecimalVisible() {
15 - // Look for the sidebar panel (iframe), not the small launcher button
16 - const panel = document.querySelector('iframe[src*="decimal"]');
17 - if (!panel) return false;
18 - const rect = panel.getBoundingClientRect();
19 - // The push-sidebar panel is wide (300px+); the launcher is small
20 - return rect.width > 200;
21 -}
22 -
23 -function toggleDecimalWidget() {
14 +function showDecimalWidget() {
15 const decimal = getDecimal();
25 - if (!decimal) {
26 - setTimeout(() => getDecimal()?.show(), 500);
27 - return;
28 - }
29 - if (isDecimalVisible()) {
30 - decimal.hide();
31 - } else {
16 + if (decimal) {
17 decimal.show();
18 + return;
19 }
20 + setTimeout(() => getDecimal()?.show(), 500);
21 }
22
23 function useIsMac() {
@@ -44,7 +31,7 @@ function useIsMac() {
31 const handleKeyDown = (e: KeyboardEvent) => {
32 if ((e.metaKey || e.ctrlKey) && e.key === 'i') {
33 e.preventDefault();
47 - toggleDecimalWidget();
34 + showDecimalWidget();
35 }
36 };
37
@@ -84,7 +71,7 @@ export function SearchAndAskAI() {
71 )}
72 <button
73 type="button"
87 - onClick={toggleDecimalWidget}
74 + onClick={showDecimalWidget}
75 className="inline-flex items-center gap-2 rounded-lg border bg-fd-secondary/50 p-1.5 ps-2.5 text-sm text-fd-muted-foreground transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground shrink-0"
76 >
77 Ask AI
@@ -117,7 +104,7 @@ export function SearchAndAskAIMobile() {
104 <button
105 type="button"
106 aria-label="Ask AI"
120 - onClick={toggleDecimalWidget}
107 + onClick={showDecimalWidget}
108 className="inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 hover:bg-fd-accent hover:text-fd-accent-foreground"
109 >
110 <MessageSquare className="size-4.5" />