mirror of
https://github.com/zadam/trilium.git
synced 2025-12-04 22:44:25 +01:00
17 lines
563 B
TypeScript
17 lines
563 B
TypeScript
import FNote from "../../entities/fnote";
|
|
import { useTriliumOptionBool } from "../react/hooks";
|
|
import { LaunchBarActionButton, useLauncherIconAndTitle } from "./launch_bar_widgets";
|
|
|
|
export default function AiChatButton({ launcherNote }: { launcherNote: FNote }) {
|
|
const [ aiEnabled ] = useTriliumOptionBool("aiEnabled");
|
|
const { icon, title } = useLauncherIconAndTitle(launcherNote);
|
|
|
|
return aiEnabled && (
|
|
<LaunchBarActionButton
|
|
icon={icon}
|
|
text={title}
|
|
triggerCommand="createAiChat"
|
|
/>
|
|
)
|
|
}
|