68c94dfa3a
* docs: define product and design direction * style: establish restrained workbench primitives * refactor: declutter board and task topbars * style: align dockview panel chrome * fix: align task topbar vcs control sizing * refactor: surface integrations navigation * fix: repair integrations and task creation workflow * refactor: include linear in integrations navigation * style: restore familiar workbench tones * fix: add dockview tab breathing room * fix: show configured integration shortcuts * fix: hover open integrations menu * fix: stabilize integrations hover menu * fix: align home and dockview topbars * fix: normalize home topbar controls * fix: compact home topbar height * fix: simplify home chrome and split buttons * fix: move integrations to left chrome * fix: restore home stats shortcut * fix: add dockview tab breathing room * fix: border home stats button * fix: streamline dockview topbar actions * fix: align task split button seam * fix: address review feedback * fix: restore topbar e2e affordances * fix: stabilize workflow e2e isolation * fix: add task topbar action overflow * fix: address PR review feedback
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import { IconMessageCircle } from "@tabler/icons-react";
|
|
import { Button } from "@kandev/ui/button";
|
|
import { KeyboardShortcutTooltip } from "@/components/keyboard-shortcut-tooltip";
|
|
import { getShortcut } from "@/lib/keyboard/shortcut-overrides";
|
|
import { useQuickChatLauncher } from "@/hooks/use-quick-chat-launcher";
|
|
import { useAppStore } from "@/components/state-provider";
|
|
import type { ComponentProps } from "react";
|
|
|
|
type QuickChatButtonProps = {
|
|
workspaceId?: string | null;
|
|
size?: ComponentProps<typeof Button>["size"];
|
|
};
|
|
|
|
/** Quick Chat button that opens the quick chat modal */
|
|
export function QuickChatButton({ workspaceId, size = "default" }: QuickChatButtonProps) {
|
|
const handleOpenQuickChat = useQuickChatLauncher(workspaceId);
|
|
const keyboardShortcuts = useAppStore((s) => s.userSettings.keyboardShortcuts);
|
|
const quickChatShortcut = getShortcut("QUICK_CHAT", keyboardShortcuts);
|
|
|
|
if (!workspaceId) return null;
|
|
|
|
return (
|
|
<KeyboardShortcutTooltip shortcut={quickChatShortcut} description="Quick Chat">
|
|
<Button
|
|
variant="outline"
|
|
size={size}
|
|
className="cursor-pointer gap-2"
|
|
onClick={handleOpenQuickChat}
|
|
>
|
|
<IconMessageCircle className="h-4 w-4" />
|
|
Chat
|
|
</Button>
|
|
</KeyboardShortcutTooltip>
|
|
);
|
|
}
|