Skip to content

Commit fced8f1

Browse files
committed
Trigger the Kapa modal from the custom button
1 parent 156bf12 commit fced8f1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,12 @@ export function SideMenu({
300300
ref={buttonRef}
301301
variant="small-menu-item"
302302
data-action="ask-ai"
303+
shortcut={{ modifiers: ["mod"], key: "/" }}
304+
data-modal-override-open-class-ask-ai="true"
303305
onClick={() => {
304-
// TODO: sort action
306+
if (typeof window.Kapa === "function") {
307+
window.Kapa("open");
308+
}
305309
}}
306310
>
307311
<AISparkleIcon className="size-5" />
@@ -313,7 +317,6 @@ export function SideMenu({
313317
className="flex items-center gap-1 py-1.5 pl-2.5 pr-2 text-xs"
314318
>
315319
Ask AI
316-
<ShortcutKey shortcut={{ key: "/", modifiers: ["mod"] }} variant="small" />
317320
</TooltipContent>
318321
</Tooltip>
319322
</TooltipProvider>

0 commit comments

Comments
 (0)