Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
docs: add ⌘I shortcut hint to Ask AI button in search dialog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 19, 2026 at 23:01 UTC
0d468dc3696807c3c61a13842e8854f8dc96d4f1
1 file changed
+18
-1
docs/components/custom-search-dialog.tsx
+18
-1
@@ -1,5 +1,6 @@
1
'use client';
2
3
+import { useEffect, useState } from 'react';
4
import Link from 'next/link';
5
import {
6
SearchDialog,
@@ -17,6 +18,14 @@ import { useDocsSearch } from 'fumadocs-core/search/client';
18
import { BotMessageSquare } from 'lucide-react';
19
import { toggleDecimalWidget } from './ask-ai-button';
20
21
+function MetaKey() {
22
+ const [key, setKey] = useState('⌘');
23
+ useEffect(() => {
24
+ if (!navigator.platform.toUpperCase().includes('MAC')) setKey('Ctrl');
25
+ }, []);
26
+ return key;
27
+}
28
+
29
export interface DefaultLink {
30
title: string;
31
description: string;
@@ -73,7 +82,7 @@ export default function CustomSearchDialog({
82
) : (
83
<SearchDialogList items={query.data === 'empty' ? null : query.data} />
84
)}
76
- <div className="border-t px-3 py-2">
85
+ <div className="flex items-center justify-between border-t px-3 py-2">
86
<button
87
type="button"
88
className="inline-flex items-center gap-1.5 text-xs text-fd-muted-foreground hover:text-fd-foreground transition-colors"
@@ -85,6 +94,14 @@ export default function CustomSearchDialog({
94
<BotMessageSquare className="size-3.5" />
95
You can also Ask AI
96
</button>
97
+ <div className="inline-flex gap-0.5">
98
+ <kbd className="rounded-md border bg-fd-background px-1.5 text-xs text-fd-muted-foreground">
99
+ <MetaKey />
100
+ </kbd>
101
+ <kbd className="rounded-md border bg-fd-background px-1.5 text-xs text-fd-muted-foreground">
102
+ I
103
+ </kbd>
104
+ </div>
105
</div>
106
</SearchDialogContent>
107
</SearchDialog>